~ubuntu-branches/ubuntu/saucy/cuyo/saucy

« back to all changes in this revision

Viewing changes to src/scanner.cc

  • Committer: Bazaar Package Importer
  • Author(s): Angel Abad
  • Date: 2010-07-19 09:54:44 UTC
  • mfrom: (4.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100719095444-ecoegzo1vvvdwra9
Tags: 2.~-1.1.brl3-1ubuntu1
* Merge from debian unstable (LP: #607106). Remaining changes:
  - Don't register MimeType=application/x-executable in
    the .desktop file.
  - Remove UTF-8 in the .desktop file
  - 

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
#define FLEX_SCANNER
9
9
#define YY_FLEX_MAJOR_VERSION 2
10
10
#define YY_FLEX_MINOR_VERSION 5
11
 
#define YY_FLEX_SUBMINOR_VERSION 33
 
11
#define YY_FLEX_SUBMINOR_VERSION 35
12
12
#if YY_FLEX_SUBMINOR_VERSION > 0
13
13
#define FLEX_BETA
14
14
#endif
30
30
 
31
31
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
32
32
 
33
 
#if __STDC_VERSION__ >= 199901L
 
33
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
34
34
 
35
35
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36
36
 * if you want the limit (max/min) macros for int types. 
53
53
typedef unsigned char flex_uint8_t; 
54
54
typedef unsigned short int flex_uint16_t;
55
55
typedef unsigned int flex_uint32_t;
56
 
#endif /* ! C99 */
57
56
 
58
57
/* Limits of integral types. */
59
58
#ifndef INT8_MIN
84
83
#define UINT32_MAX             (4294967295U)
85
84
#endif
86
85
 
 
86
#endif /* ! C99 */
 
87
 
87
88
#endif /* ! FLEXINT_H */
88
89
 
89
90
#ifdef __cplusplus
93
94
 
94
95
#else   /* ! __cplusplus */
95
96
 
96
 
#if __STDC__
 
97
/* C99 requires __STDC__ to be defined as 1. */
 
98
#if defined (__STDC__)
97
99
 
98
100
#define YY_USE_CONST
99
101
 
100
 
#endif  /* __STDC__ */
 
102
#endif  /* defined (__STDC__) */
101
103
#endif  /* ! __cplusplus */
102
104
 
103
105
#ifdef YY_USE_CONST
139
141
 
140
142
/* Size of default input buffer. */
141
143
#ifndef YY_BUF_SIZE
 
144
#ifdef __ia64__
 
145
/* On IA-64, the buffer size is 16k, not 8k.
 
146
 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
 
147
 * Ditto for the __ia64__ case accordingly.
 
148
 */
 
149
#define YY_BUF_SIZE 32768
 
150
#else
142
151
#define YY_BUF_SIZE 16384
 
152
#endif /* __ia64__ */
143
153
#endif
144
154
 
145
155
/* The state buf must be large enough to hold one state per character in the main buffer.
177
187
 
178
188
#define unput(c) yyunput( c, (yytext_ptr)  )
179
189
 
180
 
/* The following is because we cannot portably get our hands on size_t
181
 
 * (without autoconf's help, which isn't available because we want
182
 
 * flex-generated scanners to compile on their own).
183
 
 */
184
 
 
185
190
#ifndef YY_TYPEDEF_YY_SIZE_T
186
191
#define YY_TYPEDEF_YY_SIZE_T
187
 
typedef unsigned int yy_size_t;
 
192
typedef size_t yy_size_t;
188
193
#endif
189
194
 
190
195
#ifndef YY_STRUCT_YY_BUFFER_STATE
335
340
 
336
341
/* Begin user sect3 */
337
342
 
338
 
#define yywrap() 1
 
343
#define yywrap(n) 1
339
344
#define YY_SKIP_YYWRAP
340
345
 
341
346
typedef unsigned char YY_CHAR;
727
732
 
728
733
 
729
734
 
730
 
#line 731 "scanner.cc"
 
735
#line 736 "scanner.cc"
731
736
 
732
737
#define INITIAL 0
733
738
 
745
750
 
746
751
static int yy_init_globals (void );
747
752
 
 
753
/* Accessor methods to globals.
 
754
   These are made visible to non-reentrant scanners for convenience. */
 
755
 
 
756
int yylex_destroy (void );
 
757
 
 
758
int yyget_debug (void );
 
759
 
 
760
void yyset_debug (int debug_flag  );
 
761
 
 
762
YY_EXTRA_TYPE yyget_extra (void );
 
763
 
 
764
void yyset_extra (YY_EXTRA_TYPE user_defined  );
 
765
 
 
766
FILE *yyget_in (void );
 
767
 
 
768
void yyset_in  (FILE * in_str  );
 
769
 
 
770
FILE *yyget_out (void );
 
771
 
 
772
void yyset_out  (FILE * out_str  );
 
773
 
 
774
int yyget_leng (void );
 
775
 
 
776
char *yyget_text (void );
 
777
 
 
778
int yyget_lineno (void );
 
779
 
 
780
void yyset_lineno (int line_number  );
 
781
 
748
782
/* Macros after this point can all be overridden by user definitions in
749
783
 * section 1.
750
784
 */
779
813
 
780
814
/* Amount of stuff to slurp up with each read. */
781
815
#ifndef YY_READ_BUF_SIZE
 
816
#ifdef __ia64__
 
817
/* On IA-64, the buffer size is 16k, not 8k */
 
818
#define YY_READ_BUF_SIZE 16384
 
819
#else
782
820
#define YY_READ_BUF_SIZE 8192
 
821
#endif /* __ia64__ */
783
822
#endif
784
823
 
785
824
/* Copy whatever the last rule matched to the standard output. */
787
826
/* This used to be an fputs(), but since the string might contain NUL's,
788
827
 * we now use fwrite().
789
828
 */
790
 
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
 
829
#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
791
830
#endif
792
831
 
793
832
/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
884
923
 
885
924
 
886
925
 
887
 
#line 888 "scanner.cc"
 
926
#line 927 "scanner.cc"
888
927
 
889
928
        if ( !(yy_init) )
890
929
                {
1275
1314
#line 239 "scanner.ll"
1276
1315
ECHO;
1277
1316
        YY_BREAK
1278
 
#line 1279 "scanner.cc"
 
1317
#line 1318 "scanner.cc"
1279
1318
case YY_STATE_EOF(INITIAL):
1280
1319
        yyterminate();
1281
1320
 
1531
1570
        else
1532
1571
                ret_val = EOB_ACT_CONTINUE_SCAN;
1533
1572
 
 
1573
        if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
 
1574
                /* Extend the array by 50%, plus the number we really need. */
 
1575
                yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
 
1576
                YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
 
1577
                if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
 
1578
                        YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
 
1579
        }
 
1580
 
1534
1581
        (yy_n_chars) += number_to_move;
1535
1582
        YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1536
1583
        YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1942
1989
                (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1943
1990
                                                                (num_to_alloc * sizeof(struct yy_buffer_state*)
1944
1991
                                                                );
1945
 
                
 
1992
                if ( ! (yy_buffer_stack) )
 
1993
                        YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
 
1994
                                                                  
1946
1995
                memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1947
1996
                                
1948
1997
                (yy_buffer_stack_max) = num_to_alloc;
1960
2009
                                                                ((yy_buffer_stack),
1961
2010
                                                                num_to_alloc * sizeof(struct yy_buffer_state*)
1962
2011
                                                                );
 
2012
                if ( ! (yy_buffer_stack) )
 
2013
                        YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1963
2014
 
1964
2015
                /* zero only the new slots.*/
1965
2016
                memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2018
2069
 
2019
2070
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2020
2071
 * scan from a @e copy of @a bytes.
2021
 
 * @param bytes the byte buffer to scan
2022
 
 * @param len the number of bytes in the buffer pointed to by @a bytes.
 
2072
 * @param yybytes the byte buffer to scan
 
2073
 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2023
2074
 * 
2024
2075
 * @return the newly allocated buffer state object.
2025
2076
 */