kdeprint Library API Documentation

ppdparser.cpp

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