My Project
OSParseosil.tab.cpp
Go to the documentation of this file.
1 /* A Bison parser, made by GNU Bison 3.8.2. */
2 
3 /* Bison implementation for Yacc-like parsers in C
4 
5  Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
6  Inc.
7 
8  This program is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation, either version 3 of the License, or
11  (at your option) any later version.
12 
13  This program is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program. If not, see <https://www.gnu.org/licenses/>. */
20 
21 /* As a special exception, you may create a larger work that contains
22  part or all of the Bison parser skeleton and distribute that work
23  under terms of your choice, so long as that work isn't itself a
24  parser generator using the skeleton or a modified version thereof
25  as a parser skeleton. Alternatively, if you modify or redistribute
26  the parser skeleton itself, you may (at your option) remove this
27  special exception, which will cause the skeleton and the resulting
28  Bison output files to be licensed under the GNU General Public
29  License without this special exception.
30 
31  This special exception was added by the Free Software Foundation in
32  version 2.2 of Bison. */
33 
34 /* C LALR(1) parser skeleton written by Richard Stallman, by
35  simplifying the original so-called "semantic" parser. */
36 
37 /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38  especially those whose name start with YY_ or yy_. They are
39  private implementation details that can be changed or removed. */
40 
41 /* All symbols defined below should begin with yy or YY, to avoid
42  infringing on user name space. This should be done even for local
43  variables, as they might otherwise be expanded by user macros.
44  There are some unavoidable exceptions within include files to
45  define necessary library symbols; they are noted "INFRINGES ON
46  USER NAME SPACE" below. */
47 
48 /* Identify Bison output, and Bison version. */
49 #define YYBISON 30802
50 
51 /* Bison version string. */
52 #define YYBISON_VERSION "3.8.2"
53 
54 /* Skeleton name. */
55 #define YYSKELETON_NAME "yacc.c"
56 
57 /* Pure parsers. */
58 #define YYPURE 1
59 
60 /* Push parsers. */
61 #define YYPUSH 0
62 
63 /* Pull parsers. */
64 #define YYPULL 1
65 
66 
67 /* Substitute the variable and function names. */
68 #define yyparse osilparse
69 #define yylex osillex
70 #define yyerror osilerror
71 #define yydebug osildebug
72 #define yynerrs osilnerrs
73 
74 /* First part of user prologue. */
75 
76 
77 #include <string>
78 #include <iostream>
79 #include <sstream>
80 #include <algorithm>
81 
82 #include "OSInstance.h"
83 #include "OSGeneral.h"
84 #include "OSnLNode.h"
85 #include "OSErrorClass.h"
86 #include "OSParameters.h"
87 #include "OSiLParserData.h"
88 #include "OSgLParserData.h"
89 #include "OSnLParserData.h"
90 #include "OSBase64.h"
91 #include "OSMathUtil.h"
92 #include "OSConfig.h"
93 
94 #define OSINSTANCE_AVAILABLE
95 
96 //#define CHECK_PARSE_TIME
97 
98 //#define DEBUG
99 
100 #ifdef DEBUG
101 #define YYDEBUG 1
102 #endif
103 
104 #ifdef HAVE_CTIME
105 # include <ctime>
106 #else
107 # ifdef HAVE_TIME_H
108 # include <time.h>
109 # else
110 # error "don't have header file for time"
111 # endif
112 #endif
113 
114 #ifdef HAVE_CSTRING
115 # include <cstring>
116 #else
117 # ifdef HAVE_STRING_H
118 # include <string.h>
119 # else
120 # error "don't have header file for string"
121 # endif
122 #endif
123 
124 #ifdef HAVE_CSTDIO
125 # include <cstdio>
126 #else
127 # ifdef HAVE_STDIO_H
128 # include <stdio.h>
129 # else
130 # error "don't have header file for stdio"
131 # endif
132 #endif
133 
134 using std::cout;
135 using std::endl;
136 using std::ostringstream;
137 
138 
140 YY_BUFFER_STATE osil_scan_string (const char *yy_str , void* yyscanner );
141 int osillex_init(void** ptr_yy_globals);
142 int osillex_destroy (void* yyscanner );
143 void osilset_extra (OSiLParserData* parserData , void* yyscanner );
144 int osilget_lineno( void* yyscanner);
145 char *osilget_text (void* yyscanner );
146 void osilset_lineno (int line_number , void* yyscanner );
151 
152 //
153 
154 double atofmod1(int* osillineno, const char *ch1, const char *ch2 );
155 int atoimod1(int* osillineno, const char *ch1, const char *ch2);
156 // we distinguish a newline from other whitespace
157 // so that we can report proper line numbers in case of error
158 void osilerror_wrapper( const char* ch, int* osillineno, const char* errormsg);
159 bool isnewline(char c, int* osillineno);
160 bool parseVariables(const char **pchar, OSInstance *osinstance, int* osillineno);
161 bool parseObjectives(const char **pchar, OSInstance *osinstance, int* osillineno);
162 bool parseObjCoef(const char **pchar, int objcount, OSInstance *osinstance, int* osillineno);
163 bool parseConstraints(const char **pchar, OSInstance *osinstance, int* osillineno);
164 bool parseLinearConstraintCoefficients(const char **pchar, OSInstance *osinstance, int* osillineno);
165 bool parseStart(const char **pchar, OSInstance *osinstance, int* osillineno);
166 bool parseRowIdx(const char **pchar, OSInstance *osinstance, int* osillineno);
167 bool parseColIdx(const char **pchar, OSInstance *osinstance, int* osillineno);
168 bool parseValue(const char **pchar, OSInstance *osinstance, int* osillineno);
169 bool parseInstanceHeader(const char **pchar, OSInstance *osinstance, int* osillineno);
170 bool parseInstanceData( const char **pchar, OSInstance *osinstance, int* osillineno);
171 char *parseBase64( const char **p, int *dataSize, int* osillineno);
172 
173 #define ISWHITESPACE( char_) ((char_) == ' ' || \
174  (char_) == '\t' || (char_) == '\r')
175 
176 #define ISDIGIT(_c) ((_c) >= '0' && (_c) <= '9')
177 
178 #define GETATTRIBUTETEXT \
179  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ; \
180  if( *ch != '=') { osilerror_wrapper( ch, osillineno, "found an attribute not defined"); return false;} \
181  ch++; \
182  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ; \
183  if(*ch == '\"'){ \
184  ch++; \
185  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ; \
186  *p = ch; \
187  for( ; *ch != '\"'; ch++); \
188  }\
189  else{\
190  if(*ch == '\'') { \
191  ch++; \
192  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ; \
193  *p = ch; \
194  for( ; *ch != '\''; ch++); \
195  } \
196  else { osilerror_wrapper( ch, osillineno,"missing quote on attribute"); return false;} \
197  }\
198  numChar = ch - *p; \
199  attText = new char[numChar + 1]; \
200  for(ki = 0; ki < numChar; ki++) attText[ki] = *((*p)++); \
201  attText[ki] = '\0'; \
202  attTextEnd = &attText[ki];
203 
204 #define GAIL printf("GAIL ANN HONDA\n")
205 
206 
207 
208 #define ECHOCHECK \
209  GAIL; \
210  printf("%c", ch[-2]); \
211  printf("%c", ch[-1]); \
212  printf("%c", ch[0]); \
213  printf("%c", ch[1]); \
214  printf("%c", ch[2]); \
215  printf("%c", ch[3]); \
216  printf("%c", ch[4]); \
217  printf("%c", ch[5]); \
218  printf("%c \n", ch[6]); \
219  GAIL;
220 
221 
222 # ifndef YY_CAST
223 # ifdef __cplusplus
224 # define YY_CAST(Type, Val) static_cast<Type> (Val)
225 # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
226 # else
227 # define YY_CAST(Type, Val) ((Type) (Val))
228 # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
229 # endif
230 # endif
231 # ifndef YY_NULLPTR
232 # if defined __cplusplus
233 # if 201103L <= __cplusplus
234 # define YY_NULLPTR nullptr
235 # else
236 # define YY_NULLPTR 0
237 # endif
238 # else
239 # define YY_NULLPTR ((void*)0)
240 # endif
241 # endif
242 
243 #include "OSParseosil.tab.hpp"
244 /* Symbol kind. */
245 enum yysymbol_kind_t
246 {
247  YYSYMBOL_YYEMPTY = -2,
248  YYSYMBOL_YYEOF = 0, /* "end of file" */
249  YYSYMBOL_YYerror = 1, /* error */
250  YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
251  YYSYMBOL_ATTRIBUTETEXT = 3, /* ATTRIBUTETEXT */
252  YYSYMBOL_ELEMENTTEXT = 4, /* ELEMENTTEXT */
253  YYSYMBOL_ITEMTEXT = 5, /* ITEMTEXT */
254  YYSYMBOL_INTEGER = 6, /* INTEGER */
255  YYSYMBOL_DOUBLE = 7, /* DOUBLE */
256  YYSYMBOL_QUOTE = 8, /* QUOTE */
257  YYSYMBOL_TWOQUOTES = 9, /* TWOQUOTES */
258  YYSYMBOL_ENDOFELEMENT = 10, /* ENDOFELEMENT */
259  YYSYMBOL_GREATERTHAN = 11, /* GREATERTHAN */
260  YYSYMBOL_EMPTYSEMIDEFINITENESSATT = 12, /* EMPTYSEMIDEFINITENESSATT */
261  YYSYMBOL_SEMIDEFINITENESSATT = 13, /* SEMIDEFINITENESSATT */
262  YYSYMBOL_NUMBEROFQTERMSATT = 14, /* NUMBEROFQTERMSATT */
263  YYSYMBOL_NUMBEROFCONESATT = 15, /* NUMBEROFCONESATT */
264  YYSYMBOL_NUMBEROFSTAGESATT = 16, /* NUMBEROFSTAGESATT */
265  YYSYMBOL_IDXONEATT = 17, /* IDXONEATT */
266  YYSYMBOL_IDXTWOATT = 18, /* IDXTWOATT */
267  YYSYMBOL_HORIZONATT = 19, /* HORIZONATT */
268  YYSYMBOL_STARTATT = 20, /* STARTATT */
269  YYSYMBOL_STARTIDXATT = 21, /* STARTIDXATT */
270  YYSYMBOL_MATRIXIDXATT = 22, /* MATRIXIDXATT */
271  YYSYMBOL_LBMATRIXIDXATT = 23, /* LBMATRIXIDXATT */
272  YYSYMBOL_LBCONEIDXATT = 24, /* LBCONEIDXATT */
273  YYSYMBOL_UBMATRIXIDXATT = 25, /* UBMATRIXIDXATT */
274  YYSYMBOL_UBCONEIDXATT = 26, /* UBCONEIDXATT */
275  YYSYMBOL_TEMPLATEMATRIXIDXATT = 27, /* TEMPLATEMATRIXIDXATT */
276  YYSYMBOL_REFERENCEMATRIXIDXATT = 28, /* REFERENCEMATRIXIDXATT */
277  YYSYMBOL_VARREFERENCEMATRIXIDXATT = 29, /* VARREFERENCEMATRIXIDXATT */
278  YYSYMBOL_OBJREFERENCEMATRIXIDXATT = 30, /* OBJREFERENCEMATRIXIDXATT */
279  YYSYMBOL_CONREFERENCEMATRIXIDXATT = 31, /* CONREFERENCEMATRIXIDXATT */
280  YYSYMBOL_ORDERCONEIDXATT = 32, /* ORDERCONEIDXATT */
281  YYSYMBOL_CONSTANTMATRIXIDXATT = 33, /* CONSTANTMATRIXIDXATT */
282  YYSYMBOL_NORMSCALEFACTORATT = 34, /* NORMSCALEFACTORATT */
283  YYSYMBOL_DISTORTIONMATRIXIDXATT = 35, /* DISTORTIONMATRIXIDXATT */
284  YYSYMBOL_AXISDIRECTIONATT = 36, /* AXISDIRECTIONATT */
285  YYSYMBOL_FIRSTAXISDIRECTIONATT = 37, /* FIRSTAXISDIRECTIONATT */
286  YYSYMBOL_SECONDAXISDIRECTIONATT = 38, /* SECONDAXISDIRECTIONATT */
287  YYSYMBOL_OSILEND = 39, /* OSILEND */
288  YYSYMBOL_INSTANCEDATAEND = 40, /* INSTANCEDATAEND */
289  YYSYMBOL_INSTANCEDATASTARTEND = 41, /* INSTANCEDATASTARTEND */
290  YYSYMBOL_QUADRATICCOEFFICIENTSSTART = 42, /* QUADRATICCOEFFICIENTSSTART */
291  YYSYMBOL_QUADRATICCOEFFICIENTSEND = 43, /* QUADRATICCOEFFICIENTSEND */
292  YYSYMBOL_QTERMSTART = 44, /* QTERMSTART */
293  YYSYMBOL_QTERMEND = 45, /* QTERMEND */
294  YYSYMBOL_CONESSTART = 46, /* CONESSTART */
295  YYSYMBOL_CONESEND = 47, /* CONESEND */
296  YYSYMBOL_NONNEGATIVECONESTART = 48, /* NONNEGATIVECONESTART */
297  YYSYMBOL_NONNEGATIVECONEEND = 49, /* NONNEGATIVECONEEND */
298  YYSYMBOL_NONPOSITIVECONESTART = 50, /* NONPOSITIVECONESTART */
299  YYSYMBOL_NONPOSITIVECONEEND = 51, /* NONPOSITIVECONEEND */
300  YYSYMBOL_ORTHANTCONESTART = 52, /* ORTHANTCONESTART */
301  YYSYMBOL_ORTHANTCONEEND = 53, /* ORTHANTCONEEND */
302  YYSYMBOL_POLYHEDRALCONESTART = 54, /* POLYHEDRALCONESTART */
303  YYSYMBOL_POLYHEDRALCONEEND = 55, /* POLYHEDRALCONEEND */
304  YYSYMBOL_QUADRATICCONESTART = 56, /* QUADRATICCONESTART */
305  YYSYMBOL_QUADRATICCONEEND = 57, /* QUADRATICCONEEND */
306  YYSYMBOL_ROTATEDQUADRATICCONESTART = 58, /* ROTATEDQUADRATICCONESTART */
307  YYSYMBOL_ROTATEDQUADRATICCONEEND = 59, /* ROTATEDQUADRATICCONEEND */
308  YYSYMBOL_SEMIDEFINITECONESTART = 60, /* SEMIDEFINITECONESTART */
309  YYSYMBOL_SEMIDEFINITECONEEND = 61, /* SEMIDEFINITECONEEND */
310  YYSYMBOL_PRODUCTCONESTART = 62, /* PRODUCTCONESTART */
311  YYSYMBOL_PRODUCTCONEEND = 63, /* PRODUCTCONEEND */
312  YYSYMBOL_INTERSECTIONCONESTART = 64, /* INTERSECTIONCONESTART */
313  YYSYMBOL_INTERSECTIONCONEEND = 65, /* INTERSECTIONCONEEND */
314  YYSYMBOL_DUALCONESTART = 66, /* DUALCONESTART */
315  YYSYMBOL_DUALCONEEND = 67, /* DUALCONEEND */
316  YYSYMBOL_POLARCONESTART = 68, /* POLARCONESTART */
317  YYSYMBOL_POLARCONEEND = 69, /* POLARCONEEND */
318  YYSYMBOL_DIRECTIONSTART = 70, /* DIRECTIONSTART */
319  YYSYMBOL_DIRECTIONEND = 71, /* DIRECTIONEND */
320  YYSYMBOL_FACTORSSTART = 72, /* FACTORSSTART */
321  YYSYMBOL_FACTORSEND = 73, /* FACTORSEND */
322  YYSYMBOL_COMPONENTSSTART = 74, /* COMPONENTSSTART */
323  YYSYMBOL_COMPONENTSEND = 75, /* COMPONENTSEND */
324  YYSYMBOL_TIMEDOMAINSTART = 76, /* TIMEDOMAINSTART */
325  YYSYMBOL_TIMEDOMAINEND = 77, /* TIMEDOMAINEND */
326  YYSYMBOL_STAGESSTART = 78, /* STAGESSTART */
327  YYSYMBOL_STAGESEND = 79, /* STAGESEND */
328  YYSYMBOL_STAGESTART = 80, /* STAGESTART */
329  YYSYMBOL_STAGEEND = 81, /* STAGEEND */
330  YYSYMBOL_INTERVALSTART = 82, /* INTERVALSTART */
331  YYSYMBOL_INTERVALEND = 83, /* INTERVALEND */
332  YYSYMBOL_HEADERSTART = 84, /* HEADERSTART */
333  YYSYMBOL_HEADEREND = 85, /* HEADEREND */
334  YYSYMBOL_FILENAMESTART = 86, /* FILENAMESTART */
335  YYSYMBOL_FILENAMEEND = 87, /* FILENAMEEND */
336  YYSYMBOL_FILENAMEEMPTY = 88, /* FILENAMEEMPTY */
337  YYSYMBOL_FILENAMESTARTANDEND = 89, /* FILENAMESTARTANDEND */
338  YYSYMBOL_FILESOURCESTART = 90, /* FILESOURCESTART */
339  YYSYMBOL_FILESOURCEEND = 91, /* FILESOURCEEND */
340  YYSYMBOL_FILESOURCEEMPTY = 92, /* FILESOURCEEMPTY */
341  YYSYMBOL_FILESOURCESTARTANDEND = 93, /* FILESOURCESTARTANDEND */
342  YYSYMBOL_FILEDESCRIPTIONSTART = 94, /* FILEDESCRIPTIONSTART */
343  YYSYMBOL_FILEDESCRIPTIONEND = 95, /* FILEDESCRIPTIONEND */
344  YYSYMBOL_FILEDESCRIPTIONEMPTY = 96, /* FILEDESCRIPTIONEMPTY */
345  YYSYMBOL_FILEDESCRIPTIONSTARTANDEND = 97, /* FILEDESCRIPTIONSTARTANDEND */
346  YYSYMBOL_FILECREATORSTART = 98, /* FILECREATORSTART */
347  YYSYMBOL_FILECREATOREND = 99, /* FILECREATOREND */
348  YYSYMBOL_FILECREATOREMPTY = 100, /* FILECREATOREMPTY */
349  YYSYMBOL_FILECREATORSTARTANDEND = 101, /* FILECREATORSTARTANDEND */
350  YYSYMBOL_FILELICENCESTART = 102, /* FILELICENCESTART */
351  YYSYMBOL_FILELICENCEEND = 103, /* FILELICENCEEND */
352  YYSYMBOL_FILELICENCEEMPTY = 104, /* FILELICENCEEMPTY */
353  YYSYMBOL_FILELICENCESTARTANDEND = 105, /* FILELICENCESTARTANDEND */
354  YYSYMBOL_INDEXESSTART = 106, /* INDEXESSTART */
355  YYSYMBOL_INDEXESEND = 107, /* INDEXESEND */
356  YYSYMBOL_VALUESSTART = 108, /* VALUESSTART */
357  YYSYMBOL_VALUESEND = 109, /* VALUESEND */
358  YYSYMBOL_NONZEROSSTART = 110, /* NONZEROSSTART */
359  YYSYMBOL_NONZEROSEND = 111, /* NONZEROSEND */
360  YYSYMBOL_ELSTART = 112, /* ELSTART */
361  YYSYMBOL_ELEND = 113, /* ELEND */
362  YYSYMBOL_ENUMERATIONSTART = 114, /* ENUMERATIONSTART */
363  YYSYMBOL_ENUMERATIONEND = 115, /* ENUMERATIONEND */
364  YYSYMBOL_ITEMEMPTY = 116, /* ITEMEMPTY */
365  YYSYMBOL_ITEMSTART = 117, /* ITEMSTART */
366  YYSYMBOL_ITEMEND = 118, /* ITEMEND */
367  YYSYMBOL_ITEMSTARTANDEND = 119, /* ITEMSTARTANDEND */
368  YYSYMBOL_BASE64START = 120, /* BASE64START */
369  YYSYMBOL_BASE64END = 121, /* BASE64END */
370  YYSYMBOL_NUMBEROFELATT = 122, /* NUMBEROFELATT */
371  YYSYMBOL_NUMBEROFENUMERATIONSATT = 123, /* NUMBEROFENUMERATIONSATT */
372  YYSYMBOL_NUMBEROFITEMSATT = 124, /* NUMBEROFITEMSATT */
373  YYSYMBOL_EMPTYCATEGORYATT = 125, /* EMPTYCATEGORYATT */
374  YYSYMBOL_CATEGORYATT = 126, /* CATEGORYATT */
375  YYSYMBOL_EMPTYDESCRIPTIONATT = 127, /* EMPTYDESCRIPTIONATT */
376  YYSYMBOL_DESCRIPTIONATT = 128, /* DESCRIPTIONATT */
377  YYSYMBOL_EMPTYSOLVERATT = 129, /* EMPTYSOLVERATT */
378  YYSYMBOL_SOLVERATT = 130, /* SOLVERATT */
379  YYSYMBOL_EMPTYNAMEATT = 131, /* EMPTYNAMEATT */
380  YYSYMBOL_NAMEATT = 132, /* NAMEATT */
381  YYSYMBOL_EMPTYTYPEATT = 133, /* EMPTYTYPEATT */
382  YYSYMBOL_TYPEATT = 134, /* TYPEATT */
383  YYSYMBOL_EMPTYENUMTYPEATT = 135, /* EMPTYENUMTYPEATT */
384  YYSYMBOL_ENUMTYPEATT = 136, /* ENUMTYPEATT */
385  YYSYMBOL_EMPTYSHAPEATT = 137, /* EMPTYSHAPEATT */
386  YYSYMBOL_SHAPEATT = 138, /* SHAPEATT */
387  YYSYMBOL_EMPTYUNITATT = 139, /* EMPTYUNITATT */
388  YYSYMBOL_UNITATT = 140, /* UNITATT */
389  YYSYMBOL_EMPTYVALUEATT = 141, /* EMPTYVALUEATT */
390  YYSYMBOL_VALUEATT = 142, /* VALUEATT */
391  YYSYMBOL_EMPTYVALUETYPEATT = 143, /* EMPTYVALUETYPEATT */
392  YYSYMBOL_VALUETYPEATT = 144, /* VALUETYPEATT */
393  YYSYMBOL_EMPTYCONTYPEATT = 145, /* EMPTYCONTYPEATT */
394  YYSYMBOL_CONTYPEATT = 146, /* CONTYPEATT */
395  YYSYMBOL_EMPTYOBJTYPEATT = 147, /* EMPTYOBJTYPEATT */
396  YYSYMBOL_OBJTYPEATT = 148, /* OBJTYPEATT */
397  YYSYMBOL_EMPTYVARTYPEATT = 149, /* EMPTYVARTYPEATT */
398  YYSYMBOL_VARTYPEATT = 150, /* VARTYPEATT */
399  YYSYMBOL_EMPTYMATRIXCONTYPEATT = 151, /* EMPTYMATRIXCONTYPEATT */
400  YYSYMBOL_MATRIXCONTYPEATT = 152, /* MATRIXCONTYPEATT */
401  YYSYMBOL_EMPTYMATRIXOBJTYPEATT = 153, /* EMPTYMATRIXOBJTYPEATT */
402  YYSYMBOL_MATRIXOBJTYPEATT = 154, /* MATRIXOBJTYPEATT */
403  YYSYMBOL_EMPTYMATRIXVARTYPEATT = 155, /* EMPTYMATRIXVARTYPEATT */
404  YYSYMBOL_MATRIXVARTYPEATT = 156, /* MATRIXVARTYPEATT */
405  YYSYMBOL_EMPTYMATRIXTYPEATT = 157, /* EMPTYMATRIXTYPEATT */
406  YYSYMBOL_MATRIXTYPEATT = 158, /* MATRIXTYPEATT */
407  YYSYMBOL_EMPTYSYMMETRYATT = 159, /* EMPTYSYMMETRYATT */
408  YYSYMBOL_SYMMETRYATT = 160, /* SYMMETRYATT */
409  YYSYMBOL_EMPTYROWMAJORATT = 161, /* EMPTYROWMAJORATT */
410  YYSYMBOL_ROWMAJORATT = 162, /* ROWMAJORATT */
411  YYSYMBOL_EMPTYBASETRANSPOSEATT = 163, /* EMPTYBASETRANSPOSEATT */
412  YYSYMBOL_BASETRANSPOSEATT = 164, /* BASETRANSPOSEATT */
413  YYSYMBOL_NUMBEROFBLOCKSATT = 165, /* NUMBEROFBLOCKSATT */
414  YYSYMBOL_NUMBEROFCOLUMNSATT = 166, /* NUMBEROFCOLUMNSATT */
415  YYSYMBOL_NUMBEROFROWSATT = 167, /* NUMBEROFROWSATT */
416  YYSYMBOL_NUMBEROFMATRICESATT = 168, /* NUMBEROFMATRICESATT */
417  YYSYMBOL_NUMBEROFVALUESATT = 169, /* NUMBEROFVALUESATT */
418  YYSYMBOL_NUMBEROFCONSTRAINTSATT = 170, /* NUMBEROFCONSTRAINTSATT */
419  YYSYMBOL_NUMBEROFCONATT = 171, /* NUMBEROFCONATT */
420  YYSYMBOL_NUMBEROFCONIDXATT = 172, /* NUMBEROFCONIDXATT */
421  YYSYMBOL_NUMBEROFOBJECTIVESATT = 173, /* NUMBEROFOBJECTIVESATT */
422  YYSYMBOL_NUMBEROFOBJATT = 174, /* NUMBEROFOBJATT */
423  YYSYMBOL_NUMBEROFOBJIDXATT = 175, /* NUMBEROFOBJIDXATT */
424  YYSYMBOL_NUMBEROFVARIABLESATT = 176, /* NUMBEROFVARIABLESATT */
425  YYSYMBOL_NUMBEROFVARATT = 177, /* NUMBEROFVARATT */
426  YYSYMBOL_NUMBEROFVARIDXATT = 178, /* NUMBEROFVARIDXATT */
427  YYSYMBOL_NUMBEROFMATRIXCONATT = 179, /* NUMBEROFMATRIXCONATT */
428  YYSYMBOL_NUMBEROFMATRIXOBJATT = 180, /* NUMBEROFMATRIXOBJATT */
429  YYSYMBOL_NUMBEROFMATRIXVARATT = 181, /* NUMBEROFMATRIXVARATT */
430  YYSYMBOL_BASEMATRIXIDXATT = 182, /* BASEMATRIXIDXATT */
431  YYSYMBOL_TARGETMATRIXFIRSTROWATT = 183, /* TARGETMATRIXFIRSTROWATT */
432  YYSYMBOL_TARGETMATRIXFIRSTCOLATT = 184, /* TARGETMATRIXFIRSTCOLATT */
433  YYSYMBOL_BASEMATRIXSTARTROWATT = 185, /* BASEMATRIXSTARTROWATT */
434  YYSYMBOL_BASEMATRIXSTARTCOLATT = 186, /* BASEMATRIXSTARTCOLATT */
435  YYSYMBOL_BASEMATRIXENDROWATT = 187, /* BASEMATRIXENDROWATT */
436  YYSYMBOL_BASEMATRIXENDCOLATT = 188, /* BASEMATRIXENDCOLATT */
437  YYSYMBOL_SCALARMULTIPLIERATT = 189, /* SCALARMULTIPLIERATT */
438  YYSYMBOL_BLOCKROWIDXATT = 190, /* BLOCKROWIDXATT */
439  YYSYMBOL_BLOCKCOLIDXATT = 191, /* BLOCKCOLIDXATT */
440  YYSYMBOL_MATRIXVARIDXATT = 192, /* MATRIXVARIDXATT */
441  YYSYMBOL_MATRIXOBJIDXATT = 193, /* MATRIXOBJIDXATT */
442  YYSYMBOL_MATRIXCONIDXATT = 194, /* MATRIXCONIDXATT */
443  YYSYMBOL_IDXATT = 195, /* IDXATT */
444  YYSYMBOL_INCRATT = 196, /* INCRATT */
445  YYSYMBOL_MULTATT = 197, /* MULTATT */
446  YYSYMBOL_SIZEOFATT = 198, /* SIZEOFATT */
447  YYSYMBOL_COEFATT = 199, /* COEFATT */
448  YYSYMBOL_CONSTANTATT = 200, /* CONSTANTATT */
449  YYSYMBOL_MATRICESSTART = 201, /* MATRICESSTART */
450  YYSYMBOL_MATRICESEND = 202, /* MATRICESEND */
451  YYSYMBOL_MATRIXSTART = 203, /* MATRIXSTART */
452  YYSYMBOL_MATRIXEND = 204, /* MATRIXEND */
453  YYSYMBOL_BASEMATRIXEND = 205, /* BASEMATRIXEND */
454  YYSYMBOL_BASEMATRIXSTART = 206, /* BASEMATRIXSTART */
455  YYSYMBOL_BLOCKSSTART = 207, /* BLOCKSSTART */
456  YYSYMBOL_BLOCKSEND = 208, /* BLOCKSEND */
457  YYSYMBOL_BLOCKSTART = 209, /* BLOCKSTART */
458  YYSYMBOL_BLOCKEND = 210, /* BLOCKEND */
459  YYSYMBOL_COLOFFSETSTART = 211, /* COLOFFSETSTART */
460  YYSYMBOL_COLOFFSETEND = 212, /* COLOFFSETEND */
461  YYSYMBOL_ROWOFFSETSTART = 213, /* ROWOFFSETSTART */
462  YYSYMBOL_ROWOFFSETEND = 214, /* ROWOFFSETEND */
463  YYSYMBOL_ELEMENTSSTART = 215, /* ELEMENTSSTART */
464  YYSYMBOL_ELEMENTSEND = 216, /* ELEMENTSEND */
465  YYSYMBOL_CONSTANTELEMENTSSTART = 217, /* CONSTANTELEMENTSSTART */
466  YYSYMBOL_CONSTANTELEMENTSEND = 218, /* CONSTANTELEMENTSEND */
467  YYSYMBOL_VARREFERENCEELEMENTSSTART = 219, /* VARREFERENCEELEMENTSSTART */
468  YYSYMBOL_VARREFERENCEELEMENTSEND = 220, /* VARREFERENCEELEMENTSEND */
469  YYSYMBOL_LINEARELEMENTSSTART = 221, /* LINEARELEMENTSSTART */
470  YYSYMBOL_LINEARELEMENTSEND = 222, /* LINEARELEMENTSEND */
471  YYSYMBOL_GENERALELEMENTSSTART = 223, /* GENERALELEMENTSSTART */
472  YYSYMBOL_GENERALELEMENTSEND = 224, /* GENERALELEMENTSEND */
473  YYSYMBOL_CONREFERENCEELEMENTSSTART = 225, /* CONREFERENCEELEMENTSSTART */
474  YYSYMBOL_CONREFERENCEELEMENTSEND = 226, /* CONREFERENCEELEMENTSEND */
475  YYSYMBOL_OBJREFERENCEELEMENTSSTART = 227, /* OBJREFERENCEELEMENTSSTART */
476  YYSYMBOL_OBJREFERENCEELEMENTSEND = 228, /* OBJREFERENCEELEMENTSEND */
477  YYSYMBOL_STRINGVALUEDELEMENTSSTART = 229, /* STRINGVALUEDELEMENTSSTART */
478  YYSYMBOL_STRINGVALUEDELEMENTSEND = 230, /* STRINGVALUEDELEMENTSEND */
479  YYSYMBOL_STARTVECTORSTART = 231, /* STARTVECTORSTART */
480  YYSYMBOL_STARTVECTOREND = 232, /* STARTVECTOREND */
481  YYSYMBOL_INDEXSTART = 233, /* INDEXSTART */
482  YYSYMBOL_INDEXEND = 234, /* INDEXEND */
483  YYSYMBOL_VALUESTART = 235, /* VALUESTART */
484  YYSYMBOL_VALUEEND = 236, /* VALUEEND */
485  YYSYMBOL_VARIDXSTART = 237, /* VARIDXSTART */
486  YYSYMBOL_VARIDXEND = 238, /* VARIDXEND */
487  YYSYMBOL_TRANSFORMATIONSTART = 239, /* TRANSFORMATIONSTART */
488  YYSYMBOL_TRANSFORMATIONEND = 240, /* TRANSFORMATIONEND */
489  YYSYMBOL_MATRIXPROGRAMMINGSTART = 241, /* MATRIXPROGRAMMINGSTART */
490  YYSYMBOL_MATRIXPROGRAMMINGEND = 242, /* MATRIXPROGRAMMINGEND */
491  YYSYMBOL_MATRIXVARIABLESSTART = 243, /* MATRIXVARIABLESSTART */
492  YYSYMBOL_MATRIXVARIABLESEND = 244, /* MATRIXVARIABLESEND */
493  YYSYMBOL_MATRIXVARSTART = 245, /* MATRIXVARSTART */
494  YYSYMBOL_MATRIXVAREND = 246, /* MATRIXVAREND */
495  YYSYMBOL_MATRIXOBJECTIVESSTART = 247, /* MATRIXOBJECTIVESSTART */
496  YYSYMBOL_MATRIXOBJECTIVESEND = 248, /* MATRIXOBJECTIVESEND */
497  YYSYMBOL_MATRIXOBJSTART = 249, /* MATRIXOBJSTART */
498  YYSYMBOL_MATRIXOBJEND = 250, /* MATRIXOBJEND */
499  YYSYMBOL_MATRIXCONSTRAINTSSTART = 251, /* MATRIXCONSTRAINTSSTART */
500  YYSYMBOL_MATRIXCONSTRAINTSEND = 252, /* MATRIXCONSTRAINTSEND */
501  YYSYMBOL_MATRIXCONSTART = 253, /* MATRIXCONSTART */
502  YYSYMBOL_MATRIXCONEND = 254, /* MATRIXCONEND */
503  YYSYMBOL_CONSTART = 255, /* CONSTART */
504  YYSYMBOL_CONEND = 256, /* CONEND */
505  YYSYMBOL_CONSTRAINTSSTART = 257, /* CONSTRAINTSSTART */
506  YYSYMBOL_CONSTRAINTSEND = 258, /* CONSTRAINTSEND */
507  YYSYMBOL_OBJSTART = 259, /* OBJSTART */
508  YYSYMBOL_OBJEND = 260, /* OBJEND */
509  YYSYMBOL_OBJECTIVESSTART = 261, /* OBJECTIVESSTART */
510  YYSYMBOL_OBJECTIVESEND = 262, /* OBJECTIVESEND */
511  YYSYMBOL_VARSTART = 263, /* VARSTART */
512  YYSYMBOL_VAREND = 264, /* VAREND */
513  YYSYMBOL_VARIABLESSTART = 265, /* VARIABLESSTART */
514  YYSYMBOL_VARIABLESEND = 266, /* VARIABLESEND */
515  YYSYMBOL_GENERALSTART = 267, /* GENERALSTART */
516  YYSYMBOL_GENERALEND = 268, /* GENERALEND */
517  YYSYMBOL_SYSTEMSTART = 269, /* SYSTEMSTART */
518  YYSYMBOL_SYSTEMEND = 270, /* SYSTEMEND */
519  YYSYMBOL_SERVICESTART = 271, /* SERVICESTART */
520  YYSYMBOL_SERVICEEND = 272, /* SERVICEEND */
521  YYSYMBOL_JOBSTART = 273, /* JOBSTART */
522  YYSYMBOL_JOBEND = 274, /* JOBEND */
523  YYSYMBOL_OPTIMIZATIONSTART = 275, /* OPTIMIZATIONSTART */
524  YYSYMBOL_OPTIMIZATIONEND = 276, /* OPTIMIZATIONEND */
525  YYSYMBOL_ATEQUALITYSTART = 277, /* ATEQUALITYSTART */
526  YYSYMBOL_ATEQUALITYEND = 278, /* ATEQUALITYEND */
527  YYSYMBOL_ATLOWERSTART = 279, /* ATLOWERSTART */
528  YYSYMBOL_ATLOWEREND = 280, /* ATLOWEREND */
529  YYSYMBOL_ATUPPERSTART = 281, /* ATUPPERSTART */
530  YYSYMBOL_ATUPPEREND = 282, /* ATUPPEREND */
531  YYSYMBOL_BASICSTART = 283, /* BASICSTART */
532  YYSYMBOL_BASICEND = 284, /* BASICEND */
533  YYSYMBOL_ISFREESTART = 285, /* ISFREESTART */
534  YYSYMBOL_ISFREEEND = 286, /* ISFREEEND */
535  YYSYMBOL_SUPERBASICSTART = 287, /* SUPERBASICSTART */
536  YYSYMBOL_SUPERBASICEND = 288, /* SUPERBASICEND */
537  YYSYMBOL_UNKNOWNSTART = 289, /* UNKNOWNSTART */
538  YYSYMBOL_UNKNOWNEND = 290, /* UNKNOWNEND */
539  YYSYMBOL_SERVICEURISTART = 291, /* SERVICEURISTART */
540  YYSYMBOL_SERVICEURIEND = 292, /* SERVICEURIEND */
541  YYSYMBOL_SERVICENAMESTART = 293, /* SERVICENAMESTART */
542  YYSYMBOL_SERVICENAMEEND = 294, /* SERVICENAMEEND */
543  YYSYMBOL_INSTANCENAMESTART = 295, /* INSTANCENAMESTART */
544  YYSYMBOL_INSTANCENAMEEND = 296, /* INSTANCENAMEEND */
545  YYSYMBOL_JOBIDSTART = 297, /* JOBIDSTART */
546  YYSYMBOL_JOBIDEND = 298, /* JOBIDEND */
547  YYSYMBOL_OTHERSTART = 299, /* OTHERSTART */
548  YYSYMBOL_OTHEREND = 300, /* OTHEREND */
549  YYSYMBOL_DUMMY = 301, /* DUMMY */
550  YYSYMBOL_NONLINEAREXPRESSIONSSTART = 302, /* NONLINEAREXPRESSIONSSTART */
551  YYSYMBOL_NONLINEAREXPRESSIONSEND = 303, /* NONLINEAREXPRESSIONSEND */
552  YYSYMBOL_NUMBEROFNONLINEAREXPRESSIONS = 304, /* NUMBEROFNONLINEAREXPRESSIONS */
553  YYSYMBOL_NLSTART = 305, /* NLSTART */
554  YYSYMBOL_NLEND = 306, /* NLEND */
555  YYSYMBOL_MATRIXEXPRESSIONSSTART = 307, /* MATRIXEXPRESSIONSSTART */
556  YYSYMBOL_MATRIXEXPRESSIONSEND = 308, /* MATRIXEXPRESSIONSEND */
557  YYSYMBOL_NUMBEROFEXPR = 309, /* NUMBEROFEXPR */
558  YYSYMBOL_EXPRSTART = 310, /* EXPRSTART */
559  YYSYMBOL_EXPREND = 311, /* EXPREND */
560  YYSYMBOL_NUMBEROFMATRIXTERMSATT = 312, /* NUMBEROFMATRIXTERMSATT */
561  YYSYMBOL_MATRIXTERMSTART = 313, /* MATRIXTERMSTART */
562  YYSYMBOL_MATRIXTERMEND = 314, /* MATRIXTERMEND */
563  YYSYMBOL_POWERSTART = 315, /* POWERSTART */
564  YYSYMBOL_POWEREND = 316, /* POWEREND */
565  YYSYMBOL_PLUSSTART = 317, /* PLUSSTART */
566  YYSYMBOL_PLUSEND = 318, /* PLUSEND */
567  YYSYMBOL_MINUSSTART = 319, /* MINUSSTART */
568  YYSYMBOL_MINUSEND = 320, /* MINUSEND */
569  YYSYMBOL_DIVIDESTART = 321, /* DIVIDESTART */
570  YYSYMBOL_DIVIDEEND = 322, /* DIVIDEEND */
571  YYSYMBOL_LNSTART = 323, /* LNSTART */
572  YYSYMBOL_LNEND = 324, /* LNEND */
573  YYSYMBOL_SQRTSTART = 325, /* SQRTSTART */
574  YYSYMBOL_SQRTEND = 326, /* SQRTEND */
575  YYSYMBOL_SUMSTART = 327, /* SUMSTART */
576  YYSYMBOL_SUMEND = 328, /* SUMEND */
577  YYSYMBOL_PRODUCTSTART = 329, /* PRODUCTSTART */
578  YYSYMBOL_PRODUCTEND = 330, /* PRODUCTEND */
579  YYSYMBOL_EXPSTART = 331, /* EXPSTART */
580  YYSYMBOL_EXPEND = 332, /* EXPEND */
581  YYSYMBOL_NEGATESTART = 333, /* NEGATESTART */
582  YYSYMBOL_NEGATEEND = 334, /* NEGATEEND */
583  YYSYMBOL_IFSTART = 335, /* IFSTART */
584  YYSYMBOL_IFEND = 336, /* IFEND */
585  YYSYMBOL_SQUARESTART = 337, /* SQUARESTART */
586  YYSYMBOL_SQUAREEND = 338, /* SQUAREEND */
587  YYSYMBOL_COSSTART = 339, /* COSSTART */
588  YYSYMBOL_COSEND = 340, /* COSEND */
589  YYSYMBOL_SINSTART = 341, /* SINSTART */
590  YYSYMBOL_SINEND = 342, /* SINEND */
591  YYSYMBOL_VARIABLESTART = 343, /* VARIABLESTART */
592  YYSYMBOL_VARIABLEEND = 344, /* VARIABLEEND */
593  YYSYMBOL_ABSSTART = 345, /* ABSSTART */
594  YYSYMBOL_ABSEND = 346, /* ABSEND */
595  YYSYMBOL_ERFSTART = 347, /* ERFSTART */
596  YYSYMBOL_ERFEND = 348, /* ERFEND */
597  YYSYMBOL_MAXSTART = 349, /* MAXSTART */
598  YYSYMBOL_MAXEND = 350, /* MAXEND */
599  YYSYMBOL_ALLDIFFSTART = 351, /* ALLDIFFSTART */
600  YYSYMBOL_ALLDIFFEND = 352, /* ALLDIFFEND */
601  YYSYMBOL_MINSTART = 353, /* MINSTART */
602  YYSYMBOL_MINEND = 354, /* MINEND */
603  YYSYMBOL_ESTART = 355, /* ESTART */
604  YYSYMBOL_EEND = 356, /* EEND */
605  YYSYMBOL_PISTART = 357, /* PISTART */
606  YYSYMBOL_PIEND = 358, /* PIEND */
607  YYSYMBOL_TIMESSTART = 359, /* TIMESSTART */
608  YYSYMBOL_TIMESEND = 360, /* TIMESEND */
609  YYSYMBOL_NUMBERSTART = 361, /* NUMBERSTART */
610  YYSYMBOL_NUMBEREND = 362, /* NUMBEREND */
611  YYSYMBOL_MATRIXDETERMINANTSTART = 363, /* MATRIXDETERMINANTSTART */
612  YYSYMBOL_MATRIXDETERMINANTEND = 364, /* MATRIXDETERMINANTEND */
613  YYSYMBOL_MATRIXTRACESTART = 365, /* MATRIXTRACESTART */
614  YYSYMBOL_MATRIXTRACEEND = 366, /* MATRIXTRACEEND */
615  YYSYMBOL_MATRIXTOSCALARSTART = 367, /* MATRIXTOSCALARSTART */
616  YYSYMBOL_MATRIXTOSCALAREND = 368, /* MATRIXTOSCALAREND */
617  YYSYMBOL_MATRIXDIAGONALSTART = 369, /* MATRIXDIAGONALSTART */
618  YYSYMBOL_MATRIXDIAGONALEND = 370, /* MATRIXDIAGONALEND */
619  YYSYMBOL_MATRIXDOTTIMESSTART = 371, /* MATRIXDOTTIMESSTART */
620  YYSYMBOL_MATRIXDOTTIMESEND = 372, /* MATRIXDOTTIMESEND */
621  YYSYMBOL_MATRIXLOWERTRIANGLESTART = 373, /* MATRIXLOWERTRIANGLESTART */
622  YYSYMBOL_MATRIXLOWERTRIANGLEEND = 374, /* MATRIXLOWERTRIANGLEEND */
623  YYSYMBOL_MATRIXUPPERTRIANGLESTART = 375, /* MATRIXUPPERTRIANGLESTART */
624  YYSYMBOL_MATRIXUPPERTRIANGLEEND = 376, /* MATRIXUPPERTRIANGLEEND */
625  YYSYMBOL_MATRIXMERGESTART = 377, /* MATRIXMERGESTART */
626  YYSYMBOL_MATRIXMERGEEND = 378, /* MATRIXMERGEEND */
627  YYSYMBOL_MATRIXMINUSSTART = 379, /* MATRIXMINUSSTART */
628  YYSYMBOL_MATRIXMINUSEND = 380, /* MATRIXMINUSEND */
629  YYSYMBOL_MATRIXNEGATESTART = 381, /* MATRIXNEGATESTART */
630  YYSYMBOL_MATRIXNEGATEEND = 382, /* MATRIXNEGATEEND */
631  YYSYMBOL_MATRIXPLUSSTART = 383, /* MATRIXPLUSSTART */
632  YYSYMBOL_MATRIXPLUSEND = 384, /* MATRIXPLUSEND */
633  YYSYMBOL_MATRIXTIMESSTART = 385, /* MATRIXTIMESSTART */
634  YYSYMBOL_MATRIXTIMESEND = 386, /* MATRIXTIMESEND */
635  YYSYMBOL_MATRIXPRODUCTSTART = 387, /* MATRIXPRODUCTSTART */
636  YYSYMBOL_MATRIXPRODUCTEND = 388, /* MATRIXPRODUCTEND */
637  YYSYMBOL_MATRIXSCALARTIMESSTART = 389, /* MATRIXSCALARTIMESSTART */
638  YYSYMBOL_MATRIXSCALARTIMESEND = 390, /* MATRIXSCALARTIMESEND */
639  YYSYMBOL_MATRIXSUBMATRIXATSTART = 391, /* MATRIXSUBMATRIXATSTART */
640  YYSYMBOL_MATRIXSUBMATRIXATEND = 392, /* MATRIXSUBMATRIXATEND */
641  YYSYMBOL_MATRIXTRANSPOSESTART = 393, /* MATRIXTRANSPOSESTART */
642  YYSYMBOL_MATRIXTRANSPOSEEND = 394, /* MATRIXTRANSPOSEEND */
643  YYSYMBOL_MATRIXREFERENCESTART = 395, /* MATRIXREFERENCESTART */
644  YYSYMBOL_MATRIXREFERENCEEND = 396, /* MATRIXREFERENCEEND */
645  YYSYMBOL_IDENTITYMATRIXSTART = 397, /* IDENTITYMATRIXSTART */
646  YYSYMBOL_IDENTITYMATRIXEND = 398, /* IDENTITYMATRIXEND */
647  YYSYMBOL_MATRIXINVERSESTART = 399, /* MATRIXINVERSESTART */
648  YYSYMBOL_MATRIXINVERSEEND = 400, /* MATRIXINVERSEEND */
649  YYSYMBOL_EMPTYINCLUDEDIAGONALATT = 401, /* EMPTYINCLUDEDIAGONALATT */
650  YYSYMBOL_INCLUDEDIAGONALATT = 402, /* INCLUDEDIAGONALATT */
651  YYSYMBOL_EMPTYIDATT = 403, /* EMPTYIDATT */
652  YYSYMBOL_IDATT = 404, /* IDATT */
653  YYSYMBOL_405_ = 405, /* ' ' */
654  YYSYMBOL_406_t_ = 406, /* '\t' */
655  YYSYMBOL_407_r_ = 407, /* '\r' */
656  YYSYMBOL_408_n_ = 408, /* '\n' */
657  YYSYMBOL_YYACCEPT = 409, /* $accept */
658  YYSYMBOL_osildoc = 410, /* osildoc */
659  YYSYMBOL_theInstanceEnd = 411, /* theInstanceEnd */
660  YYSYMBOL_osilEnd = 412, /* osilEnd */
661  YYSYMBOL_osilEnding = 413, /* osilEnding */
662  YYSYMBOL_quadraticCoefficients = 414, /* quadraticCoefficients */
663  YYSYMBOL_quadraticCoefficientsStart = 415, /* quadraticCoefficientsStart */
664  YYSYMBOL_osilQuadnumberATT = 416, /* osilQuadnumberATT */
665  YYSYMBOL_qTermlist = 417, /* qTermlist */
666  YYSYMBOL_qterm = 418, /* qterm */
667  YYSYMBOL_qtermStart = 419, /* qtermStart */
668  YYSYMBOL_qtermend = 420, /* qtermend */
669  YYSYMBOL_anotherqTermATT = 421, /* anotherqTermATT */
670  YYSYMBOL_qtermatt = 422, /* qtermatt */
671  YYSYMBOL_osilQtermidxOneATT = 423, /* osilQtermidxOneATT */
672  YYSYMBOL_osilQtermidxTwoATT = 424, /* osilQtermidxTwoATT */
673  YYSYMBOL_osilQtermcoefATT = 425, /* osilQtermcoefATT */
674  YYSYMBOL_osilQtermidxATT = 426, /* osilQtermidxATT */
675  YYSYMBOL_matrices = 427, /* matrices */
676  YYSYMBOL_matricesStart = 428, /* matricesStart */
677  YYSYMBOL_matricesAttributes = 429, /* matricesAttributes */
678  YYSYMBOL_matricesContent = 430, /* matricesContent */
679  YYSYMBOL_matricesEmpty = 431, /* matricesEmpty */
680  YYSYMBOL_matricesLaden = 432, /* matricesLaden */
681  YYSYMBOL_matrixList = 433, /* matrixList */
682  YYSYMBOL_cones = 434, /* cones */
683  YYSYMBOL_conesStart = 435, /* conesStart */
684  YYSYMBOL_conesAttributes = 436, /* conesAttributes */
685  YYSYMBOL_conesContent = 437, /* conesContent */
686  YYSYMBOL_conesEmpty = 438, /* conesEmpty */
687  YYSYMBOL_conesLaden = 439, /* conesLaden */
688  YYSYMBOL_coneList = 440, /* coneList */
689  YYSYMBOL_cone = 441, /* cone */
690  YYSYMBOL_nonnegativeCone = 442, /* nonnegativeCone */
691  YYSYMBOL_nonnegativeConeStart = 443, /* nonnegativeConeStart */
692  YYSYMBOL_nonnegativeConeAttributes = 444, /* nonnegativeConeAttributes */
693  YYSYMBOL_nonnegativeConeAttList = 445, /* nonnegativeConeAttList */
694  YYSYMBOL_nonnegativeConeAtt = 446, /* nonnegativeConeAtt */
695  YYSYMBOL_nonnegativeConeEnd = 447, /* nonnegativeConeEnd */
696  YYSYMBOL_nonpositiveCone = 448, /* nonpositiveCone */
697  YYSYMBOL_nonpositiveConeStart = 449, /* nonpositiveConeStart */
698  YYSYMBOL_nonpositiveConeAttributes = 450, /* nonpositiveConeAttributes */
699  YYSYMBOL_nonpositiveConeAttList = 451, /* nonpositiveConeAttList */
700  YYSYMBOL_nonpositiveConeAtt = 452, /* nonpositiveConeAtt */
701  YYSYMBOL_nonpositiveConeEnd = 453, /* nonpositiveConeEnd */
702  YYSYMBOL_generalOrthantCone = 454, /* generalOrthantCone */
703  YYSYMBOL_generalOrthantConeStart = 455, /* generalOrthantConeStart */
704  YYSYMBOL_generalOrthantConeAttributes = 456, /* generalOrthantConeAttributes */
705  YYSYMBOL_generalOrthantConeAttList = 457, /* generalOrthantConeAttList */
706  YYSYMBOL_generalOrthantConeAtt = 458, /* generalOrthantConeAtt */
707  YYSYMBOL_generalOrthantConeContent = 459, /* generalOrthantConeContent */
708  YYSYMBOL_generalOrthantConeDirectionList = 460, /* generalOrthantConeDirectionList */
709  YYSYMBOL_generalOrthantConeDirections = 461, /* generalOrthantConeDirections */
710  YYSYMBOL_generalOrthantConeDirection = 462, /* generalOrthantConeDirection */
711  YYSYMBOL_generalOrthantConeDirectionStart = 463, /* generalOrthantConeDirectionStart */
712  YYSYMBOL_generalOrthantConeDirectionAttributes = 464, /* generalOrthantConeDirectionAttributes */
713  YYSYMBOL_generalOrthantConeDirectionAttributeList = 465, /* generalOrthantConeDirectionAttributeList */
714  YYSYMBOL_generalOrthantConeDirectionAtt = 466, /* generalOrthantConeDirectionAtt */
715  YYSYMBOL_generalOrthantConeDirectionEnd = 467, /* generalOrthantConeDirectionEnd */
716  YYSYMBOL_generalOrthantConeEnd = 468, /* generalOrthantConeEnd */
717  YYSYMBOL_polyhedralCone = 469, /* polyhedralCone */
718  YYSYMBOL_polyhedralConeStart = 470, /* polyhedralConeStart */
719  YYSYMBOL_polyhedralConeAttributes = 471, /* polyhedralConeAttributes */
720  YYSYMBOL_polyhedralConeAttList = 472, /* polyhedralConeAttList */
721  YYSYMBOL_polyhedralConeAtt = 473, /* polyhedralConeAtt */
722  YYSYMBOL_referenceMatrixATT = 474, /* referenceMatrixATT */
723  YYSYMBOL_polyhedralConeEnd = 475, /* polyhedralConeEnd */
724  YYSYMBOL_quadraticCone = 476, /* quadraticCone */
725  YYSYMBOL_quadraticConeStart = 477, /* quadraticConeStart */
726  YYSYMBOL_quadraticConeAttributes = 478, /* quadraticConeAttributes */
727  YYSYMBOL_quadraticConeAttList = 479, /* quadraticConeAttList */
728  YYSYMBOL_quadraticConeAtt = 480, /* quadraticConeAtt */
729  YYSYMBOL_quadraticConeEnd = 481, /* quadraticConeEnd */
730  YYSYMBOL_rotatedQuadraticCone = 482, /* rotatedQuadraticCone */
731  YYSYMBOL_rotatedQuadraticConeStart = 483, /* rotatedQuadraticConeStart */
732  YYSYMBOL_rotatedQuadraticConeAttributes = 484, /* rotatedQuadraticConeAttributes */
733  YYSYMBOL_rotatedQuadraticConeAttList = 485, /* rotatedQuadraticConeAttList */
734  YYSYMBOL_rotatedQuadraticConeAtt = 486, /* rotatedQuadraticConeAtt */
735  YYSYMBOL_rotatedQuadraticConeEnd = 487, /* rotatedQuadraticConeEnd */
736  YYSYMBOL_semidefiniteCone = 488, /* semidefiniteCone */
737  YYSYMBOL_semidefiniteConeStart = 489, /* semidefiniteConeStart */
738  YYSYMBOL_semidefiniteConeAttributes = 490, /* semidefiniteConeAttributes */
739  YYSYMBOL_semidefiniteConeAttList = 491, /* semidefiniteConeAttList */
740  YYSYMBOL_semidefiniteConeAtt = 492, /* semidefiniteConeAtt */
741  YYSYMBOL_semidefiniteConeEnd = 493, /* semidefiniteConeEnd */
742  YYSYMBOL_productCone = 494, /* productCone */
743  YYSYMBOL_productConeStart = 495, /* productConeStart */
744  YYSYMBOL_productConeAttributes = 496, /* productConeAttributes */
745  YYSYMBOL_productConeAttList = 497, /* productConeAttList */
746  YYSYMBOL_productConeAtt = 498, /* productConeAtt */
747  YYSYMBOL_productConeContent = 499, /* productConeContent */
748  YYSYMBOL_productConeFactors = 500, /* productConeFactors */
749  YYSYMBOL_productConeFactorsStart = 501, /* productConeFactorsStart */
750  YYSYMBOL_productConeFactorsAttributes = 502, /* productConeFactorsAttributes */
751  YYSYMBOL_productConeFactorsContent = 503, /* productConeFactorsContent */
752  YYSYMBOL_productConeFactorsEmpty = 504, /* productConeFactorsEmpty */
753  YYSYMBOL_productConeFactorsLaden = 505, /* productConeFactorsLaden */
754  YYSYMBOL_productConeFactorList = 506, /* productConeFactorList */
755  YYSYMBOL_productConeFactorsEnd = 507, /* productConeFactorsEnd */
756  YYSYMBOL_productConeEnd = 508, /* productConeEnd */
757  YYSYMBOL_intersectionCone = 509, /* intersectionCone */
758  YYSYMBOL_intersectionConeStart = 510, /* intersectionConeStart */
759  YYSYMBOL_intersectionConeAttributes = 511, /* intersectionConeAttributes */
760  YYSYMBOL_intersectionConeAttList = 512, /* intersectionConeAttList */
761  YYSYMBOL_intersectionConeAtt = 513, /* intersectionConeAtt */
762  YYSYMBOL_intersectionConeContent = 514, /* intersectionConeContent */
763  YYSYMBOL_intersectionConeComponents = 515, /* intersectionConeComponents */
764  YYSYMBOL_intersectionConeComponentsStart = 516, /* intersectionConeComponentsStart */
765  YYSYMBOL_intersectionConeComponentsAttributes = 517, /* intersectionConeComponentsAttributes */
766  YYSYMBOL_intersectionConeComponentsContent = 518, /* intersectionConeComponentsContent */
767  YYSYMBOL_intersectionConeComponentsEmpty = 519, /* intersectionConeComponentsEmpty */
768  YYSYMBOL_intersectionConeComponentsLaden = 520, /* intersectionConeComponentsLaden */
769  YYSYMBOL_intersectionConeComponentList = 521, /* intersectionConeComponentList */
770  YYSYMBOL_intersectionConeComponentsEnd = 522, /* intersectionConeComponentsEnd */
771  YYSYMBOL_intersectionConeEnd = 523, /* intersectionConeEnd */
772  YYSYMBOL_matrixProgramming = 524, /* matrixProgramming */
773  YYSYMBOL_matrixProgrammingStart = 525, /* matrixProgrammingStart */
774  YYSYMBOL_matrixProgrammingContent = 526, /* matrixProgrammingContent */
775  YYSYMBOL_matrixProgrammingEmpty = 527, /* matrixProgrammingEmpty */
776  YYSYMBOL_matrixProgrammingLaden = 528, /* matrixProgrammingLaden */
777  YYSYMBOL_matrixVariables = 529, /* matrixVariables */
778  YYSYMBOL_matrixVariablesStart = 530, /* matrixVariablesStart */
779  YYSYMBOL_matrixVariablesAttributes = 531, /* matrixVariablesAttributes */
780  YYSYMBOL_matrixVariablesContent = 532, /* matrixVariablesContent */
781  YYSYMBOL_matrixVariablesEmpty = 533, /* matrixVariablesEmpty */
782  YYSYMBOL_matrixVariablesLaden = 534, /* matrixVariablesLaden */
783  YYSYMBOL_matrixVariablesEnd = 535, /* matrixVariablesEnd */
784  YYSYMBOL_matrixVarList = 536, /* matrixVarList */
785  YYSYMBOL_matrixVar = 537, /* matrixVar */
786  YYSYMBOL_matrixVarStart = 538, /* matrixVarStart */
787  YYSYMBOL_matrixVarAttributes = 539, /* matrixVarAttributes */
788  YYSYMBOL_matrixVarAttList = 540, /* matrixVarAttList */
789  YYSYMBOL_matrixVarAtt = 541, /* matrixVarAtt */
790  YYSYMBOL_matrixVarEnd = 542, /* matrixVarEnd */
791  YYSYMBOL_matrixObjectives = 543, /* matrixObjectives */
792  YYSYMBOL_matrixObjectivesStart = 544, /* matrixObjectivesStart */
793  YYSYMBOL_matrixObjectivesAttributes = 545, /* matrixObjectivesAttributes */
794  YYSYMBOL_matrixObjectivesContent = 546, /* matrixObjectivesContent */
795  YYSYMBOL_matrixObjectivesEmpty = 547, /* matrixObjectivesEmpty */
796  YYSYMBOL_matrixObjectivesLaden = 548, /* matrixObjectivesLaden */
797  YYSYMBOL_matrixObjectivesEnd = 549, /* matrixObjectivesEnd */
798  YYSYMBOL_matrixObjList = 550, /* matrixObjList */
799  YYSYMBOL_matrixObj = 551, /* matrixObj */
800  YYSYMBOL_matrixObjStart = 552, /* matrixObjStart */
801  YYSYMBOL_matrixObjAttributes = 553, /* matrixObjAttributes */
802  YYSYMBOL_matrixObjAttList = 554, /* matrixObjAttList */
803  YYSYMBOL_matrixObjAtt = 555, /* matrixObjAtt */
804  YYSYMBOL_matrixObjEnd = 556, /* matrixObjEnd */
805  YYSYMBOL_matrixConstraints = 557, /* matrixConstraints */
806  YYSYMBOL_matrixConstraintsStart = 558, /* matrixConstraintsStart */
807  YYSYMBOL_matrixConstraintsAttributes = 559, /* matrixConstraintsAttributes */
808  YYSYMBOL_matrixConstraintsContent = 560, /* matrixConstraintsContent */
809  YYSYMBOL_matrixConstraintsEmpty = 561, /* matrixConstraintsEmpty */
810  YYSYMBOL_matrixConstraintsLaden = 562, /* matrixConstraintsLaden */
811  YYSYMBOL_matrixConstraintsEnd = 563, /* matrixConstraintsEnd */
812  YYSYMBOL_matrixConList = 564, /* matrixConList */
813  YYSYMBOL_matrixCon = 565, /* matrixCon */
814  YYSYMBOL_matrixConStart = 566, /* matrixConStart */
815  YYSYMBOL_matrixConAttributes = 567, /* matrixConAttributes */
816  YYSYMBOL_matrixConAttList = 568, /* matrixConAttList */
817  YYSYMBOL_matrixConAtt = 569, /* matrixConAtt */
818  YYSYMBOL_matrixConEnd = 570, /* matrixConEnd */
819  YYSYMBOL_timeDomain = 571, /* timeDomain */
820  YYSYMBOL_timeDomainStart = 572, /* timeDomainStart */
821  YYSYMBOL_timeDomainContent = 573, /* timeDomainContent */
822  YYSYMBOL_timeDomainEmpty = 574, /* timeDomainEmpty */
823  YYSYMBOL_timeDomainLaden = 575, /* timeDomainLaden */
824  YYSYMBOL_stages = 576, /* stages */
825  YYSYMBOL_stagesstart = 577, /* stagesstart */
826  YYSYMBOL_osilNumberofstagesATT = 578, /* osilNumberofstagesATT */
827  YYSYMBOL_stagelist = 579, /* stagelist */
828  YYSYMBOL_stage = 580, /* stage */
829  YYSYMBOL_581_1 = 581, /* $@1 */
830  YYSYMBOL_osilStagenameATT = 582, /* osilStagenameATT */
831  YYSYMBOL_stageend = 583, /* stageend */
832  YYSYMBOL_stagecontent = 584, /* stagecontent */
833  YYSYMBOL_stagevariables = 585, /* stagevariables */
834  YYSYMBOL_anotherstagevarATT = 586, /* anotherstagevarATT */
835  YYSYMBOL_stagevaratt = 587, /* stagevaratt */
836  YYSYMBOL_osilNumberofstagevariablesATT = 588, /* osilNumberofstagevariablesATT */
837  YYSYMBOL_osilStagevarstartidxATT = 589, /* osilStagevarstartidxATT */
838  YYSYMBOL_restofstagevariables = 590, /* restofstagevariables */
839  YYSYMBOL_emptyvarlist = 591, /* emptyvarlist */
840  YYSYMBOL_stagevarlist = 592, /* stagevarlist */
841  YYSYMBOL_stagevar = 593, /* stagevar */
842  YYSYMBOL_594_2 = 594, /* $@2 */
843  YYSYMBOL_osilStagevaridxATT = 595, /* osilStagevaridxATT */
844  YYSYMBOL_stagevarend = 596, /* stagevarend */
845  YYSYMBOL_stageconstraints = 597, /* stageconstraints */
846  YYSYMBOL_anotherstageconATT = 598, /* anotherstageconATT */
847  YYSYMBOL_stageconatt = 599, /* stageconatt */
848  YYSYMBOL_osilNumberofstageconstraintsATT = 600, /* osilNumberofstageconstraintsATT */
849  YYSYMBOL_osilStageconstartidxATT = 601, /* osilStageconstartidxATT */
850  YYSYMBOL_restofstageconstraints = 602, /* restofstageconstraints */
851  YYSYMBOL_emptyconlist = 603, /* emptyconlist */
852  YYSYMBOL_stageconlist = 604, /* stageconlist */
853  YYSYMBOL_stagecon = 605, /* stagecon */
854  YYSYMBOL_606_3 = 606, /* $@3 */
855  YYSYMBOL_osilStageconidxATT = 607, /* osilStageconidxATT */
856  YYSYMBOL_stageconend = 608, /* stageconend */
857  YYSYMBOL_stageobjectives = 609, /* stageobjectives */
858  YYSYMBOL_anotherstageobjATT = 610, /* anotherstageobjATT */
859  YYSYMBOL_stageobjatt = 611, /* stageobjatt */
860  YYSYMBOL_osilNumberofstageobjectivesATT = 612, /* osilNumberofstageobjectivesATT */
861  YYSYMBOL_restofstageobjectives = 613, /* restofstageobjectives */
862  YYSYMBOL_emptyobjlist = 614, /* emptyobjlist */
863  YYSYMBOL_stageobjlist = 615, /* stageobjlist */
864  YYSYMBOL_stageobj = 616, /* stageobj */
865  YYSYMBOL_617_4 = 617, /* $@4 */
866  YYSYMBOL_osilStageobjidxATT = 618, /* osilStageobjidxATT */
867  YYSYMBOL_stageobjend = 619, /* stageobjend */
868  YYSYMBOL_interval = 620, /* interval */
869  YYSYMBOL_621_5 = 621, /* $@5 */
870  YYSYMBOL_intervalend = 622, /* intervalend */
871  YYSYMBOL_anotherIntervalATT = 623, /* anotherIntervalATT */
872  YYSYMBOL_intervalatt = 624, /* intervalatt */
873  YYSYMBOL_osilStageobjstartidxATT = 625, /* osilStageobjstartidxATT */
874  YYSYMBOL_osilIntervalhorizonATT = 626, /* osilIntervalhorizonATT */
875  YYSYMBOL_osilIntervalstartATT = 627, /* osilIntervalstartATT */
876  YYSYMBOL_numberOfMatricesATT = 628, /* numberOfMatricesATT */
877  YYSYMBOL_numberOfConesATT = 629, /* numberOfConesATT */
878  YYSYMBOL_numberOfMatrixVarATT = 630, /* numberOfMatrixVarATT */
879  YYSYMBOL_numberOfMatrixObjATT = 631, /* numberOfMatrixObjATT */
880  YYSYMBOL_numberOfMatrixConATT = 632, /* numberOfMatrixConATT */
881  YYSYMBOL_normScaleFactorATT = 633, /* normScaleFactorATT */
882  YYSYMBOL_distortionMatrixIdxATT = 634, /* distortionMatrixIdxATT */
883  YYSYMBOL_axisDirectionATT = 635, /* axisDirectionATT */
884  YYSYMBOL_firstAxisDirectionATT = 636, /* firstAxisDirectionATT */
885  YYSYMBOL_secondAxisDirectionATT = 637, /* secondAxisDirectionATT */
886  YYSYMBOL_semidefinitenessATT = 638, /* semidefinitenessATT */
887  YYSYMBOL_matrixIdxATT = 639, /* matrixIdxATT */
888  YYSYMBOL_lbMatrixIdxATT = 640, /* lbMatrixIdxATT */
889  YYSYMBOL_ubMatrixIdxATT = 641, /* ubMatrixIdxATT */
890  YYSYMBOL_constantMatrixIdxATT = 642, /* constantMatrixIdxATT */
891  YYSYMBOL_templateMatrixIdxATT = 643, /* templateMatrixIdxATT */
892  YYSYMBOL_varReferenceMatrixIdxATT = 644, /* varReferenceMatrixIdxATT */
893  YYSYMBOL_objReferenceMatrixIdxATT = 645, /* objReferenceMatrixIdxATT */
894  YYSYMBOL_conReferenceMatrixIdxATT = 646, /* conReferenceMatrixIdxATT */
895  YYSYMBOL_lbConeIdxATT = 647, /* lbConeIdxATT */
896  YYSYMBOL_ubConeIdxATT = 648, /* ubConeIdxATT */
897  YYSYMBOL_orderConeIdxATT = 649, /* orderConeIdxATT */
898  YYSYMBOL_aNumber = 650, /* aNumber */
899  YYSYMBOL_quote = 651, /* quote */
900  YYSYMBOL_xmlWhiteSpace = 652, /* xmlWhiteSpace */
901  YYSYMBOL_xmlWhiteSpaceChar = 653, /* xmlWhiteSpaceChar */
902  YYSYMBOL_osglIntArrayData = 654, /* osglIntArrayData */
903  YYSYMBOL_osglIntVectorElArray = 655, /* osglIntVectorElArray */
904  YYSYMBOL_osglIntVectorEl = 656, /* osglIntVectorEl */
905  YYSYMBOL_osglIntVectorElStart = 657, /* osglIntVectorElStart */
906  YYSYMBOL_osglIntVectorElAttributes = 658, /* osglIntVectorElAttributes */
907  YYSYMBOL_osglIntVectorElAttList = 659, /* osglIntVectorElAttList */
908  YYSYMBOL_osglIntVectorElAtt = 660, /* osglIntVectorElAtt */
909  YYSYMBOL_osglIntVectorElContent = 661, /* osglIntVectorElContent */
910  YYSYMBOL_osglIntVectorBase64 = 662, /* osglIntVectorBase64 */
911  YYSYMBOL_osglIntVectorBase64Content = 663, /* osglIntVectorBase64Content */
912  YYSYMBOL_osglIntVectorBase64Empty = 664, /* osglIntVectorBase64Empty */
913  YYSYMBOL_osglIntVectorBase64Laden = 665, /* osglIntVectorBase64Laden */
914  YYSYMBOL_osglDblArrayData = 666, /* osglDblArrayData */
915  YYSYMBOL_osglDblVectorElArray = 667, /* osglDblVectorElArray */
916  YYSYMBOL_osglDblVectorEl = 668, /* osglDblVectorEl */
917  YYSYMBOL_osglDblVectorElStart = 669, /* osglDblVectorElStart */
918  YYSYMBOL_osglDblVectorElAttributes = 670, /* osglDblVectorElAttributes */
919  YYSYMBOL_osglDblVectorElContent = 671, /* osglDblVectorElContent */
920  YYSYMBOL_osglDblVectorBase64 = 672, /* osglDblVectorBase64 */
921  YYSYMBOL_osglDblVectorBase64Content = 673, /* osglDblVectorBase64Content */
922  YYSYMBOL_osglDblVectorBase64Empty = 674, /* osglDblVectorBase64Empty */
923  YYSYMBOL_osglDblVectorBase64Laden = 675, /* osglDblVectorBase64Laden */
924  YYSYMBOL_osglMatrix = 676, /* osglMatrix */
925  YYSYMBOL_matrixStart = 677, /* matrixStart */
926  YYSYMBOL_matrixAttributes = 678, /* matrixAttributes */
927  YYSYMBOL_matrixAttributeList = 679, /* matrixAttributeList */
928  YYSYMBOL_matrixAttribute = 680, /* matrixAttribute */
929  YYSYMBOL_matrixContent = 681, /* matrixContent */
930  YYSYMBOL_matrixEmpty = 682, /* matrixEmpty */
931  YYSYMBOL_matrixLaden = 683, /* matrixLaden */
932  YYSYMBOL_matrixBody = 684, /* matrixBody */
933  YYSYMBOL_baseMatrix = 685, /* baseMatrix */
934  YYSYMBOL_baseMatrixStart = 686, /* baseMatrixStart */
935  YYSYMBOL_baseMatrixAttributes = 687, /* baseMatrixAttributes */
936  YYSYMBOL_baseMatrixAttList = 688, /* baseMatrixAttList */
937  YYSYMBOL_baseMatrixAtt = 689, /* baseMatrixAtt */
938  YYSYMBOL_baseMatrixEnd = 690, /* baseMatrixEnd */
939  YYSYMBOL_matrixConstructorList = 691, /* matrixConstructorList */
940  YYSYMBOL_matrixConstructor = 692, /* matrixConstructor */
941  YYSYMBOL_constantElements = 693, /* constantElements */
942  YYSYMBOL_constantElementsStart = 694, /* constantElementsStart */
943  YYSYMBOL_constantElementsAttributes = 695, /* constantElementsAttributes */
944  YYSYMBOL_constantElementsAttList = 696, /* constantElementsAttList */
945  YYSYMBOL_constantElementsAtt = 697, /* constantElementsAtt */
946  YYSYMBOL_constantElementsContent = 698, /* constantElementsContent */
947  YYSYMBOL_constantElementsNonzeros = 699, /* constantElementsNonzeros */
948  YYSYMBOL_matrixElementsStartVector = 700, /* matrixElementsStartVector */
949  YYSYMBOL_matrixElementsStartVectorStart = 701, /* matrixElementsStartVectorStart */
950  YYSYMBOL_matrixElementsStartVectorContent = 702, /* matrixElementsStartVectorContent */
951  YYSYMBOL_matrixElementsStartVectorEmpty = 703, /* matrixElementsStartVectorEmpty */
952  YYSYMBOL_matrixElementsStartVectorLaden = 704, /* matrixElementsStartVectorLaden */
953  YYSYMBOL_matrixElementsStartVectorBody = 705, /* matrixElementsStartVectorBody */
954  YYSYMBOL_matrixElementsIndexVector = 706, /* matrixElementsIndexVector */
955  YYSYMBOL_matrixElementsIndexStart = 707, /* matrixElementsIndexStart */
956  YYSYMBOL_matrixElementsIndexContent = 708, /* matrixElementsIndexContent */
957  YYSYMBOL_matrixElementsIndexEmpty = 709, /* matrixElementsIndexEmpty */
958  YYSYMBOL_matrixElementsIndexLaden = 710, /* matrixElementsIndexLaden */
959  YYSYMBOL_matrixElementsIndexBody = 711, /* matrixElementsIndexBody */
960  YYSYMBOL_constantElementsValues = 712, /* constantElementsValues */
961  YYSYMBOL_constantElementsValueStart = 713, /* constantElementsValueStart */
962  YYSYMBOL_constantElementsValueContent = 714, /* constantElementsValueContent */
963  YYSYMBOL_constantElementsValueEmpty = 715, /* constantElementsValueEmpty */
964  YYSYMBOL_constantElementsValueLaden = 716, /* constantElementsValueLaden */
965  YYSYMBOL_constantElementsValueBody = 717, /* constantElementsValueBody */
966  YYSYMBOL_varReferenceElements = 718, /* varReferenceElements */
967  YYSYMBOL_varReferenceElementsStart = 719, /* varReferenceElementsStart */
968  YYSYMBOL_varReferenceElementsAttributes = 720, /* varReferenceElementsAttributes */
969  YYSYMBOL_varReferenceElementsAttList = 721, /* varReferenceElementsAttList */
970  YYSYMBOL_varReferenceElementsAtt = 722, /* varReferenceElementsAtt */
971  YYSYMBOL_varReferenceElementsContent = 723, /* varReferenceElementsContent */
972  YYSYMBOL_varReferenceElementsNonzeros = 724, /* varReferenceElementsNonzeros */
973  YYSYMBOL_varReferenceElementsValues = 725, /* varReferenceElementsValues */
974  YYSYMBOL_varReferenceElementsValuesStart = 726, /* varReferenceElementsValuesStart */
975  YYSYMBOL_varReferenceElementsValuesContent = 727, /* varReferenceElementsValuesContent */
976  YYSYMBOL_varReferenceElementsValuesEmpty = 728, /* varReferenceElementsValuesEmpty */
977  YYSYMBOL_varReferenceElementsValuesLaden = 729, /* varReferenceElementsValuesLaden */
978  YYSYMBOL_varReferenceElementsValuesBody = 730, /* varReferenceElementsValuesBody */
979  YYSYMBOL_linearElements = 731, /* linearElements */
980  YYSYMBOL_linearElementsStart = 732, /* linearElementsStart */
981  YYSYMBOL_linearElementsAttributes = 733, /* linearElementsAttributes */
982  YYSYMBOL_linearElementsAttList = 734, /* linearElementsAttList */
983  YYSYMBOL_linearElementsAtt = 735, /* linearElementsAtt */
984  YYSYMBOL_linearElementsContent = 736, /* linearElementsContent */
985  YYSYMBOL_linearElementsNonzeros = 737, /* linearElementsNonzeros */
986  YYSYMBOL_linearElementsValues = 738, /* linearElementsValues */
987  YYSYMBOL_linearElementsValuesStart = 739, /* linearElementsValuesStart */
988  YYSYMBOL_linearElementsValuesContent = 740, /* linearElementsValuesContent */
989  YYSYMBOL_linearElementsValuesEmpty = 741, /* linearElementsValuesEmpty */
990  YYSYMBOL_linearElementsValuesLaden = 742, /* linearElementsValuesLaden */
991  YYSYMBOL_linearElementsValuesBody = 743, /* linearElementsValuesBody */
992  YYSYMBOL_linearElementsValuesElList = 744, /* linearElementsValuesElList */
993  YYSYMBOL_linearElementsValuesEl = 745, /* linearElementsValuesEl */
994  YYSYMBOL_linearElementsValuesElStart = 746, /* linearElementsValuesElStart */
995  YYSYMBOL_linearElementsValuesElAttributes = 747, /* linearElementsValuesElAttributes */
996  YYSYMBOL_linearElementsValuesElAttList = 748, /* linearElementsValuesElAttList */
997  YYSYMBOL_linearElementsValuesElAtt = 749, /* linearElementsValuesElAtt */
998  YYSYMBOL_linearElementsValuesElContent = 750, /* linearElementsValuesElContent */
999  YYSYMBOL_linearElementsValuesElEmpty = 751, /* linearElementsValuesElEmpty */
1000  YYSYMBOL_linearElementsValuesElLaden = 752, /* linearElementsValuesElLaden */
1001  YYSYMBOL_linearElementsValuesVarIdxList = 753, /* linearElementsValuesVarIdxList */
1002  YYSYMBOL_linearElementsValuesVarIdx = 754, /* linearElementsValuesVarIdx */
1003  YYSYMBOL_linearElementsValuesVarIdxStart = 755, /* linearElementsValuesVarIdxStart */
1004  YYSYMBOL_LinearElementsValuesVarIdxCoefATT = 756, /* LinearElementsValuesVarIdxCoefATT */
1005  YYSYMBOL_linearElementsValuesVarIdxContent = 757, /* linearElementsValuesVarIdxContent */
1006  YYSYMBOL_generalElements = 758, /* generalElements */
1007  YYSYMBOL_generalElementsStart = 759, /* generalElementsStart */
1008  YYSYMBOL_generalElementsAttributes = 760, /* generalElementsAttributes */
1009  YYSYMBOL_generalElementsAttList = 761, /* generalElementsAttList */
1010  YYSYMBOL_generalElementsAtt = 762, /* generalElementsAtt */
1011  YYSYMBOL_generalElementsContent = 763, /* generalElementsContent */
1012  YYSYMBOL_generalElementsNonzeros = 764, /* generalElementsNonzeros */
1013  YYSYMBOL_generalElementsValues = 765, /* generalElementsValues */
1014  YYSYMBOL_generalElementsValuesStart = 766, /* generalElementsValuesStart */
1015  YYSYMBOL_generalElementsValuesContent = 767, /* generalElementsValuesContent */
1016  YYSYMBOL_generalElementsValuesEmpty = 768, /* generalElementsValuesEmpty */
1017  YYSYMBOL_generalElementsValuesLaden = 769, /* generalElementsValuesLaden */
1018  YYSYMBOL_generalElementsElList = 770, /* generalElementsElList */
1019  YYSYMBOL_generalElementsEl = 771, /* generalElementsEl */
1020  YYSYMBOL_generalElementsElStart = 772, /* generalElementsElStart */
1021  YYSYMBOL_generalElementsElContent = 773, /* generalElementsElContent */
1022  YYSYMBOL_generalElementsElEmpty = 774, /* generalElementsElEmpty */
1023  YYSYMBOL_generalElementsElLaden = 775, /* generalElementsElLaden */
1024  YYSYMBOL_objReferenceElements = 776, /* objReferenceElements */
1025  YYSYMBOL_objReferenceElementsStart = 777, /* objReferenceElementsStart */
1026  YYSYMBOL_objReferenceElementsAttributes = 778, /* objReferenceElementsAttributes */
1027  YYSYMBOL_objReferenceElementsAttList = 779, /* objReferenceElementsAttList */
1028  YYSYMBOL_objReferenceElementsAtt = 780, /* objReferenceElementsAtt */
1029  YYSYMBOL_objReferenceElementsContent = 781, /* objReferenceElementsContent */
1030  YYSYMBOL_objReferenceElementsNonzeros = 782, /* objReferenceElementsNonzeros */
1031  YYSYMBOL_objReferenceElementsValues = 783, /* objReferenceElementsValues */
1032  YYSYMBOL_objReferenceElementsValuesStart = 784, /* objReferenceElementsValuesStart */
1033  YYSYMBOL_objReferenceElementsValuesContent = 785, /* objReferenceElementsValuesContent */
1034  YYSYMBOL_objReferenceElementsValuesEmpty = 786, /* objReferenceElementsValuesEmpty */
1035  YYSYMBOL_objReferenceElementsValuesLaden = 787, /* objReferenceElementsValuesLaden */
1036  YYSYMBOL_objReferenceElementsValuesBody = 788, /* objReferenceElementsValuesBody */
1037  YYSYMBOL_conReferenceElements = 789, /* conReferenceElements */
1038  YYSYMBOL_conReferenceElementsStart = 790, /* conReferenceElementsStart */
1039  YYSYMBOL_conReferenceElementsAttributes = 791, /* conReferenceElementsAttributes */
1040  YYSYMBOL_conReferenceElementsAttList = 792, /* conReferenceElementsAttList */
1041  YYSYMBOL_conReferenceElementsAtt = 793, /* conReferenceElementsAtt */
1042  YYSYMBOL_conReferenceElementsContent = 794, /* conReferenceElementsContent */
1043  YYSYMBOL_conReferenceElementsNonzeros = 795, /* conReferenceElementsNonzeros */
1044  YYSYMBOL_conReferenceElementsValues = 796, /* conReferenceElementsValues */
1045  YYSYMBOL_conReferenceElementsValuesStart = 797, /* conReferenceElementsValuesStart */
1046  YYSYMBOL_conReferenceElementsValuesContent = 798, /* conReferenceElementsValuesContent */
1047  YYSYMBOL_conReferenceElementsValuesEmpty = 799, /* conReferenceElementsValuesEmpty */
1048  YYSYMBOL_conReferenceElementsValuesLaden = 800, /* conReferenceElementsValuesLaden */
1049  YYSYMBOL_conReferenceElementsElList = 801, /* conReferenceElementsElList */
1050  YYSYMBOL_conReferenceElementsEl = 802, /* conReferenceElementsEl */
1051  YYSYMBOL_conReferenceElementsElStart = 803, /* conReferenceElementsElStart */
1052  YYSYMBOL_conReferenceElementsElAttributeList = 804, /* conReferenceElementsElAttributeList */
1053  YYSYMBOL_conReferenceElementsElAttribute = 805, /* conReferenceElementsElAttribute */
1054  YYSYMBOL_conReferenceElementsElContent = 806, /* conReferenceElementsElContent */
1055  YYSYMBOL_matrixTransformation = 807, /* matrixTransformation */
1056  YYSYMBOL_matrixTransformationStart = 808, /* matrixTransformationStart */
1057  YYSYMBOL_matrixTransformationShapeATT = 809, /* matrixTransformationShapeATT */
1058  YYSYMBOL_matrixTransformationEnd = 810, /* matrixTransformationEnd */
1059  YYSYMBOL_matrixBlocks = 811, /* matrixBlocks */
1060  YYSYMBOL_matrixBlocksStart = 812, /* matrixBlocksStart */
1061  YYSYMBOL_matrixBlocksAttributes = 813, /* matrixBlocksAttributes */
1062  YYSYMBOL_matrixBlocksContent = 814, /* matrixBlocksContent */
1063  YYSYMBOL_matrixBlocksEnd = 815, /* matrixBlocksEnd */
1064  YYSYMBOL_colOffsets = 816, /* colOffsets */
1065  YYSYMBOL_colOffsetStart = 817, /* colOffsetStart */
1066  YYSYMBOL_colOffsetNumberOfElAttribute = 818, /* colOffsetNumberOfElAttribute */
1067  YYSYMBOL_colOffsetContent = 819, /* colOffsetContent */
1068  YYSYMBOL_colOffsetEmpty = 820, /* colOffsetEmpty */
1069  YYSYMBOL_colOffsetLaden = 821, /* colOffsetLaden */
1070  YYSYMBOL_colOffsetBody = 822, /* colOffsetBody */
1071  YYSYMBOL_rowOffsets = 823, /* rowOffsets */
1072  YYSYMBOL_rowOffsetStart = 824, /* rowOffsetStart */
1073  YYSYMBOL_rowOffsetNumberOfElAttribute = 825, /* rowOffsetNumberOfElAttribute */
1074  YYSYMBOL_rowOffsetContent = 826, /* rowOffsetContent */
1075  YYSYMBOL_rowOffsetEmpty = 827, /* rowOffsetEmpty */
1076  YYSYMBOL_rowOffsetLaden = 828, /* rowOffsetLaden */
1077  YYSYMBOL_rowOffsetBody = 829, /* rowOffsetBody */
1078  YYSYMBOL_blockList = 830, /* blockList */
1079  YYSYMBOL_matrixBlock = 831, /* matrixBlock */
1080  YYSYMBOL_matrixBlockStart = 832, /* matrixBlockStart */
1081  YYSYMBOL_matrixBlockAttributes = 833, /* matrixBlockAttributes */
1082  YYSYMBOL_matrixBlockAttList = 834, /* matrixBlockAttList */
1083  YYSYMBOL_matrixBlockAtt = 835, /* matrixBlockAtt */
1084  YYSYMBOL_matrixBlockContent = 836, /* matrixBlockContent */
1085  YYSYMBOL_blockEmpty = 837, /* blockEmpty */
1086  YYSYMBOL_blockLaden = 838, /* blockLaden */
1087  YYSYMBOL_blockBody = 839, /* blockBody */
1088  YYSYMBOL_osglNumberOfBlocksATT = 840, /* osglNumberOfBlocksATT */
1089  YYSYMBOL_osglNumberOfColumnsATT = 841, /* osglNumberOfColumnsATT */
1090  YYSYMBOL_osglNumberOfElATT = 842, /* osglNumberOfElATT */
1091  YYSYMBOL_osglNumberOfRowsATT = 843, /* osglNumberOfRowsATT */
1092  YYSYMBOL_osglNumberOfValuesATT = 844, /* osglNumberOfValuesATT */
1093  YYSYMBOL_osglNumberOfVarIdxATT = 845, /* osglNumberOfVarIdxATT */
1094  YYSYMBOL_osglBase64SizeATT = 846, /* osglBase64SizeATT */
1095  YYSYMBOL_osglBaseMatrixIdxATT = 847, /* osglBaseMatrixIdxATT */
1096  YYSYMBOL_osglBaseMatrixStartRowATT = 848, /* osglBaseMatrixStartRowATT */
1097  YYSYMBOL_osglBaseMatrixStartColATT = 849, /* osglBaseMatrixStartColATT */
1098  YYSYMBOL_osglBaseMatrixEndRowATT = 850, /* osglBaseMatrixEndRowATT */
1099  YYSYMBOL_osglBaseMatrixEndColATT = 851, /* osglBaseMatrixEndColATT */
1100  YYSYMBOL_osglBlockRowIdxATT = 852, /* osglBlockRowIdxATT */
1101  YYSYMBOL_osglBlockColIdxATT = 853, /* osglBlockColIdxATT */
1102  YYSYMBOL_osglCoefATT = 854, /* osglCoefATT */
1103  YYSYMBOL_osglConstantATT = 855, /* osglConstantATT */
1104  YYSYMBOL_osglIdxATT = 856, /* osglIdxATT */
1105  YYSYMBOL_osglIncrATT = 857, /* osglIncrATT */
1106  YYSYMBOL_osglMultATT = 858, /* osglMultATT */
1107  YYSYMBOL_osglScalarMultiplierATT = 859, /* osglScalarMultiplierATT */
1108  YYSYMBOL_osglTargetMatrixFirstRowATT = 860, /* osglTargetMatrixFirstRowATT */
1109  YYSYMBOL_osglTargetMatrixFirstColATT = 861, /* osglTargetMatrixFirstColATT */
1110  YYSYMBOL_osglBaseTransposeATT = 862, /* osglBaseTransposeATT */
1111  YYSYMBOL_baseTransposeAttEmpty = 863, /* baseTransposeAttEmpty */
1112  YYSYMBOL_baseTransposeAttContent = 864, /* baseTransposeAttContent */
1113  YYSYMBOL_osglNameATT = 865, /* osglNameATT */
1114  YYSYMBOL_nameAttEmpty = 866, /* nameAttEmpty */
1115  YYSYMBOL_nameAttContent = 867, /* nameAttContent */
1116  YYSYMBOL_osglRowMajorATT = 868, /* osglRowMajorATT */
1117  YYSYMBOL_rowMajorAttEmpty = 869, /* rowMajorAttEmpty */
1118  YYSYMBOL_rowMajorAttContent = 870, /* rowMajorAttContent */
1119  YYSYMBOL_osglShapeATT = 871, /* osglShapeATT */
1120  YYSYMBOL_shapeAttEmpty = 872, /* shapeAttEmpty */
1121  YYSYMBOL_shape = 873, /* shape */
1122  YYSYMBOL_osglSymmetryATT = 874, /* osglSymmetryATT */
1123  YYSYMBOL_symmetryAttEmpty = 875, /* symmetryAttEmpty */
1124  YYSYMBOL_symmetryAttContent = 876, /* symmetryAttContent */
1125  YYSYMBOL_osglTypeATT = 877, /* osglTypeATT */
1126  YYSYMBOL_typeAttEmpty = 878, /* typeAttEmpty */
1127  YYSYMBOL_typeAttContent = 879, /* typeAttContent */
1128  YYSYMBOL_osglValueATT = 880, /* osglValueATT */
1129  YYSYMBOL_valueAttEmpty = 881, /* valueAttEmpty */
1130  YYSYMBOL_valueAttContent = 882, /* valueAttContent */
1131  YYSYMBOL_osglValueTypeATT = 883, /* osglValueTypeATT */
1132  YYSYMBOL_valueTypeAttEmpty = 884, /* valueTypeAttEmpty */
1133  YYSYMBOL_valueTypeAttContent = 885, /* valueTypeAttContent */
1134  YYSYMBOL_osglVarTypeATT = 886, /* osglVarTypeATT */
1135  YYSYMBOL_varTypeAttEmpty = 887, /* varTypeAttEmpty */
1136  YYSYMBOL_varTypeAttContent = 888, /* varTypeAttContent */
1137  YYSYMBOL_nonlinearExpressions = 889, /* nonlinearExpressions */
1138  YYSYMBOL_nonlinearExpressionsStart = 890, /* nonlinearExpressionsStart */
1139  YYSYMBOL_nlnumberatt = 891, /* nlnumberatt */
1140  YYSYMBOL_nlnodes = 892, /* nlnodes */
1141  YYSYMBOL_scalarExpressionTree = 893, /* scalarExpressionTree */
1142  YYSYMBOL_nlstart = 894, /* nlstart */
1143  YYSYMBOL_nlAttributes = 895, /* nlAttributes */
1144  YYSYMBOL_nlAttributeList = 896, /* nlAttributeList */
1145  YYSYMBOL_nlAttribute = 897, /* nlAttribute */
1146  YYSYMBOL_nlnode = 898, /* nlnode */
1147  YYSYMBOL_E = 899, /* E */
1148  YYSYMBOL_900_6 = 900, /* $@6 */
1149  YYSYMBOL_eend = 901, /* eend */
1150  YYSYMBOL_PI = 902, /* PI */
1151  YYSYMBOL_903_7 = 903, /* $@7 */
1152  YYSYMBOL_piend = 904, /* piend */
1153  YYSYMBOL_times = 905, /* times */
1154  YYSYMBOL_906_8 = 906, /* $@8 */
1155  YYSYMBOL_plus = 907, /* plus */
1156  YYSYMBOL_908_9 = 908, /* $@9 */
1157  YYSYMBOL_minus = 909, /* minus */
1158  YYSYMBOL_910_10 = 910, /* $@10 */
1159  YYSYMBOL_negate = 911, /* negate */
1160  YYSYMBOL_912_11 = 912, /* $@11 */
1161  YYSYMBOL_divide = 913, /* divide */
1162  YYSYMBOL_914_12 = 914, /* $@12 */
1163  YYSYMBOL_power = 915, /* power */
1164  YYSYMBOL_916_13 = 916, /* $@13 */
1165  YYSYMBOL_ln = 917, /* ln */
1166  YYSYMBOL_918_14 = 918, /* $@14 */
1167  YYSYMBOL_sqrt = 919, /* sqrt */
1168  YYSYMBOL_920_15 = 920, /* $@15 */
1169  YYSYMBOL_square = 921, /* square */
1170  YYSYMBOL_922_16 = 922, /* $@16 */
1171  YYSYMBOL_cos = 923, /* cos */
1172  YYSYMBOL_924_17 = 924, /* $@17 */
1173  YYSYMBOL_sin = 925, /* sin */
1174  YYSYMBOL_926_18 = 926, /* $@18 */
1175  YYSYMBOL_exp = 927, /* exp */
1176  YYSYMBOL_928_19 = 928, /* $@19 */
1177  YYSYMBOL_abs = 929, /* abs */
1178  YYSYMBOL_absStart = 930, /* absStart */
1179  YYSYMBOL_absEnd = 931, /* absEnd */
1180  YYSYMBOL_erf = 932, /* erf */
1181  YYSYMBOL_933_20 = 933, /* $@20 */
1182  YYSYMBOL_if = 934, /* if */
1183  YYSYMBOL_935_21 = 935, /* $@21 */
1184  YYSYMBOL_matrixDeterminant = 936, /* matrixDeterminant */
1185  YYSYMBOL_937_22 = 937, /* $@22 */
1186  YYSYMBOL_matrixTrace = 938, /* matrixTrace */
1187  YYSYMBOL_939_23 = 939, /* $@23 */
1188  YYSYMBOL_matrixToScalar = 940, /* matrixToScalar */
1189  YYSYMBOL_941_24 = 941, /* $@24 */
1190  YYSYMBOL_number = 942, /* number */
1191  YYSYMBOL_numberStart = 943, /* numberStart */
1192  YYSYMBOL_numberEnd = 944, /* numberEnd */
1193  YYSYMBOL_numberAttributeList = 945, /* numberAttributeList */
1194  YYSYMBOL_numberAttribute = 946, /* numberAttribute */
1195  YYSYMBOL_numberidATT = 947, /* numberidATT */
1196  YYSYMBOL_948_25 = 948, /* $@25 */
1197  YYSYMBOL_variable = 949, /* variable */
1198  YYSYMBOL_950_26 = 950, /* $@26 */
1199  YYSYMBOL_variableend = 951, /* variableend */
1200  YYSYMBOL_952_27 = 952, /* $@27 */
1201  YYSYMBOL_anotherVariableATT = 953, /* anotherVariableATT */
1202  YYSYMBOL_variableATT = 954, /* variableATT */
1203  YYSYMBOL_variablecoefATT = 955, /* variablecoefATT */
1204  YYSYMBOL_variableidxATT = 956, /* variableidxATT */
1205  YYSYMBOL_sum = 957, /* sum */
1206  YYSYMBOL_958_28 = 958, /* $@28 */
1207  YYSYMBOL_anothersumnlnode = 959, /* anothersumnlnode */
1208  YYSYMBOL_allDiff = 960, /* allDiff */
1209  YYSYMBOL_961_29 = 961, /* $@29 */
1210  YYSYMBOL_anotherallDiffnlnode = 962, /* anotherallDiffnlnode */
1211  YYSYMBOL_max = 963, /* max */
1212  YYSYMBOL_964_30 = 964, /* $@30 */
1213  YYSYMBOL_anothermaxnlnode = 965, /* anothermaxnlnode */
1214  YYSYMBOL_min = 966, /* min */
1215  YYSYMBOL_967_31 = 967, /* $@31 */
1216  YYSYMBOL_anotherminnlnode = 968, /* anotherminnlnode */
1217  YYSYMBOL_product = 969, /* product */
1218  YYSYMBOL_970_32 = 970, /* $@32 */
1219  YYSYMBOL_anotherproductnlnode = 971, /* anotherproductnlnode */
1220  YYSYMBOL_OSnLMNode = 972, /* OSnLMNode */
1221  YYSYMBOL_matrixReference = 973, /* matrixReference */
1222  YYSYMBOL_matrixReferenceStart = 974, /* matrixReferenceStart */
1223  YYSYMBOL_matrixReferenceEnd = 975, /* matrixReferenceEnd */
1224  YYSYMBOL_matrixVarReference = 976, /* matrixVarReference */
1225  YYSYMBOL_matrixVarReferenceStart = 977, /* matrixVarReferenceStart */
1226  YYSYMBOL_matrixVarReferenceEnd = 978, /* matrixVarReferenceEnd */
1227  YYSYMBOL_matrixVarIdxATT = 979, /* matrixVarIdxATT */
1228  YYSYMBOL_matrixObjReference = 980, /* matrixObjReference */
1229  YYSYMBOL_matrixObjReferenceStart = 981, /* matrixObjReferenceStart */
1230  YYSYMBOL_matrixObjReferenceEnd = 982, /* matrixObjReferenceEnd */
1231  YYSYMBOL_matrixObjIdxATT = 983, /* matrixObjIdxATT */
1232  YYSYMBOL_matrixConReference = 984, /* matrixConReference */
1233  YYSYMBOL_matrixConReferenceStart = 985, /* matrixConReferenceStart */
1234  YYSYMBOL_matrixConReferenceEnd = 986, /* matrixConReferenceEnd */
1235  YYSYMBOL_matrixConIdxATT = 987, /* matrixConIdxATT */
1236  YYSYMBOL_matrixDiagonal = 988, /* matrixDiagonal */
1237  YYSYMBOL_matrixDiagonalStart = 989, /* matrixDiagonalStart */
1238  YYSYMBOL_matrixDiagonalContent = 990, /* matrixDiagonalContent */
1239  YYSYMBOL_matrixDotTimes = 991, /* matrixDotTimes */
1240  YYSYMBOL_matrixDotTimesStart = 992, /* matrixDotTimesStart */
1241  YYSYMBOL_matrixDotTimesContent = 993, /* matrixDotTimesContent */
1242  YYSYMBOL_identityMatrix = 994, /* identityMatrix */
1243  YYSYMBOL_identityMatrixStart = 995, /* identityMatrixStart */
1244  YYSYMBOL_identityMatrixContent = 996, /* identityMatrixContent */
1245  YYSYMBOL_matrixInverse = 997, /* matrixInverse */
1246  YYSYMBOL_matrixInverseStart = 998, /* matrixInverseStart */
1247  YYSYMBOL_matrixInverseContent = 999, /* matrixInverseContent */
1248  YYSYMBOL_matrixLowerTriangle = 1000, /* matrixLowerTriangle */
1249  YYSYMBOL_matrixLowerTriangleStart = 1001, /* matrixLowerTriangleStart */
1250  YYSYMBOL_matrixLowerTriangleAttribute = 1002, /* matrixLowerTriangleAttribute */
1251  YYSYMBOL_matrixLowerTriangleContent = 1003, /* matrixLowerTriangleContent */
1252  YYSYMBOL_matrixUpperTriangle = 1004, /* matrixUpperTriangle */
1253  YYSYMBOL_matrixUpperTriangleStart = 1005, /* matrixUpperTriangleStart */
1254  YYSYMBOL_matrixUpperTriangleAttribute = 1006, /* matrixUpperTriangleAttribute */
1255  YYSYMBOL_matrixUpperTriangleContent = 1007, /* matrixUpperTriangleContent */
1256  YYSYMBOL_includeDiagonalATT = 1008, /* includeDiagonalATT */
1257  YYSYMBOL_matrixMerge = 1009, /* matrixMerge */
1258  YYSYMBOL_matrixMergeStart = 1010, /* matrixMergeStart */
1259  YYSYMBOL_matrixMergeEnd = 1011, /* matrixMergeEnd */
1260  YYSYMBOL_matrixMinus = 1012, /* matrixMinus */
1261  YYSYMBOL_matrixMinusStart = 1013, /* matrixMinusStart */
1262  YYSYMBOL_matrixMinusContent = 1014, /* matrixMinusContent */
1263  YYSYMBOL_matrixNegate = 1015, /* matrixNegate */
1264  YYSYMBOL_matrixNegateStart = 1016, /* matrixNegateStart */
1265  YYSYMBOL_matrixNegateContent = 1017, /* matrixNegateContent */
1266  YYSYMBOL_matrixPlus = 1018, /* matrixPlus */
1267  YYSYMBOL_matrixPlusStart = 1019, /* matrixPlusStart */
1268  YYSYMBOL_matrixPlusContent = 1020, /* matrixPlusContent */
1269  YYSYMBOL_matrixTimes = 1021, /* matrixTimes */
1270  YYSYMBOL_matrixTimesStart = 1022, /* matrixTimesStart */
1271  YYSYMBOL_matrixTimesContent = 1023, /* matrixTimesContent */
1272  YYSYMBOL_matrixProduct = 1024, /* matrixProduct */
1273  YYSYMBOL_1025_33 = 1025, /* $@33 */
1274  YYSYMBOL_anothermatrixproductnode = 1026, /* anothermatrixproductnode */
1275  YYSYMBOL_matrixScalarTimes = 1027, /* matrixScalarTimes */
1276  YYSYMBOL_matrixScalarTimesStart = 1028, /* matrixScalarTimesStart */
1277  YYSYMBOL_matrixScalarTimesContent = 1029, /* matrixScalarTimesContent */
1278  YYSYMBOL_matrixSubMatrixAt = 1030, /* matrixSubMatrixAt */
1279  YYSYMBOL_matrixSubMatrixAtStart = 1031, /* matrixSubMatrixAtStart */
1280  YYSYMBOL_matrixSubMatrixAtContent = 1032, /* matrixSubMatrixAtContent */
1281  YYSYMBOL_matrixTranspose = 1033, /* matrixTranspose */
1282  YYSYMBOL_matrixTransposeStart = 1034, /* matrixTransposeStart */
1283  YYSYMBOL_matrixTransposeContent = 1035, /* matrixTransposeContent */
1284  YYSYMBOL_matrixExpressions = 1036, /* matrixExpressions */
1285  YYSYMBOL_matrixExpressionsStart = 1037, /* matrixExpressionsStart */
1286  YYSYMBOL_matrixExpressionsAtt = 1038, /* matrixExpressionsAtt */
1287  YYSYMBOL_numberOfExprATT = 1039, /* numberOfExprATT */
1288  YYSYMBOL_matrixExpressionsContent = 1040, /* matrixExpressionsContent */
1289  YYSYMBOL_matrixExpressionsEmpty = 1041, /* matrixExpressionsEmpty */
1290  YYSYMBOL_matrixExpressionsLaden = 1042, /* matrixExpressionsLaden */
1291  YYSYMBOL_matrixExprList = 1043, /* matrixExprList */
1292  YYSYMBOL_matrixExpr = 1044, /* matrixExpr */
1293  YYSYMBOL_matrixExprStart = 1045, /* matrixExprStart */
1294  YYSYMBOL_matrixExprAttributes = 1046, /* matrixExprAttributes */
1295  YYSYMBOL_matrixExprAttributeList = 1047, /* matrixExprAttributeList */
1296  YYSYMBOL_exprAttribute = 1048 /* exprAttribute */
1297 };
1298 typedef enum yysymbol_kind_t yysymbol_kind_t;
1299 
1300 
1301 /* Second part of user prologue. */
1302 
1303 int osillex(YYSTYPE* lvalp, YYLTYPE* llocp, void* scanner );
1304 void osilerror(YYLTYPE* mytype, OSInstance *osinstance, OSiLParserData *parserData, OSgLParserData* osglData, OSnLParserData *osnlData, std::string errormsg );
1305 std::string addErrorMsg(YYLTYPE* mytype, OSInstance *osinstance, OSiLParserData* parserData, OSgLParserData* osglData, OSnLParserData *osnlData, std::string errormsg ) ;
1306 
1307 #define scanner parserData->scanner
1308 
1309 
1310 
1311 #ifdef short
1312 # undef short
1313 #endif
1314 
1315 /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
1316  <limits.h> and (if available) <stdint.h> are included
1317  so that the code can choose integer types of a good width. */
1318 
1319 #ifndef __PTRDIFF_MAX__
1320 # include <limits.h> /* INFRINGES ON USER NAME SPACE */
1321 # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
1322 # include <stdint.h> /* INFRINGES ON USER NAME SPACE */
1323 # define YY_STDINT_H
1324 # endif
1325 #endif
1326 
1327 /* Narrow types that promote to a signed type and that can represent a
1328  signed or unsigned integer of at least N bits. In tables they can
1329  save space and decrease cache pressure. Promoting to a signed type
1330  helps avoid bugs in integer arithmetic. */
1331 
1332 #ifdef __INT_LEAST8_MAX__
1333 typedef __INT_LEAST8_TYPE__ yytype_int8;
1334 #elif defined YY_STDINT_H
1335 typedef int_least8_t yytype_int8;
1336 #else
1337 typedef signed char yytype_int8;
1338 #endif
1339 
1340 #ifdef __INT_LEAST16_MAX__
1341 typedef __INT_LEAST16_TYPE__ yytype_int16;
1342 #elif defined YY_STDINT_H
1343 typedef int_least16_t yytype_int16;
1344 #else
1345 typedef short yytype_int16;
1346 #endif
1347 
1348 /* Work around bug in HP-UX 11.23, which defines these macros
1349  incorrectly for preprocessor constants. This workaround can likely
1350  be removed in 2023, as HPE has promised support for HP-UX 11.23
1351  (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
1352  <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
1353 #ifdef __hpux
1354 # undef UINT_LEAST8_MAX
1355 # undef UINT_LEAST16_MAX
1356 # define UINT_LEAST8_MAX 255
1357 # define UINT_LEAST16_MAX 65535
1358 #endif
1359 
1360 #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
1361 typedef __UINT_LEAST8_TYPE__ yytype_uint8;
1362 #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
1363  && UINT_LEAST8_MAX <= INT_MAX)
1364 typedef uint_least8_t yytype_uint8;
1365 #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
1366 typedef unsigned char yytype_uint8;
1367 #else
1368 typedef short yytype_uint8;
1369 #endif
1370 
1371 #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
1372 typedef __UINT_LEAST16_TYPE__ yytype_uint16;
1373 #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
1374  && UINT_LEAST16_MAX <= INT_MAX)
1375 typedef uint_least16_t yytype_uint16;
1376 #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
1377 typedef unsigned short yytype_uint16;
1378 #else
1379 typedef int yytype_uint16;
1380 #endif
1381 
1382 #ifndef YYPTRDIFF_T
1383 # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
1384 # define YYPTRDIFF_T __PTRDIFF_TYPE__
1385 # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
1386 # elif defined PTRDIFF_MAX
1387 # ifndef ptrdiff_t
1388 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1389 # endif
1390 # define YYPTRDIFF_T ptrdiff_t
1391 # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
1392 # else
1393 # define YYPTRDIFF_T long
1394 # define YYPTRDIFF_MAXIMUM LONG_MAX
1395 # endif
1396 #endif
1397 
1398 #ifndef YYSIZE_T
1399 # ifdef __SIZE_TYPE__
1400 # define YYSIZE_T __SIZE_TYPE__
1401 # elif defined size_t
1402 # define YYSIZE_T size_t
1403 # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
1404 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1405 # define YYSIZE_T size_t
1406 # else
1407 # define YYSIZE_T unsigned
1408 # endif
1409 #endif
1410 
1411 #define YYSIZE_MAXIMUM \
1412  YY_CAST (YYPTRDIFF_T, \
1413  (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
1414  ? YYPTRDIFF_MAXIMUM \
1415  : YY_CAST (YYSIZE_T, -1)))
1416 
1417 #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
1418 
1419 
1420 /* Stored state numbers (used for stacks). */
1421 typedef yytype_int16 yy_state_t;
1422 
1423 /* State numbers in computations. */
1424 typedef int yy_state_fast_t;
1425 
1426 #ifndef YY_
1427 # if defined YYENABLE_NLS && YYENABLE_NLS
1428 # if ENABLE_NLS
1429 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1430 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
1431 # endif
1432 # endif
1433 # ifndef YY_
1434 # define YY_(Msgid) Msgid
1435 # endif
1436 #endif
1437 
1438 
1439 #ifndef YY_ATTRIBUTE_PURE
1440 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
1441 # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
1442 # else
1443 # define YY_ATTRIBUTE_PURE
1444 # endif
1445 #endif
1446 
1447 #ifndef YY_ATTRIBUTE_UNUSED
1448 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
1449 # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
1450 # else
1451 # define YY_ATTRIBUTE_UNUSED
1452 # endif
1453 #endif
1454 
1455 /* Suppress unused-variable warnings by "using" E. */
1456 #if ! defined lint || defined __GNUC__
1457 # define YY_USE(E) ((void) (E))
1458 #else
1459 # define YY_USE(E) /* empty */
1460 #endif
1461 
1462 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
1463 #if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
1464 # if __GNUC__ * 100 + __GNUC_MINOR__ < 407
1465 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
1466  _Pragma ("GCC diagnostic push") \
1467  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
1468 # else
1469 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
1470  _Pragma ("GCC diagnostic push") \
1471  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
1472  _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
1473 # endif
1474 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
1475  _Pragma ("GCC diagnostic pop")
1476 #else
1477 # define YY_INITIAL_VALUE(Value) Value
1478 #endif
1479 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1480 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1481 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
1482 #endif
1483 #ifndef YY_INITIAL_VALUE
1484 # define YY_INITIAL_VALUE(Value) /* Nothing. */
1485 #endif
1486 
1487 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
1488 # define YY_IGNORE_USELESS_CAST_BEGIN \
1489  _Pragma ("GCC diagnostic push") \
1490  _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
1491 # define YY_IGNORE_USELESS_CAST_END \
1492  _Pragma ("GCC diagnostic pop")
1493 #endif
1494 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
1495 # define YY_IGNORE_USELESS_CAST_BEGIN
1496 # define YY_IGNORE_USELESS_CAST_END
1497 #endif
1498 
1499 
1500 #define YY_ASSERT(E) ((void) (0 && (E)))
1501 
1502 #if 1
1503 
1504 /* The parser invokes alloca or malloc; define the necessary symbols. */
1505 
1506 # ifdef YYSTACK_USE_ALLOCA
1507 # if YYSTACK_USE_ALLOCA
1508 # ifdef __GNUC__
1509 # define YYSTACK_ALLOC __builtin_alloca
1510 # elif defined __BUILTIN_VA_ARG_INCR
1511 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1512 # elif defined _AIX
1513 # define YYSTACK_ALLOC __alloca
1514 # elif defined _MSC_VER
1515 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1516 # define alloca _alloca
1517 # else
1518 # define YYSTACK_ALLOC alloca
1519 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
1520 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1521  /* Use EXIT_SUCCESS as a witness for stdlib.h. */
1522 # ifndef EXIT_SUCCESS
1523 # define EXIT_SUCCESS 0
1524 # endif
1525 # endif
1526 # endif
1527 # endif
1528 # endif
1529 
1530 # ifdef YYSTACK_ALLOC
1531  /* Pacify GCC's 'empty if-body' warning. */
1532 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
1533 # ifndef YYSTACK_ALLOC_MAXIMUM
1534  /* The OS might guarantee only one guard page at the bottom of the stack,
1535  and a page size can be as small as 4096 bytes. So we cannot safely
1536  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
1537  to allow for a few compiler-allocated temporary stack slots. */
1538 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1539 # endif
1540 # else
1541 # define YYSTACK_ALLOC YYMALLOC
1542 # define YYSTACK_FREE YYFREE
1543 # ifndef YYSTACK_ALLOC_MAXIMUM
1544 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1545 # endif
1546 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
1547  && ! ((defined YYMALLOC || defined malloc) \
1548  && (defined YYFREE || defined free)))
1549 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1550 # ifndef EXIT_SUCCESS
1551 # define EXIT_SUCCESS 0
1552 # endif
1553 # endif
1554 # ifndef YYMALLOC
1555 # define YYMALLOC malloc
1556 # if ! defined malloc && ! defined EXIT_SUCCESS
1557 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1558 # endif
1559 # endif
1560 # ifndef YYFREE
1561 # define YYFREE free
1562 # if ! defined free && ! defined EXIT_SUCCESS
1563 void free (void *); /* INFRINGES ON USER NAME SPACE */
1564 # endif
1565 # endif
1566 # endif
1567 #endif /* 1 */
1568 
1569 #if (! defined yyoverflow \
1570  && (! defined __cplusplus \
1571  || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
1572  && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1573 
1574 /* A type that is properly aligned for any stack member. */
1575 union yyalloc
1576 {
1580 };
1581 
1582 /* The size of the maximum gap between one aligned stack and the next. */
1583 # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
1584 
1585 /* The size of an array large to enough to hold all stacks, each with
1586  N elements. */
1587 # define YYSTACK_BYTES(N) \
1588  ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
1589  + YYSIZEOF (YYLTYPE)) \
1590  + 2 * YYSTACK_GAP_MAXIMUM)
1591 
1592 # define YYCOPY_NEEDED 1
1593 
1594 /* Relocate STACK from its old location to the new one. The
1595  local variables YYSIZE and YYSTACKSIZE give the old and new number of
1596  elements in the stack, and YYPTR gives the new location of the
1597  stack. Advance YYPTR to a properly aligned location for the next
1598  stack. */
1599 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1600  do \
1601  { \
1602  YYPTRDIFF_T yynewbytes; \
1603  YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1604  Stack = &yyptr->Stack_alloc; \
1605  yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
1606  yyptr += yynewbytes / YYSIZEOF (*yyptr); \
1607  } \
1608  while (0)
1609 
1610 #endif
1611 
1612 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
1613 /* Copy COUNT objects from SRC to DST. The source and destination do
1614  not overlap. */
1615 # ifndef YYCOPY
1616 # if defined __GNUC__ && 1 < __GNUC__
1617 # define YYCOPY(Dst, Src, Count) \
1618  __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
1619 # else
1620 # define YYCOPY(Dst, Src, Count) \
1621  do \
1622  { \
1623  YYPTRDIFF_T yyi; \
1624  for (yyi = 0; yyi < (Count); yyi++) \
1625  (Dst)[yyi] = (Src)[yyi]; \
1626  } \
1627  while (0)
1628 # endif
1629 # endif
1630 #endif /* !YYCOPY_NEEDED */
1631 
1632 /* YYFINAL -- State number of the termination state. */
1633 #define YYFINAL 5
1634 /* YYLAST -- Last index in YYTABLE. */
1635 #define YYLAST 1213
1636 
1637 /* YYNTOKENS -- Number of terminals. */
1638 #define YYNTOKENS 409
1639 /* YYNNTS -- Number of nonterminals. */
1640 #define YYNNTS 640
1641 /* YYNRULES -- Number of rules. */
1642 #define YYNRULES 965
1643 /* YYNSTATES -- Number of states. */
1644 #define YYNSTATES 1498
1645 
1646 /* YYMAXUTOK -- Last valid token kind. */
1647 #define YYMAXUTOK 659
1648 
1649 
1650 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
1651  as returned by yylex, with out-of-bounds checking. */
1652 #define YYTRANSLATE(YYX) \
1653  (0 <= (YYX) && (YYX) <= YYMAXUTOK \
1654  ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
1655  : YYSYMBOL_YYUNDEF)
1656 
1657 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
1658  as returned by yylex. */
1659 static const yytype_int16 yytranslate[] =
1660 {
1661  0, 2, 2, 2, 2, 2, 2, 2, 2, 406,
1662  408, 2, 2, 407, 2, 2, 2, 2, 2, 2,
1663  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1664  2, 2, 405, 2, 2, 2, 2, 2, 2, 2,
1665  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1666  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1667  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1668  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1669  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1670  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1671  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1672  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1673  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1674  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1675  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1676  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1677  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1678  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1679  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1680  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1681  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1682  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1683  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1684  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1685  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1686  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1687  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1688  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1689  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1690  35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1691  45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1692  55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1693  65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1694  75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1695  85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1696  95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
1697  105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
1698  115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
1699  125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
1700  135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
1701  145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
1702  155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
1703  165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
1704  175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
1705  185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
1706  195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
1707  205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
1708  215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
1709  225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
1710  235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
1711  245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
1712  255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1713  265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1714  275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1715  285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1716  295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1717  305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1718  315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1719  325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1720  335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1721  345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1722  355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
1723  365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
1724  375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
1725  385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
1726  395, 396, 397, 398, 399, 400, 401, 402, 403, 404
1727 };
1728 
1729 #if YYDEBUG
1730 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
1731 static const yytype_int16 yyrline[] =
1732 {
1733  0, 426, 426, 429, 430, 432, 441, 442, 445, 446,
1734  450, 455, 465, 465, 467, 480, 486, 487, 490, 491,
1735  494, 497, 500, 503, 509, 516, 523, 531, 536, 536,
1736  544, 550, 562, 562, 564, 566, 573, 573, 576, 576,
1737  582, 588, 600, 600, 602, 604, 608, 608, 616, 617,
1738  618, 619, 620, 621, 623, 630, 631, 636, 638, 647,
1739  649, 649, 652, 657, 662, 667, 667, 669, 672, 681,
1740  683, 683, 686, 691, 696, 701, 701, 704, 706, 715,
1741  725, 725, 728, 733, 738, 744, 744, 750, 752, 752,
1742  754, 756, 763, 803, 804, 806, 806, 808, 808, 810,
1743  812, 814, 823, 825, 825, 828, 833, 838, 843, 848,
1744  859, 859, 863, 865, 877, 879, 879, 882, 887, 892,
1745  896, 901, 906, 913, 913, 915, 917, 930, 932, 932,
1746  935, 940, 945, 950, 955, 960, 965, 972, 972, 976,
1747  978, 988, 990, 990, 993, 998, 1003, 1007, 1014, 1014,
1748  1028, 1030, 1039, 1041, 1041, 1044, 1049, 1054, 1059, 1061,
1749  1063, 1069, 1075, 1075, 1077, 1079, 1081, 1083, 1097, 1100,
1750  1102, 1111, 1113, 1113, 1116, 1121, 1126, 1131, 1133, 1135,
1751  1141, 1147, 1147, 1149, 1151, 1153, 1155, 1169, 1178, 1178,
1752  1180, 1185, 1185, 1187, 1190, 1192, 1192, 1199, 1204, 1214,
1753  1214, 1216, 1218, 1220, 1222, 1222, 1224, 1229, 1245, 1293,
1754  1293, 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304,
1755  1305, 1306, 1309, 1310, 1312, 1312, 1318, 1323, 1333, 1333,
1756  1335, 1337, 1339, 1341, 1341, 1343, 1348, 1361, 1394, 1394,
1757  1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1407, 1408,
1758  1411, 1411, 1417, 1422, 1432, 1432, 1434, 1436, 1438, 1440,
1759  1440, 1442, 1447, 1462, 1501, 1501, 1504, 1505, 1506, 1507,
1760  1508, 1509, 1510, 1511, 1512, 1515, 1516, 1559, 1559, 1561,
1761  1563, 1563, 1565, 1566, 1569, 1570, 1573, 1624, 1626, 1640,
1762  1641, 1643, 1643, 1667, 1668, 1671, 1672, 1674, 1676, 1677,
1763  1681, 1682, 1684, 1685, 1687, 1706, 1717, 1724, 1729, 1730,
1764  1732, 1733, 1735, 1735, 1738, 1750, 1751, 1753, 1754, 1758,
1765  1759, 1761, 1762, 1764, 1783, 1794, 1801, 1806, 1807, 1809,
1766  1810, 1812, 1812, 1815, 1827, 1828, 1830, 1840, 1844, 1845,
1767  1847, 1848, 1850, 1869, 1876, 1881, 1882, 1884, 1885, 1887,
1768  1887, 1890, 1902, 1903, 1908, 1908, 1916, 1917, 1919, 1920,
1769  1922, 1926, 1932, 1943, 1948, 1963, 1974, 1985, 1993, 2001,
1770  2020, 2031, 2042, 2054, 2065, 2076, 2088, 2099, 2111, 2123,
1771  2135, 2147, 2159, 2171, 2183, 2195, 2207, 2234, 2235, 2242,
1772  2244, 2244, 2246, 2247, 2248, 2249, 2413, 2421, 2423, 2423,
1773  2425, 2427, 2436, 2438, 2438, 2440, 2440, 2442, 2458, 2461,
1774  2461, 2463, 2463, 2466, 2497, 2505, 2507, 2507, 2509, 2511,
1775  2519, 2519, 2521, 2537, 2539, 2539, 2541, 2541, 2543, 2820,
1776  2871, 2894, 2912, 2912, 2915, 2916, 2917, 2918, 2919, 2923,
1777  2981, 3039, 3098, 3098, 3100, 3102, 3142, 3144, 3144, 3149,
1778  3167, 3194, 3194, 3197, 3198, 3199, 3200, 3201, 3202, 3203,
1779  3204, 3205, 3208, 3208, 3210, 3210, 3215, 3215, 3215, 3215,
1780  3216, 3216, 3216, 3216, 3218, 3220, 3229, 3235, 3235, 3238,
1781  3244, 3250, 3252, 3252, 3258, 3268, 3278, 3278, 3280, 3282,
1782  3284, 3287, 3298, 3305, 3305, 3307, 3309, 3311, 3317, 3327,
1783  3334, 3334, 3336, 3338, 3340, 3343, 3345, 3354, 3360, 3360,
1784  3363, 3369, 3375, 3377, 3377, 3379, 3389, 3396, 3396, 3398,
1785  3400, 3402, 3404, 3406, 3415, 3421, 3421, 3424, 3430, 3436,
1786  3438, 3438, 3441, 3446, 3457, 3472, 3472, 3474, 3476, 3478,
1787  3480, 3480, 3482, 3489, 3496, 3509, 3509, 3512, 3513, 3515,
1788  3515, 3517, 3519, 3521, 3521, 3524, 3526, 3534, 3534, 3539,
1789  3546, 3548, 3557, 3563, 3563, 3566, 3572, 3578, 3580, 3580,
1790  3582, 3583, 3585, 3600, 3600, 3602, 3604, 3606, 3606, 3608,
1791  3610, 3625, 3625, 3627, 3629, 3639, 3641, 3650, 3656, 3656,
1792  3659, 3665, 3671, 3673, 3673, 3675, 3685, 3692, 3692, 3694,
1793  3696, 3698, 3701, 3703, 3712, 3718, 3718, 3721, 3727, 3733,
1794  3735, 3735, 3738, 3743, 3754, 3769, 3769, 3771, 3773, 3775,
1795  3775, 3777, 3785, 3797, 3797, 3800, 3801, 3802, 3820, 3853,
1796  3856, 3874, 3874, 3885, 3892, 3902, 3910, 3916, 3918, 3932,
1797  3944, 3950, 3956, 3956, 3958, 3960, 3962, 3964, 3974, 3980,
1798  3986, 3986, 3988, 3990, 3992, 3994, 3994, 3999, 4004, 4016,
1799  4018, 4018, 4021, 4022, 4023, 4031, 4038, 4038, 4040, 4042,
1800  4048, 4062, 4073, 4117, 4240, 4251, 4273, 4297, 4308, 4322,
1801  4337, 4352, 4364, 4376, 4394, 4412, 4425, 4438, 4448, 4485,
1802  4496, 4506, 4518, 4532, 4532, 4534, 4544, 4706, 4706, 4708,
1803  4715, 4742, 4742, 4744, 4753, 4767, 4767, 4769, 4776, 4803,
1804  4803, 4805, 4812, 4821, 4821, 4823, 4830, 4857, 4857, 4861,
1805  4869, 4878, 4878, 4880, 4887, 4896, 4896, 4898, 4905, 4944,
1806  4945, 4951, 4957, 4978, 4979, 4981, 4989, 5008, 5015, 5015,
1807  5018, 5024, 5034, 5035, 5036, 5037, 5038, 5039, 5040, 5041,
1808  5042, 5043, 5044, 5045, 5046, 5047, 5048, 5049, 5050, 5051,
1809  5052, 5053, 5054, 5055, 5056, 5057, 5059, 5060, 5061, 5065,
1810  5065, 5068, 5069, 5071, 5071, 5074, 5075, 5079, 5079, 5084,
1811  5084, 5089, 5089, 5094, 5094, 5099, 5099, 5104, 5104, 5109,
1812  5109, 5114, 5114, 5119, 5119, 5124, 5124, 5129, 5129, 5134,
1813  5134, 5139, 5141, 5147, 5154, 5154, 5160, 5160, 5172, 5172,
1814  5177, 5177, 5182, 5182, 5192, 5199, 5205, 5206, 5208, 5209,
1815  5212, 5216, 5220, 5224, 5223, 5242, 5241, 5248, 5249, 5251,
1816  5250, 5257, 5258, 5261, 5267, 5275, 5282, 5300, 5300, 5311,
1817  5311, 5314, 5314, 5328, 5329, 5332, 5332, 5345, 5346, 5349,
1818  5349, 5362, 5363, 5366, 5366, 5376, 5377, 5383, 5384, 5385,
1819  5386, 5387, 5388, 5389, 5390, 5391, 5392, 5393, 5394, 5395,
1820  5396, 5397, 5398, 5399, 5400, 5401, 5404, 5409, 5416, 5417,
1821  5419, 5427, 5432, 5439, 5440, 5442, 5449, 5454, 5461, 5462,
1822  5464, 5471, 5476, 5483, 5484, 5486, 5493, 5495, 5501, 5503,
1823  5505, 5511, 5513, 5515, 5521, 5523, 5525, 5531, 5533, 5535,
1824  5541, 5541, 5546, 5548, 5550, 5556, 5556, 5561, 5563, 5572,
1825  5574, 5579, 5579, 5581, 5583, 5589, 5592, 5594, 5600, 5603,
1826  5605, 5611, 5614, 5616, 5622, 5626, 5625, 5637, 5637, 5644,
1827  5646, 5652, 5654, 5656, 5662, 5665, 5667, 5673, 5683, 5683,
1828  5689, 5697, 5699, 5719, 5719, 5721, 5723, 5725, 5725, 5727,
1829  5737, 5756, 5762, 5762, 5765, 5773
1830 };
1831 #endif
1832 
1834 #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
1835 
1836 #if 1
1837 /* The user-facing name of the symbol whose (internal) number is
1838  YYSYMBOL. No bounds checking. */
1839 static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
1840 
1841 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1842  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1843 static const char *const yytname[] =
1844 {
1845  "\"end of file\"", "error", "\"invalid token\"", "ATTRIBUTETEXT",
1846  "ELEMENTTEXT", "ITEMTEXT", "INTEGER", "DOUBLE", "QUOTE", "TWOQUOTES",
1847  "ENDOFELEMENT", "GREATERTHAN", "EMPTYSEMIDEFINITENESSATT",
1848  "SEMIDEFINITENESSATT", "NUMBEROFQTERMSATT", "NUMBEROFCONESATT",
1849  "NUMBEROFSTAGESATT", "IDXONEATT", "IDXTWOATT", "HORIZONATT", "STARTATT",
1850  "STARTIDXATT", "MATRIXIDXATT", "LBMATRIXIDXATT", "LBCONEIDXATT",
1851  "UBMATRIXIDXATT", "UBCONEIDXATT", "TEMPLATEMATRIXIDXATT",
1852  "REFERENCEMATRIXIDXATT", "VARREFERENCEMATRIXIDXATT",
1853  "OBJREFERENCEMATRIXIDXATT", "CONREFERENCEMATRIXIDXATT",
1854  "ORDERCONEIDXATT", "CONSTANTMATRIXIDXATT", "NORMSCALEFACTORATT",
1855  "DISTORTIONMATRIXIDXATT", "AXISDIRECTIONATT", "FIRSTAXISDIRECTIONATT",
1856  "SECONDAXISDIRECTIONATT", "OSILEND", "INSTANCEDATAEND",
1857  "INSTANCEDATASTARTEND", "QUADRATICCOEFFICIENTSSTART",
1858  "QUADRATICCOEFFICIENTSEND", "QTERMSTART", "QTERMEND", "CONESSTART",
1859  "CONESEND", "NONNEGATIVECONESTART", "NONNEGATIVECONEEND",
1860  "NONPOSITIVECONESTART", "NONPOSITIVECONEEND", "ORTHANTCONESTART",
1861  "ORTHANTCONEEND", "POLYHEDRALCONESTART", "POLYHEDRALCONEEND",
1862  "QUADRATICCONESTART", "QUADRATICCONEEND", "ROTATEDQUADRATICCONESTART",
1863  "ROTATEDQUADRATICCONEEND", "SEMIDEFINITECONESTART",
1864  "SEMIDEFINITECONEEND", "PRODUCTCONESTART", "PRODUCTCONEEND",
1865  "INTERSECTIONCONESTART", "INTERSECTIONCONEEND", "DUALCONESTART",
1866  "DUALCONEEND", "POLARCONESTART", "POLARCONEEND", "DIRECTIONSTART",
1867  "DIRECTIONEND", "FACTORSSTART", "FACTORSEND", "COMPONENTSSTART",
1868  "COMPONENTSEND", "TIMEDOMAINSTART", "TIMEDOMAINEND", "STAGESSTART",
1869  "STAGESEND", "STAGESTART", "STAGEEND", "INTERVALSTART", "INTERVALEND",
1870  "HEADERSTART", "HEADEREND", "FILENAMESTART", "FILENAMEEND",
1871  "FILENAMEEMPTY", "FILENAMESTARTANDEND", "FILESOURCESTART",
1872  "FILESOURCEEND", "FILESOURCEEMPTY", "FILESOURCESTARTANDEND",
1873  "FILEDESCRIPTIONSTART", "FILEDESCRIPTIONEND", "FILEDESCRIPTIONEMPTY",
1874  "FILEDESCRIPTIONSTARTANDEND", "FILECREATORSTART", "FILECREATOREND",
1875  "FILECREATOREMPTY", "FILECREATORSTARTANDEND", "FILELICENCESTART",
1876  "FILELICENCEEND", "FILELICENCEEMPTY", "FILELICENCESTARTANDEND",
1877  "INDEXESSTART", "INDEXESEND", "VALUESSTART", "VALUESEND",
1878  "NONZEROSSTART", "NONZEROSEND", "ELSTART", "ELEND", "ENUMERATIONSTART",
1879  "ENUMERATIONEND", "ITEMEMPTY", "ITEMSTART", "ITEMEND", "ITEMSTARTANDEND",
1880  "BASE64START", "BASE64END", "NUMBEROFELATT", "NUMBEROFENUMERATIONSATT",
1881  "NUMBEROFITEMSATT", "EMPTYCATEGORYATT", "CATEGORYATT",
1882  "EMPTYDESCRIPTIONATT", "DESCRIPTIONATT", "EMPTYSOLVERATT", "SOLVERATT",
1883  "EMPTYNAMEATT", "NAMEATT", "EMPTYTYPEATT", "TYPEATT", "EMPTYENUMTYPEATT",
1884  "ENUMTYPEATT", "EMPTYSHAPEATT", "SHAPEATT", "EMPTYUNITATT", "UNITATT",
1885  "EMPTYVALUEATT", "VALUEATT", "EMPTYVALUETYPEATT", "VALUETYPEATT",
1886  "EMPTYCONTYPEATT", "CONTYPEATT", "EMPTYOBJTYPEATT", "OBJTYPEATT",
1887  "EMPTYVARTYPEATT", "VARTYPEATT", "EMPTYMATRIXCONTYPEATT",
1888  "MATRIXCONTYPEATT", "EMPTYMATRIXOBJTYPEATT", "MATRIXOBJTYPEATT",
1889  "EMPTYMATRIXVARTYPEATT", "MATRIXVARTYPEATT", "EMPTYMATRIXTYPEATT",
1890  "MATRIXTYPEATT", "EMPTYSYMMETRYATT", "SYMMETRYATT", "EMPTYROWMAJORATT",
1891  "ROWMAJORATT", "EMPTYBASETRANSPOSEATT", "BASETRANSPOSEATT",
1892  "NUMBEROFBLOCKSATT", "NUMBEROFCOLUMNSATT", "NUMBEROFROWSATT",
1893  "NUMBEROFMATRICESATT", "NUMBEROFVALUESATT", "NUMBEROFCONSTRAINTSATT",
1894  "NUMBEROFCONATT", "NUMBEROFCONIDXATT", "NUMBEROFOBJECTIVESATT",
1895  "NUMBEROFOBJATT", "NUMBEROFOBJIDXATT", "NUMBEROFVARIABLESATT",
1896  "NUMBEROFVARATT", "NUMBEROFVARIDXATT", "NUMBEROFMATRIXCONATT",
1897  "NUMBEROFMATRIXOBJATT", "NUMBEROFMATRIXVARATT", "BASEMATRIXIDXATT",
1898  "TARGETMATRIXFIRSTROWATT", "TARGETMATRIXFIRSTCOLATT",
1899  "BASEMATRIXSTARTROWATT", "BASEMATRIXSTARTCOLATT", "BASEMATRIXENDROWATT",
1900  "BASEMATRIXENDCOLATT", "SCALARMULTIPLIERATT", "BLOCKROWIDXATT",
1901  "BLOCKCOLIDXATT", "MATRIXVARIDXATT", "MATRIXOBJIDXATT",
1902  "MATRIXCONIDXATT", "IDXATT", "INCRATT", "MULTATT", "SIZEOFATT",
1903  "COEFATT", "CONSTANTATT", "MATRICESSTART", "MATRICESEND", "MATRIXSTART",
1904  "MATRIXEND", "BASEMATRIXEND", "BASEMATRIXSTART", "BLOCKSSTART",
1905  "BLOCKSEND", "BLOCKSTART", "BLOCKEND", "COLOFFSETSTART", "COLOFFSETEND",
1906  "ROWOFFSETSTART", "ROWOFFSETEND", "ELEMENTSSTART", "ELEMENTSEND",
1907  "CONSTANTELEMENTSSTART", "CONSTANTELEMENTSEND",
1908  "VARREFERENCEELEMENTSSTART", "VARREFERENCEELEMENTSEND",
1909  "LINEARELEMENTSSTART", "LINEARELEMENTSEND", "GENERALELEMENTSSTART",
1910  "GENERALELEMENTSEND", "CONREFERENCEELEMENTSSTART",
1911  "CONREFERENCEELEMENTSEND", "OBJREFERENCEELEMENTSSTART",
1912  "OBJREFERENCEELEMENTSEND", "STRINGVALUEDELEMENTSSTART",
1913  "STRINGVALUEDELEMENTSEND", "STARTVECTORSTART", "STARTVECTOREND",
1914  "INDEXSTART", "INDEXEND", "VALUESTART", "VALUEEND", "VARIDXSTART",
1915  "VARIDXEND", "TRANSFORMATIONSTART", "TRANSFORMATIONEND",
1916  "MATRIXPROGRAMMINGSTART", "MATRIXPROGRAMMINGEND", "MATRIXVARIABLESSTART",
1917  "MATRIXVARIABLESEND", "MATRIXVARSTART", "MATRIXVAREND",
1918  "MATRIXOBJECTIVESSTART", "MATRIXOBJECTIVESEND", "MATRIXOBJSTART",
1919  "MATRIXOBJEND", "MATRIXCONSTRAINTSSTART", "MATRIXCONSTRAINTSEND",
1920  "MATRIXCONSTART", "MATRIXCONEND", "CONSTART", "CONEND",
1921  "CONSTRAINTSSTART", "CONSTRAINTSEND", "OBJSTART", "OBJEND",
1922  "OBJECTIVESSTART", "OBJECTIVESEND", "VARSTART", "VAREND",
1923  "VARIABLESSTART", "VARIABLESEND", "GENERALSTART", "GENERALEND",
1924  "SYSTEMSTART", "SYSTEMEND", "SERVICESTART", "SERVICEEND", "JOBSTART",
1925  "JOBEND", "OPTIMIZATIONSTART", "OPTIMIZATIONEND", "ATEQUALITYSTART",
1926  "ATEQUALITYEND", "ATLOWERSTART", "ATLOWEREND", "ATUPPERSTART",
1927  "ATUPPEREND", "BASICSTART", "BASICEND", "ISFREESTART", "ISFREEEND",
1928  "SUPERBASICSTART", "SUPERBASICEND", "UNKNOWNSTART", "UNKNOWNEND",
1929  "SERVICEURISTART", "SERVICEURIEND", "SERVICENAMESTART", "SERVICENAMEEND",
1930  "INSTANCENAMESTART", "INSTANCENAMEEND", "JOBIDSTART", "JOBIDEND",
1931  "OTHERSTART", "OTHEREND", "DUMMY", "NONLINEAREXPRESSIONSSTART",
1932  "NONLINEAREXPRESSIONSEND", "NUMBEROFNONLINEAREXPRESSIONS", "NLSTART",
1933  "NLEND", "MATRIXEXPRESSIONSSTART", "MATRIXEXPRESSIONSEND",
1934  "NUMBEROFEXPR", "EXPRSTART", "EXPREND", "NUMBEROFMATRIXTERMSATT",
1935  "MATRIXTERMSTART", "MATRIXTERMEND", "POWERSTART", "POWEREND",
1936  "PLUSSTART", "PLUSEND", "MINUSSTART", "MINUSEND", "DIVIDESTART",
1937  "DIVIDEEND", "LNSTART", "LNEND", "SQRTSTART", "SQRTEND", "SUMSTART",
1938  "SUMEND", "PRODUCTSTART", "PRODUCTEND", "EXPSTART", "EXPEND",
1939  "NEGATESTART", "NEGATEEND", "IFSTART", "IFEND", "SQUARESTART",
1940  "SQUAREEND", "COSSTART", "COSEND", "SINSTART", "SINEND", "VARIABLESTART",
1941  "VARIABLEEND", "ABSSTART", "ABSEND", "ERFSTART", "ERFEND", "MAXSTART",
1942  "MAXEND", "ALLDIFFSTART", "ALLDIFFEND", "MINSTART", "MINEND", "ESTART",
1943  "EEND", "PISTART", "PIEND", "TIMESSTART", "TIMESEND", "NUMBERSTART",
1944  "NUMBEREND", "MATRIXDETERMINANTSTART", "MATRIXDETERMINANTEND",
1945  "MATRIXTRACESTART", "MATRIXTRACEEND", "MATRIXTOSCALARSTART",
1946  "MATRIXTOSCALAREND", "MATRIXDIAGONALSTART", "MATRIXDIAGONALEND",
1947  "MATRIXDOTTIMESSTART", "MATRIXDOTTIMESEND", "MATRIXLOWERTRIANGLESTART",
1948  "MATRIXLOWERTRIANGLEEND", "MATRIXUPPERTRIANGLESTART",
1949  "MATRIXUPPERTRIANGLEEND", "MATRIXMERGESTART", "MATRIXMERGEEND",
1950  "MATRIXMINUSSTART", "MATRIXMINUSEND", "MATRIXNEGATESTART",
1951  "MATRIXNEGATEEND", "MATRIXPLUSSTART", "MATRIXPLUSEND",
1952  "MATRIXTIMESSTART", "MATRIXTIMESEND", "MATRIXPRODUCTSTART",
1953  "MATRIXPRODUCTEND", "MATRIXSCALARTIMESSTART", "MATRIXSCALARTIMESEND",
1954  "MATRIXSUBMATRIXATSTART", "MATRIXSUBMATRIXATEND", "MATRIXTRANSPOSESTART",
1955  "MATRIXTRANSPOSEEND", "MATRIXREFERENCESTART", "MATRIXREFERENCEEND",
1956  "IDENTITYMATRIXSTART", "IDENTITYMATRIXEND", "MATRIXINVERSESTART",
1957  "MATRIXINVERSEEND", "EMPTYINCLUDEDIAGONALATT", "INCLUDEDIAGONALATT",
1958  "EMPTYIDATT", "IDATT", "' '", "'\\t'", "'\\r'", "'\\n'", "$accept",
1959  "osildoc", "theInstanceEnd", "osilEnd", "osilEnding",
1960  "quadraticCoefficients", "quadraticCoefficientsStart",
1961  "osilQuadnumberATT", "qTermlist", "qterm", "qtermStart", "qtermend",
1962  "anotherqTermATT", "qtermatt", "osilQtermidxOneATT",
1963  "osilQtermidxTwoATT", "osilQtermcoefATT", "osilQtermidxATT", "matrices",
1964  "matricesStart", "matricesAttributes", "matricesContent",
1965  "matricesEmpty", "matricesLaden", "matrixList", "cones", "conesStart",
1966  "conesAttributes", "conesContent", "conesEmpty", "conesLaden",
1967  "coneList", "cone", "nonnegativeCone", "nonnegativeConeStart",
1968  "nonnegativeConeAttributes", "nonnegativeConeAttList",
1969  "nonnegativeConeAtt", "nonnegativeConeEnd", "nonpositiveCone",
1970  "nonpositiveConeStart", "nonpositiveConeAttributes",
1971  "nonpositiveConeAttList", "nonpositiveConeAtt", "nonpositiveConeEnd",
1972  "generalOrthantCone", "generalOrthantConeStart",
1973  "generalOrthantConeAttributes", "generalOrthantConeAttList",
1974  "generalOrthantConeAtt", "generalOrthantConeContent",
1975  "generalOrthantConeDirectionList", "generalOrthantConeDirections",
1976  "generalOrthantConeDirection", "generalOrthantConeDirectionStart",
1977  "generalOrthantConeDirectionAttributes",
1978  "generalOrthantConeDirectionAttributeList",
1979  "generalOrthantConeDirectionAtt", "generalOrthantConeDirectionEnd",
1980  "generalOrthantConeEnd", "polyhedralCone", "polyhedralConeStart",
1981  "polyhedralConeAttributes", "polyhedralConeAttList", "polyhedralConeAtt",
1982  "referenceMatrixATT", "polyhedralConeEnd", "quadraticCone",
1983  "quadraticConeStart", "quadraticConeAttributes", "quadraticConeAttList",
1984  "quadraticConeAtt", "quadraticConeEnd", "rotatedQuadraticCone",
1985  "rotatedQuadraticConeStart", "rotatedQuadraticConeAttributes",
1986  "rotatedQuadraticConeAttList", "rotatedQuadraticConeAtt",
1987  "rotatedQuadraticConeEnd", "semidefiniteCone", "semidefiniteConeStart",
1988  "semidefiniteConeAttributes", "semidefiniteConeAttList",
1989  "semidefiniteConeAtt", "semidefiniteConeEnd", "productCone",
1990  "productConeStart", "productConeAttributes", "productConeAttList",
1991  "productConeAtt", "productConeContent", "productConeFactors",
1992  "productConeFactorsStart", "productConeFactorsAttributes",
1993  "productConeFactorsContent", "productConeFactorsEmpty",
1994  "productConeFactorsLaden", "productConeFactorList",
1995  "productConeFactorsEnd", "productConeEnd", "intersectionCone",
1996  "intersectionConeStart", "intersectionConeAttributes",
1997  "intersectionConeAttList", "intersectionConeAtt",
1998  "intersectionConeContent", "intersectionConeComponents",
1999  "intersectionConeComponentsStart",
2000  "intersectionConeComponentsAttributes",
2001  "intersectionConeComponentsContent", "intersectionConeComponentsEmpty",
2002  "intersectionConeComponentsLaden", "intersectionConeComponentList",
2003  "intersectionConeComponentsEnd", "intersectionConeEnd",
2004  "matrixProgramming", "matrixProgrammingStart",
2005  "matrixProgrammingContent", "matrixProgrammingEmpty",
2006  "matrixProgrammingLaden", "matrixVariables", "matrixVariablesStart",
2007  "matrixVariablesAttributes", "matrixVariablesContent",
2008  "matrixVariablesEmpty", "matrixVariablesLaden", "matrixVariablesEnd",
2009  "matrixVarList", "matrixVar", "matrixVarStart", "matrixVarAttributes",
2010  "matrixVarAttList", "matrixVarAtt", "matrixVarEnd", "matrixObjectives",
2011  "matrixObjectivesStart", "matrixObjectivesAttributes",
2012  "matrixObjectivesContent", "matrixObjectivesEmpty",
2013  "matrixObjectivesLaden", "matrixObjectivesEnd", "matrixObjList",
2014  "matrixObj", "matrixObjStart", "matrixObjAttributes", "matrixObjAttList",
2015  "matrixObjAtt", "matrixObjEnd", "matrixConstraints",
2016  "matrixConstraintsStart", "matrixConstraintsAttributes",
2017  "matrixConstraintsContent", "matrixConstraintsEmpty",
2018  "matrixConstraintsLaden", "matrixConstraintsEnd", "matrixConList",
2019  "matrixCon", "matrixConStart", "matrixConAttributes", "matrixConAttList",
2020  "matrixConAtt", "matrixConEnd", "timeDomain", "timeDomainStart",
2021  "timeDomainContent", "timeDomainEmpty", "timeDomainLaden", "stages",
2022  "stagesstart", "osilNumberofstagesATT", "stagelist", "stage", "$@1",
2023  "osilStagenameATT", "stageend", "stagecontent", "stagevariables",
2024  "anotherstagevarATT", "stagevaratt", "osilNumberofstagevariablesATT",
2025  "osilStagevarstartidxATT", "restofstagevariables", "emptyvarlist",
2026  "stagevarlist", "stagevar", "$@2", "osilStagevaridxATT", "stagevarend",
2027  "stageconstraints", "anotherstageconATT", "stageconatt",
2028  "osilNumberofstageconstraintsATT", "osilStageconstartidxATT",
2029  "restofstageconstraints", "emptyconlist", "stageconlist", "stagecon",
2030  "$@3", "osilStageconidxATT", "stageconend", "stageobjectives",
2031  "anotherstageobjATT", "stageobjatt", "osilNumberofstageobjectivesATT",
2032  "restofstageobjectives", "emptyobjlist", "stageobjlist", "stageobj",
2033  "$@4", "osilStageobjidxATT", "stageobjend", "interval", "$@5",
2034  "intervalend", "anotherIntervalATT", "intervalatt",
2035  "osilStageobjstartidxATT", "osilIntervalhorizonATT",
2036  "osilIntervalstartATT", "numberOfMatricesATT", "numberOfConesATT",
2037  "numberOfMatrixVarATT", "numberOfMatrixObjATT", "numberOfMatrixConATT",
2038  "normScaleFactorATT", "distortionMatrixIdxATT", "axisDirectionATT",
2039  "firstAxisDirectionATT", "secondAxisDirectionATT", "semidefinitenessATT",
2040  "matrixIdxATT", "lbMatrixIdxATT", "ubMatrixIdxATT",
2041  "constantMatrixIdxATT", "templateMatrixIdxATT",
2042  "varReferenceMatrixIdxATT", "objReferenceMatrixIdxATT",
2043  "conReferenceMatrixIdxATT", "lbConeIdxATT", "ubConeIdxATT",
2044  "orderConeIdxATT", "aNumber", "quote", "xmlWhiteSpace",
2045  "xmlWhiteSpaceChar", "osglIntArrayData", "osglIntVectorElArray",
2046  "osglIntVectorEl", "osglIntVectorElStart", "osglIntVectorElAttributes",
2047  "osglIntVectorElAttList", "osglIntVectorElAtt", "osglIntVectorElContent",
2048  "osglIntVectorBase64", "osglIntVectorBase64Content",
2049  "osglIntVectorBase64Empty", "osglIntVectorBase64Laden",
2050  "osglDblArrayData", "osglDblVectorElArray", "osglDblVectorEl",
2051  "osglDblVectorElStart", "osglDblVectorElAttributes",
2052  "osglDblVectorElContent", "osglDblVectorBase64",
2053  "osglDblVectorBase64Content", "osglDblVectorBase64Empty",
2054  "osglDblVectorBase64Laden", "osglMatrix", "matrixStart",
2055  "matrixAttributes", "matrixAttributeList", "matrixAttribute",
2056  "matrixContent", "matrixEmpty", "matrixLaden", "matrixBody",
2057  "baseMatrix", "baseMatrixStart", "baseMatrixAttributes",
2058  "baseMatrixAttList", "baseMatrixAtt", "baseMatrixEnd",
2059  "matrixConstructorList", "matrixConstructor", "constantElements",
2060  "constantElementsStart", "constantElementsAttributes",
2061  "constantElementsAttList", "constantElementsAtt",
2062  "constantElementsContent", "constantElementsNonzeros",
2063  "matrixElementsStartVector", "matrixElementsStartVectorStart",
2064  "matrixElementsStartVectorContent", "matrixElementsStartVectorEmpty",
2065  "matrixElementsStartVectorLaden", "matrixElementsStartVectorBody",
2066  "matrixElementsIndexVector", "matrixElementsIndexStart",
2067  "matrixElementsIndexContent", "matrixElementsIndexEmpty",
2068  "matrixElementsIndexLaden", "matrixElementsIndexBody",
2069  "constantElementsValues", "constantElementsValueStart",
2070  "constantElementsValueContent", "constantElementsValueEmpty",
2071  "constantElementsValueLaden", "constantElementsValueBody",
2072  "varReferenceElements", "varReferenceElementsStart",
2073  "varReferenceElementsAttributes", "varReferenceElementsAttList",
2074  "varReferenceElementsAtt", "varReferenceElementsContent",
2075  "varReferenceElementsNonzeros", "varReferenceElementsValues",
2076  "varReferenceElementsValuesStart", "varReferenceElementsValuesContent",
2077  "varReferenceElementsValuesEmpty", "varReferenceElementsValuesLaden",
2078  "varReferenceElementsValuesBody", "linearElements",
2079  "linearElementsStart", "linearElementsAttributes",
2080  "linearElementsAttList", "linearElementsAtt", "linearElementsContent",
2081  "linearElementsNonzeros", "linearElementsValues",
2082  "linearElementsValuesStart", "linearElementsValuesContent",
2083  "linearElementsValuesEmpty", "linearElementsValuesLaden",
2084  "linearElementsValuesBody", "linearElementsValuesElList",
2085  "linearElementsValuesEl", "linearElementsValuesElStart",
2086  "linearElementsValuesElAttributes", "linearElementsValuesElAttList",
2087  "linearElementsValuesElAtt", "linearElementsValuesElContent",
2088  "linearElementsValuesElEmpty", "linearElementsValuesElLaden",
2089  "linearElementsValuesVarIdxList", "linearElementsValuesVarIdx",
2090  "linearElementsValuesVarIdxStart", "LinearElementsValuesVarIdxCoefATT",
2091  "linearElementsValuesVarIdxContent", "generalElements",
2092  "generalElementsStart", "generalElementsAttributes",
2093  "generalElementsAttList", "generalElementsAtt", "generalElementsContent",
2094  "generalElementsNonzeros", "generalElementsValues",
2095  "generalElementsValuesStart", "generalElementsValuesContent",
2096  "generalElementsValuesEmpty", "generalElementsValuesLaden",
2097  "generalElementsElList", "generalElementsEl", "generalElementsElStart",
2098  "generalElementsElContent", "generalElementsElEmpty",
2099  "generalElementsElLaden", "objReferenceElements",
2100  "objReferenceElementsStart", "objReferenceElementsAttributes",
2101  "objReferenceElementsAttList", "objReferenceElementsAtt",
2102  "objReferenceElementsContent", "objReferenceElementsNonzeros",
2103  "objReferenceElementsValues", "objReferenceElementsValuesStart",
2104  "objReferenceElementsValuesContent", "objReferenceElementsValuesEmpty",
2105  "objReferenceElementsValuesLaden", "objReferenceElementsValuesBody",
2106  "conReferenceElements", "conReferenceElementsStart",
2107  "conReferenceElementsAttributes", "conReferenceElementsAttList",
2108  "conReferenceElementsAtt", "conReferenceElementsContent",
2109  "conReferenceElementsNonzeros", "conReferenceElementsValues",
2110  "conReferenceElementsValuesStart", "conReferenceElementsValuesContent",
2111  "conReferenceElementsValuesEmpty", "conReferenceElementsValuesLaden",
2112  "conReferenceElementsElList", "conReferenceElementsEl",
2113  "conReferenceElementsElStart", "conReferenceElementsElAttributeList",
2114  "conReferenceElementsElAttribute", "conReferenceElementsElContent",
2115  "matrixTransformation", "matrixTransformationStart",
2116  "matrixTransformationShapeATT", "matrixTransformationEnd",
2117  "matrixBlocks", "matrixBlocksStart", "matrixBlocksAttributes",
2118  "matrixBlocksContent", "matrixBlocksEnd", "colOffsets", "colOffsetStart",
2119  "colOffsetNumberOfElAttribute", "colOffsetContent", "colOffsetEmpty",
2120  "colOffsetLaden", "colOffsetBody", "rowOffsets", "rowOffsetStart",
2121  "rowOffsetNumberOfElAttribute", "rowOffsetContent", "rowOffsetEmpty",
2122  "rowOffsetLaden", "rowOffsetBody", "blockList", "matrixBlock",
2123  "matrixBlockStart", "matrixBlockAttributes", "matrixBlockAttList",
2124  "matrixBlockAtt", "matrixBlockContent", "blockEmpty", "blockLaden",
2125  "blockBody", "osglNumberOfBlocksATT", "osglNumberOfColumnsATT",
2126  "osglNumberOfElATT", "osglNumberOfRowsATT", "osglNumberOfValuesATT",
2127  "osglNumberOfVarIdxATT", "osglBase64SizeATT", "osglBaseMatrixIdxATT",
2128  "osglBaseMatrixStartRowATT", "osglBaseMatrixStartColATT",
2129  "osglBaseMatrixEndRowATT", "osglBaseMatrixEndColATT",
2130  "osglBlockRowIdxATT", "osglBlockColIdxATT", "osglCoefATT",
2131  "osglConstantATT", "osglIdxATT", "osglIncrATT", "osglMultATT",
2132  "osglScalarMultiplierATT", "osglTargetMatrixFirstRowATT",
2133  "osglTargetMatrixFirstColATT", "osglBaseTransposeATT",
2134  "baseTransposeAttEmpty", "baseTransposeAttContent", "osglNameATT",
2135  "nameAttEmpty", "nameAttContent", "osglRowMajorATT", "rowMajorAttEmpty",
2136  "rowMajorAttContent", "osglShapeATT", "shapeAttEmpty", "shape",
2137  "osglSymmetryATT", "symmetryAttEmpty", "symmetryAttContent",
2138  "osglTypeATT", "typeAttEmpty", "typeAttContent", "osglValueATT",
2139  "valueAttEmpty", "valueAttContent", "osglValueTypeATT",
2140  "valueTypeAttEmpty", "valueTypeAttContent", "osglVarTypeATT",
2141  "varTypeAttEmpty", "varTypeAttContent", "nonlinearExpressions",
2142  "nonlinearExpressionsStart", "nlnumberatt", "nlnodes",
2143  "scalarExpressionTree", "nlstart", "nlAttributes", "nlAttributeList",
2144  "nlAttribute", "nlnode", "E", "$@6", "eend", "PI", "$@7", "piend",
2145  "times", "$@8", "plus", "$@9", "minus", "$@10", "negate", "$@11",
2146  "divide", "$@12", "power", "$@13", "ln", "$@14", "sqrt", "$@15",
2147  "square", "$@16", "cos", "$@17", "sin", "$@18", "exp", "$@19", "abs",
2148  "absStart", "absEnd", "erf", "$@20", "if", "$@21", "matrixDeterminant",
2149  "$@22", "matrixTrace", "$@23", "matrixToScalar", "$@24", "number",
2150  "numberStart", "numberEnd", "numberAttributeList", "numberAttribute",
2151  "numberidATT", "$@25", "variable", "$@26", "variableend", "$@27",
2152  "anotherVariableATT", "variableATT", "variablecoefATT", "variableidxATT",
2153  "sum", "$@28", "anothersumnlnode", "allDiff", "$@29",
2154  "anotherallDiffnlnode", "max", "$@30", "anothermaxnlnode", "min", "$@31",
2155  "anotherminnlnode", "product", "$@32", "anotherproductnlnode",
2156  "OSnLMNode", "matrixReference", "matrixReferenceStart",
2157  "matrixReferenceEnd", "matrixVarReference", "matrixVarReferenceStart",
2158  "matrixVarReferenceEnd", "matrixVarIdxATT", "matrixObjReference",
2159  "matrixObjReferenceStart", "matrixObjReferenceEnd", "matrixObjIdxATT",
2160  "matrixConReference", "matrixConReferenceStart", "matrixConReferenceEnd",
2161  "matrixConIdxATT", "matrixDiagonal", "matrixDiagonalStart",
2162  "matrixDiagonalContent", "matrixDotTimes", "matrixDotTimesStart",
2163  "matrixDotTimesContent", "identityMatrix", "identityMatrixStart",
2164  "identityMatrixContent", "matrixInverse", "matrixInverseStart",
2165  "matrixInverseContent", "matrixLowerTriangle",
2166  "matrixLowerTriangleStart", "matrixLowerTriangleAttribute",
2167  "matrixLowerTriangleContent", "matrixUpperTriangle",
2168  "matrixUpperTriangleStart", "matrixUpperTriangleAttribute",
2169  "matrixUpperTriangleContent", "includeDiagonalATT", "matrixMerge",
2170  "matrixMergeStart", "matrixMergeEnd", "matrixMinus", "matrixMinusStart",
2171  "matrixMinusContent", "matrixNegate", "matrixNegateStart",
2172  "matrixNegateContent", "matrixPlus", "matrixPlusStart",
2173  "matrixPlusContent", "matrixTimes", "matrixTimesStart",
2174  "matrixTimesContent", "matrixProduct", "$@33",
2175  "anothermatrixproductnode", "matrixScalarTimes",
2176  "matrixScalarTimesStart", "matrixScalarTimesContent",
2177  "matrixSubMatrixAt", "matrixSubMatrixAtStart",
2178  "matrixSubMatrixAtContent", "matrixTranspose", "matrixTransposeStart",
2179  "matrixTransposeContent", "matrixExpressions", "matrixExpressionsStart",
2180  "matrixExpressionsAtt", "numberOfExprATT", "matrixExpressionsContent",
2181  "matrixExpressionsEmpty", "matrixExpressionsLaden", "matrixExprList",
2182  "matrixExpr", "matrixExprStart", "matrixExprAttributes",
2183  "matrixExprAttributeList", "exprAttribute", YY_NULLPTR
2184 };
2185 
2186 static const char *
2188 {
2189  return yytname[yysymbol];
2190 }
2191 #endif
2192 
2193 #define YYPACT_NINF (-1315)
2194 
2195 #define yypact_value_is_default(Yyn) \
2196  ((Yyn) == YYPACT_NINF)
2197 
2198 #define YYTABLE_NINF (-1)
2199 
2200 #define yytable_value_is_error(Yyn) \
2201  0
2202 
2203 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2204  STATE-NUM. */
2205 static const yytype_int16 yypact[] =
2206 {
2207  14, -1315, 97, -189, 104, -1315, -1315, -78, -166, 119,
2208  -1315, -1315, 96, -24, 138, -1315, 143, 60, -1315, -89,
2209  142, 155, 126, -1315, 161, -177, 162, -1315, -1315, -1315,
2210  -1315, -1315, 99, 195, 172, 202, -1315, 177, -1315, -1315,
2211  -1315, -1315, -1315, 199, -1315, -1315, -1315, -1315, 167, 41,
2212  -1315, 182, 221, -1315, -58, -1315, -1315, -1315, 197, -1315,
2213  -1315, -1315, -1315, -1315, 212, 48, 224, 230, -50, -1315,
2214  -1315, 213, 258, 262, 268, 270, -1315, -1315, -1315, -1315,
2215  -1315, -1315, -1315, -1315, 223, -1315, 220, -1315, -1315, -1315,
2216  -1315, 33, 101, 282, 301, -1315, -1315, -1315, -1315, -1315,
2217  -1315, 590, -1315, 330, 338, -1315, -1315, -1315, -1315, -1315,
2218  -1315, 344, 348, 373, -1315, -1315, -1315, -1315, -1315, -1315,
2219  290, 353, 300, 305, -1315, 132, 209, 414, 293, -1315,
2220  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2221  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2222  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2223  316, -26, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2224  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2225  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, 94,
2226  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2227  -1315, -1315, -1315, -1315, -1315, 590, -1315, -1315, -1315, -1315,
2228  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, 419,
2229  452, 453, 467, 490, 495, 37, -1315, 497, -1315, -1315,
2230  -1315, -1315, 139, 328, 501, 319, -1315, 507, -1315, -1315,
2231  -1315, -1315, -1315, 321, -16, 329, -16, 331, -16, 334,
2232  50, 361, 259, 363, 254, 365, 22, 500, -16, 504,
2233  -16, -1315, 311, -1315, -1315, -1315, -1315, 535, -1315, 537,
2234  -1315, 539, 536, 538, -1315, -1315, -1315, -1315, -1315, -1315,
2235  -1315, -1315, -1315, -1315, -1315, -1315, 590, 590, 590, 590,
2236  590, 590, -1315, -1315, 590, 590, 590, 590, 590, 590,
2237  -1315, 590, -1315, -1315, -1315, 371, 382, 590, 135, 135,
2238  135, -1315, 204, 35, -1315, 544, -1315, -1315, -1315, -1315,
2239  -1315, -1315, -1315, -1315, -1315, -1315, -1315, 548, 477, -1315,
2240  492, 90, -1315, 320, 249, 552, 384, -1315, 558, -1315,
2241  -1315, -1315, -1315, -1315, 562, 152, -1315, 517, -1315, -1315,
2242  -1315, -1315, -1315, -1315, 523, -1315, -1315, -1315, -1315, -1315,
2243  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, 524, -1315,
2244  570, -1315, -1315, -1315, -1315, -1315, -1315, 525, -1315, 572,
2245  573, 575, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2246  526, -1315, 576, 578, -1315, -1315, -1315, -1315, -1315, -1315,
2247  -1315, -1315, -1315, 527, -1315, 584, -1315, -1315, -1315, -1315,
2248  -1315, 518, -1315, -1315, -1315, -1315, -1315, 515, -1315, -1315,
2249  -1315, -1315, -1315, -1315, 387, -1315, -1315, 585, 587, 588,
2250  592, 593, 590, 590, 590, 590, 277, 274, 299, 206,
2251  271, 272, 590, 264, 269, 265, 43, 256, 318, 411,
2252  450, -1315, 252, -1315, -1315, 253, -1315, 590, -1315, -1315,
2253  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2254  -1315, -1315, -1315, -1315, -1315, -1315, -1315, 246, -1315, 19,
2255  -1315, 418, -1315, 420, -1315, 422, -1315, 135, -1315, 135,
2256  -1315, 590, -1315, 135, -1315, 217, -1315, 217, -1315, 388,
2257  -1315, 135, -1315, 135, -1315, 135, -1315, 135, -1315, -1315,
2258  590, -1315, 590, -1315, 135, 257, 261, -1315, -1315, -1315,
2259  263, -1315, 628, 667, -1315, -1315, -1315, -1315, -1315, -1315,
2260  -1315, -1315, -159, -159, 664, -1315, -1315, 542, -1315, 595,
2261  668, 672, -1315, -1315, -1315, -1315, -1315, 674, 392, -1315,
2262  678, -1315, -1315, -1315, -1315, -1315, 679, 156, -1315, -1315,
2263  -1315, -1315, -1315, -1315, -1315, -1315, 633, 618, -1315, 683,
2264  -1315, -1315, 684, 685, -1315, 686, 687, -1315, 688, -1315,
2265  631, 577, -1315, 630, 577, -1315, 89, 397, 136, -1315,
2266  -1315, -1315, 689, 690, 385, 386, 380, 381, -1315, -1315,
2267  -1315, -1315, -1315, -1315, -1315, -1315, 590, -1315, -1315, -1315,
2268  -1315, 505, 694, 697, -1315, -1315, -1315, -1315, -1315, -1315,
2269  -1315, -1315, -1315, -1315, -1315, -1315, -1315, 350, -1315, -1315,
2270  700, 703, 399, 704, 401, 705, 403, 706, 405, 345,
2271  -1315, 135, -1315, 322, -1315, 317, -1315, 713, 707, -1315,
2272  708, -1315, -1315, 343, -1315, 135, -1315, 340, -1315, 135,
2273  -1315, 135, -1315, 135, -1315, 590, -1315, 333, -1315, -1315,
2274  -1315, -1315, 717, -1315, 718, 730, 408, -1315, -1315, -1315,
2275  729, -1315, -1315, -1315, -1315, -1315, 731, 171, -1315, -1315,
2276  -1315, -1315, -1315, -1315, 423, 42, -1315, -1315, -1315, -1315,
2277  -1315, 733, 735, 737, 739, 741, 743, -1315, -1315, -1315,
2278  745, 425, -1315, -1315, -1315, 427, -1315, -1315, -1315, -1315,
2279  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2280  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, 303,
2281  -1315, 594, -1315, 532, -1315, -1315, 752, 749, 753, 772,
2282  774, 776, 778, 780, 782, -1315, -1315, -1315, -1315, -1315,
2283  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2284  -1315, -1315, -1315, 456, -1315, -1315, 788, -1315, -1315, -114,
2285  790, 792, -1315, 404, -1315, 796, -1315, 560, -1315, 802,
2286  -1315, 564, -1315, 804, -1315, 565, -1315, -1315, 449, -1315,
2287  -1315, 808, 135, 135, -1315, 432, -1315, 439, 441, 435,
2288  590, -1315, -1315, 821, -1315, 823, -1315, 568, -1315, 827,
2289  829, 831, -178, -1315, -1315, -1315, -1315, -1315, -1315, 438,
2290  87, -1315, 597, -1315, 833, 837, 839, 843, 845, 847,
2291  -1315, 854, 851, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2292  -1315, -1315, -1315, -1315, -1315, -1315, -1315, 440, -54, -1315,
2293  -1315, -1315, -1315, -1315, -1315, 855, -1315, 747, -1315, -1315,
2294  -1315, -1315, 747, -1315, -1315, -1315, 852, -40, 860, -40,
2295  862, -40, 863, -40, 864, -40, 865, -40, 866, -1315,
2296  857, 867, -1315, -1315, -1315, 873, 874, 875, 876, 877,
2297  878, 879, -1315, -1315, 543, 880, 881, -1315, -1315, 882,
2298  883, -1315, 884, -1315, 885, -1315, 886, -1315, -1315, -1315,
2299  512, -1315, 519, -1315, -1315, -1315, -1315, -1315, 590, -1315,
2300  -1315, -1315, 815, 640, -1315, -1315, -1315, -1315, -1315, -1315,
2301  -1315, 442, 170, -1315, 648, -1315, 891, 892, 893, -1315,
2302  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, 896,
2303  898, 900, 902, 904, 906, 908, 912, -1315, 849, -1315,
2304  -1315, -1315, -1315, 914, 716, 853, -1315, 816, -1315, 859,
2305  -1315, 699, -1315, 929, 928, -1315, -1315, -1315, -1315, -1315,
2306  699, -1315, -1315, -1315, 699, -1315, -1315, -1315, 699, -1315,
2307  -1315, -1315, 699, -1315, -1315, -1315, 699, -1315, -1315, -1315,
2308  135, 932, 748, -1315, -1315, 23, 934, 936, 938, 940,
2309  942, 944, 946, 948, -1315, -1315, -1315, -1315, -1315, -1315,
2310  -1315, -1315, -1315, -1315, 135, 39, -1315, -1315, 701, 947,
2311  -50, -1315, 709, -1315, 952, -1315, -1315, -1315, -1315, -1315,
2312  -1315, -1315, -1315, -1315, -1315, -1315, 955, 958, 959, 960,
2313  961, 962, 963, 964, 965, -1315, 966, -1315, -1315, 967,
2314  444, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2315  734, 446, 968, 971, 734, -1315, 734, -1315, 734, -1315,
2316  734, -1315, 734, -1315, 726, 970, -1315, 727, 577, -1315,
2317  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, 589, -1315,
2318  714, 974, 975, -1315, -1315, -1315, -1315, -1315, 51, -1315,
2319  -1315, 135, -1315, -1315, -1315, -1315, 973, 976, 977, 978,
2320  -1315, -1315, -1315, -1315, -1315, -1315, -1315, 981, -1315, 44,
2321  -1315, -1315, -1315, 979, 267, -1315, 770, 754, 455, -1315,
2322  747, -1315, -1315, -1315, -1315, 983, 757, 773, 759, 775,
2323  760, 777, 761, 771, 763, 779, -1315, -1315, -1315, -1315,
2324  -1315, 577, 457, -1315, -1315, -1315, 736, -1315, 740, 994,
2325  998, -1315, 750, 999, 1001, -1315, -1315, -1315, -1315, -1315,
2326  53, 695, 1002, -1315, -1315, -1315, 1003, 894, -1315, 1006,
2327  -1315, 1005, -1315, -1315, -1315, -1315, -1315, -1315, 459, -1315,
2328  747, -1315, -1315, -1315, -1315, 784, -1315, -1315, -1315, 461,
2329  -1315, -1315, -1315, 463, -1315, -1315, -1315, 468, -1315, -1315,
2330  -1315, 470, -1315, -1315, -1315, 472, -1315, 276, 476, -1315,
2331  -1315, 747, -1315, -1315, -1315, -1315, -1315, 819, 1009, 1010,
2332  -1315, 762, -1315, 764, 1015, 1016, -1315, 765, 1017, 1018,
2333  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, 910,
2334  1022, -1315, 909, -1315, -1315, -1315, -1315, 797, -1315, -1315,
2335  747, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2336  -1315, -1315, -1315, -1315, -1315, 747, -1315, -1315, -1315, -1315,
2337  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2338  747, -1315, -1315, -1315, -1315, 812, 1024, 478, -1315, -1315,
2339  -1315, -1315, 835, 1025, 1026, -1315, 781, -1315, 783, 1029,
2340  1030, -1315, 1031, 716, -1315, 925, -1315, 805, -1315, -1315,
2341  809, 810, 935, -75, -1315, 813, -57, 480, -35, -1315,
2342  826, -1315, 1038, -1315, 786, -1315, 1040, 482, -1315, -1315,
2343  -1315, -1315, 856, 1044, 1045, -1315, 484, -1315, -1315, 858,
2344  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, 486,
2345  -1315, -1315, -1315, -1315, -1315, -1315, 311, -1315, -1315, -1315,
2346  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, 1046, -1315,
2347  1050, -1315, 801, -1315, 1051, 491, -1315, -1315, -1315, 66,
2348  -1315, -1315, -1315, 1047, -1315, 566, -105, -1315, 590, -1315,
2349  -1315, -1315, 28, -1315, 850, 1055, 1056, -1315, 1057, -1315,
2350  1058, -1315, 803, -1315, 945, -1315, -1315, -1315, -1315, -1315,
2351  -1315, -1315, -1315, 1059, 1060, -1315, -1315, -1315, 956, 1064,
2352  -1315, 1070, -1315, -1315, -1315, -1315, -1315, -1315, -1315, 89,
2353  -1315, -1315, -1315, -1315, 1066, -1315, -1315, 969, -38, 1069,
2354  -1315, -1315, 972, 1068, -1315, -1315, -1315, -1315, -1315, -1315,
2355  -1315, 887, 1071, 1072, -1315, -1315, 1073, 1067, -1315, -1315,
2356  -1315, -1315, 1077, -1315, 1076, 861, -1315, -1315
2357 };
2358 
2359 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
2360  Performed when YYTABLE does not specify something else to do. Zero
2361  means the default is an error. */
2362 static const yytype_int16 yydefact[] =
2363 {
2364  8, 10, 0, 729, 0, 1, 731, 28, 0, 0,
2365  12, 30, 38, 0, 0, 733, 0, 0, 40, 188,
2366  0, 0, 0, 31, 0, 0, 0, 9, 15, 13,
2367  18, 190, 277, 0, 0, 0, 41, 0, 34, 36,
2368  29, 32, 33, 0, 730, 736, 734, 738, 0, 0,
2369  279, 0, 0, 193, 195, 189, 191, 192, 0, 44,
2370  46, 39, 42, 43, 0, 0, 0, 0, 737, 11,
2371  16, 0, 0, 0, 0, 0, 14, 19, 20, 21,
2372  22, 23, 4, 3, 7, 282, 354, 278, 280, 281,
2373  197, 224, 0, 0, 0, 365, 35, 430, 37, 432,
2374  732, 0, 707, 0, 0, 740, 741, 705, 706, 739,
2375  17, 0, 0, 0, 390, 6, 2, 5, 283, 287,
2376  0, 0, 0, 0, 226, 250, 0, 0, 0, 198,
2377  366, 45, 58, 68, 78, 101, 113, 126, 140, 151,
2378  170, 47, 48, 60, 49, 70, 50, 80, 51, 103,
2379  52, 115, 53, 128, 54, 142, 55, 153, 56, 172,
2380  0, 431, 787, 779, 781, 785, 789, 791, 837, 853,
2381  799, 783, 806, 793, 795, 797, 825, 802, 804, 845,
2382  841, 849, 769, 773, 777, 815, 808, 810, 812, 0,
2383  763, 764, 744, 745, 747, 748, 749, 750, 752, 753,
2384  754, 756, 755, 757, 759, 0, 760, 758, 766, 767,
2385  768, 742, 818, 743, 746, 765, 761, 762, 751, 0,
2386  0, 0, 0, 0, 0, 0, 284, 0, 291, 285,
2387  358, 252, 948, 0, 0, 0, 227, 0, 201, 204,
2388  196, 199, 200, 0, 59, 0, 69, 0, 79, 0,
2389  102, 0, 114, 0, 127, 0, 141, 0, 152, 0,
2390  171, 444, 447, 429, 442, 443, 699, 0, 715, 0,
2391  711, 0, 0, 0, 433, 436, 435, 437, 697, 698,
2392  434, 709, 710, 438, 713, 714, 0, 0, 0, 0,
2393  0, 0, 839, 855, 0, 0, 0, 0, 0, 0,
2394  831, 0, 847, 843, 851, 0, 0, 0, 0, 0,
2395  0, 735, 0, 0, 708, 0, 24, 25, 27, 26,
2396  390, 390, 392, 393, 394, 395, 391, 0, 291, 289,
2397  0, 0, 950, 0, 0, 0, 0, 253, 0, 230,
2398  233, 225, 228, 229, 0, 0, 65, 0, 57, 61,
2399  63, 62, 64, 75, 0, 67, 71, 73, 72, 74,
2400  85, 88, 77, 81, 83, 82, 84, 110, 0, 100,
2401  0, 104, 107, 106, 105, 108, 123, 0, 112, 0,
2402  0, 0, 116, 121, 120, 122, 118, 117, 119, 137,
2403  0, 125, 0, 0, 129, 134, 133, 135, 136, 131,
2404  130, 132, 148, 0, 139, 0, 143, 147, 145, 144,
2405  146, 0, 150, 154, 156, 155, 157, 0, 169, 173,
2406  175, 174, 176, 449, 0, 464, 451, 0, 0, 0,
2407  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2408  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2409  0, 771, 0, 770, 775, 0, 774, 0, 882, 887,
2410  892, 897, 900, 909, 914, 920, 924, 927, 930, 933,
2411  935, 940, 943, 946, 877, 903, 906, 0, 857, 0,
2412  858, 0, 859, 0, 860, 0, 861, 0, 862, 0,
2413  875, 0, 863, 0, 864, 910, 865, 915, 866, 0,
2414  867, 0, 868, 0, 869, 0, 870, 0, 871, 872,
2415  0, 873, 0, 874, 0, 0, 0, 803, 801, 816,
2416  0, 719, 0, 0, 820, 821, 717, 718, 814, 819,
2417  822, 687, 387, 388, 0, 286, 290, 293, 356, 0,
2418  0, 0, 355, 359, 360, 361, 194, 0, 0, 951,
2419  0, 256, 259, 251, 254, 255, 0, 0, 367, 203,
2420  207, 202, 205, 209, 66, 76, 0, 87, 111, 0,
2421  124, 390, 0, 0, 138, 0, 0, 149, 0, 160,
2422  0, 0, 179, 0, 0, 445, 446, 0, 450, 700,
2423  716, 712, 0, 0, 0, 0, 0, 0, 790, 792,
2424  838, 840, 854, 856, 800, 784, 0, 794, 796, 798,
2425  827, 0, 0, 0, 826, 832, 833, 834, 805, 846,
2426  848, 842, 844, 850, 852, 772, 776, 0, 937, 809,
2427  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2428  896, 0, 899, 0, 902, 0, 905, 0, 0, 911,
2429  0, 916, 921, 0, 919, 0, 923, 0, 926, 0,
2430  929, 0, 932, 0, 939, 0, 942, 0, 945, 811,
2431  813, 817, 0, 823, 0, 0, 0, 357, 390, 390,
2432  0, 955, 957, 949, 953, 954, 0, 0, 368, 232,
2433  236, 231, 234, 238, 0, 208, 99, 86, 91, 89,
2434  93, 0, 0, 0, 0, 0, 0, 375, 168, 158,
2435  0, 0, 161, 187, 177, 0, 180, 635, 475, 506,
2436  523, 561, 603, 586, 630, 465, 466, 477, 467, 508,
2437  468, 525, 469, 563, 470, 588, 471, 605, 472, 631,
2438  473, 0, 463, 0, 448, 695, 0, 0, 0, 0,
2439  0, 0, 0, 0, 0, 452, 453, 456, 457, 458,
2440  459, 461, 454, 455, 460, 693, 694, 672, 674, 788,
2441  780, 782, 786, 0, 828, 829, 0, 390, 778, 0,
2442  0, 0, 878, 0, 876, 0, 883, 0, 881, 0,
2443  888, 0, 886, 0, 893, 0, 891, 898, 0, 904,
2444  907, 0, 0, 0, 922, 0, 928, 0, 0, 0,
2445  0, 947, 720, 0, 288, 0, 295, 298, 292, 0,
2446  0, 0, 0, 369, 258, 262, 257, 260, 264, 0,
2447  237, 222, 0, 206, 0, 0, 0, 0, 0, 0,
2448  727, 0, 0, 210, 215, 217, 213, 214, 216, 218,
2449  212, 211, 221, 219, 220, 725, 726, 0, 92, 109,
2450  370, 371, 372, 373, 374, 0, 164, 398, 159, 162,
2451  163, 183, 398, 178, 181, 182, 0, 476, 0, 507,
2452  0, 524, 0, 562, 0, 587, 0, 604, 0, 632,
2453  0, 0, 636, 462, 390, 0, 0, 0, 0, 0,
2454  0, 0, 390, 807, 0, 0, 0, 936, 938, 0,
2455  0, 879, 0, 884, 0, 889, 0, 894, 901, 918,
2456  0, 908, 0, 913, 925, 931, 934, 941, 0, 824,
2457  294, 300, 0, 317, 363, 364, 952, 956, 960, 958,
2458  962, 0, 263, 248, 0, 235, 0, 0, 0, 239,
2459  245, 242, 243, 244, 241, 240, 247, 246, 223, 0,
2460  0, 0, 0, 0, 0, 0, 0, 97, 0, 90,
2461  94, 96, 95, 0, 0, 0, 166, 396, 397, 0,
2462  185, 0, 703, 0, 0, 478, 479, 480, 701, 702,
2463  0, 509, 510, 511, 0, 526, 527, 528, 0, 564,
2464  565, 566, 0, 589, 590, 591, 0, 606, 607, 608,
2465  0, 0, 0, 634, 696, 0, 0, 0, 0, 0,
2466  0, 0, 0, 0, 830, 836, 835, 376, 880, 885,
2467  890, 895, 912, 917, 0, 0, 296, 319, 336, 0,
2468  961, 275, 0, 261, 0, 265, 270, 272, 268, 269,
2469  271, 273, 267, 266, 274, 249, 0, 0, 0, 0,
2470  0, 0, 0, 0, 0, 728, 0, 98, 673, 0,
2471  0, 167, 165, 401, 399, 403, 186, 184, 485, 474,
2472  482, 0, 0, 0, 513, 505, 530, 522, 568, 560,
2473  593, 585, 610, 602, 0, 0, 640, 0, 0, 389,
2474  678, 691, 692, 679, 680, 681, 682, 690, 0, 308,
2475  312, 0, 0, 301, 302, 303, 299, 306, 0, 338,
2476  297, 0, 964, 965, 963, 276, 0, 0, 0, 0,
2477  377, 384, 378, 385, 380, 381, 689, 0, 412, 0,
2478  408, 409, 410, 0, 402, 492, 0, 0, 0, 488,
2479  398, 484, 486, 487, 704, 0, 0, 0, 532, 0,
2480  570, 0, 0, 0, 612, 0, 633, 629, 671, 648,
2481  655, 0, 0, 641, 944, 309, 312, 310, 0, 0,
2482  0, 327, 331, 0, 0, 320, 321, 322, 318, 325,
2483  0, 0, 0, 382, 386, 379, 0, 0, 411, 0,
2484  400, 0, 404, 406, 405, 481, 499, 483, 0, 495,
2485  398, 491, 493, 494, 490, 0, 675, 516, 514, 0,
2486  512, 534, 531, 0, 529, 572, 569, 0, 567, 596,
2487  594, 0, 592, 614, 611, 0, 609, 0, 0, 649,
2488  644, 398, 639, 642, 643, 307, 311, 0, 0, 0,
2489  328, 331, 329, 0, 0, 0, 345, 349, 0, 0,
2490  339, 340, 337, 343, 341, 959, 383, 677, 413, 0,
2491  0, 502, 416, 498, 500, 501, 497, 0, 489, 519,
2492  398, 515, 517, 518, 537, 540, 533, 535, 536, 575,
2493  577, 571, 573, 574, 599, 398, 595, 597, 598, 617,
2494  619, 613, 615, 616, 638, 658, 637, 656, 660, 652,
2495  398, 647, 650, 651, 646, 0, 0, 0, 305, 304,
2496  326, 330, 0, 0, 0, 346, 349, 347, 0, 0,
2497  0, 407, 0, 0, 504, 414, 415, 0, 496, 521,
2498  0, 0, 539, 0, 601, 0, 0, 0, 659, 654,
2499  0, 645, 0, 315, 0, 313, 0, 0, 324, 323,
2500  344, 348, 0, 0, 0, 688, 0, 419, 417, 420,
2501  503, 520, 538, 543, 541, 545, 580, 576, 578, 0,
2502  600, 622, 618, 620, 623, 668, 447, 657, 666, 667,
2503  390, 390, 661, 662, 663, 664, 665, 653, 0, 316,
2504  0, 334, 0, 332, 0, 0, 362, 342, 427, 0,
2505  423, 424, 425, 0, 421, 0, 544, 583, 0, 579,
2506  581, 582, 0, 464, 0, 0, 0, 314, 0, 335,
2507  0, 352, 0, 350, 0, 426, 390, 418, 551, 553,
2508  542, 549, 550, 0, 0, 546, 547, 548, 0, 0,
2509  723, 0, 624, 621, 627, 626, 625, 721, 722, 670,
2510  669, 390, 390, 333, 0, 353, 428, 0, 0, 0,
2511  390, 584, 0, 0, 683, 684, 351, 422, 552, 556,
2512  554, 557, 0, 0, 628, 724, 0, 0, 558, 676,
2513  686, 390, 0, 555, 0, 0, 685, 559
2514 };
2515 
2516 /* YYPGOTO[NTERM-NUM]. */
2517 static const yytype_int16 yypgoto[] =
2518 {
2519  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2520  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2521  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2522  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2523  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2524  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2525  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2526  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2527  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2528  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2529  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2530  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2531  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2532  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2533  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2534  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2535  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2536  -1315, 766, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2537  -1315, -1315, -1315, -1315, -99, -1315, -1315, -1315, -1315, -1315,
2538  -1315, -1315, -1315, -1315, -1315, -1315, -164, -1315, -1315, -1315,
2539  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -238, -1315, -1315,
2540  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2541  -1315, -1315, -1315, -1315, 836, 838, -1315, -1315, -1315, -1315,
2542  -1315, 147, 149, -1315, -783, -1315, -1315, -1315, 151, 153,
2543  -1315, -567, -1314, -319, -1315, -863, -1315, -1315, -1315, -1315,
2544  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2545  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2546  -1315, -1315, -1315, -1315, -1315, -1315, -290, -1315, -1315, -1315,
2547  -1315, -1315, -326, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2548  -1315, -734, -1315, -1315, -1315, -1315, -1315, -926, -1315, -1315,
2549  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2550  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2551  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2552  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2553  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2554  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2555  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2556  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2557  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2558  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2559  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2560  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2561  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2562  -1315, -1315, -236, -579, -233, -570, -1315, -235, -1315, -1315,
2563  -1315, -1315, -1315, -1315, -1315, -1315, -1315, 61, -322, -801,
2564  -1315, -1315, -1315, -1315, -1315, -1315, -218, -1315, -1315, -517,
2565  -1315, -1315, -706, -1315, -1315, -246, -1315, -1315, -310, -1315,
2566  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2567  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -205,
2568  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2569  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2570  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2571  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2572  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2573  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2574  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2575  -1315, -1315, -1315, -303, -1315, -1315, -1315, -1315, -1315, -1315,
2576  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2577  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2578  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, 606,
2579  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2580  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2581  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2582  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315
2583 };
2584 
2585 /* YYDEFGOTO[NTERM-NUM]. */
2586 static const yytype_int16 yydefgoto[] =
2587 {
2588  0, 2, 84, 116, 117, 3, 4, 10, 17, 29,
2589  30, 76, 49, 77, 78, 79, 80, 81, 12, 13,
2590  22, 40, 41, 42, 65, 19, 20, 35, 61, 62,
2591  63, 94, 141, 142, 143, 243, 244, 349, 348, 144,
2592  145, 245, 246, 356, 355, 146, 147, 247, 248, 363,
2593  362, 566, 567, 699, 700, 857, 858, 970, 969, 697,
2594  148, 149, 249, 250, 371, 372, 369, 150, 151, 251,
2595  252, 382, 378, 152, 153, 253, 254, 394, 391, 154,
2596  155, 255, 256, 406, 404, 156, 157, 257, 258, 413,
2597  412, 580, 581, 711, 868, 869, 870, 975, 1072, 709,
2598  158, 159, 259, 260, 419, 418, 583, 584, 715, 873,
2599  874, 875, 979, 1077, 714, 32, 33, 55, 56, 57,
2600  91, 92, 128, 240, 241, 242, 561, 345, 562, 563,
2601  694, 695, 843, 833, 125, 126, 235, 341, 342, 343,
2602  691, 557, 692, 693, 829, 830, 949, 945, 232, 233,
2603  336, 553, 554, 555, 826, 687, 827, 828, 941, 942,
2604  1045, 1043, 51, 52, 87, 88, 89, 120, 121, 228,
2605  328, 329, 330, 676, 818, 932, 933, 1035, 1113, 1114,
2606  1115, 1116, 1117, 1176, 1177, 1178, 1317, 1355, 1038, 1118,
2607  1185, 1186, 1187, 1188, 1189, 1251, 1252, 1253, 1357, 1403,
2608  1120, 1190, 1260, 1261, 1262, 1263, 1326, 1327, 1328, 1405,
2609  1433, 122, 123, 542, 331, 543, 1264, 544, 545, 23,
2610  36, 129, 236, 337, 383, 384, 385, 397, 398, 407,
2611  632, 844, 845, 950, 846, 847, 952, 1049, 848, 849,
2612  953, 224, 1014, 225, 326, 976, 977, 1074, 1075, 1143,
2613  1144, 1202, 1200, 978, 1140, 1141, 1142, 1334, 1335, 1368,
2614  1369, 1413, 1437, 1336, 1410, 1411, 1412, 98, 99, 160,
2615  161, 274, 263, 264, 265, 424, 425, 426, 587, 588,
2616  755, 744, 586, 725, 726, 727, 876, 877, 985, 1079,
2617  1146, 1080, 1081, 1151, 1152, 1153, 1215, 1147, 1148, 1211,
2618  1212, 1213, 1277, 1207, 1208, 1273, 1274, 1275, 1337, 728,
2619  729, 878, 879, 991, 1085, 1157, 1218, 1219, 1281, 1282,
2620  1283, 1340, 730, 731, 880, 881, 995, 1087, 1159, 1222,
2621  1223, 1286, 1287, 1288, 1341, 1342, 1374, 1375, 1415, 1416,
2622  1445, 1440, 1441, 1442, 1468, 1480, 1481, 1487, 1493, 732,
2623  733, 882, 883, 999, 1089, 1161, 1226, 1227, 1291, 1292,
2624  1293, 1343, 1378, 1379, 1419, 1420, 1421, 734, 735, 884,
2625  885, 1003, 1091, 1163, 1230, 1231, 1296, 1297, 1298, 1345,
2626  736, 737, 886, 887, 1007, 1093, 1165, 1234, 1235, 1301,
2627  1302, 1303, 1346, 1383, 1384, 1422, 1452, 1453, 738, 739,
2628  888, 1167, 740, 741, 891, 1013, 1306, 1097, 1098, 1172,
2629  1242, 1243, 1244, 1315, 1170, 1171, 1238, 1311, 1312, 1313,
2630  1350, 1237, 1307, 1308, 1347, 1348, 1392, 1387, 1388, 1389,
2631  1424, 892, 275, 712, 276, 986, 1446, 1070, 756, 757,
2632  758, 759, 760, 1393, 1394, 1488, 1447, 105, 1203, 852,
2633  761, 762, 763, 764, 765, 766, 277, 278, 279, 987,
2634  988, 989, 106, 107, 108, 280, 281, 282, 283, 284,
2635  285, 525, 526, 527, 1456, 1457, 1458, 854, 855, 856,
2636  7, 8, 15, 25, 46, 47, 67, 68, 109, 189,
2637  190, 305, 453, 191, 306, 456, 192, 307, 193, 287,
2638  194, 288, 195, 295, 196, 289, 197, 286, 198, 290,
2639  199, 291, 200, 297, 201, 298, 202, 299, 203, 294,
2640  204, 205, 518, 206, 301, 207, 296, 208, 308, 209,
2641  309, 210, 310, 211, 212, 528, 313, 529, 530, 813,
2642  213, 300, 614, 904, 446, 615, 616, 617, 214, 292,
2643  438, 215, 303, 449, 216, 302, 448, 217, 304, 450,
2644  218, 293, 439, 477, 478, 479, 784, 480, 481, 788,
2645  634, 482, 483, 792, 636, 484, 485, 796, 638, 486,
2646  487, 640, 488, 489, 642, 490, 491, 644, 492, 493,
2647  646, 494, 495, 648, 921, 496, 497, 650, 923, 649,
2648  498, 499, 654, 500, 501, 656, 502, 503, 658, 504,
2649  505, 660, 506, 507, 662, 508, 628, 779, 509, 510,
2650  664, 511, 512, 666, 513, 514, 668, 333, 334, 548,
2651  549, 683, 684, 685, 822, 939, 940, 1039, 1040, 1124
2652 };
2653 
2654 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
2655  positive, shift that token. If negative, reduce the rule whose
2656  number is the opposite. If YYTABLE_NINF, syntax error. */
2657 static const yytype_int16 yytable[] =
2658 {
2659  312, 532, 533, 524, 702, 716, 515, 516, 350, 980,
2660  357, 351, 364, 358, 373, 365, 386, 374, 399, 387,
2661  408, 400, 414, 409, 420, 415, 352, 421, 359, 956,
2662  366, 1099, 375, 889, 388, 405, 401, 1376, 410, 1449,
2663  416, 630, 422, 320, 321, 519, 520, 951, 1197, 1109,
2664  1110, 70, 71, 610, 611, 1381, 1, 971, 72, 73,
2665  1111, 1181, 1182, 1256, 1257, 834, 835, 836, 837, 838,
2666  1434, 839, 1183, 1443, 1258, 1478, 1425, 1426, 370, 268,
2667  269, 432, 433, 434, 435, 436, 437, 102, 103, 440,
2668  441, 442, 443, 444, 445, 1444, 447, 5, 268, 269,
2669  538, 539, 457, 27, 28, 266, 267, 268, 269, 540,
2670  541, 819, 820, 6, 838, 266, 267, 946, 9, 947,
2671  948, 982, 983, 11, 270, 271, 44, 16, 45, 984,
2672  937, 458, 938, 270, 271, 459, 38, 39, 14, 460,
2673  272, 273, 18, 842, 21, 104, 24, 1474, 1475, 26,
2674  272, 273, 31, 266, 267, 1390, 1391, 34, 1156, 1048,
2675  1158, 1377, 1160, 37, 1162, 1198, 1164, 43, 268, 269,
2676  48, 1450, 1451, 266, 267, 50, 521, 522, 69, 1382,
2677  58, 266, 267, 64, 639, 90, 641, 1435, 272, 273,
2678  645, 840, 841, 834, 835, 836, 837, 838, 655, 1479,
2679  657, 1044, 659, 93, 661, 53, 54, 66, 272, 273,
2680  906, 667, 59, 60, 631, 1112, 272, 273, 266, 267,
2681  95, 1184, 82, 83, 1201, 842, 1259, 594, 595, 596,
2682  597, 85, 86, 601, 603, 100, 74, 606, 612, 842,
2683  75, 101, 613, 620, 622, 624, 322, 323, 324, 325,
2684  96, 97, 627, 272, 273, 461, 1084, 462, 110, 463,
2685  1086, 464, 115, 465, 1088, 466, 111, 467, 1090, 468,
2686  112, 469, 1092, 470, 907, 471, 113, 472, 114, 473,
2687  124, 474, 127, 475, 842, 476, 643, 1214, 379, 380,
2688  130, 392, 393, 379, 380, 381, 717, 118, 119, 745,
2689  746, 266, 267, 238, 239, 663, 718, 665, 719, 992,
2690  720, 996, 721, 1000, 722, 1004, 723, 1008, 747, 748,
2691  749, 750, 751, 752, 753, 754, 261, 262, 724, 339,
2692  340, 346, 347, 219, 1123, 1023, 272, 273, 798, 353,
2693  354, 360, 361, 1204, 367, 368, 220, 1276, 131, 132,
2694  221, 133, 805, 134, 222, 135, 807, 136, 808, 137,
2695  809, 138, 993, 139, 997, 140, 1001, 226, 1005, 227,
2696  1009, 376, 377, 389, 390, 402, 403, 229, 1314, 223,
2697  458, 451, 452, 231, 459, 266, 267, 230, 460, 234,
2698  266, 267, 454, 455, 551, 552, 559, 560, 652, 653,
2699  311, 773, 681, 682, 689, 690, 775, 742, 743, 782,
2700  783, 786, 787, 790, 791, 794, 795, 1339, 816, 817,
2701  272, 273, 237, 824, 825, 272, 273, 314, 322, 323,
2702  324, 325, 1344, 831, 832, 866, 867, 871, 872, 523,
2703  102, 103, 322, 323, 324, 325, 332, 1349, 943, 944,
2704  967, 968, 1041, 1042, 1138, 1139, 1149, 1150, 315, 850,
2705  810, 316, 851, 1201, 842, 1209, 1210, 1240, 1241, 1271,
2706  1272, 1279, 1280, 1284, 1285, 317, 908, 853, 1289, 1290,
2707  1294, 1295, 1299, 1300, 1304, 1305, 1309, 1310, 1353, 1354,
2708  1385, 1386, 1401, 1402, 1408, 1409, 1417, 1418, 318, 920,
2709  922, 1431, 1432, 319, 461, 327, 462, 335, 463, 338,
2710  464, 411, 465, 344, 466, 417, 467, 423, 468, 1173,
2711  469, 162, 470, 163, 471, 164, 472, 165, 473, 166,
2712  474, 167, 475, 168, 476, 169, 602, 170, 427, 171,
2713  428, 172, 429, 173, 430, 174, 431, 175, 972, 176,
2714  517, 177, 531, 178, 534, 179, 535, 180, 547, 181,
2715  550, 182, 546, 183, 556, 184, 564, 185, 1414, 186,
2716  558, 187, 537, 188, 565, 1015, 1438, 1439, 569, 568,
2717  571, 572, 570, 573, 575, 574, 576, 578, 577, 582,
2718  579, 585, 1239, 589, 954, 590, 591, 955, 592, 593,
2719  599, 598, 607, 604, 618, 928, 605, 609, 625, 608,
2720  629, 626, 957, 633, 162, 635, 163, 637, 164, 647,
2721  165, 1455, 166, 669, 167, 671, 168, 600, 169, 670,
2722  170, 672, 171, 162, 172, 163, 173, 164, 174, 165,
2723  175, 166, 176, 167, 177, 168, 178, 169, 179, 170,
2724  180, 171, 181, 172, 182, 173, 183, 174, 184, 175,
2725  185, 176, 186, 177, 187, 178, 188, 179, 619, 180,
2726  673, 181, 674, 182, 675, 183, 678, 184, 677, 185,
2727  679, 186, 680, 187, 686, 188, 696, 688, 698, 701,
2728  703, 704, 705, 706, 708, 713, 707, 767, 768, 710,
2729  771, 769, 776, 772, 770, 777, 1052, 1094, 780, 1053,
2730  778, 781, 785, 789, 793, 797, 801, 800, 802, 803,
2731  799, 804, 806, 1034, 1054, 812, 162, 811, 163, 814,
2732  164, 1108, 165, 815, 166, 821, 167, 893, 168, 823,
2733  169, 859, 170, 860, 171, 861, 172, 862, 173, 863,
2734  174, 864, 175, 865, 176, 894, 177, 895, 178, 890,
2735  179, 896, 180, 621, 181, 162, 182, 163, 183, 164,
2736  184, 165, 185, 166, 186, 167, 187, 168, 188, 169,
2737  897, 170, 898, 171, 899, 172, 900, 173, 901, 174,
2738  902, 175, 903, 176, 905, 177, 909, 178, 910, 179,
2739  911, 180, 912, 181, 623, 182, 913, 183, 914, 184,
2740  916, 185, 924, 186, 915, 187, 919, 188, 1191, 917,
2741  162, 918, 163, 925, 164, 927, 165, 926, 166, 929,
2742  167, 930, 168, 931, 169, 934, 170, 935, 171, 936,
2743  172, 959, 173, 958, 174, 960, 175, 961, 176, 774,
2744  177, 962, 178, 963, 179, 964, 180, 965, 181, 966,
2745  182, 973, 183, 981, 184, 1011, 185, 974, 186, 1467,
2746  187, 990, 188, 994, 998, 1002, 1006, 1010, 1012, 1016,
2747  1017, 1018, 1019, 1020, 1021, 1022, 1032, 1024, 1025, 1026,
2748  1027, 1028, 1029, 1030, 1031, 1033, 1036, 1037, 1055, 1056,
2749  1057, 1058, 1059, 1483, 1060, 162, 1061, 163, 1062, 164,
2750  1063, 165, 1064, 166, 1069, 167, 1065, 168, 1066, 169,
2751  1067, 170, 1068, 171, 1494, 172, 1071, 173, 1073, 174,
2752  1078, 175, 1082, 176, 1076, 177, 1083, 178, 1095, 179,
2753  1169, 180, 1100, 181, 1101, 182, 1102, 183, 1103, 184,
2754  1104, 185, 1105, 186, 1106, 187, 1107, 188, 1121, 1096,
2755  1126, 1127, 1119, 1125, 1128, 1129, 1166, 1145, 1130, 1131,
2756  1132, 1133, 1134, 1135, 1136, 1137, 1154, 1155, 1168, 1192,
2757  1175, 1174, 1179, 1180, 1193, 1194, 1195, 1196, 1205, 1206,
2758  1199, 1216, 1217, 1220, 1221, 1225, 1229, 1224, 1233, 1232,
2759  1248, 1228, 1245, 1247, 1249, 1236, 1265, 1254, 1250, 1255,
2760  1266, 1267, 1269, 1270, 1316, 1268, 1278, 1318, 1319, 1322,
2761  1320, 1323, 1324, 1331, 1351, 1329, 1330, 1325, 1332, 1333,
2762  1356, 1338, 1352, 1358, 1359, 1363, 1364, 1367, 1396, 1365,
2763  1397, 1370, 1362, 1360, 1398, 1371, 1372, 1373, 1400, 1380,
2764  1399, 1404, 1406, 1407, 1427, 842, 1428, 1429, 1436, 1430,
2765  1460, 1461, 1462, 1465, 1464, 1463, 1466, 1469, 1470, 1471,
2766  1472, 1015, 1015, 1473, 1476, 1482, 1485, 1246, 1492, 1489,
2767  1490, 1491, 1477, 1495, 1496, 1484, 1486, 1321, 1361, 1046,
2768  395, 1047, 396, 1050, 536, 1051, 1423, 1459, 1366, 1497,
2769  1454, 1122, 1395, 651, 0, 0, 0, 0, 0, 0,
2770  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2771  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2772  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2773  0, 0, 1015, 1015, 0, 0, 0, 0, 0, 0,
2774  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2775  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2776  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2777  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2778  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2779  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2780  0, 0, 0, 1448
2781 };
2782 
2783 static const yytype_int16 yycheck[] =
2784 {
2785  205, 320, 321, 313, 571, 584, 309, 310, 244, 872,
2786  246, 244, 248, 246, 250, 248, 252, 250, 254, 252,
2787  256, 254, 258, 256, 260, 258, 244, 260, 246, 830,
2788  248, 8, 250, 739, 252, 13, 254, 112, 256, 11,
2789  258, 22, 260, 6, 7, 10, 11, 830, 4, 10,
2790  11, 10, 11, 10, 11, 112, 42, 858, 17, 18,
2791  21, 10, 11, 10, 11, 23, 24, 25, 26, 27,
2792  4, 29, 21, 178, 21, 113, 1390, 1391, 28, 133,
2793  134, 286, 287, 288, 289, 290, 291, 137, 138, 294,
2794  295, 296, 297, 298, 299, 200, 301, 0, 133, 134,
2795  10, 11, 307, 43, 44, 131, 132, 133, 134, 19,
2796  20, 678, 679, 302, 27, 131, 132, 30, 14, 32,
2797  33, 161, 162, 201, 159, 160, 303, 8, 305, 169,
2798  308, 245, 310, 159, 160, 249, 10, 11, 304, 253,
2799  166, 167, 46, 197, 168, 195, 8, 1461, 1462, 6,
2800  166, 167, 241, 131, 132, 190, 191, 15, 1084, 942,
2801  1086, 236, 1088, 8, 1090, 121, 1092, 6, 133, 134,
2802  8, 143, 144, 131, 132, 76, 141, 142, 11, 236,
2803  8, 131, 132, 6, 487, 243, 489, 121, 166, 167,
2804  493, 149, 150, 23, 24, 25, 26, 27, 501, 237,
2805  503, 31, 505, 6, 507, 10, 11, 8, 166, 167,
2806  777, 514, 10, 11, 195, 176, 166, 167, 131, 132,
2807  8, 170, 40, 41, 196, 197, 173, 432, 433, 434,
2808  435, 10, 11, 438, 439, 11, 195, 442, 195, 197,
2809  199, 11, 199, 448, 449, 450, 405, 406, 407, 408,
2810  202, 203, 457, 166, 167, 369, 990, 371, 45, 373,
2811  994, 375, 39, 377, 998, 379, 8, 381, 1002, 383,
2812  8, 385, 1006, 387, 388, 389, 8, 391, 8, 393,
2813  247, 395, 181, 397, 197, 399, 491, 1150, 34, 35,
2814  8, 37, 38, 34, 35, 36, 207, 77, 78, 163,
2815  164, 131, 132, 10, 11, 510, 217, 512, 219, 879,
2816  221, 881, 223, 883, 225, 885, 227, 887, 182, 183,
2817  184, 185, 186, 187, 188, 189, 10, 11, 239, 10,
2818  11, 10, 11, 3, 1040, 902, 166, 167, 641, 10,
2819  11, 10, 11, 1144, 10, 11, 8, 1210, 47, 48,
2820  6, 50, 655, 52, 6, 54, 659, 56, 661, 58,
2821  663, 60, 879, 62, 881, 64, 883, 77, 885, 16,
2822  887, 10, 11, 10, 11, 10, 11, 77, 1241, 6,
2823  245, 10, 11, 251, 249, 131, 132, 82, 253, 180,
2824  131, 132, 10, 11, 10, 11, 244, 245, 10, 11,
2825  306, 606, 10, 11, 248, 249, 611, 10, 11, 10,
2826  11, 10, 11, 10, 11, 10, 11, 1280, 10, 11,
2827  166, 167, 8, 252, 253, 166, 167, 8, 405, 406,
2828  407, 408, 1295, 10, 11, 10, 11, 10, 11, 404,
2829  137, 138, 405, 406, 407, 408, 307, 1310, 10, 11,
2830  10, 11, 10, 11, 10, 11, 10, 11, 6, 695,
2831  665, 8, 695, 196, 197, 10, 11, 10, 11, 10,
2832  11, 10, 11, 10, 11, 8, 779, 695, 10, 11,
2833  10, 11, 10, 11, 208, 209, 10, 11, 10, 11,
2834  10, 11, 10, 11, 10, 11, 10, 11, 8, 802,
2835  803, 10, 11, 8, 369, 8, 371, 179, 373, 8,
2836  375, 11, 377, 6, 379, 11, 381, 206, 383, 1098,
2837  385, 315, 387, 317, 389, 319, 391, 321, 393, 323,
2838  395, 325, 397, 327, 399, 329, 330, 331, 3, 333,
2839  3, 335, 3, 337, 8, 339, 8, 341, 858, 343,
2840  346, 345, 8, 347, 6, 349, 79, 351, 309, 353,
2841  8, 355, 242, 357, 6, 359, 49, 361, 1369, 363,
2842  8, 365, 80, 367, 51, 894, 10, 11, 8, 55,
2843  8, 8, 57, 8, 8, 59, 8, 3, 61, 74,
2844  72, 204, 1171, 8, 830, 8, 8, 830, 6, 6,
2845  326, 324, 338, 332, 348, 810, 334, 342, 356, 340,
2846  364, 358, 830, 195, 315, 195, 317, 195, 319, 402,
2847  321, 1422, 323, 366, 325, 362, 327, 328, 329, 368,
2848  331, 3, 333, 315, 335, 317, 337, 319, 339, 321,
2849  341, 323, 343, 325, 345, 327, 347, 329, 349, 331,
2850  351, 333, 353, 335, 355, 337, 357, 339, 359, 341,
2851  361, 343, 363, 345, 365, 347, 367, 349, 350, 351,
2852  3, 353, 8, 355, 132, 357, 8, 359, 83, 361,
2853  8, 363, 8, 365, 6, 367, 53, 8, 70, 6,
2854  6, 6, 6, 6, 63, 65, 8, 8, 8, 122,
2855  320, 316, 8, 322, 318, 8, 942, 1010, 8, 942,
2856  360, 8, 8, 8, 8, 370, 3, 400, 11, 11,
2857  398, 378, 382, 928, 942, 8, 315, 394, 317, 11,
2858  319, 1034, 321, 3, 323, 6, 325, 205, 327, 8,
2859  329, 8, 331, 8, 333, 8, 335, 8, 337, 8,
2860  339, 8, 341, 8, 343, 3, 345, 8, 347, 165,
2861  349, 8, 351, 352, 353, 315, 355, 317, 357, 319,
2862  359, 321, 361, 323, 363, 325, 365, 327, 367, 329,
2863  8, 331, 8, 333, 8, 335, 8, 337, 8, 339,
2864  8, 341, 336, 343, 6, 345, 6, 347, 6, 349,
2865  396, 351, 6, 353, 354, 355, 246, 357, 6, 359,
2866  6, 361, 380, 363, 250, 365, 8, 367, 1121, 254,
2867  315, 372, 317, 384, 319, 390, 321, 386, 323, 8,
2868  325, 8, 327, 265, 329, 8, 331, 8, 333, 8,
2869  335, 8, 337, 246, 339, 8, 341, 8, 343, 344,
2870  345, 8, 347, 8, 349, 8, 351, 3, 353, 8,
2871  355, 6, 357, 11, 359, 8, 361, 120, 363, 1436,
2872  365, 11, 367, 11, 11, 11, 11, 11, 11, 6,
2873  6, 6, 6, 6, 6, 6, 374, 344, 8, 8,
2874  8, 8, 8, 8, 8, 376, 81, 257, 250, 8,
2875  8, 8, 6, 1470, 6, 315, 6, 317, 6, 319,
2876  6, 321, 6, 323, 198, 325, 8, 327, 6, 329,
2877  71, 331, 8, 333, 1491, 335, 73, 337, 112, 339,
2878  231, 341, 3, 343, 75, 345, 8, 347, 6, 349,
2879  213, 351, 8, 353, 8, 355, 8, 357, 8, 359,
2880  8, 361, 8, 363, 8, 365, 8, 367, 11, 211,
2881  8, 6, 261, 254, 6, 6, 240, 233, 8, 8,
2882  8, 8, 8, 8, 8, 8, 8, 6, 8, 6,
2883  266, 392, 8, 8, 8, 8, 8, 6, 218, 235,
2884  11, 8, 235, 220, 235, 235, 235, 222, 235, 228,
2885  6, 224, 266, 263, 6, 226, 311, 8, 258, 8,
2886  8, 8, 6, 8, 195, 121, 232, 8, 8, 255,
2887  258, 6, 6, 113, 212, 8, 8, 262, 6, 120,
2888  195, 234, 8, 8, 8, 6, 6, 112, 1348, 8,
2889  214, 236, 259, 262, 6, 236, 236, 112, 8, 236,
2890  264, 195, 8, 8, 8, 197, 6, 256, 11, 8,
2891  210, 6, 6, 260, 6, 8, 121, 8, 8, 113,
2892  6, 1390, 1391, 3, 8, 6, 8, 1176, 11, 8,
2893  8, 8, 113, 6, 8, 113, 199, 1251, 1326, 942,
2894  254, 942, 254, 942, 328, 942, 1386, 1423, 1333, 238,
2895  1422, 1040, 1348, 497, -1, -1, -1, -1, -1, -1,
2896  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2897  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2898  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2899  -1, -1, 1461, 1462, -1, -1, -1, -1, -1, -1,
2900  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2901  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2902  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2903  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2904  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2905  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2906  -1, -1, -1, 1418
2907 };
2908 
2909 /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
2910  state STATE-NUM. */
2911 static const yytype_int16 yystos[] =
2912 {
2913  0, 42, 410, 414, 415, 0, 302, 889, 890, 14,
2914  416, 201, 427, 428, 304, 891, 8, 417, 46, 434,
2915  435, 168, 429, 628, 8, 892, 6, 43, 44, 418,
2916  419, 241, 524, 525, 15, 436, 629, 8, 10, 11,
2917  430, 431, 432, 6, 303, 305, 893, 894, 8, 421,
2918  76, 571, 572, 10, 11, 526, 527, 528, 8, 10,
2919  11, 437, 438, 439, 6, 433, 8, 895, 896, 11,
2920  10, 11, 17, 18, 195, 199, 420, 422, 423, 424,
2921  425, 426, 40, 41, 411, 10, 11, 573, 574, 575,
2922  243, 529, 530, 6, 440, 8, 202, 203, 676, 677,
2923  11, 11, 137, 138, 195, 856, 871, 872, 873, 897,
2924  45, 8, 8, 8, 8, 39, 412, 413, 77, 78,
2925  576, 577, 620, 621, 247, 543, 544, 181, 531, 630,
2926  8, 47, 48, 50, 52, 54, 56, 58, 60, 62,
2927  64, 441, 442, 443, 448, 449, 454, 455, 469, 470,
2928  476, 477, 482, 483, 488, 489, 494, 495, 509, 510,
2929  678, 679, 315, 317, 319, 321, 323, 325, 327, 329,
2930  331, 333, 335, 337, 339, 341, 343, 345, 347, 349,
2931  351, 353, 355, 357, 359, 361, 363, 365, 367, 898,
2932  899, 902, 905, 907, 909, 911, 913, 915, 917, 919,
2933  921, 923, 925, 927, 929, 930, 932, 934, 936, 938,
2934  940, 942, 943, 949, 957, 960, 963, 966, 969, 3,
2935  8, 6, 6, 6, 650, 652, 77, 16, 578, 77,
2936  82, 251, 557, 558, 180, 545, 631, 8, 10, 11,
2937  532, 533, 534, 444, 445, 450, 451, 456, 457, 471,
2938  472, 478, 479, 484, 485, 490, 491, 496, 497, 511,
2939  512, 10, 11, 681, 682, 683, 131, 132, 133, 134,
2940  159, 160, 166, 167, 680, 841, 843, 865, 866, 867,
2941  874, 875, 876, 877, 878, 879, 916, 908, 910, 914,
2942  918, 920, 958, 970, 928, 912, 935, 922, 924, 926,
2943  950, 933, 964, 961, 967, 900, 903, 906, 937, 939,
2944  941, 306, 898, 945, 8, 6, 8, 8, 8, 8,
2945  6, 7, 405, 406, 407, 408, 653, 8, 579, 580,
2946  581, 623, 307, 1036, 1037, 179, 559, 632, 8, 10,
2947  11, 546, 547, 548, 6, 536, 10, 11, 447, 446,
2948  841, 843, 865, 10, 11, 453, 452, 841, 843, 865,
2949  10, 11, 459, 458, 841, 843, 865, 10, 11, 475,
2950  28, 473, 474, 841, 843, 865, 10, 11, 481, 34,
2951  35, 36, 480, 633, 634, 635, 841, 843, 865, 10,
2952  11, 487, 37, 38, 486, 633, 634, 636, 637, 841,
2953  843, 865, 10, 11, 493, 13, 492, 638, 841, 843,
2954  865, 11, 499, 498, 841, 843, 865, 11, 514, 513,
2955  841, 843, 865, 206, 684, 685, 686, 3, 3, 3,
2956  8, 8, 898, 898, 898, 898, 898, 898, 959, 971,
2957  898, 898, 898, 898, 898, 898, 953, 898, 965, 962,
2958  968, 10, 11, 901, 10, 11, 904, 898, 245, 249,
2959  253, 369, 371, 373, 375, 377, 379, 381, 383, 385,
2960  387, 389, 391, 393, 395, 397, 399, 972, 973, 974,
2961  976, 977, 980, 981, 984, 985, 988, 989, 991, 992,
2962  994, 995, 997, 998, 1000, 1001, 1004, 1005, 1009, 1010,
2963  1012, 1013, 1015, 1016, 1018, 1019, 1021, 1022, 1024, 1027,
2964  1028, 1030, 1031, 1033, 1034, 972, 972, 346, 931, 10,
2965  11, 141, 142, 404, 877, 880, 881, 882, 944, 946,
2966  947, 8, 652, 652, 6, 79, 580, 80, 10, 11,
2967  19, 20, 622, 624, 626, 627, 242, 309, 1038, 1039,
2968  8, 10, 11, 560, 561, 562, 6, 550, 8, 244,
2969  245, 535, 537, 538, 49, 51, 460, 461, 55, 8,
2970  57, 8, 8, 8, 59, 8, 8, 61, 3, 72,
2971  500, 501, 74, 515, 516, 204, 691, 687, 688, 8,
2972  8, 8, 6, 6, 898, 898, 898, 898, 324, 326,
2973  328, 898, 330, 898, 332, 334, 898, 338, 340, 342,
2974  10, 11, 195, 199, 951, 954, 955, 956, 348, 350,
2975  898, 352, 898, 354, 898, 356, 358, 898, 1025, 364,
2976  22, 195, 639, 195, 979, 195, 983, 195, 987, 972,
2977  990, 972, 993, 898, 996, 972, 999, 402, 1002, 1008,
2978  1006, 1008, 10, 11, 1011, 972, 1014, 972, 1017, 972,
2979  1020, 972, 1023, 898, 1029, 898, 1032, 972, 1035, 366,
2980  368, 362, 3, 3, 8, 132, 582, 83, 8, 8,
2981  8, 10, 11, 1040, 1041, 1042, 6, 564, 8, 248,
2982  249, 549, 551, 552, 539, 540, 53, 468, 70, 462,
2983  463, 6, 650, 6, 6, 6, 6, 8, 63, 508,
2984  122, 502, 842, 65, 523, 517, 842, 207, 217, 219,
2985  221, 223, 225, 227, 239, 692, 693, 694, 718, 719,
2986  731, 732, 758, 759, 776, 777, 789, 790, 807, 808,
2987  811, 812, 10, 11, 690, 163, 164, 182, 183, 184,
2988  185, 186, 187, 188, 189, 689, 847, 848, 849, 850,
2989  851, 859, 860, 861, 862, 863, 864, 8, 8, 316,
2990  318, 320, 322, 898, 344, 898, 8, 8, 360, 1026,
2991  8, 8, 10, 11, 975, 8, 10, 11, 978, 8,
2992  10, 11, 982, 8, 10, 11, 986, 370, 972, 398,
2993  400, 3, 11, 11, 378, 972, 382, 972, 972, 972,
2994  898, 394, 8, 948, 11, 3, 10, 11, 583, 650,
2995  650, 6, 1043, 8, 252, 253, 563, 565, 566, 553,
2996  554, 10, 11, 542, 23, 24, 25, 26, 27, 29,
2997  149, 150, 197, 541, 640, 641, 643, 644, 647, 648,
2998  841, 843, 858, 865, 886, 887, 888, 464, 465, 8,
2999  8, 8, 8, 8, 8, 8, 10, 11, 503, 504,
3000  505, 10, 11, 518, 519, 520, 695, 696, 720, 721,
3001  733, 734, 760, 761, 778, 779, 791, 792, 809, 871,
3002  165, 813, 840, 205, 3, 8, 8, 8, 8, 8,
3003  8, 8, 8, 336, 952, 6, 650, 388, 972, 6,
3004  6, 396, 6, 246, 6, 250, 6, 254, 372, 8,
3005  972, 1003, 972, 1007, 380, 384, 386, 390, 898, 8,
3006  8, 265, 584, 585, 8, 8, 8, 308, 310, 1044,
3007  1045, 567, 568, 10, 11, 556, 30, 32, 33, 555,
3008  642, 643, 645, 649, 841, 843, 858, 865, 246, 8,
3009  8, 8, 8, 8, 8, 3, 8, 10, 11, 467,
3010  466, 858, 877, 6, 120, 506, 654, 655, 662, 521,
3011  654, 11, 161, 162, 169, 697, 844, 868, 869, 870,
3012  11, 722, 844, 868, 11, 735, 844, 868, 11, 762,
3013  844, 868, 11, 780, 844, 868, 11, 793, 844, 868,
3014  11, 8, 11, 814, 651, 652, 6, 6, 6, 6,
3015  6, 6, 6, 650, 344, 8, 8, 8, 8, 8,
3016  8, 8, 374, 376, 898, 586, 81, 257, 597, 1046,
3017  1047, 10, 11, 570, 31, 569, 640, 641, 643, 646,
3018  647, 648, 841, 843, 865, 250, 8, 8, 8, 6,
3019  6, 6, 6, 6, 6, 8, 6, 71, 8, 198,
3020  846, 73, 507, 112, 656, 657, 75, 522, 231, 698,
3021  700, 701, 3, 8, 700, 723, 700, 736, 700, 763,
3022  700, 781, 700, 794, 972, 6, 211, 816, 817, 8,
3023  8, 8, 8, 8, 8, 8, 8, 8, 972, 10,
3024  11, 21, 176, 587, 588, 589, 590, 591, 598, 261,
3025  609, 11, 856, 871, 1048, 254, 8, 6, 6, 6,
3026  8, 8, 8, 8, 8, 8, 8, 8, 10, 11,
3027  663, 664, 665, 658, 659, 233, 699, 706, 707, 10,
3028  11, 702, 703, 704, 8, 6, 706, 724, 706, 737,
3029  706, 764, 706, 782, 706, 795, 240, 810, 8, 213,
3030  823, 824, 818, 842, 392, 266, 592, 593, 594, 8,
3031  8, 10, 11, 21, 170, 599, 600, 601, 602, 603,
3032  610, 972, 6, 8, 8, 8, 6, 4, 121, 11,
3033  661, 196, 660, 857, 858, 218, 235, 712, 713, 10,
3034  11, 708, 709, 710, 654, 705, 8, 235, 725, 726,
3035  220, 235, 738, 739, 222, 235, 765, 766, 224, 235,
3036  783, 784, 228, 235, 796, 797, 226, 830, 825, 842,
3037  10, 11, 819, 820, 821, 266, 593, 263, 6, 6,
3038  258, 604, 605, 606, 8, 8, 10, 11, 21, 173,
3039  611, 612, 613, 614, 625, 311, 8, 8, 121, 6,
3040  8, 10, 11, 714, 715, 716, 654, 711, 232, 10,
3041  11, 727, 728, 729, 10, 11, 740, 741, 742, 10,
3042  11, 767, 768, 769, 10, 11, 785, 786, 787, 10,
3043  11, 798, 799, 800, 208, 209, 815, 831, 832, 10,
3044  11, 826, 827, 828, 654, 822, 195, 595, 8, 8,
3045  258, 605, 255, 6, 6, 262, 615, 616, 617, 8,
3046  8, 113, 6, 120, 666, 667, 672, 717, 234, 654,
3047  730, 743, 744, 770, 654, 788, 801, 833, 834, 654,
3048  829, 212, 8, 10, 11, 596, 195, 607, 8, 8,
3049  262, 616, 259, 6, 6, 8, 846, 112, 668, 669,
3050  236, 236, 236, 112, 745, 746, 112, 236, 771, 772,
3051  236, 112, 236, 802, 803, 10, 11, 836, 837, 838,
3052  190, 191, 835, 852, 853, 874, 877, 214, 6, 264,
3053  8, 10, 11, 608, 195, 618, 8, 8, 10, 11,
3054  673, 674, 675, 670, 858, 747, 748, 10, 11, 773,
3055  774, 775, 804, 685, 839, 651, 651, 8, 6, 256,
3056  8, 10, 11, 619, 4, 121, 11, 671, 10, 11,
3057  750, 751, 752, 178, 200, 749, 845, 855, 898, 11,
3058  143, 144, 805, 806, 857, 858, 883, 884, 885, 691,
3059  210, 6, 6, 8, 6, 260, 121, 650, 753, 8,
3060  8, 113, 6, 3, 651, 651, 8, 113, 113, 237,
3061  754, 755, 6, 650, 113, 8, 199, 756, 854, 8,
3062  8, 8, 11, 757, 650, 6, 8, 238
3063 };
3064 
3065 /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
3066 static const yytype_int16 yyr1[] =
3067 {
3068  0, 409, 410, 411, 411, 412, 413, 413, 414, 414,
3069  415, 416, 417, 417, 418, 419, 420, 420, 421, 421,
3070  422, 422, 422, 422, 423, 424, 425, 426, 427, 427,
3071  428, 429, 430, 430, 431, 432, 433, 433, 434, 434,
3072  435, 436, 437, 437, 438, 439, 440, 440, 441, 441,
3073  441, 441, 441, 441, 441, 441, 441, 442, 443, 444,
3074  445, 445, 446, 446, 446, 447, 447, 448, 449, 450,
3075  451, 451, 452, 452, 452, 453, 453, 454, 455, 456,
3076  457, 457, 458, 458, 458, 459, 459, 460, 461, 461,
3077  462, 463, 464, 465, 465, 466, 466, 467, 467, 468,
3078  469, 470, 471, 472, 472, 473, 473, 473, 473, 474,
3079  475, 475, 476, 477, 478, 479, 479, 480, 480, 480,
3080  480, 480, 480, 481, 481, 482, 483, 484, 485, 485,
3081  486, 486, 486, 486, 486, 486, 486, 487, 487, 488,
3082  489, 490, 491, 491, 492, 492, 492, 492, 493, 493,
3083  494, 495, 496, 497, 497, 498, 498, 498, 499, 500,
3084  501, 502, 503, 503, 504, 505, 506, 507, 508, 509,
3085  510, 511, 512, 512, 513, 513, 513, 514, 515, 516,
3086  517, 518, 518, 519, 520, 521, 522, 523, 524, 524,
3087  525, 526, 526, 527, 528, 529, 529, 530, 531, 532,
3088  532, 533, 534, 535, 536, 536, 537, 538, 539, 540,
3089  540, 541, 541, 541, 541, 541, 541, 541, 541, 541,
3090  541, 541, 542, 542, 543, 543, 544, 545, 546, 546,
3091  547, 548, 549, 550, 550, 551, 552, 553, 554, 554,
3092  555, 555, 555, 555, 555, 555, 555, 555, 556, 556,
3093  557, 557, 558, 559, 560, 560, 561, 562, 563, 564,
3094  564, 565, 566, 567, 568, 568, 569, 569, 569, 569,
3095  569, 569, 569, 569, 569, 570, 570, 571, 571, 572,
3096  573, 573, 574, 574, 575, 575, 576, 577, 578, 579,
3097  579, 581, 580, 582, 582, 583, 583, 584, 585, 585,
3098  586, 586, 587, 587, 588, 589, 590, 590, 591, 591,
3099  592, 592, 594, 593, 595, 596, 596, 597, 597, 598,
3100  598, 599, 599, 600, 601, 602, 602, 603, 603, 604,
3101  604, 606, 605, 607, 608, 608, 609, 609, 610, 610,
3102  611, 611, 612, 613, 613, 614, 614, 615, 615, 617,
3103  616, 618, 619, 619, 621, 620, 622, 622, 623, 623,
3104  624, 624, 625, 626, 627, 628, 629, 630, 631, 632,
3105  633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
3106  643, 644, 645, 646, 647, 648, 649, 650, 650, 651,
3107  652, 652, 653, 653, 653, 653, 654, 654, 655, 655,
3108  656, 657, 658, 659, 659, 660, 660, 661, 662, 663,
3109  663, 664, 664, 665, 666, 666, 667, 667, 668, 669,
3110  670, 670, 671, 672, 673, 673, 674, 674, 675, 676,
3111  677, 678, 679, 679, 680, 680, 680, 680, 680, 538,
3112  552, 566, 681, 681, 682, 683, 684, 685, 685, 686,
3113  687, 688, 688, 689, 689, 689, 689, 689, 689, 689,
3114  689, 689, 690, 690, 691, 691, 692, 692, 692, 692,
3115  692, 692, 692, 692, 693, 694, 695, 696, 696, 697,
3116  697, 698, 699, 699, 700, 701, 702, 702, 703, 704,
3117  705, 706, 707, 708, 708, 709, 710, 711, 712, 713,
3118  714, 714, 715, 716, 717, 718, 719, 720, 721, 721,
3119  722, 722, 723, 724, 724, 725, 726, 727, 727, 728,
3120  729, 730, 731, 732, 733, 734, 734, 735, 735, 736,
3121  737, 737, 738, 738, 739, 740, 740, 741, 742, 743,
3122  744, 744, 745, 746, 747, 748, 748, 749, 749, 750,
3123  750, 751, 752, 753, 753, 754, 755, 756, 756, 757,
3124  758, 759, 760, 761, 761, 762, 762, 763, 764, 764,
3125  765, 765, 766, 767, 767, 768, 769, 770, 770, 771,
3126  772, 773, 773, 774, 775, 776, 777, 778, 779, 779,
3127  780, 780, 781, 782, 782, 783, 784, 785, 785, 786,
3128  787, 788, 789, 790, 791, 792, 792, 793, 793, 794,
3129  795, 795, 796, 796, 797, 798, 798, 799, 800, 801,
3130  801, 802, 803, 804, 804, 805, 805, 805, 806, 807,
3131  808, 809, 809, 810, 811, 812, 813, 814, 815, 816,
3132  817, 818, 819, 819, 820, 821, 822, 823, 824, 825,
3133  826, 826, 827, 828, 829, 830, 830, 831, 832, 833,
3134  834, 834, 835, 835, 835, 835, 836, 836, 837, 838,
3135  839, 840, 841, 842, 843, 844, 845, 846, 847, 848,
3136  849, 850, 851, 852, 853, 854, 855, 856, 857, 858,
3137  859, 860, 861, 862, 862, 863, 864, 865, 865, 866,
3138  867, 868, 868, 869, 870, 871, 871, 872, 873, 874,
3139  874, 875, 876, 877, 877, 878, 879, 880, 880, 881,
3140  882, 883, 883, 884, 885, 886, 886, 887, 888, 889,
3141  889, 890, 891, 892, 892, 893, 894, 895, 896, 896,
3142  897, 897, 898, 898, 898, 898, 898, 898, 898, 898,
3143  898, 898, 898, 898, 898, 898, 898, 898, 898, 898,
3144  898, 898, 898, 898, 898, 898, 898, 898, 898, 900,
3145  899, 901, 901, 903, 902, 904, 904, 906, 905, 908,
3146  907, 910, 909, 912, 911, 914, 913, 916, 915, 918,
3147  917, 920, 919, 922, 921, 924, 923, 926, 925, 928,
3148  927, 929, 930, 931, 933, 932, 935, 934, 937, 936,
3149  939, 938, 941, 940, 942, 943, 944, 944, 945, 945,
3150  946, 946, 946, 948, 947, 950, 949, 951, 951, 952,
3151  951, 953, 953, 954, 954, 955, 956, 958, 957, 959,
3152  959, 961, 960, 962, 962, 964, 963, 965, 965, 967,
3153  966, 968, 968, 970, 969, 971, 971, 972, 972, 972,
3154  972, 972, 972, 972, 972, 972, 972, 972, 972, 972,
3155  972, 972, 972, 972, 972, 972, 973, 974, 975, 975,
3156  639, 976, 977, 978, 978, 979, 980, 981, 982, 982,
3157  983, 984, 985, 986, 986, 987, 988, 989, 990, 991,
3158  992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001,
3159  1002, 1002, 1003, 1004, 1005, 1006, 1006, 1007, 1008, 1009,
3160  1010, 1011, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018,
3161  1019, 1020, 1021, 1022, 1023, 1025, 1024, 1026, 1026, 1027,
3162  1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1036,
3163  1037, 1038, 1039, 1040, 1040, 1041, 1042, 1043, 1043, 1044,
3164  1045, 1046, 1047, 1047, 1048, 1048
3165 };
3166 
3167 /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
3168 static const yytype_int8 yyr2[] =
3169 {
3170  0, 2, 8, 1, 1, 1, 1, 0, 0, 4,
3171  1, 5, 0, 2, 3, 1, 1, 2, 0, 2,
3172  1, 1, 1, 1, 4, 4, 4, 4, 0, 3,
3173  1, 1, 1, 1, 1, 3, 0, 2, 0, 3,
3174  1, 1, 1, 1, 1, 3, 0, 2, 1, 1,
3175  1, 1, 1, 1, 1, 1, 1, 3, 1, 1,
3176  0, 2, 1, 1, 1, 1, 2, 3, 1, 1,
3177  0, 2, 1, 1, 1, 1, 2, 3, 1, 1,
3178  0, 2, 1, 1, 1, 1, 3, 1, 0, 2,
3179  3, 1, 1, 0, 2, 1, 1, 1, 2, 1,
3180  3, 1, 1, 0, 2, 1, 1, 1, 1, 4,
3181  1, 2, 3, 1, 1, 0, 2, 1, 1, 1,
3182  1, 1, 1, 1, 2, 3, 1, 1, 0, 2,
3183  1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
3184  1, 1, 0, 2, 1, 1, 1, 1, 1, 2,
3185  3, 1, 1, 0, 2, 1, 1, 1, 3, 3,
3186  1, 1, 1, 1, 1, 3, 1, 1, 1, 3,
3187  1, 1, 0, 2, 1, 1, 1, 3, 3, 1,
3188  1, 1, 1, 1, 3, 1, 1, 1, 0, 2,
3189  1, 1, 1, 1, 6, 0, 3, 1, 1, 1,
3190  1, 1, 3, 1, 0, 2, 3, 1, 1, 0,
3191  2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3192  1, 1, 1, 2, 0, 3, 1, 1, 1, 1,
3193  1, 3, 1, 0, 2, 3, 1, 1, 0, 2,
3194  1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
3195  0, 3, 1, 1, 1, 1, 1, 3, 1, 0,
3196  2, 3, 1, 1, 0, 2, 1, 1, 1, 1,
3197  1, 1, 1, 1, 1, 1, 2, 0, 2, 1,
3198  1, 1, 1, 2, 3, 3, 4, 1, 5, 1,
3199  2, 0, 4, 0, 3, 1, 3, 3, 0, 3,
3200  0, 2, 1, 1, 4, 4, 1, 3, 1, 2,
3201  1, 2, 0, 4, 4, 1, 2, 0, 3, 0,
3202  2, 1, 1, 4, 4, 1, 3, 1, 2, 1,
3203  2, 0, 4, 4, 1, 2, 0, 3, 0, 2,
3204  1, 1, 4, 1, 3, 1, 2, 1, 2, 0,
3205  4, 4, 1, 2, 0, 4, 1, 2, 0, 2,
3206  1, 1, 4, 4, 4, 4, 4, 4, 4, 4,
3207  4, 4, 4, 4, 4, 3, 4, 4, 4, 4,
3208  4, 4, 4, 4, 4, 4, 4, 3, 3, 2,
3209  0, 2, 1, 1, 1, 1, 1, 1, 0, 2,
3210  3, 1, 1, 0, 2, 1, 1, 3, 3, 1,
3211  1, 2, 1, 3, 1, 1, 0, 2, 3, 1,
3212  0, 1, 3, 3, 1, 1, 2, 1, 3, 3,
3213  1, 1, 0, 2, 1, 1, 1, 1, 1, 1,
3214  1, 1, 1, 1, 1, 3, 2, 0, 3, 1,
3215  1, 0, 2, 1, 1, 1, 1, 1, 1, 1,
3216  1, 1, 2, 1, 0, 2, 1, 1, 1, 1,
3217  1, 1, 1, 1, 4, 1, 1, 0, 2, 1,
3218  1, 3, 0, 2, 2, 1, 1, 1, 1, 3,
3219  1, 2, 1, 1, 1, 1, 3, 1, 2, 1,
3220  1, 1, 1, 3, 1, 4, 1, 1, 0, 2,
3221  1, 1, 3, 0, 2, 2, 1, 1, 1, 1,
3222  3, 1, 4, 1, 1, 0, 2, 1, 1, 3,
3223  0, 2, 0, 2, 1, 1, 1, 1, 3, 1,
3224  0, 2, 3, 1, 1, 0, 2, 1, 1, 1,
3225  1, 1, 3, 0, 2, 3, 1, 0, 1, 3,
3226  4, 1, 1, 0, 2, 1, 1, 3, 0, 2,
3227  0, 2, 1, 1, 1, 1, 3, 0, 2, 2,
3228  1, 1, 1, 1, 3, 4, 1, 1, 0, 2,
3229  1, 1, 3, 0, 2, 2, 1, 1, 1, 1,
3230  3, 1, 4, 1, 1, 0, 2, 1, 1, 3,
3231  0, 2, 0, 2, 1, 1, 1, 1, 3, 0,
3232  2, 3, 1, 0, 2, 1, 1, 1, 3, 5,
3233  1, 0, 1, 1, 3, 1, 1, 5, 1, 3,
3234  1, 1, 1, 1, 1, 3, 1, 3, 1, 1,
3235  1, 1, 1, 3, 1, 0, 2, 3, 1, 1,
3236  0, 2, 1, 1, 1, 1, 1, 1, 1, 3,
3237  2, 4, 4, 4, 4, 4, 4, 4, 4, 4,
3238  4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
3239  4, 4, 4, 1, 1, 1, 3, 1, 1, 1,
3240  3, 1, 1, 1, 3, 1, 1, 1, 3, 1,
3241  1, 1, 3, 1, 1, 1, 3, 1, 1, 1,
3242  3, 1, 1, 1, 3, 1, 1, 1, 3, 0,
3243  4, 1, 5, 0, 2, 5, 1, 1, 0, 2,
3244  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3245  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3246  1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
3247  3, 1, 2, 0, 3, 1, 2, 0, 5, 0,
3248  5, 0, 5, 0, 4, 0, 5, 0, 5, 0,
3249  4, 0, 4, 0, 4, 0, 4, 0, 4, 0,
3250  4, 3, 1, 1, 0, 4, 0, 6, 0, 4,
3251  0, 4, 0, 4, 3, 1, 1, 2, 0, 2,
3252  1, 1, 1, 0, 4, 0, 4, 1, 2, 0,
3253  4, 0, 2, 1, 1, 4, 4, 0, 4, 0,
3254  2, 0, 4, 0, 2, 0, 4, 0, 2, 0,
3255  4, 0, 2, 0, 4, 0, 2, 1, 1, 1,
3256  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3257  1, 1, 1, 1, 1, 1, 3, 1, 1, 2,
3258  4, 3, 1, 1, 2, 4, 3, 1, 1, 2,
3259  4, 3, 1, 1, 2, 4, 2, 1, 2, 2,
3260  1, 3, 2, 1, 2, 2, 1, 2, 4, 1,
3261  0, 1, 2, 4, 1, 0, 1, 2, 3, 2,
3262  1, 1, 2, 2, 1, 3, 2, 1, 2, 2,
3263  1, 3, 2, 1, 3, 0, 4, 0, 2, 2,
3264  1, 3, 2, 1, 6, 2, 1, 2, 0, 3,
3265  1, 1, 4, 1, 1, 1, 3, 0, 2, 5,
3266  1, 1, 0, 2, 1, 1
3267 };
3268 
3269 
3270 enum { YYENOMEM = -2 };
3271 
3272 #define yyerrok (yyerrstatus = 0)
3273 #define yyclearin (yychar = YYEMPTY)
3274 
3275 #define YYACCEPT goto yyacceptlab
3276 #define YYABORT goto yyabortlab
3277 #define YYERROR goto yyerrorlab
3278 #define YYNOMEM goto yyexhaustedlab
3279 
3280 
3281 #define YYRECOVERING() (!!yyerrstatus)
3282 
3283 #define YYBACKUP(Token, Value) \
3284  do \
3285  if (yychar == YYEMPTY) \
3286  { \
3287  yychar = (Token); \
3288  yylval = (Value); \
3289  YYPOPSTACK (yylen); \
3290  yystate = *yyssp; \
3291  goto yybackup; \
3292  } \
3293  else \
3294  { \
3295  yyerror (&yylloc, osinstance, parserData, osglData, osnlData, YY_("syntax error: cannot back up")); \
3296  YYERROR; \
3297  } \
3298  while (0)
3299 
3300 /* Backward compatibility with an undocumented macro.
3301  Use YYerror or YYUNDEF. */
3302 #define YYERRCODE YYUNDEF
3303 
3304 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
3305  If N is 0, then set CURRENT to the empty location which ends
3306  the previous symbol: RHS[0] (always defined). */
3307 
3308 #ifndef YYLLOC_DEFAULT
3309 # define YYLLOC_DEFAULT(Current, Rhs, N) \
3310  do \
3311  if (N) \
3312  { \
3313  (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
3314  (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
3315  (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
3316  (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
3317  } \
3318  else \
3319  { \
3320  (Current).first_line = (Current).last_line = \
3321  YYRHSLOC (Rhs, 0).last_line; \
3322  (Current).first_column = (Current).last_column = \
3323  YYRHSLOC (Rhs, 0).last_column; \
3324  } \
3325  while (0)
3326 #endif
3327 
3328 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
3329 
3330 
3331 /* Enable debugging if requested. */
3332 #if YYDEBUG
3333 
3334 # ifndef YYFPRINTF
3335 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
3336 # define YYFPRINTF fprintf
3337 # endif
3338 
3339 # define YYDPRINTF(Args) \
3340 do { \
3341  if (yydebug) \
3342  YYFPRINTF Args; \
3343 } while (0)
3344 
3345 
3346 /* YYLOCATION_PRINT -- Print the location on the stream.
3347  This macro was not mandated originally: define only if we know
3348  we won't break user code: when these are the locations we know. */
3349 
3350 # ifndef YYLOCATION_PRINT
3351 
3352 # if defined YY_LOCATION_PRINT
3353 
3354  /* Temporary convenience wrapper in case some people defined the
3355  undocumented and private YY_LOCATION_PRINT macros. */
3356 # define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc))
3357 
3358 # elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
3359 
3360 /* Print *YYLOCP on YYO. Private, do not rely on its existence. */
3361 
3363 static int
3364 yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
3365 {
3366  int res = 0;
3367  int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
3368  if (0 <= yylocp->first_line)
3369  {
3370  res += YYFPRINTF (yyo, "%d", yylocp->first_line);
3371  if (0 <= yylocp->first_column)
3372  res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
3373  }
3374  if (0 <= yylocp->last_line)
3375  {
3376  if (yylocp->first_line < yylocp->last_line)
3377  {
3378  res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
3379  if (0 <= end_col)
3380  res += YYFPRINTF (yyo, ".%d", end_col);
3381  }
3382  else if (0 <= end_col && yylocp->first_column < end_col)
3383  res += YYFPRINTF (yyo, "-%d", end_col);
3384  }
3385  return res;
3386 }
3387 
3388 # define YYLOCATION_PRINT yy_location_print_
3389 
3390  /* Temporary convenience wrapper in case some people defined the
3391  undocumented and private YY_LOCATION_PRINT macros. */
3392 # define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc))
3393 
3394 # else
3395 
3396 # define YYLOCATION_PRINT(File, Loc) ((void) 0)
3397  /* Temporary convenience wrapper in case some people defined the
3398  undocumented and private YY_LOCATION_PRINT macros. */
3399 # define YY_LOCATION_PRINT YYLOCATION_PRINT
3400 
3401 # endif
3402 # endif /* !defined YYLOCATION_PRINT */
3403 
3404 
3405 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
3406 do { \
3407  if (yydebug) \
3408  { \
3409  YYFPRINTF (stderr, "%s ", Title); \
3410  yy_symbol_print (stderr, \
3411  Kind, Value, Location, osinstance, parserData, osglData, osnlData); \
3412  YYFPRINTF (stderr, "\n"); \
3413  } \
3414 } while (0)
3415 
3416 
3417 /*-----------------------------------.
3418 | Print this symbol's value on YYO. |
3419 `-----------------------------------*/
3420 
3421 static void
3422 yy_symbol_value_print (FILE *yyo,
3424 {
3425  FILE *yyoutput = yyo;
3426  YY_USE (yyoutput);
3427  YY_USE (yylocationp);
3428  YY_USE (osinstance);
3429  YY_USE (parserData);
3430  YY_USE (osglData);
3431  YY_USE (osnlData);
3432  if (!yyvaluep)
3433  return;
3435  YY_USE (yykind);
3437 }
3438 
3439 
3440 /*---------------------------.
3441 | Print this symbol on YYO. |
3442 `---------------------------*/
3443 
3444 static void
3445 yy_symbol_print (FILE *yyo,
3447 {
3448  YYFPRINTF (yyo, "%s %s (",
3449  yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
3450 
3451  YYLOCATION_PRINT (yyo, yylocationp);
3452  YYFPRINTF (yyo, ": ");
3453  yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, osinstance, parserData, osglData, osnlData);
3454  YYFPRINTF (yyo, ")");
3455 }
3456 
3457 /*------------------------------------------------------------------.
3458 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3459 | TOP (included). |
3460 `------------------------------------------------------------------*/
3461 
3462 static void
3463 yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
3464 {
3465  YYFPRINTF (stderr, "Stack now");
3466  for (; yybottom <= yytop; yybottom++)
3467  {
3468  int yybot = *yybottom;
3469  YYFPRINTF (stderr, " %d", yybot);
3470  }
3471  YYFPRINTF (stderr, "\n");
3472 }
3473 
3474 # define YY_STACK_PRINT(Bottom, Top) \
3475 do { \
3476  if (yydebug) \
3477  yy_stack_print ((Bottom), (Top)); \
3478 } while (0)
3479 
3480 
3481 /*------------------------------------------------.
3482 | Report that the YYRULE is going to be reduced. |
3483 `------------------------------------------------*/
3484 
3485 static void
3486 yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
3488 {
3489  int yylno = yyrline[yyrule];
3490  int yynrhs = yyr2[yyrule];
3491  int yyi;
3492  YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
3493  yyrule - 1, yylno);
3494  /* The symbols being reduced. */
3495  for (yyi = 0; yyi < yynrhs; yyi++)
3496  {
3497  YYFPRINTF (stderr, " $%d = ", yyi + 1);
3498  yy_symbol_print (stderr,
3499  YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
3500  &yyvsp[(yyi + 1) - (yynrhs)],
3501  &(yylsp[(yyi + 1) - (yynrhs)]), osinstance, parserData, osglData, osnlData);
3502  YYFPRINTF (stderr, "\n");
3503  }
3504 }
3505 
3506 # define YY_REDUCE_PRINT(Rule) \
3507 do { \
3508  if (yydebug) \
3509  yy_reduce_print (yyssp, yyvsp, yylsp, Rule, osinstance, parserData, osglData, osnlData); \
3510 } while (0)
3511 
3512 /* Nonzero means print parse trace. It is left uninitialized so that
3513  multiple parsers can coexist. */
3514 int yydebug;
3515 #else /* !YYDEBUG */
3516 # define YYDPRINTF(Args) ((void) 0)
3517 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
3518 # define YY_STACK_PRINT(Bottom, Top)
3519 # define YY_REDUCE_PRINT(Rule)
3520 #endif /* !YYDEBUG */
3521 
3522 
3523 /* YYINITDEPTH -- initial size of the parser's stacks. */
3524 #ifndef YYINITDEPTH
3525 # define YYINITDEPTH 200
3526 #endif
3527 
3528 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3529  if the built-in stack extension method is used).
3530 
3531  Do not make this value too large; the results are undefined if
3532  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3533  evaluated with infinite-precision integer arithmetic. */
3534 
3535 #ifndef YYMAXDEPTH
3536 # define YYMAXDEPTH 10000
3537 #endif
3538 
3539 
3540 /* Context of a parse error. */
3541 typedef struct
3542 {
3546 } yypcontext_t;
3547 
3548 /* Put in YYARG at most YYARGN of the expected tokens given the
3549  current YYCTX, and return the number of tokens stored in YYARG. If
3550  YYARG is null, return the number of expected tokens (guaranteed to
3551  be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
3552  Return 0 if there are more than YYARGN expected tokens, yet fill
3553  YYARG up to YYARGN. */
3554 static int
3556  yysymbol_kind_t yyarg[], int yyargn)
3557 {
3558  /* Actual size of YYARG. */
3559  int yycount = 0;
3560  int yyn = yypact[+*yyctx->yyssp];
3562  {
3563  /* Start YYX at -YYN if negative to avoid negative indexes in
3564  YYCHECK. In other words, skip the first -YYN actions for
3565  this state because they are default actions. */
3566  int yyxbegin = yyn < 0 ? -yyn : 0;
3567  /* Stay within bounds of both yycheck and yytname. */
3568  int yychecklim = YYLAST - yyn + 1;
3569  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3570  int yyx;
3571  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3572  if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
3573  && !yytable_value_is_error (yytable[yyx + yyn]))
3574  {
3575  if (!yyarg)
3576  ++yycount;
3577  else if (yycount == yyargn)
3578  return 0;
3579  else
3580  yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
3581  }
3582  }
3583  if (yyarg && yycount == 0 && 0 < yyargn)
3584  yyarg[0] = YYSYMBOL_YYEMPTY;
3585  return yycount;
3586 }
3587 
3588 
3589 
3590 
3591 #ifndef yystrlen
3592 # if defined __GLIBC__ && defined _STRING_H
3593 # define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
3594 # else
3595 /* Return the length of YYSTR. */
3596 static YYPTRDIFF_T
3597 yystrlen (const char *yystr)
3598 {
3600  for (yylen = 0; yystr[yylen]; yylen++)
3601  continue;
3602  return yylen;
3603 }
3604 # endif
3605 #endif
3606 
3607 #ifndef yystpcpy
3608 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3609 # define yystpcpy stpcpy
3610 # else
3611 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3612  YYDEST. */
3613 static char *
3614 yystpcpy (char *yydest, const char *yysrc)
3615 {
3616  char *yyd = yydest;
3617  const char *yys = yysrc;
3618 
3619  while ((*yyd++ = *yys++) != '\0')
3620  continue;
3621 
3622  return yyd - 1;
3623 }
3624 # endif
3625 #endif
3626 
3627 #ifndef yytnamerr
3628 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3629  quotes and backslashes, so that it's suitable for yyerror. The
3630  heuristic is that double-quoting is unnecessary unless the string
3631  contains an apostrophe, a comma, or backslash (other than
3632  backslash-backslash). YYSTR is taken from yytname. If YYRES is
3633  null, do not copy; instead, return the length of what the result
3634  would have been. */
3635 static YYPTRDIFF_T
3636 yytnamerr (char *yyres, const char *yystr)
3637 {
3638  if (*yystr == '"')
3639  {
3640  YYPTRDIFF_T yyn = 0;
3641  char const *yyp = yystr;
3642  for (;;)
3643  switch (*++yyp)
3644  {
3645  case '\'':
3646  case ',':
3647  goto do_not_strip_quotes;
3648 
3649  case '\\':
3650  if (*++yyp != '\\')
3651  goto do_not_strip_quotes;
3652  else
3653  goto append;
3654 
3655  append:
3656  default:
3657  if (yyres)
3658  yyres[yyn] = *yyp;
3659  yyn++;
3660  break;
3661 
3662  case '"':
3663  if (yyres)
3664  yyres[yyn] = '\0';
3665  return yyn;
3666  }
3667  do_not_strip_quotes: ;
3668  }
3669 
3670  if (yyres)
3671  return yystpcpy (yyres, yystr) - yyres;
3672  else
3673  return yystrlen (yystr);
3674 }
3675 #endif
3676 
3677 
3678 static int
3680  yysymbol_kind_t yyarg[], int yyargn)
3681 {
3682  /* Actual size of YYARG. */
3683  int yycount = 0;
3684  /* There are many possibilities here to consider:
3685  - If this state is a consistent state with a default action, then
3686  the only way this function was invoked is if the default action
3687  is an error action. In that case, don't check for expected
3688  tokens because there are none.
3689  - The only way there can be no lookahead present (in yychar) is if
3690  this state is a consistent state with a default action. Thus,
3691  detecting the absence of a lookahead is sufficient to determine
3692  that there is no unexpected or expected token to report. In that
3693  case, just report a simple "syntax error".
3694  - Don't assume there isn't a lookahead just because this state is a
3695  consistent state with a default action. There might have been a
3696  previous inconsistent state, consistent state with a non-default
3697  action, or user semantic action that manipulated yychar.
3698  - Of course, the expected token list depends on states to have
3699  correct lookahead information, and it depends on the parser not
3700  to perform extra reductions after fetching a lookahead from the
3701  scanner and before detecting a syntax error. Thus, state merging
3702  (from LALR or IELR) and default reductions corrupt the expected
3703  token list. However, the list is correct for canonical LR with
3704  one exception: it will still contain any token that will not be
3705  accepted due to an error action in a later state.
3706  */
3707  if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
3708  {
3709  int yyn;
3710  if (yyarg)
3711  yyarg[yycount] = yyctx->yytoken;
3712  ++yycount;
3714  yyarg ? yyarg + 1 : yyarg, yyargn - 1);
3715  if (yyn == YYENOMEM)
3716  return YYENOMEM;
3717  else
3718  yycount += yyn;
3719  }
3720  return yycount;
3721 }
3722 
3723 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
3724  about the unexpected token YYTOKEN for the state stack whose top is
3725  YYSSP.
3726 
3727  Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
3728  not large enough to hold the message. In that case, also set
3729  *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
3730  required number of bytes is too large to store. */
3731 static int
3732 yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
3733  const yypcontext_t *yyctx)
3734 {
3735  enum { YYARGS_MAX = 5 };
3736  /* Internationalized format string. */
3737  const char *yyformat = YY_NULLPTR;
3738  /* Arguments of yyformat: reported tokens (one for the "unexpected",
3739  one per "expected"). */
3740  yysymbol_kind_t yyarg[YYARGS_MAX];
3741  /* Cumulated lengths of YYARG. */
3742  YYPTRDIFF_T yysize = 0;
3743 
3744  /* Actual size of YYARG. */
3745  int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
3746  if (yycount == YYENOMEM)
3747  return YYENOMEM;
3748 
3749  switch (yycount)
3750  {
3751 #define YYCASE_(N, S) \
3752  case N: \
3753  yyformat = S; \
3754  break
3755  default: /* Avoid compiler warnings. */
3756  YYCASE_(0, YY_("syntax error"));
3757  YYCASE_(1, YY_("syntax error, unexpected %s"));
3758  YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
3759  YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
3760  YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
3761  YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
3762 #undef YYCASE_
3763  }
3764 
3765  /* Compute error message size. Don't count the "%s"s, but reserve
3766  room for the terminator. */
3767  yysize = yystrlen (yyformat) - 2 * yycount + 1;
3768  {
3769  int yyi;
3770  for (yyi = 0; yyi < yycount; ++yyi)
3771  {
3772  YYPTRDIFF_T yysize1
3773  = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
3774  if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
3775  yysize = yysize1;
3776  else
3777  return YYENOMEM;
3778  }
3779  }
3780 
3781  if (*yymsg_alloc < yysize)
3782  {
3783  *yymsg_alloc = 2 * yysize;
3784  if (! (yysize <= *yymsg_alloc
3785  && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
3786  *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
3787  return -1;
3788  }
3789 
3790  /* Avoid sprintf, as that infringes on the user's name space.
3791  Don't have undefined behavior even if the translation
3792  produced a string with the wrong number of "%s"s. */
3793  {
3794  char *yyp = *yymsg;
3795  int yyi = 0;
3796  while ((*yyp = *yyformat) != '\0')
3797  if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
3798  {
3799  yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
3800  yyformat += 2;
3801  }
3802  else
3803  {
3804  ++yyp;
3805  ++yyformat;
3806  }
3807  }
3808  return 0;
3809 }
3810 
3811 
3812 /*-----------------------------------------------.
3813 | Release the memory associated to this symbol. |
3814 `-----------------------------------------------*/
3815 
3816 static void
3817 yydestruct (const char *yymsg,
3819 {
3820  YY_USE (yyvaluep);
3821  YY_USE (yylocationp);
3822  YY_USE (osinstance);
3823  YY_USE (parserData);
3824  YY_USE (osglData);
3825  YY_USE (osnlData);
3826  if (!yymsg)
3827  yymsg = "Deleting";
3828  YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
3829 
3831  YY_USE (yykind);
3833 }
3834 
3835 
3836 
3837 
3838 
3839 
3840 /*----------.
3841 | yyparse. |
3842 `----------*/
3843 
3844 int
3846 {
3847 /* Lookahead token kind. */
3848 int yychar;
3849 
3850 
3851 /* The semantic value of the lookahead symbol. */
3852 /* Default value used for initialization, for pacifying older GCCs
3853  or non-GCC compilers. */
3854 YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
3855 YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
3856 
3857 /* Location data for the lookahead symbol. */
3858 static YYLTYPE yyloc_default
3859 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
3860  = { 1, 1, 1, 1 }
3861 # endif
3862 ;
3863 YYLTYPE yylloc = yyloc_default;
3864 
3865  /* Number of syntax errors so far. */
3866  int yynerrs = 0;
3867 
3869  /* Number of tokens to shift before error messages enabled. */
3870  int yyerrstatus = 0;
3871 
3872  /* Refer to the stacks through separate pointers, to allow yyoverflow
3873  to reallocate them elsewhere. */
3874 
3875  /* Their size. */
3877 
3878  /* The state stack: array, bottom, top. */
3880  yy_state_t *yyss = yyssa;
3881  yy_state_t *yyssp = yyss;
3882 
3883  /* The semantic value stack: array, bottom, top. */
3885  YYSTYPE *yyvs = yyvsa;
3886  YYSTYPE *yyvsp = yyvs;
3887 
3888  /* The location stack: array, bottom, top. */
3890  YYLTYPE *yyls = yylsa;
3891  YYLTYPE *yylsp = yyls;
3892 
3893  int yyn;
3894  /* The return value of yyparse. */
3895  int yyresult;
3896  /* Lookahead symbol kind. */
3898  /* The variables used to return semantic value and location from the
3899  action routines. */
3900  YYSTYPE yyval;
3901  YYLTYPE yyloc;
3902 
3903  /* The locations where the error started and ended. */
3905 
3906  /* Buffer for error messages, and its allocated size. */
3907  char yymsgbuf[128];
3908  char *yymsg = yymsgbuf;
3909  YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
3910 
3911 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
3912 
3913  /* The number of symbols on the RHS of the reduced rule.
3914  Keep to zero when no symbol should be popped. */
3915  int yylen = 0;
3916 
3917  YYDPRINTF ((stderr, "Starting parse\n"));
3918 
3919  yychar = YYEMPTY; /* Cause a token to be read. */
3920 
3921  yylsp[0] = yylloc;
3922  goto yysetstate;
3923 
3924 
3925 /*------------------------------------------------------------.
3926 | yynewstate -- push a new state, which is found in yystate. |
3927 `------------------------------------------------------------*/
3928 yynewstate:
3929  /* In all cases, when you get here, the value and location stacks
3930  have just been pushed. So pushing a state here evens the stacks. */
3931  yyssp++;
3932 
3933 
3934 /*--------------------------------------------------------------------.
3935 | yysetstate -- set current state (the top of the stack) to yystate. |
3936 `--------------------------------------------------------------------*/
3937 yysetstate:
3938  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
3939  YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
3944 
3945  if (yyss + yystacksize - 1 <= yyssp)
3946 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
3947  YYNOMEM;
3948 #else
3949  {
3950  /* Get the current used size of the three stacks, in elements. */
3951  YYPTRDIFF_T yysize = yyssp - yyss + 1;
3952 
3953 # if defined yyoverflow
3954  {
3955  /* Give user a chance to reallocate the stack. Use copies of
3956  these so that the &'s don't force the real ones into
3957  memory. */
3958  yy_state_t *yyss1 = yyss;
3959  YYSTYPE *yyvs1 = yyvs;
3960  YYLTYPE *yyls1 = yyls;
3961 
3962  /* Each stack pointer address is followed by the size of the
3963  data in use in that stack, in bytes. This used to be a
3964  conditional around just the two extra args, but that might
3965  be undefined if yyoverflow is a macro. */
3966  yyoverflow (YY_("memory exhausted"),
3967  &yyss1, yysize * YYSIZEOF (*yyssp),
3968  &yyvs1, yysize * YYSIZEOF (*yyvsp),
3969  &yyls1, yysize * YYSIZEOF (*yylsp),
3970  &yystacksize);
3971  yyss = yyss1;
3972  yyvs = yyvs1;
3973  yyls = yyls1;
3974  }
3975 # else /* defined YYSTACK_RELOCATE */
3976  /* Extend the stack our own way. */
3977  if (YYMAXDEPTH <= yystacksize)
3978  YYNOMEM;
3979  yystacksize *= 2;
3980  if (YYMAXDEPTH < yystacksize)
3982 
3983  {
3984  yy_state_t *yyss1 = yyss;
3985  union yyalloc *yyptr =
3986  YY_CAST (union yyalloc *,
3988  if (! yyptr)
3989  YYNOMEM;
3993 # undef YYSTACK_RELOCATE
3994  if (yyss1 != yyssa)
3995  YYSTACK_FREE (yyss1);
3996  }
3997 # endif
3998 
3999  yyssp = yyss + yysize - 1;
4000  yyvsp = yyvs + yysize - 1;
4001  yylsp = yyls + yysize - 1;
4002 
4004  YYDPRINTF ((stderr, "Stack size increased to %ld\n",
4005  YY_CAST (long, yystacksize)));
4007 
4008  if (yyss + yystacksize - 1 <= yyssp)
4009  YYABORT;
4010  }
4011 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
4012 
4013 
4014  if (yystate == YYFINAL)
4015  YYACCEPT;
4016 
4017  goto yybackup;
4018 
4019 
4020 /*-----------.
4021 | yybackup. |
4022 `-----------*/
4023 yybackup:
4024  /* Do appropriate processing given the current state. Read a
4025  lookahead token if we need one and don't already have one. */
4026 
4027  /* First try to decide what to do without reference to lookahead token. */
4028  yyn = yypact[yystate];
4030  goto yydefault;
4031 
4032  /* Not known => get a lookahead token if don't already have one. */
4033 
4034  /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
4035  if (yychar == YYEMPTY)
4036  {
4037  YYDPRINTF ((stderr, "Reading a token\n"));
4038  yychar = yylex (&yylval, &yylloc, scanner);
4039  }
4040 
4041  if (yychar <= YYEOF)
4042  {
4043  yychar = YYEOF;
4045  YYDPRINTF ((stderr, "Now at end of input.\n"));
4046  }
4047  else if (yychar == YYerror)
4048  {
4049  /* The scanner already issued an error message, process directly
4050  to error recovery. But do not keep the error token as
4051  lookahead, it is too special and may lead us to an endless
4052  loop in error recovery. */
4053  yychar = YYUNDEF;
4055  yyerror_range[1] = yylloc;
4056  goto yyerrlab1;
4057  }
4058  else
4059  {
4061  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
4062  }
4063 
4064  /* If the proper action on seeing token YYTOKEN is to reduce or to
4065  detect an error, take that action. */
4066  yyn += yytoken;
4067  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
4068  goto yydefault;
4069  yyn = yytable[yyn];
4070  if (yyn <= 0)
4071  {
4073  goto yyerrlab;
4074  yyn = -yyn;
4075  goto yyreduce;
4076  }
4077 
4078  /* Count tokens shifted since error; after three, turn off error
4079  status. */
4080  if (yyerrstatus)
4081  yyerrstatus--;
4082 
4083  /* Shift the lookahead token. */
4084  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4085  yystate = yyn;
4087  *++yyvsp = yylval;
4089  *++yylsp = yylloc;
4090 
4091  /* Discard the shifted token. */
4092  yychar = YYEMPTY;
4093  goto yynewstate;
4094 
4095 
4096 /*-----------------------------------------------------------.
4097 | yydefault -- do the default action for the current state. |
4098 `-----------------------------------------------------------*/
4099 yydefault:
4100  yyn = yydefact[yystate];
4101  if (yyn == 0)
4102  goto yyerrlab;
4103  goto yyreduce;
4104 
4105 
4106 /*-----------------------------.
4107 | yyreduce -- do a reduction. |
4108 `-----------------------------*/
4109 yyreduce:
4110  /* yyn is the number of a rule to reduce with. */
4111  yylen = yyr2[yyn];
4112 
4113  /* If YYLEN is nonzero, implement the default value of the action:
4114  '$$ = $1'.
4115 
4116  Otherwise, the following line sets YYVAL to garbage.
4117  This behavior is undocumented and Bison
4118  users should not rely upon it. Assigning to YYVAL
4119  unconditionally makes the parser a bit smaller, and it avoids a
4120  GCC warning that YYVAL may be used uninitialized. */
4121  yyval = yyvsp[1-yylen];
4122 
4123  /* Default location. */
4125  yyerror_range[1] = yyloc;
4126  YY_REDUCE_PRINT (yyn);
4127  switch (yyn)
4128  {
4129  case 5: /* osilEnd: osilEnding */
4130  {
4131  if (parserData->parser_errors != "")
4132  {
4133  parserData->parser_errors += ("\n\nOSiL input is either invalid or not well-formed.\n");
4135  }
4136  }
4137  break;
4138 
4139  case 7: /* osilEnding: %empty */
4140  { parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "unexpected end of file, expecting </osil>");}
4141  break;
4142 
4143  case 9: /* quadraticCoefficients: quadraticCoefficientsStart osilQuadnumberATT qTermlist QUADRATICCOEFFICIENTSEND */
4144  {if(osinstance->instanceData->quadraticCoefficients->numberOfQuadraticTerms > parserData->qtermcount )
4145  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "actual number of qterms less than numberOfQuadraticTerms");}
4146  break;
4147 
4148  case 10: /* quadraticCoefficientsStart: QUADRATICCOEFFICIENTSSTART */
4149 {
4151 }
4152  break;
4153 
4154  case 11: /* osilQuadnumberATT: NUMBEROFQTERMSATT QUOTE INTEGER QUOTE GREATERTHAN */
4155 {
4156 if ( *(yyvsp[-3].sval) != *(yyvsp[-1].sval) ) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
4159 osinstance->instanceData->quadraticCoefficients->qTerm = new QuadraticTerm*[ (yyvsp[-2].ival) ];
4160 for(int i = 0; i < (yyvsp[-2].ival); i++) osinstance->instanceData->quadraticCoefficients->qTerm[i] = new QuadraticTerm();
4161 parserData->qtermcount = 0;
4162 }
4163  break;
4164 
4165  case 14: /* qterm: qtermStart anotherqTermATT qtermend */
4166 {
4167  parserData->qtermcount++;
4168  if(!parserData->qtermidxattON) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "the qTerm attribute idx is required");
4169  if(!parserData->qtermidxOneattON) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "the qTerm attribute idxOne is required");
4170  if(!parserData->qtermidxTwoattON) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "the qTerm attribute idxTwo is required");
4171  parserData->qtermidattON = false;
4172  parserData->qtermidxattON = false;
4173  parserData->qtermidxOneattON = false;
4174  parserData->qtermidxTwoattON = false;
4175  parserData->qtermcoefattON = false;
4176 }
4177  break;
4178 
4179  case 15: /* qtermStart: QTERMSTART */
4180 {
4181  if(osinstance->instanceData->quadraticCoefficients->numberOfQuadraticTerms <= parserData->qtermcount )
4182  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many QuadraticTerms");
4183 }
4184  break;
4185 
4186  case 20: /* qtermatt: osilQtermidxOneATT */
4187  { if(parserData->qtermidxOneattON) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many qTerm idxOne attributes");
4188  parserData->qtermidxOneattON = true; }
4189  break;
4190 
4191  case 21: /* qtermatt: osilQtermidxTwoATT */
4192  { if(parserData->qtermidxTwoattON) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many qTerm idxTwo attributes");
4193  parserData->qtermidxTwoattON = true; }
4194  break;
4195 
4196  case 22: /* qtermatt: osilQtermcoefATT */
4197  { if(parserData->qtermcoefattON) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many qTerm coef attributes");
4198  parserData->qtermcoefattON = true; }
4199  break;
4200 
4201  case 23: /* qtermatt: osilQtermidxATT */
4202  { if(parserData->qtermidxattON) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many qTerm idx attributes");
4203  parserData->qtermidxattON = true; }
4204  break;
4205 
4206  case 24: /* osilQtermidxOneATT: IDXONEATT QUOTE INTEGER QUOTE */
4207  { if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) ) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
4208 osinstance->instanceData->quadraticCoefficients->qTerm[parserData->qtermcount]->idxOne = (yyvsp[-1].ival);
4209  if( (yyvsp[-1].ival) >= osinstance->instanceData->variables->numberOfVariables){
4210  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "variable index exceeds number of variables");
4211  }
4212 }
4213  break;
4214 
4215  case 25: /* osilQtermidxTwoATT: IDXTWOATT QUOTE INTEGER QUOTE */
4216  { if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) ) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
4217 osinstance->instanceData->quadraticCoefficients->qTerm[parserData->qtermcount]->idxTwo = (yyvsp[-1].ival);
4218  if( (yyvsp[-1].ival) >= osinstance->instanceData->variables->numberOfVariables){
4219  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "variable index exceeds number of variables");
4220  }
4221 }
4222  break;
4223 
4224  case 26: /* osilQtermcoefATT: COEFATT QUOTE aNumber QUOTE */
4225  {if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) ) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
4226 osinstance->instanceData->quadraticCoefficients->qTerm[parserData->qtermcount]->coef = parserData->tempVal;}
4227  break;
4228 
4229  case 27: /* osilQtermidxATT: IDXATT QUOTE INTEGER QUOTE */
4230  { if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) ) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
4231 osinstance->instanceData->quadraticCoefficients->qTerm[parserData->qtermcount]->idx = (yyvsp[-1].ival);}
4232  break;
4233 
4234  case 29: /* matrices: matricesStart matricesAttributes matricesContent */
4235 {
4237  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "fewer matrices than specified");
4239  osinstance->instanceData->matrices->matrix = osglData->matrix;
4240 }
4241  break;
4242 
4243  case 30: /* matricesStart: MATRICESSTART */
4244 {
4245  osinstance->instanceData->matrices = new Matrices();
4247 }
4248  break;
4249 
4250  case 31: /* matricesAttributes: numberOfMatricesATT */
4251 {
4253  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "numberOfMatrices cannot be negative");
4254  else
4255  {
4257  for (int i=0; i < osglData->numberOfMatrices; i++)
4258  osglData->matrix[i] = NULL;
4259  }
4260 }
4261  break;
4262 
4263  case 39: /* cones: conesStart conesAttributes conesContent */
4264 {
4265  if (parserData->coneCounter < parserData->numberOfCones) parserData->parser_errors +=
4266  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "fewer cones than specified");
4267 }
4268  break;
4269 
4270  case 40: /* conesStart: CONESSTART */
4271 {
4272  osinstance->instanceData->cones = new Cones();
4273  parserData->coneCounter = 0;
4274 }
4275  break;
4276 
4277  case 41: /* conesAttributes: numberOfConesATT */
4278 {
4279  if (parserData->numberOfCones < 0) parserData->parser_errors +=
4280  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "numberOfCones cannot be negative");
4281  else
4282  {
4283  osinstance->instanceData->cones->cone = new Cone*[parserData->numberOfCones];
4284  for (int i=0; i < parserData->numberOfCones; i++)
4285  osinstance->instanceData->cones->cone[i] = NULL;
4286  }
4287 }
4288  break;
4289 
4290  case 45: /* conesLaden: GREATERTHAN coneList CONESEND */
4291 {
4292 }
4293  break;
4294 
4295  case 47: /* coneList: coneList cone */
4296 {
4297  parserData->coneCounter++;
4298  if (parserData->coneCounter > parserData->numberOfCones) parserData->parser_errors +=
4299  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "encountered more cones than specified");
4300  osinstance->instanceData->cones->numberOfCones = parserData->coneCounter;
4301 }
4302  break;
4303 
4304  case 58: /* nonnegativeConeStart: NONNEGATIVECONESTART */
4305 {
4306  osglData->numberOfRowsPresent = false;
4308  osglData->namePresent = false;
4309  osinstance->instanceData->cones->cone[parserData->coneCounter] = new NonnegativeCone();
4310  osinstance->instanceData->cones->cone[parserData->coneCounter]->coneType = ENUM_CONE_TYPE_nonnegative;
4311 }
4312  break;
4313 
4314  case 62: /* nonnegativeConeAtt: osglNumberOfRowsATT */
4315  {
4316  ((NonnegativeCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfRows
4318  }
4319  break;
4320 
4321  case 63: /* nonnegativeConeAtt: osglNumberOfColumnsATT */
4322  {
4323  ((NonnegativeCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfColumns
4325  }
4326  break;
4327 
4328  case 64: /* nonnegativeConeAtt: osglNameATT */
4329  {
4330  ((NonnegativeCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->name = osglData->name;
4331  }
4332  break;
4333 
4334  case 68: /* nonpositiveConeStart: NONPOSITIVECONESTART */
4335 {
4336  osglData->numberOfRowsPresent = false;
4338  osglData->namePresent = false;
4339  osinstance->instanceData->cones->cone[parserData->coneCounter] = new NonpositiveCone();
4340  osinstance->instanceData->cones->cone[parserData->coneCounter]->coneType = ENUM_CONE_TYPE_nonpositive;
4341 }
4342  break;
4343 
4344  case 72: /* nonpositiveConeAtt: osglNumberOfRowsATT */
4345  {
4346  ((NonpositiveCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfRows
4348  }
4349  break;
4350 
4351  case 73: /* nonpositiveConeAtt: osglNumberOfColumnsATT */
4352  {
4353  ((NonpositiveCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfColumns
4355  }
4356  break;
4357 
4358  case 74: /* nonpositiveConeAtt: osglNameATT */
4359  {
4360  ((NonpositiveCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->name = osglData->name;
4361  }
4362  break;
4363 
4364  case 78: /* generalOrthantConeStart: ORTHANTCONESTART */
4365 {
4366  osglData->numberOfRowsPresent = false;
4368  osglData->namePresent = false;
4369  osinstance->instanceData->cones->cone[parserData->coneCounter] = new OrthantCone();
4370  osinstance->instanceData->cones->cone[parserData->coneCounter]->coneType = ENUM_CONE_TYPE_orthant;
4371 }
4372  break;
4373 
4374  case 79: /* generalOrthantConeAttributes: generalOrthantConeAttList */
4375 {
4377  ((OrthantCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->ub
4378  = new double[osglData->numberOfEl];
4379  ((OrthantCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->lb
4380  = new double[osglData->numberOfEl];
4381  osglData->osglCounter = 0;
4382 }
4383  break;
4384 
4385  case 82: /* generalOrthantConeAtt: osglNumberOfRowsATT */
4386  {
4387  ((OrthantCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfRows
4389  }
4390  break;
4391 
4392  case 83: /* generalOrthantConeAtt: osglNumberOfColumnsATT */
4393  {
4394  ((OrthantCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfColumns
4396  }
4397  break;
4398 
4399  case 84: /* generalOrthantConeAtt: osglNameATT */
4400  {
4401  ((OrthantCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->name = osglData->name;
4402  }
4403  break;
4404 
4405  case 86: /* generalOrthantConeContent: GREATERTHAN generalOrthantConeDirectionList generalOrthantConeEnd */
4406 {
4408  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of directions does not match");
4409 }
4410  break;
4411 
4412  case 91: /* generalOrthantConeDirectionStart: DIRECTIONSTART */
4413 {
4414  osglData->typePresent = false;
4415  osglData->multPresent = false;
4416  osglData->mult = 1;
4417 }
4418  break;
4419 
4420  case 92: /* generalOrthantConeDirectionAttributes: generalOrthantConeDirectionAttributeList */
4421 {
4422  double ubt;
4423  double lbt;
4424  if (osglData->type == "nonnegative")
4425  {
4426  ubt = OSDBL_MAX;
4427  lbt = 0.0;
4428  }
4429  else if (osglData->type == "nonpositive")
4430  {
4431  ubt = 0.0;
4432  lbt = -OSDBL_MAX;
4433  }
4434  else if (osglData->type == "free")
4435  {
4436  ubt = OSDBL_MAX;
4437  lbt = -OSDBL_MAX;
4438  }
4439  else if (osglData->type == "zero")
4440  {
4441  ubt = 0.0;
4442  lbt = 0.0;
4443  }
4444  else
4445  {
4446  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "unrecognized direction type");
4447  ubt = 0.0;
4448  lbt = 0.0;
4449  }
4451  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "Too many directions given");
4452  for (int i=0; i < osglData->mult; i++)
4453  {
4454  ((OrthantCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->ub[osglData->osglCounter+i] = ubt;
4455  ((OrthantCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->lb[osglData->osglCounter+i] = lbt;
4456  }
4458 }
4459  break;
4460 
4461  case 101: /* polyhedralConeStart: POLYHEDRALCONESTART */
4462 {
4463  osglData->numberOfRowsPresent = false;
4465  osglData->namePresent = false;
4466  osinstance->instanceData->cones->cone[parserData->coneCounter] = new PolyhedralCone();
4467  osinstance->instanceData->cones->cone[parserData->coneCounter]->coneType = ENUM_CONE_TYPE_polyhedral;
4468 }
4469  break;
4470 
4471  case 105: /* polyhedralConeAtt: osglNumberOfRowsATT */
4472  {
4473  ((PolyhedralCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfRows
4475  }
4476  break;
4477 
4478  case 106: /* polyhedralConeAtt: osglNumberOfColumnsATT */
4479  {
4480  ((PolyhedralCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfColumns
4482  }
4483  break;
4484 
4485  case 107: /* polyhedralConeAtt: referenceMatrixATT */
4486  {
4487  ((PolyhedralCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->referenceMatrixIdx
4488  = parserData->referenceMatrixIdx;
4489  }
4490  break;
4491 
4492  case 108: /* polyhedralConeAtt: osglNameATT */
4493  {
4494  ((PolyhedralCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->name = osglData->name;
4495  }
4496  break;
4497 
4498  case 109: /* referenceMatrixATT: REFERENCEMATRIXIDXATT QUOTE INTEGER QUOTE */
4499 {
4500  if (*(yyvsp[-2].sval) != *(yyvsp[0].sval))
4501  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
4502  if (parserData->referenceMatrixIdxPresent)
4503  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "polyhedral cone referenceMatrixIdx attribute previously set");
4504  if ((yyvsp[-1].ival) <= 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "polyhedral cone reference matrix index cannot be negative");
4505  parserData->referenceMatrixIdxPresent = true;
4506  parserData->referenceMatrixIdx = (yyvsp[-1].ival);
4507 }
4508  break;
4509 
4510  case 113: /* quadraticConeStart: QUADRATICCONESTART */
4511 {
4512  osglData->numberOfRowsPresent = false;
4514  osglData->namePresent = false;
4515  parserData->normScaleFactorPresent = false;
4516  parserData->distortionMatrixPresent = false;
4517  parserData->axisDirectionPresent = false;
4518  osinstance->instanceData->cones->cone[parserData->coneCounter] = new QuadraticCone();
4519  osinstance->instanceData->cones->cone[parserData->coneCounter]->coneType = ENUM_CONE_TYPE_quadratic;
4520 }
4521  break;
4522 
4523  case 117: /* quadraticConeAtt: osglNumberOfRowsATT */
4524  {
4525  ((QuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfRows
4527  }
4528  break;
4529 
4530  case 118: /* quadraticConeAtt: osglNumberOfColumnsATT */
4531  {
4532  ((QuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfColumns
4534  }
4535  break;
4536 
4537  case 119: /* quadraticConeAtt: osglNameATT */
4538  {
4539  ((QuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->name = osglData->name;
4540  }
4541  break;
4542 
4543  case 120: /* quadraticConeAtt: distortionMatrixIdxATT */
4544  {
4545  ((QuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->distortionMatrixIdx
4546  = parserData->distortionMatrix;
4547  }
4548  break;
4549 
4550  case 121: /* quadraticConeAtt: normScaleFactorATT */
4551  {
4552  ((QuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->normScaleFactor
4553  = parserData->normScaleFactor;
4554  }
4555  break;
4556 
4557  case 122: /* quadraticConeAtt: axisDirectionATT */
4558  {
4559  ((QuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->axisDirection
4560  = parserData->axisDirection;
4561  }
4562  break;
4563 
4564  case 126: /* rotatedQuadraticConeStart: ROTATEDQUADRATICCONESTART */
4565 {
4566  osglData->numberOfRowsPresent = false;
4568  osglData->namePresent = false;
4569  parserData->normScaleFactorPresent = false;
4570  parserData->distortionMatrixPresent = false;
4571  parserData->firstAxisDirectionPresent = false;
4572  parserData->secondAxisDirectionPresent = false;
4573  osinstance->instanceData->cones->cone[parserData->coneCounter] = new RotatedQuadraticCone();
4575 }
4576  break;
4577 
4578  case 130: /* rotatedQuadraticConeAtt: osglNumberOfRowsATT */
4579  {
4580  ((RotatedQuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfRows
4582  }
4583  break;
4584 
4585  case 131: /* rotatedQuadraticConeAtt: osglNumberOfColumnsATT */
4586  {
4587  ((RotatedQuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfColumns
4589  }
4590  break;
4591 
4592  case 132: /* rotatedQuadraticConeAtt: osglNameATT */
4593  {
4594  ((RotatedQuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->name
4595  = osglData->name;
4596  }
4597  break;
4598 
4599  case 133: /* rotatedQuadraticConeAtt: distortionMatrixIdxATT */
4600  {
4601  ((RotatedQuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->distortionMatrixIdx
4602  = parserData->distortionMatrix;
4603  }
4604  break;
4605 
4606  case 134: /* rotatedQuadraticConeAtt: normScaleFactorATT */
4607  {
4608  ((RotatedQuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->normScaleFactor
4609  = parserData->normScaleFactor;
4610  }
4611  break;
4612 
4613  case 135: /* rotatedQuadraticConeAtt: firstAxisDirectionATT */
4614  {
4615  ((RotatedQuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->firstAxisDirection
4616  = parserData->firstAxisDirection;
4617  }
4618  break;
4619 
4620  case 136: /* rotatedQuadraticConeAtt: secondAxisDirectionATT */
4621  {
4622  ((RotatedQuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->secondAxisDirection
4623  = parserData->secondAxisDirection;
4624  }
4625  break;
4626 
4627  case 140: /* semidefiniteConeStart: SEMIDEFINITECONESTART */
4628 {
4629  osglData->numberOfRowsPresent = false;
4631  osglData->namePresent = false;
4632  parserData->semidefinitenessPresent = false;
4633  osinstance->instanceData->cones->cone[parserData->coneCounter] = new SemidefiniteCone();
4634  osinstance->instanceData->cones->cone[parserData->coneCounter]->coneType = ENUM_CONE_TYPE_semidefinite;
4635 }
4636  break;
4637 
4638  case 144: /* semidefiniteConeAtt: osglNumberOfRowsATT */
4639  {
4640  ((SemidefiniteCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfRows
4642  }
4643  break;
4644 
4645  case 145: /* semidefiniteConeAtt: osglNumberOfColumnsATT */
4646  {
4647  ((SemidefiniteCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfColumns
4649  }
4650  break;
4651 
4652  case 146: /* semidefiniteConeAtt: osglNameATT */
4653  {
4654  ((SemidefiniteCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->name = osglData->name;
4655  }
4656  break;
4657 
4658  case 147: /* semidefiniteConeAtt: semidefinitenessATT */
4659  {
4660  ((SemidefiniteCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->semidefiniteness
4661  = parserData->semidefiniteness;
4662  }
4663  break;
4664 
4665  case 151: /* productConeStart: PRODUCTCONESTART */
4666 {
4667  osglData->numberOfRowsPresent = false;
4669  osglData->namePresent = false;
4670  osinstance->instanceData->cones->cone[parserData->coneCounter] = new ProductCone();
4671  osinstance->instanceData->cones->cone[parserData->coneCounter]->coneType = ENUM_CONE_TYPE_product;
4672 }
4673  break;
4674 
4675  case 155: /* productConeAtt: osglNumberOfRowsATT */
4676  {
4677  ((ProductCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfRows
4679  }
4680  break;
4681 
4682  case 156: /* productConeAtt: osglNumberOfColumnsATT */
4683  {
4684  ((ProductCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfColumns
4686  }
4687  break;
4688 
4689  case 157: /* productConeAtt: osglNameATT */
4690  {
4691  ((ProductCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->name = osglData->name;
4692  }
4693  break;
4694 
4695  case 160: /* productConeFactorsStart: FACTORSSTART */
4696 {
4697  osglData->numberOfEl = 0;
4698  osglData->numberOfElPresent = false;
4699 }
4700  break;
4701 
4702  case 161: /* productConeFactorsAttributes: osglNumberOfElATT */
4703 {
4704  osglData->osglCounter = 0;
4706 }
4707  break;
4708 
4709  case 167: /* productConeFactorsEnd: FACTORSEND */
4710 {
4712  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of factors does not match numberOfEl");
4713  ((ProductCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->factors = new IntVector();
4714  ((ProductCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->factors->numberOfEl
4715  = osglData->numberOfEl;
4716  ((ProductCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->factors ->el
4718  osglData->osglIntArray = NULL; // to facilitate garbage collection without a segfault
4721 }
4722  break;
4723 
4724  case 170: /* intersectionConeStart: INTERSECTIONCONESTART */
4725 {
4726  osglData->numberOfRowsPresent = false;
4728  osglData->namePresent = false;
4729  osinstance->instanceData->cones->cone[parserData->coneCounter] = new IntersectionCone();
4730  osinstance->instanceData->cones->cone[parserData->coneCounter]->coneType = ENUM_CONE_TYPE_intersection;
4731 }
4732  break;
4733 
4734  case 174: /* intersectionConeAtt: osglNumberOfRowsATT */
4735  {
4736  ((IntersectionCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfRows
4738  }
4739  break;
4740 
4741  case 175: /* intersectionConeAtt: osglNumberOfColumnsATT */
4742  {
4743  ((IntersectionCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfColumns
4745  }
4746  break;
4747 
4748  case 176: /* intersectionConeAtt: osglNameATT */
4749  {
4750  ((IntersectionCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->name = osglData->name;
4751  }
4752  break;
4753 
4754  case 179: /* intersectionConeComponentsStart: COMPONENTSSTART */
4755 {
4756  osglData->numberOfEl = 0;
4757  osglData->numberOfElPresent = false;
4758 }
4759  break;
4760 
4761  case 180: /* intersectionConeComponentsAttributes: osglNumberOfElATT */
4762 {
4763  osglData->osglCounter = 0;
4765 }
4766  break;
4767 
4768  case 186: /* intersectionConeComponentsEnd: COMPONENTSEND */
4769 {
4771  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of components does not match numberOfEl");
4772  ((IntersectionCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->components = new IntVector();
4773  ((IntersectionCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->components->numberOfEl
4774  = osglData->numberOfEl;
4775  ((IntersectionCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->components ->el
4777  osglData->osglIntArray = NULL; // to facilitate garbage collection without a segfault
4780 }
4781  break;
4782 
4783  case 190: /* matrixProgrammingStart: MATRIXPROGRAMMINGSTART */
4784 {
4785  osinstance->instanceData->matrixProgramming = new MatrixProgramming();
4786 }
4787  break;
4788 
4789  case 196: /* matrixVariables: matrixVariablesStart matrixVariablesAttributes matrixVariablesContent */
4790  {
4791  if (parserData->kounter < parserData->numberOfMatrixVar)
4792  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "actual number of matrixVar less than number attribute");
4793  }
4794  break;
4795 
4796  case 197: /* matrixVariablesStart: MATRIXVARIABLESSTART */
4797 {
4799 }
4800  break;
4801 
4802  case 198: /* matrixVariablesAttributes: numberOfMatrixVarATT */
4803 {
4804  osinstance->instanceData->matrixProgramming->matrixVariables->numberOfMatrixVar = parserData->numberOfMatrixVar;
4806  = new MatrixVar*[parserData->numberOfMatrixVar];
4807  for (int i=0; i < parserData->numberOfMatrixVar; i++)
4809  parserData->kounter = 0;
4810 }
4811  break;
4812 
4813  case 206: /* matrixVar: matrixVarStart matrixVarAttributes matrixVarEnd */
4814 {
4816 }
4817  break;
4818 
4819  case 207: /* matrixVarStart: MATRIXVARSTART */
4820 {
4821  osglData->numberOfRowsPresent = false;
4823  osglData->namePresent = false;
4824  osglData->multPresent = false;
4825  osglData->mult = 1;
4826  osglData->varTypePresent = false;
4827  parserData->templateMatrixIdxPresent = false;
4828  parserData->varReferenceMatrixIdxPresent = false;
4829  parserData->lbMatrixIdxPresent = false;
4830  parserData->lbConeIdxPresent = false;
4831  parserData->ubMatrixIdxPresent = false;
4832  parserData->ubConeIdxPresent = false;
4833 }
4834  break;
4835 
4836  case 208: /* matrixVarAttributes: matrixVarAttList */
4837 {
4838  if (osglData->numberOfRowsPresent == false)
4839  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mandatory attribute \"numberOfRows\" missing");
4840  if (osglData->numberOfColumnsPresent == false)
4841  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mandatory attribute \"numberOfColumns\" missing");
4842  if (parserData->kounter + osglData->mult > parserData->numberOfMatrixVar)
4844  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "actual number of matrixVar greater than number attribute");
4845  for (int i=0; i<osglData->mult; i++)
4846  {
4851  if (osglData->namePresent)
4853  = osglData->name;
4854  if (parserData->templateMatrixIdxPresent)
4856  = parserData->templateMatrixIdx;
4857  if (parserData->varReferenceMatrixIdxPresent)
4859  = parserData->varReferenceMatrixIdx;
4860  if (parserData->lbMatrixIdxPresent)
4862  = parserData->lbMatrixIdx;
4863  if (parserData->lbConeIdxPresent)
4865  = parserData->lbConeIdx;
4866  if (parserData->ubMatrixIdxPresent)
4868  = parserData->ubMatrixIdx;
4869  if (parserData->ubConeIdxPresent)
4871  = parserData->ubConeIdx;
4872  if (osglData->varTypePresent)
4873  {
4874  if (returnVarType(osglData->varType[0]) > 0)
4876  = osglData->varType[0];
4877  else
4879  "varType must be one of C, B, I, S, D, J");
4880  }
4881  }
4882 }
4883  break;
4884 
4885  case 225: /* matrixObjectives: matrixObjectivesStart matrixObjectivesAttributes matrixObjectivesContent */
4886  {
4887  if (parserData->kounter < parserData->numberOfMatrixObj)
4888  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "actual number of matrixObj less than number attribute");
4889  }
4890  break;
4891 
4892  case 226: /* matrixObjectivesStart: MATRIXOBJECTIVESSTART */
4893 {
4895 }
4896  break;
4897 
4898  case 227: /* matrixObjectivesAttributes: numberOfMatrixObjATT */
4899 {
4900  osinstance->instanceData->matrixProgramming->matrixObjectives->numberOfMatrixObj = parserData->numberOfMatrixObj;
4902  = new MatrixObj*[parserData->numberOfMatrixObj];
4903  for (int i=0; i < parserData->numberOfMatrixObj; i++)
4905  parserData->kounter = 0;
4906 }
4907  break;
4908 
4909  case 235: /* matrixObj: matrixObjStart matrixObjAttributes matrixObjEnd */
4910 {
4912 }
4913  break;
4914 
4915  case 236: /* matrixObjStart: MATRIXOBJSTART */
4916 {
4917  osglData->numberOfRowsPresent = false;
4919  osglData->namePresent = false;
4920  osglData->multPresent = false;
4921  osglData->mult = 1;
4922  parserData->templateMatrixIdxPresent = false;
4923  parserData->objReferenceMatrixIdxPresent = false;
4924  parserData->orderConeIdxPresent = false;
4925  parserData->constantMatrixIdxPresent = false;
4926 }
4927  break;
4928 
4929  case 237: /* matrixObjAttributes: matrixObjAttList */
4930 {
4931  if (osglData->numberOfRowsPresent == false)
4932  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mandatory attribute \"numberOfRows\" missing");
4933  if (osglData->numberOfColumnsPresent == false)
4934  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mandatory attribute \"numberOfColumns\" missing");
4935  if (parserData->kounter + osglData->mult > parserData->numberOfMatrixObj)
4937  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "actual number of matrixObj greater than number attribute");
4938  for (int i=0; i<osglData->mult; i++)
4939  {
4944  if (osglData->namePresent)
4946  = osglData->name;
4947  if (parserData->templateMatrixIdxPresent)
4949  = parserData->templateMatrixIdx;
4950  if (parserData->objReferenceMatrixIdxPresent)
4952  = parserData->objReferenceMatrixIdx;
4953  if (parserData->orderConeIdxPresent)
4955  = parserData->orderConeIdx;
4956  if (parserData->constantMatrixIdxPresent)
4958  = parserData->constantMatrixIdx;
4959  }
4960 }
4961  break;
4962 
4963  case 251: /* matrixConstraints: matrixConstraintsStart matrixConstraintsAttributes matrixConstraintsContent */
4964  {
4965  if (parserData->kounter < parserData->numberOfMatrixCon)
4966  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "actual number of matrixCon less than number attribute");
4967  }
4968  break;
4969 
4970  case 252: /* matrixConstraintsStart: MATRIXCONSTRAINTSSTART */
4971 {
4973 }
4974  break;
4975 
4976  case 253: /* matrixConstraintsAttributes: numberOfMatrixConATT */
4977 {
4978  osinstance->instanceData->matrixProgramming->matrixConstraints->numberOfMatrixCon = parserData->numberOfMatrixCon;
4980  = new MatrixCon*[parserData->numberOfMatrixCon];
4981  for (int i=0; i < parserData->numberOfMatrixCon; i++)
4983  parserData->kounter = 0;
4984 }
4985  break;
4986 
4987  case 261: /* matrixCon: matrixConStart matrixConAttributes matrixConEnd */
4988 {
4990 }
4991  break;
4992 
4993  case 262: /* matrixConStart: MATRIXCONSTART */
4994 {
4995  osglData->numberOfRowsPresent = false;
4997  osglData->namePresent = false;
4998  osglData->multPresent = false;
4999  osglData->mult = 1;
5000  parserData->templateMatrixIdxPresent = false;
5001  parserData->conReferenceMatrixIdxPresent = false;
5002  parserData->lbMatrixIdxPresent = false;
5003  parserData->lbConeIdxPresent = false;
5004  parserData->ubMatrixIdxPresent = false;
5005  parserData->ubConeIdxPresent = false;
5006 }
5007  break;
5008 
5009  case 263: /* matrixConAttributes: matrixConAttList */
5010 {
5011  if (osglData->numberOfRowsPresent == false)
5012  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mandatory attribute \"numberOfRows\" missing");
5013  if (osglData->numberOfColumnsPresent == false)
5014  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mandatory attribute \"numberOfColumns\" missing");
5015  if (parserData->kounter + osglData->mult > parserData->numberOfMatrixCon)
5017  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "actual number of matrixCon greater than number attribute");
5018  for (int i=0; i<osglData->mult; i++)
5019  {
5024  if (osglData->namePresent)
5026  = osglData->name;
5027  if (parserData->templateMatrixIdxPresent)
5029  = parserData->templateMatrixIdx;
5030  if (parserData->conReferenceMatrixIdxPresent)
5032  = parserData->conReferenceMatrixIdx;
5033  if (parserData->lbMatrixIdxPresent)
5035  = parserData->lbMatrixIdx;
5036  if (parserData->lbConeIdxPresent)
5038  = parserData->lbConeIdx;
5039  if (parserData->ubMatrixIdxPresent)
5041  = parserData->ubMatrixIdx;
5042  if (parserData->ubConeIdxPresent)
5044  = parserData->ubConeIdx;
5045  }
5046 }
5047  break;
5048 
5049  case 279: /* timeDomainStart: TIMEDOMAINSTART */
5050  {osinstance->instanceData->timeDomain = new TimeDomain();}
5051  break;
5052 
5053  case 286: /* stages: stagesstart osilNumberofstagesATT stagelist STAGESEND */
5054 {
5055  if( osinstance->instanceData->timeDomain->stages->numberOfStages > parserData->stagecount )
5056  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "actual number of stages less than numberOfStages");
5057  /* After stages have been processed, make sure that all variables and constraints have been assigned
5058  * to a stage (uniquely) and all objectives have been assigned as well (possibly more than once).
5059  * For future reference also record the stage to which each variable and constraint belongs.
5060  */
5061  parserData->m_miVarStageInfo = new int [ osinstance->instanceData->variables->numberOfVariables ];
5062  parserData->m_miObjStageInfo = new int [ osinstance->instanceData->objectives->numberOfObjectives ];
5063  parserData->m_miConStageInfo = new int [ osinstance->instanceData->constraints->numberOfConstraints ];
5064  parserData->nvarcovered = 0;
5065  for (int i = 0; i < osinstance->instanceData->variables->numberOfVariables; i++)
5066  parserData->m_miVarStageInfo[i] = -1;
5067  for (int i = 0; i < osinstance->instanceData->objectives->numberOfObjectives; i++)
5068  parserData->m_miObjStageInfo[i] = -1;
5069  for (int i = 0; i < osinstance->instanceData->constraints->numberOfConstraints; i++)
5070  parserData->m_miConStageInfo[i] = -1;
5071  for (int k = 0; k < osinstance->instanceData->timeDomain->stages->numberOfStages; k++)
5072  {for (int i = 0; i < osinstance->instanceData->timeDomain->stages->stage[k]->variables->numberOfVariables; i++)
5073  {
5074  if (parserData->m_miVarStageInfo[ osinstance->instanceData->timeDomain->stages->stage[k]->variables->var[i]->idx ] != -1)
5075  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "variable belongs to two stages");
5076  parserData->m_miVarStageInfo[ osinstance->instanceData->timeDomain->stages->stage[k]->variables->var[i]->idx ] = k;
5077  };
5078  parserData->nvarcovered += osinstance->instanceData->timeDomain->stages->stage[k]->variables->numberOfVariables;
5079  };
5080  if (parserData->nvarcovered != osinstance->instanceData->variables->numberOfVariables)
5081  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "some variables not assigned to any stage");
5082  parserData->nconcovered = 0;
5083  for (int k = 0; k < osinstance->instanceData->timeDomain->stages->numberOfStages; k++)
5084  {for (int i = 0; i < osinstance->instanceData->timeDomain->stages->stage[k]->constraints->numberOfConstraints; i++)
5085  {if (parserData->m_miConStageInfo[ osinstance->instanceData->timeDomain->stages->stage[k]->constraints->con[i]->idx ] != -1)
5086  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "constraint belongs to two stages");
5087  parserData->m_miConStageInfo[ osinstance->instanceData->timeDomain->stages->stage[k]->constraints->con[i]->idx ] = k;
5088  };
5089  parserData->nconcovered += osinstance->instanceData->timeDomain->stages->stage[k]->constraints->numberOfConstraints;
5090  };
5091  if (parserData->nconcovered != osinstance->instanceData->constraints->numberOfConstraints)
5092  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "some constraints not assigned to any stage");
5093  for (int k = 0; k < osinstance->instanceData->timeDomain->stages->numberOfStages; k++)
5094  { for (int i = 0; i < osinstance->instanceData->timeDomain->stages->stage[k]->objectives->numberOfObjectives; i++)
5095  { if (parserData->m_miObjStageInfo[ -osinstance->instanceData->timeDomain->stages->stage[k]->objectives->obj[i]->idx-1 ] == -1)
5096  parserData->m_miObjStageInfo[ -osinstance->instanceData->timeDomain->stages->stage[k]->objectives->obj[i]->idx-1 ] = k;
5097  };
5098  };
5099  for (int i = 0; i < osinstance->instanceData->objectives->numberOfObjectives; i++)
5100  if (parserData->m_miObjStageInfo[i] == -1)
5101  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "some objectives not assigned to any stage");
5102 }
5103  break;
5104 
5105  case 287: /* stagesstart: STAGESSTART */
5106  {osinstance->instanceData->timeDomain->stages = new TimeDomainStages();}
5107  break;
5108 
5109  case 288: /* osilNumberofstagesATT: NUMBEROFSTAGESATT QUOTE INTEGER QUOTE GREATERTHAN */
5110  {
5111  if ( *(yyvsp[-3].sval) != *(yyvsp[-1].sval) ) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
5112  if ((yyvsp[-2].ival) < 1) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of stages must be positive");
5113  osinstance->instanceData->timeDomain->stages->numberOfStages = (yyvsp[-2].ival);
5114  if (osinstance->instanceData->timeDomain->stages->numberOfStages > 0 )
5115  osinstance->instanceData->timeDomain->stages->stage = new TimeDomainStage*[ (yyvsp[-2].ival) ];
5116  for(int i = 0; i < (yyvsp[-2].ival); i++)
5117  { osinstance->instanceData->timeDomain->stages->stage[i] = new TimeDomainStage();
5121  }
5122 }
5123  break;
5124 
5125  case 291: /* $@1: %empty */
5126  {
5127  if( osinstance->instanceData->timeDomain->stages->numberOfStages <= parserData->stagecount)
5128  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many stages");
5129  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->variables->numberOfVariables = 0;
5130  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->constraints->numberOfConstraints = 0;
5131  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->numberOfObjectives = 0;
5132 }
5133  break;
5134 
5135  case 292: /* stage: $@1 STAGESTART osilStagenameATT stageend */
5136  { /* set defaults for next stage */
5137  parserData->stagenameON = false;
5138  parserData->stageVariablesON = false;
5139  parserData->stageObjectivesON = false;
5140  parserData->stageConstraintsON = false;
5141  parserData->stageVariablesOrdered = false;
5142  parserData->stageObjectivesOrdered = false;
5143  parserData->stageConstraintsOrdered = false;
5144  parserData->stageVariableStartIdx = 0;
5145  parserData->stageObjectiveStartIdx = 0;
5146  parserData->stageConstraintStartIdx = 0;
5147  parserData->stagevarcount = 0;
5148  parserData->stageconcount = 0;
5149  parserData->stageobjcount = 0;
5150  parserData->stagecount++;
5151 }
5152  break;
5153 
5154  case 294: /* osilStagenameATT: NAMEATT ATTRIBUTETEXT QUOTE */
5155  {
5156  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->name = (yyvsp[-1].sval); free((yyvsp[-1].sval));}
5157  break;
5158 
5159  case 299: /* stagevariables: VARIABLESSTART anotherstagevarATT restofstagevariables */
5160  {
5161  parserData->stageVariablesON = true;
5162  }
5163  break;
5164 
5165  case 304: /* osilNumberofstagevariablesATT: NUMBEROFVARIABLESATT QUOTE INTEGER QUOTE */
5166 {
5167  if (*(yyvsp[-2].sval) != *(yyvsp[0].sval))
5168  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5169  if ((yyvsp[-1].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of variables cannot be negative");
5170  if ((yyvsp[-1].ival) > osinstance->instanceData->variables->numberOfVariables)
5171  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many variables in this stage");
5172  if ((yyvsp[-1].ival) > 0) {
5173  if (osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->variables->numberOfVariables > 0)
5174  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "duplicate attribute numberOfVariables");
5175  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->variables->numberOfVariables = (yyvsp[-1].ival);
5176  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->variables->var = new TimeDomainStageVar*[ (yyvsp[-1].ival) ];
5177  for (int i = 0; i < (yyvsp[-1].ival); i++)
5178  { osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->variables->var[i] = new TimeDomainStageVar;
5179  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->variables->var[i]->idx = 0;
5180  }
5181  };
5182 }
5183  break;
5184 
5185  case 305: /* osilStagevarstartidxATT: STARTIDXATT QUOTE INTEGER QUOTE */
5186 {
5187  if (*(yyvsp[-2].sval) != *(yyvsp[0].sval))
5188  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5189  if (parserData->stageVariablesOrdered == true) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "duplicate attribute");
5190  if ((yyvsp[-1].ival) < 0 && (yyvsp[-1].ival) >= osinstance->instanceData->variables->numberOfVariables)
5191  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "variable index out of range");
5192  parserData->stageVariablesOrdered = true;
5193  parserData->stageVariableStartIdx = (yyvsp[-1].ival);
5194 }
5195  break;
5196 
5197  case 306: /* restofstagevariables: emptyvarlist */
5198  {
5199  if ((parserData->stageVariablesOrdered != true) &&
5200  (osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->variables->numberOfVariables > 0) )
5201  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "varlist missing");
5202  for (int i = 0; i < osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->variables->numberOfVariables; i++)
5203  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->variables->var[i]->idx = parserData->stageVariableStartIdx + i;
5204  }
5205  break;
5206 
5207  case 307: /* restofstagevariables: GREATERTHAN stagevarlist VARIABLESEND */
5208  {
5209  if (parserData->stagevarcount < osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->variables->numberOfVariables)
5210  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too few variables supplied");
5211  }
5212  break;
5213 
5214  case 312: /* $@2: %empty */
5215  {if (parserData->stageVariablesOrdered == true) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "no varlist expected");}
5216  break;
5217 
5218  case 314: /* osilStagevaridxATT: IDXATT QUOTE INTEGER QUOTE */
5219 {
5220  if (*(yyvsp[-2].sval) != *(yyvsp[0].sval))
5221  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5222  if ((yyvsp[-1].ival) < 0 || (yyvsp[-1].ival) >= osinstance->instanceData->variables->numberOfVariables)
5223  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "variable index out of range");
5224  if (parserData->stagevarcount >= osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->variables->numberOfVariables)
5225  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many variables in this stage");
5226  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->variables->var[parserData->stagevarcount]->idx = (yyvsp[-1].ival);
5227  parserData->stagevarcount++;
5228 }
5229  break;
5230 
5231  case 318: /* stageconstraints: CONSTRAINTSSTART anotherstageconATT restofstageconstraints */
5232  {
5233  parserData->stageConstraintsON = true;
5234  }
5235  break;
5236 
5237  case 323: /* osilNumberofstageconstraintsATT: NUMBEROFCONSTRAINTSATT QUOTE INTEGER QUOTE */
5238 {
5239  if (*(yyvsp[-2].sval) != *(yyvsp[0].sval))
5240  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5241  if ((yyvsp[-1].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of constraints cannot be negative");
5242  if ((yyvsp[-1].ival) > osinstance->instanceData->constraints->numberOfConstraints)
5243  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many constraints in this stage");
5244  if ((yyvsp[-1].ival) > 0) {
5245  if (osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->constraints->numberOfConstraints > 0)
5246  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "duplicate attribute numberOfConstraints");
5247  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->constraints->numberOfConstraints = (yyvsp[-1].ival);
5248  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->constraints->con = new TimeDomainStageCon*[ (yyvsp[-1].ival) ];
5249  for (int i = 0; i < (yyvsp[-1].ival); i++)
5250  { osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->constraints->con[i] = new TimeDomainStageCon;
5251  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->constraints->con[i]->idx = 0;
5252  }
5253  };
5254 }
5255  break;
5256 
5257  case 324: /* osilStageconstartidxATT: STARTIDXATT QUOTE INTEGER QUOTE */
5258 {
5259  if (*(yyvsp[-2].sval) != *(yyvsp[0].sval))
5260  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5261  if (parserData->stageConstraintsOrdered == true) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "duplicate attribute");
5262  if ((yyvsp[-1].ival) < 0 && (yyvsp[-1].ival) >= osinstance->instanceData->constraints->numberOfConstraints)
5263  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "constraint index out of range");
5264  parserData->stageConstraintsOrdered = true;
5265  parserData->stageConstraintStartIdx = (yyvsp[-1].ival);
5266 }
5267  break;
5268 
5269  case 325: /* restofstageconstraints: emptyconlist */
5270  {
5271  if ((parserData->stageConstraintsOrdered != true) &&
5272  (osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->constraints->numberOfConstraints > 0) )
5273  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "conlist missing");
5274  for (int i = 0; i < osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->constraints->numberOfConstraints; i++)
5275  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->constraints->con[i]->idx = parserData->stageConstraintStartIdx + i;
5276  }
5277  break;
5278 
5279  case 326: /* restofstageconstraints: GREATERTHAN stageconlist CONSTRAINTSEND */
5280  {
5281  if (parserData->stageconcount < osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->constraints->numberOfConstraints)
5282  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too few constraints supplied");
5283  }
5284  break;
5285 
5286  case 331: /* $@3: %empty */
5287  {if (parserData->stageConstraintsOrdered == true) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "no conlist expected");}
5288  break;
5289 
5290  case 333: /* osilStageconidxATT: IDXATT QUOTE INTEGER QUOTE */
5291 {
5292  if (*(yyvsp[-2].sval) != *(yyvsp[0].sval))
5293  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5294  if ((yyvsp[-1].ival) < 0 || (yyvsp[-1].ival) >= osinstance->instanceData->constraints->numberOfConstraints)
5295  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "constraint index out of range");
5296  if (parserData->stageconcount >= osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->constraints->numberOfConstraints)
5297  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many constraints in this stage");
5298  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->constraints->con[parserData->stageconcount]->idx = (yyvsp[-1].ival);
5299  parserData->stageconcount++;
5300 }
5301  break;
5302 
5303  case 336: /* stageobjectives: %empty */
5304  { /* By default, an objective belongs to every stage */
5307  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->obj =
5309  for (int i = 0; i < osinstance->instanceData->objectives->numberOfObjectives; i++)
5310  { osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->obj[i] = new TimeDomainStageObj;
5311  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->obj[i]->idx = -(i+1);
5312  }
5313  }
5314  break;
5315 
5316  case 337: /* stageobjectives: OBJECTIVESSTART anotherstageobjATT restofstageobjectives */
5317  {
5318  parserData->stageObjectivesON = true;
5319  }
5320  break;
5321 
5322  case 342: /* osilNumberofstageobjectivesATT: NUMBEROFOBJECTIVESATT QUOTE INTEGER QUOTE */
5323 {
5324  if (*(yyvsp[-2].sval) != *(yyvsp[0].sval))
5325  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5326  if ((yyvsp[-1].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of objectives cannot be negative");
5327  if ((yyvsp[-1].ival) > osinstance->instanceData->objectives->numberOfObjectives)
5328  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many objectives in this stage");
5329  if ((yyvsp[-1].ival) > 0) {
5330  if (osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->numberOfObjectives > 0)
5331  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "duplicate attribute numberOfObjectives");
5332  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->numberOfObjectives = (yyvsp[-1].ival);
5333  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->obj = new TimeDomainStageObj*[ (yyvsp[-1].ival) ];
5334  for (int i = 0; i < (yyvsp[-1].ival); i++)
5335  { osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->obj[i] = new TimeDomainStageObj;
5336  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->obj[i]->idx = 0;
5337  }
5338  };
5339 }
5340  break;
5341 
5342  case 343: /* restofstageobjectives: emptyobjlist */
5343  {
5344  if ((parserData->stageObjectivesOrdered != true) &&
5345  (osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->numberOfObjectives > 0) )
5346  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "objlist missing");
5347  for (int i = 0; i < osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->numberOfObjectives; i++)
5348  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->obj[i]->idx = parserData->stageObjectiveStartIdx - i;
5349  }
5350  break;
5351 
5352  case 344: /* restofstageobjectives: GREATERTHAN stageobjlist OBJECTIVESEND */
5353  {
5354  if (parserData->stageobjcount < osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->numberOfObjectives)
5355  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too few objectives supplied");
5356  }
5357  break;
5358 
5359  case 349: /* $@4: %empty */
5360  {if (parserData->stageObjectivesOrdered == true) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "no objlist expected");}
5361  break;
5362 
5363  case 351: /* osilStageobjidxATT: IDXATT QUOTE INTEGER QUOTE */
5364 {
5365  if (*(yyvsp[-2].sval) != *(yyvsp[0].sval))
5366  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5367  if ((yyvsp[-1].ival) >= 0 || (yyvsp[-1].ival) >= -osinstance->instanceData->objectives->numberOfObjectives - 1)
5368  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "objective index out of range");
5369  if (parserData->stageobjcount >= osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->numberOfObjectives)
5370  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many objectives in this stage");
5371  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->obj[parserData->stageobjcount]->idx = (yyvsp[-1].ival);
5372  parserData->stageobjcount++;
5373 }
5374  break;
5375 
5376  case 354: /* $@5: %empty */
5377  {osinstance->instanceData->timeDomain->interval = new TimeDomainInterval();
5378  }
5379  break;
5380 
5381  case 355: /* interval: $@5 INTERVALSTART anotherIntervalATT intervalend */
5382  {
5383  parserData->intervalhorizonON = false;
5384  parserData->intervalstartON = false;
5385  printf("Interval not yet supported.\n\n");
5386 }
5387  break;
5388 
5389  case 360: /* intervalatt: osilIntervalhorizonATT */
5390  { if(parserData->intervalhorizonON)
5391  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many interval horizon attributes");
5392  parserData->intervalhorizonON = true; }
5393  break;
5394 
5395  case 361: /* intervalatt: osilIntervalstartATT */
5396  { if(parserData->intervalstartON)
5397  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many interval start attributes");
5398  parserData->intervalstartON = true; }
5399  break;
5400 
5401  case 362: /* osilStageobjstartidxATT: STARTIDXATT QUOTE INTEGER QUOTE */
5402 {
5403  if (*(yyvsp[-2].sval) != *(yyvsp[0].sval))
5404  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5405  if (parserData->stageObjectivesOrdered == true) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "duplicate attribute");
5406  if ((yyvsp[-1].ival) >= 0 && (yyvsp[-1].ival) <= -osinstance->instanceData->objectives->numberOfObjectives - 1)
5407  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "objective index out of range");
5408  parserData->stageObjectivesOrdered = true;
5409  parserData->stageObjectiveStartIdx = (yyvsp[-1].ival);
5410 }
5411  break;
5412 
5413  case 363: /* osilIntervalhorizonATT: HORIZONATT QUOTE aNumber QUOTE */
5414 {
5415  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) ) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
5416  parserData->intervalhorizon = parserData->tempVal;}
5417  break;
5418 
5419  case 364: /* osilIntervalstartATT: STARTATT QUOTE aNumber QUOTE */
5420  {
5421  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) ) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
5422  parserData->intervalstart = parserData->tempVal;}
5423  break;
5424 
5425  case 365: /* numberOfMatricesATT: NUMBEROFMATRICESATT QUOTE INTEGER QUOTE */
5426 {
5427  if (*(yyvsp[-2].sval) != *(yyvsp[0].sval))
5428  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5430  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "numberOfMatrices attribute previously set");
5431  if ((yyvsp[-1].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of <matrix> elements cannot be negative");
5434 }
5435  break;
5436 
5437  case 366: /* numberOfConesATT: NUMBEROFCONESATT QUOTE INTEGER QUOTE */
5438 {
5439  if (*(yyvsp[-2].sval) != *(yyvsp[0].sval))
5440  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5441  if (parserData->numberOfConesPresent)
5442  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "numberOfCones attribute previously set");
5443  if ((yyvsp[-1].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of <cone> elements cannot be negative");
5444  parserData->numberOfConesPresent = true;
5445  parserData->numberOfCones = (yyvsp[-1].ival);
5446 }
5447  break;
5448 
5449  case 367: /* numberOfMatrixVarATT: NUMBEROFMATRIXVARATT QUOTE INTEGER QUOTE */
5450 {
5451  if (*(yyvsp[-2].sval) != *(yyvsp[0].sval))
5452  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5453  if ((yyvsp[-1].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of matrix variables cannot be negative");
5454  parserData->numberOfMatrixVar = (yyvsp[-1].ival);
5455 }
5456  break;
5457 
5458  case 368: /* numberOfMatrixObjATT: NUMBEROFMATRIXOBJATT QUOTE INTEGER QUOTE */
5459 {
5460  if (*(yyvsp[-2].sval) != *(yyvsp[0].sval))
5461  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5462  if ((yyvsp[-1].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of matrix objectives cannot be negative");
5463  parserData->numberOfMatrixObj = (yyvsp[-1].ival);
5464 }
5465  break;
5466 
5467  case 369: /* numberOfMatrixConATT: NUMBEROFMATRIXCONATT QUOTE INTEGER QUOTE */
5468 {
5469  if (*(yyvsp[-2].sval) != *(yyvsp[0].sval))
5470  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5471  if ((yyvsp[-1].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of matrix constraints cannot be negative");
5472  parserData->numberOfMatrixCon = (yyvsp[-1].ival);
5473 }
5474  break;
5475 
5476  case 370: /* normScaleFactorATT: NORMSCALEFACTORATT QUOTE aNumber QUOTE */
5477 {
5478  if (*(yyvsp[-2].sval) != *(yyvsp[0].sval))
5479  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5480  if (parserData->normScaleFactorPresent)
5481  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "normScaleFactor attribute previously set");
5482  if (parserData->tempVal <= 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "scale factor must be positive");
5483  parserData->normScaleFactorPresent = true;
5484  parserData->normScaleFactor = parserData->tempVal;
5485 }
5486  break;
5487 
5488  case 371: /* distortionMatrixIdxATT: DISTORTIONMATRIXIDXATT QUOTE INTEGER QUOTE */
5489 {
5490  if (*(yyvsp[-2].sval) != *(yyvsp[0].sval))
5491  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5492  if (parserData->distortionMatrixPresent)
5493  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "distortionMatrixIdx attribute previously set");
5494  if ((yyvsp[-1].ival) <= 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "distortion matrix index cannot be negative");
5495  parserData->distortionMatrixPresent = true;
5496  parserData->distortionMatrix = (yyvsp[-1].ival);
5497 }
5498  break;
5499 
5500  case 372: /* axisDirectionATT: AXISDIRECTIONATT QUOTE INTEGER QUOTE */
5501 {
5502  if (*(yyvsp[-2].sval) != *(yyvsp[0].sval))
5503  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5504  if (parserData->axisDirectionPresent)
5505  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "axisDirection attribute previously set");
5506  if ((yyvsp[-1].ival) <= 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "axis direction index cannot be negative");
5507  parserData->axisDirectionPresent = true;
5508  parserData->axisDirection = (yyvsp[-1].ival);
5509 }
5510  break;
5511 
5512  case 373: /* firstAxisDirectionATT: FIRSTAXISDIRECTIONATT QUOTE INTEGER QUOTE */
5513 {
5514  if (*(yyvsp[-2].sval) != *(yyvsp[0].sval))
5515  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5516  if (parserData->firstAxisDirectionPresent)
5517  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "firstAxisDirection attribute previously set");
5518  if ((yyvsp[-1].ival) <= 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "axis direction index cannot be negative");
5519  parserData->firstAxisDirectionPresent = true;
5520  parserData->firstAxisDirection = (yyvsp[-1].ival);
5521 }
5522  break;
5523 
5524  case 374: /* secondAxisDirectionATT: SECONDAXISDIRECTIONATT QUOTE INTEGER QUOTE */
5525 {
5526  if (*(yyvsp[-2].sval) != *(yyvsp[0].sval))
5527  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5528  if (parserData->secondAxisDirectionPresent)
5529  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "secondAxisDirection attribute previously set");
5530  if ((yyvsp[-1].ival) <= 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "axis direction index cannot be negative");
5531  parserData->secondAxisDirectionPresent = true;
5532  parserData->secondAxisDirection = (yyvsp[-1].ival);
5533 }
5534  break;
5535 
5536  case 375: /* semidefinitenessATT: SEMIDEFINITENESSATT ATTRIBUTETEXT QUOTE */
5537 {
5538  if (parserData->semidefinitenessPresent)
5539  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "name attribute previously set");
5540  parserData->semidefinitenessPresent = true;
5541  if (strcmp((yyvsp[-1].sval), "positive") && strcmp((yyvsp[-1].sval), "negative"))
5542  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "semidefiniteness must be either \"positive\" or \"negative\"");
5543  else
5544  parserData->semidefiniteness = (yyvsp[-1].sval);
5545  free((yyvsp[-1].sval));
5546 }
5547  break;
5548 
5549  case 376: /* matrixIdxATT: MATRIXIDXATT QUOTE INTEGER QUOTE */
5550 {
5551  if (*(yyvsp[-2].sval) != *(yyvsp[0].sval))
5552  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5553  if (parserData->matrixIdxPresent)
5554  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "matrixIdx attribute previously set");
5555  if ((yyvsp[-1].ival) <= 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "matrix index cannot be negative");
5556  parserData->matrixIdxPresent = true;
5557  parserData->matrixIdx = (yyvsp[-1].ival);
5558 }
5559  break;
5560 
5561  case 377: /* lbMatrixIdxATT: LBMATRIXIDXATT QUOTE INTEGER QUOTE */
5562 {
5563  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
5564  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
5565  if (parserData->lbMatrixIdxPresent)
5566  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "only one lbMatrix attribute allowed");
5567  if ((yyvsp[-1].ival) < 0 || (yyvsp[-1].ival) >= osinstance->instanceData->matrices->numberOfMatrices)
5568  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "illegal value for lbMatrix attribute");
5569  parserData->lbMatrixIdxPresent = true;
5570  parserData->lbMatrixIdx = (yyvsp[-1].ival);
5571 }
5572  break;
5573 
5574  case 378: /* ubMatrixIdxATT: UBMATRIXIDXATT QUOTE INTEGER QUOTE */
5575 {
5576  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
5577  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
5578  if (parserData->ubMatrixIdxPresent)
5579  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "only one ubMatrix attribute allowed");
5580  if ((yyvsp[-1].ival) < 0 || (yyvsp[-1].ival) >= osinstance->instanceData->matrices->numberOfMatrices)
5581  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "illegal value for ubMatrix attribute");
5582  parserData->ubMatrixIdxPresent = true;
5583  parserData->ubMatrixIdx = (yyvsp[-1].ival);
5584 }
5585  break;
5586 
5587  case 379: /* constantMatrixIdxATT: CONSTANTMATRIXIDXATT QUOTE INTEGER QUOTE */
5588 {
5589  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
5590  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
5591  if (parserData->constantMatrixIdxPresent)
5592  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "only one constant matrix attribute allowed");
5593  if ((yyvsp[-1].ival) < 0 || (yyvsp[-1].ival) >= osinstance->instanceData->matrices->numberOfMatrices)
5594  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "illegal value for constant matrix attribute");
5595  parserData->constantMatrixIdxPresent = true;
5596  parserData->constantMatrixIdx = (yyvsp[-1].ival);
5597 }
5598  break;
5599 
5600  case 380: /* templateMatrixIdxATT: TEMPLATEMATRIXIDXATT QUOTE INTEGER QUOTE */
5601 {
5602  if (*(yyvsp[-2].sval) != *(yyvsp[0].sval))
5603  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5604  if (parserData->templateMatrixIdxPresent)
5605  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "templateMatrixIdx attribute previously set");
5606  if ((yyvsp[-1].ival) < 0 || (yyvsp[-1].ival) >= osinstance->instanceData->matrices->numberOfMatrices)
5607  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "template matrix index cannot be negative");
5608  parserData->templateMatrixIdxPresent = true;
5609  parserData->templateMatrixIdx = (yyvsp[-1].ival);
5610 }
5611  break;
5612 
5613  case 381: /* varReferenceMatrixIdxATT: VARREFERENCEMATRIXIDXATT QUOTE INTEGER QUOTE */
5614 {
5615  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
5616  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
5617  if (parserData->varReferenceMatrixIdxPresent)
5618  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "only one varReference matrix attribute allowed");
5619  if ((yyvsp[-1].ival) < 0 || (yyvsp[-1].ival) >= osinstance->instanceData->matrices->numberOfMatrices)
5620  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "illegal value for varReference matrix attribute");
5621  parserData->varReferenceMatrixIdxPresent = true;
5622  parserData->varReferenceMatrixIdx = (yyvsp[-1].ival);
5623 }
5624  break;
5625 
5626  case 382: /* objReferenceMatrixIdxATT: OBJREFERENCEMATRIXIDXATT QUOTE INTEGER QUOTE */
5627 {
5628  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
5629  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
5630  if (parserData->objReferenceMatrixIdxPresent)
5631  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "only one objReference matrix attribute allowed");
5632  if ((yyvsp[-1].ival) < 0 || (yyvsp[-1].ival) >= osinstance->instanceData->matrices->numberOfMatrices)
5633  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "illegal value for objReference matrix attribute");
5634  parserData->objReferenceMatrixIdxPresent = true;
5635  parserData->objReferenceMatrixIdx = (yyvsp[-1].ival);
5636 }
5637  break;
5638 
5639  case 383: /* conReferenceMatrixIdxATT: CONREFERENCEMATRIXIDXATT QUOTE INTEGER QUOTE */
5640 {
5641  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
5642  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
5643  if (parserData->conReferenceMatrixIdxPresent)
5644  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "only one conReference matrix attribute allowed");
5645  if ((yyvsp[-1].ival) < 0 || (yyvsp[-1].ival) >= osinstance->instanceData->matrices->numberOfMatrices)
5646  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "illegal value for conReference matrix attribute");
5647  parserData->conReferenceMatrixIdxPresent = true;
5648  parserData->conReferenceMatrixIdx = (yyvsp[-1].ival);
5649 }
5650  break;
5651 
5652  case 384: /* lbConeIdxATT: LBCONEIDXATT QUOTE INTEGER QUOTE */
5653 {
5654  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
5655  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
5656  if (parserData->lbConeIdxPresent)
5657  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "only one lbCone attribute allowed");
5658  if ((yyvsp[-1].ival) < 0 || (yyvsp[-1].ival) >= osinstance->instanceData->cones->numberOfCones)
5659  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "illegal value for lbCone attribute");
5660  parserData->lbConeIdxPresent = true;
5661  parserData->lbConeIdx = (yyvsp[-1].ival);
5662 }
5663  break;
5664 
5665  case 385: /* ubConeIdxATT: UBCONEIDXATT QUOTE INTEGER QUOTE */
5666 {
5667  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
5668  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
5669  if (parserData->ubConeIdxPresent)
5670  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "only one ubCone attribute allowed");
5671  if ((yyvsp[-1].ival) < 0 || (yyvsp[-1].ival) >= osinstance->instanceData->cones->numberOfCones)
5672  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "illegal value for ubCone attribute");
5673  parserData->ubConeIdxPresent = true;
5674  parserData->ubConeIdx = (yyvsp[-1].ival);
5675 }
5676  break;
5677 
5678  case 386: /* orderConeIdxATT: ORDERCONEIDXATT QUOTE INTEGER QUOTE */
5679 {
5680  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
5681  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
5682  if (parserData->orderConeIdxPresent)
5683  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "only one orderCone attribute allowed");
5684  if ((yyvsp[-1].ival) < 0 || (yyvsp[-1].ival) >= osinstance->instanceData->cones->numberOfCones)
5685  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "illegal value for orderCone attribute");
5686  parserData->orderConeIdxPresent = true;
5687  parserData->orderConeIdx = (yyvsp[-1].ival);
5688 }
5689  break;
5690 
5691  case 387: /* aNumber: xmlWhiteSpace INTEGER xmlWhiteSpace */
5692  {parserData->tempVal = (yyvsp[-1].ival);}
5693  break;
5694 
5695  case 388: /* aNumber: xmlWhiteSpace DOUBLE xmlWhiteSpace */
5696  {parserData->tempVal = (yyvsp[-1].dval);}
5697  break;
5698 
5699  case 396: /* osglIntArrayData: osglIntVectorElArray */
5700  {
5702  {
5703  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "fewer data elements than specified");
5705  }
5706  }
5707  break;
5708 
5709  case 401: /* osglIntVectorElStart: ELSTART */
5710 {
5711  osglData->multPresent = false;
5712  osglData->incrPresent = false;
5713  osglData->mult = 1;
5714  osglData->incr = 0;
5715 }
5716  break;
5717 
5718  case 407: /* osglIntVectorElContent: GREATERTHAN INTEGER ELEND */
5719 {
5721  {
5723  {
5724  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more data elements than specified");
5727  }
5728  }
5729  else
5730  for (int i=0; i<osglData->mult; i++)
5732 }
5733  break;
5734 
5735  case 413: /* osglIntVectorBase64Laden: GREATERTHAN ELEMENTTEXT BASE64END */
5736 {
5737  char* b64string = (yyvsp[-1].sval);
5738  if( b64string == NULL)
5739  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "base 64 data expected");
5740  if (osglData->base64Size != sizeof(int))
5741  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "base 64 encoded with a size of int different than on this machine");
5742 
5743  std::string base64decodeddata = Base64::decodeb64( b64string );
5744  int base64decodeddatalength = base64decodeddata.length();
5745  int *intvec = NULL;
5746  if ( osglData->numberOfEl != (base64decodeddatalength/osglData->base64Size) )
5747  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "base 64 data length does not match numberOfEl");
5748  else
5749  {
5750  intvec = (int*)&base64decodeddata[0];
5751  for(int i = 0; i < (base64decodeddatalength/osglData->base64Size); i++)
5752  {
5753  osglData->osglIntArray[i] = *(intvec++);
5754  }
5755  }
5756  //delete[] b64string;
5757  free((yyvsp[-1].sval));
5758 }
5759  break;
5760 
5761  case 414: /* osglDblArrayData: osglDblVectorElArray */
5762  {
5764  {
5765  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "fewer data elements than specified");
5767  }
5768  }
5769  break;
5770 
5771  case 419: /* osglDblVectorElStart: ELSTART */
5772 {
5773  osglData->multPresent = false;
5774  osglData->incrPresent = false;
5775  osglData->mult = 1;
5776 }
5777  break;
5778 
5779  case 422: /* osglDblVectorElContent: GREATERTHAN aNumber ELEND */
5780 {
5782  {
5784  {
5785  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more data elements than specified");
5788  }
5789  }
5790  else
5791  for (int i=0; i<osglData->mult; i++)
5793 }
5794  break;
5795 
5796  case 428: /* osglDblVectorBase64Laden: GREATERTHAN ELEMENTTEXT BASE64END */
5797 {
5798  char* b64string = (yyvsp[-1].sval);
5799  if( b64string == NULL)
5800  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "base 64 data expected");
5801  if (osglData->base64Size != sizeof(int))
5802  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "base 64 encoded with a size of int different than on this machine");
5803 
5804  std::string base64decodeddata = Base64::decodeb64( b64string );
5805  int base64decodeddatalength = base64decodeddata.length();
5806  double *dblvec = NULL;
5807  if ( osglData->numberOfEl != (base64decodeddatalength/osglData->base64Size) )
5808  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "base 64 data length does not match numberOfEl");
5809  else
5810  {
5811  dblvec = (double*)&base64decodeddata[0];
5812  for(int i = 0; i < (base64decodeddatalength/osglData->base64Size); i++)
5813  {
5814  osglData->osglDblArray[i] = *(dblvec++);
5815  }
5816  }
5817  //delete[] b64string;
5818  free((yyvsp[-1].sval));
5819 }
5820  break;
5821 
5822  case 429: /* osglMatrix: matrixStart matrixAttributes matrixContent */
5823 {
5824 // IMPORTANT -- HERE IS WHERE WE CREATE THE CONSTRUCTOR LISTS
5829 }
5830  break;
5831 
5832  case 430: /* matrixStart: MATRIXSTART */
5833 {
5835  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more matrices than specified");
5836  osglData->symmetryPresent = false;
5837  osglData->typePresent = false;
5838  osglData->numberOfRowsPresent = false;
5840  osglData->namePresent = false;
5841  osglData->mtxConstructorVec.clear();
5842  osglData->mtxBlocksVec.clear();
5843  osglData->mtxBlkVec.clear();
5844  osglData->nBlocksVec.clear();
5845 
5850  osglData->tempC = new OSMatrix();
5852  osglData->mtxBlkVec.push_back((OSMatrix*)osglData->tempC);
5853 }
5854  break;
5855 
5856  case 431: /* matrixAttributes: matrixAttributeList */
5857 {
5858  if (osglData->numberOfRowsPresent == false)
5859  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mandatory attribute numberOfRows is missing");
5860  else
5861  ((OSMatrix*)osglData->tempC)->numberOfRows = osglData->numberOfRows;
5862  if (osglData->numberOfColumnsPresent == false)
5863  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mandatory attribute numberOfColumns is missing");
5864  else
5865  ((OSMatrix*)osglData->tempC)->numberOfColumns = osglData->numberOfColumns;
5866  if (osglData->symmetryPresent == true)
5868  if (osglData->namePresent == true)
5869  ((OSMatrix*)osglData->tempC)->name = osglData->name;
5870  if (osglData->typePresent == true)
5872 }
5873  break;
5874 
5875  case 439: /* matrixVarStart: MATRIXVARSTART */
5876 {
5878  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more matrices than specified");
5879  osglData->symmetryPresent = false;
5880  osglData->typePresent = false;
5881  osglData->numberOfRowsPresent = false;
5883  osglData->namePresent = false;
5884  osglData->matrixVarIdxPresent = false;
5885 
5886  osglData->mtxConstructorVec.clear();
5887  osglData->mtxBlocksVec.clear();
5888  osglData->mtxBlkVec.clear();
5889  osglData->nBlocksVec.clear();
5890 
5898 }
5899  break;
5900 
5901  case 440: /* matrixObjStart: MATRIXOBJSTART */
5902 {
5904  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more matrices than specified");
5905  osglData->symmetryPresent = false;
5906  osglData->typePresent = false;
5907  osglData->numberOfRowsPresent = false;
5909  osglData->namePresent = false;
5910  osglData->matrixObjIdxPresent = false;
5911 
5912  osglData->mtxConstructorVec.clear();
5913  osglData->mtxBlocksVec.clear();
5914  osglData->mtxBlkVec.clear();
5915  osglData->nBlocksVec.clear();
5916 
5924 }
5925  break;
5926 
5927  case 441: /* matrixConStart: MATRIXCONSTART */
5928 {
5930  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more matrices than specified");
5931  osglData->symmetryPresent = false;
5932  osglData->typePresent = false;
5933  osglData->numberOfRowsPresent = false;
5935  osglData->namePresent = false;
5936  osglData->matrixConIdxPresent = false;
5937 
5938  osglData->mtxConstructorVec.clear();
5939  osglData->mtxBlocksVec.clear();
5940  osglData->mtxBlkVec.clear();
5941  osglData->nBlocksVec.clear();
5942 
5950 }
5951  break;
5952 
5953  case 445: /* matrixLaden: GREATERTHAN matrixBody MATRIXEND */
5954 {
5955  osglData->mtxBlkVec.back()->m_mChildren =
5956  new MatrixNode*[osglData->mtxBlkVec.back()->inumberOfChildren];
5957  osglData->mtxBlkVec.pop_back();
5958 }
5959  break;
5960 
5961  case 448: /* baseMatrix: baseMatrixStart baseMatrixAttributes baseMatrixEnd */
5962 {
5963  osglData->mtxBlkVec.back()->inumberOfChildren++;
5964 }
5965  break;
5966 
5967  case 449: /* baseMatrixStart: BASEMATRIXSTART */
5968 {
5969  osglData->tempC = new BaseMatrix();
5971 
5972  osglData->baseMatrixIdxPresent = false;
5979  osglData->baseTransposePresent = false;
5981  osglData->baseMatrixEndRow = -1;
5982  osglData->baseMatrixEndCol = -1;
5983 }
5984  break;
5985 
5986  case 450: /* baseMatrixAttributes: baseMatrixAttList */
5987 {
5988  if (osglData->baseMatrixIdxPresent == false)
5989  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mandatory attribute baseMatrixIdx is missing");
5990  else
5991  {
5992  ((BaseMatrix*)osglData->tempC)->baseMatrixIdx = osglData->baseMatrixIdx;
5994  }
5996  ((BaseMatrix*)osglData->tempC)->targetMatrixFirstRow = osglData->targetMatrixFirstRow;
5998  ((BaseMatrix*)osglData->tempC)->targetMatrixFirstCol = osglData->targetMatrixFirstCol;
5999  if (osglData->baseMatrixStartRowPresent == true)
6000  ((BaseMatrix*)osglData->tempC)->baseMatrixStartRow = osglData->baseMatrixStartRow;
6001  if (osglData->baseMatrixStartColPresent == true)
6002  ((BaseMatrix*)osglData->tempC)->baseMatrixStartCol = osglData->baseMatrixStartCol;
6003  if (osglData->baseMatrixEndRowPresent == true)
6004  ((BaseMatrix*)osglData->tempC)->baseMatrixEndRow = osglData->baseMatrixEndRow;
6005  if (osglData->baseMatrixEndColPresent == true)
6006  ((BaseMatrix*)osglData->tempC)->baseMatrixEndCol = osglData->baseMatrixEndCol;
6007  if (osglData->baseTransposePresent == true)
6008  ((BaseMatrix*)osglData->tempC)->baseTranspose = osglData->baseTranspose;
6009  if (osglData->scalarMultiplierPresent == true)
6010  ((BaseMatrix*)osglData->tempC)->scalarMultiplier = osglData->scalarMultiplier;
6011 }
6012  break;
6013 
6014  case 465: /* matrixConstructorList: matrixConstructorList matrixConstructor */
6015 {
6016  osglData->mtxBlkVec.back()->inumberOfChildren++;
6017 }
6018  break;
6019 
6020  case 475: /* constantElementsStart: CONSTANTELEMENTSSTART */
6021 {
6024  osglData->numberOfValuesPresent = false;
6025  osglData->rowMajorPresent = false;
6026  osglData->rowMajor = false;
6027 }
6028  break;
6029 
6030  case 476: /* constantElementsAttributes: constantElementsAttList */
6031 {
6032  if (osglData->numberOfValuesPresent == false)
6033  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "<constantElements>: numberOfValues attribute missing");
6034 }
6035  break;
6036 
6037  case 479: /* constantElementsAtt: osglNumberOfValuesATT */
6038  {
6040  if (osglData->numberOfValues > 0)
6041  ((MatrixType*)osglData->mtxBlkVec.back())->matrixType = ENUM_MATRIX_TYPE_constant;
6042  }
6043  break;
6044 
6045  case 480: /* constantElementsAtt: osglRowMajorATT */
6046  {
6048  }
6049  break;
6050 
6051  case 484: /* matrixElementsStartVector: matrixElementsStartVectorStart matrixElementsStartVectorContent */
6052 {
6053  ((MatrixElements*)osglData->tempC)->start = new IntVector();
6054  ((MatrixElements*)osglData->tempC)->start->numberOfEl = osglData->numberOfEl;
6055  ((MatrixElements*)osglData->tempC)->start->el = osglData->osglIntArray;
6056  osglData->osglIntArray = NULL; // to facilitate garbage collection without a segfault
6059 }
6060  break;
6061 
6062  case 485: /* matrixElementsStartVectorStart: STARTVECTORSTART */
6063 {
6064  if (osglData->rowMajor == false)
6065  osglData->numberOfEl = ((MatrixType*)osglData->mtxBlkVec.back())->numberOfColumns + 1;
6066  else
6067  osglData->numberOfEl = ((MatrixType*)osglData->mtxBlkVec.back())->numberOfRows + 1;
6069  osglData->osglCounter = 0;
6070 }
6071  break;
6072 
6073  case 491: /* matrixElementsIndexVector: matrixElementsIndexStart matrixElementsIndexContent */
6074 {
6075  ((MatrixElements*)osglData->tempC)->index = new IntVector();
6076  ((MatrixElements*)osglData->tempC)->index->numberOfEl
6077  = ((MatrixElements*)osglData->tempC)->numberOfValues;
6078  ((MatrixElements*)osglData->tempC)->index->el = osglData->osglIntArray;
6079  osglData->osglIntArray = NULL; // to facilitate garbage collection without a segfault
6082 }
6083  break;
6084 
6085  case 492: /* matrixElementsIndexStart: INDEXSTART */
6086 {
6087  osglData->numberOfEl = ((MatrixElements*)osglData->tempC)->numberOfValues;
6089  osglData->osglCounter = 0;
6090 }
6091  break;
6092 
6093  case 498: /* constantElementsValues: constantElementsValueStart constantElementsValueContent */
6094 {
6096  ((ConstantMatrixElements*)osglData->tempC)->value->numberOfEl = osglData->numberOfEl;
6098  osglData->osglDblArray = NULL; // to facilitate garbage collection without a segfault
6101 }
6102  break;
6103 
6104  case 499: /* constantElementsValueStart: VALUESTART */
6105 {
6106  osglData->numberOfEl = ((ConstantMatrixElements*)osglData->tempC)->numberOfValues;
6107  osglData->osglDblArray = new double[osglData->numberOfEl];
6108  osglData->osglCounter = 0;
6109 }
6110  break;
6111 
6112  case 506: /* varReferenceElementsStart: VARREFERENCEELEMENTSSTART */
6113 {
6116  osglData->numberOfValuesPresent = false;
6117  osglData->rowMajorPresent = false;
6118  osglData->rowMajor = false;
6119 }
6120  break;
6121 
6122  case 507: /* varReferenceElementsAttributes: varReferenceElementsAttList */
6123 {
6124  if (osglData->numberOfValuesPresent == false)
6125  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "<varReferenceElements>: numberOfValues attribute missing");
6126 }
6127  break;
6128 
6129  case 510: /* varReferenceElementsAtt: osglNumberOfValuesATT */
6130  {
6132  if (osglData->numberOfValues > 0)
6133  ((MatrixType*)osglData->mtxBlkVec.back())->matrixType = ENUM_MATRIX_TYPE_varReference;
6134  }
6135  break;
6136 
6137  case 511: /* varReferenceElementsAtt: osglRowMajorATT */
6138  {
6140  }
6141  break;
6142 
6143  case 515: /* varReferenceElementsValues: varReferenceElementsValuesStart varReferenceElementsValuesContent */
6144 {
6146  ((VarReferenceMatrixElements*)osglData->tempC)->value->numberOfEl = osglData->numberOfEl;
6148  osglData->osglIntArray = NULL; // to facilitate garbage collection without a segfault
6151 }
6152  break;
6153 
6154  case 516: /* varReferenceElementsValuesStart: VALUESTART */
6155 {
6158  osglData->osglCounter = 0;
6159 }
6160  break;
6161 
6162  case 523: /* linearElementsStart: LINEARELEMENTSSTART */
6163 {
6166  osglData->numberOfValuesPresent = false;
6167  osglData->rowMajorPresent = false;
6168  osglData->rowMajor = false;
6169 }
6170  break;
6171 
6172  case 524: /* linearElementsAttributes: linearElementsAttList */
6173 {
6174  if (osglData->numberOfValuesPresent == false)
6175  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "<linearElements>: numberOfValues attribute missing");
6176 }
6177  break;
6178 
6179  case 527: /* linearElementsAtt: osglNumberOfValuesATT */
6180  {
6181  ((LinearMatrixElements*)osglData->tempC)->numberOfValues = osglData->numberOfValues;
6182  if (osglData->numberOfValues > 0)
6183  ((MatrixType*)osglData->mtxBlkVec.back())->matrixType = ENUM_MATRIX_TYPE_linear;
6184  }
6185  break;
6186 
6187  case 528: /* linearElementsAtt: osglRowMajorATT */
6188  {
6190  }
6191  break;
6192 
6193  case 532: /* linearElementsValues: %empty */
6194  {
6195  if (osglData->numberOfValues > 0)
6196  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "expected <value> element");
6197  }
6198  break;
6199 
6200  case 533: /* linearElementsValues: linearElementsValuesStart linearElementsValuesContent */
6201  {
6203  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too few <el> elements");
6205  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many <el> elements");
6206  ((LinearMatrixElements*)osglData->tempC)->value->numberOfEl = osglData->numberOfEl;
6209  }
6210  break;
6211 
6212  case 534: /* linearElementsValuesStart: VALUESTART */
6213 {
6214  osglData->numberOfValues = ((LinearMatrixElements*)osglData->tempC)->numberOfValues;
6215  osglData->nonzeroCounter = 0;
6217  ((LinearMatrixElements*)osglData->tempC)->value->numberOfEl
6218  = ((LinearMatrixElements*)osglData->tempC)->numberOfValues;
6219  ((LinearMatrixElements*)osglData->tempC)->value->el
6220  = new LinearMatrixElement*[((LinearMatrixElements*)osglData->tempC)->numberOfValues];
6221  for (int i=0; i < ((LinearMatrixElements*)osglData->tempC)->numberOfValues; i++)
6222  ((LinearMatrixElements*)osglData->tempC)->value->el[i] = new LinearMatrixElement();
6223  osglData->osglCounter = 0;
6225 }
6226  break;
6227 
6228  case 542: /* linearElementsValuesEl: linearElementsValuesElStart linearElementsValuesElAttributes linearElementsValuesElContent */
6229 {
6232  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "linear matrix elements: too many nonzeros");
6233 }
6234  break;
6235 
6236  case 543: /* linearElementsValuesElStart: ELSTART */
6237 {
6239  osglData->constantPresent = false;
6240  osglData->constant = 0.0;
6241 }
6242  break;
6243 
6244  case 544: /* linearElementsValuesElAttributes: linearElementsValuesElAttList */
6245 {
6247  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "numberOfVarIdx attribute missing");
6248  ((LinearMatrixElements*)osglData->tempC)->value->el[osglData->nonzeroCounter]->numberOfVarIdx
6250  ((LinearMatrixElements*)osglData->tempC)->value->el[osglData->nonzeroCounter]->varIdx
6252  ((LinearMatrixElements*)osglData->tempC)->value->el[osglData->nonzeroCounter]->constant
6253  = osglData->constant;
6254  osglData->osglCounter = 0;
6255 }
6256  break;
6257 
6258  case 556: /* linearElementsValuesVarIdxStart: VARIDXSTART */
6259 {
6260  osglData->coefPresent = false;
6261  osglData->coef = 1.0;
6263  = new LinearMatrixElementTerm();
6264 }
6265  break;
6266 
6267  case 558: /* LinearElementsValuesVarIdxCoefATT: osglCoefATT */
6268 {
6270 }
6271  break;
6272 
6273  case 559: /* linearElementsValuesVarIdxContent: GREATERTHAN INTEGER VARIDXEND */
6274 {
6275  ((LinearMatrixElements*)osglData->tempC)->value->el[osglData->nonzeroCounter]->varIdx[osglData->osglCounter]->idx = (yyvsp[-1].ival);
6276  osglData->osglCounter++;
6277 }
6278  break;
6279 
6280  case 561: /* generalElementsStart: GENERALELEMENTSSTART */
6281 {
6284  osglData->numberOfValuesPresent = false;
6285  osglData->rowMajorPresent = false;
6286  osglData->rowMajor = false;
6287 }
6288  break;
6289 
6290  case 562: /* generalElementsAttributes: generalElementsAttList */
6291 {
6292  if (osglData->numberOfValuesPresent == false)
6293  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "<generalElements>: numberOfValues attribute missing");
6294 }
6295  break;
6296 
6297  case 565: /* generalElementsAtt: osglNumberOfValuesATT */
6298  {
6300  if (osglData->numberOfValues > 0)
6301  ((MatrixType*)osglData->mtxBlkVec.back())->matrixType = ENUM_MATRIX_TYPE_general;
6302  }
6303  break;
6304 
6305  case 566: /* generalElementsAtt: osglRowMajorATT */
6306  {
6308  }
6309  break;
6310 
6311  case 572: /* generalElementsValuesStart: VALUESTART */
6312 {
6313  osglData->nonzeroCounter = 0;
6315 
6317  ((GeneralMatrixElements*)osglData->tempC)->value->numberOfEl
6319  ((GeneralMatrixElements*)osglData->tempC)->value->el
6321 
6322  for (int i=0; i<osglData->numberOfValues; i++)
6323  ((GeneralMatrixElements*)osglData->tempC)->value->el[i] = new ScalarExpressionTree();
6324 }
6325  break;
6326 
6327  case 580: /* generalElementsElStart: ELSTART */
6328  {
6330  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of <el> terms greater than expected");
6331  // clear the vectors of pointers
6332  osnlData->nlNodeVec.clear();
6333  osnlData->sumVec.clear();
6334  osnlData->allDiffVec.clear();
6335  osnlData->maxVec.clear();
6336  osnlData->minVec.clear();
6337  osnlData->productVec.clear();
6338  osnlData->matrixSumVec.clear();
6339  osnlData->matrixProductVec.clear();
6340  }
6341  break;
6342 
6343  case 584: /* generalElementsElLaden: GREATERTHAN nlnode ELEND */
6344  {
6345  // IMPORTANT -- HERE IS WHERE WE CREATE THE EXPRESSION TREE
6346 
6347  ((GeneralMatrixElements*)osglData->tempC)->value->el[osglData->nonzeroCounter]->m_treeRoot =
6348  ((OSnLNode*)osnlData->nlNodeVec[ 0])->createExpressionTreeFromPrefix( osnlData->nlNodeVec);
6350  }
6351  break;
6352 
6353  case 586: /* objReferenceElementsStart: OBJREFERENCEELEMENTSSTART */
6354 {
6357  osglData->numberOfValuesPresent = false;
6358  osglData->rowMajorPresent = false;
6359  osglData->rowMajor = false;
6360 }
6361  break;
6362 
6363  case 587: /* objReferenceElementsAttributes: objReferenceElementsAttList */
6364 {
6365  if (osglData->numberOfValuesPresent == false)
6366  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "<objReferenceElements>: numberOfValues attribute missing");
6367 }
6368  break;
6369 
6370  case 590: /* objReferenceElementsAtt: osglNumberOfValuesATT */
6371  {
6373  if (osglData->numberOfValues > 0)
6374  ((MatrixType*)osglData->mtxBlkVec.back())->matrixType = ENUM_MATRIX_TYPE_objReference;
6375  }
6376  break;
6377 
6378  case 591: /* objReferenceElementsAtt: osglRowMajorATT */
6379  {
6381  }
6382  break;
6383 
6384  case 595: /* objReferenceElementsValues: objReferenceElementsValuesStart objReferenceElementsValuesContent */
6385 {
6387  ((ObjReferenceMatrixElements*)osglData->tempC)->value->numberOfEl = osglData->numberOfEl;
6389  osglData->osglIntArray = NULL; // to facilitate garbage collection without a segfault
6392 }
6393  break;
6394 
6395  case 596: /* objReferenceElementsValuesStart: VALUESTART */
6396 {
6399  osglData->osglCounter = 0;
6400 }
6401  break;
6402 
6403  case 603: /* conReferenceElementsStart: CONREFERENCEELEMENTSSTART */
6404 {
6407  osglData->numberOfValuesPresent = false;
6408  osglData->rowMajorPresent = false;
6409  osglData->rowMajor = false;
6410 }
6411  break;
6412 
6413  case 604: /* conReferenceElementsAttributes: conReferenceElementsAttList */
6414 {
6415  if (osglData->numberOfValuesPresent == false)
6416  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "<conReferenceElements>: numberOfValues attribute missing");
6417 }
6418  break;
6419 
6420  case 607: /* conReferenceElementsAtt: osglNumberOfValuesATT */
6421  {
6423  if (osglData->numberOfValues > 0)
6424  ((MatrixType*)osglData->mtxBlkVec.back())->matrixType = ENUM_MATRIX_TYPE_conReference;
6425  }
6426  break;
6427 
6428  case 608: /* conReferenceElementsAtt: osglRowMajorATT */
6429  {
6431  }
6432  break;
6433 
6434  case 612: /* conReferenceElementsValues: %empty */
6435  {
6436  if (osglData->numberOfValues > 0)
6437  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "expected <value> element");
6438  }
6439  break;
6440 
6441  case 613: /* conReferenceElementsValues: conReferenceElementsValuesStart conReferenceElementsValuesContent */
6442  {
6444  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too few <el> elements");
6446  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many <el> elements");
6447  ((ConReferenceMatrixElements*)osglData->tempC)->value->numberOfEl = osglData->numberOfEl;
6450  }
6451  break;
6452 
6453  case 614: /* conReferenceElementsValuesStart: VALUESTART */
6454 {
6456  osglData->nonzeroCounter = 0;
6457 
6459  ((ConReferenceMatrixElements*)osglData->tempC)->value->numberOfEl
6461  ((ConReferenceMatrixElements*)osglData->tempC)->value->el
6463 
6464  for (int i=0; i<osglData->numberOfValues; i++)
6466 }
6467  break;
6468 
6469  case 621: /* conReferenceElementsEl: conReferenceElementsElStart conReferenceElementsElAttributeList conReferenceElementsElContent */
6470 {
6471 // osglData->nonzeroCounter++;
6472 // if (osglData->nonzeroCounter > osglData->osglNumberOfNonzeros)
6473 // parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "conReference matrix elements: too many nonzeros");
6474 }
6475  break;
6476 
6477  case 622: /* conReferenceElementsElStart: ELSTART */
6478  {
6480  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of <el> terms greater than expected");
6481  osglData->valueTypePresent = false;
6482  osglData->multPresent = false;
6483  osglData->incrPresent = false;
6484  osglData->mult = 1;
6485  osglData->incr = 0;
6486  osglData->valueType = ""; //ENUM_CONREFERENCE_VALUETYPE_value;
6487  }
6488  break;
6489 
6490  case 628: /* conReferenceElementsElContent: GREATERTHAN INTEGER ELEND */
6491 {
6493  {
6495  {
6496  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more data elements than specified");
6499  }
6500  }
6501  else
6502  {
6503  if (osglData->valueType == "")
6504  osglData->valueType = "value";
6507  "valueType must be one of \"value\", \"status\", \"surplus\", \"shortage\"");
6508  else
6509  {
6510  for (int i=0; i<osglData->mult; i++)
6511  {
6512  ((ConReferenceMatrixElements*)osglData->tempC)->value->el[osglData->nonzeroCounter + i]->conReference
6513  = (yyvsp[-1].ival) + i*osglData->incr;
6514  ((ConReferenceMatrixElements*)osglData->tempC)->value->el[osglData->nonzeroCounter + i]->valueType
6516  }
6517  }
6519  }
6520 }
6521  break;
6522 
6523  case 630: /* matrixTransformationStart: TRANSFORMATIONSTART */
6524 {
6527 
6528  // clear the vectors of pointers
6529  osnlData->nlNodeVec.clear();
6530  osnlData->sumVec.clear();
6531  osnlData->allDiffVec.clear();
6532  osnlData->maxVec.clear();
6533  osnlData->minVec.clear();
6534  osnlData->productVec.clear();
6535  osnlData->matrixSumVec.clear();
6536  osnlData->matrixProductVec.clear();
6537 
6538  osglData->shapePresent = false;
6539 }
6540  break;
6541 
6542  case 632: /* matrixTransformationShapeATT: osglShapeATT */
6543 {
6544  if (returnNlExprShape(osglData->shape) > 0)
6545  ((MatrixTransformation*)osglData->tempC)->shape
6547  else
6549  "unknown shape specified in matrix transformation");
6550 }
6551  break;
6552 
6553  case 633: /* matrixTransformationEnd: TRANSFORMATIONEND */
6554 {
6555  // IMPORTANT -- HERE IS WHERE WE CREATE THE EXPRESSION TREE
6556  ((MatrixTransformation*)osglData->tempC)->transformation =
6557  ((OSnLMNode*)osnlData->nlNodeVec[ 0])->createExpressionTreeFromPrefix( osnlData->nlNodeVec);
6558 }
6559  break;
6560 
6561  case 634: /* matrixBlocks: matrixBlocksStart matrixBlocksAttributes matrixBlocksContent */
6562 {
6563  // clean up temporary arrays without deleting the information
6564  osglData->rowOffsets.back() = NULL;
6565  osglData->colOffsets.back() = NULL;
6566  osglData->osglIntArray = NULL;
6567  osglData->rowOffsets.pop_back();
6568  osglData->colOffsets.pop_back();
6569 }
6570  break;
6571 
6572  case 635: /* matrixBlocksStart: BLOCKSSTART */
6573 {
6574  osglData->tempC = new MatrixBlocks();
6578 }
6579  break;
6580 
6581  case 636: /* matrixBlocksAttributes: osglNumberOfBlocksATT */
6582 {
6584  ((MatrixBlocks*)osglData->tempC)->inumberOfChildren = 0;
6585 }
6586  break;
6587 
6588  case 638: /* matrixBlocksEnd: BLOCKSEND */
6589 {
6590  if ( (int)((MatrixBlocks*)osglData->mtxBlocksVec.back())->inumberOfChildren !=
6591  osglData->nBlocksVec.back())
6592  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
6593  "Number of blocks does not agree with attribute value numberOfBlocks");
6594 
6595  ((MatrixBlocks*)osglData->mtxBlocksVec.back())->m_mChildren
6596  = new MatrixNode*[((MatrixBlocks*)osglData->mtxBlocksVec.back())->inumberOfChildren];
6597  osglData->mtxBlocksVec.pop_back();
6598  osglData->nBlocksVec.pop_back();
6599 }
6600  break;
6601 
6602  case 639: /* colOffsets: colOffsetStart colOffsetNumberOfElAttribute colOffsetContent */
6603 {
6605  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of colOffsets does not match numberOfEl");
6606  ((MatrixBlocks*)osglData->tempC)->colOffset = new IntVector();
6607  ((MatrixBlocks*)osglData->tempC)->colOffset->numberOfEl = osglData->numberOfEl;
6608  ((MatrixBlocks*)osglData->tempC)->colOffset->el = osglData->osglIntArray;
6612 }
6613  break;
6614 
6615  case 640: /* colOffsetStart: COLOFFSETSTART */
6616 {
6617  osglData->numberOfEl = 0;
6618  osglData->numberOfElPresent = false;
6619 }
6620  break;
6621 
6622  case 641: /* colOffsetNumberOfElAttribute: osglNumberOfElATT */
6623 {
6624  osglData->osglCounter = 0;
6626 }
6627  break;
6628 
6629  case 647: /* rowOffsets: rowOffsetStart rowOffsetNumberOfElAttribute rowOffsetContent */
6630 {
6631  ((MatrixBlocks*)osglData->tempC)->rowOffset = new IntVector();
6632  ((MatrixBlocks*)osglData->tempC)->rowOffset->numberOfEl = osglData->numberOfEl;
6633  ((MatrixBlocks*)osglData->tempC)->rowOffset->el = osglData->osglIntArray;
6637 }
6638  break;
6639 
6640  case 648: /* rowOffsetStart: ROWOFFSETSTART */
6641 {
6642  osglData->numberOfEl = 0;
6643  osglData->numberOfElPresent = false;
6644 }
6645  break;
6646 
6647  case 649: /* rowOffsetNumberOfElAttribute: osglNumberOfElATT */
6648 {
6649  osglData->osglCounter = 0;
6651 }
6652  break;
6653 
6654  case 656: /* blockList: blockList matrixBlock */
6655 {
6656  ((MatrixBlocks*)osglData->mtxBlocksVec.back())->inumberOfChildren++;
6657 }
6658  break;
6659 
6660  case 657: /* matrixBlock: matrixBlockStart matrixBlockAttributes matrixBlockContent */
6661 {
6662  osglData->mtxBlkVec.pop_back();
6663 }
6664  break;
6665 
6666  case 658: /* matrixBlockStart: BLOCKSTART */
6667 {
6668  osglData->tempC = new MatrixBlock();
6670  osglData->mtxBlkVec.push_back(osglData->tempC);
6671 
6672  osglData->symmetryPresent = false;
6673  osglData->typePresent = false;
6674  osglData->blockRowIdxPresent = false;
6675  osglData->blockColIdxPresent = false;
6676 }
6677  break;
6678 
6679  case 664: /* matrixBlockAtt: osglSymmetryATT */
6680  {
6681  if (verifyMatrixSymmetry(osglData->symmetry) == false)
6682  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "symmetry type not recognized");
6683  parserData->errorText = NULL;
6684  ((MatrixBlock*)osglData->tempC)->symmetry
6686  }
6687  break;
6688 
6689  case 665: /* matrixBlockAtt: osglTypeATT */
6690  {
6691  ((MatrixBlock*)osglData->tempC)->type
6693  }
6694  break;
6695 
6696  case 669: /* blockLaden: GREATERTHAN blockBody BLOCKEND */
6697 {
6698  osglData->mtxBlkVec.back()->m_mChildren =
6699  new MatrixNode*[osglData->mtxBlkVec.back()->inumberOfChildren];
6700 }
6701  break;
6702 
6703  case 671: /* osglNumberOfBlocksATT: NUMBEROFBLOCKSATT QUOTE INTEGER QUOTE */
6704 {
6705  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
6706  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
6708  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "numberOfBlocks attribute previously set");
6709  if ((yyvsp[-1].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of <blocks> cannot be negative");
6711  osglData->numberOfBlocks = (yyvsp[-1].ival);
6712 }
6713  break;
6714 
6715  case 672: /* osglNumberOfColumnsATT: NUMBEROFCOLUMNSATT QUOTE INTEGER QUOTE */
6716 {
6717  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
6718  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
6720  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "numberOfColumns attribute previously set");
6721  if ((yyvsp[-1].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of <blocks> cannot be negative");
6724 }
6725  break;
6726 
6727  case 673: /* osglNumberOfElATT: NUMBEROFELATT QUOTE INTEGER QUOTE */
6728 {
6729  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
6730  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
6732  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "numberOfEl attribute previously set");
6733  if ((yyvsp[-1].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of <el> cannot be negative");
6734  osglData->numberOfElPresent = true;
6735  osglData->numberOfEl = (yyvsp[-1].ival);
6736 }
6737  break;
6738 
6739  case 674: /* osglNumberOfRowsATT: NUMBEROFROWSATT QUOTE INTEGER QUOTE */
6740 {
6741  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
6742  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
6744  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "numberOfRows attribute previously set");
6745  if ((yyvsp[-1].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of <rows> cannot be negative");
6746  osglData->numberOfRowsPresent = true;
6747  osglData->numberOfRows = (yyvsp[-1].ival);
6748 }
6749  break;
6750 
6751  case 675: /* osglNumberOfValuesATT: NUMBEROFVALUESATT QUOTE INTEGER QUOTE */
6752 {
6753  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
6754  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
6756  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "numberOfValues attribute previously set");
6757  if ((yyvsp[-1].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of <values> cannot be negative");
6759  osglData->numberOfValues = (yyvsp[-1].ival);
6760 }
6761  break;
6762 
6763  case 676: /* osglNumberOfVarIdxATT: NUMBEROFVARIDXATT QUOTE INTEGER QUOTE */
6764 {
6765  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
6766  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
6768  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "numberOfVarIdx attribute previously set");
6769  if ((yyvsp[-1].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of <varIdx> cannot be negative");
6771  osglData->numberOfVarIdx = (yyvsp[-1].ival);
6772 }
6773  break;
6774 
6775  case 677: /* osglBase64SizeATT: SIZEOFATT QUOTE INTEGER QUOTE */
6776 {
6777  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
6778  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
6780  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "base64Size attribute previously set");
6781  if ((yyvsp[-1].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "base64Size cannot be negative");
6782  osglData->base64SizePresent = true;
6783  osglData->base64Size = (yyvsp[-1].ival);
6784 }
6785  break;
6786 
6787  case 678: /* osglBaseMatrixIdxATT: BASEMATRIXIDXATT QUOTE INTEGER QUOTE */
6788 {
6789  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
6790  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
6791  if (osglData->baseMatrixIdxPresent == true)
6792  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one baseMatrixIdx attribute in <baseMatrix> element");
6793  if ((yyvsp[-1].ival) < 0)
6794  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "baseMatrix idx cannot be negative");
6795  if ((yyvsp[-1].ival) > osglData->matrixCounter)
6796  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "baseMatrix idx exceeds number of matrices so far");
6797  osglData->baseMatrixIdxPresent = true;
6798  osglData->baseMatrixIdx = (yyvsp[-1].ival);
6799 }
6800  break;
6801 
6802  case 679: /* osglBaseMatrixStartRowATT: BASEMATRIXSTARTROWATT QUOTE INTEGER QUOTE */
6803 {
6804  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
6805  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
6806  "start and end quotes are not the same");
6807  if (osglData->baseMatrixStartRowPresent == true)
6808  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
6809  "more than one baseMatrixStartRow attribute in <baseMatrix> element");
6810  if ((yyvsp[-1].ival) < 0)
6811  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
6812  "baseMatrix first row cannot be negative");
6815 }
6816  break;
6817 
6818  case 680: /* osglBaseMatrixStartColATT: BASEMATRIXSTARTCOLATT QUOTE INTEGER QUOTE */
6819 {
6820  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
6821  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
6822  "start and end quotes are not the same");
6823  if (osglData->baseMatrixStartColPresent == true)
6824  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
6825  "more than one baseMatrixStartCol attribute in <baseMatrix> element");
6826  if ((yyvsp[-1].ival) < 0)
6827  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
6828  "baseMatrix first column cannot be negative");
6831 }
6832  break;
6833 
6834  case 681: /* osglBaseMatrixEndRowATT: BASEMATRIXENDROWATT QUOTE INTEGER QUOTE */
6835 {
6836  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
6837  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
6838  if (osglData->baseMatrixEndRowPresent == true)
6839  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one baseMatrixEndRow attribute in <baseMatrix> element");
6840  if ((yyvsp[-1].ival) < 0)
6841  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "baseMatrix end row cannot be negative");
6843  osglData->baseMatrixEndRow = (yyvsp[-1].ival);
6844 }
6845  break;
6846 
6847  case 682: /* osglBaseMatrixEndColATT: BASEMATRIXENDCOLATT QUOTE INTEGER QUOTE */
6848 {
6849  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
6850  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
6851  if (osglData->baseMatrixEndColPresent == true)
6852  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one baseMatrixEndCol attribute in <baseMatrix> element");
6853  if ((yyvsp[-1].ival) < 0)
6854  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "baseMatrix end col cannot be negative");
6856  osglData->baseMatrixEndCol = (yyvsp[-1].ival);
6857 }
6858  break;
6859 
6860  case 683: /* osglBlockRowIdxATT: BLOCKROWIDXATT quote INTEGER quote */
6861 {
6863  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "blockRowIdx attribute previously set");
6864  else
6865  {
6866  if ((yyvsp[-1].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "blockRowIdx cannot be negative");
6867  osglData->blockRowIdxPresent = true;
6868  osglData->blockRowIdx = (yyvsp[-1].ival);
6869  ((MatrixBlock*)osglData->tempC)->blockRowIdx = (yyvsp[-1].ival);
6870  }
6871 
6872  // compute the size of the block
6873  ((MatrixBlock*)osglData->tempC)->numberOfRows
6874  = osglData->rowOffsets.back()[osglData->blockRowIdx+1]
6876 }
6877  break;
6878 
6879  case 684: /* osglBlockColIdxATT: BLOCKCOLIDXATT quote INTEGER quote */
6880 {
6882  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "blockColIdx attribute previously set");
6883  else
6884  {
6885  if ((yyvsp[-1].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "blockColIdx cannot be negative");
6886  osglData->blockColIdxPresent = true;
6887  osglData->blockColIdx = (yyvsp[-1].ival);
6888  ((MatrixBlock*)osglData->tempC)->blockColIdx = (yyvsp[-1].ival);
6889  }
6890 
6891  // compute the size of the block
6892  ((MatrixBlock*)osglData->tempC)->numberOfColumns
6893  = osglData->colOffsets.back()[osglData->blockColIdx+1]
6895 }
6896  break;
6897 
6898  case 685: /* osglCoefATT: COEFATT QUOTE aNumber QUOTE */
6899 {
6900  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
6901  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
6902  if (osglData->coefPresent == true)
6903  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "linear matrix elements: duplicate coef");
6904  else
6905  {
6907  osglData->coefPresent = true;
6908  }
6909 }
6910  break;
6911 
6912  case 686: /* osglConstantATT: CONSTANTATT QUOTE aNumber QUOTE */
6913 {
6914  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
6915  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
6916  if (osglData->constantPresent == true)
6917  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "linear matrix elements: duplicate constant");
6918  else
6919  {
6921  osglData->constantPresent = true;
6922  }
6923 }
6924  break;
6925 
6926  case 687: /* osglIdxATT: IDXATT QUOTE INTEGER QUOTE */
6927  {
6928  if (osglData->idxPresent == true)
6929  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one idx attribute");
6930  osglData->idxPresent = true;
6931  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
6932  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
6933  osglData->idx = (yyvsp[-1].ival);
6934  }
6935  break;
6936 
6937  case 688: /* osglIncrATT: INCRATT QUOTE INTEGER QUOTE */
6938 {
6939  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
6940  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
6941  if (osglData->incrPresent)
6942  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "only one incr attribute allowed");
6943  osglData->incrPresent = true;
6944  osglData->incr = (yyvsp[-1].ival);
6945 }
6946  break;
6947 
6948  case 689: /* osglMultATT: MULTATT QUOTE INTEGER QUOTE */
6949 {
6950  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
6951  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
6952  if (osglData->multPresent)
6953  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "only one mult attribute allowed");
6954  if ((yyvsp[-1].ival) <= 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mult must be positive");
6955  osglData->multPresent = true;
6956  osglData->mult = (yyvsp[-1].ival);
6957 }
6958  break;
6959 
6960  case 690: /* osglScalarMultiplierATT: SCALARMULTIPLIERATT QUOTE aNumber QUOTE */
6961 {
6962  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
6963  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
6964  if (osglData->scalarMultiplierPresent == true)
6965  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one scalar multiplier attribute in <baseMatrix> element");
6968 }
6969  break;
6970 
6971  case 691: /* osglTargetMatrixFirstRowATT: TARGETMATRIXFIRSTROWATT QUOTE INTEGER QUOTE */
6972 {
6973  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
6974  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
6976  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one targetMatrixFirstRow attribute in <baseMatrix> element");
6977  if ((yyvsp[-1].ival) < 0)
6978  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "targetMatrix first row cannot be negative");
6981 }
6982  break;
6983 
6984  case 692: /* osglTargetMatrixFirstColATT: TARGETMATRIXFIRSTCOLATT QUOTE INTEGER QUOTE */
6985 {
6986  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
6987  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
6989  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one targetMatrixFirstCol attribute in <baseMatrix> element");
6990  if ((yyvsp[-1].ival) < 0)
6991  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "targetMatrix first col cannot be negative");
6994 }
6995  break;
6996 
6997  case 695: /* baseTransposeAttEmpty: EMPTYBASETRANSPOSEATT */
6998 {
6999  if (osglData->baseTransposePresent == true)
7000  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
7001  "more than one baseTranspose attribute in <baseMatrix> element");
7002  else
7003  osglData->baseTranspose = true;
7004  osglData->baseTransposePresent = true;
7005 }
7006  break;
7007 
7008  case 696: /* baseTransposeAttContent: BASETRANSPOSEATT ATTRIBUTETEXT quote */
7009 {
7010  if (osglData->baseTransposePresent == true)
7011  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
7012  "more than one baseTranspose attribute in <baseMatrix> element");
7013  else
7014  {
7015  if (strcmp((yyvsp[-1].sval),"false") == 0) osglData->baseTranspose = false;
7016  else if (strcmp((yyvsp[-1].sval),"true" ) == 0) osglData->baseTranspose = true;
7017  else parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
7018  "baseTranspose attribute in <baseMatrix> element must be \"true\" or \"false\"");
7019  }
7021  free((yyvsp[-1].sval));
7022 }
7023  break;
7024 
7025  case 699: /* nameAttEmpty: EMPTYNAMEATT */
7026 {
7027  if (osglData->namePresent == true)
7028  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one name attribute");
7029  osglData->namePresent = true;
7030 }
7031  break;
7032 
7033  case 700: /* nameAttContent: NAMEATT ATTRIBUTETEXT QUOTE */
7034 {
7035  if (osglData->namePresent == true)
7036  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one name attribute");
7037  osglData->namePresent = true;
7038  osglData->name = (yyvsp[-1].sval);
7039  free((yyvsp[-1].sval));
7040 }
7041  break;
7042 
7043  case 703: /* rowMajorAttEmpty: EMPTYROWMAJORATT */
7044 {
7046  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "rowMajor attribute encountered more than once");
7047  else
7048  osglData->rowMajor = true;
7049  osglData->rowMajorPresent = true;
7050 }
7051  break;
7052 
7053  case 704: /* rowMajorAttContent: ROWMAJORATT ATTRIBUTETEXT QUOTE */
7054 {
7056  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "rowMajor attribute encountered more than once");
7057  else
7058  {
7059  if (strcmp((yyvsp[-1].sval),"false") == 0) osglData->rowMajor = false;
7060  else if (strcmp((yyvsp[-1].sval),"true" ) == 0) osglData->rowMajor = true;
7061  else parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "rowMajor attribute must be \"true\" or \"false\"");
7062  }
7063  osglData->rowMajorPresent = true;
7064  free((yyvsp[-1].sval));
7065 }
7066  break;
7067 
7068  case 707: /* shapeAttEmpty: EMPTYSHAPEATT */
7069 {
7070  if (osglData->shapePresent == true)
7071  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one shape attribute");
7072  osglData->shapePresent = true;
7073 }
7074  break;
7075 
7076  case 708: /* shape: SHAPEATT ATTRIBUTETEXT QUOTE */
7077 {
7078  if (osglData->shapePresent == true)
7079  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one shape attribute");
7080  osglData->shapePresent = true;
7081  osglData->shape = (yyvsp[-1].sval);
7082  free((yyvsp[-1].sval));
7083 }
7084  break;
7085 
7086  case 711: /* symmetryAttEmpty: EMPTYSYMMETRYATT */
7087 {
7088  if (osglData->symmetryPresent == true)
7089  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one symmetry attribute in <matrix> element");
7090  osglData->symmetryPresent = true;
7091 }
7092  break;
7093 
7094  case 712: /* symmetryAttContent: SYMMETRYATT ATTRIBUTETEXT QUOTE */
7095 {
7096  if (osglData->symmetryPresent == true)
7097  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one symmetry attribute in <matrix> element");
7098  osglData->symmetryPresent = true;
7099  osglData->symmetry = (yyvsp[-1].sval);
7100  free((yyvsp[-1].sval));
7101 }
7102  break;
7103 
7104  case 715: /* typeAttEmpty: EMPTYTYPEATT */
7105 {
7106  if (osglData->typePresent == true)
7107  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one type attribute");
7108  osglData->typePresent = true;
7109 }
7110  break;
7111 
7112  case 716: /* typeAttContent: TYPEATT ATTRIBUTETEXT QUOTE */
7113 {
7114  if (osglData->typePresent == true)
7115  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one type attribute");
7116  osglData->typePresent = true;
7117  osglData->type = (yyvsp[-1].sval);
7118  free((yyvsp[-1].sval));
7119 }
7120  break;
7121 
7122  case 719: /* valueAttEmpty: EMPTYVALUEATT */
7123 {
7124  if (osglData->valuePresent == true)
7125  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one value attribute");
7126  osglData->valuePresent = true;
7127  osglData->value = "";
7128 }
7129  break;
7130 
7131  case 720: /* valueAttContent: VALUEATT ATTRIBUTETEXT QUOTE */
7132 {
7133  if (osglData->valuePresent == true)
7134  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one value attribute");
7135  osglData->valuePresent = true;
7136  osglData->value = (yyvsp[-1].sval);
7137  free((yyvsp[-1].sval));
7138 }
7139  break;
7140 
7141  case 723: /* valueTypeAttEmpty: EMPTYVALUETYPEATT */
7142 {
7143  if (osglData->valueTypePresent == true)
7144  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one valueType attribute");
7145  osglData->valueTypePresent = true;
7146 }
7147  break;
7148 
7149  case 724: /* valueTypeAttContent: VALUETYPEATT ATTRIBUTETEXT QUOTE */
7150 {
7151  if (osglData->valueTypePresent == true)
7152  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one valueType attribute");
7153  osglData->valueTypePresent = true;
7154  osglData->valueType = (yyvsp[-1].sval);
7155  free((yyvsp[-1].sval));
7156 }
7157  break;
7158 
7159  case 727: /* varTypeAttEmpty: EMPTYVARTYPEATT */
7160 {
7161  if (osglData->varTypePresent == true)
7162  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one varType attribute");
7163  osglData->varTypePresent = true;
7164 }
7165  break;
7166 
7167  case 728: /* varTypeAttContent: VARTYPEATT ATTRIBUTETEXT QUOTE */
7168 {
7169  if (osglData->varTypePresent == true)
7170  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one varType attribute");
7171  osglData->varTypePresent = true;
7172  osglData->varType = (yyvsp[-1].sval);
7173  free((yyvsp[-1].sval));
7174 }
7175  break;
7176 
7177  case 730: /* nonlinearExpressions: nonlinearExpressionsStart nlnumberatt nlnodes NONLINEAREXPRESSIONSEND */
7178  {
7180  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "actual number of nl terms less than number attribute");
7181  }
7182  break;
7183 
7184  case 731: /* nonlinearExpressionsStart: NONLINEAREXPRESSIONSSTART */
7185  {
7187  osnlData->tmpnlcount = 0;
7188  }
7189  break;
7190 
7191  case 732: /* nlnumberatt: NUMBEROFNONLINEAREXPRESSIONS QUOTE INTEGER QUOTE GREATERTHAN */
7192  {
7193  if ( *(yyvsp[-3].sval) != *(yyvsp[-1].sval) )
7194  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7195  if ((yyvsp[-2].ival) < 0) parserData->parser_errors +=
7196  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of expressions cannot be negative");
7197  osnlData->nlnodenumber = (yyvsp[-2].ival);
7200  osinstance->instanceData->nonlinearExpressions->nl = new Nl*[ (yyvsp[-2].ival) ];
7201  for (int i = 0; i < osinstance->instanceData->nonlinearExpressions->numberOfNonlinearExpressions; i++)
7202  {
7203  osinstance->instanceData->nonlinearExpressions->nl[i] = new Nl();
7204  }
7205  }
7206  break;
7207 
7208  case 735: /* scalarExpressionTree: nlstart nlAttributes GREATERTHAN nlnode NLEND */
7209  {
7210  // IMPORTANT -- HERE IS WHERE WE CREATE THE EXPRESSION TREE
7213  osnlData->tmpnlcount++;
7214  }
7215  break;
7216 
7217  case 736: /* nlstart: NLSTART */
7218  {
7221  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "actual number of nl terms greater than number attribute");
7222  osglData->idxPresent = false;
7223  osglData->shapePresent = false;
7224 
7225  // clear the vectors of pointers
7226  osnlData->nlNodeVec.clear();
7227  osnlData->sumVec.clear();
7228  osnlData->allDiffVec.clear();
7229  osnlData->maxVec.clear();
7230  osnlData->minVec.clear();
7231  osnlData->productVec.clear();
7232  osnlData->matrixSumVec.clear();
7233  osnlData->matrixProductVec.clear();
7234  }
7235  break;
7236 
7237  case 737: /* nlAttributes: nlAttributeList */
7238 {
7239  if (osglData->idxPresent == false)
7240  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mandatory attribute idx is missing");
7241 }
7242  break;
7243 
7244  case 740: /* nlAttribute: osglIdxATT */
7245  {
7248  = new ScalarExpressionTree();
7249  }
7250  break;
7251 
7252  case 741: /* nlAttribute: osglShapeATT */
7253  {
7254  if (returnNlExprShape(osglData->shape) > 0)
7257  else
7259  "unknown shape specified in matrix transformation");
7260  }
7261  break;
7262 
7263  case 769: /* $@6: %empty */
7264  { osnlData->nlNodePoint = new OSnLNodeE();
7265  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);}
7266  break;
7267 
7268  case 773: /* $@7: %empty */
7269  { osnlData->nlNodePoint = new OSnLNodePI();
7270  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);}
7271  break;
7272 
7273  case 777: /* $@8: %empty */
7274  {
7276  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7277 }
7278  break;
7279 
7280  case 779: /* $@9: %empty */
7281  {
7283  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7284 }
7285  break;
7286 
7287  case 781: /* $@10: %empty */
7288  {
7290  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7291 }
7292  break;
7293 
7294  case 783: /* $@11: %empty */
7295  {
7297  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7298 }
7299  break;
7300 
7301  case 785: /* $@12: %empty */
7302  {
7304  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7305 }
7306  break;
7307 
7308  case 787: /* $@13: %empty */
7309  {
7311  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7312 }
7313  break;
7314 
7315  case 789: /* $@14: %empty */
7316  {
7317  osnlData->nlNodePoint = new OSnLNodeLn();
7318  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7319 }
7320  break;
7321 
7322  case 791: /* $@15: %empty */
7323  {
7325  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7326 }
7327  break;
7328 
7329  case 793: /* $@16: %empty */
7330  {
7332  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7333 }
7334  break;
7335 
7336  case 795: /* $@17: %empty */
7337  {
7338  osnlData->nlNodePoint = new OSnLNodeCos();
7339  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7340 }
7341  break;
7342 
7343  case 797: /* $@18: %empty */
7344  {
7345  osnlData->nlNodePoint = new OSnLNodeSin();
7346  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7347 }
7348  break;
7349 
7350  case 799: /* $@19: %empty */
7351  {
7352  osnlData->nlNodePoint = new OSnLNodeExp();
7353  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7354 }
7355  break;
7356 
7357  case 802: /* absStart: ABSSTART */
7358 {
7359  osnlData->nlNodePoint = new OSnLNodeAbs();
7360  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7361 }
7362  break;
7363 
7364  case 803: /* absEnd: ABSEND */
7365 {
7366 #ifdef OSINSTANCE_AVAILABLE
7368 #endif
7369 }
7370  break;
7371 
7372  case 804: /* $@20: %empty */
7373  {
7374  osnlData->nlNodePoint = new OSnLNodeErf();
7375  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7376 }
7377  break;
7378 
7379  case 805: /* erf: ERFSTART $@20 nlnode ERFEND */
7380  {
7381 }
7382  break;
7383 
7384  case 806: /* $@21: %empty */
7385  {
7386  osnlData->nlNodePoint = new OSnLNodeIf();
7387  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7388 }
7389  break;
7390 
7391  case 807: /* if: IFSTART $@21 nlnode nlnode nlnode IFEND */
7392 {
7393 #ifdef OSINSTANCE_AVAILABLE
7395 #endif
7396 }
7397  break;
7398 
7399  case 808: /* $@22: %empty */
7400  {
7402  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7403 }
7404  break;
7405 
7406  case 810: /* $@23: %empty */
7407  {
7409  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7410 }
7411  break;
7412 
7413  case 812: /* $@24: %empty */
7414  {
7416  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7417 }
7418  break;
7419 
7420  case 814: /* number: numberStart numberAttributeList numberEnd */
7421 {
7422  osglData->valuePresent = false;
7423  osglData->typePresent = false;
7424  osnlData->numberidattON = false;
7425 }
7426  break;
7427 
7428  case 815: /* numberStart: NUMBERSTART */
7429 {
7432 }
7433  break;
7434 
7435  case 820: /* numberAttribute: osglTypeATT */
7436  {
7438  }
7439  break;
7440 
7441  case 821: /* numberAttribute: osglValueATT */
7442  {
7443  osnlData->nlNodeNumberPoint->value = atof(osglData->value.c_str());
7444  }
7445  break;
7446 
7447  case 823: /* $@25: %empty */
7448 {
7450  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,"too many number id attributes");
7451  osnlData->numberidattON = true;
7453  free((yyvsp[0].sval));
7454 }
7455  break;
7456 
7457  case 825: /* $@26: %empty */
7458 {
7461 }
7462  break;
7463 
7464  case 826: /* variable: VARIABLESTART $@26 anotherVariableATT variableend */
7465  {osnlData->variablecoefattON = false; osnlData->variableidxattON = false;}
7466  break;
7467 
7468  case 829: /* $@27: %empty */
7469  {
7472  }
7473  break;
7474 
7475  case 833: /* variableATT: variablecoefATT */
7476  {
7478  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many variable coef attributes");
7479  osnlData->variablecoefattON = true;
7480  }
7481  break;
7482 
7483  case 834: /* variableATT: variableidxATT */
7484  {
7486  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many variable idx attributes");
7487  osnlData->variableidxattON = true;
7488  }
7489  break;
7490 
7491  case 835: /* variablecoefATT: COEFATT QUOTE aNumber QUOTE */
7492 {
7493  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) ) parserData->parser_errors +=
7494  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7496 }
7497  break;
7498 
7499  case 836: /* variableidxATT: IDXATT QUOTE INTEGER QUOTE */
7500 {
7501  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) ) parserData->parser_errors +=
7502  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7504 }
7505  break;
7506 
7507  case 837: /* $@28: %empty */
7508  {
7509  osnlData->nlNodePoint = new OSnLNodeSum();
7510  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7511  osnlData->sumVec.push_back( osnlData->nlNodePoint);
7512 }
7513  break;
7514 
7515  case 838: /* sum: SUMSTART $@28 anothersumnlnode SUMEND */
7516  {
7517  ((OSnLNode*)osnlData->sumVec.back())->m_mChildren
7518  = new OSnLNode*[ ((OSnLNode*)osnlData->sumVec.back())->inumberOfChildren];
7519  osnlData->sumVec.pop_back();
7520 }
7521  break;
7522 
7523  case 840: /* anothersumnlnode: anothersumnlnode nlnode */
7524  { ((OSnLNode*)osnlData->sumVec.back())->inumberOfChildren++; }
7525  break;
7526 
7527  case 841: /* $@29: %empty */
7528  {
7530  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7531  osnlData->allDiffVec.push_back( osnlData->nlNodePoint);
7532 }
7533  break;
7534 
7535  case 842: /* allDiff: ALLDIFFSTART $@29 anotherallDiffnlnode ALLDIFFEND */
7536  {
7537  ((OSnLNode*)osnlData->allDiffVec.back())->m_mChildren
7538  = new OSnLNode*[ ((OSnLNode*)osnlData->allDiffVec.back())->inumberOfChildren];
7539  osnlData->allDiffVec.pop_back();
7540 #ifdef OSINSTANCE_AVAILABLE
7542 #endif
7543 }
7544  break;
7545 
7546  case 844: /* anotherallDiffnlnode: anotherallDiffnlnode nlnode */
7547  { ((OSnLNode*)osnlData->allDiffVec.back())->inumberOfChildren++; }
7548  break;
7549 
7550  case 845: /* $@30: %empty */
7551  {
7552  osnlData->nlNodePoint = new OSnLNodeMax();
7553  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7554  osnlData->maxVec.push_back( osnlData->nlNodePoint);
7555 }
7556  break;
7557 
7558  case 846: /* max: MAXSTART $@30 anothermaxnlnode MAXEND */
7559  {
7560  osnlData->maxVec.back()->m_mChildren = new OSnLNode*[ osnlData->maxVec.back()->inumberOfChildren];
7561  osnlData->maxVec.pop_back();
7562 #ifdef OSINSTANCE_AVAILABLE
7564 #endif
7565 }
7566  break;
7567 
7568  case 848: /* anothermaxnlnode: anothermaxnlnode nlnode */
7569  { osnlData->maxVec.back()->inumberOfChildren++; }
7570  break;
7571 
7572  case 849: /* $@31: %empty */
7573  {
7574  osnlData->nlNodePoint = new OSnLNodeMin();
7575  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7576  osnlData->minVec.push_back( osnlData->nlNodePoint);
7577 }
7578  break;
7579 
7580  case 850: /* min: MINSTART $@31 anotherminnlnode MINEND */
7581  {
7582  osnlData->minVec.back()->m_mChildren = new OSnLNode*[ osnlData->minVec.back()->inumberOfChildren];
7583  osnlData->minVec.pop_back();
7584 #ifdef OSINSTANCE_AVAILABLE
7586 #endif
7587 }
7588  break;
7589 
7590  case 852: /* anotherminnlnode: anotherminnlnode nlnode */
7591  { osnlData->minVec.back()->inumberOfChildren++; }
7592  break;
7593 
7594  case 853: /* $@32: %empty */
7595  {
7597  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7598  osnlData->productVec.push_back( osnlData->nlNodePoint);
7599 }
7600  break;
7601 
7602  case 854: /* product: PRODUCTSTART $@32 anotherproductnlnode PRODUCTEND */
7603  {
7604  osnlData->productVec.back()->m_mChildren = new OSnLNode*[ osnlData->productVec.back()->inumberOfChildren];
7605  osnlData->productVec.pop_back();
7606 }
7607  break;
7608 
7609  case 856: /* anotherproductnlnode: anotherproductnlnode nlnode */
7610  { osnlData->productVec.back()->inumberOfChildren++; }
7611  break;
7612 
7613  case 876: /* matrixReference: matrixReferenceStart matrixIdxATT matrixReferenceEnd */
7614 {
7615  osnlData->matrixidxattON = false;
7616 }
7617  break;
7618 
7619  case 877: /* matrixReferenceStart: MATRIXREFERENCESTART */
7620 {
7623 }
7624  break;
7625 
7626  case 880: /* matrixIdxATT: IDXATT QUOTE INTEGER QUOTE */
7627 {
7628  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
7629  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7631 }
7632  break;
7633 
7634  case 881: /* matrixVarReference: matrixVarReferenceStart matrixVarIdxATT matrixVarReferenceEnd */
7635 {
7636  osnlData->matrixidxattON = false;
7637 }
7638  break;
7639 
7640  case 882: /* matrixVarReferenceStart: MATRIXVARSTART */
7641 {
7644 }
7645  break;
7646 
7647  case 885: /* matrixVarIdxATT: IDXATT QUOTE INTEGER QUOTE */
7648 {
7649  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
7650  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7652 }
7653  break;
7654 
7655  case 886: /* matrixObjReference: matrixObjReferenceStart matrixObjIdxATT matrixObjReferenceEnd */
7656 {
7657  osnlData->matrixidxattON = false;
7658 }
7659  break;
7660 
7661  case 887: /* matrixObjReferenceStart: MATRIXOBJSTART */
7662 {
7665 }
7666  break;
7667 
7668  case 890: /* matrixObjIdxATT: IDXATT QUOTE INTEGER QUOTE */
7669 {
7670  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
7671  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7673 }
7674  break;
7675 
7676  case 891: /* matrixConReference: matrixConReferenceStart matrixConIdxATT matrixConReferenceEnd */
7677 {
7678  osnlData->matrixidxattON = false;
7679 }
7680  break;
7681 
7682  case 892: /* matrixConReferenceStart: MATRIXCONSTART */
7683 {
7686 }
7687  break;
7688 
7689  case 895: /* matrixConIdxATT: IDXATT QUOTE INTEGER QUOTE */
7690 {
7691  if ( *(yyvsp[-2].sval) != *(yyvsp[0].sval) )
7692  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7694 }
7695  break;
7696 
7697  case 897: /* matrixDiagonalStart: MATRIXDIAGONALSTART */
7698 {
7700  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7701 }
7702  break;
7703 
7704  case 900: /* matrixDotTimesStart: MATRIXDOTTIMESSTART */
7705 {
7707  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7708 }
7709  break;
7710 
7711  case 903: /* identityMatrixStart: IDENTITYMATRIXSTART */
7712 {
7714  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7715 }
7716  break;
7717 
7718  case 906: /* matrixInverseStart: MATRIXINVERSESTART */
7719 {
7721  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7722 }
7723  break;
7724 
7725  case 909: /* matrixLowerTriangleStart: MATRIXLOWERTRIANGLESTART */
7726 {
7728  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7729 }
7730  break;
7731 
7732  case 911: /* matrixLowerTriangleAttribute: includeDiagonalATT */
7733 {
7735 }
7736  break;
7737 
7738  case 914: /* matrixUpperTriangleStart: MATRIXUPPERTRIANGLESTART */
7739 {
7741  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7742 }
7743  break;
7744 
7745  case 916: /* matrixUpperTriangleAttribute: includeDiagonalATT */
7746 {
7748 }
7749  break;
7750 
7751  case 918: /* includeDiagonalATT: INCLUDEDIAGONALATT ATTRIBUTETEXT QUOTE */
7752 {
7753  if (strcmp((yyvsp[-1].sval),"false") == 0) osnlData->includeDiagonalAttribute = false;
7754  else if (strcmp((yyvsp[-1].sval),"true" ) == 0) osnlData->includeDiagonalAttribute = true;
7755  else parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "osnlData->includeDiagonal attribute must be \"true\" or \"false\"");
7756  free((yyvsp[-1].sval));
7757 }
7758  break;
7759 
7760  case 920: /* matrixMergeStart: MATRIXMERGESTART */
7761 {
7762  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "matrix merge not yet implemented");
7763 }
7764  break;
7765 
7766  case 924: /* matrixMinusStart: MATRIXMINUSSTART */
7767 {
7769  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7770 }
7771  break;
7772 
7773  case 927: /* matrixNegateStart: MATRIXNEGATESTART */
7774 {
7776  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7777 }
7778  break;
7779 
7780  case 930: /* matrixPlusStart: MATRIXPLUSSTART */
7781 {
7783  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7784 }
7785  break;
7786 
7787  case 933: /* matrixTimesStart: MATRIXTIMESSTART */
7788 {
7790  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7791 }
7792  break;
7793 
7794  case 935: /* $@33: %empty */
7795 {
7797  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7799 }
7800  break;
7801 
7802  case 936: /* matrixProduct: MATRIXPRODUCTSTART $@33 anothermatrixproductnode MATRIXPRODUCTEND */
7803 {
7804  osnlData->matrixProductVec.back()->m_mMatrixChildren = new OSnLMNode*[ osnlData->matrixProductVec.back()->inumberOfMatrixChildren];
7805  osnlData->matrixProductVec.pop_back();
7806 }
7807  break;
7808 
7809  case 938: /* anothermatrixproductnode: anothermatrixproductnode OSnLMNode */
7810 {
7811  osnlData->matrixProductVec.back()->inumberOfMatrixChildren++;
7812 }
7813  break;
7814 
7815  case 940: /* matrixScalarTimesStart: MATRIXSCALARTIMESSTART */
7816 {
7818  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7819 }
7820  break;
7821 
7822  case 943: /* matrixSubMatrixAtStart: MATRIXSUBMATRIXATSTART */
7823 {
7825  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7826 }
7827  break;
7828 
7829  case 946: /* matrixTransposeStart: MATRIXTRANSPOSESTART */
7830 {
7832  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7833 }
7834  break;
7835 
7836  case 949: /* matrixExpressions: matrixExpressionsStart matrixExpressionsAtt matrixExpressionsContent */
7837  {
7839  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "actual number of matrix expressions less than number attribute");
7840  }
7841  break;
7842 
7843  case 950: /* matrixExpressionsStart: MATRIXEXPRESSIONSSTART */
7844  {
7845  #ifdef OSINSTANCE_AVAILABLE
7847  osnlData->tmpnlcount = 0;
7848  #endif
7849  }
7850  break;
7851 
7852  case 952: /* numberOfExprATT: NUMBEROFEXPR QUOTE INTEGER QUOTE */
7853  {
7854  #ifdef OSINSTANCE_AVAILABLE
7855  if (*(yyvsp[-2].sval) != *(yyvsp[0].sval))
7856  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
7857  if ((yyvsp[-1].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
7858  "number of expressions cannot be negative");
7859  osnlData->nlnodenumber = (yyvsp[-1].ival);
7863  = new MatrixExpression*[ (yyvsp[-1].ival) ];
7864  for (int i = 0;
7866  i++)
7868  = new MatrixExpression();
7869  #endif
7870  }
7871  break;
7872 
7873  case 959: /* matrixExpr: matrixExprStart matrixExprAttributes GREATERTHAN OSnLMNode EXPREND */
7874  {
7875  // IMPORTANT -- HERE IS WHERE WE CREATE THE EXPRESSION TREE
7876  #ifdef OSINSTANCE_AVAILABLE
7879  #endif
7880  osnlData->tmpnlcount++;
7881  }
7882  break;
7883 
7884  case 960: /* matrixExprStart: EXPRSTART */
7885  {
7888  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "actual number of matrix expressions greater than number attribute");
7889  osglData->idxPresent = false;
7890  osglData->shapePresent = false;
7891 
7892  // clear the vectors of pointers
7893  osnlData->nlNodeVec.clear();
7894  osnlData->sumVec.clear();
7895  osnlData->allDiffVec.clear();
7896  osnlData->maxVec.clear();
7897  osnlData->minVec.clear();
7898  osnlData->productVec.clear();
7899  osnlData->matrixSumVec.clear();
7900  osnlData->matrixProductVec.clear();
7901  }
7902  break;
7903 
7904  case 961: /* matrixExprAttributes: matrixExprAttributeList */
7905 {
7906  if (osglData->idxPresent == false)
7907  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mandatory attribute idx is missing");
7908 }
7909  break;
7910 
7911  case 964: /* exprAttribute: osglIdxATT */
7912  {
7913  #ifdef OSINSTANCE_AVAILABLE
7916  = new MatrixExpressionTree();
7917  #endif
7918  }
7919  break;
7920 
7921  case 965: /* exprAttribute: osglShapeATT */
7922  {
7923  #ifdef OSINSTANCE_AVAILABLE
7924  if (returnNlExprShape(osglData->shape) > 0)
7926  ->expr[ osnlData->tmpnlcount]->shape
7928  else
7930  "unknown shape specified in matrix transformation");
7931  #endif
7932  }
7933  break;
7934 
7935 
7936 
7937  default: break;
7938  }
7939  /* User semantic actions sometimes alter yychar, and that requires
7940  that yytoken be updated with the new translation. We take the
7941  approach of translating immediately before every use of yytoken.
7942  One alternative is translating here after every semantic action,
7943  but that translation would be missed if the semantic action invokes
7944  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
7945  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
7946  incorrect destructor might then be invoked immediately. In the
7947  case of YYERROR or YYBACKUP, subsequent parser actions might lead
7948  to an incorrect destructor call or verbose syntax error message
7949  before the lookahead is translated. */
7950  YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
7951 
7952  YYPOPSTACK (yylen);
7953  yylen = 0;
7954 
7955  *++yyvsp = yyval;
7956  *++yylsp = yyloc;
7957 
7958  /* Now 'shift' the result of the reduction. Determine what state
7959  that goes to, based on the state we popped back to and the rule
7960  number reduced by. */
7961  {
7962  const int yylhs = yyr1[yyn] - YYNTOKENS;
7963  const int yyi = yypgoto[yylhs] + *yyssp;
7964  yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
7965  ? yytable[yyi]
7966  : yydefgoto[yylhs]);
7967  }
7968 
7969  goto yynewstate;
7970 
7971 
7972 /*--------------------------------------.
7973 | yyerrlab -- here on detecting error. |
7974 `--------------------------------------*/
7975 yyerrlab:
7976  /* Make sure we have latest lookahead translation. See comments at
7977  user semantic actions for why this is necessary. */
7979  /* If not already recovering from an error, report this error. */
7980  if (!yyerrstatus)
7981  {
7982  ++yynerrs;
7983  {
7984  yypcontext_t yyctx
7985  = {yyssp, yytoken, &yylloc};
7986  char const *yymsgp = YY_("syntax error");
7987  int yysyntax_error_status;
7988  yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx);
7989  if (yysyntax_error_status == 0)
7990  yymsgp = yymsg;
7991  else if (yysyntax_error_status == -1)
7992  {
7993  if (yymsg != yymsgbuf)
7994  YYSTACK_FREE (yymsg);
7995  yymsg = YY_CAST (char *,
7996  YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
7997  if (yymsg)
7998  {
7999  yysyntax_error_status
8000  = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx);
8001  yymsgp = yymsg;
8002  }
8003  else
8004  {
8005  yymsg = yymsgbuf;
8006  yymsg_alloc = sizeof yymsgbuf;
8007  yysyntax_error_status = YYENOMEM;
8008  }
8009  }
8010  yyerror (&yylloc, osinstance, parserData, osglData, osnlData, yymsgp);
8011  if (yysyntax_error_status == YYENOMEM)
8012  YYNOMEM;
8013  }
8014  }
8015 
8016  yyerror_range[1] = yylloc;
8017  if (yyerrstatus == 3)
8018  {
8019  /* If just tried and failed to reuse lookahead token after an
8020  error, discard it. */
8021 
8022  if (yychar <= YYEOF)
8023  {
8024  /* Return failure if at end of input. */
8025  if (yychar == YYEOF)
8026  YYABORT;
8027  }
8028  else
8029  {
8030  yydestruct ("Error: discarding",
8031  yytoken, &yylval, &yylloc, osinstance, parserData, osglData, osnlData);
8032  yychar = YYEMPTY;
8033  }
8034  }
8035 
8036  /* Else will try to reuse lookahead token after shifting the error
8037  token. */
8038  goto yyerrlab1;
8039 
8040 
8041 /*---------------------------------------------------.
8042 | yyerrorlab -- error raised explicitly by YYERROR. |
8043 `---------------------------------------------------*/
8044 yyerrorlab:
8045  /* Pacify compilers when the user code never invokes YYERROR and the
8046  label yyerrorlab therefore never appears in user code. */
8047  if (0)
8048  YYERROR;
8049  ++yynerrs;
8050 
8051  /* Do not reclaim the symbols of the rule whose action triggered
8052  this YYERROR. */
8053  YYPOPSTACK (yylen);
8054  yylen = 0;
8056  yystate = *yyssp;
8057  goto yyerrlab1;
8058 
8059 
8060 /*-------------------------------------------------------------.
8061 | yyerrlab1 -- common code for both syntax error and YYERROR. |
8062 `-------------------------------------------------------------*/
8063 yyerrlab1:
8064  yyerrstatus = 3; /* Each real token shifted decrements this. */
8065 
8066  /* Pop stack until we find a state that shifts the error token. */
8067  for (;;)
8068  {
8069  yyn = yypact[yystate];
8071  {
8072  yyn += YYSYMBOL_YYerror;
8073  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
8074  {
8075  yyn = yytable[yyn];
8076  if (0 < yyn)
8077  break;
8078  }
8079  }
8080 
8081  /* Pop the current state because it cannot handle the error token. */
8082  if (yyssp == yyss)
8083  YYABORT;
8084 
8085  yyerror_range[1] = *yylsp;
8086  yydestruct ("Error: popping",
8088  YYPOPSTACK (1);
8089  yystate = *yyssp;
8091  }
8092 
8094  *++yyvsp = yylval;
8096 
8097  yyerror_range[2] = yylloc;
8098  ++yylsp;
8100 
8101  /* Shift the error token. */
8103 
8104  yystate = yyn;
8105  goto yynewstate;
8106 
8107 
8108 /*-------------------------------------.
8109 | yyacceptlab -- YYACCEPT comes here. |
8110 `-------------------------------------*/
8111 yyacceptlab:
8112  yyresult = 0;
8113  goto yyreturnlab;
8114 
8115 
8116 /*-----------------------------------.
8117 | yyabortlab -- YYABORT comes here. |
8118 `-----------------------------------*/
8119 yyabortlab:
8120  yyresult = 1;
8121  goto yyreturnlab;
8122 
8123 
8124 /*-----------------------------------------------------------.
8125 | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
8126 `-----------------------------------------------------------*/
8127 yyexhaustedlab:
8128  yyerror (&yylloc, osinstance, parserData, osglData, osnlData, YY_("memory exhausted"));
8129  yyresult = 2;
8130  goto yyreturnlab;
8131 
8132 
8133 /*----------------------------------------------------------.
8134 | yyreturnlab -- parsing is finished, clean up and return. |
8135 `----------------------------------------------------------*/
8136 yyreturnlab:
8137  if (yychar != YYEMPTY)
8138  {
8139  /* Make sure we have latest lookahead translation. See comments at
8140  user semantic actions for why this is necessary. */
8142  yydestruct ("Cleanup: discarding lookahead",
8143  yytoken, &yylval, &yylloc, osinstance, parserData, osglData, osnlData);
8144  }
8145  /* Do not reclaim the symbols of the rule whose action triggered
8146  this YYABORT or YYACCEPT. */
8147  YYPOPSTACK (yylen);
8149  while (yyssp != yyss)
8150  {
8151  yydestruct ("Cleanup: popping",
8153  YYPOPSTACK (1);
8154  }
8155 #ifndef yyoverflow
8156  if (yyss != yyssa)
8157  YYSTACK_FREE (yyss);
8158 #endif
8159  if (yymsg != yymsgbuf)
8160  YYSTACK_FREE (yymsg);
8161  return yyresult;
8162 }
8163 
8164 
8165 
8166 
8167 // user defined functions
8168 
8169 void osilerror(YYLTYPE* mytype, OSInstance *osinstance, OSiLParserData* parserData, OSgLParserData* osglData, OSnLParserData* osnlData, std::string errormsg )
8170 {
8174  throw ErrorClass( errormsg);
8175 } //end osilerror
8176 
8177 
8178 std::string addErrorMsg(YYLTYPE* mytype, OSInstance *osinstance, OSiLParserData* parserData, OSgLParserData* osglData, OSnLParserData* osnlData, std::string errormsg )
8179 {
8180  std::ostringstream outStr;
8181  outStr << "At line number " << osilget_lineno( scanner) << ": ";
8182  outStr << osilget_text ( scanner ) << std::endl;
8183  outStr << errormsg << std::endl;
8184 
8185  return outStr.str();
8186 } //end addErrorMsg
8187 
8188 
8190  try {
8191  parseInstanceHeader( &osil, osinstance, &parserData->osillineno);
8192  parseInstanceData( &osil, osinstance, &parserData->osillineno);
8198  osil_scan_string( osil, scanner );
8199  osilset_lineno (parserData->osillineno , scanner );
8200  //
8201  // call the Bison parser
8202  //
8203  if( osilparse( osinstance, parserData, osglData, osnlData) != 0) {
8204  throw ErrorClass( "Error parsing the OSiL");
8205  }
8206  }
8207  catch(const ErrorClass& eclass){
8208  throw ErrorClass( eclass.errormsg);
8209  }
8210 }//end yygetOSInstance
8211 
8212 bool isnewline(char c, int* osillineno){
8213  if(c != '\n') return false;
8214  (*osillineno)++;
8215  return true;
8216 }//end isnewline()
8217 
8218 bool parseInstanceHeader( const char **p, OSInstance *osinstance, int* osillineno){
8219  //
8220  *osillineno = 1;
8221  const char *pchar = *p;
8222 
8223 
8224  //first check of osil start
8225  const char *startOSiL = "<osil";
8226  const char *pOSiLStart = strstr(pchar, startOSiL);
8227  if(pOSiLStart == NULL){
8228  osilerror_wrapper( pchar,osillineno,"<osil> element missing");
8229  return false;
8230  }else{
8231  //look for osil end
8232  const char *pOSiLEnd = strstr(pOSiLStart, ">");
8233  if(pOSiLEnd == NULL) { osilerror_wrapper( pchar,osillineno,"end of <osil> element missing"); return false;
8234  } else {
8235  pchar = pOSiLEnd;
8236  pchar++;
8237  }
8238  }
8239 
8240 
8241  // create a char array that holds the instance header information
8242  const char *startInstanceHeader = "<instanceHeader";
8243  const char *endInstanceHeader = "instanceHeader"; // "</instanceHeader";
8244  const char *startName = "ame"; // "<name";
8245  const char *startSource = "ource"; // "<source";
8246  const char *startDescription = "escription"; // "<description";
8247  const char *startFileCreator = "ileCreator"; // "<fileCreator";
8248  const char *startLicence = "icence"; // "<licence";
8249  const char *endName = "</name";
8250  const char *endSource = "</source";
8251  const char *endDescription = "</description";
8252  const char *endFileCreator = "</fileCreator";
8253  const char *endLicence = "</licence";
8254  const char *pinstanceHeadStart = strstr(pchar, startInstanceHeader);
8255  char *pelementText = NULL;
8256  const char *ptemp = NULL;
8257  int elementSize;
8258 
8259  bool namePresent = false;
8260  bool sourcePresent = false;
8261  bool descriptionPresent = false;
8262  bool fileCreatorPresent = false;
8263  bool licencePresent = false;
8264 
8265  if(pinstanceHeadStart == NULL ) {
8266  const char *startInstanceData = "<instanceData";
8267  *p = strstr(pchar, startInstanceData);
8268  return true;
8269  }
8270  // increment the line number counter if there are any newlines between the start of
8271  // the osil string and pinstanceHeadStart
8272  int kount = pinstanceHeadStart - pchar;
8273  while( kount-- > 0) if(*(pchar++) == '\n') (*osillineno)++;
8274  // important! pchar now points to the '<' in <instanceHeader
8275  // that is, both pinstanceHeadStart and pchar point to the same thing
8276  //
8277  // move to the end of <instanceHeader
8278  pchar+=15;
8279  // burn any whitespace
8280  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
8281  // pchar better be pointing to the '>' in the <instanceHeader> element
8282  // or to /> if we have <instanceHeader />
8283  if( *pchar == '/'){
8284  pchar++;
8285  // better point to a '>'
8286  if(*pchar != '>') { osilerror_wrapper( pchar,osillineno,"improperly formed <instanceHeader> element"); return false;}
8287  // there is no instanceHeader data
8288  pchar++;
8289  *p = pchar;
8290  return true;
8291  }
8292  else{
8293  // pchar better be '>' or there is an error
8294  if(*pchar != '>') { osilerror_wrapper( pchar,osillineno,"improperly formed <instanceHeader> element"); return false;}
8295  }
8296  pchar++;
8297  // we are pointing to the character after <instanceHeader>
8298  //
8299  // The next element could be </instanceHeader or one of the content elements (in arbitrary order):
8300  // <name
8301  // <source
8302  // <description
8303  // <fileCreator
8304  // <licence
8305 
8306  for (;;)
8307  {
8308  // first burn any whitespace
8309  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
8310  // remember where we are
8311  *p = pchar;
8312  // The next character should be '<'
8313  if (*pchar != '<') {osilerror_wrapper( pchar,osillineno,"improperly formed <name> element"); return false;}
8314  pchar++;
8315  switch (*pchar)
8316  {
8317  case 'n': // <name
8318  if (namePresent)
8319  {
8320  osilerror_wrapper( pchar,osillineno,"duplicate <name> element");
8321  return false;
8322  }
8323  else
8324  namePresent = true;
8325  pchar++;
8326  while(*startName++ == *pchar) pchar++;
8327  if( (pchar - *p) != 5)
8328  {
8329  osilerror_wrapper( pchar,osillineno,"tag not recognized");
8330  return false;
8331  }
8332  else
8333  {
8334  // we have a name element, process the text
8335  // burn the whitespace
8336  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
8337  if( *pchar == '/')
8338  {
8339  pchar++;
8340  // better point to a '>'
8341  if(*pchar != '>')
8342  {
8343  osilerror_wrapper( pchar,osillineno,"improperly formed <name> element");
8344  return false;
8345  }
8346  pchar++;
8347  }
8348  else
8349  {
8350  // pchar better be '>' or there is an error
8351  if(*pchar != '>')
8352  {
8353  osilerror_wrapper( pchar,osillineno,"improperly formed <name> element");
8354  return false;
8355  }
8356  pchar++;
8357  // process <name> element text
8358  // there better be a </name
8359  ptemp = strstr( pchar, endName);
8360  if( ptemp == NULL)
8361  {
8362  osilerror_wrapper( pchar,osillineno,"improperly formed </name> element");
8363  return false;
8364  }
8365  elementSize = ptemp - pchar;
8366  pelementText = new char[ elementSize + 1];
8367  strncpy(pelementText, pchar, elementSize);
8368  pelementText[ elementSize] = '\0';
8369  osinstance->instanceHeader->name = pelementText;
8370  //garbage collection
8371  delete [] pelementText;
8372  // move pchar up to the end of </name
8373  while(elementSize-- > 0)
8374  {
8375  if(*pchar++ == '\n') (*osillineno)++;
8376  }
8377  // pchar should now be pointing to the start of </name
8378  // move to first char after </name
8379  pchar += 6;
8380  // get rid of the whitespace
8381  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
8382  // we better have the '>' for the end of name
8383  if(*pchar++ != '>')
8384  {
8385  osilerror_wrapper( pchar,osillineno,"improperly formed </name> element");
8386  return false;
8387  }
8388  }
8389  }
8390  break;
8391 
8392  case 's': // <source
8393  if (sourcePresent)
8394  {
8395  osilerror_wrapper( pchar,osillineno,"duplicate <source> element");
8396  return false;
8397  }
8398  else
8399  sourcePresent = true;
8400  pchar++;
8401  while(*startSource++ == *pchar) pchar++;
8402  if( (pchar - *p) != 7)
8403  {
8404  osilerror_wrapper( pchar,osillineno,"tag not recognized");
8405  return false;
8406  }
8407  else
8408  {
8409  // we have a source element, process the text
8410  // burn the whitespace
8411  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
8412  if( *pchar == '/')
8413  {
8414  pchar++;
8415  // better point to a '>'
8416  if(*pchar != '>')
8417  {
8418  osilerror_wrapper( pchar,osillineno,"improperly formed <source> element");
8419  return false;
8420  }
8421  pchar++;
8422  }
8423  else
8424  {
8425  // pchar better be '>' or there is an error
8426  if(*pchar != '>')
8427  {
8428  osilerror_wrapper( pchar,osillineno,"improperly formed <source> element");
8429  return false;
8430  }
8431  pchar++;
8432  // process <source> element text
8433  // there better be a </source
8434  ptemp = strstr( pchar, endSource);
8435  if( ptemp == NULL)
8436  {
8437  osilerror_wrapper( pchar,osillineno,"improperly formed </source> element");
8438  return false;
8439  }
8440  elementSize = ptemp - pchar;
8441  pelementText = new char[ elementSize + 1];
8442  strncpy(pelementText, pchar, elementSize);
8443  pelementText[ elementSize] = '\0';
8444  osinstance->instanceHeader->source = pelementText;
8445  //garbage collection
8446  delete [] pelementText;
8447  // move pchar up to the end of </source
8448  while(elementSize-- > 0)
8449  {
8450  if(*pchar++ == '\n') (*osillineno)++;
8451  }
8452  // pchar should now be pointing to the start of </source
8453  // move to first char after </source
8454  pchar += 8;
8455  // get rid of the whitespace
8456  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
8457  // we better have the '>' for the end of source
8458  if(*pchar++ != '>')
8459  {
8460  osilerror_wrapper( pchar,osillineno,"improperly formed </source> element");
8461  return false;
8462  }
8463  }
8464  }
8465  break;
8466 
8467  case 'd': // <description
8468  if (descriptionPresent)
8469  {
8470  osilerror_wrapper( pchar,osillineno,"duplicate <description> element");
8471  return false;
8472  }
8473  else
8474  descriptionPresent = true;
8475  pchar++;
8476  while(*startDescription++ == *pchar) pchar++;
8477  if( (pchar - *p) != 12)
8478  {
8479  osilerror_wrapper( pchar,osillineno,"tag not recognized");
8480  return false;
8481  }
8482  else
8483  {
8484  // we have a description element, process the text
8485  // burn the whitespace
8486  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
8487  if( *pchar == '/')
8488  {
8489  pchar++;
8490  // better point to a '>'
8491  if(*pchar != '>')
8492  {
8493  osilerror_wrapper( pchar,osillineno,"improperly formed <description> element");
8494  return false;
8495  }
8496  pchar++;
8497  }
8498  else
8499  {
8500  // pchar better be '>' or there is an error
8501  if(*pchar != '>')
8502  {
8503  osilerror_wrapper( pchar,osillineno,"improperly formed <description> element");
8504  return false;
8505  }
8506  pchar++;
8507  // process <description> element text
8508  // there better be a </description
8509  ptemp = strstr( pchar, endDescription);
8510  if( ptemp == NULL)
8511  {
8512  osilerror_wrapper( pchar,osillineno,"improperly formed </description> element");
8513  return false;
8514  }
8515  elementSize = ptemp - pchar;
8516  pelementText = new char[ elementSize + 1];
8517  strncpy(pelementText, pchar, elementSize);
8518  pelementText[ elementSize] = '\0';
8519  osinstance->instanceHeader->description = pelementText;
8520  //garbage collection
8521  delete [] pelementText;
8522  // move pchar up to the end of </description
8523  while(elementSize-- > 0)
8524  {
8525  if(*pchar++ == '\n') (*osillineno)++;
8526  }
8527  // pchar should now be pointing to the start of </description
8528  // move to first char after </description
8529  pchar += 13;
8530  // get rid of the whitespace
8531  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
8532  // we better have the '>' for the end of description
8533  if(*pchar++ != '>')
8534  {
8535  osilerror_wrapper( pchar,osillineno,"improperly formed </description> element");
8536  return false;
8537  }
8538  }
8539  }
8540  break;
8541 
8542  case 'f': // <fileCreator
8543  if (fileCreatorPresent)
8544  {
8545  osilerror_wrapper( pchar,osillineno,"duplicate <fileCreator> element");
8546  return false;
8547  }
8548  else
8549  fileCreatorPresent = true;
8550  pchar++;
8551  while(*startFileCreator++ == *pchar) pchar++;
8552  if( (pchar - *p) != 12)
8553  {
8554  osilerror_wrapper( pchar,osillineno,"tag not recognized");
8555  return false;
8556  }
8557  else
8558  {
8559  // we have a fileCreator element, process the text
8560  // burn the whitespace
8561  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
8562  if( *pchar == '/')
8563  {
8564  pchar++;
8565  // better point to a '>'
8566  if(*pchar != '>')
8567  {
8568  osilerror_wrapper( pchar,osillineno,"improperly formed <fileCreator> element");
8569  return false;
8570  }
8571  pchar++;
8572  }
8573  else
8574  {
8575  // pchar better be '>' or there is an error
8576  if(*pchar != '>')
8577  {
8578  osilerror_wrapper( pchar,osillineno,"improperly formed <fileCreator> element");
8579  return false;
8580  }
8581  pchar++;
8582  // process <fileCreator> element text
8583  // there better be a </fileCreator
8584  ptemp = strstr( pchar, endFileCreator);
8585  if( ptemp == NULL)
8586  {
8587  osilerror_wrapper( pchar,osillineno,"improperly formed </fileCreator> element");
8588  return false;
8589  }
8590  elementSize = ptemp - pchar;
8591  pelementText = new char[ elementSize + 1];
8592  strncpy(pelementText, pchar, elementSize);
8593  pelementText[ elementSize] = '\0';
8594  osinstance->instanceHeader->fileCreator = pelementText;
8595  //garbage collection
8596  delete [] pelementText;
8597  // move pchar up to the end of </fileCreator
8598  while(elementSize-- > 0)
8599  {
8600  if(*pchar++ == '\n') (*osillineno)++;
8601  }
8602  // pchar should now be pointing to the start of </fileCreator
8603  // move to first char after </fileCreator
8604  pchar += 13;
8605  // get rid of the whitespace
8606  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
8607  // we better have the '>' for the end of fileCreator
8608  if(*pchar++ != '>')
8609  {
8610  osilerror_wrapper( pchar,osillineno,"improperly formed </fileCreator> element");
8611  return false;
8612  }
8613  }
8614  }
8615  break;
8616 
8617  case 'l': // <licence
8618  if (licencePresent)
8619  {
8620  osilerror_wrapper( pchar,osillineno,"duplicate <licence> element");
8621  return false;
8622  }
8623  else
8624  licencePresent = true;
8625  pchar++;
8626  while(*startLicence++ == *pchar) pchar++;
8627  if( (pchar - *p) != 8)
8628  {
8629  osilerror_wrapper( pchar,osillineno,"tag not recognized");
8630  return false;
8631  }
8632  else
8633  {
8634  // we have a licence element, process the text
8635  // burn the whitespace
8636  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
8637  if( *pchar == '/')
8638  {
8639  pchar++;
8640  // better point to a '>'
8641  if(*pchar != '>')
8642  {
8643  osilerror_wrapper( pchar,osillineno,"improperly formed <licence> element");
8644  return false;
8645  }
8646  pchar++;
8647  }
8648  else
8649  {
8650  // pchar better be '>' or there is an error
8651  if(*pchar != '>')
8652  {
8653  osilerror_wrapper( pchar,osillineno,"improperly formed <licence> element");
8654  return false;
8655  }
8656  pchar++;
8657  // process <licence> element text
8658  // there better be a </licence
8659  ptemp = strstr( pchar, endLicence);
8660  if( ptemp == NULL)
8661  {
8662  osilerror_wrapper( pchar,osillineno,"improperly formed </licence> element");
8663  return false;
8664  }
8665  elementSize = ptemp - pchar;
8666  pelementText = new char[ elementSize + 1];
8667  strncpy(pelementText, pchar, elementSize);
8668  pelementText[ elementSize] = '\0';
8669  osinstance->instanceHeader->licence = pelementText;
8670  //garbage collection
8671  delete [] pelementText;
8672  // move pchar up to the end of </licence
8673  while(elementSize-- > 0)
8674  {
8675  if(*pchar++ == '\n') (*osillineno)++;
8676  }
8677  // pchar should now be pointing to the start of </licence
8678  // move to first char after </licence
8679  pchar += 9;
8680  // get rid of the whitespace
8681  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
8682  // we better have the '>' for the end of licence
8683  if(*pchar++ != '>')
8684  {
8685  osilerror_wrapper( pchar,osillineno,"improperly formed </licence> element");
8686  return false;
8687  }
8688  }
8689  }
8690  break;
8691 
8692  case '/': // </instanceHeader
8693  pchar++;
8694  while(*endInstanceHeader++ == *pchar) pchar++;
8695  if( (pchar - *p) != 16)
8696  {
8697  osilerror_wrapper( pchar,osillineno,"improperly formed </instanceHeader> element");
8698  return false;
8699  }
8700  // pchar now points to the first character after </instanceHeader
8701  // get rid of white space
8702  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
8703  // pchar must point to '>' or there is an error
8704  if(*pchar != '>')
8705  {
8706  osilerror_wrapper( pchar,osillineno,"improperly formed </instanceHeader> element");
8707  return false;
8708  }
8709  pchar++;
8710  *p = pchar;
8711  return true;
8712 
8713  default:
8714  {osilerror_wrapper( pchar,osillineno,"tag not recognized"); return false;}
8715  }
8716  }
8717  return false;
8718 }//end parseInstanceHeader
8719 
8720 
8721 bool parseInstanceData( const char **p, OSInstance *osinstance, int* osillineno){
8722  //
8723  const char *pchar = *p;
8724  const char *startInstanceData = "<instanceData";
8725  // at this point *pchar should be pointing to the first char after the > in </instanceHeader>
8726  // burn the white space
8727  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
8728  // pchar should be point to a '<', if not there is an error
8729  if(*pchar != '<'){ osilerror_wrapper( pchar,osillineno,"improperly formed <instanceData element"); return false;}
8730  // make sure the element is <instanceData
8731  *p = pchar;
8732  while(*startInstanceData++ == *pchar) pchar++;
8733  if( (pchar - *p) != 13) { osilerror_wrapper( pchar,osillineno,"improperly formed <instanceData> element"); return false;}
8734  // now burn whitespace
8735  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
8736  // pchar must point to '>' or there is an error
8737  if(*pchar == '>'){
8738  pchar++;
8739  // we are now pointing to the first char after <instanceData>
8740  // burn any whitespace
8741  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
8742  // we should be pointing to the '<' char in <variables>
8743  *p = pchar;
8744  if( parseVariables ( p, osinstance, osillineno) != true) throw ErrorClass("error in parseVariables");
8745  if( parseObjectives ( p, osinstance, osillineno) != true) throw ErrorClass("error in parseObjectives");
8746  if( parseConstraints( p, osinstance, osillineno) != true) throw ErrorClass("error in parseConstraints");
8747  if( parseLinearConstraintCoefficients( p, osinstance, osillineno) != true) throw ErrorClass("error in parseLinearConstraintCoefficients");
8748  }else{
8749  //osilerror_wrapper( pchar,osillineno,"improperly formed <instanceData> element");
8750  return true;
8751  }
8752  // we should be pointing to the '<' char in <variables>
8753  return true;
8754 }// end parseInstanceData
8755 
8756 
8757 bool parseVariables( const char **p, OSInstance *osinstance, int* osillineno){
8758  clock_t start, finish;
8759  #ifdef CHECK_PARSE_TIME
8760  double duration;
8761  #endif
8762  int ki, numChar;
8763  char *attTextEnd;
8764  const char *ch = *p;
8765  start = clock();
8766  const char *c_numberOfVariables = "numberOfVariables";
8767  const char *startVariables = "<variables";
8768  const char *endVariables = "</variables";
8769  const char *startVar = "<var";
8770  const char *endVar = "</var";
8771  // the attributes
8772  char *attText = NULL;
8773  const char *name = "name";
8774  //const char *initString = "initString";
8775  const char *type = "type";
8776  const char *mult = "mult";
8777  // others
8778  int i;
8779  int varcount = 0;
8780  int vt;
8781  int numberOfVariables = 0;
8782 // variable attribute boolean variables
8783  bool varlbattON = false;
8784  bool varubattON = false ;
8785  bool vartypeattON = false;
8786  bool varnameattON = false ;
8787  //bool varinitattON = false ;
8788  //bool varinitStringattON = false ;
8789  bool varmultattON = false;
8790  bool foundVar = false;
8791  int varmult;
8792  //
8793  // start parsing -- okay not to have variables
8794  // burn white space
8795  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
8796  *p = ch;
8797  while(*startVariables++ == *ch) ch++;
8798  //if( (ch - *p) != 10) { osilerror_wrapper( ch,osillineno,"incorrect <variables tag>"); return false;}
8799  if( (ch - *p) != 10) { return true;}
8800 
8801  osinstance->instanceData->variables = new Variables();
8802 
8803  // find numberOfVariables attribute
8804  // eat the white space
8805  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
8806  *p = ch;
8807  while(*c_numberOfVariables++ == *ch) ch++;
8808  if( (ch - *p) != 17) { osilerror_wrapper( ch,osillineno,"incorrect numberOfVariables attribute in <variables tag>"); return false;}
8809  // buf_index should be pointing to the first character after numberOfVariables
8811  ch++;
8812  numberOfVariables = atoimod1( osillineno, attText, attTextEnd);
8813  delete [] attText;
8814  if(numberOfVariables < 0) {
8815  osilerror_wrapper( ch,osillineno,"there must be a nonnegative number of variables"); return false;
8816  }
8817  osinstance->instanceData->variables->numberOfVariables = numberOfVariables;
8818  if(numberOfVariables > 0){
8819  osinstance->instanceData->variables->var = new Variable*[ numberOfVariables];
8820  for(i = 0; i < numberOfVariables; i++){
8821  osinstance->instanceData->variables->var[ i] = new Variable();
8822  }
8823  }
8824  // get rid of white space after the numberOfVariables element
8825  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
8826  // since there must be at least one variable, this element must end with >
8827  if(numberOfVariables > 0){
8828  // better have an > sign or not valid
8829  if(*ch != '>' ) { osilerror_wrapper( ch,osillineno,"variables element does not have a proper closing >"); return false;}
8830  ch++;
8831  // get rid of white space
8832  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
8833  // now loop over the var element when the numberOfVariables is strictly positive
8834  *p = ch;
8835  while(*startVar++ == *ch) ch++;
8836  if( (ch - *p) == 4) foundVar = true;
8837  else { osilerror_wrapper( ch,osillineno,"there must be at least one <var> element"); return false;}
8838  startVar -= 5;
8839  while(foundVar){
8840  varlbattON = false;
8841  varubattON = false;
8842  vartypeattON = false;
8843  varnameattON = false;
8844  varmultattON = false;
8845  varmult = 1;
8846  foundVar = false;
8847  vt = 0;
8848  // assume we are pointing to the first character after the r in <var
8849  // it should be whitespace
8850  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
8851  while(*ch != '/' && *ch != '>'){
8852  switch (*ch) {
8853  case 'n':
8854  *p = ch;
8855  while(*name++ == *ch) ch++;
8856  if( (ch - *p) != 4 ) { osilerror_wrapper( ch,osillineno,"error in variables name attribute"); return false;}
8857  name -= 5;
8858  if(varnameattON == true) { osilerror_wrapper( ch,osillineno,"too many variable name attributes"); return false;}
8859  varnameattON = true;
8861  osinstance->instanceData->variables->var[varcount]->name=attText;
8862  delete [] attText;
8863  break;
8864  case 't':
8865  *p = ch;
8866  while(*type++ == *ch) ch++;
8867  if( (ch - *p) != 4) { osilerror_wrapper( ch,osillineno,"error in variables type attribute"); return false;}
8868  type -= 5;
8869  if(vartypeattON == true) { osilerror_wrapper( ch,osillineno,"too many variable type attributes"); return false;}
8870  vartypeattON = true;
8872  vt = returnVarType(attText[0]);
8873  if( vt == 0 ) { osilerror_wrapper( ch,osillineno,"variable type not recognized"); return false;}
8874  osinstance->instanceData->variables->var[varcount]->type = attText[0];
8875  delete [] attText;
8876  break;
8877  case 'l':
8878  ch++;
8879  if(*ch++ != 'b') { osilerror_wrapper( ch,osillineno,"error in variables lower bound attribute"); return false;}
8880  if(varlbattON == true) { osilerror_wrapper( ch,osillineno,"too many variable lb attributes"); return false;}
8881  varlbattON = true;
8883  osinstance->instanceData->variables->var[varcount]->lb = atofmod1( osillineno,attText, attTextEnd);
8884  delete [] attText;
8885  break;
8886  case 'u':
8887  ch++;
8888  if(*ch++ != 'b') { osilerror_wrapper( ch,osillineno,"error in variables upper bound attribute"); return false;}
8889  if(varubattON == true) { osilerror_wrapper( ch,osillineno,"too many variable ub attributes"); return false;}
8890  varubattON = true;
8892  osinstance->instanceData->variables->var[varcount]->ub = atofmod1( osillineno,attText, attTextEnd);
8893  delete [] attText;
8894  break;
8895  case 'm':
8896  *p = ch;
8897  while(*mult++ == *ch) ch++;
8898  if( (ch - *p) != 4) { osilerror_wrapper( ch,osillineno,"error in variables mult attribute"); return false;}
8899  mult -= 5;
8900  if(varmultattON == true) { osilerror_wrapper( ch,osillineno,"too many variable mult attributes"); return false;}
8901  varmultattON = true;
8903  varmult = atoimod1( osillineno,attText, attTextEnd);
8904  delete [] attText;
8905  break;
8906  case ' ':
8907  break;
8908  case '\n':
8909  (*osillineno)++;
8910  break;
8911  case '\t':
8912  break;
8913  case '\r':
8914  break;
8915  default:
8916  osilerror_wrapper( ch,osillineno,"invalid attribute character");
8917  return false;
8918  break;
8919  }
8920  // reset default upper bound for binary variables
8921  if (vt == ENUM_VARTYPE_binary)
8922  {
8923  if (varubattON == false)
8924  osinstance->instanceData->variables->var[varcount]->ub = 1.0;
8925  }
8926  ch++;
8927  }
8928  //
8929  // assume all the attributes have been processed
8930  // must have either /> or > and then whitespace and </var whitespace>
8931  if( *ch != '/' && *ch != '>') { osilerror_wrapper( ch,osillineno,"incorrect end of <var> element"); return false;}
8932  if(*ch == '/'){
8933  ch++;
8934  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"incorrect end of <var> element"); return false;}
8935  // get rid of whitespace
8936  ch++;
8937  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
8938  // either have another <var> element or foundVar = false;
8939  *p = ch;
8940  while(*startVar++ == *ch) ch++;
8941  if( (ch - *p) == 4) {
8942  foundVar = true;
8943  startVar -= 5;
8944  }
8945  else {
8946  foundVar = false;
8947  ch = *p;
8948  }
8949  }
8950  else{
8951  // the buf_index is the > at the end of the var element
8952  // double check to make sure it really is a >
8953  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improper ending to a <var> element"); return false;}
8954  // look for </var
8955  // fist get rid of white space
8956  ch++;
8957  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
8958  // we should be at </var or there is an error
8959  *p = ch;
8960  while(*endVar++ == *ch) ch++;
8961  endVar -= 6;
8962  if( (ch - *p) != 5) { osilerror_wrapper( ch,osillineno,"</var> element missing"); return false;}
8963  // burn off the whitespace
8964  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
8965  // better have an > to end </var
8966  if(*ch++ != '>') { osilerror_wrapper( ch,osillineno,"</var> element missing >"); return false;}
8967  // look for a new <var> element
8968  // get rid of whitespace
8969  ch++;
8970  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
8971  // either have another <var> element or foundVar = false;
8972  *p = ch;
8973  while(*startVar++ == *ch) ch++;
8974  if( (ch - *p) == 4) {
8975  foundVar = true;
8976  startVar -= 5;
8977  }
8978  else {
8979  foundVar = false;
8980  ch = *p;
8981  }
8982  }
8983  if( ((varcount+varmult) == numberOfVariables) && (foundVar == true) ) { osilerror_wrapper( ch,osillineno,"attribute numberOfVariables is less than actual number found"); return false;}
8984  for (int k=1; k < varmult; k++)
8985  {
8986  osinstance->instanceData->variables->var[varcount+k]->name
8987  = osinstance->instanceData->variables->var[varcount]->name;
8988  osinstance->instanceData->variables->var[varcount+k]->type
8989  = osinstance->instanceData->variables->var[varcount]->type;
8990  osinstance->instanceData->variables->var[varcount+k]->lb
8991  = osinstance->instanceData->variables->var[varcount]->lb;
8992  osinstance->instanceData->variables->var[varcount+k]->ub
8993  = osinstance->instanceData->variables->var[varcount]->ub;
8994  }
8995  varcount += varmult;
8996  }// end while(foundVar)
8997  if(varcount < numberOfVariables) { osilerror_wrapper( ch,osillineno,"attribute numberOfVariables is greater than actual number found"); return false;}
8998  // get the </variables> tag
8999  *p = ch;
9000  while(*endVariables++ == *ch) ch++;
9001  if( (ch - *p) != 11) { osilerror_wrapper( ch,osillineno,"cannot find </variables> tag"); return false;}
9002  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9003  // better have >
9004  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </variables> tag"); return false;}
9005  ch++;
9006  }else {//end if(numberOfVariables > 0)
9007  // error if the number is negative
9008  if(numberOfVariables < 0) { osilerror_wrapper( ch,osillineno,"cannot have a negative number of variables"); return false;}
9009  // if we are here we have numberOfVariables = 0
9010  // must close with /> or </variables>
9011  // get rid of white space
9012  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9013  if( *ch == '/'){
9014  // better have a >
9015  ch++;
9016  if( *ch != '>') { osilerror_wrapper( ch,osillineno,"improperly closed variables tag"); return false;}
9017  ch++;
9018  }
9019  else{
9020  // if we are here we must have an '>' and then </constraints> tag
9021  if( *ch != '>') { osilerror_wrapper( ch,osillineno,"improperly closed variables tag"); return false;}
9022  ch++;
9023  // burn white space
9024  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9025  *p = ch;
9026  while( *endVariables++ == *ch) ch++;
9027  if( (ch - *p) != 11) { osilerror_wrapper( ch,osillineno, "cannot find </variables> tag"); return false; }
9028  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9029  // better have >
9030  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </variables> tag"); return false;}
9031  ch++;
9032  }
9033  }
9034  finish = clock();
9035  #ifdef CHECK_PARSE_TIME
9036  duration = (double) (finish - start) / CLOCKS_PER_SEC;
9037  printf("TIME TO PARSE VARIABLES = %f\n", duration);
9038  #endif
9039  *p = ch;
9040  return true;
9041 }//end parseVariables
9042 
9043 
9044 bool parseObjectives( const char **p, OSInstance *osinstance, int* osillineno){
9045  clock_t start, finish;
9046  #ifdef CHECK_PARSE_TIME
9047  double duration;
9048  #endif
9049  int ki, numChar;
9050  char *attTextEnd;
9051  const char *ch = *p;
9052  start = clock();
9053  const char *c_numberOfObjectives = "numberOfObjectives";
9054  const char *startObjectives = "<objectives";
9055  const char *endObjectives = "</objectives";
9056  const char *startObj = "<obj";
9057  const char *endObj = "</obj";
9058  // attributes
9059  char *attText = NULL;
9060  const char *constant = "constant";
9061  const char *maxOrMin = "maxOrMin";
9062  const char *numberOfObjCoef = "numberOfObjCoef";
9063  const char *weight = "weight";
9064  const char *name = "name";
9065  const char *mult = "mult";
9066  // others
9067  int i;
9068  // objective function attribute boolean variables
9069  bool objmaxOrMinattON = false;
9070  bool objnameattON = false;
9071  bool objconstantattON = false;
9072  bool objweightattON = false;
9073  bool objmultattON = false;
9074  bool objnumberOfObjCoefattON = false;
9075  int objcount = 0;
9076  int numberOfObjectives;
9077  bool foundObj;
9078  int objmult;
9079  // start parsing
9080  // burn white space
9081  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9082  // if, present we should be pointing to <objectives element if there -- it is not required
9083  *p = ch;
9084  while( *startObjectives++ == *ch) ch++;
9085  if( (ch - *p) != 11) {
9086  // note if we are here even though ch > *p we want to return *p
9087  return true;
9088  }
9089 
9090  osinstance->instanceData->objectives = new Objectives();
9091 
9092  // find numberOfObjectives attribute -- it is valid for this attribute to be missing.
9093  // However if the number attribute is missing assume it is 1
9094  // eat the white space
9095  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9096  // we just ate the white space. If numberOfObjectives is missing we assume it is 1
9097  // we therefore must have > char
9098  if(*ch == '>'){
9099  numberOfObjectives = 1;
9100  //ch++;
9101  }
9102  else{
9103  *p = ch;
9104  while( *c_numberOfObjectives++ == *ch) ch++;
9105  if( (ch - *p) != 18) { osilerror_wrapper( ch,osillineno,"incorrect numberOfObjectives attribute in <objectives> tag"); return false;}
9107  numberOfObjectives = atoimod1( osillineno, attText, attTextEnd);
9108  delete [] attText;
9109  ch++;
9110  }
9111  if(numberOfObjectives > 0){
9112  // get rid of white space after the numberOfObjectives attribute
9113  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9114  // we must have an >
9115  /*if(*ch == '/'){
9116  ch++;
9117  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"the objectives element does not have a proper closing"); return false; }
9118  else{
9119  if(numberOfObjectives > 0){ osilerror_wrapper( ch,osillineno,"numberOfObjectives positive but there are no objectives"); return false;}
9120  return false;
9121  }
9122  }*/
9123  // we better have an >
9124  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"the objectives element does not have a proper closing"); return false;}
9125  osinstance->instanceData->objectives->numberOfObjectives = numberOfObjectives;
9126  osinstance->instanceData->objectives->obj = new Objective*[ numberOfObjectives];
9127  for(i = 0; i < numberOfObjectives; i++){
9128  osinstance->instanceData->objectives->obj[ i] = new Objective();
9129  }
9130  // get rid of white space after the <objectives> element
9131  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9132  // now loop over the obj elements, there must be at least one obj element
9133  *p = ch;
9134  while( *startObj++ == *ch) ch++;
9135  if( (ch - *p) == 4) foundObj = true;
9136  else { osilerror_wrapper( ch,osillineno,"there must be at least one <obj> element"); return false;}
9137  startObj -= 5;
9138  start = clock();
9139  while(foundObj){
9140  objmaxOrMinattON = false;
9141  objnameattON = false;
9142  objconstantattON = false;
9143  objweightattON = false;
9144  objmultattON = false;
9145  objnumberOfObjCoefattON = false;
9146  objmult = 1;
9147  // assume we are pointing to the first character after the r in <obj
9148  // it should be a space so let's increment ch
9149  ch++;
9150  while(*ch != '/' && *ch != '>'){
9151  switch (*ch) {
9152  case 'n':
9153  if( *(ch+1) == 'u'){
9154  *p = ch;
9155  while( *numberOfObjCoef++ == *ch) ch++;
9156  numberOfObjCoef -= 16;
9157  if( ( (ch - *p) != 15) ) { osilerror_wrapper( ch,osillineno,"error in objective numberOfObjCoef attribute"); return false;}
9158  else{
9159  if(objnumberOfObjCoefattON == true) { osilerror_wrapper( ch,osillineno,"too many obj numberOfObjCoef attributes"); return false;}
9160  objnumberOfObjCoefattON = true;
9162  osinstance->instanceData->objectives->obj[objcount]->numberOfObjCoef=atoimod1( osillineno,attText, attTextEnd);
9163  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;}
9164  osinstance->instanceData->objectives->obj[objcount]->coef = new ObjCoef*[osinstance->instanceData->objectives->obj[ objcount]->numberOfObjCoef];
9165  for(int i = 0; i < osinstance->instanceData->objectives->obj[ objcount]->numberOfObjCoef; i++)osinstance->instanceData->objectives->obj[objcount]->coef[i] = new ObjCoef();
9166  delete [] attText;
9167  }
9168  }
9169  else{
9170  *p = ch;
9171  while( *name++ == *ch) ch++;
9172  name -= 5;
9173  if( ( (ch - *p) != 4) ) { osilerror_wrapper( ch,osillineno,"error in objective name attribute"); return false;}
9174  else{
9175  if(objnameattON == true) { osilerror_wrapper( ch,osillineno,"too many obj name attributes"); return false;}
9176  objnameattON = true;
9178  osinstance->instanceData->objectives->obj[objcount]->name=attText;
9179  delete [] attText;
9180  }
9181  }
9182  break;
9183  case 'c':
9184  *p = ch;
9185  while( *constant++ == *ch) ch++;
9186  constant -= 9;
9187  if( ( (ch - *p) != 8) ) { osilerror_wrapper( ch,osillineno,"error in objective constant attribute"); return false;}
9188  else{
9189  if(objconstantattON == true) { osilerror_wrapper( ch,osillineno,"too many obj constant attributes"); return false;}
9190  objconstantattON = true;
9192  osinstance->instanceData->objectives->obj[objcount]->constant=atofmod1( osillineno,attText, attTextEnd);
9193  delete [] attText;
9194  }
9195  break;
9196  case 'w':
9197  *p = ch;
9198  while( *weight++ == *ch) ch++;
9199  weight -= 7;
9200  if( ( (ch - *p) != 6) ) { osilerror_wrapper( ch,osillineno,"error in objective weight attribute"); return false;}
9201  else{
9202  if(objweightattON == true) { osilerror_wrapper( ch,osillineno,"too many obj weight attributes"); return false;}
9203  objweightattON = true;
9205  osinstance->instanceData->objectives->obj[objcount]->weight=atofmod1( osillineno,attText, attTextEnd);
9206  delete [] attText;
9207  }
9208  break;
9209  case 'm':
9210  if(*(ch+1) == 'a'){
9211  *p = ch;
9212  while( *maxOrMin++ == *ch) ch++;
9213  maxOrMin -= 9;
9214  if( ( ( ch - *p) != 8) ) { osilerror_wrapper( ch,osillineno,"error in objective maxOrMin attribute"); return false;}
9215  else{
9216  if(objmaxOrMinattON == true) { osilerror_wrapper( ch,osillineno,"too many obj maxOrMin attributes"); return false;}
9217  objmaxOrMinattON = true;
9219  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;}
9220  osinstance->instanceData->objectives->obj[objcount]->maxOrMin = attText;
9221  delete [] attText;
9222  }
9223  }
9224  else{
9225  *p = ch;
9226  while( *mult++ == *ch) ch++;
9227  mult -= 5;
9228  if( ( (ch - *p) != 4) ) { osilerror_wrapper( ch,osillineno,"error in objective mult attribute"); return false;}
9229  else{
9230  if(objmultattON == true) { osilerror_wrapper( ch,osillineno,"too many obj mult attributes"); return false;}
9231  objmultattON = true;
9233  objmult = atoimod1( osillineno,attText, attTextEnd);
9234  delete [] attText;
9235  }
9236  }
9237  break;
9238  // come back and do multiplicity
9239  case ' ':
9240  break;
9241  case '\n':
9242  (*osillineno)++;
9243  break;
9244  case '\t':
9245  break;
9246  case '\r':
9247  break;
9248  default:
9249 
9250  osilerror_wrapper( ch,osillineno,"invalid attribute character");
9251  return false;
9252  break;
9253  }
9254  ch++;
9255  }
9256  //
9257  // assume all the attributes have been processed
9258  // must have either /> or > and then whitespace and </obj whitespace>
9259  if( *ch != '/' && *ch != '>') { osilerror_wrapper( ch,osillineno,"incorrect end of <obj> element"); return false;}
9260  if(*ch == '/'){
9261  ch++;
9262  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"incorrect end of <obj> element"); return false;}
9263  // get rid of whitespace
9264  ch++;
9265  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9266  // either have another <obj> element or foundObj = false;
9267  for(i = 0; startObj[i] == *ch; i++, ch++);
9268  if(i == 4) foundObj = true;
9269  else foundObj = false;
9270  }
9271  else{
9272  // the ch is the > at the end of the obj element
9273  // double check to make sure it really is a >
9274  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improper ending to a <obj> element"); return false;}
9275  // look for </obj
9276  // fist get rid of white space
9277  ch++;
9278  // first get the <coef> elements
9279  parseObjCoef(&ch, objcount, osinstance, osillineno);
9280  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9281  // we should be at </obj or there is an error
9282  for(i = 0; endObj[i] == *ch; i++, ch++);
9283  if(i != 5) { osilerror_wrapper( ch,osillineno,"</obj> element missing"); return false;}
9284  // burn off the whitespace
9285  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9286  // better have an > to end </obj
9287  if(*ch++ != '>'){ osilerror_wrapper( ch,osillineno,"</obj> element missing"); return false;}
9288  // look for a new <obj> element
9289  // get rid of whitespace
9290  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9291  // either have another <obj> element or foundObj = false;
9292  for(i = 0; startObj[i] == *ch; i++, ch++);
9293  if(i == 4) foundObj = true;
9294  else foundObj = false;
9295  }
9296  if( ((objcount+objmult) == numberOfObjectives) && (foundObj == true)) { osilerror_wrapper( ch,osillineno,"attribute numberOfObjectives is less than actual number found"); return false;}
9297  for (int k=1; k < objmult; k++)
9298  {
9299  osinstance->instanceData->objectives->obj[objcount+k]->name
9300  = osinstance->instanceData->objectives->obj[objcount]->name;
9301  osinstance->instanceData->objectives->obj[objcount+k]->maxOrMin
9302  = osinstance->instanceData->objectives->obj[objcount]->maxOrMin;
9303  osinstance->instanceData->objectives->obj[objcount+k]->constant
9304  = osinstance->instanceData->objectives->obj[objcount]->constant;
9305  osinstance->instanceData->objectives->obj[objcount+k]->weight
9306  = osinstance->instanceData->objectives->obj[objcount]->weight;
9307  osinstance->instanceData->objectives->obj[objcount+k]->numberOfObjCoef
9308  = osinstance->instanceData->objectives->obj[objcount]->numberOfObjCoef;
9309  if (osinstance->instanceData->objectives->obj[objcount]->numberOfObjCoef > 0)
9310  {
9311  osinstance->instanceData->objectives->obj[objcount+k]->coef = new ObjCoef*[osinstance->instanceData->objectives->obj[ objcount]->numberOfObjCoef];
9312  for(int i = 0; i < osinstance->instanceData->objectives->obj[ objcount]->numberOfObjCoef; i++)
9313  {
9314  osinstance->instanceData->objectives->obj[objcount+k]->coef[i] = new ObjCoef();
9315  osinstance->instanceData->objectives->obj[objcount+k]->coef[i]->idx =
9316  osinstance->instanceData->objectives->obj[objcount]->coef[i]->idx;
9317  osinstance->instanceData->objectives->obj[objcount+k]->coef[i]->value =
9318  osinstance->instanceData->objectives->obj[objcount]->coef[i]->value;
9319  }
9320  }
9321  }
9322  objcount += objmult;
9323  }
9324  if(objcount < numberOfObjectives) { osilerror_wrapper( ch,osillineno,"attribute numberOfObjectives is greater than actual number found"); return false;}
9325  ch -= i;
9326  // get the </objectives> tag
9327  for(i = 0; endObjectives[i] == *ch; i++, ch++);
9328  if(i != 12) { osilerror_wrapper( ch,osillineno, "cannot find </objectives> tag"); return false; }
9329  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9330  // better have >
9331  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </objectives> tag"); return false;}
9332  ch++;
9333  } // finish the (if numberOfObjectives > 0)
9334  else{
9335  // error if the number is negative
9336  if(numberOfObjectives < 0) { osilerror_wrapper( ch,osillineno,"cannot have a negative number of objectives"); return false;}
9337  // if we are here we have exactly 0 objectives
9338  // must close with /> or </objectives>
9339  // get rid of white space
9340  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9341  if( *ch == '/'){
9342  // better have a >
9343  ch++;
9344  if( *ch != '>') { osilerror_wrapper( ch,osillineno,"improperly closed objectives tag"); return false;}
9345  ch++;
9346  }
9347  else{
9348  // if we are here we must have an '>' and then </objectives> tag
9349  if( *ch != '>') { osilerror_wrapper( ch,osillineno,"improperly closed objectives tag"); return false;}
9350  ch++;
9351  // burn white space
9352  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9353  for(i = 0; endObjectives[i] == *ch; i++, ch++);
9354  if(i != 12) { osilerror_wrapper( ch,osillineno, "cannot find </objectives> tag"); return false; }
9355  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9356  // better have >
9357  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </objectives> tag"); return false;}
9358  ch++;
9359  }
9360  }
9361  finish = clock();
9362  #ifdef CHECK_PARSE_TIME
9363  duration = (double) (finish - start) / CLOCKS_PER_SEC;
9364  printf("TIME TO PARSE OBJECTIVES = %f\n", duration);
9365  #endif
9366  *p = ch;
9367  return true;
9368 }//end parseObjectives
9369 
9370 bool parseConstraints( const char **p, OSInstance *osinstance, int* osillineno){
9371  clock_t start, finish;
9372  #ifdef CHECK_PARSE_TIME
9373  double duration;
9374  #endif
9375  int ki, numChar;
9376  char *attTextEnd;
9377  const char *ch = *p;
9378  start = clock();
9379  const char *c_numberOfConstraints = "numberOfConstraints";
9380  const char *startConstraints = "<constraints";
9381  const char *endConstraints = "</constraints";
9382  const char *startCon = "<con";
9383  const char *endCon = "</con";
9384  // attributes
9385  char *attText = NULL;
9386  const char *name = "name";
9387  const char *constant = "constant";
9388  const char *mult = "mult";
9389  // others
9390  int i;
9391  int concount = 0;
9392  int numberOfConstraints = 0;
9393  // constraint attribute boolean variables
9394  bool conlbattON = false ;
9395  bool conubattON = false;
9396  bool connameattON = false;
9397  bool conconstantattON = false;
9398  bool conmultattON = false;
9399  bool foundCon = false;
9400  int conmult;
9401  //
9402  // start parsing -- ok not to have constraints
9403  // burn white space
9404  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9405  // if, present we should be pointing to <constraints element if there -- it is not required
9406  *p = ch;
9407  for(i = 0; startConstraints[i] == *ch; i++, ch++);
9408  while( *startConstraints++ == *ch) ch++;
9409  if( (ch - *p) != 12) {
9410  // *p is the correct value for the pointer
9411  return true;
9412  }
9413 
9414  osinstance->instanceData->constraints = new Constraints();
9415 
9416  // find numberOfConstraints attribute
9417  // eat the white space
9418  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9419  *p = ch;
9420  while( *c_numberOfConstraints++ == *ch) ch++;
9421  if( (ch - *p) != 19) { osilerror_wrapper( ch,osillineno,"incorrect numberOfConstraints attribute in <constraints> tag"); return false;}
9422  // ch should be pointing to the first character after numberOfConstraints
9424  ch++;
9425  numberOfConstraints = atoimod1( osillineno, attText, attTextEnd);
9426  delete [] attText;
9427  // key if
9428  //
9429  if(numberOfConstraints > 0){
9430  osinstance->instanceData->constraints->numberOfConstraints = numberOfConstraints;
9431  osinstance->instanceData->constraints->con = new Constraint*[ numberOfConstraints];
9432  for(i = 0; i < numberOfConstraints; i++){
9433  osinstance->instanceData->constraints->con[ i] = new Constraint();
9434  }
9435  // get rid of white space after the numberOfConstraints element
9436  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9437  // we better have an >
9438  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"the constraints element does not have a proper closing"); return false;}
9439  // get rid of white space after the <constraints> element
9440  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9441  // now loop over the con elements, there must be at least one con element
9442  *p = ch;
9443  while( *startCon++ == *ch) ch++;
9444  if( (ch - *p) == 4) foundCon = true;
9445  else { osilerror_wrapper( ch,osillineno,"there must be at least one <con> element"); return false;}
9446  startCon -= 5;
9447  while(foundCon){
9448  conlbattON = false ;
9449  conubattON = false;
9450  connameattON = false;
9451  conconstantattON = false;
9452  conmultattON = false;
9453  conmult = 1;
9454 
9455  // assume we are pointing to the first character after the n in <con
9456  // it should be a space so let's increment ch
9457  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9458  while(*ch != '/' && *ch != '>'){
9459  switch (*ch) {
9460  case 'n':
9461  *p = ch;
9462  while( *name++ == *ch) ch++;
9463  if( (ch - *p) != 4) { osilerror_wrapper( ch,osillineno,"error in constraints name attribute"); return false;}
9464  if(connameattON == true) { osilerror_wrapper( ch,osillineno,"too many con name attributes"); return false;}
9465  name -= 5;
9466  connameattON = true;
9468  osinstance->instanceData->constraints->con[concount]->name=attText;
9469  delete [] attText;
9470  break;
9471  case 'c':
9472  *p = ch;
9473  while( *constant++ == *ch) ch++;
9474  if( ((ch - *p) != 8) ) { osilerror_wrapper( ch,osillineno,"error in constraint constant attribute"); return false;}
9475  if(conconstantattON == true) { osilerror_wrapper( ch,osillineno,"too many con constant attributes"); return false;}
9476  constant -= 9;
9477  conconstantattON = true;
9479  osinstance->instanceData->constraints->con[concount]->constant=atofmod1( osillineno,attText, attTextEnd);
9480  delete [] attText;
9481  break;
9482  case 'l':
9483  ch++;
9484  if(*ch++ != 'b') { osilerror_wrapper( ch,osillineno,"error in constraint lb attribute"); return false;}
9485  if(conlbattON == true) { osilerror_wrapper( ch,osillineno,"too many con lb attributes"); return false;}
9486  conlbattON = true;
9488  osinstance->instanceData->constraints->con[concount]->lb = atofmod1( osillineno,attText, attTextEnd);
9489  delete [] attText;
9490  break;
9491  case 'u':
9492  ch++;
9493  if(*ch++ != 'b') { osilerror_wrapper( ch,osillineno,"error in constraint ub attribute"); return false;}
9494  if(conubattON == true) { osilerror_wrapper( ch,osillineno,"too many con ub attributes"); return false;}
9495  conubattON = true;
9497  osinstance->instanceData->constraints->con[concount]->ub = atofmod1( osillineno,attText, attTextEnd);
9498  delete [] attText;
9499  break;
9500  case 'm':
9501  *p = ch;
9502  while( *mult++ == *ch) ch++;
9503  if( (ch - *p) != 4) { osilerror_wrapper( ch,osillineno,"error in constraints mult attribute"); return false;}
9504  if(conmultattON == true) { osilerror_wrapper( ch,osillineno,"too many con mult attributes"); return false;}
9505  mult -= 5;
9506  conmultattON = true;
9508  conmult = atoimod1( osillineno,attText, attTextEnd);
9509  delete [] attText;
9510  break;
9511  case ' ':
9512  break;
9513  case '\n':
9514  (*osillineno)++;
9515  break;
9516  case '\t':
9517  break;
9518  case '\r':
9519  break;
9520  default:
9521  osilerror_wrapper( ch,osillineno,"invalid attribute character");
9522  return false;
9523  break;
9524  }
9525  ch++;
9526  }
9527  //
9528  // assume all the attributes have been processed
9529  // must have either /> or > and then whitespace and </con whitespace>
9530  if( *ch != '/' && *ch != '>') { osilerror_wrapper( ch,osillineno,"incorrect end of <con> element"); return false;}
9531  if(*ch == '/'){
9532  ch++;
9533  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"incorrect end of <con> element"); return false;}
9534  // get rid of whitespace
9535  ch++;
9536  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9537  // either have another <con> element or foundCon = false;
9538  *p = ch;
9539  while( *startCon++ == *ch) ch++;
9540  if( (ch - *p) == 4){
9541  foundCon = true;
9542  startCon -= 5;
9543  }
9544  else{
9545  foundCon = false;
9546  ch = *p;
9547  }
9548  }
9549  else{
9550  // the ch is the > at the end of the con element
9551  // double check to make sure it really is a >
9552  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improper ending to a <con> element"); return false;}
9553  // look for </con
9554  // fist get rid of white space
9555  ch++;
9556  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9557  // we should be at </con or there is an error
9558  *p = ch;
9559  while( *endCon++ == *ch) ch++;
9560  if( (ch - *p) != 5) { osilerror_wrapper( ch,osillineno,"</con> element missing"); return false;}
9561  endCon -= 6;
9562  // burn off the whitespace
9563  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9564  // better have an > to end </con
9565  if(*ch++ != '>') { osilerror_wrapper( ch,osillineno,"</con> element missing >"); return false;}
9566  // look for a new <con> element
9567  // get rid of whitespace
9568  ch++;
9569  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9570  // either have another <con> element or foundVar = false;
9571  *p = ch;
9572  while( *startCon++ == *ch) ch++;
9573  if( (ch - *p) == 4){
9574  foundCon = true;
9575  startCon -= 5;
9576  }
9577  else{
9578  foundCon = false;
9579  ch = *p;
9580  }
9581  }
9582  if( ((concount+conmult) == numberOfConstraints) && (foundCon == true) ) { osilerror_wrapper( ch,osillineno,"attribute numberOfConstraints is less than actual number found"); return false;}
9583  for (int k=1; k < conmult; k++)
9584  {
9585  osinstance->instanceData->constraints->con[concount+k]->name
9586  = osinstance->instanceData->constraints->con[concount]->name ;
9587  osinstance->instanceData->constraints->con[concount+k]->constant
9588  = osinstance->instanceData->constraints->con[concount]->constant ;
9589  osinstance->instanceData->constraints->con[concount+k]->lb
9590  = osinstance->instanceData->constraints->con[concount]->lb ;
9591  osinstance->instanceData->constraints->con[concount+k]->ub
9592  = osinstance->instanceData->constraints->con[concount]->ub ;
9593  }
9594  concount += conmult;
9595  }
9596  if(concount < numberOfConstraints) { osilerror_wrapper( ch,osillineno,"attribute numberOfConstraints is greater than actual number found"); return false;}
9597  // get the </constraints> tag
9598  *p = ch;
9599  while( *endConstraints++ == *ch) ch++;
9600  if( (ch - *p) != 13) { osilerror_wrapper( ch,osillineno, "cannot find </constraints> tag"); return false;}
9601  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9602  // better have >
9603  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </constraints> tag"); return false;}
9604  ch++;
9605  }// end if(numberOfConstraints > 0)
9606  else{
9607  // error if the number is negative
9608  if(numberOfConstraints < 0) { osilerror_wrapper( ch,osillineno,"cannot have a negative number of constraints"); return false;}
9609  // if we are here we have numberOfConstraints = 0
9610  // must close with /> or </constraints>
9611  // get rid of white space
9612  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9613  if( *ch == '/'){
9614  // better have a >
9615  ch++;
9616  if( *ch != '>') { osilerror_wrapper( ch,osillineno,"improperly closed constraints tag"); return false;}
9617  ch++;
9618  }
9619  else{
9620  // if we are here we must have an '>' and then </constraints> tag
9621  if( *ch != '>') { osilerror_wrapper( ch,osillineno,"improperly closed constraints tag"); return false;}
9622  ch++;
9623  // burn white space
9624  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9625  *p = ch;
9626  while( *endConstraints++ == *ch) ch++;
9627  if( (ch - *p) != 13) { osilerror_wrapper( ch,osillineno, "cannot find </constraints> tag"); return false; }
9628  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9629  // better have >
9630  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </constraints> tag"); return false;}
9631  ch++;
9632  }
9633  }
9634  finish = clock();
9635  #ifdef CHECK_PARSE_TIME
9636  duration = (double) (finish - start) / CLOCKS_PER_SEC;
9637  printf("TIME TO PARSE CONSTRAINTS = %f\n", duration);
9638  #endif
9639  *p = ch;
9640  return true;
9641 }//end parseConstraints
9642 
9643 bool parseLinearConstraintCoefficients( const char **p, OSInstance *osinstance, int* osillineno){;
9644  int ki, numChar;
9645  char *attTextEnd;
9646  const char *ch = *p;
9647  const char *c_numberOfValues = "numberOfValues";
9648  const char *startlinearConstraintCoefficients = "<linearConstraintCoefficients";
9649  const char *endlinearConstraintCoefficients = "</linearConstraintCoefficients";
9650  // attributes
9651  char *attText = NULL;
9652  // others
9653  int numberOfValues;
9654  // start parsing
9655  // burn white space
9656  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9657  // if, present we should be pointing to <linearConstraintCoefficients element if there -- it is not required
9658  *p = ch;
9659  while( *startlinearConstraintCoefficients++ == *ch) ch++;
9660  if( (ch - *p) != 29) {
9661  //reset ch
9662  ch = *p;
9663  return true;
9664  }
9665 
9667 
9668  // find numberOfValues attribute
9669  // eat the white space
9670  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9671  *p = ch;
9672  while( *c_numberOfValues++ == *ch) ch++;
9673  if( (ch - *p) != 14) { osilerror_wrapper( ch,osillineno,"incorrect numberOfValues attribute in <linearConstraintCoefficients> tag"); return false;}
9674  // ch should be pointing to the first character after numberOfValues
9676  ch++;
9677  numberOfValues = atoimod1( osillineno, attText, attTextEnd);
9678  if(numberOfValues > 0 && osinstance->instanceData->variables->numberOfVariables == 0){ osilerror_wrapper( ch,osillineno,"we have zero variables, but A matrix coefficients"); return false;}
9679  delete [] attText;
9680  if(numberOfValues <= 0) { osilerror_wrapper( ch,osillineno,"the number of nonlinear nonzeros must be positive"); return false;}
9681  osinstance->instanceData->linearConstraintCoefficients->numberOfValues = numberOfValues;
9682  // get rid of white space after the numberOfConstraints element
9683  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9684  // we should have either an /> OR an >
9685  if(*ch == '/'){
9686  ch++;
9687  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"the linearConstraintCoefficients element does not have a proper closing"); return false;}
9688  else{
9689  if(numberOfValues > 0) { osilerror_wrapper( ch,osillineno,"numberOfValues positive, but there are no values"); return false;}
9690  return false;
9691  }
9692  }
9693  // we better have an >
9694  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"the <linearConstraintCoefficients> element does not have a proper closing"); return false;}
9695  // get rid of white space after the <linearConstraintCoefficients> element
9696  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9697  if( parseStart( &ch, osinstance, osillineno) != true) {osilerror_wrapper( ch,osillineno,"error processing <start> element"); return false;}
9698 // if( (parseColIdx( &ch, osinstance, osillineno) != true) && (parseRowIdx( &ch, osinstance, osillineno) != true)) return false;
9699 // if( (parseColIdx( &ch, osinstance, osillineno) == true) && (parseRowIdx( &ch, osinstance, osillineno) == true)) {osilerror_wrapper( ch,osillineno,"cannot store by both row and column"); return false;}
9700 
9701  if( parseColIdx( &ch, osinstance, osillineno) == true) // <colIdx> is found as first element
9702  {
9703  if( parseRowIdx( &ch, osinstance, osillineno) == true) //also have <rowIdx> --- can't happen
9704  {
9705  osilerror_wrapper( ch,osillineno,"cannot store by both row and column");
9706  return false;
9707  }
9708  }
9709  else //<colIdx> is not the first element
9710  {
9711  if( parseRowIdx( &ch, osinstance, osillineno) != true) // neither <rowIdx> nor <colIdx> is present
9712  {
9713  osilerror_wrapper( ch,osillineno,"must have either RowIdx or ColIdx");
9714  return false;
9715  }
9716  else //<rowIdx> is found as first element
9717  {
9718  if ( parseColIdx( &ch, osinstance, osillineno) == true ) //also have <colIdx> --- can't happen
9719  {
9720  osilerror_wrapper( ch,osillineno,"cannot store by both row and column");
9721  return false;
9722  }
9723  }
9724  }
9725 
9726  if( parseValue( &ch, osinstance, osillineno) != true) {osilerror_wrapper( ch,osillineno, "could not parse <value> element"); return false;}
9727  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9728  // get the </linearConstraintCoefficients> tag
9729  *p = ch;
9730  while( *endlinearConstraintCoefficients++ == *ch) ch++;
9731  if( (ch - *p) != 30) { osilerror_wrapper( ch,osillineno, "cannot find </linearConstraintCoefficients> tag"); return false;}
9732  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9733  // better have >
9734  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </linearConstraintCoefficients> tag"); return false;}
9735  ch++;
9736  *p = ch;
9737  return true;
9738 }//end parseLinearConstraintCoefficients
9739 
9740 bool parseStart(const char **p, OSInstance *osinstance, int* osillineno){
9741  clock_t start, finish;
9742  #ifdef CHECK_PARSE_TIME
9743  double duration;
9744  #endif
9745  int ki, numChar;
9746  char *attTextEnd;
9747  const char *ch = *p;
9748  start = clock();
9749  const char* startStart = "<start";
9750  const char* endStart = "</start";
9751  const char* startEl = "<el";
9752  const char* endEl = "</el";
9753  // attributes
9754  char *attText = NULL;
9755  const char *incr = "incr";
9756  const char *mult = "mult";
9757  int kount = 0;
9758  int i;
9759  // element attribute boolean variables
9760  bool elmultattON = false ;
9761  bool elincrattON = false;
9762  bool foundEl = false;
9763  int elmult;
9764  int elincr;
9765  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9766  // if, present we should be pointing to <start element
9767  *p = ch;
9768  while( *startStart++ == *ch) ch++;
9769  if( (ch - *p) != 6) {
9770  //reset ch
9771  ch = *p;
9772  return false;
9773  }
9774  // get rid of white space after <start
9775  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9776  // we should have either an >
9777  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed <start> element"); return false;}
9778  ch++;
9779  // get rid of white space
9780  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9781  // look for an <el> -- if none present must have b64 data
9782  *p = ch;
9783  while( *startEl++ == *ch) ch++;
9784  startEl -= 4;
9785  if( (ch - *p) != 3) {
9786  //reset ch
9787  ch = *p;
9788  // call base64 parse here
9789  int dataSize = 0;
9790  char* b64string = parseBase64(&ch, &dataSize, osillineno );
9791  if( b64string == NULL) { osilerror_wrapper( ch,osillineno,"<start> must have children or base64 data"); return false;}
9792  std::string base64decodeddata = Base64::decodeb64( b64string );
9793  int base64decodeddatalength = base64decodeddata.length();
9794  int *intvec = NULL;
9795  osinstance->instanceData->linearConstraintCoefficients->start->el = new int[(base64decodeddatalength/dataSize) ];
9796  intvec = (int*)&base64decodeddata[0];
9797  for (i = 0; i < (base64decodeddatalength/dataSize); i++){
9798  osinstance->instanceData->linearConstraintCoefficients->start->el[ i] = *(intvec++);
9799  }
9800  delete [] b64string;
9801  }
9802  else{
9803  foundEl = true;
9805  new int[ std::max( osinstance->instanceData->constraints->numberOfConstraints,
9806  osinstance->instanceData->variables->numberOfVariables) + 1];
9807  while(foundEl){
9808 
9809  elmultattON = false ;
9810  elincrattON = false;
9811  elmult = 1;
9812  elincr = 0;
9813 
9814  // assume we are pointing to the first character after the l in <el
9815  // it should be a space so let's increment ch
9816  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9817  while(*ch != '/' && *ch != '>'){
9818  switch (*ch) {
9819  case 'i':
9820  *p = ch;
9821  while( *incr++ == *ch) ch++;
9822  if( (ch - *p) != 4) { osilerror_wrapper( ch,osillineno,"error in starts incr attribute"); return false;}
9823  if(elincrattON == true) { osilerror_wrapper( ch,osillineno,"too many el incr attributes"); return false;}
9824  incr -= 5;
9825  elincrattON = true;
9827  elincr = atoimod1( osillineno,attText, attTextEnd);
9828  delete [] attText;
9829  break;
9830  case 'm':
9831  *p = ch;
9832  while( *mult++ == *ch) ch++;
9833  if( (ch - *p) != 4) { osilerror_wrapper( ch,osillineno,"error in starts mult attribute"); return false;}
9834  if(elmultattON == true) { osilerror_wrapper( ch,osillineno,"too many el mult attributes"); return false;}
9835  mult -= 5;
9836  elmultattON = true;
9838  elmult = atoimod1( osillineno,attText, attTextEnd);
9839  delete [] attText;
9840  break;
9841  case ' ':
9842  break;
9843  case '\n':
9844  (*osillineno)++;
9845  break;
9846  case '\t':
9847  break;
9848  case '\r':
9849  break;
9850  default:
9851  osilerror_wrapper( ch,osillineno,"invalid attribute character");
9852  return false;
9853  break;
9854  }
9855  ch++;
9856  }
9857 
9858  // start eating white space until an '>' is found,
9859  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9860  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"improperly formed <el> tag"); return false;}
9861  // eat white space again,
9862  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9863  // okay we better have a number, we will check later
9864  *p = ch;
9865  // find the end of the number, it better be an </el>
9866  // find </el
9867  while( *ch != '<' && *ch != EOF){
9868  ch++;
9869  }
9870  // we better have a <, or not valid
9871  if(*ch != '<') { osilerror_wrapper( ch,osillineno,"cannot find an </el>"); return false;}
9872 
9873  // we better not exceed allocation
9874  if(kount +elmult > std::max(osinstance->instanceData->constraints->numberOfConstraints,
9875  osinstance->instanceData->variables->numberOfVariables) + 1 )
9876  {
9877  osilerror_wrapper( ch, osillineno,"number of start elements exceeds the maximum number of rows or columns plus 1");
9878  }
9879  osinstance->instanceData->linearConstraintCoefficients->start->el[kount] = atoimod1( osillineno, *p, ch);
9880  for (int k=1; k < elmult; k++)
9881  {
9882  osinstance->instanceData->linearConstraintCoefficients->start->el[ kount+k]
9883  = osinstance->instanceData->linearConstraintCoefficients->start->el[ kount] + k*elincr;
9884  }
9885  kount += elmult;
9886  // we are pointing to <, make sure there is /el
9887  *p = ch;
9888  while( *endEl++ == *ch) ch++;
9889  endEl -= 5;
9890  if( (ch - *p) != 4 ) { osilerror_wrapper( ch,osillineno,"cannot find an </el>"); return false;}
9891  // start eating white space until an '>' is found for </el>,
9892  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9893  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </el> tag"); return false;}
9894  // eat white space again,
9895  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9896  // either have another <el> element or foundEl = false;
9897  *p = ch;
9898  while( *startEl++ == *ch) ch++;
9899  if( (ch - *p) == 3){
9900  foundEl = true;
9901  startEl -= 4;
9902  }
9903  else{
9904  foundEl = false;
9905  ch = *p;
9906  }
9907  }
9908 
9909  if(osinstance->instanceData->linearConstraintCoefficients->start->el[ kount - 1 ] !=
9911  osilerror_wrapper( ch, osillineno,"the value of the last start element is not equal to numberOfValues");
9912  }
9913  // get the </start> tag
9914  *p = ch;
9915  while( *endStart++ == *ch) ch++;
9916  if( (ch - *p) != 7) { osilerror_wrapper( ch,osillineno, "cannot find </start> tag"); return false;}
9917  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9918  // better have >
9919  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </start> tag"); return false;}
9920  ch++;
9921  // get the end element
9922  finish = clock();
9923  #ifdef CHECK_PARSE_TIME
9924  duration = (double) (finish - start) / CLOCKS_PER_SEC;
9925  printf("TIME TO PARSE STARTS = %f\n", duration);
9926  #endif
9927  *p = ch;
9929 
9930  return true;
9931 }//end parseStart
9932 
9933 bool parseRowIdx( const char **p, OSInstance *osinstance, int* osillineno){
9934  clock_t start, finish;
9935  #ifdef CHECK_PARSE_TIME
9936  double duration;
9937  #endif
9938  int ki, numChar;
9939  char *attTextEnd;
9940  const char *ch = *p;
9941  start = clock();
9942  const char* startRowIdx = "<rowIdx";
9943  const char* endRowIdx = "</rowIdx";
9944  const char* startEl = "<el";
9945  const char* endEl = "</el";
9946  // attributes
9947  char *attText = NULL;
9948  const char *incr = "incr";
9949  const char *mult = "mult";
9950  int kount = 0;
9951  int i;
9952  // element attribute boolean variables
9953  bool elmultattON = false ;
9954  bool elincrattON = false;
9955  bool foundEl = false;
9956  int elmult;
9957  int elincr;
9958  int numberOfEl;
9959 
9960  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9961  // if, present we should be pointing to <rowIdx element
9962  *p = ch;
9963  while( *startRowIdx++ == *ch) ch++;
9964  if( (ch - *p) != 7) {
9965  //reset ch
9966  ch = *p;
9967  return false;
9968  }
9969  // get rid of white space after <rowIdx
9970  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9971  // we should have either an >
9972  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed <rowIdx> element"); return false;}
9973  ch++;
9974  // get rid of white space
9975  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9976  // look for an <el> -- if none present must have b64 data
9977  *p = ch;
9978  while( *startEl++ == *ch) ch++;
9979  startEl -= 4;
9980  if( (ch - *p) != 3) {
9981  //reset ch
9982  ch = *p;
9983  // call base64 parse here
9984  int dataSize = 0;
9985  char* b64string = parseBase64(&ch, &dataSize, osillineno );
9986  if( b64string == NULL) { osilerror_wrapper( ch,osillineno,"<rowIdx> must have children or base64 data"); return false;}
9987  std::string base64decodeddata = Base64::decodeb64( b64string );
9988  int base64decodeddatalength = base64decodeddata.length();
9989  int *intvec = NULL;
9990  numberOfEl = (base64decodeddatalength/dataSize);
9991  osinstance->instanceData->linearConstraintCoefficients->rowIdx->el = new int[numberOfEl ];
9992  osinstance->instanceData->linearConstraintCoefficients->colIdx->el = NULL;
9993  osinstance->instanceData->linearConstraintCoefficients->rowIdx->numberOfEl = numberOfEl;
9996  intvec = (int*)&base64decodeddata[0];
9997  for(i = 0; i < numberOfEl; i++){
9998  osinstance->instanceData->linearConstraintCoefficients->rowIdx->el[ i] = *(intvec++);
9999  kount++;
10000  }
10001  delete [] b64string;
10002  }
10003  else{
10004  foundEl = true;
10005  // if we are here we are storing the problem by column
10006  // this means the number of start elements must equal the number of columns + 1
10008  osilerror_wrapper( ch, osillineno,"we are storing in column major format, but number of start elements not equal number of variables + 1");
10010  osinstance->instanceData->linearConstraintCoefficients->colIdx->el = NULL;
10014  while(foundEl){
10015 
10016  elmultattON = false ;
10017  elincrattON = false;
10018  elmult = 1;
10019  elincr = 0;
10020 
10021  // assume we are pointing to the first character after the l in <el
10022  // it should be a space so let's increment ch
10023  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10024  while(*ch != '/' && *ch != '>'){
10025  switch (*ch) {
10026  case 'i':
10027  *p = ch;
10028  while( *incr++ == *ch) ch++;
10029  if( (ch - *p) != 4) { osilerror_wrapper( ch,osillineno,"error in rowIdx incr attribute"); return false;}
10030  if(elincrattON == true) { osilerror_wrapper( ch,osillineno,"too many el incr attributes"); return false;}
10031  incr -= 5;
10032  elincrattON = true;
10034  elincr = atoimod1( osillineno,attText, attTextEnd);
10035  delete [] attText;
10036  break;
10037  case 'm':
10038  *p = ch;
10039  while( *mult++ == *ch) ch++;
10040  if( (ch - *p) != 4) { osilerror_wrapper( ch,osillineno,"error in rowIdx mult attribute"); return false;}
10041  if(elmultattON == true) { osilerror_wrapper( ch,osillineno,"too many el mult attributes"); return false;}
10042  mult -= 5;
10043  elmultattON = true;
10045  elmult = atoimod1( osillineno,attText, attTextEnd);
10046  delete [] attText;
10047  break;
10048  case ' ':
10049  break;
10050  case '\n':
10051  (*osillineno)++;
10052  break;
10053  case '\t':
10054  break;
10055  case '\r':
10056  break;
10057  default:
10058  osilerror_wrapper( ch,osillineno,"invalid attribute character");
10059  return false;
10060  break;
10061  }
10062  ch++;
10063  }
10064 
10065  // start munging white space until an '>' is found,
10066  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10067  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"improperly formed <el> tag"); return false;}
10068  // mung white space again,
10069  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10070  // okay we better have a number, we will check later
10071  *p = ch;
10072  // find the end of the number, it better be an </el>
10073  // find </el
10074  while( *ch != '<' && *ch != EOF){
10075  ch++;
10076  }
10077  // we better have a <, or not valid
10078  if(*ch != '<') { osilerror_wrapper( ch,osillineno,"cannot find an </el>"); return false;}
10079 
10080  // we better not exceed allocation
10081  if(kount + elmult > osinstance->instanceData->linearConstraintCoefficients->numberOfValues)
10082  {
10083  osilerror_wrapper( ch, osillineno,"number of rowIdx elements exceeds the number declared");
10084  }
10085  osinstance->instanceData->linearConstraintCoefficients->rowIdx->el[ kount] = atoimod1( osillineno, *p, ch);
10086  for (int k=1; k < elmult; k++)
10087  {
10088  osinstance->instanceData->linearConstraintCoefficients->rowIdx->el[ kount+k]
10089  = osinstance->instanceData->linearConstraintCoefficients->rowIdx->el[ kount] + k*elincr;
10090  }
10091  kount += elmult;
10092  // we are pointing to <, make sure there is /el
10093  *p = ch;
10094  while( *endEl++ == *ch) ch++;
10095  endEl -= 5;
10096  if( (ch - *p) != 4 ) { osilerror_wrapper( ch,osillineno,"cannot find an </el>"); return false;}
10097  // start munging white space until an '>' is found for </el>,
10098  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10099  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </el> tag"); return false;}
10100  // eat white space again,
10101  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10102  // either have another <el> element or foundEl = false;
10103  *p = ch;
10104  while( *startEl++ == *ch) ch++;
10105  if( (ch - *p) == 3){
10106  foundEl = true;
10107  startEl -= 4;
10108  }
10109  else{
10110  foundEl = false;
10111  ch = *p;
10112  }
10113  }
10114  }
10115  // get the </rowIdx> tag
10116  *p = ch;
10117  while( *endRowIdx++ == *ch) ch++;
10118  if( (ch - *p) != 8) { osilerror_wrapper( ch,osillineno, "cannot find </rowIdx> tag"); return false;}
10119  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10120  // better have >
10121  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </rowIdx> tag");}
10122  ch++;
10123  if(kount > osinstance->instanceData->linearConstraintCoefficients->numberOfValues) { osilerror_wrapper( ch,osillineno,"numberOfLinearCoefficients attribute less than number of row indices found"); return false;}
10124  if(kount < osinstance->instanceData->linearConstraintCoefficients->numberOfValues) { osilerror_wrapper( ch,osillineno,"numberOfLinearCoefficients attribute greater than number of row indices found"); return false;}
10125  finish = clock();
10126  #ifdef CHECK_PARSE_TIME
10127  duration = (double) (finish - start) / CLOCKS_PER_SEC;
10128  printf("TIME TO PARSE ROW INDEXES = %f\n", duration);
10129  #endif
10130  *p = ch;
10131  return true;
10132 }//end parseRowIdx
10133 
10134 
10135 bool parseColIdx( const char **p, OSInstance *osinstance, int* osillineno){
10136  clock_t start, finish;
10137  #ifdef CHECK_PARSE_TIME
10138  double duration;
10139  #endif
10140  int ki, numChar;
10141  char *attTextEnd;
10142  const char *ch = *p;
10143  start = clock();
10144  const char* startColIdx = "<colIdx";
10145  const char* endColIdx = "</colIdx";
10146  const char* startEl = "<el";
10147  const char* endEl = "</el";
10148  // attributes
10149  char *attText = NULL;
10150  const char *incr = "incr";
10151  const char *mult = "mult";
10152  int kount = 0;
10153  int i;
10154  // element attribute boolean variables
10155  bool elmultattON = false ;
10156  bool elincrattON = false;
10157  bool foundEl = false;
10158  int elmult;
10159  int elincr;
10160  int numberOfEl;
10161 
10162  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10163  // if, present we should be pointing to <colIdx element
10164  *p = ch;
10165  while( *startColIdx++ == *ch) ch++;
10166  if( (ch - *p) != 7) {
10167  //reset ch
10168  ch = *p;
10169  return false;
10170  }
10171  // get rid of white space after <colIdx
10172  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10173  // we should have either an >
10174  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed <colIdx> element"); return false;}
10175  ch++;
10176  // get rid of white space
10177  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10178  // look for an <el> -- if none present must have b64 data
10179  *p = ch;
10180  while( *startEl++ == *ch) ch++;
10181  startEl -= 4;
10182  if( (ch - *p) != 3) {
10183  //reset ch
10184  ch = *p;
10185  // call base64 parse here
10186  int dataSize = 0;
10187  char* b64string = parseBase64(&ch, &dataSize, osillineno );
10188  if( b64string == NULL) { osilerror_wrapper( ch,osillineno,"<colIdx> must have children or base64 data"); return false;}
10189  std::string base64decodeddata = Base64::decodeb64( b64string );
10190  int base64decodeddatalength = base64decodeddata.length();
10191  int *intvec = NULL;
10192  numberOfEl = (base64decodeddatalength/dataSize);
10193  osinstance->instanceData->linearConstraintCoefficients->colIdx->el = new int[numberOfEl ];
10194  osinstance->instanceData->linearConstraintCoefficients->rowIdx->el = NULL;
10195  osinstance->instanceData->linearConstraintCoefficients->colIdx->numberOfEl = numberOfEl;
10198  intvec = (int*)&base64decodeddata[0];
10199  for(i = 0; i < numberOfEl; i++){
10200  osinstance->instanceData->linearConstraintCoefficients->colIdx->el[ i] = *(intvec++);
10201  kount++;
10202  }
10203  delete [] b64string;
10204  }
10205  else{
10206  foundEl = true;
10207  // if we are here we are storing the problem by row
10208  // this means the number of start elements must equal the number of rows
10210  osilerror_wrapper( ch, osillineno,"we are storing in row major format, but number of start elements not equal number of rows + 1");
10212  osinstance->instanceData->linearConstraintCoefficients->rowIdx->el = NULL;
10216  while(foundEl){
10217 
10218  elmultattON = false ;
10219  elincrattON = false;
10220  elmult = 1;
10221  elincr = 0;
10222 
10223  // assume we are pointing to the first character after the l in <el
10224  // it should be a space so let's increment ch
10225  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10226  while(*ch != '/' && *ch != '>'){
10227  switch (*ch) {
10228  case 'i':
10229  *p = ch;
10230  while( *incr++ == *ch) ch++;
10231  if( (ch - *p) != 4) { osilerror_wrapper( ch,osillineno,"error in colIdx incr attribute"); return false;}
10232  if(elincrattON == true) { osilerror_wrapper( ch,osillineno,"too many el incr attributes"); return false;}
10233  incr -= 5;
10234  elincrattON = true;
10236  elincr = atoimod1( osillineno,attText, attTextEnd);
10237  delete [] attText;
10238  break;
10239  case 'm':
10240  *p = ch;
10241  while( *mult++ == *ch) ch++;
10242  if( (ch - *p) != 4) { osilerror_wrapper( ch,osillineno,"error in colIdx mult attribute"); return false;}
10243  if(elmultattON == true) { osilerror_wrapper( ch,osillineno,"too many el mult attributes"); return false;}
10244  mult -= 5;
10245  elmultattON = true;
10247  elmult = atoimod1( osillineno,attText, attTextEnd);
10248  delete [] attText;
10249  break;
10250  case ' ':
10251  break;
10252  case '\n':
10253  (*osillineno)++;
10254  break;
10255  case '\t':
10256  break;
10257  case '\r':
10258  break;
10259  default:
10260  osilerror_wrapper( ch,osillineno,"invalid attribute character");
10261  return false;
10262  break;
10263  }
10264  ch++;
10265  }
10266 
10267  // start eating white space until an '>' is found,
10268  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10269  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"improperly formed <el> tag"); return false;}
10270  // eat white space again,
10271  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10272  // okay we better have a number, we will check later
10273  *p = ch;
10274  // find the end of the number, it better be an </el>
10275  // find </el
10276  while( *ch != '<' && *ch != EOF){
10277  ch++;
10278  }
10279  // we better have a <, or not valid
10280  if(*ch != '<') { osilerror_wrapper( ch,osillineno,"cannot find an </el>"); return false;}
10281  // we better not exceed allocation
10282  if(kount + elmult > osinstance->instanceData->linearConstraintCoefficients->numberOfValues)
10283  {
10284  osilerror_wrapper( ch, osillineno,"number of colIdx elements exceeds the number declared");
10285  }
10286  osinstance->instanceData->linearConstraintCoefficients->colIdx->el[ kount] = atoimod1( osillineno, *p, ch);
10287  for (int k=1; k < elmult; k++)
10288  {
10289  osinstance->instanceData->linearConstraintCoefficients->colIdx->el[ kount+k]
10290  = osinstance->instanceData->linearConstraintCoefficients->colIdx->el[ kount] + k*elincr;
10291  }
10292  kount += elmult;
10293  // we are pointing to <, make sure there is /el
10294  *p = ch;
10295  while( *endEl++ == *ch) ch++;
10296  endEl -= 5;
10297  if( (ch - *p) != 4 ) { osilerror_wrapper( ch,osillineno,"cannot find an </el>"); return false;}
10298  // start eating white space until an '>' is found for </el>,
10299  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10300  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </el> tag"); return false;}
10301  // eat white space again,
10302  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10303  // either have another <el> element or foundEl = false;
10304  *p = ch;
10305  while( *startEl++ == *ch) ch++;
10306  if( (ch - *p) == 3){
10307  foundEl = true;
10308  startEl -= 4;
10309  }
10310  else{
10311  foundEl = false;
10312  ch = *p;
10313  }
10314  }
10315  }
10316  // get the </colIdx> tag
10317  *p = ch;
10318  while( *endColIdx++ == *ch) ch++;
10319  if( (ch - *p) != 8) { osilerror_wrapper( ch,osillineno, "cannot find </colIdx> tag"); return false;}
10320  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10321  // better have >
10322  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </colIdx> tag"); return false;}
10323  ch++;
10324  if(kount > osinstance->instanceData->linearConstraintCoefficients->numberOfValues) { osilerror_wrapper( ch,osillineno,"numberOfLinearCoefficients attribute less than number of column indices found"); return false;}
10325  if(kount < osinstance->instanceData->linearConstraintCoefficients->numberOfValues) { osilerror_wrapper( ch,osillineno,"numberOfLinearCoefficients attribute greater than number of column indices found"); return false;}
10326  finish = clock();
10327  #ifdef CHECK_PARSE_TIME
10328  duration = (double) (finish - start) / CLOCKS_PER_SEC;
10329  printf("TIME TO PARSE COLUMN INDEXES = %f\n", duration);
10330  #endif
10331  *p = ch;
10332  return true;
10333 }//end parseColIdx
10334 
10335 
10336 bool parseValue( const char **p, OSInstance *osinstance, int* osillineno){
10337  clock_t start, finish;
10338  #ifdef CHECK_PARSE_TIME
10339  double duration;
10340  #endif
10341  int ki, numChar;
10342  char *attTextEnd;
10343  const char *ch = *p;
10344  start = clock();
10345  const char* startValue = "<value";
10346  const char* endValue = "</value";
10347  const char* startEl = "<el";
10348  const char* endEl = "</el";
10349  // attributes
10350  char *attText = NULL;
10351  const char *incr = "incr";
10352  const char *mult = "mult";
10353  int kount = 0;
10354  int i;
10355  // element attribute boolean variables
10356  bool elmultattON = false ;
10357  bool elincrattON = false;
10358  bool foundEl = false;
10359  int elmult;
10360  double elincr;
10361  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno) ; ch++ ) ;
10362  // if present we should be pointing to <value element
10363  *p = ch;
10364  while( *startValue++ == *ch) ch++;
10365  if( (ch - *p) != 6) {
10366  //reset ch
10367  ch = *p;
10368  return false;
10369  }
10370  // get rid of white space after <value
10371  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno) ; ch++ ) ;
10372  // we should have either an >
10373  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed <value> element"); return false;}
10374  ch++;
10375  // get rid of white space
10376  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno) ; ch++ ) ;
10377  // look for an <el> -- if none present must have b64 data
10378  *p = ch;
10379  while( *startEl++ == *ch) ch++;
10380  startEl -= 4;
10381  if( (ch - *p) != 3) {
10382  //reset ch
10383  ch = *p;
10384  // call base64 parse here
10385  int dataSize = 0;
10386  char* b64string = parseBase64(&ch, &dataSize, osillineno );
10387  if( b64string == NULL) { osilerror_wrapper( ch,osillineno,"<start> must have children or base64 data"); return false;};
10388  std::string base64decodeddata = Base64::decodeb64( b64string );
10389  int base64decodeddatalength = base64decodeddata.length();
10390  osinstance->instanceData->linearConstraintCoefficients->value->el = new double[(base64decodeddatalength/dataSize) ];
10391  int kountChar = 0;
10392  int kj;
10393  /* Take care of Lou's memory alignment problem */
10394  /* dataSize had better equal sizeof( double) or we need to abandon ship */
10395  if( sizeof( double) != dataSize ) {
10396  osilerror_wrapper( ch, osillineno,
10397  "base 64 encoded with a size of double different than on this machine");
10398  return false;
10399  }
10400  union doubleBuffer{
10401  char memAlign[sizeof(double)];
10402  double dble;
10403  };
10404  doubleBuffer dbuf;
10405  for(i = 0; i < (base64decodeddatalength/dataSize); i++){
10406  for(kj = 0; kj < dataSize; kj++){
10407  dbuf.memAlign[ kj] = base64decodeddata[kountChar];
10408  kountChar++;
10409  }
10410  osinstance->instanceData->linearConstraintCoefficients->value->el[ i] = dbuf.dble;
10411  //std::cout << dbuf.dble << std::endl;
10412  kount++;
10413  }
10414  delete [] b64string;
10415  }
10416  else{
10417  foundEl = true;
10419  new double[ osinstance->instanceData->linearConstraintCoefficients->numberOfValues];
10420  while( foundEl){
10421 
10422  elmultattON = false ;
10423  elincrattON = false;
10424  elmult = 1;
10425  elincr = 0;
10426 
10427  // assume we are pointing to the first character after the l in <el
10428  // it should be a space so let's increment ch
10429  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10430  while(*ch != '/' && *ch != '>'){
10431  switch (*ch) {
10432  case 'i':
10433  *p = ch;
10434  while( *incr++ == *ch) ch++;
10435  if( (ch - *p) != 4) { osilerror_wrapper( ch,osillineno,"error in values incr attribute"); return false;}
10436  if(elincrattON == true) { osilerror_wrapper( ch,osillineno,"too many el incr attributes"); return false;}
10437  incr -= 5;
10438  elincrattON = true;
10440  elincr = atofmod1( osillineno,attText, attTextEnd);
10441  delete [] attText;
10442  break;
10443  case 'm':
10444  *p = ch;
10445  while( *mult++ == *ch) ch++;
10446  if( (ch - *p) != 4) { osilerror_wrapper( ch,osillineno,"error in values mult attribute"); return false;}
10447  if(elmultattON == true) { osilerror_wrapper( ch,osillineno,"too many el mult attributes"); return false;}
10448  mult -= 5;
10449  elmultattON = true;
10451  elmult = atoimod1( osillineno,attText, attTextEnd);
10452  delete [] attText;
10453  break;
10454  case ' ':
10455  break;
10456  case '\n':
10457  (*osillineno)++;
10458  break;
10459  case '\t':
10460  break;
10461  case '\r':
10462  break;
10463  default:
10464  osilerror_wrapper( ch,osillineno,"invalid attribute character");
10465  return false;
10466  break;
10467  }
10468  ch++;
10469  }
10470 
10471  // start eat white space until an '>' is found,
10472  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno) ; ch++ );
10473  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"improperly formed <el> tag"); return false;}
10474  // eat white space again,
10475  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno) ; ch++ ) ;
10476  *p = ch;
10477  // find the end of the number, it better be an </el>
10478  // find the < which begins the </el
10479  while( *ch != '<' && *ch != EOF){
10480  ch++;
10481  }
10482  // we better have a <, or not valid
10483  if(*ch != '<') { osilerror_wrapper( ch,osillineno,"cannot find an </el>"); return false;}
10484  // we better not exceed allocation
10485  if(kount + elmult > osinstance->instanceData->linearConstraintCoefficients->numberOfValues)
10486  {
10487  osilerror_wrapper( ch, osillineno,"number of nonzero elements exceeds the number declared");
10488  }
10489  osinstance->instanceData->linearConstraintCoefficients->value->el[ kount] = atofmod1( osillineno, *p, ch);
10490  for (int k=1; k < elmult; k++)
10491  {
10492  osinstance->instanceData->linearConstraintCoefficients->value->el[ kount+k]
10493  = osinstance->instanceData->linearConstraintCoefficients->value->el[ kount] + k*elincr;
10494  }
10495  kount += elmult;
10496  // we are pointing to <, make sure there is /el
10497  *p = ch;
10498  while( *endEl++ == *ch) ch++;
10499  endEl -= 5;
10500  if( (ch - *p) != 4 ) { osilerror_wrapper( ch,osillineno,"cannot find an </el>"); return false;}
10501  // start eating white space until an '>' is found for </el>,
10502  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno) ; ch++ );
10503  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </el> tag"); return false;}
10504  // eat white space again,
10505  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno) ; ch++ );
10506  // either have another <el> element or foundEl = false;
10507  *p = ch;
10508  while( *startEl++ == *ch) ch++;
10509  if( (ch - *p) == 3){
10510  foundEl = true;
10511  startEl -= 4;
10512  }
10513  else{
10514  foundEl = false;
10515  ch = *p;
10516  }
10517  }
10518  }
10520 
10521  // get the </value> tag
10522  *p = ch;
10523  while( *endValue++ == *ch) ch++;
10524  if( (ch - *p) != 7) { osilerror_wrapper( ch,osillineno, "cannot find </value> tag"); return false;}
10525  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno) ; ch++ );
10526  // better have >
10527  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </value> tag"); return false;}
10528  ch++;
10529  if(kount < osinstance->instanceData->linearConstraintCoefficients->numberOfValues){ osilerror_wrapper( ch,osillineno,"numberOfLinearCoefficients greater than number of values found"); return false;}
10530  if(kount > osinstance->instanceData->linearConstraintCoefficients->numberOfValues){ osilerror_wrapper( ch,osillineno,"numberOfLinearCoefficients less than the number of values found"); return false;}
10531  finish = clock();
10532  #ifdef CHECK_PARSE_TIME
10533  duration = (double) (finish - start) / CLOCKS_PER_SEC;
10534  printf("TIME TO PARSE VALUES = %f\n", duration);
10535  #endif
10536  *p = ch;
10537  return true;
10538 }//end parseValue
10539 
10540 bool parseObjCoef( const char **p, int objcount, OSInstance *osinstance, int* osillineno){
10541  int ki, numChar;
10542  char *attTextEnd;
10543  const char *ch = *p;
10544  const char* startCoef = "<coef";
10545  const char* endCoef = "</coef";
10546  const char* c_idx = "idx";
10547  char *attText = NULL;
10548  int k;
10549  int numberOfObjCoef = 0;
10550  if( osinstance->instanceData->objectives->numberOfObjectives <= 0) { osilerror_wrapper( ch,osillineno,"we can't have objective function coefficients without an objective function"); return false;}
10551  numberOfObjCoef = osinstance->instanceData->objectives->obj[objcount]->numberOfObjCoef;
10552  if(numberOfObjCoef > 0) {
10553  for(k = 0; k < numberOfObjCoef; k++){
10554  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10555  // if, present we should be pointing to <coef element
10556  *p = ch;
10557  while( *startCoef++ == *ch) ch++;
10558  if( (ch - *p) != 5) { osilerror_wrapper( ch,osillineno,"improper <coef> element"); return false;}
10559  startCoef -= 6;
10560  // get the idx attribute
10561  // eat the white space after <coef
10562  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10563  *p = ch;
10564  while( *c_idx++ == *ch) ch++;
10565  if( (ch - *p) != 3) { osilerror_wrapper( ch,osillineno,"incorrect idx attribute in objective function <idx> tag"); return false;}
10566  c_idx -= 4;
10567  // ch should be pointing to the first character after idx attribute
10569  osinstance->instanceData->objectives->obj[objcount]->coef[ k]->idx = atoimod1( osillineno, attText, attTextEnd);
10570  delete [] attText;
10571  ch++;
10572  // eat white space
10573  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10574  // if we don't have a > there is an error
10575  if(*ch++ != '>') { osilerror_wrapper( ch,osillineno,"incorrect <coef> element") ; return false;}
10576  // we should be pointing to first character after <coef>
10577  *p = ch;
10578  // eat characters until we find <
10579  for(; *ch != '<' && *ch != EOF; ch++);
10580  // put back here
10581 
10582  // we should be pointing to a < in the </coef> tag
10583  if(*ch != '<') { osilerror_wrapper( ch,osillineno,"improper </coef> tag"); return false;}
10584  osinstance->instanceData->objectives->obj[objcount]->coef[ k]->value = atofmod1( osillineno, *p, ch);
10585  *p = ch;
10586  while( *endCoef++ == *ch) ch++;
10587  if( (ch - *p) != 6) { osilerror_wrapper( ch,osillineno,"improper </coef> element"); return false;}
10588  endCoef -= 7;
10589  // get rid of white space after </coef
10590  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10591  // if we don't have a > there is an error
10592  if(*ch++ != '>') { osilerror_wrapper( ch,osillineno,"incorrect </coef> element") ; return false;}
10593  }
10594  }// end if(numberOfObjCoef > 0)
10595  *p = ch;
10596  return true;
10597 }//end parseObjCoef
10598 
10599 char *parseBase64(const char **p, int *dataSize, int* osillineno ){
10600  int ki, numChar;
10601  char *attTextEnd;
10602  const char *ch = *p;
10603  const char *sizeOf = "sizeOf";
10604  //char *numericType = "numericType";
10605  const char *startBase64BinaryData = "<base64BinaryData";
10606  const char *endBase64BinaryData = "</base64BinaryData";
10607  char *attText = NULL;
10608  char *b64string = NULL;
10609  int i;
10610  // start parsing
10611  for(i = 0; startBase64BinaryData[i] == *ch; i++, ch++);
10612  if(i != 17) {
10613  ch -= i;
10614  *p = ch;
10615  return b64string;
10616  }
10617  // find sizeOf attribute
10618  // eat the white space
10619  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10620  for(i = 0; sizeOf[i] == *ch; i++, ch++);
10621  if(i != 6) { osilerror_wrapper( ch,osillineno,"incorrect sizeOf attribute in <base64BinaryData> element"); return NULL;}
10622  // ch should be pointing to the first character after sizeOf
10623  ch++; \
10624  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ; \
10625  if(*ch == '\"'){ \
10626  ch++; \
10627  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ; \
10628  *p = ch; \
10629  for( ; *ch != '\"'; ch++); \
10630  }\
10631  else{\
10632  if(*ch == '\'') { \
10633  ch++; \
10634  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ; \
10635  *p = ch; \
10636  for( ; *ch != '\''; ch++); \
10637  } \
10638  else { osilerror_wrapper( ch, osillineno,"missing quote on attribute"); return NULL;} \
10639  }\
10640  numChar = ch - *p; \
10641  attText = new char[numChar + 1]; \
10642  for(ki = 0; ki < numChar; ki++) attText[ki] = *((*p)++); \
10643  attText[ki] = '\0'; \
10644  attTextEnd = &attText[ki];
10645  ch++;
10646  *dataSize = atoimod1( osillineno, attText, attTextEnd);
10647  delete [] attText;
10648  // since the element must contain b64 data, this element must end with >
10649  // eat the white space
10650  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10651  // better have an > sign or not valid
10652  if(*ch != '>' ) { osilerror_wrapper( ch,osillineno,"<base64BinaryData> element does not have a proper closing >"); return NULL;}
10653  ch++;
10654  // we are now pointing start of the data
10655  const char *b64textstart = ch;
10656  // eat characters until we get to the </base64BinaryData element
10657  for(; *ch != '<' && *ch != EOF; ch++);
10658  const char *b64textend = ch;
10659  // we should be pointing to </base64BinaryData>
10660  for(i = 0; endBase64BinaryData[i] == *ch; i++, ch++);
10661  if(i != 18) { osilerror_wrapper( ch,osillineno," problem with <base64BinaryData> element"); return NULL;}
10662  int b64len = b64textend - b64textstart;
10663  b64string = new char[ b64len + 1];
10664  for(ki = 0; ki < b64len; ki++) b64string[ki] = b64textstart[ ki];
10665  b64string[ki] = '\0';
10666  // burn the white space
10667  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10668  // better have an > sign or not valid
10669  if(*ch != '>' ) { osilerror_wrapper( ch,osillineno,"</base64BinaryData> element does not have a proper closing >"); return NULL;}
10670  ch++;
10671  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10672  *p = ch;
10673  return b64string;
10674 }
10675 
10676 
10677 double atofmod1(int* osillineno, const char *number, const char *numberend){
10678  double val;
10679  char *pEnd;
10680  val = os_strtod_wrap(number, &pEnd);
10681  // pEnd should now point to the first character after the number;
10682  // burn off any white space
10683  for( ; ISWHITESPACE( *pEnd) || isnewline( *pEnd, osillineno); pEnd++ ) ;
10684  // pEnd should now point to numberend, if not we have an error
10685  if(pEnd != numberend) osilerror_wrapper( pEnd, osillineno, "error in parsing an XSD:double");
10686  return val;
10687 }//end atofmod
10688 
10689 
10690 
10691 int atoimod1(int* osillineno, const char *number, const char *numberend){
10692  // modified atoi from Kernighan and Ritchie
10693  int ival;
10694  int i, sign;
10695  int endWhiteSpace;
10696  for(i = 0; ISWHITESPACE( number[ i]) || isnewline( number[ i], osillineno) ; i++);
10697  endWhiteSpace = i;
10698  sign = (number[ i] == '-') ? -1 : 1;
10699  if (number[ i] == '+' || number[ i] == '-') i++;
10700  for(ival = 0; ISDIGIT( number[ i]); i++){
10701  ival = 10*ival + (number[ i] - '0') ;
10702  }
10703  if(i == endWhiteSpace) { osilerror_wrapper( number,osillineno, "error in parsing an XSD:int" ); }
10704  // if we are here we should having nothing but white space until the end of the number
10705  for( ; ISWHITESPACE( number[ i]) || isnewline( number[ i], osillineno) ; i++);
10706  if(number[i] == *numberend){
10707  return sign*ival;
10708  }
10709  else { osilerror_wrapper( number,osillineno, "error in parsing an XSD:int"); return OSINT_MAX; }
10710 }//end atoimod1
10711 
10712 void osilerror_wrapper( const char* ch, int* osillineno, const char* errormsg){
10713  const int numErrorChar = 20;
10714  char errorArray[100] = "";
10715  strncpy(errorArray, ch, numErrorChar);
10716  std::ostringstream outStr;
10717  std::string error = errormsg;
10718  error = "PARSER ERROR: Input is either not valid or well formed: " + error;
10719  outStr << error << endl;
10720  outStr << "Here are " ;
10721  outStr << numErrorChar ;
10722  outStr << " characters currently being pointed to in the input string: ";
10723  outStr << errorArray;
10724  outStr << endl;
10725  outStr << "See line number: " << *osillineno << endl;
10726  error = outStr.str();
10727  //osillex_destroy(scanner);
10728  throw ErrorClass( error);
10729 }//end osilerror_wrapper
10730 
10732 /*
10733  int k;
10734  int numOtherVarVec = parserData->otherVarVec.size();
10735 
10736  for( k = 0; k < numOtherVarVec; k++){
10737  if( (parserData->otherVarVec[ k] != NULL) && (parserData->otherVarVec[ k]->otherVarText != NULL) )
10738  delete[] parserData->otherVarVec[ k]->otherVarText;
10739  if( (parserData->otherVarVec[ k] != NULL) && (parserData->otherVarVec[ k]->otherVarIndex != NULL) )
10740  delete[] parserData->otherVarVec[ k]->otherVarIndex;
10741 
10742  if( parserData->otherVarVec[ k] != NULL) delete parserData->otherVarVec[ k];
10743  }
10744 
10745  parserData->otherVarVec.clear();
10746 
10747  int numDualVals = parserData->dualVals.size();
10748  for(k = 0; k < numDualVals; k++){
10749  if( parserData->dualVals[ k] != NULL )
10750  delete parserData->dualVals[ k];
10751  }
10752  parserData->dualVals.clear();
10753 
10754 
10755  int numObjVals = parserData->objVals.size();
10756  for(k = 0; k < numObjVals; k++){
10757  if( parserData->objVals[ k] != NULL )
10758  delete parserData->objVals[ k];
10759  }
10760  parserData->objVals.clear();
10761 
10762 
10763  int numPrimalVals = parserData->primalVals.size();
10764  for(k = 0; k < numPrimalVals; k++){
10765  if( parserData->primalVals[ k] != NULL )
10766  delete parserData->primalVals[ k];
10767  }
10768  parserData->primalVals.clear();
10769 */
10770 }//end osil_empty_vectors
10771 
double os_strtod_wrap(const char *str, char **strEnd)
Definition: OSMathUtil.cpp:125
#define yylval
#define yylloc
void osilset_extra(OSiLParserData *parserData, void *yyscanner)
@ YYENOMEM
static const char * yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED
static YYPTRDIFF_T yystrlen(const char *yystr)
static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, OSInstance *osinstance, OSiLParserData *parserData, OSgLParserData *osglData, OSnLParserData *osnlData)
static const yytype_int16 yytranslate[]
void osnl_empty_vectors(OSnLParserData *osnlData)
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
#define YYMAXDEPTH
int atoimod1(int *osillineno, const char *ch1, const char *ch2)
#define YYSTACK_FREE
yysymbol_kind_t
@ YYSYMBOL_YYerror
@ YYSYMBOL_YYEOF
@ YYSYMBOL_YYEMPTY
#define YY_ASSERT(E)
#define YY_(Msgid)
#define YYNOMEM
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
#define YYNSTATES
void osilerror_wrapper(const char *ch, int *osillineno, const char *errormsg)
#define YY_IGNORE_USELESS_CAST_END
short yytype_int16
void yygetOSInstance(const char *osil, OSInstance *osinstance, OSiLParserData *parserData, OSgLParserData *osglData, OSnLParserData *osnlData)
bool parseObjCoef(const char **pchar, int objcount, OSInstance *osinstance, int *osillineno)
static const yytype_int16 yydefact[]
#define YYABORT
#define YYSTACK_BYTES(N)
yytype_int16 yy_state_t
bool parseRowIdx(const char **pchar, OSInstance *osinstance, int *osillineno)
#define YYLLOC_DEFAULT(Current, Rhs, N)
static const yytype_int16 yydefgoto[]
#define YY_REDUCE_PRINT(Rule)
#define GETATTRIBUTETEXT
#define YY_CAST(Type, Val)
void osilset_lineno(int line_number, void *yyscanner)
struct yy_buffer_state * YY_BUFFER_STATE
bool parseLinearConstraintCoefficients(const char **pchar, OSInstance *osinstance, int *osillineno)
void osil_empty_vectors(OSiLParserData *parserData)
static const yytype_int16 yypact[]
bool parseObjectives(const char **pchar, OSInstance *osinstance, int *osillineno)
#define yylex
#define YYCASE_(N, S)
#define YY_NULLPTR
void * malloc(YYSIZE_T)
bool parseInstanceData(const char **pchar, OSInstance *osinstance, int *osillineno)
#define YYFINAL
#define YY_ACCESSING_SYMBOL(State)
Accessing symbol of state STATE.
#define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
static const yytype_int16 yypgoto[]
#define YY_INITIAL_VALUE(Value)
bool parseValue(const char **pchar, OSInstance *osinstance, int *osillineno)
static YYPTRDIFF_T yytnamerr(char *yyres, const char *yystr)
std::string addErrorMsg(YYLTYPE *mytype, OSInstance *osinstance, OSiLParserData *parserData, OSgLParserData *osglData, OSnLParserData *osnlData, std::string errormsg)
int osillex_init(void **ptr_yy_globals)
#define YYNTOKENS
static char * yystpcpy(char *yydest, const char *yysrc)
#define YY_STACK_PRINT(Bottom, Top)
bool isnewline(char c, int *osillineno)
#define YYSIZE_T
#define YYSTACK_ALLOC_MAXIMUM
#define yydebug
#define YY_IGNORE_USELESS_CAST_BEGIN
static const yytype_int8 yyr2[]
char * parseBase64(const char **p, int *dataSize, int *osillineno)
static const yytype_int16 yystos[]
#define ISDIGIT(_c)
#define YYPTRDIFF_T
#define yynerrs
void osgl_empty_vectors(OSgLParserData *osglData)
bool parseInstanceHeader(const char **pchar, OSInstance *osinstance, int *osillineno)
void osilerror(YYLTYPE *mytype, OSInstance *osinstance, OSiLParserData *parserData, OSgLParserData *osglData, OSnLParserData *osnlData, std::string errormsg)
#define yyparse
static const yytype_int16 yytable[]
#define scanner
#define YYACCEPT
#define yytable_value_is_error(Yyn)
#define ISWHITESPACE(char_)
int osilget_lineno(void *yyscanner)
int osillex_destroy(void *yyscanner)
#define YYTRANSLATE(YYX)
double atofmod1(int *osillineno, const char *ch1, const char *ch2)
static const yytype_int16 yyr1[]
#define YY_ATTRIBUTE_UNUSED
static const char *const yytname[]
static int yypcontext_expected_tokens(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn)
char * osilget_text(void *yyscanner)
bool parseConstraints(const char **pchar, OSInstance *osinstance, int *osillineno)
bool parseStart(const char **pchar, OSInstance *osinstance, int *osillineno)
#define YYPOPSTACK(N)
int yy_state_fast_t
bool parseVariables(const char **pchar, OSInstance *osinstance, int *osillineno)
YY_BUFFER_STATE osil_scan_string(const char *yy_str, void *yyscanner)
#define YYLAST
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
#define yypact_value_is_default(Yyn)
#define YYINITDEPTH
static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn)
bool parseColIdx(const char **pchar, OSInstance *osinstance, int *osillineno)
signed char yytype_int8
void free(void *)
#define YYERROR
#define YYSIZEOF(X)
static const yytype_int16 yycheck[]
#define YYSTACK_ALLOC
#define YYDPRINTF(Args)
#define YY_USE(E)
#define yyerror
static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypcontext_t *yyctx)
int osilparse(OSInstance *osinstance, OSiLParserData *parserData, OSgLParserData *osglData, OSnLParserData *osnlData)
#define YYEOF
#define YYerror
#define YYUNDEF
#define YYEMPTY
goto yyreduce
OSgLParserData * osglData
int yystate
int yyresult
int yyn
OSnLParserData * osnlData
goto yysetstate
YYSTYPE yyval
#define yychar
YYSTYPE * yyvaluep
goto yyerrlab1
YYLTYPE yyerror_range[2]
OSoLParserData * parserData
yytype_int16 * yyss
YYLTYPE * yylsp
YYSTYPE * yyvs
YYLTYPE * yylocationp
YYSTYPE yyvsa[YYINITDEPTH]
YYSIZE_T yystacksize
for(;;)
yytype_int16 yyssa[YYINITDEPTH]
goto yybackup
goto yynewstate
YYSTYPE * yyvsp
yytype_int16 * yyssp
int yytoken
YYLTYPE yylsa[YYINITDEPTH]
int yyerrstatus
YYLTYPE * yyls
int yylen
YYLTYPE yyloc
static Bigint * mult(Bigint *a, Bigint *b)
Definition: OSdtoa.cpp:857
This file defines the OSnLNode class along with its derived classes.
static std::string decodeb64(char *b64bytes)
decode the data in base 64
Definition: OSBase64.cpp:87
a data structure to represent a point of departure for constructing a matrix by modifying parts of a ...
Definition: OSMatrix.h:1537
a data structure to represent an entry in a conReferenceMatrix element, which consists of a constrain...
Definition: OSMatrix.h:454
a data structure to represent row reference elements in a MatrixType object Each nonzero element is o...
Definition: OSMatrix.h:1178
a data structure to represent the nonzeros in a conReferenceMatrix element
Definition: OSMatrix.h:712
The in-memory representation of a generic cone Specific cone types are derived from this generic clas...
Definition: OSInstance.h:531
ENUM_CONE_TYPE coneType
The type of the cone.
Definition: OSInstance.h:556
The in-memory representation of the <cones> element.
Definition: OSInstance.h:1533
Cone ** cone
cone is pointer to an array of Cone object pointers
Definition: OSInstance.h:1549
int numberOfCones
numberOfCones is the number of <nl> elements in the <cones> element.
Definition: OSInstance.h:1546
a data structure to represent the constant elements in a MatrixType object
Definition: OSMatrix.h:750
to represent the nonzeros in a constantMatrix element
Definition: OSMatrix.h:502
The in-memory representation of the <con> element.
Definition: OSInstance.h:219
double constant
constant is a value that is added to the constraint
Definition: OSInstance.h:232
double ub
ub is the upper bound on the constraint
Definition: OSInstance.h:238
double lb
lb is the lower bound on the constraint
Definition: OSInstance.h:235
std::string name
name is the name of the constraint
Definition: OSInstance.h:229
The in-memory representation of the <constraints> element.
Definition: OSInstance.h:252
int numberOfConstraints
numberOfConstraints is the number of constraints in the instance
Definition: OSInstance.h:264
Constraint ** con
con is pointer to an array of Constraint object pointers
Definition: OSInstance.h:268
int numberOfEl
Definition: OSGeneral.h:620
double * el
Definition: OSGeneral.h:621
used for throwing exceptions.
Definition: OSErrorClass.h:32
std::string errormsg
errormsg is the error that is causing the exception to be thrown
Definition: OSErrorClass.h:42
OSnLNode ** m_mChildren
m_mChildren holds all the operands, that is, nodes that the current node operates on.
Definition: OSnLNode.h:84
unsigned int inumberOfChildren
inumberOfChildren is the number of OSnLNode child elements If this number is not fixed,...
Definition: OSnLNode.h:74
std::string fileCreator
name(s) of author(s) who created this file
Definition: OSGeneral.h:55
std::string source
used when the file or problem appeared in the literature (could be in BiBTeX format or similar)
Definition: OSGeneral.h:45
std::string name
used to give a name to the file or the problem contained within it
Definition: OSGeneral.h:39
std::string description
further information about the file or the problem contained within it
Definition: OSGeneral.h:50
std::string licence
licensing information if applicable
Definition: OSGeneral.h:60
a data structure to represent the nonzero values in a generalMatrix element
Definition: OSMatrix.h:1006
a data structure to represent the nonzeros in a generalMatrix element
Definition: OSMatrix.h:640
Variables * variables
variables is a pointer to a Variables object
Definition: OSInstance.h:2185
QuadraticCoefficients * quadraticCoefficients
quadraticCoefficients is a pointer to a QuadraticCoefficients object
Definition: OSInstance.h:2201
Constraints * constraints
constraints is a pointer to a Constraints object
Definition: OSInstance.h:2191
Cones * cones
cones is a pointer to a Cones object
Definition: OSInstance.h:2216
NonlinearExpressions * nonlinearExpressions
nonlinearExpressions is a pointer to a NonlinearExpressions object
Definition: OSInstance.h:2206
MatrixProgramming * matrixProgramming
matrixProgramming is a pointer to a MatrixProgramming object
Definition: OSInstance.h:2221
TimeDomain * timeDomain
timeDomain is a pointer to a TimeDomain object
Definition: OSInstance.h:2226
Matrices * matrices
matrices is a pointer to a Matrices object
Definition: OSInstance.h:2211
Objectives * objectives
objectives is a pointer to a Objectives object
Definition: OSInstance.h:2188
LinearConstraintCoefficients * linearConstraintCoefficients
linearConstraintCoefficients is a pointer to a LinearConstraintCoefficients object
Definition: OSInstance.h:2196
an integer Vector data structure
Definition: OSGeneral.h:470
int numberOfEl
Definition: OSGeneral.h:483
int * el
Definition: OSGeneral.h:484
The in-memory representation of an intersection cone.
Definition: OSInstance.h:1325
The in-memory representation of the <linearConstraintCoefficients> element.
Definition: OSInstance.h:289
DoubleVector * value
a pointer to the array of nonzero values being stored
Definition: OSInstance.h:315
int iNumberOfStartElements
iNumberOfStartElements counts the number of elements in the <start> section of <linearConstraintCoeff...
Definition: OSInstance.h:322
int numberOfValues
numberOfValues is the number of nonzero elements stored in the <linearConstraintCoefficients> element
Definition: OSInstance.h:301
IntVector * start
a pointer to the start of each row or column stored in sparse format
Definition: OSInstance.h:306
IntVector * rowIdx
a pointer of row indices if the problem is stored by column
Definition: OSInstance.h:309
IntVector * colIdx
a pointer of column indices if the problem is stored by row
Definition: OSInstance.h:312
a data structure to represent an expression in a linearMatrix element A LinearMatrixElement is a (fin...
Definition: OSMatrix.h:412
a data structure to represent a term in a linearMatrix element A term has the form c*x_{k},...
Definition: OSMatrix.h:374
a data structure to represent the nonzero values in a linearMatrix element
Definition: OSMatrix.h:918
a data structure to represent the linear expressions in a LinearMatrixElement object
Definition: OSMatrix.h:603
The in-memory representation of the <matrices> element.
Definition: OSInstance.h:483
int numberOfMatrices
numberOfMatrices is the number of <nl> elements in the <matrices> element.
Definition: OSInstance.h:496
OSMatrix ** matrix
matrix is a pointer to an array of OSMatrix object pointers
Definition: OSInstance.h:499
a data structure to represent a MatrixBlock object (derived from MatrixType)
Definition: OSMatrix.h:2501
a data structure to represent the nonzeroes of a matrix in a blockwise fashion. Each block can be giv...
Definition: OSMatrix.h:1450
The in-memory representation of the <matrixCon> element.
Definition: OSInstance.h:1737
int numberOfColumns
numberOfColumns gives the number of columns of this matrix
Definition: OSInstance.h:1743
std::string name
an optional name to this MatrixCon
Definition: OSInstance.h:1768
int lbConeIdx
lbConeIdx gives a cone that must contain matrixCon - lbMatrix
Definition: OSInstance.h:1759
int ubConeIdx
ubConeIdx gives a cone that must contain ubMatrix - matrixCon
Definition: OSInstance.h:1765
int lbMatrixIdx
lbMatrixIdx gives a lower bound for this matrixCon
Definition: OSInstance.h:1756
int numberOfRows
numberOfRows gives the number of rows of this matrix
Definition: OSInstance.h:1740
int templateMatrixIdx
templateMatrixIdx refers to a matrix that describes the locations in this matrixVar that are allowed ...
Definition: OSInstance.h:1748
int conReferenceMatrixIdx
conReferenceMatrixIdx allows some or all of the components of this matrixCon to be copied from constr...
Definition: OSInstance.h:1753
int ubMatrixIdx
ubMatrixIdx gives an upper bound for this matrixCon
Definition: OSInstance.h:1762
The in-memory representation of the <matrixConstraints> element.
Definition: OSInstance.h:1788
int numberOfMatrixCon
numberOfMatrixCon gives the number of <matrixCon> children
Definition: OSInstance.h:1798
MatrixCon ** matrixCon
matrixCon is an array of pointers to the <matrixCon> children
Definition: OSInstance.h:1801
an abstract class to help represent the elements in a MatrixType object From this we derive concrete ...
Definition: OSMatrix.h:249
The in-memory representation of the <expr> element, which is like a nonlinear expression,...
Definition: OSInstance.h:1817
int idx
idx holds the row index of the nonlinear expression
Definition: OSInstance.h:1820
MatrixExpressionTree * matrixExpressionTree
matrixExpressionTree contains the root of the MatrixExpressionTree
Definition: OSInstance.h:1829
ENUM_NL_EXPR_SHAPE shape
shape holds the shape of the nonlinear expression (linear/quadratic/convex/general) (see further up i...
Definition: OSInstance.h:1826
Used to hold the instance in memory.
OSnLMNode * m_treeRoot
m_treeRoot holds the root node (of OSnLMNode type) of the expression tree.
The in-memory representation of the <matrixExpressions> element.
Definition: OSInstance.h:1856
int numberOfExpr
numberOfExpr gives the number of expressions
Definition: OSInstance.h:1859
MatrixExpression ** expr
a pointer to an array of linear and nonlinear expressions that evaluate to matrices
Definition: OSInstance.h:1864
a generic class from which we derive matrix constructors (BaseMatrix, MatrixElements,...
Definition: OSMatrix.h:51
The in-memory representation of the <matrixObj> element.
Definition: OSInstance.h:1662
int numberOfColumns
numberOfColumns gives the number of columns of this matrix
Definition: OSInstance.h:1668
int numberOfRows
numberOfRows gives the number of rows of this matrix
Definition: OSInstance.h:1665
int orderConeIdx
orderConeIdx gives a cone that expresses preferences during the optimization x is (weakly) preferred ...
Definition: OSInstance.h:1683
int constantMatrixIdx
constantMatrixIdx gives a constant added to the matrixObj
Definition: OSInstance.h:1686
int templateMatrixIdx
templateMatrixIdx refers to a matrix that describes the locations in this matrixObj that are allowed ...
Definition: OSInstance.h:1673
std::string name
an optional name to this matrixObj
Definition: OSInstance.h:1689
int objReferenceMatrixIdx
objReferenceMatrixIdx allows some or all of the components of this matrixObj to be copied from object...
Definition: OSInstance.h:1678
The in-memory representation of the <matrixObjectives> element.
Definition: OSInstance.h:1709
int numberOfMatrixObj
numberOfMatrixObj gives the number of <matrixObj> children
Definition: OSInstance.h:1719
MatrixObj ** matrixObj
matrixObj is an array of pointers to the <matrixObj> children
Definition: OSInstance.h:1722
The in-memory representation of the <matrixProgramming> element.
Definition: OSInstance.h:1883
MatrixObjectives * matrixObjectives
a pointer to the matrixObjectives object
Definition: OSInstance.h:1895
MatrixConstraints * matrixConstraints
a pointer to the matrixConstraints object
Definition: OSInstance.h:1898
MatrixExpressions * matrixExpressions
a pointer to the matrixExpressions object
Definition: OSInstance.h:1901
MatrixVariables * matrixVariables
a pointer to the matrixVariables object
Definition: OSInstance.h:1892
a data structure to represent the nonzeroes of a matrix by transformation from other (previously defi...
Definition: OSMatrix.h:1359
a data structure to represent a MatrixType object (from which we derive OSMatrix and MatrixBlock)
Definition: OSMatrix.h:1890
The in-memory representation of the <matrixVar> element.
Definition: OSInstance.h:1580
int ubConeIdx
ubConeIdx gives a cone that must contain ubMatrix - matrixVar
Definition: OSInstance.h:1608
char varType
an optional variable type (C, B, I, D, J, S).
Definition: OSInstance.h:1616
int lbMatrixIdx
lbMatrixIdx gives a lower bound for this matrixVar
Definition: OSInstance.h:1599
std::string name
an optional name to this matrixVar
Definition: OSInstance.h:1611
int lbConeIdx
lbConeIdx gives a cone that must contain matrixVar - lbMatrix
Definition: OSInstance.h:1602
int numberOfRows
numberOfRows gives the number of rows of this matrix
Definition: OSInstance.h:1583
int varReferenceMatrixIdx
varReferenceMatrixIdx allows some or all of the components of this matrix variable to be copied from ...
Definition: OSInstance.h:1596
int numberOfColumns
numberOfColumns gives the number of columns of this matrix
Definition: OSInstance.h:1586
int ubMatrixIdx
ubMatrixIdx gives an upper bound for this matrixVar
Definition: OSInstance.h:1605
int templateMatrixIdx
templateMatrixIdx refers to a matrix that describes the locations in this matrixVar that are allowed ...
Definition: OSInstance.h:1591
The in-memory representation of the <matrixVariables> element.
Definition: OSInstance.h:1636
MatrixVar ** matrixVar
matrixVar is an array of pointers to the <matrixVar> children
Definition: OSInstance.h:1642
int numberOfMatrixVar
numberOfMatrixVar gives the number of <matrixVar> children
Definition: OSInstance.h:1639
The in-memory representation of the <nl> element.
Definition: OSInstance.h:411
int idx
idx holds the row index of the nonlinear expression
Definition: OSInstance.h:414
ScalarExpressionTree * osExpressionTree
osExpressionTree contains the root of the ScalarExpressionTree
Definition: OSInstance.h:430
ENUM_NL_EXPR_SHAPE shape
shape holds the shape of the nonlinear expression (linear/quadratic/convex/general) (see further up i...
Definition: OSInstance.h:420
The in-memory representation of the <nonlinearExpressions> element.
Definition: OSInstance.h:453
int numberOfNonlinearExpressions
numberOfNonlinearExpressions is the number of <nl> elements in the <nonlinearExpressions> element.
Definition: OSInstance.h:466
Nl ** nl
nl is pointer to an array of Nl object pointers
Definition: OSInstance.h:469
The NonnegativeCone Class.
Definition: OSInstance.h:610
The NonpositiveCone Class.
Definition: OSInstance.h:668
bool bADMustReTape
is true if an AD Expression Tree has an expression that can change depending on the value of the inpu...
The in-memory representation of an OSiL instance..
Definition: OSInstance.h:2263
GeneralFileHeader * instanceHeader
the instanceHeader is implemented as a general file header object to allow sharing of classes between...
Definition: OSInstance.h:2275
InstanceData * instanceData
A pointer to an InstanceData object.
Definition: OSInstance.h:2278
a data structure to represent a matrix object (derived from MatrixType)
Definition: OSMatrix.h:2186
int idx
Definition: OSMatrix.h:2188
OSMatrix * createConstructorTreeFromPrefix(std::vector< MatrixNode * > mtxConstructorVec)
Definition: OSMatrix.cpp:2986
this class extends OSMatrix for use, e.g., in the matrixCon section of OSoL and OSrL
Definition: OSMatrix.h:2446
this class extends OSMatrix for use, e.g., in the matrixObj section of OSoL and OSrL
Definition: OSMatrix.h:2392
this class extends OSMatrix for use, e.g., in the matrixVar section of OSoL and OSrL
Definition: OSMatrix.h:2337
The OSgLParserData Class.
double scalarMultiplier
int * osglIntArray
data structure to process an IntVector and hold the data temporarily
std::vector< int > nBlocksVec
std::vector< MatrixNode * > mtxBlocksVec
bool targetMatrixFirstRowPresent
std::string value
std::string valueType
bool numberOfColumnsPresent
bool numberOfBlocksPresent
Data elements for parsing number-valued attributes and elements.
std::string symmetry
bool numberOfValuesPresent
double * osglDblArray
std::vector< int * > colOffsets
MatrixNode * tempC
This matrix constructor is needed in order to properly push the constructor vector.
std::string name
bool baseMatrixStartRowPresent
OSMatrix ** matrix
We need to hold an array of <matrix> elements temporarily.
int matrixCounter
We also need to keep track locally of the number of matrices.
std::string type
bool baseTransposePresent
Data elements for parsing string-valued attributes and text elements.
std::vector< int * > rowOffsets
Vectors to hold rowOffset and colOffset arrays in a place where they are easily accessible while the ...
int nonzeroCounter
Linear matrices need a counter to count the number of terms within each element.
bool scalarMultiplierPresent
std::vector< MatrixNode * > mtxBlkVec
bool baseMatrixEndColPresent
std::string varType
bool baseMatrixEndRowPresent
bool numberOfMatricesPresent
bool targetMatrixFirstColPresent
bool baseMatrixStartColPresent
std::vector< MatrixNode * > mtxConstructorVec
Several vectors to process the matrix nodes into the right order.
std::string shape
bool numberOfVarIdxPresent
The OSiLParserData Class, used to store parser data.
The OSnLMNode Class for nonlinear expressions involving matrices.
Definition: OSnLNode.h:1761
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
int idx
The index of the matrixCon.
Definition: OSnLNode.h:2679
int idx
The index of the matrixObj.
Definition: OSnLNode.h:2608
The OSnLMNodeMatrixProduct Class.
Definition: OSnLNode.h:2756
int idx
The index of the matrix.
Definition: OSnLNode.h:2466
int idx
The index of the matrixVar.
Definition: OSnLNode.h:2537
The OSnLNodeAbs Class.
Definition: OSnLNode.h:1113
The OSnLNodeAllDiff Class.
Definition: OSnLNode.h:1561
The OSnLNodeCos Class.
Definition: OSnLNode.h:963
The OSnLNodeDivide Class.
Definition: OSnLNode.h:669
The OSnLNodeE Class.
Definition: OSnLNode.h:1347
The OSnLNodeErf Class.
Definition: OSnLNode.h:1163
The OSnLNodeExp Class.
Definition: OSnLNode.h:1063
The OSnLNode Class for nonlinear expressions.
Definition: OSnLNode.h:180
OSnLNode * createExpressionTreeFromPrefix(std::vector< ExprNode * > nlNodeVec)
Take a vector of ExprNodes (OSnLNodes and OSnLMNodes) in prefix format and create a scalar-valued OSE...
Definition: OSnLNode.cpp:381
The OSnLNodeIf Class.
Definition: OSnLNode.h:1213
The OSnLNodeLn Class.
Definition: OSnLNode.h:816
The next few nodes evaluate to a scalar even though one or more of its arguments are matrices.
Definition: OSnLNode.h:1613
The OSnLNodeMatrixTrace Class.
Definition: OSnLNode.h:1713
The OSnLNodeMatrixTrace Class.
Definition: OSnLNode.h:1663
The OSnLNodeMax Class.
Definition: OSnLNode.h:415
The OSnLNodeMin Class.
Definition: OSnLNode.h:464
The OSnLNodeMinus Class.
Definition: OSnLNode.h:516
The OSnLNodeNegate Class.
Definition: OSnLNode.h:567
The OSnLNodeNumber Class.
Definition: OSnLNode.h:1263
double value
value is the value of the number
Definition: OSnLNode.h:1266
std::string id
later, e.g.
Definition: OSnLNode.h:1274
std::string type
in the C++ type is real
Definition: OSnLNode.h:1269
The OSnLNodePI Class.
Definition: OSnLNode.h:1413
The OSnLNodePlus Class.
Definition: OSnLNode.h:316
The OSnLNodePower Class.
Definition: OSnLNode.h:718
The OSnLNodeProduct Class.
Definition: OSnLNode.h:767
The OSnLNodeSin Class.
Definition: OSnLNode.h:1013
The OSnLNodeSqrt Class.
Definition: OSnLNode.h:865
The OSnLNodeSquare Class.
Definition: OSnLNode.h:913
The OSnLNodeSum Class.
Definition: OSnLNode.h:366
The OSnLNodeTimes Class.
Definition: OSnLNode.h:618
The OSnLNodeVariable Class.
Definition: OSnLNode.h:1479
int idx
idx is the index of the variable
Definition: OSnLNode.h:1488
double coef
coef is an option coefficient on the variable, the default value is 1.0
Definition: OSnLNode.h:1485
The OSnLParserData Class.
OSnLMNodeMatrixObj * nlMNodeMatrixObj
a pointer to an OSnLMNode object that is a matrixObj reference
bool matrixidxattON
matrixidxattON is set to true if the idx attribute has been parsed for an OSnLNodeVariable,...
OSnLMNodeMatrixReference * nlMNodeMatrixRef
a pointer to an OSnLMNode object that is a simple matrix reference
OSnLNodeNumber * nlNodeNumberPoint
a pointer to an OSnLNode object that is a number
OSnLMNodeMatrixCon * nlMNodeMatrixCon
a pointer to an OSnLMNode object that is a matrixCon reference
std::vector< ExprNode * > allDiffVec
the OSnLNodeallDiff node can have any number of children, including other children with an indetermin...
std::vector< ExprNode * > maxVec
the OSnLNodeMax node can have any number of children, including other children with an indeterminate ...
bool variableidxattON
variableidxattON is set to true if the idx attribute has been parsed for an OSnLNodeVariable,...
std::vector< ExprNode * > sumVec
the OSnLNodeSum node can have any number of children, including other children with an indeterminate ...
std::vector< ExprNode * > nlNodeVec
nlNodeVec holds a vector of pointers to OSnLNodes and OSnLMNodes In order to build the expression tre...
bool includeDiagonalAttribute
OSnLNodeVariable * nlNodeVariablePoint
a pointer to an OSnLNode object that is a variable
int tmpnlcount
tmpnlcount counts the number of nl nodes actually found.
OSnLMNodeMatrixVar * nlMNodeMatrixVar
a pointer to an OSnLMNode object that is a matrixVar reference
std::vector< ExprNode * > matrixProductVec
the OSnLMNodeProduct node can have any number of children, including other children with an indetermi...
std::vector< ExprNode * > matrixSumVec
the OSnLMNodeMatrixSum node can have any number of children, including other children with an indeter...
std::vector< ExprNode * > productVec
the OSnLNodeProduct node can have any number of children, including other children with an indetermin...
ExprNode * nlNodePoint
These entities are used for parsing <nonlinearExpressions>
int nlnodenumber
nlnodenumber is the number of nl nodes in the instance
std::vector< ExprNode * > minVec
the OSnLNodeMin node can have any number of children, including other children with an indeterminate ...
bool numberidattON
numberidattON is set to true if the id attribute has been parsed for an OSnLNodeNumber object,...
bool variablecoefattON
variablecoefattON is set to true if the coeff attribute has been parsed for an OSnLNodeVariable,...
std::string parser_errors
used to accumulate error message so the parser does not die on the first error encountered
bool ignoreDataAfterErrors
two booleans to govern the behavior after an error has been encountered
char * errorText
if the parser finds invalid text it is held here and we delete if the file was not valid
bool suppressFurtherErrorMessages
The in-memory representation of the objective function <coef> element.
Definition: OSInstance.h:111
double value
value is the value of the objective function coefficient corresponding to the variable with index idx
Definition: OSInstance.h:128
int idx
idx is the index of the variable corresponding to the coefficient
Definition: OSInstance.h:123
a data structure to represent objective reference elements in a MatrixType object Each nonzero elemen...
Definition: OSMatrix.h:1092
to represent the nonzeros in an objReferenceMatrix element
Definition: OSMatrix.h:676
The in-memory representation of the <obj> element.
Definition: OSInstance.h:142
ObjCoef ** coef
coef is pointer to an array of ObjCoef object pointers
Definition: OSInstance.h:176
double constant
constant is the constant term added to the objective function, 0 by default
Definition: OSInstance.h:162
double weight
weight is the weight applied to the given objective function, 1.0 by default
Definition: OSInstance.h:167
int numberOfObjCoef
numberOfObjCoef is the number of variables with a nonzero objective function coefficient
Definition: OSInstance.h:172
std::string name
the name of the objective function
Definition: OSInstance.h:152
std::string maxOrMin
declare the objective function to be a max or a min
Definition: OSInstance.h:157
The in-memory representation of the <objectives> element.
Definition: OSInstance.h:189
int numberOfObjectives
numberOfObjectives is the number of objective functions in the instance
Definition: OSInstance.h:201
Objective ** obj
coef is pointer to an array of ObjCoef object pointers
Definition: OSInstance.h:205
The OrthantCone Class.
Definition: OSInstance.h:727
The in-memory representation of a polyhedral cone.
Definition: OSInstance.h:787
The in-memory representation of a product cone.
Definition: OSInstance.h:1249
The in-memory representation of the <quadraticCoefficients> element.
Definition: OSInstance.h:381
QuadraticTerm ** qTerm
qTerm is a pointer to an array of QuadraticTerm object pointers
Definition: OSInstance.h:397
int numberOfQuadraticTerms
numberOfQuadraticTerms is the number of quadratic terms in the <quadraticCoefficients> element.
Definition: OSInstance.h:393
The in-memory representation of a quadratic cone.
Definition: OSInstance.h:861
The in-memory representation of the <qTerm> element.
Definition: OSInstance.h:341
double coef
coef is the coefficient of the quadratic term
Definition: OSInstance.h:366
int idxOne
idxOne is the index of the first variable in the quadratic term
Definition: OSInstance.h:358
int idx
idx is the index of the row in which the quadratic term appears
Definition: OSInstance.h:353
int idxTwo
idxTwo is the index of the second variable in the quadratic term
Definition: OSInstance.h:363
The in-memory representation of a rotated quadratic cone.
Definition: OSInstance.h:952
Used to hold part of the instance in memory.
OSnLNode * m_treeRoot
m_treeRoot holds the root node (of OSnLNode type) of the expression tree.
The in-memory representation of a cone of semidefinite matrices.
Definition: OSInstance.h:1047
The in-memory representation of the <timeDomain> element.
Definition: OSInstance.h:2140
TimeDomainStages * stages
stages is a pointer to a Stages object
Definition: OSInstance.h:2151
TimeDomainInterval * interval
interval is a pointer to an Interval object
Definition: OSInstance.h:2155
The in-memory representation of the <con> element.
Definition: OSInstance.h:1977
int idx
idx gives the index of this constraint
Definition: OSInstance.h:1987
The in-memory representation of the <constraints> child of the <stage> element.
Definition: OSInstance.h:1995
int numberOfConstraints
numberOfConstraints gives the number of constraints contained in this stage
Definition: OSInstance.h:2005
TimeDomainStageCon ** con
con is a pointer to an array of TimeDomainStageCon object pointers
Definition: OSInstance.h:2011
The in-memory representation of the <stage> element.
Definition: OSInstance.h:2063
TimeDomainStageVariables * variables
variables is a pointer to a TimeDomainVariables object
Definition: OSInstance.h:2078
std::string name
name corresponds to the optional attribute that holds the name of the stage; the default value is emp...
Definition: OSInstance.h:2075
TimeDomainStageObjectives * objectives
objectives is a pointer to a TimeDomainObjectives object
Definition: OSInstance.h:2084
TimeDomainStageConstraints * constraints
constraints is a pointer to a TimeDomainConstraints object
Definition: OSInstance.h:2081
The in-memory representation of the <obj> element.
Definition: OSInstance.h:2020
int idx
idx gives the index of this variable
Definition: OSInstance.h:2030
The in-memory representation of the <objectives> child of the <stage> element.
Definition: OSInstance.h:2038
TimeDomainStageObj ** obj
obj is a pointer to an array of TimeDomainStageObj object pointers
Definition: OSInstance.h:2054
int numberOfObjectives
numberOfObjectives gives the number of objectives contained in this stage
Definition: OSInstance.h:2048
The in-memory representation of the element.
Definition: OSInstance.h:1934
int idx
idx gives the index of this variable
Definition: OSInstance.h:1944
The in-memory representation of the <variables> child of the <stage> element.
Definition: OSInstance.h:1952
TimeDomainStageVar ** var
var is a pointer to an array of TimeDomainStageVar object pointers
Definition: OSInstance.h:1968
int numberOfVariables
numberOfVariables gives the number of variables contained in this stage
Definition: OSInstance.h:1962
The in-memory representation of the <stages> element.
Definition: OSInstance.h:2092
TimeDomainStage ** stage
stage is pointer to an array of stage object pointers
Definition: OSInstance.h:2107
int numberOfStages
numberOfStages is the number of stages in the <stages> element.
Definition: OSInstance.h:2104
a data structure to represent variable reference elements in a MatrixType object Each nonzero element...
Definition: OSMatrix.h:836
A concrete class that is used to store a specific type of matrix values, references to variable index...
Definition: OSMatrix.h:564
The in-memory representation of the variable element.
Definition: OSInstance.h:45
double ub
ub corresponds to the optional attribute that holds the variable upper bound.
Definition: OSInstance.h:61
std::string name
name corresponds to the optional attribute that holds the variable name, the default value is empty
Definition: OSInstance.h:71
double lb
lb corresponds to the optional attribute that holds the variable lower bound.
Definition: OSInstance.h:56
char type
type corresponds to the attribute that holds the variable type: C (Continuous), B (binary),...
Definition: OSInstance.h:66
The in-memory representation of the variables element.
Definition: OSInstance.h:84
int numberOfVariables
numberOfVariables is the number of variables in the instance
Definition: OSInstance.h:94
Variable ** var
Here we define a pointer to an array of var pointers.
Definition: OSInstance.h:97
ENUM_NL_EXPR_SHAPE
Definition: OSParameters.h:831
bool verifyMatrixSymmetry(std::string symmetry)
Definition: OSParameters.h:770
const int OSINT_MAX
Definition: OSParameters.h:94
int returnVarType(char vt)
Definition: OSParameters.h:569
const double OSDBL_MAX
Definition: OSParameters.h:93
int returnNlExprShape(std::string shape)
Definition: OSParameters.h:839
int returnMatrixType(std::string type)
Definition: OSParameters.h:618
int returnMatrixSymmetry(std::string symmetry)
Definition: OSParameters.h:758
@ ENUM_CONE_TYPE_orthant
Definition: OSParameters.h:869
@ ENUM_CONE_TYPE_nonnegative
Definition: OSParameters.h:867
@ ENUM_CONE_TYPE_product
Definition: OSParameters.h:882
@ ENUM_CONE_TYPE_quadratic
Definition: OSParameters.h:871
@ ENUM_CONE_TYPE_nonpositive
Definition: OSParameters.h:868
@ ENUM_CONE_TYPE_rotatedQuadratic
Definition: OSParameters.h:872
@ ENUM_CONE_TYPE_intersection
Definition: OSParameters.h:883
@ ENUM_CONE_TYPE_semidefinite
Definition: OSParameters.h:875
@ ENUM_CONE_TYPE_polyhedral
Definition: OSParameters.h:870
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:600
@ ENUM_MATRIX_TYPE_linear
Definition: OSParameters.h:605
@ ENUM_MATRIX_TYPE_varReference
Definition: OSParameters.h:604
@ ENUM_MATRIX_TYPE_constant
Definition: OSParameters.h:603
@ ENUM_MATRIX_TYPE_conReference
Definition: OSParameters.h:610
@ ENUM_MATRIX_TYPE_general
Definition: OSParameters.h:607
@ ENUM_MATRIX_TYPE_objReference
Definition: OSParameters.h:609
ENUM_MATRIX_SYMMETRY
Definition: OSParameters.h:736
ENUM_CONREFERENCE_VALUETYPE
An enum to track the type of value contained in a reference to a constraint.
Definition: OSParameters.h:704
int returnConReferenceValueType(std::string valueType)
Definition: OSParameters.h:720
@ ENUM_VARTYPE_binary
Definition: OSParameters.h:562
yysymbol_kind_t yytoken
yy_state_t * yyssp
YYLTYPE yyls_alloc
YYSTYPE yyvs_alloc
yy_state_t yyss_alloc