1 #define yy_create_buffer kdeprint_foomatic2_create_buffer 2 #define yy_delete_buffer kdeprint_foomatic2_delete_buffer 3 #define yy_scan_buffer kdeprint_foomatic2_scan_buffer 4 #define yy_scan_string kdeprint_foomatic2_scan_string 5 #define yy_scan_bytes kdeprint_foomatic2_scan_bytes 6 #define yy_flex_debug kdeprint_foomatic2_flex_debug 7 #define yy_init_buffer kdeprint_foomatic2_init_buffer 8 #define yy_flush_buffer kdeprint_foomatic2_flush_buffer 9 #define yy_load_buffer_state kdeprint_foomatic2_load_buffer_state 10 #define yy_switch_to_buffer kdeprint_foomatic2_switch_to_buffer 11 #define yyin kdeprint_foomatic2in 12 #define yyleng kdeprint_foomatic2leng 13 #define yylex kdeprint_foomatic2lex 14 #define yyout kdeprint_foomatic2out 15 #define yyrestart kdeprint_foomatic2restart 16 #define yytext kdeprint_foomatic2text 18 #line 19 "./fooscanner.cpp" 26 #define YY_FLEX_MAJOR_VERSION 2 27 #define YY_FLEX_MINOR_VERSION 5 78 #define YY_PROTO(proto) proto 80 #define YY_PROTO(proto) () 91 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) 97 #define BEGIN yy_start = 1 + 2 * 103 #define YY_START ((yy_start - 1) / 2) 104 #define YYSTATE YY_START 107 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) 110 #define YY_NEW_FILE yyrestart( yyin ) 112 #define YY_END_OF_BUFFER_CHAR 0 115 #define YY_BUF_SIZE 16384 117 typedef struct yy_buffer_state *YY_BUFFER_STATE;
120 extern FILE *yyin, *yyout;
122 #define EOB_ACT_CONTINUE_SCAN 0 123 #define EOB_ACT_END_OF_FILE 1 124 #define EOB_ACT_LAST_MATCH 2 146 *yy_cp = yy_hold_char; \ 147 YY_RESTORE_YY_MORE_OFFSET \ 148 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ 149 YY_DO_BEFORE_ACTION; \ 153 #define unput(c) yyunput( c, yytext_ptr ) 159 typedef unsigned int yy_size_t;
162 struct yy_buffer_state
172 yy_size_t yy_buf_size;
183 int yy_is_our_buffer;
190 int yy_is_interactive;
203 int yy_buffer_status;
204 #define YY_BUFFER_NEW 0 205 #define YY_BUFFER_NORMAL 1 216 #define YY_BUFFER_EOF_PENDING 2 219 static YY_BUFFER_STATE yy_current_buffer = 0;
225 #define YY_CURRENT_BUFFER yy_current_buffer 229 static char yy_hold_char;
231 static int yy_n_chars;
237 static char *yy_c_buf_p = (
char *) 0;
238 static int yy_init = 1;
239 static int yy_start = 0;
244 static int yy_did_buffer_switch_on_eof;
246 void yyrestart YY_PROTO(( FILE *input_file ));
248 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
249 void yy_load_buffer_state YY_PROTO((
void ));
250 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file,
int size ));
251 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
252 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
253 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
254 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) 256 YY_BUFFER_STATE yy_scan_buffer YY_PROTO((
char *base, yy_size_t size ));
257 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst
char *yy_str ));
258 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst
char *bytes,
int len ));
260 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
261 static void *yy_flex_realloc YY_PROTO((
void *, yy_size_t ));
262 static void yy_flex_free YY_PROTO((
void * ));
264 #define yy_new_buffer yy_create_buffer 266 #define yy_set_interactive(is_interactive) \ 268 if ( ! yy_current_buffer ) \ 269 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 270 yy_current_buffer->yy_is_interactive = is_interactive; \ 273 #define yy_set_bol(at_bol) \ 275 if ( ! yy_current_buffer ) \ 276 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 277 yy_current_buffer->yy_at_bol = at_bol; \ 280 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) 284 #define YY_SKIP_YYWRAP 285 typedef unsigned char YY_CHAR;
286 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
287 typedef int yy_state_type;
289 #define yytext_ptr yytext 291 static yy_state_type yy_get_previous_state YY_PROTO((
void ));
292 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
293 static int yy_get_next_buffer YY_PROTO((
void ));
294 static void yy_fatal_error YY_PROTO(( yyconst
char msg[] ));
299 #define YY_DO_BEFORE_ACTION \ 300 yytext_ptr = yy_bp; \ 301 yyleng = (int) (yy_cp - yy_bp); \ 302 yy_hold_char = *yy_cp; \ 306 #define YY_NUM_RULES 21 307 #define YY_END_OF_BUFFER 22 308 static yyconst
short int yy_accept[55] =
310 0, 0, 22, 20, 19, 20, 5, 20, 8, 20,
311 16, 13, 6, 7, 11, 12, 20, 9, 10, 20,
312 0, 15, 5, 0, 14, 0, 16, 0, 0, 0,
313 0, 14, 17, 0, 0, 0, 0, 0, 0, 0,
314 0, 18, 4, 2, 0, 0, 0, 0, 0, 0,
318 static yyconst
int yy_ec[256] =
320 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
321 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
322 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
323 1, 1, 1, 3, 4, 5, 1, 1, 6, 1,
324 1, 1, 1, 7, 8, 9, 1, 10, 11, 10,
325 10, 10, 10, 10, 10, 10, 10, 1, 12, 1,
326 13, 14, 1, 1, 15, 1, 1, 1, 16, 1,
327 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
328 1, 17, 1, 1, 1, 18, 1, 1, 1, 1,
329 19, 20, 21, 1, 1, 1, 1, 1, 1, 22,
331 23, 24, 1, 1, 25, 1, 1, 1, 1, 26,
332 27, 28, 1, 1, 29, 30, 31, 1, 1, 1,
333 1, 1, 32, 1, 33, 1, 1, 1, 1, 1,
334 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
335 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
336 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
337 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
338 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
339 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
340 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
342 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
343 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
344 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
345 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
346 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
350 static yyconst
int yy_meta[34] =
352 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
353 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
354 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
358 static yyconst
short int yy_base[59] =
360 0, 88, 92, 94, 94, 88, 0, 28, 94, 25,
361 28, 94, 94, 94, 94, 94, 64, 94, 94, 22,
362 86, 94, 0, 35, 94, 36, 34, 36, 66, 72,
363 59, 43, 41, 62, 67, 54, 50, 58, 70, 50,
364 43, 55, 94, 71, 50, 63, 51, 73, 46, 71,
365 94, 39, 94, 94, 66, 58, 68, 70
368 static yyconst
short int yy_def[59] =
370 54, 1, 54, 54, 54, 55, 56, 57, 54, 54,
371 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
372 55, 54, 56, 57, 54, 57, 54, 54, 54, 54,
373 54, 57, 54, 54, 54, 54, 54, 54, 54, 54,
374 54, 54, 54, 54, 54, 54, 54, 58, 54, 58,
375 54, 54, 54, 0, 54, 54, 54, 54
378 static yyconst
short int yy_nxt[128] =
380 4, 5, 6, 7, 4, 8, 9, 10, 4, 11,
381 11, 12, 13, 14, 4, 4, 4, 4, 15, 4,
382 16, 4, 4, 4, 4, 4, 4, 4, 4, 4,
383 17, 18, 19, 25, 27, 27, 28, 27, 27, 30,
384 25, 32, 28, 27, 27, 33, 33, 26, 25, 31,
385 33, 33, 42, 42, 26, 26, 37, 41, 23, 42,
386 42, 53, 26, 37, 42, 42, 21, 21, 24, 24,
387 50, 50, 51, 52, 51, 49, 48, 47, 46, 45,
388 44, 43, 40, 39, 38, 36, 35, 34, 22, 29,
389 22, 54, 20, 3, 54, 54, 54, 54, 54, 54,
391 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
392 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
393 54, 54, 54, 54, 54, 54, 54
396 static yyconst
short int yy_chk[128] =
398 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
399 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
400 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
401 1, 1, 1, 8, 10, 10, 11, 11, 11, 20,
402 24, 26, 27, 27, 27, 28, 28, 8, 32, 20,
403 33, 33, 41, 41, 24, 26, 33, 37, 56, 37,
404 37, 52, 32, 33, 42, 42, 55, 55, 57, 57,
405 58, 58, 50, 49, 48, 47, 46, 45, 44, 40,
406 39, 38, 36, 35, 34, 31, 30, 29, 21, 17,
407 6, 3, 2, 54, 54, 54, 54, 54, 54, 54,
409 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
410 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
411 54, 54, 54, 54, 54, 54, 54
414 static yy_state_type yy_last_accepting_state;
415 static char *yy_last_accepting_cpos;
420 #define REJECT reject_used_but_not_detected 421 #define yymore() yymore_used_but_not_detected 422 #define YY_MORE_ADJ 0 423 #define YY_RESTORE_YY_MORE_OFFSET 425 #line 1 "./fooscanner.l" 427 #line 2 "./fooscanner.l" 447 #include <tqvariant.h> 448 #include <tqiodevice.h> 449 #define YYSTYPE QVariant 450 #include "fooparser.cpp.h" 452 #define yylval kdeprint_foomatic2lval 454 #define YY_INPUT( buf, result, max_size ) \ 456 if ( kdeprint_foomatic2scanner_device ) \ 458 result = kdeprint_foomatic2scanner_device->readBlock( buf, max_size ); \ 466 TQIODevice* kdeprint_foomatic2scanner_device = NULL;
467 #line 468 "./fooscanner.cpp" 473 #ifndef YY_SKIP_YYWRAP 475 extern "C" int yywrap YY_PROTO((
void ));
477 extern int yywrap YY_PROTO((
void ));
482 static void yyunput YY_PROTO((
int c,
char *buf_ptr ));
486 static void yy_flex_strncpy YY_PROTO((
char *, yyconst
char *,
int ));
489 #ifdef YY_NEED_STRLEN 490 static int yy_flex_strlen YY_PROTO(( yyconst
char * ));
495 static int yyinput YY_PROTO((
void ));
497 static int input YY_PROTO((
void ));
502 static int yy_start_stack_ptr = 0;
503 static int yy_start_stack_depth = 0;
504 static int *yy_start_stack = 0;
505 #ifndef YY_NO_PUSH_STATE 506 static void yy_push_state YY_PROTO((
int new_state ));
508 #ifndef YY_NO_POP_STATE 509 static void yy_pop_state YY_PROTO((
void ));
511 #ifndef YY_NO_TOP_STATE 512 static int yy_top_state YY_PROTO((
void ));
516 #define YY_NO_PUSH_STATE 1 517 #define YY_NO_POP_STATE 1 518 #define YY_NO_TOP_STATE 1 521 #ifdef YY_MALLOC_DECL 537 #ifndef YY_READ_BUF_SIZE 538 #define YY_READ_BUF_SIZE 8192 547 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) 554 #define YY_INPUT(buf,result,max_size) \ 555 if ( yy_current_buffer->yy_is_interactive ) \ 558 for ( n = 0; n < max_size && \ 559 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ 562 buf[n++] = (char) c; \ 563 if ( c == EOF && ferror( yyin ) ) \ 564 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 567 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ 568 && ferror( yyin ) ) \ 569 YY_FATAL_ERROR( "input in flex scanner failed" ); 577 #define yyterminate() return YY_NULL 581 #ifndef YY_START_STACK_INCR 582 #define YY_START_STACK_INCR 25 586 #ifndef YY_FATAL_ERROR 587 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) 594 #define YY_DECL int yylex YY_PROTO(( void )) 600 #ifndef YY_USER_ACTION 601 #define YY_USER_ACTION 606 #define YY_BREAK break; 609 #define YY_RULE_SETUP \ 611 yy_current_buffer->yy_at_bol = \ 612 (yytext[yyleng - 1] == '\n'); \ 617 yy_state_type yy_current_state;
621 #line 47 "./fooscanner.l" 624 #line 625 "./fooscanner.cpp" 643 if ( ! yy_current_buffer )
645 yy_create_buffer( yyin, YY_BUF_SIZE );
647 yy_load_buffer_state();
655 *yy_cp = yy_hold_char;
662 yy_current_state = yy_start;
663 yy_current_state += YY_AT_BOL();
667 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
668 if ( yy_accept[yy_current_state] )
670 yy_last_accepting_state = yy_current_state;
671 yy_last_accepting_cpos = yy_cp;
673 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
675 yy_current_state = (int) yy_def[yy_current_state];
676 if ( yy_current_state >= 55 )
677 yy_c = yy_meta[(
unsigned int) yy_c];
679 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
682 while ( yy_base[yy_current_state] != 94 );
685 yy_act = yy_accept[yy_current_state];
688 yy_cp = yy_last_accepting_cpos;
689 yy_current_state = yy_last_accepting_state;
690 yy_act = yy_accept[yy_current_state];
703 *yy_cp = yy_hold_char;
704 yy_cp = yy_last_accepting_cpos;
705 yy_current_state = yy_last_accepting_state;
709 *yy_cp = yy_hold_char;
710 yy_c_buf_p = yy_cp -= 1;
713 #line 49 "./fooscanner.l" 718 #line 50 "./fooscanner.l" 723 #line 51 "./fooscanner.l" 728 #line 52 "./fooscanner.l" 733 #line 53 "./fooscanner.l" 738 #line 55 "./fooscanner.l" 743 #line 56 "./fooscanner.l" 748 #line 57 "./fooscanner.l" 753 #line 58 "./fooscanner.l" 758 #line 59 "./fooscanner.l" 763 #line 60 "./fooscanner.l" 768 #line 61 "./fooscanner.l" 773 #line 62 "./fooscanner.l" 778 #line 64 "./fooscanner.l" 779 { yylval = TQCString(yytext+1, strlen(yytext)-1);
return STRING; }
783 #line 65 "./fooscanner.l" 784 { yylval = TQCString(yytext+1, strlen(yytext)-1);
return QUOTED; }
788 #line 66 "./fooscanner.l" 789 { yylval = yytext;
return NUMBER; }
793 #line 67 "./fooscanner.l" 794 { yylval = yytext;
return NUMBER; }
798 #line 68 "./fooscanner.l" 799 { yylval = yytext;
return NUMBER; }
802 #line 71 "./fooscanner.l" 805 #line 71 "./fooscanner.l" 810 #line 73 "./fooscanner.l" 813 #line 814 "./fooscanner.cpp" 814 case YY_STATE_EOF(INITIAL):
817 case YY_END_OF_BUFFER:
820 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
823 *yy_cp = yy_hold_char;
824 YY_RESTORE_YY_MORE_OFFSET
826 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
837 yy_n_chars = yy_current_buffer->yy_n_chars;
838 yy_current_buffer->yy_input_file = yyin;
839 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
849 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
851 yy_state_type yy_next_state;
853 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
855 yy_current_state = yy_get_previous_state();
866 yy_next_state = yy_try_NUL_trans( yy_current_state );
868 yy_bp = yytext_ptr + YY_MORE_ADJ;
873 yy_cp = ++yy_c_buf_p;
874 yy_current_state = yy_next_state;
885 else switch ( yy_get_next_buffer() )
887 case EOB_ACT_END_OF_FILE:
889 yy_did_buffer_switch_on_eof = 0;
902 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
904 yy_act = YY_STATE_EOF(YY_START);
910 if ( ! yy_did_buffer_switch_on_eof )
916 case EOB_ACT_CONTINUE_SCAN:
918 yytext_ptr + yy_amount_of_matched_text;
920 yy_current_state = yy_get_previous_state();
923 yy_bp = yytext_ptr + YY_MORE_ADJ;
926 case EOB_ACT_LAST_MATCH:
928 &yy_current_buffer->yy_ch_buf[yy_n_chars];
930 yy_current_state = yy_get_previous_state();
933 yy_bp = yytext_ptr + YY_MORE_ADJ;
941 "fatal flex scanner internal error--no action found" );
955 static int yy_get_next_buffer()
957 char *dest = yy_current_buffer->yy_ch_buf;
958 char *source = yytext_ptr;
959 int number_to_move, i;
962 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
964 "fatal flex scanner internal error--end of buffer missed" );
966 if ( yy_current_buffer->yy_fill_buffer == 0 )
968 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
973 return EOB_ACT_END_OF_FILE;
981 return EOB_ACT_LAST_MATCH;
988 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
990 for ( i = 0; i < number_to_move; ++i )
991 *(dest++) = *(source++);
993 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
997 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1002 yy_current_buffer->yy_buf_size - number_to_move - 1;
1004 while ( num_to_read <= 0 )
1006 #ifdef YY_USES_REJECT 1008 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1012 YY_BUFFER_STATE b = yy_current_buffer;
1014 int yy_c_buf_p_offset =
1015 (int) (yy_c_buf_p - b->yy_ch_buf);
1017 if ( b->yy_is_our_buffer )
1019 int new_size = b->yy_buf_size * 2;
1021 if ( new_size <= 0 )
1022 b->yy_buf_size += b->yy_buf_size / 8;
1024 b->yy_buf_size *= 2;
1026 b->yy_ch_buf = (
char *)
1028 yy_flex_realloc( (
void *) b->yy_ch_buf,
1029 b->yy_buf_size + 2 );
1035 if ( ! b->yy_ch_buf )
1037 "fatal error - scanner input buffer overflow" );
1039 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1041 num_to_read = yy_current_buffer->yy_buf_size -
1046 if ( num_to_read > YY_READ_BUF_SIZE )
1047 num_to_read = YY_READ_BUF_SIZE;
1050 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1051 yy_n_chars, num_to_read );
1053 yy_current_buffer->yy_n_chars = yy_n_chars;
1056 if ( yy_n_chars == 0 )
1058 if ( number_to_move == YY_MORE_ADJ )
1060 ret_val = EOB_ACT_END_OF_FILE;
1066 ret_val = EOB_ACT_LAST_MATCH;
1067 yy_current_buffer->yy_buffer_status =
1068 YY_BUFFER_EOF_PENDING;
1073 ret_val = EOB_ACT_CONTINUE_SCAN;
1075 yy_n_chars += number_to_move;
1076 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1077 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1079 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1087 static yy_state_type yy_get_previous_state()
1089 yy_state_type yy_current_state;
1092 yy_current_state = yy_start;
1093 yy_current_state += YY_AT_BOL();
1095 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1097 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1098 if ( yy_accept[yy_current_state] )
1100 yy_last_accepting_state = yy_current_state;
1101 yy_last_accepting_cpos = yy_cp;
1103 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1105 yy_current_state = (int) yy_def[yy_current_state];
1106 if ( yy_current_state >= 55 )
1107 yy_c = yy_meta[(
unsigned int) yy_c];
1109 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1112 return yy_current_state;
1122 #ifdef YY_USE_PROTOS 1123 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1125 static yy_state_type yy_try_NUL_trans( yy_current_state )
1126 yy_state_type yy_current_state;
1130 char *yy_cp = yy_c_buf_p;
1133 if ( yy_accept[yy_current_state] )
1135 yy_last_accepting_state = yy_current_state;
1136 yy_last_accepting_cpos = yy_cp;
1138 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1140 yy_current_state = (int) yy_def[yy_current_state];
1141 if ( yy_current_state >= 55 )
1142 yy_c = yy_meta[(
unsigned int) yy_c];
1144 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1145 yy_is_jam = (yy_current_state == 54);
1147 return yy_is_jam ? 0 : yy_current_state;
1152 #ifdef YY_USE_PROTOS 1153 static void yyunput(
int c,
char *yy_bp )
1155 static void yyunput( c, yy_bp )
1160 char *yy_cp = yy_c_buf_p;
1163 *yy_cp = yy_hold_char;
1165 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1168 int number_to_move = yy_n_chars + 2;
1169 char *dest = &yy_current_buffer->yy_ch_buf[
1170 yy_current_buffer->yy_buf_size + 2];
1172 &yy_current_buffer->yy_ch_buf[number_to_move];
1174 while ( source > yy_current_buffer->yy_ch_buf )
1175 *--dest = *--source;
1177 yy_cp += (int) (dest - source);
1178 yy_bp += (int) (dest - source);
1179 yy_current_buffer->yy_n_chars =
1180 yy_n_chars = yy_current_buffer->yy_buf_size;
1182 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1183 YY_FATAL_ERROR(
"flex scanner push-back overflow" );
1186 *--yy_cp = (char) c;
1190 yy_hold_char = *yy_cp;
1197 static int yyinput()
1204 *yy_c_buf_p = yy_hold_char;
1206 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1212 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1218 int offset = yy_c_buf_p - yytext_ptr;
1221 switch ( yy_get_next_buffer() )
1223 case EOB_ACT_LAST_MATCH:
1239 case EOB_ACT_END_OF_FILE:
1244 if ( ! yy_did_buffer_switch_on_eof )
1253 case EOB_ACT_CONTINUE_SCAN:
1254 yy_c_buf_p = yytext_ptr + offset;
1260 c = *(
unsigned char *) yy_c_buf_p;
1262 yy_hold_char = *++yy_c_buf_p;
1264 yy_current_buffer->yy_at_bol = (c ==
'\n');
1270 #ifdef YY_USE_PROTOS 1271 void yyrestart( FILE *input_file )
1273 void yyrestart( input_file )
1277 if ( ! yy_current_buffer )
1278 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1280 yy_init_buffer( yy_current_buffer, input_file );
1281 yy_load_buffer_state();
1285 #ifdef YY_USE_PROTOS 1286 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1288 void yy_switch_to_buffer( new_buffer )
1289 YY_BUFFER_STATE new_buffer;
1292 if ( yy_current_buffer == new_buffer )
1295 if ( yy_current_buffer )
1298 *yy_c_buf_p = yy_hold_char;
1299 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1300 yy_current_buffer->yy_n_chars = yy_n_chars;
1303 yy_current_buffer = new_buffer;
1304 yy_load_buffer_state();
1311 yy_did_buffer_switch_on_eof = 1;
1315 #ifdef YY_USE_PROTOS 1316 void yy_load_buffer_state(
void )
1318 void yy_load_buffer_state()
1321 yy_n_chars = yy_current_buffer->yy_n_chars;
1322 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1323 yyin = yy_current_buffer->yy_input_file;
1324 yy_hold_char = *yy_c_buf_p;
1328 #ifdef YY_USE_PROTOS 1329 YY_BUFFER_STATE yy_create_buffer( FILE *file,
int size )
1331 YY_BUFFER_STATE yy_create_buffer( file, size )
1338 b = (YY_BUFFER_STATE) yy_flex_alloc(
sizeof(
struct yy_buffer_state ) );
1340 YY_FATAL_ERROR(
"out of dynamic memory in yy_create_buffer()" );
1342 b->yy_buf_size = size;
1347 b->yy_ch_buf = (
char *) yy_flex_alloc( b->yy_buf_size + 2 );
1348 if ( ! b->yy_ch_buf )
1349 YY_FATAL_ERROR(
"out of dynamic memory in yy_create_buffer()" );
1351 b->yy_is_our_buffer = 1;
1353 yy_init_buffer( b, file );
1359 #ifdef YY_USE_PROTOS 1360 void yy_delete_buffer( YY_BUFFER_STATE b )
1362 void yy_delete_buffer( b )
1369 if ( b == yy_current_buffer )
1370 yy_current_buffer = (YY_BUFFER_STATE) 0;
1372 if ( b->yy_is_our_buffer )
1373 yy_flex_free( (
void *) b->yy_ch_buf );
1375 yy_flex_free( (
void *) b );
1380 #ifdef YY_USE_PROTOS 1381 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1383 void yy_init_buffer( b, file )
1390 yy_flush_buffer( b );
1392 b->yy_input_file = file;
1393 b->yy_fill_buffer = 1;
1395 #if YY_ALWAYS_INTERACTIVE 1396 b->yy_is_interactive = 1;
1398 #if YY_NEVER_INTERACTIVE 1399 b->yy_is_interactive = 0;
1401 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1407 #ifdef YY_USE_PROTOS 1408 void yy_flush_buffer( YY_BUFFER_STATE b )
1410 void yy_flush_buffer( b )
1424 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1425 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1427 b->yy_buf_pos = &b->yy_ch_buf[0];
1430 b->yy_buffer_status = YY_BUFFER_NEW;
1432 if ( b == yy_current_buffer )
1433 yy_load_buffer_state();
1437 #ifndef YY_NO_SCAN_BUFFER 1438 #ifdef YY_USE_PROTOS 1439 YY_BUFFER_STATE yy_scan_buffer(
char *base, yy_size_t size )
1441 YY_BUFFER_STATE yy_scan_buffer( base, size )
1449 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1450 base[size-1] != YY_END_OF_BUFFER_CHAR )
1454 b = (YY_BUFFER_STATE) yy_flex_alloc(
sizeof(
struct yy_buffer_state ) );
1456 YY_FATAL_ERROR(
"out of dynamic memory in yy_scan_buffer()" );
1458 b->yy_buf_size = size - 2;
1459 b->yy_buf_pos = b->yy_ch_buf = base;
1460 b->yy_is_our_buffer = 0;
1461 b->yy_input_file = 0;
1462 b->yy_n_chars = b->yy_buf_size;
1463 b->yy_is_interactive = 0;
1465 b->yy_fill_buffer = 0;
1466 b->yy_buffer_status = YY_BUFFER_NEW;
1468 yy_switch_to_buffer( b );
1475 #ifndef YY_NO_SCAN_STRING 1476 #ifdef YY_USE_PROTOS 1477 YY_BUFFER_STATE yy_scan_string( yyconst
char *yy_str )
1479 YY_BUFFER_STATE yy_scan_string( yy_str )
1480 yyconst
char *yy_str;
1484 for ( len = 0; yy_str[len]; ++len )
1487 return yy_scan_bytes( yy_str, len );
1492 #ifndef YY_NO_SCAN_BYTES 1493 #ifdef YY_USE_PROTOS 1494 YY_BUFFER_STATE yy_scan_bytes( yyconst
char *bytes,
int len )
1496 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1497 yyconst
char *bytes;
1508 buf = (
char *) yy_flex_alloc( n );
1510 YY_FATAL_ERROR(
"out of dynamic memory in yy_scan_bytes()" );
1512 for ( i = 0; i < len; ++i )
1515 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1517 b = yy_scan_buffer( buf, n );
1519 YY_FATAL_ERROR(
"bad buffer in yy_scan_bytes()" );
1524 b->yy_is_our_buffer = 1;
1531 #ifndef YY_NO_PUSH_STATE 1532 #ifdef YY_USE_PROTOS 1533 static void yy_push_state(
int new_state )
1535 static void yy_push_state( new_state )
1539 if ( yy_start_stack_ptr >= yy_start_stack_depth )
1543 yy_start_stack_depth += YY_START_STACK_INCR;
1544 new_size = yy_start_stack_depth *
sizeof( int );
1546 if ( ! yy_start_stack )
1547 yy_start_stack = (
int *) yy_flex_alloc( new_size );
1550 yy_start_stack = (
int *) yy_flex_realloc(
1551 (
void *) yy_start_stack, new_size );
1553 if ( ! yy_start_stack )
1555 "out of memory expanding start-condition stack" );
1558 yy_start_stack[yy_start_stack_ptr++] = YY_START;
1565 #ifndef YY_NO_POP_STATE 1566 static void yy_pop_state()
1568 if ( --yy_start_stack_ptr < 0 )
1569 YY_FATAL_ERROR(
"start-condition stack underflow" );
1571 BEGIN(yy_start_stack[yy_start_stack_ptr]);
1576 #ifndef YY_NO_TOP_STATE 1577 static int yy_top_state()
1579 return yy_start_stack[yy_start_stack_ptr - 1];
1583 #ifndef YY_EXIT_FAILURE 1584 #define YY_EXIT_FAILURE 2 1587 #ifdef YY_USE_PROTOS 1588 static void yy_fatal_error( yyconst
char msg[] )
1590 static void yy_fatal_error( msg )
1594 (void) fprintf( stderr,
"[fooscanner] %s\n", msg );
1595 exit( YY_EXIT_FAILURE );
1607 yytext[yyleng] = yy_hold_char; \ 1608 yy_c_buf_p = yytext + n; \ 1609 yy_hold_char = *yy_c_buf_p; \ 1610 *yy_c_buf_p = '\0'; \ 1619 #ifdef YY_USE_PROTOS 1620 static void yy_flex_strncpy(
char *s1, yyconst
char *s2,
int n )
1622 static void yy_flex_strncpy( s1, s2, n )
1629 for ( i = 0; i < n; ++i )
1634 #ifdef YY_NEED_STRLEN 1635 #ifdef YY_USE_PROTOS 1636 static int yy_flex_strlen( yyconst
char *s )
1638 static int yy_flex_strlen( s )
1643 for ( n = 0; s[n]; ++n )
1651 #ifdef YY_USE_PROTOS 1652 static void *yy_flex_alloc( yy_size_t size )
1654 static void *yy_flex_alloc( size )
1658 return (
void *) malloc( size );
1661 #ifdef YY_USE_PROTOS 1662 static void *yy_flex_realloc(
void *ptr, yy_size_t size )
1664 static void *yy_flex_realloc( ptr, size )
1676 return (
void *) realloc( (
char *) ptr, size );
1679 #ifdef YY_USE_PROTOS 1680 static void yy_flex_free(
void *ptr )
1682 static void yy_flex_free( ptr )
1696 #line 73 "./fooscanner.l" 1699 void kdeprint_foomatic2scanner_init( TQIODevice *d )
1701 kdeprint_foomatic2scanner_device = d;
1704 void kdeprint_foomatic2scanner_terminate()
1706 kdeprint_foomatic2scanner_device = NULL;