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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2