GnuCOBOL  2.0
A free COBOL compiler
ppparse.c
Go to the documentation of this file.
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 /* Substitute the variable and function names. */
63 #define yyparse ppparse
64 #define yylex pplex
65 #define yyerror pperror
66 #define yydebug ppdebug
67 #define yynerrs ppnerrs
68 
69 #define yylval pplval
70 #define yychar ppchar
71 
72 /* Copy the first part of user declarations. */
73 #line 29 "ppparse.y" /* yacc.c:339 */
74 
75 #include "config.h"
76 
77 #include <stdio.h>
78 #include <stdarg.h>
79 #include <stdlib.h>
80 #include <string.h>
81 #include <ctype.h>
82 
83 #define COB_IN_PPPARSE 1
84 #include "cobc.h"
85 
86 #ifndef _STDLIB_H
87 #define _STDLIB_H 1
88 #endif
89 
90 #define pperror cb_error
91 
92 #define COND_EQ 0
93 #define COND_LT 1U
94 #define COND_GT 2U
95 #define COND_LE 3U
96 #define COND_GE 4U
97 #define COND_NE 5U
98 
99 /* Local variables */
100 
102 static unsigned int current_cmd;
103 
104 #if 0 /* RXWRXW OPT */
105 static const char * const compopts[] = {
106  "ibm",
107  "ibmcomp",
108  "iso2002",
109  "mf",
110  "mfcomment",
111  "sticky-linkage",
112  "trunc",
113  "noibmcomp",
114  "nofold-copy-name",
115  "nofoldcopyname",
116  "nomfcomment",
117  "nosticky-linkage",
118  "notrunc"
119 };
120 
121 static const char * const varopts[] = {
122  "fold-copy-name",
123  "foldcopyname",
124  "sourceformat",
125  "trunc"
126 };
127 #endif
128 
129 /* Local functions */
130 
131 static char *
133 {
134  /* remove quotation from alphanumeric literals */
135  if (name[0] == '\'' || name[0] == '\"') {
136  name++;
137  name[strlen (name) - 1] = 0;
138  }
139  return name;
140 }
141 
142 static char *
144 {
145  unsigned char *p;
146 
147  for (p = (unsigned char *)name; *p; p++) {
148  if (isupper (*p)) {
149  *p = (cob_u8_t)tolower (*p);
150  }
151  }
152  return name;
153 }
154 
155 static char *
157 {
158  unsigned char *p;
159 
160  for (p = (unsigned char *)name; *p; p++) {
161  if (islower (*p)) {
162  *p = (cob_u8_t)toupper (*p);
163  }
164  }
165  return name;
166 }
167 
168 static struct cb_replace_list *
170  const struct cb_text_list *old_text,
171  const struct cb_text_list *new_text,
172  const unsigned int lead_or_trail)
173 {
174  struct cb_replace_list *p;
175 
176  p = cobc_plex_malloc (sizeof (struct cb_replace_list));
177  p->old_text = old_text;
178  p->new_text = new_text;
179  p->lead_trail = lead_or_trail;
180  if (!list) {
181  p->last = p;
182  return p;
183  }
184  list->last->next = p;
185  list->last = p;
186  return list;
187 }
188 
189 static unsigned int
190 ppp_set_value (struct cb_define_struct *p, const char *value)
191 {
192  const char *s;
193  size_t size;
194  unsigned int dotseen;
195  int sign;
196  int int_part;
197  int dec_part;
198 
199  if (!value) {
200  p->deftype = PLEX_DEF_NONE;
201  p->value = NULL;
202  p->sign = 0;
203  p->int_part = 0;
204  p->dec_part = 0;
205  return 0;
206  }
207 
208  if (*value == '"' || *value == '\'') {
209  sign = *value;
210  p->value = cobc_plex_strdup (value + 1);
211  size = strlen (p->value) - 1;
212  if (sign != p->value[size]) {
213  p->value = NULL;
214  p->deftype = PLEX_DEF_NONE;
215  return 1;
216  }
217  p->value[size] = 0;
218  p->deftype = PLEX_DEF_LIT;
219  p->sign = 0;
220  p->int_part = 0;
221  p->dec_part = 0;
222  return 0;
223  }
224 
225  p->value = cobc_plex_strdup (value);
226  p->deftype = PLEX_DEF_NUM;
227  p->sign = 0;
228  p->int_part = 0;
229  p->dec_part = 0;
230 
231  sign = 0;
232  if (*value == '+') {
233  value++;
234  } else if (*value == '-') {
235  value++;
236  sign = 1;
237  }
238  int_part = 0;
239  dec_part = 0;
240  size = 0;
241  dotseen = 0;
242  s = value;
243  for ( ; *s; ++s, ++size) {
244  if (*s == '.') {
245  if (dotseen) {
246  p->deftype = PLEX_DEF_NONE;
247  return 1;
248  }
249  dotseen = 1;
250  continue;
251  }
252  if (*s > '9' || *s < '0') {
253  p->deftype = PLEX_DEF_NONE;
254  return 1;
255  }
256  if (!dotseen) {
257  int_part = (int_part * 10) + (*s - '0');
258  } else {
259  dec_part = (dec_part * 10) + (*s - '0');
260  }
261  }
262 
263  if (!int_part && !dec_part) {
264  sign = 0;
265  }
266  p->sign = sign;
267  p->int_part = int_part;
268  p->dec_part = dec_part;
269  return 0;
270 }
271 
272 static unsigned int
274  const struct cb_define_struct *p2,
275  const unsigned int cond)
276 {
277  int result;
278 
279  if (!p1 || !p2) {
280  return 0;
281  }
282  if (p1->deftype != PLEX_DEF_LIT && p1->deftype != PLEX_DEF_NUM) {
283  return 0;
284  }
285  if (p2->deftype != PLEX_DEF_LIT && p2->deftype != PLEX_DEF_NUM) {
286  return 0;
287  }
288  if (p1->deftype != p2->deftype) {
289  cb_warning (_("Directive comparison on different types"));
290  return 0;
291  }
292  if (p1->deftype == PLEX_DEF_LIT) {
293  result = strcmp (p1->value, p2->value);
294  } else {
295  if (p1->sign && !p2->sign) {
296  result = -1;
297  } else if (!p1->sign && p2->sign) {
298  result = 1;
299  } else if (p1->int_part < p2->int_part) {
300  if (p1->sign) {
301  result = 1;
302  } else {
303  result = -1;
304  }
305  } else if (p1->int_part > p2->int_part) {
306  if (p1->sign) {
307  result = -1;
308  } else {
309  result = 1;
310  }
311  } else if (p1->dec_part < p2->dec_part) {
312  if (p1->sign) {
313  result = 1;
314  } else {
315  result = -1;
316  }
317  } else if (p1->dec_part > p2->dec_part) {
318  if (p1->sign) {
319  result = -1;
320  } else {
321  result = 1;
322  }
323  } else {
324  result = 0;
325  }
326  }
327  switch (cond) {
328  case COND_EQ:
329  return (result == 0);
330  case COND_LT:
331  return (result < 0);
332  case COND_GT:
333  return (result > 0);
334  case COND_LE:
335  return (result <= 0);
336  case COND_GE:
337  return (result >= 0);
338  case COND_NE:
339  return (result != 0);
340  default:
341  break;
342  }
343  return 0;
344 }
345 
346 static struct cb_define_struct *
347 ppp_define_add (struct cb_define_struct *list, const char *name,
348  const char *text, const unsigned int override)
349 {
350  struct cb_define_struct *p;
351  struct cb_define_struct *l;
352 
353  /* Check duplicate */
354  for (l = list; l; l = l->next) {
355  if (!strcasecmp (name, l->name)) {
356  if (!override && l->deftype != PLEX_DEF_DEL) {
357  cb_error (_("Duplicate define"));
358  return NULL;
359  }
360  if (l->value) {
361  l->value = NULL;
362  }
363  if (ppp_set_value (l, text)) {
364  cb_error (_("Invalid constant"));
365  return NULL;
366  }
367  return list;
368  }
369  }
370 
371  p = cobc_plex_malloc (sizeof (struct cb_define_struct));
372  p->name = cobc_plex_strdup (name);
373  if (ppp_set_value (p, text)) {
374  cb_error (_("Invalid constant"));
375  return NULL;
376  }
377 
378  if (!list) {
379  p->last = p;
380  return p;
381  }
382  list->last->next = p;
383  list->last = p;
384  return list;
385 }
386 
387 static void
388 ppp_define_del (const char *name)
389 {
390  struct cb_define_struct *l;
391 
392  for (l = ppp_setvar_list; l; l = l->next) {
393  if (!strcmp (name, l->name)) {
394  l->deftype = PLEX_DEF_DEL;
395  if (l->value) {
396  l->value = NULL;
397  }
398  l->sign = 0;
399  l->int_part = 0;
400  l->dec_part = 0;
401  break;
402  }
403  }
404 }
405 
406 static struct cb_define_struct *
407 ppp_search_lists (const char *name)
408 {
409  struct cb_define_struct *p;
410 
411  for (p = ppp_setvar_list; p; p = p->next) {
412  if (!strcasecmp (name, p->name)) {
413  if (p->deftype != PLEX_DEF_DEL) {
414  return p;
415  }
416  break;
417  }
418  }
419  return NULL;
420 }
421 
422 static struct cb_text_list *
423 ppp_list_add (struct cb_text_list *list, const char *text)
424 {
425  struct cb_text_list *p;
426 
427  p = cobc_plex_malloc (sizeof (struct cb_text_list));
428  p->text = cobc_plex_strdup (text);
429  if (!list) {
430  p->last = p;
431  return p;
432  }
433  list->last->next = p;
434  list->last = p;
435  return list;
436 }
437 
438 static unsigned int
439 ppp_search_comp_vars (const char *name)
440 {
441 #undef CB_PARSE_DEF
442 #define CB_PARSE_DEF(x,z) if (!strcasecmp (name, x)) return (z);
443 #include "ppparse.def"
444 #undef CB_PARSE_DEF
445  return 0;
446 }
447 
448 static unsigned int
449 ppp_check_needs_quote (const char *envval)
450 {
451  const char *s;
452  size_t size;
453  unsigned int dot_seen;
454  unsigned int sign_seen;
455 
456  /* Non-quoted value - Check if possible numeric */
457  dot_seen = 0;
458  sign_seen = 0;
459  size = 0;
460  s = envval;
461  if (*s == '+' || *s == '-') {
462  sign_seen = 1;
463  size++;
464  s++;
465  }
466  for (; *s; ++s) {
467  if (*s == '.') {
468  if (dot_seen) {
469  break;
470  }
471  dot_seen = 1;
472  size++;
473  continue;
474  }
475  if (*s > '9' || *s < '0') {
476  break;
477  }
478  size++;
479  }
480 
481  if (*s || size <= (dot_seen + sign_seen)) {
482  return 1;
483  }
484  return 0;
485 }
486 
487 /* Global functions */
488 
489 void
491 {
492  const struct cb_define_struct *q;
493 
494  ppp_setvar_list = NULL;
495  /* Set standard DEFINE's */
496  if (cb_perform_osvs) {
497  ppp_setvar_list = ppp_define_add (ppp_setvar_list,
498  "PERFORM-TYPE",
499  "'OSVS'", 0);
500  } else {
501  ppp_setvar_list = ppp_define_add (ppp_setvar_list,
502  "PERFORM-TYPE",
503  "'MF'", 0);
504  }
505  if (cb_ebcdic_sign) {
506  ppp_setvar_list = ppp_define_add (ppp_setvar_list,
507  "SIGN",
508  "'EBCDIC'", 0);
509  } else {
510  ppp_setvar_list = ppp_define_add (ppp_setvar_list,
511  "SIGN",
512  "'ASCII'", 0);
513  }
514 #ifdef WORDS_BIGENDIAN
515  ppp_setvar_list = ppp_define_add (ppp_setvar_list,
516  "ENDIAN",
517  "'BIG'", 0);
518 #else
519  ppp_setvar_list = ppp_define_add (ppp_setvar_list,
520  "ENDIAN",
521  "'LITTLE'", 0);
522 #endif
523 #if ' ' == 0x20
524  ppp_setvar_list = ppp_define_add (ppp_setvar_list,
525  "CHARSET",
526  "'ASCII'", 0);
527 #elif ' ' == 0x40
528  ppp_setvar_list = ppp_define_add (ppp_setvar_list,
529  "CHARSET",
530  "'EBCDIC'", 0);
531 #else
532  ppp_setvar_list = ppp_define_add (ppp_setvar_list,
533  "CHARSET",
534  "'UNKNOWN'", 0);
535 #endif
536  /* Set DEFINE's from '-D' option(s) */
537  for (q = p; q; q = q->next) {
538  ppp_setvar_list = ppp_define_add (ppp_setvar_list,
539  q->name,
540  q->value, 0);
541  }
542 }
543 
544 
545 #line 546 "ppparse.c" /* yacc.c:339 */
546 
547 # ifndef YY_NULLPTR
548 # if defined __cplusplus && 201103L <= __cplusplus
549 # define YY_NULLPTR nullptr
550 # else
551 # define YY_NULLPTR 0
552 # endif
553 # endif
554 
555 /* Enabling verbose error messages. */
556 #ifdef YYERROR_VERBOSE
557 # undef YYERROR_VERBOSE
558 # define YYERROR_VERBOSE 1
559 #else
560 # define YYERROR_VERBOSE 1
561 #endif
562 
563 /* In a future release of Bison, this section will be replaced
564  by #include "ppparse.h". */
565 #ifndef YY_PP_PPPARSE_H_INCLUDED
566 # define YY_PP_PPPARSE_H_INCLUDED
567 /* Debug traces. */
568 #ifndef YYDEBUG
569 # define YYDEBUG 0
570 #endif
571 #if YYDEBUG
572 extern int ppdebug;
573 #endif
574 
575 /* Token type. */
576 #ifndef YYTOKENTYPE
577 # define YYTOKENTYPE
579  {
581  ALSO = 258,
582  BY = 259,
583  COPY = 260,
584  EQEQ = 261,
585  IN = 262,
586  LAST = 263,
587  LEADING = 264,
588  OF = 265,
589  OFF = 266,
590  PRINTING = 267,
591  REPLACE = 268,
592  REPLACING = 269,
593  SUPPRESS = 270,
594  TRAILING = 271,
595  DOT = 272,
596  GARBAGE = 273,
598  FORMAT = 275,
599  IS = 276,
600  FIXED = 277,
601  FREE = 278,
603  AS = 280,
604  PARAMETER = 281,
605  OVERRIDE = 282,
607  CONSTANT = 284,
615  GE = 292,
616  LE = 293,
617  LT = 294,
618  GT = 295,
619  EQ = 296,
620  NE = 297,
621  NOT = 298,
622  THAN = 299,
623  TO = 300,
624  OR = 301,
625  EQUAL = 302,
626  GREATER = 303,
627  LESS = 304,
628  SET = 305,
629  DEFINED = 306,
631  ON = 308,
632  CHECKING = 309,
633  WITH = 310,
634  LOCATION = 311,
635  TERMINATOR = 312,
636  TOKEN = 313,
637  VARIABLE = 314,
638  LITERAL = 315
639  };
640 #endif
641 
642 /* Value type. */
643 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
644 
645 union YYSTYPE
646 {
647 #line 501 "ppparse.y" /* yacc.c:355 */
648 
649  char *s;
650  struct cb_text_list *l;
653  unsigned int ui;
654  int si;
655 
656 #line 657 "ppparse.c" /* yacc.c:355 */
657 };
658 
659 typedef union YYSTYPE YYSTYPE;
660 # define YYSTYPE_IS_TRIVIAL 1
661 # define YYSTYPE_IS_DECLARED 1
662 #endif
663 
664 
665 extern YYSTYPE pplval;
666 
667 int ppparse (void);
668 
669 #endif /* !YY_PP_PPPARSE_H_INCLUDED */
670 
671 /* Copy the second part of user declarations. */
672 
673 #line 674 "ppparse.c" /* yacc.c:358 */
674 
675 #ifdef short
676 # undef short
677 #endif
678 
679 #ifdef YYTYPE_UINT8
680 typedef YYTYPE_UINT8 yytype_uint8;
681 #else
682 typedef unsigned char yytype_uint8;
683 #endif
684 
685 #ifdef YYTYPE_INT8
686 typedef YYTYPE_INT8 yytype_int8;
687 #else
688 typedef signed char yytype_int8;
689 #endif
690 
691 #ifdef YYTYPE_UINT16
692 typedef YYTYPE_UINT16 yytype_uint16;
693 #else
694 typedef unsigned short int yytype_uint16;
695 #endif
696 
697 #ifdef YYTYPE_INT16
698 typedef YYTYPE_INT16 yytype_int16;
699 #else
700 typedef short int yytype_int16;
701 #endif
702 
703 #ifndef YYSIZE_T
704 # ifdef __SIZE_TYPE__
705 # define YYSIZE_T __SIZE_TYPE__
706 # elif defined size_t
707 # define YYSIZE_T size_t
708 # elif ! defined YYSIZE_T
709 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
710 # define YYSIZE_T size_t
711 # else
712 # define YYSIZE_T unsigned int
713 # endif
714 #endif
715 
716 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
717 
718 #ifndef YY_
719 # if defined YYENABLE_NLS && YYENABLE_NLS
720 # if ENABLE_NLS
721 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
722 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
723 # endif
724 # endif
725 # ifndef YY_
726 # define YY_(Msgid) Msgid
727 # endif
728 #endif
729 
730 #ifndef YY_ATTRIBUTE
731 # if (defined __GNUC__ \
732  && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
733  || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
734 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
735 # else
736 # define YY_ATTRIBUTE(Spec) /* empty */
737 # endif
738 #endif
739 
740 #ifndef YY_ATTRIBUTE_PURE
741 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
742 #endif
743 
744 #ifndef YY_ATTRIBUTE_UNUSED
745 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
746 #endif
747 
748 #if !defined _Noreturn \
749  && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
750 # if defined _MSC_VER && 1200 <= _MSC_VER
751 # define _Noreturn __declspec (noreturn)
752 # else
753 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
754 # endif
755 #endif
756 
757 /* Suppress unused-variable warnings by "using" E. */
758 #if ! defined lint || defined __GNUC__
759 # define YYUSE(E) ((void) (E))
760 #else
761 # define YYUSE(E) /* empty */
762 #endif
763 
764 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
765 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
766 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
767  _Pragma ("GCC diagnostic push") \
768  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
769  _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
770 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
771  _Pragma ("GCC diagnostic pop")
772 #else
773 # define YY_INITIAL_VALUE(Value) Value
774 #endif
775 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
776 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
777 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
778 #endif
779 #ifndef YY_INITIAL_VALUE
780 # define YY_INITIAL_VALUE(Value) /* Nothing. */
781 #endif
782 
783 
784 #if ! defined yyoverflow || YYERROR_VERBOSE
785 
786 /* The parser invokes alloca or malloc; define the necessary symbols. */
787 
788 # ifdef YYSTACK_USE_ALLOCA
789 # if YYSTACK_USE_ALLOCA
790 # ifdef __GNUC__
791 # define YYSTACK_ALLOC __builtin_alloca
792 # elif defined __BUILTIN_VA_ARG_INCR
793 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
794 # elif defined _AIX
795 # define YYSTACK_ALLOC __alloca
796 # elif defined _MSC_VER
797 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
798 # define alloca _alloca
799 # else
800 # define YYSTACK_ALLOC alloca
801 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
802 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
803  /* Use EXIT_SUCCESS as a witness for stdlib.h. */
804 # ifndef EXIT_SUCCESS
805 # define EXIT_SUCCESS 0
806 # endif
807 # endif
808 # endif
809 # endif
810 # endif
811 
812 # ifdef YYSTACK_ALLOC
813  /* Pacify GCC's 'empty if-body' warning. */
814 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
815 # ifndef YYSTACK_ALLOC_MAXIMUM
816  /* The OS might guarantee only one guard page at the bottom of the stack,
817  and a page size can be as small as 4096 bytes. So we cannot safely
818  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
819  to allow for a few compiler-allocated temporary stack slots. */
820 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
821 # endif
822 # else
823 # define YYSTACK_ALLOC YYMALLOC
824 # define YYSTACK_FREE YYFREE
825 # ifndef YYSTACK_ALLOC_MAXIMUM
826 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
827 # endif
828 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
829  && ! ((defined YYMALLOC || defined malloc) \
830  && (defined YYFREE || defined free)))
831 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
832 # ifndef EXIT_SUCCESS
833 # define EXIT_SUCCESS 0
834 # endif
835 # endif
836 # ifndef YYMALLOC
837 # define YYMALLOC malloc
838 # if ! defined malloc && ! defined EXIT_SUCCESS
839 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
840 # endif
841 # endif
842 # ifndef YYFREE
843 # define YYFREE free
844 # if ! defined free && ! defined EXIT_SUCCESS
845 void free (void *); /* INFRINGES ON USER NAME SPACE */
846 # endif
847 # endif
848 # endif
849 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
850 
851 
852 #if (! defined yyoverflow \
853  && (! defined __cplusplus \
854  || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
855 
856 /* A type that is properly aligned for any stack member. */
857 union yyalloc
858 {
861 };
862 
863 /* The size of the maximum gap between one aligned stack and the next. */
864 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
865 
866 /* The size of an array large to enough to hold all stacks, each with
867  N elements. */
868 # define YYSTACK_BYTES(N) \
869  ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
870  + YYSTACK_GAP_MAXIMUM)
871 
872 # define YYCOPY_NEEDED 1
873 
874 /* Relocate STACK from its old location to the new one. The
875  local variables YYSIZE and YYSTACKSIZE give the old and new number of
876  elements in the stack, and YYPTR gives the new location of the
877  stack. Advance YYPTR to a properly aligned location for the next
878  stack. */
879 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
880  do \
881  { \
882  YYSIZE_T yynewbytes; \
883  YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
884  Stack = &yyptr->Stack_alloc; \
885  yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
886  yyptr += yynewbytes / sizeof (*yyptr); \
887  } \
888  while (0)
889 
890 #endif
891 
892 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
893 /* Copy COUNT objects from SRC to DST. The source and destination do
894  not overlap. */
895 # ifndef YYCOPY
896 # if defined __GNUC__ && 1 < __GNUC__
897 # define YYCOPY(Dst, Src, Count) \
898  __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
899 # else
900 # define YYCOPY(Dst, Src, Count) \
901  do \
902  { \
903  YYSIZE_T yyi; \
904  for (yyi = 0; yyi < (Count); yyi++) \
905  (Dst)[yyi] = (Src)[yyi]; \
906  } \
907  while (0)
908 # endif
909 # endif
910 #endif /* !YYCOPY_NEEDED */
911 
912 /* YYFINAL -- State number of the termination state. */
913 #define YYFINAL 2
914 /* YYLAST -- Last index in YYTABLE. */
915 #define YYLAST 166
916 
917 /* YYNTOKENS -- Number of terminals. */
918 #define YYNTOKENS 63
919 /* YYNNTS -- Number of nonterminals. */
920 #define YYNNTS 45
921 /* YYNRULES -- Number of rules. */
922 #define YYNRULES 116
923 /* YYNSTATES -- Number of states. */
924 #define YYNSTATES 180
925 
926 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
927  by yylex, with out-of-bounds checking. */
928 #define YYUNDEFTOK 2
929 #define YYMAXUTOK 315
930 
931 #define YYTRANSLATE(YYX) \
932  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
933 
934 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
935  as returned by yylex, without out-of-bounds checking. */
936 static const yytype_uint8 yytranslate[] =
937 {
938  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
939  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
940  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
941  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
942  61, 62, 2, 2, 2, 2, 2, 2, 2, 2,
943  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
944  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
945  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
946  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
947  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
948  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
949  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
950  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
951  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
952  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
953  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
954  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
955  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
956  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
957  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
958  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
959  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
960  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
961  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
962  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
963  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
964  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
965  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
966  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
967  35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
968  45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
969  55, 56, 57, 58, 59, 60
970 };
971 
972 #if YYDEBUG
973  /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
974 static const yytype_uint16 yyrline[] =
975 {
976  0, 604, 604, 605, 609, 610, 611, 615, 616, 617,
977  618, 620, 619, 625, 624, 629, 633, 640, 641, 645,
978  655, 656, 680, 684, 712, 715, 722, 726, 730, 734,
979  742, 746, 780, 789, 799, 807, 814, 815, 818, 820,
980  821, 822, 826, 827, 831, 838, 845, 855, 870, 877,
981  878, 882, 895, 909, 913, 917, 921, 925, 929, 933,
982  937, 941, 945, 949, 956, 979, 982, 989, 990, 993,
983  994, 999, 1002, 1009, 1013, 1020, 1024, 1028, 1032, 1039,
984  1043, 1050, 1054, 1058, 1065, 1072, 1076, 1083, 1087, 1094,
985  1098, 1105, 1112, 1127, 1131, 1139, 1143, 1153, 1156, 1164,
986  1167, 1175, 1178, 1186, 1189, 1195, 1195, 1196, 1196, 1197,
987  1197, 1198, 1198, 1199, 1199, 1200, 1200
988 };
989 #endif
990 
991 #if YYDEBUG || YYERROR_VERBOSE || 1
992 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
993  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
994 static const char *const yytname[] =
995 {
996  "\"end of file\"", "error", "$undefined", "ALSO", "BY", "COPY",
997  "\"==\"", "IN", "LAST", "LEADING", "OF", "OFF", "PRINTING", "REPLACE",
998  "REPLACING", "SUPPRESS", "TRAILING", "\".\"", "\"word\"",
999  "SOURCE_DIRECTIVE", "FORMAT", "IS", "FIXED", "FREE", "DEFINE_DIRECTIVE",
1000  "AS", "PARAMETER", "OVERRIDE", "SET_DIRECTIVE", "CONSTANT",
1001  "SOURCEFORMAT", "FOLDCOPYNAME", "NOFOLDCOPYNAME", "IF_DIRECTIVE",
1002  "ELSE_DIRECTIVE", "ENDIF_DIRECTIVE", "ELIF_DIRECTIVE", "\">=\"",
1003  "\"<=\"", "\"<\"", "\">\"", "\"=\"", "\"<>\"", "NOT", "THAN", "TO", "OR",
1004  "EQUAL", "GREATER", "LESS", "SET", "DEFINED", "TURN_DIRECTIVE", "ON",
1005  "CHECKING", "WITH", "LOCATION", "\"end of line\"",
1006  "\"Identifier or Literal\"", "\"Variable\"", "\"Literal\"", "'('", "')'",
1007  "$accept", "statement_list", "statement", "directive", "$@1", "$@2",
1008  "set_directive", "set_choice", "set_options", "source_directive",
1009  "format_type", "define_directive", "turn_directive", "ec_list",
1010  "on_or_off", "with_loc", "if_directive", "variable_or_literal",
1011  "object_id", "condition_clause", "copy_statement", "copy_in", "in_or_of",
1012  "copy_suppress", "copy_replacing", "replace_statement", "replacing_list",
1013  "text_src", "text_dst", "text_partial_src", "text_partial_dst",
1014  "token_list", "identifier", "subscripts", "lead_trail", "_override",
1015  "_not", "_also", "_last", "_as", "_format", "_is", "_printing", "_than",
1016  "_to", YY_NULLPTR
1017 };
1018 #endif
1019 
1020 # ifdef YYPRINT
1021 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
1022  (internal) symbol number NUM (which must be that of a token). */
1023 static const yytype_uint16 yytoknum[] =
1024 {
1025  0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1026  265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1027  275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1028  285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1029  295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1030  305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1031  315, 40, 41
1032 };
1033 # endif
1034 
1035 #define YYPACT_NINF -73
1036 
1037 #define yypact_value_is_default(Yystate) \
1038  (!!((Yystate) == (-73)))
1039 
1040 #define YYTABLE_NINF -106
1041 
1042 #define yytable_value_is_error(Yytable_value) \
1043  0
1044 
1045  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1046  STATE-NUM. */
1047 static const yytype_int16 yypact[] =
1048 {
1049  -73, 3, -73, -32, 105, 23, 12, 47, -73, -73,
1050  -73, -73, -25, -73, -9, 40, 43, 37, -73, -73,
1051  1, 51, -73, -73, 61, 9, 4, -73, -73, -73,
1052  50, 82, 82, -73, 15, 47, -73, 21, 21, -73,
1053  -73, -24, -73, -73, -73, -73, -73, 102, 60, 62,
1054  -73, -73, -73, 1, 115, -5, 116, -73, -73, 10,
1055  82, -73, -7, 82, 64, 65, -73, 66, -73, -12,
1056  -6, -73, -73, -73, 14, -73, 109, 113, -73, -73,
1057  0, 119, 116, 5, 70, 71, 72, 73, 128, -73,
1058  -73, -73, -73, 74, -73, 106, 106, 75, -73, -73,
1059  -73, 93, 93, -73, 18, 81, -73, -73, -73, -73,
1060  -73, 1, -73, -73, -73, 5, 134, 6, -73, -5,
1061  -73, -73, -73, -16, 133, 135, 106, -73, -73, -73,
1062  -73, -73, 48, 63, -73, -73, 1, -73, 135, -73,
1063  7, -73, -73, -73, 8, -73, -73, -73, -73, -73,
1064  -73, -73, -73, 95, 98, 98, -73, -73, 32, 32,
1065  -73, -73, -73, 137, -73, -73, -73, 99, 100, -73,
1066  -73, -73, -73, -73, 97, 101, 95, 95, -73, -73
1067 };
1068 
1069  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1070  Performed when YYTABLE does not specify something else to do. Zero
1071  means the default is an error. */
1072 static const yytype_uint8 yydefact[] =
1073 {
1074  2, 0, 1, 0, 101, 107, 0, 0, 11, 15,
1075  16, 13, 0, 3, 0, 0, 0, 65, 102, 104,
1076  0, 0, 108, 7, 109, 0, 105, 50, 8, 34,
1077  0, 105, 105, 22, 24, 9, 17, 0, 0, 36,
1078  10, 0, 6, 4, 5, 67, 68, 69, 0, 0,
1079  95, 96, 89, 73, 0, 80, 0, 74, 110, 0,
1080  105, 106, 0, 105, 0, 0, 20, 0, 18, 109,
1081  109, 12, 48, 14, 38, 37, 111, 71, 66, 87,
1082  0, 0, 0, 0, 0, 0, 0, 0, 0, 29,
1083  27, 28, 26, 0, 30, 97, 97, 0, 21, 23,
1084  25, 99, 99, 39, 0, 0, 43, 35, 41, 112,
1085  70, 0, 64, 79, 88, 0, 0, 0, 75, 83,
1086  90, 91, 93, 0, 0, 0, 97, 98, 31, 32,
1087  19, 100, 0, 0, 40, 42, 72, 77, 0, 81,
1088  0, 94, 92, 84, 0, 76, 33, 58, 60, 61,
1089  59, 62, 63, 115, 113, 113, 45, 44, 0, 0,
1090  78, 82, 85, 0, 116, 57, 114, 54, 56, 52,
1091  51, 46, 47, 86, 0, 0, 115, 115, 53, 55
1092 };
1093 
1094  /* YYPGOTO[NTERM-NUM]. */
1095 static const yytype_int16 yypgoto[] =
1096 {
1097  -73, -73, -73, -73, -73, -73, -73, 112, -73, -73,
1098  -73, -73, -73, -73, -73, 45, 114, 144, -8, 20,
1099  -73, -73, -73, -73, -73, -73, 44, -53, 39, 76,
1100  19, 42, -65, -73, -52, -72, 54, -73, -73, -11,
1101  -73, 24, -73, 11, -62
1102 };
1103 
1104  /* YYDEFGOTO[NTERM-NUM]. */
1105 static const yytype_int16 yydefgoto[] =
1106 {
1107  -1, 1, 13, 14, 37, 38, 35, 36, 66, 23,
1108  92, 28, 40, 41, 107, 108, 71, 72, 171, 158,
1109  15, 47, 48, 77, 112, 16, 53, 54, 118, 88,
1110  145, 80, 55, 123, 56, 128, 132, 20, 21, 62,
1111  24, 59, 110, 167, 165
1112 };
1113 
1114  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
1115  positive, shift that token. If negative, reduce the rule whose
1116  number is the opposite. If YYTABLE_NINF, syntax error. */
1117 static const yytype_int16 yytable[] =
1118 {
1119  81, 82, 84, 2, 94, 85, 113, 49, 3, 58,
1120  50, 117, 139, 161, 162, 58, 4, 51, 119, 95,
1121  64, 65, 5, 67, 129, 103, 17, 6, 89, 61,
1122  74, 7, 90, 91, 39, 75, 8, 9, 10, 11,
1123  61, 25, 141, 22, 45, -49, 142, 46, 42, 93,
1124  119, -50, 97, 96, 146, 12, 86, 43, 114, 52,
1125  44, -49, 57, 52, 79, 114, 163, 104, 60, 105,
1126  106, 26, 27, 105, 106, -105, 30, 31, 32, 33,
1127  69, 70, 58, 81, 82, 147, 148, 149, 150, 151,
1128  152, 169, 170, 101, 102, 153, 154, 155, 156, 157,
1129  147, 148, 149, 150, 151, 152, 34, 61, 18, 63,
1130  153, 154, 155, 19, 178, 179, -103, 76, 78, 83,
1131  79, 109, 87, 115, 98, 99, 100, 111, 120, 121,
1132  122, 124, 125, 127, 126, 130, 131, 135, 138, 143,
1133  164, 144, 166, 173, 176, 174, 175, 68, 177, 134,
1134  29, 172, 73, 159, 137, 136, 133, 160, 116, 140,
1135  0, 0, 0, 0, 0, 0, 168
1136 };
1137 
1138 static const yytype_int16 yycheck[] =
1139 {
1140  53, 53, 7, 0, 11, 10, 6, 6, 5, 21,
1141  9, 6, 6, 6, 6, 21, 13, 16, 83, 26,
1142  31, 32, 19, 34, 96, 11, 58, 24, 18, 25,
1143  54, 28, 22, 23, 59, 59, 33, 34, 35, 36,
1144  25, 29, 58, 20, 7, 57, 62, 10, 57, 60,
1145  115, 57, 63, 60, 126, 52, 61, 17, 58, 58,
1146  17, 57, 11, 58, 58, 58, 58, 53, 59, 55,
1147  56, 59, 60, 55, 56, 60, 29, 30, 31, 32,
1148  59, 60, 21, 136, 136, 37, 38, 39, 40, 41,
1149  42, 59, 60, 69, 70, 47, 48, 49, 50, 51,
1150  37, 38, 39, 40, 41, 42, 59, 25, 3, 59,
1151  47, 48, 49, 8, 176, 177, 11, 15, 58, 4,
1152  58, 12, 6, 4, 60, 60, 60, 14, 58, 58,
1153  58, 58, 4, 27, 60, 60, 43, 56, 4, 6,
1154  45, 6, 44, 6, 47, 46, 46, 35, 47, 104,
1155  6, 159, 38, 133, 115, 111, 102, 138, 82, 117,
1156  -1, -1, -1, -1, -1, -1, 155
1157 };
1158 
1159  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1160  symbol of state STATE-NUM. */
1161 static const yytype_uint8 yystos[] =
1162 {
1163  0, 64, 0, 5, 13, 19, 24, 28, 33, 34,
1164  35, 36, 52, 65, 66, 83, 88, 58, 3, 8,
1165  100, 101, 20, 72, 103, 29, 59, 60, 74, 80,
1166  29, 30, 31, 32, 59, 69, 70, 67, 68, 59,
1167  75, 76, 57, 17, 17, 7, 10, 84, 85, 6,
1168  9, 16, 58, 89, 90, 95, 97, 11, 21, 104,
1169  59, 25, 102, 59, 102, 102, 71, 102, 70, 59,
1170  60, 79, 80, 79, 54, 59, 15, 86, 58, 58,
1171  94, 90, 97, 4, 7, 10, 61, 6, 92, 18,
1172  22, 23, 73, 102, 11, 26, 60, 102, 60, 60,
1173  60, 104, 104, 11, 53, 55, 56, 77, 78, 12,
1174  105, 14, 87, 6, 58, 4, 92, 6, 91, 95,
1175  58, 58, 58, 96, 58, 4, 60, 27, 98, 98,
1176  60, 43, 99, 99, 78, 56, 89, 91, 4, 6,
1177  94, 58, 62, 6, 6, 93, 98, 37, 38, 39,
1178  40, 41, 42, 47, 48, 49, 50, 51, 82, 82,
1179  93, 6, 6, 58, 45, 107, 44, 106, 106, 59,
1180  60, 81, 81, 6, 46, 46, 47, 47, 107, 107
1181 };
1182 
1183  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1184 static const yytype_uint8 yyr1[] =
1185 {
1186  0, 63, 64, 64, 65, 65, 65, 66, 66, 66,
1187  66, 67, 66, 68, 66, 66, 66, 69, 69, 70,
1188  70, 70, 70, 70, 71, 71, 72, 73, 73, 73,
1189  74, 74, 74, 74, 74, 75, 76, 76, 77, 77,
1190  77, 77, 78, 78, 79, 79, 79, 79, 79, 80,
1191  80, 81, 81, 82, 82, 82, 82, 82, 82, 82,
1192  82, 82, 82, 82, 83, 84, 84, 85, 85, 86,
1193  86, 87, 87, 88, 88, 89, 89, 89, 89, 90,
1194  90, 91, 91, 91, 92, 93, 93, 94, 94, 95,
1195  95, 95, 95, 96, 96, 97, 97, 98, 98, 99,
1196  99, 100, 100, 101, 101, 102, 102, 103, 103, 104,
1197  104, 105, 105, 106, 106, 107, 107
1198 };
1199 
1200  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1201 static const yytype_uint8 yyr2[] =
1202 {
1203  0, 2, 0, 2, 2, 2, 2, 2, 2, 2,
1204  2, 0, 3, 0, 3, 1, 1, 1, 2, 4,
1205  2, 3, 1, 3, 0, 2, 3, 1, 1, 1,
1206  3, 4, 4, 5, 1, 3, 1, 2, 0, 1,
1207  2, 1, 2, 1, 4, 4, 5, 5, 1, 1,
1208  1, 1, 1, 5, 2, 5, 2, 2, 1, 1,
1209  1, 1, 1, 1, 5, 0, 2, 1, 1, 0,
1210  2, 0, 2, 3, 3, 3, 4, 4, 5, 3,
1211  1, 2, 3, 1, 3, 2, 3, 1, 2, 1,
1212  3, 3, 4, 1, 2, 1, 1, 0, 1, 0,
1213  1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1214  1, 0, 1, 0, 1, 0, 1
1215 };
1216 
1217 
1218 #define yyerrok (yyerrstatus = 0)
1219 #define yyclearin (yychar = YYEMPTY)
1220 #define YYEMPTY (-2)
1221 #define YYEOF 0
1222 
1223 #define YYACCEPT goto yyacceptlab
1224 #define YYABORT goto yyabortlab
1225 #define YYERROR goto yyerrorlab
1226 
1227 
1228 #define YYRECOVERING() (!!yyerrstatus)
1229 
1230 #define YYBACKUP(Token, Value) \
1231 do \
1232  if (yychar == YYEMPTY) \
1233  { \
1234  yychar = (Token); \
1235  yylval = (Value); \
1236  YYPOPSTACK (yylen); \
1237  yystate = *yyssp; \
1238  goto yybackup; \
1239  } \
1240  else \
1241  { \
1242  yyerror (YY_("syntax error: cannot back up")); \
1243  YYERROR; \
1244  } \
1245 while (0)
1246 
1247 /* Error token number */
1248 #define YYTERROR 1
1249 #define YYERRCODE 256
1250 
1251 
1252 
1253 /* Enable debugging if requested. */
1254 #if YYDEBUG
1255 
1256 # ifndef YYFPRINTF
1257 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1258 # define YYFPRINTF fprintf
1259 # endif
1260 
1261 # define YYDPRINTF(Args) \
1262 do { \
1263  if (yydebug) \
1264  YYFPRINTF Args; \
1265 } while (0)
1266 
1267 /* This macro is provided for backward compatibility. */
1268 #ifndef YY_LOCATION_PRINT
1269 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1270 #endif
1271 
1272 
1273 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1274 do { \
1275  if (yydebug) \
1276  { \
1277  YYFPRINTF (stderr, "%s ", Title); \
1278  yy_symbol_print (stderr, \
1279  Type, Value); \
1280  YYFPRINTF (stderr, "\n"); \
1281  } \
1282 } while (0)
1283 
1284 
1285 /*----------------------------------------.
1286 | Print this symbol's value on YYOUTPUT. |
1287 `----------------------------------------*/
1288 
1289 static void
1290 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1291 {
1292  FILE *yyo = yyoutput;
1293  YYUSE (yyo);
1294  if (!yyvaluep)
1295  return;
1296 # ifdef YYPRINT
1297  if (yytype < YYNTOKENS)
1298  YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1299 # endif
1300  YYUSE (yytype);
1301 }
1302 
1303 
1304 /*--------------------------------.
1305 | Print this symbol on YYOUTPUT. |
1306 `--------------------------------*/
1307 
1308 static void
1309 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1310 {
1311  YYFPRINTF (yyoutput, "%s %s (",
1312  yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1313 
1314  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1315  YYFPRINTF (yyoutput, ")");
1316 }
1317 
1318 /*------------------------------------------------------------------.
1319 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1320 | TOP (included). |
1321 `------------------------------------------------------------------*/
1322 
1323 static void
1324 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1325 {
1326  YYFPRINTF (stderr, "Stack now");
1327  for (; yybottom <= yytop; yybottom++)
1328  {
1329  int yybot = *yybottom;
1330  YYFPRINTF (stderr, " %d", yybot);
1331  }
1332  YYFPRINTF (stderr, "\n");
1333 }
1334 
1335 # define YY_STACK_PRINT(Bottom, Top) \
1336 do { \
1337  if (yydebug) \
1338  yy_stack_print ((Bottom), (Top)); \
1339 } while (0)
1340 
1341 
1342 /*------------------------------------------------.
1343 | Report that the YYRULE is going to be reduced. |
1344 `------------------------------------------------*/
1345 
1346 static void
1347 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
1348 {
1349  unsigned long int yylno = yyrline[yyrule];
1350  int yynrhs = yyr2[yyrule];
1351  int yyi;
1352  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1353  yyrule - 1, yylno);
1354  /* The symbols being reduced. */
1355  for (yyi = 0; yyi < yynrhs; yyi++)
1356  {
1357  YYFPRINTF (stderr, " $%d = ", yyi + 1);
1358  yy_symbol_print (stderr,
1359  yystos[yyssp[yyi + 1 - yynrhs]],
1360  &(yyvsp[(yyi + 1) - (yynrhs)])
1361  );
1362  YYFPRINTF (stderr, "\n");
1363  }
1364 }
1365 
1366 # define YY_REDUCE_PRINT(Rule) \
1367 do { \
1368  if (yydebug) \
1369  yy_reduce_print (yyssp, yyvsp, Rule); \
1370 } while (0)
1371 
1372 /* Nonzero means print parse trace. It is left uninitialized so that
1373  multiple parsers can coexist. */
1374 int yydebug;
1375 #else /* !YYDEBUG */
1376 # define YYDPRINTF(Args)
1377 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1378 # define YY_STACK_PRINT(Bottom, Top)
1379 # define YY_REDUCE_PRINT(Rule)
1380 #endif /* !YYDEBUG */
1381 
1382 
1383 /* YYINITDEPTH -- initial size of the parser's stacks. */
1384 #ifndef YYINITDEPTH
1385 # define YYINITDEPTH 200
1386 #endif
1387 
1388 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1389  if the built-in stack extension method is used).
1390 
1391  Do not make this value too large; the results are undefined if
1392  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1393  evaluated with infinite-precision integer arithmetic. */
1394 
1395 #ifndef YYMAXDEPTH
1396 # define YYMAXDEPTH 10000
1397 #endif
1398 
1399 
1400 #if YYERROR_VERBOSE
1401 
1402 # ifndef yystrlen
1403 # if defined __GLIBC__ && defined _STRING_H
1404 # define yystrlen strlen
1405 # else
1406 /* Return the length of YYSTR. */
1407 static YYSIZE_T
1408 yystrlen (const char *yystr)
1409 {
1410  YYSIZE_T yylen;
1411  for (yylen = 0; yystr[yylen]; yylen++)
1412  continue;
1413  return yylen;
1414 }
1415 # endif
1416 # endif
1417 
1418 # ifndef yystpcpy
1419 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1420 # define yystpcpy stpcpy
1421 # else
1422 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1423  YYDEST. */
1424 static char *
1425 yystpcpy (char *yydest, const char *yysrc)
1426 {
1427  char *yyd = yydest;
1428  const char *yys = yysrc;
1429 
1430  while ((*yyd++ = *yys++) != '\0')
1431  continue;
1432 
1433  return yyd - 1;
1434 }
1435 # endif
1436 # endif
1437 
1438 # ifndef yytnamerr
1439 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1440  quotes and backslashes, so that it's suitable for yyerror. The
1441  heuristic is that double-quoting is unnecessary unless the string
1442  contains an apostrophe, a comma, or backslash (other than
1443  backslash-backslash). YYSTR is taken from yytname. If YYRES is
1444  null, do not copy; instead, return the length of what the result
1445  would have been. */
1446 static YYSIZE_T
1447 yytnamerr (char *yyres, const char *yystr)
1448 {
1449  if (*yystr == '"')
1450  {
1451  YYSIZE_T yyn = 0;
1452  char const *yyp = yystr;
1453 
1454  for (;;)
1455  switch (*++yyp)
1456  {
1457  case '\'':
1458  case ',':
1459  goto do_not_strip_quotes;
1460 
1461  case '\\':
1462  if (*++yyp != '\\')
1463  goto do_not_strip_quotes;
1464  /* Fall through. */
1465  default:
1466  if (yyres)
1467  yyres[yyn] = *yyp;
1468  yyn++;
1469  break;
1470 
1471  case '"':
1472  if (yyres)
1473  yyres[yyn] = '\0';
1474  return yyn;
1475  }
1476  do_not_strip_quotes: ;
1477  }
1478 
1479  if (! yyres)
1480  return yystrlen (yystr);
1481 
1482  return yystpcpy (yyres, yystr) - yyres;
1483 }
1484 # endif
1485 
1486 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1487  about the unexpected token YYTOKEN for the state stack whose top is
1488  YYSSP.
1489 
1490  Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1491  not large enough to hold the message. In that case, also set
1492  *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1493  required number of bytes is too large to store. */
1494 static int
1495 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1496  yytype_int16 *yyssp, int yytoken)
1497 {
1498  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1499  YYSIZE_T yysize = yysize0;
1500  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1501  /* Internationalized format string. */
1502  const char *yyformat = YY_NULLPTR;
1503  /* Arguments of yyformat. */
1504  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1505  /* Number of reported tokens (one for the "unexpected", one per
1506  "expected"). */
1507  int yycount = 0;
1508 
1509  /* There are many possibilities here to consider:
1510  - If this state is a consistent state with a default action, then
1511  the only way this function was invoked is if the default action
1512  is an error action. In that case, don't check for expected
1513  tokens because there are none.
1514  - The only way there can be no lookahead present (in yychar) is if
1515  this state is a consistent state with a default action. Thus,
1516  detecting the absence of a lookahead is sufficient to determine
1517  that there is no unexpected or expected token to report. In that
1518  case, just report a simple "syntax error".
1519  - Don't assume there isn't a lookahead just because this state is a
1520  consistent state with a default action. There might have been a
1521  previous inconsistent state, consistent state with a non-default
1522  action, or user semantic action that manipulated yychar.
1523  - Of course, the expected token list depends on states to have
1524  correct lookahead information, and it depends on the parser not
1525  to perform extra reductions after fetching a lookahead from the
1526  scanner and before detecting a syntax error. Thus, state merging
1527  (from LALR or IELR) and default reductions corrupt the expected
1528  token list. However, the list is correct for canonical LR with
1529  one exception: it will still contain any token that will not be
1530  accepted due to an error action in a later state.
1531  */
1532  if (yytoken != YYEMPTY)
1533  {
1534  int yyn = yypact[*yyssp];
1535  yyarg[yycount++] = yytname[yytoken];
1536  if (!yypact_value_is_default (yyn))
1537  {
1538  /* Start YYX at -YYN if negative to avoid negative indexes in
1539  YYCHECK. In other words, skip the first -YYN actions for
1540  this state because they are default actions. */
1541  int yyxbegin = yyn < 0 ? -yyn : 0;
1542  /* Stay within bounds of both yycheck and yytname. */
1543  int yychecklim = YYLAST - yyn + 1;
1544  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1545  int yyx;
1546 
1547  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1548  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1549  && !yytable_value_is_error (yytable[yyx + yyn]))
1550  {
1551  if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1552  {
1553  yycount = 1;
1554  yysize = yysize0;
1555  break;
1556  }
1557  yyarg[yycount++] = yytname[yyx];
1558  {
1559  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1560  if (! (yysize <= yysize1
1561  && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1562  return 2;
1563  yysize = yysize1;
1564  }
1565  }
1566  }
1567  }
1568 
1569  switch (yycount)
1570  {
1571 # define YYCASE_(N, S) \
1572  case N: \
1573  yyformat = S; \
1574  break
1575  YYCASE_(0, YY_("syntax error"));
1576  YYCASE_(1, YY_("syntax error, unexpected %s"));
1577  YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1578  YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1579  YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1580  YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1581 # undef YYCASE_
1582  }
1583 
1584  {
1585  YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1586  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1587  return 2;
1588  yysize = yysize1;
1589  }
1590 
1591  if (*yymsg_alloc < yysize)
1592  {
1593  *yymsg_alloc = 2 * yysize;
1594  if (! (yysize <= *yymsg_alloc
1595  && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1596  *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1597  return 1;
1598  }
1599 
1600  /* Avoid sprintf, as that infringes on the user's name space.
1601  Don't have undefined behavior even if the translation
1602  produced a string with the wrong number of "%s"s. */
1603  {
1604  char *yyp = *yymsg;
1605  int yyi = 0;
1606  while ((*yyp = *yyformat) != '\0')
1607  if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1608  {
1609  yyp += yytnamerr (yyp, yyarg[yyi++]);
1610  yyformat += 2;
1611  }
1612  else
1613  {
1614  yyp++;
1615  yyformat++;
1616  }
1617  }
1618  return 0;
1619 }
1620 #endif /* YYERROR_VERBOSE */
1621 
1622 /*-----------------------------------------------.
1623 | Release the memory associated to this symbol. |
1624 `-----------------------------------------------*/
1625 
1626 static void
1627 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1628 {
1629  YYUSE (yyvaluep);
1630  if (!yymsg)
1631  yymsg = "Deleting";
1632  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1633 
1635  YYUSE (yytype);
1637 }
1638 
1639 
1640 
1641 
1642 /* The lookahead symbol. */
1644 
1645 /* The semantic value of the lookahead symbol. */
1647 /* Number of syntax errors so far. */
1649 
1650 
1651 /*----------.
1652 | yyparse. |
1653 `----------*/
1654 
1655 int
1656 yyparse (void)
1657 {
1658  int yystate;
1659  /* Number of tokens to shift before error messages enabled. */
1660  int yyerrstatus;
1661 
1662  /* The stacks and their tools:
1663  'yyss': related to states.
1664  'yyvs': related to semantic values.
1665 
1666  Refer to the stacks through separate pointers, to allow yyoverflow
1667  to reallocate them elsewhere. */
1668 
1669  /* The state stack. */
1670  yytype_int16 yyssa[YYINITDEPTH];
1671  yytype_int16 *yyss;
1672  yytype_int16 *yyssp;
1673 
1674  /* The semantic value stack. */
1675  YYSTYPE yyvsa[YYINITDEPTH];
1676  YYSTYPE *yyvs;
1677  YYSTYPE *yyvsp;
1678 
1679  YYSIZE_T yystacksize;
1680 
1681  int yyn;
1682  int yyresult;
1683  /* Lookahead token as an internal (translated) token number. */
1684  int yytoken = 0;
1685  /* The variables used to return semantic value and location from the
1686  action routines. */
1687  YYSTYPE yyval;
1688 
1689 #if YYERROR_VERBOSE
1690  /* Buffer for error messages, and its allocated size. */
1691  char yymsgbuf[128];
1692  char *yymsg = yymsgbuf;
1693  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1694 #endif
1695 
1696 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1697 
1698  /* The number of symbols on the RHS of the reduced rule.
1699  Keep to zero when no symbol should be popped. */
1700  int yylen = 0;
1701 
1702  yyssp = yyss = yyssa;
1703  yyvsp = yyvs = yyvsa;
1704  yystacksize = YYINITDEPTH;
1705 
1706  YYDPRINTF ((stderr, "Starting parse\n"));
1707 
1708  yystate = 0;
1709  yyerrstatus = 0;
1710  yynerrs = 0;
1711  yychar = YYEMPTY; /* Cause a token to be read. */
1712  goto yysetstate;
1713 
1714 /*------------------------------------------------------------.
1715 | yynewstate -- Push a new state, which is found in yystate. |
1716 `------------------------------------------------------------*/
1717  yynewstate:
1718  /* In all cases, when you get here, the value and location stacks
1719  have just been pushed. So pushing a state here evens the stacks. */
1720  yyssp++;
1721 
1722  yysetstate:
1723  *yyssp = yystate;
1724 
1725  if (yyss + yystacksize - 1 <= yyssp)
1726  {
1727  /* Get the current used size of the three stacks, in elements. */
1728  YYSIZE_T yysize = yyssp - yyss + 1;
1729 
1730 #ifdef yyoverflow
1731  {
1732  /* Give user a chance to reallocate the stack. Use copies of
1733  these so that the &'s don't force the real ones into
1734  memory. */
1735  YYSTYPE *yyvs1 = yyvs;
1736  yytype_int16 *yyss1 = yyss;
1737 
1738  /* Each stack pointer address is followed by the size of the
1739  data in use in that stack, in bytes. This used to be a
1740  conditional around just the two extra args, but that might
1741  be undefined if yyoverflow is a macro. */
1742  yyoverflow (YY_("memory exhausted"),
1743  &yyss1, yysize * sizeof (*yyssp),
1744  &yyvs1, yysize * sizeof (*yyvsp),
1745  &yystacksize);
1746 
1747  yyss = yyss1;
1748  yyvs = yyvs1;
1749  }
1750 #else /* no yyoverflow */
1751 # ifndef YYSTACK_RELOCATE
1752  goto yyexhaustedlab;
1753 # else
1754  /* Extend the stack our own way. */
1755  if (YYMAXDEPTH <= yystacksize)
1756  goto yyexhaustedlab;
1757  yystacksize *= 2;
1758  if (YYMAXDEPTH < yystacksize)
1759  yystacksize = YYMAXDEPTH;
1760 
1761  {
1762  yytype_int16 *yyss1 = yyss;
1763  union yyalloc *yyptr =
1764  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1765  if (! yyptr)
1766  goto yyexhaustedlab;
1767  YYSTACK_RELOCATE (yyss_alloc, yyss);
1768  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1769 # undef YYSTACK_RELOCATE
1770  if (yyss1 != yyssa)
1771  YYSTACK_FREE (yyss1);
1772  }
1773 # endif
1774 #endif /* no yyoverflow */
1775 
1776  yyssp = yyss + yysize - 1;
1777  yyvsp = yyvs + yysize - 1;
1778 
1779  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1780  (unsigned long int) yystacksize));
1781 
1782  if (yyss + yystacksize - 1 <= yyssp)
1783  YYABORT;
1784  }
1785 
1786  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1787 
1788  if (yystate == YYFINAL)
1789  YYACCEPT;
1790 
1791  goto yybackup;
1792 
1793 /*-----------.
1794 | yybackup. |
1795 `-----------*/
1796 yybackup:
1797 
1798  /* Do appropriate processing given the current state. Read a
1799  lookahead token if we need one and don't already have one. */
1800 
1801  /* First try to decide what to do without reference to lookahead token. */
1802  yyn = yypact[yystate];
1803  if (yypact_value_is_default (yyn))
1804  goto yydefault;
1805 
1806  /* Not known => get a lookahead token if don't already have one. */
1807 
1808  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1809  if (yychar == YYEMPTY)
1810  {
1811  YYDPRINTF ((stderr, "Reading a token: "));
1812  yychar = yylex ();
1813  }
1814 
1815  if (yychar <= YYEOF)
1816  {
1817  yychar = yytoken = YYEOF;
1818  YYDPRINTF ((stderr, "Now at end of input.\n"));
1819  }
1820  else
1821  {
1822  yytoken = YYTRANSLATE (yychar);
1823  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1824  }
1825 
1826  /* If the proper action on seeing token YYTOKEN is to reduce or to
1827  detect an error, take that action. */
1828  yyn += yytoken;
1829  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1830  goto yydefault;
1831  yyn = yytable[yyn];
1832  if (yyn <= 0)
1833  {
1834  if (yytable_value_is_error (yyn))
1835  goto yyerrlab;
1836  yyn = -yyn;
1837  goto yyreduce;
1838  }
1839 
1840  /* Count tokens shifted since error; after three, turn off error
1841  status. */
1842  if (yyerrstatus)
1843  yyerrstatus--;
1844 
1845  /* Shift the lookahead token. */
1846  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1847 
1848  /* Discard the shifted token. */
1849  yychar = YYEMPTY;
1850 
1851  yystate = yyn;
1853  *++yyvsp = yylval;
1855 
1856  goto yynewstate;
1857 
1858 
1859 /*-----------------------------------------------------------.
1860 | yydefault -- do the default action for the current state. |
1861 `-----------------------------------------------------------*/
1862 yydefault:
1863  yyn = yydefact[yystate];
1864  if (yyn == 0)
1865  goto yyerrlab;
1866  goto yyreduce;
1867 
1868 
1869 /*-----------------------------.
1870 | yyreduce -- Do a reduction. |
1871 `-----------------------------*/
1872 yyreduce:
1873  /* yyn is the number of a rule to reduce with. */
1874  yylen = yyr2[yyn];
1875 
1876  /* If YYLEN is nonzero, implement the default value of the action:
1877  '$$ = $1'.
1878 
1879  Otherwise, the following line sets YYVAL to garbage.
1880  This behavior is undocumented and Bison
1881  users should not rely upon it. Assigning to YYVAL
1882  unconditionally makes the parser a bit smaller, and it avoids a
1883  GCC warning that YYVAL may be used uninitialized. */
1884  yyval = yyvsp[1-yylen];
1885 
1886 
1887  YY_REDUCE_PRINT (yyn);
1888  switch (yyn)
1889  {
1890  case 11:
1891 #line 620 "ppparse.y" /* yacc.c:1646 */
1892  {
1894  }
1895 #line 1896 "ppparse.c" /* yacc.c:1646 */
1896  break;
1897 
1898  case 13:
1899 #line 625 "ppparse.y" /* yacc.c:1646 */
1900  {
1902  }
1903 #line 1904 "ppparse.c" /* yacc.c:1646 */
1904  break;
1905 
1906  case 15:
1907 #line 630 "ppparse.y" /* yacc.c:1646 */
1908  {
1910  }
1911 #line 1912 "ppparse.c" /* yacc.c:1646 */
1912  break;
1913 
1914  case 16:
1915 #line 634 "ppparse.y" /* yacc.c:1646 */
1916  {
1918  }
1919 #line 1920 "ppparse.c" /* yacc.c:1646 */
1920  break;
1921 
1922  case 19:
1923 #line 646 "ppparse.y" /* yacc.c:1646 */
1924  {
1925  struct cb_define_struct *p;
1926 
1927  p = ppp_define_add (ppp_setvar_list, (yyvsp[-2].s), (yyvsp[0].s), 1);
1928  if (p) {
1929  ppp_setvar_list = p;
1930  fprintf (ppout, "#DEFLIT %s %s\n", (yyvsp[-2].s), (yyvsp[0].s));
1931  }
1932  }
1933 #line 1934 "ppparse.c" /* yacc.c:1646 */
1934  break;
1935 
1936  case 21:
1937 #line 657 "ppparse.y" /* yacc.c:1646 */
1938  {
1939  char *p;
1940  size_t size;
1941  int quote;
1942 
1943  p = (yyvsp[0].s);
1944  if (*p == '\"' || *p == '\'') {
1945  quote = *p;
1946  p++;
1947  size = strlen (p) - 1;
1948  if (p[size] != quote) {
1949  cb_error (_("Invalid %s directive"), "SOURCEFORMAT");
1950  }
1951  p[size] = 0;
1952  }
1953  if (!strcasecmp (p, "FIXED")) {
1955  } else if (!strcasecmp (p, "FREE")) {
1957  } else {
1958  cb_error (_("Invalid %s directive"), "SOURCEFORMAT");
1959  }
1960  }
1961 #line 1962 "ppparse.c" /* yacc.c:1646 */
1962  break;
1963 
1964  case 22:
1965 #line 681 "ppparse.y" /* yacc.c:1646 */
1966  {
1967  cb_fold_copy = 0;
1968  }
1969 #line 1970 "ppparse.c" /* yacc.c:1646 */
1970  break;
1971 
1972  case 23:
1973 #line 685 "ppparse.y" /* yacc.c:1646 */
1974  {
1975  char *p;
1976  size_t size;
1977  int quote;
1978 
1979  p = (yyvsp[0].s);
1980  if (*p == '\"' || *p == '\'') {
1981  quote = *p;
1982  p++;
1983  size = strlen (p) - 1;
1984  if (p[size] != quote) {
1985  cb_error (_("Invalid %s directive"), "FOLD-COPY-NAME");
1986  }
1987  p[size] = 0;
1988  }
1989  if (!strcasecmp (p, "UPPER")) {
1990  cb_fold_copy = COB_FOLD_UPPER;
1991  } else if (!strcasecmp (p, "LOWER")) {
1992  cb_fold_copy = COB_FOLD_LOWER;
1993  } else {
1994  cb_error (_("Invalid %s directive"), "FOLD-COPY-NAME");
1995  }
1996  }
1997 #line 1998 "ppparse.c" /* yacc.c:1646 */
1998  break;
1999 
2000  case 24:
2001 #line 712 "ppparse.y" /* yacc.c:1646 */
2002  {
2003  fprintf (ppout, "#OPTION %s\n", (yyvsp[0].s));
2004  }
2005 #line 2006 "ppparse.c" /* yacc.c:1646 */
2006  break;
2007 
2008  case 25:
2009 #line 716 "ppparse.y" /* yacc.c:1646 */
2010  {
2011  fprintf (ppout, "#OPTION %s %s\n", (yyvsp[-2].s), (yyvsp[0].s));
2012  }
2013 #line 2014 "ppparse.c" /* yacc.c:1646 */
2014  break;
2015 
2016  case 27:
2017 #line 727 "ppparse.y" /* yacc.c:1646 */
2018  {
2020  }
2021 #line 2022 "ppparse.c" /* yacc.c:1646 */
2022  break;
2023 
2024  case 28:
2025 #line 731 "ppparse.y" /* yacc.c:1646 */
2026  {
2028  }
2029 #line 2030 "ppparse.c" /* yacc.c:1646 */
2030  break;
2031 
2032  case 29:
2033 #line 735 "ppparse.y" /* yacc.c:1646 */
2034  {
2035  cb_error (_("Invalid %s directive"), "SOURCE");
2036  YYERROR;
2037  }
2038 #line 2039 "ppparse.c" /* yacc.c:1646 */
2039  break;
2040 
2041  case 30:
2042 #line 743 "ppparse.y" /* yacc.c:1646 */
2043  {
2044  ppp_define_del ((yyvsp[-2].s));
2045  }
2046 #line 2047 "ppparse.c" /* yacc.c:1646 */
2047  break;
2048 
2049  case 31:
2050 #line 747 "ppparse.y" /* yacc.c:1646 */
2051  {
2052  char *s;
2053  char *q;
2054  struct cb_define_struct *p;
2055  size_t size;
2056 
2057  s = getenv ((yyvsp[-3].s));
2058  q = NULL;
2059  if (s && *s && *s != ' ') {
2060  if (*s == '"' || *s == '\'') {
2061  size = strlen (s) - 1U;
2062  /* Ignore if improperly quoted */
2063  if (s[0] == s[size]) {
2064  q = s;
2065  }
2066  } else {
2067  if (ppp_check_needs_quote (s)) {
2068  /* Alphanumeric literal */
2069  q = cobc_plex_malloc (strlen (s) + 4U);
2070  sprintf (q, "'%s'", s);
2071  } else {
2072  /* Numeric literal */
2073  q = s;
2074  }
2075  }
2076  }
2077  if (q) {
2078  p = ppp_define_add (ppp_setvar_list, (yyvsp[-3].s), q, (yyvsp[0].ui));
2079  if (p) {
2080  ppp_setvar_list = p;
2081  }
2082  }
2083  }
2084 #line 2085 "ppparse.c" /* yacc.c:1646 */
2085  break;
2086 
2087  case 32:
2088 #line 781 "ppparse.y" /* yacc.c:1646 */
2089  {
2090  struct cb_define_struct *p;
2091 
2092  p = ppp_define_add (ppp_setvar_list, (yyvsp[-3].s), (yyvsp[-1].s), (yyvsp[0].ui));
2093  if (p) {
2094  ppp_setvar_list = p;
2095  }
2096  }
2097 #line 2098 "ppparse.c" /* yacc.c:1646 */
2098  break;
2099 
2100  case 33:
2101 #line 790 "ppparse.y" /* yacc.c:1646 */
2102  {
2103  struct cb_define_struct *p;
2104 
2105  p = ppp_define_add (ppp_setvar_list, (yyvsp[-3].s), (yyvsp[-1].s), (yyvsp[0].ui));
2106  if (p) {
2107  ppp_setvar_list = p;
2108  fprintf (ppout, "#DEFLIT %s %s\n", (yyvsp[-3].s), (yyvsp[-1].s));
2109  }
2110  }
2111 #line 2112 "ppparse.c" /* yacc.c:1646 */
2112  break;
2113 
2114  case 34:
2115 #line 800 "ppparse.y" /* yacc.c:1646 */
2116  {
2117  cb_error (_("Invalid %s directive"), "DEFINE/SET");
2118  }
2119 #line 2120 "ppparse.c" /* yacc.c:1646 */
2120  break;
2121 
2122  case 35:
2123 #line 808 "ppparse.y" /* yacc.c:1646 */
2124  {
2125  cb_warning (_("%s directive not yet implemented"), "TURN");
2126  }
2127 #line 2128 "ppparse.c" /* yacc.c:1646 */
2128  break;
2129 
2130  case 44:
2131 #line 832 "ppparse.y" /* yacc.c:1646 */
2132  {
2133  unsigned int found;
2134 
2135  found = (ppp_search_lists ((yyvsp[-3].s)) != NULL);
2136  plex_action_directive (current_cmd, found ^ (yyvsp[-1].ui));
2137  }
2138 #line 2139 "ppparse.c" /* yacc.c:1646 */
2139  break;
2140 
2141  case 45:
2142 #line 839 "ppparse.y" /* yacc.c:1646 */
2143  {
2144  unsigned int found;
2145 
2146  found = ppp_search_comp_vars ((yyvsp[-3].s));
2147  plex_action_directive (current_cmd, found ^ (yyvsp[-1].ui));
2148  }
2149 #line 2150 "ppparse.c" /* yacc.c:1646 */
2150  break;
2151 
2152  case 46:
2153 #line 846 "ppparse.y" /* yacc.c:1646 */
2154  {
2155  struct cb_define_struct *p;
2156  unsigned int found;
2157 
2158  found = 0;
2159  p = ppp_search_lists ((yyvsp[-4].s));
2160  found = ppp_compare_vals (p, (yyvsp[0].ds), (yyvsp[-1].ui));
2161  plex_action_directive (current_cmd, found ^ (yyvsp[-2].ui));
2162  }
2163 #line 2164 "ppparse.c" /* yacc.c:1646 */
2164  break;
2165 
2166  case 47:
2167 #line 856 "ppparse.y" /* yacc.c:1646 */
2168  {
2169  struct cb_define_struct *p;
2170  unsigned int found;
2171 
2172  found = 0;
2173  p = cobc_plex_malloc (sizeof (struct cb_define_struct));
2174  p->next = NULL;
2175  if (ppp_set_value (p, (yyvsp[-4].s))) {
2176  cb_error (_("Invalid constant"));
2177  } else {
2178  found = ppp_compare_vals (p, (yyvsp[0].ds), (yyvsp[-1].ui));
2179  }
2180  plex_action_directive (current_cmd, found ^ (yyvsp[-2].ui));
2181  }
2182 #line 2183 "ppparse.c" /* yacc.c:1646 */
2183  break;
2184 
2185  case 48:
2186 #line 871 "ppparse.y" /* yacc.c:1646 */
2187  {
2188  cb_error (_("Invalid %s directive"), "IF/ELIF");
2189  }
2190 #line 2191 "ppparse.c" /* yacc.c:1646 */
2191  break;
2192 
2193  case 51:
2194 #line 883 "ppparse.y" /* yacc.c:1646 */
2195  {
2196  struct cb_define_struct *p;
2197 
2198  p = cobc_plex_malloc (sizeof (struct cb_define_struct));
2199  p->next = NULL;
2200  if (ppp_set_value (p, (yyvsp[0].s))) {
2201  cb_error (_("Invalid constant"));
2202  (yyval.ds) = NULL;
2203  } else {
2204  (yyval.ds) = p;
2205  }
2206  }
2207 #line 2208 "ppparse.c" /* yacc.c:1646 */
2208  break;
2209 
2210  case 52:
2211 #line 896 "ppparse.y" /* yacc.c:1646 */
2212  {
2213  struct cb_define_struct *p;
2214 
2215  p = ppp_search_lists ((yyvsp[0].s));
2216  if (p != NULL && p->deftype != PLEX_DEF_NONE) {
2217  (yyval.ds) = p;
2218  } else {
2219  (yyval.ds) = NULL;
2220  }
2221  }
2222 #line 2223 "ppparse.c" /* yacc.c:1646 */
2223  break;
2224 
2225  case 53:
2226 #line 910 "ppparse.y" /* yacc.c:1646 */
2227  {
2228  (yyval.ui) = COND_GE;
2229  }
2230 #line 2231 "ppparse.c" /* yacc.c:1646 */
2231  break;
2232 
2233  case 54:
2234 #line 914 "ppparse.y" /* yacc.c:1646 */
2235  {
2236  (yyval.ui) = COND_GT;
2237  }
2238 #line 2239 "ppparse.c" /* yacc.c:1646 */
2239  break;
2240 
2241  case 55:
2242 #line 918 "ppparse.y" /* yacc.c:1646 */
2243  {
2244  (yyval.ui) = COND_LE;
2245  }
2246 #line 2247 "ppparse.c" /* yacc.c:1646 */
2247  break;
2248 
2249  case 56:
2250 #line 922 "ppparse.y" /* yacc.c:1646 */
2251  {
2252  (yyval.ui) = COND_LT;
2253  }
2254 #line 2255 "ppparse.c" /* yacc.c:1646 */
2255  break;
2256 
2257  case 57:
2258 #line 926 "ppparse.y" /* yacc.c:1646 */
2259  {
2260  (yyval.ui) = COND_EQ;
2261  }
2262 #line 2263 "ppparse.c" /* yacc.c:1646 */
2263  break;
2264 
2265  case 58:
2266 #line 930 "ppparse.y" /* yacc.c:1646 */
2267  {
2268  (yyval.ui) = COND_GE;
2269  }
2270 #line 2271 "ppparse.c" /* yacc.c:1646 */
2271  break;
2272 
2273  case 59:
2274 #line 934 "ppparse.y" /* yacc.c:1646 */
2275  {
2276  (yyval.ui) = COND_GT;
2277  }
2278 #line 2279 "ppparse.c" /* yacc.c:1646 */
2279  break;
2280 
2281  case 60:
2282 #line 938 "ppparse.y" /* yacc.c:1646 */
2283  {
2284  (yyval.ui) = COND_LE;
2285  }
2286 #line 2287 "ppparse.c" /* yacc.c:1646 */
2287  break;
2288 
2289  case 61:
2290 #line 942 "ppparse.y" /* yacc.c:1646 */
2291  {
2292  (yyval.ui) = COND_LT;
2293  }
2294 #line 2295 "ppparse.c" /* yacc.c:1646 */
2295  break;
2296 
2297  case 62:
2298 #line 946 "ppparse.y" /* yacc.c:1646 */
2299  {
2300  (yyval.ui) = COND_EQ;
2301  }
2302 #line 2303 "ppparse.c" /* yacc.c:1646 */
2303  break;
2304 
2305  case 63:
2306 #line 950 "ppparse.y" /* yacc.c:1646 */
2307  {
2308  (yyval.ui) = COND_NE;
2309  }
2310 #line 2311 "ppparse.c" /* yacc.c:1646 */
2311  break;
2312 
2313  case 64:
2314 #line 957 "ppparse.y" /* yacc.c:1646 */
2315  {
2316  fputc ('\n', ppout);
2317  (yyvsp[-3].s) = fix_filename ((yyvsp[-3].s));
2318  if (cb_fold_copy == COB_FOLD_LOWER) {
2319  (yyvsp[-3].s) = fold_lower ((yyvsp[-3].s));
2320  } else if (cb_fold_copy == COB_FOLD_UPPER) {
2321  (yyvsp[-3].s) = fold_upper ((yyvsp[-3].s));
2322  }
2323  if ((yyvsp[-2].s)) {
2324  (yyvsp[-2].s) = fix_filename ((yyvsp[-2].s));
2325  if (cb_fold_copy == COB_FOLD_LOWER) {
2326  (yyvsp[-2].s) = fold_lower ((yyvsp[-2].s));
2327  } else if (cb_fold_copy == COB_FOLD_UPPER) {
2328  (yyvsp[-2].s) = fold_upper ((yyvsp[-2].s));
2329  }
2330  }
2331  ppcopy ((yyvsp[-3].s), (yyvsp[-2].s), (yyvsp[0].r));
2332  }
2333 #line 2334 "ppparse.c" /* yacc.c:1646 */
2334  break;
2335 
2336  case 65:
2337 #line 979 "ppparse.y" /* yacc.c:1646 */
2338  {
2339  (yyval.s) = NULL;
2340  }
2341 #line 2342 "ppparse.c" /* yacc.c:1646 */
2342  break;
2343 
2344  case 66:
2345 #line 983 "ppparse.y" /* yacc.c:1646 */
2346  {
2347  (yyval.s) = (yyvsp[0].s);
2348  }
2349 #line 2350 "ppparse.c" /* yacc.c:1646 */
2350  break;
2351 
2352  case 71:
2353 #line 999 "ppparse.y" /* yacc.c:1646 */
2354  {
2355  (yyval.r) = NULL;
2356  }
2357 #line 2358 "ppparse.c" /* yacc.c:1646 */
2358  break;
2359 
2360  case 72:
2361 #line 1003 "ppparse.y" /* yacc.c:1646 */
2362  {
2363  (yyval.r) = (yyvsp[0].r);
2364  }
2365 #line 2366 "ppparse.c" /* yacc.c:1646 */
2366  break;
2367 
2368  case 73:
2369 #line 1010 "ppparse.y" /* yacc.c:1646 */
2370  {
2371  pp_set_replace_list ((yyvsp[0].r), (yyvsp[-1].ui));
2372  }
2373 #line 2374 "ppparse.c" /* yacc.c:1646 */
2374  break;
2375 
2376  case 74:
2377 #line 1014 "ppparse.y" /* yacc.c:1646 */
2378  {
2379  pp_set_replace_list (NULL, (yyvsp[-1].ui));
2380  }
2381 #line 2382 "ppparse.c" /* yacc.c:1646 */
2382  break;
2383 
2384  case 75:
2385 #line 1021 "ppparse.y" /* yacc.c:1646 */
2386  {
2387  (yyval.r) = ppp_replace_list_add (NULL, (yyvsp[-2].l), (yyvsp[0].l), 0);
2388  }
2389 #line 2390 "ppparse.c" /* yacc.c:1646 */
2390  break;
2391 
2392  case 76:
2393 #line 1025 "ppparse.y" /* yacc.c:1646 */
2394  {
2395  (yyval.r) = ppp_replace_list_add (NULL, (yyvsp[-2].l), (yyvsp[0].l), (yyvsp[-3].ui));
2396  }
2397 #line 2398 "ppparse.c" /* yacc.c:1646 */
2398  break;
2399 
2400  case 77:
2401 #line 1029 "ppparse.y" /* yacc.c:1646 */
2402  {
2403  (yyval.r) = ppp_replace_list_add ((yyvsp[-3].r), (yyvsp[-2].l), (yyvsp[0].l), 0);
2404  }
2405 #line 2406 "ppparse.c" /* yacc.c:1646 */
2406  break;
2407 
2408  case 78:
2409 #line 1033 "ppparse.y" /* yacc.c:1646 */
2410  {
2411  (yyval.r) = ppp_replace_list_add ((yyvsp[-4].r), (yyvsp[-2].l), (yyvsp[0].l), (yyvsp[-3].ui));
2412  }
2413 #line 2414 "ppparse.c" /* yacc.c:1646 */
2414  break;
2415 
2416  case 79:
2417 #line 1040 "ppparse.y" /* yacc.c:1646 */
2418  {
2419  (yyval.l) = (yyvsp[-1].l);
2420  }
2421 #line 2422 "ppparse.c" /* yacc.c:1646 */
2422  break;
2423 
2424  case 80:
2425 #line 1044 "ppparse.y" /* yacc.c:1646 */
2426  {
2427  (yyval.l) = (yyvsp[0].l);
2428  }
2429 #line 2430 "ppparse.c" /* yacc.c:1646 */
2430  break;
2431 
2432  case 81:
2433 #line 1051 "ppparse.y" /* yacc.c:1646 */
2434  {
2435  (yyval.l) = NULL;
2436  }
2437 #line 2438 "ppparse.c" /* yacc.c:1646 */
2438  break;
2439 
2440  case 82:
2441 #line 1055 "ppparse.y" /* yacc.c:1646 */
2442  {
2443  (yyval.l) = (yyvsp[-1].l);
2444  }
2445 #line 2446 "ppparse.c" /* yacc.c:1646 */
2446  break;
2447 
2448  case 83:
2449 #line 1059 "ppparse.y" /* yacc.c:1646 */
2450  {
2451  (yyval.l) = (yyvsp[0].l);
2452  }
2453 #line 2454 "ppparse.c" /* yacc.c:1646 */
2454  break;
2455 
2456  case 84:
2457 #line 1066 "ppparse.y" /* yacc.c:1646 */
2458  {
2459  (yyval.l) = ppp_list_add (NULL, (yyvsp[-1].s));
2460  }
2461 #line 2462 "ppparse.c" /* yacc.c:1646 */
2462  break;
2463 
2464  case 85:
2465 #line 1073 "ppparse.y" /* yacc.c:1646 */
2466  {
2467  (yyval.l) = NULL;
2468  }
2469 #line 2470 "ppparse.c" /* yacc.c:1646 */
2470  break;
2471 
2472  case 86:
2473 #line 1077 "ppparse.y" /* yacc.c:1646 */
2474  {
2475  (yyval.l) = ppp_list_add (NULL, (yyvsp[-1].s));
2476  }
2477 #line 2478 "ppparse.c" /* yacc.c:1646 */
2478  break;
2479 
2480  case 87:
2481 #line 1084 "ppparse.y" /* yacc.c:1646 */
2482  {
2483  (yyval.l) = ppp_list_add (NULL, (yyvsp[0].s));
2484  }
2485 #line 2486 "ppparse.c" /* yacc.c:1646 */
2486  break;
2487 
2488  case 88:
2489 #line 1088 "ppparse.y" /* yacc.c:1646 */
2490  {
2491  (yyval.l) = ppp_list_add ((yyvsp[-1].l), (yyvsp[0].s));
2492  }
2493 #line 2494 "ppparse.c" /* yacc.c:1646 */
2494  break;
2495 
2496  case 89:
2497 #line 1095 "ppparse.y" /* yacc.c:1646 */
2498  {
2499  (yyval.l) = ppp_list_add (NULL, (yyvsp[0].s));
2500  }
2501 #line 2502 "ppparse.c" /* yacc.c:1646 */
2502  break;
2503 
2504  case 90:
2505 #line 1099 "ppparse.y" /* yacc.c:1646 */
2506  {
2507  (yyval.l) = ppp_list_add ((yyvsp[-2].l), " ");
2508  (yyval.l) = ppp_list_add ((yyval.l), "IN");
2509  (yyval.l) = ppp_list_add ((yyval.l), " ");
2510  (yyval.l) = ppp_list_add ((yyval.l), (yyvsp[0].s));
2511  }
2512 #line 2513 "ppparse.c" /* yacc.c:1646 */
2513  break;
2514 
2515  case 91:
2516 #line 1106 "ppparse.y" /* yacc.c:1646 */
2517  {
2518  (yyval.l) = ppp_list_add ((yyvsp[-2].l), " ");
2519  (yyval.l) = ppp_list_add ((yyval.l), "OF");
2520  (yyval.l) = ppp_list_add ((yyval.l), " ");
2521  (yyval.l) = ppp_list_add ((yyval.l), (yyvsp[0].s));
2522  }
2523 #line 2524 "ppparse.c" /* yacc.c:1646 */
2524  break;
2525 
2526  case 92:
2527 #line 1113 "ppparse.y" /* yacc.c:1646 */
2528  {
2529  struct cb_text_list *l;
2530 
2531  (yyval.l) = ppp_list_add ((yyvsp[-3].l), " ");
2532  (yyval.l) = ppp_list_add ((yyval.l), "(");
2533  (yyvsp[-1].l) = ppp_list_add ((yyvsp[-1].l), ")");
2534  for (l = (yyval.l); l->next; l = l->next) {
2535  ;
2536  }
2537  l->next = (yyvsp[-1].l);
2538  }
2539 #line 2540 "ppparse.c" /* yacc.c:1646 */
2540  break;
2541 
2542  case 93:
2543 #line 1128 "ppparse.y" /* yacc.c:1646 */
2544  {
2545  (yyval.l) = ppp_list_add (NULL, (yyvsp[0].s));
2546  }
2547 #line 2548 "ppparse.c" /* yacc.c:1646 */
2548  break;
2549 
2550  case 94:
2551 #line 1132 "ppparse.y" /* yacc.c:1646 */
2552  {
2553  (yyval.l) = ppp_list_add ((yyvsp[-1].l), " ");
2554  (yyval.l) = ppp_list_add ((yyval.l), (yyvsp[0].s));
2555  }
2556 #line 2557 "ppparse.c" /* yacc.c:1646 */
2557  break;
2558 
2559  case 95:
2560 #line 1140 "ppparse.y" /* yacc.c:1646 */
2561  {
2562  (yyval.ui) = CB_REPLACE_LEADING;
2563  }
2564 #line 2565 "ppparse.c" /* yacc.c:1646 */
2565  break;
2566 
2567  case 96:
2568 #line 1144 "ppparse.y" /* yacc.c:1646 */
2569  {
2570  (yyval.ui) = CB_REPLACE_TRAILING;
2571  }
2572 #line 2573 "ppparse.c" /* yacc.c:1646 */
2573  break;
2574 
2575  case 97:
2576 #line 1153 "ppparse.y" /* yacc.c:1646 */
2577  {
2578  (yyval.ui) = 0;
2579  }
2580 #line 2581 "ppparse.c" /* yacc.c:1646 */
2581  break;
2582 
2583  case 98:
2584 #line 1157 "ppparse.y" /* yacc.c:1646 */
2585  {
2586  (yyval.ui) = 1U;
2587  }
2588 #line 2589 "ppparse.c" /* yacc.c:1646 */
2589  break;
2590 
2591  case 99:
2592 #line 1164 "ppparse.y" /* yacc.c:1646 */
2593  {
2594  (yyval.ui) = 0;
2595  }
2596 #line 2597 "ppparse.c" /* yacc.c:1646 */
2597  break;
2598 
2599  case 100:
2600 #line 1168 "ppparse.y" /* yacc.c:1646 */
2601  {
2602  (yyval.ui) = 1U;
2603  }
2604 #line 2605 "ppparse.c" /* yacc.c:1646 */
2605  break;
2606 
2607  case 101:
2608 #line 1175 "ppparse.y" /* yacc.c:1646 */
2609  {
2610  (yyval.ui) = 0;
2611  }
2612 #line 2613 "ppparse.c" /* yacc.c:1646 */
2613  break;
2614 
2615  case 102:
2616 #line 1179 "ppparse.y" /* yacc.c:1646 */
2617  {
2618  (yyval.ui) = 1U;
2619  }
2620 #line 2621 "ppparse.c" /* yacc.c:1646 */
2621  break;
2622 
2623  case 103:
2624 #line 1186 "ppparse.y" /* yacc.c:1646 */
2625  {
2626  (yyval.ui) = 0;
2627  }
2628 #line 2629 "ppparse.c" /* yacc.c:1646 */
2629  break;
2630 
2631  case 104:
2632 #line 1190 "ppparse.y" /* yacc.c:1646 */
2633  {
2634  (yyval.ui) = 1U;
2635  }
2636 #line 2637 "ppparse.c" /* yacc.c:1646 */
2637  break;
2638 
2639 
2640 #line 2641 "ppparse.c" /* yacc.c:1646 */
2641  default: break;
2642  }
2643  /* User semantic actions sometimes alter yychar, and that requires
2644  that yytoken be updated with the new translation. We take the
2645  approach of translating immediately before every use of yytoken.
2646  One alternative is translating here after every semantic action,
2647  but that translation would be missed if the semantic action invokes
2648  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2649  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
2650  incorrect destructor might then be invoked immediately. In the
2651  case of YYERROR or YYBACKUP, subsequent parser actions might lead
2652  to an incorrect destructor call or verbose syntax error message
2653  before the lookahead is translated. */
2654  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2655 
2656  YYPOPSTACK (yylen);
2657  yylen = 0;
2658  YY_STACK_PRINT (yyss, yyssp);
2659 
2660  *++yyvsp = yyval;
2661 
2662  /* Now 'shift' the result of the reduction. Determine what state
2663  that goes to, based on the state we popped back to and the rule
2664  number reduced by. */
2665 
2666  yyn = yyr1[yyn];
2667 
2668  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2669  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2670  yystate = yytable[yystate];
2671  else
2672  yystate = yydefgoto[yyn - YYNTOKENS];
2673 
2674  goto yynewstate;
2675 
2676 
2677 /*--------------------------------------.
2678 | yyerrlab -- here on detecting error. |
2679 `--------------------------------------*/
2680 yyerrlab:
2681  /* Make sure we have latest lookahead translation. See comments at
2682  user semantic actions for why this is necessary. */
2683  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
2684 
2685  /* If not already recovering from an error, report this error. */
2686  if (!yyerrstatus)
2687  {
2688  ++yynerrs;
2689 #if ! YYERROR_VERBOSE
2690  yyerror (YY_("syntax error"));
2691 #else
2692 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2693  yyssp, yytoken)
2694  {
2695  char const *yymsgp = YY_("syntax error");
2696  int yysyntax_error_status;
2697  yysyntax_error_status = YYSYNTAX_ERROR;
2698  if (yysyntax_error_status == 0)
2699  yymsgp = yymsg;
2700  else if (yysyntax_error_status == 1)
2701  {
2702  if (yymsg != yymsgbuf)
2703  YYSTACK_FREE (yymsg);
2704  yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
2705  if (!yymsg)
2706  {
2707  yymsg = yymsgbuf;
2708  yymsg_alloc = sizeof yymsgbuf;
2709  yysyntax_error_status = 2;
2710  }
2711  else
2712  {
2713  yysyntax_error_status = YYSYNTAX_ERROR;
2714  yymsgp = yymsg;
2715  }
2716  }
2717  yyerror (yymsgp);
2718  if (yysyntax_error_status == 2)
2719  goto yyexhaustedlab;
2720  }
2721 # undef YYSYNTAX_ERROR
2722 #endif
2723  }
2724 
2725 
2726 
2727  if (yyerrstatus == 3)
2728  {
2729  /* If just tried and failed to reuse lookahead token after an
2730  error, discard it. */
2731 
2732  if (yychar <= YYEOF)
2733  {
2734  /* Return failure if at end of input. */
2735  if (yychar == YYEOF)
2736  YYABORT;
2737  }
2738  else
2739  {
2740  yydestruct ("Error: discarding",
2741  yytoken, &yylval);
2742  yychar = YYEMPTY;
2743  }
2744  }
2745 
2746  /* Else will try to reuse lookahead token after shifting the error
2747  token. */
2748  goto yyerrlab1;
2749 
2750 
2751 /*---------------------------------------------------.
2752 | yyerrorlab -- error raised explicitly by YYERROR. |
2753 `---------------------------------------------------*/
2754 yyerrorlab:
2755 
2756  /* Pacify compilers like GCC when the user code never invokes
2757  YYERROR and the label yyerrorlab therefore never appears in user
2758  code. */
2759  if (/*CONSTCOND*/ 0)
2760  goto yyerrorlab;
2761 
2762  /* Do not reclaim the symbols of the rule whose action triggered
2763  this YYERROR. */
2764  YYPOPSTACK (yylen);
2765  yylen = 0;
2766  YY_STACK_PRINT (yyss, yyssp);
2767  yystate = *yyssp;
2768  goto yyerrlab1;
2769 
2770 
2771 /*-------------------------------------------------------------.
2772 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2773 `-------------------------------------------------------------*/
2774 yyerrlab1:
2775  yyerrstatus = 3; /* Each real token shifted decrements this. */
2776 
2777  for (;;)
2778  {
2779  yyn = yypact[yystate];
2780  if (!yypact_value_is_default (yyn))
2781  {
2782  yyn += YYTERROR;
2783  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2784  {
2785  yyn = yytable[yyn];
2786  if (0 < yyn)
2787  break;
2788  }
2789  }
2790 
2791  /* Pop the current state because it cannot handle the error token. */
2792  if (yyssp == yyss)
2793  YYABORT;
2794 
2795 
2796  yydestruct ("Error: popping",
2797  yystos[yystate], yyvsp);
2798  YYPOPSTACK (1);
2799  yystate = *yyssp;
2800  YY_STACK_PRINT (yyss, yyssp);
2801  }
2802 
2804  *++yyvsp = yylval;
2806 
2807 
2808  /* Shift the error token. */
2809  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2810 
2811  yystate = yyn;
2812  goto yynewstate;
2813 
2814 
2815 /*-------------------------------------.
2816 | yyacceptlab -- YYACCEPT comes here. |
2817 `-------------------------------------*/
2818 yyacceptlab:
2819  yyresult = 0;
2820  goto yyreturn;
2821 
2822 /*-----------------------------------.
2823 | yyabortlab -- YYABORT comes here. |
2824 `-----------------------------------*/
2825 yyabortlab:
2826  yyresult = 1;
2827  goto yyreturn;
2828 
2829 #if !defined yyoverflow || YYERROR_VERBOSE
2830 /*-------------------------------------------------.
2831 | yyexhaustedlab -- memory exhaustion comes here. |
2832 `-------------------------------------------------*/
2833 yyexhaustedlab:
2834  yyerror (YY_("memory exhausted"));
2835  yyresult = 2;
2836  /* Fall through. */
2837 #endif
2838 
2839 yyreturn:
2840  if (yychar != YYEMPTY)
2841  {
2842  /* Make sure we have latest lookahead translation. See comments at
2843  user semantic actions for why this is necessary. */
2844  yytoken = YYTRANSLATE (yychar);
2845  yydestruct ("Cleanup: discarding lookahead",
2846  yytoken, &yylval);
2847  }
2848  /* Do not reclaim the symbols of the rule whose action triggered
2849  this YYABORT or YYACCEPT. */
2850  YYPOPSTACK (yylen);
2851  YY_STACK_PRINT (yyss, yyssp);
2852  while (yyssp != yyss)
2853  {
2854  yydestruct ("Cleanup: popping",
2855  yystos[*yyssp], yyvsp);
2856  YYPOPSTACK (1);
2857  }
2858 #ifndef yyoverflow
2859  if (yyss != yyssa)
2860  YYSTACK_FREE (yyss);
2861 #endif
2862 #if YYERROR_VERBOSE
2863  if (yymsg != yymsgbuf)
2864  YYSTACK_FREE (yymsg);
2865 #endif
2866  return yyresult;
2867 }
2868 #line 1202 "ppparse.y" /* yacc.c:1906 */
2869 
static const yytype_int16 yypgoto[]
Definition: ppparse.c:1095
static size_t yystrlen(const char *yystr)
Definition: ppparse.c:1408
static struct cb_define_struct * ppp_define_add(struct cb_define_struct *list, const char *name, const char *text, const unsigned int override)
Definition: ppparse.c:347
struct cb_text_list * next
Definition: cobc.h:160
static const char *const yytname[]
Definition: ppparse.c:994
if fold fold static computed alternate extra correct stack on syntax debugging source implicit stack syntax write single quote
Definition: flag.def:120
#define yytable_value_is_error(Yytable_value)
Definition: ppparse.c:1042
static const yytype_uint16 yyrline[]
Definition: parser.c:2227
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: ppparse.c:1377
#define yyerror
Definition: ppparse.c:65
Definition: ppparse.c:615
static const yytype_int16 yydefgoto[]
Definition: ppparse.c:1105
Definition: ppparse.c:616
#define COND_LT
Definition: ppparse.c:93
static void yy_stack_print(yytype_int16 *yybottom, yytype_int16 *yytop)
Definition: parser.c:6233
int ppparse(void)
Definition: ppparse.c:1656
#define YYEOF
Definition: ppparse.c:1221
#define yylex
Definition: ppparse.c:64
const char * text
Definition: cobc.h:162
#define yychar
Definition: ppparse.c:70
int int_part
Definition: cobc.h:183
Definition: ppparse.c:617
unsigned char yytype_uint8
Definition: parser.c:1889
struct cb_define_struct * ds
Definition: ppparse.c:652
static struct cb_replace_list * ppp_replace_list_add(struct cb_replace_list *list, const struct cb_text_list *old_text, const struct cb_text_list *new_text, const unsigned int lead_or_trail)
Definition: ppparse.c:169
Definition: ppparse.c:600
static char * fold_upper(char *name)
Definition: ppparse.c:156
YYSTYPE pplval
Definition: ppparse.c:1646
#define YYFINAL
Definition: ppparse.c:913
#define YYINITDEPTH
Definition: ppparse.c:1385
Definition: ppparse.c:618
struct cb_define_struct * next
Definition: cobc.h:177
#define YYLAST
Definition: ppparse.c:915
#define PLEX_DEF_NONE
Definition: cobc.h:97
#define YY_NULLPTR
Definition: ppparse.c:551
#define YYABORT
Definition: ppparse.c:1224
static unsigned int ppp_check_needs_quote(const char *envval)
Definition: ppparse.c:449
#define YYACCEPT
Definition: ppparse.c:1223
static const yytype_uint8 yydefact[]
Definition: ppparse.c:1072
int dec_part
Definition: cobc.h:184
void * cobc_plex_strdup(const char *dupstr)
Definition: cobc.c:933
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep)
Definition: ppparse.c:1627
Definition: ppparse.c:620
Definition: ppparse.c:585
short int yytype_int16
Definition: parser.c:1907
#define PLEX_ACT_ELIF
Definition: cobc.h:94
int cb_source_format
Definition: cobc.c:162
int ppcopy(const char *, const char *, struct cb_replace_list *)
Definition: pplex.c:4508
#define YY_STACK_PRINT(Bottom, Top)
Definition: ppparse.c:1378
static const yytype_uint8 yytranslate[]
Definition: ppparse.c:936
#define YYSTACK_FREE
Definition: ppparse.c:824
static struct cb_text_list * ppp_list_add(struct cb_text_list *list, const char *text)
Definition: ppparse.c:423
Definition: ppparse.c:581
#define YYSTACK_ALLOC_MAXIMUM
Definition: ppparse.c:826
#define COND_LE
Definition: ppparse.c:95
#define yynerrs
Definition: ppparse.c:67
unsigned int ui
Definition: ppparse.c:653
struct cb_replace_list * r
Definition: ppparse.c:651
void plex_action_directive(const unsigned int, const unsigned int)
Definition: pplex.c:4589
#define YYDPRINTF(Args)
Definition: ppparse.c:1376
Definition: ppparse.c:636
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
Definition: ppparse.c:879
static void yy_symbol_print(FILE *yyoutput, int yytype, cb_tree const *const yyvaluep)
Definition: parser.c:6218
#define cob_u8_t
Definition: common.h:27
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
Definition: ppparse.c:777
#define YYSIZE_T
Definition: ppparse.c:710
char * name
Definition: cobc.h:179
Definition: ppparse.c:601
#define YYTERROR
Definition: ppparse.c:1248
static const yytype_uint8 yyr2[]
Definition: ppparse.c:1201
Definition: ppparse.c:633
#define PLEX_ACT_END
Definition: cobc.h:93
static void ppp_define_del(const char *name)
Definition: ppparse.c:388
strict implicit external value
Definition: warning.def:54
static const yytype_uint8 yyr1[]
Definition: ppparse.c:1184
#define YYSTACK_BYTES(N)
Definition: ppparse.c:868
char * s
Definition: ppparse.c:649
void ppparse_clear_vars(const struct cb_define_struct *p)
Definition: ppparse.c:490
static struct cb_define_struct * ppp_setvar_list
Definition: ppparse.c:101
#define CB_REPLACE_TRAILING
Definition: cobc.h:70
#define YYUSE(E)
Definition: ppparse.c:759
#define _(s)
Definition: cobcrun.c:59
Definition: ppparse.c:623
Definition: ppparse.c:627
unsigned int deftype
Definition: cobc.h:181
#define yydebug
Definition: ppparse.c:66
#define CB_REPLACE_LEADING
Definition: cobc.h:69
struct cb_replace_list * last
Definition: cobc.h:168
yytype_int16 yyss_alloc
Definition: parser.c:2066
struct cb_text_list * l
Definition: ppparse.c:650
EC ARGUMENT EC EC BOUND EC BOUND EC BOUND EC BOUND TABLE EC DATA EC DATA EC DATA PTR NULL
Definition: exception.def:95
static unsigned int ppp_set_value(struct cb_define_struct *p, const char *value)
Definition: ppparse.c:190
#define PLEX_DEF_NUM
Definition: cobc.h:99
if sign
Definition: flag.def:42
unsigned char yytype_uint8
Definition: ppparse.c:682
unsigned short int yytype_uint16
Definition: parser.c:1901
#define COND_GE
Definition: ppparse.c:96
#define COND_EQ
Definition: ppparse.c:92
YYSTYPE yyvs_alloc
Definition: ppparse.c:860
struct cb_text_list * last
Definition: cobc.h:161
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Definition: ppparse.c:776
struct cb_define_struct * last
Definition: cobc.h:178
Definition: ppparse.c:588
void pp_set_replace_list(struct cb_replace_list *, const cob_u32_t)
Definition: pplex.c:4394
FILE * ppout
Definition: pplex.c:367
static struct cb_define_struct * ppp_search_lists(const char *name)
Definition: ppparse.c:407
#define PLEX_DEF_DEL
Definition: cobc.h:100
#define YYPOPSTACK(N)
static const yytype_int16 yytable[]
Definition: ppparse.c:1117
Definition: ppparse.c:624
Definition: ppparse.c:599
#define PLEX_DEF_LIT
Definition: cobc.h:98
Definition: ppparse.c:589
#define CB_FORMAT_FIXED
Definition: cobc.h:65
static const yytype_int16 yypact[]
Definition: ppparse.c:1047
#define COND_NE
Definition: ppparse.c:97
#define YYSTACK_ALLOC
Definition: ppparse.c:823
char * value
Definition: cobc.h:180
#define COB_FOLD_LOWER
Definition: common.h:587
static void yy_reduce_print(yytype_int16 *yyssp, cb_tree *yyvsp, int yyrule)
Definition: parser.c:6256
unsigned int lead_trail
Definition: cobc.h:172
static int yysyntax_error(size_t *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken)
Definition: ppparse.c:1495
#define YYNTOKENS
Definition: ppparse.c:918
#define YYCASE_(N, S)
void cb_error(const char *,...) COB_A_FORMAT12
Definition: error.c:98
#define YYMAXDEPTH
Definition: ppparse.c:1396
#define YYTRANSLATE(YYX)
Definition: ppparse.c:931
static const yytype_uint8 yystos[]
Definition: ppparse.c:1161
struct cb_replace_list * next
Definition: cobc.h:167
static unsigned int current_cmd
Definition: ppparse.c:102
static char * yystpcpy(char *yydest, const char *yysrc)
Definition: ppparse.c:1425
Definition: ppparse.c:582
Definition: ppparse.c:631
Definition: ppparse.c:584
Definition: ppparse.c:621
static unsigned int ppp_compare_vals(const struct cb_define_struct *p1, const struct cb_define_struct *p2, const unsigned int cond)
Definition: ppparse.c:273
int si
Definition: ppparse.c:654
Definition: ppparse.c:625
#define yypact_value_is_default(Yystate)
Definition: ppparse.c:1037
yytokentype
Definition: parser.c:1343
void cb_warning(const char *,...) COB_A_FORMAT12
Definition: error.c:87
#define yylval
Definition: ppparse.c:69
#define YY_(Msgid)
Definition: ppparse.c:726
signed char yytype_int8
Definition: ppparse.c:688
void * cobc_plex_malloc(const size_t size)
Definition: cobc.c:916
#define CB_FORMAT_FREE
Definition: cobc.h:66
static void yy_symbol_value_print(FILE *yyoutput, int yytype, cb_tree const *const yyvaluep)
Definition: parser.c:6199
static const yytype_int16 yycheck[]
Definition: ppparse.c:1138
#define COND_GT
Definition: ppparse.c:94
Definition: ppparse.c:619
Definition: ppparse.c:583
#define YYFPRINTF
Definition: parser.c:6167
#define PLEX_ACT_IF
Definition: cobc.h:91
#define COB_FOLD_UPPER
Definition: common.h:586
unsigned short int yytype_uint16
Definition: ppparse.c:694
Definition: ppparse.c:603
const struct cb_text_list * old_text
Definition: cobc.h:170
Definition: ppparse.c:586
#define YY_REDUCE_PRINT(Rule)
Definition: ppparse.c:1379
Definition: ppparse.c:622
#define YYEMPTY
Definition: ppparse.c:1220
static char * fold_lower(char *name)
Definition: ppparse.c:143
const struct cb_text_list * new_text
Definition: cobc.h:171
#define YYERROR
Definition: ppparse.c:1225
Definition: ppparse.c:595
static char * fix_filename(char *name)
Definition: ppparse.c:132
static size_t yytnamerr(char *yyres, const char *yystr)
Definition: ppparse.c:1447
short int yytype_int16
Definition: ppparse.c:700
cb_tree yyvs_alloc
Definition: parser.c:2067
#define PLEX_ACT_ELSE
Definition: cobc.h:92
#define yyparse
Definition: ppparse.c:63
Definition: ppparse.c:628
#define YYSYNTAX_ERROR
static unsigned int ppp_search_comp_vars(const char *name)
Definition: ppparse.c:439