fooscanner.cpp

00001 #define yy_create_buffer kdeprint_foomatic2_create_buffer
00002 #define yy_delete_buffer kdeprint_foomatic2_delete_buffer
00003 #define yy_scan_buffer kdeprint_foomatic2_scan_buffer
00004 #define yy_scan_string kdeprint_foomatic2_scan_string
00005 #define yy_scan_bytes kdeprint_foomatic2_scan_bytes
00006 #define yy_flex_debug kdeprint_foomatic2_flex_debug
00007 #define yy_init_buffer kdeprint_foomatic2_init_buffer
00008 #define yy_flush_buffer kdeprint_foomatic2_flush_buffer
00009 #define yy_load_buffer_state kdeprint_foomatic2_load_buffer_state
00010 #define yy_switch_to_buffer kdeprint_foomatic2_switch_to_buffer
00011 #define yyin kdeprint_foomatic2in
00012 #define yyleng kdeprint_foomatic2leng
00013 #define yylex kdeprint_foomatic2lex
00014 #define yyout kdeprint_foomatic2out
00015 #define yyrestart kdeprint_foomatic2restart
00016 #define yytext kdeprint_foomatic2text
00017 
00018 #line 19 "./fooscanner.cpp"
00019 /* A lexical scanner generated by flex */
00020 
00021 /* Scanner skeleton version:
00022  * $Header$
00023  */
00024 
00025 #define FLEX_SCANNER
00026 #define YY_FLEX_MAJOR_VERSION 2
00027 #define YY_FLEX_MINOR_VERSION 5
00028 
00029 #include <stdio.h>
00030 #include <unistd.h>
00031 
00032 
00033 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
00034 #ifdef c_plusplus
00035 #ifndef __cplusplus
00036 #define __cplusplus
00037 #endif
00038 #endif
00039 
00040 
00041 #ifdef __cplusplus
00042 
00043 #include <stdlib.h>
00044 
00045 /* Use prototypes in function declarations. */
00046 #define YY_USE_PROTOS
00047 
00048 /* The "const" storage-class-modifier is valid. */
00049 #define YY_USE_CONST
00050 
00051 #else   /* ! __cplusplus */
00052 
00053 #if __STDC__
00054 
00055 #define YY_USE_PROTOS
00056 #define YY_USE_CONST
00057 
00058 #endif  /* __STDC__ */
00059 #endif  /* ! __cplusplus */
00060 
00061 #ifdef __TURBOC__
00062  #pragma warn -rch
00063  #pragma warn -use
00064 #include <io.h>
00065 #include <stdlib.h>
00066 #define YY_USE_CONST
00067 #define YY_USE_PROTOS
00068 #endif
00069 
00070 #ifdef YY_USE_CONST
00071 #define yyconst const
00072 #else
00073 #define yyconst
00074 #endif
00075 
00076 
00077 #ifdef YY_USE_PROTOS
00078 #define YY_PROTO(proto) proto
00079 #else
00080 #define YY_PROTO(proto) ()
00081 #endif
00082 
00083 /* Returned upon end-of-file. */
00084 #define YY_NULL 0
00085 
00086 /* Promotes a possibly negative, possibly signed char to an unsigned
00087  * integer for use as an array index.  If the signed char is negative,
00088  * we want to instead treat it as an 8-bit unsigned char, hence the
00089  * double cast.
00090  */
00091 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
00092 
00093 /* Enter a start condition.  This macro really ought to take a parameter,
00094  * but we do it the disgusting crufty way forced on us by the ()-less
00095  * definition of BEGIN.
00096  */
00097 #define BEGIN yy_start = 1 + 2 *
00098 
00099 /* Translate the current start state into a value that can be later handed
00100  * to BEGIN to return to the state.  The YYSTATE alias is for lex
00101  * compatibility.
00102  */
00103 #define YY_START ((yy_start - 1) / 2)
00104 #define YYSTATE YY_START
00105 
00106 /* Action number for EOF rule of a given start state. */
00107 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
00108 
00109 /* Special action meaning "start processing a new file". */
00110 #define YY_NEW_FILE yyrestart( yyin )
00111 
00112 #define YY_END_OF_BUFFER_CHAR 0
00113 
00114 /* Size of default input buffer. */
00115 #define YY_BUF_SIZE 16384
00116 
00117 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00118 
00119 extern int yyleng;
00120 extern FILE *yyin, *yyout;
00121 
00122 #define EOB_ACT_CONTINUE_SCAN 0
00123 #define EOB_ACT_END_OF_FILE 1
00124 #define EOB_ACT_LAST_MATCH 2
00125 
00126 /* The funky do-while in the following #define is used to turn the definition
00127  * int a single C statement (which needs a semi-colon terminator).  This
00128  * avoids problems with code like:
00129  *
00130  *  if ( condition_holds )
00131  *      yyless( 5 );
00132  *  else
00133  *      do_something_else();
00134  *
00135  * Prior to using the do-while the compiler would get upset at the
00136  * "else" because it interpreted the "if" statement as being all
00137  * done when it reached the ';' after the yyless() call.
00138  */
00139 
00140 /* Return all but the first 'n' matched characters back to the input stream. */
00141 
00142 #define yyless(n) \
00143     do \
00144         { \
00145         /* Undo effects of setting up yytext. */ \
00146         *yy_cp = yy_hold_char; \
00147         YY_RESTORE_YY_MORE_OFFSET \
00148         yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
00149         YY_DO_BEFORE_ACTION; /* set up yytext again */ \
00150         } \
00151     while ( 0 )
00152 
00153 #define unput(c) yyunput( c, yytext_ptr )
00154 
00155 /* The following is because we cannot portably get our hands on size_t
00156  * (without autoconf's help, which isn't available because we want
00157  * flex-generated scanners to compile on their own).
00158  */
00159 typedef unsigned int yy_size_t;
00160 
00161 
00162 struct yy_buffer_state
00163     {
00164     FILE *yy_input_file;
00165 
00166     char *yy_ch_buf;        /* input buffer */
00167     char *yy_buf_pos;       /* current position in input buffer */
00168 
00169     /* Size of input buffer in bytes, not including room for EOB
00170      * characters.
00171      */
00172     yy_size_t yy_buf_size;
00173 
00174     /* Number of characters read into yy_ch_buf, not including EOB
00175      * characters.
00176      */
00177     int yy_n_chars;
00178 
00179     /* Whether we "own" the buffer - i.e., we know we created it,
00180      * and can realloc() it to grow it, and should free() it to
00181      * delete it.
00182      */
00183     int yy_is_our_buffer;
00184 
00185     /* Whether this is an "interactive" input source; if so, and
00186      * if we're using stdio for input, then we want to use getc()
00187      * instead of fread(), to make sure we stop fetching input after
00188      * each newline.
00189      */
00190     int yy_is_interactive;
00191 
00192     /* Whether we're considered to be at the beginning of a line.
00193      * If so, '^' rules will be active on the next match, otherwise
00194      * not.
00195      */
00196     int yy_at_bol;
00197 
00198     /* Whether to try to fill the input buffer when we reach the
00199      * end of it.
00200      */
00201     int yy_fill_buffer;
00202 
00203     int yy_buffer_status;
00204 #define YY_BUFFER_NEW 0
00205 #define YY_BUFFER_NORMAL 1
00206     /* When an EOF's been seen but there's still some text to process
00207      * then we mark the buffer as YY_EOF_PENDING, to indicate that we
00208      * shouldn't try reading from the input source any more.  We might
00209      * still have a bunch of tokens to match, though, because of
00210      * possible backing-up.
00211      *
00212      * When we actually see the EOF, we change the status to "new"
00213      * (via yyrestart()), so that the user can continue scanning by
00214      * just pointing yyin at a new input file.
00215      */
00216 #define YY_BUFFER_EOF_PENDING 2
00217     };
00218 
00219 static YY_BUFFER_STATE yy_current_buffer = 0;
00220 
00221 /* We provide macros for accessing buffer states in case in the
00222  * future we want to put the buffer states in a more general
00223  * "scanner state".
00224  */
00225 #define YY_CURRENT_BUFFER yy_current_buffer
00226 
00227 
00228 /* yy_hold_char holds the character lost when yytext is formed. */
00229 static char yy_hold_char;
00230 
00231 static int yy_n_chars;      /* number of characters read into yy_ch_buf */
00232 
00233 
00234 int yyleng;
00235 
00236 /* Points to current character in buffer. */
00237 static char *yy_c_buf_p = (char *) 0;
00238 static int yy_init = 1;     /* whether we need to initialize */
00239 static int yy_start = 0;    /* start state number */
00240 
00241 /* Flag which is used to allow yywrap()'s to do buffer switches
00242  * instead of setting up a fresh yyin.  A bit of a hack ...
00243  */
00244 static int yy_did_buffer_switch_on_eof;
00245 
00246 void yyrestart YY_PROTO(( FILE *input_file ));
00247 
00248 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
00249 void yy_load_buffer_state YY_PROTO(( void ));
00250 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
00251 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
00252 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
00253 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
00254 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
00255 
00256 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
00257 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
00258 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
00259 
00260 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
00261 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
00262 static void yy_flex_free YY_PROTO(( void * ));
00263 
00264 #define yy_new_buffer yy_create_buffer
00265 
00266 #define yy_set_interactive(is_interactive) \
00267     { \
00268     if ( ! yy_current_buffer ) \
00269         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
00270     yy_current_buffer->yy_is_interactive = is_interactive; \
00271     }
00272 
00273 #define yy_set_bol(at_bol) \
00274     { \
00275     if ( ! yy_current_buffer ) \
00276         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
00277     yy_current_buffer->yy_at_bol = at_bol; \
00278     }
00279 
00280 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
00281 
00282 
00283 #define yywrap() 1
00284 #define YY_SKIP_YYWRAP
00285 typedef unsigned char YY_CHAR;
00286 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
00287 typedef int yy_state_type;
00288 extern char *yytext;
00289 #define yytext_ptr yytext
00290 
00291 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
00292 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
00293 static int yy_get_next_buffer YY_PROTO(( void ));
00294 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
00295 
00296 /* Done after the current pattern has been matched and before the
00297  * corresponding action - sets up yytext.
00298  */
00299 #define YY_DO_BEFORE_ACTION \
00300     yytext_ptr = yy_bp; \
00301     yyleng = (int) (yy_cp - yy_bp); \
00302     yy_hold_char = *yy_cp; \
00303     *yy_cp = '\0'; \
00304     yy_c_buf_p = yy_cp;
00305 
00306 #define YY_NUM_RULES 21
00307 #define YY_END_OF_BUFFER 22
00308 static yyconst short int yy_accept[55] =
00309     {   0,
00310         0,    0,   22,   20,   19,   20,    5,   20,    8,   20,
00311        16,   13,    6,    7,   11,   12,   20,    9,   10,   20,
00312         0,   15,    5,    0,   14,    0,   16,    0,    0,    0,
00313         0,   14,   17,    0,    0,    0,    0,    0,    0,    0,
00314         0,   18,    4,    2,    0,    0,    0,    0,    0,    0,
00315         1,    0,    3,    0
00316     } ;
00317 
00318 static yyconst int yy_ec[256] =
00319     {   0,
00320         1,    1,    1,    1,    1,    1,    1,    1,    1,    2,
00321         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00322         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00323         1,    1,    1,    3,    4,    5,    1,    1,    6,    1,
00324         1,    1,    1,    7,    8,    9,    1,   10,   11,   10,
00325        10,   10,   10,   10,   10,   10,   10,    1,   12,    1,
00326        13,   14,    1,    1,   15,    1,    1,    1,   16,    1,
00327         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00328         1,   17,    1,    1,    1,   18,    1,    1,    1,    1,
00329        19,   20,   21,    1,    1,    1,    1,    1,    1,   22,
00330 
00331        23,   24,    1,    1,   25,    1,    1,    1,    1,   26,
00332        27,   28,    1,    1,   29,   30,   31,    1,    1,    1,
00333         1,    1,   32,    1,   33,    1,    1,    1,    1,    1,
00334         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00335         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00336         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00337         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00338         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00339         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00340         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00341 
00342         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00343         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00344         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00345         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00346         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00347         1,    1,    1,    1,    1
00348     } ;
00349 
00350 static yyconst int yy_meta[34] =
00351     {   0,
00352         1,    2,    1,    1,    1,    1,    1,    1,    1,    1,
00353         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00354         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00355         1,    1,    1
00356     } ;
00357 
00358 static yyconst short int yy_base[59] =
00359     {   0,
00360         0,   88,   92,   94,   94,   88,    0,   28,   94,   25,
00361        28,   94,   94,   94,   94,   94,   64,   94,   94,   22,
00362        86,   94,    0,   35,   94,   36,   34,   36,   66,   72,
00363        59,   43,   41,   62,   67,   54,   50,   58,   70,   50,
00364        43,   55,   94,   71,   50,   63,   51,   73,   46,   71,
00365        94,   39,   94,   94,   66,   58,   68,   70
00366     } ;
00367 
00368 static yyconst short int yy_def[59] =
00369     {   0,
00370        54,    1,   54,   54,   54,   55,   56,   57,   54,   54,
00371        54,   54,   54,   54,   54,   54,   54,   54,   54,   54,
00372        55,   54,   56,   57,   54,   57,   54,   54,   54,   54,
00373        54,   57,   54,   54,   54,   54,   54,   54,   54,   54,
00374        54,   54,   54,   54,   54,   54,   54,   58,   54,   58,
00375        54,   54,   54,    0,   54,   54,   54,   54
00376     } ;
00377 
00378 static yyconst short int yy_nxt[128] =
00379     {   0,
00380         4,    5,    6,    7,    4,    8,    9,   10,    4,   11,
00381        11,   12,   13,   14,    4,    4,    4,    4,   15,    4,
00382        16,    4,    4,    4,    4,    4,    4,    4,    4,    4,
00383        17,   18,   19,   25,   27,   27,   28,   27,   27,   30,
00384        25,   32,   28,   27,   27,   33,   33,   26,   25,   31,
00385        33,   33,   42,   42,   26,   26,   37,   41,   23,   42,
00386        42,   53,   26,   37,   42,   42,   21,   21,   24,   24,
00387        50,   50,   51,   52,   51,   49,   48,   47,   46,   45,
00388        44,   43,   40,   39,   38,   36,   35,   34,   22,   29,
00389        22,   54,   20,    3,   54,   54,   54,   54,   54,   54,
00390 
00391        54,   54,   54,   54,   54,   54,   54,   54,   54,   54,
00392        54,   54,   54,   54,   54,   54,   54,   54,   54,   54,
00393        54,   54,   54,   54,   54,   54,   54
00394     } ;
00395 
00396 static yyconst short int yy_chk[128] =
00397     {   0,
00398         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00399         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00400         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00401         1,    1,    1,    8,   10,   10,   11,   11,   11,   20,
00402        24,   26,   27,   27,   27,   28,   28,    8,   32,   20,
00403        33,   33,   41,   41,   24,   26,   33,   37,   56,   37,
00404        37,   52,   32,   33,   42,   42,   55,   55,   57,   57,
00405        58,   58,   50,   49,   48,   47,   46,   45,   44,   40,
00406        39,   38,   36,   35,   34,   31,   30,   29,   21,   17,
00407         6,    3,    2,   54,   54,   54,   54,   54,   54,   54,
00408 
00409        54,   54,   54,   54,   54,   54,   54,   54,   54,   54,
00410        54,   54,   54,   54,   54,   54,   54,   54,   54,   54,
00411        54,   54,   54,   54,   54,   54,   54
00412     } ;
00413 
00414 static yy_state_type yy_last_accepting_state;
00415 static char *yy_last_accepting_cpos;
00416 
00417 /* The intent behind this definition is that it'll catch
00418  * any uses of REJECT which flex missed.
00419  */
00420 #define REJECT reject_used_but_not_detected
00421 #define yymore() yymore_used_but_not_detected
00422 #define YY_MORE_ADJ 0
00423 #define YY_RESTORE_YY_MORE_OFFSET
00424 char *yytext;
00425 #line 1 "./fooscanner.l"
00426 #define INITIAL 0
00427 #line 2 "./fooscanner.l"
00428 /*
00429  *  This file is part of the KDE libraries
00430  *  Copyright (c) 2001-2003 Michael Goffioul <kdeprint@swing.be>
00431  *
00432  *  This library is free software; you can redistribute it and/or
00433  *  modify it under the terms of the GNU Library General Public
00434  *  License version 2 as published by the Free Software Foundation.
00435  *
00436  *  This library is distributed in the hope that it will be useful,
00437  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00438  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00439  *  Library General Public License for more details.
00440  *
00441  *  You should have received a copy of the GNU Library General Public License
00442  *  along with this library; see the file COPYING.LIB.  If not, write to
00443  *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00444  *  Boston, MA 02110-1301, USA.
00445  **/
00446 
00447 #include <qvariant.h>
00448 #include <qiodevice.h>
00449 #define YYSTYPE QVariant
00450 #include "fooparser.cpp.h"
00451 
00452 #define yylval kdeprint_foomatic2lval
00453 
00454 #define YY_INPUT( buf, result, max_size ) \
00455     { \
00456         if ( kdeprint_foomatic2scanner_device ) \
00457         { \
00458             result = kdeprint_foomatic2scanner_device->readBlock( buf, max_size ); \
00459             if ( result < 0 ) \
00460                 result = 0; \
00461         } \
00462         else \
00463             result = 0; \
00464     }
00465 
00466 QIODevice* kdeprint_foomatic2scanner_device = NULL;
00467 #line 468 "./fooscanner.cpp"
00468 
00469 /* Macros after this point can all be overridden by user definitions in
00470  * section 1.
00471  */
00472 
00473 #ifndef YY_SKIP_YYWRAP
00474 #ifdef __cplusplus
00475 extern "C" int yywrap YY_PROTO(( void ));
00476 #else
00477 extern int yywrap YY_PROTO(( void ));
00478 #endif
00479 #endif
00480 
00481 #ifndef YY_NO_UNPUT
00482 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
00483 #endif
00484 
00485 #ifndef yytext_ptr
00486 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
00487 #endif
00488 
00489 #ifdef YY_NEED_STRLEN
00490 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
00491 #endif
00492 
00493 #ifndef YY_NO_INPUT
00494 #ifdef __cplusplus
00495 static int yyinput YY_PROTO(( void ));
00496 #else
00497 static int input YY_PROTO(( void ));
00498 #endif
00499 #endif
00500 
00501 #if YY_STACK_USED
00502 static int yy_start_stack_ptr = 0;
00503 static int yy_start_stack_depth = 0;
00504 static int *yy_start_stack = 0;
00505 #ifndef YY_NO_PUSH_STATE
00506 static void yy_push_state YY_PROTO(( int new_state ));
00507 #endif
00508 #ifndef YY_NO_POP_STATE
00509 static void yy_pop_state YY_PROTO(( void ));
00510 #endif
00511 #ifndef YY_NO_TOP_STATE
00512 static int yy_top_state YY_PROTO(( void ));
00513 #endif
00514 
00515 #else
00516 #define YY_NO_PUSH_STATE 1
00517 #define YY_NO_POP_STATE 1
00518 #define YY_NO_TOP_STATE 1
00519 #endif
00520 
00521 #ifdef YY_MALLOC_DECL
00522 YY_MALLOC_DECL
00523 #else
00524 #if __STDC__
00525 #ifndef __cplusplus
00526 #include <stdlib.h>
00527 #endif
00528 #else
00529 /* Just try to get by without declaring the routines.  This will fail
00530  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
00531  * or sizeof(void*) != sizeof(int).
00532  */
00533 #endif
00534 #endif
00535 
00536 /* Amount of stuff to slurp up with each read. */
00537 #ifndef YY_READ_BUF_SIZE
00538 #define YY_READ_BUF_SIZE 8192
00539 #endif
00540 
00541 /* Copy whatever the last rule matched to the standard output. */
00542 
00543 #ifndef ECHO
00544 /* This used to be an fputs(), but since the string might contain NUL's,
00545  * we now use fwrite().
00546  */
00547 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
00548 #endif
00549 
00550 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
00551  * is returned in "result".
00552  */
00553 #ifndef YY_INPUT
00554 #define YY_INPUT(buf,result,max_size) \
00555     if ( yy_current_buffer->yy_is_interactive ) \
00556         { \
00557         int c = '*', n; \
00558         for ( n = 0; n < max_size && \
00559                  (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
00560             buf[n] = (char) c; \
00561         if ( c == '\n' ) \
00562             buf[n++] = (char) c; \
00563         if ( c == EOF && ferror( yyin ) ) \
00564             YY_FATAL_ERROR( "input in flex scanner failed" ); \
00565         result = n; \
00566         } \
00567     else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
00568           && ferror( yyin ) ) \
00569         YY_FATAL_ERROR( "input in flex scanner failed" );
00570 #endif
00571 
00572 /* No semi-colon after return; correct usage is to write "yyterminate();" -
00573  * we don't want an extra ';' after the "return" because that will cause
00574  * some compilers to complain about unreachable statements.
00575  */
00576 #ifndef yyterminate
00577 #define yyterminate() return YY_NULL
00578 #endif
00579 
00580 /* Number of entries by which start-condition stack grows. */
00581 #ifndef YY_START_STACK_INCR
00582 #define YY_START_STACK_INCR 25
00583 #endif
00584 
00585 /* Report a fatal error. */
00586 #ifndef YY_FATAL_ERROR
00587 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
00588 #endif
00589 
00590 /* Default declaration of generated scanner - a define so the user can
00591  * easily add parameters.
00592  */
00593 #ifndef YY_DECL
00594 #define YY_DECL int yylex YY_PROTO(( void ))
00595 #endif
00596 
00597 /* Code executed at the beginning of each rule, after yytext and yyleng
00598  * have been set up.
00599  */
00600 #ifndef YY_USER_ACTION
00601 #define YY_USER_ACTION
00602 #endif
00603 
00604 /* Code executed at the end of each rule. */
00605 #ifndef YY_BREAK
00606 #define YY_BREAK break;
00607 #endif
00608 
00609 #define YY_RULE_SETUP \
00610     if ( yyleng > 0 ) \
00611         yy_current_buffer->yy_at_bol = \
00612                 (yytext[yyleng - 1] == '\n'); \
00613     YY_USER_ACTION
00614 
00615 YY_DECL
00616     {
00617     register yy_state_type yy_current_state;
00618     register char *yy_cp, *yy_bp;
00619     register int yy_act;
00620 
00621 #line 47 "./fooscanner.l"
00622 
00623 
00624 #line 625 "./fooscanner.cpp"
00625 
00626     if ( yy_init )
00627         {
00628         yy_init = 0;
00629 
00630 #ifdef YY_USER_INIT
00631         YY_USER_INIT;
00632 #endif
00633 
00634         if ( ! yy_start )
00635             yy_start = 1;   /* first start state */
00636 
00637         if ( ! yyin )
00638             yyin = stdin;
00639 
00640         if ( ! yyout )
00641             yyout = stdout;
00642 
00643         if ( ! yy_current_buffer )
00644             yy_current_buffer =
00645                 yy_create_buffer( yyin, YY_BUF_SIZE );
00646 
00647         yy_load_buffer_state();
00648         }
00649 
00650     while ( 1 )     /* loops until end-of-file is reached */
00651         {
00652         yy_cp = yy_c_buf_p;
00653 
00654         /* Support of yytext. */
00655         *yy_cp = yy_hold_char;
00656 
00657         /* yy_bp points to the position in yy_ch_buf of the start of
00658          * the current run.
00659          */
00660         yy_bp = yy_cp;
00661 
00662         yy_current_state = yy_start;
00663         yy_current_state += YY_AT_BOL();
00664 yy_match:
00665         do
00666             {
00667             register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
00668             if ( yy_accept[yy_current_state] )
00669                 {
00670                 yy_last_accepting_state = yy_current_state;
00671                 yy_last_accepting_cpos = yy_cp;
00672                 }
00673             while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
00674                 {
00675                 yy_current_state = (int) yy_def[yy_current_state];
00676                 if ( yy_current_state >= 55 )
00677                     yy_c = yy_meta[(unsigned int) yy_c];
00678                 }
00679             yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
00680             ++yy_cp;
00681             }
00682         while ( yy_base[yy_current_state] != 94 );
00683 
00684 yy_find_action:
00685         yy_act = yy_accept[yy_current_state];
00686         if ( yy_act == 0 )
00687             { /* have to back up */
00688             yy_cp = yy_last_accepting_cpos;
00689             yy_current_state = yy_last_accepting_state;
00690             yy_act = yy_accept[yy_current_state];
00691             }
00692 
00693         YY_DO_BEFORE_ACTION;
00694 
00695 
00696 do_action:  /* This label is used only to access EOF actions. */
00697 
00698 
00699         switch ( yy_act )
00700     { /* beginning of action switch */
00701             case 0: /* must back up */
00702             /* undo the effects of YY_DO_BEFORE_ACTION */
00703             *yy_cp = yy_hold_char;
00704             yy_cp = yy_last_accepting_cpos;
00705             yy_current_state = yy_last_accepting_state;
00706             goto yy_find_action;
00707 
00708 case 1:
00709 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
00710 yy_c_buf_p = yy_cp -= 1;
00711 YY_DO_BEFORE_ACTION; /* set up yytext again */
00712 YY_RULE_SETUP
00713 #line 49 "./fooscanner.l"
00714 { /* eat up those assignments */ }
00715     YY_BREAK
00716 case 2:
00717 YY_RULE_SETUP
00718 #line 50 "./fooscanner.l"
00719 { return VAR; }
00720     YY_BREAK
00721 case 3:
00722 YY_RULE_SETUP
00723 #line 51 "./fooscanner.l"
00724 { return POSTPIPE; }
00725     YY_BREAK
00726 case 4:
00727 YY_RULE_SETUP
00728 #line 52 "./fooscanner.l"
00729 { return UNDEF; }
00730     YY_BREAK
00731 case 5:
00732 YY_RULE_SETUP
00733 #line 53 "./fooscanner.l"
00734 { /* eat up comment parts */ }
00735     YY_BREAK
00736 case 6:
00737 YY_RULE_SETUP
00738 #line 55 "./fooscanner.l"
00739 { return '='; }
00740     YY_BREAK
00741 case 7:
00742 YY_RULE_SETUP
00743 #line 56 "./fooscanner.l"
00744 { return '>'; }
00745     YY_BREAK
00746 case 8:
00747 YY_RULE_SETUP
00748 #line 57 "./fooscanner.l"
00749 { return ','; }
00750     YY_BREAK
00751 case 9:
00752 YY_RULE_SETUP
00753 #line 58 "./fooscanner.l"
00754 { return '{'; }
00755     YY_BREAK
00756 case 10:
00757 YY_RULE_SETUP
00758 #line 59 "./fooscanner.l"
00759 { return '}'; }
00760     YY_BREAK
00761 case 11:
00762 YY_RULE_SETUP
00763 #line 60 "./fooscanner.l"
00764 { return '['; }
00765     YY_BREAK
00766 case 12:
00767 YY_RULE_SETUP
00768 #line 61 "./fooscanner.l"
00769 { return ']'; }
00770     YY_BREAK
00771 case 13:
00772 YY_RULE_SETUP
00773 #line 62 "./fooscanner.l"
00774 { return ';'; }
00775     YY_BREAK
00776 case 14:
00777 YY_RULE_SETUP
00778 #line 64 "./fooscanner.l"
00779 { yylval = QCString(yytext+1, strlen(yytext)-1); return STRING; }
00780     YY_BREAK
00781 case 15:
00782 YY_RULE_SETUP
00783 #line 65 "./fooscanner.l"
00784 { yylval = QCString(yytext+1, strlen(yytext)-1); return QUOTED; }
00785     YY_BREAK
00786 case 16:
00787 YY_RULE_SETUP
00788 #line 66 "./fooscanner.l"
00789 { yylval = yytext; return NUMBER; }
00790     YY_BREAK
00791 case 17:
00792 YY_RULE_SETUP
00793 #line 67 "./fooscanner.l"
00794 { yylval = yytext; return NUMBER; }
00795     YY_BREAK
00796 case 18:
00797 YY_RULE_SETUP
00798 #line 68 "./fooscanner.l"
00799 { yylval = yytext; return NUMBER; }
00800     YY_BREAK
00801 case 19:
00802 #line 71 "./fooscanner.l"
00803 case 20:
00804 YY_RULE_SETUP
00805 #line 71 "./fooscanner.l"
00806 { /* eat up anything else */ }
00807     YY_BREAK
00808 case 21:
00809 YY_RULE_SETUP
00810 #line 73 "./fooscanner.l"
00811 ECHO;
00812     YY_BREAK
00813 #line 814 "./fooscanner.cpp"
00814 case YY_STATE_EOF(INITIAL):
00815     yyterminate();
00816 
00817     case YY_END_OF_BUFFER:
00818         {
00819         /* Amount of text matched not including the EOB char. */
00820         int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
00821 
00822         /* Undo the effects of YY_DO_BEFORE_ACTION. */
00823         *yy_cp = yy_hold_char;
00824         YY_RESTORE_YY_MORE_OFFSET
00825 
00826         if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
00827             {
00828             /* We're scanning a new file or input source.  It's
00829              * possible that this happened because the user
00830              * just pointed yyin at a new source and called
00831              * yylex().  If so, then we have to assure
00832              * consistency between yy_current_buffer and our
00833              * globals.  Here is the right place to do so, because
00834              * this is the first action (other than possibly a
00835              * back-up) that will match for the new input source.
00836              */
00837             yy_n_chars = yy_current_buffer->yy_n_chars;
00838             yy_current_buffer->yy_input_file = yyin;
00839             yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
00840             }
00841 
00842         /* Note that here we test for yy_c_buf_p "<=" to the position
00843          * of the first EOB in the buffer, since yy_c_buf_p will
00844          * already have been incremented past the NUL character
00845          * (since all states make transitions on EOB to the
00846          * end-of-buffer state).  Contrast this with the test
00847          * in input().
00848          */
00849         if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
00850             { /* This was really a NUL. */
00851             yy_state_type yy_next_state;
00852 
00853             yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
00854 
00855             yy_current_state = yy_get_previous_state();
00856 
00857             /* Okay, we're now positioned to make the NUL
00858              * transition.  We couldn't have
00859              * yy_get_previous_state() go ahead and do it
00860              * for us because it doesn't know how to deal
00861              * with the possibility of jamming (and we don't
00862              * want to build jamming into it because then it
00863              * will run more slowly).
00864              */
00865 
00866             yy_next_state = yy_try_NUL_trans( yy_current_state );
00867 
00868             yy_bp = yytext_ptr + YY_MORE_ADJ;
00869 
00870             if ( yy_next_state )
00871                 {
00872                 /* Consume the NUL. */
00873                 yy_cp = ++yy_c_buf_p;
00874                 yy_current_state = yy_next_state;
00875                 goto yy_match;
00876                 }
00877 
00878             else
00879                 {
00880                 yy_cp = yy_c_buf_p;
00881                 goto yy_find_action;
00882                 }
00883             }
00884 
00885         else switch ( yy_get_next_buffer() )
00886             {
00887             case EOB_ACT_END_OF_FILE:
00888                 {
00889                 yy_did_buffer_switch_on_eof = 0;
00890 
00891                 if ( yywrap() )
00892                     {
00893                     /* Note: because we've taken care in
00894                      * yy_get_next_buffer() to have set up
00895                      * yytext, we can now set up
00896                      * yy_c_buf_p so that if some total
00897                      * hoser (like flex itself) wants to
00898                      * call the scanner after we return the
00899                      * YY_NULL, it'll still work - another
00900                      * YY_NULL will get returned.
00901                      */
00902                     yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
00903 
00904                     yy_act = YY_STATE_EOF(YY_START);
00905                     goto do_action;
00906                     }
00907 
00908                 else
00909                     {
00910                     if ( ! yy_did_buffer_switch_on_eof )
00911                         YY_NEW_FILE;
00912                     }
00913                 break;
00914                 }
00915 
00916             case EOB_ACT_CONTINUE_SCAN:
00917                 yy_c_buf_p =
00918                     yytext_ptr + yy_amount_of_matched_text;
00919 
00920                 yy_current_state = yy_get_previous_state();
00921 
00922                 yy_cp = yy_c_buf_p;
00923                 yy_bp = yytext_ptr + YY_MORE_ADJ;
00924                 goto yy_match;
00925 
00926             case EOB_ACT_LAST_MATCH:
00927                 yy_c_buf_p =
00928                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
00929 
00930                 yy_current_state = yy_get_previous_state();
00931 
00932                 yy_cp = yy_c_buf_p;
00933                 yy_bp = yytext_ptr + YY_MORE_ADJ;
00934                 goto yy_find_action;
00935             }
00936         break;
00937         }
00938 
00939     default:
00940         YY_FATAL_ERROR(
00941             "fatal flex scanner internal error--no action found" );
00942     } /* end of action switch */
00943         } /* end of scanning one token */
00944     } /* end of yylex */
00945 
00946 
00947 /* yy_get_next_buffer - try to read in a new buffer
00948  *
00949  * Returns a code representing an action:
00950  *  EOB_ACT_LAST_MATCH -
00951  *  EOB_ACT_CONTINUE_SCAN - continue scanning from current position
00952  *  EOB_ACT_END_OF_FILE - end of file
00953  */
00954 
00955 static int yy_get_next_buffer()
00956     {
00957     register char *dest = yy_current_buffer->yy_ch_buf;
00958     register char *source = yytext_ptr;
00959     register int number_to_move, i;
00960     int ret_val;
00961 
00962     if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
00963         YY_FATAL_ERROR(
00964         "fatal flex scanner internal error--end of buffer missed" );
00965 
00966     if ( yy_current_buffer->yy_fill_buffer == 0 )
00967         { /* Don't try to fill the buffer, so this is an EOF. */
00968         if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
00969             {
00970             /* We matched a single character, the EOB, so
00971              * treat this as a final EOF.
00972              */
00973             return EOB_ACT_END_OF_FILE;
00974             }
00975 
00976         else
00977             {
00978             /* We matched some text prior to the EOB, first
00979              * process it.
00980              */
00981             return EOB_ACT_LAST_MATCH;
00982             }
00983         }
00984 
00985     /* Try to read more data. */
00986 
00987     /* First move last chars to start of buffer. */
00988     number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
00989 
00990     for ( i = 0; i < number_to_move; ++i )
00991         *(dest++) = *(source++);
00992 
00993     if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
00994         /* don't do the read, it's not guaranteed to return an EOF,
00995          * just force an EOF
00996          */
00997         yy_current_buffer->yy_n_chars = yy_n_chars = 0;
00998 
00999     else
01000         {
01001         int num_to_read =
01002             yy_current_buffer->yy_buf_size - number_to_move - 1;
01003 
01004         while ( num_to_read <= 0 )
01005             { /* Not enough room in the buffer - grow it. */
01006 #ifdef YY_USES_REJECT
01007             YY_FATAL_ERROR(
01008 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
01009 #else
01010 
01011             /* just a shorter name for the current buffer */
01012             YY_BUFFER_STATE b = yy_current_buffer;
01013 
01014             int yy_c_buf_p_offset =
01015                 (int) (yy_c_buf_p - b->yy_ch_buf);
01016 
01017             if ( b->yy_is_our_buffer )
01018                 {
01019                 int new_size = b->yy_buf_size * 2;
01020 
01021                 if ( new_size <= 0 )
01022                     b->yy_buf_size += b->yy_buf_size / 8;
01023                 else
01024                     b->yy_buf_size *= 2;
01025 
01026                 b->yy_ch_buf = (char *)
01027                     /* Include room in for 2 EOB chars. */
01028                     yy_flex_realloc( (void *) b->yy_ch_buf,
01029                              b->yy_buf_size + 2 );
01030                 }
01031             else
01032                 /* Can't grow it, we don't own it. */
01033                 b->yy_ch_buf = 0;
01034 
01035             if ( ! b->yy_ch_buf )
01036                 YY_FATAL_ERROR(
01037                 "fatal error - scanner input buffer overflow" );
01038 
01039             yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
01040 
01041             num_to_read = yy_current_buffer->yy_buf_size -
01042                         number_to_move - 1;
01043 #endif
01044             }
01045 
01046         if ( num_to_read > YY_READ_BUF_SIZE )
01047             num_to_read = YY_READ_BUF_SIZE;
01048 
01049         /* Read in more data. */
01050         YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
01051             yy_n_chars, num_to_read );
01052 
01053         yy_current_buffer->yy_n_chars = yy_n_chars;
01054         }
01055 
01056     if ( yy_n_chars == 0 )
01057         {
01058         if ( number_to_move == YY_MORE_ADJ )
01059             {
01060             ret_val = EOB_ACT_END_OF_FILE;
01061             yyrestart( yyin );
01062             }
01063 
01064         else
01065             {
01066             ret_val = EOB_ACT_LAST_MATCH;
01067             yy_current_buffer->yy_buffer_status =
01068                 YY_BUFFER_EOF_PENDING;
01069             }
01070         }
01071 
01072     else
01073         ret_val = EOB_ACT_CONTINUE_SCAN;
01074 
01075     yy_n_chars += number_to_move;
01076     yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
01077     yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
01078 
01079     yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
01080 
01081     return ret_val;
01082     }
01083 
01084 
01085 /* yy_get_previous_state - get the state just before the EOB char was reached */
01086 
01087 static yy_state_type yy_get_previous_state()
01088     {
01089     register yy_state_type yy_current_state;
01090     register char *yy_cp;
01091 
01092     yy_current_state = yy_start;
01093     yy_current_state += YY_AT_BOL();
01094 
01095     for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
01096         {
01097         register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
01098         if ( yy_accept[yy_current_state] )
01099             {
01100             yy_last_accepting_state = yy_current_state;
01101             yy_last_accepting_cpos = yy_cp;
01102             }
01103         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01104             {
01105             yy_current_state = (int) yy_def[yy_current_state];
01106             if ( yy_current_state >= 55 )
01107                 yy_c = yy_meta[(unsigned int) yy_c];
01108             }
01109         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01110         }
01111 
01112     return yy_current_state;
01113     }
01114 
01115 
01116 /* yy_try_NUL_trans - try to make a transition on the NUL character
01117  *
01118  * synopsis
01119  *  next_state = yy_try_NUL_trans( current_state );
01120  */
01121 
01122 #ifdef YY_USE_PROTOS
01123 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
01124 #else
01125 static yy_state_type yy_try_NUL_trans( yy_current_state )
01126 yy_state_type yy_current_state;
01127 #endif
01128     {
01129     register int yy_is_jam;
01130     register char *yy_cp = yy_c_buf_p;
01131 
01132     register YY_CHAR yy_c = 1;
01133     if ( yy_accept[yy_current_state] )
01134         {
01135         yy_last_accepting_state = yy_current_state;
01136         yy_last_accepting_cpos = yy_cp;
01137         }
01138     while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01139         {
01140         yy_current_state = (int) yy_def[yy_current_state];
01141         if ( yy_current_state >= 55 )
01142             yy_c = yy_meta[(unsigned int) yy_c];
01143         }
01144     yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01145     yy_is_jam = (yy_current_state == 54);
01146 
01147     return yy_is_jam ? 0 : yy_current_state;
01148     }
01149 
01150 
01151 #ifndef YY_NO_UNPUT
01152 #ifdef YY_USE_PROTOS
01153 static void yyunput( int c, register char *yy_bp )
01154 #else
01155 static void yyunput( c, yy_bp )
01156 int c;
01157 register char *yy_bp;
01158 #endif
01159     {
01160     register char *yy_cp = yy_c_buf_p;
01161 
01162     /* undo effects of setting up yytext */
01163     *yy_cp = yy_hold_char;
01164 
01165     if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
01166         { /* need to shift things up to make room */
01167         /* +2 for EOB chars. */
01168         register int number_to_move = yy_n_chars + 2;
01169         register char *dest = &yy_current_buffer->yy_ch_buf[
01170                     yy_current_buffer->yy_buf_size + 2];
01171         register char *source =
01172                 &yy_current_buffer->yy_ch_buf[number_to_move];
01173 
01174         while ( source > yy_current_buffer->yy_ch_buf )
01175             *--dest = *--source;
01176 
01177         yy_cp += (int) (dest - source);
01178         yy_bp += (int) (dest - source);
01179         yy_current_buffer->yy_n_chars =
01180             yy_n_chars = yy_current_buffer->yy_buf_size;
01181 
01182         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
01183             YY_FATAL_ERROR( "flex scanner push-back overflow" );
01184         }
01185 
01186     *--yy_cp = (char) c;
01187 
01188 
01189     yytext_ptr = yy_bp;
01190     yy_hold_char = *yy_cp;
01191     yy_c_buf_p = yy_cp;
01192     }
01193 #endif  /* ifndef YY_NO_UNPUT */
01194 
01195 
01196 #ifdef __cplusplus
01197 static int yyinput()
01198 #else
01199 static int input()
01200 #endif
01201     {
01202     int c;
01203 
01204     *yy_c_buf_p = yy_hold_char;
01205 
01206     if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
01207         {
01208         /* yy_c_buf_p now points to the character we want to return.
01209          * If this occurs *before* the EOB characters, then it's a
01210          * valid NUL; if not, then we've hit the end of the buffer.
01211          */
01212         if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
01213             /* This was really a NUL. */
01214             *yy_c_buf_p = '\0';
01215 
01216         else
01217             { /* need more input */
01218             int offset = yy_c_buf_p - yytext_ptr;
01219             ++yy_c_buf_p;
01220 
01221             switch ( yy_get_next_buffer() )
01222                 {
01223                 case EOB_ACT_LAST_MATCH:
01224                     /* This happens because yy_g_n_b()
01225                      * sees that we've accumulated a
01226                      * token and flags that we need to
01227                      * try matching the token before
01228                      * proceeding.  But for input(),
01229                      * there's no matching to consider.
01230                      * So convert the EOB_ACT_LAST_MATCH
01231                      * to EOB_ACT_END_OF_FILE.
01232                      */
01233 
01234                     /* Reset buffer status. */
01235                     yyrestart( yyin );
01236 
01237                     /* fall through */
01238 
01239                 case EOB_ACT_END_OF_FILE:
01240                     {
01241                     if ( yywrap() )
01242                         return EOF;
01243 
01244                     if ( ! yy_did_buffer_switch_on_eof )
01245                         YY_NEW_FILE;
01246 #ifdef __cplusplus
01247                     return yyinput();
01248 #else
01249                     return input();
01250 #endif
01251                     }
01252 
01253                 case EOB_ACT_CONTINUE_SCAN:
01254                     yy_c_buf_p = yytext_ptr + offset;
01255                     break;
01256                 }
01257             }
01258         }
01259 
01260     c = *(unsigned char *) yy_c_buf_p;  /* cast for 8-bit char's */
01261     *yy_c_buf_p = '\0'; /* preserve yytext */
01262     yy_hold_char = *++yy_c_buf_p;
01263 
01264     yy_current_buffer->yy_at_bol = (c == '\n');
01265 
01266     return c;
01267     }
01268 
01269 
01270 #ifdef YY_USE_PROTOS
01271 void yyrestart( FILE *input_file )
01272 #else
01273 void yyrestart( input_file )
01274 FILE *input_file;
01275 #endif
01276     {
01277     if ( ! yy_current_buffer )
01278         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
01279 
01280     yy_init_buffer( yy_current_buffer, input_file );
01281     yy_load_buffer_state();
01282     }
01283 
01284 
01285 #ifdef YY_USE_PROTOS
01286 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
01287 #else
01288 void yy_switch_to_buffer( new_buffer )
01289 YY_BUFFER_STATE new_buffer;
01290 #endif
01291     {
01292     if ( yy_current_buffer == new_buffer )
01293         return;
01294 
01295     if ( yy_current_buffer )
01296         {
01297         /* Flush out information for old buffer. */
01298         *yy_c_buf_p = yy_hold_char;
01299         yy_current_buffer->yy_buf_pos = yy_c_buf_p;
01300         yy_current_buffer->yy_n_chars = yy_n_chars;
01301         }
01302 
01303     yy_current_buffer = new_buffer;
01304     yy_load_buffer_state();
01305 
01306     /* We don't actually know whether we did this switch during
01307      * EOF (yywrap()) processing, but the only time this flag
01308      * is looked at is after yywrap() is called, so it's safe
01309      * to go ahead and always set it.
01310      */
01311     yy_did_buffer_switch_on_eof = 1;
01312     }
01313 
01314 
01315 #ifdef YY_USE_PROTOS
01316 void yy_load_buffer_state( void )
01317 #else
01318 void yy_load_buffer_state()
01319 #endif
01320     {
01321     yy_n_chars = yy_current_buffer->yy_n_chars;
01322     yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
01323     yyin = yy_current_buffer->yy_input_file;
01324     yy_hold_char = *yy_c_buf_p;
01325     }
01326 
01327 
01328 #ifdef YY_USE_PROTOS
01329 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
01330 #else
01331 YY_BUFFER_STATE yy_create_buffer( file, size )
01332 FILE *file;
01333 int size;
01334 #endif
01335     {
01336     YY_BUFFER_STATE b;
01337 
01338     b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
01339     if ( ! b )
01340         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01341 
01342     b->yy_buf_size = size;
01343 
01344     /* yy_ch_buf has to be 2 characters longer than the size given because
01345      * we need to put in 2 end-of-buffer characters.
01346      */
01347     b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
01348     if ( ! b->yy_ch_buf )
01349         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01350 
01351     b->yy_is_our_buffer = 1;
01352 
01353     yy_init_buffer( b, file );
01354 
01355     return b;
01356     }
01357 
01358 
01359 #ifdef YY_USE_PROTOS
01360 void yy_delete_buffer( YY_BUFFER_STATE b )
01361 #else
01362 void yy_delete_buffer( b )
01363 YY_BUFFER_STATE b;
01364 #endif
01365     {
01366     if ( ! b )
01367         return;
01368 
01369     if ( b == yy_current_buffer )
01370         yy_current_buffer = (YY_BUFFER_STATE) 0;
01371 
01372     if ( b->yy_is_our_buffer )
01373         yy_flex_free( (void *) b->yy_ch_buf );
01374 
01375     yy_flex_free( (void *) b );
01376     }
01377 
01378 
01379 
01380 #ifdef YY_USE_PROTOS
01381 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
01382 #else
01383 void yy_init_buffer( b, file )
01384 YY_BUFFER_STATE b;
01385 FILE *file;
01386 #endif
01387 
01388 
01389     {
01390     yy_flush_buffer( b );
01391 
01392     b->yy_input_file = file;
01393     b->yy_fill_buffer = 1;
01394 
01395 #if YY_ALWAYS_INTERACTIVE
01396     b->yy_is_interactive = 1;
01397 #else
01398 #if YY_NEVER_INTERACTIVE
01399     b->yy_is_interactive = 0;
01400 #else
01401     b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
01402 #endif
01403 #endif
01404     }
01405 
01406 
01407 #ifdef YY_USE_PROTOS
01408 void yy_flush_buffer( YY_BUFFER_STATE b )
01409 #else
01410 void yy_flush_buffer( b )
01411 YY_BUFFER_STATE b;
01412 #endif
01413 
01414     {
01415     if ( ! b )
01416         return;
01417 
01418     b->yy_n_chars = 0;
01419 
01420     /* We always need two end-of-buffer characters.  The first causes
01421      * a transition to the end-of-buffer state.  The second causes
01422      * a jam in that state.
01423      */
01424     b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
01425     b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
01426 
01427     b->yy_buf_pos = &b->yy_ch_buf[0];
01428 
01429     b->yy_at_bol = 1;
01430     b->yy_buffer_status = YY_BUFFER_NEW;
01431 
01432     if ( b == yy_current_buffer )
01433         yy_load_buffer_state();
01434     }
01435 
01436 
01437 #ifndef YY_NO_SCAN_BUFFER
01438 #ifdef YY_USE_PROTOS
01439 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
01440 #else
01441 YY_BUFFER_STATE yy_scan_buffer( base, size )
01442 char *base;
01443 yy_size_t size;
01444 #endif
01445     {
01446     YY_BUFFER_STATE b;
01447 
01448     if ( size < 2 ||
01449          base[size-2] != YY_END_OF_BUFFER_CHAR ||
01450          base[size-1] != YY_END_OF_BUFFER_CHAR )
01451         /* They forgot to leave room for the EOB's. */
01452         return 0;
01453 
01454     b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
01455     if ( ! b )
01456         YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
01457 
01458     b->yy_buf_size = size - 2;  /* "- 2" to take care of EOB's */
01459     b->yy_buf_pos = b->yy_ch_buf = base;
01460     b->yy_is_our_buffer = 0;
01461     b->yy_input_file = 0;
01462     b->yy_n_chars = b->yy_buf_size;
01463     b->yy_is_interactive = 0;
01464     b->yy_at_bol = 1;
01465     b->yy_fill_buffer = 0;
01466     b->yy_buffer_status = YY_BUFFER_NEW;
01467 
01468     yy_switch_to_buffer( b );
01469 
01470     return b;
01471     }
01472 #endif
01473 
01474 
01475 #ifndef YY_NO_SCAN_STRING
01476 #ifdef YY_USE_PROTOS
01477 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
01478 #else
01479 YY_BUFFER_STATE yy_scan_string( yy_str )
01480 yyconst char *yy_str;
01481 #endif
01482     {
01483     int len;
01484     for ( len = 0; yy_str[len]; ++len )
01485         ;
01486 
01487     return yy_scan_bytes( yy_str, len );
01488     }
01489 #endif
01490 
01491 
01492 #ifndef YY_NO_SCAN_BYTES
01493 #ifdef YY_USE_PROTOS
01494 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
01495 #else
01496 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
01497 yyconst char *bytes;
01498 int len;
01499 #endif
01500     {
01501     YY_BUFFER_STATE b;
01502     char *buf;
01503     yy_size_t n;
01504     int i;
01505 
01506     /* Get memory for full buffer, including space for trailing EOB's. */
01507     n = len + 2;
01508     buf = (char *) yy_flex_alloc( n );
01509     if ( ! buf )
01510         YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
01511 
01512     for ( i = 0; i < len; ++i )
01513         buf[i] = bytes[i];
01514 
01515     buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
01516 
01517     b = yy_scan_buffer( buf, n );
01518     if ( ! b )
01519         YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
01520 
01521     /* It's okay to grow etc. this buffer, and we should throw it
01522      * away when we're done.
01523      */
01524     b->yy_is_our_buffer = 1;
01525 
01526     return b;
01527     }
01528 #endif
01529 
01530 
01531 #ifndef YY_NO_PUSH_STATE
01532 #ifdef YY_USE_PROTOS
01533 static void yy_push_state( int new_state )
01534 #else
01535 static void yy_push_state( new_state )
01536 int new_state;
01537 #endif
01538     {
01539     if ( yy_start_stack_ptr >= yy_start_stack_depth )
01540         {
01541         yy_size_t new_size;
01542 
01543         yy_start_stack_depth += YY_START_STACK_INCR;
01544         new_size = yy_start_stack_depth * sizeof( int );
01545 
01546         if ( ! yy_start_stack )
01547             yy_start_stack = (int *) yy_flex_alloc( new_size );
01548 
01549         else
01550             yy_start_stack = (int *) yy_flex_realloc(
01551                     (void *) yy_start_stack, new_size );
01552 
01553         if ( ! yy_start_stack )
01554             YY_FATAL_ERROR(
01555             "out of memory expanding start-condition stack" );
01556         }
01557 
01558     yy_start_stack[yy_start_stack_ptr++] = YY_START;
01559 
01560     BEGIN(new_state);
01561     }
01562 #endif
01563 
01564 
01565 #ifndef YY_NO_POP_STATE
01566 static void yy_pop_state()
01567     {
01568     if ( --yy_start_stack_ptr < 0 )
01569         YY_FATAL_ERROR( "start-condition stack underflow" );
01570 
01571     BEGIN(yy_start_stack[yy_start_stack_ptr]);
01572     }
01573 #endif
01574 
01575 
01576 #ifndef YY_NO_TOP_STATE
01577 static int yy_top_state()
01578     {
01579     return yy_start_stack[yy_start_stack_ptr - 1];
01580     }
01581 #endif
01582 
01583 #ifndef YY_EXIT_FAILURE
01584 #define YY_EXIT_FAILURE 2
01585 #endif
01586 
01587 #ifdef YY_USE_PROTOS
01588 static void yy_fatal_error( yyconst char msg[] )
01589 #else
01590 static void yy_fatal_error( msg )
01591 char msg[];
01592 #endif
01593     {
01594     (void) fprintf( stderr, "%s\n", msg );
01595     exit( YY_EXIT_FAILURE );
01596     }
01597 
01598 
01599 
01600 /* Redefine yyless() so it works in section 3 code. */
01601 
01602 #undef yyless
01603 #define yyless(n) \
01604     do \
01605         { \
01606         /* Undo effects of setting up yytext. */ \
01607         yytext[yyleng] = yy_hold_char; \
01608         yy_c_buf_p = yytext + n; \
01609         yy_hold_char = *yy_c_buf_p; \
01610         *yy_c_buf_p = '\0'; \
01611         yyleng = n; \
01612         } \
01613     while ( 0 )
01614 
01615 
01616 /* Internal utility routines. */
01617 
01618 #ifndef yytext_ptr
01619 #ifdef YY_USE_PROTOS
01620 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
01621 #else
01622 static void yy_flex_strncpy( s1, s2, n )
01623 char *s1;
01624 yyconst char *s2;
01625 int n;
01626 #endif
01627     {
01628     register int i;
01629     for ( i = 0; i < n; ++i )
01630         s1[i] = s2[i];
01631     }
01632 #endif
01633 
01634 #ifdef YY_NEED_STRLEN
01635 #ifdef YY_USE_PROTOS
01636 static int yy_flex_strlen( yyconst char *s )
01637 #else
01638 static int yy_flex_strlen( s )
01639 yyconst char *s;
01640 #endif
01641     {
01642     register int n;
01643     for ( n = 0; s[n]; ++n )
01644         ;
01645 
01646     return n;
01647     }
01648 #endif
01649 
01650 
01651 #ifdef YY_USE_PROTOS
01652 static void *yy_flex_alloc( yy_size_t size )
01653 #else
01654 static void *yy_flex_alloc( size )
01655 yy_size_t size;
01656 #endif
01657     {
01658     return (void *) malloc( size );
01659     }
01660 
01661 #ifdef YY_USE_PROTOS
01662 static void *yy_flex_realloc( void *ptr, yy_size_t size )
01663 #else
01664 static void *yy_flex_realloc( ptr, size )
01665 void *ptr;
01666 yy_size_t size;
01667 #endif
01668     {
01669     /* The cast to (char *) in the following accommodates both
01670      * implementations that use char* generic pointers, and those
01671      * that use void* generic pointers.  It works with the latter
01672      * because both ANSI C and C++ allow castless assignment from
01673      * any pointer type to void*, and deal with argument conversions
01674      * as though doing an assignment.
01675      */
01676     return (void *) realloc( (char *) ptr, size );
01677     }
01678 
01679 #ifdef YY_USE_PROTOS
01680 static void yy_flex_free( void *ptr )
01681 #else
01682 static void yy_flex_free( ptr )
01683 void *ptr;
01684 #endif
01685     {
01686     free( ptr );
01687     }
01688 
01689 #if YY_MAIN
01690 int main()
01691     {
01692     yylex();
01693     return 0;
01694     }
01695 #endif
01696 #line 73 "./fooscanner.l"
01697 
01698 
01699 void kdeprint_foomatic2scanner_init( QIODevice *d )
01700 {
01701     kdeprint_foomatic2scanner_device = d;
01702 }
01703 
01704 void kdeprint_foomatic2scanner_terminate()
01705 {
01706     kdeprint_foomatic2scanner_device = NULL;
01707 }
KDE Home | KDE Accessibility Home | Description of Access Keys