~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/pars/lexyy.c

  • Committer: Monty Taylor
  • Date: 2008-09-15 17:24:04 UTC
  • Revision ID: monty@inaugust.com-20080915172404-ygh6hiyu0q7qpa9x
Removed strndup calls.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#include "univ.i"
2
 
#line 2 "lexyy.c"
 
2
#line 2 "_flex_tmp.c"
3
3
 
4
 
#line 4 "lexyy.c"
 
4
#line 4 "_flex_tmp.c"
5
5
 
6
6
#define  YY_INT_ALIGNED short int
7
7
 
141
141
typedef struct yy_buffer_state *YY_BUFFER_STATE;
142
142
#endif
143
143
 
144
 
static FILE *yyin, *yyout;
 
144
extern int yyleng;
 
145
 
 
146
extern FILE *yyin, *yyout;
145
147
 
146
148
#define EOB_ACT_CONTINUE_SCAN 0
147
149
#define EOB_ACT_END_OF_FILE 1
263
265
/* yy_hold_char holds the character lost when yytext is formed. */
264
266
static char yy_hold_char;
265
267
static int yy_n_chars;          /* number of characters read into yy_ch_buf */
266
 
static int yyleng;
 
268
int yyleng;
267
269
 
268
270
/* Points to current character in buffer. */
269
271
static char *yy_c_buf_p = (char *) 0;
275
277
 */
276
278
static int yy_did_buffer_switch_on_eof;
277
279
 
278
 
static void yyrestart (FILE *input_file  );
279
 
__attribute__((unused)) static void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
280
 
static YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
281
 
static void yy_delete_buffer (YY_BUFFER_STATE b  );
282
 
static void yy_flush_buffer (YY_BUFFER_STATE b  );
283
 
__attribute__((unused)) static void yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
284
 
__attribute__((unused)) static void yypop_buffer_state (void );
 
280
void yyrestart (FILE *input_file  );
 
281
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
 
282
YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
 
283
void yy_delete_buffer (YY_BUFFER_STATE b  );
 
284
void yy_flush_buffer (YY_BUFFER_STATE b  );
 
285
void yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
 
286
void yypop_buffer_state (void );
285
287
 
286
288
static void yyensure_buffer_stack (void );
287
289
static void yy_load_buffer_state (void );
293
295
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
294
296
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len  );
295
297
 
296
 
static void *yyalloc (yy_size_t  );
297
 
static void *yyrealloc (void *,yy_size_t  );
298
 
static void yyfree (void *  );
 
298
void *yyalloc (yy_size_t  );
 
299
void *yyrealloc (void *,yy_size_t  );
 
300
void yyfree (void *  );
299
301
 
300
302
#define yy_new_buffer yy_create_buffer
301
303
 
328
330
 
329
331
typedef unsigned char YY_CHAR;
330
332
 
331
 
static FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
 
333
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
332
334
 
333
335
typedef int yy_state_type;
334
336
 
335
 
static int yylineno;
336
 
 
337
 
static int yylineno = 1;
338
 
 
339
 
static char *yytext;
 
337
extern int yylineno;
 
338
 
 
339
int yylineno = 1;
 
340
 
 
341
extern char *yytext;
340
342
#define yytext_ptr yytext
341
343
 
342
344
static yy_state_type yy_get_previous_state (void );
671
673
static yy_state_type yy_last_accepting_state;
672
674
static char *yy_last_accepting_cpos;
673
675
 
674
 
static int yy_flex_debug;
675
 
static int yy_flex_debug = 0;
 
676
extern int yy_flex_debug;
 
677
int yy_flex_debug = 0;
676
678
 
