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
69#define YY_PROTO(proto) proto
71#define YY_PROTO(proto) ()
82#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
88#define BEGIN yy_start = 1 + 2 *
94#define YY_START ((yy_start - 1) / 2)
95#define YYSTATE YY_START
98#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
101#define YY_NEW_FILE yyrestart( yyin )
103#define YY_END_OF_BUFFER_CHAR 0
106#define YY_BUF_SIZE 16384
108typedef struct yy_buffer_state *YY_BUFFER_STATE;
111extern FILE *yyin, *yyout;
113#define EOB_ACT_CONTINUE_SCAN 0
114#define EOB_ACT_END_OF_FILE 1
115#define EOB_ACT_LAST_MATCH 2
137 *yy_cp = yy_hold_char; \
138 YY_RESTORE_YY_MORE_OFFSET \
139 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
140 YY_DO_BEFORE_ACTION; \
144#define unput(c) yyunput( c, yytext_ptr )
150typedef unsigned int yy_size_t;
153struct yy_buffer_state
163 yy_size_t yy_buf_size;
174 int yy_is_our_buffer;
181 int yy_is_interactive;
194 int yy_buffer_status;
195#define YY_BUFFER_NEW 0
196#define YY_BUFFER_NORMAL 1
207#define YY_BUFFER_EOF_PENDING 2
210static YY_BUFFER_STATE yy_current_buffer = 0;
216#define YY_CURRENT_BUFFER yy_current_buffer
220static char yy_hold_char;
222static int yy_n_chars;
228static char *yy_c_buf_p = (
char *) 0;
229static int yy_init = 1;
230static int yy_start = 0;
235static int yy_did_buffer_switch_on_eof;
237void yyrestart YY_PROTO(( FILE *input_file ));
239void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
240void yy_load_buffer_state YY_PROTO((
void ));
241YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file,
int size ));
242void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
243void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
244void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
245#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
247YY_BUFFER_STATE yy_scan_buffer YY_PROTO((
char *base, yy_size_t size ));
248YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst
char *yy_str ));
249YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst
char *bytes,
int len ));
251static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
252static void *yy_flex_realloc YY_PROTO((
void *, yy_size_t ));
253static void yy_flex_free YY_PROTO((
void * ));
255#define yy_new_buffer yy_create_buffer
257#define yy_set_interactive(is_interactive) \
259 if ( ! yy_current_buffer ) \
260 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
261 yy_current_buffer->yy_is_interactive = is_interactive; \
264#define yy_set_bol(at_bol) \
266 if ( ! yy_current_buffer ) \
267 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
268 yy_current_buffer->yy_at_bol = at_bol; \
271#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
275#define YY_SKIP_YYWRAP
276typedef unsigned char YY_CHAR;
277FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
278typedef int yy_state_type;
280#define yytext_ptr yytext
282static yy_state_type yy_get_previous_state YY_PROTO((
void ));
283static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
284static int yy_get_next_buffer YY_PROTO((
void ));
285static void yy_fatal_error YY_PROTO(( yyconst
char msg[] ));
290#define YY_DO_BEFORE_ACTION \
291 yytext_ptr = yy_bp; \
292 yyleng = (int) (yy_cp - yy_bp); \
293 yy_hold_char = *yy_cp; \
297#define YY_NUM_RULES 21
298#define YY_END_OF_BUFFER 22
299static yyconst
short int yy_accept[55] =
301 0, 0, 22, 20, 19, 20, 5, 20, 8, 20,
302 16, 13, 6, 7, 11, 12, 20, 9, 10, 20,
303 0, 15, 5, 0, 14, 0, 16, 0, 0, 0,
304 0, 14, 17, 0, 0, 0, 0, 0, 0, 0,
305 0, 18, 4, 2, 0, 0, 0, 0, 0, 0,
309static yyconst
int yy_ec[256] =
311 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
312 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
313 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
314 1, 1, 1, 3, 4, 5, 1, 1, 6, 1,
315 1, 1, 1, 7, 8, 9, 1, 10, 11, 10,
316 10, 10, 10, 10, 10, 10, 10, 1, 12, 1,
317 13, 14, 1, 1, 15, 1, 1, 1, 16, 1,
318 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
319 1, 17, 1, 1, 1, 18, 1, 1, 1, 1,
320 19, 20, 21, 1, 1, 1, 1, 1, 1, 22,
322 23, 24, 1, 1, 25, 1, 1, 1, 1, 26,
323 27, 28, 1, 1, 29, 30, 31, 1, 1, 1,
324 1, 1, 32, 1, 33, 1, 1, 1, 1, 1,
325 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
326 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
327 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
328 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
329 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
330 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
331 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
333 1, 1, 1, 1, 1, 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,
341static yyconst
int yy_meta[34] =
343 1, 2, 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,
349static yyconst
short int yy_base[59] =
351 0, 88, 92, 94, 94, 88, 0, 28, 94, 25,
352 28, 94, 94, 94, 94, 94, 64, 94, 94, 22,
353 86, 94, 0, 35, 94, 36, 34, 36, 66, 72,
354 59, 43, 41, 62, 67, 54, 50, 58, 70, 50,
355 43, 55, 94, 71, 50, 63, 51, 73, 46, 71,
356 94, 39, 94, 94, 66, 58, 68, 70
359static yyconst
short int yy_def[59] =
361 54, 1, 54, 54, 54, 55, 56, 57, 54, 54,
362 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
363 55, 54, 56, 57, 54, 57, 54, 54, 54, 54,
364 54, 57, 54, 54, 54, 54, 54, 54, 54, 54,
365 54, 54, 54, 54, 54, 54, 54, 58, 54, 58,
366 54, 54, 54, 0, 54, 54, 54, 54
369static yyconst
short int yy_nxt[128] =
371 4, 5, 6, 7, 4, 8, 9, 10, 4, 11,
372 11, 12, 13, 14, 4, 4, 4, 4, 15, 4,
373 16, 4, 4, 4, 4, 4, 4, 4, 4, 4,
374 17, 18, 19, 25, 27, 27, 28, 27, 27, 30,
375 25, 32, 28, 27, 27, 33, 33, 26, 25, 31,
376 33, 33, 42, 42, 26, 26, 37, 41, 23, 42,
377 42, 53, 26, 37, 42, 42, 21, 21, 24, 24,
378 50, 50, 51, 52, 51, 49, 48, 47, 46, 45,
379 44, 43, 40, 39, 38, 36, 35, 34, 22, 29,
380 22, 54, 20, 3, 54, 54, 54, 54, 54, 54,
382 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
383 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
384 54, 54, 54, 54, 54, 54, 54
387static yyconst
short int yy_chk[128] =
389 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
390 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
391 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
392 1, 1, 1, 8, 10, 10, 11, 11, 11, 20,
393 24, 26, 27, 27, 27, 28, 28, 8, 32, 20,
394 33, 33, 41, 41, 24, 26, 33, 37, 56, 37,
395 37, 52, 32, 33, 42, 42, 55, 55, 57, 57,
396 58, 58, 50, 49, 48, 47, 46, 45, 44, 40,
397 39, 38, 36, 35, 34, 31, 30, 29, 21, 17,
398 6, 3, 2, 54, 54, 54, 54, 54, 54, 54,
400 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
401 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
402 54, 54, 54, 54, 54, 54, 54
405static yy_state_type yy_last_accepting_state;
406static char *yy_last_accepting_cpos;
411#define REJECT reject_used_but_not_detected
412#define yymore() yymore_used_but_not_detected
414#define YY_RESTORE_YY_MORE_OFFSET
416#line 1 "./fooscanner.l"
418#line 2 "./fooscanner.l"
438#include <tqvariant.h>
439#include <tqiodevice.h>
440#define YYSTYPE TQVariant
441#include "fooparser.cpp.h"
443#define yylval tdeprint_foomatic2lval
445#define YY_INPUT( buf, result, max_size ) \
447 if ( tdeprint_foomatic2scanner_device ) \
449 result = tdeprint_foomatic2scanner_device->readBlock( buf, max_size ); \
461TQIODevice* tdeprint_foomatic2scanner_device = NULL;
462#line 468 "./fooscanner.cpp"
468#ifndef YY_SKIP_YYWRAP
470extern "C" int yywrap YY_PROTO((
void ));
472extern int yywrap YY_PROTO((
void ));
477static void yyunput YY_PROTO((
int c,
char *buf_ptr ));
481static void yy_flex_strncpy YY_PROTO((
char *, yyconst
char *,
int ));
485static int yy_flex_strlen YY_PROTO(( yyconst
char * ));
490static int yyinput YY_PROTO((
void ));
492static int input YY_PROTO((
void ));
497static int yy_start_stack_ptr = 0;
498static int yy_start_stack_depth = 0;
499static int *yy_start_stack = 0;
500#ifndef YY_NO_PUSH_STATE
501static void yy_push_state YY_PROTO((
int new_state ));
503#ifndef YY_NO_POP_STATE
504static void yy_pop_state YY_PROTO((
void ));
506#ifndef YY_NO_TOP_STATE
507static int yy_top_state YY_PROTO((
void ));
511#define YY_NO_PUSH_STATE 1
512#define YY_NO_POP_STATE 1
513#define YY_NO_TOP_STATE 1
532#ifndef YY_READ_BUF_SIZE
533#define YY_READ_BUF_SIZE 8192
542#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
549#define YY_INPUT(buf,result,max_size) \
550 if ( yy_current_buffer->yy_is_interactive ) \
553 for ( n = 0; n < max_size && \
554 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
557 buf[n++] = (char) c; \
558 if ( c == EOF && ferror( yyin ) ) \
559 YY_FATAL_ERROR( "input in flex scanner failed" ); \
562 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
563 && ferror( yyin ) ) \
564 YY_FATAL_ERROR( "input in flex scanner failed" );
572#define yyterminate() return YY_NULL
576#ifndef YY_START_STACK_INCR
577#define YY_START_STACK_INCR 25
581#ifndef YY_FATAL_ERROR
582#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
589#define YY_DECL int yylex YY_PROTO(( void ))
595#ifndef YY_USER_ACTION
596#define YY_USER_ACTION
601#define YY_BREAK break;
604#define YY_RULE_SETUP \
606 yy_current_buffer->yy_at_bol = \
607 (yytext[yyleng - 1] == '\n'); \
612 yy_state_type yy_current_state;
616#line 47 "./fooscanner.l"
619#line 625 "./fooscanner.cpp"
638 if ( ! yy_current_buffer )
640 yy_create_buffer( yyin, YY_BUF_SIZE );
642 yy_load_buffer_state();
650 *yy_cp = yy_hold_char;
657 yy_current_state = yy_start;
658 yy_current_state += YY_AT_BOL();
662 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
663 if ( yy_accept[yy_current_state] )
665 yy_last_accepting_state = yy_current_state;
666 yy_last_accepting_cpos = yy_cp;
668 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
670 yy_current_state = (int) yy_def[yy_current_state];
671 if ( yy_current_state >= 55 )
672 yy_c = yy_meta[(
unsigned int) yy_c];
674 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
677 while ( yy_base[yy_current_state] != 94 );
680 yy_act = yy_accept[yy_current_state];
683 yy_cp = yy_last_accepting_cpos;
684 yy_current_state = yy_last_accepting_state;
685 yy_act = yy_accept[yy_current_state];
698 *yy_cp = yy_hold_char;
699 yy_cp = yy_last_accepting_cpos;
700 yy_current_state = yy_last_accepting_state;
704*yy_cp = yy_hold_char;
705yy_c_buf_p = yy_cp -= 1;
708#line 49 "./fooscanner.l"
713#line 50 "./fooscanner.l"
718#line 51 "./fooscanner.l"
723#line 52 "./fooscanner.l"
728#line 53 "./fooscanner.l"
733#line 55 "./fooscanner.l"
738#line 56 "./fooscanner.l"
743#line 57 "./fooscanner.l"
748#line 58 "./fooscanner.l"
753#line 59 "./fooscanner.l"
758#line 60 "./fooscanner.l"
763#line 61 "./fooscanner.l"
768#line 62 "./fooscanner.l"
773#line 64 "./fooscanner.l"
774{ yylval = TQCString(yytext+1, strlen(yytext)-1);
return STRING; }
778#line 65 "./fooscanner.l"
779{ yylval = TQCString(yytext+1, strlen(yytext)-1);
return QUOTED; }
783#line 66 "./fooscanner.l"
784{ yylval = yytext;
return NUMBER; }
788#line 67 "./fooscanner.l"
789{ yylval = yytext;
return NUMBER; }
793#line 68 "./fooscanner.l"
794{ yylval = yytext;
return NUMBER; }
797#line 71 "./fooscanner.l"
800#line 71 "./fooscanner.l"
805#line 73 "./fooscanner.l"
808#line 814 "./fooscanner.cpp"
809case YY_STATE_EOF(INITIAL):
812 case YY_END_OF_BUFFER:
815 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
818 *yy_cp = yy_hold_char;
819 YY_RESTORE_YY_MORE_OFFSET
821 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
832 yy_n_chars = yy_current_buffer->yy_n_chars;
833 yy_current_buffer->yy_input_file = yyin;
834 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
844 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
846 yy_state_type yy_next_state;
848 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
850 yy_current_state = yy_get_previous_state();
861 yy_next_state = yy_try_NUL_trans( yy_current_state );
863 yy_bp = yytext_ptr + YY_MORE_ADJ;
868 yy_cp = ++yy_c_buf_p;
869 yy_current_state = yy_next_state;
880 else switch ( yy_get_next_buffer() )
882 case EOB_ACT_END_OF_FILE:
884 yy_did_buffer_switch_on_eof = 0;
897 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
899 yy_act = YY_STATE_EOF(YY_START);
905 if ( ! yy_did_buffer_switch_on_eof )
911 case EOB_ACT_CONTINUE_SCAN:
913 yytext_ptr + yy_amount_of_matched_text;
915 yy_current_state = yy_get_previous_state();
918 yy_bp = yytext_ptr + YY_MORE_ADJ;
921 case EOB_ACT_LAST_MATCH:
923 &yy_current_buffer->yy_ch_buf[yy_n_chars];
925 yy_current_state = yy_get_previous_state();
928 yy_bp = yytext_ptr + YY_MORE_ADJ;
936 "fatal flex scanner internal error--no action found" );
950static int yy_get_next_buffer()
952 char *dest = yy_current_buffer->yy_ch_buf;
953 char *source = yytext_ptr;
954 int number_to_move, i;
957 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
959 "fatal flex scanner internal error--end of buffer missed" );
961 if ( yy_current_buffer->yy_fill_buffer == 0 )
963 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
968 return EOB_ACT_END_OF_FILE;
976 return EOB_ACT_LAST_MATCH;
983 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
985 for ( i = 0; i < number_to_move; ++i )
986 *(dest++) = *(source++);
988 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
992 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
997 yy_current_buffer->yy_buf_size - number_to_move - 1;
999 while ( num_to_read <= 0 )
1001#ifdef YY_USES_REJECT
1003"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1007 YY_BUFFER_STATE b = yy_current_buffer;
1009 int yy_c_buf_p_offset =
1010 (int) (yy_c_buf_p - b->yy_ch_buf);
1012 if ( b->yy_is_our_buffer )
1014 int new_size = b->yy_buf_size * 2;
1016 if ( new_size <= 0 )
1017 b->yy_buf_size += b->yy_buf_size / 8;
1019 b->yy_buf_size *= 2;
1021 b->yy_ch_buf = (
char *)
1023 yy_flex_realloc( (
void *) b->yy_ch_buf,
1024 b->yy_buf_size + 2 );
1030 if ( ! b->yy_ch_buf )
1032 "fatal error - scanner input buffer overflow" );
1034 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1036 num_to_read = yy_current_buffer->yy_buf_size -
1041 if ( num_to_read > YY_READ_BUF_SIZE )
1042 num_to_read = YY_READ_BUF_SIZE;
1045 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1046 yy_n_chars, num_to_read );
1048 yy_current_buffer->yy_n_chars = yy_n_chars;
1051 if ( yy_n_chars == 0 )
1053 if ( number_to_move == YY_MORE_ADJ )
1055 ret_val = EOB_ACT_END_OF_FILE;
1061 ret_val = EOB_ACT_LAST_MATCH;
1062 yy_current_buffer->yy_buffer_status =
1063 YY_BUFFER_EOF_PENDING;
1068 ret_val = EOB_ACT_CONTINUE_SCAN;
1070 yy_n_chars += number_to_move;
1071 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1072 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1074 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1082static yy_state_type yy_get_previous_state()
1084 yy_state_type yy_current_state;
1087 yy_current_state = yy_start;
1088 yy_current_state += YY_AT_BOL();
1090 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1092 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1093 if ( yy_accept[yy_current_state] )
1095 yy_last_accepting_state = yy_current_state;
1096 yy_last_accepting_cpos = yy_cp;
1098 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1100 yy_current_state = (int) yy_def[yy_current_state];
1101 if ( yy_current_state >= 55 )
1102 yy_c = yy_meta[(
unsigned int) yy_c];
1104 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1107 return yy_current_state;
1118static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1120static yy_state_type yy_try_NUL_trans( yy_current_state )
1121yy_state_type yy_current_state;
1125 char *yy_cp = yy_c_buf_p;
1128 if ( yy_accept[yy_current_state] )
1130 yy_last_accepting_state = yy_current_state;
1131 yy_last_accepting_cpos = yy_cp;
1133 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1135 yy_current_state = (int) yy_def[yy_current_state];
1136 if ( yy_current_state >= 55 )
1137 yy_c = yy_meta[(
unsigned int) yy_c];
1139 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1140 yy_is_jam = (yy_current_state == 54);
1142 return yy_is_jam ? 0 : yy_current_state;
1148static void yyunput(
int c,
char *yy_bp )
1150static void yyunput( c, yy_bp )
1155 char *yy_cp = yy_c_buf_p;
1158 *yy_cp = yy_hold_char;
1160 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1163 int number_to_move = yy_n_chars + 2;
1164 char *dest = &yy_current_buffer->yy_ch_buf[
1165 yy_current_buffer->yy_buf_size + 2];
1167 &yy_current_buffer->yy_ch_buf[number_to_move];
1169 while ( source > yy_current_buffer->yy_ch_buf )
1170 *--dest = *--source;
1172 yy_cp += (int) (dest - source);
1173 yy_bp += (int) (dest - source);
1174 yy_current_buffer->yy_n_chars =
1175 yy_n_chars = yy_current_buffer->yy_buf_size;
1177 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1178 YY_FATAL_ERROR(
"flex scanner push-back overflow" );
1181 *--yy_cp = (char) c;
1185 yy_hold_char = *yy_cp;
1199 *yy_c_buf_p = yy_hold_char;
1201 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1207 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1213 int offset = yy_c_buf_p - yytext_ptr;
1216 switch ( yy_get_next_buffer() )
1218 case EOB_ACT_LAST_MATCH:
1234 case EOB_ACT_END_OF_FILE:
1239 if ( ! yy_did_buffer_switch_on_eof )
1248 case EOB_ACT_CONTINUE_SCAN:
1249 yy_c_buf_p = yytext_ptr + offset;
1255 c = *(
unsigned char *) yy_c_buf_p;
1257 yy_hold_char = *++yy_c_buf_p;
1259 yy_current_buffer->yy_at_bol = (c ==
'\n');
1266void yyrestart( FILE *input_file )
1268void yyrestart( input_file )
1272 if ( ! yy_current_buffer )
1273 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1275 yy_init_buffer( yy_current_buffer, input_file );
1276 yy_load_buffer_state();
1281void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1283void yy_switch_to_buffer( new_buffer )
1284YY_BUFFER_STATE new_buffer;
1287 if ( yy_current_buffer == new_buffer )
1290 if ( yy_current_buffer )
1293 *yy_c_buf_p = yy_hold_char;
1294 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1295 yy_current_buffer->yy_n_chars = yy_n_chars;
1298 yy_current_buffer = new_buffer;
1299 yy_load_buffer_state();
1306 yy_did_buffer_switch_on_eof = 1;
1311void yy_load_buffer_state(
void )
1313void yy_load_buffer_state()
1316 yy_n_chars = yy_current_buffer->yy_n_chars;
1317 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1318 yyin = yy_current_buffer->yy_input_file;
1319 yy_hold_char = *yy_c_buf_p;
1324YY_BUFFER_STATE yy_create_buffer( FILE *file,
int size )
1326YY_BUFFER_STATE yy_create_buffer( file, size )
1333 b = (YY_BUFFER_STATE) yy_flex_alloc(
sizeof(
struct yy_buffer_state ) );
1335 YY_FATAL_ERROR(
"out of dynamic memory in yy_create_buffer()" );
1337 b->yy_buf_size = size;
1342 b->yy_ch_buf = (
char *) yy_flex_alloc( b->yy_buf_size + 2 );
1343 if ( ! b->yy_ch_buf )
1344 YY_FATAL_ERROR(
"out of dynamic memory in yy_create_buffer()" );
1346 b->yy_is_our_buffer = 1;
1348 yy_init_buffer( b, file );
1355void yy_delete_buffer( YY_BUFFER_STATE b )
1357void yy_delete_buffer( b )
1364 if ( b == yy_current_buffer )
1365 yy_current_buffer = (YY_BUFFER_STATE) 0;
1367 if ( b->yy_is_our_buffer )
1368 yy_flex_free( (
void *) b->yy_ch_buf );
1370 yy_flex_free( (
void *) b );
1376void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1378void yy_init_buffer( b, file )
1385 yy_flush_buffer( b );
1387 b->yy_input_file = file;
1388 b->yy_fill_buffer = 1;
1390#if YY_ALWAYS_INTERACTIVE
1391 b->yy_is_interactive = 1;
1393#if YY_NEVER_INTERACTIVE
1394 b->yy_is_interactive = 0;
1396 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1403void yy_flush_buffer( YY_BUFFER_STATE b )
1405void yy_flush_buffer( b )
1419 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1420 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1422 b->yy_buf_pos = &b->yy_ch_buf[0];
1425 b->yy_buffer_status = YY_BUFFER_NEW;
1427 if ( b == yy_current_buffer )
1428 yy_load_buffer_state();
1432#ifndef YY_NO_SCAN_BUFFER
1434YY_BUFFER_STATE yy_scan_buffer(
char *base, yy_size_t size )
1436YY_BUFFER_STATE yy_scan_buffer( base, size )
1444 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1445 base[size-1] != YY_END_OF_BUFFER_CHAR )
1449 b = (YY_BUFFER_STATE) yy_flex_alloc(
sizeof(
struct yy_buffer_state ) );
1451 YY_FATAL_ERROR(
"out of dynamic memory in yy_scan_buffer()" );
1453 b->yy_buf_size = size - 2;
1454 b->yy_buf_pos = b->yy_ch_buf = base;
1455 b->yy_is_our_buffer = 0;
1456 b->yy_input_file = 0;
1457 b->yy_n_chars = b->yy_buf_size;
1458 b->yy_is_interactive = 0;
1460 b->yy_fill_buffer = 0;
1461 b->yy_buffer_status = YY_BUFFER_NEW;
1463 yy_switch_to_buffer( b );
1470#ifndef YY_NO_SCAN_STRING
1472YY_BUFFER_STATE yy_scan_string( yyconst
char *yy_str )
1474YY_BUFFER_STATE yy_scan_string( yy_str )
1475yyconst
char *yy_str;
1479 for ( len = 0; yy_str[len]; ++len )
1482 return yy_scan_bytes( yy_str, len );
1487#ifndef YY_NO_SCAN_BYTES
1489YY_BUFFER_STATE yy_scan_bytes( yyconst
char *bytes,
int len )
1491YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1503 buf = (
char *) yy_flex_alloc( n );
1505 YY_FATAL_ERROR(
"out of dynamic memory in yy_scan_bytes()" );
1507 for ( i = 0; i < len; ++i )
1510 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1512 b = yy_scan_buffer( buf, n );
1514 YY_FATAL_ERROR(
"bad buffer in yy_scan_bytes()" );
1519 b->yy_is_our_buffer = 1;
1526#ifndef YY_NO_PUSH_STATE
1528static void yy_push_state(
int new_state )
1530static void yy_push_state( new_state )
1534 if ( yy_start_stack_ptr >= yy_start_stack_depth )
1538 yy_start_stack_depth += YY_START_STACK_INCR;
1539 new_size = yy_start_stack_depth *
sizeof( int );
1541 if ( ! yy_start_stack )
1542 yy_start_stack = (
int *) yy_flex_alloc( new_size );
1545 yy_start_stack = (
int *) yy_flex_realloc(
1546 (
void *) yy_start_stack, new_size );
1548 if ( ! yy_start_stack )
1550 "out of memory expanding start-condition stack" );
1553 yy_start_stack[yy_start_stack_ptr++] = YY_START;
1560#ifndef YY_NO_POP_STATE
1561static void yy_pop_state()
1563 if ( --yy_start_stack_ptr < 0 )
1564 YY_FATAL_ERROR(
"start-condition stack underflow" );
1566 BEGIN(yy_start_stack[yy_start_stack_ptr]);
1571#ifndef YY_NO_TOP_STATE
1572static int yy_top_state()
1574 return yy_start_stack[yy_start_stack_ptr - 1];
1578#ifndef YY_EXIT_FAILURE
1579#define YY_EXIT_FAILURE 2
1583static void yy_fatal_error( yyconst
char msg[] )
1585static void yy_fatal_error( msg )
1589 (void) fprintf( stderr,
"[fooscanner] %s\n", msg );
1590 exit( YY_EXIT_FAILURE );
1602 yytext[yyleng] = yy_hold_char; \
1603 yy_c_buf_p = yytext + n; \
1604 yy_hold_char = *yy_c_buf_p; \
1605 *yy_c_buf_p = '\0'; \
1615static void yy_flex_strncpy(
char *s1, yyconst
char *s2,
int n )
1617static void yy_flex_strncpy( s1, s2, n )
1624 for ( i = 0; i < n; ++i )
1629#ifdef YY_NEED_STRLEN
1631static int yy_flex_strlen( yyconst
char *s )
1633static int yy_flex_strlen( s )
1638 for ( n = 0; s[n]; ++n )
1647static void *yy_flex_alloc( yy_size_t size )
1649static void *yy_flex_alloc( size )
1653 return (
void *) malloc( size );
1657static void *yy_flex_realloc(
void *ptr, yy_size_t size )
1659static void *yy_flex_realloc( ptr, size )
1671 return (
void *) realloc( (
char *) ptr, size );
1675static void yy_flex_free(
void *ptr )
1677static void yy_flex_free( ptr )
1691#line 73 "./fooscanner.l"
1694void tdeprint_foomatic2scanner_init( TQIODevice *d )
1696 tdeprint_foomatic2scanner_device = d;
1699void tdeprint_foomatic2scanner_terminate()
1701 tdeprint_foomatic2scanner_device = NULL;