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

   1 karl  1.17 //%2006////////////////////////////////////////////////////////////////////////
   2            //
   3            // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
   4            // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
   5            // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
   6            // IBM Corp.; EMC Corporation, The Open Group.
   7            // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
   8            // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
   9            // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
  10            // EMC Corporation; VERITAS Software Corporation; The Open Group.
  11            // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
  12            // EMC Corporation; Symantec Corporation; The Open Group.
  13            //
  14            // Permission is hereby granted, free of charge, to any person obtaining a copy
  15            // of this software and associated documentation files (the "Software"), to
  16            // deal in the Software without restriction, including without limitation the
  17            // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  18            // sell copies of the Software, and to permit persons to whom the Software is
  19            // furnished to do so, subject to the following conditions:
  20            // 
  21            // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
  22 karl  1.17 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
  23            // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
  24            // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  25            // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  26            // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  27            // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  28            // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  29            //
  30            //==============================================================================
  31 mike  1.2  #define yy_create_buffer WQL__create_buffer
  32            #define yy_delete_buffer WQL__delete_buffer
  33            #define yy_scan_buffer WQL__scan_buffer
  34            #define yy_scan_string WQL__scan_string
  35            #define yy_scan_bytes WQL__scan_bytes
  36            #define yy_flex_debug WQL__flex_debug
  37            #define yy_init_buffer WQL__init_buffer
  38            #define yy_flush_buffer WQL__flush_buffer
  39            #define yy_load_buffer_state WQL__load_buffer_state
  40            #define yy_switch_to_buffer WQL__switch_to_buffer
  41            #define yyin WQL_in
  42            #define yyleng WQL_leng
  43            #define yylex WQL_lex
  44            #define yyout WQL_out
  45            #define yyrestart WQL_restart
  46            #define yytext WQL_text
  47            #define yywrap WQL_wrap
  48            
  49            #line 20 "WQLLEX.cpp"
  50            /* A lexical scanner generated by flex */
  51            
  52 mike  1.2  /* Scanner skeleton version:
  53 karl  1.17  * $Header: /cvs/MSB/pegasus/src/Pegasus/WQL/WQLLEX.cpp,v 1.16 2005/11/27 03:11:37 jim.wunderlich Exp $
  54 mike  1.2   */
  55            
  56            #define FLEX_SCANNER
  57            #define YY_FLEX_MAJOR_VERSION 2
  58            #define YY_FLEX_MINOR_VERSION 5
  59            
  60            #include <stdio.h>
  61 karl  1.15 #include <unistd.h>
  62 mike  1.2  
  63            
  64            /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
  65            #ifdef c_plusplus
  66            #ifndef __cplusplus
  67            #define __cplusplus
  68            #endif
  69            #endif
  70            
  71            
  72            #ifdef __cplusplus
  73            
  74            #include <stdlib.h>
  75            
  76            /* Use prototypes in function declarations. */
  77            #define YY_USE_PROTOS
  78            
  79            /* The "const" storage-class-modifier is valid. */
  80            #define YY_USE_CONST
  81            
  82            #else	/* ! __cplusplus */
  83 mike  1.2  
  84            #if __STDC__
  85            
  86            #define YY_USE_PROTOS
  87            #define YY_USE_CONST
  88            
  89            #endif	/* __STDC__ */
  90            #endif	/* ! __cplusplus */
  91            
  92            #ifdef __TURBOC__
  93             #pragma warn -rch
  94             #pragma warn -use
  95            #include <io.h>
  96            #include <stdlib.h>
  97            #define YY_USE_CONST
  98            #define YY_USE_PROTOS
  99            #endif
 100            
 101            #ifdef YY_USE_CONST
 102            #define yyconst const
 103            #else
 104 mike  1.2  #define yyconst
 105            #endif
 106            
 107            
 108            #ifdef YY_USE_PROTOS
 109            #define YY_PROTO(proto) proto
 110            #else
 111            #define YY_PROTO(proto) ()
 112            #endif
 113            
 114            /* Returned upon end-of-file. */
 115            #define YY_NULL 0
 116            
 117            /* Promotes a possibly negative, possibly signed char to an unsigned
 118             * integer for use as an array index.  If the signed char is negative,
 119             * we want to instead treat it as an 8-bit unsigned char, hence the
 120             * double cast.
 121             */
 122            #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
 123            
 124            /* Enter a start condition.  This macro really ought to take a parameter,
 125 mike  1.2   * but we do it the disgusting crufty way forced on us by the ()-less
 126             * definition of BEGIN.
 127             */
 128            #define BEGIN yy_start = 1 + 2 *
 129            
 130            /* Translate the current start state into a value that can be later handed
 131             * to BEGIN to return to the state.  The YYSTATE alias is for lex
 132             * compatibility.
 133             */
 134            #define YY_START ((yy_start - 1) / 2)
 135            #define YYSTATE YY_START
 136            
 137            /* Action number for EOF rule of a given start state. */
 138            #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
 139            
 140            /* Special action meaning "start processing a new file". */
 141            #define YY_NEW_FILE yyrestart( yyin )
 142            
 143            #define YY_END_OF_BUFFER_CHAR 0
 144            
 145            /* Size of default input buffer. */
 146 mike  1.2  #define YY_BUF_SIZE 16384
 147            
 148            typedef struct yy_buffer_state *YY_BUFFER_STATE;
 149            
 150            extern int yyleng;
 151            extern FILE *yyin, *yyout;
 152            
 153            #define EOB_ACT_CONTINUE_SCAN 0
 154            #define EOB_ACT_END_OF_FILE 1
 155            #define EOB_ACT_LAST_MATCH 2
 156            
 157            /* The funky do-while in the following #define is used to turn the definition
 158             * int a single C statement (which needs a semi-colon terminator).  This
 159             * avoids problems with code like:
 160             *
 161             * 	if ( condition_holds )
 162             *		yyless( 5 );
 163             *	else
 164             *		do_something_else();
 165             *
 166             * Prior to using the do-while the compiler would get upset at the
 167 mike  1.2   * "else" because it interpreted the "if" statement as being all
 168             * done when it reached the ';' after the yyless() call.
 169             */
 170            
 171            /* Return all but the first 'n' matched characters back to the input stream. */
 172            
 173            #define yyless(n) \
 174            	do \
 175            		{ \
 176            		/* Undo effects of setting up yytext. */ \
 177            		*yy_cp = yy_hold_char; \
 178 kumpf 1.4  		YY_RESTORE_YY_MORE_OFFSET \
 179 mike  1.2  		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
 180            		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
 181            		} \
 182            	while ( 0 )
 183            
 184            #define unput(c) yyunput( c, yytext_ptr )
 185            
 186            /* The following is because we cannot portably get our hands on size_t
 187             * (without autoconf's help, which isn't available because we want
 188             * flex-generated scanners to compile on their own).
 189             */
 190            typedef unsigned int yy_size_t;
 191            
 192            
 193            struct yy_buffer_state
 194            	{
 195            	FILE *yy_input_file;
 196            
 197            	char *yy_ch_buf;		/* input buffer */
 198            	char *yy_buf_pos;		/* current position in input buffer */
 199            
 200 mike  1.2  	/* Size of input buffer in bytes, not including room for EOB
 201            	 * characters.
 202            	 */
 203            	yy_size_t yy_buf_size;
 204            
 205            	/* Number of characters read into yy_ch_buf, not including EOB
 206            	 * characters.
 207            	 */
 208            	int yy_n_chars;
 209            
 210            	/* Whether we "own" the buffer - i.e., we know we created it,
 211            	 * and can realloc() it to grow it, and should free() it to
 212            	 * delete it.
 213            	 */
 214            	int yy_is_our_buffer;
 215            
 216            	/* Whether this is an "interactive" input source; if so, and
 217            	 * if we're using stdio for input, then we want to use getc()
 218            	 * instead of fread(), to make sure we stop fetching input after
 219            	 * each newline.
 220            	 */
 221 mike  1.2  	int yy_is_interactive;
 222            
 223            	/* Whether we're considered to be at the beginning of a line.
 224            	 * If so, '^' rules will be active on the next match, otherwise
 225            	 * not.
 226            	 */
 227            	int yy_at_bol;
 228            
 229            	/* Whether to try to fill the input buffer when we reach the
 230            	 * end of it.
 231            	 */
 232            	int yy_fill_buffer;
 233            
 234            	int yy_buffer_status;
 235            #define YY_BUFFER_NEW 0
 236            #define YY_BUFFER_NORMAL 1
 237            	/* When an EOF's been seen but there's still some text to process
 238            	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
 239            	 * shouldn't try reading from the input source any more.  We might
 240            	 * still have a bunch of tokens to match, though, because of
 241            	 * possible backing-up.
 242 mike  1.2  	 *
 243            	 * When we actually see the EOF, we change the status to "new"
 244            	 * (via yyrestart()), so that the user can continue scanning by
 245            	 * just pointing yyin at a new input file.
 246            	 */
 247            #define YY_BUFFER_EOF_PENDING 2
 248            	};
 249            
 250            static YY_BUFFER_STATE yy_current_buffer = 0;
 251            
 252            /* We provide macros for accessing buffer states in case in the
 253             * future we want to put the buffer states in a more general
 254             * "scanner state".
 255             */
 256            #define YY_CURRENT_BUFFER yy_current_buffer
 257            
 258            
 259            /* yy_hold_char holds the character lost when yytext is formed. */
 260            static char yy_hold_char;
 261            
 262            static int yy_n_chars;		/* number of characters read into yy_ch_buf */
 263 mike  1.2  
 264            
 265            int yyleng;
 266            
 267            /* Points to current character in buffer. */
 268            static char *yy_c_buf_p = (char *) 0;
 269            static int yy_init = 1;		/* whether we need to initialize */
 270            static int yy_start = 0;	/* start state number */
 271            
 272            /* Flag which is used to allow yywrap()'s to do buffer switches
 273             * instead of setting up a fresh yyin.  A bit of a hack ...
 274             */
 275            static int yy_did_buffer_switch_on_eof;
 276            
 277            void yyrestart YY_PROTO(( FILE *input_file ));
 278            
 279            void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
 280            void yy_load_buffer_state YY_PROTO(( void ));
 281            YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
 282            void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
 283            void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
 284 mike  1.2  void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
 285            #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
 286            
 287            YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
 288 kumpf 1.4  YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
 289 mike  1.2  YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
 290            
 291            static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
 292            static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
 293            static void yy_flex_free YY_PROTO(( void * ));
 294            
 295            #define yy_new_buffer yy_create_buffer
 296            
 297            #define yy_set_interactive(is_interactive) \
 298            	{ \
 299            	if ( ! yy_current_buffer ) \
 300            		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
 301            	yy_current_buffer->yy_is_interactive = is_interactive; \
 302            	}
 303            
 304            #define yy_set_bol(at_bol) \
 305            	{ \
 306            	if ( ! yy_current_buffer ) \
 307            		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
 308            	yy_current_buffer->yy_at_bol = at_bol; \
 309            	}
 310 mike  1.2  
 311            #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
 312            
 313            typedef unsigned char YY_CHAR;
 314            FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
 315            typedef int yy_state_type;
 316            extern char *yytext;
 317            #define yytext_ptr yytext
 318            
 319            static yy_state_type yy_get_previous_state YY_PROTO(( void ));
 320            static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
 321            static int yy_get_next_buffer YY_PROTO(( void ));
 322            static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
 323            
 324            /* Done after the current pattern has been matched and before the
 325             * corresponding action - sets up yytext.
 326             */
 327            #define YY_DO_BEFORE_ACTION \
 328            	yytext_ptr = yy_bp; \
 329            	yyleng = (int) (yy_cp - yy_bp); \
 330            	yy_hold_char = *yy_cp; \
 331 mike  1.2  	*yy_cp = '\0'; \
 332            	yy_c_buf_p = yy_cp;
 333            
 334 karl  1.14 #define YY_NUM_RULES 29
 335            #define YY_END_OF_BUFFER 30
 336 karl  1.10 static yyconst short int yy_accept[74] =
 337 mike  1.2      {   0,
 338 karl  1.14         0,    0,   30,   28,   27,   27,   28,   28,   18,   28,
 339                    5,   14,   13,   22,   19,   25,   26,   26,   26,   26,
 340                   26,   26,   26,   26,   26,   27,   20,    0,   17,   16,
 341                    0,   14,   13,   15,    0,   13,   21,   24,   23,   26,
 342                   26,   26,   26,   12,   26,   26,   11,   26,   26,   26,
 343                    0,   10,   26,   26,    4,    9,   26,   26,   26,   26,
 344                    0,   15,   26,    2,    8,   26,    6,   26,    7,   26,
 345 karl  1.10         3,    1,    0
 346 mike  1.2      } ;
 347            
 348            static yyconst int yy_ec[256] =
 349                {   0,
 350                    1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
 351                    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 352                    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 353                    1,    2,    4,    5,    1,    1,    1,    1,    1,    6,
 354                    6,    6,    7,    6,    7,    8,    1,    9,   10,   10,
 355                   10,   10,   10,   10,   10,   10,   10,    1,    1,   11,
 356                   12,   13,    1,    1,   14,   15,   16,   17,   18,   19,
 357                   15,   20,   21,   15,   15,   22,   23,   24,   25,   15,
 358                   15,   26,   27,   28,   29,   15,   30,   15,   15,   15,
 359                    1,    1,    1,    1,   15,    1,   14,   15,   16,   17,
 360            
 361                   18,   19,   15,   20,   21,   15,   15,   22,   23,   24,
 362                   25,   15,   15,   26,   27,   28,   29,   15,   30,   15,
 363                   15,   15,    1,    1,    1,    1,    1,    1,    1,    1,
 364                    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 365                    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 366                    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 367 mike  1.2          1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 368                    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 369                    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 370                    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 371            
 372                    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 373                    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 374                    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 375                    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 376                    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 377                    1,    1,    1,    1,    1
 378                } ;
 379            
 380            static yyconst int yy_meta[31] =
 381                {   0,
 382                    1,    1,    1,    1,    1,    1,    1,    1,    2,    2,
 383                    1,    1,    1,    2,    2,    2,    2,    2,    2,    2,
 384                    2,    2,    2,    2,    2,    2,    2,    2,    2,    2
 385                } ;
 386            
 387 karl  1.10 static yyconst short int yy_base[76] =
 388 mike  1.2      {   0,
 389 karl  1.10         0,    0,  112,  113,   29,   31,   99,   32,  113,   30,
 390                   32,   35,   38,   37,  113,   98,   85,    0,   37,   81,
 391                   27,   81,   88,   79,   84,   51,  113,   52,  113,  113,
 392                   49,   52,   56,   58,   61,   64,  113,  113,  113,    0,
 393                   86,   80,   76,   86,   71,   76,    0,   75,   67,   77,
 394                   68,    0,   67,   70,    0,    0,   70,   73,   72,   63,
 395                   70,   72,   70,    0,    0,   71,    0,   68,    0,   57,
 396                    0,    0,  113,   82,   34
 397 mike  1.2      } ;
 398            
 399 karl  1.10 static yyconst short int yy_def[76] =
 400 mike  1.2      {   0,
 401 karl  1.10        73,    1,   73,   73,   73,   73,   73,   74,   73,   73,
 402                   73,   73,   73,   73,   73,   73,   75,   75,   75,   75,
 403                   75,   75,   75,   75,   75,   73,   73,   74,   73,   73,
 404                   73,   73,   73,   73,   73,   73,   73,   73,   73,   75,
 405                   75,   75,   75,   75,   75,   75,   75,   75,   75,   75,
 406                   73,   75,   75,   75,   75,   75,   75,   75,   75,   75,
 407                   73,   73,   75,   75,   75,   75,   75,   75,   75,   75,
 408                   75,   75,    0,   73,   73
 409 mike  1.2      } ;
 410            
 411 karl  1.10 static yyconst short int yy_nxt[144] =
 412 mike  1.2      {   0,
 413                    4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
 414                   14,   15,   16,   17,   18,   18,   18,   18,   19,   18,
 415                   20,   18,   18,   21,   22,   18,   23,   24,   18,   25,
 416 karl  1.9         26,   26,   26,   26,   29,   40,   30,   31,   32,   33,
 417                   34,   34,   31,   35,   35,   31,   36,   36,   37,   38,
 418                   42,   45,   26,   26,   29,   46,   30,   34,   34,   31,
 419                   35,   35,   43,   31,   36,   36,   34,   34,   31,   35,
 420 karl  1.10        35,   31,   36,   36,   61,   51,   62,   62,   62,   62,
 421                   62,   62,   28,   28,   72,   71,   70,   69,   68,   67,
 422                   66,   65,   64,   63,   60,   59,   58,   57,   56,   55,
 423            
 424                   54,   53,   52,   50,   49,   48,   47,   44,   41,   39,
 425                   27,   73,    3,   73,   73,   73,   73,   73,   73,   73,
 426                   73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
 427                   73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
 428                   73,   73,   73
 429 mike  1.2      } ;
 430            
 431 karl  1.10 static yyconst short int yy_chk[144] =
 432 mike  1.2      {   0,
 433                    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 434                    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 435                    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 436 karl  1.10         5,    5,    6,    6,    8,   75,    8,   10,   10,   10,
 437 karl  1.9         11,   11,   12,   12,   12,   13,   13,   13,   14,   14,
 438                   19,   21,   26,   26,   28,   21,   28,   31,   31,   32,
 439                   32,   32,   19,   33,   33,   33,   34,   34,   35,   35,
 440 karl  1.10        35,   36,   36,   36,   51,   34,   51,   51,   61,   61,
 441                   62,   62,   74,   74,   70,   68,   66,   63,   60,   59,
 442                   58,   57,   54,   53,   50,   49,   48,   46,   45,   44,
 443            
 444                   43,   42,   41,   25,   24,   23,   22,   20,   17,   16,
 445                    7,    3,   73,   73,   73,   73,   73,   73,   73,   73,
 446                   73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
 447                   73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
 448                   73,   73,   73
 449 mike  1.2      } ;
 450            
 451            static yy_state_type yy_last_accepting_state;
 452            static char *yy_last_accepting_cpos;
 453            
 454            /* The intent behind this definition is that it'll catch
 455             * any uses of REJECT which flex missed.
 456             */
 457            #define REJECT reject_used_but_not_detected
 458            #define yymore() yymore_used_but_not_detected
 459            #define YY_MORE_ADJ 0
 460 kumpf 1.4  #define YY_RESTORE_YY_MORE_OFFSET
 461 mike  1.2  char *yytext;
 462            #line 1 "WQL.l"
 463            #define INITIAL 0
 464 karl  1.9  /*
 465            */
 466 mike  1.2  #define YY_NEVER_INTERACTIVE 1
 467 karl  1.9  #line 33 "WQL.l"
 468 mike  1.2  
 469            extern int WQLInput(char* buffer, int& numRead, int numRequested);
 470 kumpf 1.4  extern int WQL_error(const char*);
 471 mike  1.2  
 472            #define YY_INPUT(BUF, NREAD, NREQUESTED) WQLInput(BUF, NREAD, NREQUESTED)
 473            
 474            #include <Pegasus/Common/Config.h>
 475            #include <Pegasus/WQL/WQLParserState.h>
 476            #include <cstring>
 477 jim.wunderlich 1.16 #include <Pegasus/Common/PegasusAssert.h>
 478 mike           1.2  #include "WQLYACC.h"
 479                     
 480                     #if 0
 481                     # define WQL_TRACE(X) printf X
 482                     #else
 483                     # define WQL_TRACE(X)
 484                     #endif
 485                     
 486                     PEGASUS_NAMESPACE_BEGIN
 487                     
 488 karl           1.9  extern WQLParserState* globalParserState;
 489 mike           1.2  
 490                     static char* CloneString(const char* str, Uint32 size = (Uint32)-1);
 491                     
 492                     PEGASUS_NAMESPACE_END
 493                     
 494                     PEGASUS_USING_PEGASUS;
 495                     
 496 karl           1.9  #line 495 "WQLLEX.cpp"
 497 mike           1.2  
 498                     /* Macros after this point can all be overridden by user definitions in
 499                      * section 1.
 500                      */
 501                     
 502                     #ifndef YY_SKIP_YYWRAP
 503                     #ifdef __cplusplus
 504                     extern "C" int yywrap YY_PROTO(( void ));
 505                     #else
 506                     extern int yywrap YY_PROTO(( void ));
 507                     #endif
 508                     #endif
 509                     
 510                     #ifndef YY_NO_UNPUT
 511                     static void yyunput YY_PROTO(( int c, char *buf_ptr ));
 512                     #endif
 513                     
 514                     #ifndef yytext_ptr
 515                     static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
 516                     #endif
 517                     
 518 kumpf          1.4  #ifdef YY_NEED_STRLEN
 519                     static int yy_flex_strlen YY_PROTO(( yyconst char * ));
 520                     #endif
 521                     
 522 mike           1.2  #ifndef YY_NO_INPUT
 523                     #ifdef __cplusplus
 524                     static int yyinput YY_PROTO(( void ));
 525                     #else
 526                     static int input YY_PROTO(( void ));
 527                     #endif
 528                     #endif
 529                     
 530                     #if YY_STACK_USED
 531                     static int yy_start_stack_ptr = 0;
 532                     static int yy_start_stack_depth = 0;
 533                     static int *yy_start_stack = 0;
 534                     #ifndef YY_NO_PUSH_STATE
 535                     static void yy_push_state YY_PROTO(( int new_state ));
 536                     #endif
 537                     #ifndef YY_NO_POP_STATE
 538                     static void yy_pop_state YY_PROTO(( void ));
 539                     #endif
 540                     #ifndef YY_NO_TOP_STATE
 541                     static int yy_top_state YY_PROTO(( void ));
 542                     #endif
 543 mike           1.2  
 544                     #else
 545                     #define YY_NO_PUSH_STATE 1
 546                     #define YY_NO_POP_STATE 1
 547                     #define YY_NO_TOP_STATE 1
 548                     #endif
 549                     
 550                     #ifdef YY_MALLOC_DECL
 551                     YY_MALLOC_DECL
 552                     #else
 553                     #if __STDC__
 554                     #ifndef __cplusplus
 555                     #include <stdlib.h>
 556                     #endif
 557                     #else
 558                     /* Just try to get by without declaring the routines.  This will fail
 559                      * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
 560                      * or sizeof(void*) != sizeof(int).
 561                      */
 562                     #endif
 563                     #endif
 564 mike           1.2  
 565                     /* Amount of stuff to slurp up with each read. */
 566                     #ifndef YY_READ_BUF_SIZE
 567                     #define YY_READ_BUF_SIZE 8192
 568                     #endif
 569                     
 570                     /* Copy whatever the last rule matched to the standard output. */
 571                     
 572                     #ifndef ECHO
 573                     /* This used to be an fputs(), but since the string might contain NUL's,
 574                      * we now use fwrite().
 575                      */
 576                     #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
 577                     #endif
 578                     
 579                     /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
 580                      * is returned in "result".
 581                      */
 582                     #ifndef YY_INPUT
 583                     #define YY_INPUT(buf,result,max_size) \
 584                     	if ( yy_current_buffer->yy_is_interactive ) \
 585 mike           1.2  		{ \
 586                     		int c = '*', n; \
 587                     		for ( n = 0; n < max_size && \
 588                     			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
 589                     			buf[n] = (char) c; \
 590                     		if ( c == '\n' ) \
 591                     			buf[n++] = (char) c; \
 592                     		if ( c == EOF && ferror( yyin ) ) \
 593                     			YY_FATAL_ERROR( "input in flex scanner failed" ); \
 594                     		result = n; \
 595                     		} \
 596                     	else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
 597                     		  && ferror( yyin ) ) \
 598                     		YY_FATAL_ERROR( "input in flex scanner failed" );
 599                     #endif
 600                     
 601                     /* No semi-colon after return; correct usage is to write "yyterminate();" -
 602                      * we don't want an extra ';' after the "return" because that will cause
 603                      * some compilers to complain about unreachable statements.
 604                      */
 605                     #ifndef yyterminate
 606 mike           1.2  #define yyterminate() return YY_NULL
 607                     #endif
 608                     
 609                     /* Number of entries by which start-condition stack grows. */
 610                     #ifndef YY_START_STACK_INCR
 611                     #define YY_START_STACK_INCR 25
 612                     #endif
 613                     
 614                     /* Report a fatal error. */
 615                     #ifndef YY_FATAL_ERROR
 616                     #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
 617                     #endif
 618                     
 619                     /* Default declaration of generated scanner - a define so the user can
 620                      * easily add parameters.
 621                      */
 622                     #ifndef YY_DECL
 623                     #define YY_DECL int yylex YY_PROTO(( void ))
 624                     #endif
 625                     
 626                     /* Code executed at the beginning of each rule, after yytext and yyleng
 627 mike           1.2   * have been set up.
 628                      */
 629                     #ifndef YY_USER_ACTION
 630                     #define YY_USER_ACTION
 631                     #endif
 632                     
 633                     /* Code executed at the end of each rule. */
 634                     #ifndef YY_BREAK
 635                     #define YY_BREAK break;
 636                     #endif
 637                     
 638                     #define YY_RULE_SETUP \
 639                     	YY_USER_ACTION
 640                     
 641                     YY_DECL
 642                     	{
 643                     	register yy_state_type yy_current_state;
 644 karl           1.15 	register char *yy_cp = NULL, *yy_bp = NULL;
 645 mike           1.2  	register int yy_act;
 646                     
 647 karl           1.9  #line 68 "WQL.l"
 648 mike           1.2  
 649                     
 650 karl           1.9  #line 649 "WQLLEX.cpp"
 651 mike           1.2  
 652                     	if ( yy_init )
 653                     		{
 654                     		yy_init = 0;
 655                     
 656                     #ifdef YY_USER_INIT
 657                     		YY_USER_INIT;
 658                     #endif
 659                     
 660                     		if ( ! yy_start )
 661                     			yy_start = 1;	/* first start state */
 662                     
 663                     		if ( ! yyin )
 664                     			yyin = stdin;
 665                     
 666                     		if ( ! yyout )
 667                     			yyout = stdout;
 668                     
 669                     		if ( ! yy_current_buffer )
 670                     			yy_current_buffer =
 671                     				yy_create_buffer( yyin, YY_BUF_SIZE );
 672 mike           1.2  
 673                     		yy_load_buffer_state();
 674                     		}
 675                     
 676                     	while ( 1 )		/* loops until end-of-file is reached */
 677                     		{
 678                     		yy_cp = yy_c_buf_p;
 679                     
 680                     		/* Support of yytext. */
 681                     		*yy_cp = yy_hold_char;
 682                     
 683                     		/* yy_bp points to the position in yy_ch_buf of the start of
 684                     		 * the current run.
 685                     		 */
 686                     		yy_bp = yy_cp;
 687                     
 688                     		yy_current_state = yy_start;
 689                     yy_match:
 690                     		do
 691                     			{
 692                     			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
 693 mike           1.2  			if ( yy_accept[yy_current_state] )
 694                     				{
 695                     				yy_last_accepting_state = yy_current_state;
 696                     				yy_last_accepting_cpos = yy_cp;
 697                     				}
 698                     			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 699                     				{
 700                     				yy_current_state = (int) yy_def[yy_current_state];
 701 karl           1.10 				if ( yy_current_state >= 74 )
 702 mike           1.2  					yy_c = yy_meta[(unsigned int) yy_c];
 703                     				}
 704                     			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 705                     			++yy_cp;
 706                     			}
 707 karl           1.10 		while ( yy_base[yy_current_state] != 113 );
 708 mike           1.2  
 709                     yy_find_action:
 710                     		yy_act = yy_accept[yy_current_state];
 711                     		if ( yy_act == 0 )
 712                     			{ /* have to back up */
 713                     			yy_cp = yy_last_accepting_cpos;
 714                     			yy_current_state = yy_last_accepting_state;
 715                     			yy_act = yy_accept[yy_current_state];
 716                     			}
 717                     
 718                     		YY_DO_BEFORE_ACTION;
 719                     
 720                     
 721                     do_action:	/* This label is used only to access EOF actions. */
 722                     
 723                     
 724                     		switch ( yy_act )
 725                     	{ /* beginning of action switch */
 726                     			case 0: /* must back up */
 727                     			/* undo the effects of YY_DO_BEFORE_ACTION */
 728                     			*yy_cp = yy_hold_char;
 729 mike           1.2  			yy_cp = yy_last_accepting_cpos;
 730                     			yy_current_state = yy_last_accepting_state;
 731                     			goto yy_find_action;
 732                     
 733                     case 1:
 734                     YY_RULE_SETUP
 735 karl           1.9  #line 70 "WQL.l"
 736 mike           1.2  {
 737                     
 738                         WQL_TRACE(("LEX: %s [TOK_SELECT]\n", yytext));
 739                         return TOK_SELECT;
 740                     }
 741                     	YY_BREAK
 742                     case 2:
 743                     YY_RULE_SETUP
 744 karl           1.9  #line 76 "WQL.l"
 745 mike           1.2  {
 746                     
 747                         WQL_TRACE(("LEX: %s [TOK_FROM]\n", yytext));
 748                         return TOK_FROM;
 749                     }
 750                     	YY_BREAK
 751                     case 3:
 752                     YY_RULE_SETUP
 753 karl           1.9  #line 82 "WQL.l"
 754 mike           1.2  {
 755                     
 756                         WQL_TRACE(("LEX: %s [TOK_WHERE]\n", yytext));
 757                         return TOK_WHERE;
 758                     }
 759                     	YY_BREAK
 760                     case 4:
 761                     YY_RULE_SETUP
 762 karl           1.9  #line 88 "WQL.l"
 763 mike           1.2  {
 764                     
 765 karl           1.10    WQL_TRACE(("LEX: %s [TOK_ISA]\n", yytext));
 766                        return TOK_ISA;
 767                     }
 768                     	YY_BREAK
 769                     case 5:
 770                     YY_RULE_SETUP
 771 karl           1.14 #line 94 "WQL.l"
 772                     {
 773                       WQL_TRACE(("LEX: %s [TOK_DOT]\n", yytext));
 774                       return TOK_DOT;
 775                     }
 776                     	YY_BREAK
 777                     case 6:
 778                     YY_RULE_SETUP
 779                     #line 101 "WQL.l"
 780 karl           1.10 {
 781                     
 782 mike           1.2      WQL_TRACE(("LEX: %s [TOK_TRUE]\n", yytext));
 783                         return TOK_TRUE;
 784                     }
 785                     	YY_BREAK
 786 karl           1.14 case 7:
 787 mike           1.2  YY_RULE_SETUP
 788 karl           1.14 #line 107 "WQL.l"
 789 mike           1.2  {
 790                     
 791                         WQL_TRACE(("LEX: %s [TOK_FALSE]\n", yytext));
 792                         return TOK_FALSE;
 793                     }
 794                     	YY_BREAK
 795 karl           1.14 case 8:
 796 mike           1.2  YY_RULE_SETUP
 797 karl           1.14 #line 113 "WQL.l"
 798 mike           1.2  {
 799                     
 800                         WQL_TRACE(("LEX: %s [TOK_NULL]\n", yytext));
 801                         return TOK_NULL;
 802                     }
 803                     	YY_BREAK
 804 karl           1.14 case 9:
 805 mike           1.2  YY_RULE_SETUP
 806 karl           1.14 #line 119 "WQL.l"
 807 mike           1.2  {
 808                     
 809                         WQL_TRACE(("LEX: %s [TOK_NOT]\n", yytext));
 810                         return TOK_NOT;
 811                     }
 812                     	YY_BREAK
 813 karl           1.14 case 10:
 814 mike           1.2  YY_RULE_SETUP
 815 karl           1.14 #line 125 "WQL.l"
 816 mike           1.2  {
 817                     
 818                         WQL_TRACE(("LEX: %s [TOK_AND]\n", yytext));
 819                         return TOK_AND;
 820                     }
 821                     	YY_BREAK
 822 karl           1.14 case 11:
 823 mike           1.2  YY_RULE_SETUP
 824 karl           1.14 #line 131 "WQL.l"
 825 mike           1.2  {
 826                     
 827                         WQL_TRACE(("LEX: %s [TOK_OR]\n", yytext));
 828                         return TOK_OR;
 829                     }
 830                     	YY_BREAK
 831 karl           1.14 case 12:
 832 mike           1.2  YY_RULE_SETUP
 833 karl           1.14 #line 137 "WQL.l"
 834 mike           1.2  {
 835                     
 836                         WQL_TRACE(("LEX: %s [TOK_IS]\n", yytext));
 837                         return TOK_IS;
 838                     }
 839                     	YY_BREAK
 840 karl           1.14 case 13:
 841 mike           1.2  YY_RULE_SETUP
 842 karl           1.14 #line 143 "WQL.l"
 843 mike           1.2  {
 844                     
 845                         WQL_TRACE(("LEX: %s [TOK_INTEGER]\n", yytext));
 846                         WQL_lval.intValue = strtol(yytext, (char**)0, 10);
 847                         return TOK_INTEGER;
 848                     }
 849                     	YY_BREAK
 850 karl           1.14 case 14:
 851 mike           1.2  YY_RULE_SETUP
 852 karl           1.14 #line 150 "WQL.l"
 853 mike           1.2  {
 854                     
 855                         WQL_TRACE(("LEX: %s [TOK_INTEGER]\n", yytext));
 856                         WQL_lval.intValue = 0;
 857                         return TOK_INTEGER;
 858                     }
 859                     	YY_BREAK
 860 karl           1.14 case 15:
 861 mike           1.2  YY_RULE_SETUP
 862 karl           1.14 #line 157 "WQL.l"
 863 mike           1.2  {
 864                     
 865                         WQL_TRACE(("LEX: %s [TOK_DOUBLE]\n", yytext));
 866                         WQL_lval.doubleValue = strtod((char*)yytext, (char**)0);
 867                         return TOK_DOUBLE;
 868                     }
 869                     	YY_BREAK
 870 karl           1.14 case 16:
 871 mike           1.2  YY_RULE_SETUP
 872 karl           1.14 #line 164 "WQL.l"
 873 mike           1.2  {
 874                     
 875                         /* ATTN-B: handle long literals by using yyinput(). */
 876                         /* ATTN-B: Handle expansion of special characters */
 877                     
 878                         WQL_TRACE(("LEX: %s [TOK_STRING]\n", yytext));
 879                     
 880                         /* Copy the string (but remove the surrounding quotes */
 881                     
 882                         {
 883                     	size_t n = strlen(yytext) - 2;
 884                     	char* strValue = new char[n + 1];
 885                     	memcpy(strValue, yytext + 1, n);
 886                     	strValue[n] = '\0';
 887                     	WQL_lval.strValue = strValue;
 888                     	globalParserState->outstandingStrings.append(strValue);
 889                         }
 890                     
 891                         return TOK_STRING;
 892                     }
 893                     	YY_BREAK
 894 karl           1.14 case 17:
 895 mike           1.2  *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
 896                     yy_c_buf_p = yy_cp -= 1;
 897                     YY_DO_BEFORE_ACTION; /* set up yytext again */
 898                     YY_RULE_SETUP
 899 karl           1.14 #line 185 "WQL.l"
 900 mike           1.2  {
 901                     
 902                         WQL_error("Unterminated string");
 903                     }
 904                     	YY_BREAK
 905 karl           1.14 case 18:
 906 mike           1.2  YY_RULE_SETUP
 907 karl           1.14 #line 190 "WQL.l"
 908 mike           1.2  { 
 909                     
 910                         WQL_TRACE(("LEX: %c\n", yytext[0]));
 911                         return yytext[0];
 912                     }
 913                     	YY_BREAK
 914 karl           1.14 case 19:
 915 mike           1.2  YY_RULE_SETUP
 916 karl           1.14 #line 196 "WQL.l"
 917 mike           1.2  { 
 918                         WQL_TRACE(("LEX: %s [TOK_EQ]\n", yytext));
 919                         return TOK_EQ; 
 920                     }
 921                     	YY_BREAK
 922 karl           1.14 case 20:
 923 mike           1.2  YY_RULE_SETUP
 924 karl           1.14 #line 201 "WQL.l"
 925 mike           1.2  { 
 926                     
 927                         WQL_TRACE(("LEX: %s [TOK_NE]\n", yytext));
 928                         return TOK_NE; 
 929                     }
 930                     	YY_BREAK
 931 karl           1.14 case 21:
 932 mike           1.2  YY_RULE_SETUP
 933 karl           1.14 #line 207 "WQL.l"
 934 mike           1.2  { 
 935                     
 936                         WQL_TRACE(("LEX: %s [TOK_LE]\n", yytext));
 937                         return TOK_LE; 
 938                     }
 939                     	YY_BREAK
 940 karl           1.14 case 22:
 941 mike           1.2  YY_RULE_SETUP
 942 karl           1.14 #line 213 "WQL.l"
 943 mike           1.2  { 
 944                     
 945                         WQL_TRACE(("LEX: %s [TOK_LT]\n", yytext));
 946                         return TOK_LT; 
 947                     }
 948                     	YY_BREAK
 949 karl           1.14 case 23:
 950 mike           1.2  YY_RULE_SETUP
 951 karl           1.14 #line 219 "WQL.l"
 952 mike           1.2  { 
 953                     
 954                         WQL_TRACE(("LEX: %s [TOK_GE]\n", yytext));
 955                         return TOK_GE; 
 956                     }
 957                     	YY_BREAK
 958 karl           1.14 case 24:
 959 mike           1.2  YY_RULE_SETUP
 960 karl           1.14 #line 225 "WQL.l"
 961 karl           1.9  { 
 962                     
 963                         WQL_TRACE(("LEX: %s [TOK_NE]\n", yytext));
 964                         return TOK_NE; 
 965                     }
 966                     	YY_BREAK
 967 karl           1.14 case 25:
 968 karl           1.9  YY_RULE_SETUP
 969 karl           1.14 #line 231 "WQL.l"
 970 mike           1.2  { 
 971                     
 972                         WQL_TRACE(("LEX: %s [TOK_GT]\n", yytext));
 973                         return TOK_GT; 
 974                     }
 975                     	YY_BREAK
 976 karl           1.14 case 26:
 977 mike           1.2  YY_RULE_SETUP
 978 karl           1.14 #line 237 "WQL.l"
 979 mike           1.2  {
 980                     
 981                         WQL_TRACE(("LEX: %s [TOK_IDENTIFIER]\n", yytext));
 982                     
 983                         {
 984                     	size_t n = strlen(yytext);
 985                     	char* strValue = new char[n + 1];
 986                     	memcpy(strValue, yytext, n);
 987                     	strValue[n] = '\0';
 988                     	WQL_lval.strValue = strValue;
 989                     	globalParserState->outstandingStrings.append(strValue);
 990                         }
 991                     
 992                         return TOK_IDENTIFIER;
 993                     }
 994                     	YY_BREAK
 995 karl           1.14 case 27:
 996 mike           1.2  YY_RULE_SETUP
 997 karl           1.14 #line 253 "WQL.l"
 998 mike           1.2  {
 999                     
1000                         /* Ignore blanks */
1001                     }
1002                     	YY_BREAK
1003 karl           1.14 case 28:
1004 mike           1.2  YY_RULE_SETUP
1005 karl           1.14 #line 258 "WQL.l"
1006 mike           1.2  {
1007                         WQL_lval.intValue = 0;
1008                         return TOK_UNEXPECTED_CHAR;
1009                     }
1010                     	YY_BREAK
1011 karl           1.14 case 29:
1012 mike           1.2  YY_RULE_SETUP
1013 karl           1.14 #line 263 "WQL.l"
1014 mike           1.2  ECHO;
1015                     	YY_BREAK
1016 karl           1.14 #line 1015 "WQLLEX.cpp"
1017 mike           1.2  case YY_STATE_EOF(INITIAL):
1018                     	yyterminate();
1019                     
1020                     	case YY_END_OF_BUFFER:
1021                     		{
1022                     		/* Amount of text matched not including the EOB char. */
1023                     		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1024                     
1025                     		/* Undo the effects of YY_DO_BEFORE_ACTION. */
1026                     		*yy_cp = yy_hold_char;
1027 kumpf          1.4  		YY_RESTORE_YY_MORE_OFFSET
1028 mike           1.2  
1029                     		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1030                     			{
1031                     			/* We're scanning a new file or input source.  It's
1032                     			 * possible that this happened because the user
1033                     			 * just pointed yyin at a new source and called
1034                     			 * yylex().  If so, then we have to assure
1035                     			 * consistency between yy_current_buffer and our
1036                     			 * globals.  Here is the right place to do so, because
1037                     			 * this is the first action (other than possibly a
1038                     			 * back-up) that will match for the new input source.
1039                     			 */
1040                     			yy_n_chars = yy_current_buffer->yy_n_chars;
1041                     			yy_current_buffer->yy_input_file = yyin;
1042                     			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1043                     			}
1044                     
1045                     		/* Note that here we test for yy_c_buf_p "<=" to the position
1046                     		 * of the first EOB in the buffer, since yy_c_buf_p will
1047                     		 * already have been incremented past the NUL character
1048                     		 * (since all states make transitions on EOB to the
1049 mike           1.2  		 * end-of-buffer state).  Contrast this with the test
1050                     		 * in input().
1051                     		 */
1052                     		if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1053                     			{ /* This was really a NUL. */
1054                     			yy_state_type yy_next_state;
1055                     
1056                     			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1057                     
1058                     			yy_current_state = yy_get_previous_state();
1059                     
1060                     			/* Okay, we're now positioned to make the NUL
1061                     			 * transition.  We couldn't have
1062                     			 * yy_get_previous_state() go ahead and do it
1063                     			 * for us because it doesn't know how to deal
1064                     			 * with the possibility of jamming (and we don't
1065                     			 * want to build jamming into it because then it
1066                     			 * will run more slowly).
1067                     			 */
1068                     
1069                     			yy_next_state = yy_try_NUL_trans( yy_current_state );
1070 mike           1.2  
1071                     			yy_bp = yytext_ptr + YY_MORE_ADJ;
1072                     
1073                     			if ( yy_next_state )
1074                     				{
1075                     				/* Consume the NUL. */
1076                     				yy_cp = ++yy_c_buf_p;
1077                     				yy_current_state = yy_next_state;
1078                     				goto yy_match;
1079                     				}
1080                     
1081                     			else
1082                     				{
1083                     				yy_cp = yy_c_buf_p;
1084                     				goto yy_find_action;
1085                     				}
1086                     			}
1087                     
1088                     		else switch ( yy_get_next_buffer() )
1089                     			{
1090                     			case EOB_ACT_END_OF_FILE:
1091 mike           1.2  				{
1092                     				yy_did_buffer_switch_on_eof = 0;
1093                     
1094                     				if ( yywrap() )
1095                     					{
1096                     					/* Note: because we've taken care in
1097                     					 * yy_get_next_buffer() to have set up
1098                     					 * yytext, we can now set up
1099                     					 * yy_c_buf_p so that if some total
1100                     					 * hoser (like flex itself) wants to
1101                     					 * call the scanner after we return the
1102                     					 * YY_NULL, it'll still work - another
1103                     					 * YY_NULL will get returned.
1104                     					 */
1105                     					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1106                     
1107                     					yy_act = YY_STATE_EOF(YY_START);
1108                     					goto do_action;
1109                     					}
1110                     
1111                     				else
1112 mike           1.2  					{
1113                     					if ( ! yy_did_buffer_switch_on_eof )
1114                     						YY_NEW_FILE;
1115                     					}
1116                     				break;
1117                     				}
1118                     
1119                     			case EOB_ACT_CONTINUE_SCAN:
1120                     				yy_c_buf_p =
1121                     					yytext_ptr + yy_amount_of_matched_text;
1122                     
1123                     				yy_current_state = yy_get_previous_state();
1124                     
1125                     				yy_cp = yy_c_buf_p;
1126                     				yy_bp = yytext_ptr + YY_MORE_ADJ;
1127                     				goto yy_match;
1128                     
1129                     			case EOB_ACT_LAST_MATCH:
1130                     				yy_c_buf_p =
1131                     				&yy_current_buffer->yy_ch_buf[yy_n_chars];
1132                     
1133 mike           1.2  				yy_current_state = yy_get_previous_state();
1134                     
1135                     				yy_cp = yy_c_buf_p;
1136                     				yy_bp = yytext_ptr + YY_MORE_ADJ;
1137                     				goto yy_find_action;
1138                     			}
1139                     		break;
1140                     		}
1141                     
1142                     	default:
1143                     		YY_FATAL_ERROR(
1144                     			"fatal flex scanner internal error--no action found" );
1145                     	} /* end of action switch */
1146                     		} /* end of scanning one token */
1147                     	} /* end of yylex */
1148                     
1149                     
1150                     /* yy_get_next_buffer - try to read in a new buffer
1151                      *
1152                      * Returns a code representing an action:
1153                      *	EOB_ACT_LAST_MATCH -
1154 mike           1.2   *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1155                      *	EOB_ACT_END_OF_FILE - end of file
1156                      */
1157                     
1158                     static int yy_get_next_buffer()
1159                     	{
1160                     	register char *dest = yy_current_buffer->yy_ch_buf;
1161                     	register char *source = yytext_ptr;
1162                     	register int number_to_move, i;
1163                     	int ret_val;
1164                     
1165                     	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1166                     		YY_FATAL_ERROR(
1167                     		"fatal flex scanner internal error--end of buffer missed" );
1168                     
1169                     	if ( yy_current_buffer->yy_fill_buffer == 0 )
1170                     		{ /* Don't try to fill the buffer, so this is an EOF. */
1171                     		if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1172                     			{
1173 kumpf          1.4  			/* We matched a single character, the EOB, so
1174 mike           1.2  			 * treat this as a final EOF.
1175                     			 */
1176                     			return EOB_ACT_END_OF_FILE;
1177                     			}
1178                     
1179                     		else
1180                     			{
1181                     			/* We matched some text prior to the EOB, first
1182                     			 * process it.
1183                     			 */
1184                     			return EOB_ACT_LAST_MATCH;
1185                     			}
1186                     		}
1187                     
1188                     	/* Try to read more data. */
1189                     
1190                     	/* First move last chars to start of buffer. */
1191                     	number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1192                     
1193                     	for ( i = 0; i < number_to_move; ++i )
1194                     		*(dest++) = *(source++);
1195 mike           1.2  
1196                     	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1197                     		/* don't do the read, it's not guaranteed to return an EOF,
1198                     		 * just force an EOF
1199                     		 */
1200 kumpf          1.4  		yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1201 mike           1.2  
1202                     	else
1203                     		{
1204                     		int num_to_read =
1205                     			yy_current_buffer->yy_buf_size - number_to_move - 1;
1206                     
1207                     		while ( num_to_read <= 0 )
1208                     			{ /* Not enough room in the buffer - grow it. */
1209                     #ifdef YY_USES_REJECT
1210                     			YY_FATAL_ERROR(
1211                     "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1212                     #else
1213                     
1214                     			/* just a shorter name for the current buffer */
1215                     			YY_BUFFER_STATE b = yy_current_buffer;
1216                     
1217                     			int yy_c_buf_p_offset =
1218                     				(int) (yy_c_buf_p - b->yy_ch_buf);
1219                     
1220                     			if ( b->yy_is_our_buffer )
1221                     				{
1222 mike           1.2  				int new_size = b->yy_buf_size * 2;
1223                     
1224                     				if ( new_size <= 0 )
1225                     					b->yy_buf_size += b->yy_buf_size / 8;
1226                     				else
1227                     					b->yy_buf_size *= 2;
1228                     
1229                     				b->yy_ch_buf = (char *)
1230                     					/* Include room in for 2 EOB chars. */
1231                     					yy_flex_realloc( (void *) b->yy_ch_buf,
1232                     							 b->yy_buf_size + 2 );
1233                     				}
1234                     			else
1235                     				/* Can't grow it, we don't own it. */
1236                     				b->yy_ch_buf = 0;
1237                     
1238                     			if ( ! b->yy_ch_buf )
1239                     				YY_FATAL_ERROR(
1240                     				"fatal error - scanner input buffer overflow" );
1241                     
1242                     			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1243 mike           1.2  
1244                     			num_to_read = yy_current_buffer->yy_buf_size -
1245                     						number_to_move - 1;
1246                     #endif
1247                     			}
1248                     
1249                     		if ( num_to_read > YY_READ_BUF_SIZE )
1250                     			num_to_read = YY_READ_BUF_SIZE;
1251                     
1252                     		/* Read in more data. */
1253                     		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1254                     			yy_n_chars, num_to_read );
1255 kumpf          1.4  
1256                     		yy_current_buffer->yy_n_chars = yy_n_chars;
1257 mike           1.2  		}
1258                     
1259                     	if ( yy_n_chars == 0 )
1260                     		{
1261                     		if ( number_to_move == YY_MORE_ADJ )
1262                     			{
1263                     			ret_val = EOB_ACT_END_OF_FILE;
1264                     			yyrestart( yyin );
1265                     			}
1266                     
1267                     		else
1268                     			{
1269                     			ret_val = EOB_ACT_LAST_MATCH;
1270                     			yy_current_buffer->yy_buffer_status =
1271                     				YY_BUFFER_EOF_PENDING;
1272                     			}
1273                     		}
1274                     
1275                     	else
1276                     		ret_val = EOB_ACT_CONTINUE_SCAN;
1277                     
1278 mike           1.2  	yy_n_chars += number_to_move;
1279                     	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1280                     	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1281                     
1282                     	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1283                     
1284                     	return ret_val;
1285                     	}
1286                     
1287                     
1288                     /* yy_get_previous_state - get the state just before the EOB char was reached */
1289                     
1290                     static yy_state_type yy_get_previous_state()
1291                     	{
1292                     	register yy_state_type yy_current_state;
1293                     	register char *yy_cp;
1294                     
1295                     	yy_current_state = yy_start;
1296                     
1297                     	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1298                     		{
1299 mike           1.2  		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1300                     		if ( yy_accept[yy_current_state] )
1301                     			{
1302                     			yy_last_accepting_state = yy_current_state;
1303                     			yy_last_accepting_cpos = yy_cp;
1304                     			}
1305                     		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1306                     			{
1307                     			yy_current_state = (int) yy_def[yy_current_state];
1308 karl           1.10 			if ( yy_current_state >= 74 )
1309 mike           1.2  				yy_c = yy_meta[(unsigned int) yy_c];
1310                     			}
1311                     		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1312                     		}
1313                     
1314                     	return yy_current_state;
1315                     	}
1316                     
1317                     
1318                     /* yy_try_NUL_trans - try to make a transition on the NUL character
1319                      *
1320                      * synopsis
1321                      *	next_state = yy_try_NUL_trans( current_state );
1322                      */
1323                     
1324                     #ifdef YY_USE_PROTOS
1325                     static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1326                     #else
1327                     static yy_state_type yy_try_NUL_trans( yy_current_state )
1328                     yy_state_type yy_current_state;
1329                     #endif
1330 mike           1.2  	{
1331                     	register int yy_is_jam;
1332                     	register char *yy_cp = yy_c_buf_p;
1333                     
1334                     	register YY_CHAR yy_c = 1;
1335                     	if ( yy_accept[yy_current_state] )
1336                     		{
1337                     		yy_last_accepting_state = yy_current_state;
1338                     		yy_last_accepting_cpos = yy_cp;
1339                     		}
1340                     	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1341                     		{
1342                     		yy_current_state = (int) yy_def[yy_current_state];
1343 karl           1.10 		if ( yy_current_state >= 74 )
1344 mike           1.2  			yy_c = yy_meta[(unsigned int) yy_c];
1345                     		}
1346                     	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1347 karl           1.10 	yy_is_jam = (yy_current_state == 73);
1348 mike           1.2  
1349                     	return yy_is_jam ? 0 : yy_current_state;
1350                     	}
1351                     
1352                     
1353                     #ifndef YY_NO_UNPUT
1354                     #ifdef YY_USE_PROTOS
1355                     static void yyunput( int c, register char *yy_bp )
1356                     #else
1357                     static void yyunput( c, yy_bp )
1358                     int c;
1359                     register char *yy_bp;
1360                     #endif
1361                     	{
1362                     	register char *yy_cp = yy_c_buf_p;
1363                     
1364                     	/* undo effects of setting up yytext */
1365                     	*yy_cp = yy_hold_char;
1366                     
1367                     	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1368                     		{ /* need to shift things up to make room */
1369 mike           1.2  		/* +2 for EOB chars. */
1370                     		register int number_to_move = yy_n_chars + 2;
1371                     		register char *dest = &yy_current_buffer->yy_ch_buf[
1372                     					yy_current_buffer->yy_buf_size + 2];
1373                     		register char *source =
1374                     				&yy_current_buffer->yy_ch_buf[number_to_move];
1375                     
1376                     		while ( source > yy_current_buffer->yy_ch_buf )
1377                     			*--dest = *--source;
1378                     
1379                     		yy_cp += (int) (dest - source);
1380                     		yy_bp += (int) (dest - source);
1381 kumpf          1.4  		yy_current_buffer->yy_n_chars =
1382                     			yy_n_chars = yy_current_buffer->yy_buf_size;
1383 mike           1.2  
1384                     		if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1385                     			YY_FATAL_ERROR( "flex scanner push-back overflow" );
1386                     		}
1387                     
1388                     	*--yy_cp = (char) c;
1389                     
1390                     
1391                     	yytext_ptr = yy_bp;
1392                     	yy_hold_char = *yy_cp;
1393                     	yy_c_buf_p = yy_cp;
1394                     	}
1395                     #endif	/* ifndef YY_NO_UNPUT */
1396                     
1397                     
1398 karl           1.15 #ifndef YY_NO_INPUT
1399 mike           1.2  #ifdef __cplusplus
1400                     static int yyinput()
1401                     #else
1402                     static int input()
1403                     #endif
1404                     	{
1405                     	int c;
1406                     
1407                     	*yy_c_buf_p = yy_hold_char;
1408                     
1409                     	if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1410                     		{
1411                     		/* yy_c_buf_p now points to the character we want to return.
1412                     		 * If this occurs *before* the EOB characters, then it's a
1413                     		 * valid NUL; if not, then we've hit the end of the buffer.
1414                     		 */
1415                     		if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1416                     			/* This was really a NUL. */
1417                     			*yy_c_buf_p = '\0';
1418                     
1419                     		else
1420 mike           1.2  			{ /* need more input */
1421 kumpf          1.4  			int offset = yy_c_buf_p - yytext_ptr;
1422 mike           1.2  			++yy_c_buf_p;
1423                     
1424                     			switch ( yy_get_next_buffer() )
1425                     				{
1426 kumpf          1.4  				case EOB_ACT_LAST_MATCH:
1427                     					/* This happens because yy_g_n_b()
1428                     					 * sees that we've accumulated a
1429                     					 * token and flags that we need to
1430                     					 * try matching the token before
1431                     					 * proceeding.  But for input(),
1432                     					 * there's no matching to consider.
1433                     					 * So convert the EOB_ACT_LAST_MATCH
1434                     					 * to EOB_ACT_END_OF_FILE.
1435                     					 */
1436                     
1437                     					/* Reset buffer status. */
1438                     					yyrestart( yyin );
1439                     
1440                     					/* fall through */
1441                     
1442 mike           1.2  				case EOB_ACT_END_OF_FILE:
1443                     					{
1444                     					if ( yywrap() )
1445                     						return EOF;
1446                     
1447                     					if ( ! yy_did_buffer_switch_on_eof )
1448                     						YY_NEW_FILE;
1449                     #ifdef __cplusplus
1450                     					return yyinput();
1451                     #else
1452                     					return input();
1453                     #endif
1454                     					}
1455                     
1456                     				case EOB_ACT_CONTINUE_SCAN:
1457 kumpf          1.4  					yy_c_buf_p = yytext_ptr + offset;
1458 mike           1.2  					break;
1459                     				}
1460                     			}
1461                     		}
1462                     
1463                     	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */
1464                     	*yy_c_buf_p = '\0';	/* preserve yytext */
1465                     	yy_hold_char = *++yy_c_buf_p;
1466                     
1467                     
1468                     	return c;
1469                     	}
1470 karl           1.15 #endif /* YY_NO_INPUT */
1471 mike           1.2  
1472                     #ifdef YY_USE_PROTOS
1473                     void yyrestart( FILE *input_file )
1474                     #else
1475                     void yyrestart( input_file )
1476                     FILE *input_file;
1477                     #endif
1478                     	{
1479                     	if ( ! yy_current_buffer )
1480                     		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1481                     
1482                     	yy_init_buffer( yy_current_buffer, input_file );
1483                     	yy_load_buffer_state();
1484                     	}
1485                     
1486                     
1487                     #ifdef YY_USE_PROTOS
1488                     void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1489                     #else
1490                     void yy_switch_to_buffer( new_buffer )
1491                     YY_BUFFER_STATE new_buffer;
1492 mike           1.2  #endif
1493                     	{
1494                     	if ( yy_current_buffer == new_buffer )
1495                     		return;
1496                     
1497                     	if ( yy_current_buffer )
1498                     		{
1499                     		/* Flush out information for old buffer. */
1500                     		*yy_c_buf_p = yy_hold_char;
1501                     		yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1502                     		yy_current_buffer->yy_n_chars = yy_n_chars;
1503                     		}
1504                     
1505                     	yy_current_buffer = new_buffer;
1506                     	yy_load_buffer_state();
1507                     
1508                     	/* We don't actually know whether we did this switch during
1509                     	 * EOF (yywrap()) processing, but the only time this flag
1510                     	 * is looked at is after yywrap() is called, so it's safe
1511                     	 * to go ahead and always set it.
1512                     	 */
1513 mike           1.2  	yy_did_buffer_switch_on_eof = 1;
1514                     	}
1515                     
1516                     
1517                     #ifdef YY_USE_PROTOS
1518                     void yy_load_buffer_state( void )
1519                     #else
1520                     void yy_load_buffer_state()
1521                     #endif
1522                     	{
1523                     	yy_n_chars = yy_current_buffer->yy_n_chars;
1524                     	yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1525                     	yyin = yy_current_buffer->yy_input_file;
1526                     	yy_hold_char = *yy_c_buf_p;
1527                     	}
1528                     
1529                     
1530                     #ifdef YY_USE_PROTOS
1531                     YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1532                     #else
1533                     YY_BUFFER_STATE yy_create_buffer( file, size )
1534 mike           1.2  FILE *file;
1535                     int size;
1536                     #endif
1537                     	{
1538                     	YY_BUFFER_STATE b;
1539                     
1540                     	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1541                     	if ( ! b )
1542                     		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1543                     
1544                     	b->yy_buf_size = size;
1545                     
1546                     	/* yy_ch_buf has to be 2 characters longer than the size given because
1547                     	 * we need to put in 2 end-of-buffer characters.
1548                     	 */
1549                     	b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1550                     	if ( ! b->yy_ch_buf )
1551                     		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1552                     
1553                     	b->yy_is_our_buffer = 1;
1554                     
1555 mike           1.2  	yy_init_buffer( b, file );
1556                     
1557                     	return b;
1558                     	}
1559                     
1560                     
1561                     #ifdef YY_USE_PROTOS
1562                     void yy_delete_buffer( YY_BUFFER_STATE b )
1563                     #else
1564                     void yy_delete_buffer( b )
1565                     YY_BUFFER_STATE b;
1566                     #endif
1567                     	{
1568                     	if ( ! b )
1569                     		return;
1570                     
1571                     	if ( b == yy_current_buffer )
1572                     		yy_current_buffer = (YY_BUFFER_STATE) 0;
1573                     
1574                     	if ( b->yy_is_our_buffer )
1575                     		yy_flex_free( (void *) b->yy_ch_buf );
1576 mike           1.2  
1577                     	yy_flex_free( (void *) b );
1578                     	}
1579                     
1580                     
1581                     
1582                     #ifdef YY_USE_PROTOS
1583                     void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1584                     #else
1585                     void yy_init_buffer( b, file )
1586                     YY_BUFFER_STATE b;
1587                     FILE *file;
1588                     #endif
1589                     
1590                     
1591                     	{
1592                     	yy_flush_buffer( b );
1593                     
1594                     	b->yy_input_file = file;
1595                     	b->yy_fill_buffer = 1;
1596                     
1597 mike           1.2  #if YY_ALWAYS_INTERACTIVE
1598                     	b->yy_is_interactive = 1;
1599                     #else
1600                     #if YY_NEVER_INTERACTIVE
1601                     	b->yy_is_interactive = 0;
1602                     #else
1603                     	b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1604                     #endif
1605                     #endif
1606                     	}
1607                     
1608                     
1609                     #ifdef YY_USE_PROTOS
1610                     void yy_flush_buffer( YY_BUFFER_STATE b )
1611                     #else
1612                     void yy_flush_buffer( b )
1613                     YY_BUFFER_STATE b;
1614                     #endif
1615                     
1616                     	{
1617 kumpf          1.4  	if ( ! b )
1618                     		return;
1619                     
1620 mike           1.2  	b->yy_n_chars = 0;
1621                     
1622                     	/* We always need two end-of-buffer characters.  The first causes
1623                     	 * a transition to the end-of-buffer state.  The second causes
1624                     	 * a jam in that state.
1625                     	 */
1626                     	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1627                     	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1628                     
1629                     	b->yy_buf_pos = &b->yy_ch_buf[0];
1630                     
1631                     	b->yy_at_bol = 1;
1632                     	b->yy_buffer_status = YY_BUFFER_NEW;
1633                     
1634                     	if ( b == yy_current_buffer )
1635                     		yy_load_buffer_state();
1636                     	}
1637                     
1638                     
1639                     #ifndef YY_NO_SCAN_BUFFER
1640                     #ifdef YY_USE_PROTOS
1641 mike           1.2  YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1642                     #else
1643                     YY_BUFFER_STATE yy_scan_buffer( base, size )
1644                     char *base;
1645                     yy_size_t size;
1646                     #endif
1647                     	{
1648                     	YY_BUFFER_STATE b;
1649                     
1650                     	if ( size < 2 ||
1651                     	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
1652                     	     base[size-1] != YY_END_OF_BUFFER_CHAR )
1653                     		/* They forgot to leave room for the EOB's. */
1654                     		return 0;
1655                     
1656                     	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1657                     	if ( ! b )
1658                     		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1659                     
1660                     	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
1661                     	b->yy_buf_pos = b->yy_ch_buf = base;
1662 mike           1.2  	b->yy_is_our_buffer = 0;
1663                     	b->yy_input_file = 0;
1664                     	b->yy_n_chars = b->yy_buf_size;
1665                     	b->yy_is_interactive = 0;
1666                     	b->yy_at_bol = 1;
1667                     	b->yy_fill_buffer = 0;
1668                     	b->yy_buffer_status = YY_BUFFER_NEW;
1669                     
1670                     	yy_switch_to_buffer( b );
1671                     
1672                     	return b;
1673                     	}
1674                     #endif
1675                     
1676                     
1677                     #ifndef YY_NO_SCAN_STRING
1678                     #ifdef YY_USE_PROTOS
1679 kumpf          1.4  YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1680 mike           1.2  #else
1681 kumpf          1.4  YY_BUFFER_STATE yy_scan_string( yy_str )
1682                     yyconst char *yy_str;
1683 mike           1.2  #endif
1684                     	{
1685                     	int len;
1686 kumpf          1.4  	for ( len = 0; yy_str[len]; ++len )
1687 mike           1.2  		;
1688                     
1689 kumpf          1.4  	return yy_scan_bytes( yy_str, len );
1690 mike           1.2  	}
1691                     #endif
1692                     
1693                     
1694                     #ifndef YY_NO_SCAN_BYTES
1695                     #ifdef YY_USE_PROTOS
1696                     YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1697                     #else
1698                     YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1699                     yyconst char *bytes;
1700                     int len;
1701                     #endif
1702                     	{
1703                     	YY_BUFFER_STATE b;
1704                     	char *buf;
1705                     	yy_size_t n;
1706                     	int i;
1707                     
1708                     	/* Get memory for full buffer, including space for trailing EOB's. */
1709                     	n = len + 2;
1710                     	buf = (char *) yy_flex_alloc( n );
1711 mike           1.2  	if ( ! buf )
1712                     		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1713                     
1714                     	for ( i = 0; i < len; ++i )
1715                     		buf[i] = bytes[i];
1716                     
1717                     	buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1718                     
1719                     	b = yy_scan_buffer( buf, n );
1720                     	if ( ! b )
1721                     		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1722                     
1723                     	/* It's okay to grow etc. this buffer, and we should throw it
1724                     	 * away when we're done.
1725                     	 */
1726                     	b->yy_is_our_buffer = 1;
1727                     
1728                     	return b;
1729                     	}
1730                     #endif
1731                     
1732 mike           1.2  
1733                     #ifndef YY_NO_PUSH_STATE
1734                     #ifdef YY_USE_PROTOS
1735                     static void yy_push_state( int new_state )
1736                     #else
1737                     static void yy_push_state( new_state )
1738                     int new_state;
1739                     #endif
1740                     	{
1741                     	if ( yy_start_stack_ptr >= yy_start_stack_depth )
1742                     		{
1743                     		yy_size_t new_size;
1744                     
1745                     		yy_start_stack_depth += YY_START_STACK_INCR;
1746                     		new_size = yy_start_stack_depth * sizeof( int );
1747                     
1748                     		if ( ! yy_start_stack )
1749                     			yy_start_stack = (int *) yy_flex_alloc( new_size );
1750                     
1751                     		else
1752                     			yy_start_stack = (int *) yy_flex_realloc(
1753 mike           1.2  					(void *) yy_start_stack, new_size );
1754                     
1755                     		if ( ! yy_start_stack )
1756                     			YY_FATAL_ERROR(
1757                     			"out of memory expanding start-condition stack" );
1758                     		}
1759                     
1760                     	yy_start_stack[yy_start_stack_ptr++] = YY_START;
1761                     
1762                     	BEGIN(new_state);
1763                     	}
1764                     #endif
1765                     
1766                     
1767                     #ifndef YY_NO_POP_STATE
1768                     static void yy_pop_state()
1769                     	{
1770                     	if ( --yy_start_stack_ptr < 0 )
1771                     		YY_FATAL_ERROR( "start-condition stack underflow" );
1772                     
1773                     	BEGIN(yy_start_stack[yy_start_stack_ptr]);
1774 mike           1.2  	}
1775                     #endif
1776                     
1777                     
1778                     #ifndef YY_NO_TOP_STATE
1779                     static int yy_top_state()
1780                     	{
1781                     	return yy_start_stack[yy_start_stack_ptr - 1];
1782                     	}
1783                     #endif
1784                     
1785                     #ifndef YY_EXIT_FAILURE
1786                     #define YY_EXIT_FAILURE 2
1787                     #endif
1788                     
1789                     #ifdef YY_USE_PROTOS
1790                     static void yy_fatal_error( yyconst char msg[] )
1791                     #else
1792                     static void yy_fatal_error( msg )
1793                     char msg[];
1794                     #endif
1795 mike           1.2  	{
1796                     	(void) fprintf( stderr, "%s\n", msg );
1797                     	exit( YY_EXIT_FAILURE );
1798                     	}
1799                     
1800                     
1801                     
1802                     /* Redefine yyless() so it works in section 3 code. */
1803                     
1804                     #undef yyless
1805                     #define yyless(n) \
1806                     	do \
1807                     		{ \
1808                     		/* Undo effects of setting up yytext. */ \
1809                     		yytext[yyleng] = yy_hold_char; \
1810 kumpf          1.4  		yy_c_buf_p = yytext + n; \
1811 mike           1.2  		yy_hold_char = *yy_c_buf_p; \
1812                     		*yy_c_buf_p = '\0'; \
1813                     		yyleng = n; \
1814                     		} \
1815                     	while ( 0 )
1816                     
1817                     
1818                     /* Internal utility routines. */
1819                     
1820                     #ifndef yytext_ptr
1821                     #ifdef YY_USE_PROTOS
1822                     static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1823                     #else
1824                     static void yy_flex_strncpy( s1, s2, n )
1825                     char *s1;
1826                     yyconst char *s2;
1827                     int n;
1828                     #endif
1829                     	{
1830                     	register int i;
1831                     	for ( i = 0; i < n; ++i )
1832 mike           1.2  		s1[i] = s2[i];
1833 kumpf          1.4  	}
1834                     #endif
1835                     
1836                     #ifdef YY_NEED_STRLEN
1837                     #ifdef YY_USE_PROTOS
1838                     static int yy_flex_strlen( yyconst char *s )
1839                     #else
1840                     static int yy_flex_strlen( s )
1841                     yyconst char *s;
1842                     #endif
1843                     	{
1844                     	register int n;
1845                     	for ( n = 0; s[n]; ++n )
1846                     		;
1847                     
1848                     	return n;
1849 mike           1.2  	}
1850                     #endif
1851                     
1852                     
1853                     #ifdef YY_USE_PROTOS
1854                     static void *yy_flex_alloc( yy_size_t size )
1855                     #else
1856                     static void *yy_flex_alloc( size )
1857                     yy_size_t size;
1858                     #endif
1859                     	{
1860                     	return (void *) malloc( size );
1861                     	}
1862                     
1863                     #ifdef YY_USE_PROTOS
1864                     static void *yy_flex_realloc( void *ptr, yy_size_t size )
1865                     #else
1866                     static void *yy_flex_realloc( ptr, size )
1867                     void *ptr;
1868                     yy_size_t size;
1869                     #endif
1870 mike           1.2  	{
1871                     	/* The cast to (char *) in the following accommodates both
1872                     	 * implementations that use char* generic pointers, and those
1873                     	 * that use void* generic pointers.  It works with the latter
1874                     	 * because both ANSI C and C++ allow castless assignment from
1875                     	 * any pointer type to void*, and deal with argument conversions
1876                     	 * as though doing an assignment.
1877                     	 */
1878                     	return (void *) realloc( (char *) ptr, size );
1879                     	}
1880                     
1881                     #ifdef YY_USE_PROTOS
1882                     static void yy_flex_free( void *ptr )
1883                     #else
1884                     static void yy_flex_free( ptr )
1885                     void *ptr;
1886                     #endif
1887                     	{
1888                     	free( ptr );
1889                     	}
1890                     
1891 mike           1.2  #if YY_MAIN
1892                     int main()
1893                     	{
1894                     	yylex();
1895                     	return 0;
1896                     	}
1897                     #endif
1898 karl           1.14 #line 263 "WQL.l"
1899 mike           1.2  
1900                     
1901                     extern "C" int WQL_wrap()
1902                     {
1903                         return 1;
1904                     }

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2