(file) Return to cimmof_tab.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Compiler

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2