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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2