Changeset 609 for branches/GNU/src/binutils/binutils/deflex.c
- Timestamp:
- Aug 16, 2003, 6:59:22 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/binutils/deflex.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 1 2 #line 3 "lex.yy.c" 3 4 #define YY_INT_ALIGNED short int 5 1 6 /* A lexical scanner generated by flex */ 2 3 /* Scanner skeleton version:4 * $Header: /cvs/src/src/binutils/Attic/deflex.c,v 1.1.4.2 2001/06/10 15:37:28 pb Exp $5 */6 7 7 8 #define FLEX_SCANNER 8 9 #define YY_FLEX_MAJOR_VERSION 2 9 10 #define YY_FLEX_MINOR_VERSION 5 10 11 #define YY_FLEX_SUBMINOR_VERSION 31 12 #if YY_FLEX_SUBMINOR_VERSION > 0 13 #define FLEX_BETA 14 #endif 15 16 /* First, we deal with platform-specific or compiler-specific issues. */ 17 18 /* begin standard C headers. */ 11 19 #include <stdio.h> 12 13 14 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ 15 #ifdef c_plusplus 16 #ifndef __cplusplus 17 #define __cplusplus 18 #endif 19 #endif 20 20 #include <string.h> 21 #include <errno.h> 22 #include <stdlib.h> 23 24 /* end standard C headers. */ 25 26 /* flex integer type definitions */ 27 28 #ifndef FLEXINT_H 29 #define FLEXINT_H 30 31 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ 32 33 #if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L 34 #include <inttypes.h> 35 typedef int8_t flex_int8_t; 36 typedef uint8_t flex_uint8_t; 37 typedef int16_t flex_int16_t; 38 typedef uint16_t flex_uint16_t; 39 typedef int32_t flex_int32_t; 40 typedef uint32_t flex_uint32_t; 41 #else 42 typedef signed char flex_int8_t; 43 typedef short int flex_int16_t; 44 typedef int flex_int32_t; 45 typedef unsigned char flex_uint8_t; 46 typedef unsigned short int flex_uint16_t; 47 typedef unsigned int flex_uint32_t; 48 #endif /* ! C99 */ 49 50 /* Limits of integral types. */ 51 #ifndef INT8_MIN 52 #define INT8_MIN (-128) 53 #endif 54 #ifndef INT16_MIN 55 #define INT16_MIN (-32767-1) 56 #endif 57 #ifndef INT32_MIN 58 #define INT32_MIN (-2147483647-1) 59 #endif 60 #ifndef INT8_MAX 61 #define INT8_MAX (127) 62 #endif 63 #ifndef INT16_MAX 64 #define INT16_MAX (32767) 65 #endif 66 #ifndef INT32_MAX 67 #define INT32_MAX (2147483647) 68 #endif 69 #ifndef UINT8_MAX 70 #define UINT8_MAX (255U) 71 #endif 72 #ifndef UINT16_MAX 73 #define UINT16_MAX (65535U) 74 #endif 75 #ifndef UINT32_MAX 76 #define UINT32_MAX (4294967295U) 77 #endif 78 79 #endif /* ! FLEXINT_H */ 21 80 22 81 #ifdef __cplusplus 23 24 #include <stdlib.h>25 #include <unistd.h>26 27 /* Use prototypes in function declarations. */28 #define YY_USE_PROTOS29 82 30 83 /* The "const" storage-class-modifier is valid. */ … … 35 88 #if __STDC__ 36 89 37 #define YY_USE_PROTOS38 90 #define YY_USE_CONST 39 91 40 92 #endif /* __STDC__ */ 41 93 #endif /* ! __cplusplus */ 42 43 #ifdef __TURBOC__44 #pragma warn -rch45 #pragma warn -use46 #include <io.h>47 #include <stdlib.h>48 #define YY_USE_CONST49 #define YY_USE_PROTOS50 #endif51 94 52 95 #ifdef YY_USE_CONST … … 56 99 #endif 57 100 58 59 #ifdef YY_USE_PROTOS60 #define YY_PROTO(proto) proto61 #else62 #define YY_PROTO(proto) ()63 #endif64 65 101 /* Returned upon end-of-file. */ 66 102 #define YY_NULL 0 … … 77 113 * definition of BEGIN. 78 114 */ 79 #define BEGIN yy_start= 1 + 2 *115 #define BEGIN (yy_start) = 1 + 2 * 80 116 81 117 /* Translate the current start state into a value that can be later handed … … 83 119 * compatibility. 84 120 */ 85 #define YY_START (( yy_start- 1) / 2)121 #define YY_START (((yy_start) - 1) / 2) 86 122 #define YYSTATE YY_START 87 123 … … 90 126 91 127 /* Special action meaning "start processing a new file". */ 92 #define YY_NEW_FILE yyrestart( yyin)128 #define YY_NEW_FILE yyrestart(yyin ) 93 129 94 130 #define YY_END_OF_BUFFER_CHAR 0 95 131 96 132 /* Size of default input buffer. */ 133 #ifndef YY_BUF_SIZE 97 134 #define YY_BUF_SIZE 16384 98 135 #endif 136 137 #ifndef YY_TYPEDEF_YY_BUFFER_STATE 138 #define YY_TYPEDEF_YY_BUFFER_STATE 99 139 typedef struct yy_buffer_state *YY_BUFFER_STATE; 140 #endif 100 141 101 142 extern int yyleng; 143 102 144 extern FILE *yyin, *yyout; 103 145 … … 106 148 #define EOB_ACT_LAST_MATCH 2 107 149 108 /* The funky do-while in the following #define is used to turn the definition 109 * int a single C statement (which needs a semi-colon terminator). This 110 * avoids problems with code like: 111 * 112 * if ( condition_holds ) 113 * yyless( 5 ); 114 * else 115 * do_something_else(); 116 * 117 * Prior to using the do-while the compiler would get upset at the 118 * "else" because it interpreted the "if" statement as being all 119 * done when it reached the ';' after the yyless() call. 120 */ 121 122 /* Return all but the first 'n' matched characters back to the input stream. */ 123 150 #define YY_LESS_LINENO(n) 151 152 /* Return all but the first "n" matched characters back to the input stream. */ 124 153 #define yyless(n) \ 125 154 do \ 126 155 { \ 127 156 /* Undo effects of setting up yytext. */ \ 128 *yy_cp = yy_hold_char; \ 157 int yyless_macro_arg = (n); \ 158 YY_LESS_LINENO(yyless_macro_arg);\ 159 *yy_cp = (yy_hold_char); \ 129 160 YY_RESTORE_YY_MORE_OFFSET \ 130 yy_c_buf_p = yy_cp = yy_bp + n- YY_MORE_ADJ; \161 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ 131 162 YY_DO_BEFORE_ACTION; /* set up yytext again */ \ 132 163 } \ 133 164 while ( 0 ) 134 165 135 #define unput(c) yyunput( c, yytext_ptr)166 #define unput(c) yyunput( c, (yytext_ptr) ) 136 167 137 168 /* The following is because we cannot portably get our hands on size_t … … 139 170 * flex-generated scanners to compile on their own). 140 171 */ 172 173 #ifndef YY_TYPEDEF_YY_SIZE_T 174 #define YY_TYPEDEF_YY_SIZE_T 141 175 typedef unsigned int yy_size_t; 142 143 176 #endif 177 178 #ifndef YY_STRUCT_YY_BUFFER_STATE 179 #define YY_STRUCT_YY_BUFFER_STATE 144 180 struct yy_buffer_state 145 181 { … … 178 214 int yy_at_bol; 179 215 216 int yy_bs_lineno; /**< The line count. */ 217 int yy_bs_column; /**< The column count. */ 218 180 219 /* Whether to try to fill the input buffer when we reach the 181 220 * end of it. … … 184 223 185 224 int yy_buffer_status; 225 186 226 #define YY_BUFFER_NEW 0 187 227 #define YY_BUFFER_NORMAL 1 … … 197 237 */ 198 238 #define YY_BUFFER_EOF_PENDING 2 239 199 240 }; 200 201 static YY_BUFFER_STATE yy_current_buffer = 0; 241 #endif /* !YY_STRUCT_YY_BUFFER_STATE */ 242 243 /* Stack of input buffers. */ 244 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ 245 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ 246 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ 202 247 203 248 /* We provide macros for accessing buffer states in case in the 204 249 * future we want to put the buffer states in a more general 205 250 * "scanner state". 206 */ 207 #define YY_CURRENT_BUFFER yy_current_buffer 208 251 * 252 * Returns the top of the stack, or NULL. 253 */ 254 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ 255 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ 256 : NULL) 257 258 /* Same as previous macro, but useful when we know that the buffer stack is not 259 * NULL or when we need an lvalue. For internal use only. 260 */ 261 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] 209 262 210 263 /* yy_hold_char holds the character lost when yytext is formed. */ 211 264 static char yy_hold_char; 212 213 265 static int yy_n_chars; /* number of characters read into yy_ch_buf */ 214 215 216 266 int yyleng; 217 267 … … 226 276 static int yy_did_buffer_switch_on_eof; 227 277 228 void yyrestart YY_PROTO(( FILE *input_file )); 229 230 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); 231 void yy_load_buffer_state YY_PROTO(( void )); 232 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); 233 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); 234 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); 235 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); 236 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) 237 238 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); 239 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); 240 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); 241 242 static void *yy_flex_alloc YY_PROTO(( yy_size_t )); 243 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); 244 static void yy_flex_free YY_PROTO(( void * )); 278 void yyrestart (FILE *input_file ); 279 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); 280 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); 281 void yy_delete_buffer (YY_BUFFER_STATE b ); 282 void yy_flush_buffer (YY_BUFFER_STATE b ); 283 void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); 284 void yypop_buffer_state (void ); 285 286 static void yyensure_buffer_stack (void ); 287 static void yy_load_buffer_state (void ); 288 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); 289 290 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) 291 292 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); 293 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); 294 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); 295 296 void *yyalloc (yy_size_t ); 297 void *yyrealloc (void *,yy_size_t ); 298 void yyfree (void * ); 245 299 246 300 #define yy_new_buffer yy_create_buffer … … 248 302 #define yy_set_interactive(is_interactive) \ 249 303 { \ 250 if ( ! yy_current_buffer ) \ 251 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 252 yy_current_buffer->yy_is_interactive = is_interactive; \ 304 if ( ! YY_CURRENT_BUFFER ){ \ 305 yyensure_buffer_stack (); \ 306 YY_CURRENT_BUFFER_LVALUE = \ 307 yy_create_buffer(yyin,YY_BUF_SIZE ); \ 308 } \ 309 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ 253 310 } 254 311 255 312 #define yy_set_bol(at_bol) \ 256 313 { \ 257 if ( ! yy_current_buffer ) \ 258 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 259 yy_current_buffer->yy_at_bol = at_bol; \ 314 if ( ! YY_CURRENT_BUFFER ){\ 315 yyensure_buffer_stack (); \ 316 YY_CURRENT_BUFFER_LVALUE = \ 317 yy_create_buffer(yyin,YY_BUF_SIZE ); \ 318 } \ 319 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ 260 320 } 261 321 262 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) 322 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) 323 324 /* Begin user sect3 */ 263 325 264 326 typedef unsigned char YY_CHAR; 327 265 328 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; 329 266 330 typedef int yy_state_type; 331 332 extern int yylineno; 333 334 int yylineno = 1; 335 267 336 extern char *yytext; 268 337 #define yytext_ptr yytext 269 338 270 static yy_state_type yy_get_previous_state YY_PROTO(( void ));271 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));272 static int yy_get_next_buffer YY_PROTO(( void ));273 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));339 static yy_state_type yy_get_previous_state (void ); 340 static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); 341 static int yy_get_next_buffer (void ); 342 static void yy_fatal_error (yyconst char msg[] ); 274 343 275 344 /* Done after the current pattern has been matched and before the … … 277 346 */ 278 347 #define YY_DO_BEFORE_ACTION \ 279 yytext_ptr= yy_bp; \280 yyleng = ( int) (yy_cp - yy_bp); \281 yy_hold_char= *yy_cp; \348 (yytext_ptr) = yy_bp; \ 349 yyleng = (size_t) (yy_cp - yy_bp); \ 350 (yy_hold_char) = *yy_cp; \ 282 351 *yy_cp = '\0'; \ 283 yy_c_buf_p= yy_cp;352 (yy_c_buf_p) = yy_cp; 284 353 285 354 #define YY_NUM_RULES 39 286 355 #define YY_END_OF_BUFFER 40 287 static yyconst short int yy_accept[189] = 356 /* This struct is not used in this scanner, 357 but its presence is necessary. */ 358 struct yy_trans_info 359 { 360 flex_int32_t yy_verify; 361 flex_int32_t yy_nxt; 362 }; 363 static yyconst flex_int16_t yy_accept[190] = 288 364 { 0, 289 365 0, 0, 40, 39, 33, 34, 32, 39, 27, 39, … … 295 371 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 296 372 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 297 27, 12, 6, 27, 7, 27, 27, 27, 27, 27,298 27, 27, 27, 1, 27, 27, 15, 27, 27, 27,373 27, 27, 12, 6, 27, 7, 27, 27, 27, 27, 374 27, 27, 27, 27, 1, 27, 27, 15, 27, 27, 299 375 300 376 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 301 377 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 302 27, 27, 27, 16, 27, 27, 27, 27, 27, 27,303 27, 27, 27, 27, 14, 27, 27, 18, 20, 27,304 27, 27, 27, 27, 27, 17, 9, 27, 10, 27,305 27, 2, 27, 27, 27, 27, 27, 27, 11, 13,306 27, 5, 27, 27, 21, 27, 8, 27, 27, 27,307 27, 27, 27, 19, 4, 27, 27, 27, 23, 27,308 2 5, 27, 3, 27, 27, 22, 24, 0378 27, 27, 27, 27, 16, 27, 27, 27, 27, 27, 379 27, 27, 27, 27, 27, 14, 27, 27, 18, 20, 380 27, 27, 27, 27, 27, 27, 17, 9, 27, 10, 381 27, 27, 2, 27, 27, 27, 27, 27, 27, 11, 382 13, 27, 5, 27, 27, 21, 27, 8, 27, 27, 383 27, 27, 27, 27, 19, 4, 27, 27, 27, 23, 384 27, 25, 27, 3, 27, 27, 22, 24, 0 309 385 } ; 310 386 311 static yyconst int yy_ec[256] =387 static yyconst flex_int32_t yy_ec[256] = 312 388 { 0, 313 389 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, … … 341 417 } ; 342 418 343 static yyconst int yy_meta[40] =419 static yyconst flex_int32_t yy_meta[40] = 344 420 { 0, 345 421 1, 1, 2, 1, 1, 3, 1, 1, 1, 1, 346 3, 4, 1, 1, 3, 4, 4, 4, 4, 4,347 4, 3, 3, 3, 3, 3, 3, 3, 3, 3,422 4, 5, 1, 1, 4, 6, 6, 6, 6, 6, 423 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 348 424 3, 3, 3, 3, 3, 3, 3, 3, 3 349 425 } ; 350 426 351 static yyconst short int yy_base[195] =427 static yyconst flex_int16_t yy_base[197] = 352 428 { 0, 353 0, 0, 2 09, 210, 210, 210, 210, 203, 0, 200,354 0, 2 10, 210, 0, 0, 210, 210, 190, 176, 24,355 1 67, 183, 14, 178, 167, 27, 180, 25, 179, 178,356 1 66, 191, 210, 0, 188, 210, 0, 0, 0, 162,357 27, 160, 160, 27, 175, 160, 165, 171, 161, 159,358 1 57, 168, 165, 166, 153, 164, 148, 147, 153, 156,359 1 55, 142, 157, 154, 153, 141, 139, 139, 134, 135,360 1 32, 144, 34, 144, 129, 130, 138, 141, 131, 125,361 1 23, 0, 0, 122, 0, 123, 119, 121, 119, 119,362 29, 133, 124, 0, 120, 123, 0, 121, 124, 117,363 364 1 17, 30, 117, 120, 123, 114, 104, 103, 111, 101,365 1 07, 104, 100, 100, 109, 112, 98, 107, 105, 92,366 97, 94, 92, 0, 92, 89, 98, 85, 77, 83,367 85, 81, 74, 85, 0, 79, 81, 0, 0, 84,368 78, 74, 77, 71, 70, 0, 0, 82, 0, 84,369 67, 0, 79, 78, 65, 57, 78, 61, 0, 0,370 69, 0, 76, 75, 0, 71, 0, 69, 72, 71,371 57, 59, 54, 0, 0, 52, 37, 36, 0, 45,372 0, 44, 0, 41, 40, 0, 0, 210, 66, 68,373 7 2, 76, 55, 80429 0, 0, 222, 223, 223, 223, 223, 216, 0, 213, 430 0, 223, 223, 0, 0, 223, 0, 203, 189, 24, 431 180, 196, 14, 191, 180, 27, 193, 25, 192, 191, 432 179, 204, 223, 0, 201, 223, 0, 0, 0, 0, 433 175, 27, 173, 173, 27, 188, 173, 178, 184, 174, 434 172, 170, 181, 178, 179, 166, 177, 161, 160, 166, 435 169, 168, 155, 170, 167, 166, 154, 152, 152, 147, 436 148, 145, 157, 34, 157, 142, 143, 151, 154, 144, 437 138, 136, 0, 0, 135, 0, 136, 132, 134, 132, 438 132, 29, 146, 137, 0, 133, 136, 0, 134, 137, 439 440 130, 130, 30, 130, 133, 136, 127, 117, 116, 124, 441 114, 120, 117, 113, 113, 122, 125, 111, 120, 118, 442 105, 110, 107, 105, 0, 105, 102, 111, 98, 90, 443 96, 98, 94, 87, 98, 0, 92, 94, 0, 0, 444 97, 91, 87, 90, 84, 83, 0, 0, 95, 0, 445 97, 80, 0, 92, 91, 78, 70, 91, 74, 0, 446 0, 82, 0, 89, 88, 0, 84, 0, 82, 85, 447 83, 69, 66, 56, 0, 0, 39, 36, 35, 0, 448 44, 0, 43, 0, 40, 39, 0, 0, 223, 66, 449 70, 76, 82, 84, 90, 94 374 450 375 451 } ; 376 452 377 static yyconst short int yy_def[195] =453 static yyconst flex_int16_t yy_def[197] = 378 454 { 0, 379 18 8, 1, 188, 188, 188, 188, 188, 189, 190, 191,380 19 2, 188, 188, 193, 194, 188, 188, 190, 190, 190,381 19 0, 190, 190, 190, 190, 190, 190, 190, 190, 190,382 19 0, 189, 188, 190, 191, 188, 192, 193, 194, 190,383 19 0, 190, 190, 190, 190, 190, 190, 190, 190, 190,384 19 0, 190, 190, 190, 190, 190, 190, 190, 190, 190,385 19 0, 190, 190, 190, 190, 190, 190, 190, 190, 190,386 19 0, 190, 190, 190, 190, 190, 190, 190, 190, 190,387 19 0, 190, 190, 190, 190, 190, 190, 190, 190, 190,388 19 0, 190, 190, 190, 190, 190, 190, 190, 190, 190,389 390 19 0, 190, 190, 190, 190, 190, 190, 190, 190, 190,391 19 0, 190, 190, 190, 190, 190, 190, 190, 190, 190,392 19 0, 190, 190, 190, 190, 190, 190, 190, 190, 190,393 19 0, 190, 190, 190, 190, 190, 190, 190, 190, 190,394 19 0, 190, 190, 190, 190, 190, 190, 190, 190, 190,395 19 0, 190, 190, 190, 190, 190, 190, 190, 190, 190,396 19 0, 190, 190, 190, 190, 190, 190, 190, 190, 190,397 19 0, 190, 190, 190, 190, 190, 190, 190, 190, 190,398 19 0, 190, 190, 190, 190, 190, 190, 0, 188, 188,399 18 8, 188, 188, 188455 189, 1, 189, 189, 189, 189, 189, 190, 191, 192, 456 193, 189, 189, 194, 195, 189, 196, 191, 191, 191, 457 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 458 191, 190, 189, 191, 192, 189, 193, 194, 195, 191, 459 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 460 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 461 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 462 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 463 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 464 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 465 466 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 467 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 468 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 469 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 470 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 471 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 472 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 473 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 474 191, 191, 191, 191, 191, 191, 191, 191, 0, 189, 475 189, 189, 189, 189, 189, 189 400 476 401 477 } ; 402 478 403 static yyconst short int yy_nxt[250] =479 static yyconst flex_int16_t yy_nxt[263] = 404 480 { 0, 405 481 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 406 482 4, 14, 15, 16, 17, 9, 18, 19, 20, 21, 407 483 9, 9, 22, 23, 9, 24, 25, 26, 9, 9, 408 27, 28, 29, 9, 30, 31, 9, 9, 9, 42, 409 46, 47, 50, 43, 53, 61, 65, 54, 55, 95, 410 111, 121, 112, 122, 62, 51, 66, 56, 38, 187, 411 186, 185, 184, 183, 182, 96, 32, 32, 32, 32, 412 34, 34, 35, 35, 35, 35, 37, 181, 37, 37, 413 39, 180, 39, 39, 179, 178, 177, 176, 175, 174, 414 173, 172, 171, 170, 169, 168, 167, 166, 165, 164, 415 416 163, 162, 161, 160, 159, 158, 157, 156, 155, 154, 417 153, 152, 151, 150, 149, 148, 147, 146, 145, 144, 418 143, 142, 141, 140, 139, 138, 137, 136, 135, 134, 419 133, 132, 131, 130, 129, 128, 127, 126, 125, 124, 420 123, 120, 119, 118, 117, 116, 115, 114, 113, 110, 421 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 422 99, 98, 97, 94, 93, 92, 91, 90, 89, 88, 423 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 424 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 425 67, 64, 63, 60, 36, 33, 59, 58, 57, 52, 426 427 49, 48, 45, 44, 41, 40, 36, 33, 188, 3, 428 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 429 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 430 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 431 188, 188, 188, 188, 188, 188, 188, 188, 188 484 27, 28, 29, 9, 30, 31, 9, 9, 9, 43, 485 47, 48, 51, 44, 54, 62, 66, 55, 56, 96, 486 112, 122, 113, 123, 63, 52, 67, 57, 188, 187, 487 186, 185, 184, 183, 182, 97, 32, 32, 32, 32, 488 32, 32, 34, 34, 34, 34, 35, 35, 35, 35, 489 35, 35, 37, 181, 37, 37, 37, 37, 38, 38, 490 39, 180, 39, 39, 39, 39, 40, 179, 178, 40, 491 492 177, 176, 175, 174, 173, 172, 171, 170, 169, 168, 493 167, 166, 165, 164, 163, 162, 161, 160, 159, 158, 494 157, 156, 155, 154, 153, 152, 151, 150, 149, 148, 495 147, 146, 145, 144, 143, 142, 141, 140, 139, 138, 496 137, 136, 135, 134, 133, 132, 131, 130, 129, 128, 497 127, 126, 125, 124, 121, 120, 119, 118, 117, 116, 498 115, 114, 111, 110, 109, 108, 107, 106, 105, 104, 499 103, 102, 101, 100, 99, 98, 95, 94, 93, 92, 500 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 501 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 502 503 71, 70, 69, 68, 65, 64, 61, 36, 33, 60, 504 59, 58, 53, 50, 49, 46, 45, 42, 41, 36, 505 33, 189, 3, 189, 189, 189, 189, 189, 189, 189, 506 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 507 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 508 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 509 189, 189 432 510 } ; 433 511 434 static yyconst short int yy_chk[250] =512 static yyconst flex_int16_t yy_chk[263] = 435 513 { 0, 436 514 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, … … 438 516 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 439 517 1, 1, 1, 1, 1, 1, 1, 1, 1, 20, 440 23, 23, 26, 20, 28, 41, 44, 28, 28, 73, 441 91, 102, 91, 102, 41, 26, 44, 28, 193, 185, 442 184, 182, 180, 178, 177, 73, 189, 189, 189, 189, 443 190, 190, 191, 191, 191, 191, 192, 176, 192, 192, 444 194, 173, 194, 194, 172, 171, 170, 169, 168, 166, 445 164, 163, 161, 158, 157, 156, 155, 154, 153, 151, 446 447 150, 148, 145, 144, 143, 142, 141, 140, 137, 136, 448 134, 133, 132, 131, 130, 129, 128, 127, 126, 125, 449 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 450 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 451 103, 101, 100, 99, 98, 96, 95, 93, 92, 90, 452 89, 88, 87, 86, 84, 81, 80, 79, 78, 77, 453 76, 75, 74, 72, 71, 70, 69, 68, 67, 66, 454 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 455 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 456 45, 43, 42, 40, 35, 32, 31, 30, 29, 27, 457 458 25, 24, 22, 21, 19, 18, 10, 8, 3, 188, 459 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 460 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 461 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 462 188, 188, 188, 188, 188, 188, 188, 188, 188 518 23, 23, 26, 20, 28, 42, 45, 28, 28, 74, 519 92, 103, 92, 103, 42, 26, 45, 28, 186, 185, 520 183, 181, 179, 178, 177, 74, 190, 190, 190, 190, 521 190, 190, 191, 191, 191, 191, 192, 192, 192, 192, 522 192, 192, 193, 174, 193, 193, 193, 193, 194, 194, 523 195, 173, 195, 195, 195, 195, 196, 172, 171, 196, 524 525 170, 169, 167, 165, 164, 162, 159, 158, 157, 156, 526 155, 154, 152, 151, 149, 146, 145, 144, 143, 142, 527 141, 138, 137, 135, 134, 133, 132, 131, 130, 129, 528 128, 127, 126, 124, 123, 122, 121, 120, 119, 118, 529 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 530 107, 106, 105, 104, 102, 101, 100, 99, 97, 96, 531 94, 93, 91, 90, 89, 88, 87, 85, 82, 81, 532 80, 79, 78, 77, 76, 75, 73, 72, 71, 70, 533 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 534 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 535 536 49, 48, 47, 46, 44, 43, 41, 35, 32, 31, 537 30, 29, 27, 25, 24, 22, 21, 19, 18, 10, 538 8, 3, 189, 189, 189, 189, 189, 189, 189, 189, 539 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 540 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 541 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 542 189, 189 463 543 } ; 464 544 465 545 static yy_state_type yy_last_accepting_state; 466 546 static char *yy_last_accepting_cpos; 547 548 extern int yy_flex_debug; 549 int yy_flex_debug = 0; 467 550 468 551 /* The intent behind this definition is that it'll catch … … 475 558 char *yytext; 476 559 #line 1 "deflex.l" 477 #define INITIAL 0478 560 #line 2 "deflex.l" 479 561 480 /* Copyright 1995, 1997, 1998, 1999 Free Software Foundation, Inc.562 /* Copyright 1995, 1997, 1998, 1999, 2002 Free Software Foundation, Inc. 481 563 482 564 This file is part of GNU Binutils. … … 508 590 int linenumber; 509 591 510 #line 511 "lex.yy.c" 592 #line 593 "lex.yy.c" 593 594 #define INITIAL 0 595 596 /* Special case for "unistd.h", since it is non-ANSI. We include it way 597 * down here because we want the user's section 1 to have been scanned first. 598 * The user has a chance to override it with an option. 599 */ 600 #include <unistd.h> 601 602 #ifndef YY_EXTRA_TYPE 603 #define YY_EXTRA_TYPE void * 604 #endif 511 605 512 606 /* Macros after this point can all be overridden by user definitions in … … 516 610 #ifndef YY_SKIP_YYWRAP 517 611 #ifdef __cplusplus 518 extern "C" int yywrap YY_PROTO(( void ));612 extern "C" int yywrap (void ); 519 613 #else 520 extern int yywrap YY_PROTO(( void )); 521 #endif 522 #endif 523 524 #ifndef YY_NO_UNPUT 525 static void yyunput YY_PROTO(( int c, char *buf_ptr )); 526 #endif 527 614 extern int yywrap (void ); 615 #endif 616 #endif 617 618 static void yyunput (int c,char *buf_ptr ); 619 528 620 #ifndef yytext_ptr 529 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));621 static void yy_flex_strncpy (char *,yyconst char *,int ); 530 622 #endif 531 623 532 624 #ifdef YY_NEED_STRLEN 533 static int yy_flex_strlen YY_PROTO(( yyconst char * ));625 static int yy_flex_strlen (yyconst char * ); 534 626 #endif 535 627 536 628 #ifndef YY_NO_INPUT 629 537 630 #ifdef __cplusplus 538 static int yyinput YY_PROTO(( void ));631 static int yyinput (void ); 539 632 #else 540 static int input YY_PROTO(( void )); 541 #endif 542 #endif 543 544 #if YY_STACK_USED 545 static int yy_start_stack_ptr = 0; 546 static int yy_start_stack_depth = 0; 547 static int *yy_start_stack = 0; 548 #ifndef YY_NO_PUSH_STATE 549 static void yy_push_state YY_PROTO(( int new_state )); 550 #endif 551 #ifndef YY_NO_POP_STATE 552 static void yy_pop_state YY_PROTO(( void )); 553 #endif 554 #ifndef YY_NO_TOP_STATE 555 static int yy_top_state YY_PROTO(( void )); 556 #endif 557 558 #else 559 #define YY_NO_PUSH_STATE 1 560 #define YY_NO_POP_STATE 1 561 #define YY_NO_TOP_STATE 1 562 #endif 563 564 #ifdef YY_MALLOC_DECL 565 YY_MALLOC_DECL 566 #else 567 #if __STDC__ 568 #ifndef __cplusplus 569 #include <stdlib.h> 570 #endif 571 #else 572 /* Just try to get by without declaring the routines. This will fail 573 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) 574 * or sizeof(void*) != sizeof(int). 575 */ 576 #endif 633 static int input (void ); 634 #endif 635 577 636 #endif 578 637 … … 583 642 584 643 /* Copy whatever the last rule matched to the standard output. */ 585 586 644 #ifndef ECHO 587 645 /* This used to be an fputs(), but since the string might contain NUL's, … … 596 654 #ifndef YY_INPUT 597 655 #define YY_INPUT(buf,result,max_size) \ 598 if ( yy_current_buffer->yy_is_interactive ) \656 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ 599 657 { \ 600 int c = '*', n; \ 658 int c = '*'; \ 659 size_t n; \ 601 660 for ( n = 0; n < max_size && \ 602 661 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ … … 608 667 result = n; \ 609 668 } \ 610 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ 611 && ferror( yyin ) ) \ 612 YY_FATAL_ERROR( "input in flex scanner failed" ); 669 else \ 670 { \ 671 errno=0; \ 672 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ 673 { \ 674 if( errno != EINTR) \ 675 { \ 676 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 677 break; \ 678 } \ 679 errno=0; \ 680 clearerr(yyin); \ 681 } \ 682 }\ 683 \ 684 613 685 #endif 614 686 … … 631 703 #endif 632 704 705 /* end tables serialization structures and prototypes */ 706 633 707 /* Default declaration of generated scanner - a define so the user can 634 708 * easily add parameters. 635 709 */ 636 710 #ifndef YY_DECL 637 #define YY_DECL int yylex YY_PROTO(( void )) 638 #endif 711 #define YY_DECL_IS_OURS 1 712 713 extern int yylex (void); 714 715 #define YY_DECL int yylex (void) 716 #endif /* !YY_DECL */ 639 717 640 718 /* Code executed at the beginning of each rule, after yytext and yyleng … … 653 731 YY_USER_ACTION 654 732 733 /** The main scanner function which does all the work. 734 */ 655 735 YY_DECL 656 736 { 657 737 register yy_state_type yy_current_state; 658 738 register char *yy_cp, *yy_bp; 659 739 register int yy_act; 660 740 661 741 #line 34 "deflex.l" 662 742 663 #line 664 "lex.yy.c"664 665 if ( yy_init)743 #line 744 "lex.yy.c" 744 745 if ( (yy_init) ) 666 746 { 667 yy_init= 0;747 (yy_init) = 0; 668 748 669 749 #ifdef YY_USER_INIT … … 671 751 #endif 672 752 673 if ( ! yy_start)674 yy_start= 1; /* first start state */753 if ( ! (yy_start) ) 754 (yy_start) = 1; /* first start state */ 675 755 676 756 if ( ! yyin ) … … 680 760 yyout = stdout; 681 761 682 if ( ! yy_current_buffer ) 683 yy_current_buffer = 684 yy_create_buffer( yyin, YY_BUF_SIZE ); 685 686 yy_load_buffer_state(); 762 if ( ! YY_CURRENT_BUFFER ) { 763 yyensure_buffer_stack (); 764 YY_CURRENT_BUFFER_LVALUE = 765 yy_create_buffer(yyin,YY_BUF_SIZE ); 766 } 767 768 yy_load_buffer_state( ); 687 769 } 688 770 689 771 while ( 1 ) /* loops until end-of-file is reached */ 690 772 { 691 yy_cp = yy_c_buf_p;773 yy_cp = (yy_c_buf_p); 692 774 693 775 /* Support of yytext. */ 694 *yy_cp = yy_hold_char;776 *yy_cp = (yy_hold_char); 695 777 696 778 /* yy_bp points to the position in yy_ch_buf of the start of … … 699 781 yy_bp = yy_cp; 700 782 701 yy_current_state = yy_start;783 yy_current_state = (yy_start); 702 784 yy_match: 703 785 do … … 706 788 if ( yy_accept[yy_current_state] ) 707 789 { 708 yy_last_accepting_state= yy_current_state;709 yy_last_accepting_cpos= yy_cp;790 (yy_last_accepting_state) = yy_current_state; 791 (yy_last_accepting_cpos) = yy_cp; 710 792 } 711 793 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 712 794 { 713 795 yy_current_state = (int) yy_def[yy_current_state]; 714 if ( yy_current_state >= 1 89)796 if ( yy_current_state >= 190 ) 715 797 yy_c = yy_meta[(unsigned int) yy_c]; 716 798 } … … 718 800 ++yy_cp; 719 801 } 720 while ( yy_base[yy_current_state] != 2 10);802 while ( yy_base[yy_current_state] != 223 ); 721 803 722 804 yy_find_action: … … 724 806 if ( yy_act == 0 ) 725 807 { /* have to back up */ 726 yy_cp = yy_last_accepting_cpos;727 yy_current_state = yy_last_accepting_state;808 yy_cp = (yy_last_accepting_cpos); 809 yy_current_state = (yy_last_accepting_state); 728 810 yy_act = yy_accept[yy_current_state]; 729 811 } … … 731 813 YY_DO_BEFORE_ACTION; 732 814 733 734 815 do_action: /* This label is used only to access EOF actions. */ 735 736 816 737 817 switch ( yy_act ) … … 739 819 case 0: /* must back up */ 740 820 /* undo the effects of YY_DO_BEFORE_ACTION */ 741 *yy_cp = yy_hold_char;742 yy_cp = yy_last_accepting_cpos;743 yy_current_state = yy_last_accepting_state;821 *yy_cp = (yy_hold_char); 822 yy_cp = (yy_last_accepting_cpos); 823 yy_current_state = (yy_last_accepting_state); 744 824 goto yy_find_action; 745 825 … … 884 964 YY_BREAK 885 965 case 28: 966 /* rule 28 can match eol */ 886 967 YY_RULE_SETUP 887 968 #line 69 "deflex.l" … … 893 974 YY_BREAK 894 975 case 29: 976 /* rule 29 can match eol */ 895 977 YY_RULE_SETUP 896 978 #line 75 "deflex.l" … … 922 1004 YY_BREAK 923 1005 case 34: 1006 /* rule 34 can match eol */ 924 1007 YY_RULE_SETUP 925 1008 #line 84 "deflex.l" … … 951 1034 ECHO; 952 1035 YY_BREAK 953 #line 954"lex.yy.c"1036 #line 1037 "lex.yy.c" 954 1037 case YY_STATE_EOF(INITIAL): 955 1038 yyterminate(); … … 958 1041 { 959 1042 /* Amount of text matched not including the EOB char. */ 960 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;1043 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; 961 1044 962 1045 /* Undo the effects of YY_DO_BEFORE_ACTION. */ 963 *yy_cp = yy_hold_char;1046 *yy_cp = (yy_hold_char); 964 1047 YY_RESTORE_YY_MORE_OFFSET 965 1048 966 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )1049 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) 967 1050 { 968 1051 /* We're scanning a new file or input source. It's … … 970 1053 * just pointed yyin at a new source and called 971 1054 * yylex(). If so, then we have to assure 972 * consistency between yy_current_bufferand our1055 * consistency between YY_CURRENT_BUFFER and our 973 1056 * globals. Here is the right place to do so, because 974 1057 * this is the first action (other than possibly a 975 1058 * back-up) that will match for the new input source. 976 1059 */ 977 yy_n_chars = yy_current_buffer->yy_n_chars;978 yy_current_buffer->yy_input_file = yyin;979 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;1060 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 1061 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; 1062 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; 980 1063 } 981 1064 … … 987 1070 * in input(). 988 1071 */ 989 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )1072 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) 990 1073 { /* This was really a NUL. */ 991 1074 yy_state_type yy_next_state; 992 1075 993 yy_c_buf_p = yytext_ptr+ yy_amount_of_matched_text;994 995 yy_current_state = yy_get_previous_state( );1076 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; 1077 1078 yy_current_state = yy_get_previous_state( ); 996 1079 997 1080 /* Okay, we're now positioned to make the NUL … … 1006 1089 yy_next_state = yy_try_NUL_trans( yy_current_state ); 1007 1090 1008 yy_bp = yytext_ptr+ YY_MORE_ADJ;1091 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 1009 1092 1010 1093 if ( yy_next_state ) 1011 1094 { 1012 1095 /* Consume the NUL. */ 1013 yy_cp = ++ yy_c_buf_p;1096 yy_cp = ++(yy_c_buf_p); 1014 1097 yy_current_state = yy_next_state; 1015 1098 goto yy_match; … … 1018 1101 else 1019 1102 { 1020 yy_cp = yy_c_buf_p;1103 yy_cp = (yy_c_buf_p); 1021 1104 goto yy_find_action; 1022 1105 } 1023 1106 } 1024 1107 1025 else switch ( yy_get_next_buffer( ) )1108 else switch ( yy_get_next_buffer( ) ) 1026 1109 { 1027 1110 case EOB_ACT_END_OF_FILE: 1028 1111 { 1029 yy_did_buffer_switch_on_eof= 0;1030 1031 if ( yywrap( ) )1112 (yy_did_buffer_switch_on_eof) = 0; 1113 1114 if ( yywrap( ) ) 1032 1115 { 1033 1116 /* Note: because we've taken care in … … 1040 1123 * YY_NULL will get returned. 1041 1124 */ 1042 yy_c_buf_p = yytext_ptr+ YY_MORE_ADJ;1125 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; 1043 1126 1044 1127 yy_act = YY_STATE_EOF(YY_START); … … 1048 1131 else 1049 1132 { 1050 if ( ! yy_did_buffer_switch_on_eof)1133 if ( ! (yy_did_buffer_switch_on_eof) ) 1051 1134 YY_NEW_FILE; 1052 1135 } … … 1055 1138 1056 1139 case EOB_ACT_CONTINUE_SCAN: 1057 yy_c_buf_p=1058 yytext_ptr+ yy_amount_of_matched_text;1059 1060 yy_current_state = yy_get_previous_state( );1061 1062 yy_cp = yy_c_buf_p;1063 yy_bp = yytext_ptr+ YY_MORE_ADJ;1140 (yy_c_buf_p) = 1141 (yytext_ptr) + yy_amount_of_matched_text; 1142 1143 yy_current_state = yy_get_previous_state( ); 1144 1145 yy_cp = (yy_c_buf_p); 1146 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 1064 1147 goto yy_match; 1065 1148 1066 1149 case EOB_ACT_LAST_MATCH: 1067 yy_c_buf_p=1068 & yy_current_buffer->yy_ch_buf[yy_n_chars];1069 1070 yy_current_state = yy_get_previous_state( );1071 1072 yy_cp = yy_c_buf_p;1073 yy_bp = yytext_ptr+ YY_MORE_ADJ;1150 (yy_c_buf_p) = 1151 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; 1152 1153 yy_current_state = yy_get_previous_state( ); 1154 1155 yy_cp = (yy_c_buf_p); 1156 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 1074 1157 goto yy_find_action; 1075 1158 } … … 1082 1165 } /* end of action switch */ 1083 1166 } /* end of scanning one token */ 1084 } /* end of yylex */ 1085 1167 } /* end of yylex */ 1086 1168 1087 1169 /* yy_get_next_buffer - try to read in a new buffer … … 1092 1174 * EOB_ACT_END_OF_FILE - end of file 1093 1175 */ 1094 1095 static int yy_get_next_buffer() 1096 { 1097 register char *dest = yy_current_buffer->yy_ch_buf; 1098 register char *source = yytext_ptr; 1176 static int yy_get_next_buffer (void) 1177 { 1178 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; 1179 register char *source = (yytext_ptr); 1099 1180 register int number_to_move, i; 1100 1181 int ret_val; 1101 1182 1102 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars+ 1] )1183 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) 1103 1184 YY_FATAL_ERROR( 1104 1185 "fatal flex scanner internal error--end of buffer missed" ); 1105 1186 1106 if ( yy_current_buffer->yy_fill_buffer == 0 )1187 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) 1107 1188 { /* Don't try to fill the buffer, so this is an EOF. */ 1108 if ( yy_c_buf_p - yytext_ptr- YY_MORE_ADJ == 1 )1189 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) 1109 1190 { 1110 1191 /* We matched a single character, the EOB, so … … 1126 1207 1127 1208 /* First move last chars to start of buffer. */ 1128 number_to_move = (int) ( yy_c_buf_p - yytext_ptr) - 1;1209 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; 1129 1210 1130 1211 for ( i = 0; i < number_to_move; ++i ) 1131 1212 *(dest++) = *(source++); 1132 1213 1133 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )1214 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 1134 1215 /* don't do the read, it's not guaranteed to return an EOF, 1135 1216 * just force an EOF 1136 1217 */ 1137 yy_current_buffer->yy_n_chars = yy_n_chars= 0;1218 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; 1138 1219 1139 1220 else 1140 1221 { 1141 int num_to_read =1142 yy_current_buffer->yy_buf_size - number_to_move - 1;1222 size_t num_to_read = 1223 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; 1143 1224 1144 1225 while ( num_to_read <= 0 ) 1145 1226 { /* Not enough room in the buffer - grow it. */ 1146 #ifdef YY_USES_REJECT1147 YY_FATAL_ERROR(1148 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );1149 #else1150 1227 1151 1228 /* just a shorter name for the current buffer */ 1152 YY_BUFFER_STATE b = yy_current_buffer;1229 YY_BUFFER_STATE b = YY_CURRENT_BUFFER; 1153 1230 1154 1231 int yy_c_buf_p_offset = 1155 (int) ( yy_c_buf_p- b->yy_ch_buf);1232 (int) ((yy_c_buf_p) - b->yy_ch_buf); 1156 1233 1157 1234 if ( b->yy_is_our_buffer ) … … 1166 1243 b->yy_ch_buf = (char *) 1167 1244 /* Include room in for 2 EOB chars. */ 1168 yy_flex_realloc( (void *) b->yy_ch_buf, 1169 b->yy_buf_size + 2 ); 1245 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); 1170 1246 } 1171 1247 else … … 1177 1253 "fatal error - scanner input buffer overflow" ); 1178 1254 1179 yy_c_buf_p= &b->yy_ch_buf[yy_c_buf_p_offset];1180 1181 num_to_read = yy_current_buffer->yy_buf_size -1255 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; 1256 1257 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - 1182 1258 number_to_move - 1; 1183 #endif 1259 1184 1260 } 1185 1261 … … 1188 1264 1189 1265 /* Read in more data. */ 1190 YY_INPUT( (& yy_current_buffer->yy_ch_buf[number_to_move]),1191 yy_n_chars, num_to_read );1192 1193 yy_current_buffer->yy_n_chars = yy_n_chars;1266 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), 1267 (yy_n_chars), num_to_read ); 1268 1269 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 1194 1270 } 1195 1271 1196 if ( yy_n_chars== 0 )1272 if ( (yy_n_chars) == 0 ) 1197 1273 { 1198 1274 if ( number_to_move == YY_MORE_ADJ ) 1199 1275 { 1200 1276 ret_val = EOB_ACT_END_OF_FILE; 1201 yyrestart( yyin);1277 yyrestart(yyin ); 1202 1278 } 1203 1279 … … 1205 1281 { 1206 1282 ret_val = EOB_ACT_LAST_MATCH; 1207 yy_current_buffer->yy_buffer_status =1283 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = 1208 1284 YY_BUFFER_EOF_PENDING; 1209 1285 } … … 1213 1289 ret_val = EOB_ACT_CONTINUE_SCAN; 1214 1290 1215 yy_n_chars+= number_to_move;1216 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;1217 yy_current_buffer->yy_ch_buf[yy_n_chars+ 1] = YY_END_OF_BUFFER_CHAR;1218 1219 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];1291 (yy_n_chars) += number_to_move; 1292 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; 1293 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; 1294 1295 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; 1220 1296 1221 1297 return ret_val; 1222 } 1223 1298 } 1224 1299 1225 1300 /* yy_get_previous_state - get the state just before the EOB char was reached */ 1226 1301 1227 static yy_state_type yy_get_previous_state()1228 1302 static yy_state_type yy_get_previous_state (void) 1303 { 1229 1304 register yy_state_type yy_current_state; 1230 1305 register char *yy_cp; 1231 1232 yy_current_state = yy_start;1233 1234 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )1306 1307 yy_current_state = (yy_start); 1308 1309 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) 1235 1310 { 1236 1311 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); 1237 1312 if ( yy_accept[yy_current_state] ) 1238 1313 { 1239 yy_last_accepting_state= yy_current_state;1240 yy_last_accepting_cpos= yy_cp;1314 (yy_last_accepting_state) = yy_current_state; 1315 (yy_last_accepting_cpos) = yy_cp; 1241 1316 } 1242 1317 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 1243 1318 { 1244 1319 yy_current_state = (int) yy_def[yy_current_state]; 1245 if ( yy_current_state >= 1 89)1320 if ( yy_current_state >= 190 ) 1246 1321 yy_c = yy_meta[(unsigned int) yy_c]; 1247 1322 } … … 1250 1325 1251 1326 return yy_current_state; 1252 } 1253 1327 } 1254 1328 1255 1329 /* yy_try_NUL_trans - try to make a transition on the NUL character … … 1258 1332 * next_state = yy_try_NUL_trans( current_state ); 1259 1333 */ 1260 1261 #ifdef YY_USE_PROTOS 1262 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) 1263 #else 1264 static yy_state_type yy_try_NUL_trans( yy_current_state ) 1265 yy_state_type yy_current_state; 1266 #endif 1267 { 1334 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) 1335 { 1268 1336 register int yy_is_jam; 1269 register char *yy_cp = yy_c_buf_p;1337 register char *yy_cp = (yy_c_buf_p); 1270 1338 1271 1339 register YY_CHAR yy_c = 1; 1272 1340 if ( yy_accept[yy_current_state] ) 1273 1341 { 1274 yy_last_accepting_state= yy_current_state;1275 yy_last_accepting_cpos= yy_cp;1342 (yy_last_accepting_state) = yy_current_state; 1343 (yy_last_accepting_cpos) = yy_cp; 1276 1344 } 1277 1345 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 1278 1346 { 1279 1347 yy_current_state = (int) yy_def[yy_current_state]; 1280 if ( yy_current_state >= 1 89)1348 if ( yy_current_state >= 190 ) 1281 1349 yy_c = yy_meta[(unsigned int) yy_c]; 1282 1350 } 1283 1351 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 1284 yy_is_jam = (yy_current_state == 18 8);1352 yy_is_jam = (yy_current_state == 189); 1285 1353 1286 1354 return yy_is_jam ? 0 : yy_current_state; 1287 } 1288 1289 1290 #ifndef YY_NO_UNPUT 1291 #ifdef YY_USE_PROTOS 1292 static void yyunput( int c, register char *yy_bp ) 1293 #else 1294 static void yyunput( c, yy_bp ) 1295 int c; 1296 register char *yy_bp; 1297 #endif 1298 { 1299 register char *yy_cp = yy_c_buf_p; 1355 } 1356 1357 static void yyunput (int c, register char * yy_bp ) 1358 { 1359 register char *yy_cp; 1360 1361 yy_cp = (yy_c_buf_p); 1300 1362 1301 1363 /* undo effects of setting up yytext */ 1302 *yy_cp = yy_hold_char;1303 1304 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )1364 *yy_cp = (yy_hold_char); 1365 1366 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) 1305 1367 { /* need to shift things up to make room */ 1306 1368 /* +2 for EOB chars. */ 1307 register int number_to_move = yy_n_chars+ 2;1308 register char *dest = & yy_current_buffer->yy_ch_buf[1309 yy_current_buffer->yy_buf_size + 2];1369 register int number_to_move = (yy_n_chars) + 2; 1370 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ 1371 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; 1310 1372 register char *source = 1311 & yy_current_buffer->yy_ch_buf[number_to_move];1312 1313 while ( source > yy_current_buffer->yy_ch_buf )1373 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; 1374 1375 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) 1314 1376 *--dest = *--source; 1315 1377 1316 1378 yy_cp += (int) (dest - source); 1317 1379 yy_bp += (int) (dest - source); 1318 yy_current_buffer->yy_n_chars =1319 yy_n_chars = yy_current_buffer->yy_buf_size;1320 1321 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )1380 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = 1381 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; 1382 1383 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) 1322 1384 YY_FATAL_ERROR( "flex scanner push-back overflow" ); 1323 1385 } … … 1325 1387 *--yy_cp = (char) c; 1326 1388 1327 1328 yytext_ptr = yy_bp; 1329 yy_hold_char = *yy_cp; 1330 yy_c_buf_p = yy_cp; 1331 } 1332 #endif /* ifndef YY_NO_UNPUT */ 1333 1334 1389 (yytext_ptr) = yy_bp; 1390 (yy_hold_char) = *yy_cp; 1391 (yy_c_buf_p) = yy_cp; 1392 } 1393 1394 #ifndef YY_NO_INPUT 1335 1395 #ifdef __cplusplus 1336 static int yyinput()1396 static int yyinput (void) 1337 1397 #else 1338 static int input() 1339 #endif 1340 { 1398 static int input (void) 1399 #endif 1400 1401 { 1341 1402 int c; 1342 1343 * yy_c_buf_p = yy_hold_char;1344 1345 if ( * yy_c_buf_p== YY_END_OF_BUFFER_CHAR )1403 1404 *(yy_c_buf_p) = (yy_hold_char); 1405 1406 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) 1346 1407 { 1347 1408 /* yy_c_buf_p now points to the character we want to return. … … 1349 1410 * valid NUL; if not, then we've hit the end of the buffer. 1350 1411 */ 1351 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )1412 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) 1352 1413 /* This was really a NUL. */ 1353 * yy_c_buf_p= '\0';1414 *(yy_c_buf_p) = '\0'; 1354 1415 1355 1416 else 1356 1417 { /* need more input */ 1357 int offset = yy_c_buf_p - yytext_ptr;1358 ++ yy_c_buf_p;1359 1360 switch ( yy_get_next_buffer( ) )1418 int offset = (yy_c_buf_p) - (yytext_ptr); 1419 ++(yy_c_buf_p); 1420 1421 switch ( yy_get_next_buffer( ) ) 1361 1422 { 1362 1423 case EOB_ACT_LAST_MATCH: … … 1372 1433 1373 1434 /* Reset buffer status. */ 1374 yyrestart( 1375 1376 /* fall through*/1435 yyrestart(yyin ); 1436 1437 /*FALLTHROUGH*/ 1377 1438 1378 1439 case EOB_ACT_END_OF_FILE: 1379 1440 { 1380 if ( yywrap( ) )1441 if ( yywrap( ) ) 1381 1442 return EOF; 1382 1443 1383 if ( ! yy_did_buffer_switch_on_eof)1444 if ( ! (yy_did_buffer_switch_on_eof) ) 1384 1445 YY_NEW_FILE; 1385 1446 #ifdef __cplusplus … … 1391 1452 1392 1453 case EOB_ACT_CONTINUE_SCAN: 1393 yy_c_buf_p = yytext_ptr+ offset;1454 (yy_c_buf_p) = (yytext_ptr) + offset; 1394 1455 break; 1395 1456 } … … 1397 1458 } 1398 1459 1399 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ 1400 *yy_c_buf_p = '\0'; /* preserve yytext */ 1401 yy_hold_char = *++yy_c_buf_p; 1402 1460 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ 1461 *(yy_c_buf_p) = '\0'; /* preserve yytext */ 1462 (yy_hold_char) = *++(yy_c_buf_p); 1403 1463 1404 1464 return c; 1465 } 1466 #endif /* ifndef YY_NO_INPUT */ 1467 1468 /** Immediately switch to a different input stream. 1469 * @param input_file A readable stream. 1470 * 1471 * @note This function does not reset the start condition to @c INITIAL . 1472 */ 1473 void yyrestart (FILE * input_file ) 1474 { 1475 1476 if ( ! YY_CURRENT_BUFFER ){ 1477 yyensure_buffer_stack (); 1478 YY_CURRENT_BUFFER_LVALUE = 1479 yy_create_buffer(yyin,YY_BUF_SIZE ); 1405 1480 } 1406 1481 1407 1408 #ifdef YY_USE_PROTOS 1409 void yyrestart( FILE *input_file ) 1410 #else 1411 void yyrestart( input_file ) 1412 FILE *input_file; 1413 #endif 1414 { 1415 if ( ! yy_current_buffer ) 1416 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); 1417 1418 yy_init_buffer( yy_current_buffer, input_file ); 1419 yy_load_buffer_state(); 1420 } 1421 1422 1423 #ifdef YY_USE_PROTOS 1424 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) 1425 #else 1426 void yy_switch_to_buffer( new_buffer ) 1427 YY_BUFFER_STATE new_buffer; 1428 #endif 1429 { 1430 if ( yy_current_buffer == new_buffer ) 1482 yy_init_buffer(YY_CURRENT_BUFFER,input_file ); 1483 yy_load_buffer_state( ); 1484 } 1485 1486 /** Switch to a different input buffer. 1487 * @param new_buffer The new input buffer. 1488 * 1489 */ 1490 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) 1491 { 1492 1493 /* TODO. We should be able to replace this entire function body 1494 * with 1495 * yypop_buffer_state(); 1496 * yypush_buffer_state(new_buffer); 1497 */ 1498 yyensure_buffer_stack (); 1499 if ( YY_CURRENT_BUFFER == new_buffer ) 1431 1500 return; 1432 1501 1433 if ( yy_current_buffer)1502 if ( YY_CURRENT_BUFFER ) 1434 1503 { 1435 1504 /* Flush out information for old buffer. */ 1436 * yy_c_buf_p = yy_hold_char;1437 yy_current_buffer->yy_buf_pos = yy_c_buf_p;1438 yy_current_buffer->yy_n_chars = yy_n_chars;1505 *(yy_c_buf_p) = (yy_hold_char); 1506 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 1507 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 1439 1508 } 1440 1509 1441 yy_current_buffer= new_buffer;1442 yy_load_buffer_state( );1510 YY_CURRENT_BUFFER_LVALUE = new_buffer; 1511 yy_load_buffer_state( ); 1443 1512 1444 1513 /* We don't actually know whether we did this switch during … … 1447 1516 * to go ahead and always set it. 1448 1517 */ 1449 yy_did_buffer_switch_on_eof = 1; 1450 } 1451 1452 1453 #ifdef YY_USE_PROTOS 1454 void yy_load_buffer_state( void ) 1455 #else 1456 void yy_load_buffer_state() 1457 #endif 1458 { 1459 yy_n_chars = yy_current_buffer->yy_n_chars; 1460 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; 1461 yyin = yy_current_buffer->yy_input_file; 1462 yy_hold_char = *yy_c_buf_p; 1463 } 1464 1465 1466 #ifdef YY_USE_PROTOS 1467 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) 1468 #else 1469 YY_BUFFER_STATE yy_create_buffer( file, size ) 1470 FILE *file; 1471 int size; 1472 #endif 1473 { 1518 (yy_did_buffer_switch_on_eof) = 1; 1519 } 1520 1521 static void yy_load_buffer_state (void) 1522 { 1523 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 1524 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; 1525 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; 1526 (yy_hold_char) = *(yy_c_buf_p); 1527 } 1528 1529 /** Allocate and initialize an input buffer state. 1530 * @param file A readable stream. 1531 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. 1532 * 1533 * @return the allocated buffer state. 1534 */ 1535 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) 1536 { 1474 1537 YY_BUFFER_STATE b; 1475 1476 b = (YY_BUFFER_STATE) yy _flex_alloc( sizeof( struct yy_buffer_state ));1538 1539 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); 1477 1540 if ( ! b ) 1478 1541 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); … … 1483 1546 * we need to put in 2 end-of-buffer characters. 1484 1547 */ 1485 b->yy_ch_buf = (char *) yy _flex_alloc( b->yy_buf_size + 2);1548 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); 1486 1549 if ( ! b->yy_ch_buf ) 1487 1550 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); … … 1489 1552 b->yy_is_our_buffer = 1; 1490 1553 1491 yy_init_buffer( b,file );1554 yy_init_buffer(b,file ); 1492 1555 1493 1556 return b; 1494 } 1495 1496 1497 #ifdef YY_USE_PROTOS 1498 void yy_delete_buffer( YY_BUFFER_STATE b ) 1499 #else 1500 void yy_delete_buffer( b ) 1501 YY_BUFFER_STATE b; 1502 #endif 1503 { 1557 } 1558 1559 /** Destroy the buffer. 1560 * @param b a buffer created with yy_create_buffer() 1561 * 1562 */ 1563 void yy_delete_buffer (YY_BUFFER_STATE b ) 1564 { 1565 1504 1566 if ( ! b ) 1505 1567 return; 1506 1568 1507 if ( b == yy_current_buffer )1508 yy_current_buffer= (YY_BUFFER_STATE) 0;1569 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ 1570 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; 1509 1571 1510 1572 if ( b->yy_is_our_buffer ) 1511 yy_flex_free( (void *) b->yy_ch_buf ); 1512 1513 yy_flex_free( (void *) b ); 1514 } 1515 1516 1517 #ifndef YY_ALWAYS_INTERACTIVE 1518 #ifndef YY_NEVER_INTERACTIVE 1519 extern int isatty YY_PROTO(( int )); 1520 #endif 1521 #endif 1522 1523 #ifdef YY_USE_PROTOS 1524 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) 1525 #else 1526 void yy_init_buffer( b, file ) 1527 YY_BUFFER_STATE b; 1528 FILE *file; 1529 #endif 1530 1531 1532 { 1533 yy_flush_buffer( b ); 1573 yyfree((void *) b->yy_ch_buf ); 1574 1575 yyfree((void *) b ); 1576 } 1577 1578 #ifndef __cplusplus 1579 extern int isatty (int ); 1580 #endif /* __cplusplus */ 1581 1582 /* Initializes or reinitializes a buffer. 1583 * This function is sometimes called more than once on the same buffer, 1584 * such as during a yyrestart() or at EOF. 1585 */ 1586 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) 1587 1588 { 1589 int oerrno = errno; 1590 1591 yy_flush_buffer(b ); 1534 1592 1535 1593 b->yy_input_file = file; 1536 1594 b->yy_fill_buffer = 1; 1537 1595 1538 #if YY_ALWAYS_INTERACTIVE 1539 b->yy_is_interactive = 1; 1540 #else 1541 #if YY_NEVER_INTERACTIVE 1542 b->yy_is_interactive = 0; 1543 #else 1544 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) :0;1545 #endif 1546 #endif 1547 } 1548 1549 1550 #ifdef YY_USE_PROTOS 1551 void yy_flush_buffer( YY_BUFFER_STATE b ) 1552 #else 1553 void yy_flush_buffer( b ) 1554 YY_BUFFER_STATE b; 1555 #endif 1556 1557 1558 if ( ! b )1596 /* If b is the current buffer, then yy_init_buffer was _probably_ 1597 * called from yyrestart() or through yy_get_next_buffer. 1598 * In that case, we don't want to reset the lineno or column. 1599 */ 1600 if (b != YY_CURRENT_BUFFER){ 1601 b->yy_bs_lineno = 1; 1602 b->yy_bs_column = 0; 1603 } 1604 1605 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 1606 1607 errno = oerrno; 1608 } 1609 1610 /** Discard all buffered characters. On the next scan, YY_INPUT will be called. 1611 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. 1612 * 1613 */ 1614 void yy_flush_buffer (YY_BUFFER_STATE b ) 1615 { 1616 if ( ! b ) 1559 1617 return; 1560 1618 … … 1573 1631 b->yy_buffer_status = YY_BUFFER_NEW; 1574 1632 1575 if ( b == yy_current_buffer ) 1576 yy_load_buffer_state(); 1633 if ( b == YY_CURRENT_BUFFER ) 1634 yy_load_buffer_state( ); 1635 } 1636 1637 /** Pushes the new state onto the stack. The new state becomes 1638 * the current state. This function will allocate the stack 1639 * if necessary. 1640 * @param new_buffer The new state. 1641 * 1642 */ 1643 void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) 1644 { 1645 if (new_buffer == NULL) 1646 return; 1647 1648 yyensure_buffer_stack(); 1649 1650 /* This block is copied from yy_switch_to_buffer. */ 1651 if ( YY_CURRENT_BUFFER ) 1652 { 1653 /* Flush out information for old buffer. */ 1654 *(yy_c_buf_p) = (yy_hold_char); 1655 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 1656 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 1657 } 1658 1659 /* Only push if top exists. Otherwise, replace top. */ 1660 if (YY_CURRENT_BUFFER) 1661 (yy_buffer_stack_top)++; 1662 YY_CURRENT_BUFFER_LVALUE = new_buffer; 1663 1664 /* copied from yy_switch_to_buffer. */ 1665 yy_load_buffer_state( ); 1666 (yy_did_buffer_switch_on_eof) = 1; 1667 } 1668 1669 /** Removes and deletes the top of the stack, if present. 1670 * The next element becomes the new top. 1671 * 1672 */ 1673 void yypop_buffer_state (void) 1674 { 1675 if (!YY_CURRENT_BUFFER) 1676 return; 1677 1678 yy_delete_buffer(YY_CURRENT_BUFFER ); 1679 YY_CURRENT_BUFFER_LVALUE = NULL; 1680 if ((yy_buffer_stack_top) > 0) 1681 --(yy_buffer_stack_top); 1682 1683 if (YY_CURRENT_BUFFER) { 1684 yy_load_buffer_state( ); 1685 (yy_did_buffer_switch_on_eof) = 1; 1577 1686 } 1578 1579 1580 #ifndef YY_NO_SCAN_BUFFER 1581 #ifdef YY_USE_PROTOS 1582 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) 1583 #else 1584 YY_BUFFER_STATE yy_scan_buffer( base, size ) 1585 char *base; 1586 yy_size_t size; 1587 #endif 1588 { 1687 } 1688 1689 /* Allocates the stack if it does not exist. 1690 * Guarantees space for at least one push. 1691 */ 1692 static void yyensure_buffer_stack (void) 1693 { 1694 int num_to_alloc; 1695 1696 if (!(yy_buffer_stack)) { 1697 1698 /* First allocation is just for 2 elements, since we don't know if this 1699 * scanner will even need a stack. We use 2 instead of 1 to avoid an 1700 * immediate realloc on the next call. 1701 */ 1702 num_to_alloc = 1; 1703 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc 1704 (num_to_alloc * sizeof(struct yy_buffer_state*) 1705 ); 1706 1707 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); 1708 1709 (yy_buffer_stack_max) = num_to_alloc; 1710 (yy_buffer_stack_top) = 0; 1711 return; 1712 } 1713 1714 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ 1715 1716 /* Increase the buffer to prepare for a possible push. */ 1717 int grow_size = 8 /* arbitrary grow size */; 1718 1719 num_to_alloc = (yy_buffer_stack_max) + grow_size; 1720 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc 1721 ((yy_buffer_stack), 1722 num_to_alloc * sizeof(struct yy_buffer_state*) 1723 ); 1724 1725 /* zero only the new slots.*/ 1726 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); 1727 (yy_buffer_stack_max) = num_to_alloc; 1728 } 1729 } 1730 1731 /** Setup the input buffer state to scan directly from a user-specified character buffer. 1732 * @param base the character buffer 1733 * @param size the size in bytes of the character buffer 1734 * 1735 * @return the newly allocated buffer state object. 1736 */ 1737 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) 1738 { 1589 1739 YY_BUFFER_STATE b; 1590 1740 1591 1741 if ( size < 2 || 1592 1742 base[size-2] != YY_END_OF_BUFFER_CHAR || … … 1595 1745 return 0; 1596 1746 1597 b = (YY_BUFFER_STATE) yy _flex_alloc( sizeof( struct yy_buffer_state ));1747 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); 1598 1748 if ( ! b ) 1599 1749 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); … … 1609 1759 b->yy_buffer_status = YY_BUFFER_NEW; 1610 1760 1611 yy_switch_to_buffer( b);1761 yy_switch_to_buffer(b ); 1612 1762 1613 1763 return b; 1614 } 1615 #endif 1616 1617 1618 #ifndef YY_NO_SCAN_STRING 1619 #ifdef YY_USE_PROTOS 1620 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) 1621 #else 1622 YY_BUFFER_STATE yy_scan_string( yy_str ) 1623 yyconst char *yy_str; 1624 #endif 1625 { 1626 int len; 1627 for ( len = 0; yy_str[len]; ++len ) 1628 ; 1629 1630 return yy_scan_bytes( yy_str, len ); 1631 } 1632 #endif 1633 1634 1635 #ifndef YY_NO_SCAN_BYTES 1636 #ifdef YY_USE_PROTOS 1637 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) 1638 #else 1639 YY_BUFFER_STATE yy_scan_bytes( bytes, len ) 1640 yyconst char *bytes; 1641 int len; 1642 #endif 1643 { 1764 } 1765 1766 /** Setup the input buffer state to scan a string. The next call to yylex() will 1767 * scan from a @e copy of @a str. 1768 * @param str a NUL-terminated string to scan 1769 * 1770 * @return the newly allocated buffer state object. 1771 * @note If you want to scan bytes that may contain NUL values, then use 1772 * yy_scan_bytes() instead. 1773 */ 1774 YY_BUFFER_STATE yy_scan_string (yyconst char * str ) 1775 { 1776 1777 return yy_scan_bytes(str,strlen(str) ); 1778 } 1779 1780 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will 1781 * scan from a @e copy of @a bytes. 1782 * @param bytes the byte buffer to scan 1783 * @param len the number of bytes in the buffer pointed to by @a bytes. 1784 * 1785 * @return the newly allocated buffer state object. 1786 */ 1787 YY_BUFFER_STATE yy_scan_bytes (yyconst char * bytes, int len ) 1788 { 1644 1789 YY_BUFFER_STATE b; 1645 1790 char *buf; 1646 1791 yy_size_t n; 1647 1792 int i; 1648 1793 1649 1794 /* Get memory for full buffer, including space for trailing EOB's. */ 1650 1795 n = len + 2; 1651 buf = (char *) yy _flex_alloc( n);1796 buf = (char *) yyalloc(n ); 1652 1797 if ( ! buf ) 1653 1798 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); … … 1658 1803 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; 1659 1804 1660 b = yy_scan_buffer( buf,n );1805 b = yy_scan_buffer(buf,n ); 1661 1806 if ( ! b ) 1662 1807 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); … … 1668 1813 1669 1814 return b; 1670 } 1671 #endif 1672 1673 1674 #ifndef YY_NO_PUSH_STATE 1675 #ifdef YY_USE_PROTOS 1676 static void yy_push_state( int new_state ) 1677 #else 1678 static void yy_push_state( new_state ) 1679 int new_state; 1680 #endif 1681 { 1682 if ( yy_start_stack_ptr >= yy_start_stack_depth ) 1683 { 1684 yy_size_t new_size; 1685 1686 yy_start_stack_depth += YY_START_STACK_INCR; 1687 new_size = yy_start_stack_depth * sizeof( int ); 1688 1689 if ( ! yy_start_stack ) 1690 yy_start_stack = (int *) yy_flex_alloc( new_size ); 1691 1692 else 1693 yy_start_stack = (int *) yy_flex_realloc( 1694 (void *) yy_start_stack, new_size ); 1695 1696 if ( ! yy_start_stack ) 1697 YY_FATAL_ERROR( 1698 "out of memory expanding start-condition stack" ); 1699 } 1700 1701 yy_start_stack[yy_start_stack_ptr++] = YY_START; 1702 1703 BEGIN(new_state); 1704 } 1705 #endif 1706 1707 1708 #ifndef YY_NO_POP_STATE 1709 static void yy_pop_state() 1710 { 1711 if ( --yy_start_stack_ptr < 0 ) 1712 YY_FATAL_ERROR( "start-condition stack underflow" ); 1713 1714 BEGIN(yy_start_stack[yy_start_stack_ptr]); 1715 } 1716 #endif 1717 1718 1719 #ifndef YY_NO_TOP_STATE 1720 static int yy_top_state() 1721 { 1722 return yy_start_stack[yy_start_stack_ptr - 1]; 1723 } 1724 #endif 1815 } 1725 1816 1726 1817 #ifndef YY_EXIT_FAILURE … … 1728 1819 #endif 1729 1820 1730 #ifdef YY_USE_PROTOS 1731 static void yy_fatal_error( yyconst char msg[] ) 1732 #else 1733 static void yy_fatal_error( msg ) 1734 char msg[]; 1735 #endif 1736 { 1737 (void) fprintf( stderr, "%s\n", msg ); 1821 static void yy_fatal_error (yyconst char* msg ) 1822 { 1823 (void) fprintf( stderr, "%s\n", msg ); 1738 1824 exit( YY_EXIT_FAILURE ); 1739 } 1740 1741 1825 } 1742 1826 1743 1827 /* Redefine yyless() so it works in section 3 code. */ … … 1748 1832 { \ 1749 1833 /* Undo effects of setting up yytext. */ \ 1750 yytext[yyleng] = yy_hold_char; \ 1751 yy_c_buf_p = yytext + n; \ 1752 yy_hold_char = *yy_c_buf_p; \ 1753 *yy_c_buf_p = '\0'; \ 1754 yyleng = n; \ 1834 int yyless_macro_arg = (n); \ 1835 YY_LESS_LINENO(yyless_macro_arg);\ 1836 yytext[yyleng] = (yy_hold_char); \ 1837 (yy_c_buf_p) = yytext + yyless_macro_arg; \ 1838 (yy_hold_char) = *(yy_c_buf_p); \ 1839 *(yy_c_buf_p) = '\0'; \ 1840 yyleng = yyless_macro_arg; \ 1755 1841 } \ 1756 1842 while ( 0 ) 1757 1843 1758 1759 /* Internal utility routines. */ 1844 /* Accessor methods (get/set functions) to struct members. */ 1845 1846 /** Get the current line number. 1847 * 1848 */ 1849 int yyget_lineno (void) 1850 { 1851 1852 return yylineno; 1853 } 1854 1855 /** Get the input stream. 1856 * 1857 */ 1858 FILE *yyget_in (void) 1859 { 1860 return yyin; 1861 } 1862 1863 /** Get the output stream. 1864 * 1865 */ 1866 FILE *yyget_out (void) 1867 { 1868 return yyout; 1869 } 1870 1871 /** Get the length of the current token. 1872 * 1873 */ 1874 int yyget_leng (void) 1875 { 1876 return yyleng; 1877 } 1878 1879 /** Get the current token. 1880 * 1881 */ 1882 1883 char *yyget_text (void) 1884 { 1885 return yytext; 1886 } 1887 1888 /** Set the current line number. 1889 * @param line_number 1890 * 1891 */ 1892 void yyset_lineno (int line_number ) 1893 { 1894 1895 yylineno = line_number; 1896 } 1897 1898 /** Set the input stream. This does not discard the current 1899 * input buffer. 1900 * @param in_str A readable stream. 1901 * 1902 * @see yy_switch_to_buffer 1903 */ 1904 void yyset_in (FILE * in_str ) 1905 { 1906 yyin = in_str ; 1907 } 1908 1909 void yyset_out (FILE * out_str ) 1910 { 1911 yyout = out_str ; 1912 } 1913 1914 int yyget_debug (void) 1915 { 1916 return yy_flex_debug; 1917 } 1918 1919 void yyset_debug (int bdebug ) 1920 { 1921 yy_flex_debug = bdebug ; 1922 } 1923 1924 /* yylex_destroy is for both reentrant and non-reentrant scanners. */ 1925 int yylex_destroy (void) 1926 { 1927 1928 /* Pop the buffer stack, destroying each element. */ 1929 while(YY_CURRENT_BUFFER){ 1930 yy_delete_buffer(YY_CURRENT_BUFFER ); 1931 YY_CURRENT_BUFFER_LVALUE = NULL; 1932 yypop_buffer_state(); 1933 } 1934 1935 /* Destroy the stack itself. */ 1936 yyfree((yy_buffer_stack) ); 1937 (yy_buffer_stack) = NULL; 1938 1939 return 0; 1940 } 1941 1942 /* 1943 * Internal utility routines. 1944 */ 1760 1945 1761 1946 #ifndef yytext_ptr 1762 #ifdef YY_USE_PROTOS 1763 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) 1764 #else 1765 static void yy_flex_strncpy( s1, s2, n ) 1766 char *s1; 1767 yyconst char *s2; 1768 int n; 1769 #endif 1770 { 1947 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) 1948 { 1771 1949 register int i; 1772 for ( i = 0; i < n; ++i )1950 for ( i = 0; i < n; ++i ) 1773 1951 s1[i] = s2[i]; 1774 1952 } 1775 1953 #endif 1776 1954 1777 1955 #ifdef YY_NEED_STRLEN 1778 #ifdef YY_USE_PROTOS 1779 static int yy_flex_strlen( yyconst char *s ) 1780 #else 1781 static int yy_flex_strlen( s ) 1782 yyconst char *s; 1783 #endif 1784 { 1956 static int yy_flex_strlen (yyconst char * s ) 1957 { 1785 1958 register int n; 1786 for ( n = 0; s[n]; ++n )1959 for ( n = 0; s[n]; ++n ) 1787 1960 ; 1788 1961 1789 1962 return n; 1790 } 1791 #endif 1792 1793 1794 #ifdef YY_USE_PROTOS 1795 static void *yy_flex_alloc( yy_size_t size ) 1796 #else 1797 static void *yy_flex_alloc( size ) 1798 yy_size_t size; 1799 #endif 1800 { 1963 } 1964 #endif 1965 1966 void *yyalloc (yy_size_t size ) 1967 { 1801 1968 return (void *) malloc( size ); 1802 } 1803 1804 #ifdef YY_USE_PROTOS 1805 static void *yy_flex_realloc( void *ptr, yy_size_t size ) 1806 #else 1807 static void *yy_flex_realloc( ptr, size ) 1808 void *ptr; 1809 yy_size_t size; 1810 #endif 1811 { 1969 } 1970 1971 void *yyrealloc (void * ptr, yy_size_t size ) 1972 { 1812 1973 /* The cast to (char *) in the following accommodates both 1813 1974 * implementations that use char* generic pointers, and those … … 1818 1979 */ 1819 1980 return (void *) realloc( (char *) ptr, size ); 1820 } 1821 1822 #ifdef YY_USE_PROTOS 1823 static void yy_flex_free( void *ptr ) 1824 #else 1825 static void yy_flex_free( ptr ) 1826 void *ptr; 1827 #endif 1828 { 1829 free( ptr ); 1830 } 1831 1832 #if YY_MAIN 1833 int main() 1834 { 1835 yylex(); 1836 return 0; 1837 } 1981 } 1982 1983 void yyfree (void * ptr ) 1984 { 1985 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ 1986 } 1987 1988 #define YYTABLES_NAME "yytables" 1989 1990 #undef YY_NEW_FILE 1991 #undef YY_FLUSH_BUFFER 1992 #undef yy_set_bol 1993 #undef yy_new_buffer 1994 #undef yy_set_interactive 1995 #undef yytext_ptr 1996 #undef YY_DO_BEFORE_ACTION 1997 1998 #ifdef YY_DECL_IS_OURS 1999 #undef YY_DECL_IS_OURS 2000 #undef YY_DECL 1838 2001 #endif 1839 2002 #line 89 "deflex.l" 2003 1840 2004 1841 2005 #ifndef yywrap … … 1843 2007 int yywrap() { return 1; } 1844 2008 #endif 2009 -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.