47 #define YYBISON_VERSION "3.0.4"
50 #define YYSKELETON_NAME "yacc.c"
63 #define yyparse ppparse
65 #define yyerror pperror
66 #define yydebug ppdebug
67 #define yynerrs ppnerrs
83 #define COB_IN_PPPARSE 1
90 #define pperror cb_error
105 static const char *
const compopts[] = {
121 static const char *
const varopts[] = {
135 if (name[0] ==
'\'' || name[0] ==
'\"') {
137 name[strlen (name) - 1] = 0;
147 for (p = (
unsigned char *)name; *p; p++) {
160 for (p = (
unsigned char *)name; *p; p++) {
172 const unsigned int lead_or_trail)
194 unsigned int dotseen;
208 if (*value ==
'"' || *value ==
'\'') {
211 size = strlen (p->
value) - 1;
212 if (sign != p->
value[size]) {
234 }
else if (*value ==
'-') {
243 for ( ; *s; ++s, ++size) {
252 if (*s >
'9' || *s <
'0') {
257 int_part = (int_part * 10) + (*s -
'0');
259 dec_part = (dec_part * 10) + (*s -
'0');
263 if (!int_part && !dec_part) {
275 const unsigned int cond)
289 cb_warning (
_(
"Directive comparison on different types"));
329 return (result == 0);
335 return (result <= 0);
337 return (result >= 0);
339 return (result != 0);
348 const char *text,
const unsigned int override)
354 for (l = list; l; l = l->
next) {
355 if (!strcasecmp (name, l->
name)) {
392 for (l = ppp_setvar_list; l; l = l->
next) {
393 if (!strcmp (name, l->
name)) {
411 for (p = ppp_setvar_list; p; p = p->
next) {
412 if (!strcasecmp (name, p->
name)) {
442 #define CB_PARSE_DEF(x,z) if (!strcasecmp (name, x)) return (z);
453 unsigned int dot_seen;
454 unsigned int sign_seen;
461 if (*s ==
'+' || *s ==
'-') {
475 if (*s >
'9' || *s <
'0') {
481 if (*s || size <= (dot_seen + sign_seen)) {
494 ppp_setvar_list =
NULL;
496 if (cb_perform_osvs) {
505 if (cb_ebcdic_sign) {
514 #ifdef WORDS_BIGENDIAN
537 for (q = p; q; q = q->
next) {
545 #line 546 "ppparse.c"
548 # if defined __cplusplus && 201103L <= __cplusplus
549 # define YY_NULLPTR nullptr
551 # define YY_NULLPTR 0
556 #ifdef YYERROR_VERBOSE
557 # undef YYERROR_VERBOSE
558 # define YYERROR_VERBOSE 1
560 # define YYERROR_VERBOSE 1
565 #ifndef YY_PP_PPPARSE_H_INCLUDED
566 # define YY_PP_PPPARSE_H_INCLUDED
643 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
647 #line 501 "ppparse.y"
656 #line 657 "ppparse.c"
660 # define YYSTYPE_IS_TRIVIAL 1
661 # define YYSTYPE_IS_DECLARED 1
673 #line 674 "ppparse.c"
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
710 # define YYSIZE_T size_t
712 # define YYSIZE_T unsigned int
716 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
719 # if defined YYENABLE_NLS && YYENABLE_NLS
721 # include <libintl.h>
722 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
726 # define YY_(Msgid) Msgid
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)
736 # define YY_ATTRIBUTE(Spec)
740 #ifndef YY_ATTRIBUTE_PURE
741 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
744 #ifndef YY_ATTRIBUTE_UNUSED
745 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
748 #if !defined _Noreturn \
749 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
750 # if defined _MSC_VER && 1200 <= _MSC_VER
751 # define _Noreturn __declspec (noreturn)
753 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
758 #if ! defined lint || defined __GNUC__
759 # define YYUSE(E) ((void) (E))
764 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
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")
773 # define YY_INITIAL_VALUE(Value) Value
775 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
776 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
777 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
779 #ifndef YY_INITIAL_VALUE
780 # define YY_INITIAL_VALUE(Value)
784 #if ! defined yyoverflow || YYERROR_VERBOSE
788 # ifdef YYSTACK_USE_ALLOCA
789 # if YYSTACK_USE_ALLOCA
791 # define YYSTACK_ALLOC __builtin_alloca
792 # elif defined __BUILTIN_VA_ARG_INCR
795 # define YYSTACK_ALLOC __alloca
796 # elif defined _MSC_VER
798 # define alloca _alloca
800 # define YYSTACK_ALLOC alloca
801 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
804 # ifndef EXIT_SUCCESS
805 # define EXIT_SUCCESS 0
812 # ifdef YYSTACK_ALLOC
814 # define YYSTACK_FREE(Ptr) do { ; } while (0)
815 # ifndef YYSTACK_ALLOC_MAXIMUM
820 # define YYSTACK_ALLOC_MAXIMUM 4032
823 # define YYSTACK_ALLOC YYMALLOC
824 # define YYSTACK_FREE YYFREE
825 # ifndef YYSTACK_ALLOC_MAXIMUM
826 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
828 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
829 && ! ((defined YYMALLOC || defined malloc) \
830 && (defined YYFREE || defined free)))
832 # ifndef EXIT_SUCCESS
833 # define EXIT_SUCCESS 0
837 # define YYMALLOC malloc
838 # if ! defined malloc && ! defined EXIT_SUCCESS
844 # if ! defined free && ! defined EXIT_SUCCESS
852 #if (! defined yyoverflow \
853 && (! defined __cplusplus \
854 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
864 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
868 # define YYSTACK_BYTES(N) \
869 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
870 + YYSTACK_GAP_MAXIMUM)
872 # define YYCOPY_NEEDED 1
879 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
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); \
892 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
896 # if defined __GNUC__ && 1 < __GNUC__
897 # define YYCOPY(Dst, Src, Count) \
898 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
900 # define YYCOPY(Dst, Src, Count) \
904 for (yyi = 0; yyi < (Count); yyi++) \
905 (Dst)[yyi] = (Src)[yyi]; \
924 #define YYNSTATES 180
929 #define YYMAXUTOK 315
931 #define YYTRANSLATE(YYX) \
932 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
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
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
991 #if YYDEBUG || YYERROR_VERBOSE || 1
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",
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,
1035 #define YYPACT_NINF -73
1037 #define yypact_value_is_default(Yystate) \
1038 (!!((Yystate) == (-73)))
1040 #define YYTABLE_NINF -106
1042 #define yytable_value_is_error(Yytable_value) \
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
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
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
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
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
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
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
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
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,
1218 #define yyerrok (yyerrstatus = 0)
1219 #define yyclearin (yychar = YYEMPTY)
1220 #define YYEMPTY (-2)
1223 #define YYACCEPT goto yyacceptlab
1224 #define YYABORT goto yyabortlab
1225 #define YYERROR goto yyerrorlab
1228 #define YYRECOVERING() (!!yyerrstatus)
1230 #define YYBACKUP(Token, Value) \
1232 if (yychar == YYEMPTY) \
1236 YYPOPSTACK (yylen); \
1242 yyerror (YY_("syntax error: cannot back up")); \
1249 #define YYERRCODE 256
1258 # define YYFPRINTF fprintf
1261 # define YYDPRINTF(Args) \
1268 #ifndef YY_LOCATION_PRINT
1269 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1273 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1277 YYFPRINTF (stderr, "%s ", Title); \
1278 yy_symbol_print (stderr, \
1280 YYFPRINTF (stderr, "\n"); \
1292 FILE *yyo = yyoutput;
1298 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1327 for (; yybottom <= yytop; yybottom++)
1329 int yybot = *yybottom;
1335 # define YY_STACK_PRINT(Bottom, Top) \
1338 yy_stack_print ((Bottom), (Top)); \
1349 unsigned long int yylno =
yyrline[yyrule];
1350 int yynrhs =
yyr2[yyrule];
1352 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
1355 for (yyi = 0; yyi < yynrhs; yyi++)
1359 yystos[yyssp[yyi + 1 - yynrhs]],
1360 &(yyvsp[(yyi + 1) - (yynrhs)])
1366 # define YY_REDUCE_PRINT(Rule) \
1369 yy_reduce_print (yyssp, yyvsp, Rule); \
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)
1385 # define YYINITDEPTH 200
1396 # define YYMAXDEPTH 10000
1403 # if defined __GLIBC__ && defined _STRING_H
1404 # define yystrlen strlen
1411 for (yylen = 0; yystr[yylen]; yylen++)
1419 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1420 # define yystpcpy stpcpy
1428 const char *yys = yysrc;
1430 while ((*yyd++ = *yys++) !=
'\0')
1452 char const *yyp = yystr;
1459 goto do_not_strip_quotes;
1463 goto do_not_strip_quotes;
1476 do_not_strip_quotes: ;
1482 return yystpcpy (yyres, yystr) - yyres;
1500 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1504 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1534 int yyn =
yypact[*yyssp];
1535 yyarg[yycount++] =
yytname[yytoken];
1541 int yyxbegin = yyn < 0 ? -yyn : 0;
1543 int yychecklim =
YYLAST - yyn + 1;
1547 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1551 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1557 yyarg[yycount++] =
yytname[yyx];
1560 if (! (yysize <= yysize1
1571 # define YYCASE_(N, S) \
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"));
1591 if (*yymsg_alloc < yysize)
1593 *yymsg_alloc = 2 * yysize;
1594 if (! (yysize <= *yymsg_alloc
1606 while ((*yyp = *yyformat) !=
'\0')
1607 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1692 char *yymsg = yymsgbuf;
1693 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1696 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1702 yyssp = yyss = yyssa;
1703 yyvsp = yyvs = yyvsa;
1706 YYDPRINTF ((stderr,
"Starting parse\n"));
1725 if (yyss + yystacksize - 1 <= yyssp)
1728 YYSIZE_T yysize = yyssp - yyss + 1;
1742 yyoverflow (
YY_(
"memory exhausted"),
1743 &yyss1, yysize *
sizeof (*yyssp),
1744 &yyvs1, yysize *
sizeof (*yyvsp),
1751 # ifndef YYSTACK_RELOCATE
1752 goto yyexhaustedlab;
1756 goto yyexhaustedlab;
1766 goto yyexhaustedlab;
1769 # undef YYSTACK_RELOCATE
1776 yyssp = yyss + yysize - 1;
1777 yyvsp = yyvs + yysize - 1;
1779 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1780 (
unsigned long int) yystacksize));
1782 if (yyss + yystacksize - 1 <= yyssp)
1786 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1811 YYDPRINTF ((stderr,
"Reading a token: "));
1815 if (yychar <=
YYEOF)
1817 yychar = yytoken =
YYEOF;
1818 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1884 yyval = yyvsp[1-yylen];
1891 #line 620 "ppparse.y"
1895 #line 1896 "ppparse.c"
1899 #line 625 "ppparse.y"
1903 #line 1904 "ppparse.c"
1907 #line 630 "ppparse.y"
1911 #line 1912 "ppparse.c"
1915 #line 634 "ppparse.y"
1919 #line 1920 "ppparse.c"
1923 #line 646 "ppparse.y"
1927 p =
ppp_define_add (ppp_setvar_list, (yyvsp[-2].s), (yyvsp[0].s), 1);
1929 ppp_setvar_list = p;
1930 fprintf (
ppout,
"#DEFLIT %s %s\n", (yyvsp[-2].s), (yyvsp[0].s));
1933 #line 1934 "ppparse.c"
1937 #line 657 "ppparse.y"
1944 if (*p ==
'\"' || *p ==
'\'') {
1947 size = strlen (p) - 1;
1948 if (p[size] != quote) {
1949 cb_error (
_(
"Invalid %s directive"),
"SOURCEFORMAT");
1953 if (!strcasecmp (p,
"FIXED")) {
1955 }
else if (!strcasecmp (p,
"FREE")) {
1958 cb_error (
_(
"Invalid %s directive"),
"SOURCEFORMAT");
1961 #line 1962 "ppparse.c"
1965 #line 681 "ppparse.y"
1969 #line 1970 "ppparse.c"
1973 #line 685 "ppparse.y"
1980 if (*p ==
'\"' || *p ==
'\'') {
1983 size = strlen (p) - 1;
1984 if (p[size] != quote) {
1985 cb_error (
_(
"Invalid %s directive"),
"FOLD-COPY-NAME");
1989 if (!strcasecmp (p,
"UPPER")) {
1991 }
else if (!strcasecmp (p,
"LOWER")) {
1994 cb_error (
_(
"Invalid %s directive"),
"FOLD-COPY-NAME");
1997 #line 1998 "ppparse.c"
2001 #line 712 "ppparse.y"
2003 fprintf (
ppout,
"#OPTION %s\n", (yyvsp[0].s));
2005 #line 2006 "ppparse.c"
2009 #line 716 "ppparse.y"
2011 fprintf (
ppout,
"#OPTION %s %s\n", (yyvsp[-2].s), (yyvsp[0].s));
2013 #line 2014 "ppparse.c"
2017 #line 727 "ppparse.y"
2021 #line 2022 "ppparse.c"
2025 #line 731 "ppparse.y"
2029 #line 2030 "ppparse.c"
2033 #line 735 "ppparse.y"
2035 cb_error (
_(
"Invalid %s directive"),
"SOURCE");
2038 #line 2039 "ppparse.c"
2042 #line 743 "ppparse.y"
2046 #line 2047 "ppparse.c"
2050 #line 747 "ppparse.y"
2057 s = getenv ((yyvsp[-3].s));
2059 if (s && *s && *s !=
' ') {
2060 if (*s ==
'"' || *s ==
'\'') {
2061 size = strlen (s) - 1U;
2063 if (s[0] == s[size]) {
2070 sprintf (q,
"'%s'", s);
2078 p =
ppp_define_add (ppp_setvar_list, (yyvsp[-3].s), q, (yyvsp[0].ui));
2080 ppp_setvar_list = p;
2084 #line 2085 "ppparse.c"
2088 #line 781 "ppparse.y"
2092 p =
ppp_define_add (ppp_setvar_list, (yyvsp[-3].s), (yyvsp[-1].s), (yyvsp[0].ui));
2094 ppp_setvar_list = p;
2097 #line 2098 "ppparse.c"
2101 #line 790 "ppparse.y"
2105 p =
ppp_define_add (ppp_setvar_list, (yyvsp[-3].s), (yyvsp[-1].s), (yyvsp[0].ui));
2107 ppp_setvar_list = p;
2108 fprintf (
ppout,
"#DEFLIT %s %s\n", (yyvsp[-3].s), (yyvsp[-1].s));
2111 #line 2112 "ppparse.c"
2115 #line 800 "ppparse.y"
2117 cb_error (
_(
"Invalid %s directive"),
"DEFINE/SET");
2119 #line 2120 "ppparse.c"
2123 #line 808 "ppparse.y"
2125 cb_warning (
_(
"%s directive not yet implemented"),
"TURN");
2127 #line 2128 "ppparse.c"
2131 #line 832 "ppparse.y"
2138 #line 2139 "ppparse.c"
2142 #line 839 "ppparse.y"
2149 #line 2150 "ppparse.c"
2153 #line 846 "ppparse.y"
2163 #line 2164 "ppparse.c"
2167 #line 856 "ppparse.y"
2182 #line 2183 "ppparse.c"
2186 #line 871 "ppparse.y"
2188 cb_error (
_(
"Invalid %s directive"),
"IF/ELIF");
2190 #line 2191 "ppparse.c"
2194 #line 883 "ppparse.y"
2207 #line 2208 "ppparse.c"
2211 #line 896 "ppparse.y"
2222 #line 2223 "ppparse.c"
2226 #line 910 "ppparse.y"
2230 #line 2231 "ppparse.c"
2234 #line 914 "ppparse.y"
2238 #line 2239 "ppparse.c"
2242 #line 918 "ppparse.y"
2246 #line 2247 "ppparse.c"
2250 #line 922 "ppparse.y"
2254 #line 2255 "ppparse.c"
2258 #line 926 "ppparse.y"
2262 #line 2263 "ppparse.c"
2266 #line 930 "ppparse.y"
2270 #line 2271 "ppparse.c"
2274 #line 934 "ppparse.y"
2278 #line 2279 "ppparse.c"
2282 #line 938 "ppparse.y"
2286 #line 2287 "ppparse.c"
2290 #line 942 "ppparse.y"
2294 #line 2295 "ppparse.c"
2298 #line 946 "ppparse.y"
2302 #line 2303 "ppparse.c"
2306 #line 950 "ppparse.y"
2310 #line 2311 "ppparse.c"
2314 #line 957 "ppparse.y"
2316 fputc (
'\n',
ppout);
2323 if ((yyvsp[-2].s)) {
2331 ppcopy ((yyvsp[-3].s), (yyvsp[-2].s), (yyvsp[0].r));
2333 #line 2334 "ppparse.c"
2337 #line 979 "ppparse.y"
2341 #line 2342 "ppparse.c"
2345 #line 983 "ppparse.y"
2347 (yyval.
s) = (yyvsp[0].s);
2349 #line 2350 "ppparse.c"
2353 #line 999 "ppparse.y"
2357 #line 2358 "ppparse.c"
2361 #line 1003 "ppparse.y"
2363 (yyval.
r) = (yyvsp[0].r);
2365 #line 2366 "ppparse.c"
2369 #line 1010 "ppparse.y"
2373 #line 2374 "ppparse.c"
2377 #line 1014 "ppparse.y"
2381 #line 2382 "ppparse.c"
2385 #line 1021 "ppparse.y"
2389 #line 2390 "ppparse.c"
2393 #line 1025 "ppparse.y"
2397 #line 2398 "ppparse.c"
2401 #line 1029 "ppparse.y"
2405 #line 2406 "ppparse.c"
2409 #line 1033 "ppparse.y"
2413 #line 2414 "ppparse.c"
2417 #line 1040 "ppparse.y"
2419 (yyval.
l) = (yyvsp[-1].l);
2421 #line 2422 "ppparse.c"
2425 #line 1044 "ppparse.y"
2427 (yyval.
l) = (yyvsp[0].l);
2429 #line 2430 "ppparse.c"
2433 #line 1051 "ppparse.y"
2437 #line 2438 "ppparse.c"
2441 #line 1055 "ppparse.y"
2443 (yyval.
l) = (yyvsp[-1].l);
2445 #line 2446 "ppparse.c"
2449 #line 1059 "ppparse.y"
2451 (yyval.
l) = (yyvsp[0].l);
2453 #line 2454 "ppparse.c"
2457 #line 1066 "ppparse.y"
2461 #line 2462 "ppparse.c"
2465 #line 1073 "ppparse.y"
2469 #line 2470 "ppparse.c"
2473 #line 1077 "ppparse.y"
2477 #line 2478 "ppparse.c"
2481 #line 1084 "ppparse.y"
2485 #line 2486 "ppparse.c"
2489 #line 1088 "ppparse.y"
2493 #line 2494 "ppparse.c"
2497 #line 1095 "ppparse.y"
2501 #line 2502 "ppparse.c"
2505 #line 1099 "ppparse.y"
2512 #line 2513 "ppparse.c"
2516 #line 1106 "ppparse.y"
2523 #line 2524 "ppparse.c"
2527 #line 1113 "ppparse.y"
2534 for (l = (yyval.
l); l->
next; l = l->
next) {
2537 l->
next = (yyvsp[-1].l);
2539 #line 2540 "ppparse.c"
2543 #line 1128 "ppparse.y"
2547 #line 2548 "ppparse.c"
2551 #line 1132 "ppparse.y"
2556 #line 2557 "ppparse.c"
2560 #line 1140 "ppparse.y"
2564 #line 2565 "ppparse.c"
2568 #line 1144 "ppparse.y"
2572 #line 2573 "ppparse.c"
2576 #line 1153 "ppparse.y"
2580 #line 2581 "ppparse.c"
2584 #line 1157 "ppparse.y"
2588 #line 2589 "ppparse.c"
2592 #line 1164 "ppparse.y"
2596 #line 2597 "ppparse.c"
2600 #line 1168 "ppparse.y"
2604 #line 2605 "ppparse.c"
2608 #line 1175 "ppparse.y"
2612 #line 2613 "ppparse.c"
2616 #line 1179 "ppparse.y"
2620 #line 2621 "ppparse.c"
2624 #line 1186 "ppparse.y"
2628 #line 2629 "ppparse.c"
2632 #line 1190 "ppparse.y"
2636 #line 2637 "ppparse.c"
2640 #line 2641 "ppparse.c"
2669 if (0 <= yystate && yystate <=
YYLAST &&
yycheck[yystate] == *yyssp)
2689 #if ! YYERROR_VERBOSE
2692 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2695 char const *yymsgp =
YY_(
"syntax error");
2696 int yysyntax_error_status;
2698 if (yysyntax_error_status == 0)
2700 else if (yysyntax_error_status == 1)
2702 if (yymsg != yymsgbuf)
2708 yymsg_alloc =
sizeof yymsgbuf;
2709 yysyntax_error_status = 2;
2718 if (yysyntax_error_status == 2)
2719 goto yyexhaustedlab;
2721 # undef YYSYNTAX_ERROR
2727 if (yyerrstatus == 3)
2732 if (yychar <=
YYEOF)
2735 if (yychar ==
YYEOF)
2829 #if !defined yyoverflow || YYERROR_VERBOSE
2852 while (yyssp != yyss)
2863 if (yymsg != yymsgbuf)
2868 #line 1202 "ppparse.y"
static const yytype_int16 yypgoto[]
static size_t yystrlen(const char *yystr)
static struct cb_define_struct * ppp_define_add(struct cb_define_struct *list, const char *name, const char *text, const unsigned int override)
struct cb_text_list * next
static const char *const yytname[]
if fold fold static computed alternate extra correct stack on syntax debugging source implicit stack syntax write single quote
#define yytable_value_is_error(Yytable_value)
static const yytype_uint16 yyrline[]
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
static const yytype_int16 yydefgoto[]
static void yy_stack_print(yytype_int16 *yybottom, yytype_int16 *yytop)
unsigned char yytype_uint8
struct cb_define_struct * ds
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)
static char * fold_upper(char *name)
struct cb_define_struct * next
static unsigned int ppp_check_needs_quote(const char *envval)
static const yytype_uint8 yydefact[]
void * cobc_plex_strdup(const char *dupstr)
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep)
int ppcopy(const char *, const char *, struct cb_replace_list *)
#define YY_STACK_PRINT(Bottom, Top)
static const yytype_uint8 yytranslate[]
static struct cb_text_list * ppp_list_add(struct cb_text_list *list, const char *text)
#define YYSTACK_ALLOC_MAXIMUM
struct cb_replace_list * r
void plex_action_directive(const unsigned int, const unsigned int)
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
static void yy_symbol_print(FILE *yyoutput, int yytype, cb_tree const *const yyvaluep)
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
static const yytype_uint8 yyr2[]
static void ppp_define_del(const char *name)
strict implicit external value
static const yytype_uint8 yyr1[]
void ppparse_clear_vars(const struct cb_define_struct *p)
static struct cb_define_struct * ppp_setvar_list
#define CB_REPLACE_TRAILING
#define CB_REPLACE_LEADING
struct cb_replace_list * last
EC ARGUMENT EC EC BOUND EC BOUND EC BOUND EC BOUND TABLE EC DATA EC DATA EC DATA PTR NULL
static unsigned int ppp_set_value(struct cb_define_struct *p, const char *value)
unsigned char yytype_uint8
unsigned short int yytype_uint16
struct cb_text_list * last
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
struct cb_define_struct * last
void pp_set_replace_list(struct cb_replace_list *, const cob_u32_t)
static struct cb_define_struct * ppp_search_lists(const char *name)
static const yytype_int16 yytable[]
static const yytype_int16 yypact[]
static void yy_reduce_print(yytype_int16 *yyssp, cb_tree *yyvsp, int yyrule)
static int yysyntax_error(size_t *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken)
void cb_error(const char *,...) COB_A_FORMAT12
static const yytype_uint8 yystos[]
struct cb_replace_list * next
static unsigned int current_cmd
static char * yystpcpy(char *yydest, const char *yysrc)
static unsigned int ppp_compare_vals(const struct cb_define_struct *p1, const struct cb_define_struct *p2, const unsigned int cond)
#define yypact_value_is_default(Yystate)
void cb_warning(const char *,...) COB_A_FORMAT12
void * cobc_plex_malloc(const size_t size)
static void yy_symbol_value_print(FILE *yyoutput, int yytype, cb_tree const *const yyvaluep)
static const yytype_int16 yycheck[]
unsigned short int yytype_uint16
const struct cb_text_list * old_text
#define YY_REDUCE_PRINT(Rule)
static char * fold_lower(char *name)
const struct cb_text_list * new_text
static char * fix_filename(char *name)
static size_t yytnamerr(char *yyres, const char *yystr)
static unsigned int ppp_search_comp_vars(const char *name)