1 /* A Bison parser, made by GNU Bison 3.0.4. */
2
3 /* Bison implementation for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
6
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20 /* As a special exception, you may create a larger work that contains
21 part or all of the Bison parser skeleton and distribute that work
22 under terms of your choice, so long as that work isn't itself a
23 parser generator using the skeleton or a modified version thereof
24 as a parser skeleton. Alternatively, if you modify or redistribute
25 the parser skeleton itself, you may (at your option) remove this
26 special exception, which will cause the skeleton and the resulting
27 Bison output files to be licensed under the GNU General Public
28 License without this special exception.
29
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
32
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
35
36 /* All symbols defined below should begin with yy or YY, to avoid
37 infringing on user name space. This should be done even for local
38 variables, as they might otherwise be expanded by user macros.
39 There are some unavoidable exceptions within include files to
40 define necessary library symbols; they are noted "INFRINGES ON
41 USER NAME SPACE" below. */
42
43 /* Identify Bison output. */
44 #define YYBISON 1
45
46 /* Bison version. */
47 #define YYBISON_VERSION "3.0.4"
48
49 /* Skeleton name. */
50 #define YYSKELETON_NAME "yacc.c"
51
52 /* Pure parsers. */
53 #define YYPURE 0
54
55 /* Push parsers. */
56 #define YYPUSH 0
57
58 /* Pull parsers. */
59 #define YYPULL 1
60
61
62
63
64 /* Copy the first part of user declarations. */
65 #line 21 "printrcy.y" /* yacc.c:339 */
66
67
68 #ifdef HAVE_CONFIG_H
69 #include <config.h>
70 #endif
71
72 #include <gutenprint/gutenprint-intl-internal.h>
73 #include <gutenprintui2/gutenprintui.h>
74 #include "gutenprintui-internal.h"
75 #include "printrc.h"
76
77 #include <string.h>
78 #include <stdio.h>
79 #include <stdlib.h>
80
81 extern int mylineno;
82
83 extern int yylex(void);
84 char *quotestrip(const char *i);
85 char *endstrip(const char *i);
86
87 extern char* yytext;
88
yyerror(const char * s)89 static int yyerror( const char *s )
90 {
91 fprintf(stderr,"stdin:%d: %s before '%s'\n", mylineno, s, yytext);
92 return 0;
93 }
94
95 static stpui_plist_t *current_printer = NULL;
96
97
98 #line 99 "printrcy.c" /* yacc.c:339 */
99
100 # ifndef YY_NULLPTR
101 # if defined __cplusplus && 201103L <= __cplusplus
102 # define YY_NULLPTR nullptr
103 # else
104 # define YY_NULLPTR 0
105 # endif
106 # endif
107
108 /* Enabling verbose error messages. */
109 #ifdef YYERROR_VERBOSE
110 # undef YYERROR_VERBOSE
111 # define YYERROR_VERBOSE 1
112 #else
113 # define YYERROR_VERBOSE 0
114 #endif
115
116 /* In a future release of Bison, this section will be replaced
117 by #include "y.tab.h". */
118 #ifndef YY_YY_PRINTRCY_H_INCLUDED
119 # define YY_YY_PRINTRCY_H_INCLUDED
120 /* Debug traces. */
121 #ifndef YYDEBUG
122 # define YYDEBUG 0
123 #endif
124 #if YYDEBUG
125 extern int yydebug;
126 #endif
127
128 /* Token type. */
129 #ifndef YYTOKENTYPE
130 # define YYTOKENTYPE
131 enum yytokentype
132 {
133 tNUMBER = 258,
134 tBOOLEAN = 259,
135 tSTRING = 260,
136 tWORD = 261,
137 tGSWORD = 262,
138 CURRENT_PRINTER = 263,
139 SHOW_ALL_PAPER_SIZES = 264,
140 PRINTER = 265,
141 DESTINATION = 266,
142 SCALING = 267,
143 ORIENTATION = 268,
144 AUTOSIZE_ROLL_PAPER = 269,
145 UNIT = 270,
146 DRIVER = 271,
147 LEFT = 272,
148 TOP = 273,
149 CUSTOM_PAGE_WIDTH = 274,
150 CUSTOM_PAGE_HEIGHT = 275,
151 OUTPUT_TYPE = 276,
152 PRINTRC_HDR = 277,
153 PARAMETER = 278,
154 QUEUE_NAME = 279,
155 OUTPUT_FILENAME = 280,
156 EXTRA_PRINTER_OPTIONS = 281,
157 CUSTOM_COMMAND = 282,
158 COMMAND_TYPE = 283,
159 GLOBAL_SETTINGS = 284,
160 GLOBAL = 285,
161 END_GLOBAL_SETTINGS = 286,
162 pINT = 287,
163 pSTRING_LIST = 288,
164 pFILE = 289,
165 pDOUBLE = 290,
166 pDIMENSION = 291,
167 pBOOLEAN = 292,
168 pCURVE = 293
169 };
170 #endif
171 /* Tokens. */
172 #define tNUMBER 258
173 #define tBOOLEAN 259
174 #define tSTRING 260
175 #define tWORD 261
176 #define tGSWORD 262
177 #define CURRENT_PRINTER 263
178 #define SHOW_ALL_PAPER_SIZES 264
179 #define PRINTER 265
180 #define DESTINATION 266
181 #define SCALING 267
182 #define ORIENTATION 268
183 #define AUTOSIZE_ROLL_PAPER 269
184 #define UNIT 270
185 #define DRIVER 271
186 #define LEFT 272
187 #define TOP 273
188 #define CUSTOM_PAGE_WIDTH 274
189 #define CUSTOM_PAGE_HEIGHT 275
190 #define OUTPUT_TYPE 276
191 #define PRINTRC_HDR 277
192 #define PARAMETER 278
193 #define QUEUE_NAME 279
194 #define OUTPUT_FILENAME 280
195 #define EXTRA_PRINTER_OPTIONS 281
196 #define CUSTOM_COMMAND 282
197 #define COMMAND_TYPE 283
198 #define GLOBAL_SETTINGS 284
199 #define GLOBAL 285
200 #define END_GLOBAL_SETTINGS 286
201 #define pINT 287
202 #define pSTRING_LIST 288
203 #define pFILE 289
204 #define pDOUBLE 290
205 #define pDIMENSION 291
206 #define pBOOLEAN 292
207 #define pCURVE 293
208
209 /* Value type. */
210
211
212 extern YYSTYPE yylval;
213
214 int yyparse (void);
215
216 #endif /* !YY_YY_PRINTRCY_H_INCLUDED */
217
218 /* Copy the second part of user declarations. */
219
220 #line 221 "printrcy.c" /* yacc.c:358 */
221
222 #ifdef short
223 # undef short
224 #endif
225
226 #ifdef YYTYPE_UINT8
227 typedef YYTYPE_UINT8 yytype_uint8;
228 #else
229 typedef unsigned char yytype_uint8;
230 #endif
231
232 #ifdef YYTYPE_INT8
233 typedef YYTYPE_INT8 yytype_int8;
234 #else
235 typedef signed char yytype_int8;
236 #endif
237
238 #ifdef YYTYPE_UINT16
239 typedef YYTYPE_UINT16 yytype_uint16;
240 #else
241 typedef unsigned short int yytype_uint16;
242 #endif
243
244 #ifdef YYTYPE_INT16
245 typedef YYTYPE_INT16 yytype_int16;
246 #else
247 typedef short int yytype_int16;
248 #endif
249
250 #ifndef YYSIZE_T
251 # ifdef __SIZE_TYPE__
252 # define YYSIZE_T __SIZE_TYPE__
253 # elif defined size_t
254 # define YYSIZE_T size_t
255 # elif ! defined YYSIZE_T
256 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
257 # define YYSIZE_T size_t
258 # else
259 # define YYSIZE_T unsigned int
260 # endif
261 #endif
262
263 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
264
265 #ifndef YY_
266 # if defined YYENABLE_NLS && YYENABLE_NLS
267 # if ENABLE_NLS
268 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
269 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
270 # endif
271 # endif
272 # ifndef YY_
273 # define YY_(Msgid) Msgid
274 # endif
275 #endif
276
277 #ifndef YY_ATTRIBUTE
278 # if (defined __GNUC__ \
279 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
280 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
281 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
282 # else
283 # define YY_ATTRIBUTE(Spec) /* empty */
284 # endif
285 #endif
286
287 #ifndef YY_ATTRIBUTE_PURE
288 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
289 #endif
290
291 #ifndef YY_ATTRIBUTE_UNUSED
292 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
293 #endif
294
295 #if !defined _Noreturn \
296 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
297 # if defined _MSC_VER && 1200 <= _MSC_VER
298 # define _Noreturn __declspec (noreturn)
299 # else
300 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
301 # endif
302 #endif
303
304 /* Suppress unused-variable warnings by "using" E. */
305 #if ! defined lint || defined __GNUC__
306 # define YYUSE(E) ((void) (E))
307 #else
308 # define YYUSE(E) /* empty */
309 #endif
310
311 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
312 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
313 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
314 _Pragma ("GCC diagnostic push") \
315 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
316 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
317 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
318 _Pragma ("GCC diagnostic pop")
319 #else
320 # define YY_INITIAL_VALUE(Value) Value
321 #endif
322 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
323 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
324 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
325 #endif
326 #ifndef YY_INITIAL_VALUE
327 # define YY_INITIAL_VALUE(Value) /* Nothing. */
328 #endif
329
330
331 #if ! defined yyoverflow || YYERROR_VERBOSE
332
333 /* The parser invokes alloca or malloc; define the necessary symbols. */
334
335 # ifdef YYSTACK_USE_ALLOCA
336 # if YYSTACK_USE_ALLOCA
337 # ifdef __GNUC__
338 # define YYSTACK_ALLOC __builtin_alloca
339 # elif defined __BUILTIN_VA_ARG_INCR
340 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
341 # elif defined _AIX
342 # define YYSTACK_ALLOC __alloca
343 # elif defined _MSC_VER
344 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
345 # define alloca _alloca
346 # else
347 # define YYSTACK_ALLOC alloca
348 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
349 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
350 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
351 # ifndef EXIT_SUCCESS
352 # define EXIT_SUCCESS 0
353 # endif
354 # endif
355 # endif
356 # endif
357 # endif
358
359 # ifdef YYSTACK_ALLOC
360 /* Pacify GCC's 'empty if-body' warning. */
361 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
362 # ifndef YYSTACK_ALLOC_MAXIMUM
363 /* The OS might guarantee only one guard page at the bottom of the stack,
364 and a page size can be as small as 4096 bytes. So we cannot safely
365 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
366 to allow for a few compiler-allocated temporary stack slots. */
367 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
368 # endif
369 # else
370 # define YYSTACK_ALLOC YYMALLOC
371 # define YYSTACK_FREE YYFREE
372 # ifndef YYSTACK_ALLOC_MAXIMUM
373 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
374 # endif
375 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
376 && ! ((defined YYMALLOC || defined malloc) \
377 && (defined YYFREE || defined free)))
378 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
379 # ifndef EXIT_SUCCESS
380 # define EXIT_SUCCESS 0
381 # endif
382 # endif
383 # ifndef YYMALLOC
384 # define YYMALLOC malloc
385 # if ! defined malloc && ! defined EXIT_SUCCESS
386 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
387 # endif
388 # endif
389 # ifndef YYFREE
390 # define YYFREE free
391 # if ! defined free && ! defined EXIT_SUCCESS
392 void free (void *); /* INFRINGES ON USER NAME SPACE */
393 # endif
394 # endif
395 # endif
396 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
397
398
399 #if (! defined yyoverflow \
400 && (! defined __cplusplus \
401 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
402
403 /* A type that is properly aligned for any stack member. */
404 union yyalloc
405 {
406 yytype_int16 yyss_alloc;
407 YYSTYPE yyvs_alloc;
408 };
409
410 /* The size of the maximum gap between one aligned stack and the next. */
411 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
412
413 /* The size of an array large to enough to hold all stacks, each with
414 N elements. */
415 # define YYSTACK_BYTES(N) \
416 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
417 + YYSTACK_GAP_MAXIMUM)
418
419 # define YYCOPY_NEEDED 1
420
421 /* Relocate STACK from its old location to the new one. The
422 local variables YYSIZE and YYSTACKSIZE give the old and new number of
423 elements in the stack, and YYPTR gives the new location of the
424 stack. Advance YYPTR to a properly aligned location for the next
425 stack. */
426 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
427 do \
428 { \
429 YYSIZE_T yynewbytes; \
430 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
431 Stack = &yyptr->Stack_alloc; \
432 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
433 yyptr += yynewbytes / sizeof (*yyptr); \
434 } \
435 while (0)
436
437 #endif
438
439 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
440 /* Copy COUNT objects from SRC to DST. The source and destination do
441 not overlap. */
442 # ifndef YYCOPY
443 # if defined __GNUC__ && 1 < __GNUC__
444 # define YYCOPY(Dst, Src, Count) \
445 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
446 # else
447 # define YYCOPY(Dst, Src, Count) \
448 do \
449 { \
450 YYSIZE_T yyi; \
451 for (yyi = 0; yyi < (Count); yyi++) \
452 (Dst)[yyi] = (Src)[yyi]; \
453 } \
454 while (0)
455 # endif
456 # endif
457 #endif /* !YYCOPY_NEEDED */
458
459 /* YYFINAL -- State number of the termination state. */
460 #define YYFINAL 10
461 /* YYLAST -- Last index in YYTABLE. */
462 #define YYLAST 73
463
464 /* YYNTOKENS -- Number of terminals. */
465 #define YYNTOKENS 39
466 /* YYNNTS -- Number of nonterminals. */
467 #define YYNNTS 42
468 /* YYNRULES -- Number of rules. */
469 #define YYNRULES 70
470 /* YYNSTATES -- Number of states. */
471 #define YYNSTATES 114
472
473 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
474 by yylex, with out-of-bounds checking. */
475 #define YYUNDEFTOK 2
476 #define YYMAXUTOK 293
477
478 #define YYTRANSLATE(YYX) \
479 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
480
481 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
482 as returned by yylex, without out-of-bounds checking. */
483 static const yytype_uint8 yytranslate[] =
484 {
485 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
486 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
487 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
488 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
489 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
490 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
491 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
492 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
493 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
494 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
495 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
496 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
497 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
498 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
499 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
500 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
501 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
502 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
503 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
504 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
505 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
506 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
507 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
508 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
509 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
510 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
511 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
512 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
513 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
514 35, 36, 37, 38
515 };
516
517 #if YYDEBUG
518 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
519 static const yytype_uint16 yyrline[] =
520 {
521 0, 96, 96, 107, 114, 124, 134, 144, 154, 161,
522 168, 175, 182, 189, 196, 203, 224, 231, 238, 241,
523 258, 276, 294, 311, 328, 349, 372, 372, 372, 372,
524 373, 373, 373, 376, 379, 379, 382, 382, 382, 382,
525 383, 383, 383, 383, 383, 384, 384, 384, 384, 385,
526 385, 388, 388, 391, 394, 394, 397, 401, 411, 411,
527 414, 417, 428, 428, 431, 431, 434, 437, 437, 437,
528 440
529 };
530 #endif
531
532 #if YYDEBUG || YYERROR_VERBOSE || 0
533 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
534 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
535 static const char *const yytname[] =
536 {
537 "$end", "error", "$undefined", "tNUMBER", "tBOOLEAN", "tSTRING",
538 "tWORD", "tGSWORD", "CURRENT_PRINTER", "SHOW_ALL_PAPER_SIZES", "PRINTER",
539 "DESTINATION", "SCALING", "ORIENTATION", "AUTOSIZE_ROLL_PAPER", "UNIT",
540 "DRIVER", "LEFT", "TOP", "CUSTOM_PAGE_WIDTH", "CUSTOM_PAGE_HEIGHT",
541 "OUTPUT_TYPE", "PRINTRC_HDR", "PARAMETER", "QUEUE_NAME",
542 "OUTPUT_FILENAME", "EXTRA_PRINTER_OPTIONS", "CUSTOM_COMMAND",
543 "COMMAND_TYPE", "GLOBAL_SETTINGS", "GLOBAL", "END_GLOBAL_SETTINGS",
544 "pINT", "pSTRING_LIST", "pFILE", "pDOUBLE", "pDIMENSION", "pBOOLEAN",
545 "pCURVE", "$accept", "Printer", "Destination", "Queue_Name",
546 "Output_Filename", "Extra_Printer_Options", "Custom_Command",
547 "Command_Type", "Scaling", "Orientation", "Autosize_Roll_Paper", "Unit",
548 "Left", "Top", "Output_Type", "Custom_Page_Width", "Custom_Page_Height",
549 "Empty", "Int_Param", "String_List_Param", "File_Param", "Double_Param",
550 "Dimension_Param", "Boolean_Param", "Curve_Param", "Typed_Param",
551 "Parameter", "Parameters", "Standard_Value", "Standard_Values",
552 "A_Printer", "Printers", "Current_Printer", "Show_All_Paper_Sizes",
553 "Global", "Old_Globals", "New_Global_Setting", "Global_Setting",
554 "Global_Settings", "Global_Subblock", "Global_Block", "Thing", YY_NULLPTR
555 };
556 #endif
557
558 # ifdef YYPRINT
559 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
560 (internal) symbol number NUM (which must be that of a token). */
561 static const yytype_uint16 yytoknum[] =
562 {
563 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
564 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
565 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
566 285, 286, 287, 288, 289, 290, 291, 292, 293
567 };
568 # endif
569
570 #define YYPACT_NINF -26
571
572 #define yypact_value_is_default(Yystate) \
573 (!!((Yystate) == (-26)))
574
575 #define YYTABLE_NINF -1
576
577 #define yytable_value_is_error(Yytable_value) \
578 0
579
580 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
581 STATE-NUM. */
582 static const yytype_int8 yypact[] =
583 {
584 -20, -2, 14, 10, -26, -26, 7, -26, -26, -26,
585 -26, -26, -26, -5, 13, -26, -26, 8, 15, -26,
586 -26, -26, -26, -26, -26, -26, 16, -26, -26, -26,
587 17, -26, 18, -26, 19, 22, 31, 37, 38, 44,
588 45, 46, 47, 48, 49, 50, 51, 52, 55, -26,
589 -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
590 -26, -26, -26, -26, -26, 29, -26, -26, -26, -26,
591 -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
592 -26, -26, 53, -26, -25, -26, -26, -26, -26, -26,
593 -26, -26, -26, 56, 57, 58, 59, 60, 61, 62,
594 64, 63, 65, 66, 68, 69, 67, -26, -26, -26,
595 -26, -26, -26, -26
596 };
597
598 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
599 Performed when YYTABLE does not specify something else to do. Zero
600 means the default is an error. */
601 static const yytype_uint8 yydefact[] =
602 {
603 0, 18, 0, 0, 18, 69, 0, 68, 67, 18,
604 1, 56, 65, 0, 0, 60, 55, 70, 0, 66,
605 58, 59, 62, 63, 64, 57, 0, 18, 54, 61,
606 0, 52, 18, 2, 0, 0, 0, 0, 0, 0,
607 0, 0, 0, 0, 0, 0, 0, 0, 0, 36,
608 46, 47, 48, 49, 50, 37, 38, 39, 40, 41,
609 42, 45, 43, 44, 35, 53, 51, 3, 9, 10,
610 11, 12, 13, 14, 16, 17, 15, 4, 5, 6,
611 7, 8, 0, 34, 0, 26, 27, 28, 29, 32,
612 30, 31, 33, 0, 0, 0, 0, 0, 0, 0,
613 0, 0, 0, 0, 0, 0, 0, 19, 20, 21,
614 22, 23, 24, 25
615 };
616
617 /* YYPGOTO[NTERM-NUM]. */
618 static const yytype_int8 yypgoto[] =
619 {
620 -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
621 -26, -26, -26, -26, -26, -26, -26, -4, -26, -26,
622 -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
623 -26, -26, 6, 40, -26, -26, -26, -26, -26, -26,
624 -26, -26
625 };
626
627 /* YYDEFGOTO[NTERM-NUM]. */
628 static const yytype_int8 yydefgoto[] =
629 {
630 -1, 27, 49, 50, 51, 52, 53, 54, 55, 56,
631 57, 58, 59, 60, 61, 62, 63, 5, 85, 86,
632 87, 88, 89, 90, 91, 92, 83, 65, 66, 32,
633 28, 17, 6, 15, 22, 7, 23, 24, 13, 8,
634 9, 2
635 };
636
637 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
638 positive, shift that token. If negative, reduce the rule whose
639 number is the opposite. If YYTABLE_NINF, syntax error. */
640 static const yytype_uint8 yytable[] =
641 {
642 12, 18, 1, 3, 14, 16, 3, 93, 94, 95,
643 96, 97, 98, 99, 10, 11, 14, 25, 26, 20,
644 29, 30, 33, 31, 67, 68, 19, 4, 64, 34,
645 35, 36, 37, 38, 69, 39, 40, 41, 42, 43,
646 70, 71, 44, 45, 46, 47, 48, 72, 73, 74,
647 75, 76, 82, 21, 77, 78, 79, 80, 81, 84,
648 100, 101, 102, 103, 104, 105, 106, 107, 108, 110,
649 109, 111, 113, 112
650 };
651
652 static const yytype_uint8 yycheck[] =
653 {
654 4, 6, 22, 8, 9, 9, 8, 32, 33, 34,
655 35, 36, 37, 38, 0, 5, 9, 4, 10, 13,
656 5, 5, 5, 27, 5, 3, 31, 29, 32, 11,
657 12, 13, 14, 15, 3, 17, 18, 19, 20, 21,
658 3, 3, 24, 25, 26, 27, 28, 3, 3, 3,
659 3, 3, 23, 13, 5, 5, 5, 5, 3, 6,
660 4, 4, 4, 4, 4, 4, 4, 3, 5, 3,
661 5, 3, 5, 4
662 };
663
664 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
665 symbol of state STATE-NUM. */
666 static const yytype_uint8 yystos[] =
667 {
668 0, 22, 80, 8, 29, 56, 71, 74, 78, 79,
669 0, 5, 56, 77, 9, 72, 56, 70, 6, 31,
670 71, 72, 73, 75, 76, 4, 10, 40, 69, 5,
671 5, 56, 68, 5, 11, 12, 13, 14, 15, 17,
672 18, 19, 20, 21, 24, 25, 26, 27, 28, 41,
673 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
674 52, 53, 54, 55, 56, 66, 67, 5, 3, 3,
675 3, 3, 3, 3, 3, 3, 3, 5, 5, 5,
676 5, 3, 23, 65, 6, 57, 58, 59, 60, 61,
677 62, 63, 64, 32, 33, 34, 35, 36, 37, 38,
678 4, 4, 4, 4, 4, 4, 4, 3, 5, 5,
679 3, 3, 4, 5
680 };
681
682 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
683 static const yytype_uint8 yyr1[] =
684 {
685 0, 39, 40, 41, 42, 43, 44, 45, 46, 47,
686 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
687 58, 59, 60, 61, 62, 63, 64, 64, 64, 64,
688 64, 64, 64, 65, 66, 66, 67, 67, 67, 67,
689 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
690 67, 68, 68, 69, 70, 70, 71, 72, 73, 73,
691 74, 75, 76, 76, 77, 77, 78, 79, 79, 79,
692 80
693 };
694
695 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
696 static const yytype_uint8 yyr2[] =
697 {
698 0, 2, 3, 2, 2, 2, 2, 2, 2, 2,
699 2, 2, 2, 2, 2, 2, 2, 2, 0, 4,
700 4, 4, 4, 4, 4, 4, 1, 1, 1, 1,
701 1, 1, 1, 2, 2, 1, 1, 1, 1, 1,
702 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
703 1, 2, 1, 3, 2, 1, 2, 2, 1, 1,
704 2, 2, 1, 1, 2, 1, 3, 1, 1, 1,
705 3
706 };
707
708
709 #define yyerrok (yyerrstatus = 0)
710 #define yyclearin (yychar = YYEMPTY)
711 #define YYEMPTY (-2)
712 #define YYEOF 0
713
714 #define YYACCEPT goto yyacceptlab
715 #define YYABORT goto yyabortlab
716 #define YYERROR goto yyerrorlab
717
718
719 #define YYRECOVERING() (!!yyerrstatus)
720
721 #define YYBACKUP(Token, Value) \
722 do \
723 if (yychar == YYEMPTY) \
724 { \
725 yychar = (Token); \
726 yylval = (Value); \
727 YYPOPSTACK (yylen); \
728 yystate = *yyssp; \
729 goto yybackup; \
730 } \
731 else \
732 { \
733 yyerror (YY_("syntax error: cannot back up")); \
734 YYERROR; \
735 } \
736 while (0)
737
738 /* Error token number */
739 #define YYTERROR 1
740 #define YYERRCODE 256
741
742
743
744 /* Enable debugging if requested. */
745 #if YYDEBUG
746
747 # ifndef YYFPRINTF
748 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
749 # define YYFPRINTF fprintf
750 # endif
751
752 # define YYDPRINTF(Args) \
753 do { \
754 if (yydebug) \
755 YYFPRINTF Args; \
756 } while (0)
757
758 /* This macro is provided for backward compatibility. */
759 #ifndef YY_LOCATION_PRINT
760 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
761 #endif
762
763
764 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
765 do { \
766 if (yydebug) \
767 { \
768 YYFPRINTF (stderr, "%s ", Title); \
769 yy_symbol_print (stderr, \
770 Type, Value); \
771 YYFPRINTF (stderr, "\n"); \
772 } \
773 } while (0)
774
775
776 /*----------------------------------------.
777 | Print this symbol's value on YYOUTPUT. |
778 `----------------------------------------*/
779
780 static void
yy_symbol_value_print(FILE * yyoutput,int yytype,YYSTYPE const * const yyvaluep)781 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
782 {
783 FILE *yyo = yyoutput;
784 YYUSE (yyo);
785 if (!yyvaluep)
786 return;
787 # ifdef YYPRINT
788 if (yytype < YYNTOKENS)
789 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
790 # endif
791 YYUSE (yytype);
792 }
793
794
795 /*--------------------------------.
796 | Print this symbol on YYOUTPUT. |
797 `--------------------------------*/
798
799 static void
yy_symbol_print(FILE * yyoutput,int yytype,YYSTYPE const * const yyvaluep)800 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
801 {
802 YYFPRINTF (yyoutput, "%s %s (",
803 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
804
805 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
806 YYFPRINTF (yyoutput, ")");
807 }
808
809 /*------------------------------------------------------------------.
810 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
811 | TOP (included). |
812 `------------------------------------------------------------------*/
813
814 static void
yy_stack_print(yytype_int16 * yybottom,yytype_int16 * yytop)815 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
816 {
817 YYFPRINTF (stderr, "Stack now");
818 for (; yybottom <= yytop; yybottom++)
819 {
820 int yybot = *yybottom;
821 YYFPRINTF (stderr, " %d", yybot);
822 }
823 YYFPRINTF (stderr, "\n");
824 }
825
826 # define YY_STACK_PRINT(Bottom, Top) \
827 do { \
828 if (yydebug) \
829 yy_stack_print ((Bottom), (Top)); \
830 } while (0)
831
832
833 /*------------------------------------------------.
834 | Report that the YYRULE is going to be reduced. |
835 `------------------------------------------------*/
836
837 static void
yy_reduce_print(yytype_int16 * yyssp,YYSTYPE * yyvsp,int yyrule)838 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
839 {
840 unsigned long int yylno = yyrline[yyrule];
841 int yynrhs = yyr2[yyrule];
842 int yyi;
843 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
844 yyrule - 1, yylno);
845 /* The symbols being reduced. */
846 for (yyi = 0; yyi < yynrhs; yyi++)
847 {
848 YYFPRINTF (stderr, " $%d = ", yyi + 1);
849 yy_symbol_print (stderr,
850 yystos[yyssp[yyi + 1 - yynrhs]],
851 &(yyvsp[(yyi + 1) - (yynrhs)])
852 );
853 YYFPRINTF (stderr, "\n");
854 }
855 }
856
857 # define YY_REDUCE_PRINT(Rule) \
858 do { \
859 if (yydebug) \
860 yy_reduce_print (yyssp, yyvsp, Rule); \
861 } while (0)
862
863 /* Nonzero means print parse trace. It is left uninitialized so that
864 multiple parsers can coexist. */
865 int yydebug;
866 #else /* !YYDEBUG */
867 # define YYDPRINTF(Args)
868 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
869 # define YY_STACK_PRINT(Bottom, Top)
870 # define YY_REDUCE_PRINT(Rule)
871 #endif /* !YYDEBUG */
872
873
874 /* YYINITDEPTH -- initial size of the parser's stacks. */
875 #ifndef YYINITDEPTH
876 # define YYINITDEPTH 200
877 #endif
878
879 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
880 if the built-in stack extension method is used).
881
882 Do not make this value too large; the results are undefined if
883 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
884 evaluated with infinite-precision integer arithmetic. */
885
886 #ifndef YYMAXDEPTH
887 # define YYMAXDEPTH 10000
888 #endif
889
890
891 #if YYERROR_VERBOSE
892
893 # ifndef yystrlen
894 # if defined __GLIBC__ && defined _STRING_H
895 # define yystrlen strlen
896 # else
897 /* Return the length of YYSTR. */
898 static YYSIZE_T
yystrlen(const char * yystr)899 yystrlen (const char *yystr)
900 {
901 YYSIZE_T yylen;
902 for (yylen = 0; yystr[yylen]; yylen++)
903 continue;
904 return yylen;
905 }
906 # endif
907 # endif
908
909 # ifndef yystpcpy
910 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
911 # define yystpcpy stpcpy
912 # else
913 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
914 YYDEST. */
915 static char *
yystpcpy(char * yydest,const char * yysrc)916 yystpcpy (char *yydest, const char *yysrc)
917 {
918 char *yyd = yydest;
919 const char *yys = yysrc;
920
921 while ((*yyd++ = *yys++) != '\0')
922 continue;
923
924 return yyd - 1;
925 }
926 # endif
927 # endif
928
929 # ifndef yytnamerr
930 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
931 quotes and backslashes, so that it's suitable for yyerror. The
932 heuristic is that double-quoting is unnecessary unless the string
933 contains an apostrophe, a comma, or backslash (other than
934 backslash-backslash). YYSTR is taken from yytname. If YYRES is
935 null, do not copy; instead, return the length of what the result
936 would have been. */
937 static YYSIZE_T
yytnamerr(char * yyres,const char * yystr)938 yytnamerr (char *yyres, const char *yystr)
939 {
940 if (*yystr == '"')
941 {
942 YYSIZE_T yyn = 0;
943 char const *yyp = yystr;
944
945 for (;;)
946 switch (*++yyp)
947 {
948 case '\'':
949 case ',':
950 goto do_not_strip_quotes;
951
952 case '\\':
953 if (*++yyp != '\\')
954 goto do_not_strip_quotes;
955 /* Fall through. */
956 default:
957 if (yyres)
958 yyres[yyn] = *yyp;
959 yyn++;
960 break;
961
962 case '"':
963 if (yyres)
964 yyres[yyn] = '\0';
965 return yyn;
966 }
967 do_not_strip_quotes: ;
968 }
969
970 if (! yyres)
971 return yystrlen (yystr);
972
973 return yystpcpy (yyres, yystr) - yyres;
974 }
975 # endif
976
977 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
978 about the unexpected token YYTOKEN for the state stack whose top is
979 YYSSP.
980
981 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
982 not large enough to hold the message. In that case, also set
983 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
984 required number of bytes is too large to store. */
985 static int
yysyntax_error(YYSIZE_T * yymsg_alloc,char ** yymsg,yytype_int16 * yyssp,int yytoken)986 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
987 yytype_int16 *yyssp, int yytoken)
988 {
989 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
990 YYSIZE_T yysize = yysize0;
991 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
992 /* Internationalized format string. */
993 const char *yyformat = YY_NULLPTR;
994 /* Arguments of yyformat. */
995 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
996 /* Number of reported tokens (one for the "unexpected", one per
997 "expected"). */
998 int yycount = 0;
999
1000 /* There are many possibilities here to consider:
1001 - If this state is a consistent state with a default action, then
1002 the only way this function was invoked is if the default action
1003 is an error action. In that case, don't check for expected
1004 tokens because there are none.
1005 - The only way there can be no lookahead present (in yychar) is if
1006 this state is a consistent state with a default action. Thus,
1007 detecting the absence of a lookahead is sufficient to determine
1008 that there is no unexpected or expected token to report. In that
1009 case, just report a simple "syntax error".
1010 - Don't assume there isn't a lookahead just because this state is a
1011 consistent state with a default action. There might have been a
1012 previous inconsistent state, consistent state with a non-default
1013 action, or user semantic action that manipulated yychar.
1014 - Of course, the expected token list depends on states to have
1015 correct lookahead information, and it depends on the parser not
1016 to perform extra reductions after fetching a lookahead from the
1017 scanner and before detecting a syntax error. Thus, state merging
1018 (from LALR or IELR) and default reductions corrupt the expected
1019 token list. However, the list is correct for canonical LR with
1020 one exception: it will still contain any token that will not be
1021 accepted due to an error action in a later state.
1022 */
1023 if (yytoken != YYEMPTY)
1024 {
1025 int yyn = yypact[*yyssp];
1026 yyarg[yycount++] = yytname[yytoken];
1027 if (!yypact_value_is_default (yyn))
1028 {
1029 /* Start YYX at -YYN if negative to avoid negative indexes in
1030 YYCHECK. In other words, skip the first -YYN actions for
1031 this state because they are default actions. */
1032 int yyxbegin = yyn < 0 ? -yyn : 0;
1033 /* Stay within bounds of both yycheck and yytname. */
1034 int yychecklim = YYLAST - yyn + 1;
1035 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1036 int yyx;
1037
1038 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1039 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1040 && !yytable_value_is_error (yytable[yyx + yyn]))
1041 {
1042 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1043 {
1044 yycount = 1;
1045 yysize = yysize0;
1046 break;
1047 }
1048 yyarg[yycount++] = yytname[yyx];
1049 {
1050 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1051 if (! (yysize <= yysize1
1052 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1053 return 2;
1054 yysize = yysize1;
1055 }
1056 }
1057 }
1058 }
1059
1060 switch (yycount)
1061 {
1062 # define YYCASE_(N, S) \
1063 case N: \
1064 yyformat = S; \
1065 break
1066 YYCASE_(0, YY_("syntax error"));
1067 YYCASE_(1, YY_("syntax error, unexpected %s"));
1068 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1069 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1070 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1071 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1072 # undef YYCASE_
1073 }
1074
1075 {
1076 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1077 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1078 return 2;
1079 yysize = yysize1;
1080 }
1081
1082 if (*yymsg_alloc < yysize)
1083 {
1084 *yymsg_alloc = 2 * yysize;
1085 if (! (yysize <= *yymsg_alloc
1086 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1087 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1088 return 1;
1089 }
1090
1091 /* Avoid sprintf, as that infringes on the user's name space.
1092 Don't have undefined behavior even if the translation
1093 produced a string with the wrong number of "%s"s. */
1094 {
1095 char *yyp = *yymsg;
1096 int yyi = 0;
1097 while ((*yyp = *yyformat) != '\0')
1098 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1099 {
1100 yyp += yytnamerr (yyp, yyarg[yyi++]);
1101 yyformat += 2;
1102 }
1103 else
1104 {
1105 yyp++;
1106 yyformat++;
1107 }
1108 }
1109 return 0;
1110 }
1111 #endif /* YYERROR_VERBOSE */
1112
1113 /*-----------------------------------------------.
1114 | Release the memory associated to this symbol. |
1115 `-----------------------------------------------*/
1116
1117 static void
yydestruct(const char * yymsg,int yytype,YYSTYPE * yyvaluep)1118 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1119 {
1120 YYUSE (yyvaluep);
1121 if (!yymsg)
1122 yymsg = "Deleting";
1123 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1124
1125 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1126 YYUSE (yytype);
1127 YY_IGNORE_MAYBE_UNINITIALIZED_END
1128 }
1129
1130
1131
1132
1133 /* The lookahead symbol. */
1134 int yychar;
1135
1136 /* The semantic value of the lookahead symbol. */
1137 YYSTYPE yylval;
1138 /* Number of syntax errors so far. */
1139 int yynerrs;
1140
1141
1142 /*----------.
1143 | yyparse. |
1144 `----------*/
1145
1146 int
yyparse(void)1147 yyparse (void)
1148 {
1149 int yystate;
1150 /* Number of tokens to shift before error messages enabled. */
1151 int yyerrstatus;
1152
1153 /* The stacks and their tools:
1154 'yyss': related to states.
1155 'yyvs': related to semantic values.
1156
1157 Refer to the stacks through separate pointers, to allow yyoverflow
1158 to reallocate them elsewhere. */
1159
1160 /* The state stack. */
1161 yytype_int16 yyssa[YYINITDEPTH];
1162 yytype_int16 *yyss;
1163 yytype_int16 *yyssp;
1164
1165 /* The semantic value stack. */
1166 YYSTYPE yyvsa[YYINITDEPTH];
1167 YYSTYPE *yyvs;
1168 YYSTYPE *yyvsp;
1169
1170 YYSIZE_T yystacksize;
1171
1172 int yyn;
1173 int yyresult;
1174 /* Lookahead token as an internal (translated) token number. */
1175 int yytoken = 0;
1176 /* The variables used to return semantic value and location from the
1177 action routines. */
1178 YYSTYPE yyval;
1179
1180 #if YYERROR_VERBOSE
1181 /* Buffer for error messages, and its allocated size. */
1182 char yymsgbuf[128];
1183 char *yymsg = yymsgbuf;
1184 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1185 #endif
1186
1187 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1188
1189 /* The number of symbols on the RHS of the reduced rule.
1190 Keep to zero when no symbol should be popped. */
1191 int yylen = 0;
1192
1193 yyssp = yyss = yyssa;
1194 yyvsp = yyvs = yyvsa;
1195 yystacksize = YYINITDEPTH;
1196
1197 YYDPRINTF ((stderr, "Starting parse\n"));
1198
1199 yystate = 0;
1200 yyerrstatus = 0;
1201 yynerrs = 0;
1202 yychar = YYEMPTY; /* Cause a token to be read. */
1203 goto yysetstate;
1204
1205 /*------------------------------------------------------------.
1206 | yynewstate -- Push a new state, which is found in yystate. |
1207 `------------------------------------------------------------*/
1208 yynewstate:
1209 /* In all cases, when you get here, the value and location stacks
1210 have just been pushed. So pushing a state here evens the stacks. */
1211 yyssp++;
1212
1213 yysetstate:
1214 *yyssp = yystate;
1215
1216 if (yyss + yystacksize - 1 <= yyssp)
1217 {
1218 /* Get the current used size of the three stacks, in elements. */
1219 YYSIZE_T yysize = yyssp - yyss + 1;
1220
1221 #ifdef yyoverflow
1222 {
1223 /* Give user a chance to reallocate the stack. Use copies of
1224 these so that the &'s don't force the real ones into
1225 memory. */
1226 YYSTYPE *yyvs1 = yyvs;
1227 yytype_int16 *yyss1 = yyss;
1228
1229 /* Each stack pointer address is followed by the size of the
1230 data in use in that stack, in bytes. This used to be a
1231 conditional around just the two extra args, but that might
1232 be undefined if yyoverflow is a macro. */
1233 yyoverflow (YY_("memory exhausted"),
1234 &yyss1, yysize * sizeof (*yyssp),
1235 &yyvs1, yysize * sizeof (*yyvsp),
1236 &yystacksize);
1237
1238 yyss = yyss1;
1239 yyvs = yyvs1;
1240 }
1241 #else /* no yyoverflow */
1242 # ifndef YYSTACK_RELOCATE
1243 goto yyexhaustedlab;
1244 # else
1245 /* Extend the stack our own way. */
1246 if (YYMAXDEPTH <= yystacksize)
1247 goto yyexhaustedlab;
1248 yystacksize *= 2;
1249 if (YYMAXDEPTH < yystacksize)
1250 yystacksize = YYMAXDEPTH;
1251
1252 {
1253 yytype_int16 *yyss1 = yyss;
1254 union yyalloc *yyptr =
1255 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1256 if (! yyptr)
1257 goto yyexhaustedlab;
1258 YYSTACK_RELOCATE (yyss_alloc, yyss);
1259 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1260 # undef YYSTACK_RELOCATE
1261 if (yyss1 != yyssa)
1262 YYSTACK_FREE (yyss1);
1263 }
1264 # endif
1265 #endif /* no yyoverflow */
1266
1267 yyssp = yyss + yysize - 1;
1268 yyvsp = yyvs + yysize - 1;
1269
1270 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1271 (unsigned long int) yystacksize));
1272
1273 if (yyss + yystacksize - 1 <= yyssp)
1274 YYABORT;
1275 }
1276
1277 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1278
1279 if (yystate == YYFINAL)
1280 YYACCEPT;
1281
1282 goto yybackup;
1283
1284 /*-----------.
1285 | yybackup. |
1286 `-----------*/
1287 yybackup:
1288
1289 /* Do appropriate processing given the current state. Read a
1290 lookahead token if we need one and don't already have one. */
1291
1292 /* First try to decide what to do without reference to lookahead token. */
1293 yyn = yypact[yystate];
1294 if (yypact_value_is_default (yyn))
1295 goto yydefault;
1296
1297 /* Not known => get a lookahead token if don't already have one. */
1298
1299 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1300 if (yychar == YYEMPTY)
1301 {
1302 YYDPRINTF ((stderr, "Reading a token: "));
1303 yychar = yylex ();
1304 }
1305
1306 if (yychar <= YYEOF)
1307 {
1308 yychar = yytoken = YYEOF;
1309 YYDPRINTF ((stderr, "Now at end of input.\n"));
1310 }
1311 else
1312 {
1313 yytoken = YYTRANSLATE (yychar);
1314 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1315 }
1316
1317 /* If the proper action on seeing token YYTOKEN is to reduce or to
1318 detect an error, take that action. */
1319 yyn += yytoken;
1320 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1321 goto yydefault;
1322 yyn = yytable[yyn];
1323 if (yyn <= 0)
1324 {
1325 if (yytable_value_is_error (yyn))
1326 goto yyerrlab;
1327 yyn = -yyn;
1328 goto yyreduce;
1329 }
1330
1331 /* Count tokens shifted since error; after three, turn off error
1332 status. */
1333 if (yyerrstatus)
1334 yyerrstatus--;
1335
1336 /* Shift the lookahead token. */
1337 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1338
1339 /* Discard the shifted token. */
1340 yychar = YYEMPTY;
1341
1342 yystate = yyn;
1343 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1344 *++yyvsp = yylval;
1345 YY_IGNORE_MAYBE_UNINITIALIZED_END
1346
1347 goto yynewstate;
1348
1349
1350 /*-----------------------------------------------------------.
1351 | yydefault -- do the default action for the current state. |
1352 `-----------------------------------------------------------*/
1353 yydefault:
1354 yyn = yydefact[yystate];
1355 if (yyn == 0)
1356 goto yyerrlab;
1357 goto yyreduce;
1358
1359
1360 /*-----------------------------.
1361 | yyreduce -- Do a reduction. |
1362 `-----------------------------*/
1363 yyreduce:
1364 /* yyn is the number of a rule to reduce with. */
1365 yylen = yyr2[yyn];
1366
1367 /* If YYLEN is nonzero, implement the default value of the action:
1368 '$$ = $1'.
1369
1370 Otherwise, the following line sets YYVAL to garbage.
1371 This behavior is undocumented and Bison
1372 users should not rely upon it. Assigning to YYVAL
1373 unconditionally makes the parser a bit smaller, and it avoids a
1374 GCC warning that YYVAL may be used uninitialized. */
1375 yyval = yyvsp[1-yylen];
1376
1377
1378 YY_REDUCE_PRINT (yyn);
1379 switch (yyn)
1380 {
1381 case 2:
1382 #line 97 "printrcy.y" /* yacc.c:1646 */
1383 {
1384 current_printer = stpui_plist_create((yyvsp[-1].sval), (yyvsp[0].sval));
1385 g_free((yyvsp[-1].sval));
1386 g_free((yyvsp[0].sval));
1387 }
1388 #line 1389 "printrcy.c" /* yacc.c:1646 */
1389 break;
1390
1391 case 3:
1392 #line 108 "printrcy.y" /* yacc.c:1646 */
1393 {
1394 if ((yyvsp[0].sval))
1395 g_free((yyvsp[0].sval));
1396 }
1397 #line 1398 "printrcy.c" /* yacc.c:1646 */
1398 break;
1399
1400 case 4:
1401 #line 115 "printrcy.y" /* yacc.c:1646 */
1402 {
1403 if (current_printer && (yyvsp[0].sval))
1404 {
1405 stpui_plist_set_queue_name(current_printer, (yyvsp[0].sval));
1406 g_free((yyvsp[0].sval));
1407 }
1408 }
1409 #line 1410 "printrcy.c" /* yacc.c:1646 */
1410 break;
1411
1412 case 5:
1413 #line 125 "printrcy.y" /* yacc.c:1646 */
1414 {
1415 if (current_printer && (yyvsp[0].sval))
1416 {
1417 stpui_plist_set_output_filename(current_printer, (yyvsp[0].sval));
1418 g_free((yyvsp[0].sval));
1419 }
1420 }
1421 #line 1422 "printrcy.c" /* yacc.c:1646 */
1422 break;
1423
1424 case 6:
1425 #line 135 "printrcy.y" /* yacc.c:1646 */
1426 {
1427 if (current_printer && (yyvsp[0].sval))
1428 {
1429 stpui_plist_set_extra_printer_options(current_printer, (yyvsp[0].sval));
1430 g_free((yyvsp[0].sval));
1431 }
1432 }
1433 #line 1434 "printrcy.c" /* yacc.c:1646 */
1434 break;
1435
1436 case 7:
1437 #line 145 "printrcy.y" /* yacc.c:1646 */
1438 {
1439 if (current_printer && (yyvsp[0].sval))
1440 {
1441 stpui_plist_set_custom_command(current_printer, (yyvsp[0].sval));
1442 g_free((yyvsp[0].sval));
1443 }
1444 }
1445 #line 1446 "printrcy.c" /* yacc.c:1646 */
1446 break;
1447
1448 case 8:
1449 #line 155 "printrcy.y" /* yacc.c:1646 */
1450 {
1451 if (current_printer)
1452 stpui_plist_set_command_type(current_printer, (int) (yyvsp[0].dval));
1453 }
1454 #line 1455 "printrcy.c" /* yacc.c:1646 */
1455 break;
1456
1457 case 9:
1458 #line 162 "printrcy.y" /* yacc.c:1646 */
1459 {
1460 if (current_printer)
1461 current_printer->scaling = (yyvsp[0].dval);
1462 }
1463 #line 1464 "printrcy.c" /* yacc.c:1646 */
1464 break;
1465
1466 case 10:
1467 #line 169 "printrcy.y" /* yacc.c:1646 */
1468 {
1469 if (current_printer)
1470 current_printer->orientation = (int) (yyvsp[0].dval);
1471 }
1472 #line 1473 "printrcy.c" /* yacc.c:1646 */
1473 break;
1474
1475 case 11:
1476 #line 176 "printrcy.y" /* yacc.c:1646 */
1477 {
1478 if (current_printer)
1479 current_printer->auto_size_roll_feed_paper = (int) (yyvsp[0].dval);
1480 }
1481 #line 1482 "printrcy.c" /* yacc.c:1646 */
1482 break;
1483
1484 case 12:
1485 #line 183 "printrcy.y" /* yacc.c:1646 */
1486 {
1487 if (current_printer)
1488 current_printer->unit = (int) (yyvsp[0].dval);
1489 }
1490 #line 1491 "printrcy.c" /* yacc.c:1646 */
1491 break;
1492
1493 case 13:
1494 #line 190 "printrcy.y" /* yacc.c:1646 */
1495 {
1496 if (current_printer)
1497 stp_set_left(current_printer->v, (yyvsp[0].dval));
1498 }
1499 #line 1500 "printrcy.c" /* yacc.c:1646 */
1500 break;
1501
1502 case 14:
1503 #line 197 "printrcy.y" /* yacc.c:1646 */
1504 {
1505 if (current_printer)
1506 stp_set_top(current_printer->v, (yyvsp[0].dval));
1507 }
1508 #line 1509 "printrcy.c" /* yacc.c:1646 */
1509 break;
1510
1511 case 15:
1512 #line 204 "printrcy.y" /* yacc.c:1646 */
1513 {
1514 if (current_printer)
1515 {
1516 switch ((int) (yyvsp[0].dval))
1517 {
1518 case 0:
1519 stp_set_string_parameter
1520 (current_printer->v, "PrintingMode", "BW");
1521 break;
1522 case 1:
1523 case 2:
1524 default:
1525 stp_set_string_parameter
1526 (current_printer->v, "PrintingMode", "Color");
1527 break;
1528 }
1529 }
1530 }
1531 #line 1532 "printrcy.c" /* yacc.c:1646 */
1532 break;
1533
1534 case 16:
1535 #line 225 "printrcy.y" /* yacc.c:1646 */
1536 {
1537 if (current_printer)
1538 stp_set_page_width(current_printer->v, (yyvsp[0].dval));
1539 }
1540 #line 1541 "printrcy.c" /* yacc.c:1646 */
1541 break;
1542
1543 case 17:
1544 #line 232 "printrcy.y" /* yacc.c:1646 */
1545 {
1546 if (current_printer)
1547 stp_set_page_height(current_printer->v, (yyvsp[0].dval));
1548 }
1549 #line 1550 "printrcy.c" /* yacc.c:1646 */
1550 break;
1551
1552 case 19:
1553 #line 242 "printrcy.y" /* yacc.c:1646 */
1554 {
1555 if (current_printer)
1556 {
1557 stp_set_int_parameter(current_printer->v, (yyvsp[-3].sval), (int) (yyvsp[0].dval));
1558 if (strcmp((yyvsp[-1].sval), "False") == 0)
1559 stp_set_int_parameter_active(current_printer->v, (yyvsp[-3].sval),
1560 STP_PARAMETER_INACTIVE);
1561 else
1562 stp_set_int_parameter_active(current_printer->v, (yyvsp[-3].sval),
1563 STP_PARAMETER_ACTIVE);
1564 }
1565 g_free((yyvsp[-3].sval));
1566 g_free((yyvsp[-1].sval));
1567 }
1568 #line 1569 "printrcy.c" /* yacc.c:1646 */
1569 break;
1570
1571 case 20:
1572 #line 259 "printrcy.y" /* yacc.c:1646 */
1573 {
1574 if (current_printer)
1575 {
1576 stp_set_string_parameter(current_printer->v, (yyvsp[-3].sval), (yyvsp[0].sval));
1577 if (strcmp((yyvsp[-1].sval), "False") == 0)
1578 stp_set_string_parameter_active(current_printer->v, (yyvsp[-3].sval),
1579 STP_PARAMETER_INACTIVE);
1580 else
1581 stp_set_string_parameter_active(current_printer->v, (yyvsp[-3].sval),
1582 STP_PARAMETER_ACTIVE);
1583 }
1584 g_free((yyvsp[-3].sval));
1585 g_free((yyvsp[-1].sval));
1586 g_free((yyvsp[0].sval));
1587 }
1588 #line 1589 "printrcy.c" /* yacc.c:1646 */
1589 break;
1590
1591 case 21:
1592 #line 277 "printrcy.y" /* yacc.c:1646 */
1593 {
1594 if (current_printer)
1595 {
1596 stp_set_file_parameter(current_printer->v, (yyvsp[-3].sval), (yyvsp[0].sval));
1597 if (strcmp((yyvsp[-1].sval), "False") == 0)
1598 stp_set_file_parameter_active(current_printer->v, (yyvsp[-3].sval),
1599 STP_PARAMETER_INACTIVE);
1600 else
1601 stp_set_file_parameter_active(current_printer->v, (yyvsp[-3].sval),
1602 STP_PARAMETER_ACTIVE);
1603 }
1604 g_free((yyvsp[-3].sval));
1605 g_free((yyvsp[-1].sval));
1606 g_free((yyvsp[0].sval));
1607 }
1608 #line 1609 "printrcy.c" /* yacc.c:1646 */
1609 break;
1610
1611 case 22:
1612 #line 295 "printrcy.y" /* yacc.c:1646 */
1613 {
1614 if (current_printer)
1615 {
1616 stp_set_float_parameter(current_printer->v, (yyvsp[-3].sval), (yyvsp[0].dval));
1617 if (strcmp((yyvsp[-1].sval), "False") == 0)
1618 stp_set_float_parameter_active(current_printer->v, (yyvsp[-3].sval),
1619 STP_PARAMETER_INACTIVE);
1620 else
1621 stp_set_float_parameter_active(current_printer->v, (yyvsp[-3].sval),
1622 STP_PARAMETER_ACTIVE);
1623 }
1624 g_free((yyvsp[-3].sval));
1625 g_free((yyvsp[-1].sval));
1626 }
1627 #line 1628 "printrcy.c" /* yacc.c:1646 */
1628 break;
1629
1630 case 23:
1631 #line 312 "printrcy.y" /* yacc.c:1646 */
1632 {
1633 if (current_printer)
1634 {
1635 stp_set_dimension_parameter(current_printer->v, (yyvsp[-3].sval), (yyvsp[0].dval));
1636 if (strcmp((yyvsp[-1].sval), "False") == 0)
1637 stp_set_dimension_parameter_active(current_printer->v, (yyvsp[-3].sval),
1638 STP_PARAMETER_INACTIVE);
1639 else
1640 stp_set_dimension_parameter_active(current_printer->v, (yyvsp[-3].sval),
1641 STP_PARAMETER_ACTIVE);
1642 }
1643 g_free((yyvsp[-3].sval));
1644 g_free((yyvsp[-1].sval));
1645 }
1646 #line 1647 "printrcy.c" /* yacc.c:1646 */
1647 break;
1648
1649 case 24:
1650 #line 329 "printrcy.y" /* yacc.c:1646 */
1651 {
1652 if (current_printer)
1653 {
1654 if (strcmp((yyvsp[0].sval), "False") == 0)
1655 stp_set_boolean_parameter(current_printer->v, (yyvsp[-3].sval), 0);
1656 else
1657 stp_set_boolean_parameter(current_printer->v, (yyvsp[-3].sval), 1);
1658 if (strcmp((yyvsp[-1].sval), "False") == 0)
1659 stp_set_boolean_parameter_active(current_printer->v, (yyvsp[-3].sval),
1660 STP_PARAMETER_INACTIVE);
1661 else
1662 stp_set_boolean_parameter_active(current_printer->v, (yyvsp[-3].sval),
1663 STP_PARAMETER_ACTIVE);
1664 }
1665 g_free((yyvsp[-3].sval));
1666 g_free((yyvsp[-1].sval));
1667 g_free((yyvsp[0].sval));
1668 }
1669 #line 1670 "printrcy.c" /* yacc.c:1646 */
1670 break;
1671
1672 case 25:
1673 #line 350 "printrcy.y" /* yacc.c:1646 */
1674 {
1675 if (current_printer)
1676 {
1677 stp_curve_t *curve = stp_curve_create_from_string((yyvsp[0].sval));
1678 if (curve)
1679 {
1680 stp_set_curve_parameter(current_printer->v, (yyvsp[-3].sval), curve);
1681 if (strcmp((yyvsp[-1].sval), "False") == 0)
1682 stp_set_curve_parameter_active(current_printer->v, (yyvsp[-3].sval),
1683 STP_PARAMETER_INACTIVE);
1684 else
1685 stp_set_curve_parameter_active(current_printer->v, (yyvsp[-3].sval),
1686 STP_PARAMETER_ACTIVE);
1687 stp_curve_destroy(curve);
1688 }
1689 }
1690 g_free((yyvsp[-3].sval));
1691 g_free((yyvsp[-1].sval));
1692 g_free((yyvsp[0].sval));
1693 }
1694 #line 1695 "printrcy.c" /* yacc.c:1646 */
1695 break;
1696
1697 case 56:
1698 #line 398 "printrcy.y" /* yacc.c:1646 */
1699 { stpui_printrc_current_printer = (yyvsp[0].sval); }
1700 #line 1701 "printrcy.c" /* yacc.c:1646 */
1701 break;
1702
1703 case 57:
1704 #line 402 "printrcy.y" /* yacc.c:1646 */
1705 {
1706 if (strcmp((yyvsp[0].sval), "True") == 0)
1707 stpui_show_all_paper_sizes = 1;
1708 else
1709 stpui_show_all_paper_sizes = 0;
1710 g_free((yyvsp[0].sval));
1711 }
1712 #line 1713 "printrcy.c" /* yacc.c:1646 */
1713 break;
1714
1715 case 61:
1716 #line 418 "printrcy.y" /* yacc.c:1646 */
1717 {
1718 if ((yyvsp[0].sval))
1719 {
1720 stpui_set_global_parameter((yyvsp[-1].sval), (yyvsp[0].sval));
1721 g_free((yyvsp[0].sval));
1722 }
1723 g_free((yyvsp[-1].sval));
1724 }
1725 #line 1726 "printrcy.c" /* yacc.c:1646 */
1726 break;
1727
1728
1729 #line 1730 "printrcy.c" /* yacc.c:1646 */
1730 default: break;
1731 }
1732 /* User semantic actions sometimes alter yychar, and that requires
1733 that yytoken be updated with the new translation. We take the
1734 approach of translating immediately before every use of yytoken.
1735 One alternative is translating here after every semantic action,
1736 but that translation would be missed if the semantic action invokes
1737 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1738 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1739 incorrect destructor might then be invoked immediately. In the
1740 case of YYERROR or YYBACKUP, subsequent parser actions might lead
1741 to an incorrect destructor call or verbose syntax error message
1742 before the lookahead is translated. */
1743 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1744
1745 YYPOPSTACK (yylen);
1746 yylen = 0;
1747 YY_STACK_PRINT (yyss, yyssp);
1748
1749 *++yyvsp = yyval;
1750
1751 /* Now 'shift' the result of the reduction. Determine what state
1752 that goes to, based on the state we popped back to and the rule
1753 number reduced by. */
1754
1755 yyn = yyr1[yyn];
1756
1757 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1758 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1759 yystate = yytable[yystate];
1760 else
1761 yystate = yydefgoto[yyn - YYNTOKENS];
1762
1763 goto yynewstate;
1764
1765
1766 /*--------------------------------------.
1767 | yyerrlab -- here on detecting error. |
1768 `--------------------------------------*/
1769 yyerrlab:
1770 /* Make sure we have latest lookahead translation. See comments at
1771 user semantic actions for why this is necessary. */
1772 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1773
1774 /* If not already recovering from an error, report this error. */
1775 if (!yyerrstatus)
1776 {
1777 ++yynerrs;
1778 #if ! YYERROR_VERBOSE
1779 yyerror (YY_("syntax error"));
1780 #else
1781 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1782 yyssp, yytoken)
1783 {
1784 char const *yymsgp = YY_("syntax error");
1785 int yysyntax_error_status;
1786 yysyntax_error_status = YYSYNTAX_ERROR;
1787 if (yysyntax_error_status == 0)
1788 yymsgp = yymsg;
1789 else if (yysyntax_error_status == 1)
1790 {
1791 if (yymsg != yymsgbuf)
1792 YYSTACK_FREE (yymsg);
1793 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
1794 if (!yymsg)
1795 {
1796 yymsg = yymsgbuf;
1797 yymsg_alloc = sizeof yymsgbuf;
1798 yysyntax_error_status = 2;
1799 }
1800 else
1801 {
1802 yysyntax_error_status = YYSYNTAX_ERROR;
1803 yymsgp = yymsg;
1804 }
1805 }
1806 yyerror (yymsgp);
1807 if (yysyntax_error_status == 2)
1808 goto yyexhaustedlab;
1809 }
1810 # undef YYSYNTAX_ERROR
1811 #endif
1812 }
1813
1814
1815
1816 if (yyerrstatus == 3)
1817 {
1818 /* If just tried and failed to reuse lookahead token after an
1819 error, discard it. */
1820
1821 if (yychar <= YYEOF)
1822 {
1823 /* Return failure if at end of input. */
1824 if (yychar == YYEOF)
1825 YYABORT;
1826 }
1827 else
1828 {
1829 yydestruct ("Error: discarding",
1830 yytoken, &yylval);
1831 yychar = YYEMPTY;
1832 }
1833 }
1834
1835 /* Else will try to reuse lookahead token after shifting the error
1836 token. */
1837 goto yyerrlab1;
1838
1839
1840 /*---------------------------------------------------.
1841 | yyerrorlab -- error raised explicitly by YYERROR. |
1842 `---------------------------------------------------*/
1843 yyerrorlab:
1844
1845 /* Pacify compilers like GCC when the user code never invokes
1846 YYERROR and the label yyerrorlab therefore never appears in user
1847 code. */
1848 if (/*CONSTCOND*/ 0)
1849 goto yyerrorlab;
1850
1851 /* Do not reclaim the symbols of the rule whose action triggered
1852 this YYERROR. */
1853 YYPOPSTACK (yylen);
1854 yylen = 0;
1855 YY_STACK_PRINT (yyss, yyssp);
1856 yystate = *yyssp;
1857 goto yyerrlab1;
1858
1859
1860 /*-------------------------------------------------------------.
1861 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1862 `-------------------------------------------------------------*/
1863 yyerrlab1:
1864 yyerrstatus = 3; /* Each real token shifted decrements this. */
1865
1866 for (;;)
1867 {
1868 yyn = yypact[yystate];
1869 if (!yypact_value_is_default (yyn))
1870 {
1871 yyn += YYTERROR;
1872 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1873 {
1874 yyn = yytable[yyn];
1875 if (0 < yyn)
1876 break;
1877 }
1878 }
1879
1880 /* Pop the current state because it cannot handle the error token. */
1881 if (yyssp == yyss)
1882 YYABORT;
1883
1884
1885 yydestruct ("Error: popping",
1886 yystos[yystate], yyvsp);
1887 YYPOPSTACK (1);
1888 yystate = *yyssp;
1889 YY_STACK_PRINT (yyss, yyssp);
1890 }
1891
1892 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1893 *++yyvsp = yylval;
1894 YY_IGNORE_MAYBE_UNINITIALIZED_END
1895
1896
1897 /* Shift the error token. */
1898 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1899
1900 yystate = yyn;
1901 goto yynewstate;
1902
1903
1904 /*-------------------------------------.
1905 | yyacceptlab -- YYACCEPT comes here. |
1906 `-------------------------------------*/
1907 yyacceptlab:
1908 yyresult = 0;
1909 goto yyreturn;
1910
1911 /*-----------------------------------.
1912 | yyabortlab -- YYABORT comes here. |
1913 `-----------------------------------*/
1914 yyabortlab:
1915 yyresult = 1;
1916 goto yyreturn;
1917
1918 #if !defined yyoverflow || YYERROR_VERBOSE
1919 /*-------------------------------------------------.
1920 | yyexhaustedlab -- memory exhaustion comes here. |
1921 `-------------------------------------------------*/
1922 yyexhaustedlab:
1923 yyerror (YY_("memory exhausted"));
1924 yyresult = 2;
1925 /* Fall through. */
1926 #endif
1927
1928 yyreturn:
1929 if (yychar != YYEMPTY)
1930 {
1931 /* Make sure we have latest lookahead translation. See comments at
1932 user semantic actions for why this is necessary. */
1933 yytoken = YYTRANSLATE (yychar);
1934 yydestruct ("Cleanup: discarding lookahead",
1935 yytoken, &yylval);
1936 }
1937 /* Do not reclaim the symbols of the rule whose action triggered
1938 this YYABORT or YYACCEPT. */
1939 YYPOPSTACK (yylen);
1940 YY_STACK_PRINT (yyss, yyssp);
1941 while (yyssp != yyss)
1942 {
1943 yydestruct ("Cleanup: popping",
1944 yystos[*yyssp], yyvsp);
1945 YYPOPSTACK (1);
1946 }
1947 #ifndef yyoverflow
1948 if (yyss != yyssa)
1949 YYSTACK_FREE (yyss);
1950 #endif
1951 #if YYERROR_VERBOSE
1952 if (yymsg != yymsgbuf)
1953 YYSTACK_FREE (yymsg);
1954 #endif
1955 return yyresult;
1956 }
1957 #line 443 "printrcy.y" /* yacc.c:1906 */
1958
1959