# kdeprint Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# ppdscanner.cpp

    00001 #define yy_create_buffer kdeprint_ppd_create_buffer
    00002 #define yy_delete_buffer kdeprint_ppd_delete_buffer
    00003 #define yy_scan_buffer kdeprint_ppd_scan_buffer
    00004 #define yy_scan_string kdeprint_ppd_scan_string
    00005 #define yy_scan_bytes kdeprint_ppd_scan_bytes
    00006 #define yy_flex_debug kdeprint_ppd_flex_debug
    00007 #define yy_init_buffer kdeprint_ppd_init_buffer
    00008 #define yy_flush_buffer kdeprint_ppd_flush_buffer
    00009 #define yy_load_buffer_state kdeprint_ppd_load_buffer_state
    00010 #define yy_switch_to_buffer kdeprint_ppd_switch_to_buffer
    00011 #define yyin kdeprint_ppdin
    00012 #define yyleng kdeprint_ppdleng
    00013 #define yylex kdeprint_ppdlex
    00014 #define yyout kdeprint_ppdout
    00015 #define yyrestart kdeprint_ppdrestart
    00016 #define yytext kdeprint_ppdtext
    00017
    00018 #line 19 "./ppdscanner.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 37
    00307 #define YY_END_OF_BUFFER 38
    00308 static yyconst short int yy_accept[172] =
    00309     {   0,
    00310         0,    0,    0,    0,    0,    0,   21,   21,   29,   29,
    00311         0,    0,   38,   36,   35,   36,   19,   17,   20,   18,
    00312        27,   25,   25,   26,   28,   21,   23,   22,   29,   30,
    00313        34,   33,   36,   31,   16,   15,   16,   16,   16,   16,
    00314        16,   16,   16,   16,   16,   17,   25,    0,   25,   24,
    00315        21,   29,   33,   32,   15,   15,   15,   16,   16,   16,
    00316        16,   16,   16,   16,   16,   16,   24,   15,   16,   16,
    00317        13,   16,   16,   16,   16,   16,   16,   15,   16,   16,
    00318        16,   16,   16,   16,   16,   16,   16,   15,   16,   16,
    00319        16,   16,   16,   16,   16,   16,   16,   16,   15,   16,
    00320
    00321        16,   16,   16,   16,   16,   16,   16,    2,   16,   16,
    00322        15,   16,    4,   16,   16,   16,   16,   16,   16,    2,
    00323        16,   16,   15,   16,    4,    8,    8,   16,   16,   16,
    00324        16,   16,   16,   16,   15,   16,    7,   16,   16,    1,
    00325        16,    5,   16,   16,   15,    6,   16,    3,   16,   16,
    00326        16,   15,   16,   16,   16,   16,   15,   14,   16,   16,
    00327        16,   16,   12,   16,   16,    9,   16,   11,   16,   10,
    00328         0
    00329     } ;
    00330
    00331 static yyconst int yy_ec[256] =
    00332     {   0,
    00333         1,    1,    1,    1,    1,    1,    1,    1,    1,    2,
    00334         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    00335         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    00336         1,    3,    4,    5,    6,    4,    7,    4,    4,    4,
    00337         4,    8,    4,    4,    4,    4,    9,   10,   10,   10,
    00338        10,   10,   10,   10,   10,   10,   10,   11,    4,    4,
    00339         4,    4,    4,    4,   12,   10,   13,   14,   15,   10,
    00340        16,   10,   17,   18,   10,   19,   20,   21,   22,   23,
    00341        10,   10,   10,   24,   25,   10,   10,   10,   10,   10,
    00342         4,    4,    4,    4,    4,    4,   26,   27,   10,   28,
    00343
    00344        29,   30,   31,   10,   32,   10,   10,   33,   34,   35,
    00345        36,   37,   10,   38,   39,   40,   41,   10,   10,   10,
    00346        10,   10,    4,    4,    4,    4,    1,    1,    1,    1,
    00347         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    00348         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    00349         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    00350         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    00351         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    00352         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    00353         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    00354
    00355         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    00356         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    00357         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    00358         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    00359         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    00360         1,    1,    1,    1,    1
    00361     } ;
    00362
    00363 static yyconst int yy_meta[42] =
    00364     {   0,
    00365         1,    2,    3,    4,    4,    4,    4,    5,    1,    4,
    00366         6,    4,    4,    4,    4,    4,    4,    4,    4,    4,
    00367         4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
    00368         4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
    00369         4
    00370     } ;
    00371
    00372 static yyconst short int yy_base[194] =
    00373     {   0,
    00374         0,    1,    3,   14,   17,   28,   25,   30,  300,  299,
    00375        41,   45,  300,  303,  303,   50,  303,    0,  303,  303,
    00376       303,    0,   75,  303,  303,    0,  303,  303,    0,  303,
    00377       303,    0,    0,  303,    0,   78,  266,  269,  262,  262,
    00378       282,  258,  256,  266,  274,    0,    0,  285,   89,    0,
    00379         0,    0,    0,    0,    0,  276,   92,  252,  257,  258,
    00380       259,  265,  248,  253,  244,  267,  303,  257,  239,  251,
    00381         0,  245,   38,  250,  239,  244,  236,  251,  241,  228,
    00382       239,  234,  229,  248,   45,  226,  228,  248,   58,  228,
    00383       234,  223,  229,  244,  218,  238,  240,  214,  240,  213,
    00384
    00385       233,  209,  221,  208,  211,  209,  208,  100,  211,  202,
    00386       217,  204,  105,  231,  205,  208,  211,  200,  193,  110,
    00387       199,  194,  219,  189,  115,    0,    0,  200,  203,  210,
    00388       187,  188,  195,  197,  219,  184,    0,  208,  202,    0,
    00389       178,    0,  182,  184,  191,    0,  147,    0,  141,  135,
    00390        67,   97,   68,   70,   56,   45,   80,  303,   43,   34,
    00391        26,   20,    0,   23,   20,    0,    5,    0,    1,    0,
    00392       303,  123,  129,  135,  141,  147,  153,  156,  159,  161,
    00393       166,  172,  177,    6,    3,  183,  189,  195,  198,  200,
    00394       202,  204,  209
    00395
    00396     } ;
    00397
    00398 static yyconst short int yy_def[194] =
    00399     {   0,
    00400       172,  172,  173,  173,  174,  174,  175,  175,  176,  176,
    00401       177,  177,  171,  171,  171,  178,  171,  179,  171,  171,
    00402       171,  180,  181,  171,  171,  182,  171,  171,  183,  171,
    00403       171,  184,  185,  171,  178,  186,  178,  178,  178,  178,
    00404       178,  178,  178,  178,  178,  179,  180,  187,  181,  180,
    00405       182,  183,  184,  185,  188,  188,  186,  178,  178,  178,
    00406       178,  178,  178,  178,  178,  178,  171,  188,  178,  178,
    00407       178,  178,  178,  178,  178,  178,  178,  188,  178,  178,
    00408       178,  178,  178,  178,  178,  178,  178,  188,  178,  178,
    00409       178,  178,  178,  178,  178,  178,  178,  178,  188,  178,
    00410
    00411       178,  178,  178,  178,  178,  178,  178,  189,  178,  178,
    00412       188,  178,  190,  191,  178,  178,  178,  178,  178,  189,
    00413       178,  178,  188,  178,  190,  191,  192,  178,  178,  178,
    00414       178,  178,  178,  178,  188,  178,  192,  178,  178,  178,
    00415       178,  178,  178,  178,  188,  178,  178,  178,  178,  178,
    00416       178,  193,  178,  178,  178,  178,  193,  171,  178,  178,
    00417       178,  178,  178,  178,  178,  178,  178,  178,  178,  178,
    00418         0,  171,  171,  171,  171,  171,  171,  171,  171,  171,
    00419       171,  171,  171,  171,  171,  171,  171,  171,  171,  171,
    00420       171,  171,  171
    00421
    00422     } ;
    00423
    00424 static yyconst short int yy_nxt[345] =
    00425     {   0,
    00426       171,   15,   15,   14,   17,   14,   54,   16,   16,   53,
    00427       171,   19,  171,   20,   14,   17,   14,   14,   21,   14,
    00428       171,   23,   19,  171,   20,   24,   27,   25,   14,   21,
    00429        14,   27,   23,  171,  171,   28,   24,  171,   25,  170,
    00430        28,   14,   31,   14,  169,   14,   31,   14,   33,   14,
    00431        82,   34,   33,   14,  168,   34,   36,  167,  166,   83,
    00432        95,  165,   37,   38,   39,  164,   40,   41,  163,   96,
    00433        42,   43,   44,  100,   45,   48,   48,   48,   55,   50,
    00434        56,  158,  101,   48,  162,   48,   55,  161,   55,   48,
    00435        48,   48,   55,   50,   55,  160,  159,   48,  158,   48,
    00436
    00437        55,  156,   55,   35,   35,   35,   35,   35,   35,   35,
    00438        35,   35,   35,   35,   35,   35,   35,   35,   35,   35,
    00439        35,   35,   35,   14,   14,   14,   14,   14,   14,   18,
    00440        18,   18,   18,   18,   18,   22,   22,   22,   22,   22,
    00441        22,   26,   26,   26,   26,   26,   26,   29,   29,   29,
    00442        29,   29,   29,   32,   32,   32,   32,   32,   32,   35,
    00443        35,   46,   46,   46,   47,   47,   49,   49,   49,   49,
    00444        49,   49,   51,  155,   51,   51,   51,   52,  154,   52,
    00445        52,   52,   52,   57,  153,   57,   57,   57,   57,   48,
    00446        48,   48,   48,   48,   48,   55,  152,   55,   55,   55,
    00447
    00448        55,  120,  120,  125,  125,  126,  126,  137,  137,  157,
    00449       157,  157,  157,  157,  157,  151,  150,  149,  148,  147,
    00450       146,  145,  144,  143,  142,  141,  140,  139,  138,  136,
    00451       135,  134,  133,  132,  131,  130,  129,  128,  127,  124,
    00452       123,  122,  121,  119,  118,  117,  116,  115,  114,  113,
    00453       112,  111,  110,  109,  108,  107,  106,  105,  104,  103,
    00454       102,   99,   98,   97,   94,   93,   92,   91,   90,   89,
    00455        88,   87,   86,   85,   84,   81,   80,   79,   78,   77,
    00456        76,   75,   74,   73,   72,   71,   70,   69,   68,   67,
    00457        66,   65,   64,   63,   62,   61,   60,   59,   58,  171,
    00458
    00459        30,   30,   13,  171,  171,  171,  171,  171,  171,  171,
    00460       171,  171,  171,  171,  171,  171,  171,  171,  171,  171,
    00461       171,  171,  171,  171,  171,  171,  171,  171,  171,  171,
    00462       171,  171,  171,  171,  171,  171,  171,  171,  171,  171,
    00463       171,  171,  171,  171
    00464     } ;
    00465
    00466 static yyconst short int yy_chk[345] =
    00467     {   0,
    00468         0,    1,    2,    3,    3,    3,  185,    1,    2,  184,
    00469         0,    3,    0,    3,    4,    4,    4,    5,    5,    5,
    00470         0,    5,    4,    0,    4,    5,    7,    5,    6,    6,
    00471         6,    8,    6,    0,    0,    7,    6,    0,    6,  169,
    00472         8,   11,   11,   11,  167,   12,   12,   12,   11,   11,
    00473        73,   11,   12,   12,  165,   12,   16,  164,  162,   73,
    00474        85,  161,   16,   16,   16,  160,   16,   16,  159,   85,
    00475        16,   16,   16,   89,   16,   23,   23,   23,   36,   23,
    00476        36,  157,   89,   23,  156,   23,   36,  155,   36,   49,
    00477        49,   49,   57,   49,   57,  154,  153,   49,  152,   49,
    00478
    00479        57,  151,   57,  108,  108,  108,  108,  108,  113,  113,
    00480       113,  113,  113,  120,  120,  120,  120,  120,  125,  125,
    00481       125,  125,  125,  172,  172,  172,  172,  172,  172,  173,
    00482       173,  173,  173,  173,  173,  174,  174,  174,  174,  174,
    00483       174,  175,  175,  175,  175,  175,  175,  176,  176,  176,
    00484       176,  176,  176,  177,  177,  177,  177,  177,  177,  178,
    00485       178,  179,  179,  179,  180,  180,  181,  181,  181,  181,
    00486       181,  181,  182,  150,  182,  182,  182,  183,  149,  183,
    00487       183,  183,  183,  186,  147,  186,  186,  186,  186,  187,
    00488       187,  187,  187,  187,  187,  188,  145,  188,  188,  188,
    00489
    00490       188,  189,  189,  190,  190,  191,  191,  192,  192,  193,
    00491       193,  193,  193,  193,  193,  144,  143,  141,  139,  138,
    00492       136,  135,  134,  133,  132,  131,  130,  129,  128,  124,
    00493       123,  122,  121,  119,  118,  117,  116,  115,  114,  112,
    00494       111,  110,  109,  107,  106,  105,  104,  103,  102,  101,
    00495       100,   99,   98,   97,   96,   95,   94,   93,   92,   91,
    00496        90,   88,   87,   86,   84,   83,   82,   81,   80,   79,
    00497        78,   77,   76,   75,   74,   72,   70,   69,   68,   66,
    00498        65,   64,   63,   62,   61,   60,   59,   58,   56,   48,
    00499        45,   44,   43,   42,   41,   40,   39,   38,   37,   13,
    00500
    00501        10,    9,  171,  171,  171,  171,  171,  171,  171,  171,
    00502       171,  171,  171,  171,  171,  171,  171,  171,  171,  171,
    00503       171,  171,  171,  171,  171,  171,  171,  171,  171,  171,
    00504       171,  171,  171,  171,  171,  171,  171,  171,  171,  171,
    00505       171,  171,  171,  171
    00506     } ;
    00507
    00508 static yy_state_type yy_last_accepting_state;
    00509 static char *yy_last_accepting_cpos;
    00510
    00511 /* The intent behind this definition is that it'll catch
    00512  * any uses of REJECT which flex missed.
    00513  */
    00514 #define REJECT reject_used_but_not_detected
    00515 #define yymore() yymore_used_but_not_detected
    00516 #define YY_MORE_ADJ 0
    00517 #define YY_RESTORE_YY_MORE_OFFSET
    00518 char *yytext;
    00519 #line 1 "./ppdscanner.l"
    00520 #define INITIAL 0
    00521 #line 2 "./ppdscanner.l"
    00522 /*
    00523  *  This file is part of the KDE libraries
    00524  *  Copyright (c) 2001-2003 Michael Goffioul <kdeprint@swing.be>
    00525  *
    00526  *  This library is free software; you can redistribute it and/or
    00527  *  modify it under the terms of the GNU Library General Public
    00528  *  License version 2 as published by the Free Software Foundation.
    00529  *
    00530  *  This library is distributed in the hope that it will be useful,
    00531  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00532  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00533  *  Library General Public License for more details.
    00534  *
    00535  *  You should have received a copy of the GNU Library General Public License
    00536  *  along with this library; see the file COPYING.LIB.  If not, write to
    00537  *  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00538  *  Boston, MA 02111-1307, USA.
    00539  **/
    00540
    00541 #include <qstringlist.h>
    00542 #include <qiodevice.h>
    00543 #define YYSTYPE QStringList
    00544 #include "ppdparser.cpp.h"
    00545
    00546 #define yylval kdeprint_ppdlval
    00547
    00548 QIODevice *kdeprint_ppdscanner_device = NULL;
    00549 #define YY_INPUT(buf,result,max_size) \
    00550     { \
    00551         if (kdeprint_ppdscanner_device) \
    00552         { \
    00553             result = kdeprint_ppdscanner_device->readBlock(buf,max_size); \
    00554             if (result < 0) \
    00555                 result = 0; \
    00556         } \
    00557         else \
    00558             result = 0; \
    00559     }
    00560 int kdeprint_ppdscanner_lno = 0;
    00561
    00562 #if 0
    00563 #define QDEBUG0(s) qDebug(s)
    00564 #define QDEBUG1(s,a) qDebug(s,a)
    00565 #else
    00566 #define QDEBUG0(s)
    00567 #define QDEBUG1(s,a)
    00568 #endif
    00569 #define option 1
    00570 #define value 2
    00571 #define translation_1 3
    00572 #define translation_2 4
    00573 #define constr 5
    00574
    00575 #line 576 "./ppdscanner.cpp"
    00576
    00577 /* Macros after this point can all be overridden by user definitions in
    00578  * section 1.
    00579  */
    00580
    00581 #ifndef YY_SKIP_YYWRAP
    00582 #ifdef __cplusplus
    00583 extern "C" int yywrap YY_PROTO(( void ));
    00584 #else
    00585 extern int yywrap YY_PROTO(( void ));
    00586 #endif
    00587 #endif
    00588
    00589 #ifndef YY_NO_UNPUT
    00590 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
    00591 #endif
    00592
    00593 #ifndef yytext_ptr
    00594 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
    00595 #endif
    00596
    00597 #ifdef YY_NEED_STRLEN
    00598 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
    00599 #endif
    00600
    00601 #ifndef YY_NO_INPUT
    00602 #ifdef __cplusplus
    00603 static int yyinput YY_PROTO(( void ));
    00604 #else
    00605 static int input YY_PROTO(( void ));
    00606 #endif
    00607 #endif
    00608
    00609 #if YY_STACK_USED
    00610 static int yy_start_stack_ptr = 0;
    00611 static int yy_start_stack_depth = 0;
    00612 static int *yy_start_stack = 0;
    00613 #ifndef YY_NO_PUSH_STATE
    00614 static void yy_push_state YY_PROTO(( int new_state ));
    00615 #endif
    00616 #ifndef YY_NO_POP_STATE
    00617 static void yy_pop_state YY_PROTO(( void ));
    00618 #endif
    00619 #ifndef YY_NO_TOP_STATE
    00620 static int yy_top_state YY_PROTO(( void ));
    00621 #endif
    00622
    00623 #else
    00624 #define YY_NO_PUSH_STATE 1
    00625 #define YY_NO_POP_STATE 1
    00626 #define YY_NO_TOP_STATE 1
    00627 #endif
    00628
    00629 #ifdef YY_MALLOC_DECL
    00630 YY_MALLOC_DECL
    00631 #else
    00632 #if __STDC__
    00633 #ifndef __cplusplus
    00634 #include <stdlib.h>
    00635 #endif
    00636 #else
    00637 /* Just try to get by without declaring the routines.  This will fail
    00638  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
    00639  * or sizeof(void*) != sizeof(int).
    00640  */
    00641 #endif
    00642 #endif
    00643
    00644 /* Amount of stuff to slurp up with each read. */
    00645 #ifndef YY_READ_BUF_SIZE
    00646 #define YY_READ_BUF_SIZE 8192
    00647 #endif
    00648
    00649 /* Copy whatever the last rule matched to the standard output. */
    00650
    00651 #ifndef ECHO
    00652 /* This used to be an fputs(), but since the string might contain NUL's,
    00653  * we now use fwrite().
    00654  */
    00655 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
    00656 #endif
    00657
    00658 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
    00659  * is returned in "result".
    00660  */
    00661 #ifndef YY_INPUT
    00662 #define YY_INPUT(buf,result,max_size) \
    00663     if ( yy_current_buffer->yy_is_interactive ) \
    00664         { \
    00665         int c = '*', n; \
    00666         for ( n = 0; n < max_size && \
    00667                  (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
    00668             buf[n] = (char) c; \
    00669         if ( c == '\n' ) \
    00670             buf[n++] = (char) c; \
    00671         if ( c == EOF && ferror( yyin ) ) \
    00672             YY_FATAL_ERROR( "input in flex scanner failed" ); \
    00673         result = n; \
    00674         } \
    00675     else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
    00676           && ferror( yyin ) ) \
    00677         YY_FATAL_ERROR( "input in flex scanner failed" );
    00678 #endif
    00679
    00680 /* No semi-colon after return; correct usage is to write "yyterminate();" -
    00681  * we don't want an extra ';' after the "return" because that will cause
    00682  * some compilers to complain about unreachable statements.
    00683  */
    00684 #ifndef yyterminate
    00685 #define yyterminate() return YY_NULL
    00686 #endif
    00687
    00688 /* Number of entries by which start-condition stack grows. */
    00689 #ifndef YY_START_STACK_INCR
    00690 #define YY_START_STACK_INCR 25
    00691 #endif
    00692
    00693 /* Report a fatal error. */
    00694 #ifndef YY_FATAL_ERROR
    00695 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
    00696 #endif
    00697
    00698 /* Default declaration of generated scanner - a define so the user can
    00699  * easily add parameters.
    00700  */
    00701 #ifndef YY_DECL
    00702 #define YY_DECL int yylex YY_PROTO(( void ))
    00703 #endif
    00704
    00705 /* Code executed at the beginning of each rule, after yytext and yyleng
    00706  * have been set up.
    00707  */
    00708 #ifndef YY_USER_ACTION
    00709 #define YY_USER_ACTION
    00710 #endif
    00711
    00712 /* Code executed at the end of each rule. */
    00713 #ifndef YY_BREAK
    00714 #define YY_BREAK break;
    00715 #endif
    00716
    00717 #define YY_RULE_SETUP \
    00718     YY_USER_ACTION
    00719
    00720 YY_DECL
    00721     {
    00722     register yy_state_type yy_current_state;
    00723     register char *yy_cp, *yy_bp;
    00724     register int yy_act;
    00725
    00726 #line 59 "./ppdscanner.l"
    00727
    00728
    00732 #line 733 "./ppdscanner.cpp"
    00733
    00734     if ( yy_init )
    00735         {
    00736         yy_init = 0;
    00737
    00738 #ifdef YY_USER_INIT
    00739         YY_USER_INIT;
    00740 #endif
    00741
    00742         if ( ! yy_start )
    00743             yy_start = 1;   /* first start state */
    00744
    00745         if ( ! yyin )
    00746             yyin = stdin;
    00747
    00748         if ( ! yyout )
    00749             yyout = stdout;
    00750
    00751         if ( ! yy_current_buffer )
    00752             yy_current_buffer =
    00753                 yy_create_buffer( yyin, YY_BUF_SIZE );
    00754
    00755         yy_load_buffer_state();
    00756         }
    00757
    00758     while ( 1 )     /* loops until end-of-file is reached */
    00759         {
    00760         yy_cp = yy_c_buf_p;
    00761
    00762         /* Support of yytext. */
    00763         *yy_cp = yy_hold_char;
    00764
    00765         /* yy_bp points to the position in yy_ch_buf of the start of
    00766          * the current run.
    00767          */
    00768         yy_bp = yy_cp;
    00769
    00770         yy_current_state = yy_start;
    00771 yy_match:
    00772         do
    00773             {
    00774             register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
    00775             if ( yy_accept[yy_current_state] )
    00776                 {
    00777                 yy_last_accepting_state = yy_current_state;
    00778                 yy_last_accepting_cpos = yy_cp;
    00779                 }
    00780             while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
    00781                 {
    00782                 yy_current_state = (int) yy_def[yy_current_state];
    00783                 if ( yy_current_state >= 172 )
    00784                     yy_c = yy_meta[(unsigned int) yy_c];
    00785                 }
    00786             yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
    00787             ++yy_cp;
    00788             }
    00789         while ( yy_base[yy_current_state] != 303 );
    00790
    00791 yy_find_action:
    00792         yy_act = yy_accept[yy_current_state];
    00793         if ( yy_act == 0 )
    00794             { /* have to back up */
    00795             yy_cp = yy_last_accepting_cpos;
    00796             yy_current_state = yy_last_accepting_state;
    00797             yy_act = yy_accept[yy_current_state];
    00798             }
    00799
    00800         YY_DO_BEFORE_ACTION;
    00801
    00802
    00803 do_action:  /* This label is used only to access EOF actions. */
    00804
    00805
    00806         switch ( yy_act )
    00807     { /* beginning of action switch */
    00808             case 0: /* must back up */
    00809             /* undo the effects of YY_DO_BEFORE_ACTION */
    00810             *yy_cp = yy_hold_char;
    00811             yy_cp = yy_last_accepting_cpos;
    00812             yy_current_state = yy_last_accepting_state;
    00813             goto yy_find_action;
    00814
    00815 case 1:
    00816 #line 65 "./ppdscanner.l"
    00817 case 2:
    00818 YY_RULE_SETUP
    00819 #line 65 "./ppdscanner.l"
    00820 { QDEBUG0("Open UI"); BEGIN(option); return OPENUI; }
    00821     YY_BREAK
    00822 case 3:
    00823 #line 67 "./ppdscanner.l"
    00824 case 4:
    00825 YY_RULE_SETUP
    00826 #line 67 "./ppdscanner.l"
    00827 { QDEBUG0("Close UI"); BEGIN(value); return CLOSEUI; }
    00828     YY_BREAK
    00829 case 5:
    00830 YY_RULE_SETUP
    00831 #line 68 "./ppdscanner.l"
    00832 { QDEBUG0("Open group"); BEGIN(option); return OPENGROUP; }
    00833     YY_BREAK
    00834 case 6:
    00835 YY_RULE_SETUP
    00836 #line 69 "./ppdscanner.l"
    00837 { QDEBUG0("Close group"); BEGIN(option); return CLOSEGROUP; }
    00838     YY_BREAK
    00839 case 7:
    00840 YY_RULE_SETUP
    00841 #line 70 "./ppdscanner.l"
    00842 { yylval = yytext+9; BEGIN(option); return DEFAULT; }
    00843     YY_BREAK
    00844 case 8:
    00845 YY_RULE_SETUP
    00846 #line 71 "./ppdscanner.l"
    00847 { yylval = yytext+8; BEGIN(option); return DEFAULT; }
    00848     YY_BREAK
    00849 case 9:
    00850 #line 73 "./ppdscanner.l"
    00851 case 10:
    00852 YY_RULE_SETUP
    00853 #line 73 "./ppdscanner.l"
    00854 { BEGIN(constr); return CONSTRAINT; }
    00855     YY_BREAK
    00856 case 11:
    00857 YY_RULE_SETUP
    00858 #line 74 "./ppdscanner.l"
    00859 { BEGIN(option); return PAPERDIM; }
    00860     YY_BREAK
    00861 case 12:
    00862 YY_RULE_SETUP
    00863 #line 75 "./ppdscanner.l"
    00864 { BEGIN(option); return IMGAREA; }
    00865     YY_BREAK
    00866 case 13:
    00867 YY_RULE_SETUP
    00868 #line 76 "./ppdscanner.l"
    00869 { /* eat up */ }
    00870     YY_BREAK
    00871 case 14:
    00872 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
    00873 yy_c_buf_p = yy_cp -= 1;
    00874 YY_DO_BEFORE_ACTION; /* set up yytext again */
    00875 YY_RULE_SETUP
    00876 #line 78 "./ppdscanner.l"
    00877 { yylval = yytext+12; return FOODATA; }
    00878     YY_BREAK
    00879 case 15:
    00880 YY_RULE_SETUP
    00881 #line 79 "./ppdscanner.l"
    00882 { QDEBUG0("Comment"); return COMMENT; }
    00883     YY_BREAK
    00884 case 16:
    00885 YY_RULE_SETUP
    00886 #line 80 "./ppdscanner.l"
    00887 { yylval = yytext+1; QDEBUG1("Main keyword: %s",yytext+1); BEGIN(option); return KEYWORD; }
    00888     YY_BREAK
    00892 case 17:
    00893 YY_RULE_SETUP
    00894 #line 85 "./ppdscanner.l"
    00895 { yylval = yytext; QDEBUG1("Option: %s",yytext); return OPTION; }
    00896     YY_BREAK
    00897 case 18:
    00898 YY_RULE_SETUP
    00899 #line 86 "./ppdscanner.l"
    00900 { BEGIN(value); return ':'; }
    00901     YY_BREAK
    00902 case 19:
    00903 YY_RULE_SETUP
    00904 #line 87 "./ppdscanner.l"
    00905 { kdeprint_ppdscanner_lno++; BEGIN(INITIAL); }
    00906     YY_BREAK
    00907 case 20:
    00908 YY_RULE_SETUP
    00909 #line 88 "./ppdscanner.l"
    00910 { BEGIN(translation_1); return '/'; }
    00911     YY_BREAK
    00915 case 21:
    00916 YY_RULE_SETUP
    00917 #line 93 "./ppdscanner.l"
    00918 { yylval = yytext; QDEBUG1("Translation: %s",yytext); return TRANSLATION; }
    00919     YY_BREAK
    00920 case 22:
    00921 YY_RULE_SETUP
    00922 #line 94 "./ppdscanner.l"
    00923 { BEGIN(value); return ':'; }
    00924     YY_BREAK
    00925 case 23:
    00926 YY_RULE_SETUP
    00927 #line 95 "./ppdscanner.l"
    00928 { kdeprint_ppdscanner_lno++; BEGIN(INITIAL); }
    00929     YY_BREAK
    00933 case 24:
    00934 YY_RULE_SETUP
    00935 #line 100 "./ppdscanner.l"
    00936 { yylval = yytext; kdeprint_ppdscanner_lno += yylval[0].contains('\n'); QDEBUG1("Quoted value: %s",yytext); return QUOTED; }
    00937     YY_BREAK
    00938 case 25:
    00939 YY_RULE_SETUP
    00940 #line 101 "./ppdscanner.l"
    00941 { yylval = yytext; QDEBUG1("String part: %s",yytext); return STRINGPART; }
    00942     YY_BREAK
    00943 case 26:
    00944 YY_RULE_SETUP
    00945 #line 102 "./ppdscanner.l"
    00946 { BEGIN(translation_2); return '/'; }
    00947     YY_BREAK
    00948 case 27:
    00949 YY_RULE_SETUP
    00950 #line 103 "./ppdscanner.l"
    00951 { kdeprint_ppdscanner_lno++; BEGIN(INITIAL); }
    00952     YY_BREAK
    00953 case 28:
    00954 YY_RULE_SETUP
    00955 #line 104 "./ppdscanner.l"
    00956 { /* stay in the same state */ return ':'; }
    00957     YY_BREAK
    00961 case 29:
    00962 YY_RULE_SETUP
    00963 #line 109 "./ppdscanner.l"
    00964 { yylval = yytext; QDEBUG1("Translation: %s",yytext); return TRANSLATION; }
    00965     YY_BREAK
    00966 case 30:
    00967 YY_RULE_SETUP
    00968 #line 110 "./ppdscanner.l"
    00969 { kdeprint_ppdscanner_lno++; BEGIN(INITIAL); }
    00970     YY_BREAK
    00974 case 31:
    00975 YY_RULE_SETUP
    00976 #line 115 "./ppdscanner.l"
    00977 { return ':'; }
    00978     YY_BREAK
    00979 case 32:
    00980 YY_RULE_SETUP
    00981 #line 116 "./ppdscanner.l"
    00982 { yylval = yytext+1; QDEBUG1("Constraint keyword: %s",yytext); return KEYWORD; }
    00983     YY_BREAK
    00984 case 33:
    00985 YY_RULE_SETUP
    00986 #line 117 "./ppdscanner.l"
    00987 { yylval = yytext; QDEBUG1("Constraint option: %s",yytext); return OPTION; }
    00988     YY_BREAK
    00989 case 34:
    00990 YY_RULE_SETUP
    00991 #line 118 "./ppdscanner.l"
    00992 { kdeprint_ppdscanner_lno++; BEGIN(INITIAL); }
    00993     YY_BREAK
    00994 case 35:
    00995 YY_RULE_SETUP
    00996 #line 120 "./ppdscanner.l"
    00997 { kdeprint_ppdscanner_lno++; /* eat up */ }
    00998     YY_BREAK
    00999 case 36:
    01000 YY_RULE_SETUP
    01001 #line 121 "./ppdscanner.l"
    01002 { /* eat up */ }
    01003     YY_BREAK
    01004 case 37:
    01005 YY_RULE_SETUP
    01006 #line 123 "./ppdscanner.l"
    01007 ECHO;
    01008     YY_BREAK
    01009 #line 1010 "./ppdscanner.cpp"
    01010 case YY_STATE_EOF(INITIAL):
    01011 case YY_STATE_EOF(option):
    01012 case YY_STATE_EOF(value):
    01013 case YY_STATE_EOF(translation_1):
    01014 case YY_STATE_EOF(translation_2):
    01015 case YY_STATE_EOF(constr):
    01016     yyterminate();
    01017
    01018     case YY_END_OF_BUFFER:
    01019         {
    01020         /* Amount of text matched not including the EOB char. */
    01021         int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
    01022
    01023         /* Undo the effects of YY_DO_BEFORE_ACTION. */
    01024         *yy_cp = yy_hold_char;
    01025         YY_RESTORE_YY_MORE_OFFSET
    01026
    01027         if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
    01028             {
    01029             /* We're scanning a new file or input source.  It's
    01030              * possible that this happened because the user
    01031              * just pointed yyin at a new source and called
    01032              * yylex().  If so, then we have to assure
    01033              * consistency between yy_current_buffer and our
    01034              * globals.  Here is the right place to do so, because
    01035              * this is the first action (other than possibly a
    01036              * back-up) that will match for the new input source.
    01037              */
    01038             yy_n_chars = yy_current_buffer->yy_n_chars;
    01039             yy_current_buffer->yy_input_file = yyin;
    01040             yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
    01041             }
    01042
    01043         /* Note that here we test for yy_c_buf_p "<=" to the position
    01044          * of the first EOB in the buffer, since yy_c_buf_p will
    01045          * already have been incremented past the NUL character
    01046          * (since all states make transitions on EOB to the
    01047          * end-of-buffer state).  Contrast this with the test
    01048          * in input().
    01049          */
    01050         if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
    01051             { /* This was really a NUL. */
    01052             yy_state_type yy_next_state;
    01053
    01054             yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
    01055
    01056             yy_current_state = yy_get_previous_state();
    01057
    01058             /* Okay, we're now positioned to make the NUL
    01059              * transition.  We couldn't have
    01060              * yy_get_previous_state() go ahead and do it
    01061              * for us because it doesn't know how to deal
    01062              * with the possibility of jamming (and we don't
    01063              * want to build jamming into it because then it
    01064              * will run more slowly).
    01065              */
    01066
    01067             yy_next_state = yy_try_NUL_trans( yy_current_state );
    01068
    01069             yy_bp = yytext_ptr + YY_MORE_ADJ;
    01070
    01071             if ( yy_next_state )
    01072                 {
    01073                 /* Consume the NUL. */
    01074                 yy_cp = ++yy_c_buf_p;
    01075                 yy_current_state = yy_next_state;
    01076                 goto yy_match;
    01077                 }
    01078
    01079             else
    01080                 {
    01081                 yy_cp = yy_c_buf_p;
    01082                 goto yy_find_action;
    01083                 }
    01084             }
    01085
    01086         else switch ( yy_get_next_buffer() )
    01087             {
    01088             case EOB_ACT_END_OF_FILE:
    01089                 {
    01090                 yy_did_buffer_switch_on_eof = 0;
    01091
    01092                 if ( yywrap() )
    01093                     {
    01094                     /* Note: because we've taken care in
    01095                      * yy_get_next_buffer() to have set up
    01096                      * yytext, we can now set up
    01097                      * yy_c_buf_p so that if some total
    01098                      * hoser (like flex itself) wants to
    01099                      * call the scanner after we return the
    01100                      * YY_NULL, it'll still work - another
    01101                      * YY_NULL will get returned.
    01102                      */
    01103                     yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
    01104
    01105                     yy_act = YY_STATE_EOF(YY_START);
    01106                     goto do_action;
    01107                     }
    01108
    01109                 else
    01110                     {
    01111                     if ( ! yy_did_buffer_switch_on_eof )
    01112                         YY_NEW_FILE;
    01113                     }
    01114                 break;
    01115                 }
    01116
    01117             case EOB_ACT_CONTINUE_SCAN:
    01118                 yy_c_buf_p =
    01119                     yytext_ptr + yy_amount_of_matched_text;
    01120
    01121                 yy_current_state = yy_get_previous_state();
    01122
    01123                 yy_cp = yy_c_buf_p;
    01124                 yy_bp = yytext_ptr + YY_MORE_ADJ;
    01125                 goto yy_match;
    01126
    01127             case EOB_ACT_LAST_MATCH:
    01128                 yy_c_buf_p =
    01129                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
    01130
    01131                 yy_current_state = yy_get_previous_state();
    01132
    01133                 yy_cp = yy_c_buf_p;
    01134                 yy_bp = yytext_ptr + YY_MORE_ADJ;
    01135                 goto yy_find_action;
    01136             }
    01137         break;
    01138         }
    01139
    01140     default:
    01141         YY_FATAL_ERROR(
    01142             "fatal flex scanner internal error--no action found" );
    01143     } /* end of action switch */
    01144         } /* end of scanning one token */
    01145     } /* end of yylex */
    01146
    01147
    01148 /* yy_get_next_buffer - try to read in a new buffer
    01149  *
    01150  * Returns a code representing an action:
    01151  *  EOB_ACT_LAST_MATCH -
    01152  *  EOB_ACT_CONTINUE_SCAN - continue scanning from current position
    01153  *  EOB_ACT_END_OF_FILE - end of file
    01154  */
    01155
    01156 static int yy_get_next_buffer()
    01157     {
    01158     register char *dest = yy_current_buffer->yy_ch_buf;
    01159     register char *source = yytext_ptr;
    01160     register int number_to_move, i;
    01161     int ret_val;
    01162
    01163     if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
    01164         YY_FATAL_ERROR(
    01165         "fatal flex scanner internal error--end of buffer missed" );
    01166
    01167     if ( yy_current_buffer->yy_fill_buffer == 0 )
    01168         { /* Don't try to fill the buffer, so this is an EOF. */
    01169         if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
    01170             {
    01171             /* We matched a single character, the EOB, so
    01172              * treat this as a final EOF.
    01173              */
    01174             return EOB_ACT_END_OF_FILE;
    01175             }
    01176
    01177         else
    01178             {
    01179             /* We matched some text prior to the EOB, first
    01180              * process it.
    01181              */
    01182             return EOB_ACT_LAST_MATCH;
    01183             }
    01184         }
    01185
    01186     /* Try to read more data. */
    01187
    01188     /* First move last chars to start of buffer. */
    01189     number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
    01190
    01191     for ( i = 0; i < number_to_move; ++i )
    01192         *(dest++) = *(source++);
    01193
    01194     if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
    01195         /* don't do the read, it's not guaranteed to return an EOF,
    01196          * just force an EOF
    01197          */
    01198         yy_current_buffer->yy_n_chars = yy_n_chars = 0;
    01199
    01200     else
    01201         {
    01202         int num_to_read =
    01203             yy_current_buffer->yy_buf_size - number_to_move - 1;
    01204
    01205         while ( num_to_read <= 0 )
    01206             { /* Not enough room in the buffer - grow it. */
    01207 #ifdef YY_USES_REJECT
    01208             YY_FATAL_ERROR(
    01209 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
    01210 #else
    01211
    01212             /* just a shorter name for the current buffer */
    01213             YY_BUFFER_STATE b = yy_current_buffer;
    01214
    01215             int yy_c_buf_p_offset =
    01216                 (int) (yy_c_buf_p - b->yy_ch_buf);
    01217
    01218             if ( b->yy_is_our_buffer )
    01219                 {
    01220                 int new_size = b->yy_buf_size * 2;
    01221
    01222                 if ( new_size <= 0 )
    01223                     b->yy_buf_size += b->yy_buf_size / 8;
    01224                 else
    01225                     b->yy_buf_size *= 2;
    01226
    01227                 b->yy_ch_buf = (char *)
    01228                     /* Include room in for 2 EOB chars. */
    01229                     yy_flex_realloc( (void *) b->yy_ch_buf,
    01230                              b->yy_buf_size + 2 );
    01231                 }
    01232             else
    01233                 /* Can't grow it, we don't own it. */
    01234                 b->yy_ch_buf = 0;
    01235
    01236             if ( ! b->yy_ch_buf )
    01237                 YY_FATAL_ERROR(
    01238                 "fatal error - scanner input buffer overflow" );
    01239
    01240             yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
    01241
    01242             num_to_read = yy_current_buffer->yy_buf_size -
    01243                         number_to_move - 1;
    01244 #endif
    01245             }
    01246
    01247         if ( num_to_read > YY_READ_BUF_SIZE )
    01248             num_to_read = YY_READ_BUF_SIZE;
    01249
    01250         /* Read in more data. */
    01251         YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
    01252             yy_n_chars, num_to_read );
    01253
    01254         yy_current_buffer->yy_n_chars = yy_n_chars;
    01255         }
    01256
    01257     if ( yy_n_chars == 0 )
    01258         {
    01259         if ( number_to_move == YY_MORE_ADJ )
    01260             {
    01261             ret_val = EOB_ACT_END_OF_FILE;
    01262             yyrestart( yyin );
    01263             }
    01264
    01265         else
    01266             {
    01267             ret_val = EOB_ACT_LAST_MATCH;
    01268             yy_current_buffer->yy_buffer_status =
    01269                 YY_BUFFER_EOF_PENDING;
    01270             }
    01271         }
    01272
    01273     else
    01274         ret_val = EOB_ACT_CONTINUE_SCAN;
    01275
    01276     yy_n_chars += number_to_move;
    01277     yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
    01278     yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
    01279
    01280     yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
    01281
    01282     return ret_val;
    01283     }
    01284
    01285
    01286 /* yy_get_previous_state - get the state just before the EOB char was reached */
    01287
    01288 static yy_state_type yy_get_previous_state()
    01289     {
    01290     register yy_state_type yy_current_state;
    01291     register char *yy_cp;
    01292
    01293     yy_current_state = yy_start;
    01294
    01295     for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
    01296         {
    01297         register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
    01298         if ( yy_accept[yy_current_state] )
    01299             {
    01300             yy_last_accepting_state = yy_current_state;
    01301             yy_last_accepting_cpos = yy_cp;
    01302             }
    01303         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
    01304             {
    01305             yy_current_state = (int) yy_def[yy_current_state];
    01306             if ( yy_current_state >= 172 )
    01307                 yy_c = yy_meta[(unsigned int) yy_c];
    01308             }
    01309         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
    01310         }
    01311
    01312     return yy_current_state;
    01313     }
    01314
    01315
    01316 /* yy_try_NUL_trans - try to make a transition on the NUL character
    01317  *
    01318  * synopsis
    01319  *  next_state = yy_try_NUL_trans( current_state );
    01320  */
    01321
    01322 #ifdef YY_USE_PROTOS
    01323 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
    01324 #else
    01325 static yy_state_type yy_try_NUL_trans( yy_current_state )
    01326 yy_state_type yy_current_state;
    01327 #endif
    01328     {
    01329     register int yy_is_jam;
    01330     register char *yy_cp = yy_c_buf_p;
    01331
    01332     register YY_CHAR yy_c = 1;
    01333     if ( yy_accept[yy_current_state] )
    01334         {
    01335         yy_last_accepting_state = yy_current_state;
    01336         yy_last_accepting_cpos = yy_cp;
    01337         }
    01338     while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
    01339         {
    01340         yy_current_state = (int) yy_def[yy_current_state];
    01341         if ( yy_current_state >= 172 )
    01342             yy_c = yy_meta[(unsigned int) yy_c];
    01343         }
    01344     yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
    01345     yy_is_jam = (yy_current_state == 171);
    01346
    01347     return yy_is_jam ? 0 : yy_current_state;
    01348     }
    01349
    01350
    01351 #ifndef YY_NO_UNPUT
    01352 #ifdef YY_USE_PROTOS
    01353 static void yyunput( int c, register char *yy_bp )
    01354 #else
    01355 static void yyunput( c, yy_bp )
    01356 int c;
    01357 register char *yy_bp;
    01358 #endif
    01359     {
    01360     register char *yy_cp = yy_c_buf_p;
    01361
    01362     /* undo effects of setting up yytext */
    01363     *yy_cp = yy_hold_char;
    01364
    01365     if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
    01366         { /* need to shift things up to make room */
    01367         /* +2 for EOB chars. */
    01368         register int number_to_move = yy_n_chars + 2;
    01369         register char *dest = &yy_current_buffer->yy_ch_buf[
    01370                     yy_current_buffer->yy_buf_size + 2];
    01371         register char *source =
    01372                 &yy_current_buffer->yy_ch_buf[number_to_move];
    01373
    01374         while ( source > yy_current_buffer->yy_ch_buf )
    01375             *--dest = *--source;
    01376
    01377         yy_cp += (int) (dest - source);
    01378         yy_bp += (int) (dest - source);
    01379         yy_current_buffer->yy_n_chars =
    01380             yy_n_chars = yy_current_buffer->yy_buf_size;
    01381
    01382         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
    01383             YY_FATAL_ERROR( "flex scanner push-back overflow" );
    01384         }
    01385
    01386     *--yy_cp = (char) c;
    01387
    01388
    01389     yytext_ptr = yy_bp;
    01390     yy_hold_char = *yy_cp;
    01391     yy_c_buf_p = yy_cp;
    01392     }
    01393 #endif  /* ifndef YY_NO_UNPUT */
    01394
    01395
    01396 #ifdef __cplusplus
    01397 static int yyinput()
    01398 #else
    01399 static int input()
    01400 #endif
    01401     {
    01402     int c;
    01403
    01404     *yy_c_buf_p = yy_hold_char;
    01405
    01406     if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
    01407         {
    01408         /* yy_c_buf_p now points to the character we want to return.
    01409          * If this occurs *before* the EOB characters, then it's a
    01410          * valid NUL; if not, then we've hit the end of the buffer.
    01411          */
    01412         if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
    01413             /* This was really a NUL. */
    01414             *yy_c_buf_p = '\0';
    01415
    01416         else
    01417             { /* need more input */
    01418             int offset = yy_c_buf_p - yytext_ptr;
    01419             ++yy_c_buf_p;
    01420
    01421             switch ( yy_get_next_buffer() )
    01422                 {
    01423                 case EOB_ACT_LAST_MATCH:
    01424                     /* This happens because yy_g_n_b()
    01425                      * sees that we've accumulated a
    01426                      * token and flags that we need to
    01427                      * try matching the token before
    01428                      * proceeding.  But for input(),
    01429                      * there's no matching to consider.
    01430                      * So convert the EOB_ACT_LAST_MATCH
    01431                      * to EOB_ACT_END_OF_FILE.
    01432                      */
    01433
    01434                     /* Reset buffer status. */
    01435                     yyrestart( yyin );
    01436
    01437                     /* fall through */
    01438
    01439                 case EOB_ACT_END_OF_FILE:
    01440                     {
    01441                     if ( yywrap() )
    01442                         return EOF;
    01443
    01444                     if ( ! yy_did_buffer_switch_on_eof )
    01445                         YY_NEW_FILE;
    01446 #ifdef __cplusplus
    01447                     return yyinput();
    01448 #else
    01449                     return input();
    01450 #endif
    01451                     }
    01452
    01453                 case EOB_ACT_CONTINUE_SCAN:
    01454                     yy_c_buf_p = yytext_ptr + offset;
    01455                     break;
    01456                 }
    01457             }
    01458         }
    01459
    01460     c = *(unsigned char *) yy_c_buf_p;  /* cast for 8-bit char's */
    01461     *yy_c_buf_p = '\0'; /* preserve yytext */
    01462     yy_hold_char = *++yy_c_buf_p;
    01463
    01464
    01465     return c;
    01466     }
    01467
    01468
    01469 #ifdef YY_USE_PROTOS
    01470 void yyrestart( FILE *input_file )
    01471 #else
    01472 void yyrestart( input_file )
    01473 FILE *input_file;
    01474 #endif
    01475     {
    01476     if ( ! yy_current_buffer )
    01477         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
    01478
    01479     yy_init_buffer( yy_current_buffer, input_file );
    01480     yy_load_buffer_state();
    01481     }
    01482
    01483
    01484 #ifdef YY_USE_PROTOS
    01485 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
    01486 #else
    01487 void yy_switch_to_buffer( new_buffer )
    01488 YY_BUFFER_STATE new_buffer;
    01489 #endif
    01490     {
    01491     if ( yy_current_buffer == new_buffer )
    01492         return;
    01493
    01494     if ( yy_current_buffer )
    01495         {
    01496         /* Flush out information for old buffer. */
    01497         *yy_c_buf_p = yy_hold_char;
    01498         yy_current_buffer->yy_buf_pos = yy_c_buf_p;
    01499         yy_current_buffer->yy_n_chars = yy_n_chars;
    01500         }
    01501
    01502     yy_current_buffer = new_buffer;
    01503     yy_load_buffer_state();
    01504
    01505     /* We don't actually know whether we did this switch during
    01506      * EOF (yywrap()) processing, but the only time this flag
    01507      * is looked at is after yywrap() is called, so it's safe
    01508      * to go ahead and always set it.
    01509      */
    01510     yy_did_buffer_switch_on_eof = 1;
    01511     }
    01512
    01513
    01514 #ifdef YY_USE_PROTOS
    01515 void yy_load_buffer_state( void )
    01516 #else
    01517 void yy_load_buffer_state()
    01518 #endif
    01519     {
    01520     yy_n_chars = yy_current_buffer->yy_n_chars;
    01521     yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
    01522     yyin = yy_current_buffer->yy_input_file;
    01523     yy_hold_char = *yy_c_buf_p;
    01524     }
    01525
    01526
    01527 #ifdef YY_USE_PROTOS
    01528 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
    01529 #else
    01530 YY_BUFFER_STATE yy_create_buffer( file, size )
    01531 FILE *file;
    01532 int size;
    01533 #endif
    01534     {
    01535     YY_BUFFER_STATE b;
    01536
    01537     b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
    01538     if ( ! b )
    01539         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
    01540
    01541     b->yy_buf_size = size;
    01542
    01543     /* yy_ch_buf has to be 2 characters longer than the size given because
    01544      * we need to put in 2 end-of-buffer characters.
    01545      */
    01546     b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
    01547     if ( ! b->yy_ch_buf )
    01548         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
    01549
    01550     b->yy_is_our_buffer = 1;
    01551
    01552     yy_init_buffer( b, file );
    01553
    01554     return b;
    01555     }
    01556
    01557
    01558 #ifdef YY_USE_PROTOS
    01559 void yy_delete_buffer( YY_BUFFER_STATE b )
    01560 #else
    01561 void yy_delete_buffer( b )
    01562 YY_BUFFER_STATE b;
    01563 #endif
    01564     {
    01565     if ( ! b )
    01566         return;
    01567
    01568     if ( b == yy_current_buffer )
    01569         yy_current_buffer = (YY_BUFFER_STATE) 0;
    01570
    01571     if ( b->yy_is_our_buffer )
    01572         yy_flex_free( (void *) b->yy_ch_buf );
    01573
    01574     yy_flex_free( (void *) b );
    01575     }
    01576
    01577
    01578
    01579 #ifdef YY_USE_PROTOS
    01580 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
    01581 #else
    01582 void yy_init_buffer( b, file )
    01583 YY_BUFFER_STATE b;
    01584 FILE *file;
    01585 #endif
    01586
    01587
    01588     {
    01589     yy_flush_buffer( b );
    01590
    01591     b->yy_input_file = file;
    01592     b->yy_fill_buffer = 1;
    01593
    01594 #if YY_ALWAYS_INTERACTIVE
    01595     b->yy_is_interactive = 1;
    01596 #else
    01597 #if YY_NEVER_INTERACTIVE
    01598     b->yy_is_interactive = 0;
    01599 #else
    01600     b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
    01601 #endif
    01602 #endif
    01603     }
    01604
    01605
    01606 #ifdef YY_USE_PROTOS
    01607 void yy_flush_buffer( YY_BUFFER_STATE b )
    01608 #else
    01609 void yy_flush_buffer( b )
    01610 YY_BUFFER_STATE b;
    01611 #endif
    01612
    01613     {
    01614     if ( ! b )
    01615         return;
    01616
    01617     b->yy_n_chars = 0;
    01618
    01619     /* We always need two end-of-buffer characters.  The first causes
    01620      * a transition to the end-of-buffer state.  The second causes
    01621      * a jam in that state.
    01622      */
    01623     b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
    01624     b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
    01625
    01626     b->yy_buf_pos = &b->yy_ch_buf[0];
    01627
    01628     b->yy_at_bol = 1;
    01629     b->yy_buffer_status = YY_BUFFER_NEW;
    01630
    01631     if ( b == yy_current_buffer )
    01632         yy_load_buffer_state();
    01633     }
    01634
    01635
    01636 #ifndef YY_NO_SCAN_BUFFER
    01637 #ifdef YY_USE_PROTOS
    01638 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
    01639 #else
    01640 YY_BUFFER_STATE yy_scan_buffer( base, size )
    01641 char *base;
    01642 yy_size_t size;
    01643 #endif
    01644     {
    01645     YY_BUFFER_STATE b;
    01646
    01647     if ( size < 2 ||
    01648          base[size-2] != YY_END_OF_BUFFER_CHAR ||
    01649          base[size-1] != YY_END_OF_BUFFER_CHAR )
    01650         /* They forgot to leave room for the EOB's. */
    01651         return 0;
    01652
    01653     b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
    01654     if ( ! b )
    01655         YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
    01656
    01657     b->yy_buf_size = size - 2;  /* "- 2" to take care of EOB's */
    01658     b->yy_buf_pos = b->yy_ch_buf = base;
    01659     b->yy_is_our_buffer = 0;
    01660     b->yy_input_file = 0;
    01661     b->yy_n_chars = b->yy_buf_size;
    01662     b->yy_is_interactive = 0;
    01663     b->yy_at_bol = 1;
    01664     b->yy_fill_buffer = 0;
    01665     b->yy_buffer_status = YY_BUFFER_NEW;
    01666
    01667     yy_switch_to_buffer( b );
    01668
    01669     return b;
    01670     }
    01671 #endif
    01672
    01673
    01674 #ifndef YY_NO_SCAN_STRING
    01675 #ifdef YY_USE_PROTOS
    01676 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
    01677 #else
    01678 YY_BUFFER_STATE yy_scan_string( yy_str )
    01679 yyconst char *yy_str;
    01680 #endif
    01681     {
    01682     int len;
    01683     for ( len = 0; yy_str[len]; ++len )
    01684         ;
    01685
    01686     return yy_scan_bytes( yy_str, len );
    01687     }
    01688 #endif
    01689
    01690
    01691 #ifndef YY_NO_SCAN_BYTES
    01692 #ifdef YY_USE_PROTOS
    01693 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
    01694 #else
    01695 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
    01696 yyconst char *bytes;
    01697 int len;
    01698 #endif
    01699     {
    01700     YY_BUFFER_STATE b;
    01701     char *buf;
    01702     yy_size_t n;
    01703     int i;
    01704
    01705     /* Get memory for full buffer, including space for trailing EOB's. */
    01706     n = len + 2;
    01707     buf = (char *) yy_flex_alloc( n );
    01708     if ( ! buf )
    01709         YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
    01710
    01711     for ( i = 0; i < len; ++i )
    01712         buf[i] = bytes[i];
    01713
    01714     buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
    01715
    01716     b = yy_scan_buffer( buf, n );
    01717     if ( ! b )
    01718         YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
    01719
    01720     /* It's okay to grow etc. this buffer, and we should throw it
    01721      * away when we're done.
    01722      */
    01723     b->yy_is_our_buffer = 1;
    01724
    01725     return b;
    01726     }
    01727 #endif
    01728
    01729
    01730 #ifndef YY_NO_PUSH_STATE
    01731 #ifdef YY_USE_PROTOS
    01732 static void yy_push_state( int new_state )
    01733 #else
    01734 static void yy_push_state( new_state )
    01735 int new_state;
    01736 #endif
    01737     {
    01738     if ( yy_start_stack_ptr >= yy_start_stack_depth )
    01739         {
    01740         yy_size_t new_size;
    01741
    01742         yy_start_stack_depth += YY_START_STACK_INCR;
    01743         new_size = yy_start_stack_depth * sizeof( int );
    01744
    01745         if ( ! yy_start_stack )
    01746             yy_start_stack = (int *) yy_flex_alloc( new_size );
    01747
    01748         else
    01749             yy_start_stack = (int *) yy_flex_realloc(
    01750                     (void *) yy_start_stack, new_size );
    01751
    01752         if ( ! yy_start_stack )
    01753             YY_FATAL_ERROR(
    01754             "out of memory expanding start-condition stack" );
    01755         }
    01756
    01757     yy_start_stack[yy_start_stack_ptr++] = YY_START;
    01758
    01759     BEGIN(new_state);
    01760     }
    01761 #endif
    01762
    01763
    01764 #ifndef YY_NO_POP_STATE
    01765 static void yy_pop_state()
    01766     {
    01767     if ( --yy_start_stack_ptr < 0 )
    01768         YY_FATAL_ERROR( "start-condition stack underflow" );
    01769
    01770     BEGIN(yy_start_stack[yy_start_stack_ptr]);
    01771     }
    01772 #endif
    01773
    01774
    01775 #ifndef YY_NO_TOP_STATE
    01776 static int yy_top_state()
    01777     {
    01778     return yy_start_stack[yy_start_stack_ptr - 1];
    01779     }
    01780 #endif
    01781
    01782 #ifndef YY_EXIT_FAILURE
    01783 #define YY_EXIT_FAILURE 2
    01784 #endif
    01785
    01786 #ifdef YY_USE_PROTOS
    01787 static void yy_fatal_error( yyconst char msg[] )
    01788 #else
    01789 static void yy_fatal_error( msg )
    01790 char msg[];
    01791 #endif
    01792     {
    01793     (void) fprintf( stderr, "%s\n", msg );
    01794     exit( YY_EXIT_FAILURE );
    01795     }
    01796
    01797
    01798
    01799 /* Redefine yyless() so it works in section 3 code. */
    01800
    01801 #undef yyless
    01802 #define yyless(n) \
    01803     do \
    01804         { \
    01805         /* Undo effects of setting up yytext. */ \
    01806         yytext[yyleng] = yy_hold_char; \
    01807         yy_c_buf_p = yytext + n; \
    01808         yy_hold_char = *yy_c_buf_p; \
    01809         *yy_c_buf_p = '\0'; \
    01810         yyleng = n; \
    01811         } \
    01812     while ( 0 )
    01813
    01814
    01815 /* Internal utility routines. */
    01816
    01817 #ifndef yytext_ptr
    01818 #ifdef YY_USE_PROTOS
    01819 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
    01820 #else
    01821 static void yy_flex_strncpy( s1, s2, n )
    01822 char *s1;
    01823 yyconst char *s2;
    01824 int n;
    01825 #endif
    01826     {
    01827     register int i;
    01828     for ( i = 0; i < n; ++i )
    01829         s1[i] = s2[i];
    01830     }
    01831 #endif
    01832
    01833 #ifdef YY_NEED_STRLEN
    01834 #ifdef YY_USE_PROTOS
    01835 static int yy_flex_strlen( yyconst char *s )
    01836 #else
    01837 static int yy_flex_strlen( s )
    01838 yyconst char *s;
    01839 #endif
    01840     {
    01841     register int n;
    01842     for ( n = 0; s[n]; ++n )
    01843         ;
    01844
    01845     return n;
    01846     }
    01847 #endif
    01848
    01849
    01850 #ifdef YY_USE_PROTOS
    01851 static void *yy_flex_alloc( yy_size_t size )
    01852 #else
    01853 static void *yy_flex_alloc( size )
    01854 yy_size_t size;
    01855 #endif
    01856     {
    01857     return (void *) malloc( size );
    01858     }
    01859
    01860 #ifdef YY_USE_PROTOS
    01861 static void *yy_flex_realloc( void *ptr, yy_size_t size )
    01862 #else
    01863 static void *yy_flex_realloc( ptr, size )
    01864 void *ptr;
    01865 yy_size_t size;
    01866 #endif
    01867     {
    01868     /* The cast to (char *) in the following accommodates both
    01869      * implementations that use char* generic pointers, and those
    01870      * that use void* generic pointers.  It works with the latter
    01871      * because both ANSI C and C++ allow castless assignment from
    01872      * any pointer type to void*, and deal with argument conversions
    01873      * as though doing an assignment.
    01874      */
    01875     return (void *) realloc( (char *) ptr, size );
    01876     }
    01877
    01878 #ifdef YY_USE_PROTOS
    01879 static void yy_flex_free( void *ptr )
    01880 #else
    01881 static void yy_flex_free( ptr )
    01882 void *ptr;
    01883 #endif
    01884     {
    01885     free( ptr );
    01886     }
    01887
    01888 #if YY_MAIN
    01889 int main()
    01890     {
    01891     yylex();
    01892     return 0;
    01893     }
    01894 #endif
    01895 #line 123 "./ppdscanner.l"
    01896
    01897
    01898 void kdeprint_ppdscanner_init(QIODevice *d)
    01899 {
    01900     kdeprint_ppdscanner_device = d;
    01901     kdeprint_ppdscanner_lno = 1;
    01902 }
    01903
    01904 void kdeprint_ppdscanner_terminate( bool deleteIt )
    01905 {
    01906     if (deleteIt)
    01907         delete kdeprint_ppdscanner_device;
    01908     kdeprint_ppdscanner_device = NULL;
    01909 }
    01910
    01911 int kdeprint_ppdscanner_numberoflines()
    01912 {
    01913     return kdeprint_ppdscanner_lno;
    01914 }

This file is part of the documentation for kdeprint Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:31:06 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003