• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kdeprint
 

kdeprint

  • kdeprint
ppdparser.cpp
1 /* A Bison parser, made by GNU Bison 1.875. */
2 
3 /* Skeleton parser for Yacc-like parsing with Bison,
4  Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2, or (at your option)
9  any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA. */
20 
21 /* As a special exception, when this file is copied by Bison into a
22  Bison output file, you may use that output file without restriction.
23  This special exception was added by the Free Software Foundation
24  in version 1.24 of Bison. */
25 
26 /* Written by Richard Stallman by simplifying the original so called
27  ``semantic'' parser. */
28 
29 /* All symbols defined below should begin with yy or YY, to avoid
30  infringing on user name space. This should be done even for local
31  variables, as they might otherwise be expanded by user macros.
32  There are some unavoidable exceptions within include files to
33  define necessary library symbols; they are noted "INFRINGES ON
34  USER NAME SPACE" below. */
35 
36 /* Identify Bison output. */
37 #define YYBISON 1
38 
39 /* Skeleton name. */
40 #define YYSKELETON_NAME "yacc.c"
41 
42 /* Pure parsers. */
43 #define YYPURE 0
44 
45 /* Using locations. */
46 #define YYLSP_NEEDED 0
47 
48 /* If NAME_PREFIX is specified substitute the variables and functions
49  names. */
50 #define yyparse kdeprint_ppdparse
51 #define yylex kdeprint_ppdlex
52 #define yyerror kdeprint_ppderror
53 #define yylval kdeprint_ppdlval
54 #define yychar kdeprint_ppdchar
55 #define yydebug kdeprint_ppddebug
56 #define yynerrs kdeprint_ppdnerrs
57 
58 
59 /* Tokens. */
60 #ifndef YYTOKENTYPE
61 # define YYTOKENTYPE
62  /* Put the tokens into the symbol table, so that GDB and other debuggers
63  know about them. */
64  enum yytokentype {
65  TRANSLATION = 258,
66  OPENUI = 259,
67  CLOSEUI = 260,
68  OPENGROUP = 261,
69  CLOSEGROUP = 262,
70  DEFAULT = 263,
71  KEYWORD = 264,
72  OPTION = 265,
73  STRINGPART = 266,
74  QUOTED = 267,
75  CONSTRAINT = 268,
76  PAPERDIM = 269,
77  IMGAREA = 270,
78  FOODATA = 271,
79  COMMENT = 272
80  };
81 #endif
82 #define TRANSLATION 258
83 #define OPENUI 259
84 #define CLOSEUI 260
85 #define OPENGROUP 261
86 #define CLOSEGROUP 262
87 #define DEFAULT 263
88 #define KEYWORD 264
89 #define OPTION 265
90 #define STRINGPART 266
91 #define QUOTED 267
92 #define CONSTRAINT 268
93 #define PAPERDIM 269
94 #define IMGAREA 270
95 #define FOODATA 271
96 #define COMMENT 272
97 
98 
99 
100 
101 /* Copy the first part of user declarations. */
102 #line 1 "./ppdparser.y"
103 
104 /*
105  * This file is part of the KDE libraries
106  * Copyright (c) 2001-2003 Michael Goffioul <kdeprint@swing.be>
107  *
108  * This library is free software; you can redistribute it and/or
109  * modify it under the terms of the GNU Library General Public
110  * License version 2 as published by the Free Software Foundation.
111  *
112  * This library is distributed in the hope that it will be useful,
113  * but WITHOUT ANY WARRANTY; without even the implied warranty of
114  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
115  * Library General Public License for more details.
116  *
117  * You should have received a copy of the GNU Library General Public License
118  * along with this library; see the file COPYING.LIB. If not, write to
119  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
120  * Boston, MA 02110-1301, USA.
121  **/
122 
123 #define YYSTYPE TQStringList
124 #define YYPARSE_PARAM ppdloader
125 #define YYDEBUG 1
126 #define YYERROR_VERBOSE 1
127 #include <stdlib.h>
128 #include <tqstringlist.h>
129 
130 #include "ppdloader.h"
131 
132 #define builder static_cast<PPDLoader*>( ppdloader )
133 
134 int kdeprint_ppdlex();
135 #define kdeprint_ppderror(msg) static_cast<PPDLoader*>( ppdloader )->setErrorMsg( msg )
136 
137 
138 /* Enabling traces. */
139 #ifndef YYDEBUG
140 # define YYDEBUG 0
141 #endif
142 
143 /* Enabling verbose error messages. */
144 #ifdef YYERROR_VERBOSE
145 # undef YYERROR_VERBOSE
146 # define YYERROR_VERBOSE 1
147 #else
148 # define YYERROR_VERBOSE 0
149 #endif
150 
151 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
152 typedef int YYSTYPE;
153 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
154 # define YYSTYPE_IS_DECLARED 1
155 # define YYSTYPE_IS_TRIVIAL 1
156 #endif
157 
158 
159 
160 /* Copy the second part of user declarations. */
161 
162 
163 /* Line 214 of yacc.c. */
164 #line 164 "./ppdparser.cpp"
165 
166 #if ! defined (yyoverflow) || YYERROR_VERBOSE
167 
168 /* The parser invokes alloca or malloc; define the necessary symbols. */
169 
170 # if YYSTACK_USE_ALLOCA
171 # define YYSTACK_ALLOC alloca
172 # else
173 # ifndef YYSTACK_USE_ALLOCA
174 # if defined (alloca) || defined (_ALLOCA_H)
175 # define YYSTACK_ALLOC alloca
176 # else
177 # ifdef __GNUC__
178 # define YYSTACK_ALLOC __builtin_alloca
179 # endif
180 # endif
181 # endif
182 # endif
183 
184 # ifdef YYSTACK_ALLOC
185  /* Pacify GCC's `empty if-body' warning. */
186 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
187 # else
188 # if defined (__STDC__) || defined (__cplusplus)
189 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
190 # define YYSIZE_T size_t
191 # endif
192 # define YYSTACK_ALLOC malloc
193 # define YYSTACK_FREE free
194 # endif
195 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
196 
197 
198 #if (! defined (yyoverflow) \
199  && (! defined (__cplusplus) \
200  || (YYSTYPE_IS_TRIVIAL)))
201 
202 /* A type that is properly aligned for any stack member. */
203 union yyalloc
204 {
205  short yyss;
206  YYSTYPE yyvs;
207  };
208 
209 /* The size of the maximum gap between one aligned stack and the next. */
210 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
211 
212 /* The size of an array large to enough to hold all stacks, each with
213  N elements. */
214 # define YYSTACK_BYTES(N) \
215  ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
216  + YYSTACK_GAP_MAXIMUM)
217 
218 /* Copy COUNT objects from FROM to TO. The source and destination do
219  not overlap. */
220 # ifndef YYCOPY
221 # if 1 < __GNUC__
222 # define YYCOPY(To, From, Count) \
223  __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
224 # else
225 # define YYCOPY(To, From, Count) \
226  do \
227  { \
228  YYSIZE_T yyi; \
229  for (yyi = 0; yyi < (Count); yyi++) \
230  (To)[yyi] = (From)[yyi]; \
231  } \
232  while (0)
233 # endif
234 # endif
235 
236 /* Relocate STACK from its old location to the new one. The
237  local variables YYSIZE and YYSTACKSIZE give the old and new number of
238  elements in the stack, and YYPTR gives the new location of the
239  stack. Advance YYPTR to a properly aligned location for the next
240  stack. */
241 # define YYSTACK_RELOCATE(Stack) \
242  do \
243  { \
244  YYSIZE_T yynewbytes; \
245  YYCOPY (&yyptr->Stack, Stack, yysize); \
246  Stack = &yyptr->Stack; \
247  yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
248  yyptr += yynewbytes / sizeof (*yyptr); \
249  } \
250  while (0)
251 
252 #endif
253 
254 #if defined (__STDC__) || defined (__cplusplus)
255  typedef signed char yysigned_char;
256 #else
257  typedef short yysigned_char;
258 #endif
259 
260 /* YYFINAL -- State number of the termination state. */
261 #define YYFINAL 33
262 /* YYLAST -- Last index in YYTABLE. */
263 #define YYLAST 99
264 
265 /* YYNTOKENS -- Number of terminals. */
266 #define YYNTOKENS 20
267 /* YYNNTS -- Number of nonterminals. */
268 #define YYNNTS 12
269 /* YYNRULES -- Number of rules. */
270 #define YYNRULES 41
271 /* YYNRULES -- Number of states. */
272 #define YYNSTATES 86
273 
274 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
275 #define YYUNDEFTOK 2
276 #define YYMAXUTOK 272
277 
278 #define YYTRANSLATE(YYX) \
279  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
280 
281 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
282 static const unsigned char yytranslate[] =
283 {
284  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
285  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
286  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
287  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
288  2, 2, 2, 2, 2, 2, 2, 18, 2, 2,
289  2, 2, 2, 2, 2, 2, 2, 2, 19, 2,
290  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
291  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
292  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
293  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
294  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
295  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
296  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
297  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
298  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
299  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
300  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
301  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
302  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
303  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
304  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
305  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
306  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
307  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
308  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
309  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
310  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
311  15, 16, 17
312 };
313 
314 #if YYDEBUG
315 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
316  YYRHS. */
317 static const unsigned char yyprhs[] =
318 {
319  0, 0, 3, 5, 8, 10, 13, 16, 18, 20,
320  24, 28, 33, 40, 45, 52, 57, 64, 68, 71,
321  75, 81, 85, 91, 98, 104, 110, 115, 119, 124,
322  131, 137, 141, 147, 149, 151, 153, 155, 157, 159,
323  161, 163
324 };
325 
326 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
327 static const yysigned_char yyrhs[] =
328 {
329  21, 0, -1, 31, -1, 21, 31, -1, 11, -1,
330  22, 11, -1, 22, 12, -1, 22, -1, 12, -1,
331  12, 18, 3, -1, 22, 18, 3, -1, 14, 10,
332  19, 12, -1, 14, 10, 18, 3, 19, 12, -1,
333  15, 10, 19, 12, -1, 15, 10, 18, 3, 19,
334  12, -1, 4, 10, 19, 22, -1, 4, 10, 18,
335  3, 19, 22, -1, 5, 19, 22, -1, 5, 22,
336  -1, 6, 19, 22, -1, 6, 19, 22, 18, 3,
337  -1, 7, 19, 22, -1, 7, 19, 22, 18, 3,
338  -1, 13, 19, 9, 10, 9, 10, -1, 13, 19,
339  9, 10, 9, -1, 13, 19, 9, 9, 10, -1,
340  13, 19, 9, 9, -1, 9, 19, 23, -1, 9,
341  10, 19, 23, -1, 9, 10, 18, 3, 19, 23,
342  -1, 9, 10, 18, 19, 23, -1, 8, 19, 22,
343  -1, 8, 19, 22, 18, 3, -1, 26, -1, 27,
344  -1, 28, -1, 29, -1, 24, -1, 25, -1, 30,
345  -1, 17, -1, 16, -1
346 };
347 
348 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
349 static const unsigned char yyrline[] =
350 {
351  0, 54, 54, 55, 58, 59, 60, 63, 64, 65,
352  66, 69, 70, 73, 74, 77, 78, 81, 82, 85,
353  86, 89, 90, 93, 94, 95, 96, 99, 100, 101,
354  102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
355  112, 113
356 };
357 #endif
358 
359 #if YYDEBUG || YYERROR_VERBOSE
360 /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
361  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
362 static const char *const yytname[] =
363 {
364  "$end", "error", "$undefined", "TRANSLATION", "OPENUI", "CLOSEUI",
365  "OPENGROUP", "CLOSEGROUP", "DEFAULT", "KEYWORD", "OPTION", "STRINGPART",
366  "QUOTED", "CONSTRAINT", "PAPERDIM", "IMGAREA", "FOODATA", "COMMENT",
367  "'/'", "':'", "$accept", "ppdfile", "string", "value", "paperdim",
368  "imgarea", "openui", "endui", "opengroup", "endgroup", "constraint",
369  "ppdelement", 0
370 };
371 #endif
372 
373 # ifdef YYPRINT
374 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
375  token YYLEX-NUM. */
376 static const unsigned short yytoknum[] =
377 {
378  0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
379  265, 266, 267, 268, 269, 270, 271, 272, 47, 58
380 };
381 # endif
382 
383 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
384 static const unsigned char yyr1[] =
385 {
386  0, 20, 21, 21, 22, 22, 22, 23, 23, 23,
387  23, 24, 24, 25, 25, 26, 26, 27, 27, 28,
388  28, 29, 29, 30, 30, 30, 30, 31, 31, 31,
389  31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
390  31, 31
391 };
392 
393 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
394 static const unsigned char yyr2[] =
395 {
396  0, 2, 1, 2, 1, 2, 2, 1, 1, 3,
397  3, 4, 6, 4, 6, 4, 6, 3, 2, 3,
398  5, 3, 5, 6, 5, 5, 4, 3, 4, 6,
399  5, 3, 5, 1, 1, 1, 1, 1, 1, 1,
400  1, 1
401 };
402 
403 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
404  STATE-NUM when YYTABLE doesn't specify something else to do. Zero
405  means the default is an error. */
406 static const unsigned char yydefact[] =
407 {
408  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
409  41, 40, 0, 37, 38, 33, 34, 35, 36, 39,
410  2, 0, 4, 0, 18, 0, 0, 0, 0, 0,
411  0, 0, 0, 1, 3, 0, 0, 17, 5, 6,
412  19, 21, 31, 0, 0, 8, 7, 27, 0, 0,
413  0, 0, 0, 0, 15, 0, 0, 0, 0, 0,
414  28, 0, 0, 26, 0, 0, 11, 0, 13, 0,
415  20, 22, 32, 0, 30, 9, 10, 25, 24, 0,
416  0, 16, 29, 23, 12, 14
417 };
418 
419 /* YYDEFGOTO[NTERM-NUM]. */
420 static const yysigned_char yydefgoto[] =
421 {
422  -1, 12, 46, 47, 13, 14, 15, 16, 17, 18,
423  19, 20
424 };
425 
426 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
427  STATE-NUM. */
428 #define YYPACT_NINF -44
429 static const yysigned_char yypact[] =
430 {
431  45, 1, -6, -15, -13, 3, -7, 10, 5, 7,
432  -44, -44, 31, -44, -44, -44, -44, -44, -44, -44,
433  -44, -9, -44, 32, 16, 32, 32, 32, 14, 30,
434  48, 37, 50, -44, -44, 68, 32, 16, -44, -44,
435  -4, 8, 52, -1, 30, 57, 54, -44, 64, 73,
436  65, 75, 67, 61, 16, 78, 79, 80, 66, 30,
437  -44, 81, 83, 77, 82, 69, -44, 70, -44, 32,
438  -44, -44, -44, 30, -44, -44, -44, -44, 84, 85,
439  86, 16, -44, -44, -44, -44
440 };
441 
442 /* YYPGOTO[NTERM-NUM]. */
443 static const yysigned_char yypgoto[] =
444 {
445  -44, -44, -2, -43, -44, -44, -44, -44, -44, -44,
446  -44, 87
447 };
448 
449 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
450  positive, shift that token. If negative, reduce the rule which
451  number is the opposite. If zero, do what YYDEFACT says.
452  If YYTABLE_NINF, syntax error. */
453 #define YYTABLE_NINF -1
454 static const unsigned char yytable[] =
455 {
456  24, 60, 58, 28, 25, 22, 26, 38, 39, 35,
457  36, 21, 29, 23, 55, 31, 74, 32, 59, 38,
458  39, 37, 27, 40, 41, 42, 56, 38, 39, 30,
459  82, 33, 43, 44, 54, 1, 2, 3, 4, 5,
460  6, 22, 45, 22, 7, 8, 9, 10, 11, 1,
461  2, 3, 4, 5, 6, 49, 50, 48, 7, 8,
462  9, 10, 11, 38, 39, 38, 39, 81, 51, 52,
463  57, 53, 62, 63, 64, 61, 65, 66, 67, 68,
464  69, 70, 71, 72, 75, 73, 76, 77, 79, 80,
465  0, 78, 0, 0, 83, 0, 0, 84, 85, 34
466 };
467 
468 static const yysigned_char yycheck[] =
469 {
470  2, 44, 3, 10, 19, 11, 19, 11, 12, 18,
471  19, 10, 19, 19, 18, 10, 59, 10, 19, 11,
472  12, 23, 19, 25, 26, 27, 18, 11, 12, 19,
473  73, 0, 18, 19, 36, 4, 5, 6, 7, 8,
474  9, 11, 12, 11, 13, 14, 15, 16, 17, 4,
475  5, 6, 7, 8, 9, 18, 19, 9, 13, 14,
476  15, 16, 17, 11, 12, 11, 12, 69, 18, 19,
477  18, 3, 18, 9, 10, 18, 3, 12, 3, 12,
478  19, 3, 3, 3, 3, 19, 3, 10, 19, 19,
479  -1, 9, -1, -1, 10, -1, -1, 12, 12, 12
480 };
481 
482 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
483  symbol of state STATE-NUM. */
484 static const unsigned char yystos[] =
485 {
486  0, 4, 5, 6, 7, 8, 9, 13, 14, 15,
487  16, 17, 21, 24, 25, 26, 27, 28, 29, 30,
488  31, 10, 11, 19, 22, 19, 19, 19, 10, 19,
489  19, 10, 10, 0, 31, 18, 19, 22, 11, 12,
490  22, 22, 22, 18, 19, 12, 22, 23, 9, 18,
491  19, 18, 19, 3, 22, 18, 18, 18, 3, 19,
492  23, 18, 18, 9, 10, 3, 12, 3, 12, 19,
493  3, 3, 3, 19, 23, 3, 3, 10, 9, 19,
494  19, 22, 23, 10, 12, 12
495 };
496 
497 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
498 # define YYSIZE_T __SIZE_TYPE__
499 #endif
500 #if ! defined (YYSIZE_T) && defined (size_t)
501 # define YYSIZE_T size_t
502 #endif
503 #if ! defined (YYSIZE_T)
504 # if defined (__STDC__) || defined (__cplusplus)
505 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
506 # define YYSIZE_T size_t
507 # endif
508 #endif
509 #if ! defined (YYSIZE_T)
510 # define YYSIZE_T unsigned int
511 #endif
512 
513 #define yyerrok (yyerrstatus = 0)
514 #define yyclearin (yychar = YYEMPTY)
515 #define YYEMPTY (-2)
516 #define YYEOF 0
517 
518 #define YYACCEPT goto yyacceptlab
519 #define YYABORT goto yyabortlab
520 #define YYERROR goto yyerrlab1
521 
522 
523 /* Like YYERROR except do call yyerror. This remains here temporarily
524  to ease the transition to the new meaning of YYERROR, for GCC.
525  Once GCC version 2 has supplanted version 1, this can go. */
526 
527 #define YYFAIL goto yyerrlab
528 
529 #define YYRECOVERING() (!!yyerrstatus)
530 
531 #define YYBACKUP(Token, Value) \
532 do \
533  if (yychar == YYEMPTY && yylen == 1) \
534  { \
535  yychar = (Token); \
536  yylval = (Value); \
537  yytoken = YYTRANSLATE (yychar); \
538  YYPOPSTACK; \
539  goto yybackup; \
540  } \
541  else \
542  { \
543  yyerror ("syntax error: cannot back up");\
544  YYERROR; \
545  } \
546 while (0)
547 
548 #define YYTERROR 1
549 #define YYERRCODE 256
550 
551 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
552  are run). */
553 
554 #ifndef YYLLOC_DEFAULT
555 # define YYLLOC_DEFAULT(Current, Rhs, N) \
556  Current.first_line = Rhs[1].first_line; \
557  Current.first_column = Rhs[1].first_column; \
558  Current.last_line = Rhs[N].last_line; \
559  Current.last_column = Rhs[N].last_column;
560 #endif
561 
562 /* YYLEX -- calling `yylex' with the right arguments. */
563 
564 #ifdef YYLEX_PARAM
565 # define YYLEX yylex (YYLEX_PARAM)
566 #else
567 # define YYLEX yylex ()
568 #endif
569 
570 /* Enable debugging if requested. */
571 #if YYDEBUG
572 
573 # ifndef YYFPRINTF
574 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
575 # define YYFPRINTF fprintf
576 # endif
577 
578 # define YYDPRINTF(Args) \
579 do { \
580  if (yydebug) \
581  YYFPRINTF Args; \
582 } while (0)
583 
584 # define YYDSYMPRINT(Args) \
585 do { \
586  if (yydebug) \
587  yysymprint Args; \
588 } while (0)
589 
590 # define YYDSYMPRINTF(Title, Token, Value, Location) \
591 do { \
592  if (yydebug) \
593  { \
594  YYFPRINTF (stderr, "%s ", Title); \
595  yysymprint (stderr, \
596  Token, Value); \
597  YYFPRINTF (stderr, "\n"); \
598  } \
599 } while (0)
600 
601 /*------------------------------------------------------------------.
602 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
603 | TOP (cinluded). |
604 `------------------------------------------------------------------*/
605 
606 #if defined (__STDC__) || defined (__cplusplus)
607 static void
608 yy_stack_print (short *bottom, short *top)
609 #else
610 static void
611 yy_stack_print (bottom, top)
612  short *bottom;
613  short *top;
614 #endif
615 {
616  YYFPRINTF (stderr, "Stack now");
617  for (/* Nothing. */; bottom <= top; ++bottom)
618  YYFPRINTF (stderr, " %d", *bottom);
619  YYFPRINTF (stderr, "\n");
620 }
621 
622 # define YY_STACK_PRINT(Bottom, Top) \
623 do { \
624  if (yydebug) \
625  yy_stack_print ((Bottom), (Top)); \
626 } while (0)
627 
628 
629 /*------------------------------------------------.
630 | Report that the YYRULE is going to be reduced. |
631 `------------------------------------------------*/
632 
633 #if defined (__STDC__) || defined (__cplusplus)
634 static void
635 yy_reduce_print (int yyrule)
636 #else
637 static void
638 yy_reduce_print (yyrule)
639  int yyrule;
640 #endif
641 {
642  int yyi;
643  unsigned int yylineno = yyrline[yyrule];
644  YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
645  yyrule - 1, yylineno);
646  /* Print the symbols being reduced, and their result. */
647  for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
648  YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
649  YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
650 }
651 
652 # define YY_REDUCE_PRINT(Rule) \
653 do { \
654  if (yydebug) \
655  yy_reduce_print (Rule); \
656 } while (0)
657 
658 /* Nonzero means print parse trace. It is left uninitialized so that
659  multiple parsers can coexist. */
660 int yydebug;
661 #else /* !YYDEBUG */
662 # define YYDPRINTF(Args)
663 # define YYDSYMPRINT(Args)
664 # define YYDSYMPRINTF(Title, Token, Value, Location)
665 # define YY_STACK_PRINT(Bottom, Top)
666 # define YY_REDUCE_PRINT(Rule)
667 #endif /* !YYDEBUG */
668 
669 
670 /* YYINITDEPTH -- initial size of the parser's stacks. */
671 #ifndef YYINITDEPTH
672 # define YYINITDEPTH 200
673 #endif
674 
675 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
676  if the built-in stack extension method is used).
677 
678  Do not make this value too large; the results are undefined if
679  SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
680  evaluated with infinite-precision integer arithmetic. */
681 
682 #if YYMAXDEPTH == 0
683 # undef YYMAXDEPTH
684 #endif
685 
686 #ifndef YYMAXDEPTH
687 # define YYMAXDEPTH 10000
688 #endif
689 
690 ␌
691 
692 #if YYERROR_VERBOSE
693 
694 # ifndef yystrlen
695 # if defined (__GLIBC__) && defined (_STRING_H)
696 # define yystrlen strlen
697 # else
698 /* Return the length of YYSTR. */
699 static YYSIZE_T
700 # if defined (__STDC__) || defined (__cplusplus)
701 yystrlen (const char *yystr)
702 # else
703 yystrlen (yystr)
704  const char *yystr;
705 # endif
706 {
707  const char *yys = yystr;
708 
709  while (*yys++ != '\0')
710  continue;
711 
712  return yys - yystr - 1;
713 }
714 # endif
715 # endif
716 
717 # ifndef yystpcpy
718 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
719 # define yystpcpy stpcpy
720 # else
721 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
722  YYDEST. */
723 static char *
724 # if defined (__STDC__) || defined (__cplusplus)
725 yystpcpy (char *yydest, const char *yysrc)
726 # else
727 yystpcpy (yydest, yysrc)
728  char *yydest;
729  const char *yysrc;
730 # endif
731 {
732  char *yyd = yydest;
733  const char *yys = yysrc;
734 
735  while ((*yyd++ = *yys++) != '\0')
736  continue;
737 
738  return yyd - 1;
739 }
740 # endif
741 # endif
742 
743 #endif /* !YYERROR_VERBOSE */
744 
745 ␌
746 
747 #if YYDEBUG
748 /*--------------------------------.
749 | Print this symbol on YYOUTPUT. |
750 `--------------------------------*/
751 
752 #if defined (__STDC__) || defined (__cplusplus)
753 static void
754 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
755 #else
756 static void
757 yysymprint (yyoutput, yytype, yyvaluep)
758  FILE *yyoutput;
759  int yytype;
760  YYSTYPE *yyvaluep;
761 #endif
762 {
763  /* Pacify ``unused variable'' warnings. */
764  (void) yyvaluep;
765 
766  if (yytype < YYNTOKENS)
767  {
768  YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
769 # ifdef YYPRINT
770  YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
771 # endif
772  }
773  else
774  YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
775 
776  switch (yytype)
777  {
778  default:
779  break;
780  }
781  YYFPRINTF (yyoutput, ")");
782 }
783 
784 #endif /* ! YYDEBUG */
785 /*-----------------------------------------------.
786 | Release the memory associated to this symbol. |
787 `-----------------------------------------------*/
788 
789 #if defined (__STDC__) || defined (__cplusplus)
790 static void
791 yydestruct (int yytype, YYSTYPE *yyvaluep)
792 #else
793 static void
794 yydestruct (yytype, yyvaluep)
795  int yytype;
796  YYSTYPE *yyvaluep;
797 #endif
798 {
799  /* Pacify ``unused variable'' warnings. */
800  (void) yyvaluep;
801 
802  switch (yytype)
803  {
804 
805  default:
806  break;
807  }
808 }
809 ␌
810 
811 /* Prevent warnings from -Wmissing-prototypes. */
812 
813 #ifdef YYPARSE_PARAM
814 # if defined (__STDC__) || defined (__cplusplus)
815 int yyparse (void *YYPARSE_PARAM);
816 # else
817 int yyparse ();
818 # endif
819 #else /* ! YYPARSE_PARAM */
820 #if defined (__STDC__) || defined (__cplusplus)
821 int yyparse (void);
822 #else
823 int yyparse ();
824 #endif
825 #endif /* ! YYPARSE_PARAM */
826 
827 
828 
829 /* The lookahead symbol. */
830 int yychar;
831 
832 /* The semantic value of the lookahead symbol. */
833 YYSTYPE yylval;
834 
835 /* Number of syntax errors so far. */
836 int yynerrs;
837 
838 
839 
840 /*----------.
841 | yyparse. |
842 `----------*/
843 
844 #ifdef YYPARSE_PARAM
845 # if defined (__STDC__) || defined (__cplusplus)
846 int yyparse (void *YYPARSE_PARAM)
847 # else
848 int yyparse (YYPARSE_PARAM)
849  void *YYPARSE_PARAM;
850 # endif
851 #else /* ! YYPARSE_PARAM */
852 #if defined (__STDC__) || defined (__cplusplus)
853 int
854 yyparse (void)
855 #else
856 int
857 yyparse ()
858 
859 #endif
860 #endif
861 {
862 
863  int yystate;
864  int yyn;
865  int yyresult;
866  /* Number of tokens to shift before error messages enabled. */
867  int yyerrstatus;
868  /* Lookahead token as an internal (translated) token number. */
869  int yytoken = 0;
870 
871  /* Three stacks and their tools:
872  `yyss': related to states,
873  `yyvs': related to semantic values,
874  `yyls': related to locations.
875 
876  Refer to the stacks thru separate pointers, to allow yyoverflow
877  to reallocate them elsewhere. */
878 
879  /* The state stack. */
880  short yyssa[YYINITDEPTH];
881  short *yyss = yyssa;
882  short *yyssp;
883 
884  /* The semantic value stack. */
885  YYSTYPE yyvsa[YYINITDEPTH];
886  YYSTYPE *yyvs = yyvsa;
887  YYSTYPE *yyvsp;
888 
889 
890 
891 #define YYPOPSTACK (yyvsp--, yyssp--)
892 
893  YYSIZE_T yystacksize = YYINITDEPTH;
894 
895  /* The variables used to return semantic value and location from the
896  action routines. */
897  YYSTYPE yyval;
898 
899 
900  /* When reducing, the number of symbols on the RHS of the reduced
901  rule. */
902  int yylen;
903 
904  YYDPRINTF ((stderr, "Starting parse\n"));
905 
906  yystate = 0;
907  yyerrstatus = 0;
908  yynerrs = 0;
909  yychar = YYEMPTY; /* Cause a token to be read. */
910 
911  /* Initialize stack pointers.
912  Waste one element of value and location stack
913  so that they stay on the same level as the state stack.
914  The wasted elements are never initialized. */
915 
916  yyssp = yyss;
917  yyvsp = yyvs;
918 
919  goto yysetstate;
920 
921 /*------------------------------------------------------------.
922 | yynewstate -- Push a new state, which is found in yystate. |
923 `------------------------------------------------------------*/
924  yynewstate:
925  /* In all cases, when you get here, the value and location stacks
926  have just been pushed. so pushing a state here evens the stacks.
927  */
928  yyssp++;
929 
930  yysetstate:
931  *yyssp = yystate;
932 
933  if (yyss + yystacksize - 1 <= yyssp)
934  {
935  /* Get the current used size of the three stacks, in elements. */
936  YYSIZE_T yysize = yyssp - yyss + 1;
937 
938 #ifdef yyoverflow
939  {
940  /* Give user a chance to reallocate the stack. Use copies of
941  these so that the &'s don't force the real ones into
942  memory. */
943  YYSTYPE *yyvs1 = yyvs;
944  short *yyss1 = yyss;
945 
946 
947  /* Each stack pointer address is followed by the size of the
948  data in use in that stack, in bytes. This used to be a
949  conditional around just the two extra args, but that might
950  be undefined if yyoverflow is a macro. */
951  yyoverflow ("parser stack overflow",
952  &yyss1, yysize * sizeof (*yyssp),
953  &yyvs1, yysize * sizeof (*yyvsp),
954 
955  &yystacksize);
956 
957  yyss = yyss1;
958  yyvs = yyvs1;
959  }
960 #else /* no yyoverflow */
961 # ifndef YYSTACK_RELOCATE
962  goto yyoverflowlab;
963 # else
964  /* Extend the stack our own way. */
965  if (YYMAXDEPTH <= yystacksize)
966  goto yyoverflowlab;
967  yystacksize *= 2;
968  if (YYMAXDEPTH < yystacksize)
969  yystacksize = YYMAXDEPTH;
970 
971  {
972  short *yyss1 = yyss;
973  union yyalloc *yyptr =
974  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
975  if (! yyptr)
976  goto yyoverflowlab;
977  YYSTACK_RELOCATE (yyss);
978  YYSTACK_RELOCATE (yyvs);
979 
980 # undef YYSTACK_RELOCATE
981  if (yyss1 != yyssa)
982  YYSTACK_FREE (yyss1);
983  }
984 # endif
985 #endif /* no yyoverflow */
986 
987  yyssp = yyss + yysize - 1;
988  yyvsp = yyvs + yysize - 1;
989 
990 
991  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
992  (unsigned long int) yystacksize));
993 
994  if (yyss + yystacksize - 1 <= yyssp)
995  YYABORT;
996  }
997 
998  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
999 
1000  goto yybackup;
1001 
1002 /*-----------.
1003 | yybackup. |
1004 `-----------*/
1005 yybackup:
1006 
1007 /* Do appropriate processing given the current state. */
1008 /* Read a lookahead token if we need one and don't already have one. */
1009 /* yyresume: */
1010 
1011  /* First try to decide what to do without reference to lookahead token. */
1012 
1013  yyn = yypact[yystate];
1014  if (yyn == YYPACT_NINF)
1015  goto yydefault;
1016 
1017  /* Not known => get a lookahead token if don't already have one. */
1018 
1019  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1020  if (yychar == YYEMPTY)
1021  {
1022  YYDPRINTF ((stderr, "Reading a token: "));
1023  yychar = YYLEX;
1024  }
1025 
1026  if (yychar <= YYEOF)
1027  {
1028  yychar = yytoken = YYEOF;
1029  YYDPRINTF ((stderr, "Now at end of input.\n"));
1030  }
1031  else
1032  {
1033  yytoken = YYTRANSLATE (yychar);
1034  YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
1035  }
1036 
1037  /* If the proper action on seeing token YYTOKEN is to reduce or to
1038  detect an error, take that action. */
1039  yyn += yytoken;
1040  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1041  goto yydefault;
1042  yyn = yytable[yyn];
1043  if (yyn <= 0)
1044  {
1045  if (yyn == 0 || yyn == YYTABLE_NINF)
1046  goto yyerrlab;
1047  yyn = -yyn;
1048  goto yyreduce;
1049  }
1050 
1051  if (yyn == YYFINAL)
1052  YYACCEPT;
1053 
1054  /* Shift the lookahead token. */
1055  YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
1056 
1057  /* Discard the token being shifted unless it is eof. */
1058  if (yychar != YYEOF)
1059  yychar = YYEMPTY;
1060 
1061  *++yyvsp = yylval;
1062 
1063 
1064  /* Count tokens shifted since error; after three, turn off error
1065  status. */
1066  if (yyerrstatus)
1067  yyerrstatus--;
1068 
1069  yystate = yyn;
1070  goto yynewstate;
1071 
1072 
1073 /*-----------------------------------------------------------.
1074 | yydefault -- do the default action for the current state. |
1075 `-----------------------------------------------------------*/
1076 yydefault:
1077  yyn = yydefact[yystate];
1078  if (yyn == 0)
1079  goto yyerrlab;
1080  goto yyreduce;
1081 
1082 
1083 /*-----------------------------.
1084 | yyreduce -- Do a reduction. |
1085 `-----------------------------*/
1086 yyreduce:
1087  /* yyn is the number of a rule to reduce with. */
1088  yylen = yyr2[yyn];
1089 
1090  /* If YYLEN is nonzero, implement the default value of the action:
1091  `$$ = $1'.
1092 
1093  Otherwise, the following line sets YYVAL to garbage.
1094  This behavior is undocumented and Bison
1095  users should not rely upon it. Assigning to YYVAL
1096  unconditionally makes the parser a bit smaller, and it avoids a
1097  GCC warning that YYVAL may be used uninitialized. */
1098  yyval = yyvsp[1-yylen];
1099 
1100 
1101  YY_REDUCE_PRINT (yyn);
1102  switch (yyn)
1103  {
1104  case 4:
1105 #line 58 "./ppdparser.y"
1106  { yyval = yyvsp[0]; ;}
1107  break;
1108 
1109  case 5:
1110 #line 59 "./ppdparser.y"
1111  { yyvsp[-1] += yyvsp[0]; yyval = yyvsp[-1]; ;}
1112  break;
1113 
1114  case 6:
1115 #line 60 "./ppdparser.y"
1116  { yyvsp[-1] += yyvsp[0]; yyval = yyvsp[-1]; ;}
1117  break;
1118 
1119  case 7:
1120 #line 63 "./ppdparser.y"
1121  { yyval = yyvsp[0]; ;}
1122  break;
1123 
1124  case 8:
1125 #line 64 "./ppdparser.y"
1126  { yyval = yyvsp[0][0].mid(1,yyvsp[0][0].length()-2); ;}
1127  break;
1128 
1129  case 9:
1130 #line 65 "./ppdparser.y"
1131  { yyval = yyvsp[-2][0].mid(1,yyvsp[-2][0].length()-2); ;}
1132  break;
1133 
1134  case 10:
1135 #line 66 "./ppdparser.y"
1136  { yyval = yyvsp[-2]; ;}
1137  break;
1138 
1139  case 11:
1140 #line 69 "./ppdparser.y"
1141  { builder->putPaperDimension(yyvsp[-2][0], yyvsp[0][0]); ;}
1142  break;
1143 
1144  case 12:
1145 #line 70 "./ppdparser.y"
1146  { builder->putPaperDimension(yyvsp[-4][0], yyvsp[0][0]); ;}
1147  break;
1148 
1149  case 13:
1150 #line 73 "./ppdparser.y"
1151  { builder->putImageableArea(yyvsp[-2][0], yyvsp[0][0]); ;}
1152  break;
1153 
1154  case 14:
1155 #line 74 "./ppdparser.y"
1156  { builder->putImageableArea(yyvsp[-4][0], yyvsp[0][0]); ;}
1157  break;
1158 
1159  case 15:
1160 #line 77 "./ppdparser.y"
1161  { builder->openUi(yyvsp[-2][0], TQString::null, yyvsp[0][0]); ;}
1162  break;
1163 
1164  case 16:
1165 #line 78 "./ppdparser.y"
1166  { builder->openUi(yyvsp[-4][0], yyvsp[-2][0], yyvsp[0][0]); ;}
1167  break;
1168 
1169  case 17:
1170 #line 81 "./ppdparser.y"
1171  { builder->endUi(yyvsp[0][0]); ;}
1172  break;
1173 
1174  case 18:
1175 #line 82 "./ppdparser.y"
1176  { builder->endUi(yyvsp[0][0]); ;}
1177  break;
1178 
1179  case 19:
1180 #line 85 "./ppdparser.y"
1181  { builder->openGroup(yyvsp[0].join(" "), TQString::null); ;}
1182  break;
1183 
1184  case 20:
1185 #line 86 "./ppdparser.y"
1186  { builder->openGroup(yyvsp[-2].join(" "), yyvsp[0][0]); ;}
1187  break;
1188 
1189  case 21:
1190 #line 89 "./ppdparser.y"
1191  { builder->endGroup(yyvsp[0].join(" ")); ;}
1192  break;
1193 
1194  case 22:
1195 #line 90 "./ppdparser.y"
1196  { builder->endGroup(yyvsp[-2].join(" ")); ;}
1197  break;
1198 
1199  case 23:
1200 #line 93 "./ppdparser.y"
1201  { builder->putConstraint(yyvsp[-3][0], yyvsp[-1][0], yyvsp[-2][0], yyvsp[0][0]); ;}
1202  break;
1203 
1204  case 24:
1205 #line 94 "./ppdparser.y"
1206  { builder->putConstraint(yyvsp[-2][0], yyvsp[0][0], yyvsp[-1][0], TQString::null); ;}
1207  break;
1208 
1209  case 25:
1210 #line 95 "./ppdparser.y"
1211  { builder->putConstraint(yyvsp[-2][0], yyvsp[-1][0], TQString::null, yyvsp[0][0]); ;}
1212  break;
1213 
1214  case 26:
1215 #line 96 "./ppdparser.y"
1216  { builder->putConstraint(yyvsp[-1][0], yyvsp[0][0], TQString::null, TQString::null); ;}
1217  break;
1218 
1219  case 27:
1220 #line 99 "./ppdparser.y"
1221  { builder->putStatement2(yyvsp[-2][0], yyvsp[0][0]); ;}
1222  break;
1223 
1224  case 28:
1225 #line 100 "./ppdparser.y"
1226  { builder->putStatement(yyvsp[-3][0], yyvsp[-2][0], TQString::null, yyvsp[0]); ;}
1227  break;
1228 
1229  case 29:
1230 #line 101 "./ppdparser.y"
1231  { builder->putStatement(yyvsp[-5][0], yyvsp[-4][0], yyvsp[-2][0], yyvsp[0]); ;}
1232  break;
1233 
1234  case 30:
1235 #line 102 "./ppdparser.y"
1236  { builder->putStatement(yyvsp[-4][0], yyvsp[-3][0], TQString::null, yyvsp[-1]); ;}
1237  break;
1238 
1239  case 31:
1240 #line 103 "./ppdparser.y"
1241  { builder->putDefault(yyvsp[-2][0], yyvsp[0][0]); ;}
1242  break;
1243 
1244  case 32:
1245 #line 104 "./ppdparser.y"
1246  { builder->putDefault(yyvsp[-4][0], yyvsp[-2][0]); ;}
1247  break;
1248 
1249  case 41:
1250 #line 113 "./ppdparser.y"
1251  { builder->putFooData(yyvsp[0][0]); ;}
1252  break;
1253 
1254 
1255  }
1256 
1257 /* Line 999 of yacc.c. */
1258 #line 1258 "./ppdparser.cpp"
1259 ␌
1260  yyvsp -= yylen;
1261  yyssp -= yylen;
1262 
1263 
1264  YY_STACK_PRINT (yyss, yyssp);
1265 
1266  *++yyvsp = yyval;
1267 
1268 
1269  /* Now `shift' the result of the reduction. Determine what state
1270  that goes to, based on the state we popped back to and the rule
1271  number reduced by. */
1272 
1273  yyn = yyr1[yyn];
1274 
1275  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1276  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1277  yystate = yytable[yystate];
1278  else
1279  yystate = yydefgoto[yyn - YYNTOKENS];
1280 
1281  goto yynewstate;
1282 
1283 
1284 /*------------------------------------.
1285 | yyerrlab -- here on detecting error |
1286 `------------------------------------*/
1287 yyerrlab:
1288  /* If not already recovering from an error, report this error. */
1289  if (!yyerrstatus)
1290  {
1291  ++yynerrs;
1292 #if YYERROR_VERBOSE
1293  yyn = yypact[yystate];
1294 
1295  if (YYPACT_NINF < yyn && yyn < YYLAST)
1296  {
1297  YYSIZE_T yysize = 0;
1298  int yytype = YYTRANSLATE (yychar);
1299  char *yymsg;
1300  int yyx, yycount;
1301 
1302  yycount = 0;
1303  /* Start YYX at -YYN if negative to avoid negative indexes in
1304  YYCHECK. */
1305  for (yyx = yyn < 0 ? -yyn : 0;
1306  yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
1307  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1308  yysize += yystrlen (yytname[yyx]) + 15, yycount++;
1309  yysize += yystrlen ("syntax error, unexpected ") + 1;
1310  yysize += yystrlen (yytname[yytype]);
1311  yymsg = (char *) YYSTACK_ALLOC (yysize);
1312  if (yymsg != 0)
1313  {
1314  char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
1315  yyp = yystpcpy (yyp, yytname[yytype]);
1316 
1317  if (yycount < 5)
1318  {
1319  yycount = 0;
1320  for (yyx = yyn < 0 ? -yyn : 0;
1321  yyx < (int) (sizeof (yytname) / sizeof (char *));
1322  yyx++)
1323  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1324  {
1325  const char *yyq = ! yycount ? ", expecting " : " or ";
1326  yyp = yystpcpy (yyp, yyq);
1327  yyp = yystpcpy (yyp, yytname[yyx]);
1328  yycount++;
1329  }
1330  }
1331  yyerror (yymsg);
1332  YYSTACK_FREE (yymsg);
1333  }
1334  else
1335  yyerror ("syntax error; also virtual memory exhausted");
1336  }
1337  else
1338 #endif /* YYERROR_VERBOSE */
1339  yyerror ("syntax error");
1340  }
1341 
1342 
1343 
1344  if (yyerrstatus == 3)
1345  {
1346  /* If just tried and failed to reuse lookahead token after an
1347  error, discard it. */
1348 
1349  /* Return failure if at end of input. */
1350  if (yychar == YYEOF)
1351  {
1352  /* Pop the error token. */
1353  YYPOPSTACK;
1354  /* Pop the rest of the stack. */
1355  while (yyss < yyssp)
1356  {
1357  YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
1358  yydestruct (yystos[*yyssp], yyvsp);
1359  YYPOPSTACK;
1360  }
1361  YYABORT;
1362  }
1363 
1364  YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
1365  yydestruct (yytoken, &yylval);
1366  yychar = YYEMPTY;
1367 
1368  }
1369 
1370  /* Else will try to reuse lookahead token after shifting the error
1371  token. */
1372  goto yyerrlab1;
1373 
1374 
1375 /*----------------------------------------------------.
1376 | yyerrlab1 -- error raised explicitly by an action. |
1377 `----------------------------------------------------*/
1378 yyerrlab1:
1379  yyerrstatus = 3; /* Each real token shifted decrements this. */
1380 
1381  for (;;)
1382  {
1383  yyn = yypact[yystate];
1384  if (yyn != YYPACT_NINF)
1385  {
1386  yyn += YYTERROR;
1387  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1388  {
1389  yyn = yytable[yyn];
1390  if (0 < yyn)
1391  break;
1392  }
1393  }
1394 
1395  /* Pop the current state because it cannot handle the error token. */
1396  if (yyssp == yyss)
1397  YYABORT;
1398 
1399  YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
1400  yydestruct (yystos[yystate], yyvsp);
1401  yyvsp--;
1402  yystate = *--yyssp;
1403 
1404  YY_STACK_PRINT (yyss, yyssp);
1405  }
1406 
1407  if (yyn == YYFINAL)
1408  YYACCEPT;
1409 
1410  YYDPRINTF ((stderr, "Shifting error token, "));
1411 
1412  *++yyvsp = yylval;
1413 
1414 
1415  yystate = yyn;
1416  goto yynewstate;
1417 
1418 
1419 /*-------------------------------------.
1420 | yyacceptlab -- YYACCEPT comes here. |
1421 `-------------------------------------*/
1422 yyacceptlab:
1423  yyresult = 0;
1424  goto yyreturn;
1425 
1426 /*-----------------------------------.
1427 | yyabortlab -- YYABORT comes here. |
1428 `-----------------------------------*/
1429 yyabortlab:
1430  yyresult = 1;
1431  goto yyreturn;
1432 
1433 #ifndef yyoverflow
1434 /*----------------------------------------------.
1435 | yyoverflowlab -- parser overflow comes here. |
1436 `----------------------------------------------*/
1437 yyoverflowlab:
1438  yyerror ("parser stack overflow");
1439  yyresult = 2;
1440  /* Fall through. */
1441 #endif
1442 
1443 yyreturn:
1444 #ifndef yyoverflow
1445  if (yyss != yyssa)
1446  YYSTACK_FREE (yyss);
1447 #endif
1448  return yyresult;
1449 }
1450 
1451 
1452 #line 116 "./ppdparser.y"
1453 
1454 
1455 #undef builder
1456 

kdeprint

Skip menu "kdeprint"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kdeprint

Skip menu "kdeprint"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdeprint by doxygen 1.9.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |