1 karl 1.31 //%2004////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
4 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
6 // IBM Corp.; EMC Corporation, The Open Group.
7 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
9 //
10 // Permission is hereby granted, free of charge, to any person obtaining a copy
11 // of this software and associated documentation files (the "Software"), to
12 // deal in the Software without restriction, including without limitation the
13 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
14 // sell copies of the Software, and to permit persons to whom the Software is
15 // furnished to do so, subject to the following conditions:
16 //
17 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
18 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
19 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
20 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
21 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22 karl 1.31 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
23 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 //
26 //==============================================================================
|
27 dj.gorey 1.29 #ifndef lint
28 static char const
29 yyrcsid[] = "$FreeBSD: src/usr.bin/yacc/skeleton.c,v 1.28 2000/01/17 02:04:06 bde Exp $";
30 #endif
31 #include <stdlib.h>
32 #define YYBYACC 1
33 #define YYMAJOR 1
34 #define YYMINOR 9
35 #define YYLEX yylex()
36 #define YYEMPTY -1
37 #define yyclearin (yychar=(YYEMPTY))
38 #define yyerrok (yyerrflag=0)
39 #define YYRECOVERING() (yyerrflag!=0)
40 static int yygrowstack();
|
41 mike 1.3 #define yyparse cimmof_parse
42 #define yylex cimmof_lex
43 #define yyerror cimmof_error
|
44 dj.gorey 1.29 #define yychar cimmof_char
45 #define yyval cimmof_val
|
46 kumpf 1.21 #define yylval cimmof_lval
|
47 mike 1.3 #define yydebug cimmof_debug
48 #define yynerrs cimmof_nerrs
|
49 dj.gorey 1.29 #define yyerrflag cimmof_errflag
50 #define yyss cimmof_ss
51 #define yyssp cimmof_ssp
52 #define yyvs cimmof_vs
53 #define yyvsp cimmof_vsp
54 #define yylhs cimmof_lhs
55 #define yylen cimmof_len
56 #define yydefred cimmof_defred
57 #define yydgoto cimmof_dgoto
58 #define yysindex cimmof_sindex
59 #define yyrindex cimmof_rindex
60 #define yygindex cimmof_gindex
61 #define yytable cimmof_table
62 #define yycheck cimmof_check
63 #define yyname cimmof_name
64 #define yyrule cimmof_rule
65 #define yysslim cimmof_sslim
66 #define yystacksize cimmof_stacksize
67 #define YYPREFIX "cimmof_"
68 #line 2 "cimmof.y"
|
69 mike 1.3 /* Flex grammar created from CIM Specification Version 2.2 Appendix A */
70
71 /*
72 Note the following implementation details:
73
74 1. The MOF specification has a production of type assocDeclaration,
75 but an association is just a type of classDeclaration with a few
76 special rules. At least for the first pass, I'm treating an
77 associationDeclaration as a classDeclaration and applying its
78 syntactical rules outside of the grammar definition.
79
80 2. Same with the indicationDeclaration. It appears to be a normal
81 classDeclaration with the INDICATION qualifier and no special
82 syntactical rules.
83
84 3. The Parser uses String objects throughout to represent
85 character data. However, the tokenizer underneath is probably
86 working with 8-bit chars. If we later use an extended character
87 compatible tokenizer, I anticipate NO CHANGE to this parser.
88
89 4. Besides the tokenizer, this parser uses 2 sets of outside
90 mike 1.3 services:
91 1)Class valueFactory. This has a couple of static methods
92 that assist in creating CIMValue objects from Strings.
93 2)Class cimmofParser. This has a wide variety of methods
94 that fall into these catagories:
95 a) Interfaces to the Repository. You call cimmofParser::
96 methods to query and store compiled CIM elements.
97 b) Error handling.
98 c) Data format conversions.
99 d) Tokenizer manipulation
100 e) Pragma handling
101 f) Alias Handling
102 */
103
|
104 e.boden 1.30
|
105 mike 1.3 #define YYSTACKSIZE 2000
106
107 #include <cstdlib>
|
108 karl 1.25 #if !defined(PEGASUS_PLATFORM_ZOS_ZSERIES_IBM) && !defined(__OS400__)
|
109 dudhe.girish 1.28 #if defined(PEGASUS_PLATFORM_DARWIN_PPC_GNU)
110 #include <sys/malloc.h>
111 #else
|
112 mike 1.3 #include <malloc.h>
|
113 dudhe.girish 1.28 #endif
|
114 karl 1.8 #endif
|
115 mike 1.3 #include <cstdio>
116 #include <cstring>
117 #include <Pegasus/Common/String.h>
|
118 kumpf 1.16 #include <Pegasus/Common/CIMName.h>
|
119 mike 1.3 #include "cimmofParser.h"
120 #include "valueFactory.h"
121 #include "memobjs.h"
122 #include "qualifierList.h"
123 #include "objname.h"
124
|
125 e.boden 1.30 /*include any useful debugging stuff here*/
126
|
127 karl 1.25 /* Debugging the parser. Debugging is provided through
128 1. debug functions in Bison that are controlled by a compile time
129 flag (YYDEBUG) and a runtime flag (yydebug) which is redefined
130 to cimmof_debug.
131 2. Debug functions defined through YACCTRACE, a macro defined
132 in cimmofparser.h and turned on and off manually.
133 All debugging must be turned on manually at this point by
134 setting the YYDEBUG compile flag and also setting YACCTRACE.
135 ATTN: TODO: automate the debug information flags.
136 */
|
137 dj.gorey 1.29 /* Enable this define to compie Bison/Yacc tracing*/
138 /* ATTN: p3 03092003 ks Enabling this flag currently causes a compile error*/
|
139 karl 1.25
|
140 e.boden 1.30 #define YYDEBUG 1
|
141 dj.gorey 1.29 /*static int cimmof_debug;*/
|
142 karl 1.25
|
143 dj.gorey 1.29 /*extern cimmofParser g_cimmofParser;*/
|
144 mike 1.3
|
145 e.boden 1.30 extern int cimmof_lex(void);
146 extern int cimmof_error(...);
|
147 mike 1.3 extern char *cimmof_text;
|
148 e.boden 1.30 extern void cimmof_yy_less(int n);
149 extern int cimmof_leng;
150
|
151 mike 1.3
152 /* ------------------------------------------------------------------- */
153 /* These globals provide continuity between various pieces of a */
154 /* declaration. They are usually interpreted as "these modifiers were */
155 /* encountered and need to be applied to the finished object". For */
156 /* example, qualifiers are accumulated in g_qualifierList[] as they */
157 /* encountered, then applied to the production they qualify when it */
158 /* is completed. */
159 /* ------------------------------------------------------------------- */
|
160 kumpf 1.18 CIMFlavor g_flavor = CIMFlavor (CIMFlavor::NONE);
161 CIMScope g_scope = CIMScope ();
|
162 dj.gorey 1.29 /*ATTN: BB 2001 BB P1 - Fixed size qualifier list max 20. Make larger or var*/
|
163 karl 1.25 qualifierList g_qualifierList(20);
|
164 mike 1.3 CIMMethod *g_currentMethod = 0;
165 CIMClass *g_currentClass = 0;
166 CIMInstance *g_currentInstance = 0;
167 String g_currentAlias = String::EMPTY;
|
168 kumpf 1.16 CIMName g_referenceClassName = CIMName();
|
169 dj.gorey 1.29 Array<CIMKeyBinding> g_KeyBindingArray; /* it gets created empty*/
|
170 kumpf 1.10 TYPED_INITIALIZER_VALUE g_typedInitializerValue;
|
171 mike 1.3
172 /* ------------------------------------------------------------------- */
173 /* Pragmas, except for the Include pragma, are not handled yet */
174 /* I don't understand them, so it may be a while before they are */
175 /* ------------------------------------------------------------------- */
176 struct pragma {
177 String name;
178 String value;
179 };
180
181 /* ---------------------------------------------------------------- */
182 /* Use our general wrap manager to handle end-of-file */
183 /* ---------------------------------------------------------------- */
184 extern "C" {
185 int
186 cimmof_wrap() {
187 return cimmofParser::Instance()->wrapCurrentBuffer();
188 }
189 }
190
191 /* ---------------------------------------------------------------- */
192 mike 1.3 /* Pass errors to our general log manager. */
193 /* ---------------------------------------------------------------- */
194 void
|
195 kumpf 1.13 cimmof_error(const char *msg) {
|
196 mike 1.3 cimmofParser::Instance()->log_parse_error(cimmof_text, msg);
|
197 dj.gorey 1.29 /* printf("Error: %s\n", msg);*/
|
198 mike 1.3 }
199
|
200 e.boden 1.30 #line 135 "cimmof.y"
|
201 mike 1.3 typedef union {
|
202 e.boden 1.30 /*char *strval;*/
203 CIMClass *mofclass;
204 CIMFlavor *flavor;
205 CIMInstance *instance;
206 CIMKeyBinding *keybinding;
207 CIMMethod *method;
208 CIMName *cimnameval;
209 CIMObjectPath *reference;
210 CIMProperty *property;
211 CIMQualifier *qualifier;
212 CIMQualifierDecl *mofqualifier;
213 CIMScope *scope;
214 CIMType datatype;
215 CIMValue *value;
216 int ival;
217 modelPath *modelpath;
218 String *strptr;
219 String *strval;
220 struct pragma *pragma;
221 TYPED_INITIALIZER_VALUE *typedinitializer;
|
222 mike 1.3 } YYSTYPE;
|
223 e.boden 1.30 #line 198 "y.tab.c"
|
224 dj.gorey 1.29 #define YYERRCODE 256
|
225 e.boden 1.30 #define TOK_ALIAS_IDENTIFIER 257
226 #define TOK_ANY 258
227 #define TOK_AS 259
228 #define TOK_ASSOCIATION 260
229 #define TOK_BINARY_VALUE 261
230 #define TOK_CHAR_VALUE 262
231 #define TOK_CLASS 263
232 #define TOK_COLON 264
233 #define TOK_COMMA 265
234 #define TOK_DISABLEOVERRIDE 266
235 #define TOK_DQUOTE 267
236 #define TOK_DT_BOOL 268
237 #define TOK_DT_CHAR16 269
238 #define TOK_DT_CHAR8 270
239 #define TOK_DT_DATETIME 271
240 #define TOK_DT_REAL32 272
241 #define TOK_DT_REAL64 273
242 #define TOK_DT_SINT16 274
243 #define TOK_DT_SINT32 275
244 #define TOK_DT_SINT64 276
245 #define TOK_DT_SINT8 277
246 e.boden 1.30 #define TOK_DT_STR 278
247 #define TOK_DT_UINT16 279
248 #define TOK_DT_UINT32 280
249 #define TOK_DT_UINT64 281
250 #define TOK_DT_UINT8 282
251 #define TOK_ENABLEOVERRIDE 283
252 #define TOK_END_OF_FILE 284
253 #define TOK_EQUAL 285
254 #define TOK_FALSE 286
255 #define TOK_FLAVOR 287
256 #define TOK_HEX_VALUE 288
257 #define TOK_INCLUDE 289
258 #define TOK_INDICATION 290
259 #define TOK_INSTANCE 291
260 #define TOK_LEFTCURLYBRACE 292
261 #define TOK_LEFTPAREN 293
262 #define TOK_LEFTSQUAREBRACKET 294
|
263 dj.gorey 1.29 #define TOK_METHOD 295
|
264 e.boden 1.30 #define TOK_NULL_VALUE 296
265 #define TOK_OCTAL_VALUE 297
266 #define TOK_OF 298
267 #define TOK_PARAMETER 299
268 #define TOK_PERIOD 300
269 #define TOK_POSITIVE_DECIMAL_VALUE 301
270 #define TOK_PRAGMA 302
271 #define TOK_PROPERTY 303
272 #define TOK_QUALIFIER 304
273 #define TOK_REAL_VALUE 305
274 #define TOK_REF 306
275 #define TOK_REFERENCE 307
276 #define TOK_RESTRICTED 308
277 #define TOK_RIGHTCURLYBRACE 309
278 #define TOK_RIGHTPAREN 310
279 #define TOK_RIGHTSQUAREBRACKET 311
280 #define TOK_SCHEMA 312
281 #define TOK_SCOPE 313
282 #define TOK_SEMICOLON 314
283 #define TOK_SIGNED_DECIMAL_VALUE 315
284 #define TOK_SIMPLE_IDENTIFIER 316
285 e.boden 1.30 #define TOK_STRING_VALUE 317
286 #define TOK_TOSUBCLASS 318
287 #define TOK_TRANSLATABLE 319
288 #define TOK_TRUE 320
289 #define TOK_UNEXPECTED_CHAR 321
|
290 dj.gorey 1.29 const short cimmof_lhs[] = { -1,
|
291 e.boden 1.30 0, 60, 60, 61, 61, 61, 61, 23, 22, 4,
292 5, 5, 63, 63, 65, 65, 66, 66, 66, 20,
293 19, 67, 68, 3, 69, 69, 69, 70, 9, 9,
294 27, 26, 71, 28, 36, 37, 38, 38, 10, 2,
295 1, 15, 15, 15, 57, 57, 52, 52, 52, 56,
296 56, 56, 56, 34, 34, 53, 53, 42, 42, 42,
297 42, 42, 39, 39, 39, 39, 39, 16, 16, 51,
298 51, 50, 33, 33, 47, 47, 49, 48, 41, 41,
299 40, 21, 17, 17, 18, 45, 54, 54, 55, 14,
300 13, 72, 73, 73, 74, 62, 62, 75, 35, 25,
301 24, 59, 30, 76, 31, 31, 32, 32, 32, 32,
302 32, 32, 32, 32, 32, 12, 12, 77, 78, 78,
303 79, 79, 79, 79, 79, 11, 11, 80, 80, 6,
304 6, 6, 6, 6, 7, 7, 7, 7, 7, 7,
305 7, 7, 7, 8, 8, 64, 64, 81, 82, 82,
306 29, 46, 46, 58, 58, 58, 58, 43, 44,
|
307 mike 1.3 };
|
308 dj.gorey 1.29 const short cimmof_len[] = { 2,
309 1, 2, 0, 1, 1, 1, 1, 2, 5, 1,
310 2, 0, 4, 3, 1, 2, 1, 1, 1, 4,
311 2, 3, 1, 1, 1, 3, 0, 4, 1, 1,
312 3, 4, 1, 6, 1, 1, 2, 0, 2, 1,
313 1, 3, 2, 0, 2, 0, 1, 1, 1, 1,
314 1, 1, 1, 1, 3, 1, 1, 1, 1, 1,
315 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
316 2, 1, 3, 2, 1, 1, 4, 1, 2, 0,
317 1, 3, 1, 3, 3, 1, 2, 0, 1, 2,
318 5, 4, 1, 2, 5, 1, 1, 5, 1, 5,
319 6, 4, 3, 3, 1, 3, 1, 1, 1, 1,
320 1, 1, 1, 1, 1, 4, 0, 2, 1, 3,
321 1, 1, 1, 1, 1, 1, 0, 1, 2, 1,
322 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
323 1, 1, 1, 1, 1, 3, 0, 1, 1, 3,
324 3, 1, 1, 3, 3, 1, 0, 1, 1,
|
325 mike 1.3 };
|
326 dj.gorey 1.29 const short cimmof_defred[] = { 0,
|
327 e.boden 1.30 148, 0, 0, 0, 0, 7, 0, 6, 5, 97,
328 1, 0, 4, 0, 96, 0, 0, 158, 0, 115,
329 109, 107, 110, 113, 114, 111, 112, 108, 152, 153,
330 0, 0, 90, 0, 8, 2, 0, 0, 149, 0,
331 0, 0, 0, 0, 0, 0, 0, 93, 0, 18,
332 17, 19, 0, 0, 15, 10, 0, 0, 0, 0,
333 156, 0, 0, 146, 72, 0, 99, 159, 0, 133,
334 143, 134, 144, 145, 138, 140, 142, 136, 132, 137,
335 139, 141, 135, 0, 130, 131, 0, 0, 0, 0,
336 0, 94, 14, 35, 0, 0, 0, 0, 0, 16,
337 0, 0, 0, 67, 60, 68, 66, 57, 65, 63,
338 59, 74, 64, 69, 62, 0, 58, 56, 70, 0,
339 54, 0, 0, 122, 121, 123, 124, 125, 151, 128,
|
340 dj.gorey 1.29 0, 150, 98, 100, 0, 0, 0, 0, 0, 0,
|
341 e.boden 1.30 105, 0, 92, 0, 0, 21, 0, 0, 33, 31,
342 0, 13, 89, 87, 0, 9, 91, 0, 73, 71,
343 155, 154, 129, 0, 43, 0, 102, 104, 0, 0,
344 101, 0, 103, 0, 51, 52, 50, 53, 76, 75,
345 78, 0, 0, 0, 0, 25, 23, 20, 36, 0,
|
346 dj.gorey 1.29 11, 55, 42, 45, 118, 0, 119, 106, 0, 0,
|
347 e.boden 1.30 81, 95, 32, 0, 29, 0, 30, 0, 22, 0,
348 0, 0, 116, 79, 0, 0, 39, 40, 0, 26,
349 37, 34, 120, 0, 77, 28, 86, 0, 83, 0,
350 0, 0, 84, 48, 49, 85, 47,
|
351 mike 1.3 };
|
352 dj.gorey 1.29 const short cimmof_dgoto[] = { 4,
|
353 e.boden 1.30 145, 219, 146, 57, 156, 84, 85, 86, 206, 207,
354 129, 139, 5, 6, 136, 115, 228, 229, 96, 50,
355 216, 7, 8, 9, 10, 97, 51, 52, 39, 88,
356 140, 30, 176, 116, 66, 98, 190, 211, 117, 199,
357 200, 118, 19, 69, 230, 40, 178, 179, 180, 119,
358 120, 236, 121, 102, 181, 182, 167, 62, 45, 11,
359 12, 13, 35, 14, 54, 55, 148, 188, 185, 186,
360 150, 33, 47, 48, 15, 89, 170, 196, 130, 131,
|
361 dj.gorey 1.29 16, 41,
|
362 mike 1.3 };
|
363 e.boden 1.30 const short cimmof_sindex[] = { -142,
364 0, -266, -78, 0, -264, 0, -260, 0, 0, 0,
365 0, -142, 0, -150, 0, -78, -253, 0, -244, 0,
|
366 dj.gorey 1.29 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
367 e.boden 1.30 -198, -232, 0, -280, 0, 0, -263, -205, 0, -262,
368 -252, -230, -212, 58, -161, -207, -276, 0, -194, 0,
369 0, 0, -3, -203, 0, 0, -143, -263, -167, -129,
370 0, -247, -78, 0, 0, -188, 0, 0, -185, 0,
371 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
372 0, 0, 0, -168, 0, 0, -186, -137, -64, -149,
373 -171, 0, 0, 0, -165, -148, -160, -157, -159, 0,
374 -101, -106, -143, 0, 0, 0, 0, 0, 0, 0,
375 0, 0, 0, 0, 0, -226, 0, 0, 0, -230,
376 0, -145, -141, 0, 0, 0, 0, 0, 0, 0,
377 -247, 0, 0, 0, -274, -115, -132, -114, -151, -240,
378 0, -241, 0, 0, -168, 0, -232, -133, 0, 0,
379 -139, 0, 0, 0, -263, 0, 0, -122, 0, 0,
380 0, 0, 0, -127, 0, -241, 0, 0, -104, -247,
381 0, -64, 0, -230, 0, 0, 0, 0, 0, 0,
382 0, -117, -115, 27, -221, 0, 0, 0, 0, -98,
383 0, 0, 0, 0, 0, -213, 0, 0, -74, -263,
384 0, 0, 0, -105, 0, -116, 0, -232, 0, -230,
385 -112, -247, 0, 0, -97, -63, 0, 0, -168, 0,
386 0, 0, 0, -111, 0, 0, 0, -59, 0, -77,
387 -111, -219, 0, 0, 0, 0, 0,
|
388 mike 1.3 };
|
389 dj.gorey 1.29 const short cimmof_rindex[] = { 1,
390 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
391 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
392 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
393 e.boden 1.30 0, -109, 0, 43, 0, 0, 0, 0, 0, -208,
394 0, 0, 0, 0, 0, 0, -109, 0, 0, 0,
395 0, 0, 0, 43, 0, 0, -146, 0, 0, 0,
396 0, -243, 0, 0, 0, 0, 0, 0, 0, 0,
|
397 dj.gorey 1.29 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
398 e.boden 1.30 0, 0, 0, -250, 0, 0, 0, -103, 0, 0,
|
399 dj.gorey 1.29 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
400 e.boden 1.30 0, -83, -82, 0, 0, 0, 0, 0, 0, 0,
401 0, 0, 0, 0, 0, 0, 0, 0, 0, -202,
|
402 dj.gorey 1.29 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
403 e.boden 1.30 -231, 0, 0, 0, 0, -51, 0, 0, 0, 0,
404 0, 0, 0, -170, -273, 0, -19, 0, 0, 0,
|
405 dj.gorey 1.29 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
406 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
407 e.boden 1.30 0, 0, 0, -100, 0, 0, 0, 0, 0, 0,
408 0, 0, -99, 0, 0, 0, 0, 0, 0, -96,
|
409 dj.gorey 1.29 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
410 e.boden 1.30 0, 0, 0, 0, 0, 0, 0, 43, 0, 0,
411 0, 0, 0, 0, 0, 0, 0, 0, -211, 0,
412 0, 0, 0, 0, 0, 0, 0, -54, 0, 0,
|
413 dj.gorey 1.29 0, 0, 0, 0, 0, 0, 0,
|
414 mike 1.3 };
|
415 dj.gorey 1.29 const short cimmof_gindex[] = { 0,
|
416 e.boden 1.30 0, 0, 0, -53, 0, -47, 0, 0, 0, 0,
417 0, 0, 0, 0, -135, 0, 0, -12, 0, 0,
418 0, 0, 0, 0, 0, 0, 0, 0, 157, 0,
419 0, -80, -40, 0, 0, 0, 0, 0, 0, 0,
420 0, -52, 0, 0, 0, 219, -9, 0, 0, -39,
421 0, 0, -147, 121, 126, 62, 47, 0, 0, 220,
422 0, 0, 0, -30, 0, 179, 0, 0, 0, 28,
423 0, 0, 0, 190, 0, 0, 0, 0, -124, 0,
|
424 dj.gorey 1.29 0, 0,
|
425 mike 1.3 };
|
426 e.boden 1.30 #define YYTABLESIZE 359
|
427 dj.gorey 1.29 const short cimmof_table[] = { 61,
|
428 e.boden 1.30 3, 46, 67, 53, 103, 95, 163, 123, 141, 183,
429 192, 44, 63, 1, 44, 153, 46, 1, 124, 104,
430 105, 127, 17, 53, 172, 174, 164, 32, 49, 59,
431 60, 34, 91, 126, 44, 125, 165, 153, 158, 42,
432 44, 104, 105, 208, 106, 197, 107, 174, 43, 18,
433 59, 212, 56, 44, 175, 109, 157, 157, 64, 110,
434 126, 1, 61, 111, 61, 44, 106, 127, 107, 173,
435 127, 128, 59, 113, 157, 65, 108, 109, 114, 126,
436 160, 110, 159, 226, 237, 111, 65, 223, 209, 177,
437 1, 198, 58, 104, 105, 113, 213, 65, 44, 157,
438 114, 191, 157, 87, 68, 99, 61, 61, 90, 157,
439 157, 61, 37, 177, 41, 101, 184, 88, 106, 93,
440 107, 133, 24, 41, 134, 135, 137, 138, 108, 109,
441 204, 104, 105, 110, 201, 142, 205, 111, 104, 105,
442 38, 112, 143, 41, 147, 88, 215, 113, 151, 65,
443 144, 1, 114, 149, 152, 153, 106, 155, 107, 2,
444 168, 3, 171, 106, 161, 107, 122, 109, 162, 166,
445 221, 110, 169, 108, 109, 111, 189, 184, 110, 20,
446 187, 21, 111, 193, 22, 113, 210, 65, 195, 214,
447 114, 234, 113, 20, 65, 21, 202, 114, 22, 218,
448 217, 222, 224, 225, 227, 231, 147, 232, 12, 88,
449 e.boden 1.30 117, 23, 82, 46, 46, 80, 24, 38, 233, 132,
450 25, 31, 235, 157, 26, 23, 154, 194, 27, 203,
451 24, 36, 100, 28, 25, 220, 92, 29, 26, 0,
452 0, 0, 27, 0, 0, 27, 0, 28, 147, 147,
453 0, 147, 147, 147, 147, 147, 147, 147, 147, 147,
454 147, 147, 147, 147, 70, 71, 0, 72, 73, 74,
455 75, 76, 77, 78, 79, 80, 81, 82, 83, 0,
456 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
457 27, 147, 0, 0, 70, 71, 147, 72, 73, 74,
458 75, 76, 77, 78, 79, 80, 81, 82, 83, 0,
459 147, 147, 94, 147, 147, 147, 147, 147, 147, 147,
460 147, 147, 147, 147, 147, 70, 71, 0, 72, 73,
461 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
462 0, 0, 56, 0, 0, 0, 0, 0, 0, 0,
463 0, 0, 0, 0, 0, 0, 0, 0, 147,
|
464 mike 1.3 };
|
465 e.boden 1.30 const short cimmof_check[] = { 40,
466 0, 32, 42, 34, 58, 53, 131, 60, 89, 145,
467 158, 285, 265, 294, 265, 257, 47, 294, 266, 261,
468 262, 265, 289, 54, 265, 267, 301, 292, 309, 292,
469 293, 292, 309, 265, 285, 283, 311, 257, 265, 293,
470 314, 261, 262, 265, 286, 170, 288, 267, 293, 316,
471 292, 265, 316, 265, 296, 297, 265, 266, 311, 301,
472 308, 294, 265, 305, 267, 264, 286, 311, 288, 310,
473 318, 319, 292, 315, 283, 317, 296, 297, 320, 311,
474 120, 301, 309, 219, 232, 305, 317, 212, 310, 142,
475 294, 172, 298, 261, 262, 315, 310, 317, 310, 308,
476 320, 155, 311, 265, 317, 309, 309, 310, 316, 318,
477 319, 314, 263, 166, 285, 259, 147, 264, 286, 314,
478 288, 310, 293, 294, 310, 294, 313, 265, 296, 297,
479 184, 261, 262, 301, 174, 285, 184, 305, 261, 262,
480 291, 309, 314, 314, 293, 292, 200, 315, 306, 317,
481 316, 294, 320, 314, 314, 257, 286, 264, 288, 302,
482 293, 304, 314, 286, 310, 288, 296, 297, 310, 285,
483 210, 301, 287, 296, 297, 305, 316, 208, 301, 258,
484 314, 260, 305, 311, 263, 315, 285, 317, 293, 264,
485 320, 232, 315, 258, 317, 260, 314, 320, 263, 316,
486 e.boden 1.30 306, 314, 300, 267, 316, 265, 316, 285, 292, 292,
487 314, 290, 267, 265, 314, 316, 295, 314, 231, 63,
488 299, 3, 232, 103, 303, 290, 101, 166, 307, 183,
489 295, 12, 54, 312, 299, 208, 47, 316, 303, -1,
490 -1, -1, 307, -1, -1, 265, -1, 312, 268, 269,
491 -1, 271, 272, 273, 274, 275, 276, 277, 278, 279,
492 280, 281, 282, 263, 268, 269, -1, 271, 272, 273,
493 274, 275, 276, 277, 278, 279, 280, 281, 282, -1,
494 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
495 310, 291, -1, -1, 268, 269, 316, 271, 272, 273,
496 274, 275, 276, 277, 278, 279, 280, 281, 282, -1,
497 268, 269, 316, 271, 272, 273, 274, 275, 276, 277,
498 278, 279, 280, 281, 282, 268, 269, -1, 271, 272,
499 273, 274, 275, 276, 277, 278, 279, 280, 281, 282,
500 -1, -1, 316, -1, -1, -1, -1, -1, -1, -1,
501 -1, -1, -1, -1, -1, -1, -1, -1, 316,
|
502 mike 1.3 };
|
503 dj.gorey 1.29 #define YYFINAL 4
504 #ifndef YYDEBUG
505 #define YYDEBUG 0
506 #endif
507 #define YYMAXTOKEN 321
508 #if YYDEBUG
509 const char * const cimmof_name[] = {
510 "end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
511 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
512 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
513 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
514 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
515 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
516 e.boden 1.30 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"TOK_ALIAS_IDENTIFIER","TOK_ANY",
517 "TOK_AS","TOK_ASSOCIATION","TOK_BINARY_VALUE","TOK_CHAR_VALUE","TOK_CLASS",
518 "TOK_COLON","TOK_COMMA","TOK_DISABLEOVERRIDE","TOK_DQUOTE","TOK_DT_BOOL",
519 "TOK_DT_CHAR16","TOK_DT_CHAR8","TOK_DT_DATETIME","TOK_DT_REAL32",
520 "TOK_DT_REAL64","TOK_DT_SINT16","TOK_DT_SINT32","TOK_DT_SINT64","TOK_DT_SINT8",
521 "TOK_DT_STR","TOK_DT_UINT16","TOK_DT_UINT32","TOK_DT_UINT64","TOK_DT_UINT8",
522 "TOK_ENABLEOVERRIDE","TOK_END_OF_FILE","TOK_EQUAL","TOK_FALSE","TOK_FLAVOR",
523 "TOK_HEX_VALUE","TOK_INCLUDE","TOK_INDICATION","TOK_INSTANCE",
524 "TOK_LEFTCURLYBRACE","TOK_LEFTPAREN","TOK_LEFTSQUAREBRACKET","TOK_METHOD",
525 "TOK_NULL_VALUE","TOK_OCTAL_VALUE","TOK_OF","TOK_PARAMETER","TOK_PERIOD",
526 "TOK_POSITIVE_DECIMAL_VALUE","TOK_PRAGMA","TOK_PROPERTY","TOK_QUALIFIER",
527 "TOK_REAL_VALUE","TOK_REF","TOK_REFERENCE","TOK_RESTRICTED",
528 "TOK_RIGHTCURLYBRACE","TOK_RIGHTPAREN","TOK_RIGHTSQUAREBRACKET","TOK_SCHEMA",
529 "TOK_SCOPE","TOK_SEMICOLON","TOK_SIGNED_DECIMAL_VALUE","TOK_SIMPLE_IDENTIFIER",
530 "TOK_STRING_VALUE","TOK_TOSUBCLASS","TOK_TRANSLATABLE","TOK_TRUE",
531 "TOK_UNEXPECTED_CHAR",
|
532 mike 1.3 };
|
533 dj.gorey 1.29 const char * const cimmof_rule[] = {
534 "$accept : mofSpec",
535 "mofSpec : mofProductions",
536 "mofProductions : mofProduction mofProductions",
537 "mofProductions :",
538 "mofProduction : compilerDirective",
539 "mofProduction : qualifierDeclaration",
540 "mofProduction : classDeclaration",
541 "mofProduction : instanceDeclaration",
542 "classDeclaration : classHead classBody",
543 "classHead : qualifierList TOK_CLASS className alias superClass",
544 "className : TOK_SIMPLE_IDENTIFIER",
545 "superClass : TOK_COLON className",
546 "superClass :",
547 "classBody : TOK_LEFTCURLYBRACE classFeatures TOK_RIGHTCURLYBRACE TOK_SEMICOLON",
548 "classBody : TOK_LEFTCURLYBRACE TOK_RIGHTCURLYBRACE TOK_SEMICOLON",
549 "classFeatures : classFeature",
550 "classFeatures : classFeatures classFeature",
551 "classFeature : propertyDeclaration",
552 "classFeature : methodDeclaration",
553 "classFeature : referenceDeclaration",
554 dj.gorey 1.29 "methodDeclaration : qualifierList methodHead methodBody methodEnd",
555 "methodHead : dataType methodName",
556 "methodBody : TOK_LEFTPAREN parameters TOK_RIGHTPAREN",
557 "methodEnd : TOK_SEMICOLON",
558 "methodName : TOK_SIMPLE_IDENTIFIER",
559 "parameters : parameter",
560 "parameters : parameters TOK_COMMA parameter",
561 "parameters :",
562 "parameter : qualifierList parameterType parameterName array",
563 "parameterType : dataType",
564 "parameterType : objectRef",
565 "propertyDeclaration : qualifierList propertyBody propertyEnd",
566 "propertyBody : dataType propertyName array typedDefaultValue",
567 "propertyEnd : TOK_SEMICOLON",
568 "referenceDeclaration : qualifierList referencedObject TOK_REF referenceName referencePath TOK_SEMICOLON",
569 "referencedObject : TOK_SIMPLE_IDENTIFIER",
570 "referenceName : TOK_SIMPLE_IDENTIFIER",
571 "referencePath : TOK_EQUAL stringValue",
572 "referencePath :",
573 "objectRef : className TOK_REF",
574 "parameterName : TOK_SIMPLE_IDENTIFIER",
575 dj.gorey 1.29 "propertyName : TOK_SIMPLE_IDENTIFIER",
576 "array : TOK_LEFTSQUAREBRACKET TOK_POSITIVE_DECIMAL_VALUE TOK_RIGHTSQUAREBRACKET",
577 "array : TOK_LEFTSQUAREBRACKET TOK_RIGHTSQUAREBRACKET",
578 "array :",
579 "typedDefaultValue : TOK_EQUAL typedInitializer",
580 "typedDefaultValue :",
581 "initializer : constantValue",
582 "initializer : arrayInitializer",
583 "initializer : referenceInitializer",
584 "typedInitializer : nonNullConstantValue",
585 "typedInitializer : TOK_NULL_VALUE",
586 "typedInitializer : arrayInitializer",
587 "typedInitializer : referenceInitializer",
588 "constantValues : constantValue",
589 "constantValues : constantValues TOK_COMMA constantValue",
590 "constantValue : nonNullConstantValue",
591 "constantValue : TOK_NULL_VALUE",
592 "nonNullConstantValue : integerValue",
593 "nonNullConstantValue : TOK_REAL_VALUE",
594 "nonNullConstantValue : TOK_CHAR_VALUE",
595 "nonNullConstantValue : stringValues",
596 dj.gorey 1.29 "nonNullConstantValue : booleanValue",
597 "integerValue : TOK_POSITIVE_DECIMAL_VALUE",
598 "integerValue : TOK_SIGNED_DECIMAL_VALUE",
599 "integerValue : TOK_OCTAL_VALUE",
600 "integerValue : TOK_HEX_VALUE",
601 "integerValue : TOK_BINARY_VALUE",
602 "booleanValue : TOK_FALSE",
603 "booleanValue : TOK_TRUE",
604 "stringValues : stringValue",
605 "stringValues : stringValues stringValue",
606 "stringValue : TOK_STRING_VALUE",
607 "arrayInitializer : TOK_LEFTCURLYBRACE constantValues TOK_RIGHTCURLYBRACE",
608 "arrayInitializer : TOK_LEFTCURLYBRACE TOK_RIGHTCURLYBRACE",
609 "referenceInitializer : objectHandle",
610 "referenceInitializer : aliasInitializer",
611 "objectHandle : TOK_DQUOTE namespaceHandleRef modelPath TOK_DQUOTE",
612 "aliasInitializer : aliasIdentifier",
613 "namespaceHandleRef : namespaceHandle TOK_COLON",
614 "namespaceHandleRef :",
615 "namespaceHandle : stringValue",
616 "modelPath : className TOK_PERIOD keyValuePairList",
617 dj.gorey 1.29 "keyValuePairList : keyValuePair",
618 "keyValuePairList : keyValuePairList TOK_COMMA keyValuePair",
619 "keyValuePair : keyValuePairName TOK_EQUAL initializer",
620 "keyValuePairName : TOK_SIMPLE_IDENTIFIER",
621 "alias : TOK_AS aliasIdentifier",
622 "alias :",
623 "aliasIdentifier : TOK_ALIAS_IDENTIFIER",
624 "instanceDeclaration : instanceHead instanceBody",
625 "instanceHead : qualifierList TOK_INSTANCE TOK_OF className alias",
626 "instanceBody : TOK_LEFTCURLYBRACE valueInitializers TOK_RIGHTCURLYBRACE TOK_SEMICOLON",
627 "valueInitializers : valueInitializer",
628 "valueInitializers : valueInitializers valueInitializer",
629 "valueInitializer : qualifierList TOK_SIMPLE_IDENTIFIER TOK_EQUAL typedInitializer TOK_SEMICOLON",
630 "compilerDirective : compilerDirectiveInclude",
631 "compilerDirective : compilerDirectivePragma",
632 "compilerDirectiveInclude : TOK_PRAGMA TOK_INCLUDE TOK_LEFTPAREN fileName TOK_RIGHTPAREN",
633 "fileName : stringValue",
634 "compilerDirectivePragma : TOK_PRAGMA pragmaName TOK_LEFTPAREN pragmaVal TOK_RIGHTPAREN",
635 "qualifierDeclaration : TOK_QUALIFIER qualifierName qualifierValue scope defaultFlavor TOK_SEMICOLON",
636 "qualifierValue : TOK_COLON dataType array typedDefaultValue",
637 "scope : scope_begin metaElements TOK_RIGHTPAREN",
638 dj.gorey 1.29 "scope_begin : TOK_COMMA TOK_SCOPE TOK_LEFTPAREN",
639 "metaElements : metaElement",
640 "metaElements : metaElements TOK_COMMA metaElement",
641 "metaElement : TOK_CLASS",
642 "metaElement : TOK_SCHEMA",
643 "metaElement : TOK_ASSOCIATION",
644 "metaElement : TOK_INDICATION",
645 "metaElement : TOK_PROPERTY",
646 "metaElement : TOK_REFERENCE",
647 "metaElement : TOK_METHOD",
648 "metaElement : TOK_PARAMETER",
649 "metaElement : TOK_ANY",
650 "defaultFlavor : TOK_COMMA flavorHead explicitFlavors TOK_RIGHTPAREN",
651 "defaultFlavor :",
652 "flavorHead : TOK_FLAVOR TOK_LEFTPAREN",
653 "explicitFlavors : explicitFlavor",
654 "explicitFlavors : explicitFlavors TOK_COMMA explicitFlavor",
655 "explicitFlavor : TOK_ENABLEOVERRIDE",
656 "explicitFlavor : TOK_DISABLEOVERRIDE",
657 "explicitFlavor : TOK_RESTRICTED",
658 "explicitFlavor : TOK_TOSUBCLASS",
659 dj.gorey 1.29 "explicitFlavor : TOK_TRANSLATABLE",
660 "flavor : overrideFlavors",
661 "flavor :",
662 "overrideFlavors : explicitFlavor",
663 "overrideFlavors : overrideFlavors explicitFlavor",
664 "dataType : intDataType",
665 "dataType : realDataType",
666 "dataType : TOK_DT_STR",
667 "dataType : TOK_DT_BOOL",
668 "dataType : TOK_DT_DATETIME",
669 "intDataType : TOK_DT_UINT8",
670 "intDataType : TOK_DT_SINT8",
671 "intDataType : TOK_DT_UINT16",
672 "intDataType : TOK_DT_SINT16",
673 "intDataType : TOK_DT_UINT32",
674 "intDataType : TOK_DT_SINT32",
675 "intDataType : TOK_DT_UINT64",
676 "intDataType : TOK_DT_SINT64",
677 "intDataType : TOK_DT_CHAR16",
678 "realDataType : TOK_DT_REAL32",
679 "realDataType : TOK_DT_REAL64",
680 dj.gorey 1.29 "qualifierList : qualifierListBegin qualifiers TOK_RIGHTSQUAREBRACKET",
681 "qualifierList :",
682 "qualifierListBegin : TOK_LEFTSQUAREBRACKET",
683 "qualifiers : qualifier",
684 "qualifiers : qualifiers TOK_COMMA qualifier",
685 "qualifier : qualifierName typedQualifierParameter flavor",
686 "qualifierName : TOK_SIMPLE_IDENTIFIER",
687 "qualifierName : metaElement",
688 "typedQualifierParameter : TOK_LEFTPAREN nonNullConstantValue TOK_RIGHTPAREN",
689 "typedQualifierParameter : TOK_LEFTPAREN TOK_NULL_VALUE TOK_RIGHTPAREN",
690 "typedQualifierParameter : arrayInitializer",
691 "typedQualifierParameter :",
692 "pragmaName : TOK_SIMPLE_IDENTIFIER",
693 "pragmaVal : TOK_STRING_VALUE",
|
694 mike 1.3 };
|
695 kumpf 1.21 #endif
|
696 dj.gorey 1.29 #if YYDEBUG
697 #include <stdio.h>
|
698 mike 1.3 #endif
|
699 dj.gorey 1.29 #ifdef YYSTACKSIZE
700 #undef YYMAXDEPTH
701 #define YYMAXDEPTH YYSTACKSIZE
|
702 mike 1.3 #else
|
703 dj.gorey 1.29 #ifdef YYMAXDEPTH
704 #define YYSTACKSIZE YYMAXDEPTH
|
705 mike 1.3 #else
|
706 dj.gorey 1.29 #define YYSTACKSIZE 10000
707 #define YYMAXDEPTH 10000
|
708 kumpf 1.21 #endif
|
709 mike 1.3 #endif
|
710 dj.gorey 1.29 #define YYINITSTACKSIZE 200
711 int yydebug;
712 int yynerrs;
713 int yyerrflag;
714 int yychar;
715 short *yyssp;
716 YYSTYPE *yyvsp;
717 YYSTYPE yyval;
718 YYSTYPE yylval;
719 short *yyss;
720 short *yysslim;
721 YYSTYPE *yyvs;
722 int yystacksize;
723 /* allocate initial stack or double stack size, up to YYMAXDEPTH */
724 static int yygrowstack()
725 {
726 int newsize, i;
727 short *newss;
728 YYSTYPE *newvs;
729
730 if ((newsize = yystacksize) == 0)
731 dj.gorey 1.29 newsize = YYINITSTACKSIZE;
732 else if (newsize >= YYMAXDEPTH)
733 return -1;
734 else if ((newsize *= 2) > YYMAXDEPTH)
735 newsize = YYMAXDEPTH;
736 i = yyssp - yyss;
737 newss = yyss ? (short *)realloc(yyss, newsize * sizeof *newss) :
738 (short *)malloc(newsize * sizeof *newss);
739 if (newss == NULL)
740 return -1;
741 yyss = newss;
742 yyssp = newss + i;
743 newvs = yyvs ? (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs) :
744 (YYSTYPE *)malloc(newsize * sizeof *newvs);
745 if (newvs == NULL)
746 return -1;
747 yyvs = newvs;
748 yyvsp = newvs + i;
749 yystacksize = newsize;
750 yysslim = yyss + newsize - 1;
751 return 0;
|
752 kumpf 1.21 }
753
|
754 dj.gorey 1.29 #define YYABORT goto yyabort
755 #define YYREJECT goto yyabort
756 #define YYACCEPT goto yyaccept
757 #define YYERROR goto yyerrlab
758
759 #ifndef YYPARSE_PARAM
760 #if defined(__cplusplus) || __STDC__
761 #define YYPARSE_PARAM_ARG void
|
762 mike 1.3 #define YYPARSE_PARAM_DECL
|
763 dj.gorey 1.29 #else /* ! ANSI-C/C++ */
|
764 mike 1.3 #define YYPARSE_PARAM_ARG
765 #define YYPARSE_PARAM_DECL
|
766 dj.gorey 1.29 #endif /* ANSI-C/C++ */
767 #else /* YYPARSE_PARAM */
768 #ifndef YYPARSE_PARAM_TYPE
769 #define YYPARSE_PARAM_TYPE void *
|
770 mike 1.3 #endif
|
771 dj.gorey 1.29 #if defined(__cplusplus) || __STDC__
772 #define YYPARSE_PARAM_ARG YYPARSE_PARAM_TYPE YYPARSE_PARAM
773 #define YYPARSE_PARAM_DECL
774 #else /* ! ANSI-C/C++ */
775 #define YYPARSE_PARAM_ARG YYPARSE_PARAM
776 #define YYPARSE_PARAM_DECL YYPARSE_PARAM_TYPE YYPARSE_PARAM;
777 #endif /* ANSI-C/C++ */
778 #endif /* ! YYPARSE_PARAM */
|
779 mike 1.3
780 int
|
781 dj.gorey 1.29 yyparse (YYPARSE_PARAM_ARG)
782 YYPARSE_PARAM_DECL
|
783 mike 1.3 {
|
784 dj.gorey 1.29 register int yym, yyn, yystate;
785 #if YYDEBUG
786 register const char *yys;
|
787 kumpf 1.21
|
788 dj.gorey 1.29 if ((yys = getenv("YYDEBUG")))
|
789 mike 1.3 {
|
790 dj.gorey 1.29 yyn = *yys;
791 if (yyn >= '0' && yyn <= '9')
792 yydebug = yyn - '0';
|
793 mike 1.3 }
|
794 kumpf 1.21 #endif
795
|
796 dj.gorey 1.29 yynerrs = 0;
797 yyerrflag = 0;
798 yychar = (-1);
799
800 if (yyss == NULL && yygrowstack()) goto yyoverflow;
801 yyssp = yyss;
802 yyvsp = yyvs;
803 *yyssp = yystate = 0;
804
805 yyloop:
806 if ((yyn = yydefred[yystate])) goto yyreduce;
807 if (yychar < 0)
|
808 kumpf 1.21 {
|
809 dj.gorey 1.29 if ((yychar = yylex()) < 0) yychar = 0;
810 #if YYDEBUG
811 if (yydebug)
812 {
813 yys = 0;
814 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
815 if (!yys) yys = "illegal-symbol";
816 printf("%sdebug: state %d, reading %d (%s)\n",
817 YYPREFIX, yystate, yychar, yys);
818 }
|
819 mike 1.3 #endif
|
820 kumpf 1.21 }
|
821 dj.gorey 1.29 if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
822 yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
|
823 mike 1.3 {
|
824 dj.gorey 1.29 #if YYDEBUG
825 if (yydebug)
826 printf("%sdebug: state %d, shifting to state %d\n",
827 YYPREFIX, yystate, yytable[yyn]);
828 #endif
829 if (yyssp >= yysslim && yygrowstack())
830 {
831 goto yyoverflow;
832 }
833 *++yyssp = yystate = yytable[yyn];
834 *++yyvsp = yylval;
835 yychar = (-1);
836 if (yyerrflag > 0) --yyerrflag;
837 goto yyloop;
|
838 mike 1.3 }
|
839 dj.gorey 1.29 if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
840 yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
|
841 mike 1.3 {
|
842 dj.gorey 1.29 yyn = yytable[yyn];
843 goto yyreduce;
844 }
845 if (yyerrflag) goto yyinrecovery;
846 #if defined(lint) || defined(__GNUC__)
847 goto yynewerror;
848 #endif
849 yynewerror:
850 yyerror("syntax error");
851 #if defined(lint) || defined(__GNUC__)
852 goto yyerrlab;
|
853 kumpf 1.21 #endif
|
854 dj.gorey 1.29 yyerrlab:
855 ++yynerrs;
856 yyinrecovery:
857 if (yyerrflag < 3)
858 {
859 yyerrflag = 3;
860 for (;;)
861 {
862 if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 &&
863 yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
864 {
865 #if YYDEBUG
866 if (yydebug)
867 printf("%sdebug: state %d, error recovery shifting\
868 to state %d\n", YYPREFIX, *yyssp, yytable[yyn]);
869 #endif
870 if (yyssp >= yysslim && yygrowstack())
871 {
872 goto yyoverflow;
873 }
874 *++yyssp = yystate = yytable[yyn];
875 dj.gorey 1.29 *++yyvsp = yylval;
876 goto yyloop;
877 }
878 else
879 {
880 #if YYDEBUG
881 if (yydebug)
882 printf("%sdebug: error recovery discarding state %d\n",
883 YYPREFIX, *yyssp);
884 #endif
885 if (yyssp <= yyss) goto yyabort;
886 --yyssp;
887 --yyvsp;
888 }
889 }
|
890 mike 1.3 }
|
891 dj.gorey 1.29 else
|
892 mike 1.3 {
|
893 dj.gorey 1.29 if (yychar == 0) goto yyabort;
894 #if YYDEBUG
895 if (yydebug)
896 {
897 yys = 0;
898 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
899 if (!yys) yys = "illegal-symbol";
900 printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
901 YYPREFIX, yystate, yychar, yys);
902 }
903 #endif
904 yychar = (-1);
905 goto yyloop;
|
906 mike 1.3 }
|
907 kumpf 1.21 yyreduce:
|
908 dj.gorey 1.29 #if YYDEBUG
909 if (yydebug)
910 printf("%sdebug: state %d, reducing by rule %d (%s)\n",
911 YYPREFIX, yystate, yyn, yyrule[yyn]);
912 #endif
913 yym = yylen[yyn];
914 yyval = yyvsp[1-yym];
915 switch (yyn)
|
916 chuck 1.20 {
|
917 mike 1.3 case 4:
|
918 e.boden 1.30 #line 284 "cimmof.y"
|
919 dj.gorey 1.29 { /* FIXME: Where do we put directives? */ }
920 break;
|
921 mike 1.3 case 5:
|
922 e.boden 1.30 #line 286 "cimmof.y"
|
923 dj.gorey 1.29 { cimmofParser::Instance()->addQualifier(yyvsp[0].mofqualifier); delete yyvsp[0].mofqualifier; }
924 break;
|
925 mike 1.3 case 6:
|
926 e.boden 1.30 #line 288 "cimmof.y"
|
927 dj.gorey 1.29 { cimmofParser::Instance()->addClass(yyvsp[0].mofclass); }
928 break;
|
929 mike 1.3 case 7:
|
930 e.boden 1.30 #line 290 "cimmof.y"
|
931 dj.gorey 1.29 { cimmofParser::Instance()->addInstance(yyvsp[0].instance); }
932 break;
|
933 mike 1.3 case 8:
|
934 e.boden 1.30 #line 303 "cimmof.y"
|
935 mike 1.3 {
|
936 karl 1.25 YACCTRACE("classDeclaration");
937 if (g_currentAlias != String::EMPTY)
|
938 mike 1.3 cimmofParser::Instance()->addClassAlias(g_currentAlias, yyval.mofclass, false);
|
939 dj.gorey 1.29 }
940 break;
|
941 mike 1.3 case 9:
|
942 e.boden 1.30 #line 311 "cimmof.y"
|
943 mike 1.3 {
|
944 dj.gorey 1.29 /* create new instance of class with className and superclassName*/
945 /* put returned class object on stack*/
|
946 karl 1.25 YACCTRACE("classHead:");
947 yyval.mofclass = cimmofParser::Instance()->newClassDecl(*yyvsp[-2].cimnameval, *yyvsp[0].cimnameval);
948
|
949 dj.gorey 1.29 /* put list of qualifiers into class*/
|
950 karl 1.25 applyQualifierList(&g_qualifierList, yyval.mofclass);
951
952 g_currentAlias = *yyvsp[-1].strval;
953 if (g_currentClass)
954 delete g_currentClass;
955 g_currentClass = yyval.mofclass;
956 delete yyvsp[-2].cimnameval;
957 delete yyvsp[-1].strval;
958 delete yyvsp[0].cimnameval;
|
959 dj.gorey 1.29 }
960 break;
|
961 mike 1.3 case 10:
|
962 e.boden 1.30 #line 330 "cimmof.y"
963 {}
|
964 dj.gorey 1.29 break;
|
965 mike 1.3 case 11:
|
966 e.boden 1.30 #line 333 "cimmof.y"
|
967 dj.gorey 1.29 { yyval.cimnameval = new CIMName(*yyvsp[0].cimnameval); }
968 break;
|
969 mike 1.3 case 12:
|
970 e.boden 1.30 #line 334 "cimmof.y"
|
971 dj.gorey 1.29 { yyval.cimnameval = new CIMName(); }
972 break;
|
973 mike 1.3 case 17:
|
974 e.boden 1.30 #line 345 "cimmof.y"
|
975 mike 1.3 {
|
976 karl 1.25 YACCTRACE("classFeature:applyProperty");
|
977 dj.gorey 1.29 cimmofParser::Instance()->applyProperty(*g_currentClass, *yyvsp[0].property); delete yyvsp[0].property; }
978 break;
|
979 mike 1.3 case 18:
|
980 e.boden 1.30 #line 348 "cimmof.y"
|
981 mike 1.3 {
|
982 karl 1.25 YACCTRACE("classFeature:applyMethod");
|
983 dj.gorey 1.29 cimmofParser::Instance()->applyMethod(*g_currentClass, *yyvsp[0].method); }
984 break;
|
985 mike 1.3 case 19:
|
986 e.boden 1.30 #line 351 "cimmof.y"
|
987 mike 1.3 {
|
988 karl 1.25 YACCTRACE("classFeature:applyProperty");
|
989 dj.gorey 1.29 cimmofParser::Instance()->applyProperty(*g_currentClass, *yyvsp[0].property); delete yyvsp[0].property; }
990 break;
|
991 mike 1.3 case 20:
|
992 e.boden 1.30 #line 369 "cimmof.y"
|
993 mike 1.3 {
|
994 karl 1.25 YACCTRACE("methodDeclaration");
|
995 mike 1.3 yyval.method = yyvsp[-2].method;
|
996 dj.gorey 1.29 }
997 break;
|
998 mike 1.3 case 21:
|
999 e.boden 1.30 #line 380 "cimmof.y"
|
1000 mike 1.3 {
|
1001 karl 1.25 YACCTRACE("methodHead");
1002 if (g_currentMethod)
|
1003 mike 1.3 delete g_currentMethod;
|
1004 karl 1.25
|
1005 dj.gorey 1.29 /* create new method instance with pointer to method name and datatype*/
|
1006 karl 1.25 g_currentMethod = cimmofParser::Instance()->newMethod(*yyvsp[0].cimnameval, yyvsp[-1].datatype) ;
1007
|
1008 dj.gorey 1.29 /* put new method on stack*/
|
1009 mike 1.3 yyval.method = g_currentMethod;
|
1010 karl 1.25
|
1011 dj.gorey 1.29 /* apply the method qualifier list.*/
|
1012 karl 1.25 applyQualifierList(&g_qualifierList, yyval.method);
1013
|
1014 kumpf 1.16 delete yyvsp[0].cimnameval;
|
1015 dj.gorey 1.29 }
1016 break;
|
1017 mike 1.3 case 24:
|
1018 e.boden 1.30 #line 404 "cimmof.y"
|
1019 dj.gorey 1.29 { yyval.cimnameval = new CIMName(*yyvsp[0].strval); }
1020 break;
|
1021 karl 1.25 case 28:
|
1022 e.boden 1.30 #line 416 "cimmof.y"
|
1023 karl 1.25 {
|
1024 dj.gorey 1.29 /* ATTN: P2 2002 Question Need to create default value including type?*/
|
1025 karl 1.25
1026 YACCTRACE("parameter:");
1027 CIMParameter *p = 0;
1028 cimmofParser *cp = cimmofParser::Instance();
1029
|
1030 dj.gorey 1.29 /* Create new parameter with name, type, isArray, array, referenceClassName*/
|
1031 karl 1.25 if (yyvsp[0].ival == -1) {
1032 p = cp->newParameter(*yyvsp[-1].cimnameval, yyvsp[-2].datatype, false, 0, g_referenceClassName);
1033 } else {
1034 p = cp->newParameter(*yyvsp[-1].cimnameval, yyvsp[-2].datatype, true, yyvsp[0].ival, g_referenceClassName);
1035 }
1036
1037 g_referenceClassName = CIMName();
1038
1039 YACCTRACE("parameter:applyQualifierList");
1040 applyQualifierList(&g_qualifierList, p);
1041
1042 cp->applyParameter(*g_currentMethod, *p);
1043 delete p;
1044 delete yyvsp[-1].cimnameval;
|
1045 dj.gorey 1.29 }
1046 break;
|
1047 karl 1.25 case 29:
|
1048 e.boden 1.30 #line 441 "cimmof.y"
|
1049 dj.gorey 1.29 { yyval.datatype = yyvsp[0].datatype; }
1050 break;
|
1051 karl 1.25 case 30:
|
1052 e.boden 1.30 #line 442 "cimmof.y"
|
1053 dj.gorey 1.29 { yyval.datatype = CIMTYPE_REFERENCE; }
1054 break;
|
1055 karl 1.25 case 31:
|
1056 e.boden 1.30 #line 458 "cimmof.y"
|
1057 mike 1.3 {
|
1058 dj.gorey 1.29 /* set body to stack and apply qualifier list*/
1059 /* ATTN: the apply qualifer only works here because*/
1060 /* there are not lower level qualifiers. We do productions*/
1061 /* that might have lower level qualifiers differently by*/
1062 /* setting up a xxxHead production where qualifiers are */
1063 /* applied.*/
|
1064 karl 1.25 YACCTRACE("propertyDeclaration:");
1065 yyval.property = yyvsp[-1].property;
1066 applyQualifierList(&g_qualifierList, yyval.property);
|
1067 dj.gorey 1.29 }
1068 break;
|
1069 karl 1.25 case 32:
|
1070 e.boden 1.30 #line 472 "cimmof.y"
|
1071 mike 1.3 {
|
1072 kumpf 1.11 CIMValue *v = valueFactory::createValue(yyvsp[-3].datatype, yyvsp[-1].ival,
1073 (yyvsp[0].typedinitializer->type == CIMMOF_NULL_VALUE), yyvsp[0].typedinitializer->value);
|
1074 karl 1.7 if (yyvsp[-1].ival == -1) {
|
1075 kumpf 1.16 yyval.property = cimmofParser::Instance()->newProperty(*yyvsp[-2].cimnameval, *v, false, 0);
|
1076 karl 1.7 } else {
|
1077 kumpf 1.16 yyval.property = cimmofParser::Instance()->newProperty(*yyvsp[-2].cimnameval, *v, true, yyvsp[-1].ival);
|
1078 karl 1.7 }
1079
|
1080 kumpf 1.16 delete yyvsp[-2].cimnameval;
|
1081 kumpf 1.12 delete yyvsp[0].typedinitializer->value;
|
1082 mike 1.3 delete v;
|
1083 dj.gorey 1.29 }
1084 break;
|
1085 karl 1.25 case 34:
|
1086 e.boden 1.30 #line 504 "cimmof.y"
|
1087 mike 1.3 {
1088 String s(*yyvsp[-4].strval);
1089 if (!String::equal(*yyvsp[-1].strval, String::EMPTY))
|
1090 kumpf 1.21 s.append("." + *yyvsp[-1].strval);
|
1091 kumpf 1.15 CIMValue *v = valueFactory::createValue(CIMTYPE_REFERENCE, -1, true, &s);
|
1092 dj.gorey 1.29 /*KS add the isArray and arraysize parameters. 8 mar 2002*/
|
1093 karl 1.7 yyval.property = cimmofParser::Instance()->newProperty(*yyvsp[-2].strval, *v, false,0, *yyvsp[-4].strval);
|
1094 karl 1.25 applyQualifierList(&g_qualifierList, yyval.property);
|
1095 mike 1.3 delete yyvsp[-4].strval;
1096 delete yyvsp[-2].strval;
1097 delete yyvsp[-1].strval;
1098 delete v;
|
1099 dj.gorey 1.29 }
1100 break;
|
1101 karl 1.25 case 35:
|
1102 e.boden 1.30 #line 519 "cimmof.y"
|
1103 dj.gorey 1.29 { yyval.strval = yyvsp[0].strval; }
1104 break;
|
1105 karl 1.25 case 36:
|
1106 e.boden 1.30 #line 522 "cimmof.y"
|
1107 dj.gorey 1.29 { yyval.strval = yyvsp[0].strval; }
1108 break;
|
1109 karl 1.25 case 37:
|
1110 e.boden 1.30 #line 525 "cimmof.y"
|
1111 dj.gorey 1.29 { yyval.strval = yyvsp[0].strval; }
1112 break;
|
1113 karl 1.25 case 38:
|
1114 e.boden 1.30 #line 526 "cimmof.y"
|
1115 dj.gorey 1.29 { yyval.strval = new String(String::EMPTY); }
1116 break;
|
1117 mike 1.3 case 39:
|
1118 e.boden 1.30 #line 529 "cimmof.y"
|
1119 mike 1.3 {
|
1120 dj.gorey 1.29 g_referenceClassName = *yyvsp[-1].cimnameval; }
1121 break;
|
1122 kumpf 1.16 case 40:
|
1123 e.boden 1.30 #line 533 "cimmof.y"
|
1124 dj.gorey 1.29 { yyval.cimnameval = new CIMName(*yyvsp[0].strval); }
1125 break;
|
1126 kumpf 1.16 case 41:
|
1127 e.boden 1.30 #line 536 "cimmof.y"
|
1128 dj.gorey 1.29 { yyval.cimnameval = new CIMName(*yyvsp[0].strval); }
1129 break;
|
1130 mike 1.3 case 42:
|
1131 e.boden 1.30 #line 541 "cimmof.y"
|
1132 mike 1.3 { yyval.ival = valueFactory::Stoi(*yyvsp[-1].strval);
1133 delete yyvsp[-1].strval;
|
1134 dj.gorey 1.29 }
1135 break;
|
1136 mike 1.3 case 43:
|
1137 e.boden 1.30 #line 544 "cimmof.y"
|
1138 dj.gorey 1.29 { yyval.ival = 0; }
1139 break;
|
1140 mike 1.3 case 44:
|
1141 e.boden 1.30 #line 545 "cimmof.y"
|
1142 dj.gorey 1.29 { yyval.ival = -1; }
1143 break;
|
1144 mike 1.3 case 45:
|
1145 e.boden 1.30 #line 548 "cimmof.y"
|
1146 dj.gorey 1.29 { yyval.typedinitializer = yyvsp[0].typedinitializer; }
1147 break;
|
1148 mike 1.3 case 46:
|
1149 e.boden 1.30 #line 549 "cimmof.y"
|
1150 kumpf 1.11 { /* empty */
1151 g_typedInitializerValue.type = CIMMOF_NULL_VALUE;
1152 g_typedInitializerValue.value = new String(String::EMPTY);
1153 yyval.typedinitializer = &g_typedInitializerValue;
|
1154 dj.gorey 1.29 }
1155 break;
|
1156 mike 1.3 case 47:
|
1157 e.boden 1.30 #line 556 "cimmof.y"
|
1158 dj.gorey 1.29 { yyval.strval = yyvsp[0].strval; }
1159 break;
|
1160 mike 1.3 case 48:
|
1161 e.boden 1.30 #line 557 "cimmof.y"
|
1162 dj.gorey 1.29 { yyval.strval = yyvsp[0].strval; }
1163 break;
|
1164 mike 1.3 case 49:
|
1165 e.boden 1.30 #line 558 "cimmof.y"
|
1166 dj.gorey 1.29 { yyval.strval = yyvsp[0].strval; }
1167 break;
|
1168 mike 1.3 case 50:
|
1169 e.boden 1.30 #line 565 "cimmof.y"
|
1170 kumpf 1.10 {
1171 g_typedInitializerValue.type = CIMMOF_CONSTANT_VALUE;
1172 g_typedInitializerValue.value = yyvsp[0].strval;
1173 yyval.typedinitializer = &g_typedInitializerValue;
|
1174 dj.gorey 1.29 }
1175 break;
|
1176 kumpf 1.10 case 51:
|
1177 e.boden 1.30 #line 571 "cimmof.y"
|
1178 kumpf 1.10 {
1179 g_typedInitializerValue.type = CIMMOF_NULL_VALUE;
1180 g_typedInitializerValue.value = new String(String::EMPTY);
1181 yyval.typedinitializer = &g_typedInitializerValue;
|
1182 dj.gorey 1.29 }
1183 break;
|
1184 kumpf 1.10 case 52:
|
1185 e.boden 1.30 #line 577 "cimmof.y"
|
1186 kumpf 1.10 {
1187 g_typedInitializerValue.type = CIMMOF_ARRAY_VALUE;
1188 g_typedInitializerValue.value = yyvsp[0].strval;
1189 yyval.typedinitializer = &g_typedInitializerValue;
|
1190 dj.gorey 1.29 }
1191 break;
|
1192 kumpf 1.10 case 53:
|
1193 e.boden 1.30 #line 583 "cimmof.y"
|
1194 kumpf 1.10 {
1195 g_typedInitializerValue.type = CIMMOF_REFERENCE_VALUE;
1196 g_typedInitializerValue.value = yyvsp[0].strval;
1197 yyval.typedinitializer = &g_typedInitializerValue;
|
1198 dj.gorey 1.29 }
1199 break;
|
1200 kumpf 1.10 case 54:
|
1201 e.boden 1.30 #line 592 "cimmof.y"
|
1202 karl 1.26 {
|
1203 dj.gorey 1.29 *yyval.strval = valueFactory::stringWComma(String(*yyvsp[0].strval)); }
1204 break;
|
1205 kumpf 1.10 case 55:
|
1206 e.boden 1.30 #line 595 "cimmof.y"
|
1207 mike 1.3 {
|
1208 karl 1.26 YACCTRACE("constantValues:1, Value= " << *yyvsp[0].strval);
1209 (*yyval.strval).append(",");
|
1210 dj.gorey 1.29 /*(*$$).append(*$3);*/
|
1211 karl 1.26 (*yyval.strval).append(valueFactory::stringWComma(String(*yyvsp[0].strval)));
1212 delete yyvsp[0].strval;
|
1213 dj.gorey 1.29 }
1214 break;
|
1215 kumpf 1.10 case 56:
|
1216 e.boden 1.30 #line 607 "cimmof.y"
|
1217 dj.gorey 1.29 {yyval.strval = yyvsp[0].strval;}
1218 break;
|
1219 kumpf 1.10 case 57:
|
1220 e.boden 1.30 #line 608 "cimmof.y"
|
1221 dj.gorey 1.29 { yyval.strval = new String(String::EMPTY); }
1222 break;
|
1223 kumpf 1.10 case 58:
|
1224 e.boden 1.30 #line 611 "cimmof.y"
|
1225 dj.gorey 1.29 { yyval.strval = yyvsp[0].strval; }
1226 break;
|
1227 kumpf 1.10 case 59:
|
1228 e.boden 1.30 #line 612 "cimmof.y"
|
1229 dj.gorey 1.29 { yyval.strval = yyvsp[0].strval; }
1230 break;
|
1231 kumpf 1.10 case 60:
|
1232 e.boden 1.30 #line 613 "cimmof.y"
|
1233 dj.gorey 1.29 { yyval.strval = yyvsp[0].strval; }
1234 break;
|
1235 kumpf 1.10 case 61:
|
1236 e.boden 1.30 #line 614 "cimmof.y"
|
1237 dj.gorey 1.29 { }
1238 break;
|
1239 kumpf 1.10 case 62:
|
1240 e.boden 1.30 #line 615 "cimmof.y"
|
1241 dj.gorey 1.29 { yyval.strval = new String(yyvsp[0].ival ? "T" : "F"); }
1242 break;
|
1243 kumpf 1.10 case 65:
|
1244 e.boden 1.30 #line 620 "cimmof.y"
|
1245 mike 1.3 {
1246 yyval.strval = new String(cimmofParser::Instance()->oct_to_dec(*yyvsp[0].strval));
|
1247 dj.gorey 1.29 delete yyvsp[0].strval; }
1248 break;
|
1249 kumpf 1.10 case 66:
|
1250 e.boden 1.30 #line 623 "cimmof.y"
|
1251 mike 1.3 {
1252 yyval.strval = new String(cimmofParser::Instance()->hex_to_dec(*yyvsp[0].strval));
|
1253 dj.gorey 1.29 delete yyvsp[0].strval; }
1254 break;
|
1255 kumpf 1.10 case 67:
|
1256 e.boden 1.30 #line 626 "cimmof.y"
|
1257 mike 1.3 {
1258 yyval.strval = new String(cimmofParser::Instance()->binary_to_dec(*yyvsp[0].strval));
|
1259 dj.gorey 1.29 delete yyvsp[0].strval; }
1260 break;
|
1261 kumpf 1.10 case 68:
|
1262 e.boden 1.30 #line 631 "cimmof.y"
|
1263 dj.gorey 1.29 { yyval.ival = 0; }
1264 break;
|
1265 kumpf 1.10 case 69:
|
1266 e.boden 1.30 #line 632 "cimmof.y"
|
1267 dj.gorey 1.29 { yyval.ival = 1; }
1268 break;
|
1269 kumpf 1.10 case 70:
|
1270 e.boden 1.30 #line 635 "cimmof.y"
|
1271 dj.gorey 1.29 { yyval.strval = yyvsp[0].strval; }
1272 break;
|
1273 kumpf 1.10 case 71:
|
1274 e.boden 1.30 #line 637 "cimmof.y"
|
1275 mike 1.3 {
|
1276 kumpf 1.21 (*yyval.strval).append(*yyvsp[0].strval); delete yyvsp[0].strval;
|
1277 dj.gorey 1.29 }
1278 break;
|
1279 kumpf 1.10 case 72:
|
1280 e.boden 1.30 #line 643 "cimmof.y"
|
1281 mike 1.3 {
|
1282 e.boden 1.30 /*String oldrep = *$1;*/
1283 /*String s(oldrep), s1(String::EMPTY);*/
|
1284 dj.gorey 1.29 /* Handle quoted quote*/
|
1285 e.boden 1.30 /*int len = s.size();*/
1286 /*if (s[len] == '\n') {*/
1287 /*error: new line inside a string constant unless it is quoted*/
1288 /*if (s[len - 2] == '\\') {*/
1289 /*if (len > 3)*/
1290 /*s1 = s.subString(1, len-3);*/
1291 /*} else {*/
1292 /*cimmof_error("New line in string constant");*/
1293 /*}*/
1294 /*cimmofParser::Instance()->increment_lineno();*/
1295 /*} else { // Can only be a quotation mark*/
1296 /*if (s[len - 2] == '\\') { // if it is quoted*/
1297 /*if (len > 3) s1 = s.subString(1, len-3);*/
1298 /*s1.append('\"');*/
1299 /*cimmof_yy_less(len-1);*/
1300 /*} else { // This is the normal case: real quotes on both end*/
1301 /*s1 = s.subString(1, len - 2) ;*/
1302 /*}*/
1303 /*}*/
1304 /*delete $1;*/
1305 yyval.strval = /*new String(s1);*/
1306 e.boden 1.30 new String(*yyvsp[0].strval);
1307 delete yyvsp[0].strval;
|
1308 dj.gorey 1.29 }
1309 break;
|
1310 kumpf 1.10 case 73:
|
1311 e.boden 1.30 #line 675 "cimmof.y"
|
1312 dj.gorey 1.29 { yyval.strval = yyvsp[-1].strval; }
1313 break;
|
1314 kumpf 1.10 case 74:
|
1315 e.boden 1.30 #line 677 "cimmof.y"
|
1316 dj.gorey 1.29 { yyval.strval = new String(String::EMPTY); }
1317 break;
|
1318 kumpf 1.10 case 75:
|
1319 e.boden 1.30 #line 680 "cimmof.y"
|
1320 dj.gorey 1.29 {}
1321 break;
|
1322 kumpf 1.10 case 76:
|
1323 e.boden 1.30 #line 681 "cimmof.y"
|
1324 dj.gorey 1.29 { }
1325 break;
|
1326 kumpf 1.10 case 77:
|
1327 e.boden 1.30 #line 685 "cimmof.y"
|
1328 mike 1.3 {
|
1329 dj.gorey 1.29 /* The objectName string is decomposed for syntactical purposes */
1330 /* and reassembled here for later parsing in creation of an objname instance */
|
1331 mike 1.3 String *s = new String(*yyvsp[-2].strval);
1332 if (!String::equal(*s, String::EMPTY) && yyvsp[-1].modelpath)
|
1333 kumpf 1.21 (*s).append(":");
|
1334 mike 1.3 if (yyvsp[-1].modelpath) {
|
1335 kumpf 1.21 (*s).append(yyvsp[-1].modelpath->Stringrep());
|
1336 mike 1.3 }
1337 yyval.strval = s;
1338 delete yyvsp[-2].strval;
1339 delete yyvsp[-1].modelpath;
|
1340 dj.gorey 1.29 }
1341 break;
|
1342 kumpf 1.10 case 78:
|
1343 e.boden 1.30 #line 700 "cimmof.y"
|
1344 mike 1.3 {
|
1345 e.boden 1.30 /* convert somehow from alias to a CIM object name*/
1346 yyerror("'alias' is not yet supported (see bugzilla 14).");
1347 YYABORT;
1348 delete yyvsp[0].strval;
1349 }
|
1350 dj.gorey 1.29 break;
|
1351 kumpf 1.10 case 79:
|
1352 e.boden 1.30 #line 709 "cimmof.y"
|
1353 dj.gorey 1.29 { }
1354 break;
|
1355 kumpf 1.10 case 80:
|
1356 e.boden 1.30 #line 710 "cimmof.y"
|
1357 dj.gorey 1.29 { yyval.strval = new String(String::EMPTY); }
1358 break;
|
1359 kumpf 1.10 case 81:
|
1360 e.boden 1.30 #line 713 "cimmof.y"
|
1361 dj.gorey 1.29 {}
1362 break;
|
1363 kumpf 1.10 case 82:
|
1364 e.boden 1.30 #line 716 "cimmof.y"
|
1365 mike 1.3 {
|
1366 kumpf 1.23 modelPath *m = new modelPath((*yyvsp[-2].cimnameval).getString(), g_KeyBindingArray);
|
1367 mike 1.3 g_KeyBindingArray.clear();
|
1368 dj.gorey 1.29 delete yyvsp[-2].cimnameval;}
1369 break;
|
1370 kumpf 1.10 case 83:
|
1371 e.boden 1.30 #line 722 "cimmof.y"
|
1372 dj.gorey 1.29 { yyval.ival = 0; }
1373 break;
|
1374 kumpf 1.10 case 84:
|
1375 e.boden 1.30 #line 723 "cimmof.y"
|
1376 dj.gorey 1.29 { yyval.ival = 0; }
1377 break;
|
1378 kumpf 1.10 case 85:
|
1379 e.boden 1.30 #line 727 "cimmof.y"
|
1380 mike 1.3 {
|
1381 kumpf 1.22 CIMKeyBinding *kb = new CIMKeyBinding(*yyvsp[-2].strval, *yyvsp[0].strval,
|
1382 mike 1.3 modelPath::KeyBindingTypeOf(*yyvsp[0].strval));
1383 g_KeyBindingArray.append(*kb);
1384 delete kb;
1385 delete yyvsp[-2].strval;
|
1386 dj.gorey 1.29 delete yyvsp[0].strval; }
1387 break;
|
1388 kumpf 1.10 case 87:
|
1389 e.boden 1.30 #line 739 "cimmof.y"
1390 {
1391 yyerror("'alias' is not yet supported (see bugzilla 14).");
1392 YYABORT;
1393 yyval.strval = yyvsp[0].strval;
1394 }
|
1395 dj.gorey 1.29 break;
|
1396 kumpf 1.10 case 88:
|
1397 e.boden 1.30 #line 744 "cimmof.y"
|
1398 dj.gorey 1.29 { yyval.strval = new String(String::EMPTY); }
1399 break;
|
1400 kumpf 1.10 case 90:
|
1401 e.boden 1.30 #line 763 "cimmof.y"
|
1402 mike 1.3 {
1403 yyval.instance = g_currentInstance;
1404 if (g_currentAlias != String::EMPTY)
1405 cimmofParser::Instance()->addInstanceAlias(g_currentAlias, yyvsp[-1].instance, true);
|
1406 dj.gorey 1.29 }
1407 break;
|
1408 kumpf 1.10 case 91:
|
1409 e.boden 1.30 #line 772 "cimmof.y"
|
1410 mike 1.3 {
1411 if (g_currentInstance)
1412 delete g_currentInstance;
1413 g_currentAlias = *yyvsp[0].strval;
|
1414 kumpf 1.16 g_currentInstance = cimmofParser::Instance()->newInstance(*yyvsp[-1].cimnameval);
|
1415 dj.gorey 1.29 /* apply the qualifierlist to the current instance*/
|
1416 mike 1.3 yyval.instance = g_currentInstance;
|
1417 karl 1.25 applyQualifierList(&g_qualifierList, yyval.instance);
|
1418 kumpf 1.16 delete yyvsp[-1].cimnameval;
|
1419 mike 1.3 delete yyvsp[0].strval;
|
1420 dj.gorey 1.29 }
1421 break;
|
1422 kumpf 1.10 case 95:
|
1423 e.boden 1.30 #line 801 "cimmof.y"
|
1424 mike 1.3 {
1425 cimmofParser *cp = cimmofParser::Instance();
|
1426 dj.gorey 1.29 /* ATTN: P1 InstanceUpdate function 2001 BB Instance update needs work here and CIMOM */
1427 /* a property. It must be fixed in the Common code first.*/
1428 /* What we have to do here is create a CIMProperty and initialize it with*/
1429 /* the value provided. The name of the property is $2 and it belongs*/
1430 /* to the class whose name is in g_currentInstance->getClassName().*/
1431 /* The steps are*/
1432 /* 2. Get property declaration's value object*/
|
1433 mike 1.3 CIMProperty *oldprop = cp->PropertyFromInstance(*g_currentInstance,
|
1434 kumpf 1.10 *yyvsp[-3].strval);
|
1435 mike 1.3 CIMValue *oldv = cp->ValueFromProperty(*oldprop);
|
1436 kumpf 1.10
|
1437 dj.gorey 1.29 /* 3. create the new Value object of the same type*/
|
1438 kumpf 1.10
|
1439 dj.gorey 1.29 /* We want createValue to interpret a value as an array if is enclosed */
1440 /* in {}s (e.g., { 2 } or {2, 3, 5}) or it is NULL and the property is */
1441 /* defined as an array. createValue is responsible for the actual*/
1442 /* validation.*/
|
1443 kumpf 1.10
1444 CIMValue *v = valueFactory::createValue(oldv->getType(),
1445 ((yyvsp[-1].typedinitializer->type == CIMMOF_ARRAY_VALUE) |
1446 ((yyvsp[-1].typedinitializer->type == CIMMOF_NULL_VALUE) & oldprop->isArray()))?0:-1,
1447 (yyvsp[-1].typedinitializer->type == CIMMOF_NULL_VALUE),
1448 yyvsp[-1].typedinitializer->value);
1449
|
1450 e.boden 1.30
|
1451 dj.gorey 1.29 /* 4. create a clone property with the new value*/
|
1452 mike 1.3 CIMProperty *newprop = cp->copyPropertyWithNewValue(*oldprop, *v);
|
1453 karl 1.25
|
1454 dj.gorey 1.29 /* 5. apply the qualifiers; */
|
1455 karl 1.25 applyQualifierList(&g_qualifierList, newprop);
1456
|
1457 dj.gorey 1.29 /* 6. and apply the CIMProperty to g_currentInstance.*/
|
1458 mike 1.3 cp->applyProperty(*g_currentInstance, *newprop);
|
1459 kumpf 1.10 delete yyvsp[-3].strval;
1460 delete yyvsp[-1].typedinitializer->value;
|
1461 mike 1.3 delete oldprop;
1462 delete oldv;
1463 delete v;
1464 delete newprop;
|
1465 dj.gorey 1.29 }
1466 break;
|
1467 kumpf 1.10 case 96:
|
1468 e.boden 1.30 #line 857 "cimmof.y"
|
1469 mike 1.3 {
|
1470 dj.gorey 1.29 /*printf("compilerDirectiveInclude "); */
1471 }
1472 break;
|
1473 kumpf 1.10 case 97:
|
1474 e.boden 1.30 #line 861 "cimmof.y"
|
1475 mike 1.3 {
|
1476 dj.gorey 1.29 /*printf("compilerDirectivePragma ");*/
1477 }
1478 break;
|
1479 kumpf 1.10 case 98:
|
1480 e.boden 1.30 #line 868 "cimmof.y"
|
1481 mike 1.3 {
1482 cimmofParser::Instance()->enterInlineInclude(*yyvsp[-1].strval); delete yyvsp[-1].strval;
|
1483 dj.gorey 1.29 }
1484 break;
|
1485 kumpf 1.10 case 99:
|
1486 e.boden 1.30 #line 873 "cimmof.y"
|
1487 dj.gorey 1.29 { yyval.strval = yyvsp[0].strval; }
1488 break;
|
1489 kumpf 1.10 case 100:
|
1490 e.boden 1.30 #line 878 "cimmof.y"
|
1491 mike 1.3 { cimmofParser::Instance()->processPragma(*yyvsp[-3].strval, *yyvsp[-1].strval);
1492 delete yyvsp[-3].strval;
1493 delete yyvsp[-1].strval;
|
1494 dj.gorey 1.29 }
1495 break;
|
1496 kumpf 1.10 case 101:
|
1497 e.boden 1.30 #line 896 "cimmof.y"
|
1498 mike 1.3 {
|
1499 dj.gorey 1.29 /* CIMQualifierDecl *qd = new CIMQualifierDecl($2, $3, $4, $5);*/
|
1500 kumpf 1.18 yyval.mofqualifier = cimmofParser::Instance()->newQualifierDecl(*yyvsp[-4].strval, yyvsp[-3].value, *yyvsp[-2].scope, *yyvsp[-1].flavor);
|
1501 mike 1.3 delete yyvsp[-4].strval;
|
1502 dj.gorey 1.29 delete yyvsp[-3].value; /* CIMValue object created in qualifierValue production*/
1503 }
1504 break;
|
1505 kumpf 1.10 case 102:
|
1506 e.boden 1.30 #line 905 "cimmof.y"
|
1507 mike 1.3 {
|
1508 kumpf 1.11 yyval.value = valueFactory::createValue(yyvsp[-2].datatype, yyvsp[-1].ival,
1509 yyvsp[0].typedinitializer->type == CIMMOF_NULL_VALUE, yyvsp[0].typedinitializer->value);
1510 delete yyvsp[0].typedinitializer->value;
|
1511 dj.gorey 1.29 }
1512 break;
|
1513 kumpf 1.10 case 103:
|
1514 e.boden 1.30 #line 912 "cimmof.y"
|
1515 dj.gorey 1.29 { yyval.scope = yyvsp[-1].scope; }
1516 break;
|
1517 kumpf 1.10 case 104:
|
1518 e.boden 1.30 #line 915 "cimmof.y"
|
1519 kumpf 1.18 {
|
1520 dj.gorey 1.29 g_scope = CIMScope (CIMScope::NONE); }
1521 break;
|
1522 kumpf 1.10 case 105:
|
1523 e.boden 1.30 #line 919 "cimmof.y"
|
1524 dj.gorey 1.29 { yyval.scope = yyvsp[0].scope; }
1525 break;
|
1526 kumpf 1.10 case 106:
|
1527 e.boden 1.30 #line 921 "cimmof.y"
|
1528 dj.gorey 1.29 { yyval.scope->addScope(*yyvsp[0].scope); }
1529 break;
|
1530 kumpf 1.10 case 107:
|
1531 e.boden 1.30 #line 925 "cimmof.y"
|
1532 dj.gorey 1.29 { yyval.scope = new CIMScope(CIMScope::CLASS); }
1533 break;
|
1534 kumpf 1.10 case 108:
|
1535 e.boden 1.30 #line 927 "cimmof.y"
|
1536 dj.gorey 1.29 { yyval.scope = new CIMScope(CIMScope::CLASS); }
1537 break;
|
1538 kumpf 1.10 case 109:
|
1539 e.boden 1.30 #line 928 "cimmof.y"
|
1540 dj.gorey 1.29 { yyval.scope = new CIMScope(CIMScope::ASSOCIATION); }
1541 break;
|
1542 kumpf 1.10 case 110:
|
1543 e.boden 1.30 #line 929 "cimmof.y"
|
1544 dj.gorey 1.29 { yyval.scope = new CIMScope(CIMScope::INDICATION); }
1545 break;
|
1546 kumpf 1.10 case 111:
|
1547 e.boden 1.30 #line 931 "cimmof.y"
|
1548 dj.gorey 1.29 { yyval.scope = new CIMScope(CIMScope::PROPERTY); }
1549 break;
|
1550 kumpf 1.10 case 112:
|
1551 e.boden 1.30 #line 932 "cimmof.y"
|
1552 dj.gorey 1.29 { yyval.scope = new CIMScope(CIMScope::REFERENCE); }
1553 break;
|
1554 kumpf 1.10 case 113:
|
1555 e.boden 1.30 #line 933 "cimmof.y"
|
1556 dj.gorey 1.29 { yyval.scope = new CIMScope(CIMScope::METHOD); }
1557 break;
|
1558 kumpf 1.10 case 114:
|
1559 e.boden 1.30 #line 934 "cimmof.y"
|
1560 dj.gorey 1.29 { yyval.scope = new CIMScope(CIMScope::PARAMETER); }
1561 break;
|
1562 kumpf 1.10 case 115:
|
1563 e.boden 1.30 #line 935 "cimmof.y"
|
1564 dj.gorey 1.29 { yyval.scope = new CIMScope(CIMScope::ANY); }
1565 break;
|
1566 kumpf 1.10 case 116:
|
1567 e.boden 1.30 #line 940 "cimmof.y"
|
1568 dj.gorey 1.29 { yyval.flavor = &g_flavor; }
1569 break;
|
1570 kumpf 1.10 case 117:
|
1571 e.boden 1.30 #line 941 "cimmof.y"
|
1572 dj.gorey 1.29 { yyval.flavor = new CIMFlavor (CIMFlavor::NONE); }
1573 break;
|
1574 kumpf 1.10 case 118:
|
1575 e.boden 1.30 #line 947 "cimmof.y"
|
1576 dj.gorey 1.29 {g_flavor = CIMFlavor (CIMFlavor::NONE);}
1577 break;
|
1578 kumpf 1.10 case 121:
|
1579 e.boden 1.30 #line 964 "cimmof.y"
|
1580 dj.gorey 1.29 { g_flavor.addFlavor (CIMFlavor::ENABLEOVERRIDE); }
1581 break;
|
1582 kumpf 1.10 case 122:
|
1583 e.boden 1.30 #line 965 "cimmof.y"
|
1584 dj.gorey 1.29 { g_flavor.addFlavor (CIMFlavor::DISABLEOVERRIDE); }
1585 break;
|
1586 kumpf 1.10 case 123:
|
1587 e.boden 1.30 #line 966 "cimmof.y"
|
1588 dj.gorey 1.29 { g_flavor.addFlavor (CIMFlavor::RESTRICTED); }
1589 break;
|
1590 kumpf 1.10 case 124:
|
1591 e.boden 1.30 #line 967 "cimmof.y"
|
1592 dj.gorey 1.29 { g_flavor.addFlavor (CIMFlavor::TOSUBELEMENTS); }
1593 break;
|
1594 kumpf 1.10 case 125:
|
1595 e.boden 1.30 #line 968 "cimmof.y"
|
1596 dj.gorey 1.29 { g_flavor.addFlavor (CIMFlavor::TRANSLATABLE); }
1597 break;
|
1598 kumpf 1.10 case 126:
|
1599 e.boden 1.30 #line 971 "cimmof.y"
|
1600 dj.gorey 1.29 { yyval.flavor = &g_flavor; }
1601 break;
|
1602 kumpf 1.10 case 127:
|
1603 e.boden 1.30 #line 972 "cimmof.y"
|
1604 dj.gorey 1.29 { yyval.flavor = new CIMFlavor (CIMFlavor::NONE); }
1605 break;
|
1606 kumpf 1.10 case 130:
|
1607 e.boden 1.30 #line 980 "cimmof.y"
|
1608 dj.gorey 1.29 { yyval.datatype = yyvsp[0].datatype; }
1609 break;
|
1610 kumpf 1.10 case 131:
|
1611 e.boden 1.30 #line 981 "cimmof.y"
|
1612 dj.gorey 1.29 { yyval.datatype = yyvsp[0].datatype; }
1613 break;
|
1614 kumpf 1.10 case 132:
|
1615 e.boden 1.30 #line 982 "cimmof.y"
|
1616 dj.gorey 1.29 { yyval.datatype = CIMTYPE_STRING; }
1617 break;
|
1618 kumpf 1.10 case 133:
|
1619 e.boden 1.30 #line 983 "cimmof.y"
|
1620 dj.gorey 1.29 { yyval.datatype = CIMTYPE_BOOLEAN; }
1621 break;
|
1622 kumpf 1.10 case 134:
|
1623 e.boden 1.30 #line 984 "cimmof.y"
|
1624 dj.gorey 1.29 { yyval.datatype = CIMTYPE_DATETIME; }
1625 break;
|
1626 kumpf 1.10 case 135:
|
1627 e.boden 1.30 #line 987 "cimmof.y"
|
1628 dj.gorey 1.29 { yyval.datatype = CIMTYPE_UINT8; }
1629 break;
|
1630 kumpf 1.10 case 136:
|
1631 e.boden 1.30 #line 988 "cimmof.y"
|
1632 dj.gorey 1.29 { yyval.datatype = CIMTYPE_SINT8; }
1633 break;
|
1634 kumpf 1.10 case 137:
|
1635 e.boden 1.30 #line 989 "cimmof.y"
|
1636 dj.gorey 1.29 { yyval.datatype = CIMTYPE_UINT16; }
1637 break;
|
1638 kumpf 1.10 case 138:
|
1639 e.boden 1.30 #line 990 "cimmof.y"
|
1640 dj.gorey 1.29 { yyval.datatype = CIMTYPE_SINT16; }
1641 break;
|
1642 kumpf 1.10 case 139:
|
1643 e.boden 1.30 #line 991 "cimmof.y"
|
1644 dj.gorey 1.29 { yyval.datatype = CIMTYPE_UINT32; }
1645 break;
|
1646 kumpf 1.10 case 140:
|
1647 e.boden 1.30 #line 992 "cimmof.y"
|
1648 dj.gorey 1.29 { yyval.datatype = CIMTYPE_SINT32; }
1649 break;
|
1650 kumpf 1.10 case 141:
|
1651 e.boden 1.30 #line 993 "cimmof.y"
|
1652 dj.gorey 1.29 { yyval.datatype = CIMTYPE_UINT64; }
1653 break;
|
1654 kumpf 1.10 case 142:
|
1655 e.boden 1.30 #line 994 "cimmof.y"
|
1656 dj.gorey 1.29 { yyval.datatype = CIMTYPE_SINT64; }
1657 break;
|
1658 kumpf 1.10 case 143:
|
1659 e.boden 1.30 #line 995 "cimmof.y"
|
1660 dj.gorey 1.29 { yyval.datatype = CIMTYPE_CHAR16; }
1661 break;
|
1662 kumpf 1.10 case 144:
|
1663 e.boden 1.30 #line 998 "cimmof.y"
|
1664 dj.gorey 1.29 { yyval.datatype =CIMTYPE_REAL32; }
1665 break;
|
1666 kumpf 1.10 case 145:
|
1667 e.boden 1.30 #line 999 "cimmof.y"
|
1668 dj.gorey 1.29 { yyval.datatype =CIMTYPE_REAL64; }
1669 break;
|
1670 kumpf 1.10 case 147:
|
1671 e.boden 1.30 #line 1012 "cimmof.y"
1672 {
1673 /*yydebug = 1; stderr = stdout;*/
1674 }
|
1675 dj.gorey 1.29 break;
|
1676 kumpf 1.10 case 148:
|
1677 e.boden 1.30 #line 1018 "cimmof.y"
|
1678 karl 1.25 {
|
1679 e.boden 1.30
1680 /*yydebug = 1; stderr = stdout;*/
|
1681 karl 1.25 YACCTRACE("qualifierListbegin");
|
1682 dj.gorey 1.29 g_qualifierList.init(); }
1683 break;
|
1684 kumpf 1.10 case 149:
|
1685 e.boden 1.30 #line 1026 "cimmof.y"
|
1686 dj.gorey 1.29 { }
1687 break;
|
1688 kumpf 1.10 case 150:
|
1689 e.boden 1.30 #line 1027 "cimmof.y"
|
1690 dj.gorey 1.29 { }
1691 break;
|
1692 kumpf 1.10 case 151:
|
1693 e.boden 1.30 #line 1032 "cimmof.y"
|
1694 mike 1.3 {
1695 cimmofParser *p = cimmofParser::Instance();
|
1696 dj.gorey 1.29 /* The qualifier value can't be set until we know the contents of the*/
1697 /* QualifierDeclaration. That's what QualifierValue() does.*/
|
1698 kumpf 1.13 CIMValue *v = p->QualifierValue(*yyvsp[-2].strval,
1699 (yyvsp[-1].typedinitializer->type == CIMMOF_NULL_VALUE), *yyvsp[-1].typedinitializer->value);
|
1700 mike 1.3 yyval.qualifier = p->newQualifier(*yyvsp[-2].strval, *v, g_flavor);
1701 g_qualifierList.add(yyval.qualifier);
1702 delete yyvsp[-2].strval;
|
1703 kumpf 1.13 delete yyvsp[-1].typedinitializer->value;
|
1704 mike 1.3 delete v;
|
1705 dj.gorey 1.29 }
1706 break;
|
1707 kumpf 1.10 case 152:
|
1708 e.boden 1.30 #line 1047 "cimmof.y"
|
1709 kumpf 1.18 {
|
1710 dj.gorey 1.29 g_flavor = CIMFlavor (CIMFlavor::NONE); }
1711 break;
|
1712 kumpf 1.10 case 153:
|
1713 e.boden 1.30 #line 1049 "cimmof.y"
|
1714 mike 1.3 {
|
1715 kumpf 1.19 yyval.strval = new String((*yyvsp[0].scope).toString ());
|
1716 dj.gorey 1.29 g_flavor = CIMFlavor (CIMFlavor::NONE); }
1717 break;
|
1718 kumpf 1.10 case 154:
|
1719 e.boden 1.30 #line 1056 "cimmof.y"
|
1720 kumpf 1.13 {
1721 g_typedInitializerValue.type = CIMMOF_CONSTANT_VALUE;
1722 g_typedInitializerValue.value = yyvsp[-1].strval;
1723 yyval.typedinitializer = &g_typedInitializerValue;
|
1724 dj.gorey 1.29 }
1725 break;
|
1726 kumpf 1.10 case 155:
|
1727 e.boden 1.30 #line 1062 "cimmof.y"
|
1728 kumpf 1.13 {
1729 g_typedInitializerValue.type = CIMMOF_NULL_VALUE;
1730 g_typedInitializerValue.value = new String(String::EMPTY);
1731 yyval.typedinitializer = &g_typedInitializerValue;
|
1732 dj.gorey 1.29 }
1733 break;
|
1734 kumpf 1.10 case 156:
|
1735 e.boden 1.30 #line 1068 "cimmof.y"
|
1736 kumpf 1.13 {
1737 g_typedInitializerValue.type = CIMMOF_ARRAY_VALUE;
1738 g_typedInitializerValue.value = yyvsp[0].strval;
1739 yyval.typedinitializer = &g_typedInitializerValue;
|
1740 dj.gorey 1.29 }
1741 break;
|
1742 kumpf 1.10 case 157:
|
1743 e.boden 1.30 #line 1073 "cimmof.y"
|
1744 kumpf 1.13 { /* empty */
1745 g_typedInitializerValue.type = CIMMOF_NULL_VALUE;
1746 g_typedInitializerValue.value = new String(String::EMPTY);
1747 yyval.typedinitializer = &g_typedInitializerValue;
|
1748 dj.gorey 1.29 }
1749 break;
|
1750 kumpf 1.13 case 158:
|
1751 e.boden 1.30 #line 1080 "cimmof.y"
|
1752 dj.gorey 1.29 { yyval.strval = yyvsp[0].strval; }
1753 break;
|
1754 kumpf 1.13 case 159:
|
1755 e.boden 1.30 #line 1083 "cimmof.y"
|
1756 dj.gorey 1.29 { yyval.strval = yyvsp[0].strval; }
1757 break;
|
1758 e.boden 1.30 #line 1733 "y.tab.c"
|
1759 mike 1.3 }
|
1760 dj.gorey 1.29 yyssp -= yym;
1761 yystate = *yyssp;
1762 yyvsp -= yym;
1763 yym = yylhs[yyn];
1764 if (yystate == 0 && yym == 0)
|
1765 mike 1.3 {
|
1766 dj.gorey 1.29 #if YYDEBUG
1767 if (yydebug)
1768 printf("%sdebug: after reduction, shifting from state 0 to\
1769 state %d\n", YYPREFIX, YYFINAL);
1770 #endif
1771 yystate = YYFINAL;
1772 *++yyssp = YYFINAL;
1773 *++yyvsp = yyval;
1774 if (yychar < 0)
1775 {
1776 if ((yychar = yylex()) < 0) yychar = 0;
1777 #if YYDEBUG
1778 if (yydebug)
1779 {
1780 yys = 0;
1781 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
1782 if (!yys) yys = "illegal-symbol";
1783 printf("%sdebug: state %d, reading %d (%s)\n",
1784 YYPREFIX, YYFINAL, yychar, yys);
1785 }
1786 #endif
1787 dj.gorey 1.29 }
1788 if (yychar == 0) goto yyaccept;
1789 goto yyloop;
|
1790 mike 1.3 }
|
1791 dj.gorey 1.29 if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
1792 yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
1793 yystate = yytable[yyn];
1794 else
1795 yystate = yydgoto[yym];
1796 #if YYDEBUG
1797 if (yydebug)
1798 printf("%sdebug: after reduction, shifting from state %d \
1799 to state %d\n", YYPREFIX, *yyssp, yystate);
|
1800 mike 1.3 #endif
|
1801 dj.gorey 1.29 if (yyssp >= yysslim && yygrowstack())
|
1802 kumpf 1.21 {
|
1803 dj.gorey 1.29 goto yyoverflow;
|
1804 kumpf 1.21 }
|
1805 dj.gorey 1.29 *++yyssp = yystate;
1806 *++yyvsp = yyval;
1807 goto yyloop;
1808 yyoverflow:
1809 yyerror("yacc stack overflow");
1810 yyabort:
1811 return (1);
1812 yyaccept:
1813 return (0);
|
1814 mike 1.3 }
|