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

   1 karl  1.34 /* To be inserted in other files to bypass the chksrc tests */
   2            /* NOCHKSRC */
   3            
   4            #line 2 "cimmof_lex.cpp"
   5            
   6            #line 4 "cimmof_lex.cpp"
   7            
   8            #define  YY_INT_ALIGNED short int
   9            
  10            /* A lexical scanner generated by flex */
  11            
  12 mike  1.3  #define yy_create_buffer cimmof__create_buffer
  13            #define yy_delete_buffer cimmof__delete_buffer
  14            #define yy_flex_debug cimmof__flex_debug
  15            #define yy_init_buffer cimmof__init_buffer
  16            #define yy_flush_buffer cimmof__flush_buffer
  17            #define yy_load_buffer_state cimmof__load_buffer_state
  18            #define yy_switch_to_buffer cimmof__switch_to_buffer
  19            #define yyin cimmof_in
  20            #define yyleng cimmof_leng
  21            #define yylex cimmof_lex
  22 karl  1.34 #define yylineno cimmof_lineno
  23 mike  1.3  #define yyout cimmof_out
  24            #define yyrestart cimmof_restart
  25            #define yytext cimmof_text
  26            #define yywrap cimmof_wrap
  27 karl  1.34 #define yyalloc cimmof_alloc
  28            #define yyrealloc cimmof_realloc
  29            #define yyfree cimmof_free
  30 mike  1.3  
  31            #define FLEX_SCANNER
  32            #define YY_FLEX_MAJOR_VERSION 2
  33            #define YY_FLEX_MINOR_VERSION 5
  34 dev.meetei 1.36 #define YY_FLEX_SUBMINOR_VERSION 35
  35 karl       1.34 #if YY_FLEX_SUBMINOR_VERSION > 0
  36                 #define FLEX_BETA
  37                 #endif
  38                 
  39                 /* First, we deal with  platform-specific or compiler-specific issues. */
  40 mike       1.3  
  41 karl       1.34 /* begin standard C headers. */
  42 mike       1.3  #include <stdio.h>
  43 karl       1.34 #include <string.h>
  44                 #include <errno.h>
  45                 #include <stdlib.h>
  46                 
  47                 /* end standard C headers. */
  48                 
  49                 /* flex integer type definitions */
  50                 
  51                 #ifndef FLEXINT_H
  52                 #define FLEXINT_H
  53                 
  54                 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
  55                 
  56                 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  57                 
  58                 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
  59 dev.meetei 1.37  * if you want the limit (max/min) macros for int types. 
  60 karl       1.34  */
  61                 #ifndef __STDC_LIMIT_MACROS
  62                 #define __STDC_LIMIT_MACROS 1
  63                 #endif
  64 mike       1.3  
  65 karl       1.34 #include <inttypes.h>
  66                 typedef int8_t flex_int8_t;
  67                 typedef uint8_t flex_uint8_t;
  68                 typedef int16_t flex_int16_t;
  69                 typedef uint16_t flex_uint16_t;
  70                 typedef int32_t flex_int32_t;
  71                 typedef uint32_t flex_uint32_t;
  72                 #else
  73                 typedef signed char flex_int8_t;
  74                 typedef short int flex_int16_t;
  75                 typedef int flex_int32_t;
  76 dev.meetei 1.37 typedef unsigned char flex_uint8_t; 
  77 karl       1.34 typedef unsigned short int flex_uint16_t;
  78                 typedef unsigned int flex_uint32_t;
  79 mike       1.3  
  80 karl       1.34 /* Limits of integral types. */
  81                 #ifndef INT8_MIN
  82                 #define INT8_MIN               (-128)
  83 mike       1.3  #endif
  84 karl       1.34 #ifndef INT16_MIN
  85                 #define INT16_MIN              (-32767-1)
  86                 #endif
  87                 #ifndef INT32_MIN
  88                 #define INT32_MIN              (-2147483647-1)
  89                 #endif
  90                 #ifndef INT8_MAX
  91                 #define INT8_MAX               (127)
  92                 #endif
  93                 #ifndef INT16_MAX
  94                 #define INT16_MAX              (32767)
  95                 #endif
  96                 #ifndef INT32_MAX
  97                 #define INT32_MAX              (2147483647)
  98                 #endif
  99                 #ifndef UINT8_MAX
 100                 #define UINT8_MAX              (255U)
 101                 #endif
 102                 #ifndef UINT16_MAX
 103                 #define UINT16_MAX             (65535U)
 104                 #endif
 105 karl       1.34 #ifndef UINT32_MAX
 106                 #define UINT32_MAX             (4294967295U)
 107 mike       1.3  #endif
 108                 
 109 karl       1.38 #endif /* ! C99 */
 110                 
 111 karl       1.34 #endif /* ! FLEXINT_H */
 112 mike       1.3  
 113                 #ifdef __cplusplus
 114                 
 115                 /* The "const" storage-class-modifier is valid. */
 116                 #define YY_USE_CONST
 117                 
 118 kumpf      1.31 #else	/* ! __cplusplus */
 119 mike       1.3  
 120 karl       1.34 /* C99 requires __STDC__ to be defined as 1. */
 121                 #if defined (__STDC__)
 122 mike       1.3  
 123                 #define YY_USE_CONST
 124                 
 125 karl       1.34 #endif	/* defined (__STDC__) */
 126 kumpf      1.31 #endif	/* ! __cplusplus */
 127 mike       1.3  
 128                 #ifdef YY_USE_CONST
 129                 #define yyconst const
 130                 #else
 131                 #define yyconst
 132                 #endif
 133                 
 134                 /* Returned upon end-of-file. */
 135                 #define YY_NULL 0
 136                 
 137                 /* Promotes a possibly negative, possibly signed char to an unsigned
 138                  * integer for use as an array index.  If the signed char is negative,
 139                  * we want to instead treat it as an 8-bit unsigned char, hence the
 140                  * double cast.
 141                  */
 142                 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
 143                 
 144                 /* Enter a start condition.  This macro really ought to take a parameter,
 145                  * but we do it the disgusting crufty way forced on us by the ()-less
 146                  * definition of BEGIN.
 147                  */
 148 karl       1.34 #define BEGIN (yy_start) = 1 + 2 *
 149 mike       1.3  
 150                 /* Translate the current start state into a value that can be later handed
 151                  * to BEGIN to return to the state.  The YYSTATE alias is for lex
 152                  * compatibility.
 153                  */
 154 karl       1.34 #define YY_START (((yy_start) - 1) / 2)
 155 mike       1.3  #define YYSTATE YY_START
 156                 
 157                 /* Action number for EOF rule of a given start state. */
 158                 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
 159                 
 160                 /* Special action meaning "start processing a new file". */
 161 karl       1.34 #define YY_NEW_FILE cimmof_restart(cimmof_in  )
 162 mike       1.3  
 163                 #define YY_END_OF_BUFFER_CHAR 0
 164                 
 165                 /* Size of default input buffer. */
 166 karl       1.34 #ifndef YY_BUF_SIZE
 167 karl       1.38 #ifdef __ia64__
 168                 /* On IA-64, the buffer size is 16k, not 8k.
 169                  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
 170                  * Ditto for the __ia64__ case accordingly.
 171                  */
 172                 #define YY_BUF_SIZE 32768
 173                 #else
 174 mike       1.3  #define YY_BUF_SIZE 16384
 175 karl       1.38 #endif /* __ia64__ */
 176 karl       1.34 #endif
 177 mike       1.3  
 178 karl       1.34 /* The state buf must be large enough to hold one state per character in the main buffer.
 179                  */
 180                 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
 181                 
 182                 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
 183                 #define YY_TYPEDEF_YY_BUFFER_STATE
 184 mike       1.3  typedef struct yy_buffer_state *YY_BUFFER_STATE;
 185 karl       1.34 #endif
 186                 
 187                 extern int cimmof_leng;
 188 mike       1.3  
 189 karl       1.34 extern FILE *cimmof_in, *cimmof_out;
 190 mike       1.3  
 191                 #define EOB_ACT_CONTINUE_SCAN 0
 192                 #define EOB_ACT_END_OF_FILE 1
 193                 #define EOB_ACT_LAST_MATCH 2
 194                 
 195 karl       1.34     /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
 196                      *       access to the local variable yy_act. Since yyless() is a macro, it would break
 197 dev.meetei 1.37      *       existing scanners that call yyless() from OUTSIDE cimmof_lex. 
 198 karl       1.34      *       One obvious solution it to make yy_act a global. I tried that, and saw
 199                      *       a 5% performance hit in a non-cimmof_lineno scanner, because yy_act is
 200                      *       normally declared as a register variable-- so it is not worth it.
 201                      */
 202                     #define  YY_LESS_LINENO(n) \
 203                             do { \
 204                                 int yyl;\
 205                                 for ( yyl = n; yyl < cimmof_leng; ++yyl )\
 206                                     if ( cimmof_text[yyl] == '\n' )\
 207                                         --cimmof_lineno;\
 208                             }while(0)
 209 dev.meetei 1.37     
 210 karl       1.34 /* Return all but the first "n" matched characters back to the input stream. */
 211 mike       1.3  #define yyless(n) \
 212 kumpf      1.31 	do \
 213                 		{ \
 214 karl       1.34 		/* Undo effects of setting up cimmof_text. */ \
 215                         int yyless_macro_arg = (n); \
 216                         YY_LESS_LINENO(yyless_macro_arg);\
 217                 		*yy_cp = (yy_hold_char); \
 218 kumpf      1.31 		YY_RESTORE_YY_MORE_OFFSET \
 219 karl       1.34 		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
 220                 		YY_DO_BEFORE_ACTION; /* set up cimmof_text again */ \
 221 kumpf      1.31 		} \
 222                 	while ( 0 )
 223 mike       1.3  
 224 karl       1.34 #define unput(c) yyunput( c, (yytext_ptr)  )
 225 karl       1.29 
 226 karl       1.34 #ifndef YY_TYPEDEF_YY_SIZE_T
 227                 #define YY_TYPEDEF_YY_SIZE_T
 228                 typedef size_t yy_size_t;
 229                 #endif
 230 mike       1.3  
 231 karl       1.34 #ifndef YY_STRUCT_YY_BUFFER_STATE
 232                 #define YY_STRUCT_YY_BUFFER_STATE
 233 mike       1.3  struct yy_buffer_state
 234 kumpf      1.31 	{
 235                 	FILE *yy_input_file;
 236 mike       1.3  
 237 kumpf      1.31 	char *yy_ch_buf;		/* input buffer */
 238                 	char *yy_buf_pos;		/* current position in input buffer */
 239 mike       1.3  
 240 kumpf      1.31 	/* Size of input buffer in bytes, not including room for EOB
 241                 	 * characters.
 242                 	 */
 243                 	yy_size_t yy_buf_size;
 244                 
 245                 	/* Number of characters read into yy_ch_buf, not including EOB
 246                 	 * characters.
 247                 	 */
 248                 	int yy_n_chars;
 249                 
 250                 	/* Whether we "own" the buffer - i.e., we know we created it,
 251                 	 * and can realloc() it to grow it, and should free() it to
 252                 	 * delete it.
 253                 	 */
 254                 	int yy_is_our_buffer;
 255                 
 256                 	/* Whether this is an "interactive" input source; if so, and
 257                 	 * if we're using stdio for input, then we want to use getc()
 258                 	 * instead of fread(), to make sure we stop fetching input after
 259                 	 * each newline.
 260                 	 */
 261 kumpf      1.31 	int yy_is_interactive;
 262                 
 263                 	/* Whether we're considered to be at the beginning of a line.
 264                 	 * If so, '^' rules will be active on the next match, otherwise
 265                 	 * not.
 266                 	 */
 267                 	int yy_at_bol;
 268                 
 269 karl       1.34     int yy_bs_lineno; /**< The line count. */
 270                     int yy_bs_column; /**< The column count. */
 271 dev.meetei 1.37     
 272 kumpf      1.31 	/* Whether to try to fill the input buffer when we reach the
 273                 	 * end of it.
 274                 	 */
 275                 	int yy_fill_buffer;
 276 mike       1.3  
 277 kumpf      1.31 	int yy_buffer_status;
 278 karl       1.34 
 279 mike       1.3  #define YY_BUFFER_NEW 0
 280                 #define YY_BUFFER_NORMAL 1
 281 kumpf      1.31 	/* When an EOF's been seen but there's still some text to process
 282                 	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
 283                 	 * shouldn't try reading from the input source any more.  We might
 284                 	 * still have a bunch of tokens to match, though, because of
 285                 	 * possible backing-up.
 286                 	 *
 287                 	 * When we actually see the EOF, we change the status to "new"
 288 karl       1.34 	 * (via cimmof_restart()), so that the user can continue scanning by
 289                 	 * just pointing cimmof_in at a new input file.
 290 kumpf      1.31 	 */
 291 mike       1.3  #define YY_BUFFER_EOF_PENDING 2
 292 karl       1.34 
 293 kumpf      1.31 	};
 294 karl       1.34 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
 295 mike       1.3  
 296 karl       1.34 /* Stack of input buffers. */
 297                 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
 298                 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
 299                 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
 300 mike       1.3  
 301                 /* We provide macros for accessing buffer states in case in the
 302                  * future we want to put the buffer states in a more general
 303                  * "scanner state".
 304 karl       1.34  *
 305                  * Returns the top of the stack, or NULL.
 306 mike       1.3   */
 307 karl       1.34 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
 308                                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
 309                                           : NULL)
 310 mike       1.3  
 311 karl       1.34 /* Same as previous macro, but useful when we know that the buffer stack is not
 312                  * NULL or when we need an lvalue. For internal use only.
 313                  */
 314                 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
 315 mike       1.3  
 316 karl       1.34 /* yy_hold_char holds the character lost when cimmof_text is formed. */
 317 mike       1.3  static char yy_hold_char;
 318 kumpf      1.31 static int yy_n_chars;		/* number of characters read into yy_ch_buf */
 319 karl       1.34 int cimmof_leng;
 320 mike       1.3  
 321                 /* Points to current character in buffer. */
 322                 static char *yy_c_buf_p = (char *) 0;
 323 karl       1.34 static int yy_init = 0;		/* whether we need to initialize */
 324 kumpf      1.31 static int yy_start = 0;	/* start state number */
 325 mike       1.3  
 326 karl       1.34 /* Flag which is used to allow cimmof_wrap()'s to do buffer switches
 327                  * instead of setting up a fresh cimmof_in.  A bit of a hack ...
 328 mike       1.3   */
 329                 static int yy_did_buffer_switch_on_eof;
 330                 
 331 karl       1.34 void cimmof_restart (FILE *input_file  );
 332                 void cimmof__switch_to_buffer (YY_BUFFER_STATE new_buffer  );
 333                 YY_BUFFER_STATE cimmof__create_buffer (FILE *file,int size  );
 334                 void cimmof__delete_buffer (YY_BUFFER_STATE b  );
 335                 void cimmof__flush_buffer (YY_BUFFER_STATE b  );
 336                 void cimmof_push_buffer_state (YY_BUFFER_STATE new_buffer  );
 337                 void cimmof_pop_buffer_state (void );
 338                 
 339                 static void cimmof_ensure_buffer_stack (void );
 340                 static void cimmof__load_buffer_state (void );
 341                 static void cimmof__init_buffer (YY_BUFFER_STATE b,FILE *file  );
 342                 
 343                 #define YY_FLUSH_BUFFER cimmof__flush_buffer(YY_CURRENT_BUFFER )
 344                 
 345                 YY_BUFFER_STATE cimmof__scan_buffer (char *base,yy_size_t size  );
 346                 YY_BUFFER_STATE cimmof__scan_string (yyconst char *yy_str  );
 347                 YY_BUFFER_STATE cimmof__scan_bytes (yyconst char *bytes,int len  );
 348                 
 349                 void *cimmof_alloc (yy_size_t  );
 350                 void *cimmof_realloc (void *,yy_size_t  );
 351                 void cimmof_free (void *  );
 352 mike       1.3  
 353 karl       1.34 #define yy_new_buffer cimmof__create_buffer
 354 mike       1.3  
 355                 #define yy_set_interactive(is_interactive) \
 356 kumpf      1.31 	{ \
 357 karl       1.34 	if ( ! YY_CURRENT_BUFFER ){ \
 358                         cimmof_ensure_buffer_stack (); \
 359                 		YY_CURRENT_BUFFER_LVALUE =    \
 360                             cimmof__create_buffer(cimmof_in,YY_BUF_SIZE ); \
 361                 	} \
 362                 	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
 363 kumpf      1.31 	}
 364 mike       1.3  
 365                 #define yy_set_bol(at_bol) \
 366 kumpf      1.31 	{ \
 367 karl       1.34 	if ( ! YY_CURRENT_BUFFER ){\
 368                         cimmof_ensure_buffer_stack (); \
 369                 		YY_CURRENT_BUFFER_LVALUE =    \
 370                             cimmof__create_buffer(cimmof_in,YY_BUF_SIZE ); \
 371                 	} \
 372                 	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
 373 kumpf      1.31 	}
 374 mike       1.3  
 375 karl       1.34 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
 376 mike       1.3  
 377 karl       1.34 /* Begin user sect3 */
 378 e.boden    1.21 
 379 mike       1.3  typedef unsigned char YY_CHAR;
 380 karl       1.34 
 381                 FILE *cimmof_in = (FILE *) 0, *cimmof_out = (FILE *) 0;
 382                 
 383 mike       1.3  typedef int yy_state_type;
 384 karl       1.34 
 385                 extern int cimmof_lineno;
 386                 
 387                 int cimmof_lineno = 1;
 388                 
 389                 extern char *cimmof_text;
 390                 #define yytext_ptr cimmof_text
 391                 
 392                 static yy_state_type yy_get_previous_state (void );
 393                 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
 394                 static int yy_get_next_buffer (void );
 395                 static void yy_fatal_error (yyconst char msg[]  );
 396 mike       1.3  
 397                 /* Done after the current pattern has been matched and before the
 398 karl       1.34  * corresponding action - sets up cimmof_text.
 399 mike       1.3   */
 400                 #define YY_DO_BEFORE_ACTION \
 401 karl       1.34 	(yytext_ptr) = yy_bp; \
 402                 	cimmof_leng = (size_t) (yy_cp - yy_bp); \
 403                 	(yy_hold_char) = *yy_cp; \
 404 kumpf      1.31 	*yy_cp = '\0'; \
 405 karl       1.34 	(yy_c_buf_p) = yy_cp;
 406 mike       1.3  
 407 karl       1.38 #define YY_NUM_RULES 82
 408                 #define YY_END_OF_BUFFER 83
 409 karl       1.34 /* This struct is not used in this scanner,
 410                    but its presence is necessary. */
 411                 struct yy_trans_info
 412                 	{
 413                 	flex_int32_t yy_verify;
 414                 	flex_int32_t yy_nxt;
 415                 	};
 416 karl       1.38 static yyconst flex_int16_t yy_accept[296] =
 417 e.boden    1.21     {   0,
 418 karl       1.38         0,    0,    0,    0,    0,    0,   83,   81,    3,    1,
 419                        22,   81,   81,   81,    9,   10,   81,   20,   42,   81,
 420                        18,   17,   17,   11,   12,   19,   80,   80,   80,   80,
 421                        80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
 422                        80,   80,   80,    7,    8,   80,    5,    6,   35,   24,
 423                        23,   82,   37,   82,   36,    0,   63,    0,    0,   18,
 424 karl       1.34        18,   18,   13,   38,    2,   14,   14,   16,    0,   17,
 425 karl       1.38        17,   80,   80,   64,   80,   80,   80,   80,   80,   80,
 426                        80,   80,   80,   80,   45,   80,   80,   80,   80,   80,
 427                        80,   80,   80,   80,   80,   80,   35,   34,   31,   30,
 428 e.boden    1.21 
 429 karl       1.34        33,   32,   25,   26,   27,   28,   29,   36,    0,   21,
 430 karl       1.38         0,    2,    2,   15,   54,   80,   80,   80,   80,   80,
 431                        80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
 432                        80,   80,   55,   80,   80,   80,   80,   80,   80,   80,
 433                        80,   80,   36,    0,    0,   13,   80,   80,   80,   80,
 434                        80,   80,   80,   80,   80,   80,   80,   80,   39,   80,
 435                        80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
 436                        40,   80,   80,   36,    0,   80,   80,   80,   78,   80,
 437                        80,   80,   41,   80,   80,   80,   80,   80,   80,   80,
 438                        80,   80,   80,   80,   80,   47,   80,   80,   80,   72,
 439                 
 440                        80,   80,   80,   80,   80,   80,   68,    4,    0,   80,
 441                        80,   79,   80,   80,   80,   56,   80,   80,   80,   52,
 442                        80,   80,   80,   76,   77,   80,   80,   73,   74,   75,
 443                        65,   80,   80,   69,   70,   71,   43,   80,   66,   80,
 444                        80,   80,   62,   80,   80,   80,   80,   80,   80,   80,
 445                        80,   80,   80,   67,   80,   80,   80,   44,   80,   50,
 446                        80,   80,   80,   80,   80,   80,   80,   80,   80,   53,
 447                        46,   51,   80,   80,   80,   80,   80,   80,   49,   59,
 448                        60,   80,   48,   80,   80,   80,   80,   80,   61,   80,
 449                        80,   80,   57,   58,    0
 450 e.boden    1.21 
 451 mike       1.3      } ;
 452                 
 453 karl       1.34 static yyconst flex_int32_t yy_ec[256] =
 454 mike       1.3      {   0,
 455                         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
 456                         1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
 457                         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 458                         1,    2,    1,    5,    6,    7,    1,    1,    8,    9,
 459 dj.gorey   1.20        10,   11,   12,   13,   12,   14,   15,   16,   17,   18,
 460                        19,   20,   21,   22,   21,   23,   24,   25,   26,    1,
 461                        27,    1,    1,    1,   28,   29,   30,   31,   32,   33,
 462                        34,   35,   36,   37,   37,   38,   39,   40,   41,   42,
 463 e.boden    1.21        43,   44,   45,   46,   47,   48,   37,   49,   50,   37,
 464                        51,   52,   53,    1,   37,    1,   54,   55,   56,   31,
 465 dj.gorey   1.20 
 466 e.boden    1.21        32,   57,   34,   35,   36,   37,   37,   58,   39,   59,
 467                        41,   42,   43,   60,   61,   62,   47,   48,   37,   63,
 468                        50,   37,   64,    1,   65,    1,    1,    1,    1,    1,
 469 mike       1.3          1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 470                         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 471                         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 472                         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 473                         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 474                         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 475                         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 476                 
 477                         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 478                         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 479                         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 480                         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 481                         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 482                         1,    1,    1,    1,    1
 483                     } ;
 484                 
 485 karl       1.34 static yyconst flex_int32_t yy_meta[66] =
 486 mike       1.3      {   0,
 487 e.boden    1.21         1,    1,    2,    1,    3,    1,    4,    1,    1,    1,
 488                         1,    5,    1,    6,    1,    7,    7,    7,    7,    7,
 489                         7,    7,    7,    7,    1,    1,    1,    8,    8,    8,
 490                         8,    9,    8,    4,    4,    4,    4,    4,    4,    4,
 491                         4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
 492                         1,    3,    1,    8,    8,    8,    8,    4,    4,    4,
 493 kumpf      1.31         4,    4,    4,    1,    1
 494 mike       1.3      } ;
 495                 
 496 karl       1.38 static yyconst flex_int16_t yy_base[311] =
 497 mike       1.3      {   0,
 498 karl       1.38         0,    0,   63,   64,  114,  169,  590,  591,  591,  591,
 499                       591,  547,    0,    0,  591,  591,   56,  591,   58,   72,
 500                       213,  263,   68,  591,  591,  591,   46,  547,  552,   60,
 501                        31,   64,    0,   49,  554,  538,   62,   66,  537,  551,
 502                       118,   65,  546,  591,  591,   63,  591,  591,    0,  591,
 503                       591,  314,  591,  591,    0,   67,    0,  573,  139,    0,
 504                       165,  566,  547,  591,  575,  514,  112,  591,    0,    0,
 505                         0,    0,  526,   79,  534,   85,  103,  105,  123,  115,
 506                       124,  183,  149,  138,    0,  159,  533,  155,  210,  532,
 507                        53,  161,  161,  212,  201,  518,    0,  591,  591,  591,
 508                 
 509                       591,  591,  591,  591,  591,  591,  591,    0,  156,  563,
 510                       558,  566,  591,    0,    0,  527,  207,  202,  535,  219,
 511                       219,  208,  518,  212,  529,  210,  529,  220,  221,  521,
 512                       250,  251,  530,  244,  519,  245,  524,  512,  253,  526,
 513                       248,  496,    0,  522,  279,  307,  281,  523,  195,  258,
 514                       284,  276,  522,  512,  505,  285,  288,  510,    0,  511,
 515                       517,  512,   81,  261,  273,  515,  321,  292,  306,  291,
 516                         0,  331,  485,  591,  506,  508,  318,  521,    0,  506,
 517                       307,  509,    0,  315,  509,  327,  309,  508,  506,  318,
 518                       323,  519,  516,  503,  494,    0,  490,  474,  471,    0,
 519 karl       1.38 
 520                       452,  327,  309,  463,  456,  449,    0,    0,  330,  332,
 521                       330,    0,  429,  414,  404,    0,  412,  333,  334,    0,
 522                       336,  339,  407,    0,    0,  347,  358,    0,    0,    0,
 523                         0,  353,  364,    0,    0,    0,  591,  347,    0,  410,
 524                       399,  391,    0,  401,  403,  402,  383,  399,  364,  350,
 525                       369,  353,  374,    0,  215,  229,  216,    0,  356,    0,
 526                       359,  222,  220,  360,  374,  210,  185,  364,  367,    0,
 527                         0,    0,  185,  368,  375,  377,  378,  381,    0,    0,
 528                         0,  389,    0,  388,  179,  176,  171,  173,    0,   73,
 529                        69,   67,    0,    0,  591,  448,  457,  463,  472,  476,
 530 e.boden    1.21 
 531 karl       1.38       480,  489,  498,  501,  504,  513,  516,  519,  524,  525
 532 mike       1.3      } ;
 533                 
 534 karl       1.38 static yyconst flex_int16_t yy_def[311] =
 535 mike       1.3      {   0,
 536 karl       1.38       295,    1,  296,  296,  297,  297,  295,  295,  295,  295,
 537                       295,  295,  298,  299,  295,  295,  300,  295,  295,  295,
 538                       295,  295,   22,  295,  295,  295,  301,  301,  301,  301,
 539                       301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
 540                       301,  301,  301,  295,  295,  301,  295,  295,  302,  295,
 541                       295,  303,  295,  295,  304,  295,  298,  299,  295,   21,
 542                       300,  300,  305,  295,  306,   21,   21,  295,  307,   22,
 543                        23,  301,  301,  301,  301,  301,  301,  301,  301,  301,
 544                       301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
 545                       301,  301,  301,  301,  301,  301,  302,  295,  295,  295,
 546                 
 547                       295,  295,  295,  295,  295,  295,  295,  308,  295,  299,
 548                       309,  306,  295,  307,  301,  301,  301,  301,  301,  301,
 549                       301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
 550                       301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
 551                       301,  301,  310,  295,  295,  295,  301,  301,  301,  301,
 552                       301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
 553                       301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
 554                       301,  301,  301,  295,  295,  301,  301,  301,  301,  301,
 555                       301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
 556                       301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
 557 karl       1.38 
 558                       301,  301,  301,  301,  301,  301,  301,  301,  295,  301,
 559                       301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
 560                       301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
 561                       301,  301,  301,  301,  301,  301,  295,  301,  301,  301,
 562                       301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
 563                       301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
 564                       301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
 565                       301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
 566                       301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
 567                       301,  301,  301,  301,    0,  295,  295,  295,  295,  295,
 568 e.boden    1.21 
 569 karl       1.38       295,  295,  295,  295,  295,  295,  295,  295,  295,  295
 570 mike       1.3      } ;
 571                 
 572 karl       1.38 static yyconst flex_int16_t yy_nxt[657] =
 573 mike       1.3      {   0,
 574 e.boden    1.21         8,    9,   10,    9,   11,   12,   13,   14,   15,   16,
 575 kumpf      1.31         8,   17,   18,   19,   20,   21,   22,   23,   23,   23,
 576                        23,   23,   23,   23,   24,   25,   26,   27,   28,   29,
 577                        30,   31,   32,   33,   33,   34,   33,   33,   35,   36,
 578                        37,   38,   39,   40,   41,   42,   43,   33,   33,   33,
 579                        44,    8,   45,   27,   28,   46,   32,   33,   36,   40,
 580                        41,   42,   33,   47,   48,   50,   50,   51,   51,   59,
 581                        79,   60,   61,   63,   63,   63,   63,   63,   63,   63,
 582                        63,   63,   64,   71,   71,   73,   65,   77,   82,   79,
 583 karl       1.38        74,   80,  136,   86,   85,   78,  295,   76,  294,  192,
 584 kumpf      1.31 
 585 karl       1.38       293,   81,  193,  292,   73,   93,   74,   82,   94,   87,
 586                       109,  136,  118,   77,   52,   52,   54,   80,   85,   86,
 587                        96,   81,  295,  116,   94,   87,  109,   67,   67,   55,
 588 kumpf      1.31        55,   55,   55,   55,   55,   55,   55,   55,  118,  116,
 589 karl       1.38       295,   55,   55,   55,   55,   55,   55,   90,  119,  120,
 590 kumpf      1.31       121,  123,  122,   91,   63,   63,   63,   63,   63,   63,
 591 karl       1.38        63,   63,   63,   92,  119,  120,  295,   55,   55,   55,
 592                        55,   54,  122,   90,  295,  128,  121,  123,   59,   92,
 593                        61,   61,  131,  144,   55,   55,   55,   55,   55,   55,
 594 kumpf      1.31        55,   55,   55,   68,  127,  128,   55,   55,   55,   55,
 595                 
 596 karl       1.38        55,   55,  129,  291,  137,  138,  290,  289,  131,  144,
 597                       127,  178,  124,  125,  288,  280,  277,  179,  129,   68,
 598 kumpf      1.31       137,  138,   55,   55,   55,   55,   59,  126,   66,   66,
 599 karl       1.38        67,   67,   67,   67,   67,   62,   62,  132,  124,  139,
 600                       141,   68,  133,  126,  148,  149,  151,  152,  160,  155,
 601                       276,  273,  153,  272,  134,  157,  269,  159,  140,  141,
 602                       268,  149,  267,  132,  148,  139,  133,   68,  153,  155,
 603                       134,  157,  151,  152,  160,   69,   59,  159,   70,   70,
 604                        71,   71,   71,   71,   71,   71,   71,  162,  163,  165,
 605                       167,   68,  170,  172,  146,  146,  146,  146,  146,  146,
 606                 
 607                       146,  146,  146,  180,  194,  165,  167,  162,  163,  172,
 608                       176,  170,  181,  182,  186,  187,  195,   68,   99,  180,
 609                       194,  100,  146,  146,  146,  146,  146,  146,  146,  146,
 610                       146,  201,  195,  182,  202,  203,  176,  197,  181,  198,
 611                       186,  187,  199,  200,  214,  211,  233,  204,  219,  205,
 612                       201,  203,  206,  207,  218,  223,  232,  237,  216,  238,
 613                       202,  222,  101,  245,  214,  102,  233,  219,  103,  239,
 614                       104,  211,  105,  106,  216,  107,  101,  222,  244,  223,
 615                       218,  246,  232,  237,  247,  238,  249,  250,  239,  245,
 616                       251,  252,  253,  262,  244,  263,  264,  246,  265,  270,
 617                 
 618                       247,  275,  271,  282,  274,  249,  279,  278,  253,  266,
 619                       251,  263,  281,  250,  265,  270,  283,  252,  271,  262,
 620 karl       1.38       274,  284,  264,  278,  285,  279,  286,  275,  281,  282,
 621                       261,  287,  260,  259,  258,  283,  257,  284,  256,  255,
 622                       285,  254,  248,  243,  242,  241,  286,  287,   49,   49,
 623                        49,   49,   49,   49,   49,   49,   49,   53,   53,   53,
 624                        53,   53,   53,   53,   53,   53,   57,  240,  236,   57,
 625                        57,   57,   58,  235,   58,   58,   58,   58,   58,   58,
 626                        58,   62,   62,   72,  234,  231,   72,   72,   72,   97,
 627                       230,  229,   97,   97,   97,   97,   97,   97,   98,   98,
 628                 
 629                        98,   98,   98,   98,   98,   98,   98,  108,  108,  108,
 630                        63,  228,   63,  112,  112,  112,  112,  112,  112,  112,
 631                       112,  112,  114,  114,  114,  143,  143,  143,  146,  227,
 632                       146,  174,  174,  174,  226,  225,  224,  221,  220,  217,
 633                       215,  213,  212,  210,  209,  208,  196,  191,  190,  189,
 634                       188,  185,  184,  183,  177,  175,  173,  171,  169,  168,
 635                       166,  164,  161,  158,  156,  154,  150,  147,  113,  145,
 636                       110,  142,  135,  130,  117,  115,  295,  113,  111,   59,
 637                       110,   95,   89,   88,   84,   83,   76,   75,   56,  295,
 638                         7,  295,  295,  295,  295,  295,  295,  295,  295,  295,
 639                 
 640                       295,  295,  295,  295,  295,  295,  295,  295,  295,  295,
 641 karl       1.38       295,  295,  295,  295,  295,  295,  295,  295,  295,  295,
 642                       295,  295,  295,  295,  295,  295,  295,  295,  295,  295,
 643                       295,  295,  295,  295,  295,  295,  295,  295,  295,  295,
 644                       295,  295,  295,  295,  295,  295,  295,  295,  295,  295,
 645                       295,  295,  295,  295,  295,  295
 646 mike       1.3      } ;
 647                 
 648 karl       1.38 static yyconst flex_int16_t yy_chk[657] =
 649 mike       1.3      {   0,
 650                         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 651                         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 652                         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 653                         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 654                         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 655 e.boden    1.21         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 656                         1,    1,    1,    1,    1,    3,    4,    3,    4,   17,
 657 kumpf      1.31        31,   17,   17,   19,   19,   19,   19,   19,   19,   19,
 658                        19,   19,   20,   23,   23,   27,   20,   30,   34,   31,
 659 karl       1.38        27,   32,   91,   38,   37,   30,   23,   46,  292,  163,
 660 kumpf      1.31 
 661 karl       1.38       291,   32,  163,  290,   27,   42,   27,   34,   42,   38,
 662                        56,   91,   76,   30,    3,    4,    5,   32,   37,   38,
 663 kumpf      1.31        46,   32,   23,   74,   42,   38,   56,   67,   67,    5,
 664                         5,    5,    5,    5,    5,    5,    5,    5,   76,   74,
 665                        67,    5,    5,    5,    5,    5,    5,   41,   77,   78,
 666                        79,   81,   80,   41,   59,   59,   59,   59,   59,   59,
 667                        59,   59,   59,   41,   77,   78,   67,    5,    5,    5,
 668                         5,    6,   80,   41,   67,   84,   79,   81,   61,   41,
 669                        61,   61,   88,  109,    6,    6,    6,    6,    6,    6,
 670                         6,    6,    6,   61,   83,   84,    6,    6,    6,    6,
 671                 
 672 karl       1.38         6,    6,   86,  288,   92,   93,  287,  286,   88,  109,
 673                        83,  149,   82,   82,  285,  273,  267,  149,   86,   61,
 674                        92,   93,    6,    6,    6,    6,   21,   82,   21,   21,
 675                        21,   21,   21,   21,   21,   21,   21,   89,   82,   94,
 676                        95,   21,   89,   82,  117,  118,  120,  121,  129,  124,
 677                       266,  263,  122,  262,   89,  126,  257,  128,   94,   95,
 678                       256,  118,  255,   89,  117,   94,   89,   21,  122,  124,
 679                        89,  126,  120,  121,  129,   21,   22,  128,   22,   22,
 680                        22,   22,   22,   22,   22,   22,   22,  131,  132,  134,
 681                       136,   22,  139,  141,  145,  145,  145,  145,  145,  145,
 682                 
 683                       145,  145,  145,  150,  164,  134,  136,  131,  132,  141,
 684                       147,  139,  151,  152,  156,  157,  165,   22,   52,  150,
 685                       164,   52,  146,  146,  146,  146,  146,  146,  146,  146,
 686                       146,  168,  165,  152,  169,  170,  147,  167,  151,  167,
 687                       156,  157,  167,  167,  181,  177,  203,  172,  187,  172,
 688                       168,  170,  172,  172,  186,  191,  202,  209,  184,  210,
 689                       169,  190,   52,  219,  181,   52,  203,  187,   52,  211,
 690                        52,  177,   52,   52,  184,   52,   52,  190,  218,  191,
 691                       186,  221,  202,  209,  222,  210,  226,  227,  211,  219,
 692                       232,  233,  238,  249,  218,  250,  251,  221,  252,  259,
 693 karl       1.38 
 694                       222,  265,  261,  275,  264,  226,  269,  268,  238,  253,
 695                       232,  250,  274,  227,  252,  259,  276,  233,  261,  249,
 696                       264,  277,  251,  268,  278,  269,  282,  265,  274,  275,
 697                       248,  284,  247,  246,  245,  276,  244,  277,  242,  241,
 698                       278,  240,  223,  217,  215,  214,  282,  284,  296,  296,
 699                       296,  296,  296,  296,  296,  296,  296,  297,  297,  297,
 700                       297,  297,  297,  297,  297,  297,  298,  213,  206,  298,
 701                       298,  298,  299,  205,  299,  299,  299,  299,  299,  299,
 702                       299,  300,  300,  301,  204,  201,  301,  301,  301,  302,
 703                       199,  198,  302,  302,  302,  302,  302,  302,  303,  303,
 704                 
 705                       303,  303,  303,  303,  303,  303,  303,  304,  304,  304,
 706                       305,  197,  305,  306,  306,  306,  306,  306,  306,  306,
 707                       306,  306,  307,  307,  307,  308,  308,  308,  309,  195,
 708                       309,  310,  310,  310,  194,  193,  192,  189,  188,  185,
 709                       182,  180,  178,  176,  175,  173,  166,  162,  161,  160,
 710                       158,  155,  154,  153,  148,  144,  142,  140,  138,  137,
 711                       135,  133,  130,  127,  125,  123,  119,  116,  112,  111,
 712                       110,   96,   90,   87,   75,   73,   66,   65,   63,   62,
 713                        58,   43,   40,   39,   36,   35,   29,   28,   12,    7,
 714 karl       1.38       295,  295,  295,  295,  295,  295,  295,  295,  295,  295,
 715                 
 716                       295,  295,  295,  295,  295,  295,  295,  295,  295,  295,
 717                       295,  295,  295,  295,  295,  295,  295,  295,  295,  295,
 718                       295,  295,  295,  295,  295,  295,  295,  295,  295,  295,
 719                       295,  295,  295,  295,  295,  295,  295,  295,  295,  295,
 720                       295,  295,  295,  295,  295,  295,  295,  295,  295,  295,
 721                       295,  295,  295,  295,  295,  295
 722 mike       1.3      } ;
 723                 
 724 karl       1.34 /* Table of booleans, true if rule could match eol. */
 725 karl       1.38 static yyconst flex_int32_t yy_rule_can_match_eol[83] =
 726 karl       1.34     {   0,
 727 dev.meetei 1.37 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
 728                     0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 
 729                     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
 730                     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
 731 karl       1.38     0, 0, 0,     };
 732 karl       1.34 
 733                 static yy_state_type yy_last_accepting_state;
 734                 static char *yy_last_accepting_cpos;
 735                 
 736                 extern int cimmof__flex_debug;
 737                 int cimmof__flex_debug = 0;
 738                 
 739                 /* The intent behind this definition is that it'll catch
 740                  * any uses of REJECT which flex missed.
 741                  */
 742                 #define REJECT reject_used_but_not_detected
 743 mike       1.3  #define yymore() yymore_used_but_not_detected
 744                 #define YY_MORE_ADJ 0
 745                 #define YY_RESTORE_YY_MORE_OFFSET
 746 karl       1.34 char *cimmof_text;
 747 mike       1.3  #line 1 "cimmof.l"
 748 karl       1.34 /*
 749                 //%LICENSE////////////////////////////////////////////////////////////////
 750 kumpf      1.35 //
 751 karl       1.34 // Licensed to The Open Group (TOG) under one or more contributor license
 752                 // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
 753                 // this work for additional information regarding copyright ownership.
 754                 // Each contributor licenses this file to you under the OpenPegasus Open
 755                 // Source License; you may not use this file except in compliance with the
 756                 // License.
 757 kumpf      1.35 //
 758 karl       1.34 // Permission is hereby granted, free of charge, to any person obtaining a
 759                 // copy of this software and associated documentation files (the "Software"),
 760                 // to deal in the Software without restriction, including without limitation
 761                 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
 762                 // and/or sell copies of the Software, and to permit persons to whom the
 763                 // Software is furnished to do so, subject to the following conditions:
 764 kumpf      1.35 //
 765 karl       1.34 // The above copyright notice and this permission notice shall be included
 766                 // in all copies or substantial portions of the Software.
 767 kumpf      1.35 //
 768 karl       1.34 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 769 kumpf      1.35 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 770 karl       1.34 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 771                 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 772                 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 773                 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 774                 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 775 kumpf      1.35 //
 776 karl       1.34 //////////////////////////////////////////////////////////////////////////
 777                 */
 778 karl       1.29 #line 36 "cimmof.l"
 779 mike       1.3  
 780 karl       1.34 
 781 mike       1.3  #include "cimmofParser.h"
 782                 #include "memobjs.h"
 783                 #include "cimmof_tab.h"
 784                 
 785 kumpf      1.32 /* Avoid warn_unused_result warnings in Linux RPM build */
 786 kumpf      1.33 #ifndef ECHO
 787 karl       1.39 # define ECHO do { fwrite(cimmof_text, cimmof_leng, 1, cimmof_out); } while(0)
 788 kumpf      1.33 #endif
 789 kumpf      1.32 
 790 mike       1.3  /*---------------------------------------------------------------*/
 791                 /* These routines wrap certain flex functions, keeping down the  */
 792                 /* number of external dependencies                               */
 793                 /*---------------------------------------------------------------*/
 794                 int get_yy_buf_size_wrapper() { return YY_BUF_SIZE; }
 795                 
 796 karl       1.29 void * get_cimmof__current_buffer_wrapper() {
 797                   return (void *)YY_CURRENT_BUFFER;
 798 mike       1.3  }
 799                 
 800                 void * create_cimmof_buffer_wrapper(const FILE *f, int size) {
 801 karl       1.34   return (void *)cimmof__create_buffer((FILE *)f,size);
 802 mike       1.3  }
 803                 
 804 kumpf      1.16 int switch_to_buffer_wrapper(void *buffstate, Boolean closeCurrent) {
 805                   if (closeCurrent)
 806                   {
 807 karl       1.34      if (cimmof_in != NULL)
 808 kumpf      1.16      {
 809 karl       1.34         fflush(cimmof_in);
 810                         fclose(cimmof_in);
 811                         cimmof_in = NULL;
 812 kumpf      1.16      }
 813 karl       1.34      cimmof__delete_buffer(YY_CURRENT_BUFFER);
 814 kumpf      1.16   }
 815 karl       1.34   cimmof__switch_to_buffer((YY_BUFFER_STATE)buffstate);
 816 mike       1.3    return 0;
 817                 }
 818                 
 819 e.boden    1.21 char  strbuf[1024], *strbuf_p, slashx[2];
 820 mike       1.3  
 821 karl       1.38 /* Pointer to name for metaQualifiers communicated between lexer and parser */
 822                 char * metaQualifierName;
 823 mike       1.3  
 824 karl       1.34 
 825 karl       1.38 
 826                 #line 824 "cimmof_lex.cpp"
 827 karl       1.34 
 828                 #define INITIAL 0
 829 kumpf      1.25 #define myStr 1
 830                 #define myHex 2
 831 e.boden    1.21 
 832 karl       1.34 #ifndef YY_NO_UNISTD_H
 833                 /* Special case for "unistd.h", since it is non-ANSI. We include it way
 834                  * down here because we want the user's section 1 to have been scanned first.
 835                  * The user has a chance to override it with an option.
 836                  */
 837                 #include <unistd.h>
 838                 #endif
 839                 
 840                 #ifndef YY_EXTRA_TYPE
 841                 #define YY_EXTRA_TYPE void *
 842                 #endif
 843                 
 844                 static int yy_init_globals (void );
 845 mike       1.3  
 846 dev.meetei 1.36 /* Accessor methods to globals.
 847                    These are made visible to non-reentrant scanners for convenience. */
 848                 
 849                 int cimmof_lex_destroy (void );
 850                 
 851                 int cimmof_get_debug (void );
 852                 
 853                 void cimmof_set_debug (int debug_flag  );
 854                 
 855                 YY_EXTRA_TYPE cimmof_get_extra (void );
 856                 
 857                 void cimmof_set_extra (YY_EXTRA_TYPE user_defined  );
 858                 
 859                 FILE *cimmof_get_in (void );
 860                 
 861                 void cimmof_set_in  (FILE * in_str  );
 862                 
 863                 FILE *cimmof_get_out (void );
 864                 
 865                 void cimmof_set_out  (FILE * out_str  );
 866                 
 867 dev.meetei 1.36 int cimmof_get_leng (void );
 868                 
 869                 char *cimmof_get_text (void );
 870                 
 871                 int cimmof_get_lineno (void );
 872                 
 873                 void cimmof_set_lineno (int line_number  );
 874                 
 875 mike       1.3  /* Macros after this point can all be overridden by user definitions in
 876                  * section 1.
 877                  */
 878                 
 879                 #ifndef YY_SKIP_YYWRAP
 880                 #ifdef __cplusplus
 881 karl       1.34 extern "C" int cimmof_wrap (void );
 882 mike       1.3  #else
 883 karl       1.34 extern int cimmof_wrap (void );
 884 mike       1.3  #endif
 885                 #endif
 886                 
 887 karl       1.34     static void yyunput (int c,char *buf_ptr  );
 888 dev.meetei 1.37     
 889 mike       1.3  #ifndef yytext_ptr
 890 karl       1.34 static void yy_flex_strncpy (char *,yyconst char *,int );
 891 mike       1.3  #endif
 892                 
 893                 #ifdef YY_NEED_STRLEN
 894 karl       1.34 static int yy_flex_strlen (yyconst char * );
 895 mike       1.3  #endif
 896                 
 897                 #ifndef YY_NO_INPUT
 898 karl       1.34 
 899 mike       1.3  #ifdef __cplusplus
 900 karl       1.34 static int yyinput (void );
 901 mike       1.3  #else
 902 karl       1.34 static int input (void );
 903 mike       1.3  #endif
 904                 
 905                 #endif
 906                 
 907 karl       1.34         static int yy_start_stack_ptr = 0;
 908                         static int yy_start_stack_depth = 0;
 909                         static int *yy_start_stack = NULL;
 910 dev.meetei 1.37     
 911 karl       1.34     static void yy_push_state (int new_state );
 912 dev.meetei 1.37     
 913 karl       1.34     static void yy_pop_state (void );
 914 dev.meetei 1.37     
 915 karl       1.34     static int yy_top_state (void );
 916 dev.meetei 1.37     
 917 mike       1.3  /* Amount of stuff to slurp up with each read. */
 918                 #ifndef YY_READ_BUF_SIZE
 919 karl       1.38 #ifdef __ia64__
 920                 /* On IA-64, the buffer size is 16k, not 8k */
 921                 #define YY_READ_BUF_SIZE 16384
 922                 #else
 923 mike       1.3  #define YY_READ_BUF_SIZE 8192
 924 karl       1.38 #endif /* __ia64__ */
 925 mike       1.3  #endif
 926                 
 927                 /* Copy whatever the last rule matched to the standard output. */
 928                 #ifndef ECHO
 929                 /* This used to be an fputs(), but since the string might contain NUL's,
 930                  * we now use fwrite().
 931                  */
 932 dev.meetei 1.36 #define ECHO do { if (fwrite( cimmof_text, cimmof_leng, 1, cimmof_out )) {} } while (0)
 933 mike       1.3  #endif
 934                 
 935                 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
 936                  * is returned in "result".
 937                  */
 938                 #ifndef YY_INPUT
 939                 #define YY_INPUT(buf,result,max_size) \
 940 karl       1.34 	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
 941 kumpf      1.31 		{ \
 942 karl       1.34 		int c = '*'; \
 943 karl       1.38 		size_t n; \
 944 kumpf      1.31 		for ( n = 0; n < max_size && \
 945 karl       1.34 			     (c = getc( cimmof_in )) != EOF && c != '\n'; ++n ) \
 946 kumpf      1.31 			buf[n] = (char) c; \
 947                 		if ( c == '\n' ) \
 948                 			buf[n++] = (char) c; \
 949 karl       1.34 		if ( c == EOF && ferror( cimmof_in ) ) \
 950 kumpf      1.31 			YY_FATAL_ERROR( "input in flex scanner failed" ); \
 951                 		result = n; \
 952                 		} \
 953 karl       1.34 	else \
 954                 		{ \
 955                 		errno=0; \
 956                 		while ( (result = fread(buf, 1, max_size, cimmof_in))==0 && ferror(cimmof_in)) \
 957                 			{ \
 958                 			if( errno != EINTR) \
 959                 				{ \
 960                 				YY_FATAL_ERROR( "input in flex scanner failed" ); \
 961                 				break; \
 962                 				} \
 963                 			errno=0; \
 964                 			clearerr(cimmof_in); \
 965                 			} \
 966                 		}\
 967                 \
 968                 
 969 mike       1.3  #endif
 970                 
 971                 /* No semi-colon after return; correct usage is to write "yyterminate();" -
 972                  * we don't want an extra ';' after the "return" because that will cause
 973                  * some compilers to complain about unreachable statements.
 974                  */
 975                 #ifndef yyterminate
 976                 #define yyterminate() return YY_NULL
 977                 #endif
 978                 
 979                 /* Number of entries by which start-condition stack grows. */
 980                 #ifndef YY_START_STACK_INCR
 981                 #define YY_START_STACK_INCR 25
 982                 #endif
 983                 
 984                 /* Report a fatal error. */
 985                 #ifndef YY_FATAL_ERROR
 986                 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
 987                 #endif
 988                 
 989 karl       1.34 /* end tables serialization structures and prototypes */
 990                 
 991 mike       1.3  /* Default declaration of generated scanner - a define so the user can
 992                  * easily add parameters.
 993                  */
 994                 #ifndef YY_DECL
 995 karl       1.34 #define YY_DECL_IS_OURS 1
 996                 
 997                 extern int cimmof_lex (void);
 998                 
 999                 #define YY_DECL int cimmof_lex (void)