677
679
/* The intent behind this definition is that it'll catch
678
680
 * any uses of REJECT which flex missed.
681
683
#define yymore() yymore_used_but_not_detected
682
684
#define YY_MORE_ADJ 0
683
685
#define YY_RESTORE_YY_MORE_OFFSET
 
686
char *yytext;
684
687
#line 1 "pars0lex.l"
685
688
/******************************************************
686
689
SQL parser lexical analyzer: input file for the GNU Flex lexer generator
753
756
 
754
757
 
755
758
 
756
 
#line 759 "lexyy.c"
 
759
#line 759 "_flex_tmp.c"
757
760
 
758
761
#define INITIAL 0
759
762
#define comment 1
877
880
#ifndef YY_DECL
878
881
#define YY_DECL_IS_OURS 1
879
882
 
880
 
UNIV_INTERN int yylex (void);
 
883
extern int yylex (void);
881
884
 
882
 
#define YY_DECL UNIV_INTERN int yylex (void)
 
885
#define YY_DECL int yylex (void)
883
886
#endif /* !YY_DECL */
884
887
 
885
888
/* Code executed at the beginning of each rule, after yytext and yyleng
908
911
#line 92 "pars0lex.l"
909
912
 
910
913
 
911
 
#line 914 "lexyy.c"
 
914
#line 914 "_flex_tmp.c"
912
915
 
913
916
        if ( (yy_init) )
914
917
                {
1910
1913
#line 648 "pars0lex.l"
1911
1914
YY_FATAL_ERROR( "flex scanner jammed" );
1912
1915
        YY_BREAK
1913
 
#line 1916 "lexyy.c"
 
1916
#line 1916 "_flex_tmp.c"
1914
1917
case YY_STATE_EOF(INITIAL):
1915
1918
case YY_STATE_EOF(comment):
1916
1919
case YY_STATE_EOF(quoted):
2314
2317
 * 
2315
2318
 * @note This function does not reset the start condition to @c INITIAL .
2316
2319
 */
2317
 
    static void yyrestart  (FILE * input_file )
 
2320
    void yyrestart  (FILE * input_file )
