# kdeprint Library API Documentation

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

# ppdparser.cpp

    00001 /* A Bison parser, made by GNU Bison 1.875.  */
    00002
    00003 /* Skeleton parser for Yacc-like parsing with Bison,
    00004    Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
    00005
    00006    This program is free software; you can redistribute it and/or modify
    00007    it under the terms of the GNU General Public License as published by
    00008    the Free Software Foundation; either version 2, or (at your option)
    00009    any later version.
    00010
    00011    This program is distributed in the hope that it will be useful,
    00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
    00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00014    GNU General Public License for more details.
    00015
    00016    You should have received a copy of the GNU General Public License
    00017    along with this program; if not, write to the Free Software
    00018    Foundation, Inc., 59 Temple Place - Suite 330,
    00019    Boston, MA 02111-1307, USA.  */
    00020
    00021 /* As a special exception, when this file is copied by Bison into a
    00022    Bison output file, you may use that output file without restriction.
    00023    This special exception was added by the Free Software Foundation
    00024    in version 1.24 of Bison.  */
    00025
    00026 /* Written by Richard Stallman by simplifying the original so called
    00027    ``semantic'' parser.  */
    00028
    00029 /* All symbols defined below should begin with yy or YY, to avoid
    00030    infringing on user name space.  This should be done even for local
    00031    variables, as they might otherwise be expanded by user macros.
    00032    There are some unavoidable exceptions within include files to
    00033    define necessary library symbols; they are noted "INFRINGES ON
    00034    USER NAME SPACE" below.  */
    00035
    00036 /* Identify Bison output.  */
    00037 #define YYBISON 1
    00038
    00039 /* Skeleton name.  */
    00040 #define YYSKELETON_NAME "yacc.c"
    00041
    00042 /* Pure parsers.  */
    00043 #define YYPURE 0
    00044
    00045 /* Using locations.  */
    00046 #define YYLSP_NEEDED 0
    00047
    00048 /* If NAME_PREFIX is specified substitute the variables and functions
    00049    names.  */
    00050 #define yyparse kdeprint_ppdparse
    00051 #define yylex   kdeprint_ppdlex
    00052 #define yyerror kdeprint_ppderror
    00053 #define yylval  kdeprint_ppdlval
    00054 #define yychar  kdeprint_ppdchar
    00055 #define yydebug kdeprint_ppddebug
    00056 #define yynerrs kdeprint_ppdnerrs
    00057
    00058
    00059 /* Tokens.  */
    00060 #ifndef YYTOKENTYPE
    00061 # define YYTOKENTYPE
    00062    /* Put the tokens into the symbol table, so that GDB and other debuggers
    00063       know about them.  */
    00064    enum yytokentype {
    00065      TRANSLATION = 258,
    00066      OPENUI = 259,
    00067      CLOSEUI = 260,
    00068      OPENGROUP = 261,
    00069      CLOSEGROUP = 262,
    00070      DEFAULT = 263,
    00071      KEYWORD = 264,
    00072      OPTION = 265,
    00073      STRINGPART = 266,
    00074      QUOTED = 267,
    00075      CONSTRAINT = 268,
    00076      PAPERDIM = 269,
    00077      IMGAREA = 270,
    00078      FOODATA = 271,
    00079      COMMENT = 272
    00080    };
    00081 #endif
    00082 #define TRANSLATION 258
    00083 #define OPENUI 259
    00084 #define CLOSEUI 260
    00085 #define OPENGROUP 261
    00086 #define CLOSEGROUP 262
    00087 #define DEFAULT 263
    00088 #define KEYWORD 264
    00089 #define OPTION 265
    00090 #define STRINGPART 266
    00091 #define QUOTED 267
    00092 #define CONSTRAINT 268
    00093 #define PAPERDIM 269
    00094 #define IMGAREA 270
    00095 #define FOODATA 271
    00096 #define COMMENT 272
    00097
    00098
    00099
    00100
    00101 /* Copy the first part of user declarations.  */
    00102 #line 1 "./ppdparser.y"
    00103
    00104 /*
    00105  *  This file is part of the KDE libraries
    00106  *  Copyright (c) 2001-2003 Michael Goffioul <kdeprint@swing.be>
    00107  *
    00108  *  This library is free software; you can redistribute it and/or
    00109  *  modify it under the terms of the GNU Library General Public
    00110  *  License version 2 as published by the Free Software Foundation.
    00111  *
    00112  *  This library is distributed in the hope that it will be useful,
    00113  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00114  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00115  *  Library General Public License for more details.
    00116  *
    00117  *  You should have received a copy of the GNU Library General Public License
    00118  *  along with this library; see the file COPYING.LIB.  If not, write to
    00119  *  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00120  *  Boston, MA 02111-1307, USA.
    00121  **/
    00122
    00123 #define YYSTYPE QStringList
    00124 #define YYPARSE_PARAM ppdloader
    00125 #define YYDEBUG 1
    00126 #define YYERROR_VERBOSE 1
    00127 #include <stdlib.h>
    00128 #include <qstringlist.h>
    00129
    00130 #include "ppdloader.h"
    00131
    00132 #define builder static_cast<PPDLoader*>( ppdloader )
    00133
    00134 int kdeprint_ppdlex();
    00135 #define kdeprint_ppderror(msg) static_cast<PPDLoader*>( ppdloader )->setErrorMsg( msg )
    00136
    00137
    00138 /* Enabling traces.  */
    00139 #ifndef YYDEBUG
    00140 # define YYDEBUG 0
    00141 #endif
    00142
    00143 /* Enabling verbose error messages.  */
    00144 #ifdef YYERROR_VERBOSE
    00145 # undef YYERROR_VERBOSE
    00146 # define YYERROR_VERBOSE 1
    00147 #else
    00148 # define YYERROR_VERBOSE 0
    00149 #endif
    00150
    00151 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
    00152 typedef int YYSTYPE;
    00153 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
    00154 # define YYSTYPE_IS_DECLARED 1
    00155 # define YYSTYPE_IS_TRIVIAL 1
    00156 #endif
    00157
    00158
    00159
    00160 /* Copy the second part of user declarations.  */
    00161
    00162
    00163 /* Line 214 of yacc.c.  */
    00164 #line 164 "./ppdparser.cpp"
    00165
    00166 #if ! defined (yyoverflow) || YYERROR_VERBOSE
    00167
    00168 /* The parser invokes alloca or malloc; define the necessary symbols.  */
    00169
    00170 # if YYSTACK_USE_ALLOCA
    00171 #  define YYSTACK_ALLOC alloca
    00172 # else
    00173 #  ifndef YYSTACK_USE_ALLOCA
    00174 #   if defined (alloca) || defined (_ALLOCA_H)
    00175 #    define YYSTACK_ALLOC alloca
    00176 #   else
    00177 #    ifdef __GNUC__
    00178 #     define YYSTACK_ALLOC __builtin_alloca
    00179 #    endif
    00180 #   endif
    00181 #  endif
    00182 # endif
    00183
    00184 # ifdef YYSTACK_ALLOC
    00185    /* Pacify GCC's `empty if-body' warning. */
    00186 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
    00187 # else
    00188 #  if defined (__STDC__) || defined (__cplusplus)
    00189 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
    00190 #   define YYSIZE_T size_t
    00191 #  endif
    00192 #  define YYSTACK_ALLOC malloc
    00193 #  define YYSTACK_FREE free
    00194 # endif
    00195 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
    00196
    00197
    00198 #if (! defined (yyoverflow) \
    00199      && (! defined (__cplusplus) \
    00200      || (YYSTYPE_IS_TRIVIAL)))
    00201
    00202 /* A type that is properly aligned for any stack member.  */
    00203 union yyalloc
    00204 {
    00205   short yyss;
    00206   YYSTYPE yyvs;
    00207   };
    00208
    00209 /* The size of the maximum gap between one aligned stack and the next.  */
    00210 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
    00211
    00212 /* The size of an array large to enough to hold all stacks, each with
    00213    N elements.  */
    00214 # define YYSTACK_BYTES(N) \
    00215      ((N) * (sizeof (short) + sizeof (YYSTYPE))             \
    00216       + YYSTACK_GAP_MAXIMUM)
    00217
    00218 /* Copy COUNT objects from FROM to TO.  The source and destination do
    00219    not overlap.  */
    00220 # ifndef YYCOPY
    00221 #  if 1 < __GNUC__
    00222 #   define YYCOPY(To, From, Count) \
    00223       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
    00224 #  else
    00225 #   define YYCOPY(To, From, Count)      \
    00226       do                    \
    00227     {                   \
    00228       register YYSIZE_T yyi;        \
    00229       for (yyi = 0; yyi < (Count); yyi++)   \
    00230         (To)[yyi] = (From)[yyi];        \
    00231     }                   \
    00232       while (0)
    00233 #  endif
    00234 # endif
    00235
    00236 /* Relocate STACK from its old location to the new one.  The
    00237    local variables YYSIZE and YYSTACKSIZE give the old and new number of
    00238    elements in the stack, and YYPTR gives the new location of the
    00239    stack.  Advance YYPTR to a properly aligned location for the next
    00240    stack.  */
    00241 # define YYSTACK_RELOCATE(Stack)                    \
    00242     do                                  \
    00243       {                                 \
    00244     YYSIZE_T yynewbytes;                        \
    00245     YYCOPY (&yyptr->Stack, Stack, yysize);              \
    00246     Stack = &yyptr->Stack;                      \
    00247     yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
    00248     yyptr += yynewbytes / sizeof (*yyptr);              \
    00249       }                                 \
    00250     while (0)
    00251
    00252 #endif
    00253
    00254 #if defined (__STDC__) || defined (__cplusplus)
    00255    typedef signed char yysigned_char;
    00256 #else
    00257    typedef short yysigned_char;
    00258 #endif
    00259
    00260 /* YYFINAL -- State number of the termination state. */
    00261 #define YYFINAL  33
    00262 /* YYLAST -- Last index in YYTABLE.  */
    00263 #define YYLAST   99
    00264
    00265 /* YYNTOKENS -- Number of terminals. */
    00266 #define YYNTOKENS  20
    00267 /* YYNNTS -- Number of nonterminals. */
    00268 #define YYNNTS  12
    00269 /* YYNRULES -- Number of rules. */
    00270 #define YYNRULES  41
    00271 /* YYNRULES -- Number of states. */
    00272 #define YYNSTATES  86
    00273
    00274 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
    00275 #define YYUNDEFTOK  2
    00276 #define YYMAXUTOK   272
    00277
    00278 #define YYTRANSLATE(YYX)                        \
    00279   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
    00280
    00281 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
    00282 static const unsigned char yytranslate[] =
    00283 {
    00284        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00285        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00286        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00287        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00288        2,     2,     2,     2,     2,     2,     2,    18,     2,     2,
    00289        2,     2,     2,     2,     2,     2,     2,     2,    19,     2,
    00290        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00291        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00292        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00293        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00294        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00295        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00296        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00297        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00298        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00299        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00300        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00301        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00302        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00303        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00304        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00305        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00306        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00307        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00308        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    00309        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
    00310        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
    00311       15,    16,    17
    00312 };
    00313
    00314 #if YYDEBUG
    00315 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
    00316    YYRHS.  */
    00317 static const unsigned char yyprhs[] =
    00318 {
    00319        0,     0,     3,     5,     8,    10,    13,    16,    18,    20,
    00320       24,    28,    33,    40,    45,    52,    57,    64,    68,    71,
    00321       75,    81,    85,    91,    98,   104,   110,   115,   119,   124,
    00322      131,   137,   141,   147,   149,   151,   153,   155,   157,   159,
    00323      161,   163
    00324 };
    00325
    00326 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
    00327 static const yysigned_char yyrhs[] =
    00328 {
    00329       21,     0,    -1,    31,    -1,    21,    31,    -1,    11,    -1,
    00330       22,    11,    -1,    22,    12,    -1,    22,    -1,    12,    -1,
    00331       12,    18,     3,    -1,    22,    18,     3,    -1,    14,    10,
    00332       19,    12,    -1,    14,    10,    18,     3,    19,    12,    -1,
    00333       15,    10,    19,    12,    -1,    15,    10,    18,     3,    19,
    00334       12,    -1,     4,    10,    19,    22,    -1,     4,    10,    18,
    00335        3,    19,    22,    -1,     5,    19,    22,    -1,     5,    22,
    00336       -1,     6,    19,    22,    -1,     6,    19,    22,    18,     3,
    00337       -1,     7,    19,    22,    -1,     7,    19,    22,    18,     3,
    00338       -1,    13,    19,     9,    10,     9,    10,    -1,    13,    19,
    00339        9,    10,     9,    -1,    13,    19,     9,     9,    10,    -1,
    00340       13,    19,     9,     9,    -1,     9,    19,    23,    -1,     9,
    00341       10,    19,    23,    -1,     9,    10,    18,     3,    19,    23,
    00342       -1,     9,    10,    18,    19,    23,    -1,     8,    19,    22,
    00343       -1,     8,    19,    22,    18,     3,    -1,    26,    -1,    27,
    00344       -1,    28,    -1,    29,    -1,    24,    -1,    25,    -1,    30,
    00345       -1,    17,    -1,    16,    -1
    00346 };
    00347
    00348 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
    00349 static const unsigned char yyrline[] =
    00350 {
    00351        0,    54,    54,    55,    58,    59,    60,    63,    64,    65,
    00352       66,    69,    70,    73,    74,    77,    78,    81,    82,    85,
    00353       86,    89,    90,    93,    94,    95,    96,    99,   100,   101,
    00354      102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
    00355      112,   113
    00356 };
    00357 #endif
    00358
    00359 #if YYDEBUG || YYERROR_VERBOSE
    00360 /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
    00361    First, the terminals, then, starting at YYNTOKENS, nonterminals. */
    00362 static const char *const yytname[] =
    00363 {
    00364   "$end", "error", "$undefined", "TRANSLATION", "OPENUI", "CLOSEUI",
    00365   "OPENGROUP", "CLOSEGROUP", "DEFAULT", "KEYWORD", "OPTION", "STRINGPART",
    00366   "QUOTED", "CONSTRAINT", "PAPERDIM", "IMGAREA", "FOODATA", "COMMENT",
    00367   "'/'", "':'", "$accept", "ppdfile", "string", "value", "paperdim",
    00368   "imgarea", "openui", "endui", "opengroup", "endgroup", "constraint",
    00369   "ppdelement", 0
    00370 };
    00371 #endif
    00372
    00373 # ifdef YYPRINT
    00374 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
    00375    token YYLEX-NUM.  */
    00376 static const unsigned short yytoknum[] =
    00377 {
    00378        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
    00379      265,   266,   267,   268,   269,   270,   271,   272,    47,    58
    00380 };
    00381 # endif
    00382
    00383 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
    00384 static const unsigned char yyr1[] =
    00385 {
    00386        0,    20,    21,    21,    22,    22,    22,    23,    23,    23,
    00387       23,    24,    24,    25,    25,    26,    26,    27,    27,    28,
    00388       28,    29,    29,    30,    30,    30,    30,    31,    31,    31,
    00389       31,    31,    31,    31,    31,    31,    31,    31,    31,    31,
    00390       31,    31
    00391 };
    00392
    00393 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
    00394 static const unsigned char yyr2[] =
    00395 {
    00396        0,     2,     1,     2,     1,     2,     2,     1,     1,     3,
    00397        3,     4,     6,     4,     6,     4,     6,     3,     2,     3,
    00398        5,     3,     5,     6,     5,     5,     4,     3,     4,     6,
    00399        5,     3,     5,     1,     1,     1,     1,     1,     1,     1,
    00400        1,     1
    00401 };
    00402
    00403 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
    00404    STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
    00405    means the default is an error.  */
    00406 static const unsigned char yydefact[] =
    00407 {
    00408        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
    00409       41,    40,     0,    37,    38,    33,    34,    35,    36,    39,
    00410        2,     0,     4,     0,    18,     0,     0,     0,     0,     0,
    00411        0,     0,     0,     1,     3,     0,     0,    17,     5,     6,
    00412       19,    21,    31,     0,     0,     8,     7,    27,     0,     0,
    00413        0,     0,     0,     0,    15,     0,     0,     0,     0,     0,
    00414       28,     0,     0,    26,     0,     0,    11,     0,    13,     0,
    00415       20,    22,    32,     0,    30,     9,    10,    25,    24,     0,
    00416        0,    16,    29,    23,    12,    14
    00417 };
    00418
    00419 /* YYDEFGOTO[NTERM-NUM]. */
    00420 static const yysigned_char yydefgoto[] =
    00421 {
    00422       -1,    12,    46,    47,    13,    14,    15,    16,    17,    18,
    00423       19,    20
    00424 };
    00425
    00426 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    00427    STATE-NUM.  */
    00428 #define YYPACT_NINF -44
    00429 static const yysigned_char yypact[] =
    00430 {
    00431       45,     1,    -6,   -15,   -13,     3,    -7,    10,     5,     7,
    00432      -44,   -44,    31,   -44,   -44,   -44,   -44,   -44,   -44,   -44,
    00433      -44,    -9,   -44,    32,    16,    32,    32,    32,    14,    30,
    00434       48,    37,    50,   -44,   -44,    68,    32,    16,   -44,   -44,
    00435       -4,     8,    52,    -1,    30,    57,    54,   -44,    64,    73,
    00436       65,    75,    67,    61,    16,    78,    79,    80,    66,    30,
    00437      -44,    81,    83,    77,    82,    69,   -44,    70,   -44,    32,
    00438      -44,   -44,   -44,    30,   -44,   -44,   -44,   -44,    84,    85,
    00439       86,    16,   -44,   -44,   -44,   -44
    00440 };
    00441
    00442 /* YYPGOTO[NTERM-NUM].  */
    00443 static const yysigned_char yypgoto[] =
    00444 {
    00445      -44,   -44,    -2,   -43,   -44,   -44,   -44,   -44,   -44,   -44,
    00446      -44,    87
    00447 };
    00448
    00449 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
    00450    positive, shift that token.  If negative, reduce the rule which
    00451    number is the opposite.  If zero, do what YYDEFACT says.
    00452    If YYTABLE_NINF, syntax error.  */
    00453 #define YYTABLE_NINF -1
    00454 static const unsigned char yytable[] =
    00455 {
    00456       24,    60,    58,    28,    25,    22,    26,    38,    39,    35,
    00457       36,    21,    29,    23,    55,    31,    74,    32,    59,    38,
    00458       39,    37,    27,    40,    41,    42,    56,    38,    39,    30,
    00459       82,    33,    43,    44,    54,     1,     2,     3,     4,     5,
    00460        6,    22,    45,    22,     7,     8,     9,    10,    11,     1,
    00461        2,     3,     4,     5,     6,    49,    50,    48,     7,     8,
    00462        9,    10,    11,    38,    39,    38,    39,    81,    51,    52,
    00463       57,    53,    62,    63,    64,    61,    65,    66,    67,    68,
    00464       69,    70,    71,    72,    75,    73,    76,    77,    79,    80,
    00465        0,    78,     0,     0,    83,     0,     0,    84,    85,    34
    00466 };
    00467
    00468 static const yysigned_char yycheck[] =
    00469 {
    00470        2,    44,     3,    10,    19,    11,    19,    11,    12,    18,
    00471       19,    10,    19,    19,    18,    10,    59,    10,    19,    11,
    00472       12,    23,    19,    25,    26,    27,    18,    11,    12,    19,
    00473       73,     0,    18,    19,    36,     4,     5,     6,     7,     8,
    00474        9,    11,    12,    11,    13,    14,    15,    16,    17,     4,
    00475        5,     6,     7,     8,     9,    18,    19,     9,    13,    14,
    00476       15,    16,    17,    11,    12,    11,    12,    69,    18,    19,
    00477       18,     3,    18,     9,    10,    18,     3,    12,     3,    12,
    00478       19,     3,     3,     3,     3,    19,     3,    10,    19,    19,
    00479       -1,     9,    -1,    -1,    10,    -1,    -1,    12,    12,    12
    00480 };
    00481
    00482 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
    00483    symbol of state STATE-NUM.  */
    00484 static const unsigned char yystos[] =
    00485 {
    00486        0,     4,     5,     6,     7,     8,     9,    13,    14,    15,
    00487       16,    17,    21,    24,    25,    26,    27,    28,    29,    30,
    00488       31,    10,    11,    19,    22,    19,    19,    19,    10,    19,
    00489       19,    10,    10,     0,    31,    18,    19,    22,    11,    12,
    00490       22,    22,    22,    18,    19,    12,    22,    23,     9,    18,
    00491       19,    18,    19,     3,    22,    18,    18,    18,     3,    19,
    00492       23,    18,    18,     9,    10,     3,    12,     3,    12,    19,
    00493        3,     3,     3,    19,    23,     3,     3,    10,     9,    19,
    00494       19,    22,    23,    10,    12,    12
    00495 };
    00496
    00497 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
    00498 # define YYSIZE_T __SIZE_TYPE__
    00499 #endif
    00500 #if ! defined (YYSIZE_T) && defined (size_t)
    00501 # define YYSIZE_T size_t
    00502 #endif
    00503 #if ! defined (YYSIZE_T)
    00504 # if defined (__STDC__) || defined (__cplusplus)
    00505 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
    00506 #  define YYSIZE_T size_t
    00507 # endif
    00508 #endif
    00509 #if ! defined (YYSIZE_T)
    00510 # define YYSIZE_T unsigned int
    00511 #endif
    00512
    00513 #define yyerrok     (yyerrstatus = 0)
    00514 #define yyclearin   (yychar = YYEMPTY)
    00515 #define YYEMPTY     (-2)
    00516 #define YYEOF       0
    00517
    00518 #define YYACCEPT    goto yyacceptlab
    00519 #define YYABORT     goto yyabortlab
    00520 #define YYERROR     goto yyerrlab1
    00521
    00522
    00523 /* Like YYERROR except do call yyerror.  This remains here temporarily
    00524    to ease the transition to the new meaning of YYERROR, for GCC.
    00525    Once GCC version 2 has supplanted version 1, this can go.  */
    00526
    00527 #define YYFAIL      goto yyerrlab
    00528
    00529 #define YYRECOVERING()  (!!yyerrstatus)
    00530
    00531 #define YYBACKUP(Token, Value)                  \
    00532 do                              \
    00533   if (yychar == YYEMPTY && yylen == 1)              \
    00534     {                               \
    00535       yychar = (Token);                     \
    00536       yylval = (Value);                     \
    00537       yytoken = YYTRANSLATE (yychar);               \
    00538       YYPOPSTACK;                       \
    00539       goto yybackup;                        \
    00540     }                               \
    00541   else                              \
    00542     {                               \
    00543       yyerror ("syntax error: cannot back up");\
    00544       YYERROR;                          \
    00545     }                               \
    00546 while (0)
    00547
    00548 #define YYTERROR    1
    00549 #define YYERRCODE   256
    00550
    00551 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
    00552    are run).  */
    00553
    00554 #ifndef YYLLOC_DEFAULT
    00555 # define YYLLOC_DEFAULT(Current, Rhs, N)         \
    00556   Current.first_line   = Rhs[1].first_line;      \
    00557   Current.first_column = Rhs[1].first_column;    \
    00558   Current.last_line    = Rhs[N].last_line;       \
    00559   Current.last_column  = Rhs[N].last_column;
    00560 #endif
    00561
    00562 /* YYLEX -- calling `yylex' with the right arguments.  */
    00563
    00564 #ifdef YYLEX_PARAM
    00565 # define YYLEX yylex (YYLEX_PARAM)
    00566 #else
    00567 # define YYLEX yylex ()
    00568 #endif
    00569
    00570 /* Enable debugging if requested.  */
    00571 #if YYDEBUG
    00572
    00573 # ifndef YYFPRINTF
    00574 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
    00575 #  define YYFPRINTF fprintf
    00576 # endif
    00577
    00578 # define YYDPRINTF(Args)            \
    00579 do {                        \
    00580   if (yydebug)                  \
    00581     YYFPRINTF Args;             \
    00582 } while (0)
    00583
    00584 # define YYDSYMPRINT(Args)          \
    00585 do {                        \
    00586   if (yydebug)                  \
    00587     yysymprint Args;                \
    00588 } while (0)
    00589
    00590 # define YYDSYMPRINTF(Title, Token, Value, Location)        \
    00591 do {                                \
    00592   if (yydebug)                          \
    00593     {                               \
    00594       YYFPRINTF (stderr, "%s ", Title);             \
    00595       yysymprint (stderr,                   \
    00596                   Token, Value);    \
    00597       YYFPRINTF (stderr, "\n");                 \
    00598     }                               \
    00599 } while (0)
    00600
    00601 /*------------------------------------------------------------------.
    00602 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
    00603 | TOP (cinluded).                                                   |
    00604 `------------------------------------------------------------------*/
    00605
    00606 #if defined (__STDC__) || defined (__cplusplus)
    00607 static void
    00608 yy_stack_print (short *bottom, short *top)
    00609 #else
    00610 static void
    00611 yy_stack_print (bottom, top)
    00612     short *bottom;
    00613     short *top;
    00614 #endif
    00615 {
    00616   YYFPRINTF (stderr, "Stack now");
    00617   for (/* Nothing. */; bottom <= top; ++bottom)
    00618     YYFPRINTF (stderr, " %d", *bottom);
    00619   YYFPRINTF (stderr, "\n");
    00620 }
    00621
    00622 # define YY_STACK_PRINT(Bottom, Top)                \
    00623 do {                                \
    00624   if (yydebug)                          \
    00625     yy_stack_print ((Bottom), (Top));               \
    00626 } while (0)
    00627
    00628
    00629 /*------------------------------------------------.
    00630 | Report that the YYRULE is going to be reduced.  |
    00631 `------------------------------------------------*/
    00632
    00633 #if defined (__STDC__) || defined (__cplusplus)
    00634 static void
    00635 yy_reduce_print (int yyrule)
    00636 #else
    00637 static void
    00638 yy_reduce_print (yyrule)
    00639     int yyrule;
    00640 #endif
    00641 {
    00642   int yyi;
    00643   unsigned int yylineno = yyrline[yyrule];
    00644   YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
    00645              yyrule - 1, yylineno);
    00646   /* Print the symbols being reduced, and their result.  */
    00647   for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
    00648     YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
    00649   YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
    00650 }
    00651
    00652 # define YY_REDUCE_PRINT(Rule)      \
    00653 do {                    \
    00654   if (yydebug)              \
    00655     yy_reduce_print (Rule);     \
    00656 } while (0)
    00657
    00658 /* Nonzero means print parse trace.  It is left uninitialized so that
    00659    multiple parsers can coexist.  */
    00660 int yydebug;
    00661 #else /* !YYDEBUG */
    00662 # define YYDPRINTF(Args)
    00663 # define YYDSYMPRINT(Args)
    00664 # define YYDSYMPRINTF(Title, Token, Value, Location)
    00665 # define YY_STACK_PRINT(Bottom, Top)
    00666 # define YY_REDUCE_PRINT(Rule)
    00667 #endif /* !YYDEBUG */
    00668
    00669
    00670 /* YYINITDEPTH -- initial size of the parser's stacks.  */
    00671 #ifndef YYINITDEPTH
    00672 # define YYINITDEPTH 200
    00673 #endif
    00674
    00675 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
    00676    if the built-in stack extension method is used).
    00677
    00678    Do not make this value too large; the results are undefined if
    00679    SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
    00680    evaluated with infinite-precision integer arithmetic.  */
    00681
    00682 #if YYMAXDEPTH == 0
    00683 # undef YYMAXDEPTH
    00684 #endif
    00685
    00686 #ifndef YYMAXDEPTH
    00687 # define YYMAXDEPTH 10000
    00688 #endif
    00689
    00690
    00691
    00692 #if YYERROR_VERBOSE
    00693
    00694 # ifndef yystrlen
    00695 #  if defined (__GLIBC__) && defined (_STRING_H)
    00696 #   define yystrlen strlen
    00697 #  else
    00698 /* Return the length of YYSTR.  */
    00699 static YYSIZE_T
    00700 #   if defined (__STDC__) || defined (__cplusplus)
    00701 yystrlen (const char *yystr)
    00702 #   else
    00703 yystrlen (yystr)
    00704      const char *yystr;
    00705 #   endif
    00706 {
    00707   register const char *yys = yystr;
    00708
    00709   while (*yys++ != '\0')
    00710     continue;
    00711
    00712   return yys - yystr - 1;
    00713 }
    00714 #  endif
    00715 # endif
    00716
    00717 # ifndef yystpcpy
    00718 #  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
    00719 #   define yystpcpy stpcpy
    00720 #  else
    00721 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
    00722    YYDEST.  */
    00723 static char *
    00724 #   if defined (__STDC__) || defined (__cplusplus)
    00725 yystpcpy (char *yydest, const char *yysrc)
    00726 #   else
    00727 yystpcpy (yydest, yysrc)
    00728      char *yydest;
    00729      const char *yysrc;
    00730 #   endif
    00731 {
    00732   register char *yyd = yydest;
    00733   register const char *yys = yysrc;
    00734
    00735   while ((*yyd++ = *yys++) != '\0')
    00736     continue;
    00737
    00738   return yyd - 1;
    00739 }
    00740 #  endif
    00741 # endif
    00742
    00743 #endif /* !YYERROR_VERBOSE */
    00744
    00745
    00746
    00747 #if YYDEBUG
    00748 /*--------------------------------.
    00749 | Print this symbol on YYOUTPUT.  |
    00750 `--------------------------------*/
    00751
    00752 #if defined (__STDC__) || defined (__cplusplus)
    00753 static void
    00754 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
    00755 #else
    00756 static void
    00757 yysymprint (yyoutput, yytype, yyvaluep)
    00758     FILE *yyoutput;
    00759     int yytype;
    00760     YYSTYPE *yyvaluep;
    00761 #endif
    00762 {
    00763   /* Pacify ``unused variable'' warnings.  */
    00764   (void) yyvaluep;
    00765
    00766   if (yytype < YYNTOKENS)
    00767     {
    00768       YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
    00769 # ifdef YYPRINT
    00770       YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
    00771 # endif
    00772     }
    00773   else
    00774     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
    00775
    00776   switch (yytype)
    00777     {
    00778       default:
    00779         break;
    00780     }
    00781   YYFPRINTF (yyoutput, ")");
    00782 }
    00783
    00784 #endif /* ! YYDEBUG */
    00785 /*-----------------------------------------------.
    00786 | Release the memory associated to this symbol.  |
    00787 `-----------------------------------------------*/
    00788
    00789 #if defined (__STDC__) || defined (__cplusplus)
    00790 static void
    00791 yydestruct (int yytype, YYSTYPE *yyvaluep)
    00792 #else
    00793 static void
    00794 yydestruct (yytype, yyvaluep)
    00795     int yytype;
    00796     YYSTYPE *yyvaluep;
    00797 #endif
    00798 {
    00799   /* Pacify ``unused variable'' warnings.  */
    00800   (void) yyvaluep;
    00801
    00802   switch (yytype)
    00803     {
    00804
    00805       default:
    00806         break;
    00807     }
    00808 }
    00809
    00810
    00811 /* Prevent warnings from -Wmissing-prototypes.  */
    00812
    00813 #ifdef YYPARSE_PARAM
    00814 # if defined (__STDC__) || defined (__cplusplus)
    00815 int yyparse (void *YYPARSE_PARAM);
    00816 # else
    00817 int yyparse ();
    00818 # endif
    00819 #else /* ! YYPARSE_PARAM */
    00820 #if defined (__STDC__) || defined (__cplusplus)
    00821 int yyparse (void);
    00822 #else
    00823 int yyparse ();
    00824 #endif
    00825 #endif /* ! YYPARSE_PARAM */
    00826
    00827
    00828
    00829 /* The lookahead symbol.  */
    00830 int yychar;
    00831
    00832 /* The semantic value of the lookahead symbol.  */
    00833 YYSTYPE yylval;
    00834
    00835 /* Number of syntax errors so far.  */
    00836 int yynerrs;
    00837
    00838
    00839
    00840 /*----------.
    00841 | yyparse.  |
    00842 `----------*/
    00843
    00844 #ifdef YYPARSE_PARAM
    00845 # if defined (__STDC__) || defined (__cplusplus)
    00846 int yyparse (void *YYPARSE_PARAM)
    00847 # else
    00848 int yyparse (YYPARSE_PARAM)
    00849   void *YYPARSE_PARAM;
    00850 # endif
    00851 #else /* ! YYPARSE_PARAM */
    00852 #if defined (__STDC__) || defined (__cplusplus)
    00853 int
    00854 yyparse (void)
    00855 #else
    00856 int
    00857 yyparse ()
    00858
    00859 #endif
    00860 #endif
    00861 {
    00862
    00863   register int yystate;
    00864   register int yyn;
    00865   int yyresult;
    00866   /* Number of tokens to shift before error messages enabled.  */
    00867   int yyerrstatus;
    00868   /* Lookahead token as an internal (translated) token number.  */
    00869   int yytoken = 0;
    00870
    00871   /* Three stacks and their tools:
    00872      `yyss': related to states,
    00873      `yyvs': related to semantic values,
    00874      `yyls': related to locations.
    00875
    00876      Refer to the stacks thru separate pointers, to allow yyoverflow
    00877      to reallocate them elsewhere.  */
    00878
    00879   /* The state stack.  */
    00880   short yyssa[YYINITDEPTH];
    00881   short *yyss = yyssa;
    00882   register short *yyssp;
    00883
    00884   /* The semantic value stack.  */
    00885   YYSTYPE yyvsa[YYINITDEPTH];
    00886   YYSTYPE *yyvs = yyvsa;
    00887   register YYSTYPE *yyvsp;
    00888
    00889
    00890
    00891 #define YYPOPSTACK   (yyvsp--, yyssp--)
    00892
    00893   YYSIZE_T yystacksize = YYINITDEPTH;
    00894
    00895   /* The variables used to return semantic value and location from the
    00896      action routines.  */
    00897   YYSTYPE yyval;
    00898
    00899
    00900   /* When reducing, the number of symbols on the RHS of the reduced
    00901      rule.  */
    00902   int yylen;
    00903
    00904   YYDPRINTF ((stderr, "Starting parse\n"));
    00905
    00906   yystate = 0;
    00907   yyerrstatus = 0;
    00908   yynerrs = 0;
    00909   yychar = YYEMPTY;     /* Cause a token to be read.  */
    00910
    00911   /* Initialize stack pointers.
    00912      Waste one element of value and location stack
    00913      so that they stay on the same level as the state stack.
    00914      The wasted elements are never initialized.  */
    00915
    00916   yyssp = yyss;
    00917   yyvsp = yyvs;
    00918
    00919   goto yysetstate;
    00920
    00921 /*------------------------------------------------------------.
    00922 | yynewstate -- Push a new state, which is found in yystate.  |
    00923 `------------------------------------------------------------*/
    00924  yynewstate:
    00925   /* In all cases, when you get here, the value and location stacks
    00926      have just been pushed. so pushing a state here evens the stacks.
    00927      */
    00928   yyssp++;
    00929
    00930  yysetstate:
    00931   *yyssp = yystate;
    00932
    00933   if (yyss + yystacksize - 1 <= yyssp)
    00934     {
    00935       /* Get the current used size of the three stacks, in elements.  */
    00936       YYSIZE_T yysize = yyssp - yyss + 1;
    00937
    00938 #ifdef yyoverflow
    00939       {
    00940     /* Give user a chance to reallocate the stack. Use copies of
    00941        these so that the &'s don't force the real ones into
    00942        memory.  */
    00943     YYSTYPE *yyvs1 = yyvs;
    00944     short *yyss1 = yyss;
    00945
    00946
    00947     /* Each stack pointer address is followed by the size of the
    00948        data in use in that stack, in bytes.  This used to be a
    00949        conditional around just the two extra args, but that might
    00950        be undefined if yyoverflow is a macro.  */
    00951     yyoverflow ("parser stack overflow",
    00952             &yyss1, yysize * sizeof (*yyssp),
    00953             &yyvs1, yysize * sizeof (*yyvsp),
    00954
    00955             &yystacksize);
    00956
    00957     yyss = yyss1;
    00958     yyvs = yyvs1;
    00959       }
    00960 #else /* no yyoverflow */
    00961 # ifndef YYSTACK_RELOCATE
    00962       goto yyoverflowlab;
    00963 # else
    00964       /* Extend the stack our own way.  */
    00965       if (YYMAXDEPTH <= yystacksize)
    00966     goto yyoverflowlab;
    00967       yystacksize *= 2;
    00968       if (YYMAXDEPTH < yystacksize)
    00969     yystacksize = YYMAXDEPTH;
    00970
    00971       {
    00972     short *yyss1 = yyss;
    00973     union yyalloc *yyptr =
    00974       (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
    00975     if (! yyptr)
    00976       goto yyoverflowlab;
    00977     YYSTACK_RELOCATE (yyss);
    00978     YYSTACK_RELOCATE (yyvs);
    00979
    00980 #  undef YYSTACK_RELOCATE
    00981     if (yyss1 != yyssa)
    00982       YYSTACK_FREE (yyss1);
    00983       }
    00984 # endif
    00985 #endif /* no yyoverflow */
    00986
    00987       yyssp = yyss + yysize - 1;
    00988       yyvsp = yyvs + yysize - 1;
    00989
    00990
    00991       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
    00992           (unsigned long int) yystacksize));
    00993
    00994       if (yyss + yystacksize - 1 <= yyssp)
    00995     YYABORT;
    00996     }
    00997
    00998   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
    00999
    01000   goto yybackup;
    01001
    01002 /*-----------.
    01003 | yybackup.  |
    01004 `-----------*/
    01005 yybackup:
    01006
    01007 /* Do appropriate processing given the current state.  */
    01008 /* Read a lookahead token if we need one and don't already have one.  */
    01009 /* yyresume: */
    01010
    01011   /* First try to decide what to do without reference to lookahead token.  */
    01012
    01013   yyn = yypact[yystate];
    01014   if (yyn == YYPACT_NINF)
    01015     goto yydefault;
    01016
    01017   /* Not known => get a lookahead token if don't already have one.  */
    01018
    01019   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
    01020   if (yychar == YYEMPTY)
    01021     {
    01022       YYDPRINTF ((stderr, "Reading a token: "));
    01023       yychar = YYLEX;
    01024     }
    01025
    01026   if (yychar <= YYEOF)
    01027     {
    01028       yychar = yytoken = YYEOF;
    01029       YYDPRINTF ((stderr, "Now at end of input.\n"));
    01030     }
    01031   else
    01032     {
    01033       yytoken = YYTRANSLATE (yychar);
    01034       YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
    01035     }
    01036
    01037   /* If the proper action on seeing token YYTOKEN is to reduce or to
    01038      detect an error, take that action.  */
    01039   yyn += yytoken;
    01040   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
    01041     goto yydefault;
    01042   yyn = yytable[yyn];
    01043   if (yyn <= 0)
    01044     {
    01045       if (yyn == 0 || yyn == YYTABLE_NINF)
    01046     goto yyerrlab;
    01047       yyn = -yyn;
    01048       goto yyreduce;
    01049     }
    01050
    01051   if (yyn == YYFINAL)
    01052     YYACCEPT;
    01053
    01054   /* Shift the lookahead token.  */
    01055   YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
    01056
    01057   /* Discard the token being shifted unless it is eof.  */
    01058   if (yychar != YYEOF)
    01059     yychar = YYEMPTY;
    01060
    01061   *++yyvsp = yylval;
    01062
    01063
    01064   /* Count tokens shifted since error; after three, turn off error
    01065      status.  */
    01066   if (yyerrstatus)
    01067     yyerrstatus--;
    01068
    01069   yystate = yyn;
    01070   goto yynewstate;
    01071
    01072
    01073 /*-----------------------------------------------------------.
    01074 | yydefault -- do the default action for the current state.  |
    01075 `-----------------------------------------------------------*/
    01076 yydefault:
    01077   yyn = yydefact[yystate];
    01078   if (yyn == 0)
    01079     goto yyerrlab;
    01080   goto yyreduce;
    01081
    01082
    01083 /*-----------------------------.
    01084 | yyreduce -- Do a reduction.  |
    01085 `-----------------------------*/
    01086 yyreduce:
    01087   /* yyn is the number of a rule to reduce with.  */
    01088   yylen = yyr2[yyn];
    01089
    01090   /* If YYLEN is nonzero, implement the default value of the action:
    01091      `$$ = $1'.
    01092
    01093      Otherwise, the following line sets YYVAL to garbage.
    01094      This behavior is undocumented and Bison
    01095      users should not rely upon it.  Assigning to YYVAL
    01096      unconditionally makes the parser a bit smaller, and it avoids a
    01097      GCC warning that YYVAL may be used uninitialized.  */
    01098   yyval = yyvsp[1-yylen];
    01099
    01100
    01101   YY_REDUCE_PRINT (yyn);
    01102   switch (yyn)
    01103     {
    01104         case 4:
    01105 #line 58 "./ppdparser.y"
    01106     { yyval = yyvsp[0]; ;}
    01107     break;
    01108
    01109   case 5:
    01110 #line 59 "./ppdparser.y"
    01111     { yyvsp[-1] += yyvsp[0]; yyval = yyvsp[-1]; ;}
    01112     break;
    01113
    01114   case 6:
    01115 #line 60 "./ppdparser.y"
    01116     { yyvsp[-1] += yyvsp[0]; yyval = yyvsp[-1]; ;}
    01117     break;
    01118
    01119   case 7:
    01120 #line 63 "./ppdparser.y"
    01121     { yyval = yyvsp[0]; ;}
    01122     break;
    01123
    01124   case 8:
    01125 #line 64 "./ppdparser.y"
    01126     { yyval = yyvsp[0][0].mid(1,yyvsp[0][0].length()-2); ;}
    01127     break;
    01128
    01129   case 9:
    01130 #line 65 "./ppdparser.y"
    01131     { yyval = yyvsp[-2][0].mid(1,yyvsp[-2][0].length()-2); ;}
    01132     break;
    01133
    01134   case 10:
    01135 #line 66 "./ppdparser.y"
    01136     { yyval = yyvsp[-2]; ;}
    01137     break;
    01138
    01139   case 11:
    01140 #line 69 "./ppdparser.y"
    01141     { builder->putPaperDimension(yyvsp[-2][0], yyvsp[0][0]); ;}
    01142     break;
    01143
    01144   case 12:
    01145 #line 70 "./ppdparser.y"
    01146     { builder->putPaperDimension(yyvsp[-4][0], yyvsp[0][0]); ;}
    01147     break;
    01148
    01149   case 13:
    01150 #line 73 "./ppdparser.y"
    01151     { builder->putImageableArea(yyvsp[-2][0], yyvsp[0][0]); ;}
    01152     break;
    01153
    01154   case 14:
    01155 #line 74 "./ppdparser.y"
    01156     { builder->putImageableArea(yyvsp[-4][0], yyvsp[0][0]); ;}
    01157     break;
    01158
    01159   case 15:
    01160 #line 77 "./ppdparser.y"
    01161     { builder->openUi(yyvsp[-2][0], QString::null, yyvsp[0][0]); ;}
    01162     break;
    01163
    01164   case 16:
    01165 #line 78 "./ppdparser.y"
    01166     { builder->openUi(yyvsp[-4][0], yyvsp[-2][0], yyvsp[0][0]); ;}
    01167     break;
    01168
    01169   case 17:
    01170 #line 81 "./ppdparser.y"
    01171     { builder->endUi(yyvsp[0][0]); ;}
    01172     break;
    01173
    01174   case 18:
    01175 #line 82 "./ppdparser.y"
    01176     { builder->endUi(yyvsp[0][0]); ;}
    01177     break;
    01178
    01179   case 19:
    01180 #line 85 "./ppdparser.y"
    01181     { builder->openGroup(yyvsp[0].join(" "), QString::null); ;}
    01182     break;
    01183
    01184   case 20:
    01185 #line 86 "./ppdparser.y"
    01186     { builder->openGroup(yyvsp[-2].join(" "), yyvsp[0][0]); ;}
    01187     break;
    01188
    01189   case 21:
    01190 #line 89 "./ppdparser.y"
    01191     { builder->endGroup(yyvsp[0].join(" ")); ;}
    01192     break;
    01193
    01194   case 22:
    01195 #line 90 "./ppdparser.y"
    01196     { builder->endGroup(yyvsp[-2].join(" ")); ;}
    01197     break;
    01198
    01199   case 23:
    01200 #line 93 "./ppdparser.y"
    01201     { builder->putConstraint(yyvsp[-3][0], yyvsp[-1][0], yyvsp[-2][0], yyvsp[0][0]); ;}
    01202     break;
    01203
    01204   case 24:
    01205 #line 94 "./ppdparser.y"
    01206     { builder->putConstraint(yyvsp[-2][0], yyvsp[0][0], yyvsp[-1][0], QString::null); ;}
    01207     break;
    01208
    01209   case 25:
    01210 #line 95 "./ppdparser.y"
    01211     { builder->putConstraint(yyvsp[-2][0], yyvsp[-1][0], QString::null, yyvsp[0][0]); ;}
    01212     break;
    01213
    01214   case 26:
    01215 #line 96 "./ppdparser.y"
    01216     { builder->putConstraint(yyvsp[-1][0], yyvsp[0][0], QString::null, QString::null); ;}
    01217     break;
    01218
    01219   case 27:
    01220 #line 99 "./ppdparser.y"
    01221     { builder->putStatement2(yyvsp[-2][0], yyvsp[0][0]); ;}
    01222     break;
    01223
    01224   case 28:
    01225 #line 100 "./ppdparser.y"
    01226     { builder->putStatement(yyvsp[-3][0], yyvsp[-2][0], QString::null, yyvsp[0]); ;}
    01227     break;
    01228
    01229   case 29:
    01230 #line 101 "./ppdparser.y"
    01231     { builder->putStatement(yyvsp[-5][0], yyvsp[-4][0], yyvsp[-2][0], yyvsp[0]); ;}
    01232     break;
    01233
    01234   case 30:
    01235 #line 102 "./ppdparser.y"
    01236     { builder->putStatement(yyvsp[-4][0], yyvsp[-3][0], QString::null, yyvsp[-1]); ;}
    01237     break;
    01238
    01239   case 31:
    01240 #line 103 "./ppdparser.y"
    01241     { builder->putDefault(yyvsp[-2][0], yyvsp[0][0]); ;}
    01242     break;
    01243
    01244   case 32:
    01245 #line 104 "./ppdparser.y"
    01246     { builder->putDefault(yyvsp[-4][0], yyvsp[-2][0]); ;}
    01247     break;
    01248
    01249   case 41:
    01250 #line 113 "./ppdparser.y"
    01251     { builder->putFooData(yyvsp[0][0]); ;}
    01252     break;
    01253
    01254
    01255     }
    01256
    01257 /* Line 999 of yacc.c.  */
    01258 #line 1258 "./ppdparser.cpp"
    01259
    01260   yyvsp -= yylen;
    01261   yyssp -= yylen;
    01262
    01263
    01264   YY_STACK_PRINT (yyss, yyssp);
    01265
    01266   *++yyvsp = yyval;
    01267
    01268
    01269   /* Now `shift' the result of the reduction.  Determine what state
    01270      that goes to, based on the state we popped back to and the rule
    01271      number reduced by.  */
    01272
    01273   yyn = yyr1[yyn];
    01274
    01275   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
    01276   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    01277     yystate = yytable[yystate];
    01278   else
    01279     yystate = yydefgoto[yyn - YYNTOKENS];
    01280
    01281   goto yynewstate;
    01282
    01283
    01284 /*------------------------------------.
    01285 | yyerrlab -- here on detecting error |
    01286 `------------------------------------*/
    01287 yyerrlab:
    01288   /* If not already recovering from an error, report this error.  */
    01289   if (!yyerrstatus)
    01290     {
    01291       ++yynerrs;
    01292 #if YYERROR_VERBOSE
    01293       yyn = yypact[yystate];
    01294
    01295       if (YYPACT_NINF < yyn && yyn < YYLAST)
    01296     {
    01297       YYSIZE_T yysize = 0;
    01298       int yytype = YYTRANSLATE (yychar);
    01299       char *yymsg;
    01300       int yyx, yycount;
    01301
    01302       yycount = 0;
    01303       /* Start YYX at -YYN if negative to avoid negative indexes in
    01304          YYCHECK.  */
    01305       for (yyx = yyn < 0 ? -yyn : 0;
    01306            yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
    01307         if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
    01308           yysize += yystrlen (yytname[yyx]) + 15, yycount++;
    01309       yysize += yystrlen ("syntax error, unexpected ") + 1;
    01310       yysize += yystrlen (yytname[yytype]);
    01311       yymsg = (char *) YYSTACK_ALLOC (yysize);
    01312       if (yymsg != 0)
    01313         {
    01314           char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
    01315           yyp = yystpcpy (yyp, yytname[yytype]);
    01316
    01317           if (yycount < 5)
    01318         {
    01319           yycount = 0;
    01320           for (yyx = yyn < 0 ? -yyn : 0;
    01321                yyx < (int) (sizeof (yytname) / sizeof (char *));
    01322                yyx++)
    01323             if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
    01324               {
    01325             const char *yyq = ! yycount ? ", expecting " : " or ";
    01326             yyp = yystpcpy (yyp, yyq);
    01327             yyp = yystpcpy (yyp, yytname[yyx]);
    01328             yycount++;
    01329               }
    01330         }
    01331           yyerror (yymsg);
    01332           YYSTACK_FREE (yymsg);
    01333         }
    01334       else
    01335         yyerror ("syntax error; also virtual memory exhausted");
    01336     }
    01337       else
    01338 #endif /* YYERROR_VERBOSE */
    01339     yyerror ("syntax error");
    01340     }
    01341
    01342
    01343
    01344   if (yyerrstatus == 3)
    01345     {
    01346       /* If just tried and failed to reuse lookahead token after an
    01347      error, discard it.  */
    01348
    01349       /* Return failure if at end of input.  */
    01350       if (yychar == YYEOF)
    01351         {
    01352       /* Pop the error token.  */
    01353           YYPOPSTACK;
    01354       /* Pop the rest of the stack.  */
    01355       while (yyss < yyssp)
    01356         {
    01357           YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
    01358           yydestruct (yystos[*yyssp], yyvsp);
    01359           YYPOPSTACK;
    01360         }
    01361       YYABORT;
    01362         }
    01363
    01364       YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
    01365       yydestruct (yytoken, &yylval);
    01366       yychar = YYEMPTY;
    01367
    01368     }
    01369
    01370   /* Else will try to reuse lookahead token after shifting the error
    01371      token.  */
    01372   goto yyerrlab1;
    01373
    01374
    01375 /*----------------------------------------------------.
    01376 | yyerrlab1 -- error raised explicitly by an action.  |
    01377 `----------------------------------------------------*/
    01378 yyerrlab1:
    01379   yyerrstatus = 3;  /* Each real token shifted decrements this.  */
    01380
    01381   for (;;)
    01382     {
    01383       yyn = yypact[yystate];
    01384       if (yyn != YYPACT_NINF)
    01385     {
    01386       yyn += YYTERROR;
    01387       if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
    01388         {
    01389           yyn = yytable[yyn];
    01390           if (0 < yyn)
    01391         break;
    01392         }
    01393     }
    01394
    01395       /* Pop the current state because it cannot handle the error token.  */
    01396       if (yyssp == yyss)
    01397     YYABORT;
    01398
    01399       YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
    01400       yydestruct (yystos[yystate], yyvsp);
    01401       yyvsp--;
    01402       yystate = *--yyssp;
    01403
    01404       YY_STACK_PRINT (yyss, yyssp);
    01405     }
    01406
    01407   if (yyn == YYFINAL)
    01408     YYACCEPT;
    01409
    01410   YYDPRINTF ((stderr, "Shifting error token, "));
    01411
    01412   *++yyvsp = yylval;
    01413
    01414
    01415   yystate = yyn;
    01416   goto yynewstate;
    01417
    01418
    01419 /*-------------------------------------.
    01420 | yyacceptlab -- YYACCEPT comes here.  |
    01421 `-------------------------------------*/
    01422 yyacceptlab:
    01423   yyresult = 0;
    01424   goto yyreturn;
    01425
    01426 /*-----------------------------------.
    01427 | yyabortlab -- YYABORT comes here.  |
    01428 `-----------------------------------*/
    01429 yyabortlab:
    01430   yyresult = 1;
    01431   goto yyreturn;
    01432
    01433 #ifndef yyoverflow
    01434 /*----------------------------------------------.
    01435 | yyoverflowlab -- parser overflow comes here.  |
    01436 `----------------------------------------------*/
    01437 yyoverflowlab:
    01438   yyerror ("parser stack overflow");
    01439   yyresult = 2;
    01440   /* Fall through.  */
    01441 #endif
    01442
    01443 yyreturn:
    01444 #ifndef yyoverflow
    01445   if (yyss != yyssa)
    01446     YYSTACK_FREE (yyss);
    01447 #endif
    01448   return yyresult;
    01449 }
    01450
    01451
    01452 #line 116 "./ppdparser.y"
    01453
    01454
    01455 #undef builder
    01456

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