1000                 #endif /* !YY_DECL */
1001 mike       1.3  
1002 karl       1.34 /* Code executed at the beginning of each rule, after cimmof_text and cimmof_leng
1003 mike       1.3   * have been set up.
1004                  */
1005                 #ifndef YY_USER_ACTION
1006                 #define YY_USER_ACTION
1007                 #endif
1008                 
1009                 /* Code executed at the end of each rule. */
1010                 #ifndef YY_BREAK
1011                 #define YY_BREAK break;
1012                 #endif
1013                 
1014                 #define YY_RULE_SETUP \
1015 kumpf      1.31 	YY_USER_ACTION
1016 mike       1.3  
1017 karl       1.34 /** The main scanner function which does all the work.
1018                  */
1019 mike       1.3  YY_DECL
1020 karl       1.34 {
1021 kumpf      1.31 	register yy_state_type yy_current_state;
1022 karl       1.34 	register char *yy_cp, *yy_bp;
1023 kumpf      1.31 	register int yy_act;
1024 dev.meetei 1.37     
1025 karl       1.38 #line 86 "cimmof.l"
1026 mike       1.3  
1027                 
1028                 
1029 karl       1.38 #line 1027 "cimmof_lex.cpp"
1030 mike       1.3  
1031 karl       1.34 	if ( !(yy_init) )
1032 kumpf      1.31 		{
1033 karl       1.34 		(yy_init) = 1;
1034 mike       1.3  
1035                 #ifdef YY_USER_INIT
1036 kumpf      1.31 		YY_USER_INIT;
1037 mike       1.3  #endif
1038                 
1039 karl       1.34 		if ( ! (yy_start) )
1040                 			(yy_start) = 1;	/* first start state */
1041 mike       1.3  
1042 karl       1.34 		if ( ! cimmof_in )
1043                 			cimmof_in = stdin;
1044 mike       1.3  
1045 karl       1.34 		if ( ! cimmof_out )
1046                 			cimmof_out = stdout;
1047 mike       1.3  
1048 karl       1.34 		if ( ! YY_CURRENT_BUFFER ) {
1049                 			cimmof_ensure_buffer_stack ();
1050                 			YY_CURRENT_BUFFER_LVALUE =
1051                 				cimmof__create_buffer(cimmof_in,YY_BUF_SIZE );
1052                 		}
1053 mike       1.3  
1054 karl       1.34 		cimmof__load_buffer_state( );
1055 kumpf      1.31 		}
1056 mike       1.3  
1057 kumpf      1.31 	while ( 1 )		/* loops until end-of-file is reached */
1058                 		{
1059 karl       1.34 		yy_cp = (yy_c_buf_p);
1060 mike       1.3  
1061 karl       1.34 		/* Support of cimmof_text. */
1062                 		*yy_cp = (yy_hold_char);
1063 mike       1.3  
1064 kumpf      1.31 		/* yy_bp points to the position in yy_ch_buf of the start of
1065                 		 * the current run.
1066                 		 */
1067                 		yy_bp = yy_cp;
1068 mike       1.3  
1069 karl       1.34 		yy_current_state = (yy_start);
1070 mike       1.3  yy_match:
1071 kumpf      1.31 		do
1072                 			{
1073                 			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1074 karl       1.34 			if ( yy_accept[yy_current_state] )
1075                 				{
1076                 				(yy_last_accepting_state) = yy_current_state;
1077                 				(yy_last_accepting_cpos) = yy_cp;
1078                 				}
1079 kumpf      1.31 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1080                 				{
1081                 				yy_current_state = (int) yy_def[yy_current_state];
1082 karl       1.38 				if ( yy_current_state >= 296 )
1083 kumpf      1.31 					yy_c = yy_meta[(unsigned int) yy_c];
1084                 				}
1085                 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1086                 			++yy_cp;
1087                 			}
1088 karl       1.38 		while ( yy_current_state != 295 );
1089 karl       1.34 		yy_cp = (yy_last_accepting_cpos);
1090                 		yy_current_state = (yy_last_accepting_state);
1091 mike       1.3  
1092                 yy_find_action:
1093 karl       1.34 		yy_act = yy_accept[yy_current_state];
1094 kumpf      1.31 
1095                 		YY_DO_BEFORE_ACTION;
1096                 
1097 karl       1.34 		if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
1098 kumpf      1.31 			{
1099                 			int yyl;
1100 karl       1.34 			for ( yyl = 0; yyl < cimmof_leng; ++yyl )
1101                 				if ( cimmof_text[yyl] == '\n' )
1102 dev.meetei 1.37 					   
1103 karl       1.34     cimmof_lineno++;
1104                 ;
1105 kumpf      1.31 			}
1106 mike       1.3  
1107 kumpf      1.31 do_action:	/* This label is used only to access EOF actions. */
1108 mike       1.3  
1109 kumpf      1.31 		switch ( yy_act )
1110                 	{ /* beginning of action switch */
1111 karl       1.34 			case 0: /* must back up */
1112                 			/* undo the effects of YY_DO_BEFORE_ACTION */
1113                 			*yy_cp = (yy_hold_char);
1114                 			yy_cp = (yy_last_accepting_cpos);
1115                 			yy_current_state = (yy_last_accepting_state);
1116                 			goto yy_find_action;
1117                 
1118 mike       1.3  case 1:
1119 karl       1.34 /* rule 1 can match eol */
1120 mike       1.3  YY_RULE_SETUP
1121 karl       1.38 #line 89 "cimmof.l"
1122 karl       1.29 { cimmofParser::Instance()->increment_lineno(); }
1123 kumpf      1.31 	YY_BREAK
1124 mike       1.3  case 2:
1125 karl       1.34 /* rule 2 can match eol */
1126 mike       1.3  YY_RULE_SETUP
1127 karl       1.38 #line 90 "cimmof.l"
1128 karl       1.29 { cimmofParser::Instance()->increment_lineno(); }
1129 kumpf      1.31 	YY_BREAK
1130 mike       1.3  case 3:
1131                 YY_RULE_SETUP
1132 karl       1.38 #line 91 "cimmof.l"
1133 mike       1.3  { /* skip white space */ }
1134 kumpf      1.31 	YY_BREAK
1135 mike       1.3  case 4:
1136                 YY_RULE_SETUP
1137 karl       1.38 #line 92 "cimmof.l"
1138 mike       1.3  { return(TOK_CLASS); }
1139 kumpf      1.31 	YY_BREAK
1140 mike       1.3  case 5:
1141                 YY_RULE_SETUP
1142 karl       1.38 #line 93 "cimmof.l"
1143 mike       1.3  { return(TOK_LEFTCURLYBRACE); }
1144 kumpf      1.31 	YY_BREAK
1145 mike       1.3  case 6:
1146                 YY_RULE_SETUP
1147 karl       1.38 #line 94 "cimmof.l"
1148 mike       1.3  { return(TOK_RIGHTCURLYBRACE); }
1149 kumpf      1.31 	YY_BREAK
1150 mike       1.3  case 7:
1151                 YY_RULE_SETUP
1152 karl       1.38 #line 95 "cimmof.l"
1153 mike       1.3  { return(TOK_LEFTSQUAREBRACKET); }
1154 kumpf      1.31 	YY_BREAK
1155 mike       1.3  case 8:
1156                 YY_RULE_SETUP
1157 karl       1.38 #line 96 "cimmof.l"
1158 mike       1.3  { return(TOK_RIGHTSQUAREBRACKET); }
1159 kumpf      1.31 	YY_BREAK
1160 mike       1.3  case 9:
1161                 YY_RULE_SETUP
1162 karl       1.38 #line 97 "cimmof.l"
1163 mike       1.3  { return(TOK_LEFTPAREN); }
1164 kumpf      1.31 	YY_BREAK
1165 mike       1.3  case 10:
1166                 YY_RULE_SETUP
1167 karl       1.38 #line 98 "cimmof.l"
1168 mike       1.3  { return(TOK_RIGHTPAREN); }
1169 kumpf      1.31 	YY_BREAK
1170 mike       1.3  case 11:
1171                 YY_RULE_SETUP
1172 karl       1.38 #line 99 "cimmof.l"
1173 mike       1.3  { return(TOK_COLON); }
1174 kumpf      1.31 	YY_BREAK
1175 mike       1.3  case 12:
1176                 YY_RULE_SETUP
1177 karl       1.38 #line 100 "cimmof.l"
1178 mike       1.3  { return(TOK_SEMICOLON); }
1179 kumpf      1.31 	YY_BREAK
1180 mike       1.3  case 13:
1181                 YY_RULE_SETUP
1182 karl       1.38 #line 101 "cimmof.l"
1183 karl       1.29 {
1184 karl       1.34                    cimmof_lval.strval = new String(cimmof_text);
1185 karl       1.29                    return(TOK_REAL_VALUE); }
1186 kumpf      1.31 	YY_BREAK
1187 mike       1.3  case 14:
1188                 YY_RULE_SETUP
1189 karl       1.38 #line 104 "cimmof.l"
1190 karl       1.34 { cimmof_lval.strval = new String(cimmof_text);
1191 karl       1.29                    return(TOK_OCTAL_VALUE); }
1192 kumpf      1.31 	YY_BREAK
1193 mike       1.3  case 15:
1194                 YY_RULE_SETUP
1195 karl       1.38 #line 106 "cimmof.l"
1196 karl       1.34 { cimmof_lval.strval = new String(cimmof_text);
1197 karl       1.29                    return(TOK_HEX_VALUE); }
1198 kumpf      1.31 	YY_BREAK
1199 mike       1.3  case 16:
1200                 YY_RULE_SETUP
1201 karl       1.38 #line 108 "cimmof.l"
1202 karl       1.34 { cimmof_lval.strval = new String(cimmof_text);
1203 karl       1.29                    return(TOK_BINARY_VALUE); }
1204 kumpf      1.31 	YY_BREAK
1205 mike       1.3  case 17:
1206                 YY_RULE_SETUP
1207 karl       1.38 #line 110 "cimmof.l"
1208 karl       1.34 { cimmof_lval.strval = new String(cimmof_text);
1209 karl       1.29                    return(TOK_POSITIVE_DECIMAL_VALUE); }
1210 kumpf      1.31 	YY_BREAK
1211 mike       1.3  case 18:
1212                 YY_RULE_SETUP
1213 karl       1.38 #line 112 "cimmof.l"
1214 kumpf      1.31 { /* Note: All non-zero unsigned integers are handled above */
1215 karl       1.34                  cimmof_lval.strval = new String(cimmof_text);
1216 karl       1.29                    return(TOK_SIGNED_DECIMAL_VALUE); }
1217 kumpf      1.31 	YY_BREAK
1218 mike       1.3  case 19:
1219                 YY_RULE_SETUP
1220 karl       1.38 #line 115 "cimmof.l"
1221 mike       1.3  { return(TOK_EQUAL); }
1222 kumpf      1.31 	YY_BREAK
1223 mike       1.3  case 20:
1224                 YY_RULE_SETUP
1225 karl       1.38 #line 116 "cimmof.l"
1226 mike       1.3  { return(TOK_COMMA); }
1227 kumpf      1.31 	YY_BREAK
1228 mike       1.3  case 21:
1229                 YY_RULE_SETUP
1230 karl       1.38 #line 117 "cimmof.l"
1231 karl       1.34 { cimmof_lval.strval = new String(cimmof_text);
1232 karl       1.29                    return(TOK_CHAR_VALUE); }
1233 kumpf      1.31 	YY_BREAK
1234 karl       1.29 /*--- bugzilla 544 fix; handle string escapes ---
1235                 
1236                        an impl. decision: invalid escape sequences
1237                        are simply ignored, and left in the string.
1238                 
1239 karl       1.34        an impl. decision: cimmof_leng is set to the len
1240 karl       1.29        of resulting string, not the len of the matched
1241                        token(s), since they are different, with escapes.
1242 karl       1.34        (but note; cimmof.y does not use cimmof_leng!)
1243 karl       1.29 
1244                        an impl. req't: strings are returned to parser
1245 karl       1.38        with enclosing "s.
1246 karl       1.29     */
1247 mike       1.3  case 22:
1248                 YY_RULE_SETUP
1249 karl       1.38 #line 134 "cimmof.l"
1250 karl       1.29 { BEGIN(myStr); strbuf_p = strbuf;
1251                                /**strbuf_p++ = '"';*/ }
1252 kumpf      1.31 	YY_BREAK
1253 mike       1.3  case 23:
1254                 YY_RULE_SETUP
1255 karl       1.38 #line 136 "cimmof.l"
1256 karl       1.29 { BEGIN(INITIAL);
1257                                /**strbuf_p++ = '"';*/  *strbuf_p = '\0';
1258                                   cimmof_leng = strbuf_p - strbuf;
1259                                   cimmof_lval.strval = new String(strbuf);
1260                                   return TOK_STRING_VALUE; }
1261 kumpf      1.31 	YY_BREAK
1262 kumpf      1.25 case YY_STATE_EOF(myStr):
1263 karl       1.38 #line 141 "cimmof.l"
1264 dj.gorey   1.20 case 24:
1265 karl       1.34 /* rule 24 can match eol */
1266 dj.gorey   1.20 YY_RULE_SETUP
1267 karl       1.38 #line 142 "cimmof.l"
1268 karl       1.29 { BEGIN(INITIAL);
1269                                /**strbuf_p++ = '"';*/  *strbuf_p = '\0';
1270                                   cimmof_leng = strbuf_p - strbuf;
1271                                   cimmof_lval.strval = new String(strbuf);
1272                                   return TOK_UNEXPECTED_CHAR; }
1273 kumpf      1.31 	YY_BREAK
1274 dj.gorey   1.20 case 25:
1275 mike       1.3  YY_RULE_SETUP
1276 karl       1.38 #line 147 "cimmof.l"
1277 e.boden    1.21 { /* backspace */        *strbuf_p++ = '\b'; }
1278 kumpf      1.31 	YY_BREAK
1279 dj.gorey   1.20 case 26:
1280 mike       1.3  YY_RULE_SETUP
1281 karl       1.38 #line 148 "cimmof.l"
1282 e.boden    1.21 { /* form feed */        *strbuf_p++ = '\f'; }
1283 kumpf      1.31 	YY_BREAK
1284 dj.gorey   1.20 case 27:
1285 mike       1.3  YY_RULE_SETUP
1286 karl       1.38 #line 149 "cimmof.l"
1287 e.boden    1.21 { /* line feed */        *strbuf_p++ = '\n'; }
1288 kumpf      1.31 	YY_BREAK
1289 dj.gorey   1.20 case 28:
1290 mike       1.3  YY_RULE_SETUP
1291 karl       1.38 #line 150 "cimmof.l"
1292 e.boden    1.21 { /* carriage return */  *strbuf_p++ = '\r'; }
1293 kumpf      1.31 	YY_BREAK
1294 e.boden    1.21 case 29:
1295                 YY_RULE_SETUP
1296 karl       1.38 #line 151 "cimmof.l"
1297 e.boden    1.21 { /* horizontal tab */   *strbuf_p++ = '\t'; }
1298 kumpf      1.31 	YY_BREAK
1299 e.boden    1.21 case 30:
1300                 YY_RULE_SETUP
1301 karl       1.38 #line 152 "cimmof.l"
1302 e.boden    1.21 { /* single quote */     *strbuf_p++ = '\''; }
1303 kumpf      1.31 	YY_BREAK
1304 e.boden    1.21 case 31:
1305                 YY_RULE_SETUP
1306 karl       1.38 #line 153 "cimmof.l"
1307 e.boden    1.21 { /* double quote */     *strbuf_p++ = '"';  }
1308 kumpf      1.31 	YY_BREAK
1309 e.boden    1.21 case 32:
1310                 YY_RULE_SETUP
1311 karl       1.38 #line 154 "cimmof.l"
1312 e.boden    1.21 { /* backslash */        *strbuf_p++ = '\\'; }
1313 kumpf      1.31 	YY_BREAK
1314 e.boden    1.21 case 33:
1315                 YY_RULE_SETUP
1316 karl       1.38 #line 155 "cimmof.l"
1317 kumpf      1.25 { yy_push_state(myHex);
1318 karl       1.34                   memcpy(slashx,cimmof_text,2);
1319 karl       1.29                }
1320 kumpf      1.31 	YY_BREAK
1321 e.boden    1.21 case 34:
1322 karl       1.34 /* rule 34 can match eol */
1323 e.boden    1.21 YY_RULE_SETUP
1324 karl       1.38 #line 158 "cimmof.l"
1325 e.boden    1.21 { *strbuf_p++ = '\\';
1326 karl       1.34                         *strbuf_p++ = cimmof_text[1]; }
1327 kumpf      1.31 	YY_BREAK
1328 e.boden    1.21 case 35:
1329                 YY_RULE_SETUP
1330 karl       1.38 #line 160 "cimmof.l"
1331 karl       1.34 { char *t = cimmof_text;
1332 karl       1.29                             while( *t ) *strbuf_p++ = *t++;
1333                                             *strbuf_p = '\0'; }
1334 kumpf      1.31 	YY_BREAK
1335 e.boden    1.21 case 36:
1336                 YY_RULE_SETUP
1337 karl       1.38 #line 163 "cimmof.l"
1338 e.boden    1.21 { /* get escaped hex digits */
1339 karl       1.29                             char  hexfmt[4];   unsigned int n;
1340 karl       1.34                             sprintf( hexfmt, "%%%dx", cimmof_leng );
1341                                             sscanf(cimmof_text, hexfmt, &n);
1342 karl       1.29                             if (n>255) {
1343                                                 memcpy(strbuf_p,slashx,2);
1344                                                 strbuf_p += 2;
1345 karl       1.34                                 char *t = cimmof_text;
1346 karl       1.29                                 while( *t ) *strbuf_p++ = *t++;
1347                                             }
1348                                             else *strbuf_p++ = (char)n;
1349                                                 yy_pop_state();
1350                                         }
1351 kumpf      1.31 	YY_BREAK
1352 e.boden    1.21 case 37:
1353                 YY_RULE_SETUP
1354 karl       1.38 #line 176 "cimmof.l"
1355 e.boden    1.21 { memcpy(strbuf_p,slashx,2);
1356 karl       1.29                               strbuf_p += 2;
1357 karl       1.34                               *strbuf_p++ = *cimmof_text;
1358 karl       1.29                               yy_pop_state();
1359                                         }
1360 kumpf      1.31 	YY_BREAK
1361 e.boden    1.21 /* --- end of bugzilla 544 fix --- */
1362                 case 38:
1363                 YY_RULE_SETUP
1364 karl       1.38 #line 184 "cimmof.l"
1365 e.boden    1.21 {   int c1=0, c2=yyinput();
1366 karl       1.29                                 for(;;) {
1367                                                      if (c2==EOF) break;
1368                                                      if (c1=='*' && c2=='/') break;
1369                                                      c1=c2;
1370                                                      c2=yyinput();
1371                                                 }
1372                                         }
1373 kumpf      1.31 	YY_BREAK
1374 e.boden    1.21 case YY_STATE_EOF(INITIAL):
1375 kumpf      1.25 case YY_STATE_EOF(myHex):
1376 karl       1.38 #line 192 "cimmof.l"
1377 e.boden    1.21 { yyterminate(); }
1378 kumpf      1.31 	YY_BREAK
1379 e.boden    1.21 case 39:
1380                 YY_RULE_SETUP
1381 karl       1.38 #line 193 "cimmof.l"
1382 e.boden    1.21 { return(TOK_NULL_VALUE); }
1383 kumpf      1.31 	YY_BREAK
1384 e.boden    1.21 case 40:
1385                 YY_RULE_SETUP
1386 karl       1.38 #line 194 "cimmof.l"
1387 e.boden    1.21 { return(TOK_TRUE); }
1388 kumpf      1.31 	YY_BREAK
1389 e.boden    1.21 case 41:
1390                 YY_RULE_SETUP
1391 karl       1.38 #line 195 "cimmof.l"
1392 e.boden    1.21 { return(TOK_FALSE); }
1393 kumpf      1.31 	YY_BREAK
1394 e.boden    1.21 case 42:
1395                 YY_RULE_SETUP
1396 karl       1.38 #line 196 "cimmof.l"
1397 mike       1.3  { return(TOK_PERIOD); }
1398 kumpf      1.31 	YY_BREAK
1399 e.boden    1.21 case 43:
1400 mike       1.3  YY_RULE_SETUP
1401 karl       1.38 #line 197 "cimmof.l"
1402 mike       1.3  { return(TOK_PRAGMA); }
1403 kumpf      1.31 	YY_BREAK
1404 e.boden    1.21 case 44:
1405 mike       1.3  YY_RULE_SETUP
1406 karl       1.38 #line 198 "cimmof.l"
1407 karl       1.29 { return(TOK_INSTANCE); }
1408 kumpf      1.31 	YY_BREAK
1409 e.boden    1.21 case 45:
1410 mike       1.3  YY_RULE_SETUP
1411 karl       1.38 #line 199 "cimmof.l"
1412 karl       1.29 { return(TOK_OF); }
1413 kumpf      1.31 	YY_BREAK
1414 e.boden    1.21 case 46:
1415 mike       1.3  YY_RULE_SETUP
1416 karl       1.38 #line 200 "cimmof.l"
1417 kumpf      1.11 {return(TOK_QUALIFIER); }
1418 kumpf      1.31 	YY_BREAK
1419 e.boden    1.21 case 47:
1420 mike       1.3  YY_RULE_SETUP
1421 karl       1.38 #line 201 "cimmof.l"
1422 kumpf      1.11 { return(TOK_SCOPE); }
1423 kumpf      1.31 	YY_BREAK
1424 e.boden    1.21 case 48:
1425 mike       1.3  YY_RULE_SETUP
1426 karl       1.38 #line 203 "cimmof.l"
1427                 {
1428                                                        metaQualifierName = strdup(cimmof_text);
1429                                                        return(TOK_ASSOCIATION); }
1430 kumpf      1.31 	YY_BREAK
1431 e.boden    1.21 case 49:
1432 mike       1.3  YY_RULE_SETUP
1433 karl       1.38 #line 206 "cimmof.l"
1434 karl       1.39 {
1435 karl       1.38                                        metaQualifierName = strdup(cimmof_text);
1436                                                        return(TOK_INDICATION); }
1437 kumpf      1.31 	YY_BREAK
1438 e.boden    1.21 case 50:
1439 mike       1.3  YY_RULE_SETUP
1440 kumpf      1.33 #line 210 "cimmof.l"
1441 kumpf      1.11 { return(TOK_PROPERTY); }
1442 kumpf      1.31 	YY_BREAK
1443 karl       1.38 case 51:
1444 mike       1.3  YY_RULE_SETUP
1445 kumpf      1.33 #line 211 "cimmof.l"
1446 kumpf      1.11 { return(TOK_REFERENCE); }
1447 kumpf      1.31 	YY_BREAK
1448 karl       1.38 case 52:
1449 mike       1.3  YY_RULE_SETUP
1450 kumpf      1.33 #line 212 "cimmof.l"
1451 kumpf      1.11 { return(TOK_METHOD); }
1452 kumpf      1.31 	YY_BREAK
1453 karl       1.38 case 53:
1454 mike       1.3  YY_RULE_SETUP
1455 kumpf      1.33 #line 213 "cimmof.l"
1456 kumpf      1.11 {return(TOK_PARAMETER); }
1457 kumpf      1.31 	YY_BREAK
1458 karl       1.38 case 54:
1459 mike       1.3  YY_RULE_SETUP
1460 kumpf      1.33 #line 214 "cimmof.l"
1461 kumpf      1.11 { return(TOK_ANY); }
1462 kumpf      1.31 	YY_BREAK
1463 karl       1.38 case 55:
1464 mike       1.3  YY_RULE_SETUP
1465 karl       1.38 #line 216 "cimmof.l"
1466 kumpf      1.11 { return(TOK_REF); }
1467 kumpf      1.31 	YY_BREAK
1468 karl       1.38 case 56:
1469 mike       1.3  YY_RULE_SETUP
1470 karl       1.38 #line 217 "cimmof.l"
1471 kumpf      1.11 { return(TOK_FLAVOR); }
1472 kumpf      1.31 	YY_BREAK
1473 karl       1.38 case 57:
1474 mike       1.3  YY_RULE_SETUP
1475 karl       1.38 #line 218 "cimmof.l"
1476 kumpf      1.11 {
1477 karl       1.29                                          return(TOK_ENABLEOVERRIDE); }
1478 kumpf      1.31 	YY_BREAK
1479 karl       1.38 case 58:
1480 mike       1.3  YY_RULE_SETUP
1481 karl       1.38 #line 220 "cimmof.l"
1482 mike       1.3  {
1483 karl       1.29                                          return(TOK_DISABLEOVERRIDE); }
1484 kumpf      1.31 	YY_BREAK
1485 karl       1.38 case 59:
1486 mike       1.3  YY_RULE_SETUP
1487 karl       1.38 #line 222 "cimmof.l"
1488 karl       1.29 { return(TOK_RESTRICTED); }
1489 kumpf      1.31 	YY_BREAK
1490 karl       1.38 case 60:
1491 mike       1.3  YY_RULE_SETUP
1492 karl       1.38 #line 223 "cimmof.l"
1493 karl       1.29 { return(TOK_TOSUBCLASS); }
1494 kumpf      1.31 	YY_BREAK
1495 karl       1.38 case 61:
1496 mike       1.3  YY_RULE_SETUP
1497 karl       1.38 #line 224 "cimmof.l"
1498 karl       1.29 { return(TOK_TRANSLATABLE); }
1499 kumpf      1.31 	YY_BREAK
1500 karl       1.38 case 62:
1501 mike       1.3  YY_RULE_SETUP
1502 karl       1.38 #line 225 "cimmof.l"
1503 kumpf      1.11 { return(TOK_INCLUDE); }
1504 kumpf      1.31 	YY_BREAK
1505 karl       1.38 case 63:
1506 e.boden    1.21 YY_RULE_SETUP
1507 karl       1.38 #line 226 "cimmof.l"
1508 karl       1.34 { cimmof_lval.strval = new String(cimmof_text);
1509 karl       1.29                                        return TOK_ALIAS_IDENTIFIER; }
1510 kumpf      1.31 	YY_BREAK
1511 karl       1.38 case 64:
1512 e.boden    1.21 YY_RULE_SETUP
1513 karl       1.38 #line 228 "cimmof.l"
1514 karl       1.29 { return TOK_AS; }
1515 kumpf      1.31 	YY_BREAK
1516 karl       1.38 case 65:
1517 mike       1.3  YY_RULE_SETUP
1518 karl       1.38 #line 229 "cimmof.l"
1519 kumpf      1.11 { return(TOK_DT_STR); }
1520 kumpf      1.31 	YY_BREAK
1521 karl       1.38 case 66:
1522 mike       1.3  YY_RULE_SETUP
1523 karl       1.38 #line 230 "cimmof.l"
1524 kumpf      1.11 { return(TOK_DT_BOOL); }
1525 kumpf      1.31 	YY_BREAK
1526 karl       1.38 case 67:
1527 mike       1.3  YY_RULE_SETUP
1528 karl       1.38 #line 231 "cimmof.l"
1529 kumpf      1.11 { return(TOK_DT_DATETIME); }
1530 kumpf      1.31 	YY_BREAK
1531 karl       1.38 case 68:
1532 mike       1.3  YY_RULE_SETUP
1533 karl       1.38 #line 232 "cimmof.l"
1534 kumpf      1.11 { return(TOK_DT_UINT8); }
1535 kumpf      1.31 	YY_BREAK
1536 karl       1.38 case 69:
1537 mike       1.3  YY_RULE_SETUP
1538 karl       1.38 #line 233 "cimmof.l"
1539 kumpf      1.11 { return(TOK_DT_UINT16); }
1540 kumpf      1.31 	YY_BREAK
1541 karl       1.38 case 70:
1542 mike       1.3  YY_RULE_SETUP
1543 karl       1.38 #line 234 "cimmof.l"
1544 kumpf      1.11 { return(TOK_DT_UINT32); }
1545 kumpf      1.31 	YY_BREAK
1546 karl       1.38 case 71:
1547 mike       1.3  YY_RULE_SETUP
1548 karl       1.38 #line 235 "cimmof.l"
1549 kumpf      1.11 { return(TOK_DT_UINT64); }
1550 kumpf      1.31 	YY_BREAK
1551 karl       1.38 case 72:
1552 mike       1.3  YY_RULE_SETUP
1553 karl       1.38 #line 236 "cimmof.l"
1554 kumpf      1.11 { return(TOK_DT_SINT8); }
1555 kumpf      1.31 	YY_BREAK
1556 karl       1.38 case 73:
1557 mike       1.3  YY_RULE_SETUP
1558 karl       1.38 #line 237 "cimmof.l"
1559 kumpf      1.11 { return(TOK_DT_SINT16); }
1560 kumpf      1.31 	YY_BREAK
1561 karl       1.38 case 74:
1562 mike       1.3  YY_RULE_SETUP
1563 karl       1.38 #line 238 "cimmof.l"
1564 kumpf      1.11 { return(TOK_DT_SINT32); }
1565 kumpf      1.31 	YY_BREAK
1566 karl       1.38 case 75:
1567 mike       1.3  YY_RULE_SETUP
1568 karl       1.38 #line 239 "cimmof.l"
1569 kumpf      1.11 { return(TOK_DT_SINT64); }
1570 kumpf      1.31 	YY_BREAK
1571 karl       1.38 case 76:
1572 mike       1.3  YY_RULE_SETUP
1573 karl       1.38 #line 240 "cimmof.l"
1574 kumpf      1.11 { return(TOK_DT_REAL32); }
1575 kumpf      1.31 	YY_BREAK
1576 karl       1.38 case 77:
1577 mike       1.3  YY_RULE_SETUP
1578 karl       1.38 #line 241 "cimmof.l"
1579 kumpf      1.11 { return(TOK_DT_REAL64); }
1580 kumpf      1.31 	YY_BREAK
1581 karl       1.38 case 78:
1582 mike       1.3  YY_RULE_SETUP
1583 karl       1.38 #line 242 "cimmof.l"
1584 kumpf      1.11 { return(TOK_DT_CHAR8); }
1585 kumpf      1.31 	YY_BREAK
1586 karl       1.38 case 79:
1587 mike       1.3  YY_RULE_SETUP
1588 karl       1.38 #line 243 "cimmof.l"
1589 kumpf      1.11 { return(TOK_DT_CHAR16); }
1590 kumpf      1.31 	YY_BREAK
1591 karl       1.38 case 80:
1592 mike       1.3  YY_RULE_SETUP
1593 karl       1.38 #line 244 "cimmof.l"
1594 karl       1.34 { cimmof_lval.strval = new String(cimmof_text);
1595 karl       1.29                                          return(TOK_SIMPLE_IDENTIFIER); }
1596 kumpf      1.31 	YY_BREAK
1597 karl       1.38 case 81:
1598 mike       1.3  YY_RULE_SETUP
1599 karl       1.38 #line 246 "cimmof.l"
1600 karl       1.34 { cimmof_lval.strval = new String(cimmof_text);
1601 karl       1.29                                          return(TOK_UNEXPECTED_CHAR); }
1602 kumpf      1.31 	YY_BREAK
1603 karl       1.38 case 82:
1604 mike       1.3  YY_RULE_SETUP
1605 karl       1.38 #line 249 "cimmof.l"
1606 mike       1.3  ECHO;
1607 kumpf      1.31 	YY_BREAK
1608 karl       1.38 #line 1606 "cimmof_lex.cpp"
1609 mike       1.3  
1610 kumpf      1.31 	case YY_END_OF_BUFFER:
1611                 		{
1612                 		/* Amount of text matched not including the EOB char. */
1613 karl       1.34 		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1614 kumpf      1.31 
1615                 		/* Undo the effects of YY_DO_BEFORE_ACTION. */
1616 karl       1.34 		*yy_cp = (yy_hold_char);
1617 kumpf      1.31 		YY_RESTORE_YY_MORE_OFFSET
1618                 
1619 karl       1.34 		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1620 kumpf      1.31 			{
1621                 			/* We're scanning a new file or input source.  It's
1622                 			 * possible that this happened because the user
1623 karl       1.34 			 * just pointed cimmof_in at a new source and called
1624                 			 * cimmof_lex().  If so, then we have to assure
1625                 			 * consistency between YY_CURRENT_BUFFER and our
1626 kumpf      1.31 			 * globals.  Here is the right place to do so, because
1627                 			 * this is the first action (other than possibly a
1628                 			 * back-up) that will match for the new input source.
1629                 			 */
1630 karl       1.34 			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1631                 			YY_CURRENT_BUFFER_LVALUE->yy_input_file = cimmof_in;
1632                 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1633 kumpf      1.31 			}
1634                 
1635                 		/* Note that here we test for yy_c_buf_p "<=" to the position
1636                 		 * of the first EOB in the buffer, since yy_c_buf_p will
1637                 		 * already have been incremented past the NUL character
1638                 		 * (since all states make transitions on EOB to the
1639                 		 * end-of-buffer state).  Contrast this with the test
1640                 		 * in input().
1641                 		 */
1642 karl       1.34 		if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1643 kumpf      1.31 			{ /* This was really a NUL. */
1644                 			yy_state_type yy_next_state;
1645                 
1646 karl       1.34 			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1647 kumpf      1.31 
1648 karl       1.34 			yy_current_state = yy_get_previous_state(  );
1649 kumpf      1.31 
1650                 			/* Okay, we're now positioned to make the NUL
1651                 			 * transition.  We couldn't have
1652                 			 * yy_get_previous_state() go ahead and do it
1653                 			 * for us because it doesn't know how to deal
1654                 			 * with the possibility of jamming (and we don't
1655                 			 * want to build jamming into it because then it
1656                 			 * will run more slowly).
1657                 			 */
1658                 
1659                 			yy_next_state = yy_try_NUL_trans( yy_current_state );
1660                 
1661 karl       1.34 			yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1662 kumpf      1.31 
1663                 			if ( yy_next_state )
1664                 				{
1665                 				/* Consume the NUL. */
1666 karl       1.34 				yy_cp = ++(yy_c_buf_p);
1667 kumpf      1.31 				yy_current_state = yy_next_state;
1668                 				goto yy_match;
1669                 				}
1670                 
1671                 			else
1672                 				{
1673 karl       1.34 				yy_cp = (yy_last_accepting_cpos);
1674                 				yy_current_state = (yy_last_accepting_state);
1675 kumpf      1.31 				goto yy_find_action;
1676                 				}
1677                 			}
1678                 
1679 karl       1.34 		else switch ( yy_get_next_buffer(  ) )
1680 kumpf      1.31 			{
1681                 			case EOB_ACT_END_OF_FILE:
1682                 				{
1683 karl       1.34 				(yy_did_buffer_switch_on_eof) = 0;
1684 kumpf      1.31 
1685 karl       1.34 				if ( cimmof_wrap( ) )
1686 kumpf      1.31 					{
1687                 					/* Note: because we've taken care in
1688                 					 * yy_get_next_buffer() to have set up
1689 karl       1.34 					 * cimmof_text, we can now set up
1690 kumpf      1.31 					 * yy_c_buf_p so that if some total
1691                 					 * hoser (like flex itself) wants to
1692                 					 * call the scanner after we return the
1693                 					 * YY_NULL, it'll still work - another
1694                 					 * YY_NULL will get returned.
1695                 					 */
1696 karl       1.34 					(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1697 kumpf      1.31 
1698                 					yy_act = YY_STATE_EOF(YY_START);
1699                 					goto do_action;
1700                 					}
1701                 
1702                 				else
1703                 					{
1704 karl       1.34 					if ( ! (yy_did_buffer_switch_on_eof) )
1705 kumpf      1.31 						YY_NEW_FILE;
1706                 					}
1707                 				break;
1708                 				}
1709                 
1710                 			case EOB_ACT_CONTINUE_SCAN:
1711 karl       1.34 				(yy_c_buf_p) =
1712                 					(yytext_ptr) + yy_amount_of_matched_text;
1713 kumpf      1.31 
1714 karl       1.34 				yy_current_state = yy_get_previous_state(  );
1715 kumpf      1.31 
1716 karl       1.34 				yy_cp = (yy_c_buf_p);
1717                 				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1718 kumpf      1.31 				goto yy_match;
1719                 
1720                 			case EOB_ACT_LAST_MATCH:
1721 karl       1.34 				(yy_c_buf_p) =
1722                 				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1723 kumpf      1.31 
1724 karl       1.34 				yy_current_state = yy_get_previous_state(  );
1725 kumpf      1.31 
1726 karl       1.34 				yy_cp = (yy_c_buf_p);
1727                 				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1728 kumpf      1.31 				goto yy_find_action;
1729                 			}
1730                 		break;
1731                 		}
1732                 
1733                 	default:
1734                 		YY_FATAL_ERROR(
1735                 			"fatal flex scanner internal error--no action found" );
1736                 	} /* end of action switch */
1737                 		} /* end of scanning one token */
1738 karl       1.34 } /* end of cimmof_lex */
1739 mike       1.3  
1740                 /* yy_get_next_buffer - try to read in a new buffer
1741                  *
1742                  * Returns a code representing an action:
1743 kumpf      1.31  *	EOB_ACT_LAST_MATCH -
1744                  *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1745                  *	EOB_ACT_END_OF_FILE - end of file
1746 mike       1.3   */
1747 karl       1.34 static int yy_get_next_buffer (void)
1748                 {
1749                     	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1750                 	register char *source = (yytext_ptr);
1751 kumpf      1.31 	register int number_to_move, i;
1752                 	int ret_val;
1753                 
1754 karl       1.34 	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1755 kumpf      1.31 		YY_FATAL_ERROR(
1756                 		"fatal flex scanner internal error--end of buffer missed" );
1757                 
1758 karl       1.34 	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1759 kumpf      1.31 		{ /* Don't try to fill the buffer, so this is an EOF. */
1760 karl       1.34 		if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1761 kumpf      1.31 			{
1762                 			/* We matched a single character, the EOB, so
1763                 			 * treat this as a final EOF.
1764                 			 */
1765                 			return EOB_ACT_END_OF_FILE;
1766                 			}
1767                 
1768                 		else
1769                 			{
1770                 			/* We matched some text prior to the EOB, first
1771                 			 * process it.
1772                 			 */
1773                 			return EOB_ACT_LAST_MATCH;
1774                 			}
1775                 		}
1776                 
1777                 	/* Try to read more data. */
1778                 
1779                 	/* First move last chars to start of buffer. */
1780 karl       1.34 	number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1781 kumpf      1.31 
1782                 	for ( i = 0; i < number_to_move; ++i )
1783                 		*(dest++) = *(source++);
1784                 
1785 karl       1.34 	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1786 kumpf      1.31 		/* don't do the read, it's not guaranteed to return an EOF,
1787                 		 * just force an EOF
1788                 		 */
1789 karl       1.34 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1790 kumpf      1.31 
1791                 	else
1792                 		{
1793 karl       1.34 			int num_to_read =
1794                 			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1795 mike       1.3  
1796 kumpf      1.31 		while ( num_to_read <= 0 )
1797                 			{ /* Not enough room in the buffer - grow it. */
1798 mike       1.3  
1799 kumpf      1.31 			/* just a shorter name for the current buffer */
1800 karl       1.34 			YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1801 mike       1.3  
1802 kumpf      1.31 			int yy_c_buf_p_offset =
1803 karl       1.34 				(int) ((yy_c_buf_p) - b->yy_ch_buf);
1804 mike       1.3  
1805 kumpf      1.31 			if ( b->yy_is_our_buffer )
1806                 				{
1807                 				int new_size = b->yy_buf_size * 2;
1808                 
1809                 				if ( new_size <= 0 )
1810                 					b->yy_buf_size += b->yy_buf_size / 8;
1811                 				else
1812                 					b->yy_buf_size *= 2;
1813                 
1814                 				b->yy_ch_buf = (char *)
1815                 					/* Include room in for 2 EOB chars. */
1816 karl       1.34 					cimmof_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
1817 kumpf      1.31 				}
1818                 			else
1819                 				/* Can't grow it, we don't own it. */
1820                 				b->yy_ch_buf = 0;
1821                 
1822                 			if ( ! b->yy_ch_buf )
1823                 				YY_FATAL_ERROR(
1824                 				"fatal error - scanner input buffer overflow" );
1825                 
1826 karl       1.34 			(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1827 kumpf      1.31 
1828 karl       1.34 			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1829 kumpf      1.31 						number_to_move - 1;
1830 karl       1.34 
1831 kumpf      1.31 			}
1832                 
1833                 		if ( num_to_read > YY_READ_BUF_SIZE )
1834                 			num_to_read = YY_READ_BUF_SIZE;
1835                 
1836                 		/* Read in more data. */
1837 karl       1.34 		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1838                 			(yy_n_chars), (size_t) num_to_read );
1839 kumpf      1.31 
1840 karl       1.34 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1841 kumpf      1.31 		}
1842                 
1843 karl       1.34 	if ( (yy_n_chars) == 0 )
1844 kumpf      1.31 		{
1845                 		if ( number_to_move == YY_MORE_ADJ )
1846                 			{
1847                 			ret_val = EOB_ACT_END_OF_FILE;
1848 karl       1.34 			cimmof_restart(cimmof_in  );
1849 kumpf      1.31 			}
1850                 
1851                 		else
1852                 			{
1853                 			ret_val = EOB_ACT_LAST_MATCH;
1854 karl       1.34 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1855 kumpf      1.31 				YY_BUFFER_EOF_PENDING;
1856                 			}
1857                 		}
1858                 
1859                 	else
1860                 		ret_val = EOB_ACT_CONTINUE_SCAN;
1861                 
1862 karl       1.34 	if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1863                 		/* Extend the array by 50%, plus the number we really need. */
1864                 		yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1865                 		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) cimmof_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
1866                 		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1867                 			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1868                 	}
1869                 
1870                 	(yy_n_chars) += number_to_move;
1871                 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1872                 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1873 mike       1.3  
1874 karl       1.34 	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1875 mike       1.3  
1876 kumpf      1.31 	return ret_val;
1877 karl       1.34 }
1878 mike       1.3  
1879                 /* yy_get_previous_state - get the state just before the EOB char was reached */
1880                 
1881 karl       1.34     static yy_state_type yy_get_previous_state (void)
1882                 {
1883 kumpf      1.31 	register yy_state_type yy_current_state;
1884                 	register char *yy_cp;
1885 dev.meetei 1.37     
1886 karl       1.34 	yy_current_state = (yy_start);
1887 kumpf      1.31 
1888 karl       1.34 	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1889 kumpf      1.31 		{
1890                 		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1891 karl       1.34 		if ( yy_accept[yy_current_state] )
1892                 			{
1893                 			(yy_last_accepting_state) = yy_current_state;
1894                 			(yy_last_accepting_cpos) = yy_cp;
1895                 			}
1896 kumpf      1.31 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1897                 			{
1898                 			yy_current_state = (int) yy_def[yy_current_state];
1899 karl       1.38 			if ( yy_current_state >= 296 )
1900 kumpf      1.31 				yy_c = yy_meta[(unsigned int) yy_c];
1901                 			}
1902                 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1903                 		}
1904 mike       1.3  
1905 kumpf      1.31 	return yy_current_state;
1906 karl       1.34 }
1907 mike       1.3  
1908                 /* yy_try_NUL_trans - try to make a transition on the NUL character
1909                  *
1910                  * synopsis
1911 kumpf      1.31  *	next_state = yy_try_NUL_trans( current_state );
1912 mike       1.3   */
1913 karl       1.34     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
1914                 {
1915 kumpf      1.31 	register int yy_is_jam;
1916 karl       1.34     	register char *yy_cp = (yy_c_buf_p);
1917 mike       1.3  
1918 kumpf      1.31 	register YY_CHAR yy_c = 1;
1919 karl       1.34 	if ( yy_accept[yy_current_state] )
1920                 		{
1921                 		(yy_last_accepting_state) = yy_current_state;
1922                 		(yy_last_accepting_cpos) = yy_cp;
1923                 		}
1924 kumpf      1.31 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1925                 		{
1926                 		yy_current_state = (int) yy_def[yy_current_state];
1927 karl       1.38 		if ( yy_current_state >= 296 )
1928 kumpf      1.31 			yy_c = yy_meta[(unsigned int) yy_c];
1929                 		}
1930                 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1931 karl       1.38 	yy_is_jam = (yy_current_state == 295);
1932 mike       1.3  
1933 kumpf      1.31 	return yy_is_jam ? 0 : yy_current_state;
1934 karl       1.34 }
1935 mike       1.3  
1936 karl       1.34     static void yyunput (int c, register char * yy_bp )
1937                 {
1938                 	register char *yy_cp;
1939 dev.meetei 1.37     
1940 karl       1.34     yy_cp = (yy_c_buf_p);
1941 mike       1.3  
1942 karl       1.34 	/* undo effects of setting up cimmof_text */
1943                 	*yy_cp = (yy_hold_char);
1944 mike       1.3  
1945 karl       1.34 	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1946 kumpf      1.31 		{ /* need to shift things up to make room */
1947                 		/* +2 for EOB chars. */
1948 karl       1.34 		register int number_to_move = (yy_n_chars) + 2;
1949                 		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1950                 					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1951 kumpf      1.31 		register char *source =
1952 karl       1.34 				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1953 kumpf      1.31 
1954 karl       1.34 		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1955 kumpf      1.31 			*--dest = *--source;
1956                 
1957                 		yy_cp += (int) (dest - source);
1958                 		yy_bp += (int) (dest - source);
1959 karl       1.34 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1960                 			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1961 kumpf      1.31 
1962 karl       1.34 		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1963 kumpf      1.31 			YY_FATAL_ERROR( "flex scanner push-back overflow" );
1964                 		}
1965                 
1966                 	*--yy_cp = (char) c;
1967                 
1968 karl       1.34     if ( c == '\n' ){
1969                         --cimmof_lineno;
1970                     }
1971                 
1972                 	(yytext_ptr) = yy_bp;
1973                 	(yy_hold_char) = *yy_cp;
1974                 	(yy_c_buf_p) = yy_cp;
1975                 }
1976 mike       1.3  
1977 karl       1.29 #ifndef YY_NO_INPUT
1978 mike       1.3  #ifdef __cplusplus
1979 karl       1.34     static int yyinput (void)
1980 mike       1.3  #else
1981 karl       1.34     static int input  (void)
1982 mike       1.3  #endif
1983 karl       1.34 
1984                 {
1985 kumpf      1.31 	int c;
1986 dev.meetei 1.37     
1987 karl       1.34 	*(yy_c_buf_p) = (yy_hold_char);
1988 mike       1.3  
1989 karl       1.34 	if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1990 kumpf      1.31 		{
1991                 		/* yy_c_buf_p now points to the character we want to return.
1992                 		 * If this occurs *before* the EOB characters, then it's a
1993                 		 * valid NUL; if not, then we've hit the end of the buffer.
1994                 		 */
1995 karl       1.34 		if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1996 kumpf      1.31 			/* This was really a NUL. */
1997 karl       1.34 			*(yy_c_buf_p) = '\0';
1998 kumpf      1.31 
1999                 		else
2000                 			{ /* need more input */
2001 karl       1.34 			int offset = (yy_c_buf_p) - (yytext_ptr);
2002                 			++(yy_c_buf_p);
2003 kumpf      1.31 
2004 karl       1.34 			switch ( yy_get_next_buffer(  ) )
2005 kumpf      1.31 				{
2006                 				case EOB_ACT_LAST_MATCH:
2007                 					/* This happens because yy_g_n_b()
2008                 					 * sees that we've accumulated a
2009                 					 * token and flags that we need to
2010                 					 * try matching the token before
2011                 					 * proceeding.  But for input(),
2012                 					 * there's no matching to consider.
2013                 					 * So convert the EOB_ACT_LAST_MATCH
2014                 					 * to EOB_ACT_END_OF_FILE.
2015                 					 */
2016                 
2017                 					/* Reset buffer status. */
2018 karl       1.34 					cimmof_restart(cimmof_in );
2019 kumpf      1.31 
2020 karl       1.34 					/*FALLTHROUGH*/
2021 kumpf      1.31 
2022                 				case EOB_ACT_END_OF_FILE:
2023                 					{
2024 karl       1.34 					if ( cimmof_wrap( ) )
2025 kumpf      1.31 						return EOF;
2026 mike       1.3  
2027 karl       1.34 					if ( ! (yy_did_buffer_switch_on_eof) )
2028 kumpf      1.31 						YY_NEW_FILE;
2029 mike       1.3  #ifdef __cplusplus
2030 kumpf      1.31 					return yyinput();
2031 mike       1.3  #else
2032 kumpf      1.31 					return input();
2033 mike       1.3  #endif
2034 kumpf      1.31 					}
2035 mike       1.3  
2036 kumpf      1.31 				case EOB_ACT_CONTINUE_SCAN:
2037 karl       1.34 					(yy_c_buf_p) = (yytext_ptr) + offset;
2038 kumpf      1.31 					break;
2039                 				}
2040                 			}
2041                 		}
2042 mike       1.3  
2043 karl       1.34 	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
2044                 	*(yy_c_buf_p) = '\0';	/* preserve cimmof_text */
2045                 	(yy_hold_char) = *++(yy_c_buf_p);
2046 mike       1.3  
2047 kumpf      1.31 	if ( c == '\n' )
2048 dev.meetei 1.37 		   
2049 karl       1.34     cimmof_lineno++;
2050                 ;
2051 jim.wunderlich 1.26 
2052 kumpf          1.31 	return c;
2053 karl           1.34 }
2054                     #endif	/* ifndef YY_NO_INPUT */
2055 mike           1.3  
2056 karl           1.34 /** Immediately switch to a different input stream.
2057                      * @param input_file A readable stream.
2058 dev.meetei     1.37  * 
2059 karl           1.34  * @note This function does not reset the start condition to @c INITIAL .
2060                      */
2061                         void cimmof_restart  (FILE * input_file )
2062                     {
2063 dev.meetei     1.37     
2064 karl           1.34 	if ( ! YY_CURRENT_BUFFER ){
2065                             cimmof_ensure_buffer_stack ();
2066                     		YY_CURRENT_BUFFER_LVALUE =
2067                                 cimmof__create_buffer(cimmof_in,YY_BUF_SIZE );
2068 kumpf          1.31 	}
2069 mike           1.3  
2070 karl           1.34 	cimmof__init_buffer(YY_CURRENT_BUFFER,input_file );
2071                     	cimmof__load_buffer_state( );
2072                     }
2073 mike           1.3  
2074 karl           1.34 /** Switch to a different input buffer.
2075                      * @param new_buffer The new input buffer.
2076 dev.meetei     1.37  * 
2077 karl           1.34  */
2078                         void cimmof__switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
2079                     {
2080 dev.meetei     1.37     
2081 karl           1.34 	/* TODO. We should be able to replace this entire function body
2082                     	 * with
2083                     	 *		cimmof_pop_buffer_state();
2084                     	 *		cimmof_push_buffer_state(new_buffer);
2085                          */
2086                     	cimmof_ensure_buffer_stack ();
2087                     	if ( YY_CURRENT_BUFFER == new_buffer )
2088 kumpf          1.31 		return;
2089                     
2090 karl           1.34 	if ( YY_CURRENT_BUFFER )
2091 kumpf          1.31 		{
2092                     		/* Flush out information for old buffer. */
2093 karl           1.34 		*(yy_c_buf_p) = (yy_hold_char);
2094                     		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2095                     		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2096 kumpf          1.31 		}
2097                     
2098 karl           1.34 	YY_CURRENT_BUFFER_LVALUE = new_buffer;
2099                     	cimmof__load_buffer_state( );
2100 kumpf          1.31 
2101                     	/* We don't actually know whether we did this switch during
2102 karl           1.34 	 * EOF (cimmof_wrap()) processing, but the only time this flag
2103                     	 * is looked at is after cimmof_wrap() is called, so it's safe
2104 kumpf          1.31 	 * to go ahead and always set it.
2105                     	 */
2106 karl           1.34 	(yy_did_buffer_switch_on_eof) = 1;
2107                     }
2108 mike           1.3  
2109 karl           1.34 static void cimmof__load_buffer_state  (void)
2110                     {
2111                         	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2112                     	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2113                     	cimmof_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2114                     	(yy_hold_char) = *(yy_c_buf_p);
2115                     }
2116 mike           1.3  
2117 karl           1.34 /** Allocate and initialize an input buffer state.
2118                      * @param file A readable stream.
2119                      * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2120 dev.meetei     1.37  * 
2121 karl           1.34  * @return the allocated buffer state.
2122                      */
2123                         YY_BUFFER_STATE cimmof__create_buffer  (FILE * file, int  size )
2124                     {
2125 kumpf          1.31 	YY_BUFFER_STATE b;
2126 dev.meetei     1.37     
2127 karl           1.34 	b = (YY_BUFFER_STATE) cimmof_alloc(sizeof( struct yy_buffer_state )  );
2128 kumpf          1.31 	if ( ! b )
2129 karl           1.34 		YY_FATAL_ERROR( "out of dynamic memory in cimmof__create_buffer()" );
2130 mike           1.3  
2131 kumpf          1.31 	b->yy_buf_size = size;
2132 mike           1.3  
2133 kumpf          1.31 	/* yy_ch_buf has to be 2 characters longer than the size given because
2134                     	 * we need to put in 2 end-of-buffer characters.
2135                     	 */
2136 karl           1.34 	b->yy_ch_buf = (char *) cimmof_alloc(b->yy_buf_size + 2  );
2137 kumpf          1.31 	if ( ! b->yy_ch_buf )
2138 karl           1.34 		YY_FATAL_ERROR( "out of dynamic memory in cimmof__create_buffer()" );
2139 mike           1.3  
2140 kumpf          1.31 	b->yy_is_our_buffer = 1;
2141 mike           1.3  
2142 karl           1.34 	cimmof__init_buffer(b,file );
2143 mike           1.3  
2144 kumpf          1.31 	return b;
2145 karl           1.34 }
2146 mike           1.3  
2147 karl           1.34 /** Destroy the buffer.
2148                      * @param b a buffer created with cimmof__create_buffer()
2149 dev.meetei     1.37  * 
2150 karl           1.34  */
2151                         void cimmof__delete_buffer (YY_BUFFER_STATE  b )
2152                     {
2153 dev.meetei     1.37     
2154 kumpf          1.31 	if ( ! b )
2155                     		return;
2156 mike           1.3  
2157 karl           1.34 	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2158                     		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2159 mike           1.3  
2160 kumpf          1.31 	if ( b->yy_is_our_buffer )
2161 karl           1.34 		cimmof_free((void *) b->yy_ch_buf  );
2162 mike           1.3  
2163 karl           1.34 	cimmof_free((void *) b  );
2164                     }
2165 mike           1.3  
2166 karl           1.34 /* Initializes or reinitializes a buffer.
2167                      * This function is sometimes called more than once on the same buffer,
2168                      * such as during a cimmof_restart() or at EOF.
2169                      */
2170                         static void cimmof__init_buffer  (YY_BUFFER_STATE  b, FILE * file )
2171 mike           1.3  
2172 karl           1.34 {
2173                     	int oerrno = errno;
2174 dev.meetei     1.37     
2175 karl           1.34 	cimmof__flush_buffer(b );
2176 mike           1.3  
2177 kumpf          1.31 	b->yy_input_file = file;
2178                     	b->yy_fill_buffer = 1;
2179 mike           1.3  
2180 karl           1.34     /* If b is the current buffer, then cimmof__init_buffer was _probably_
2181                          * called from cimmof_restart() or through yy_get_next_buffer.
2182                          * In that case, we don't want to reset the lineno or column.
2183                          */
2184                         if (b != YY_CURRENT_BUFFER){
2185                             b->yy_bs_lineno = 1;
2186                             b->yy_bs_column = 0;
2187                         }
2188                     
2189                             b->yy_is_interactive = 0;
2190 dev.meetei     1.37     
2191 karl           1.34 	errno = oerrno;
2192                     }
2193 mike           1.3  
2194 karl           1.34 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2195                      * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2196 dev.meetei     1.37  * 
2197 karl           1.34  */
2198                         void cimmof__flush_buffer (YY_BUFFER_STATE  b )
2199                     {
2200                         	if ( ! b )
2201 kumpf          1.31 		return;
2202                     
2203                     	b->yy_n_chars = 0;
2204                     
2205                     	/* We always need two end-of-buffer characters.  The first causes
2206                     	 * a transition to the end-of-buffer state.  The second causes
2207                     	 * a jam in that state.
2208                     	 */
2209                     	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2210                     	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2211                     
2212                     	b->yy_buf_pos = &b->yy_ch_buf[0];
2213                     
2214                     	b->yy_at_bol = 1;
2215                     	b->yy_buffer_status = YY_BUFFER_NEW;
2216                     
2217 karl           1.34 	if ( b == YY_CURRENT_BUFFER )
2218                     		cimmof__load_buffer_state( );
2219                     }
2220                     
2221                     /** Pushes the new state onto the stack. The new state becomes
2222                      *  the current state. This function will allocate the stack
2223                      *  if necessary.
2224                      *  @param new_buffer The new state.
2225 dev.meetei     1.37  *  
2226 karl           1.34  */
2227                     void cimmof_push_buffer_state (YY_BUFFER_STATE new_buffer )
2228                     {
2229                         	if (new_buffer == NULL)
2230                     		return;
2231                     
2232                     	cimmof_ensure_buffer_stack();
2233                     
2234                     	/* This block is copied from cimmof__switch_to_buffer. */
2235                     	if ( YY_CURRENT_BUFFER )
2236                     		{
2237                     		/* Flush out information for old buffer. */
2238                     		*(yy_c_buf_p) = (yy_hold_char);
2239                     		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2240                     		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2241                     		}
2242                     
2243                     	/* Only push if top exists. Otherwise, replace top. */
2244                     	if (YY_CURRENT_BUFFER)
2245                     		(yy_buffer_stack_top)++;
2246                     	YY_CURRENT_BUFFER_LVALUE = new_buffer;
2247 karl           1.34 
2248                     	/* copied from cimmof__switch_to_buffer. */
2249                     	cimmof__load_buffer_state( );
2250                     	(yy_did_buffer_switch_on_eof) = 1;
2251                     }
2252                     
2253                     /** Removes and deletes the top of the stack, if present.
2254                      *  The next element becomes the new top.
2255 dev.meetei     1.37  *  
2256 karl           1.34  */
2257                     void cimmof_pop_buffer_state (void)
2258                     {
2259                         	if (!YY_CURRENT_BUFFER)
2260                     		return;
2261                     
2262                     	cimmof__delete_buffer(YY_CURRENT_BUFFER );
2263                     	YY_CURRENT_BUFFER_LVALUE = NULL;
2264                     	if ((yy_buffer_stack_top) > 0)
2265                     		--(yy_buffer_stack_top);
2266                     
2267                     	if (YY_CURRENT_BUFFER) {
2268                     		cimmof__load_buffer_state( );
2269                     		(yy_did_buffer_switch_on_eof) = 1;
2270 kumpf          1.31 	}
2271 karl           1.34 }
2272 mike           1.3  
2273 karl           1.34 /* Allocates the stack if it does not exist.
2274                      *  Guarantees space for at least one push.
2275                      */
2276                     static void cimmof_ensure_buffer_stack (void)
2277                     {
2278                     	int num_to_alloc;
2279 dev.meetei     1.37     
2280 karl           1.34 	if (!(yy_buffer_stack)) {
2281                     
2282                     		/* First allocation is just for 2 elements, since we don't know if this
2283                     		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2284                     		 * immediate realloc on the next call.
2285                              */
2286                     		num_to_alloc = 1;
2287                     		(yy_buffer_stack) = (struct yy_buffer_state**)cimmof_alloc
2288                     								(num_to_alloc * sizeof(struct yy_buffer_state*)
2289                     								);
2290                     		if ( ! (yy_buffer_stack) )
2291                     			YY_FATAL_ERROR( "out of dynamic memory in cimmof_ensure_buffer_stack()" );
2292 dev.meetei     1.37 								  
2293 karl           1.34 		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2294                     				
2295                     		(yy_buffer_stack_max) = num_to_alloc;
2296                     		(yy_buffer_stack_top) = 0;
2297                     		return;
2298                     	}
2299                     
2300                     	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2301                     
2302                     		/* Increase the buffer to prepare for a possible push. */
2303                     		int grow_size = 8 /* arbitrary grow size */;
2304                     
2305                     		num_to_alloc = (yy_buffer_stack_max) + grow_size;
2306                     		(yy_buffer_stack) = (struct yy_buffer_state**)cimmof_realloc
2307                     								((yy_buffer_stack),
2308                     								num_to_alloc * sizeof(struct yy_buffer_state*)
2309                     								);
2310                     		if ( ! (yy_buffer_stack) )
2311                     			YY_FATAL_ERROR( "out of dynamic memory in cimmof_ensure_buffer_stack()" );
2312                     
2313                     		/* zero only the new slots.*/
2314 karl           1.34 		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2315                     		(yy_buffer_stack_max) = num_to_alloc;
2316                     	}
2317                     }
2318 mike           1.3  
2319 karl           1.34 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2320                      * @param base the character buffer
2321                      * @param size the size in bytes of the character buffer
2322 dev.meetei     1.37  * 
2323                      * @return the newly allocated buffer state object. 
2324 karl           1.34  */
2325                     YY_BUFFER_STATE cimmof__scan_buffer  (char * base, yy_size_t  size )
2326                     {
2327 kumpf          1.31 	YY_BUFFER_STATE b;
2328 dev.meetei     1.37     
2329 kumpf          1.31 	if ( size < 2 ||
2330                     	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
2331                     	     base[size-1] != YY_END_OF_BUFFER_CHAR )
2332                     		/* They forgot to leave room for the EOB's. */
2333                     		return 0;
2334                     
2335 karl           1.34 	b = (YY_BUFFER_STATE) cimmof_alloc(sizeof( struct yy_buffer_state )  );
2336 kumpf          1.31 	if ( ! b )
2337 karl           1.34 		YY_FATAL_ERROR( "out of dynamic memory in cimmof__scan_buffer()" );
2338 kumpf          1.31 
2339                     	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
2340                     	b->yy_buf_pos = b->yy_ch_buf = base;
2341                     	b->yy_is_our_buffer = 0;
2342                     	b->yy_input_file = 0;
2343                     	b->yy_n_chars = b->yy_buf_size;
2344                     	b->yy_is_interactive = 0;
2345                     	b->yy_at_bol = 1;
2346                     	b->yy_fill_buffer = 0;
2347                     	b->yy_buffer_status = YY_BUFFER_NEW;
2348 mike           1.3  
2349 karl           1.34 	cimmof__switch_to_buffer(b  );
2350 mike           1.3  
2351 kumpf          1.31 	return b;
2352 karl           1.34 }
2353 mike           1.3  
2354 karl           1.34 /** Setup the input buffer state to scan a string. The next call to cimmof_lex() will
2355                      * scan from a @e copy of @a str.
2356                      * @param yystr a NUL-terminated string to scan
2357 dev.meetei     1.37  * 
2358 karl           1.34  * @return the newly allocated buffer state object.
2359                      * @note If you want to scan bytes that may contain NUL values, then use
2360                      *       cimmof__scan_bytes() instead.
2361                      */
2362                     YY_BUFFER_STATE cimmof__scan_string (yyconst char * yystr )
2363                     {
2364 dev.meetei     1.37     
2365 karl           1.34 	return cimmof__scan_bytes(yystr,strlen(yystr) );
2366                     }
2367 mike           1.3  
2368 karl           1.34 /** Setup the input buffer state to scan the given bytes. The next call to cimmof_lex() will
2369                      * scan from a @e copy of @a bytes.
2370 karl           1.38  * @param yybytes the byte buffer to scan
2371                      * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2372 dev.meetei     1.37  * 
2373 karl           1.34  * @return the newly allocated buffer state object.
2374                      */
2375                     YY_BUFFER_STATE cimmof__scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
2376                     {
2377 kumpf          1.31 	YY_BUFFER_STATE b;
2378                     	char *buf;
2379                     	yy_size_t n;
2380                     	int i;
2381 dev.meetei     1.37     
2382 kumpf          1.31 	/* Get memory for full buffer, including space for trailing EOB's. */
2383 karl           1.34 	n = _yybytes_len + 2;
2384                     	buf = (char *) cimmof_alloc(n  );
2385 kumpf          1.31 	if ( ! buf )
2386 karl           1.34 		YY_FATAL_ERROR( "out of dynamic memory in cimmof__scan_bytes()" );
2387 kumpf          1.31 
2388 karl           1.34 	for ( i = 0; i < _yybytes_len; ++i )
2389                     		buf[i] = yybytes[i];
2390 kumpf          1.31 
2391 karl           1.34 	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2392 kumpf          1.31 
2393 karl           1.34 	b = cimmof__scan_buffer(buf,n );
2394 kumpf          1.31 	if ( ! b )
2395 karl           1.34 		YY_FATAL_ERROR( "bad buffer in cimmof__scan_bytes()" );
2396 kumpf          1.31 
2397                     	/* It's okay to grow etc. this buffer, and we should throw it
2398                     	 * away when we're done.
2399                     	 */
2400                     	b->yy_is_our_buffer = 1;
2401 mike           1.3  
2402 kumpf          1.31 	return b;
2403 karl           1.34 }
2404 mike           1.3  
2405 karl           1.34     static void yy_push_state (int  new_state )
2406                     {
2407                         	if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
2408 kumpf          1.31 		{
2409                     		yy_size_t new_size;
2410                     
2411 karl           1.34 		(yy_start_stack_depth) += YY_START_STACK_INCR;
2412                     		new_size = (yy_start_stack_depth) * sizeof( int );
2413 kumpf          1.31 
2414 karl           1.34 		if ( ! (yy_start_stack) )
2415                     			(yy_start_stack) = (int *) cimmof_alloc(new_size  );
2416 kumpf          1.31 
2417                     		else
2418 karl           1.34 			(yy_start_stack) = (int *) cimmof_realloc((void *) (yy_start_stack),new_size  );
2419 kumpf          1.31 
2420 karl           1.34 		if ( ! (yy_start_stack) )
2421                     			YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
2422 kumpf          1.31 		}
2423 mike           1.3  
2424 karl           1.34 	(yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;
2425 mike           1.3  
2426 kumpf          1.31 	BEGIN(new_state);
2427 karl           1.34 }
2428 mike           1.3  
2429 karl           1.34     static void yy_pop_state  (void)
2430                     {
2431                         	if ( --(yy_start_stack_ptr) < 0 )
2432 kumpf          1.31 		YY_FATAL_ERROR( "start-condition stack underflow" );
2433 mike           1.3  
2434 karl           1.34 	BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
2435                     }
2436 mike           1.3  
2437 karl           1.34     static int yy_top_state  (void)
2438                     {
2439                         	return (yy_start_stack)[(yy_start_stack_ptr) - 1];
2440                     }
2441 mike           1.3  
2442                     #ifndef YY_EXIT_FAILURE
2443                     #define YY_EXIT_FAILURE 2
2444                     #endif
2445                     
2446 karl           1.34 static void yy_fatal_error (yyconst char* msg )
2447                     {
2448                         	(void) fprintf( stderr, "%s\n", msg );
2449 kumpf          1.31 	exit( YY_EXIT_FAILURE );
2450 karl           1.34 }
2451 mike           1.3  
2452                     /* Redefine yyless() so it works in section 3 code. */
2453                     
2454                     #undef yyless
2455                     #define yyless(n) \
2456 kumpf          1.31 	do \
2457                     		{ \
2458 karl           1.34 		/* Undo effects of setting up cimmof_text. */ \
2459                             int yyless_macro_arg = (n); \
2460                             YY_LESS_LINENO(yyless_macro_arg);\
2461                     		cimmof_text[cimmof_leng] = (yy_hold_char); \
2462                     		(yy_c_buf_p) = cimmof_text + yyless_macro_arg; \
2463                     		(yy_hold_char) = *(yy_c_buf_p); \
2464                     		*(yy_c_buf_p) = '\0'; \
2465                     		cimmof_leng = yyless_macro_arg; \
2466 kumpf          1.31 		} \
2467                     	while ( 0 )
2468 mike           1.3  
2469 karl           1.34 /* Accessor  methods (get/set functions) to struct members. */
2470                     
2471                     /** Get the current line number.
2472 dev.meetei     1.37  * 
2473 karl           1.34  */
2474                     int cimmof_get_lineno  (void)
2475                     {
2476 dev.meetei     1.37         
2477 karl           1.34     return cimmof_lineno;
2478                     }
2479                     
2480                     /** Get the input stream.
2481 dev.meetei     1.37  * 
2482 karl           1.34  */
2483                     FILE *cimmof_get_in  (void)
2484                     {
2485                             return cimmof_in;
2486                     }
2487                     
2488                     /** Get the output stream.
2489 dev.meetei     1.37  * 
2490 karl           1.34  */
2491                     FILE *cimmof_get_out  (void)
2492                     {
2493                             return cimmof_out;
2494                     }
2495                     
2496                     /** Get the length of the current token.
2497 dev.meetei     1.37  * 
2498 karl           1.34  */
2499                     int cimmof_get_leng  (void)
2500                     {
2501                             return cimmof_leng;
2502                     }
2503                     
2504                     /** Get the current token.
2505 dev.meetei     1.37  * 
2506 karl           1.34  */
2507                     
2508                     char *cimmof_get_text  (void)
2509                     {
2510                             return cimmof_text;
2511                     }
2512 mike           1.3  
2513 karl           1.34 /** Set the current line number.
2514                      * @param line_number
2515 dev.meetei     1.37  * 
2516 karl           1.34  */
2517                     void cimmof_set_lineno (int  line_number )
2518                     {
2519 dev.meetei     1.37     
2520 karl           1.34     cimmof_lineno = line_number;
2521                     }
2522                     
2523                     /** Set the input stream. This does not discard the current
2524                      * input buffer.
2525                      * @param in_str A readable stream.
2526 dev.meetei     1.37  * 
2527 karl           1.34  * @see cimmof__switch_to_buffer
2528                      */
2529                     void cimmof_set_in (FILE *  in_str )
2530                     {
2531                             cimmof_in = in_str ;
2532                     }
2533                     
2534                     void cimmof_set_out (FILE *  out_str )
2535                     {
2536                             cimmof_out = out_str ;
2537                     }
2538                     
2539                     int cimmof_get_debug  (void)
2540                     {
2541                             return cimmof__flex_debug;
2542                     }
2543                     
2544                     void cimmof_set_debug (int  bdebug )
2545                     {
2546                             cimmof__flex_debug = bdebug ;
2547                     }
2548 karl           1.34 
2549                     static int yy_init_globals (void)
2550                     {
2551                             /* Initialization is the same as for the non-reentrant scanner.
2552                          * This function is called from cimmof_lex_destroy(), so don't allocate here.
2553                          */
2554                     
2555                         /* We do not touch cimmof_lineno unless the option is enabled. */
2556                         cimmof_lineno =  1;
2557 dev.meetei     1.37     
2558 karl           1.34     (yy_buffer_stack) = 0;
2559                         (yy_buffer_stack_top) = 0;
2560                         (yy_buffer_stack_max) = 0;
2561                         (yy_c_buf_p) = (char *) 0;
2562                         (yy_init) = 0;
2563                         (yy_start) = 0;
2564                     
2565                         (yy_start_stack_ptr) = 0;
2566                         (yy_start_stack_depth) = 0;
2567                         (yy_start_stack) =  NULL;
2568                     
2569                     /* Defined in main.c */
2570                     #ifdef YY_STDINIT
2571                         cimmof_in = stdin;
2572                         cimmof_out = stdout;
2573                     #else
2574                         cimmof_in = (FILE *) 0;
2575                         cimmof_out = (FILE *) 0;
2576                     #endif
2577                     
2578                         /* For future reference: Set errno on error, since we are called by
2579 karl           1.34      * cimmof_lex_init()
2580                          */
2581                         return 0;
2582                     }
2583                     
2584                     /* cimmof_lex_destroy is for both reentrant and non-reentrant scanners. */
2585                     int cimmof_lex_destroy  (void)
2586                     {
2587 dev.meetei     1.37     
2588 karl           1.34     /* Pop the buffer stack, destroying each element. */
2589                     	while(YY_CURRENT_BUFFER){
2590                     		cimmof__delete_buffer(YY_CURRENT_BUFFER  );
2591                     		YY_CURRENT_BUFFER_LVALUE = NULL;
2592                     		cimmof_pop_buffer_state();
2593                     	}
2594                     
2595                     	/* Destroy the stack itself. */
2596                     	cimmof_free((yy_buffer_stack) );
2597                     	(yy_buffer_stack) = NULL;
2598                     
2599                         /* Destroy the start condition stack. */
2600                             cimmof_free((yy_start_stack)  );
2601                             (yy_start_stack) = NULL;
2602                     
2603                         /* Reset the globals. This is important in a non-reentrant scanner so the next time
2604                          * cimmof_lex() is called, initialization will occur. */
2605                         yy_init_globals( );
2606                     
2607                         return 0;
2608                     }
2609 karl           1.34 
2610                     /*
2611                      * Internal utility routines.
2612                      */
2613 mike           1.3  
2614                     #ifndef yytext_ptr
2615 karl           1.34 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2616                     {
2617 kumpf          1.31 	register int i;
2618                     	for ( i = 0; i < n; ++i )
2619                     		s1[i] = s2[i];
2620 karl           1.34 }
2621 mike           1.3  #endif
2622                     
2623                     #ifdef YY_NEED_STRLEN
2624 karl           1.34 static int yy_flex_strlen (yyconst char * s )
2625                     {
2626 kumpf          1.31 	register int n;
2627                     	for ( n = 0; s[n]; ++n )
2628                     		;
2629 mike           1.3  
2630 kumpf          1.31 	return n;
2631 karl           1.34 }
2632 mike           1.3  #endif
2633                     
2634 karl           1.34 void *cimmof_alloc (yy_size_t  size )
2635                     {
2636 kumpf          1.31 	return (void *) malloc( size );
2637 karl           1.34 }
2638 mike           1.3  
2639 karl           1.34 void *cimmof_realloc  (void * ptr, yy_size_t  size )
2640                     {
2641 kumpf          1.31 	/* The cast to (char *) in the following accommodates both
2642                     	 * implementations that use char* generic pointers, and those
2643                     	 * that use void* generic pointers.  It works with the latter
2644                     	 * because both ANSI C and C++ allow castless assignment from
2645                     	 * any pointer type to void*, and deal with argument conversions
2646                     	 * as though doing an assignment.
2647                     	 */
2648                     	return (void *) realloc( (char *) ptr, size );
2649 karl           1.34 }
2650                     
2651                     void cimmof_free (void * ptr )
2652                     {
2653                     	free( (char *) ptr );	/* see cimmof_realloc() for (char *) cast */
2654                     }
2655 mike           1.3  
2656 karl           1.34 #define YYTABLES_NAME "yytables"
2657 mike           1.3  
2658 karl           1.38 #line 249 "cimmof.l"
2659 mike           1.3  
2660                     
2661 karl           1.34 
2662 karl           1.40 void cimmof_yy_less(int n) { yyless(n); }
2663                     
2664                     // Implemented to hide bison functions that are defined but not used
2665                     // so compiler unused warnings can be enabled.  The functions defined in ths
2666                     // dummy function are those current defined by Flex but never called by
2667                     // Pegasus lex definitions. Since each compiler has different rules for
2668                     // hiding unused functions, we implement each that we know.
2669                     // CLANG can use the pragma below.
2670                     // GCC hides the unused function through the recursive call
2671                     // NOT tested with other compilers.
2672                     #ifdef __clang__
2673                     #pragma clang diagnostic push
2674                     #pragma clang diagnostic ignored "-Wunused-function"
2675                     #endif
2676                     static void UNUSED_LEX_FUNCTIONS()
2677                     {
2678                        UNUSED_LEX_FUNCTIONS();    // call itself to avoid unused function warning
2679                        yyunput(3, (char *)"");    // call unused lex functions
2680                        yy_top_state();
2681                     }
2682                     #ifdef __clang__
2683 karl           1.40 #pragma clang diagnostic pop
2684                     #endif
2685 karl           1.34 

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2