• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeprint
 

tdeprint

  • tdeprint
fooscanner.cpp
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
17
18#line 19 "./fooscanner.cpp"
19/* A lexical scanner generated by flex */
20
21/* Scanner skeleton version:
22 * $Header$
23 */
24
25#define FLEX_SCANNER
26#define YY_FLEX_MAJOR_VERSION 2
27#define YY_FLEX_MINOR_VERSION 5
28
29#include <stdio.h>
30#include <unistd.h>
31
32
33/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
34#ifdef c_plusplus
35#ifndef __cplusplus
36#define __cplusplus
37#endif
38#endif
39
40
41#ifdef __cplusplus
42
43#include <stdlib.h>
44
45/* Use prototypes in function declarations. */
46#define YY_USE_PROTOS
47
48/* The "const" storage-class-modifier is valid. */
49#define YY_USE_CONST
50
51#else /* ! __cplusplus */
52
53#if __STDC__
54
55#define YY_USE_PROTOS
56#define YY_USE_CONST
57
58#endif /* __STDC__ */
59#endif /* ! __cplusplus */
60
61#ifdef YY_USE_CONST
62#define yyconst const
63#else
64#define yyconst
65#endif
66
67
68#ifdef YY_USE_PROTOS
69#define YY_PROTO(proto) proto
70#else
71#define YY_PROTO(proto) ()
72#endif
73
74/* Returned upon end-of-file. */
75#define YY_NULL 0
76
77/* Promotes a possibly negative, possibly signed char to an unsigned
78 * integer for use as an array index. If the signed char is negative,
79 * we want to instead treat it as an 8-bit unsigned char, hence the
80 * double cast.
81 */
82#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
83
84/* Enter a start condition. This macro really ought to take a parameter,
85 * but we do it the disgusting crufty way forced on us by the ()-less
86 * definition of BEGIN.
87 */
88#define BEGIN yy_start = 1 + 2 *
89
90/* Translate the current start state into a value that can be later handed
91 * to BEGIN to return to the state. The YYSTATE alias is for lex
92 * compatibility.
93 */
94#define YY_START ((yy_start - 1) / 2)
95#define YYSTATE YY_START
96
97/* Action number for EOF rule of a given start state. */
98#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
99
100/* Special action meaning "start processing a new file". */
101#define YY_NEW_FILE yyrestart( yyin )
102
103#define YY_END_OF_BUFFER_CHAR 0
104
105/* Size of default input buffer. */
106#define YY_BUF_SIZE 16384
107
108typedef struct yy_buffer_state *YY_BUFFER_STATE;
109
110extern int yyleng;
111extern FILE *yyin, *yyout;
112
113#define EOB_ACT_CONTINUE_SCAN 0
114#define EOB_ACT_END_OF_FILE 1
115#define EOB_ACT_LAST_MATCH 2
116
117/* The funky do-while in the following #define is used to turn the definition
118 * int a single C statement (which needs a semi-colon terminator). This
119 * avoids problems with code like:
120 *
121 * if ( condition_holds )
122 * yyless( 5 );
123 * else
124 * do_something_else();
125 *
126 * Prior to using the do-while the compiler would get upset at the
127 * "else" because it interpreted the "if" statement as being all
128 * done when it reached the ';' after the yyless() call.
129 */
130
131/* Return all but the first 'n' matched characters back to the input stream. */
132
133#define yyless(n) \
134 do \
135 { \
136 /* Undo effects of setting up yytext. */ \
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; /* set up yytext again */ \
141 } \
142 while ( 0 )
143
144#define unput(c) yyunput( c, yytext_ptr )
145
146/* The following is because we cannot portably get our hands on size_t
147 * (without autoconf's help, which isn't available because we want
148 * flex-generated scanners to compile on their own).
149 */
150typedef unsigned int yy_size_t;
151
152
153struct yy_buffer_state
154 {
155 FILE *yy_input_file;
156
157 char *yy_ch_buf; /* input buffer */
158 char *yy_buf_pos; /* current position in input buffer */
159
160 /* Size of input buffer in bytes, not including room for EOB
161 * characters.
162 */
163 yy_size_t yy_buf_size;
164
165 /* Number of characters read into yy_ch_buf, not including EOB
166 * characters.
167 */
168 int yy_n_chars;
169
170 /* Whether we "own" the buffer - i.e., we know we created it,
171 * and can realloc() it to grow it, and should free() it to
172 * delete it.
173 */
174 int yy_is_our_buffer;
175
176 /* Whether this is an "interactive" input source; if so, and
177 * if we're using stdio for input, then we want to use getc()
178 * instead of fread(), to make sure we stop fetching input after
179 * each newline.
180 */
181 int yy_is_interactive;
182
183 /* Whether we're considered to be at the beginning of a line.
184 * If so, '^' rules will be active on the next match, otherwise
185 * not.
186 */
187 int yy_at_bol;
188
189 /* Whether to try to fill the input buffer when we reach the
190 * end of it.
191 */
192 int yy_fill_buffer;
193
194 int yy_buffer_status;
195#define YY_BUFFER_NEW 0
196#define YY_BUFFER_NORMAL 1
197 /* When an EOF's been seen but there's still some text to process
198 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
199 * shouldn't try reading from the input source any more. We might
200 * still have a bunch of tokens to match, though, because of
201 * possible backing-up.
202 *
203 * When we actually see the EOF, we change the status to "new"
204 * (via yyrestart()), so that the user can continue scanning by
205 * just pointing yyin at a new input file.
206 */
207#define YY_BUFFER_EOF_PENDING 2
208 };
209
210static YY_BUFFER_STATE yy_current_buffer = 0;
211
212/* We provide macros for accessing buffer states in case in the
213 * future we want to put the buffer states in a more general
214 * "scanner state".
215 */
216#define YY_CURRENT_BUFFER yy_current_buffer
217
218
219/* yy_hold_char holds the character lost when yytext is formed. */
220static char yy_hold_char;
221
222static int yy_n_chars; /* number of characters read into yy_ch_buf */
223
224
225int yyleng;
226
227/* Points to current character in buffer. */
228static char *yy_c_buf_p = (char *) 0;
229static int yy_init = 1; /* whether we need to initialize */
230static int yy_start = 0; /* start state number */
231
232/* Flag which is used to allow yywrap()'s to do buffer switches
233 * instead of setting up a fresh yyin. A bit of a hack ...
234 */
235static int yy_did_buffer_switch_on_eof;
236
237void yyrestart YY_PROTO(( FILE *input_file ));
238
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 )
246
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 ));
250
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 * ));
254
255#define yy_new_buffer yy_create_buffer
256
257#define yy_set_interactive(is_interactive) \
258 { \
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; \
262 }
263
264#define yy_set_bol(at_bol) \
265 { \
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; \
269 }
270
271#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
272
273
274#define yywrap() 1
275#define YY_SKIP_YYWRAP
276typedef unsigned char YY_CHAR;
277FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
278typedef int yy_state_type;
279extern char *yytext;
280#define yytext_ptr yytext
281
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[] ));
286
287/* Done after the current pattern has been matched and before the
288 * corresponding action - sets up yytext.
289 */
290#define YY_DO_BEFORE_ACTION \
291 yytext_ptr = yy_bp; \
292 yyleng = (int) (yy_cp - yy_bp); \
293 yy_hold_char = *yy_cp; \
294 *yy_cp = '\0'; \
295 yy_c_buf_p = yy_cp;
296
297#define YY_NUM_RULES 21
298#define YY_END_OF_BUFFER 22
299static yyconst short int yy_accept[55] =
300 { 0,
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,
306 1, 0, 3, 0
307 } ;
308
309static yyconst int yy_ec[256] =
310 { 0,
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,
321
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,
332
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,
338 1, 1, 1, 1, 1
339 } ;
340
341static yyconst int yy_meta[34] =
342 { 0,
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,
346 1, 1, 1
347 } ;
348
349static yyconst short int yy_base[59] =
350 { 0,
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
357 } ;
358
359static yyconst short int yy_def[59] =
360 { 0,
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
367 } ;
368
369static yyconst short int yy_nxt[128] =
370 { 0,
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,
381
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
385 } ;
386
387static yyconst short int yy_chk[128] =
388 { 0,
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,
399
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
403 } ;
404
405static yy_state_type yy_last_accepting_state;
406static char *yy_last_accepting_cpos;
407
408/* The intent behind this definition is that it'll catch
409 * any uses of REJECT which flex missed.
410 */
411#define REJECT reject_used_but_not_detected
412#define yymore() yymore_used_but_not_detected
413#define YY_MORE_ADJ 0
414#define YY_RESTORE_YY_MORE_OFFSET
415char *yytext;
416#line 1 "./fooscanner.l"
417#define INITIAL 0
418#line 2 "./fooscanner.l"
419/*
420 * This file is part of the KDE libraries
421 * Copyright (c) 2001-2003 Michael Goffioul <tdeprint@swing.be>
422 *
423 * This library is free software; you can redistribute it and/or
424 * modify it under the terms of the GNU Library General Public
425 * License version 2 as published by the Free Software Foundation.
426 *
427 * This library is distributed in the hope that it will be useful,
428 * but WITHOUT ANY WARRANTY; without even the implied warranty of
429 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
430 * Library General Public License for more details.
431 *
432 * You should have received a copy of the GNU Library General Public License
433 * along with this library; see the file COPYING.LIB. If not, write to
434 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
435 * Boston, MA 02110-1301, USA.
436 **/
437
438#include <tqvariant.h>
439#include <tqiodevice.h>
440#define YYSTYPE TQVariant
441#include "fooparser.cpp.h"
442
443#define yylval tdeprint_foomatic2lval
444
445#define YY_INPUT( buf, result, max_size ) \
446 { \
447 if ( tdeprint_foomatic2scanner_device ) \
448 { \
449 result = tdeprint_foomatic2scanner_device->readBlock( buf, max_size ); \
450 if ( result < 0 ) \
451 { \
452 result = 0; \
453 } \
454 } \
455 else \
456 { \
457 result = 0; \
458 } \
459 }
460
461TQIODevice* tdeprint_foomatic2scanner_device = NULL;
462#line 468 "./fooscanner.cpp"
463
464/* Macros after this point can all be overridden by user definitions in
465 * section 1.
466 */
467
468#ifndef YY_SKIP_YYWRAP
469#ifdef __cplusplus
470extern "C" int yywrap YY_PROTO(( void ));
471#else
472extern int yywrap YY_PROTO(( void ));
473#endif
474#endif
475
476#ifndef YY_NO_UNPUT
477static void yyunput YY_PROTO(( int c, char *buf_ptr ));
478#endif
479
480#ifndef yytext_ptr
481static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
482#endif
483
484#ifdef YY_NEED_STRLEN
485static int yy_flex_strlen YY_PROTO(( yyconst char * ));
486#endif
487
488#ifndef YY_NO_INPUT
489#ifdef __cplusplus
490static int yyinput YY_PROTO(( void ));
491#else
492static int input YY_PROTO(( void ));
493#endif
494#endif
495
496#if YY_STACK_USED
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 ));
502#endif
503#ifndef YY_NO_POP_STATE
504static void yy_pop_state YY_PROTO(( void ));
505#endif
506#ifndef YY_NO_TOP_STATE
507static int yy_top_state YY_PROTO(( void ));
508#endif
509
510#else
511#define YY_NO_PUSH_STATE 1
512#define YY_NO_POP_STATE 1
513#define YY_NO_TOP_STATE 1
514#endif
515
516#ifdef YY_MALLOC_DECL
517YY_MALLOC_DECL
518#else
519#if __STDC__
520#ifndef __cplusplus
521#include <stdlib.h>
522#endif
523#else
524/* Just try to get by without declaring the routines. This will fail
525 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
526 * or sizeof(void*) != sizeof(int).
527 */
528#endif
529#endif
530
531/* Amount of stuff to slurp up with each read. */
532#ifndef YY_READ_BUF_SIZE
533#define YY_READ_BUF_SIZE 8192
534#endif
535
536/* Copy whatever the last rule matched to the standard output. */
537
538#ifndef ECHO
539/* This used to be an fputs(), but since the string might contain NUL's,
540 * we now use fwrite().
541 */
542#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
543#endif
544
545/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
546 * is returned in "result".
547 */
548#ifndef YY_INPUT
549#define YY_INPUT(buf,result,max_size) \
550 if ( yy_current_buffer->yy_is_interactive ) \
551 { \
552 int c = '*', n; \
553 for ( n = 0; n < max_size && \
554 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
555 buf[n] = (char) c; \
556 if ( c == '\n' ) \
557 buf[n++] = (char) c; \
558 if ( c == EOF && ferror( yyin ) ) \
559 YY_FATAL_ERROR( "input in flex scanner failed" ); \
560 result = n; \
561 } \
562 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
563 && ferror( yyin ) ) \
564 YY_FATAL_ERROR( "input in flex scanner failed" );
565#endif
566
567/* No semi-colon after return; correct usage is to write "yyterminate();" -
568 * we don't want an extra ';' after the "return" because that will cause
569 * some compilers to complain about unreachable statements.
570 */
571#ifndef yyterminate
572#define yyterminate() return YY_NULL
573#endif
574
575/* Number of entries by which start-condition stack grows. */
576#ifndef YY_START_STACK_INCR
577#define YY_START_STACK_INCR 25
578#endif
579
580/* Report a fatal error. */
581#ifndef YY_FATAL_ERROR
582#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
583#endif
584
585/* Default declaration of generated scanner - a define so the user can
586 * easily add parameters.
587 */
588#ifndef YY_DECL
589#define YY_DECL int yylex YY_PROTO(( void ))
590#endif
591
592/* Code executed at the beginning of each rule, after yytext and yyleng
593 * have been set up.
594 */
595#ifndef YY_USER_ACTION
596#define YY_USER_ACTION
597#endif
598
599/* Code executed at the end of each rule. */
600#ifndef YY_BREAK
601#define YY_BREAK break;
602#endif
603
604#define YY_RULE_SETUP \
605 if ( yyleng > 0 ) \
606 yy_current_buffer->yy_at_bol = \
607 (yytext[yyleng - 1] == '\n'); \
608 YY_USER_ACTION
609
610YY_DECL
611 {
612 yy_state_type yy_current_state;
613 char *yy_cp, *yy_bp;
614 int yy_act;
615
616#line 47 "./fooscanner.l"
617
618
619#line 625 "./fooscanner.cpp"
620
621 if ( yy_init )
622 {
623 yy_init = 0;
624
625#ifdef YY_USER_INIT
626 YY_USER_INIT;
627#endif
628
629 if ( ! yy_start )
630 yy_start = 1; /* first start state */
631
632 if ( ! yyin )
633 yyin = stdin;
634
635 if ( ! yyout )
636 yyout = stdout;
637
638 if ( ! yy_current_buffer )
639 yy_current_buffer =
640 yy_create_buffer( yyin, YY_BUF_SIZE );
641
642 yy_load_buffer_state();
643 }
644
645 while ( 1 ) /* loops until end-of-file is reached */
646 {
647 yy_cp = yy_c_buf_p;
648
649 /* Support of yytext. */
650 *yy_cp = yy_hold_char;
651
652 /* yy_bp points to the position in yy_ch_buf of the start of
653 * the current run.
654 */
655 yy_bp = yy_cp;
656
657 yy_current_state = yy_start;
658 yy_current_state += YY_AT_BOL();
659yy_match:
660 do
661 {
662 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
663 if ( yy_accept[yy_current_state] )
664 {
665 yy_last_accepting_state = yy_current_state;
666 yy_last_accepting_cpos = yy_cp;
667 }
668 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
669 {
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];
673 }
674 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
675 ++yy_cp;
676 }
677 while ( yy_base[yy_current_state] != 94 );
678
679yy_find_action:
680 yy_act = yy_accept[yy_current_state];
681 if ( yy_act == 0 )
682 { /* have to back up */
683 yy_cp = yy_last_accepting_cpos;
684 yy_current_state = yy_last_accepting_state;
685 yy_act = yy_accept[yy_current_state];
686 }
687
688 YY_DO_BEFORE_ACTION;
689
690
691do_action: /* This label is used only to access EOF actions. */
692
693
694 switch ( yy_act )
695 { /* beginning of action switch */
696 case 0: /* must back up */
697 /* undo the effects of YY_DO_BEFORE_ACTION */
698 *yy_cp = yy_hold_char;
699 yy_cp = yy_last_accepting_cpos;
700 yy_current_state = yy_last_accepting_state;
701 goto yy_find_action;
702
703case 1:
704*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
705yy_c_buf_p = yy_cp -= 1;
706YY_DO_BEFORE_ACTION; /* set up yytext again */
707YY_RULE_SETUP
708#line 49 "./fooscanner.l"
709{ /* eat up those assignments */ }
710 YY_BREAK
711case 2:
712YY_RULE_SETUP
713#line 50 "./fooscanner.l"
714{ return VAR; }
715 YY_BREAK
716case 3:
717YY_RULE_SETUP
718#line 51 "./fooscanner.l"
719{ return POSTPIPE; }
720 YY_BREAK
721case 4:
722YY_RULE_SETUP
723#line 52 "./fooscanner.l"
724{ return UNDEF; }
725 YY_BREAK
726case 5:
727YY_RULE_SETUP
728#line 53 "./fooscanner.l"
729{ /* eat up comment parts */ }
730 YY_BREAK
731case 6:
732YY_RULE_SETUP
733#line 55 "./fooscanner.l"
734{ return '='; }
735 YY_BREAK
736case 7:
737YY_RULE_SETUP
738#line 56 "./fooscanner.l"
739{ return '>'; }
740 YY_BREAK
741case 8:
742YY_RULE_SETUP
743#line 57 "./fooscanner.l"
744{ return ','; }
745 YY_BREAK
746case 9:
747YY_RULE_SETUP
748#line 58 "./fooscanner.l"
749{ return '{'; }
750 YY_BREAK
751case 10:
752YY_RULE_SETUP
753#line 59 "./fooscanner.l"
754{ return '}'; }
755 YY_BREAK
756case 11:
757YY_RULE_SETUP
758#line 60 "./fooscanner.l"
759{ return '['; }
760 YY_BREAK
761case 12:
762YY_RULE_SETUP
763#line 61 "./fooscanner.l"
764{ return ']'; }
765 YY_BREAK
766case 13:
767YY_RULE_SETUP
768#line 62 "./fooscanner.l"
769{ return ';'; }
770 YY_BREAK
771case 14:
772YY_RULE_SETUP
773#line 64 "./fooscanner.l"
774{ yylval = TQCString(yytext+1, strlen(yytext)-1); return STRING; }
775 YY_BREAK
776case 15:
777YY_RULE_SETUP
778#line 65 "./fooscanner.l"
779{ yylval = TQCString(yytext+1, strlen(yytext)-1); return QUOTED; }
780 YY_BREAK
781case 16:
782YY_RULE_SETUP
783#line 66 "./fooscanner.l"
784{ yylval = yytext; return NUMBER; }
785 YY_BREAK
786case 17:
787YY_RULE_SETUP
788#line 67 "./fooscanner.l"
789{ yylval = yytext; return NUMBER; }
790 YY_BREAK
791case 18:
792YY_RULE_SETUP
793#line 68 "./fooscanner.l"
794{ yylval = yytext; return NUMBER; }
795 YY_BREAK
796case 19:
797#line 71 "./fooscanner.l"
798case 20:
799YY_RULE_SETUP
800#line 71 "./fooscanner.l"
801{ /* eat up anything else */ }
802 YY_BREAK
803case 21:
804YY_RULE_SETUP
805#line 73 "./fooscanner.l"
806ECHO;
807 YY_BREAK
808#line 814 "./fooscanner.cpp"
809case YY_STATE_EOF(INITIAL):
810 yyterminate();
811
812 case YY_END_OF_BUFFER:
813 {
814 /* Amount of text matched not including the EOB char. */
815 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
816
817 /* Undo the effects of YY_DO_BEFORE_ACTION. */
818 *yy_cp = yy_hold_char;
819 YY_RESTORE_YY_MORE_OFFSET
820
821 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
822 {
823 /* We're scanning a new file or input source. It's
824 * possible that this happened because the user
825 * just pointed yyin at a new source and called
826 * yylex(). If so, then we have to assure
827 * consistency between yy_current_buffer and our
828 * globals. Here is the right place to do so, because
829 * this is the first action (other than possibly a
830 * back-up) that will match for the new input source.
831 */
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;
835 }
836
837 /* Note that here we test for yy_c_buf_p "<=" to the position
838 * of the first EOB in the buffer, since yy_c_buf_p will
839 * already have been incremented past the NUL character
840 * (since all states make transitions on EOB to the
841 * end-of-buffer state). Contrast this with the test
842 * in input().
843 */
844 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
845 { /* This was really a NUL. */
846 yy_state_type yy_next_state;
847
848 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
849
850 yy_current_state = yy_get_previous_state();
851
852 /* Okay, we're now positioned to make the NUL
853 * transition. We couldn't have
854 * yy_get_previous_state() go ahead and do it
855 * for us because it doesn't know how to deal
856 * with the possibility of jamming (and we don't
857 * want to build jamming into it because then it
858 * will run more slowly).
859 */
860
861 yy_next_state = yy_try_NUL_trans( yy_current_state );
862
863 yy_bp = yytext_ptr + YY_MORE_ADJ;
864
865 if ( yy_next_state )
866 {
867 /* Consume the NUL. */
868 yy_cp = ++yy_c_buf_p;
869 yy_current_state = yy_next_state;
870 goto yy_match;
871 }
872
873 else
874 {
875 yy_cp = yy_c_buf_p;
876 goto yy_find_action;
877 }
878 }
879
880 else switch ( yy_get_next_buffer() )
881 {
882 case EOB_ACT_END_OF_FILE:
883 {
884 yy_did_buffer_switch_on_eof = 0;
885
886 if ( yywrap() )
887 {
888 /* Note: because we've taken care in
889 * yy_get_next_buffer() to have set up
890 * yytext, we can now set up
891 * yy_c_buf_p so that if some total
892 * hoser (like flex itself) wants to
893 * call the scanner after we return the
894 * YY_NULL, it'll still work - another
895 * YY_NULL will get returned.
896 */
897 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
898
899 yy_act = YY_STATE_EOF(YY_START);
900 goto do_action;
901 }
902
903 else
904 {
905 if ( ! yy_did_buffer_switch_on_eof )
906 YY_NEW_FILE;
907 }
908 break;
909 }
910
911 case EOB_ACT_CONTINUE_SCAN:
912 yy_c_buf_p =
913 yytext_ptr + yy_amount_of_matched_text;
914
915 yy_current_state = yy_get_previous_state();
916
917 yy_cp = yy_c_buf_p;
918 yy_bp = yytext_ptr + YY_MORE_ADJ;
919 goto yy_match;
920
921 case EOB_ACT_LAST_MATCH:
922 yy_c_buf_p =
923 &yy_current_buffer->yy_ch_buf[yy_n_chars];
924
925 yy_current_state = yy_get_previous_state();
926
927 yy_cp = yy_c_buf_p;
928 yy_bp = yytext_ptr + YY_MORE_ADJ;
929 goto yy_find_action;
930 }
931 break;
932 }
933
934 default:
935 YY_FATAL_ERROR(
936 "fatal flex scanner internal error--no action found" );
937 } /* end of action switch */
938 } /* end of scanning one token */
939 } /* end of yylex */
940
941
942/* yy_get_next_buffer - try to read in a new buffer
943 *
944 * Returns a code representing an action:
945 * EOB_ACT_LAST_MATCH -
946 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
947 * EOB_ACT_END_OF_FILE - end of file
948 */
949
950static int yy_get_next_buffer()
951 {
952 char *dest = yy_current_buffer->yy_ch_buf;
953 char *source = yytext_ptr;
954 int number_to_move, i;
955 int ret_val;
956
957 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
958 YY_FATAL_ERROR(
959 "fatal flex scanner internal error--end of buffer missed" );
960
961 if ( yy_current_buffer->yy_fill_buffer == 0 )
962 { /* Don't try to fill the buffer, so this is an EOF. */
963 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
964 {
965 /* We matched a single character, the EOB, so
966 * treat this as a final EOF.
967 */
968 return EOB_ACT_END_OF_FILE;
969 }
970
971 else
972 {
973 /* We matched some text prior to the EOB, first
974 * process it.
975 */
976 return EOB_ACT_LAST_MATCH;
977 }
978 }
979
980 /* Try to read more data. */
981
982 /* First move last chars to start of buffer. */
983 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
984
985 for ( i = 0; i < number_to_move; ++i )
986 *(dest++) = *(source++);
987
988 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
989 /* don't do the read, it's not guaranteed to return an EOF,
990 * just force an EOF
991 */
992 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
993
994 else
995 {
996 int num_to_read =
997 yy_current_buffer->yy_buf_size - number_to_move - 1;
998
999 while ( num_to_read <= 0 )
1000 { /* Not enough room in the buffer - grow it. */
1001#ifdef YY_USES_REJECT
1002 YY_FATAL_ERROR(
1003"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1004#else
1005
1006 /* just a shorter name for the current buffer */
1007 YY_BUFFER_STATE b = yy_current_buffer;
1008
1009 int yy_c_buf_p_offset =
1010 (int) (yy_c_buf_p - b->yy_ch_buf);
1011
1012 if ( b->yy_is_our_buffer )
1013 {
1014 int new_size = b->yy_buf_size * 2;
1015
1016 if ( new_size <= 0 )
1017 b->yy_buf_size += b->yy_buf_size / 8;
1018 else
1019 b->yy_buf_size *= 2;
1020
1021 b->yy_ch_buf = (char *)
1022 /* Include room in for 2 EOB chars. */
1023 yy_flex_realloc( (void *) b->yy_ch_buf,
1024 b->yy_buf_size + 2 );
1025 }
1026 else
1027 /* Can't grow it, we don't own it. */
1028 b->yy_ch_buf = 0;
1029
1030 if ( ! b->yy_ch_buf )
1031 YY_FATAL_ERROR(
1032 "fatal error - scanner input buffer overflow" );
1033
1034 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1035
1036 num_to_read = yy_current_buffer->yy_buf_size -
1037 number_to_move - 1;
1038#endif
1039 }
1040
1041 if ( num_to_read > YY_READ_BUF_SIZE )
1042 num_to_read = YY_READ_BUF_SIZE;
1043
1044 /* Read in more data. */
1045 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1046 yy_n_chars, num_to_read );
1047
1048 yy_current_buffer->yy_n_chars = yy_n_chars;
1049 }
1050
1051 if ( yy_n_chars == 0 )
1052 {
1053 if ( number_to_move == YY_MORE_ADJ )
1054 {
1055 ret_val = EOB_ACT_END_OF_FILE;
1056 yyrestart( yyin );
1057 }
1058
1059 else
1060 {
1061 ret_val = EOB_ACT_LAST_MATCH;
1062 yy_current_buffer->yy_buffer_status =
1063 YY_BUFFER_EOF_PENDING;
1064 }
1065 }
1066
1067 else
1068 ret_val = EOB_ACT_CONTINUE_SCAN;
1069
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;
1073
1074 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1075
1076 return ret_val;
1077 }
1078
1079
1080/* yy_get_previous_state - get the state just before the EOB char was reached */
1081
1082static yy_state_type yy_get_previous_state()
1083 {
1084 yy_state_type yy_current_state;
1085 char *yy_cp;
1086
1087 yy_current_state = yy_start;
1088 yy_current_state += YY_AT_BOL();
1089
1090 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1091 {
1092 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1093 if ( yy_accept[yy_current_state] )
1094 {
1095 yy_last_accepting_state = yy_current_state;
1096 yy_last_accepting_cpos = yy_cp;
1097 }
1098 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1099 {
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];
1103 }
1104 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1105 }
1106
1107 return yy_current_state;
1108 }
1109
1110
1111/* yy_try_NUL_trans - try to make a transition on the NUL character
1112 *
1113 * synopsis
1114 * next_state = yy_try_NUL_trans( current_state );
1115 */
1116
1117#ifdef YY_USE_PROTOS
1118static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1119#else
1120static yy_state_type yy_try_NUL_trans( yy_current_state )
1121yy_state_type yy_current_state;
1122#endif
1123 {
1124 int yy_is_jam;
1125 char *yy_cp = yy_c_buf_p;
1126
1127 YY_CHAR yy_c = 1;
1128 if ( yy_accept[yy_current_state] )
1129 {
1130 yy_last_accepting_state = yy_current_state;
1131 yy_last_accepting_cpos = yy_cp;
1132 }
1133 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1134 {
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];
1138 }
1139 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1140 yy_is_jam = (yy_current_state == 54);
1141
1142 return yy_is_jam ? 0 : yy_current_state;
1143 }
1144
1145
1146#ifndef YY_NO_UNPUT
1147#ifdef YY_USE_PROTOS
1148static void yyunput( int c, char *yy_bp )
1149#else
1150static void yyunput( c, yy_bp )
1151int c;
1152char *yy_bp;
1153#endif
1154 {
1155 char *yy_cp = yy_c_buf_p;
1156
1157 /* undo effects of setting up yytext */
1158 *yy_cp = yy_hold_char;
1159
1160 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1161 { /* need to shift things up to make room */
1162 /* +2 for EOB chars. */
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];
1166 char *source =
1167 &yy_current_buffer->yy_ch_buf[number_to_move];
1168
1169 while ( source > yy_current_buffer->yy_ch_buf )
1170 *--dest = *--source;
1171
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;
1176
1177 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1178 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1179 }
1180
1181 *--yy_cp = (char) c;
1182
1183
1184 yytext_ptr = yy_bp;
1185 yy_hold_char = *yy_cp;
1186 yy_c_buf_p = yy_cp;
1187 }
1188#endif /* ifndef YY_NO_UNPUT */
1189
1190
1191#ifdef __cplusplus
1192static int yyinput()
1193#else
1194static int input()
1195#endif
1196 {
1197 int c;
1198
1199 *yy_c_buf_p = yy_hold_char;
1200
1201 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1202 {
1203 /* yy_c_buf_p now points to the character we want to return.
1204 * If this occurs *before* the EOB characters, then it's a
1205 * valid NUL; if not, then we've hit the end of the buffer.
1206 */
1207 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1208 /* This was really a NUL. */
1209 *yy_c_buf_p = '\0';
1210
1211 else
1212 { /* need more input */
1213 int offset = yy_c_buf_p - yytext_ptr;
1214 ++yy_c_buf_p;
1215
1216 switch ( yy_get_next_buffer() )
1217 {
1218 case EOB_ACT_LAST_MATCH:
1219 /* This happens because yy_g_n_b()
1220 * sees that we've accumulated a
1221 * token and flags that we need to
1222 * try matching the token before
1223 * proceeding. But for input(),
1224 * there's no matching to consider.
1225 * So convert the EOB_ACT_LAST_MATCH
1226 * to EOB_ACT_END_OF_FILE.
1227 */
1228
1229 /* Reset buffer status. */
1230 yyrestart( yyin );
1231
1232 /* fall through */
1233
1234 case EOB_ACT_END_OF_FILE:
1235 {
1236 if ( yywrap() )
1237 return EOF;
1238
1239 if ( ! yy_did_buffer_switch_on_eof )
1240 YY_NEW_FILE;
1241#ifdef __cplusplus
1242 return yyinput();
1243#else
1244 return input();
1245#endif
1246 }
1247
1248 case EOB_ACT_CONTINUE_SCAN:
1249 yy_c_buf_p = yytext_ptr + offset;
1250 break;
1251 }
1252 }
1253 }
1254
1255 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
1256 *yy_c_buf_p = '\0'; /* preserve yytext */
1257 yy_hold_char = *++yy_c_buf_p;
1258
1259 yy_current_buffer->yy_at_bol = (c == '\n');
1260
1261 return c;
1262 }
1263
1264
1265#ifdef YY_USE_PROTOS
1266void yyrestart( FILE *input_file )
1267#else
1268void yyrestart( input_file )
1269FILE *input_file;
1270#endif
1271 {
1272 if ( ! yy_current_buffer )
1273 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1274
1275 yy_init_buffer( yy_current_buffer, input_file );
1276 yy_load_buffer_state();
1277 }
1278
1279
1280#ifdef YY_USE_PROTOS
1281void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1282#else
1283void yy_switch_to_buffer( new_buffer )
1284YY_BUFFER_STATE new_buffer;
1285#endif
1286 {
1287 if ( yy_current_buffer == new_buffer )
1288 return;
1289
1290 if ( yy_current_buffer )
1291 {
1292 /* Flush out information for old 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;
1296 }
1297
1298 yy_current_buffer = new_buffer;
1299 yy_load_buffer_state();
1300
1301 /* We don't actually know whether we did this switch during
1302 * EOF (yywrap()) processing, but the only time this flag
1303 * is looked at is after yywrap() is called, so it's safe
1304 * to go ahead and always set it.
1305 */
1306 yy_did_buffer_switch_on_eof = 1;
1307 }
1308
1309
1310#ifdef YY_USE_PROTOS
1311void yy_load_buffer_state( void )
1312#else
1313void yy_load_buffer_state()
1314#endif
1315 {
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;
1320 }
1321
1322
1323#ifdef YY_USE_PROTOS
1324YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1325#else
1326YY_BUFFER_STATE yy_create_buffer( file, size )
1327FILE *file;
1328int size;
1329#endif
1330 {
1331 YY_BUFFER_STATE b;
1332
1333 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1334 if ( ! b )
1335 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1336
1337 b->yy_buf_size = size;
1338
1339 /* yy_ch_buf has to be 2 characters longer than the size given because
1340 * we need to put in 2 end-of-buffer characters.
1341 */
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()" );
1345
1346 b->yy_is_our_buffer = 1;
1347
1348 yy_init_buffer( b, file );
1349
1350 return b;
1351 }
1352
1353
1354#ifdef YY_USE_PROTOS
1355void yy_delete_buffer( YY_BUFFER_STATE b )
1356#else
1357void yy_delete_buffer( b )
1358YY_BUFFER_STATE b;
1359#endif
1360 {
1361 if ( ! b )
1362 return;
1363
1364 if ( b == yy_current_buffer )
1365 yy_current_buffer = (YY_BUFFER_STATE) 0;
1366
1367 if ( b->yy_is_our_buffer )
1368 yy_flex_free( (void *) b->yy_ch_buf );
1369
1370 yy_flex_free( (void *) b );
1371 }
1372
1373
1374
1375#ifdef YY_USE_PROTOS
1376void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1377#else
1378void yy_init_buffer( b, file )
1379YY_BUFFER_STATE b;
1380FILE *file;
1381#endif
1382
1383
1384 {
1385 yy_flush_buffer( b );
1386
1387 b->yy_input_file = file;
1388 b->yy_fill_buffer = 1;
1389
1390#if YY_ALWAYS_INTERACTIVE
1391 b->yy_is_interactive = 1;
1392#else
1393#if YY_NEVER_INTERACTIVE
1394 b->yy_is_interactive = 0;
1395#else
1396 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1397#endif
1398#endif
1399 }
1400
1401
1402#ifdef YY_USE_PROTOS
1403void yy_flush_buffer( YY_BUFFER_STATE b )
1404#else
1405void yy_flush_buffer( b )
1406YY_BUFFER_STATE b;
1407#endif
1408
1409 {
1410 if ( ! b )
1411 return;
1412
1413 b->yy_n_chars = 0;
1414
1415 /* We always need two end-of-buffer characters. The first causes
1416 * a transition to the end-of-buffer state. The second causes
1417 * a jam in that state.
1418 */
1419 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1420 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1421
1422 b->yy_buf_pos = &b->yy_ch_buf[0];
1423
1424 b->yy_at_bol = 1;
1425 b->yy_buffer_status = YY_BUFFER_NEW;
1426
1427 if ( b == yy_current_buffer )
1428 yy_load_buffer_state();
1429 }
1430
1431
1432#ifndef YY_NO_SCAN_BUFFER
1433#ifdef YY_USE_PROTOS
1434YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1435#else
1436YY_BUFFER_STATE yy_scan_buffer( base, size )
1437char *base;
1438yy_size_t size;
1439#endif
1440 {
1441 YY_BUFFER_STATE b;
1442
1443 if ( size < 2 ||
1444 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1445 base[size-1] != YY_END_OF_BUFFER_CHAR )
1446 /* They forgot to leave room for the EOB's. */
1447 return 0;
1448
1449 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1450 if ( ! b )
1451 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1452
1453 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
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;
1459 b->yy_at_bol = 1;
1460 b->yy_fill_buffer = 0;
1461 b->yy_buffer_status = YY_BUFFER_NEW;
1462
1463 yy_switch_to_buffer( b );
1464
1465 return b;
1466 }
1467#endif
1468
1469
1470#ifndef YY_NO_SCAN_STRING
1471#ifdef YY_USE_PROTOS
1472YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1473#else
1474YY_BUFFER_STATE yy_scan_string( yy_str )
1475yyconst char *yy_str;
1476#endif
1477 {
1478 int len;
1479 for ( len = 0; yy_str[len]; ++len )
1480 ;
1481
1482 return yy_scan_bytes( yy_str, len );
1483 }
1484#endif
1485
1486
1487#ifndef YY_NO_SCAN_BYTES
1488#ifdef YY_USE_PROTOS
1489YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1490#else
1491YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1492yyconst char *bytes;
1493int len;
1494#endif
1495 {
1496 YY_BUFFER_STATE b;
1497 char *buf;
1498 yy_size_t n;
1499 int i;
1500
1501 /* Get memory for full buffer, including space for trailing EOB's. */
1502 n = len + 2;
1503 buf = (char *) yy_flex_alloc( n );
1504 if ( ! buf )
1505 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1506
1507 for ( i = 0; i < len; ++i )
1508 buf[i] = bytes[i];
1509
1510 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1511
1512 b = yy_scan_buffer( buf, n );
1513 if ( ! b )
1514 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1515
1516 /* It's okay to grow etc. this buffer, and we should throw it
1517 * away when we're done.
1518 */
1519 b->yy_is_our_buffer = 1;
1520
1521 return b;
1522 }
1523#endif
1524
1525
1526#ifndef YY_NO_PUSH_STATE
1527#ifdef YY_USE_PROTOS
1528static void yy_push_state( int new_state )
1529#else
1530static void yy_push_state( new_state )
1531int new_state;
1532#endif
1533 {
1534 if ( yy_start_stack_ptr >= yy_start_stack_depth )
1535 {
1536 yy_size_t new_size;
1537
1538 yy_start_stack_depth += YY_START_STACK_INCR;
1539 new_size = yy_start_stack_depth * sizeof( int );
1540
1541 if ( ! yy_start_stack )
1542 yy_start_stack = (int *) yy_flex_alloc( new_size );
1543
1544 else
1545 yy_start_stack = (int *) yy_flex_realloc(
1546 (void *) yy_start_stack, new_size );
1547
1548 if ( ! yy_start_stack )
1549 YY_FATAL_ERROR(
1550 "out of memory expanding start-condition stack" );
1551 }
1552
1553 yy_start_stack[yy_start_stack_ptr++] = YY_START;
1554
1555 BEGIN(new_state);
1556 }
1557#endif
1558
1559
1560#ifndef YY_NO_POP_STATE
1561static void yy_pop_state()
1562 {
1563 if ( --yy_start_stack_ptr < 0 )
1564 YY_FATAL_ERROR( "start-condition stack underflow" );
1565
1566 BEGIN(yy_start_stack[yy_start_stack_ptr]);
1567 }
1568#endif
1569
1570
1571#ifndef YY_NO_TOP_STATE
1572static int yy_top_state()
1573 {
1574 return yy_start_stack[yy_start_stack_ptr - 1];
1575 }
1576#endif
1577
1578#ifndef YY_EXIT_FAILURE
1579#define YY_EXIT_FAILURE 2
1580#endif
1581
1582#ifdef YY_USE_PROTOS
1583static void yy_fatal_error( yyconst char msg[] )
1584#else
1585static void yy_fatal_error( msg )
1586char msg[];
1587#endif
1588 {
1589 (void) fprintf( stderr, "[fooscanner] %s\n", msg );
1590 exit( YY_EXIT_FAILURE );
1591 }
1592
1593
1594
1595/* Redefine yyless() so it works in section 3 code. */
1596
1597#undef yyless
1598#define yyless(n) \
1599 do \
1600 { \
1601 /* Undo effects of setting up yytext. */ \
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'; \
1606 yyleng = n; \
1607 } \
1608 while ( 0 )
1609
1610
1611/* Internal utility routines. */
1612
1613#ifndef yytext_ptr
1614#ifdef YY_USE_PROTOS
1615static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1616#else
1617static void yy_flex_strncpy( s1, s2, n )
1618char *s1;
1619yyconst char *s2;
1620int n;
1621#endif
1622 {
1623 int i;
1624 for ( i = 0; i < n; ++i )
1625 s1[i] = s2[i];
1626 }
1627#endif
1628
1629#ifdef YY_NEED_STRLEN
1630#ifdef YY_USE_PROTOS
1631static int yy_flex_strlen( yyconst char *s )
1632#else
1633static int yy_flex_strlen( s )
1634yyconst char *s;
1635#endif
1636 {
1637 int n;
1638 for ( n = 0; s[n]; ++n )
1639 ;
1640
1641 return n;
1642 }
1643#endif
1644
1645
1646#ifdef YY_USE_PROTOS
1647static void *yy_flex_alloc( yy_size_t size )
1648#else
1649static void *yy_flex_alloc( size )
1650yy_size_t size;
1651#endif
1652 {
1653 return (void *) malloc( size );
1654 }
1655
1656#ifdef YY_USE_PROTOS
1657static void *yy_flex_realloc( void *ptr, yy_size_t size )
1658#else
1659static void *yy_flex_realloc( ptr, size )
1660void *ptr;
1661yy_size_t size;
1662#endif
1663 {
1664 /* The cast to (char *) in the following accommodates both
1665 * implementations that use char* generic pointers, and those
1666 * that use void* generic pointers. It works with the latter
1667 * because both ANSI C and C++ allow castless assignment from
1668 * any pointer type to void*, and deal with argument conversions
1669 * as though doing an assignment.
1670 */
1671 return (void *) realloc( (char *) ptr, size );
1672 }
1673
1674#ifdef YY_USE_PROTOS
1675static void yy_flex_free( void *ptr )
1676#else
1677static void yy_flex_free( ptr )
1678void *ptr;
1679#endif
1680 {
1681 free( ptr );
1682 }
1683
1684#if YY_MAIN
1685int main()
1686 {
1687 yylex();
1688 return 0;
1689 }
1690#endif
1691#line 73 "./fooscanner.l"
1692
1693
1694void tdeprint_foomatic2scanner_init( TQIODevice *d )
1695{
1696 tdeprint_foomatic2scanner_device = d;
1697}
1698
1699void tdeprint_foomatic2scanner_terminate()
1700{
1701 tdeprint_foomatic2scanner_device = NULL;
1702}

tdeprint

Skip menu "tdeprint"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

tdeprint

Skip menu "tdeprint"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeprint by doxygen 1.9.4
This website is maintained by Timothy Pearson.