1 #define yy_create_buffer tdeprint_foomatic2_create_buffer
2 #define yy_delete_buffer tdeprint_foomatic2_delete_buffer
3 #define yy_scan_buffer tdeprint_foomatic2_scan_buffer
4 #define yy_scan_string tdeprint_foomatic2_scan_string
5 #define yy_scan_bytes tdeprint_foomatic2_scan_bytes
6 #define yy_flex_debug tdeprint_foomatic2_flex_debug
7 #define yy_init_buffer tdeprint_foomatic2_init_buffer
8 #define yy_flush_buffer tdeprint_foomatic2_flush_buffer
9 #define yy_load_buffer_state tdeprint_foomatic2_load_buffer_state
10 #define yy_switch_to_buffer tdeprint_foomatic2_switch_to_buffer
11 #define yyin tdeprint_foomatic2in
12 #define yyleng tdeprint_foomatic2leng
13 #define yylex tdeprint_foomatic2lex
14 #define yyout tdeprint_foomatic2out
15 #define yyrestart tdeprint_foomatic2restart
16 #define yytext tdeprint_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 TQVariant
450 #include "fooparser.cpp.h"
452 #define yylval tdeprint_foomatic2lval
454 #define YY_INPUT( buf, result, max_size ) \
456 if ( tdeprint_foomatic2scanner_device ) \
458 result = tdeprint_foomatic2scanner_device->readBlock( buf, max_size ); \
470 TQIODevice* tdeprint_foomatic2scanner_device = NULL;
471 #line 468 "./fooscanner.cpp"
477 #ifndef YY_SKIP_YYWRAP
479 extern "C" int yywrap YY_PROTO((
void ));
481 extern int yywrap YY_PROTO((
void ));
486 static void yyunput YY_PROTO((
int c,
char *buf_ptr ));
490 static void yy_flex_strncpy YY_PROTO((
char *, yyconst
char *,
int ));
493 #ifdef YY_NEED_STRLEN
494 static int yy_flex_strlen YY_PROTO(( yyconst
char * ));
499 static int yyinput YY_PROTO((
void ));
501 static int input YY_PROTO((
void ));
506 static int yy_start_stack_ptr = 0;
507 static int yy_start_stack_depth = 0;
508 static int *yy_start_stack = 0;
509 #ifndef YY_NO_PUSH_STATE
510 static void yy_push_state YY_PROTO((
int new_state ));
512 #ifndef YY_NO_POP_STATE
513 static void yy_pop_state YY_PROTO((
void ));
515 #ifndef YY_NO_TOP_STATE
516 static int yy_top_state YY_PROTO((
void ));
520 #define YY_NO_PUSH_STATE 1
521 #define YY_NO_POP_STATE 1
522 #define YY_NO_TOP_STATE 1
525 #ifdef YY_MALLOC_DECL
541 #ifndef YY_READ_BUF_SIZE
542 #define YY_READ_BUF_SIZE 8192
551 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
558 #define YY_INPUT(buf,result,max_size) \
559 if ( yy_current_buffer->yy_is_interactive ) \
562 for ( n = 0; n < max_size && \
563 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
566 buf[n++] = (char) c; \
567 if ( c == EOF && ferror( yyin ) ) \
568 YY_FATAL_ERROR( "input in flex scanner failed" ); \
571 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
572 && ferror( yyin ) ) \
573 YY_FATAL_ERROR( "input in flex scanner failed" );
581 #define yyterminate() return YY_NULL
585 #ifndef YY_START_STACK_INCR
586 #define YY_START_STACK_INCR 25
590 #ifndef YY_FATAL_ERROR
591 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
598 #define YY_DECL int yylex YY_PROTO(( void ))
604 #ifndef YY_USER_ACTION
605 #define YY_USER_ACTION
610 #define YY_BREAK break;
613 #define YY_RULE_SETUP \
615 yy_current_buffer->yy_at_bol = \
616 (yytext[yyleng - 1] == '\n'); \
621 yy_state_type yy_current_state;
625 #line 47 "./fooscanner.l"
628 #line 625 "./fooscanner.cpp"
647 if ( ! yy_current_buffer )
649 yy_create_buffer( yyin, YY_BUF_SIZE );
651 yy_load_buffer_state();
659 *yy_cp = yy_hold_char;
666 yy_current_state = yy_start;
667 yy_current_state += YY_AT_BOL();
671 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
672 if ( yy_accept[yy_current_state] )
674 yy_last_accepting_state = yy_current_state;
675 yy_last_accepting_cpos = yy_cp;
677 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
679 yy_current_state = (int) yy_def[yy_current_state];
680 if ( yy_current_state >= 55 )
681 yy_c = yy_meta[(
unsigned int) yy_c];
683 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
686 while ( yy_base[yy_current_state] != 94 );
689 yy_act = yy_accept[yy_current_state];
692 yy_cp = yy_last_accepting_cpos;
693 yy_current_state = yy_last_accepting_state;
694 yy_act = yy_accept[yy_current_state];
707 *yy_cp = yy_hold_char;
708 yy_cp = yy_last_accepting_cpos;
709 yy_current_state = yy_last_accepting_state;
713 *yy_cp = yy_hold_char;
714 yy_c_buf_p = yy_cp -= 1;
717 #line 49 "./fooscanner.l"
722 #line 50 "./fooscanner.l"
727 #line 51 "./fooscanner.l"
732 #line 52 "./fooscanner.l"
737 #line 53 "./fooscanner.l"
742 #line 55 "./fooscanner.l"
747 #line 56 "./fooscanner.l"
752 #line 57 "./fooscanner.l"
757 #line 58 "./fooscanner.l"
762 #line 59 "./fooscanner.l"
767 #line 60 "./fooscanner.l"
772 #line 61 "./fooscanner.l"
777 #line 62 "./fooscanner.l"
782 #line 64 "./fooscanner.l"
783 { yylval = TQCString(yytext+1, strlen(yytext)-1);
return STRING; }
787 #line 65 "./fooscanner.l"
788 { yylval = TQCString(yytext+1, strlen(yytext)-1);
return QUOTED; }
792 #line 66 "./fooscanner.l"
793 { yylval = yytext;
return NUMBER; }
797 #line 67 "./fooscanner.l"
798 { yylval = yytext;
return NUMBER; }
802 #line 68 "./fooscanner.l"
803 { yylval = yytext;
return NUMBER; }
806 #line 71 "./fooscanner.l"
809 #line 71 "./fooscanner.l"
814 #line 73 "./fooscanner.l"
817 #line 814 "./fooscanner.cpp"
818 case YY_STATE_EOF(INITIAL):
821 case YY_END_OF_BUFFER:
824 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
827 *yy_cp = yy_hold_char;
828 YY_RESTORE_YY_MORE_OFFSET
830 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
841 yy_n_chars = yy_current_buffer->yy_n_chars;
842 yy_current_buffer->yy_input_file = yyin;
843 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
853 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
855 yy_state_type yy_next_state;
857 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
859 yy_current_state = yy_get_previous_state();
870 yy_next_state = yy_try_NUL_trans( yy_current_state );
872 yy_bp = yytext_ptr + YY_MORE_ADJ;
877 yy_cp = ++yy_c_buf_p;
878 yy_current_state = yy_next_state;
889 else switch ( yy_get_next_buffer() )
891 case EOB_ACT_END_OF_FILE:
893 yy_did_buffer_switch_on_eof = 0;
906 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
908 yy_act = YY_STATE_EOF(YY_START);
914 if ( ! yy_did_buffer_switch_on_eof )
920 case EOB_ACT_CONTINUE_SCAN:
922 yytext_ptr + yy_amount_of_matched_text;
924 yy_current_state = yy_get_previous_state();
927 yy_bp = yytext_ptr + YY_MORE_ADJ;
930 case EOB_ACT_LAST_MATCH:
932 &yy_current_buffer->yy_ch_buf[yy_n_chars];
934 yy_current_state = yy_get_previous_state();
937 yy_bp = yytext_ptr + YY_MORE_ADJ;
945 "fatal flex scanner internal error--no action found" );
959 static int yy_get_next_buffer()
961 char *dest = yy_current_buffer->yy_ch_buf;
962 char *source = yytext_ptr;
963 int number_to_move, i;
966 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
968 "fatal flex scanner internal error--end of buffer missed" );
970 if ( yy_current_buffer->yy_fill_buffer == 0 )
972 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
977 return EOB_ACT_END_OF_FILE;
985 return EOB_ACT_LAST_MATCH;
992 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
994 for ( i = 0; i < number_to_move; ++i )
995 *(dest++) = *(source++);
997 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1001 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1006 yy_current_buffer->yy_buf_size - number_to_move - 1;
1008 while ( num_to_read <= 0 )
1010 #ifdef YY_USES_REJECT
1012 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1016 YY_BUFFER_STATE b = yy_current_buffer;
1018 int yy_c_buf_p_offset =
1019 (int) (yy_c_buf_p - b->yy_ch_buf);
1021 if ( b->yy_is_our_buffer )
1023 int new_size = b->yy_buf_size * 2;
1025 if ( new_size <= 0 )
1026 b->yy_buf_size += b->yy_buf_size / 8;
1028 b->yy_buf_size *= 2;
1030 b->yy_ch_buf = (
char *)
1032 yy_flex_realloc( (
void *) b->yy_ch_buf,
1033 b->yy_buf_size + 2 );
1039 if ( ! b->yy_ch_buf )
1041 "fatal error - scanner input buffer overflow" );
1043 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1045 num_to_read = yy_current_buffer->yy_buf_size -
1050 if ( num_to_read > YY_READ_BUF_SIZE )
1051 num_to_read = YY_READ_BUF_SIZE;
1054 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1055 yy_n_chars, num_to_read );
1057 yy_current_buffer->yy_n_chars = yy_n_chars;
1060 if ( yy_n_chars == 0 )
1062 if ( number_to_move == YY_MORE_ADJ )
1064 ret_val = EOB_ACT_END_OF_FILE;
1070 ret_val = EOB_ACT_LAST_MATCH;
1071 yy_current_buffer->yy_buffer_status =
1072 YY_BUFFER_EOF_PENDING;
1077 ret_val = EOB_ACT_CONTINUE_SCAN;
1079 yy_n_chars += number_to_move;
1080 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1081 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1083 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1091 static yy_state_type yy_get_previous_state()
1093 yy_state_type yy_current_state;
1096 yy_current_state = yy_start;
1097 yy_current_state += YY_AT_BOL();
1099 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1101 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1102 if ( yy_accept[yy_current_state] )
1104 yy_last_accepting_state = yy_current_state;
1105 yy_last_accepting_cpos = yy_cp;
1107 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1109 yy_current_state = (int) yy_def[yy_current_state];
1110 if ( yy_current_state >= 55 )
1111 yy_c = yy_meta[(
unsigned int) yy_c];
1113 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1116 return yy_current_state;
1126 #ifdef YY_USE_PROTOS
1127 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1129 static yy_state_type yy_try_NUL_trans( yy_current_state )
1130 yy_state_type yy_current_state;
1134 char *yy_cp = yy_c_buf_p;
1137 if ( yy_accept[yy_current_state] )
1139 yy_last_accepting_state = yy_current_state;
1140 yy_last_accepting_cpos = yy_cp;
1142 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1144 yy_current_state = (int) yy_def[yy_current_state];
1145 if ( yy_current_state >= 55 )
1146 yy_c = yy_meta[(
unsigned int) yy_c];
1148 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1149 yy_is_jam = (yy_current_state == 54);
1151 return yy_is_jam ? 0 : yy_current_state;
1156 #ifdef YY_USE_PROTOS
1157 static void yyunput(
int c,
char *yy_bp )
1159 static void yyunput( c, yy_bp )
1164 char *yy_cp = yy_c_buf_p;
1167 *yy_cp = yy_hold_char;
1169 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1172 int number_to_move = yy_n_chars + 2;
1173 char *dest = &yy_current_buffer->yy_ch_buf[
1174 yy_current_buffer->yy_buf_size + 2];
1176 &yy_current_buffer->yy_ch_buf[number_to_move];
1178 while ( source > yy_current_buffer->yy_ch_buf )
1179 *--dest = *--source;
1181 yy_cp += (int) (dest - source);
1182 yy_bp += (int) (dest - source);
1183 yy_current_buffer->yy_n_chars =
1184 yy_n_chars = yy_current_buffer->yy_buf_size;
1186 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1187 YY_FATAL_ERROR(
"flex scanner push-back overflow" );
1190 *--yy_cp = (char) c;
1194 yy_hold_char = *yy_cp;
1201 static int yyinput()
1208 *yy_c_buf_p = yy_hold_char;
1210 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1216 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1222 int offset = yy_c_buf_p - yytext_ptr;
1225 switch ( yy_get_next_buffer() )
1227 case EOB_ACT_LAST_MATCH:
1243 case EOB_ACT_END_OF_FILE:
1248 if ( ! yy_did_buffer_switch_on_eof )
1257 case EOB_ACT_CONTINUE_SCAN:
1258 yy_c_buf_p = yytext_ptr + offset;
1264 c = *(
unsigned char *) yy_c_buf_p;
1266 yy_hold_char = *++yy_c_buf_p;
1268 yy_current_buffer->yy_at_bol = (c ==
'\n');
1274 #ifdef YY_USE_PROTOS
1275 void yyrestart( FILE *input_file )
1277 void yyrestart( input_file )
1281 if ( ! yy_current_buffer )
1282 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1284 yy_init_buffer( yy_current_buffer, input_file );
1285 yy_load_buffer_state();
1289 #ifdef YY_USE_PROTOS
1290 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1292 void yy_switch_to_buffer( new_buffer )
1293 YY_BUFFER_STATE new_buffer;
1296 if ( yy_current_buffer == new_buffer )
1299 if ( yy_current_buffer )
1302 *yy_c_buf_p = yy_hold_char;
1303 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1304 yy_current_buffer->yy_n_chars = yy_n_chars;
1307 yy_current_buffer = new_buffer;
1308 yy_load_buffer_state();
1315 yy_did_buffer_switch_on_eof = 1;
1319 #ifdef YY_USE_PROTOS
1320 void yy_load_buffer_state(
void )
1322 void yy_load_buffer_state()
1325 yy_n_chars = yy_current_buffer->yy_n_chars;
1326 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1327 yyin = yy_current_buffer->yy_input_file;
1328 yy_hold_char = *yy_c_buf_p;
1332 #ifdef YY_USE_PROTOS
1333 YY_BUFFER_STATE yy_create_buffer( FILE *file,
int size )
1335 YY_BUFFER_STATE yy_create_buffer( file, size )
1342 b = (YY_BUFFER_STATE) yy_flex_alloc(
sizeof(
struct yy_buffer_state ) );
1344 YY_FATAL_ERROR(
"out of dynamic memory in yy_create_buffer()" );
1346 b->yy_buf_size = size;
1351 b->yy_ch_buf = (
char *) yy_flex_alloc( b->yy_buf_size + 2 );
1352 if ( ! b->yy_ch_buf )
1353 YY_FATAL_ERROR(
"out of dynamic memory in yy_create_buffer()" );
1355 b->yy_is_our_buffer = 1;
1357 yy_init_buffer( b, file );
1363 #ifdef YY_USE_PROTOS
1364 void yy_delete_buffer( YY_BUFFER_STATE b )
1366 void yy_delete_buffer( b )
1373 if ( b == yy_current_buffer )
1374 yy_current_buffer = (YY_BUFFER_STATE) 0;
1376 if ( b->yy_is_our_buffer )
1377 yy_flex_free( (
void *) b->yy_ch_buf );
1379 yy_flex_free( (
void *) b );
1384 #ifdef YY_USE_PROTOS
1385 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1387 void yy_init_buffer( b, file )
1394 yy_flush_buffer( b );
1396 b->yy_input_file = file;
1397 b->yy_fill_buffer = 1;
1399 #if YY_ALWAYS_INTERACTIVE
1400 b->yy_is_interactive = 1;
1402 #if YY_NEVER_INTERACTIVE
1403 b->yy_is_interactive = 0;
1405 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1411 #ifdef YY_USE_PROTOS
1412 void yy_flush_buffer( YY_BUFFER_STATE b )
1414 void yy_flush_buffer( b )
1428 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1429 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1431 b->yy_buf_pos = &b->yy_ch_buf[0];
1434 b->yy_buffer_status = YY_BUFFER_NEW;
1436 if ( b == yy_current_buffer )
1437 yy_load_buffer_state();
1441 #ifndef YY_NO_SCAN_BUFFER
1442 #ifdef YY_USE_PROTOS
1443 YY_BUFFER_STATE yy_scan_buffer(
char *base, yy_size_t size )
1445 YY_BUFFER_STATE yy_scan_buffer( base, size )
1453 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1454 base[size-1] != YY_END_OF_BUFFER_CHAR )
1458 b = (YY_BUFFER_STATE) yy_flex_alloc(
sizeof(
struct yy_buffer_state ) );
1460 YY_FATAL_ERROR(
"out of dynamic memory in yy_scan_buffer()" );
1462 b->yy_buf_size = size - 2;
1463 b->yy_buf_pos = b->yy_ch_buf = base;
1464 b->yy_is_our_buffer = 0;
1465 b->yy_input_file = 0;
1466 b->yy_n_chars = b->yy_buf_size;
1467 b->yy_is_interactive = 0;
1469 b->yy_fill_buffer = 0;
1470 b->yy_buffer_status = YY_BUFFER_NEW;
1472 yy_switch_to_buffer( b );
1479 #ifndef YY_NO_SCAN_STRING
1480 #ifdef YY_USE_PROTOS
1481 YY_BUFFER_STATE yy_scan_string( yyconst
char *yy_str )
1483 YY_BUFFER_STATE yy_scan_string( yy_str )
1484 yyconst
char *yy_str;
1488 for ( len = 0; yy_str[len]; ++len )
1491 return yy_scan_bytes( yy_str, len );
1496 #ifndef YY_NO_SCAN_BYTES
1497 #ifdef YY_USE_PROTOS
1498 YY_BUFFER_STATE yy_scan_bytes( yyconst
char *bytes,
int len )
1500 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1501 yyconst
char *bytes;
1512 buf = (
char *) yy_flex_alloc( n );
1514 YY_FATAL_ERROR(
"out of dynamic memory in yy_scan_bytes()" );
1516 for ( i = 0; i < len; ++i )
1519 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1521 b = yy_scan_buffer( buf, n );
1523 YY_FATAL_ERROR(
"bad buffer in yy_scan_bytes()" );
1528 b->yy_is_our_buffer = 1;
1535 #ifndef YY_NO_PUSH_STATE
1536 #ifdef YY_USE_PROTOS
1537 static void yy_push_state(
int new_state )
1539 static void yy_push_state( new_state )
1543 if ( yy_start_stack_ptr >= yy_start_stack_depth )
1547 yy_start_stack_depth += YY_START_STACK_INCR;
1548 new_size = yy_start_stack_depth *
sizeof( int );
1550 if ( ! yy_start_stack )
1551 yy_start_stack = (
int *) yy_flex_alloc( new_size );
1554 yy_start_stack = (
int *) yy_flex_realloc(
1555 (
void *) yy_start_stack, new_size );
1557 if ( ! yy_start_stack )
1559 "out of memory expanding start-condition stack" );
1562 yy_start_stack[yy_start_stack_ptr++] = YY_START;
1569 #ifndef YY_NO_POP_STATE
1570 static void yy_pop_state()
1572 if ( --yy_start_stack_ptr < 0 )
1573 YY_FATAL_ERROR(
"start-condition stack underflow" );
1575 BEGIN(yy_start_stack[yy_start_stack_ptr]);
1580 #ifndef YY_NO_TOP_STATE
1581 static int yy_top_state()
1583 return yy_start_stack[yy_start_stack_ptr - 1];
1587 #ifndef YY_EXIT_FAILURE
1588 #define YY_EXIT_FAILURE 2
1591 #ifdef YY_USE_PROTOS
1592 static void yy_fatal_error( yyconst
char msg[] )
1594 static void yy_fatal_error( msg )
1598 (void) fprintf( stderr,
"[fooscanner] %s\n", msg );
1599 exit( YY_EXIT_FAILURE );
1611 yytext[yyleng] = yy_hold_char; \
1612 yy_c_buf_p = yytext + n; \
1613 yy_hold_char = *yy_c_buf_p; \
1614 *yy_c_buf_p = '\0'; \
1623 #ifdef YY_USE_PROTOS
1624 static void yy_flex_strncpy(
char *s1, yyconst
char *s2,
int n )
1626 static void yy_flex_strncpy( s1, s2, n )
1633 for ( i = 0; i < n; ++i )
1638 #ifdef YY_NEED_STRLEN
1639 #ifdef YY_USE_PROTOS
1640 static int yy_flex_strlen( yyconst
char *s )
1642 static int yy_flex_strlen( s )
1647 for ( n = 0; s[n]; ++n )
1655 #ifdef YY_USE_PROTOS
1656 static void *yy_flex_alloc( yy_size_t size )
1658 static void *yy_flex_alloc( size )
1662 return (
void *) malloc( size );
1665 #ifdef YY_USE_PROTOS
1666 static void *yy_flex_realloc(
void *ptr, yy_size_t size )
1668 static void *yy_flex_realloc( ptr, size )
1680 return (
void *) realloc( (
char *) ptr, size );
1683 #ifdef YY_USE_PROTOS
1684 static void yy_flex_free(
void *ptr )
1686 static void yy_flex_free( ptr )
1700 #line 73 "./fooscanner.l"
1703 void tdeprint_foomatic2scanner_init( TQIODevice *d )
1705 tdeprint_foomatic2scanner_device = d;
1708 void tdeprint_foomatic2scanner_terminate()
1710 tdeprint_foomatic2scanner_device = NULL;