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

tdeprint

  • tdeprint
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 tdeprint_ppdparse
51#define yylex tdeprint_ppdlex
52#define yyerror tdeprint_ppderror
53#define yylval tdeprint_ppdlval
54#define yychar tdeprint_ppdchar
55#define yydebug tdeprint_ppddebug
56#define yynerrs tdeprint_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 <tdeprint@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
134int tdeprint_ppdlex();
135#define tdeprint_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)
152typedef 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. */
203union 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. */
282static 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. */
317static 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. */
327static 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. */
349static 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. */
362static 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. */
376static 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. */
384static 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. */
394static 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. */
406static 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]. */
420static 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
429static 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]. */
443static 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
454static 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
468static 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. */
484static 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) \
532do \
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 } \
546while (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) \
579do { \
580 if (yydebug) \
581 { \
582 YYFPRINTF Args; \
583 } \
584} while (0)
585
586# define YYDSYMPRINT(Args) \
587do { \
588 if (yydebug) \
589 { \
590 yysymprint Args; \
591 } \
592} while (0)
593
594# define YYDSYMPRINTF(Title, Token, Value, Location) \
595do { \
596 if (yydebug) \
597 { \
598 YYFPRINTF (stderr, "%s ", Title); \
599 yysymprint (stderr, \
600 Token, Value); \
601 YYFPRINTF (stderr, "\n"); \
602 } \
603} while (0)
604
605/*------------------------------------------------------------------.
606| yy_stack_print -- Print the state stack from its BOTTOM up to its |
607| TOP (cinluded). |
608`------------------------------------------------------------------*/
609
610#if defined (__STDC__) || defined (__cplusplus)
611static void
612yy_stack_print (short *bottom, short *top)
613#else
614static void
615yy_stack_print (bottom, top)
616 short *bottom;
617 short *top;
618#endif
619{
620 YYFPRINTF (stderr, "Stack now");
621 for (/* Nothing. */; bottom <= top; ++bottom)
622 YYFPRINTF (stderr, " %d", *bottom);
623 YYFPRINTF (stderr, "\n");
624}
625
626# define YY_STACK_PRINT(Bottom, Top) \
627do { \
628 if (yydebug) \
629 yy_stack_print ((Bottom), (Top)); \
630} while (0)
631
632
633/*------------------------------------------------.
634| Report that the YYRULE is going to be reduced. |
635`------------------------------------------------*/
636
637#if defined (__STDC__) || defined (__cplusplus)
638static void
639yy_reduce_print (int yyrule)
640#else
641static void
642yy_reduce_print (yyrule)
643 int yyrule;
644#endif
645{
646 int yyi;
647 unsigned int yylineno = yyrline[yyrule];
648 YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
649 yyrule - 1, yylineno);
650 /* Print the symbols being reduced, and their result. */
651 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
652 YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
653 YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
654}
655
656# define YY_REDUCE_PRINT(Rule) \
657do { \
658 if (yydebug) \
659 yy_reduce_print (Rule); \
660} while (0)
661
662/* Nonzero means print parse trace. It is left uninitialized so that
663 multiple parsers can coexist. */
664int yydebug;
665#else /* !YYDEBUG */
666# define YYDPRINTF(Args)
667# define YYDSYMPRINT(Args)
668# define YYDSYMPRINTF(Title, Token, Value, Location)
669# define YY_STACK_PRINT(Bottom, Top)
670# define YY_REDUCE_PRINT(Rule)
671#endif /* !YYDEBUG */
672
673
674/* YYINITDEPTH -- initial size of the parser's stacks. */
675#ifndef YYINITDEPTH
676# define YYINITDEPTH 200
677#endif
678
679/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
680 if the built-in stack extension method is used).
681
682 Do not make this value too large; the results are undefined if
683 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
684 evaluated with infinite-precision integer arithmetic. */
685
686#if YYMAXDEPTH == 0
687# undef YYMAXDEPTH
688#endif
689
690#ifndef YYMAXDEPTH
691# define YYMAXDEPTH 10000
692#endif
693
694␌
695
696#if YYERROR_VERBOSE
697
698# ifndef yystrlen
699# if defined (__GLIBC__) && defined (_STRING_H)
700# define yystrlen strlen
701# else
702/* Return the length of YYSTR. */
703static YYSIZE_T
704# if defined (__STDC__) || defined (__cplusplus)
705yystrlen (const char *yystr)
706# else
707yystrlen (yystr)
708 const char *yystr;
709# endif
710{
711 const char *yys = yystr;
712
713 while (*yys++ != '\0')
714 continue;
715
716 return yys - yystr - 1;
717}
718# endif
719# endif
720
721# ifndef yystpcpy
722# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
723# define yystpcpy stpcpy
724# else
725/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
726 YYDEST. */
727static char *
728# if defined (__STDC__) || defined (__cplusplus)
729yystpcpy (char *yydest, const char *yysrc)
730# else
731yystpcpy (yydest, yysrc)
732 char *yydest;
733 const char *yysrc;
734# endif
735{
736 char *yyd = yydest;
737 const char *yys = yysrc;
738
739 while ((*yyd++ = *yys++) != '\0')
740 continue;
741
742 return yyd - 1;
743}
744# endif
745# endif
746
747#endif /* !YYERROR_VERBOSE */
748
749␌
750
751#if YYDEBUG
752/*--------------------------------.
753| Print this symbol on YYOUTPUT. |
754`--------------------------------*/
755
756#if defined (__STDC__) || defined (__cplusplus)
757static void
758yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
759#else
760static void
761yysymprint (yyoutput, yytype, yyvaluep)
762 FILE *yyoutput;
763 int yytype;
764 YYSTYPE *yyvaluep;
765#endif
766{
767 /* Pacify ``unused variable'' warnings. */
768 (void) yyvaluep;
769
770 if (yytype < YYNTOKENS)
771 {
772 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
773# ifdef YYPRINT
774 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
775# endif
776 }
777 else
778 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
779
780 switch (yytype)
781 {
782 default:
783 break;
784 }
785 YYFPRINTF (yyoutput, ")");
786}
787
788#endif /* ! YYDEBUG */
789/*-----------------------------------------------.
790| Release the memory associated to this symbol. |
791`-----------------------------------------------*/
792
793#if defined (__STDC__) || defined (__cplusplus)
794static void
795yydestruct (int yytype, YYSTYPE *yyvaluep)
796#else
797static void
798yydestruct (yytype, yyvaluep)
799 int yytype;
800 YYSTYPE *yyvaluep;
801#endif
802{
803 /* Pacify ``unused variable'' warnings. */
804 (void) yyvaluep;
805
806 switch (yytype)
807 {
808
809 default:
810 break;
811 }
812}
813␌
814
815/* Prevent warnings from -Wmissing-prototypes. */
816
817#ifdef YYPARSE_PARAM
818# if defined (__STDC__) || defined (__cplusplus)
819int yyparse (void *YYPARSE_PARAM);
820# else
821int yyparse ();
822# endif
823#else /* ! YYPARSE_PARAM */
824#if defined (__STDC__) || defined (__cplusplus)
825int yyparse (void);
826#else
827int yyparse ();
828#endif
829#endif /* ! YYPARSE_PARAM */
830
831
832
833/* The lookahead symbol. */
834int yychar;
835
836/* The semantic value of the lookahead symbol. */
837YYSTYPE yylval;
838
839/* Number of syntax errors so far. */
840int yynerrs;
841
842
843
844/*----------.
845| yyparse. |
846`----------*/
847
848#ifdef YYPARSE_PARAM
849# if defined (__STDC__) || defined (__cplusplus)
850int yyparse (void *YYPARSE_PARAM)
851# else
852int yyparse (YYPARSE_PARAM)
853 void *YYPARSE_PARAM;
854# endif
855#else /* ! YYPARSE_PARAM */
856#if defined (__STDC__) || defined (__cplusplus)
857int
858yyparse (void)
859#else
860int
861yyparse ()
862
863#endif
864#endif
865{
866
867 int yystate;
868 int yyn;
869 int yyresult;
870 /* Number of tokens to shift before error messages enabled. */
871 int yyerrstatus;
872 /* Lookahead token as an internal (translated) token number. */
873 int yytoken = 0;
874
875 /* Three stacks and their tools:
876 `yyss': related to states,
877 `yyvs': related to semantic values,
878 `yyls': related to locations.
879
880 Refer to the stacks thru separate pointers, to allow yyoverflow
881 to reallocate them elsewhere. */
882
883 /* The state stack. */
884 short yyssa[YYINITDEPTH];
885 short *yyss = yyssa;
886 short *yyssp;
887
888 /* The semantic value stack. */
889 YYSTYPE yyvsa[YYINITDEPTH];
890 YYSTYPE *yyvs = yyvsa;
891 YYSTYPE *yyvsp;
892
893
894
895#define YYPOPSTACK (yyvsp--, yyssp--)
896
897 YYSIZE_T yystacksize = YYINITDEPTH;
898
899 /* The variables used to return semantic value and location from the
900 action routines. */
901 YYSTYPE yyval;
902
903
904 /* When reducing, the number of symbols on the RHS of the reduced
905 rule. */
906 int yylen;
907
908 YYDPRINTF ((stderr, "Starting parse\n"));
909
910 yystate = 0;
911 yyerrstatus = 0;
912 yynerrs = 0;
913 yychar = YYEMPTY; /* Cause a token to be read. */
914
915 /* Initialize stack pointers.
916 Waste one element of value and location stack
917 so that they stay on the same level as the state stack.
918 The wasted elements are never initialized. */
919
920 yyssp = yyss;
921 yyvsp = yyvs;
922
923 goto yysetstate;
924
925/*------------------------------------------------------------.
926| yynewstate -- Push a new state, which is found in yystate. |
927`------------------------------------------------------------*/
928 yynewstate:
929 /* In all cases, when you get here, the value and location stacks
930 have just been pushed. so pushing a state here evens the stacks.
931 */
932 yyssp++;
933
934 yysetstate:
935 *yyssp = yystate;
936
937 if (yyss + yystacksize - 1 <= yyssp)
938 {
939 /* Get the current used size of the three stacks, in elements. */
940 YYSIZE_T yysize = yyssp - yyss + 1;
941
942#ifdef yyoverflow
943 {
944 /* Give user a chance to reallocate the stack. Use copies of
945 these so that the &'s don't force the real ones into
946 memory. */
947 YYSTYPE *yyvs1 = yyvs;
948 short *yyss1 = yyss;
949
950
951 /* Each stack pointer address is followed by the size of the
952 data in use in that stack, in bytes. This used to be a
953 conditional around just the two extra args, but that might
954 be undefined if yyoverflow is a macro. */
955 yyoverflow ("parser stack overflow",
956 &yyss1, yysize * sizeof (*yyssp),
957 &yyvs1, yysize * sizeof (*yyvsp),
958
959 &yystacksize);
960
961 yyss = yyss1;
962 yyvs = yyvs1;
963 }
964#else /* no yyoverflow */
965# ifndef YYSTACK_RELOCATE
966 goto yyoverflowlab;
967# else
968 /* Extend the stack our own way. */
969 if (YYMAXDEPTH <= yystacksize)
970 goto yyoverflowlab;
971 yystacksize *= 2;
972 if (YYMAXDEPTH < yystacksize)
973 yystacksize = YYMAXDEPTH;
974
975 {
976 short *yyss1 = yyss;
977 union yyalloc *yyptr =
978 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
979 if (! yyptr)
980 goto yyoverflowlab;
981 YYSTACK_RELOCATE (yyss);
982 YYSTACK_RELOCATE (yyvs);
983
984# undef YYSTACK_RELOCATE
985 if (yyss1 != yyssa)
986 YYSTACK_FREE (yyss1);
987 }
988# endif
989#endif /* no yyoverflow */
990
991 yyssp = yyss + yysize - 1;
992 yyvsp = yyvs + yysize - 1;
993
994
995 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
996 (unsigned long int) yystacksize));
997
998 if (yyss + yystacksize - 1 <= yyssp)
999 YYABORT;
1000 }
1001
1002 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1003
1004 goto yybackup;
1005
1006/*-----------.
1007| yybackup. |
1008`-----------*/
1009yybackup:
1010
1011/* Do appropriate processing given the current state. */
1012/* Read a lookahead token if we need one and don't already have one. */
1013/* yyresume: */
1014
1015 /* First try to decide what to do without reference to lookahead token. */
1016
1017 yyn = yypact[yystate];
1018 if (yyn == YYPACT_NINF)
1019 goto yydefault;
1020
1021 /* Not known => get a lookahead token if don't already have one. */
1022
1023 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1024 if (yychar == YYEMPTY)
1025 {
1026 YYDPRINTF ((stderr, "Reading a token: "));
1027 yychar = YYLEX;
1028 }
1029
1030 if (yychar <= YYEOF)
1031 {
1032 yychar = yytoken = YYEOF;
1033 YYDPRINTF ((stderr, "Now at end of input.\n"));
1034 }
1035 else
1036 {
1037 yytoken = YYTRANSLATE (yychar);
1038 YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
1039 }
1040
1041 /* If the proper action on seeing token YYTOKEN is to reduce or to
1042 detect an error, take that action. */
1043 yyn += yytoken;
1044 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1045 goto yydefault;
1046 yyn = yytable[yyn];
1047 if (yyn <= 0)
1048 {
1049 if (yyn == 0 || yyn == YYTABLE_NINF)
1050 goto yyerrlab;
1051 yyn = -yyn;
1052 goto yyreduce;
1053 }
1054
1055 if (yyn == YYFINAL)
1056 YYACCEPT;
1057
1058 /* Shift the lookahead token. */
1059 YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
1060
1061 /* Discard the token being shifted unless it is eof. */
1062 if (yychar != YYEOF)
1063 yychar = YYEMPTY;
1064
1065 *++yyvsp = yylval;
1066
1067
1068 /* Count tokens shifted since error; after three, turn off error
1069 status. */
1070 if (yyerrstatus)
1071 yyerrstatus--;
1072
1073 yystate = yyn;
1074 goto yynewstate;
1075
1076
1077/*-----------------------------------------------------------.
1078| yydefault -- do the default action for the current state. |
1079`-----------------------------------------------------------*/
1080yydefault:
1081 yyn = yydefact[yystate];
1082 if (yyn == 0)
1083 goto yyerrlab;
1084 goto yyreduce;
1085
1086
1087/*-----------------------------.
1088| yyreduce -- Do a reduction. |
1089`-----------------------------*/
1090yyreduce:
1091 /* yyn is the number of a rule to reduce with. */
1092 yylen = yyr2[yyn];
1093
1094 /* If YYLEN is nonzero, implement the default value of the action:
1095 `$$ = $1'.
1096
1097 Otherwise, the following line sets YYVAL to garbage.
1098 This behavior is undocumented and Bison
1099 users should not rely upon it. Assigning to YYVAL
1100 unconditionally makes the parser a bit smaller, and it avoids a
1101 GCC warning that YYVAL may be used uninitialized. */
1102 yyval = yyvsp[1-yylen];
1103
1104
1105 YY_REDUCE_PRINT (yyn);
1106 switch (yyn)
1107 {
1108 case 4:
1109#line 58 "./ppdparser.y"
1110 { yyval = yyvsp[0]; ;}
1111 break;
1112
1113 case 5:
1114#line 59 "./ppdparser.y"
1115 { yyvsp[-1] += yyvsp[0]; yyval = yyvsp[-1]; ;}
1116 break;
1117
1118 case 6:
1119#line 60 "./ppdparser.y"
1120 { yyvsp[-1] += yyvsp[0]; yyval = yyvsp[-1]; ;}
1121 break;
1122
1123 case 7:
1124#line 63 "./ppdparser.y"
1125 { yyval = yyvsp[0]; ;}
1126 break;
1127
1128 case 8:
1129#line 64 "./ppdparser.y"
1130 { yyval = yyvsp[0][0].mid(1,yyvsp[0][0].length()-2); ;}
1131 break;
1132
1133 case 9:
1134#line 65 "./ppdparser.y"
1135 { yyval = yyvsp[-2][0].mid(1,yyvsp[-2][0].length()-2); ;}
1136 break;
1137
1138 case 10:
1139#line 66 "./ppdparser.y"
1140 { yyval = yyvsp[-2]; ;}
1141 break;
1142
1143 case 11:
1144#line 69 "./ppdparser.y"
1145 { builder->putPaperDimension(yyvsp[-2][0], yyvsp[0][0]); ;}
1146 break;
1147
1148 case 12:
1149#line 70 "./ppdparser.y"
1150 { builder->putPaperDimension(yyvsp[-4][0], yyvsp[0][0]); ;}
1151 break;
1152
1153 case 13:
1154#line 73 "./ppdparser.y"
1155 { builder->putImageableArea(yyvsp[-2][0], yyvsp[0][0]); ;}
1156 break;
1157
1158 case 14:
1159#line 74 "./ppdparser.y"
1160 { builder->putImageableArea(yyvsp[-4][0], yyvsp[0][0]); ;}
1161 break;
1162
1163 case 15:
1164#line 77 "./ppdparser.y"
1165 { builder->openUi(yyvsp[-2][0], TQString::null, yyvsp[0][0]); ;}
1166 break;
1167
1168 case 16:
1169#line 78 "./ppdparser.y"
1170 { builder->openUi(yyvsp[-4][0], yyvsp[-2][0], yyvsp[0][0]); ;}
1171 break;
1172
1173 case 17:
1174#line 81 "./ppdparser.y"
1175 { builder->endUi(yyvsp[0][0]); ;}
1176 break;
1177
1178 case 18:
1179#line 82 "./ppdparser.y"
1180 { builder->endUi(yyvsp[0][0]); ;}
1181 break;
1182
1183 case 19:
1184#line 85 "./ppdparser.y"
1185 { builder->openGroup(yyvsp[0].join(" "), TQString::null); ;}
1186 break;
1187
1188 case 20:
1189#line 86 "./ppdparser.y"
1190 { builder->openGroup(yyvsp[-2].join(" "), yyvsp[0][0]); ;}
1191 break;
1192
1193 case 21:
1194#line 89 "./ppdparser.y"
1195 { builder->endGroup(yyvsp[0].join(" ")); ;}
1196 break;
1197
1198 case 22:
1199#line 90 "./ppdparser.y"
1200 { builder->endGroup(yyvsp[-2].join(" ")); ;}
1201 break;
1202
1203 case 23:
1204#line 93 "./ppdparser.y"
1205 { builder->putConstraint(yyvsp[-3][0], yyvsp[-1][0], yyvsp[-2][0], yyvsp[0][0]); ;}
1206 break;
1207
1208 case 24:
1209#line 94 "./ppdparser.y"
1210 { builder->putConstraint(yyvsp[-2][0], yyvsp[0][0], yyvsp[-1][0], TQString::null); ;}
1211 break;
1212
1213 case 25:
1214#line 95 "./ppdparser.y"
1215 { builder->putConstraint(yyvsp[-2][0], yyvsp[-1][0], TQString::null, yyvsp[0][0]); ;}
1216 break;
1217
1218 case 26:
1219#line 96 "./ppdparser.y"
1220 { builder->putConstraint(yyvsp[-1][0], yyvsp[0][0], TQString::null, TQString::null); ;}
1221 break;
1222
1223 case 27:
1224#line 99 "./ppdparser.y"
1225 { builder->putStatement2(yyvsp[-2][0], yyvsp[0][0]); ;}
1226 break;
1227
1228 case 28:
1229#line 100 "./ppdparser.y"
1230 { builder->putStatement(yyvsp[-3][0], yyvsp[-2][0], TQString::null, yyvsp[0]); ;}
1231 break;
1232
1233 case 29:
1234#line 101 "./ppdparser.y"
1235 { builder->putStatement(yyvsp[-5][0], yyvsp[-4][0], yyvsp[-2][0], yyvsp[0]); ;}
1236 break;
1237
1238 case 30:
1239#line 102 "./ppdparser.y"
1240 { builder->putStatement(yyvsp[-4][0], yyvsp[-3][0], TQString::null, yyvsp[-1]); ;}
1241 break;
1242
1243 case 31:
1244#line 103 "./ppdparser.y"
1245 { builder->putDefault(yyvsp[-2][0], yyvsp[0][0]); ;}
1246 break;
1247
1248 case 32:
1249#line 104 "./ppdparser.y"
1250 { builder->putDefault(yyvsp[-4][0], yyvsp[-2][0]); ;}
1251 break;
1252
1253 case 41:
1254#line 113 "./ppdparser.y"
1255 { builder->putFooData(yyvsp[0][0]); ;}
1256 break;
1257
1258
1259 }
1260
1261/* Line 999 of yacc.c. */
1262#line 1258 "./ppdparser.cpp"
1263␌
1264 yyvsp -= yylen;
1265 yyssp -= yylen;
1266
1267
1268 YY_STACK_PRINT (yyss, yyssp);
1269
1270 *++yyvsp = yyval;
1271
1272
1273 /* Now `shift' the result of the reduction. Determine what state
1274 that goes to, based on the state we popped back to and the rule
1275 number reduced by. */
1276
1277 yyn = yyr1[yyn];
1278
1279 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1280 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1281 yystate = yytable[yystate];
1282 else
1283 yystate = yydefgoto[yyn - YYNTOKENS];
1284
1285 goto yynewstate;
1286
1287
1288/*------------------------------------.
1289| yyerrlab -- here on detecting error |
1290`------------------------------------*/
1291yyerrlab:
1292 /* If not already recovering from an error, report this error. */
1293 if (!yyerrstatus)
1294 {
1295 ++yynerrs;
1296#if YYERROR_VERBOSE
1297 yyn = yypact[yystate];
1298
1299 if (YYPACT_NINF < yyn && yyn < YYLAST)
1300 {
1301 YYSIZE_T yysize = 0;
1302 int yytype = YYTRANSLATE (yychar);
1303 char *yymsg;
1304 int yyx, yycount;
1305
1306 yycount = 0;
1307 /* Start YYX at -YYN if negative to avoid negative indexes in
1308 YYCHECK. */
1309 for (yyx = yyn < 0 ? -yyn : 0;
1310 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
1311 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1312 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
1313 yysize += yystrlen ("syntax error, unexpected ") + 1;
1314 yysize += yystrlen (yytname[yytype]);
1315 yymsg = (char *) YYSTACK_ALLOC (yysize);
1316 if (yymsg != 0)
1317 {
1318 char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
1319 yyp = yystpcpy (yyp, yytname[yytype]);
1320
1321 if (yycount < 5)
1322 {
1323 yycount = 0;
1324 for (yyx = yyn < 0 ? -yyn : 0;
1325 yyx < (int) (sizeof (yytname) / sizeof (char *));
1326 yyx++)
1327 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1328 {
1329 const char *yyq = ! yycount ? ", expecting " : " or ";
1330 yyp = yystpcpy (yyp, yyq);
1331 yyp = yystpcpy (yyp, yytname[yyx]);
1332 yycount++;
1333 }
1334 }
1335 yyerror (yymsg);
1336 YYSTACK_FREE (yymsg);
1337 }
1338 else
1339 yyerror ("syntax error; also virtual memory exhausted");
1340 }
1341 else
1342#endif /* YYERROR_VERBOSE */
1343 yyerror ("syntax error");
1344 }
1345
1346
1347
1348 if (yyerrstatus == 3)
1349 {
1350 /* If just tried and failed to reuse lookahead token after an
1351 error, discard it. */
1352
1353 /* Return failure if at end of input. */
1354 if (yychar == YYEOF)
1355 {
1356 /* Pop the error token. */
1357 YYPOPSTACK;
1358 /* Pop the rest of the stack. */
1359 while (yyss < yyssp)
1360 {
1361 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
1362 yydestruct (yystos[*yyssp], yyvsp);
1363 YYPOPSTACK;
1364 }
1365 YYABORT;
1366 }
1367
1368 YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
1369 yydestruct (yytoken, &yylval);
1370 yychar = YYEMPTY;
1371
1372 }
1373
1374 /* Else will try to reuse lookahead token after shifting the error
1375 token. */
1376 goto yyerrlab1;
1377
1378
1379/*----------------------------------------------------.
1380| yyerrlab1 -- error raised explicitly by an action. |
1381`----------------------------------------------------*/
1382yyerrlab1:
1383 yyerrstatus = 3; /* Each real token shifted decrements this. */
1384
1385 for (;;)
1386 {
1387 yyn = yypact[yystate];
1388 if (yyn != YYPACT_NINF)
1389 {
1390 yyn += YYTERROR;
1391 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1392 {
1393 yyn = yytable[yyn];
1394 if (0 < yyn)
1395 break;
1396 }
1397 }
1398
1399 /* Pop the current state because it cannot handle the error token. */
1400 if (yyssp == yyss)
1401 YYABORT;
1402
1403 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
1404 yydestruct (yystos[yystate], yyvsp);
1405 yyvsp--;
1406 yystate = *--yyssp;
1407
1408 YY_STACK_PRINT (yyss, yyssp);
1409 }
1410
1411 if (yyn == YYFINAL)
1412 YYACCEPT;
1413
1414 YYDPRINTF ((stderr, "Shifting error token, "));
1415
1416 *++yyvsp = yylval;
1417
1418
1419 yystate = yyn;
1420 goto yynewstate;
1421
1422
1423/*-------------------------------------.
1424| yyacceptlab -- YYACCEPT comes here. |
1425`-------------------------------------*/
1426yyacceptlab:
1427 yyresult = 0;
1428 goto yyreturn;
1429
1430/*-----------------------------------.
1431| yyabortlab -- YYABORT comes here. |
1432`-----------------------------------*/
1433yyabortlab:
1434 yyresult = 1;
1435 goto yyreturn;
1436
1437#ifndef yyoverflow
1438/*----------------------------------------------.
1439| yyoverflowlab -- parser overflow comes here. |
1440`----------------------------------------------*/
1441yyoverflowlab:
1442 yyerror ("parser stack overflow");
1443 yyresult = 2;
1444 /* Fall through. */
1445#endif
1446
1447yyreturn:
1448#ifndef yyoverflow
1449 if (yyss != yyssa)
1450 YYSTACK_FREE (yyss);
1451#endif
1452 return yyresult;
1453}
1454
1455
1456#line 116 "./ppdparser.y"
1457
1458
1459#undef builder
1460

tdeprint

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

tdeprint

Skip menu "tdeprint"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeprint by doxygen 1.9.4
This website is maintained by Timothy Pearson.