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

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.8
This website is maintained by Timothy Pearson.