1 karl 1.51 /* To be inserted in other files to bypass the chksrc tests */
2 /* NOCHKSRC */
3
|
4 karl 1.41 /* A Bison parser, made by GNU Bison 2.3. */
|
5 kumpf 1.34
|
6 karl 1.41 /* Skeleton implementation for Bison's Yacc-like parsers in C
7
8 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
9 Free Software Foundation, Inc.
|
10 kumpf 1.34
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2, or (at your option)
14 any later version.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
|
23 karl 1.41 Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 Boston, MA 02110-1301, USA. */
25
26 /* As a special exception, you may create a larger work that contains
27 part or all of the Bison parser skeleton and distribute that work
28 under terms of your choice, so long as that work isn't itself a
29 parser generator using the skeleton or a modified version thereof
30 as a parser skeleton. Alternatively, if you modify or redistribute
31 the parser skeleton itself, you may (at your option) remove this
32 special exception, which will cause the skeleton and the resulting
33 Bison output files to be licensed under the GNU General Public
34 License without this special exception.
|
35 kumpf 1.34
|
36 karl 1.41 This special exception was added by the Free Software Foundation in
37 version 2.2 of Bison. */
|
38 kumpf 1.34
|
39 karl 1.41 /* C LALR(1) parser skeleton written by Richard Stallman, by
40 simplifying the original so-called "semantic" parser. */
|
41 kumpf 1.34
42 /* All symbols defined below should begin with yy or YY, to avoid
43 infringing on user name space. This should be done even for local
44 variables, as they might otherwise be expanded by user macros.
45 There are some unavoidable exceptions within include files to
46 define necessary library symbols; they are noted "INFRINGES ON
47 USER NAME SPACE" below. */
|
48 kumpf 1.43
|
49 kumpf 1.34 /* Identify Bison output. */
50 #define YYBISON 1
51
|
52 karl 1.41 /* Bison version. */
53 #define YYBISON_VERSION "2.3"
54
|
55 kumpf 1.34 /* Skeleton name. */
56 #define YYSKELETON_NAME "yacc.c"
57
58 /* Pure parsers. */
59 #define YYPURE 0
60
61 /* Using locations. */
62 #define YYLSP_NEEDED 0
63
|
64 karl 1.41 /* Substitute the variable and function names. */
|
65 mike 1.3 #define yyparse cimmof_parse
|
66 kumpf 1.34 #define yylex cimmof_lex
|
67 mike 1.3 #define yyerror cimmof_error
|
68 kumpf 1.34 #define yylval cimmof_lval
69 #define yychar cimmof_char
|
70 mike 1.3 #define yydebug cimmof_debug
71 #define yynerrs cimmof_nerrs
|
72 kumpf 1.34
73
74 /* Tokens. */
75 #ifndef YYTOKENTYPE
76 # define YYTOKENTYPE
77 /* Put the tokens into the symbol table, so that GDB and other debuggers
78 know about them. */
79 enum yytokentype {
80 TOK_ALIAS_IDENTIFIER = 258,
81 TOK_ANY = 259,
82 TOK_AS = 260,
83 TOK_ASSOCIATION = 261,
84 TOK_BINARY_VALUE = 262,
85 TOK_CHAR_VALUE = 263,
86 TOK_CLASS = 264,
87 TOK_COLON = 265,
88 TOK_COMMA = 266,
89 TOK_DISABLEOVERRIDE = 267,
90 TOK_DQUOTE = 268,
91 TOK_DT_BOOL = 269,
92 TOK_DT_CHAR16 = 270,
93 kumpf 1.34 TOK_DT_CHAR8 = 271,
94 TOK_DT_DATETIME = 272,
95 TOK_DT_REAL32 = 273,
96 TOK_DT_REAL64 = 274,
97 TOK_DT_SINT16 = 275,
98 TOK_DT_SINT32 = 276,
99 TOK_DT_SINT64 = 277,
100 TOK_DT_SINT8 = 278,
101 TOK_DT_STR = 279,
102 TOK_DT_UINT16 = 280,
103 TOK_DT_UINT32 = 281,
104 TOK_DT_UINT64 = 282,
105 TOK_DT_UINT8 = 283,
106 TOK_ENABLEOVERRIDE = 284,
107 TOK_END_OF_FILE = 285,
108 TOK_EQUAL = 286,
109 TOK_FALSE = 287,
110 TOK_FLAVOR = 288,
111 TOK_HEX_VALUE = 289,
112 TOK_INCLUDE = 290,
113 TOK_INDICATION = 291,
114 kumpf 1.34 TOK_INSTANCE = 292,
115 TOK_LEFTCURLYBRACE = 293,
116 TOK_LEFTPAREN = 294,
117 TOK_LEFTSQUAREBRACKET = 295,
118 TOK_METHOD = 296,
119 TOK_NULL_VALUE = 297,
120 TOK_OCTAL_VALUE = 298,
121 TOK_OF = 299,
122 TOK_PARAMETER = 300,
123 TOK_PERIOD = 301,
124 TOK_POSITIVE_DECIMAL_VALUE = 302,
125 TOK_PRAGMA = 303,
126 TOK_PROPERTY = 304,
127 TOK_QUALIFIER = 305,
128 TOK_REAL_VALUE = 306,
129 TOK_REF = 307,
130 TOK_REFERENCE = 308,
131 TOK_RESTRICTED = 309,
132 TOK_RIGHTCURLYBRACE = 310,
133 TOK_RIGHTPAREN = 311,
134 TOK_RIGHTSQUAREBRACKET = 312,
135 kumpf 1.34 TOK_SCHEMA = 313,
136 TOK_SCOPE = 314,
137 TOK_SEMICOLON = 315,
138 TOK_SIGNED_DECIMAL_VALUE = 316,
139 TOK_SIMPLE_IDENTIFIER = 317,
140 TOK_STRING_VALUE = 318,
141 TOK_TOSUBCLASS = 319,
142 TOK_TRANSLATABLE = 320,
143 TOK_TRUE = 321,
144 TOK_UNEXPECTED_CHAR = 322
145 };
146 #endif
|
147 karl 1.41 /* Tokens. */
|
148 kumpf 1.34 #define TOK_ALIAS_IDENTIFIER 258
149 #define TOK_ANY 259
150 #define TOK_AS 260
151 #define TOK_ASSOCIATION 261
152 #define TOK_BINARY_VALUE 262
153 #define TOK_CHAR_VALUE 263
154 #define TOK_CLASS 264
155 #define TOK_COLON 265
156 #define TOK_COMMA 266
157 #define TOK_DISABLEOVERRIDE 267
158 #define TOK_DQUOTE 268
159 #define TOK_DT_BOOL 269
160 #define TOK_DT_CHAR16 270
161 #define TOK_DT_CHAR8 271
162 #define TOK_DT_DATETIME 272
163 #define TOK_DT_REAL32 273
164 #define TOK_DT_REAL64 274
165 #define TOK_DT_SINT16 275
166 #define TOK_DT_SINT32 276
167 #define TOK_DT_SINT64 277
168 #define TOK_DT_SINT8 278
169 kumpf 1.34 #define TOK_DT_STR 279
170 #define TOK_DT_UINT16 280
171 #define TOK_DT_UINT32 281
172 #define TOK_DT_UINT64 282
173 #define TOK_DT_UINT8 283
174 #define TOK_ENABLEOVERRIDE 284
175 #define TOK_END_OF_FILE 285
176 #define TOK_EQUAL 286
177 #define TOK_FALSE 287
178 #define TOK_FLAVOR 288
179 #define TOK_HEX_VALUE 289
180 #define TOK_INCLUDE 290
181 #define TOK_INDICATION 291
182 #define TOK_INSTANCE 292
183 #define TOK_LEFTCURLYBRACE 293
184 #define TOK_LEFTPAREN 294
185 #define TOK_LEFTSQUAREBRACKET 295
186 #define TOK_METHOD 296
187 #define TOK_NULL_VALUE 297
188 #define TOK_OCTAL_VALUE 298
189 #define TOK_OF 299
190 kumpf 1.34 #define TOK_PARAMETER 300
191 #define TOK_PERIOD 301
192 #define TOK_POSITIVE_DECIMAL_VALUE 302
193 #define TOK_PRAGMA 303
194 #define TOK_PROPERTY 304
195 #define TOK_QUALIFIER 305
196 #define TOK_REAL_VALUE 306
197 #define TOK_REF 307
198 #define TOK_REFERENCE 308
199 #define TOK_RESTRICTED 309
200 #define TOK_RIGHTCURLYBRACE 310
201 #define TOK_RIGHTPAREN 311
202 #define TOK_RIGHTSQUAREBRACKET 312
203 #define TOK_SCHEMA 313
204 #define TOK_SCOPE 314
205 #define TOK_SEMICOLON 315
206 #define TOK_SIGNED_DECIMAL_VALUE 316
207 #define TOK_SIMPLE_IDENTIFIER 317
208 #define TOK_STRING_VALUE 318
209 #define TOK_TOSUBCLASS 319
210 #define TOK_TRANSLATABLE 320
211 kumpf 1.34 #define TOK_TRUE 321
212 #define TOK_UNEXPECTED_CHAR 322
213
214
215
216
217 /* Copy the first part of user declarations. */
|
218 karl 1.51 #line 29 "cimmof.y"
|
219 kumpf 1.34
|
220 mike 1.3 /* Flex grammar created from CIM Specification Version 2.2 Appendix A */
221
222 /*
223 Note the following implementation details:
224
225 1. The MOF specification has a production of type assocDeclaration,
226 but an association is just a type of classDeclaration with a few
227 special rules. At least for the first pass, I'm treating an
228 associationDeclaration as a classDeclaration and applying its
229 syntactical rules outside of the grammar definition.
230
231 2. Same with the indicationDeclaration. It appears to be a normal
232 classDeclaration with the INDICATION qualifier and no special
233 syntactical rules.
234
235 3. The Parser uses String objects throughout to represent
236 character data. However, the tokenizer underneath is probably
237 working with 8-bit chars. If we later use an extended character
238 compatible tokenizer, I anticipate NO CHANGE to this parser.
239
240 4. Besides the tokenizer, this parser uses 2 sets of outside
241 mike 1.3 services:
242 1)Class valueFactory. This has a couple of static methods
|
243 karl 1.41 that assist in creating CIMValue objects from Strings.
244 2)Class cimmofParser. This has a wide variety of methods
245 that fall into these catagories:
|
246 mike 1.3 a) Interfaces to the Repository. You call cimmofParser::
247 methods to query and store compiled CIM elements.
|
248 karl 1.41 b) Error handling.
|
249 mike 1.3 c) Data format conversions.
250 d) Tokenizer manipulation
251 e) Pragma handling
252 f) Alias Handling
253 */
254
|
255 e.boden 1.30
|
256 mike 1.3 #define YYSTACKSIZE 2000
257
258 #include <cstdlib>
|
259 r.kieninger 1.50 #if !defined(PEGASUS_OS_ZOS) && !defined(PEGASUS_OS_VMS)
|
260 mike 1.39 #if defined(PEGASUS_OS_DARWIN)
|
261 dudhe.girish 1.28 #include <sys/malloc.h>
262 #else
|
263 mike 1.3 #include <malloc.h>
|
264 dudhe.girish 1.28 #endif
|
265 karl 1.8 #endif
|
266 mike 1.3 #include <cstdio>
267 #include <cstring>
268 #include <Pegasus/Common/String.h>
|
269 kumpf 1.16 #include <Pegasus/Common/CIMName.h>
|
270 kumpf 1.43 #include <Pegasus/Common/StringConversion.h>
|
271 mike 1.3 #include "cimmofParser.h"
272 #include "valueFactory.h"
273 #include "memobjs.h"
|
274 kumpf 1.46 #include <Pegasus/Common/CIMQualifierList.h>
|
275 kumpf 1.48 #include <Pegasus/Common/AutoPtr.h>
|
276 mike 1.3
|
277 kumpf 1.34 //include any useful debugging stuff here
|
278 e.boden 1.30
|
279 karl 1.25 /* Debugging the parser. Debugging is provided through
280 1. debug functions in Bison that are controlled by a compile time
281 flag (YYDEBUG) and a runtime flag (yydebug) which is redefined
282 to cimmof_debug.
283 2. Debug functions defined through YACCTRACE, a macro defined
284 in cimmofparser.h and turned on and off manually.
285 All debugging must be turned on manually at this point by
286 setting the YYDEBUG compile flag and also setting YACCTRACE.
287 ATTN: TODO: automate the debug information flags.
288 */
|
289 kumpf 1.34 // Enable this define to compie Bison/Yacc tracing
290 // ATTN: p3 03092003 ks Enabling this flag currently causes a compile error
|
291 karl 1.25
|
292 e.boden 1.30 #define YYDEBUG 1
|
293 kumpf 1.34 //static int cimmof_debug;
|
294 karl 1.25
|
295 kumpf 1.34 //extern cimmofParser g_cimmofParser;
|
296 mike 1.3
|
297 e.boden 1.30 extern int cimmof_lex(void);
298 extern int cimmof_error(...);
|
299 mike 1.3 extern char *cimmof_text;
|
300 e.boden 1.30 extern void cimmof_yy_less(int n);
301 extern int cimmof_leng;
302
|
303 mike 1.3
304 /* ------------------------------------------------------------------- */
305 /* These globals provide continuity between various pieces of a */
306 /* declaration. They are usually interpreted as "these modifiers were */
307 /* encountered and need to be applied to the finished object". For */
308 /* example, qualifiers are accumulated in g_qualifierList[] as they */
309 /* encountered, then applied to the production they qualify when it */
310 /* is completed. */
311 /* ------------------------------------------------------------------- */
|
312 kumpf 1.18 CIMFlavor g_flavor = CIMFlavor (CIMFlavor::NONE);
313 CIMScope g_scope = CIMScope ();
|
314 kumpf 1.34 //ATTN: BB 2001 BB P1 - Fixed size qualifier list max 20. Make larger or var
|
315 kumpf 1.46 CIMQualifierList g_qualifierList;
|
316 mike 1.3 CIMMethod *g_currentMethod = 0;
317 CIMClass *g_currentClass = 0;
318 CIMInstance *g_currentInstance = 0;
|
319 karl 1.41 String g_currentAliasRef; // Alias reference
|
320 mike 1.37 String g_currentAliasDecl; // Alias declaration
|
321 kumpf 1.16 CIMName g_referenceClassName = CIMName();
|
322 kumpf 1.34 Array<CIMKeyBinding> g_KeyBindingArray; // it gets created empty
|
323 karl 1.41 TYPED_INITIALIZER_VALUE g_typedInitializerValue;
|
324 mike 1.3
325 /* ------------------------------------------------------------------- */
326 /* Pragmas, except for the Include pragma, are not handled yet */
|
327 karl 1.41 /* I don't understand them, so it may be a while before they are */
|
328 mike 1.3 /* ------------------------------------------------------------------- */
329 struct pragma {
330 String name;
331 String value;
332 };
333
334 /* ---------------------------------------------------------------- */
335 /* Use our general wrap manager to handle end-of-file */
336 /* ---------------------------------------------------------------- */
337 extern "C" {
338 int
339 cimmof_wrap() {
340 return cimmofParser::Instance()->wrapCurrentBuffer();
341 }
342 }
343
344 /* ---------------------------------------------------------------- */
345 /* Pass errors to our general log manager. */
346 /* ---------------------------------------------------------------- */
347 void
|
348 kumpf 1.13 cimmof_error(const char *msg) {
|
349 mike 1.3 cimmofParser::Instance()->log_parse_error(cimmof_text, msg);
|
350 kumpf 1.34 // printf("Error: %s\n", msg);
|
351 mike 1.3 }
352
|
353 jim.wunderlich 1.36 static void MOF_error(const char * str, const char * S);
354 static void MOF_trace(const char* str);
355 static void MOF_trace2(const char * str, const char * S);
356
|
357 kumpf 1.34
358
359 /* Enabling traces. */
360 #ifndef YYDEBUG
361 # define YYDEBUG 0
362 #endif
363
364 /* Enabling verbose error messages. */
365 #ifdef YYERROR_VERBOSE
366 # undef YYERROR_VERBOSE
367 # define YYERROR_VERBOSE 1
368 #else
369 # define YYERROR_VERBOSE 0
370 #endif
371
|
372 karl 1.41 /* Enabling the token table. */
373 #ifndef YYTOKEN_TABLE
374 # define YYTOKEN_TABLE 0
375 #endif
376
377 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
378 typedef union YYSTYPE
|
379 karl 1.51 #line 169 "cimmof.y"
|
380 karl 1.41 {
|
381 kumpf 1.34 //char *strval;
|
382 e.boden 1.30 CIMClass *mofclass;
383 CIMFlavor *flavor;
384 CIMInstance *instance;
385 CIMKeyBinding *keybinding;
386 CIMMethod *method;
387 CIMName *cimnameval;
388 CIMObjectPath *reference;
389 CIMProperty *property;
390 CIMQualifier *qualifier;
391 CIMQualifierDecl *mofqualifier;
392 CIMScope *scope;
393 CIMType datatype;
394 CIMValue *value;
395 int ival;
|
396 kumpf 1.45 CIMObjectPath *modelpath;
|
397 e.boden 1.30 String *strptr;
398 String *strval;
399 struct pragma *pragma;
400 TYPED_INITIALIZER_VALUE *typedinitializer;
|
401 karl 1.41 }
|
402 karl 1.51 /* Line 187 of yacc.c. */
|
403 kumpf 1.48 #line 401 "cimmoftemp"
|
404 kumpf 1.43 YYSTYPE;
|
405 kumpf 1.34 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
406 # define YYSTYPE_IS_DECLARED 1
407 # define YYSTYPE_IS_TRIVIAL 1
408 #endif
409
410
411
412 /* Copy the second part of user declarations. */
413
414
|
415 karl 1.41 /* Line 216 of yacc.c. */
|
416 kumpf 1.48 #line 414 "cimmoftemp"
|
417 karl 1.41
418 #ifdef short
419 # undef short
420 #endif
421
422 #ifdef YYTYPE_UINT8
423 typedef YYTYPE_UINT8 yytype_uint8;
424 #else
425 typedef unsigned char yytype_uint8;
426 #endif
427
428 #ifdef YYTYPE_INT8
429 typedef YYTYPE_INT8 yytype_int8;
430 #elif (defined __STDC__ || defined __C99__FUNC__ \
431 || defined __cplusplus || defined _MSC_VER)
432 typedef signed char yytype_int8;
433 #else
434 typedef short int yytype_int8;
435 #endif
436
437 #ifdef YYTYPE_UINT16
438 karl 1.41 typedef YYTYPE_UINT16 yytype_uint16;
439 #else
440 typedef unsigned short int yytype_uint16;
441 #endif
442
443 #ifdef YYTYPE_INT16
444 typedef YYTYPE_INT16 yytype_int16;
445 #else
446 typedef short int yytype_int16;
447 #endif
448
449 #ifndef YYSIZE_T
450 # ifdef __SIZE_TYPE__
451 # define YYSIZE_T __SIZE_TYPE__
452 # elif defined size_t
453 # define YYSIZE_T size_t
454 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
455 || defined __cplusplus || defined _MSC_VER)
456 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
457 # define YYSIZE_T size_t
458 # else
459 karl 1.41 # define YYSIZE_T unsigned int
460 # endif
461 #endif
462
463 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
|
464 kumpf 1.34
|
465 karl 1.41 #ifndef YY_
466 # if YYENABLE_NLS
467 # if ENABLE_NLS
468 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
469 # define YY_(msgid) dgettext ("bison-runtime", msgid)
470 # endif
471 # endif
472 # ifndef YY_
473 # define YY_(msgid) msgid
474 # endif
475 #endif
476
477 /* Suppress unused-variable warnings by "using" E. */
478 #if ! defined lint || defined __GNUC__
479 # define YYUSE(e) ((void) (e))
480 #else
481 # define YYUSE(e) /* empty */
482 #endif
483
484 /* Identity function, used to suppress warnings about constant conditions. */
485 #ifndef lint
486 karl 1.41 # define YYID(n) (n)
487 #else
488 #if (defined __STDC__ || defined __C99__FUNC__ \
489 || defined __cplusplus || defined _MSC_VER)
490 static int
491 YYID (int i)
492 #else
493 static int
494 YYID (i)
495 int i;
496 #endif
497 {
498 return i;
499 }
500 #endif
501
502 #if ! defined yyoverflow || YYERROR_VERBOSE
|
503 kumpf 1.34
504 /* The parser invokes alloca or malloc; define the necessary symbols. */
505
|
506 karl 1.41 # ifdef YYSTACK_USE_ALLOCA
507 # if YYSTACK_USE_ALLOCA
508 # ifdef __GNUC__
509 # define YYSTACK_ALLOC __builtin_alloca
510 # elif defined __BUILTIN_VA_ARG_INCR
511 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
512 # elif defined _AIX
513 # define YYSTACK_ALLOC __alloca
514 # elif defined _MSC_VER
515 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
516 # define alloca _alloca
517 # else
|
518 kumpf 1.34 # define YYSTACK_ALLOC alloca
|
519 karl 1.41 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
520 || defined __cplusplus || defined _MSC_VER)
521 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
522 # ifndef _STDLIB_H
523 # define _STDLIB_H 1
524 # endif
|
525 kumpf 1.34 # endif
526 # endif
527 # endif
528 # endif
529
530 # ifdef YYSTACK_ALLOC
|
531 karl 1.41 /* Pacify GCC's `empty if-body' warning. */
532 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
533 # ifndef YYSTACK_ALLOC_MAXIMUM
534 /* The OS might guarantee only one guard page at the bottom of the stack,
535 and a page size can be as small as 4096 bytes. So we cannot safely
536 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
537 to allow for a few compiler-allocated temporary stack slots. */
538 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
539 # endif
|
540 kumpf 1.34 # else
|
541 karl 1.41 # define YYSTACK_ALLOC YYMALLOC
542 # define YYSTACK_FREE YYFREE
543 # ifndef YYSTACK_ALLOC_MAXIMUM
544 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
545 # endif
546 # if (defined __cplusplus && ! defined _STDLIB_H \
547 && ! ((defined YYMALLOC || defined malloc) \
|
548 kumpf 1.43 && (defined YYFREE || defined free)))
|
549 kumpf 1.34 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
550 karl 1.41 # ifndef _STDLIB_H
551 # define _STDLIB_H 1
552 # endif
553 # endif
554 # ifndef YYMALLOC
555 # define YYMALLOC malloc
556 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
557 || defined __cplusplus || defined _MSC_VER)
558 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
559 # endif
560 # endif
561 # ifndef YYFREE
562 # define YYFREE free
563 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
564 || defined __cplusplus || defined _MSC_VER)
565 void free (void *); /* INFRINGES ON USER NAME SPACE */
566 # endif
|
567 kumpf 1.34 # endif
568 # endif
|
569 karl 1.41 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
|
570 kumpf 1.34
571
|
572 karl 1.41 #if (! defined yyoverflow \
573 && (! defined __cplusplus \
|
574 kumpf 1.43 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
|
575 kumpf 1.34
576 /* A type that is properly aligned for any stack member. */
577 union yyalloc
578 {
|
579 karl 1.41 yytype_int16 yyss;
|
580 kumpf 1.34 YYSTYPE yyvs;
581 };
582
583 /* The size of the maximum gap between one aligned stack and the next. */
584 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
585
586 /* The size of an array large to enough to hold all stacks, each with
587 N elements. */
588 # define YYSTACK_BYTES(N) \
|
589 karl 1.41 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
|
590 kumpf 1.34 + YYSTACK_GAP_MAXIMUM)
591
592 /* Copy COUNT objects from FROM to TO. The source and destination do
593 not overlap. */
594 # ifndef YYCOPY
|
595 karl 1.41 # if defined __GNUC__ && 1 < __GNUC__
|
596 kumpf 1.34 # define YYCOPY(To, From, Count) \
597 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
598 # else
|
599 kumpf 1.43 # define YYCOPY(To, From, Count) \
600 do \
601 { \
602 YYSIZE_T yyi; \
603 for (yyi = 0; yyi < (Count); yyi++) \
604 (To)[yyi] = (From)[yyi]; \
605 } \
|
606 karl 1.41 while (YYID (0))
|
607 kumpf 1.34 # endif
608 # endif
609
610 /* Relocate STACK from its old location to the new one. The
611 local variables YYSIZE and YYSTACKSIZE give the old and new number of
612 elements in the stack, and YYPTR gives the new location of the
613 stack. Advance YYPTR to a properly aligned location for the next
614 stack. */
|
615 kumpf 1.43 # define YYSTACK_RELOCATE(Stack) \
616 do \
617 { \
618 YYSIZE_T yynewbytes; \
619 YYCOPY (&yyptr->Stack, Stack, yysize); \
620 Stack = &yyptr->Stack; \
621 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
622 yyptr += yynewbytes / sizeof (*yyptr); \
623 } \
|
624 karl 1.41 while (YYID (0))
|
625 kumpf 1.34
626 #endif
627
|
628 karl 1.41 /* YYFINAL -- State number of the termination state. */
|
629 kumpf 1.34 #define YYFINAL 32
630 /* YYLAST -- Last index in YYTABLE. */
631 #define YYLAST 292
632
|
633 karl 1.41 /* YYNTOKENS -- Number of terminals. */
|
634 kumpf 1.34 #define YYNTOKENS 68
|
635 karl 1.41 /* YYNNTS -- Number of nonterminals. */
|
636 kumpf 1.34 #define YYNNTS 84
|
637 karl 1.41 /* YYNRULES -- Number of rules. */
|
638 kumpf 1.34 #define YYNRULES 160
|
639 karl 1.41 /* YYNRULES -- Number of states. */
|
640 kumpf 1.34 #define YYNSTATES 239
641
642 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
643 #define YYUNDEFTOK 2
644 #define YYMAXUTOK 322
645
|
646 kumpf 1.43 #define YYTRANSLATE(YYX) \
|
647 kumpf 1.34 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
648
649 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
|
650 karl 1.41 static const yytype_uint8 yytranslate[] =
|
651 kumpf 1.34 {
652 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
653 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
654 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
655 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
656 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
657 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
658 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
659 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
660 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
661 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
662 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
663 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
664 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
665 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
666 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
667 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
668 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
669 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
670 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
671 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
672 kumpf 1.34 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
673 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
674 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
675 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
676 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
677 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
678 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
679 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
680 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
681 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
682 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
683 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
684 65, 66, 67
685 };
686
687 #if YYDEBUG
688 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
689 YYRHS. */
|
690 karl 1.41 static const yytype_uint16 yyprhs[] =
|
691 kumpf 1.34 {
692 0, 0, 3, 5, 8, 9, 11, 13, 15, 17,
693 20, 26, 28, 31, 32, 37, 41, 43, 46, 48,
694 50, 52, 57, 60, 64, 66, 68, 70, 74, 75,
695 80, 82, 84, 88, 93, 95, 102, 104, 106, 109,
696 110, 113, 115, 117, 121, 124, 125, 128, 129, 131,
697 133, 135, 137, 139, 141, 143, 145, 149, 151, 153,
698 155, 157, 159, 161, 163, 165, 167, 169, 171, 173,
699 175, 177, 179, 182, 184, 188, 191, 193, 195, 200,
700 202, 205, 206, 208, 212, 214, 218, 222, 224, 227,
701 228, 230, 233, 239, 244, 246, 249, 255, 257, 259,
702 265, 267, 273, 280, 285, 289, 293, 295, 299, 301,
703 303, 305, 307, 309, 311, 313, 315, 317, 322, 323,
704 326, 328, 332, 334, 336, 338, 340, 342, 344, 345,
705 347, 350, 352, 354, 356, 358, 360, 362, 364, 366,
706 368, 370, 372, 374, 376, 378, 380, 382, 386, 387,
707 389, 391, 395, 399, 401, 403, 407, 411, 413, 414,
708 416
709 };
710
|
711 karl 1.41 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
712 static const yytype_int16 yyrhs[] =
|
713 kumpf 1.34 {
714 69, 0, -1, 70, -1, 71, 70, -1, -1, 125,
715 -1, 129, -1, 72, -1, 120, -1, 73, 76, -1,
716 144, 9, 74, 118, 75, -1, 62, -1, 10, 74,
717 -1, -1, 38, 77, 55, 60, -1, 38, 55, 60,
718 -1, 78, -1, 77, 78, -1, 87, -1, 79, -1,
719 90, -1, 144, 80, 81, 82, -1, 141, 83, -1,
720 39, 84, 56, -1, 60, -1, 62, -1, 85, -1,
721 84, 11, 85, -1, -1, 144, 86, 95, 97, -1,
722 141, -1, 94, -1, 144, 88, 89, -1, 141, 96,
723 97, 98, -1, 60, -1, 144, 91, 52, 92, 93,
724 60, -1, 62, -1, 62, -1, 31, 107, -1, -1,
725 74, 52, -1, 62, -1, 62, -1, 40, 47, 57,
726 -1, 40, 57, -1, -1, 31, 100, -1, -1, 102,
727 -1, 108, -1, 109, -1, 103, -1, 42, -1, 108,
728 -1, 109, -1, 102, -1, 101, 11, 102, -1, 103,
729 -1, 42, -1, 104, -1, 51, -1, 8, -1, 106,
|
730 kumpf 1.43 -1, 105, -1, 47, -1, 43, -1, 34, -1, 7,
731 -1, 61, -1, 32, -1, 66, -1, 107, -1, 106,
|
732 kumpf 1.34 107, -1, 63, -1, 38, 101, 55, -1, 38, 55,
733 -1, 110, -1, 111, -1, 13, 112, 114, 13, -1,
734 119, -1, 113, 10, -1, -1, 107, -1, 74, 46,
735 115, -1, 116, -1, 115, 11, 116, -1, 117, 31,
736 99, -1, 62, -1, 5, 119, -1, -1, 3, -1,
737 121, 122, -1, 144, 37, 44, 74, 118, -1, 38,
738 123, 55, 60, -1, 124, -1, 123, 124, -1, 144,
739 62, 31, 100, 60, -1, 126, -1, 128, -1, 48,
740 35, 39, 127, 56, -1, 107, -1, 48, 150, 39,
741 151, 56, -1, 50, 148, 130, 131, 135, 60, -1,
742 10, 141, 97, 98, -1, 132, 133, 56, -1, 11,
743 59, 39, -1, 134, -1, 133, 11, 134, -1, 9,
744 -1, 58, -1, 6, -1, 36, -1, 49, -1, 53,
745 -1, 41, -1, 45, -1, 4, -1, 11, 136, 137,
746 56, -1, -1, 33, 39, -1, 138, -1, 137, 11,
747 138, -1, 29, -1, 12, -1, 54, -1, 64, -1,
748 65, -1, 140, -1, -1, 138, -1, 140, 138, -1,
749 142, -1, 143, -1, 24, -1, 14, -1, 17, -1,
750 28, -1, 23, -1, 25, -1, 20, -1, 26, -1,
751 21, -1, 27, -1, 22, -1, 15, -1, 18, -1,
752 19, -1, 145, 146, 57, -1, -1, 40, -1, 147,
753 kumpf 1.34 -1, 146, 11, 147, -1, 148, 149, 139, -1, 62,
754 -1, 134, -1, 39, 103, 56, -1, 39, 42, 56,
755 -1, 108, -1, -1, 62, -1, 63, -1
756 };
757
758 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
|
759 karl 1.41 static const yytype_uint16 yyrline[] =
|
760 kumpf 1.34 {
|
761 karl 1.51 0, 305, 305, 308, 309, 313, 314, 319, 323, 335,
762 343, 363, 366, 372, 377, 378, 381, 382, 385, 391,
763 396, 416, 427, 446, 449, 452, 462, 463, 464, 467,
764 495, 496, 507, 521, 540, 551, 568, 571, 574, 575,
765 578, 585, 592, 599, 605, 608, 611, 613, 620, 622,
766 624, 631, 637, 643, 649, 659, 662, 675, 677, 681,
767 682, 684, 686, 688, 694, 695, 696, 697, 698, 701,
768 703, 707, 708, 714, 746, 748, 752, 753, 756, 774,
769 803, 805, 808, 811, 821, 823, 827, 846, 849, 858,
770 863, 874, 897, 915, 920, 921, 928, 986, 990, 996,
771 1003, 1006, 1025, 1035, 1044, 1047, 1053, 1054, 1062, 1064,
772 1065, 1066, 1068, 1069, 1070, 1071, 1072, 1076, 1079, 1088,
773 1092, 1093, 1107, 1109, 1110, 1111, 1112, 1115, 1117, 1123,
774 1124, 1128, 1129, 1130, 1131, 1132, 1135, 1136, 1137, 1138,
775 1139, 1140, 1141, 1142, 1143, 1146, 1148, 1158, 1160, 1164,
776 1169, 1171, 1174, 1189, 1191, 1198, 1204, 1210, 1216, 1223,
777 1226
|
778 mike 1.3 };
|
779 kumpf 1.34 #endif
780
|
781 karl 1.41 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
782 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
783 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
|
784 kumpf 1.34 static const char *const yytname[] =
785 {
|
786 karl 1.41 "$end", "error", "$undefined", "TOK_ALIAS_IDENTIFIER", "TOK_ANY",
787 "TOK_AS", "TOK_ASSOCIATION", "TOK_BINARY_VALUE", "TOK_CHAR_VALUE",
788 "TOK_CLASS", "TOK_COLON", "TOK_COMMA", "TOK_DISABLEOVERRIDE",
789 "TOK_DQUOTE", "TOK_DT_BOOL", "TOK_DT_CHAR16", "TOK_DT_CHAR8",
790 "TOK_DT_DATETIME", "TOK_DT_REAL32", "TOK_DT_REAL64", "TOK_DT_SINT16",
791 "TOK_DT_SINT32", "TOK_DT_SINT64", "TOK_DT_SINT8", "TOK_DT_STR",
792 "TOK_DT_UINT16", "TOK_DT_UINT32", "TOK_DT_UINT64", "TOK_DT_UINT8",
793 "TOK_ENABLEOVERRIDE", "TOK_END_OF_FILE", "TOK_EQUAL", "TOK_FALSE",
794 "TOK_FLAVOR", "TOK_HEX_VALUE", "TOK_INCLUDE", "TOK_INDICATION",
795 "TOK_INSTANCE", "TOK_LEFTCURLYBRACE", "TOK_LEFTPAREN",
796 "TOK_LEFTSQUAREBRACKET", "TOK_METHOD", "TOK_NULL_VALUE",
797 "TOK_OCTAL_VALUE", "TOK_OF", "TOK_PARAMETER", "TOK_PERIOD",
798 "TOK_POSITIVE_DECIMAL_VALUE", "TOK_PRAGMA", "TOK_PROPERTY",
799 "TOK_QUALIFIER", "TOK_REAL_VALUE", "TOK_REF", "TOK_REFERENCE",
800 "TOK_RESTRICTED", "TOK_RIGHTCURLYBRACE", "TOK_RIGHTPAREN",
801 "TOK_RIGHTSQUAREBRACKET", "TOK_SCHEMA", "TOK_SCOPE", "TOK_SEMICOLON",
802 "TOK_SIGNED_DECIMAL_VALUE", "TOK_SIMPLE_IDENTIFIER", "TOK_STRING_VALUE",
803 "TOK_TOSUBCLASS", "TOK_TRANSLATABLE", "TOK_TRUE", "TOK_UNEXPECTED_CHAR",
804 "$accept", "mofSpec", "mofProductions", "mofProduction",
805 "classDeclaration", "classHead", "className", "superClass", "classBody",
806 "classFeatures", "classFeature", "methodDeclaration", "methodHead",
807 karl 1.41 "methodBody", "methodEnd", "methodName", "parameters", "parameter",
808 "parameterType", "propertyDeclaration", "propertyBody", "propertyEnd",
809 "referenceDeclaration", "referencedObject", "referenceName",
810 "referencePath", "objectRef", "parameterName", "propertyName", "array",
811 "typedDefaultValue", "initializer", "typedInitializer", "constantValues",
812 "constantValue", "nonNullConstantValue", "integerValue", "booleanValue",
813 "stringValues", "stringValue", "arrayInitializer",
814 "referenceInitializer", "objectHandle", "aliasInitializer",
815 "namespaceHandleRef", "namespaceHandle", "modelPath", "keyValuePairList",
816 "keyValuePair", "keyValuePairName", "alias", "aliasIdentifier",
817 "instanceDeclaration", "instanceHead", "instanceBody",
818 "valueInitializers", "valueInitializer", "compilerDirective",
819 "compilerDirectiveInclude", "fileName", "compilerDirectivePragma",
820 "qualifierDeclaration", "qualifierValue", "scope", "scope_begin",
821 "metaElements", "metaElement", "defaultFlavor", "flavorHead",
822 "explicitFlavors", "explicitFlavor", "flavor", "overrideFlavors",
823 "dataType", "intDataType", "realDataType", "qualifierList",
824 "qualifierListBegin", "qualifiers", "qualifier", "qualifierName",
825 "typedQualifierParameter", "pragmaName", "pragmaVal", 0
|
826 mike 1.3 };
|
827 kumpf 1.34 #endif
828
829 # ifdef YYPRINT
830 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
831 token YYLEX-NUM. */
|
832 karl 1.41 static const yytype_uint16 yytoknum[] =
|
833 kumpf 1.34 {
834 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
835 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
836 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
837 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
838 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
839 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
840 315, 316, 317, 318, 319, 320, 321, 322
841 };
842 # endif
843
844 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
|
845 karl 1.41 static const yytype_uint8 yyr1[] =
|
846 kumpf 1.34 {
847 0, 68, 69, 70, 70, 71, 71, 71, 71, 72,
848 73, 74, 75, 75, 76, 76, 77, 77, 78, 78,
849 78, 79, 80, 81, 82, 83, 84, 84, 84, 85,
850 86, 86, 87, 88, 89, 90, 91, 92, 93, 93,
851 94, 95, 96, 97, 97, 97, 98, 98, 99, 99,
852 99, 100, 100, 100, 100, 101, 101, 102, 102, 103,
853 103, 103, 103, 103, 104, 104, 104, 104, 104, 105,
854 105, 106, 106, 107, 108, 108, 109, 109, 110, 111,
855 112, 112, 113, 114, 115, 115, 116, 117, 118, 118,
856 119, 120, 121, 122, 123, 123, 124, 125, 125, 126,
857 127, 128, 129, 130, 131, 132, 133, 133, 134, 134,
858 134, 134, 134, 134, 134, 134, 134, 135, 135, 136,
859 137, 137, 138, 138, 138, 138, 138, 139, 139, 140,
860 140, 141, 141, 141, 141, 141, 142, 142, 142, 142,
861 142, 142, 142, 142, 142, 143, 143, 144, 144, 145,
862 146, 146, 147, 148, 148, 149, 149, 149, 149, 150,
863 151
|
864 mike 1.3 };
|
865 kumpf 1.34
866 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
|
867 karl 1.41 static const yytype_uint8 yyr2[] =
|
868 kumpf 1.34 {
869 0, 2, 1, 2, 0, 1, 1, 1, 1, 2,
870 5, 1, 2, 0, 4, 3, 1, 2, 1, 1,
871 1, 4, 2, 3, 1, 1, 1, 3, 0, 4,
872 1, 1, 3, 4, 1, 6, 1, 1, 2, 0,
873 2, 1, 1, 3, 2, 0, 2, 0, 1, 1,
874 1, 1, 1, 1, 1, 1, 3, 1, 1, 1,
875 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
876 1, 1, 2, 1, 3, 2, 1, 1, 4, 1,
877 2, 0, 1, 3, 1, 3, 3, 1, 2, 0,
878 1, 2, 5, 4, 1, 2, 5, 1, 1, 5,
879 1, 5, 6, 4, 3, 3, 1, 3, 1, 1,
880 1, 1, 1, 1, 1, 1, 1, 4, 0, 2,
881 1, 3, 1, 1, 1, 1, 1, 1, 0, 1,
882 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
883 1, 1, 1, 1, 1, 1, 1, 3, 0, 1,
884 1, 3, 3, 1, 1, 3, 3, 1, 0, 1,
885 1
|
886 mike 1.3 };
|
887 kumpf 1.34
888 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
889 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
890 means the default is an error. */
|
891 karl 1.41 static const yytype_uint8 yydefact[] =
|
892 kumpf 1.34 {
893 148, 149, 0, 0, 0, 2, 148, 7, 0, 8,
894 0, 5, 97, 98, 6, 0, 0, 0, 159, 0,
895 116, 110, 108, 111, 114, 115, 112, 113, 109, 153,
896 154, 0, 1, 3, 148, 9, 148, 91, 0, 0,
897 0, 150, 158, 0, 0, 0, 0, 0, 148, 16,
898 19, 18, 20, 0, 148, 94, 0, 11, 89, 0,
899 0, 147, 0, 0, 157, 128, 73, 100, 0, 160,
900 0, 134, 144, 135, 145, 146, 139, 141, 143, 137,
901 133, 138, 140, 142, 136, 45, 131, 132, 0, 118,
902 0, 15, 0, 17, 36, 0, 0, 0, 0, 0,
|
903 kumpf 1.43 95, 0, 0, 13, 89, 151, 67, 61, 69, 66,
904 58, 65, 64, 60, 75, 68, 70, 0, 55, 57,
|
905 kumpf 1.34 59, 63, 62, 71, 0, 0, 123, 122, 124, 125,
906 126, 129, 152, 127, 99, 101, 0, 47, 0, 0,
907 0, 0, 106, 14, 148, 0, 34, 32, 0, 42,
908 22, 45, 93, 0, 90, 88, 0, 10, 92, 0,
909 74, 72, 156, 155, 130, 0, 44, 0, 103, 105,
910 0, 0, 102, 0, 104, 0, 26, 0, 24, 21,
911 37, 39, 47, 81, 52, 0, 51, 53, 54, 76,
912 77, 79, 12, 56, 43, 46, 119, 0, 120, 107,
913 148, 23, 0, 0, 31, 30, 0, 0, 33, 82,
914 0, 0, 96, 0, 117, 27, 40, 41, 45, 38,
915 35, 0, 0, 80, 121, 29, 0, 78, 87, 83,
916 84, 0, 0, 0, 85, 86, 48, 49, 50
|
917 mike 1.3 };
|
918 kumpf 1.34
|
919 karl 1.41 /* YYDEFGOTO[NTERM-NUM]. */
920 static const yytype_int16 yydefgoto[] =
|
921 kumpf 1.34 {
922 -1, 4, 5, 6, 7, 8, 58, 157, 35, 48,
923 49, 50, 95, 145, 179, 150, 175, 176, 203, 51,
924 96, 147, 52, 97, 181, 207, 204, 218, 151, 137,
925 168, 235, 185, 117, 118, 119, 120, 121, 122, 123,
926 187, 188, 189, 190, 210, 211, 222, 229, 230, 231,
927 103, 191, 9, 10, 37, 54, 55, 11, 12, 68,
928 13, 14, 46, 89, 90, 141, 30, 140, 171, 197,
929 131, 132, 133, 85, 86, 87, 15, 16, 40, 41,
930 42, 65, 19, 70
|
931 mike 1.3 };
|
932 kumpf 1.34
933 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
934 STATE-NUM. */
935 #define YYPACT_NINF -151
|
936 karl 1.41 static const yytype_int16 yypact[] =
|
937 kumpf 1.34 {
938 14, -151, -17, 169, 27, -151, 14, -151, -10, -151,
939 -8, -151, -151, -151, -151, 11, 169, -7, -151, -6,
940 -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
941 -151, 26, -151, -151, -5, -151, -3, -151, -13, 17,
942 0, -151, -14, -4, 3, 245, 42, 7, 45, -151,
943 -151, -151, -151, 215, 47, -151, 24, -151, 50, -13,
944 169, -151, 72, 105, -151, 95, -151, -151, 33, -151,
945 35, -151, -151, -151, -151, -151, -151, -151, -151, -151,
946 -151, -151, -151, -151, -151, 53, -151, -151, 36, 87,
947 170, -151, 39, -151, -151, 64, 48, 57, 43, 56,
948 -151, 86, 115, 110, 50, -151, -151, -151, -151, -151,
949 -151, -151, -151, -151, -151, -151, -151, 29, -151, -151,
950 -151, -151, -4, -151, 65, 69, -151, -151, -151, -151,
951 -151, -151, -151, 95, -151, -151, -28, 97, 91, 93,
952 71, 12, -151, -151, 2, 74, -151, -151, 70, 101,
953 -151, 53, -151, 9, -151, -151, -13, -151, -151, 138,
954 -151, -151, -151, -151, -151, 79, -151, 9, -151, -151,
955 102, 95, -151, 170, -151, 15, -151, 230, -151, -151,
956 -151, 112, 97, -4, -151, 84, -151, -151, -151, -151,
957 -151, -151, -151, -151, -151, -151, -151, 20, -151, -151,
958 kumpf 1.34 -3, -151, 98, 89, -151, -151, -4, 94, -151, -151,
959 -13, 143, -151, 95, -151, -151, -151, -151, 53, -151,
960 -151, 111, 145, -151, -151, -151, 99, -151, -151, 151,
961 -151, 132, 99, 31, -151, -151, -151, -151, -151
|
962 mike 1.3 };
|
963 kumpf 1.34
964 /* YYPGOTO[NTERM-NUM]. */
|
965 karl 1.41 static const yytype_int16 yypgoto[] =
|
966 kumpf 1.34 {
967 -151, -151, 158, -151, -151, -151, -55, -151, -151, -151,
968 121, -151, -151, -151, -151, -151, -151, -23, -151, -151,
969 -151, -151, -151, -151, -151, -151, -151, -151, -151, -141,
970 1, -151, 19, -151, -150, -57, -151, -151, -151, -41,
971 -42, -51, -151, -151, -151, -151, -151, -151, -45, -151,
972 80, 88, -151, -151, -151, -151, 134, -151, -151, -151,
973 -151, -151, -151, -151, -151, -151, -83, -151, -151, -151,
974 -125, -151, -151, -48, -151, -151, -33, -151, -151, 133,
975 189, -151, -151, -151
|
976 mike 1.3 };
|
977 kumpf 1.34
978 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
979 positive, shift that token. If negative, reduce the rule which
980 number is the opposite. If zero, do what YYDEFACT says.
981 If YYTABLE_NINF, syntax error. */
982 #define YYTABLE_NINF -29
|
983 karl 1.41 static const yytype_int16 yytable[] =
|
984 kumpf 1.34 {
985 64, 53, 67, 56, 104, 98, 125, 142, 164, 193,
986 182, 60, 154, -28, -4, 53, 106, 107, 17, 165,
987 38, 56, 183, 173, 62, 63, 200, 32, 34, 166,
988 36, 213, 43, 44, 154, 1, 45, 1, 106, 107,
989 159, 108, 1, 109, 183, 18, 198, 62, 39, 57,
990 47, 184, 111, 88, 1, 102, 112, 61, -28, 66,
991 113, 59, 2, 108, 3, 109, 69, 91, 174, 62,
992 115, 201, 66, 110, 111, 116, 214, 225, 112, 106,
993 107, 161, 113, 236, 160, 1, 101, 1, 224, 134,
994 199, 135, 115, 136, 66, 138, 186, 116, 139, 143,
995 92, 192, 99, 144, 108, 149, 109, 126, 146, 148,
996 186, 177, 106, 107, 110, 111, 152, 153, 154, 112,
997 156, 162, 202, 113, 127, 163, 170, 114, 167, 205,
998 169, 172, 180, 115, 178, 66, 194, 108, 116, 109,
999 -25, 196, 209, 206, 212, 106, 107, 124, 111, 128,
1000 216, 217, 112, 223, 220, 221, 113, 226, 227, 129,
1001 130, 228, 232, 233, 33, 219, 115, 177, 66, 93,
1002 108, 116, 109, 20, 20, 21, 21, 215, 22, 22,
1003 110, 111, 238, 208, 158, 112, 195, 234, 100, 113,
1004 155, 237, 31, 105, 0, 0, 0, 0, 0, 115,
1005 kumpf 1.34 0, 66, 0, 0, 116, 23, 23, 0, 0, 0,
1006 24, 24, 0, 0, 25, 25, 0, 0, 26, 26,
1007 0, 0, 27, 27, 0, 0, 0, 28, 28, 71,
1008 72, 29, 73, 74, 75, 76, 77, 78, 79, 80,
1009 81, 82, 83, 84, 71, 72, 0, 73, 74, 75,
1010 76, 77, 78, 79, 80, 81, 82, 83, 84, 71,
1011 72, 0, 73, 74, 75, 76, 77, 78, 79, 80,
1012 81, 82, 83, 84, 0, 0, 0, 94, 0, 0,
1013 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1014 0, 0, 57
|
1015 mike 1.3 };
|
1016 kumpf 1.34
|
1017 karl 1.41 static const yytype_int16 yycheck[] =
|
1018 kumpf 1.34 {
1019 42, 34, 43, 36, 59, 53, 63, 90, 133, 159,
1020 151, 11, 3, 11, 0, 48, 7, 8, 35, 47,
1021 9, 54, 13, 11, 38, 39, 11, 0, 38, 57,
1022 38, 11, 39, 39, 3, 40, 10, 40, 7, 8,
1023 11, 32, 40, 34, 13, 62, 171, 38, 37, 62,
1024 55, 42, 43, 11, 40, 5, 47, 57, 56, 63,
1025 51, 44, 48, 32, 50, 34, 63, 60, 56, 38,
1026 61, 56, 63, 42, 43, 66, 56, 218, 47, 7,
1027 8, 122, 51, 233, 55, 40, 62, 40, 213, 56,
1028 173, 56, 61, 40, 63, 59, 153, 66, 11, 60,
1029 55, 156, 55, 39, 32, 62, 34, 12, 60, 52,
1030 167, 144, 7, 8, 42, 43, 60, 31, 3, 47,
1031 10, 56, 177, 51, 29, 56, 33, 55, 31, 177,
1032 39, 60, 62, 61, 60, 63, 57, 32, 66, 34,
1033 39, 39, 183, 31, 60, 7, 8, 42, 43, 54,
1034 52, 62, 47, 10, 60, 210, 51, 46, 13, 64,
1035 65, 62, 11, 31, 6, 206, 61, 200, 63, 48,
1036 32, 66, 34, 4, 4, 6, 6, 200, 9, 9,
1037 42, 43, 233, 182, 104, 47, 167, 232, 54, 51,
1038 102, 233, 3, 60, -1, -1, -1, -1, -1, 61,
1039 kumpf 1.34 -1, 63, -1, -1, 66, 36, 36, -1, -1, -1,
1040 41, 41, -1, -1, 45, 45, -1, -1, 49, 49,
1041 -1, -1, 53, 53, -1, -1, -1, 58, 58, 14,
1042 15, 62, 17, 18, 19, 20, 21, 22, 23, 24,
1043 25, 26, 27, 28, 14, 15, -1, 17, 18, 19,
1044 20, 21, 22, 23, 24, 25, 26, 27, 28, 14,
1045 15, -1, 17, 18, 19, 20, 21, 22, 23, 24,
1046 25, 26, 27, 28, -1, -1, -1, 62, -1, -1,
1047 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1048 -1, -1, 62
|
1049 mike 1.3 };
|
1050 kumpf 1.34
1051 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1052 symbol of state STATE-NUM. */
|
1053 karl 1.41 static const yytype_uint8 yystos[] =
|
1054 kumpf 1.34 {
1055 0, 40, 48, 50, 69, 70, 71, 72, 73, 120,
1056 121, 125, 126, 128, 129, 144, 145, 35, 62, 150,
1057 4, 6, 9, 36, 41, 45, 49, 53, 58, 62,
1058 134, 148, 0, 70, 38, 76, 38, 122, 9, 37,
1059 146, 147, 148, 39, 39, 10, 130, 55, 77, 78,
1060 79, 87, 90, 144, 123, 124, 144, 62, 74, 44,
1061 11, 57, 38, 39, 108, 149, 63, 107, 127, 63,
1062 151, 14, 15, 17, 18, 19, 20, 21, 22, 23,
1063 24, 25, 26, 27, 28, 141, 142, 143, 11, 131,
1064 132, 60, 55, 78, 62, 80, 88, 91, 141, 55,
1065 124, 62, 5, 118, 74, 147, 7, 8, 32, 34,
1066 42, 43, 47, 51, 55, 61, 66, 101, 102, 103,
1067 104, 105, 106, 107, 42, 103, 12, 29, 54, 64,
1068 65, 138, 139, 140, 56, 56, 40, 97, 59, 11,
1069 135, 133, 134, 60, 39, 81, 60, 89, 52, 62,
1070 83, 96, 60, 31, 3, 119, 10, 75, 118, 11,
1071 55, 107, 56, 56, 138, 47, 57, 31, 98, 39,
1072 33, 136, 60, 11, 56, 84, 85, 144, 60, 82,
1073 62, 92, 97, 13, 42, 100, 103, 108, 109, 110,
1074 111, 119, 74, 102, 57, 100, 39, 137, 138, 134,
1075 kumpf 1.34 11, 56, 74, 86, 94, 141, 31, 93, 98, 107,
1076 112, 113, 60, 11, 56, 85, 52, 62, 95, 107,
1077 60, 74, 114, 10, 138, 97, 46, 13, 62, 115,
1078 116, 117, 11, 31, 116, 99, 102, 108, 109
|
1079 mike 1.3 };
|
1080 kumpf 1.34
|
1081 kumpf 1.43 #define yyerrok (yyerrstatus = 0)
1082 #define yyclearin (yychar = YYEMPTY)
1083 #define YYEMPTY (-2)
1084 #define YYEOF 0
1085
1086 #define YYACCEPT goto yyacceptlab
1087 #define YYABORT goto yyabortlab
1088 #define YYERROR goto yyerrorlab
|
1089 kumpf 1.34
1090
1091 /* Like YYERROR except do call yyerror. This remains here temporarily
1092 to ease the transition to the new meaning of YYERROR, for GCC.
1093 Once GCC version 2 has supplanted version 1, this can go. */
1094
|
1095 kumpf 1.43 #define YYFAIL goto yyerrlab
|
1096 kumpf 1.34
1097 #define YYRECOVERING() (!!yyerrstatus)
1098
|
1099 kumpf 1.43 #define YYBACKUP(Token, Value) \
1100 do \
1101 if (yychar == YYEMPTY && yylen == 1) \
1102 { \
1103 yychar = (Token); \
1104 yylval = (Value); \
1105 yytoken = YYTRANSLATE (yychar); \
1106 YYPOPSTACK (1); \
1107 goto yybackup; \
1108 } \
1109 else \
1110 { \
|
1111 karl 1.41 yyerror (YY_("syntax error: cannot back up")); \
|
1112 kumpf 1.43 YYERROR; \
1113 } \
|
1114 karl 1.41 while (YYID (0))
1115
1116
|
1117 kumpf 1.43 #define YYTERROR 1
1118 #define YYERRCODE 256
|
1119 karl 1.41
1120
1121 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1122 If N is 0, then set CURRENT to the empty location which ends
1123 the previous symbol: RHS[0] (always defined). */
|
1124 kumpf 1.34
|
1125 karl 1.41 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1126 #ifndef YYLLOC_DEFAULT
|
1127 kumpf 1.43 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1128 do \
|
1129 karl 1.41 if (YYID (N)) \
|
1130 kumpf 1.43 { \
1131 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1132 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1133 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1134 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1135 } \
1136 else \
1137 { \
1138 (Current).first_line = (Current).last_line = \
1139 YYRHSLOC (Rhs, 0).last_line; \
1140 (Current).first_column = (Current).last_column = \
1141 YYRHSLOC (Rhs, 0).last_column; \
1142 } \
|
1143 karl 1.41 while (YYID (0))
1144 #endif
|
1145 kumpf 1.34
1146
|
1147 karl 1.41 /* YY_LOCATION_PRINT -- Print the location on the stream.
1148 This macro was not mandated originally: define only if we know
1149 we won't break user code: when these are the locations we know. */
1150
1151 #ifndef YY_LOCATION_PRINT
1152 # if YYLTYPE_IS_TRIVIAL
|
1153 kumpf 1.43 # define YY_LOCATION_PRINT(File, Loc) \
1154 fprintf (File, "%d.%d-%d.%d", \
1155 (Loc).first_line, (Loc).first_column, \
1156 (Loc).last_line, (Loc).last_column)
|
1157 karl 1.41 # else
1158 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1159 # endif
|
1160 kumpf 1.21 #endif
|
1161 kumpf 1.34
|
1162 karl 1.41
|
1163 kumpf 1.34 /* YYLEX -- calling `yylex' with the right arguments. */
1164
1165 #ifdef YYLEX_PARAM
1166 # define YYLEX yylex (YYLEX_PARAM)
1167 #else
1168 # define YYLEX yylex ()
1169 #endif
1170
1171 /* Enable debugging if requested. */
|
1172 dj.gorey 1.29 #if YYDEBUG
|
1173 kumpf 1.34
1174 # ifndef YYFPRINTF
1175 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1176 # define YYFPRINTF fprintf
1177 # endif
1178
|
1179 kumpf 1.43 # define YYDPRINTF(Args) \
1180 do { \
1181 if (yydebug) \
1182 YYFPRINTF Args; \
|
1183 karl 1.41 } while (YYID (0))
1184
|
1185 kumpf 1.43 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1186 do { \
1187 if (yydebug) \
1188 { \
1189 YYFPRINTF (stderr, "%s ", Title); \
1190 yy_symbol_print (stderr, \
1191 Type, Value); \
1192 YYFPRINTF (stderr, "\n"); \
1193 } \
|
1194 karl 1.41 } while (YYID (0))
1195
1196
1197 /*--------------------------------.
1198 | Print this symbol on YYOUTPUT. |
1199 `--------------------------------*/
1200
1201 /*ARGSUSED*/
1202 #if (defined __STDC__ || defined __C99__FUNC__ \
1203 || defined __cplusplus || defined _MSC_VER)
1204 static void
1205 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1206 #else
1207 static void
1208 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1209 FILE *yyoutput;
1210 int yytype;
1211 YYSTYPE const * const yyvaluep;
1212 #endif
1213 {
1214 if (!yyvaluep)
1215 karl 1.41 return;
1216 # ifdef YYPRINT
1217 if (yytype < YYNTOKENS)
1218 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1219 # else
1220 YYUSE (yyoutput);
1221 # endif
1222 switch (yytype)
1223 {
1224 default:
|
1225 kumpf 1.43 break;
|
1226 karl 1.41 }
1227 }
1228
1229
1230 /*--------------------------------.
1231 | Print this symbol on YYOUTPUT. |
1232 `--------------------------------*/
1233
1234 #if (defined __STDC__ || defined __C99__FUNC__ \
1235 || defined __cplusplus || defined _MSC_VER)
1236 static void
1237 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1238 #else
1239 static void
1240 yy_symbol_print (yyoutput, yytype, yyvaluep)
1241 FILE *yyoutput;
1242 int yytype;
1243 YYSTYPE const * const yyvaluep;
1244 #endif
1245 {
1246 if (yytype < YYNTOKENS)
1247 karl 1.41 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1248 else
1249 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1250
1251 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1252 YYFPRINTF (yyoutput, ")");
1253 }
|
1254 kumpf 1.34
1255 /*------------------------------------------------------------------.
1256 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
|
1257 karl 1.41 | TOP (included). |
|
1258 kumpf 1.34 `------------------------------------------------------------------*/
1259
|
1260 karl 1.41 #if (defined __STDC__ || defined __C99__FUNC__ \
1261 || defined __cplusplus || defined _MSC_VER)
|
1262 kumpf 1.34 static void
|
1263 karl 1.41 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
|
1264 kumpf 1.34 #else
1265 static void
1266 yy_stack_print (bottom, top)
|
1267 karl 1.41 yytype_int16 *bottom;
1268 yytype_int16 *top;
|
1269 mike 1.3 #endif
|
1270 kumpf 1.34 {
1271 YYFPRINTF (stderr, "Stack now");
|
1272 karl 1.41 for (; bottom <= top; ++bottom)
|
1273 kumpf 1.34 YYFPRINTF (stderr, " %d", *bottom);
1274 YYFPRINTF (stderr, "\n");
1275 }
1276
|
1277 kumpf 1.43 # define YY_STACK_PRINT(Bottom, Top) \
1278 do { \
1279 if (yydebug) \
1280 yy_stack_print ((Bottom), (Top)); \
|
1281 karl 1.41 } while (YYID (0))
|
1282 kumpf 1.34
1283
1284 /*------------------------------------------------.
1285 | Report that the YYRULE is going to be reduced. |
1286 `------------------------------------------------*/
1287
|
1288 karl 1.41 #if (defined __STDC__ || defined __C99__FUNC__ \
1289 || defined __cplusplus || defined _MSC_VER)
|
1290 kumpf 1.34 static void
|
1291 karl 1.41 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
|
1292 mike 1.3 #else
|
1293 kumpf 1.34 static void
|
1294 karl 1.41 yy_reduce_print (yyvsp, yyrule)
1295 YYSTYPE *yyvsp;
|
1296 kumpf 1.34 int yyrule;
1297 #endif
1298 {
|
1299 karl 1.41 int yynrhs = yyr2[yyrule];
|
1300 kumpf 1.34 int yyi;
|
1301 karl 1.41 unsigned long int yylno = yyrline[yyrule];
1302 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
|
1303 kumpf 1.43 yyrule - 1, yylno);
|
1304 karl 1.41 /* The symbols being reduced. */
1305 for (yyi = 0; yyi < yynrhs; yyi++)
1306 {
1307 fprintf (stderr, " $%d = ", yyi + 1);
1308 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
|
1309 kumpf 1.43 &(yyvsp[(yyi + 1) - (yynrhs)])
1310 );
|
1311 karl 1.41 fprintf (stderr, "\n");
1312 }
|
1313 kumpf 1.34 }
1314
|
1315 kumpf 1.43 # define YY_REDUCE_PRINT(Rule) \
1316 do { \
1317 if (yydebug) \
|
1318 karl 1.41 yy_reduce_print (yyvsp, Rule); \
1319 } while (YYID (0))
|
1320 kumpf 1.34
1321 /* Nonzero means print parse trace. It is left uninitialized so that
1322 multiple parsers can coexist. */
1323 int yydebug;
1324 #else /* !YYDEBUG */
1325 # define YYDPRINTF(Args)
|
1326 karl 1.41 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
|
1327 kumpf 1.34 # define YY_STACK_PRINT(Bottom, Top)
1328 # define YY_REDUCE_PRINT(Rule)
1329 #endif /* !YYDEBUG */
1330
1331
1332 /* YYINITDEPTH -- initial size of the parser's stacks. */
|
1333 kumpf 1.43 #ifndef YYINITDEPTH
|
1334 kumpf 1.34 # define YYINITDEPTH 200
1335 #endif
1336
1337 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1338 if the built-in stack extension method is used).
1339
1340 Do not make this value too large; the results are undefined if
|
1341 karl 1.41 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
|
1342 kumpf 1.34 evaluated with infinite-precision integer arithmetic. */
1343
1344 #ifndef YYMAXDEPTH
1345 # define YYMAXDEPTH 10000
|
1346 mike 1.3 #endif
|
1347 kumpf 1.34
1348
1349
1350 #if YYERROR_VERBOSE
1351
1352 # ifndef yystrlen
|
1353 karl 1.41 # if defined __GLIBC__ && defined _STRING_H
|
1354 kumpf 1.34 # define yystrlen strlen
1355 # else
1356 /* Return the length of YYSTR. */
|
1357 karl 1.41 #if (defined __STDC__ || defined __C99__FUNC__ \
1358 || defined __cplusplus || defined _MSC_VER)
|
1359 kumpf 1.34 static YYSIZE_T
1360 yystrlen (const char *yystr)
|
1361 karl 1.41 #else
1362 static YYSIZE_T
|
1363 kumpf 1.34 yystrlen (yystr)
|
1364 karl 1.41 const char *yystr;
1365 #endif
|
1366 kumpf 1.34 {
|
1367 karl 1.41 YYSIZE_T yylen;
1368 for (yylen = 0; yystr[yylen]; yylen++)
|
1369 kumpf 1.34 continue;
|
1370 karl 1.41 return yylen;
|
1371 kumpf 1.34 }
1372 # endif
1373 # endif
1374
1375 # ifndef yystpcpy
|
1376 karl 1.41 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
|
1377 kumpf 1.34 # define yystpcpy stpcpy
1378 # else
1379 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1380 YYDEST. */
|
1381 karl 1.41 #if (defined __STDC__ || defined __C99__FUNC__ \
1382 || defined __cplusplus || defined _MSC_VER)
|
1383 kumpf 1.34 static char *
1384 yystpcpy (char *yydest, const char *yysrc)
|
1385 karl 1.41 #else
1386 static char *
|
1387 kumpf 1.34 yystpcpy (yydest, yysrc)
|
1388 karl 1.41 char *yydest;
1389 const char *yysrc;
1390 #endif
|
1391 kumpf 1.34 {
|
1392 karl 1.41 char *yyd = yydest;
1393 const char *yys = yysrc;
|
1394 kumpf 1.34
1395 while ((*yyd++ = *yys++) != '\0')
1396 continue;
1397
1398 return yyd - 1;
|
1399 kumpf 1.21 }
|
1400 kumpf 1.34 # endif
1401 # endif
|
1402 kumpf 1.21
|
1403 karl 1.41 # ifndef yytnamerr
1404 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1405 quotes and backslashes, so that it's suitable for yyerror. The
1406 heuristic is that double-quoting is unnecessary unless the string
1407 contains an apostrophe, a comma, or backslash (other than
1408 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1409 null, do not copy; instead, return the length of what the result
1410 would have been. */
1411 static YYSIZE_T
1412 yytnamerr (char *yyres, const char *yystr)
1413 {
1414 if (*yystr == '"')
1415 {
1416 YYSIZE_T yyn = 0;
1417 char const *yyp = yystr;
1418
1419 for (;;)
|
1420 kumpf 1.43 switch (*++yyp)
1421 {
1422 case '\'':
1423 case ',':
1424 goto do_not_strip_quotes;
1425
1426 case '\\':
1427 if (*++yyp != '\\')
1428 goto do_not_strip_quotes;
1429 /* Fall through. */
1430 default:
1431 if (yyres)
1432 yyres[yyn] = *yyp;
1433 yyn++;
1434 break;
1435
1436 case '"':
1437 if (yyres)
1438 yyres[yyn] = '\0';
1439 return yyn;
1440 }
|
1441 karl 1.41 do_not_strip_quotes: ;
1442 }
|
1443 mike 1.3
|
1444 karl 1.41 if (! yyres)
1445 return yystrlen (yystr);
|
1446 kumpf 1.34
|
1447 karl 1.41 return yystpcpy (yyres, yystr) - yyres;
1448 }
1449 # endif
|
1450 kumpf 1.34
|
1451 karl 1.41 /* Copy into YYRESULT an error message about the unexpected token
1452 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1453 including the terminating null byte. If YYRESULT is null, do not
1454 copy anything; just return the number of bytes that would be
1455 copied. As a special case, return 0 if an ordinary "syntax error"
1456 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1457 size calculation. */
1458 static YYSIZE_T
1459 yysyntax_error (char *yyresult, int yystate, int yychar)
|
1460 mike 1.3 {
|
1461 karl 1.41 int yyn = yypact[yystate];
|
1462 kumpf 1.34
|
1463 karl 1.41 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1464 return 0;
1465 else
|
1466 kumpf 1.34 {
|
1467 karl 1.41 int yytype = YYTRANSLATE (yychar);
1468 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1469 YYSIZE_T yysize = yysize0;
1470 YYSIZE_T yysize1;
1471 int yysize_overflow = 0;
1472 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1473 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1474 int yyx;
1475
1476 # if 0
1477 /* This is so xgettext sees the translatable formats that are
|
1478 kumpf 1.43 constructed on the fly. */
|
1479 karl 1.41 YY_("syntax error, unexpected %s");
1480 YY_("syntax error, unexpected %s, expecting %s");
1481 YY_("syntax error, unexpected %s, expecting %s or %s");
1482 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1483 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
|
1484 kumpf 1.34 # endif
|
1485 karl 1.41 char *yyfmt;
1486 char const *yyf;
1487 static char const yyunexpected[] = "syntax error, unexpected %s";
1488 static char const yyexpecting[] = ", expecting %s";
1489 static char const yyor[] = " or %s";
1490 char yyformat[sizeof yyunexpected
|
1491 kumpf 1.43 + sizeof yyexpecting - 1
1492 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1493 * (sizeof yyor - 1))];
|
1494 karl 1.41 char const *yyprefix = yyexpecting;
1495
1496 /* Start YYX at -YYN if negative to avoid negative indexes in
|
1497 kumpf 1.43 YYCHECK. */
|
1498 karl 1.41 int yyxbegin = yyn < 0 ? -yyn : 0;
1499
1500 /* Stay within bounds of both yycheck and yytname. */
1501 int yychecklim = YYLAST - yyn + 1;
1502 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1503 int yycount = 1;
1504
1505 yyarg[0] = yytname[yytype];
1506 yyfmt = yystpcpy (yyformat, yyunexpected);
|
1507 kumpf 1.21
|
1508 karl 1.41 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
|
1509 kumpf 1.43 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1510 {
1511 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1512 {
1513 yycount = 1;
1514 yysize = yysize0;
1515 yyformat[sizeof yyunexpected - 1] = '\0';
1516 break;
1517 }
1518 yyarg[yycount++] = yytname[yyx];
1519 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1520 yysize_overflow |= (yysize1 < yysize);
1521 yysize = yysize1;
1522 yyfmt = yystpcpy (yyfmt, yyprefix);
1523 yyprefix = yyor;
1524 }
|
1525 karl 1.41
1526 yyf = YY_(yyformat);
1527 yysize1 = yysize + yystrlen (yyf);
1528 yysize_overflow |= (yysize1 < yysize);
1529 yysize = yysize1;
1530
1531 if (yysize_overflow)
|
1532 kumpf 1.43 return YYSIZE_MAXIMUM;
|
1533 karl 1.41
1534 if (yyresult)
|
1535 kumpf 1.43 {
1536 /* Avoid sprintf, as that infringes on the user's name space.
1537 Don't have undefined behavior even if the translation
1538 produced a string with the wrong number of "%s"s. */
1539 char *yyp = yyresult;
1540 int yyi = 0;
1541 while ((*yyp = *yyf) != '\0')
1542 {
1543 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1544 {
1545 yyp += yytnamerr (yyp, yyarg[yyi++]);
1546 yyf += 2;
1547 }
1548 else
1549 {
1550 yyp++;
1551 yyf++;
1552 }
1553 }
1554 }
|
1555 karl 1.41 return yysize;
|
1556 mike 1.3 }
|
1557 kumpf 1.34 }
|
1558 karl 1.41 #endif /* YYERROR_VERBOSE */
1559
|
1560 kumpf 1.34
1561 /*-----------------------------------------------.
1562 | Release the memory associated to this symbol. |
1563 `-----------------------------------------------*/
1564
|
1565 karl 1.41 /*ARGSUSED*/
1566 #if (defined __STDC__ || defined __C99__FUNC__ \
1567 || defined __cplusplus || defined _MSC_VER)
|
1568 kumpf 1.34 static void
|
1569 karl 1.41 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
|
1570 kumpf 1.34 #else
1571 static void
|
1572 karl 1.41 yydestruct (yymsg, yytype, yyvaluep)
1573 const char *yymsg;
|
1574 kumpf 1.34 int yytype;
1575 YYSTYPE *yyvaluep;
|
1576 kumpf 1.21 #endif
|
1577 kumpf 1.34 {
|
1578 karl 1.41 YYUSE (yyvaluep);
1579
1580 if (!yymsg)
1581 yymsg = "Deleting";
1582 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
|
1583 kumpf 1.21
|
1584 kumpf 1.34 switch (yytype)
|
1585 kumpf 1.21 {
|
1586 kumpf 1.34
1587 default:
|
1588 kumpf 1.43 break;
|
1589 kumpf 1.34 }
1590 }
1591
1592
1593 /* Prevent warnings from -Wmissing-prototypes. */
1594
1595 #ifdef YYPARSE_PARAM
|
1596 karl 1.41 #if defined __STDC__ || defined __cplusplus
|
1597 kumpf 1.34 int yyparse (void *YYPARSE_PARAM);
|
1598 karl 1.41 #else
|
1599 kumpf 1.34 int yyparse ();
|
1600 karl 1.41 #endif
|
1601 kumpf 1.34 #else /* ! YYPARSE_PARAM */
|
1602 karl 1.41 #if defined __STDC__ || defined __cplusplus
|
1603 kumpf 1.34 int yyparse (void);
1604 #else
1605 int yyparse ();
1606 #endif
1607 #endif /* ! YYPARSE_PARAM */
1608
1609
1610
|
1611 karl 1.41 /* The look-ahead symbol. */
|
1612 kumpf 1.34 int yychar;
1613
|
1614 karl 1.41 /* The semantic value of the look-ahead symbol. */
|
1615 kumpf 1.34 YYSTYPE yylval;
1616
1617 /* Number of syntax errors so far. */
1618 int yynerrs;
1619
1620
1621
1622 /*----------.
1623 | yyparse. |
1624 `----------*/
1625
1626 #ifdef YYPARSE_PARAM
|
1627 karl 1.41 #if (defined __STDC__ || defined __C99__FUNC__ \
1628 || defined __cplusplus || defined _MSC_VER)
1629 int
1630 yyparse (void *YYPARSE_PARAM)
1631 #else
1632 int
1633 yyparse (YYPARSE_PARAM)
1634 void *YYPARSE_PARAM;
1635 #endif
|
1636 kumpf 1.34 #else /* ! YYPARSE_PARAM */
|
1637 karl 1.41 #if (defined __STDC__ || defined __C99__FUNC__ \
1638 || defined __cplusplus || defined _MSC_VER)
|
1639 kumpf 1.34 int
1640 yyparse (void)
1641 #else
1642 int
1643 yyparse ()
1644
1645 #endif
|
1646 mike 1.3 #endif
|
1647 kumpf 1.34 {
|
1648 kumpf 1.52
|
1649 karl 1.41 int yystate;
1650 int yyn;
|
1651 kumpf 1.34 int yyresult;
1652 /* Number of tokens to shift before error messages enabled. */
1653 int yyerrstatus;
|
1654 karl 1.41 /* Look-ahead token as an internal (translated) token number. */
|
1655 kumpf 1.34 int yytoken = 0;
|
1656 karl 1.41 #if YYERROR_VERBOSE
1657 /* Buffer for error messages, and its allocated size. */
1658 char yymsgbuf[128];
1659 char *yymsg = yymsgbuf;
1660 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1661 #endif
|
1662 kumpf 1.34
1663 /* Three stacks and their tools:
1664 `yyss': related to states,
1665 `yyvs': related to semantic values,
1666 `yyls': related to locations.
1667
1668 Refer to the stacks thru separate pointers, to allow yyoverflow
1669 to reallocate them elsewhere. */
1670
1671 /* The state stack. */
|
1672 karl 1.41 yytype_int16 yyssa[YYINITDEPTH];
1673 yytype_int16 *yyss = yyssa;
1674 yytype_int16 *yyssp;
|
1675 kumpf 1.34
1676 /* The semantic value stack. */
1677 YYSTYPE yyvsa[YYINITDEPTH];
1678 YYSTYPE *yyvs = yyvsa;
|
1679 karl 1.41 YYSTYPE *yyvsp;
|
1680 kumpf 1.34
1681
1682
|
1683 karl 1.41 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
|
1684 kumpf 1.34
1685 YYSIZE_T yystacksize = YYINITDEPTH;
1686
1687 /* The variables used to return semantic value and location from the
1688 action routines. */
1689 YYSTYPE yyval;
1690
1691
|
1692 karl 1.41 /* The number of symbols on the RHS of the reduced rule.
1693 Keep to zero when no symbol should be popped. */
1694 int yylen = 0;
|
1695 kumpf 1.34
1696 YYDPRINTF ((stderr, "Starting parse\n"));
1697
1698 yystate = 0;
1699 yyerrstatus = 0;
1700 yynerrs = 0;
|
1701 kumpf 1.43 yychar = YYEMPTY; /* Cause a token to be read. */
|
1702 kumpf 1.34
1703 /* Initialize stack pointers.
1704 Waste one element of value and location stack
1705 so that they stay on the same level as the state stack.
1706 The wasted elements are never initialized. */
1707
1708 yyssp = yyss;
1709 yyvsp = yyvs;
1710
1711 goto yysetstate;
1712
1713 /*------------------------------------------------------------.
1714 | yynewstate -- Push a new state, which is found in yystate. |
1715 `------------------------------------------------------------*/
1716 yynewstate:
1717 /* In all cases, when you get here, the value and location stacks
|
1718 karl 1.41 have just been pushed. So pushing a state here evens the stacks. */
|
1719 kumpf 1.34 yyssp++;
1720
1721 yysetstate:
1722 *yyssp = yystate;
1723
1724 if (yyss + yystacksize - 1 <= yyssp)
1725 {
1726 /* Get the current used size of the three stacks, in elements. */
1727 YYSIZE_T yysize = yyssp - yyss + 1;
1728
1729 #ifdef yyoverflow
1730 {
|
1731 kumpf 1.43 /* Give user a chance to reallocate the stack. Use copies of
1732 these so that the &'s don't force the real ones into
1733 memory. */
1734 YYSTYPE *yyvs1 = yyvs;
1735 yytype_int16 *yyss1 = yyss;
1736
1737
1738 /* Each stack pointer address is followed by the size of the
1739 data in use in that stack, in bytes. This used to be a
1740 conditional around just the two extra args, but that might
1741 be undefined if yyoverflow is a macro. */
1742 yyoverflow (YY_("memory exhausted"),
1743 &yyss1, yysize * sizeof (*yyssp),
1744 &yyvs1, yysize * sizeof (*yyvsp),
|
1745 kumpf 1.34
|
1746 kumpf 1.43 &yystacksize);
|
1747 kumpf 1.34
|
1748 kumpf 1.43 yyss = yyss1;
1749 yyvs = yyvs1;
|
1750 kumpf 1.34 }
1751 #else /* no yyoverflow */
1752 # ifndef YYSTACK_RELOCATE
|
1753 karl 1.41 goto yyexhaustedlab;
|
1754 kumpf 1.34 # else
1755 /* Extend the stack our own way. */
1756 if (YYMAXDEPTH <= yystacksize)
|
1757 kumpf 1.43 goto yyexhaustedlab;
|
1758 kumpf 1.34 yystacksize *= 2;
1759 if (YYMAXDEPTH < yystacksize)
|
1760 kumpf 1.43 yystacksize = YYMAXDEPTH;
|
1761 kumpf 1.34
1762 {
|
1763 kumpf 1.43 yytype_int16 *yyss1 = yyss;
1764 union yyalloc *yyptr =
1765 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1766 if (! yyptr)
1767 goto yyexhaustedlab;
1768 YYSTACK_RELOCATE (yyss);
1769 YYSTACK_RELOCATE (yyvs);
|
1770 kumpf 1.34
1771 # undef YYSTACK_RELOCATE
|
1772 kumpf 1.43 if (yyss1 != yyssa)
1773 YYSTACK_FREE (yyss1);
|
1774 kumpf 1.34 }
1775 # endif
1776 #endif /* no yyoverflow */
1777
1778 yyssp = yyss + yysize - 1;
1779 yyvsp = yyvs + yysize - 1;
1780
1781
1782 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
|
1783 kumpf 1.43 (unsigned long int) yystacksize));
|
1784 kumpf 1.34
1785 if (yyss + yystacksize - 1 <= yyssp)
|
1786 kumpf 1.43 YYABORT;
|
1787 kumpf 1.21 }
|
1788 kumpf 1.34
1789 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1790
1791 goto yybackup;
1792
1793 /*-----------.
1794 | yybackup. |
1795 `-----------*/
1796 yybackup:
1797
|
1798 karl 1.41 /* Do appropriate processing given the current state. Read a
1799 look-ahead token if we need one and don't already have one. */
|
1800 kumpf 1.34
|
1801 karl 1.41 /* First try to decide what to do without reference to look-ahead token. */
|
1802 kumpf 1.34 yyn = yypact[yystate];
1803 if (yyn == YYPACT_NINF)
1804 goto yydefault;
1805
|
1806 karl 1.41 /* Not known => get a look-ahead token if don't already have one. */
|
1807 kumpf 1.34
|
1808 karl 1.41 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
|
1809 kumpf 1.34 if (yychar == YYEMPTY)
|
1810 mike 1.3 {
|
1811 kumpf 1.34 YYDPRINTF ((stderr, "Reading a token: "));
1812 yychar = YYLEX;
|
1813 mike 1.3 }
|
1814 kumpf 1.34
1815 if (yychar <= YYEOF)
|
1816 mike 1.3 {
|
1817 kumpf 1.34 yychar = yytoken = YYEOF;
1818 YYDPRINTF ((stderr, "Now at end of input.\n"));
|
1819 dj.gorey 1.29 }
|
1820 kumpf 1.34 else
|
1821 dj.gorey 1.29 {
|
1822 kumpf 1.34 yytoken = YYTRANSLATE (yychar);
|
1823 karl 1.41 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
|
1824 mike 1.3 }
|
1825 kumpf 1.34
1826 /* If the proper action on seeing token YYTOKEN is to reduce or to
1827 detect an error, take that action. */
1828 yyn += yytoken;
1829 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1830 goto yydefault;
1831 yyn = yytable[yyn];
1832 if (yyn <= 0)
|
1833 mike 1.3 {
|
1834 kumpf 1.34 if (yyn == 0 || yyn == YYTABLE_NINF)
|
1835 kumpf 1.43 goto yyerrlab;
|
1836 kumpf 1.34 yyn = -yyn;
1837 goto yyreduce;
|
1838 mike 1.3 }
|
1839 kumpf 1.34
1840 if (yyn == YYFINAL)
1841 YYACCEPT;
1842
|
1843 karl 1.41 /* Count tokens shifted since error; after three, turn off error
1844 status. */
1845 if (yyerrstatus)
1846 yyerrstatus--;
1847
1848 /* Shift the look-ahead token. */
1849 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
|
1850 kumpf 1.34
|
1851 karl 1.41 /* Discard the shifted token unless it is eof. */
|
1852 kumpf 1.34 if (yychar != YYEOF)
1853 yychar = YYEMPTY;
1854
|
1855 karl 1.41 yystate = yyn;
|
1856 kumpf 1.34 *++yyvsp = yylval;
1857
1858 goto yynewstate;
1859
1860
1861 /*-----------------------------------------------------------.
1862 | yydefault -- do the default action for the current state. |
1863 `-----------------------------------------------------------*/
1864 yydefault:
1865 yyn = yydefact[yystate];
1866 if (yyn == 0)
1867 goto yyerrlab;
1868 goto yyreduce;
1869
1870
1871 /*-----------------------------.
1872 | yyreduce -- Do a reduction. |
1873 `-----------------------------*/
|
1874 kumpf 1.21 yyreduce:
|
1875 kumpf 1.34 /* yyn is the number of a rule to reduce with. */
1876 yylen = yyr2[yyn];
1877
1878 /* If YYLEN is nonzero, implement the default value of the action:
1879 `$$ = $1'.
1880
1881 Otherwise, the following line sets YYVAL to garbage.
1882 This behavior is undocumented and Bison
1883 users should not rely upon it. Assigning to YYVAL
1884 unconditionally makes the parser a bit smaller, and it avoids a
1885 GCC warning that YYVAL may be used uninitialized. */
1886 yyval = yyvsp[1-yylen];
1887
1888
1889 YY_REDUCE_PRINT (yyn);
1890 switch (yyn)
1891 {
1892 case 5:
|
1893 karl 1.51 #line 313 "cimmof.y"
|
1894 kumpf 1.34 { /* FIXME: Where do we put directives? */ ;}
1895 break;
1896
1897 case 6:
|
1898 karl 1.51 #line 315 "cimmof.y"
|
1899 kumpf 1.52 {
|
1900 karl 1.41 cimmofParser::Instance()->addQualifier((yyvsp[(1) - (1)].mofqualifier));
1901 delete (yyvsp[(1) - (1)].mofqualifier);
1902 ;}
|
1903 kumpf 1.34 break;
1904
1905 case 7:
|
1906 karl 1.51 #line 320 "cimmof.y"
|
1907 kumpf 1.52 {
|
1908 karl 1.41 cimmofParser::Instance()->addClass((yyvsp[(1) - (1)].mofclass));
1909 ;}
|
1910 kumpf 1.34 break;
1911
1912 case 8:
|
1913 karl 1.51 #line 324 "cimmof.y"
|
1914 karl 1.41 {
1915 cimmofParser::Instance()->addInstance((yyvsp[(1) - (1)].instance));
1916 ;}
|
1917 kumpf 1.34 break;
1918
1919 case 9:
|
1920 karl 1.51 #line 336 "cimmof.y"
|
1921 kumpf 1.34 {
|
1922 karl 1.25 YACCTRACE("classDeclaration");
|
1923 jim.wunderlich 1.36 if (g_currentAliasDecl != String::EMPTY)
|
1924 karl 1.41 cimmofParser::Instance()->addClassAlias(g_currentAliasDecl, (yyval.mofclass), false);
|
1925 kumpf 1.34 ;}
1926 break;
1927
1928 case 10:
|
1929 karl 1.51 #line 344 "cimmof.y"
|
1930 kumpf 1.34 {
1931 // create new instance of class with className and superclassName
1932 // put returned class object on stack
|
1933 karl 1.25 YACCTRACE("classHead:");
|
1934 karl 1.41 (yyval.mofclass) = cimmofParser::Instance()->newClassDecl(*(yyvsp[(3) - (5)].cimnameval), *(yyvsp[(5) - (5)].cimnameval));
1935
|
1936 kumpf 1.34 // put list of qualifiers into class
|
1937 kumpf 1.46 applyQualifierList(g_qualifierList, *(yyval.mofclass));
|
1938 karl 1.41
1939 g_currentAliasRef = *(yyvsp[(4) - (5)].strval);
|
1940 karl 1.25 if (g_currentClass)
1941 delete g_currentClass;
|
1942 karl 1.41 g_currentClass = (yyval.mofclass);
1943 delete (yyvsp[(3) - (5)].cimnameval);
1944 delete (yyvsp[(4) - (5)].strval);
1945 delete (yyvsp[(5) - (5)].cimnameval);
|
1946 kumpf 1.34 ;}
1947 break;
1948
1949 case 11:
|
1950 karl 1.51 #line 363 "cimmof.y"
|
1951 kumpf 1.34 {;}
1952 break;
1953
1954 case 12:
|
1955 karl 1.51 #line 367 "cimmof.y"
|
1956 kumpf 1.52 {
1957 (yyval.cimnameval) = new CIMName(*(yyvsp[(2) - (2)].cimnameval));
|
1958 dmitry.mikulin 1.47 delete (yyvsp[(2) - (2)].cimnameval);
1959 ;}
|
1960 kumpf 1.34 break;
1961
1962 case 13:
|
1963 karl 1.51 #line 372 "cimmof.y"
|
1964 kumpf 1.52 {
1965 (yyval.cimnameval) = new CIMName();
|
1966 dmitry.mikulin 1.47 ;}
|
1967 kumpf 1.34 break;
1968
1969 case 18:
|
1970 karl 1.51 #line 386 "cimmof.y"
|
1971 kumpf 1.34 {
|
1972 karl 1.41 YACCTRACE("classFeature:applyProperty");
1973 cimmofParser::Instance()->applyProperty(*g_currentClass, *(yyvsp[(1) - (1)].property));
|
1974 kumpf 1.52 delete (yyvsp[(1) - (1)].property);
|
1975 karl 1.41 ;}
|
1976 kumpf 1.34 break;
1977
1978 case 19:
|
1979 karl 1.51 #line 392 "cimmof.y"
|
1980 kumpf 1.34 {
|
1981 karl 1.41 YACCTRACE("classFeature:applyMethod");
|
1982 kumpf 1.52 cimmofParser::Instance()->applyMethod(*g_currentClass, *(yyvsp[(1) - (1)].method));
|
1983 karl 1.41 ;}
|
1984 kumpf 1.34 break;
1985
1986 case 20:
|
1987 karl 1.51 #line 397 "cimmof.y"
|
1988 kumpf 1.34 {
|
1989 karl 1.41 YACCTRACE("classFeature:applyProperty");
1990 cimmofParser::Instance()->applyProperty(*g_currentClass, *(yyvsp[(1) - (1)].property));
|
1991 kumpf 1.52 delete (yyvsp[(1) - (1)].property);
|
1992 karl 1.41 ;}
|
1993 kumpf 1.34 break;
1994
1995 case 21:
|
1996 karl 1.51 #line 417 "cimmof.y"
|
1997 kumpf 1.34 {
|
1998 karl 1.41 YACCTRACE("methodDeclaration");
1999 (yyval.method) = (yyvsp[(2) - (4)].method);
|
2000 kumpf 1.34 ;}
2001 break;
2002
2003 case 22:
|
2004 karl 1.51 #line 428 "cimmof.y"
|
2005 kumpf 1.34 {
|
2006 karl 1.25 YACCTRACE("methodHead");
2007 if (g_currentMethod)
|
2008 karl 1.41 delete g_currentMethod;
2009
2010 // create new method instance with pointer to method name and datatype
2011 g_currentMethod = cimmofParser::Instance()->newMethod(*(yyvsp[(2) - (2)].cimnameval), (yyvsp[(1) - (2)].datatype)) ;
|
2012 karl 1.25
|
2013 karl 1.41 // put new method on stack
2014 (yyval.method) = g_currentMethod;
|
2015 karl 1.25
|
2016 karl 1.41 // apply the method qualifier list.
|
2017 kumpf 1.46 applyQualifierList(g_qualifierList, *(yyval.method));
|
2018 karl 1.25
|
2019 karl 1.41 delete (yyvsp[(2) - (2)].cimnameval);
|
2020 kumpf 1.34 ;}
2021 break;
2022
2023 case 25:
|
2024 karl 1.51 #line 453 "cimmof.y"
|
2025 kumpf 1.52 {
2026 (yyval.cimnameval) = new CIMName(*(yyvsp[(1) - (1)].strval));
|
2027 dmitry.mikulin 1.47 delete (yyvsp[(1) - (1)].strval);
2028 ;}
|
2029 kumpf 1.34 break;
2030
2031 case 29:
|
2032 karl 1.51 #line 468 "cimmof.y"
|
2033 karl 1.41 {
2034 // ATTN: P2 2002 Question Need to create default value including type?
2035
2036 YACCTRACE("parameter:");
2037 CIMParameter *p = 0;
2038 cimmofParser *cp = cimmofParser::Instance();
2039
2040 // Create new parameter with name, type, isArray, array, referenceClassName
2041 if ((yyvsp[(4) - (4)].ival) == -1) {
2042 p = cp->newParameter(*(yyvsp[(3) - (4)].cimnameval), (yyvsp[(2) - (4)].datatype), false, 0, g_referenceClassName);
2043 }
2044 else
2045 {
2046 p = cp->newParameter(*(yyvsp[(3) - (4)].cimnameval), (yyvsp[(2) - (4)].datatype), true, (yyvsp[(4) - (4)].ival), g_referenceClassName);
2047 }
2048
2049 g_referenceClassName = CIMName();
2050
2051 YACCTRACE("parameter:applyQualifierList");
|
2052 kumpf 1.46 applyQualifierList(g_qualifierList, *p);
|
2053 karl 1.41
2054 cp->applyParameter(*g_currentMethod, *p);
2055 delete p;
2056 delete (yyvsp[(3) - (4)].cimnameval);
|
2057 kumpf 1.34 ;}
2058 break;
2059
2060 case 30:
|
2061 karl 1.51 #line 495 "cimmof.y"
|
2062 karl 1.41 { (yyval.datatype) = (yyvsp[(1) - (1)].datatype); ;}
|
2063 kumpf 1.34 break;
2064
2065 case 31:
|
2066 karl 1.51 #line 496 "cimmof.y"
|
2067 karl 1.41 { (yyval.datatype) = CIMTYPE_REFERENCE; ;}
|
2068 kumpf 1.34 break;
2069
2070 case 32:
|
2071 karl 1.51 #line 508 "cimmof.y"
|
2072 kumpf 1.34 {
2073 // set body to stack and apply qualifier list
2074 // ATTN: the apply qualifer only works here because
2075 // there are not lower level qualifiers. We do productions
2076 // that might have lower level qualifiers differently by
|
2077 karl 1.41 // setting up a xxxHead production where qualifiers are
|
2078 kumpf 1.34 // applied.
|
2079 karl 1.25 YACCTRACE("propertyDeclaration:");
|
2080 karl 1.41 (yyval.property) = (yyvsp[(2) - (3)].property);
|
2081 kumpf 1.46 applyQualifierList(g_qualifierList, *(yyval.property));
|
2082 kumpf 1.34 ;}
2083 break;
2084
2085 case 33:
|
2086 karl 1.51 #line 522 "cimmof.y"
|
2087 kumpf 1.34 {
|
2088 karl 1.41 CIMValue *v = valueFactory::createValue((yyvsp[(1) - (4)].datatype), (yyvsp[(3) - (4)].ival),
2089 ((yyvsp[(4) - (4)].typedinitializer)->type == CIMMOF_NULL_VALUE), (yyvsp[(4) - (4)].typedinitializer)->value);
|
2090 kumpf 1.52 if ((yyvsp[(3) - (4)].ival) == -1)
|
2091 karl 1.41 {
2092 (yyval.property) = cimmofParser::Instance()->newProperty(*(yyvsp[(2) - (4)].cimnameval), *v, false, 0);
|
2093 kumpf 1.52 }
2094 else
|
2095 karl 1.41 {
2096 (yyval.property) = cimmofParser::Instance()->newProperty(*(yyvsp[(2) - (4)].cimnameval), *v, true, (yyvsp[(3) - (4)].ival));
2097 }
2098
2099 delete (yyvsp[(2) - (4)].cimnameval);
2100 delete (yyvsp[(4) - (4)].typedinitializer)->value;
2101 delete v;
|
2102 kumpf 1.34 ;}
2103 break;
2104
2105 case 35:
|
2106 karl 1.51 #line 553 "cimmof.y"
|
2107 kumpf 1.34 {
|
2108 karl 1.41 String s(*(yyvsp[(2) - (6)].strval));
2109 if (!String::equal(*(yyvsp[(5) - (6)].strval), String::EMPTY))
2110 s.append("." + *(yyvsp[(5) - (6)].strval));
2111 CIMValue *v = valueFactory::createValue(CIMTYPE_REFERENCE, -1, true, &s);
2112 //KS add the isArray and arraysize parameters. 8 mar 2002
2113 (yyval.property) = cimmofParser::Instance()->newProperty(*(yyvsp[(4) - (6)].strval), *v, false,0, *(yyvsp[(2) - (6)].strval));
|
2114 kumpf 1.46 applyQualifierList(g_qualifierList, *(yyval.property));
|
2115 karl 1.41 delete (yyvsp[(2) - (6)].strval);
2116 delete (yyvsp[(4) - (6)].strval);
2117 delete (yyvsp[(5) - (6)].strval);
2118 delete v;
|
2119 kumpf 1.34 ;}
2120 break;
2121
2122 case 36:
|
2123 karl 1.51 #line 568 "cimmof.y"
|
2124 karl 1.41 { (yyval.strval) = (yyvsp[(1) - (1)].strval); ;}
|
2125 kumpf 1.34 break;
2126
2127 case 37:
|
2128 karl 1.51 #line 571 "cimmof.y"
|
2129 karl 1.41 { (yyval.strval) = (yyvsp[(1) - (1)].strval); ;}
|
2130 kumpf 1.34 break;
2131
2132 case 38:
|
2133 karl 1.51 #line 574 "cimmof.y"
|
2134 karl 1.41 { (yyval.strval) = (yyvsp[(2) - (2)].strval); ;}
|
2135 kumpf 1.34 break;
2136
2137 case 39:
|
2138 karl 1.51 #line 575 "cimmof.y"
|
2139 karl 1.41 { (yyval.strval) = new String(String::EMPTY); ;}
|
2140 kumpf 1.34 break;
2141
2142 case 40:
|
2143 karl 1.51 #line 579 "cimmof.y"
|
2144 karl 1.41 {
|
2145 kumpf 1.52 g_referenceClassName = *(yyvsp[(1) - (2)].cimnameval);
|
2146 dmitry.mikulin 1.47 delete (yyvsp[(1) - (2)].cimnameval);
2147 ;}
|
2148 kumpf 1.34 break;
2149
2150 case 41:
|
2151 karl 1.51 #line 586 "cimmof.y"
|
2152 kumpf 1.52 {
2153 (yyval.cimnameval) = new CIMName(*(yyvsp[(1) - (1)].strval));
|
2154 dmitry.mikulin 1.47 delete (yyvsp[(1) - (1)].strval);
2155 ;}
|
2156 kumpf 1.34 break;
2157
2158 case 42:
|
2159 karl 1.51 #line 593 "cimmof.y"
|
2160 kumpf 1.52 {
2161 (yyval.cimnameval) = new CIMName(*(yyvsp[(1) - (1)].strval));
|
2162 dmitry.mikulin 1.47 delete (yyvsp[(1) - (1)].strval);
2163 ;}
|
2164 kumpf 1.34 break;
2165
2166 case 43:
|
2167 karl 1.51 #line 601 "cimmof.y"
|
2168 kumpf 1.43 {
|
2169 kumpf 1.44 (yyval.ival) = (Uint32) valueFactory::stringToUint(*(yyvsp[(2) - (3)].strval), CIMTYPE_UINT32);
|
2170 karl 1.41 delete (yyvsp[(2) - (3)].strval);
2171 ;}
|
2172 kumpf 1.34 break;
2173
2174 case 44:
|
2175 karl 1.51 #line 606 "cimmof.y"
|
2176 karl 1.41 { (yyval.ival) = 0; ;}
|
2177 kumpf 1.34 break;
2178
2179 case 45:
|
2180 karl 1.51 #line 608 "cimmof.y"
|
2181 karl 1.41 { (yyval.ival) = -1; ;}
|
2182 kumpf 1.34 break;
2183
2184 case 46:
|
2185 karl 1.51 #line 611 "cimmof.y"
|
2186 karl 1.41 { (yyval.typedinitializer) = (yyvsp[(2) - (2)].typedinitializer); ;}
|
2187 kumpf 1.34 break;
2188
2189 case 47:
|
2190 karl 1.51 #line 613 "cimmof.y"
|
2191 kumpf 1.34 { /* empty */
|
2192 karl 1.41 g_typedInitializerValue.type = CIMMOF_NULL_VALUE;
2193 g_typedInitializerValue.value = new String(String::EMPTY);
2194 (yyval.typedinitializer) = &g_typedInitializerValue;
2195 ;}
|
2196 kumpf 1.34 break;
2197
2198 case 48:
|
2199 karl 1.51 #line 621 "cimmof.y"
|
2200 karl 1.41 { (yyval.strval) = (yyvsp[(1) - (1)].strval); ;}
|
2201 kumpf 1.34 break;
2202
2203 case 49:
|
2204 karl 1.51 #line 623 "cimmof.y"
|
2205 karl 1.41 { (yyval.strval) = (yyvsp[(1) - (1)].strval); ;}
|
2206 kumpf 1.34 break;
2207
2208 case 50:
|
2209 karl 1.51 #line 625 "cimmof.y"
|
2210 karl 1.41 { (yyval.strval) = (yyvsp[(1) - (1)].strval); ;}
|
2211 kumpf 1.34 break;
2212
2213 case 51:
|
2214 karl 1.51 #line 632 "cimmof.y"
|
2215 karl 1.41 {
2216 g_typedInitializerValue.type = CIMMOF_CONSTANT_VALUE;
2217 g_typedInitializerValue.value = (yyvsp[(1) - (1)].strval);
2218 (yyval.typedinitializer) = &g_typedInitializerValue;
2219 ;}
|
2220 kumpf 1.34 break;
2221
2222 case 52:
|
2223 karl 1.51 #line 638 "cimmof.y"
|
2224 kumpf 1.34 {
|
2225 karl 1.41 g_typedInitializerValue.type = CIMMOF_NULL_VALUE;
2226 g_typedInitializerValue.value = new String(String::EMPTY);
2227 (yyval.typedinitializer) = &g_typedInitializerValue;
2228 ;}
|
2229 kumpf 1.34 break;
2230
2231 case 53:
|
2232 karl 1.51 #line 644 "cimmof.y"
|
2233 karl 1.41 {
2234 g_typedInitializerValue.type = CIMMOF_ARRAY_VALUE;
2235 g_typedInitializerValue.value = (yyvsp[(1) - (1)].strval);
2236 (yyval.typedinitializer) = &g_typedInitializerValue;
2237 ;}
|
2238 kumpf 1.34 break;
2239
2240 case 54:
|
2241 karl 1.51 #line 650 "cimmof.y"
|
2242 karl 1.41 {
2243 g_typedInitializerValue.type = CIMMOF_REFERENCE_VALUE;
2244 g_typedInitializerValue.value = (yyvsp[(1) - (1)].strval);
2245 (yyval.typedinitializer) = &g_typedInitializerValue;
2246 ;}
|
2247 kumpf 1.34 break;
2248
2249 case 55:
|
2250 karl 1.51 #line 660 "cimmof.y"
|
2251 karl 1.41 {
2252 *(yyval.strval) = valueFactory::stringWComma(String(*(yyvsp[(1) - (1)].strval))); ;}
|
2253 kumpf 1.34 break;
2254
2255 case 56:
|
2256 karl 1.51 #line 663 "cimmof.y"
|
2257 kumpf 1.34 {
|
2258 karl 1.41 YACCTRACE("constantValues:1, Value= " << *(yyvsp[(3) - (3)].strval));
2259 (*(yyval.strval)).append(",");
2260 //(*$$).append(*$3);
2261 (*(yyval.strval)).append(valueFactory::stringWComma(String(*(yyvsp[(3) - (3)].strval))));
2262 delete (yyvsp[(3) - (3)].strval);
2263 ;}
|
2264 kumpf 1.34 break;
2265
2266 case 57:
|
2267 karl 1.51 #line 676 "cimmof.y"
|
2268 karl 1.41 {(yyval.strval) = (yyvsp[(1) - (1)].strval);;}
|
2269 kumpf 1.34 break;
2270
2271 case 58:
|
2272 karl 1.51 #line 678 "cimmof.y"
|
2273 karl 1.41 { (yyval.strval) = new String(String::EMPTY); ;}
|
2274 kumpf 1.34 break;
2275
2276 case 59:
|
2277 karl 1.51 #line 681 "cimmof.y"
|
2278 karl 1.41 { (yyval.strval) = (yyvsp[(1) - (1)].strval); ;}
|
2279 kumpf 1.34 break;
2280
2281 case 60:
|
2282 karl 1.51 #line 683 "cimmof.y"
|
2283 karl 1.41 { (yyval.strval) = (yyvsp[(1) - (1)].strval); ;}
|
2284 kumpf 1.34 break;
2285
2286 case 61:
|
2287 karl 1.51 #line 685 "cimmof.y"
|
2288 karl 1.41 { (yyval.strval) = (yyvsp[(1) - (1)].strval); ;}
|
2289 kumpf 1.34 break;
2290
2291 case 62:
|
2292 karl 1.51 #line 687 "cimmof.y"
|
2293 kumpf 1.34 { ;}
2294 break;
2295
2296 case 63:
|
2297 karl 1.51 #line 689 "cimmof.y"
|
2298 karl 1.41 {
2299 (yyval.strval) = new String((yyvsp[(1) - (1)].ival) ? "T" : "F");
2300 ;}
|
2301 kumpf 1.34 break;
2302
|
2303 kumpf 1.43 case 69:
|
2304 karl 1.51 #line 702 "cimmof.y"
|
2305 karl 1.41 { (yyval.ival) = 0; ;}
|
2306 kumpf 1.34 break;
2307
2308 case 70:
|
2309 karl 1.51 #line 704 "cimmof.y"
|
2310 karl 1.41 { (yyval.ival) = 1; ;}
|
2311 kumpf 1.34 break;
2312
2313 case 71:
|
2314 karl 1.51 #line 707 "cimmof.y"
|
2315 karl 1.41 { (yyval.strval) = (yyvsp[(1) - (1)].strval); ;}
|
2316 kumpf 1.34 break;
2317
2318 case 72:
|
2319 karl 1.51 #line 709 "cimmof.y"
|
2320 karl 1.41 {
2321 (*(yyval.strval)).append(*(yyvsp[(2) - (2)].strval)); delete (yyvsp[(2) - (2)].strval);
2322 ;}
|
2323 kumpf 1.34 break;
2324
2325 case 73:
|
2326 karl 1.51 #line 715 "cimmof.y"
|
2327 karl 1.41 {
|
2328 kumpf 1.34 //String oldrep = *$1;
2329 //String s(oldrep), s1(String::EMPTY);
2330 // Handle quoted quote
2331 //int len = s.size();
2332 //if (s[len] == '\n') {
2333 //error: new line inside a string constant unless it is quoted
2334 //if (s[len - 2] == '\\') {
2335 //if (len > 3)
|
2336 karl 1.41 //s1 = s.subString(1, len-3);
|
2337 kumpf 1.34 //} else {
2338 //cimmof_error("New line in string constant");
2339 //}
2340 //cimmofParser::Instance()->increment_lineno();
2341 //} else { // Can only be a quotation mark
2342 //if (s[len - 2] == '\\') { // if it is quoted
2343 //if (len > 3) s1 = s.subString(1, len-3);
2344 //s1.append('\"');
2345 //cimmof_yy_less(len-1);
2346 //} else { // This is the normal case: real quotes on both end
2347 //s1 = s.subString(1, len - 2) ;
2348 //}
2349 //}
2350 //delete $1;
|
2351 karl 1.41 (yyval.strval) = //new String(s1);
2352 new String(*(yyvsp[(1) - (1)].strval));
2353 delete (yyvsp[(1) - (1)].strval);
|
2354 kumpf 1.34 ;}
2355 break;
2356
2357 case 74:
|
2358 karl 1.51 #line 747 "cimmof.y"
|
2359 karl 1.41 { (yyval.strval) = (yyvsp[(2) - (3)].strval); ;}
|
2360 kumpf 1.34 break;
2361
2362 case 75:
|
2363 karl 1.51 #line 749 "cimmof.y"
|
2364 karl 1.41 { (yyval.strval) = new String(String::EMPTY); ;}
|
2365 kumpf 1.34 break;
2366
2367 case 76:
|
2368 karl 1.51 #line 752 "cimmof.y"
|
2369 kumpf 1.34 {;}
2370 break;
2371
2372 case 77:
|
2373 karl 1.51 #line 753 "cimmof.y"
|
2374 kumpf 1.34 { ;}
2375 break;
2376
2377 case 78:
|
2378 karl 1.51 #line 757 "cimmof.y"
|
2379 karl 1.41 {
|
2380 kumpf 1.45 // The objectName string is decomposed for syntactical validation purposes
2381 // and reassembled here for later parsing in creation of an CIMObjectPath
2382 // instance
|
2383 karl 1.41 String *s = new String(*(yyvsp[(2) - (4)].strval));
2384 if (!String::equal(*s, String::EMPTY) && (yyvsp[(3) - (4)].modelpath))
2385 (*s).append(":");
2386 if ((yyvsp[(3) - (4)].modelpath)) {
|
2387 kumpf 1.45 (*s).append((yyvsp[(3) - (4)].modelpath)->toString());
|
2388 karl 1.41 }
2389 (yyval.strval) = s;
2390 delete (yyvsp[(2) - (4)].strval);
2391 delete (yyvsp[(3) - (4)].modelpath);
2392 MOF_trace2 ("objectHandle done $$ = ", (yyval.strval)->getCString());
|
2393 kumpf 1.34 ;}
2394 break;
2395
2396 case 79:
|
2397 karl 1.51 #line 775 "cimmof.y"
|
2398 jim.wunderlich 1.36 {
2399
|
2400 karl 1.41 CIMObjectPath AOP;
2401
2402 MOF_trace2("aliasInitializer $$ = ", (yyval.strval)->getCString());
2403 MOF_trace2("aliasInitializer $1 = ", (yyvsp[(1) - (1)].strval)->getCString());
|
2404 jim.wunderlich 1.36
|
2405 karl 1.41 g_currentAliasRef = *(yyval.strval);
|
2406 jim.wunderlich 1.36
|
2407 karl 1.41 MOF_trace2("aliasInitializer g_currentAliasRef = ",
2408 g_currentAliasRef.getCString());
2409 if (cimmofParser::Instance()->getInstanceAlias(g_currentAliasRef, AOP) == 0)
|
2410 kumpf 1.34 {
|
2411 karl 1.41 yyerror("aliasInitializer - 'aliasIdentifier' NOT FOUND");
2412 YYABORT;
|
2413 jim.wunderlich 1.36 }
2414
|
2415 karl 1.41 String *s = new String(AOP.toString());
2416
2417 (yyval.strval) = s;
2418
2419 delete (yyvsp[(1) - (1)].strval);
|
2420 jim.wunderlich 1.36
|
2421 karl 1.41 MOF_trace2 ("aliasInitializer done $$ = ", (yyval.strval)->getCString());
|
2422 jim.wunderlich 1.36
2423 ;}
|
2424 kumpf 1.34 break;
2425
2426 case 80:
|
2427 karl 1.51 #line 804 "cimmof.y"
|
2428 kumpf 1.34 { ;}
2429 break;
2430
2431 case 81:
|
2432 karl 1.51 #line 805 "cimmof.y"
|
2433 karl 1.41 { (yyval.strval) = new String(String::EMPTY); ;}
|
2434 kumpf 1.34 break;
2435
2436 case 82:
|
2437 karl 1.51 #line 808 "cimmof.y"
|
2438 kumpf 1.34 {;}
2439 break;
2440
2441 case 83:
|
2442 karl 1.51 #line 811 "cimmof.y"
|
2443 kumpf 1.34 {
|
2444 kumpf 1.45 CIMObjectPath *m = new CIMObjectPath(
2445 String::EMPTY,
2446 CIMNamespaceName(),
2447 (*(yyvsp[(1) - (3)].cimnameval)).getString(),
2448 g_KeyBindingArray);
|
2449 karl 1.41 g_KeyBindingArray.clear();
2450 delete (yyvsp[(1) - (3)].cimnameval);;}
|
2451 kumpf 1.34 break;
2452
2453 case 84:
|
2454 karl 1.51 #line 822 "cimmof.y"
|
2455 karl 1.41 { (yyval.ival) = 0; ;}
|
2456 kumpf 1.34 break;
2457
2458 case 85:
|
2459 karl 1.51 #line 824 "cimmof.y"
|
2460 karl 1.41 { (yyval.ival) = 0; ;}
|
2461 kumpf 1.34 break;
2462
2463 case 86:
|
2464 karl 1.51 #line 828 "cimmof.y"
|
2465 kumpf 1.34 {
|
2466 kumpf 1.45 CIMKeyBinding::Type keyBindingType;
2467 Char16 firstChar = (*(yyvsp[(3) - (3)].strval))[0];
2468 if (firstChar = '\"')
2469 keyBindingType = CIMKeyBinding::STRING;
2470 else if ((firstChar == 'T') || (firstChar == 't') ||
2471 (firstChar == 'F') || (firstChar == 'f'))
2472 keyBindingType = CIMKeyBinding::BOOLEAN;
2473 else
2474 keyBindingType = CIMKeyBinding::NUMERIC;
2475 CIMKeyBinding *kb = new CIMKeyBinding(*(yyvsp[(1) - (3)].strval), *(yyvsp[(3) - (3)].strval), keyBindingType);
|
2476 karl 1.41 g_KeyBindingArray.append(*kb);
2477 delete kb;
2478 delete (yyvsp[(1) - (3)].strval);
|
2479 kumpf 1.52 delete (yyvsp[(3) - (3)].strval);
|
2480 karl 1.41 ;}
|
2481 kumpf 1.34 break;
2482
2483 case 88:
|
2484 karl 1.51 #line 850 "cimmof.y"
|
2485 jim.wunderlich 1.36 {
|
2486 karl 1.41 (yyval.strval) = (yyvsp[(2) - (2)].strval);
2487 g_currentAliasDecl = *(yyvsp[(2) - (2)].strval);
2488 MOF_trace2("aliasIdentifier $$ = ", (yyval.strval)->getCString());
2489 MOF_trace2("aliasIdentifier g_currentAliasDecl = ",
2490 g_currentAliasDecl.getCString());
|
2491 jim.wunderlich 1.36
|
2492 karl 1.41 ;}
|
2493 kumpf 1.34 break;
2494
2495 case 89:
|
2496 karl 1.51 #line 858 "cimmof.y"
|
2497 karl 1.41 {
2498 (yyval.strval) = new String(String::EMPTY);
2499 g_currentAliasDecl = String::EMPTY;}
|
2500 kumpf 1.34 break;
2501
2502 case 91:
|
2503 karl 1.51 #line 875 "cimmof.y"
|
2504 karl 1.41 {
2505 (yyval.instance) = g_currentInstance;
2506 if (g_currentAliasDecl != String::EMPTY)
|
2507 jim.wunderlich 1.36 {
|
2508 karl 1.41 MOF_trace2("instanceDeclaration g_currentAliasDecl = ",
2509 g_currentAliasDecl.getCString());
2510 // MOF_trace2 ("instanceDeclaration instance =
2511 // ", ((CIMObject *)$$)->toString().getCString());
2512 if (cimmofParser::Instance()->addInstanceAlias(
2513 g_currentAliasDecl, (yyval.instance), true) == 0)
2514 {
2515 // Error alias already exist
2516 MOF_error("ERROR: alias ALREADY EXISTS: aliasIdentifier = ",
2517 g_currentAliasDecl.getCString());
2518 yyerror("instanceDeclaration - 'aliasIdentifier' ALREADY EXISTS");
2519 YYABORT;
2520 }
|
2521 jim.wunderlich 1.36 }
|
2522 kumpf 1.34 ;}
2523 break;
2524
2525 case 92:
|
2526 karl 1.51 #line 898 "cimmof.y"
|
2527 kumpf 1.34 {
|
2528 karl 1.41 if (g_currentInstance)
2529 delete g_currentInstance;
2530 g_currentAliasDecl = *(yyvsp[(5) - (5)].strval);
2531 g_currentInstance = cimmofParser::Instance()->newInstance(*(yyvsp[(4) - (5)].cimnameval));
2532 // apply the qualifierlist to the current instance
2533 (yyval.instance) = g_currentInstance;
|
2534 kumpf 1.46 applyQualifierList(g_qualifierList, *(yyval.instance));
|
2535 karl 1.41 delete (yyvsp[(4) - (5)].cimnameval);
2536 delete (yyvsp[(5) - (5)].strval);
2537 if (g_currentAliasDecl != String::EMPTY)
2538 MOF_trace2("instanceHead g_currentAliasDecl = ",
2539 g_currentAliasDecl.getCString());
|
2540 kumpf 1.34 ;}
2541 break;
2542
2543 case 96:
|
2544 karl 1.51 #line 930 "cimmof.y"
|
2545 kumpf 1.34 {
|
2546 kumpf 1.48 AutoPtr<String> identifier((yyvsp[(2) - (5)].strval));
|
2547 karl 1.41 cimmofParser *cp = cimmofParser::Instance();
2548 // ATTN: P1 InstanceUpdate function 2001 BB Instance update needs
2549 // work here and CIMOM
2550 // a property. It must be fixed in the Common code first.
2551 // What we have to do here is create a CIMProperty and initialize it with
2552 // the value provided. The name of the property is $2 and it belongs
2553 // to the class whose name is in g_currentInstance->getClassName().
2554 // The steps are
2555 // 2. Get property declaration's value object
|
2556 kumpf 1.48 CIMProperty *oldprop =
2557 cp->PropertyFromInstance(*g_currentInstance, *identifier);
|
2558 karl 1.41 CIMValue *oldv = cp->ValueFromProperty(*oldprop);
2559
2560 // 3. create the new Value object of the same type
2561
2562 // We want createValue to interpret a value as an array if is enclosed
2563 // in {}s (e.g., { 2 } or {2, 3, 5}) or it is NULL and the property is
2564 // defined as an array. createValue is responsible for the actual
2565 // validation.
2566
2567 CIMValue *v = valueFactory::createValue(oldv->getType(),
|
2568 kumpf 1.49 (((yyvsp[(4) - (5)].typedinitializer)->type == CIMMOF_ARRAY_VALUE) ||
2569 (((yyvsp[(4) - (5)].typedinitializer)->type == CIMMOF_NULL_VALUE) && oldprop->isArray()))?0:-1,
|
2570 karl 1.41 ((yyvsp[(4) - (5)].typedinitializer)->type == CIMMOF_NULL_VALUE),
2571 (yyvsp[(4) - (5)].typedinitializer)->value);
2572
2573
2574 // 4. create a clone property with the new value
2575 CIMProperty *newprop = cp->copyPropertyWithNewValue(*oldprop, *v);
2576
2577 // 5. apply the qualifiers;
|
2578 kumpf 1.46 applyQualifierList(g_qualifierList, *newprop);
|
2579 karl 1.41
2580 // 6. and apply the CIMProperty to g_currentInstance.
2581 cp->applyProperty(*g_currentInstance, *newprop);
2582 delete (yyvsp[(4) - (5)].typedinitializer)->value;
2583 delete oldprop;
2584 delete oldv;
2585 delete v;
2586 delete newprop;
|
2587 kumpf 1.34 ;}
2588 break;
2589
2590 case 97:
|
2591 karl 1.51 #line 987 "cimmof.y"
|
2592 kumpf 1.34 {
|
2593 karl 1.41 //printf("compilerDirectiveInclude ");
2594 ;}
|
2595 kumpf 1.34 break;
2596
2597 case 98:
|
2598 karl 1.51 #line 991 "cimmof.y"
|
2599 kumpf 1.34 {
|
2600 karl 1.41 //printf("compilerDirectivePragma ");
2601 ;}
|
2602 kumpf 1.34 break;
2603
2604 case 99:
|
2605 karl 1.51 #line 998 "cimmof.y"
|
2606 kumpf 1.34 {
|
2607 karl 1.41 cimmofParser::Instance()->enterInlineInclude(*(yyvsp[(4) - (5)].strval)); delete (yyvsp[(4) - (5)].strval);
2608 ;}
|
2609 kumpf 1.34 break;
2610
2611 case 100:
|
2612 karl 1.51 #line 1003 "cimmof.y"
|
2613 karl 1.41 { (yyval.strval) = (yyvsp[(1) - (1)].strval); ;}
|
2614 kumpf 1.34 break;
2615
2616 case 101:
|
2617 karl 1.51 #line 1008 "cimmof.y"
|
2618 karl 1.41 {
2619 cimmofParser::Instance()->processPragma(*(yyvsp[(2) - (5)].strval), *(yyvsp[(4) - (5)].strval));
2620 delete (yyvsp[(2) - (5)].strval);
2621 delete (yyvsp[(4) - (5)].strval);
2622 ;}
|
2623 kumpf 1.34 break;
2624
2625 case 102:
|
2626 karl 1.51 #line 1027 "cimmof.y"
|
2627 kumpf 1.34 {
|
2628 karl 1.41 (yyval.mofqualifier) = cimmofParser::Instance()->newQualifierDecl(*(yyvsp[(2) - (6)].strval), (yyvsp[(3) - (6)].value), *(yyvsp[(4) - (6)].scope), *(yyvsp[(5) - (6)].flavor));
|
2629 dmitry.mikulin 1.47 delete (yyvsp[(2) - (6)].strval);
|
2630 karl 1.41 delete (yyvsp[(3) - (6)].value); // CIMValue object created in qualifierValue production
|
2631 dmitry.mikulin 1.47 delete (yyvsp[(4) - (6)].scope); // CIMScope object created in scope/metaElements production
|
2632 kumpf 1.34 ;}
2633 break;
2634
2635 case 103:
|
2636 karl 1.51 #line 1036 "cimmof.y"
|
2637 kumpf 1.34 {
|
2638 karl 1.41 (yyval.value) = valueFactory::createValue((yyvsp[(2) - (4)].datatype), (yyvsp[(3) - (4)].ival),
2639 ((yyvsp[(4) - (4)].typedinitializer)->type == CIMMOF_NULL_VALUE),
2640 (yyvsp[(4) - (4)].typedinitializer)->value);
2641 delete (yyvsp[(4) - (4)].typedinitializer)->value;
|
2642 kumpf 1.34 ;}
2643 break;
2644
2645 case 104:
|
2646 karl 1.51 #line 1044 "cimmof.y"
|
2647 karl 1.41 { (yyval.scope) = (yyvsp[(2) - (3)].scope); ;}
|
2648 kumpf 1.34 break;
2649
2650 case 105:
|
2651 karl 1.51 #line 1048 "cimmof.y"
|
2652 karl 1.41 {
2653 g_scope = CIMScope (CIMScope::NONE);
2654 ;}
|
2655 kumpf 1.34 break;
2656
2657 case 106:
|
2658 karl 1.51 #line 1053 "cimmof.y"
|
2659 karl 1.41 { (yyval.scope) = (yyvsp[(1) - (1)].scope); ;}
|
2660 kumpf 1.34 break;
2661
2662 case 107:
|
2663 karl 1.51 #line 1055 "cimmof.y"
|
2664 kumpf 1.52 {
2665 (yyval.scope)->addScope(*(yyvsp[(3) - (3)].scope));
|
2666 dmitry.mikulin 1.47 delete (yyvsp[(3) - (3)].scope);
2667 ;}
|
2668 kumpf 1.34 break;
2669
2670 case 108:
|
2671 karl 1.51 #line 1062 "cimmof.y"
|
2672 karl 1.41 { (yyval.scope) = new CIMScope(CIMScope::CLASS); ;}
|
2673 kumpf 1.34 break;
2674
2675 case 109:
|
2676 karl 1.51 #line 1064 "cimmof.y"
|
2677 karl 1.41 { (yyval.scope) = new CIMScope(CIMScope::CLASS); ;}
|
2678 kumpf 1.34 break;
2679
2680 case 110:
|
2681 karl 1.51 #line 1065 "cimmof.y"
|
2682 karl 1.41 { (yyval.scope) = new CIMScope(CIMScope::ASSOCIATION); ;}
|
2683 kumpf 1.34 break;
2684
2685 case 111:
|
2686 karl 1.51 #line 1066 "cimmof.y"
|
2687 karl 1.41 { (yyval.scope) = new CIMScope(CIMScope::INDICATION); ;}
|
2688 kumpf 1.34 break;
2689
2690 case 112:
|
2691 karl 1.51 #line 1068 "cimmof.y"
|
2692 karl 1.41 { (yyval.scope) = new CIMScope(CIMScope::PROPERTY); ;}
|
2693 kumpf 1.34 break;
2694
2695 case 113:
|
2696 karl 1.51 #line 1069 "cimmof.y"
|
2697 karl 1.41 { (yyval.scope) = new CIMScope(CIMScope::REFERENCE); ;}
|
2698 kumpf 1.34 break;
2699
2700 case 114:
|
2701 karl 1.51 #line 1070 "cimmof.y"
|
2702 karl 1.41 { (yyval.scope) = new CIMScope(CIMScope::METHOD); ;}
|
2703 kumpf 1.34 break;
2704
2705 case 115:
|
2706 karl 1.51 #line 1071 "cimmof.y"
|
2707 karl 1.41 { (yyval.scope) = new CIMScope(CIMScope::PARAMETER); ;}
|
2708 kumpf 1.34 break;
2709
2710 case 116:
|
2711 karl 1.51 #line 1072 "cimmof.y"
|
2712 karl 1.41 { (yyval.scope) = new CIMScope(CIMScope::ANY); ;}
|
2713 kumpf 1.34 break;
2714
2715 case 117:
|
2716 karl 1.51 #line 1077 "cimmof.y"
|
2717 karl 1.41 { (yyval.flavor) = &g_flavor; ;}
|
2718 kumpf 1.34 break;
2719
2720 case 118:
|
2721 karl 1.51 #line 1079 "cimmof.y"
|
2722 dmitry.mikulin 1.47 {
2723 g_flavor = CIMFlavor (CIMFlavor::NONE);
2724 (yyval.flavor) = &g_flavor;
2725 ;}
|
2726 kumpf 1.34 break;
2727
2728 case 119:
|
2729 karl 1.51 #line 1089 "cimmof.y"
|
2730 kumpf 1.34 {g_flavor = CIMFlavor (CIMFlavor::NONE);;}
2731 break;
2732
2733 case 122:
|
2734 karl 1.51 #line 1108 "cimmof.y"
|
2735 kumpf 1.34 { g_flavor.addFlavor (CIMFlavor::ENABLEOVERRIDE); ;}
2736 break;
2737
2738 case 123:
|
2739 karl 1.51 #line 1109 "cimmof.y"
|
2740 kumpf 1.34 { g_flavor.addFlavor (CIMFlavor::DISABLEOVERRIDE); ;}
2741 break;
2742
2743 case 124:
|
2744 karl 1.51 #line 1110 "cimmof.y"
|
2745 kumpf 1.34 { g_flavor.addFlavor (CIMFlavor::RESTRICTED); ;}
2746 break;
2747
2748 case 125:
|
2749 karl 1.51 #line 1111 "cimmof.y"
|
2750 kumpf 1.53 { g_flavor.addFlavor (CIMFlavor::TOSUBCLASS); ;}
|
2751 kumpf 1.34 break;
2752
2753 case 126:
|
2754 karl 1.51 #line 1112 "cimmof.y"
|
2755 kumpf 1.34 { g_flavor.addFlavor (CIMFlavor::TRANSLATABLE); ;}
2756 break;
2757
2758 case 127:
|
2759 karl 1.51 #line 1115 "cimmof.y"
|
2760 karl 1.41 { (yyval.flavor) = &g_flavor; ;}
|
2761 kumpf 1.34 break;
2762
2763 case 128:
|
2764 karl 1.51 #line 1117 "cimmof.y"
|
2765 kumpf 1.52 {
|
2766 kumpf 1.48 g_flavor = CIMFlavor (CIMFlavor::NONE);
2767 (yyval.flavor) = &g_flavor;
2768 ;}
|
2769 kumpf 1.34 break;
2770
2771 case 131:
|
2772 karl 1.51 #line 1128 "cimmof.y"
|
2773 karl 1.41 { (yyval.datatype) = (yyvsp[(1) - (1)].datatype); ;}
|
2774 kumpf 1.34 break;
2775
2776 case 132:
|
2777 karl 1.51 #line 1129 "cimmof.y"
|
2778 karl 1.41 { (yyval.datatype) = (yyvsp[(1) - (1)].datatype); ;}
|
2779 kumpf 1.34 break;
2780
2781 case 133:
|
2782 karl 1.51 #line 1130 "cimmof.y"
|
2783 karl 1.41 { (yyval.datatype) = CIMTYPE_STRING; ;}
|
2784 kumpf 1.34 break;
2785
2786 case 134:
|
2787 karl 1.51 #line 1131 "cimmof.y"
|
2788 karl 1.41 { (yyval.datatype) = CIMTYPE_BOOLEAN; ;}
|
2789 kumpf 1.34 break;
2790
2791 case 135:
|
2792 karl 1.51 #line 1132 "cimmof.y"
|
2793 karl 1.41 { (yyval.datatype) = CIMTYPE_DATETIME; ;}
|
2794 kumpf 1.34 break;
2795
2796 case 136:
|
2797 karl 1.51 #line 1135 "cimmof.y"
|
2798 karl 1.41 { (yyval.datatype) = CIMTYPE_UINT8; ;}
|
2799 kumpf 1.34 break;
2800
2801 case 137:
|
2802 karl 1.51 #line 1136 "cimmof.y"
|
2803 karl 1.41 { (yyval.datatype) = CIMTYPE_SINT8; ;}
|
2804 kumpf 1.34 break;
2805
2806 case 138:
|
2807 karl 1.51 #line 1137 "cimmof.y"
|
2808 karl 1.41 { (yyval.datatype) = CIMTYPE_UINT16; ;}
|
2809 kumpf 1.34 break;
2810
2811 case 139:
|
2812 karl 1.51 #line 1138 "cimmof.y"
|
2813 karl 1.41 { (yyval.datatype) = CIMTYPE_SINT16; ;}
|
2814 kumpf 1.34 break;
|
2815 e.boden 1.30
|
2816 kumpf 1.34 case 140:
|
2817 karl 1.51 #line 1139 "cimmof.y"
|
2818 karl 1.41 { (yyval.datatype) = CIMTYPE_UINT32; ;}
|
2819 kumpf 1.34 break;
2820
2821 case 141:
|
2822 karl 1.51 #line 1140 "cimmof.y"
|
2823 karl 1.41 { (yyval.datatype) = CIMTYPE_SINT32; ;}
|
2824 kumpf 1.34 break;
2825
2826 case 142:
|
2827 karl 1.51 #line 1141 "cimmof.y"
|
2828 karl 1.41 { (yyval.datatype) = CIMTYPE_UINT64; ;}
|
2829 kumpf 1.34 break;
2830
2831 case 143:
|
2832 karl 1.51 #line 1142 "cimmof.y"
|
2833 karl 1.41 { (yyval.datatype) = CIMTYPE_SINT64; ;}
|
2834 kumpf 1.34 break;
2835
2836 case 144:
|
2837 karl 1.51 #line 1143 "cimmof.y"
|
2838 karl 1.41 { (yyval.datatype) = CIMTYPE_CHAR16; ;}
|
2839 kumpf 1.34 break;
2840
2841 case 145:
|
2842 karl 1.51 #line 1147 "cimmof.y"
|
2843 karl 1.41 { (yyval.datatype) =CIMTYPE_REAL32; ;}
|
2844 kumpf 1.34 break;
2845
2846 case 146:
|
2847 karl 1.51 #line 1149 "cimmof.y"
|
2848 karl 1.41 { (yyval.datatype) =CIMTYPE_REAL64; ;}
|
2849 kumpf 1.34 break;
2850
2851 case 148:
|
2852 karl 1.51 #line 1160 "cimmof.y"
|
2853 karl 1.41 {
|
2854 karl 1.42 //yydebug = 1; stderr = stdout;
|
2855 karl 1.41 ;}
|
2856 kumpf 1.34 break;
2857
2858 case 149:
|
2859 karl 1.51 #line 1164 "cimmof.y"
|
2860 karl 1.41 {
|
2861 kumpf 1.34 //yydebug = 1; stderr = stdout;
2862 YACCTRACE("qualifierListbegin");
|
2863 kumpf 1.46 g_qualifierList.clear(); ;}
|
2864 kumpf 1.34 break;
2865
2866 case 150:
|
2867 karl 1.51 #line 1170 "cimmof.y"
|
2868 kumpf 1.34 { ;}
2869 break;
2870
2871 case 151:
|
2872 karl 1.51 #line 1172 "cimmof.y"
|
2873 kumpf 1.34 { ;}
2874 break;
2875
2876 case 152:
|
2877 karl 1.51 #line 1175 "cimmof.y"
|
2878 kumpf 1.34 {
|
2879 karl 1.41 cimmofParser *p = cimmofParser::Instance();
2880 // The qualifier value can't be set until we know the contents of the
2881 // QualifierDeclaration. That's what QualifierValue() does.
2882 CIMValue *v = p->QualifierValue(*(yyvsp[(1) - (3)].strval),
2883 ((yyvsp[(2) - (3)].typedinitializer)->type == CIMMOF_NULL_VALUE), *(yyvsp[(2) - (3)].typedinitializer)->value);
2884 (yyval.qualifier) = p->newQualifier(*(yyvsp[(1) - (3)].strval), *v, g_flavor);
|
2885 kumpf 1.46 g_qualifierList.add(*(yyval.qualifier));
2886 delete (yyval.qualifier);
|
2887 karl 1.41 delete (yyvsp[(1) - (3)].strval);
2888 delete (yyvsp[(2) - (3)].typedinitializer)->value;
2889 delete v;
2890 ;}
|
2891 kumpf 1.34 break;
2892
2893 case 153:
|
2894 karl 1.51 #line 1189 "cimmof.y"
|
2895 karl 1.41 {
2896 g_flavor = CIMFlavor (CIMFlavor::NONE); ;}
|
2897 kumpf 1.34 break;
2898
2899 case 154:
|
2900 karl 1.51 #line 1191 "cimmof.y"
|
2901 karl 1.41 {
2902 (yyval.strval) = new String((*(yyvsp[(1) - (1)].scope)).toString ());
|
2903 kumpf 1.52 g_flavor = CIMFlavor (CIMFlavor::NONE);
|
2904 dmitry.mikulin 1.47 delete (yyvsp[(1) - (1)].scope); ;}
|
2905 kumpf 1.34 break;
2906
2907 case 155:
|
2908 karl 1.51 #line 1199 "cimmof.y"
|
2909 kumpf 1.34 {
|
2910 karl 1.41 g_typedInitializerValue.type = CIMMOF_CONSTANT_VALUE;
2911 g_typedInitializerValue.value = (yyvsp[(2) - (3)].strval);
2912 (yyval.typedinitializer) = &g_typedInitializerValue;
2913 ;}
|
2914 kumpf 1.34 break;
2915
2916 case 156:
|
2917 karl 1.51 #line 1205 "cimmof.y"
|
2918 kumpf 1.34 {
|
2919 karl 1.41 g_typedInitializerValue.type = CIMMOF_NULL_VALUE;
2920 g_typedInitializerValue.value = new String(String::EMPTY);
2921 (yyval.typedinitializer) = &g_typedInitializerValue;
2922 ;}
|
2923 kumpf 1.34 break;
2924
2925 case 157:
|
2926 karl 1.51 #line 1211 "cimmof.y"
|
2927 kumpf 1.34 {
|
2928 karl 1.41 g_typedInitializerValue.type = CIMMOF_ARRAY_VALUE;
2929 g_typedInitializerValue.value = (yyvsp[(1) - (1)].strval);
2930 (yyval.typedinitializer) = &g_typedInitializerValue;
2931 ;}
|
2932 kumpf 1.34 break;
2933
2934 case 158:
|
2935 karl 1.51 #line 1216 "cimmof.y"
|
2936 kumpf 1.34 { /* empty */
|
2937 karl 1.41 g_typedInitializerValue.type = CIMMOF_NULL_VALUE;
2938 g_typedInitializerValue.value = new String(String::EMPTY);
2939 (yyval.typedinitializer) = &g_typedInitializerValue;
2940 ;}
|
2941 kumpf 1.34 break;
2942
2943 case 159:
|
2944 karl 1.51 #line 1223 "cimmof.y"
|
2945 karl 1.41 { (yyval.strval) = (yyvsp[(1) - (1)].strval); ;}
|
2946 kumpf 1.34 break;
2947
2948 case 160:
|
2949 karl 1.51 #line 1226 "cimmof.y"
|
2950 karl 1.41 { (yyval.strval) = (yyvsp[(1) - (1)].strval); ;}
|
2951 kumpf 1.34 break;
2952
2953
|
2954 karl 1.41 /* Line 1267 of yacc.c. */
|
2955 kumpf 1.48 #line 2953 "cimmoftemp"
|
2956 karl 1.41 default: break;
|
2957 kumpf 1.34 }
|
2958 karl 1.41 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
|
2959 kumpf 1.34
|
2960 karl 1.41 YYPOPSTACK (yylen);
2961 yylen = 0;
|
2962 kumpf 1.34 YY_STACK_PRINT (yyss, yyssp);
2963
2964 *++yyvsp = yyval;
2965
2966
2967 /* Now `shift' the result of the reduction. Determine what state
2968 that goes to, based on the state we popped back to and the rule
2969 number reduced by. */
2970
2971 yyn = yyr1[yyn];
2972
2973 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2974 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2975 yystate = yytable[yystate];
2976 else
2977 yystate = yydefgoto[yyn - YYNTOKENS];
2978
2979 goto yynewstate;
2980
2981
2982 /*------------------------------------.
2983 kumpf 1.34 | yyerrlab -- here on detecting error |
2984 `------------------------------------*/
2985 yyerrlab:
2986 /* If not already recovering from an error, report this error. */
2987 if (!yyerrstatus)
2988 {
2989 ++yynerrs;
|
2990 karl 1.41 #if ! YYERROR_VERBOSE
2991 yyerror (YY_("syntax error"));
2992 #else
2993 {
|
2994 kumpf 1.43 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
2995 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
2996 {
2997 YYSIZE_T yyalloc = 2 * yysize;
2998 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
2999 yyalloc = YYSTACK_ALLOC_MAXIMUM;
3000 if (yymsg != yymsgbuf)
3001 YYSTACK_FREE (yymsg);
3002 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
3003 if (yymsg)
3004 yymsg_alloc = yyalloc;
3005 else
3006 {
3007 yymsg = yymsgbuf;
3008 yymsg_alloc = sizeof yymsgbuf;
3009 }
3010 }
3011
3012 if (0 < yysize && yysize <= yymsg_alloc)
3013 {
3014 (void) yysyntax_error (yymsg, yystate, yychar);
3015 kumpf 1.43 yyerror (yymsg);
3016 }
3017 else
3018 {
3019 yyerror (YY_("syntax error"));
3020 if (yysize != 0)
3021 goto yyexhaustedlab;
3022 }
|
3023 karl 1.41 }
3024 #endif
|
3025 mike 1.3 }
|
3026 kumpf 1.34
3027
3028
3029 if (yyerrstatus == 3)
|
3030 mike 1.3 {
|
3031 karl 1.41 /* If just tried and failed to reuse look-ahead token after an
|
3032 kumpf 1.43 error, discard it. */
|
3033 kumpf 1.34
|
3034 karl 1.41 if (yychar <= YYEOF)
|
3035 kumpf 1.43 {
3036 /* Return failure if at end of input. */
3037 if (yychar == YYEOF)
3038 YYABORT;
3039 }
|
3040 karl 1.41 else
|
3041 kumpf 1.43 {
3042 yydestruct ("Error: discarding",
3043 yytoken, &yylval);
3044 yychar = YYEMPTY;
3045 }
|
3046 mike 1.3 }
|
3047 kumpf 1.34
|
3048 karl 1.41 /* Else will try to reuse look-ahead token after shifting the error
|
3049 kumpf 1.34 token. */
|
3050 karl 1.41 goto yyerrlab1;
|
3051 kumpf 1.34
3052
|
3053 karl 1.41 /*---------------------------------------------------.
3054 | yyerrorlab -- error raised explicitly by YYERROR. |
3055 `---------------------------------------------------*/
3056 yyerrorlab:
3057
3058 /* Pacify compilers like GCC when the user code never invokes
3059 YYERROR and the label yyerrorlab therefore never appears in user
3060 code. */
3061 if (/*CONSTCOND*/ 0)
3062 goto yyerrorlab;
3063
3064 /* Do not reclaim the symbols of the rule which action triggered
3065 this YYERROR. */
3066 YYPOPSTACK (yylen);
3067 yylen = 0;
3068 YY_STACK_PRINT (yyss, yyssp);
3069 yystate = *yyssp;
3070 goto yyerrlab1;
|
3071 kumpf 1.34
3072
|
3073 karl 1.41 /*-------------------------------------------------------------.
3074 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3075 `-------------------------------------------------------------*/
3076 yyerrlab1:
|
3077 kumpf 1.43 yyerrstatus = 3; /* Each real token shifted decrements this. */
|
3078 kumpf 1.34
3079 for (;;)
|
3080 kumpf 1.21 {
|
3081 kumpf 1.34 yyn = yypact[yystate];
3082 if (yyn != YYPACT_NINF)
|
3083 kumpf 1.43 {
3084 yyn += YYTERROR;
3085 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3086 {
3087 yyn = yytable[yyn];
3088 if (0 < yyn)
3089 break;
3090 }
3091 }
|
3092 kumpf 1.34
3093 /* Pop the current state because it cannot handle the error token. */
3094 if (yyssp == yyss)
|
3095 kumpf 1.43 YYABORT;
|
3096 kumpf 1.34
3097
|
3098 karl 1.41 yydestruct ("Error: popping",
|
3099 kumpf 1.43 yystos[yystate], yyvsp);
|
3100 karl 1.41 YYPOPSTACK (1);
3101 yystate = *yyssp;
|
3102 kumpf 1.34 YY_STACK_PRINT (yyss, yyssp);
|
3103 kumpf 1.21 }
|
3104 kumpf 1.34
3105 if (yyn == YYFINAL)
3106 YYACCEPT;
3107
|
3108 karl 1.41 *++yyvsp = yylval;
|
3109 kumpf 1.34
3110
|
3111 karl 1.41 /* Shift the error token. */
3112 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
|
3113 kumpf 1.34
3114 yystate = yyn;
3115 goto yynewstate;
3116
3117
3118 /*-------------------------------------.
3119 | yyacceptlab -- YYACCEPT comes here. |
3120 `-------------------------------------*/
3121 yyacceptlab:
3122 yyresult = 0;
3123 goto yyreturn;
3124
3125 /*-----------------------------------.
3126 | yyabortlab -- YYABORT comes here. |
3127 `-----------------------------------*/
3128 yyabortlab:
3129 yyresult = 1;
3130 goto yyreturn;
3131
3132 #ifndef yyoverflow
|
3133 karl 1.41 /*-------------------------------------------------.
3134 | yyexhaustedlab -- memory exhaustion comes here. |
3135 `-------------------------------------------------*/
3136 yyexhaustedlab:
3137 yyerror (YY_("memory exhausted"));
|
3138 kumpf 1.34 yyresult = 2;
3139 /* Fall through. */
3140 #endif
3141
3142 yyreturn:
|
3143 karl 1.41 if (yychar != YYEOF && yychar != YYEMPTY)
3144 yydestruct ("Cleanup: discarding lookahead",
|
3145 kumpf 1.43 yytoken, &yylval);
|
3146 karl 1.41 /* Do not reclaim the symbols of the rule which action triggered
3147 this YYABORT or YYACCEPT. */
3148 YYPOPSTACK (yylen);
3149 YY_STACK_PRINT (yyss, yyssp);
3150 while (yyssp != yyss)
3151 {
3152 yydestruct ("Cleanup: popping",
|
3153 kumpf 1.43 yystos[*yyssp], yyvsp);
|
3154 karl 1.41 YYPOPSTACK (1);
3155 }
|
3156 kumpf 1.34 #ifndef yyoverflow
3157 if (yyss != yyssa)
3158 YYSTACK_FREE (yyss);
3159 #endif
|
3160 karl 1.41 #if YYERROR_VERBOSE
3161 if (yymsg != yymsgbuf)
3162 YYSTACK_FREE (yymsg);
3163 #endif
3164 /* Make sure YYID is used. */
3165 return YYID (yyresult);
|
3166 mike 1.3 }
|
3167 kumpf 1.34
3168
|
3169 karl 1.51 #line 1228 "cimmof.y"
|
3170 jim.wunderlich 1.36
3171
3172 /*
3173 **==============================================================================
3174 **
3175 ** MOF_error():
3176 **
3177 **==============================================================================
3178 */
3179 static void MOF_error(const char * str, const char * S)
3180 {
|
3181 karl 1.41 printf("%s %s\n", str, S);
|
3182 jim.wunderlich 1.36 }
|
3183 kumpf 1.34
|
3184 jim.wunderlich 1.36 /*
3185 **==============================================================================
3186 **
3187 ** MOF_trace():
3188 **
3189 **==============================================================================
3190 */
3191 // #define DEBUG_cimmof 1
3192
3193 static void MOF_trace(const char* str)
3194 {
3195 #ifdef DEBUG_cimmof
3196 printf("MOF_trace(): %s \n", str);
3197 #endif // DEBUG_cimmof
3198 }
3199
3200 static void MOF_trace2(const char * str, const char * S)
3201 {
3202 #ifdef DEBUG_cimmof
|
3203 karl 1.41 printf("MOF_trace2(): %s %s\n", str, S);
|
3204 jim.wunderlich 1.36 #endif // DEBUG_cimmof
3205 }
|
3206 kumpf 1.34
|