• 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 
117 typedef struct yy_buffer_state *YY_BUFFER_STATE;
118 
119 extern int yyleng;
120 extern 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  */
159 typedef unsigned int yy_size_t;
160 
161 
162 struct 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 
219 static 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. */
229 static char yy_hold_char;
230 
231 static int yy_n_chars; /* number of characters read into yy_ch_buf */
232 
233 
234 int yyleng;
235 
236 /* Points to current character in buffer. */
237 static char *yy_c_buf_p = (char *) 0;
238 static int yy_init = 1; /* whether we need to initialize */
239 static 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  */
244 static int yy_did_buffer_switch_on_eof;
245 
246 void yyrestart YY_PROTO(( FILE *input_file ));
247 
248 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
249 void yy_load_buffer_state YY_PROTO(( void ));
250 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
251 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
252 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
253 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
254 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
255 
256 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
257 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
258 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
259 
260 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
261 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
262 static void yy_flex_free YY_PROTO(( void * ));
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
285 typedef unsigned char YY_CHAR;
286 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
287 typedef int yy_state_type;
288 extern char *yytext;
289 #define yytext_ptr yytext
290 
291 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
292 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
293 static int yy_get_next_buffer YY_PROTO(( void ));
294 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
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
308 static 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 
318 static 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 
350 static 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 
358 static 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 
368 static 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 
378 static 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 
396 static 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 
414 static yy_state_type yy_last_accepting_state;
415 static 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
424 char *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  result = 0; \
461  } \
462  else \
463  result = 0; \
464  }
465 
466 TQIODevice* tdeprint_foomatic2scanner_device = NULL;
467 #line 468 "./fooscanner.cpp"
468 
469 /* Macros after this point can all be overridden by user definitions in
470  * section 1.
471  */
472 
473 #ifndef YY_SKIP_YYWRAP
474 #ifdef __cplusplus
475 extern "C" int yywrap YY_PROTO(( void ));
476 #else
477 extern int yywrap YY_PROTO(( void ));
478 #endif
479 #endif
480 
481 #ifndef YY_NO_UNPUT
482 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
483 #endif
484 
485 #ifndef yytext_ptr
486 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
487 #endif
488 
489 #ifdef YY_NEED_STRLEN
490 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
491 #endif
492 
493 #ifndef YY_NO_INPUT
494 #ifdef __cplusplus
495 static int yyinput YY_PROTO(( void ));
496 #else
497 static int input YY_PROTO(( void ));
498 #endif
499 #endif
500 
501 #if YY_STACK_USED
502 static int yy_start_stack_ptr = 0;
503 static int yy_start_stack_depth = 0;
504 static int *yy_start_stack = 0;
505 #ifndef YY_NO_PUSH_STATE
506 static void yy_push_state YY_PROTO(( int new_state ));
507 #endif
508 #ifndef YY_NO_POP_STATE
509 static void yy_pop_state YY_PROTO(( void ));
510 #endif
511 #ifndef YY_NO_TOP_STATE
512 static int yy_top_state YY_PROTO(( void ));
513 #endif
514 
515 #else
516 #define YY_NO_PUSH_STATE 1
517 #define YY_NO_POP_STATE 1
518 #define YY_NO_TOP_STATE 1
519 #endif
520 
521 #ifdef YY_MALLOC_DECL
522 YY_MALLOC_DECL
523 #else
524 #if __STDC__
525 #ifndef __cplusplus
526 #include <stdlib.h>
527 #endif
528 #else
529 /* Just try to get by without declaring the routines. This will fail
530  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
531  * or sizeof(void*) != sizeof(int).
532  */
533 #endif
534 #endif
535 
536 /* Amount of stuff to slurp up with each read. */
537 #ifndef YY_READ_BUF_SIZE
538 #define YY_READ_BUF_SIZE 8192
539 #endif
540 
541 /* Copy whatever the last rule matched to the standard output. */
542 
543 #ifndef ECHO
544 /* This used to be an fputs(), but since the string might contain NUL's,
545  * we now use fwrite().
546  */
547 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
548 #endif
549 
550 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
551  * is returned in "result".
552  */
553 #ifndef YY_INPUT
554 #define YY_INPUT(buf,result,max_size) \
555  if ( yy_current_buffer->yy_is_interactive ) \
556  { \
557  int c = '*', n; \
558  for ( n = 0; n < max_size && \
559  (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
560  buf[n] = (char) c; \
561  if ( c == '\n' ) \
562  buf[n++] = (char) c; \
563  if ( c == EOF && ferror( yyin ) ) \
564  YY_FATAL_ERROR( "input in flex scanner failed" ); \
565  result = n; \
566  } \
567  else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
568  && ferror( yyin ) ) \
569  YY_FATAL_ERROR( "input in flex scanner failed" );
570 #endif
571 
572 /* No semi-colon after return; correct usage is to write "yyterminate();" -
573  * we don't want an extra ';' after the "return" because that will cause
574  * some compilers to complain about unreachable statements.
575  */
576 #ifndef yyterminate
577 #define yyterminate() return YY_NULL
578 #endif
579 
580 /* Number of entries by which start-condition stack grows. */
581 #ifndef YY_START_STACK_INCR
582 #define YY_START_STACK_INCR 25
583 #endif
584 
585 /* Report a fatal error. */
586 #ifndef YY_FATAL_ERROR
587 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
588 #endif
589 
590 /* Default declaration of generated scanner - a define so the user can
591  * easily add parameters.
592  */
593 #ifndef YY_DECL
594 #define YY_DECL int yylex YY_PROTO(( void ))
595 #endif
596 
597 /* Code executed at the beginning of each rule, after yytext and yyleng
598  * have been set up.
599  */
600 #ifndef YY_USER_ACTION
601 #define YY_USER_ACTION
602 #endif
603 
604 /* Code executed at the end of each rule. */
605 #ifndef YY_BREAK
606 #define YY_BREAK break;
607 #endif
608 
609 #define YY_RULE_SETUP \
610  if ( yyleng > 0 ) \
611  yy_current_buffer->yy_at_bol = \
612  (yytext[yyleng - 1] == '\n'); \
613  YY_USER_ACTION
614 
615 YY_DECL
616  {
617  register yy_state_type yy_current_state;
618  register char *yy_cp, *yy_bp;
619  register int yy_act;
620 
621 #line 47 "./fooscanner.l"
622 
623 
624 #line 625 "./fooscanner.cpp"
625 
626  if ( yy_init )
627  {
628  yy_init = 0;
629 
630 #ifdef YY_USER_INIT
631  YY_USER_INIT;
632 #endif
633 
634  if ( ! yy_start )
635  yy_start = 1; /* first start state */
636 
637  if ( ! yyin )
638  yyin = stdin;
639 
640  if ( ! yyout )
641  yyout = stdout;
642 
643  if ( ! yy_current_buffer )
644  yy_current_buffer =
645  yy_create_buffer( yyin, YY_BUF_SIZE );
646 
647  yy_load_buffer_state();
648  }
649 
650  while ( 1 ) /* loops until end-of-file is reached */
651  {
652  yy_cp = yy_c_buf_p;
653 
654  /* Support of yytext. */
655  *yy_cp = yy_hold_char;
656 
657  /* yy_bp points to the position in yy_ch_buf of the start of
658  * the current run.
659  */
660  yy_bp = yy_cp;
661 
662  yy_current_state = yy_start;
663  yy_current_state += YY_AT_BOL();
664 yy_match:
665  do
666  {
667  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
668  if ( yy_accept[yy_current_state] )
669  {
670  yy_last_accepting_state = yy_current_state;
671  yy_last_accepting_cpos = yy_cp;
672  }
673  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
674  {
675  yy_current_state = (int) yy_def[yy_current_state];
676  if ( yy_current_state >= 55 )
677  yy_c = yy_meta[(unsigned int) yy_c];
678  }
679  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
680  ++yy_cp;
681  }
682  while ( yy_base[yy_current_state] != 94 );
683 
684 yy_find_action:
685  yy_act = yy_accept[yy_current_state];
686  if ( yy_act == 0 )
687  { /* have to back up */
688  yy_cp = yy_last_accepting_cpos;
689  yy_current_state = yy_last_accepting_state;
690  yy_act = yy_accept[yy_current_state];
691  }
692 
693  YY_DO_BEFORE_ACTION;
694 
695 
696 do_action: /* This label is used only to access EOF actions. */
697 
698 
699  switch ( yy_act )
700  { /* beginning of action switch */
701  case 0: /* must back up */
702  /* undo the effects of YY_DO_BEFORE_ACTION */
703  *yy_cp = yy_hold_char;
704  yy_cp = yy_last_accepting_cpos;
705  yy_current_state = yy_last_accepting_state;
706  goto yy_find_action;
707 
708 case 1:
709 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
710 yy_c_buf_p = yy_cp -= 1;
711 YY_DO_BEFORE_ACTION; /* set up yytext again */
712 YY_RULE_SETUP
713 #line 49 "./fooscanner.l"
714 { /* eat up those assignments */ }
715  YY_BREAK
716 case 2:
717 YY_RULE_SETUP
718 #line 50 "./fooscanner.l"
719 { return VAR; }
720  YY_BREAK
721 case 3:
722 YY_RULE_SETUP
723 #line 51 "./fooscanner.l"
724 { return POSTPIPE; }
725  YY_BREAK
726 case 4:
727 YY_RULE_SETUP
728 #line 52 "./fooscanner.l"
729 { return UNDEF; }
730  YY_BREAK
731 case 5:
732 YY_RULE_SETUP
733 #line 53 "./fooscanner.l"
734 { /* eat up comment parts */ }
735  YY_BREAK
736 case 6:
737 YY_RULE_SETUP
738 #line 55 "./fooscanner.l"
739 { return '='; }
740  YY_BREAK
741 case 7:
742 YY_RULE_SETUP
743 #line 56 "./fooscanner.l"
744 { return '>'; }
745  YY_BREAK
746 case 8:
747 YY_RULE_SETUP
748 #line 57 "./fooscanner.l"
749 { return ','; }
750  YY_BREAK
751 case 9:
752 YY_RULE_SETUP
753 #line 58 "./fooscanner.l"
754 { return '{'; }
755  YY_BREAK
756 case 10:
757 YY_RULE_SETUP
758 #line 59 "./fooscanner.l"
759 { return '}'; }
760  YY_BREAK
761 case 11:
762 YY_RULE_SETUP
763 #line 60 "./fooscanner.l"
764 { return '['; }
765  YY_BREAK
766 case 12:
767 YY_RULE_SETUP
768 #line 61 "./fooscanner.l"
769 { return ']'; }
770  YY_BREAK
771 case 13:
772 YY_RULE_SETUP
773 #line 62 "./fooscanner.l"
774 { return ';'; }
775  YY_BREAK
776 case 14:
777 YY_RULE_SETUP
778 #line 64 "./fooscanner.l"
779 { yylval = TQCString(yytext+1, strlen(yytext)-1); return STRING; }
780  YY_BREAK
781 case 15:
782 YY_RULE_SETUP
783 #line 65 "./fooscanner.l"
784 { yylval = TQCString(yytext+1, strlen(yytext)-1); return QUOTED; }
785  YY_BREAK
786 case 16:
787 YY_RULE_SETUP
788 #line 66 "./fooscanner.l"
789 { yylval = yytext; return NUMBER; }
790  YY_BREAK
791 case 17:
792 YY_RULE_SETUP
793 #line 67 "./fooscanner.l"
794 { yylval = yytext; return NUMBER; }
795  YY_BREAK
796 case 18:
797 YY_RULE_SETUP
798 #line 68 "./fooscanner.l"
799 { yylval = yytext; return NUMBER; }
800  YY_BREAK
801 case 19:
802 #line 71 "./fooscanner.l"
803 case 20:
804 YY_RULE_SETUP
805 #line 71 "./fooscanner.l"
806 { /* eat up anything else */ }
807  YY_BREAK
808 case 21:
809 YY_RULE_SETUP
810 #line 73 "./fooscanner.l"
811 ECHO;
812  YY_BREAK
813 #line 814 "./fooscanner.cpp"
814 case YY_STATE_EOF(INITIAL):
815  yyterminate();
816 
817  case YY_END_OF_BUFFER:
818  {
819  /* Amount of text matched not including the EOB char. */
820  int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
821 
822  /* Undo the effects of YY_DO_BEFORE_ACTION. */
823  *yy_cp = yy_hold_char;
824  YY_RESTORE_YY_MORE_OFFSET
825 
826  if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
827  {
828  /* We're scanning a new file or input source. It's
829  * possible that this happened because the user
830  * just pointed yyin at a new source and called
831  * yylex(). If so, then we have to assure
832  * consistency between yy_current_buffer and our
833  * globals. Here is the right place to do so, because
834  * this is the first action (other than possibly a
835  * back-up) that will match for the new input source.
836  */
837  yy_n_chars = yy_current_buffer->yy_n_chars;
838  yy_current_buffer->yy_input_file = yyin;
839  yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
840  }
841 
842  /* Note that here we test for yy_c_buf_p "<=" to the position
843  * of the first EOB in the buffer, since yy_c_buf_p will
844  * already have been incremented past the NUL character
845  * (since all states make transitions on EOB to the
846  * end-of-buffer state). Contrast this with the test
847  * in input().
848  */
849  if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
850  { /* This was really a NUL. */
851  yy_state_type yy_next_state;
852 
853  yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
854 
855  yy_current_state = yy_get_previous_state();
856 
857  /* Okay, we're now positioned to make the NUL
858  * transition. We couldn't have
859  * yy_get_previous_state() go ahead and do it
860  * for us because it doesn't know how to deal
861  * with the possibility of jamming (and we don't
862  * want to build jamming into it because then it
863  * will run more slowly).
864  */
865 
866  yy_next_state = yy_try_NUL_trans( yy_current_state );
867 
868  yy_bp = yytext_ptr + YY_MORE_ADJ;
869 
870  if ( yy_next_state )
871  {
872  /* Consume the NUL. */
873  yy_cp = ++yy_c_buf_p;
874  yy_current_state = yy_next_state;
875  goto yy_match;
876  }
877 
878  else
879  {
880  yy_cp = yy_c_buf_p;
881  goto yy_find_action;
882  }
883  }
884 
885  else switch ( yy_get_next_buffer() )
886  {
887  case EOB_ACT_END_OF_FILE:
888  {
889  yy_did_buffer_switch_on_eof = 0;
890 
891  if ( yywrap() )
892  {
893  /* Note: because we've taken care in
894  * yy_get_next_buffer() to have set up
895  * yytext, we can now set up
896  * yy_c_buf_p so that if some total
897  * hoser (like flex itself) wants to
898  * call the scanner after we return the
899  * YY_NULL, it'll still work - another
900  * YY_NULL will get returned.
901  */
902  yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
903 
904  yy_act = YY_STATE_EOF(YY_START);
905  goto do_action;
906  }
907 
908  else
909  {
910  if ( ! yy_did_buffer_switch_on_eof )
911  YY_NEW_FILE;
912  }
913  break;
914  }
915 
916  case EOB_ACT_CONTINUE_SCAN:
917  yy_c_buf_p =
918  yytext_ptr + yy_amount_of_matched_text;
919 
920  yy_current_state = yy_get_previous_state();
921 
922  yy_cp = yy_c_buf_p;
923  yy_bp = yytext_ptr + YY_MORE_ADJ;
924  goto yy_match;
925 
926  case EOB_ACT_LAST_MATCH:
927  yy_c_buf_p =
928  &yy_current_buffer->yy_ch_buf[yy_n_chars];
929 
930  yy_current_state = yy_get_previous_state();
931 
932  yy_cp = yy_c_buf_p;
933  yy_bp = yytext_ptr + YY_MORE_ADJ;
934  goto yy_find_action;
935  }
936  break;
937  }
938 
939  default:
940  YY_FATAL_ERROR(
941  "fatal flex scanner internal error--no action found" );
942  } /* end of action switch */
943  } /* end of scanning one token */
944  } /* end of yylex */
945 
946 
947 /* yy_get_next_buffer - try to read in a new buffer
948  *
949  * Returns a code representing an action:
950  * EOB_ACT_LAST_MATCH -
951  * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
952  * EOB_ACT_END_OF_FILE - end of file
953  */
954 
955 static int yy_get_next_buffer()
956  {
957  register char *dest = yy_current_buffer->yy_ch_buf;
958  register char *source = yytext_ptr;
959  register int number_to_move, i;
960  int ret_val;
961 
962  if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
963  YY_FATAL_ERROR(
964  "fatal flex scanner internal error--end of buffer missed" );
965 
966  if ( yy_current_buffer->yy_fill_buffer == 0 )
967  { /* Don't try to fill the buffer, so this is an EOF. */
968  if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
969  {
970  /* We matched a single character, the EOB, so
971  * treat this as a final EOF.
972  */
973  return EOB_ACT_END_OF_FILE;
974  }
975 
976  else
977  {
978  /* We matched some text prior to the EOB, first
979  * process it.
980  */
981  return EOB_ACT_LAST_MATCH;
982  }
983  }
984 
985  /* Try to read more data. */
986 
987  /* First move last chars to start of buffer. */
988  number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
989 
990  for ( i = 0; i < number_to_move; ++i )
991  *(dest++) = *(source++);
992 
993  if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
994  /* don't do the read, it's not guaranteed to return an EOF,
995  * just force an EOF
996  */
997  yy_current_buffer->yy_n_chars = yy_n_chars = 0;
998 
999  else
1000  {
1001  int num_to_read =
1002  yy_current_buffer->yy_buf_size - number_to_move - 1;
1003 
1004  while ( num_to_read <= 0 )
1005  { /* Not enough room in the buffer - grow it. */
1006 #ifdef YY_USES_REJECT
1007  YY_FATAL_ERROR(
1008 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1009 #else
1010 
1011  /* just a shorter name for the current buffer */
1012  YY_BUFFER_STATE b = yy_current_buffer;
1013 
1014  int yy_c_buf_p_offset =
1015  (int) (yy_c_buf_p - b->yy_ch_buf);
1016 
1017  if ( b->yy_is_our_buffer )
1018  {
1019  int new_size = b->yy_buf_size * 2;
1020 
1021  if ( new_size <= 0 )
1022  b->yy_buf_size += b->yy_buf_size / 8;
1023  else
1024  b->yy_buf_size *= 2;
1025 
1026  b->yy_ch_buf = (char *)
1027  /* Include room in for 2 EOB chars. */
1028  yy_flex_realloc( (void *) b->yy_ch_buf,
1029  b->yy_buf_size + 2 );
1030  }
1031  else
1032  /* Can't grow it, we don't own it. */
1033  b->yy_ch_buf = 0;
1034 
1035  if ( ! b->yy_ch_buf )
1036  YY_FATAL_ERROR(
1037  "fatal error - scanner input buffer overflow" );
1038 
1039  yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1040 
1041  num_to_read = yy_current_buffer->yy_buf_size -
1042  number_to_move - 1;
1043 #endif
1044  }
1045 
1046  if ( num_to_read > YY_READ_BUF_SIZE )
1047  num_to_read = YY_READ_BUF_SIZE;
1048 
1049  /* Read in more data. */
1050  YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1051  yy_n_chars, num_to_read );
1052 
1053  yy_current_buffer->yy_n_chars = yy_n_chars;
1054  }
1055 
1056  if ( yy_n_chars == 0 )
1057  {
1058  if ( number_to_move == YY_MORE_ADJ )
1059  {
1060  ret_val = EOB_ACT_END_OF_FILE;
1061  yyrestart( yyin );
1062  }
1063 
1064  else
1065  {
1066  ret_val = EOB_ACT_LAST_MATCH;
1067  yy_current_buffer->yy_buffer_status =
1068  YY_BUFFER_EOF_PENDING;
1069  }
1070  }
1071 
1072  else
1073  ret_val = EOB_ACT_CONTINUE_SCAN;
1074 
1075  yy_n_chars += number_to_move;
1076  yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1077  yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1078 
1079  yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1080 
1081  return ret_val;
1082  }
1083 
1084 
1085 /* yy_get_previous_state - get the state just before the EOB char was reached */
1086 
1087 static yy_state_type yy_get_previous_state()
1088  {
1089  register yy_state_type yy_current_state;
1090  register char *yy_cp;
1091 
1092  yy_current_state = yy_start;
1093  yy_current_state += YY_AT_BOL();
1094 
1095  for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1096  {
1097  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1098  if ( yy_accept[yy_current_state] )
1099  {
1100  yy_last_accepting_state = yy_current_state;
1101  yy_last_accepting_cpos = yy_cp;
1102  }
1103  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1104  {
1105  yy_current_state = (int) yy_def[yy_current_state];
1106  if ( yy_current_state >= 55 )
1107  yy_c = yy_meta[(unsigned int) yy_c];
1108  }
1109  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1110  }
1111 
1112  return yy_current_state;
1113  }
1114 
1115 
1116 /* yy_try_NUL_trans - try to make a transition on the NUL character
1117  *
1118  * synopsis
1119  * next_state = yy_try_NUL_trans( current_state );
1120  */
1121 
1122 #ifdef YY_USE_PROTOS
1123 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1124 #else
1125 static yy_state_type yy_try_NUL_trans( yy_current_state )
1126 yy_state_type yy_current_state;
1127 #endif
1128  {
1129  register int yy_is_jam;
1130  register char *yy_cp = yy_c_buf_p;
1131 
1132  register YY_CHAR yy_c = 1;
1133  if ( yy_accept[yy_current_state] )
1134  {
1135  yy_last_accepting_state = yy_current_state;
1136  yy_last_accepting_cpos = yy_cp;
1137  }
1138  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1139  {
1140  yy_current_state = (int) yy_def[yy_current_state];
1141  if ( yy_current_state >= 55 )
1142  yy_c = yy_meta[(unsigned int) yy_c];
1143  }
1144  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1145  yy_is_jam = (yy_current_state == 54);
1146 
1147  return yy_is_jam ? 0 : yy_current_state;
1148  }
1149 
1150 
1151 #ifndef YY_NO_UNPUT
1152 #ifdef YY_USE_PROTOS
1153 static void yyunput( int c, register char *yy_bp )
1154 #else
1155 static void yyunput( c, yy_bp )
1156 int c;
1157 register char *yy_bp;
1158 #endif
1159  {
1160  register char *yy_cp = yy_c_buf_p;
1161 
1162  /* undo effects of setting up yytext */
1163  *yy_cp = yy_hold_char;
1164 
1165  if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1166  { /* need to shift things up to make room */
1167  /* +2 for EOB chars. */
1168  register int number_to_move = yy_n_chars + 2;
1169  register char *dest = &yy_current_buffer->yy_ch_buf[
1170  yy_current_buffer->yy_buf_size + 2];
1171  register char *source =
1172  &yy_current_buffer->yy_ch_buf[number_to_move];
1173 
1174  while ( source > yy_current_buffer->yy_ch_buf )
1175  *--dest = *--source;
1176 
1177  yy_cp += (int) (dest - source);
1178  yy_bp += (int) (dest - source);
1179  yy_current_buffer->yy_n_chars =
1180  yy_n_chars = yy_current_buffer->yy_buf_size;
1181 
1182  if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1183  YY_FATAL_ERROR( "flex scanner push-back overflow" );
1184  }
1185 
1186  *--yy_cp = (char) c;
1187 
1188 
1189  yytext_ptr = yy_bp;
1190  yy_hold_char = *yy_cp;
1191  yy_c_buf_p = yy_cp;
1192  }
1193 #endif /* ifndef YY_NO_UNPUT */
1194 
1195 
1196 #ifdef __cplusplus
1197 static int yyinput()
1198 #else
1199 static int input()
1200 #endif
1201  {
1202  int c;
1203 
1204  *yy_c_buf_p = yy_hold_char;
1205 
1206  if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1207  {
1208  /* yy_c_buf_p now points to the character we want to return.
1209  * If this occurs *before* the EOB characters, then it's a
1210  * valid NUL; if not, then we've hit the end of the buffer.
1211  */
1212  if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1213  /* This was really a NUL. */
1214  *yy_c_buf_p = '\0';
1215 
1216  else
1217  { /* need more input */
1218  int offset = yy_c_buf_p - yytext_ptr;
1219  ++yy_c_buf_p;
1220 
1221  switch ( yy_get_next_buffer() )
1222  {
1223  case EOB_ACT_LAST_MATCH:
1224  /* This happens because yy_g_n_b()
1225  * sees that we've accumulated a
1226  * token and flags that we need to
1227  * try matching the token before
1228  * proceeding. But for input(),
1229  * there's no matching to consider.
1230  * So convert the EOB_ACT_LAST_MATCH
1231  * to EOB_ACT_END_OF_FILE.
1232  */
1233 
1234  /* Reset buffer status. */
1235  yyrestart( yyin );
1236 
1237  /* fall through */
1238 
1239  case EOB_ACT_END_OF_FILE:
1240  {
1241  if ( yywrap() )
1242  return EOF;
1243 
1244  if ( ! yy_did_buffer_switch_on_eof )
1245  YY_NEW_FILE;
1246 #ifdef __cplusplus
1247  return yyinput();
1248 #else
1249  return input();
1250 #endif
1251  }
1252 
1253  case EOB_ACT_CONTINUE_SCAN:
1254  yy_c_buf_p = yytext_ptr + offset;
1255  break;
1256  }
1257  }
1258  }
1259 
1260  c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
1261  *yy_c_buf_p = '\0'; /* preserve yytext */
1262  yy_hold_char = *++yy_c_buf_p;
1263 
1264  yy_current_buffer->yy_at_bol = (c == '\n');
1265 
1266  return c;
1267  }
1268 
1269 
1270 #ifdef YY_USE_PROTOS
1271 void yyrestart( FILE *input_file )
1272 #else
1273 void yyrestart( input_file )
1274 FILE *input_file;
1275 #endif
1276  {
1277  if ( ! yy_current_buffer )
1278  yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1279 
1280  yy_init_buffer( yy_current_buffer, input_file );
1281  yy_load_buffer_state();
1282  }
1283 
1284 
1285 #ifdef YY_USE_PROTOS
1286 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1287 #else
1288 void yy_switch_to_buffer( new_buffer )
1289 YY_BUFFER_STATE new_buffer;
1290 #endif
1291  {
1292  if ( yy_current_buffer == new_buffer )
1293  return;
1294 
1295  if ( yy_current_buffer )
1296  {
1297  /* Flush out information for old buffer. */
1298  *yy_c_buf_p = yy_hold_char;
1299  yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1300  yy_current_buffer->yy_n_chars = yy_n_chars;
1301  }
1302 
1303  yy_current_buffer = new_buffer;
1304  yy_load_buffer_state();
1305 
1306  /* We don't actually know whether we did this switch during
1307  * EOF (yywrap()) processing, but the only time this flag
1308  * is looked at is after yywrap() is called, so it's safe
1309  * to go ahead and always set it.
1310  */
1311  yy_did_buffer_switch_on_eof = 1;
1312  }
1313 
1314 
1315 #ifdef YY_USE_PROTOS
1316 void yy_load_buffer_state( void )
1317 #else
1318 void yy_load_buffer_state()
1319 #endif
1320  {
1321  yy_n_chars = yy_current_buffer->yy_n_chars;
1322  yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1323  yyin = yy_current_buffer->yy_input_file;
1324  yy_hold_char = *yy_c_buf_p;
1325  }
1326 
1327 
1328 #ifdef YY_USE_PROTOS
1329 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1330 #else
1331 YY_BUFFER_STATE yy_create_buffer( file, size )
1332 FILE *file;
1333 int size;
1334 #endif
1335  {
1336  YY_BUFFER_STATE b;
1337 
1338  b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1339  if ( ! b )
1340  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1341 
1342  b->yy_buf_size = size;
1343 
1344  /* yy_ch_buf has to be 2 characters longer than the size given because
1345  * we need to put in 2 end-of-buffer characters.
1346  */
1347  b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1348  if ( ! b->yy_ch_buf )
1349  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1350 
1351  b->yy_is_our_buffer = 1;
1352 
1353  yy_init_buffer( b, file );
1354 
1355  return b;
1356  }
1357 
1358 
1359 #ifdef YY_USE_PROTOS
1360 void yy_delete_buffer( YY_BUFFER_STATE b )
1361 #else
1362 void yy_delete_buffer( b )
1363 YY_BUFFER_STATE b;
1364 #endif
1365  {
1366  if ( ! b )
1367  return;
1368 
1369  if ( b == yy_current_buffer )
1370  yy_current_buffer = (YY_BUFFER_STATE) 0;
1371 
1372  if ( b->yy_is_our_buffer )
1373  yy_flex_free( (void *) b->yy_ch_buf );
1374 
1375  yy_flex_free( (void *) b );
1376  }
1377 
1378 
1379 
1380 #ifdef YY_USE_PROTOS
1381 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1382 #else
1383 void yy_init_buffer( b, file )
1384 YY_BUFFER_STATE b;
1385 FILE *file;
1386 #endif
1387 
1388 
1389  {
1390  yy_flush_buffer( b );
1391 
1392  b->yy_input_file = file;
1393  b->yy_fill_buffer = 1;
1394 
1395 #if YY_ALWAYS_INTERACTIVE
1396  b->yy_is_interactive = 1;
1397 #else
1398 #if YY_NEVER_INTERACTIVE
1399  b->yy_is_interactive = 0;
1400 #else
1401  b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1402 #endif
1403 #endif
1404  }
1405 
1406 
1407 #ifdef YY_USE_PROTOS
1408 void yy_flush_buffer( YY_BUFFER_STATE b )
1409 #else
1410 void yy_flush_buffer( b )
1411 YY_BUFFER_STATE b;
1412 #endif
1413 
1414  {
1415  if ( ! b )
1416  return;
1417 
1418  b->yy_n_chars = 0;
1419 
1420  /* We always need two end-of-buffer characters. The first causes
1421  * a transition to the end-of-buffer state. The second causes
1422  * a jam in that state.
1423  */
1424  b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1425  b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1426 
1427  b->yy_buf_pos = &b->yy_ch_buf[0];
1428 
1429  b->yy_at_bol = 1;
1430  b->yy_buffer_status = YY_BUFFER_NEW;
1431 
1432  if ( b == yy_current_buffer )
1433  yy_load_buffer_state();
1434  }
1435 
1436 
1437 #ifndef YY_NO_SCAN_BUFFER
1438 #ifdef YY_USE_PROTOS
1439 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1440 #else
1441 YY_BUFFER_STATE yy_scan_buffer( base, size )
1442 char *base;
1443 yy_size_t size;
1444 #endif
1445  {
1446  YY_BUFFER_STATE b;
1447 
1448  if ( size < 2 ||
1449  base[size-2] != YY_END_OF_BUFFER_CHAR ||
1450  base[size-1] != YY_END_OF_BUFFER_CHAR )
1451  /* They forgot to leave room for the EOB's. */
1452  return 0;
1453 
1454  b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1455  if ( ! b )
1456  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1457 
1458  b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1459  b->yy_buf_pos = b->yy_ch_buf = base;
1460  b->yy_is_our_buffer = 0;
1461  b->yy_input_file = 0;
1462  b->yy_n_chars = b->yy_buf_size;
1463  b->yy_is_interactive = 0;
1464  b->yy_at_bol = 1;
1465  b->yy_fill_buffer = 0;
1466  b->yy_buffer_status = YY_BUFFER_NEW;
1467 
1468  yy_switch_to_buffer( b );
1469 
1470  return b;
1471  }
1472 #endif
1473 
1474 
1475 #ifndef YY_NO_SCAN_STRING
1476 #ifdef YY_USE_PROTOS
1477 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1478 #else
1479 YY_BUFFER_STATE yy_scan_string( yy_str )
1480 yyconst char *yy_str;
1481 #endif
1482  {
1483  int len;
1484  for ( len = 0; yy_str[len]; ++len )
1485  ;
1486 
1487  return yy_scan_bytes( yy_str, len );
1488  }
1489 #endif
1490 
1491 
1492 #ifndef YY_NO_SCAN_BYTES
1493 #ifdef YY_USE_PROTOS
1494 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1495 #else
1496 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1497 yyconst char *bytes;
1498 int len;
1499 #endif
1500  {
1501  YY_BUFFER_STATE b;
1502  char *buf;
1503  yy_size_t n;
1504  int i;
1505 
1506  /* Get memory for full buffer, including space for trailing EOB's. */
1507  n = len + 2;
1508  buf = (char *) yy_flex_alloc( n );
1509  if ( ! buf )
1510  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1511 
1512  for ( i = 0; i < len; ++i )
1513  buf[i] = bytes[i];
1514 
1515  buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1516 
1517  b = yy_scan_buffer( buf, n );
1518  if ( ! b )
1519  YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1520 
1521  /* It's okay to grow etc. this buffer, and we should throw it
1522  * away when we're done.
1523  */
1524  b->yy_is_our_buffer = 1;
1525 
1526  return b;
1527  }
1528 #endif
1529 
1530 
1531 #ifndef YY_NO_PUSH_STATE
1532 #ifdef YY_USE_PROTOS
1533 static void yy_push_state( int new_state )
1534 #else
1535 static void yy_push_state( new_state )
1536 int new_state;
1537 #endif
1538  {
1539  if ( yy_start_stack_ptr >= yy_start_stack_depth )
1540  {
1541  yy_size_t new_size;
1542 
1543  yy_start_stack_depth += YY_START_STACK_INCR;
1544  new_size = yy_start_stack_depth * sizeof( int );
1545 
1546  if ( ! yy_start_stack )
1547  yy_start_stack = (int *) yy_flex_alloc( new_size );
1548 
1549  else
1550  yy_start_stack = (int *) yy_flex_realloc(
1551  (void *) yy_start_stack, new_size );
1552 
1553  if ( ! yy_start_stack )
1554  YY_FATAL_ERROR(
1555  "out of memory expanding start-condition stack" );
1556  }
1557 
1558  yy_start_stack[yy_start_stack_ptr++] = YY_START;
1559 
1560  BEGIN(new_state);
1561  }
1562 #endif
1563 
1564 
1565 #ifndef YY_NO_POP_STATE
1566 static void yy_pop_state()
1567  {
1568  if ( --yy_start_stack_ptr < 0 )
1569  YY_FATAL_ERROR( "start-condition stack underflow" );
1570 
1571  BEGIN(yy_start_stack[yy_start_stack_ptr]);
1572  }
1573 #endif
1574 
1575 
1576 #ifndef YY_NO_TOP_STATE
1577 static int yy_top_state()
1578  {
1579  return yy_start_stack[yy_start_stack_ptr - 1];
1580  }
1581 #endif
1582 
1583 #ifndef YY_EXIT_FAILURE
1584 #define YY_EXIT_FAILURE 2
1585 #endif
1586 
1587 #ifdef YY_USE_PROTOS
1588 static void yy_fatal_error( yyconst char msg[] )
1589 #else
1590 static void yy_fatal_error( msg )
1591 char msg[];
1592 #endif
1593  {
1594  (void) fprintf( stderr, "[fooscanner] %s\n", msg );
1595  exit( YY_EXIT_FAILURE );
1596  }
1597 
1598 
1599 
1600 /* Redefine yyless() so it works in section 3 code. */
1601 
1602 #undef yyless
1603 #define yyless(n) \
1604  do \
1605  { \
1606  /* Undo effects of setting up yytext. */ \
1607  yytext[yyleng] = yy_hold_char; \
1608  yy_c_buf_p = yytext + n; \
1609  yy_hold_char = *yy_c_buf_p; \
1610  *yy_c_buf_p = '\0'; \
1611  yyleng = n; \
1612  } \
1613  while ( 0 )
1614 
1615 
1616 /* Internal utility routines. */
1617 
1618 #ifndef yytext_ptr
1619 #ifdef YY_USE_PROTOS
1620 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1621 #else
1622 static void yy_flex_strncpy( s1, s2, n )
1623 char *s1;
1624 yyconst char *s2;
1625 int n;
1626 #endif
1627  {
1628  register int i;
1629  for ( i = 0; i < n; ++i )
1630  s1[i] = s2[i];
1631  }
1632 #endif
1633 
1634 #ifdef YY_NEED_STRLEN
1635 #ifdef YY_USE_PROTOS
1636 static int yy_flex_strlen( yyconst char *s )
1637 #else
1638 static int yy_flex_strlen( s )
1639 yyconst char *s;
1640 #endif
1641  {
1642  register int n;
1643  for ( n = 0; s[n]; ++n )
1644  ;
1645 
1646  return n;
1647  }
1648 #endif
1649 
1650 
1651 #ifdef YY_USE_PROTOS
1652 static void *yy_flex_alloc( yy_size_t size )
1653 #else
1654 static void *yy_flex_alloc( size )
1655 yy_size_t size;
1656 #endif
1657  {
1658  return (void *) malloc( size );
1659  }
1660 
1661 #ifdef YY_USE_PROTOS
1662 static void *yy_flex_realloc( void *ptr, yy_size_t size )
1663 #else
1664 static void *yy_flex_realloc( ptr, size )
1665 void *ptr;
1666 yy_size_t size;
1667 #endif
1668  {
1669  /* The cast to (char *) in the following accommodates both
1670  * implementations that use char* generic pointers, and those
1671  * that use void* generic pointers. It works with the latter
1672  * because both ANSI C and C++ allow castless assignment from
1673  * any pointer type to void*, and deal with argument conversions
1674  * as though doing an assignment.
1675  */
1676  return (void *) realloc( (char *) ptr, size );
1677  }
1678 
1679 #ifdef YY_USE_PROTOS
1680 static void yy_flex_free( void *ptr )
1681 #else
1682 static void yy_flex_free( ptr )
1683 void *ptr;
1684 #endif
1685  {
1686  free( ptr );
1687  }
1688 
1689 #if YY_MAIN
1690 int main()
1691  {
1692  yylex();
1693  return 0;
1694  }
1695 #endif
1696 #line 73 "./fooscanner.l"
1697 
1698 
1699 void tdeprint_foomatic2scanner_init( TQIODevice *d )
1700 {
1701  tdeprint_foomatic2scanner_device = d;
1702 }
1703 
1704 void tdeprint_foomatic2scanner_terminate()
1705 {
1706  tdeprint_foomatic2scanner_device = NULL;
1707 }

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