2318
2321
{
2319
2322
    
2320
2323
        if ( ! YY_CURRENT_BUFFER ){
2331
2334
 * @param new_buffer The new input buffer.
2332
2335
 * 
2333
2336
 */
2334
 
    __attribute__((unused)) static void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
 
2337
    void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
2335
2338
{
2336
2339
    
2337
2340
        /* TODO. We should be able to replace this entire function body
2376
2379
 * 
2377
2380
 * @return the allocated buffer state.
2378
2381
 */
2379
 
    static YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
 
2382
    YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
2380
2383
{
2381
2384
        YY_BUFFER_STATE b;
2382
2385
    
2404
2407
 * @param b a buffer created with yy_create_buffer()
2405
2408
 * 
2406
2409
 */
2407
 
    static void yy_delete_buffer (YY_BUFFER_STATE  b )
 
2410
    void yy_delete_buffer (YY_BUFFER_STATE  b )
2408
2411
{
2409
2412
    
2410
2413
        if ( ! b )
2451
2454
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2452
2455
 * 
2453
2456
 */
2454
 
    static void yy_flush_buffer (YY_BUFFER_STATE  b )
 
2457
    void yy_flush_buffer (YY_BUFFER_STATE  b )
2455
2458
{
2456
2459
        if ( ! b )
2457
2460
                return;
2480
2483
 *  @param new_buffer The new state.
2481
2484
 *  
2482
2485
 */
2483
 
__attribute__((unused)) static void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
 
2486
void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2484
2487
{
2485
2488
        if (new_buffer == NULL)
2486
2489
                return;
2510
2513
 *  The next element becomes the new top.
2511
2514
 *  
2512
2515
 */
2513
 
__attribute__((unused)) static void yypop_buffer_state (void)
 
2516
void yypop_buffer_state (void)
2514
2517
{
2515
2518
        if (!YY_CURRENT_BUFFER)
2516
2519
                return;
2597
2600
 
2598
2601
/* Accessor  methods (get/set functions) to struct members. */
2599
2602
 
2600
 
/** Get the current line number.
2601
 
 * 
2602
 
 */
2603
 
__attribute__((unused)) static int yyget_lineno  (void)
2604
 
{
2605
 
        
2606
 
    return yylineno;
2607
 
}
2608
 
 
2609
 
/** Get the input stream.
2610
 
 * 
2611
 
 */
2612
 
__attribute__((unused)) static FILE *yyget_in  (void)
2613
 
{
2614
 
        return yyin;
2615
 
}
2616
 
 
2617
 
/** Get the output stream.
2618
 
 * 
2619
 
 */
2620
 
__attribute__((unused)) static FILE *yyget_out  (void)
2621
 
{
2622
 
        return yyout;
2623
 
}
2624
 
 
2625
 
/** Get the length of the current token.
2626
 
 * 
2627
 
 */
2628
 
__attribute__((unused)) static int yyget_leng  (void)
2629
 
{
2630
 
        return yyleng;
2631
 
}
2632
 
 
2633
 
/** Get the current token.
2634
 
 * 
2635
 
 */
2636
 
 
2637
 
__attribute__((unused)) static char *yyget_text  (void)
2638
 
{
2639
 
        return yytext;
2640
 
}
2641
 
 
2642
 
/** Set the current line number.
2643
 
 * @param line_number
2644
 
 * 
2645
 
 */
2646
 
__attribute__((unused)) static void yyset_lineno (int  line_number )
2647
 
{
2648
 
    
2649
 
    yylineno = line_number;
2650
 
}
2651
 
 
2652
 
/** Set the input stream. This does not discard the current
2653
 
 * input buffer.
2654
 
 * @param in_str A readable stream.
2655
 
 * 
2656
 
 * @see yy_switch_to_buffer
2657
 
 */
2658
 
__attribute__((unused)) static void yyset_in (FILE *  in_str )
2659
 
{
2660
 
        yyin = in_str ;
2661
 
}
2662
 
 
2663
 
__attribute__((unused)) static void yyset_out (FILE *  out_str )
2664
 
{
2665
 
        yyout = out_str ;
2666
 
}
2667
 
 
2668
 
__attribute__((unused)) static int yyget_debug  (void)
2669
 
{
2670
 
        return yy_flex_debug;
2671
 
}
2672
 
 
2673
 
__attribute__((unused)) static void yyset_debug (int  bdebug )
2674
 
{
2675
 
        yy_flex_debug = bdebug ;
2676
 
}
2677
 
 
2678
 
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
2679
 
__attribute__((unused)) static int yylex_destroy  (void)
2680
 
{
2681
 
    
2682
 
    /* Pop the buffer stack, destroying each element. */
2683
 
        while(YY_CURRENT_BUFFER){
2684
 
                yy_delete_buffer(YY_CURRENT_BUFFER  );
2685
 
                YY_CURRENT_BUFFER_LVALUE = NULL;
2686
 
                yypop_buffer_state();
2687
 
        }
2688
 
 
2689
 
        /* Destroy the stack itself. */
2690
 
        yyfree((yy_buffer_stack) );
2691
 
        (yy_buffer_stack) = NULL;
2692
 
 
2693
 
    return 0;
2694
 
}
2695
2603
 
2696
2604
/*
2697
2605
 * Internal utility routines.
2717
2625
}
2718
2626
#endif
2719
2627
 
2720
 
static void *yyalloc (yy_size_t  size )
 
2628
void *yyalloc (yy_size_t  size )
2721
2629
{
2722
2630
        return (void *) malloc( size );
2723
2631
}
2724
2632
 
2725
 
static void *yyrealloc  (void * ptr, yy_size_t  size )
 
2633
void *yyrealloc  (void * ptr, yy_size_t  size )
2726
2634
{
2727
2635
        /* The cast to (char *) in the following accommodates both
2728
2636
         * implementations that use char* generic pointers, and those
2734
2642
        return (void *) realloc( (char *) ptr, size );
2735
2643
}
2736
2644
 
2737
 
static void yyfree (void * ptr )
 
2645
void yyfree (void * ptr )
2738
2646
{
2739
2647
        free( (char *) ptr );   /* see yyrealloc() for (char *) cast */
2740
2648
}