GnuCOBOL  2.0
A free COBOL compiler
ppparse.c File Reference
#include "config.h"
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "cobc.h"
#include "ppparse.def"
#include <stddef.h>
Include dependency graph for ppparse.c:

Go to the source code of this file.

Data Structures

union  YYSTYPE
 
union  yyalloc
 

Macros

#define YYBISON   1
 
#define YYBISON_VERSION   "3.0.4"
 
#define YYSKELETON_NAME   "yacc.c"
 
#define YYPURE   0
 
#define YYPUSH   0
 
#define YYPULL   1
 
#define yyparse   ppparse
 
#define yylex   pplex
 
#define yyerror   pperror
 
#define yydebug   ppdebug
 
#define yynerrs   ppnerrs
 
#define yylval   pplval
 
#define yychar   ppchar
 
#define COB_IN_PPPARSE   1
 
#define pperror   cb_error
 
#define COND_EQ   0
 
#define COND_LT   1U
 
#define COND_GT   2U
 
#define COND_LE   3U
 
#define COND_GE   4U
 
#define COND_NE   5U
 
#define CB_PARSE_DEF(x, z)   if (!strcasecmp (name, x)) return (z);
 
#define YY_NULLPTR   0
 
#define YYERROR_VERBOSE   1
 
#define YY_PP_PPPARSE_H_INCLUDED
 
#define YYDEBUG   0
 
#define YYTOKENTYPE
 
#define YYSTYPE_IS_TRIVIAL   1
 
#define YYSTYPE_IS_DECLARED   1
 
#define YYSIZE_T   size_t
 
#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)
 
#define YY_(Msgid)   Msgid
 
#define YY_ATTRIBUTE(Spec)   /* empty */
 
#define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
 
#define YY_ATTRIBUTE_UNUSED   YY_ATTRIBUTE ((__unused__))
 
#define _Noreturn   YY_ATTRIBUTE ((__noreturn__))
 
#define YYUSE(E)   ((void) (E))
 
#define YY_INITIAL_VALUE(Value)   Value
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
 
#define YYSTACK_ALLOC   YYMALLOC
 
#define YYSTACK_FREE   YYFREE
 
#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM
 
#define YYMALLOC   malloc
 
#define YYFREE   free
 
#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)
 
#define YYSTACK_BYTES(N)
 
#define YYCOPY_NEEDED   1
 
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
 
#define YYCOPY(Dst, Src, Count)
 
#define YYFINAL   2
 
#define YYLAST   166
 
#define YYNTOKENS   63
 
#define YYNNTS   45
 
#define YYNRULES   116
 
#define YYNSTATES   180
 
#define YYUNDEFTOK   2
 
#define YYMAXUTOK   315
 
#define YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
#define YYPACT_NINF   -73
 
#define yypact_value_is_default(Yystate)   (!!((Yystate) == (-73)))
 
#define YYTABLE_NINF   -106
 
#define yytable_value_is_error(Yytable_value)   0
 
#define yyerrok   (yyerrstatus = 0)
 
#define yyclearin   (yychar = YYEMPTY)
 
#define YYEMPTY   (-2)
 
#define YYEOF   0
 
#define YYACCEPT   goto yyacceptlab
 
#define YYABORT   goto yyabortlab
 
#define YYERROR   goto yyerrorlab
 
#define YYRECOVERING()   (!!yyerrstatus)
 
#define YYBACKUP(Token, Value)
 
#define YYTERROR   1
 
#define YYERRCODE   256
 
#define YYDPRINTF(Args)
 
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
 
#define YY_STACK_PRINT(Bottom, Top)
 
#define YY_REDUCE_PRINT(Rule)
 
#define YYINITDEPTH   200
 
#define YYMAXDEPTH   10000
 
#define YYCASE_(N, S)
 
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
 
#define YYSYNTAX_ERROR
 

Typedefs

typedef union YYSTYPE YYSTYPE
 
typedef unsigned char yytype_uint8
 
typedef signed char yytype_int8
 
typedef unsigned short int yytype_uint16
 
typedef short int yytype_int16
 

Enumerations

enum  yytokentype {
  TOKEN_EOF = 0, ACCEPT = 258, ACCESS = 259, ADD = 260,
  ADDRESS = 261, ADVANCING = 262, AFTER = 263, ALL = 264,
  ALLOCATE = 265, ALPHABET = 266, ALPHABETIC = 267, ALPHABETIC_LOWER = 268,
  ALPHABETIC_UPPER = 269, ALPHANUMERIC = 270, ALPHANUMERIC_EDITED = 271, ALSO = 272,
  ALTER = 273, ALTERNATE = 274, AND = 275, ANY = 276,
  ARE = 277, AREA = 278, ARGUMENT_NUMBER = 279, ARGUMENT_VALUE = 280,
  AS = 281, ASCENDING = 282, ASCII = 283, ASSIGN = 284,
  AT = 285, ATTRIBUTE = 286, AUTO = 287, AUTOMATIC = 288,
  AWAY_FROM_ZERO = 289, BACKGROUND_COLOR = 290, BASED = 291, BEFORE = 292,
  BELL = 293, BINARY = 294, BINARY_C_LONG = 295, BINARY_CHAR = 296,
  BINARY_DOUBLE = 297, BINARY_LONG = 298, BINARY_SHORT = 299, BLANK = 300,
  BLINK = 301, BLOCK = 302, BOTTOM = 303, BY = 304,
  BYTE_LENGTH = 305, CALL = 306, CANCEL = 307, CAPACITY = 308,
  CF = 309, CH = 310, CHAINING = 311, CHARACTER = 312,
  CHARACTERS = 313, CLASS = 314, CLASSIFICATION = 315, CLOSE = 316,
  CODE = 317, CODE_SET = 318, COLLATING = 319, COL = 320,
  COLS = 321, COLUMN = 322, COLUMNS = 323, COMMA = 324,
  COMMAND_LINE = 325, COMMA_DELIM = 326, COMMIT = 327, COMMON = 328,
  COMP = 329, COMPUTE = 330, COMP_1 = 331, COMP_2 = 332,
  COMP_3 = 333, COMP_4 = 334, COMP_5 = 335, COMP_6 = 336,
  COMP_X = 337, CONCATENATE_FUNC = 338, CONDITION = 339, CONFIGURATION = 340,
  CONSTANT = 341, CONTAINS = 342, CONTENT = 343, CONTINUE = 344,
  CONTROL = 345, CONTROLS = 346, CONVERSION = 347, CONVERTING = 348,
  COPY = 349, CORRESPONDING = 350, COUNT = 351, CRT = 352,
  CRT_UNDER = 353, CURRENCY = 354, CURRENT_DATE_FUNC = 355, CURSOR = 356,
  CYCLE = 357, DATA = 358, DATE = 359, DAY = 360,
  DAY_OF_WEEK = 361, DE = 362, DEBUGGING = 363, DECIMAL_POINT = 364,
  DECLARATIVES = 365, DEFAULT = 366, DELETE = 367, DELIMITED = 368,
  DELIMITER = 369, DEPENDING = 370, DESCENDING = 371, DETAIL = 372,
  DISC = 373, DISK = 374, DISPLAY = 375, DISPLAY_OF_FUNC = 376,
  DIVIDE = 377, DIVISION = 378, DOWN = 379, DUPLICATES = 380,
  DYNAMIC = 381, EBCDIC = 382, EC = 383, ELSE = 384,
  END = 385, END_ACCEPT = 386, END_ADD = 387, END_CALL = 388,
  END_COMPUTE = 389, END_DELETE = 390, END_DISPLAY = 391, END_DIVIDE = 392,
  END_EVALUATE = 393, END_FUNCTION = 394, END_IF = 395, END_MULTIPLY = 396,
  END_PERFORM = 397, END_PROGRAM = 398, END_READ = 399, END_RETURN = 400,
  END_REWRITE = 401, END_SEARCH = 402, END_START = 403, END_STRING = 404,
  END_SUBTRACT = 405, END_UNSTRING = 406, END_WRITE = 407, ENTRY = 408,
  ENVIRONMENT = 409, ENVIRONMENT_NAME = 410, ENVIRONMENT_VALUE = 411, EOL = 412,
  EOP = 413, EOS = 414, EQUAL = 415, ERASE = 416,
  ERROR = 417, ESCAPE = 418, EVALUATE = 419, EVENT_STATUS = 420,
  EXCEPTION = 421, EXCEPTION_CONDITION = 422, EXCLUSIVE = 423, EXIT = 424,
  EXPONENTIATION = 425, EXTEND = 426, EXTERNAL = 427, FD = 428,
  FILE_CONTROL = 429, FILE_ID = 430, FILLER = 431, FINAL = 432,
  FIRST = 433, FLOAT_BINARY_128 = 434, FLOAT_BINARY_32 = 435, FLOAT_BINARY_64 = 436,
  FLOAT_DECIMAL_16 = 437, FLOAT_DECIMAL_34 = 438, FLOAT_DECIMAL_7 = 439, FLOAT_EXTENDED = 440,
  FLOAT_LONG = 441, FLOAT_SHORT = 442, FOOTING = 443, FOR = 444,
  FOREGROUND_COLOR = 445, FOREVER = 446, FORMATTED_DATE_FUNC = 447, FORMATTED_DATETIME_FUNC = 448,
  FORMATTED_TIME_FUNC = 449, FREE = 450, FROM = 451, FROM_CRT = 452,
  FULL = 453, FUNCTION = 454, FUNCTION_ID = 455, FUNCTION_NAME = 456,
  GENERATE = 457, GIVING = 458, GLOBAL = 459, GO = 460,
  GOBACK = 461, GREATER = 462, GREATER_OR_EQUAL = 463, GRID = 464,
  GROUP = 465, HEADING = 466, HIGHLIGHT = 467, HIGH_VALUE = 468,
  ID = 469, IDENTIFICATION = 470, IF = 471, IGNORE = 472,
  IGNORING = 473, IN = 474, INDEX = 475, INDEXED = 476,
  INDICATE = 477, INITIALIZE = 478, INITIALIZED = 479, INITIATE = 480,
  INPUT = 481, INPUT_OUTPUT = 482, INSPECT = 483, INTO = 484,
  INTRINSIC = 485, INVALID = 486, INVALID_KEY = 487, IS = 488,
  I_O = 489, I_O_CONTROL = 490, JUSTIFIED = 491, KEPT = 492,
  KEY = 493, KEYBOARD = 494, LABEL = 495, LAST = 496,
  LEADING = 497, LEFT = 498, LEFTLINE = 499, LENGTH = 500,
  LENGTH_OF = 501, LESS = 502, LESS_OR_EQUAL = 503, LIMIT = 504,
  LIMITS = 505, LINAGE = 506, LINAGE_COUNTER = 507, LINE = 508,
  LINE_COUNTER = 509, LINES = 510, LINKAGE = 511, LITERAL = 512,
  LOCALE = 513, LOCALE_DATE_FUNC = 514, LOCALE_TIME_FUNC = 515, LOCALE_TIME_FROM_FUNC = 516,
  LOCAL_STORAGE = 517, LOCK = 518, LOWER = 519, LOWER_CASE_FUNC = 520,
  LOWLIGHT = 521, LOW_VALUE = 522, MANUAL = 523, MEMORY = 524,
  MERGE = 525, MINUS = 526, MNEMONIC_NAME = 527, MODE = 528,
  MOVE = 529, MULTIPLE = 530, MULTIPLY = 531, NAME = 532,
  NATIONAL = 533, NATIONAL_EDITED = 534, NATIONAL_OF_FUNC = 535, NATIVE = 536,
  NEAREST_AWAY_FROM_ZERO = 537, NEAREST_EVEN = 538, NEAREST_TOWARD_ZERO = 539, NEGATIVE = 540,
  NEXT = 541, NEXT_PAGE = 542, NO = 543, NO_ECHO = 544,
  NORMAL = 545, NOT = 546, NOTHING = 547, NOT_END = 548,
  NOT_EOP = 549, NOT_ESCAPE = 550, NOT_EQUAL = 551, NOT_EXCEPTION = 552,
  NOT_INVALID_KEY = 553, NOT_OVERFLOW = 554, NOT_SIZE_ERROR = 555, NO_ADVANCING = 556,
  NUMBER = 557, NUMBERS = 558, NUMERIC = 559, NUMERIC_EDITED = 560,
  NUMVALC_FUNC = 561, OBJECT_COMPUTER = 562, OCCURS = 563, OF = 564,
  OFF = 565, OMITTED = 566, ON = 567, ONLY = 568,
  OPEN = 569, OPTIONAL = 570, OR = 571, ORDER = 572,
  ORGANIZATION = 573, OTHER = 574, OUTPUT = 575, OVERLINE = 576,
  PACKED_DECIMAL = 577, PADDING = 578, PAGE = 579, PAGE_COUNTER = 580,
  PARAGRAPH = 581, PERFORM = 582, PH = 583, PF = 584,
  PICTURE = 585, PICTURE_SYMBOL = 586, PLUS = 587, POINTER = 588,
  POSITION = 589, POSITIVE = 590, PRESENT = 591, PREVIOUS = 592,
  PRINT = 593, PRINTER = 594, PRINTER_1 = 595, PRINTING = 596,
  PROCEDURE = 597, PROCEDURES = 598, PROCEED = 599, PROGRAM = 600,
  PROGRAM_ID = 601, PROGRAM_NAME = 602, PROGRAM_POINTER = 603, PROHIBITED = 604,
  PROMPT = 605, PROTECTED = 606, QUOTE = 607, RANDOM = 608,
  RD = 609, READ = 610, READY_TRACE = 611, RECORD = 612,
  RECORDING = 613, RECORDS = 614, RECURSIVE = 615, REDEFINES = 616,
  REEL = 617, REFERENCE = 618, REFERENCES = 619, RELATIVE = 620,
  RELEASE = 621, REMAINDER = 622, REMOVAL = 623, RENAMES = 624,
  REPLACE = 625, REPLACING = 626, REPORT = 627, REPORTING = 628,
  REPORTS = 629, REPOSITORY = 630, REQUIRED = 631, RESERVE = 632,
  RESET = 633, RESET_TRACE = 634, RETURN = 635, RETURNING = 636,
  REVERSE_FUNC = 637, REVERSE_VIDEO = 638, REVERSED = 639, REWIND = 640,
  REWRITE = 641, RF = 642, RH = 643, RIGHT = 644,
  ROLLBACK = 645, ROUNDED = 646, RUN = 647, SAME = 648,
  SCREEN = 649, SCREEN_CONTROL = 650, SCROLL = 651, SD = 652,
  SEARCH = 653, SECTION = 654, SECURE = 655, SEGMENT_LIMIT = 656,
  SELECT = 657, SEMI_COLON = 658, SENTENCE = 659, SEPARATE = 660,
  SEQUENCE = 661, SEQUENTIAL = 662, SET = 663, SHARING = 664,
  SIGN = 665, SIGNED = 666, SIGNED_INT = 667, SIGNED_LONG = 668,
  SIGNED_SHORT = 669, SIZE = 670, SIZE_ERROR = 671, SORT = 672,
  SORT_MERGE = 673, SOURCE = 674, SOURCE_COMPUTER = 675, SPACE = 676,
  SPECIAL_NAMES = 677, STANDARD = 678, STANDARD_1 = 679, STANDARD_2 = 680,
  START = 681, STATIC = 682, STATUS = 683, STDCALL = 684,
  STEP = 685, STOP = 686, STRING = 687, SUBSTITUTE_FUNC = 688,
  SUBSTITUTE_CASE_FUNC = 689, SUBTRACT = 690, SUM = 691, SUPPRESS = 692,
  SYMBOLIC = 693, SYNCHRONIZED = 694, SYSTEM_DEFAULT = 695, SYSTEM_OFFSET = 696,
  TAB = 697, TALLYING = 698, TAPE = 699, TERMINATE = 700,
  TEST = 701, THAN = 702, THEN = 703, THRU = 704,
  TIME = 705, TIMEOUT = 706, TIMES = 707, TO = 708,
  TOK_AMPER = 709, TOK_CLOSE_PAREN = 710, TOK_COLON = 711, TOK_DIV = 712,
  TOK_DOT = 713, TOK_EQUAL = 714, TOK_FALSE = 715, TOK_FILE = 716,
  TOK_GREATER = 717, TOK_INITIAL = 718, TOK_LESS = 719, TOK_MINUS = 720,
  TOK_MUL = 721, TOK_NULL = 722, TOK_OVERFLOW = 723, TOK_OPEN_PAREN = 724,
  TOK_PLUS = 725, TOK_TRUE = 726, TOP = 727, TOWARD_GREATER = 728,
  TOWARD_LESSER = 729, TRAILING = 730, TRANSFORM = 731, TRIM_FUNC = 732,
  TRUNCATION = 733, TYPE = 734, UNDERLINE = 735, UNIT = 736,
  UNLOCK = 737, UNSIGNED = 738, UNSIGNED_INT = 739, UNSIGNED_LONG = 740,
  UNSIGNED_SHORT = 741, UNSTRING = 742, UNTIL = 743, UP = 744,
  UPDATE = 745, UPON = 746, UPON_ARGUMENT_NUMBER = 747, UPON_COMMAND_LINE = 748,
  UPON_ENVIRONMENT_NAME = 749, UPON_ENVIRONMENT_VALUE = 750, UPPER = 751, UPPER_CASE_FUNC = 752,
  USAGE = 753, USE = 754, USER = 755, USER_DEFAULT = 756,
  USER_FUNCTION_NAME = 757, USING = 758, VALUE = 759, VARYING = 760,
  WAIT = 761, WHEN = 762, WHEN_COMPILED_FUNC = 763, WITH = 764,
  WORD = 765, WORDS = 766, WORKING_STORAGE = 767, WRITE = 768,
  YYYYDDD = 769, YYYYMMDD = 770, ZERO = 771, SHIFT_PREFER = 772,
  TOKEN_EOF = 0, ACCEPT = 258, ACCESS = 259, ADD = 260,
  ADDRESS = 261, ADVANCING = 262, AFTER = 263, ALL = 264,
  ALLOCATE = 265, ALPHABET = 266, ALPHABETIC = 267, ALPHABETIC_LOWER = 268,
  ALPHABETIC_UPPER = 269, ALPHANUMERIC = 270, ALPHANUMERIC_EDITED = 271, ALSO = 272,
  ALTER = 273, ALTERNATE = 274, AND = 275, ANY = 276,
  ARE = 277, AREA = 278, ARGUMENT_NUMBER = 279, ARGUMENT_VALUE = 280,
  AS = 281, ASCENDING = 282, ASCII = 283, ASSIGN = 284,
  AT = 285, ATTRIBUTE = 286, AUTO = 287, AUTOMATIC = 288,
  AWAY_FROM_ZERO = 289, BACKGROUND_COLOR = 290, BASED = 291, BEFORE = 292,
  BELL = 293, BINARY = 294, BINARY_C_LONG = 295, BINARY_CHAR = 296,
  BINARY_DOUBLE = 297, BINARY_LONG = 298, BINARY_SHORT = 299, BLANK = 300,
  BLINK = 301, BLOCK = 302, BOTTOM = 303, BY = 304,
  BYTE_LENGTH = 305, CALL = 306, CANCEL = 307, CAPACITY = 308,
  CF = 309, CH = 310, CHAINING = 311, CHARACTER = 312,
  CHARACTERS = 313, CLASS = 314, CLASSIFICATION = 315, CLOSE = 316,
  CODE = 317, CODE_SET = 318, COLLATING = 319, COL = 320,
  COLS = 321, COLUMN = 322, COLUMNS = 323, COMMA = 324,
  COMMAND_LINE = 325, COMMA_DELIM = 326, COMMIT = 327, COMMON = 328,
  COMP = 329, COMPUTE = 330, COMP_1 = 331, COMP_2 = 332,
  COMP_3 = 333, COMP_4 = 334, COMP_5 = 335, COMP_6 = 336,
  COMP_X = 337, CONCATENATE_FUNC = 338, CONDITION = 339, CONFIGURATION = 340,
  CONSTANT = 341, CONTAINS = 342, CONTENT = 343, CONTINUE = 344,
  CONTROL = 345, CONTROLS = 346, CONVERSION = 347, CONVERTING = 348,
  COPY = 349, CORRESPONDING = 350, COUNT = 351, CRT = 352,
  CRT_UNDER = 353, CURRENCY = 354, CURRENT_DATE_FUNC = 355, CURSOR = 356,
  CYCLE = 357, DATA = 358, DATE = 359, DAY = 360,
  DAY_OF_WEEK = 361, DE = 362, DEBUGGING = 363, DECIMAL_POINT = 364,
  DECLARATIVES = 365, DEFAULT = 366, DELETE = 367, DELIMITED = 368,
  DELIMITER = 369, DEPENDING = 370, DESCENDING = 371, DETAIL = 372,
  DISC = 373, DISK = 374, DISPLAY = 375, DISPLAY_OF_FUNC = 376,
  DIVIDE = 377, DIVISION = 378, DOWN = 379, DUPLICATES = 380,
  DYNAMIC = 381, EBCDIC = 382, EC = 383, ELSE = 384,
  END = 385, END_ACCEPT = 386, END_ADD = 387, END_CALL = 388,
  END_COMPUTE = 389, END_DELETE = 390, END_DISPLAY = 391, END_DIVIDE = 392,
  END_EVALUATE = 393, END_FUNCTION = 394, END_IF = 395, END_MULTIPLY = 396,
  END_PERFORM = 397, END_PROGRAM = 398, END_READ = 399, END_RETURN = 400,
  END_REWRITE = 401, END_SEARCH = 402, END_START = 403, END_STRING = 404,
  END_SUBTRACT = 405, END_UNSTRING = 406, END_WRITE = 407, ENTRY = 408,
  ENVIRONMENT = 409, ENVIRONMENT_NAME = 410, ENVIRONMENT_VALUE = 411, EOL = 412,
  EOP = 413, EOS = 414, EQUAL = 415, ERASE = 416,
  ERROR = 417, ESCAPE = 418, EVALUATE = 419, EVENT_STATUS = 420,
  EXCEPTION = 421, EXCEPTION_CONDITION = 422, EXCLUSIVE = 423, EXIT = 424,
  EXPONENTIATION = 425, EXTEND = 426, EXTERNAL = 427, FD = 428,
  FILE_CONTROL = 429, FILE_ID = 430, FILLER = 431, FINAL = 432,
  FIRST = 433, FLOAT_BINARY_128 = 434, FLOAT_BINARY_32 = 435, FLOAT_BINARY_64 = 436,
  FLOAT_DECIMAL_16 = 437, FLOAT_DECIMAL_34 = 438, FLOAT_DECIMAL_7 = 439, FLOAT_EXTENDED = 440,
  FLOAT_LONG = 441, FLOAT_SHORT = 442, FOOTING = 443, FOR = 444,
  FOREGROUND_COLOR = 445, FOREVER = 446, FORMATTED_DATE_FUNC = 447, FORMATTED_DATETIME_FUNC = 448,
  FORMATTED_TIME_FUNC = 449, FREE = 450, FROM = 451, FROM_CRT = 452,
  FULL = 453, FUNCTION = 454, FUNCTION_ID = 455, FUNCTION_NAME = 456,
  GENERATE = 457, GIVING = 458, GLOBAL = 459, GO = 460,
  GOBACK = 461, GREATER = 462, GREATER_OR_EQUAL = 463, GRID = 464,
  GROUP = 465, HEADING = 466, HIGHLIGHT = 467, HIGH_VALUE = 468,
  ID = 469, IDENTIFICATION = 470, IF = 471, IGNORE = 472,
  IGNORING = 473, IN = 474, INDEX = 475, INDEXED = 476,
  INDICATE = 477, INITIALIZE = 478, INITIALIZED = 479, INITIATE = 480,
  INPUT = 481, INPUT_OUTPUT = 482, INSPECT = 483, INTO = 484,
  INTRINSIC = 485, INVALID = 486, INVALID_KEY = 487, IS = 488,
  I_O = 489, I_O_CONTROL = 490, JUSTIFIED = 491, KEPT = 492,
  KEY = 493, KEYBOARD = 494, LABEL = 495, LAST = 496,
  LEADING = 497, LEFT = 498, LEFTLINE = 499, LENGTH = 500,
  LENGTH_OF = 501, LESS = 502, LESS_OR_EQUAL = 503, LIMIT = 504,
  LIMITS = 505, LINAGE = 506, LINAGE_COUNTER = 507, LINE = 508,
  LINE_COUNTER = 509, LINES = 510, LINKAGE = 511, LITERAL = 512,
  LOCALE = 513, LOCALE_DATE_FUNC = 514, LOCALE_TIME_FUNC = 515, LOCALE_TIME_FROM_FUNC = 516,
  LOCAL_STORAGE = 517, LOCK = 518, LOWER = 519, LOWER_CASE_FUNC = 520,
  LOWLIGHT = 521, LOW_VALUE = 522, MANUAL = 523, MEMORY = 524,
  MERGE = 525, MINUS = 526, MNEMONIC_NAME = 527, MODE = 528,
  MOVE = 529, MULTIPLE = 530, MULTIPLY = 531, NAME = 532,
  NATIONAL = 533, NATIONAL_EDITED = 534, NATIONAL_OF_FUNC = 535, NATIVE = 536,
  NEAREST_AWAY_FROM_ZERO = 537, NEAREST_EVEN = 538, NEAREST_TOWARD_ZERO = 539, NEGATIVE = 540,
  NEXT = 541, NEXT_PAGE = 542, NO = 543, NO_ECHO = 544,
  NORMAL = 545, NOT = 546, NOTHING = 547, NOT_END = 548,
  NOT_EOP = 549, NOT_ESCAPE = 550, NOT_EQUAL = 551, NOT_EXCEPTION = 552,
  NOT_INVALID_KEY = 553, NOT_OVERFLOW = 554, NOT_SIZE_ERROR = 555, NO_ADVANCING = 556,
  NUMBER = 557, NUMBERS = 558, NUMERIC = 559, NUMERIC_EDITED = 560,
  NUMVALC_FUNC = 561, OBJECT_COMPUTER = 562, OCCURS = 563, OF = 564,
  OFF = 565, OMITTED = 566, ON = 567, ONLY = 568,
  OPEN = 569, OPTIONAL = 570, OR = 571, ORDER = 572,
  ORGANIZATION = 573, OTHER = 574, OUTPUT = 575, OVERLINE = 576,
  PACKED_DECIMAL = 577, PADDING = 578, PAGE = 579, PAGE_COUNTER = 580,
  PARAGRAPH = 581, PERFORM = 582, PH = 583, PF = 584,
  PICTURE = 585, PICTURE_SYMBOL = 586, PLUS = 587, POINTER = 588,
  POSITION = 589, POSITIVE = 590, PRESENT = 591, PREVIOUS = 592,
  PRINT = 593, PRINTER = 594, PRINTER_1 = 595, PRINTING = 596,
  PROCEDURE = 597, PROCEDURES = 598, PROCEED = 599, PROGRAM = 600,
  PROGRAM_ID = 601, PROGRAM_NAME = 602, PROGRAM_POINTER = 603, PROHIBITED = 604,
  PROMPT = 605, PROTECTED = 606, QUOTE = 607, RANDOM = 608,
  RD = 609, READ = 610, READY_TRACE = 611, RECORD = 612,
  RECORDING = 613, RECORDS = 614, RECURSIVE = 615, REDEFINES = 616,
  REEL = 617, REFERENCE = 618, REFERENCES = 619, RELATIVE = 620,
  RELEASE = 621, REMAINDER = 622, REMOVAL = 623, RENAMES = 624,
  REPLACE = 625, REPLACING = 626, REPORT = 627, REPORTING = 628,
  REPORTS = 629, REPOSITORY = 630, REQUIRED = 631, RESERVE = 632,
  RESET = 633, RESET_TRACE = 634, RETURN = 635, RETURNING = 636,
  REVERSE_FUNC = 637, REVERSE_VIDEO = 638, REVERSED = 639, REWIND = 640,
  REWRITE = 641, RF = 642, RH = 643, RIGHT = 644,
  ROLLBACK = 645, ROUNDED = 646, RUN = 647, SAME = 648,
  SCREEN = 649, SCREEN_CONTROL = 650, SCROLL = 651, SD = 652,
  SEARCH = 653, SECTION = 654, SECURE = 655, SEGMENT_LIMIT = 656,
  SELECT = 657, SEMI_COLON = 658, SENTENCE = 659, SEPARATE = 660,
  SEQUENCE = 661, SEQUENTIAL = 662, SET = 663, SHARING = 664,
  SIGN = 665, SIGNED = 666, SIGNED_INT = 667, SIGNED_LONG = 668,
  SIGNED_SHORT = 669, SIZE = 670, SIZE_ERROR = 671, SORT = 672,
  SORT_MERGE = 673, SOURCE = 674, SOURCE_COMPUTER = 675, SPACE = 676,
  SPECIAL_NAMES = 677, STANDARD = 678, STANDARD_1 = 679, STANDARD_2 = 680,
  START = 681, STATIC = 682, STATUS = 683, STDCALL = 684,
  STEP = 685, STOP = 686, STRING = 687, SUBSTITUTE_FUNC = 688,
  SUBSTITUTE_CASE_FUNC = 689, SUBTRACT = 690, SUM = 691, SUPPRESS = 692,
  SYMBOLIC = 693, SYNCHRONIZED = 694, SYSTEM_DEFAULT = 695, SYSTEM_OFFSET = 696,
  TAB = 697, TALLYING = 698, TAPE = 699, TERMINATE = 700,
  TEST = 701, THAN = 702, THEN = 703, THRU = 704,
  TIME = 705, TIMEOUT = 706, TIMES = 707, TO = 708,
  TOK_AMPER = 709, TOK_CLOSE_PAREN = 710, TOK_COLON = 711, TOK_DIV = 712,
  TOK_DOT = 713, TOK_EQUAL = 714, TOK_FALSE = 715, TOK_FILE = 716,
  TOK_GREATER = 717, TOK_INITIAL = 718, TOK_LESS = 719, TOK_MINUS = 720,
  TOK_MUL = 721, TOK_NULL = 722, TOK_OVERFLOW = 723, TOK_OPEN_PAREN = 724,
  TOK_PLUS = 725, TOK_TRUE = 726, TOP = 727, TOWARD_GREATER = 728,
  TOWARD_LESSER = 729, TRAILING = 730, TRANSFORM = 731, TRIM_FUNC = 732,
  TRUNCATION = 733, TYPE = 734, UNDERLINE = 735, UNIT = 736,
  UNLOCK = 737, UNSIGNED = 738, UNSIGNED_INT = 739, UNSIGNED_LONG = 740,
  UNSIGNED_SHORT = 741, UNSTRING = 742, UNTIL = 743, UP = 744,
  UPDATE = 745, UPON = 746, UPON_ARGUMENT_NUMBER = 747, UPON_COMMAND_LINE = 748,
  UPON_ENVIRONMENT_NAME = 749, UPON_ENVIRONMENT_VALUE = 750, UPPER = 751, UPPER_CASE_FUNC = 752,
  USAGE = 753, USE = 754, USER = 755, USER_DEFAULT = 756,
  USER_FUNCTION_NAME = 757, USING = 758, VALUE = 759, VARYING = 760,
  WAIT = 761, WHEN = 762, WHEN_COMPILED_FUNC = 763, WITH = 764,
  WORD = 765, WORDS = 766, WORKING_STORAGE = 767, WRITE = 768,
  YYYYDDD = 769, YYYYMMDD = 770, ZERO = 771, SHIFT_PREFER = 772,
  TOKEN_EOF = 0, ALSO = 258, BY = 259, COPY = 260,
  EQEQ = 261, IN = 262, LAST = 263, LEADING = 264,
  OF = 265, OFF = 266, PRINTING = 267, REPLACE = 268,
  REPLACING = 269, SUPPRESS = 270, TRAILING = 271, DOT = 272,
  GARBAGE = 273, SOURCE_DIRECTIVE = 274, FORMAT = 275, IS = 276,
  FIXED = 277, FREE = 278, DEFINE_DIRECTIVE = 279, AS = 280,
  PARAMETER = 281, OVERRIDE = 282, SET_DIRECTIVE = 283, CONSTANT = 284,
  SOURCEFORMAT = 285, FOLDCOPYNAME = 286, NOFOLDCOPYNAME = 287, IF_DIRECTIVE = 288,
  ELSE_DIRECTIVE = 289, ENDIF_DIRECTIVE = 290, ELIF_DIRECTIVE = 291, GE = 292,
  LE = 293, LT = 294, GT = 295, EQ = 296,
  NE = 297, NOT = 298, THAN = 299, TO = 300,
  OR = 301, EQUAL = 302, GREATER = 303, LESS = 304,
  SET = 305, DEFINED = 306, TURN_DIRECTIVE = 307, ON = 308,
  CHECKING = 309, WITH = 310, LOCATION = 311, TERMINATOR = 312,
  TOKEN = 313, VARIABLE = 314, LITERAL = 315, TOKEN_EOF = 0,
  ALSO = 258, BY = 259, COPY = 260, EQEQ = 261,
  IN = 262, LAST = 263, LEADING = 264, OF = 265,
  OFF = 266, PRINTING = 267, REPLACE = 268, REPLACING = 269,
  SUPPRESS = 270, TRAILING = 271, DOT = 272, GARBAGE = 273,
  SOURCE_DIRECTIVE = 274, FORMAT = 275, IS = 276, FIXED = 277,
  FREE = 278, DEFINE_DIRECTIVE = 279, AS = 280, PARAMETER = 281,
  OVERRIDE = 282, SET_DIRECTIVE = 283, CONSTANT = 284, SOURCEFORMAT = 285,
  FOLDCOPYNAME = 286, NOFOLDCOPYNAME = 287, IF_DIRECTIVE = 288, ELSE_DIRECTIVE = 289,
  ENDIF_DIRECTIVE = 290, ELIF_DIRECTIVE = 291, GE = 292, LE = 293,
  LT = 294, GT = 295, EQ = 296, NE = 297,
  NOT = 298, THAN = 299, TO = 300, OR = 301,
  EQUAL = 302, GREATER = 303, LESS = 304, SET = 305,
  DEFINED = 306, TURN_DIRECTIVE = 307, ON = 308, CHECKING = 309,
  WITH = 310, LOCATION = 311, TERMINATOR = 312, TOKEN = 313,
  VARIABLE = 314, LITERAL = 315
}
 

Functions

static char * fix_filename (char *name)
 
static char * fold_lower (char *name)
 
static char * fold_upper (char *name)
 
static struct cb_replace_listppp_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 unsigned int ppp_set_value (struct cb_define_struct *p, const char *value)
 
static unsigned int ppp_compare_vals (const struct cb_define_struct *p1, const struct cb_define_struct *p2, const unsigned int cond)
 
static struct cb_define_structppp_define_add (struct cb_define_struct *list, const char *name, const char *text, const unsigned int override)
 
static void ppp_define_del (const char *name)
 
static struct cb_define_structppp_search_lists (const char *name)
 
static struct cb_text_listppp_list_add (struct cb_text_list *list, const char *text)
 
static unsigned int ppp_search_comp_vars (const char *name)
 
static unsigned int ppp_check_needs_quote (const char *envval)
 
void ppparse_clear_vars (const struct cb_define_struct *p)
 
int ppparse (void)
 
static size_t yystrlen (const char *yystr)
 
static char * yystpcpy (char *yydest, const char *yysrc)
 
static size_t yytnamerr (char *yyres, const char *yystr)
 
static int yysyntax_error (size_t *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken)
 
static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
 

Variables

static struct cb_define_structppp_setvar_list
 
static unsigned int current_cmd
 
YYSTYPE pplval
 
static const yytype_uint8 yytranslate []
 
static const char *const yytname []
 
static const yytype_int16 yypact []
 
static const yytype_uint8 yydefact []
 
static const yytype_int16 yypgoto []
 
static const yytype_int16 yydefgoto []
 
static const yytype_int16 yytable []
 
static const yytype_int16 yycheck []
 
static const yytype_uint8 yystos []
 
static const yytype_uint8 yyr1 []
 
static const yytype_uint8 yyr2 []
 
int ppchar
 
int ppnerrs
 

Macro Definition Documentation

#define _Noreturn   YY_ATTRIBUTE ((__noreturn__))

Definition at line 753 of file ppparse.c.

#define CB_PARSE_DEF (   x,
 
)    if (!strcasecmp (name, x)) return (z);
#define COB_IN_PPPARSE   1

Definition at line 83 of file ppparse.c.

#define COND_EQ   0

Definition at line 92 of file ppparse.c.

Referenced by ppp_compare_vals(), and ppparse().

#define COND_GE   4U

Definition at line 96 of file ppparse.c.

Referenced by ppp_compare_vals(), and ppparse().

#define COND_GT   2U

Definition at line 94 of file ppparse.c.

Referenced by ppp_compare_vals(), and ppparse().

#define COND_LE   3U

Definition at line 95 of file ppparse.c.

Referenced by ppp_compare_vals(), and ppparse().

#define COND_LT   1U

Definition at line 93 of file ppparse.c.

Referenced by ppp_compare_vals(), and ppparse().

#define COND_NE   5U

Definition at line 97 of file ppparse.c.

Referenced by ppp_compare_vals(), and ppparse().

#define pperror   cb_error

Definition at line 90 of file ppparse.c.

#define YY_ (   Msgid)    Msgid

Definition at line 726 of file ppparse.c.

Referenced by ppparse(), and yysyntax_error().

#define YY_ATTRIBUTE (   Spec)    /* empty */

Definition at line 736 of file ppparse.c.

#define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))

Definition at line 741 of file ppparse.c.

#define YY_ATTRIBUTE_UNUSED   YY_ATTRIBUTE ((__unused__))

Definition at line 745 of file ppparse.c.

#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

Definition at line 776 of file ppparse.c.

Referenced by ppparse(), and yydestruct().

#define YY_IGNORE_MAYBE_UNINITIALIZED_END

Definition at line 777 of file ppparse.c.

Referenced by ppparse(), and yydestruct().

#define YY_INITIAL_VALUE (   Value)    Value

Definition at line 773 of file ppparse.c.

#define YY_NULLPTR   0

Definition at line 551 of file ppparse.c.

Referenced by yysyntax_error().

#define YY_PP_PPPARSE_H_INCLUDED

Definition at line 566 of file ppparse.c.

#define YY_REDUCE_PRINT (   Rule)

Definition at line 1379 of file ppparse.c.

Referenced by ppparse().

#define YY_STACK_PRINT (   Bottom,
  Top 
)

Definition at line 1378 of file ppparse.c.

Referenced by ppparse().

#define YY_SYMBOL_PRINT (   Title,
  Type,
  Value,
  Location 
)

Definition at line 1377 of file ppparse.c.

Referenced by ppparse(), and yydestruct().

#define YYABORT   goto yyabortlab

Definition at line 1224 of file ppparse.c.

Referenced by ppparse().

#define YYACCEPT   goto yyacceptlab

Definition at line 1223 of file ppparse.c.

Referenced by ppparse().

#define YYBACKUP (   Token,
  Value 
)
Value:
do \
if (yychar == YYEMPTY) \
{ \
yychar = (Token); \
yylval = (Value); \
YYPOPSTACK (yylen); \
yystate = *yyssp; \
goto yybackup; \
} \
else \
{ \
yyerror (YY_("syntax error: cannot back up")); \
} \
while (0)
#define yyerror
Definition: ppparse.c:65
#define yychar
Definition: ppparse.c:70
if fold fold static computed goto
Definition: flag.def:65
#define YYPOPSTACK(N)
#define yylval
Definition: ppparse.c:69
#define YY_(Msgid)
Definition: ppparse.c:726
#define YYEMPTY
Definition: ppparse.c:1220
#define YYERROR
Definition: ppparse.c:1225

Definition at line 1230 of file ppparse.c.

#define YYBISON   1

Definition at line 44 of file ppparse.c.

#define YYBISON_VERSION   "3.0.4"

Definition at line 47 of file ppparse.c.

#define YYCASE_ (   N,
 
)
Value:
case N: \
yyformat = S; \
break

Referenced by yysyntax_error().

#define yychar   ppchar

Definition at line 70 of file ppparse.c.

#define yyclearin   (yychar = YYEMPTY)

Definition at line 1219 of file ppparse.c.

#define YYCOPY (   Dst,
  Src,
  Count 
)
Value:
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
while (0)
#define YYSIZE_T
Definition: ppparse.c:710

Definition at line 900 of file ppparse.c.

#define YYCOPY_NEEDED   1

Definition at line 872 of file ppparse.c.

int yydebug   ppdebug

Definition at line 66 of file ppparse.c.

#define YYDEBUG   0

Definition at line 569 of file ppparse.c.

#define YYDPRINTF (   Args)

Definition at line 1376 of file ppparse.c.

Referenced by ppparse().

#define YYEMPTY   (-2)

Definition at line 1220 of file ppparse.c.

Referenced by ppparse(), and yysyntax_error().

#define YYEOF   0

Definition at line 1221 of file ppparse.c.

Referenced by ppparse().

#define YYERRCODE   256

Definition at line 1249 of file ppparse.c.

#define yyerrok   (yyerrstatus = 0)

Definition at line 1218 of file ppparse.c.

#define yyerror   pperror

Definition at line 65 of file ppparse.c.

Referenced by ppparse().

#define YYERROR   goto yyerrorlab

Definition at line 1225 of file ppparse.c.

Referenced by ppparse().

#define YYERROR_VERBOSE   1

Definition at line 560 of file ppparse.c.

#define YYFINAL   2

Definition at line 913 of file ppparse.c.

Referenced by ppparse().

#define YYFREE   free

Definition at line 843 of file ppparse.c.

#define YYINITDEPTH   200

Definition at line 1385 of file ppparse.c.

Referenced by ppparse().

#define YYLAST   166

Definition at line 915 of file ppparse.c.

Referenced by ppparse(), and yysyntax_error().

#define yylex   pplex

Definition at line 64 of file ppparse.c.

Referenced by ppparse().

#define YYMALLOC   malloc

Definition at line 837 of file ppparse.c.

#define YYMAXDEPTH   10000

Definition at line 1396 of file ppparse.c.

Referenced by ppparse().

#define YYMAXUTOK   315

Definition at line 929 of file ppparse.c.

#define yynerrs   ppnerrs

Definition at line 67 of file ppparse.c.

Referenced by ppparse().

#define YYNNTS   45

Definition at line 920 of file ppparse.c.

#define YYNRULES   116

Definition at line 922 of file ppparse.c.

#define YYNSTATES   180

Definition at line 924 of file ppparse.c.

#define YYNTOKENS   63

Definition at line 918 of file ppparse.c.

Referenced by ppparse(), and yysyntax_error().

#define YYPACT_NINF   -73

Definition at line 1035 of file ppparse.c.

#define yypact_value_is_default (   Yystate)    (!!((Yystate) == (-73)))

Definition at line 1037 of file ppparse.c.

Referenced by ppparse(), and yysyntax_error().

#define yyparse   ppparse

Definition at line 63 of file ppparse.c.

Referenced by process_translate().

#define YYPOPSTACK (   N)    (yyvsp -= (N), yyssp -= (N))

Referenced by ppparse().

#define YYPULL   1

Definition at line 59 of file ppparse.c.

#define YYPURE   0

Definition at line 53 of file ppparse.c.

#define YYPUSH   0

Definition at line 56 of file ppparse.c.

#define YYRECOVERING ( )    (!!yyerrstatus)

Definition at line 1228 of file ppparse.c.

#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)

Definition at line 716 of file ppparse.c.

#define YYSIZE_T   size_t

Definition at line 710 of file ppparse.c.

Referenced by ppparse(), yystrlen(), yysyntax_error(), and yytnamerr().

#define YYSKELETON_NAME   "yacc.c"

Definition at line 50 of file ppparse.c.

#define YYSTACK_ALLOC   YYMALLOC

Definition at line 823 of file ppparse.c.

Referenced by ppparse().

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 826 of file ppparse.c.

Referenced by yysyntax_error().

#define YYSTACK_BYTES (   N)
Value:
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
short int yytype_int16
Definition: parser.c:1907
union YYSTYPE YYSTYPE
Definition: ppparse.c:659
#define YYSTACK_GAP_MAXIMUM
Definition: ppparse.c:864

Definition at line 868 of file ppparse.c.

Referenced by ppparse().

#define YYSTACK_FREE   YYFREE

Definition at line 824 of file ppparse.c.

Referenced by ppparse().

#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)

Definition at line 864 of file ppparse.c.

#define YYSTACK_RELOCATE (   Stack_alloc,
  Stack 
)
Value:
do \
{ \
YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
while (0)
#define YYCOPY(Dst, Src, Count)
Definition: ppparse.c:900
#define YYSIZE_T
Definition: ppparse.c:710
#define YYSTACK_GAP_MAXIMUM
Definition: ppparse.c:864

Definition at line 879 of file ppparse.c.

Referenced by ppparse().

#define YYSTYPE_IS_DECLARED   1

Definition at line 661 of file ppparse.c.

#define YYSTYPE_IS_TRIVIAL   1

Definition at line 660 of file ppparse.c.

#define YYSYNTAX_ERROR
Value:
yysyntax_error (&yymsg_alloc, &yymsg, \
yyssp, yytoken)
static int yysyntax_error(size_t *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken)
Definition: ppparse.c:1495

Referenced by ppparse().

#define YYTABLE_NINF   -106

Definition at line 1040 of file ppparse.c.

#define yytable_value_is_error (   Yytable_value)    0

Definition at line 1042 of file ppparse.c.

Referenced by ppparse(), and yysyntax_error().

#define YYTERROR   1

Definition at line 1248 of file ppparse.c.

Referenced by ppparse(), and yysyntax_error().

#define YYTOKENTYPE

Definition at line 577 of file ppparse.c.

#define YYTRANSLATE (   YYX)    ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

Definition at line 931 of file ppparse.c.

Referenced by ppparse().

#define YYUNDEFTOK   2

Definition at line 928 of file ppparse.c.

#define YYUSE (   E)    ((void) (E))

Definition at line 759 of file ppparse.c.

Referenced by yydestruct().

Typedef Documentation

typedef union YYSTYPE YYSTYPE

Definition at line 659 of file ppparse.c.

typedef short int yytype_int16

Definition at line 700 of file ppparse.c.

typedef signed char yytype_int8

Definition at line 688 of file ppparse.c.

typedef unsigned short int yytype_uint16

Definition at line 694 of file ppparse.c.

typedef unsigned char yytype_uint8

Definition at line 682 of file ppparse.c.

Enumeration Type Documentation

Enumerator
TOKEN_EOF 
ACCEPT 
ACCESS 
ADD 
ADDRESS 
ADVANCING 
AFTER 
ALL 
ALLOCATE 
ALPHABET 
ALPHABETIC 
ALPHABETIC_LOWER 
ALPHABETIC_UPPER 
ALPHANUMERIC 
ALPHANUMERIC_EDITED 
ALSO 
ALTER 
ALTERNATE 
AND 
ANY 
ARE 
AREA 
ARGUMENT_NUMBER 
ARGUMENT_VALUE 
AS 
ASCENDING 
ASCII 
ASSIGN 
AT 
ATTRIBUTE 
AUTO 
AUTOMATIC 
AWAY_FROM_ZERO 
BACKGROUND_COLOR 
BASED 
BEFORE 
BELL 
BINARY 
BINARY_C_LONG 
BINARY_CHAR 
BINARY_DOUBLE 
BINARY_LONG 
BINARY_SHORT 
BLANK 
BLINK 
BLOCK 
BOTTOM 
BY 
BYTE_LENGTH 
CALL 
CANCEL 
CAPACITY 
CF 
CH 
CHAINING 
CHARACTER 
CHARACTERS 
CLASS 
CLASSIFICATION 
CLOSE 
CODE 
CODE_SET 
COLLATING 
COL 
COLS 
COLUMN 
COLUMNS 
COMMA 
COMMAND_LINE 
COMMA_DELIM 
COMMIT 
COMMON 
COMP 
COMPUTE 
COMP_1 
COMP_2 
COMP_3 
COMP_4 
COMP_5 
COMP_6 
COMP_X 
CONCATENATE_FUNC 
CONDITION 
CONFIGURATION 
CONSTANT 
CONTAINS 
CONTENT 
CONTINUE 
CONTROL 
CONTROLS 
CONVERSION 
CONVERTING 
COPY 
CORRESPONDING 
COUNT 
CRT 
CRT_UNDER 
CURRENCY 
CURRENT_DATE_FUNC 
CURSOR 
CYCLE 
DATA 
DATE 
DAY 
DAY_OF_WEEK 
DE 
DEBUGGING 
DECIMAL_POINT 
DECLARATIVES 
DEFAULT 
DELETE 
DELIMITED 
DELIMITER 
DEPENDING 
DESCENDING 
DETAIL 
DISC 
DISK 
DISPLAY 
DISPLAY_OF_FUNC 
DIVIDE 
DIVISION 
DOWN 
DUPLICATES 
DYNAMIC 
EBCDIC 
EC 
ELSE 
END 
END_ACCEPT 
END_ADD 
END_CALL 
END_COMPUTE 
END_DELETE 
END_DISPLAY 
END_DIVIDE 
END_EVALUATE 
END_FUNCTION 
END_IF 
END_MULTIPLY 
END_PERFORM 
END_PROGRAM 
END_READ 
END_RETURN 
END_REWRITE 
END_SEARCH 
END_START 
END_STRING 
END_SUBTRACT 
END_UNSTRING 
END_WRITE 
ENTRY 
ENVIRONMENT 
ENVIRONMENT_NAME 
ENVIRONMENT_VALUE 
EOL 
EOP 
EOS 
EQUAL 
ERASE 
ERROR 
ESCAPE 
EVALUATE 
EVENT_STATUS 
EXCEPTION 
EXCEPTION_CONDITION 
EXCLUSIVE 
EXIT 
EXPONENTIATION 
EXTEND 
EXTERNAL 
FD 
FILE_CONTROL 
FILE_ID 
FILLER 
FINAL 
FIRST 
FLOAT_BINARY_128 
FLOAT_BINARY_32 
FLOAT_BINARY_64 
FLOAT_DECIMAL_16 
FLOAT_DECIMAL_34 
FLOAT_DECIMAL_7 
FLOAT_EXTENDED 
FLOAT_LONG 
FLOAT_SHORT 
FOOTING 
FOR 
FOREGROUND_COLOR 
FOREVER 
FORMATTED_DATE_FUNC 
FORMATTED_DATETIME_FUNC 
FORMATTED_TIME_FUNC 
FREE 
FROM 
FROM_CRT 
FULL 
FUNCTION 
FUNCTION_ID 
FUNCTION_NAME 
GENERATE 
GIVING 
GLOBAL 
GO 
GOBACK 
GREATER 
GREATER_OR_EQUAL 
GRID 
GROUP 
HEADING 
HIGHLIGHT 
HIGH_VALUE 
ID 
IDENTIFICATION 
IF 
IGNORE 
IGNORING 
IN 
INDEX 
INDEXED 
INDICATE 
INITIALIZE 
INITIALIZED 
INITIATE 
INPUT 
INPUT_OUTPUT 
INSPECT 
INTO 
INTRINSIC 
INVALID 
INVALID_KEY 
IS 
I_O 
I_O_CONTROL 
JUSTIFIED 
KEPT 
KEY 
KEYBOARD 
LABEL 
LAST 
LEADING 
LEFT 
LEFTLINE 
LENGTH 
LENGTH_OF 
LESS 
LESS_OR_EQUAL 
LIMIT 
LIMITS 
LINAGE 
LINAGE_COUNTER 
LINE 
LINE_COUNTER 
LINES 
LINKAGE 
LITERAL 
LOCALE 
LOCALE_DATE_FUNC 
LOCALE_TIME_FUNC 
LOCALE_TIME_FROM_FUNC 
LOCAL_STORAGE 
LOCK 
LOWER 
LOWER_CASE_FUNC 
LOWLIGHT 
LOW_VALUE 
MANUAL 
MEMORY 
MERGE 
MINUS 
MNEMONIC_NAME 
MODE 
MOVE 
MULTIPLE 
MULTIPLY 
NAME 
NATIONAL 
NATIONAL_EDITED 
NATIONAL_OF_FUNC 
NATIVE 
NEAREST_AWAY_FROM_ZERO 
NEAREST_EVEN 
NEAREST_TOWARD_ZERO 
NEGATIVE 
NEXT 
NEXT_PAGE 
NO 
NO_ECHO 
NORMAL 
NOT 
NOTHING 
NOT_END 
NOT_EOP 
NOT_ESCAPE 
NOT_EQUAL 
NOT_EXCEPTION 
NOT_INVALID_KEY 
NOT_OVERFLOW 
NOT_SIZE_ERROR 
NO_ADVANCING 
NUMBER 
NUMBERS 
NUMERIC 
NUMERIC_EDITED 
NUMVALC_FUNC 
OBJECT_COMPUTER 
OCCURS 
OF 
OFF 
OMITTED 
ON 
ONLY 
OPEN 
OPTIONAL 
OR 
ORDER 
ORGANIZATION 
OTHER 
OUTPUT 
OVERLINE 
PACKED_DECIMAL 
PADDING 
PAGE 
PAGE_COUNTER 
PARAGRAPH 
PERFORM 
PH 
PF 
PICTURE 
PICTURE_SYMBOL 
PLUS 
POINTER 
POSITION 
POSITIVE 
PRESENT 
PREVIOUS 
PRINT 
PRINTER 
PRINTER_1 
PRINTING 
PROCEDURE 
PROCEDURES 
PROCEED 
PROGRAM 
PROGRAM_ID 
PROGRAM_NAME 
PROGRAM_POINTER 
PROHIBITED 
PROMPT 
PROTECTED 
QUOTE 
RANDOM 
RD 
READ 
READY_TRACE 
RECORD 
RECORDING 
RECORDS 
RECURSIVE 
REDEFINES 
REEL 
REFERENCE 
REFERENCES 
RELATIVE 
RELEASE 
REMAINDER 
REMOVAL 
RENAMES 
REPLACE 
REPLACING 
REPORT 
REPORTING 
REPORTS 
REPOSITORY 
REQUIRED 
RESERVE 
RESET 
RESET_TRACE 
RETURN 
RETURNING 
REVERSE_FUNC 
REVERSE_VIDEO 
REVERSED 
REWIND 
REWRITE 
RF 
RH 
RIGHT 
ROLLBACK 
ROUNDED 
RUN 
SAME 
SCREEN 
SCREEN_CONTROL 
SCROLL 
SD 
SEARCH 
SECTION 
SECURE 
SEGMENT_LIMIT 
SELECT 
SEMI_COLON 
SENTENCE 
SEPARATE 
SEQUENCE 
SEQUENTIAL 
SET 
SHARING 
SIGN 
SIGNED 
SIGNED_INT 
SIGNED_LONG 
SIGNED_SHORT 
SIZE 
SIZE_ERROR 
SORT 
SORT_MERGE 
SOURCE 
SOURCE_COMPUTER 
SPACE 
SPECIAL_NAMES 
STANDARD 
STANDARD_1 
STANDARD_2 
START 
STATIC 
STATUS 
STDCALL 
STEP 
STOP 
STRING 
SUBSTITUTE_FUNC 
SUBSTITUTE_CASE_FUNC 
SUBTRACT 
SUM 
SUPPRESS 
SYMBOLIC 
SYNCHRONIZED 
SYSTEM_DEFAULT 
SYSTEM_OFFSET 
TAB 
TALLYING 
TAPE 
TERMINATE 
TEST 
THAN 
THEN 
THRU 
TIME 
TIMEOUT 
TIMES 
TO 
TOK_AMPER 
TOK_CLOSE_PAREN 
TOK_COLON 
TOK_DIV 
TOK_DOT 
TOK_EQUAL 
TOK_FALSE 
TOK_FILE 
TOK_GREATER 
TOK_INITIAL 
TOK_LESS 
TOK_MINUS 
TOK_MUL 
TOK_NULL 
TOK_OVERFLOW 
TOK_OPEN_PAREN 
TOK_PLUS 
TOK_TRUE 
TOP 
TOWARD_GREATER 
TOWARD_LESSER 
TRAILING 
TRANSFORM 
TRIM_FUNC 
TRUNCATION 
TYPE 
UNDERLINE 
UNIT 
UNLOCK 
UNSIGNED 
UNSIGNED_INT 
UNSIGNED_LONG 
UNSIGNED_SHORT 
UNSTRING 
UNTIL 
UP 
UPDATE 
UPON 
UPON_ARGUMENT_NUMBER 
UPON_COMMAND_LINE 
UPON_ENVIRONMENT_NAME 
UPON_ENVIRONMENT_VALUE 
UPPER 
UPPER_CASE_FUNC 
USAGE 
USE 
USER 
USER_DEFAULT 
USER_FUNCTION_NAME 
USING 
VALUE 
VARYING 
WAIT 
WHEN 
WHEN_COMPILED_FUNC 
WITH 
WORD 
WORDS 
WORKING_STORAGE 
WRITE 
YYYYDDD 
YYYYMMDD 
ZERO 
SHIFT_PREFER 
TOKEN_EOF 
ACCEPT 
ACCESS 
ADD 
ADDRESS 
ADVANCING 
AFTER 
ALL 
ALLOCATE 
ALPHABET 
ALPHABETIC 
ALPHABETIC_LOWER 
ALPHABETIC_UPPER 
ALPHANUMERIC 
ALPHANUMERIC_EDITED 
ALSO 
ALTER 
ALTERNATE 
AND 
ANY 
ARE 
AREA 
ARGUMENT_NUMBER 
ARGUMENT_VALUE 
AS 
ASCENDING 
ASCII 
ASSIGN 
AT 
ATTRIBUTE 
AUTO 
AUTOMATIC 
AWAY_FROM_ZERO 
BACKGROUND_COLOR 
BASED 
BEFORE 
BELL 
BINARY 
BINARY_C_LONG 
BINARY_CHAR 
BINARY_DOUBLE 
BINARY_LONG 
BINARY_SHORT 
BLANK 
BLINK 
BLOCK 
BOTTOM 
BY 
BYTE_LENGTH 
CALL 
CANCEL 
CAPACITY 
CF 
CH 
CHAINING 
CHARACTER 
CHARACTERS 
CLASS 
CLASSIFICATION 
CLOSE 
CODE 
CODE_SET 
COLLATING 
COL 
COLS 
COLUMN 
COLUMNS 
COMMA 
COMMAND_LINE 
COMMA_DELIM 
COMMIT 
COMMON 
COMP 
COMPUTE 
COMP_1 
COMP_2 
COMP_3 
COMP_4 
COMP_5 
COMP_6 
COMP_X 
CONCATENATE_FUNC 
CONDITION 
CONFIGURATION 
CONSTANT 
CONTAINS 
CONTENT 
CONTINUE 
CONTROL 
CONTROLS 
CONVERSION 
CONVERTING 
COPY 
CORRESPONDING 
COUNT 
CRT 
CRT_UNDER 
CURRENCY 
CURRENT_DATE_FUNC 
CURSOR 
CYCLE 
DATA 
DATE 
DAY 
DAY_OF_WEEK 
DE 
DEBUGGING 
DECIMAL_POINT 
DECLARATIVES 
DEFAULT 
DELETE 
DELIMITED 
DELIMITER 
DEPENDING 
DESCENDING 
DETAIL 
DISC 
DISK 
DISPLAY 
DISPLAY_OF_FUNC 
DIVIDE 
DIVISION 
DOWN 
DUPLICATES 
DYNAMIC 
EBCDIC 
EC 
ELSE 
END 
END_ACCEPT 
END_ADD 
END_CALL 
END_COMPUTE 
END_DELETE 
END_DISPLAY 
END_DIVIDE 
END_EVALUATE 
END_FUNCTION 
END_IF 
END_MULTIPLY 
END_PERFORM 
END_PROGRAM 
END_READ 
END_RETURN 
END_REWRITE 
END_SEARCH 
END_START 
END_STRING 
END_SUBTRACT 
END_UNSTRING 
END_WRITE 
ENTRY 
ENVIRONMENT 
ENVIRONMENT_NAME 
ENVIRONMENT_VALUE 
EOL 
EOP 
EOS 
EQUAL 
ERASE 
ERROR 
ESCAPE 
EVALUATE 
EVENT_STATUS 
EXCEPTION 
EXCEPTION_CONDITION 
EXCLUSIVE 
EXIT 
EXPONENTIATION 
EXTEND 
EXTERNAL 
FD 
FILE_CONTROL 
FILE_ID 
FILLER 
FINAL 
FIRST 
FLOAT_BINARY_128 
FLOAT_BINARY_32 
FLOAT_BINARY_64 
FLOAT_DECIMAL_16 
FLOAT_DECIMAL_34 
FLOAT_DECIMAL_7 
FLOAT_EXTENDED 
FLOAT_LONG 
FLOAT_SHORT 
FOOTING 
FOR 
FOREGROUND_COLOR 
FOREVER 
FORMATTED_DATE_FUNC 
FORMATTED_DATETIME_FUNC 
FORMATTED_TIME_FUNC 
FREE 
FROM 
FROM_CRT 
FULL 
FUNCTION 
FUNCTION_ID 
FUNCTION_NAME 
GENERATE 
GIVING 
GLOBAL 
GO 
GOBACK 
GREATER 
GREATER_OR_EQUAL 
GRID 
GROUP 
HEADING 
HIGHLIGHT 
HIGH_VALUE 
ID 
IDENTIFICATION 
IF 
IGNORE 
IGNORING 
IN 
INDEX 
INDEXED 
INDICATE 
INITIALIZE 
INITIALIZED 
INITIATE 
INPUT 
INPUT_OUTPUT 
INSPECT 
INTO 
INTRINSIC 
INVALID 
INVALID_KEY 
IS 
I_O 
I_O_CONTROL 
JUSTIFIED 
KEPT 
KEY 
KEYBOARD 
LABEL 
LAST 
LEADING 
LEFT 
LEFTLINE 
LENGTH 
LENGTH_OF 
LESS 
LESS_OR_EQUAL 
LIMIT 
LIMITS 
LINAGE 
LINAGE_COUNTER 
LINE 
LINE_COUNTER 
LINES 
LINKAGE 
LITERAL 
LOCALE 
LOCALE_DATE_FUNC 
LOCALE_TIME_FUNC 
LOCALE_TIME_FROM_FUNC 
LOCAL_STORAGE 
LOCK 
LOWER 
LOWER_CASE_FUNC 
LOWLIGHT 
LOW_VALUE 
MANUAL 
MEMORY 
MERGE 
MINUS 
MNEMONIC_NAME 
MODE 
MOVE 
MULTIPLE 
MULTIPLY 
NAME 
NATIONAL 
NATIONAL_EDITED 
NATIONAL_OF_FUNC 
NATIVE 
NEAREST_AWAY_FROM_ZERO 
NEAREST_EVEN 
NEAREST_TOWARD_ZERO 
NEGATIVE 
NEXT 
NEXT_PAGE 
NO 
NO_ECHO 
NORMAL 
NOT 
NOTHING 
NOT_END 
NOT_EOP 
NOT_ESCAPE 
NOT_EQUAL 
NOT_EXCEPTION 
NOT_INVALID_KEY 
NOT_OVERFLOW 
NOT_SIZE_ERROR 
NO_ADVANCING 
NUMBER 
NUMBERS 
NUMERIC 
NUMERIC_EDITED 
NUMVALC_FUNC 
OBJECT_COMPUTER 
OCCURS 
OF 
OFF 
OMITTED 
ON 
ONLY 
OPEN 
OPTIONAL 
OR 
ORDER 
ORGANIZATION 
OTHER 
OUTPUT 
OVERLINE 
PACKED_DECIMAL 
PADDING 
PAGE 
PAGE_COUNTER 
PARAGRAPH 
PERFORM 
PH 
PF 
PICTURE 
PICTURE_SYMBOL 
PLUS 
POINTER 
POSITION 
POSITIVE 
PRESENT 
PREVIOUS 
PRINT 
PRINTER 
PRINTER_1 
PRINTING 
PROCEDURE 
PROCEDURES 
PROCEED 
PROGRAM 
PROGRAM_ID 
PROGRAM_NAME 
PROGRAM_POINTER 
PROHIBITED 
PROMPT 
PROTECTED 
QUOTE 
RANDOM 
RD 
READ 
READY_TRACE 
RECORD 
RECORDING 
RECORDS 
RECURSIVE 
REDEFINES 
REEL 
REFERENCE 
REFERENCES 
RELATIVE 
RELEASE 
REMAINDER 
REMOVAL 
RENAMES 
REPLACE 
REPLACING 
REPORT 
REPORTING 
REPORTS 
REPOSITORY 
REQUIRED 
RESERVE 
RESET 
RESET_TRACE 
RETURN 
RETURNING 
REVERSE_FUNC 
REVERSE_VIDEO 
REVERSED 
REWIND 
REWRITE 
RF 
RH 
RIGHT 
ROLLBACK 
ROUNDED 
RUN 
SAME 
SCREEN 
SCREEN_CONTROL 
SCROLL 
SD 
SEARCH 
SECTION 
SECURE 
SEGMENT_LIMIT 
SELECT 
SEMI_COLON 
SENTENCE 
SEPARATE 
SEQUENCE 
SEQUENTIAL 
SET 
SHARING 
SIGN 
SIGNED 
SIGNED_INT 
SIGNED_LONG 
SIGNED_SHORT 
SIZE 
SIZE_ERROR 
SORT 
SORT_MERGE 
SOURCE 
SOURCE_COMPUTER 
SPACE 
SPECIAL_NAMES 
STANDARD 
STANDARD_1 
STANDARD_2 
START 
STATIC 
STATUS 
STDCALL 
STEP 
STOP 
STRING 
SUBSTITUTE_FUNC 
SUBSTITUTE_CASE_FUNC 
SUBTRACT 
SUM 
SUPPRESS 
SYMBOLIC 
SYNCHRONIZED 
SYSTEM_DEFAULT 
SYSTEM_OFFSET 
TAB 
TALLYING 
TAPE 
TERMINATE 
TEST 
THAN 
THEN 
THRU 
TIME 
TIMEOUT 
TIMES 
TO 
TOK_AMPER 
TOK_CLOSE_PAREN 
TOK_COLON 
TOK_DIV 
TOK_DOT 
TOK_EQUAL 
TOK_FALSE 
TOK_FILE 
TOK_GREATER 
TOK_INITIAL 
TOK_LESS 
TOK_MINUS 
TOK_MUL 
TOK_NULL 
TOK_OVERFLOW 
TOK_OPEN_PAREN 
TOK_PLUS 
TOK_TRUE 
TOP 
TOWARD_GREATER 
TOWARD_LESSER 
TRAILING 
TRANSFORM 
TRIM_FUNC 
TRUNCATION 
TYPE 
UNDERLINE 
UNIT 
UNLOCK 
UNSIGNED 
UNSIGNED_INT 
UNSIGNED_LONG 
UNSIGNED_SHORT 
UNSTRING 
UNTIL 
UP 
UPDATE 
UPON 
UPON_ARGUMENT_NUMBER 
UPON_COMMAND_LINE 
UPON_ENVIRONMENT_NAME 
UPON_ENVIRONMENT_VALUE 
UPPER 
UPPER_CASE_FUNC 
USAGE 
USE 
USER 
USER_DEFAULT 
USER_FUNCTION_NAME 
USING 
VALUE 
VARYING 
WAIT 
WHEN 
WHEN_COMPILED_FUNC 
WITH 
WORD 
WORDS 
WORKING_STORAGE 
WRITE 
YYYYDDD 
YYYYMMDD 
ZERO 
SHIFT_PREFER 
TOKEN_EOF 
ALSO 
BY 
COPY 
EQEQ 
IN 
LAST 
LEADING 
OF 
OFF 
PRINTING 
REPLACE 
REPLACING 
SUPPRESS 
TRAILING 
DOT 
GARBAGE 
SOURCE_DIRECTIVE 
FORMAT 
IS 
FIXED 
FREE 
DEFINE_DIRECTIVE 
AS 
PARAMETER 
OVERRIDE 
SET_DIRECTIVE 
CONSTANT 
SOURCEFORMAT 
FOLDCOPYNAME 
NOFOLDCOPYNAME 
IF_DIRECTIVE 
ELSE_DIRECTIVE 
ENDIF_DIRECTIVE 
ELIF_DIRECTIVE 
GE 
LE 
LT 
GT 
EQ 
NE 
NOT 
THAN 
TO 
OR 
EQUAL 
GREATER 
LESS 
SET 
DEFINED 
TURN_DIRECTIVE 
ON 
CHECKING 
WITH 
LOCATION 
TERMINATOR 
TOKEN 
VARIABLE 
LITERAL 
TOKEN_EOF 
ALSO 
BY 
COPY 
EQEQ 
IN 
LAST 
LEADING 
OF 
OFF 
PRINTING 
REPLACE 
REPLACING 
SUPPRESS 
TRAILING 
DOT 
GARBAGE 
SOURCE_DIRECTIVE 
FORMAT 
IS 
FIXED 
FREE 
DEFINE_DIRECTIVE 
AS 
PARAMETER 
OVERRIDE 
SET_DIRECTIVE 
CONSTANT 
SOURCEFORMAT 
FOLDCOPYNAME 
NOFOLDCOPYNAME 
IF_DIRECTIVE 
ELSE_DIRECTIVE 
ENDIF_DIRECTIVE 
ELIF_DIRECTIVE 
GE 
LE 
LT 
GT 
EQ 
NE 
NOT 
THAN 
TO 
OR 
EQUAL 
GREATER 
LESS 
SET 
DEFINED 
TURN_DIRECTIVE 
ON 
CHECKING 
WITH 
LOCATION 
TERMINATOR 
TOKEN 
VARIABLE 
LITERAL 

Definition at line 578 of file ppparse.c.

579  {
580  TOKEN_EOF = 0,
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,
597  SOURCE_DIRECTIVE = 274,
598  FORMAT = 275,
599  IS = 276,
600  FIXED = 277,
601  FREE = 278,
602  DEFINE_DIRECTIVE = 279,
603  AS = 280,
604  PARAMETER = 281,
605  OVERRIDE = 282,
606  SET_DIRECTIVE = 283,
607  CONSTANT = 284,
608  SOURCEFORMAT = 285,
609  FOLDCOPYNAME = 286,
610  NOFOLDCOPYNAME = 287,
611  IF_DIRECTIVE = 288,
612  ELSE_DIRECTIVE = 289,
613  ENDIF_DIRECTIVE = 290,
614  ELIF_DIRECTIVE = 291,
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,
630  TURN_DIRECTIVE = 307,
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  };
Definition: ppparse.c:615
Definition: ppparse.c:616
Definition: ppparse.c:617
Definition: ppparse.c:600
Definition: ppparse.c:618
Definition: ppparse.c:620
Definition: ppparse.c:585
Definition: ppparse.c:581
Definition: ppparse.c:636
Definition: ppparse.c:601
Definition: ppparse.c:633
Definition: ppparse.c:623
Definition: ppparse.c:627
Definition: ppparse.c:588
Definition: ppparse.c:624
Definition: ppparse.c:599
Definition: ppparse.c:589
Definition: ppparse.c:582
Definition: ppparse.c:631
Definition: ppparse.c:584
Definition: ppparse.c:621
Definition: ppparse.c:625
Definition: ppparse.c:619
Definition: ppparse.c:583
Definition: ppparse.c:603
Definition: ppparse.c:586
Definition: ppparse.c:622
Definition: ppparse.c:595
Definition: ppparse.c:628

Function Documentation

static char* fix_filename ( char *  name)
static

Definition at line 132 of file ppparse.c.

References cb_define_struct::name.

Referenced by ppparse().

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 }

Here is the caller graph for this function:

static char* fold_lower ( char *  name)
static

Definition at line 143 of file ppparse.c.

References cob_u8_t, and cb_define_struct::name.

Referenced by ppparse().

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 }
#define cob_u8_t
Definition: common.h:27

Here is the caller graph for this function:

static char* fold_upper ( char *  name)
static

Definition at line 156 of file ppparse.c.

References cob_u8_t, and cb_define_struct::name.

Referenced by ppparse().

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 }
#define cob_u8_t
Definition: common.h:27

Here is the caller graph for this function:

static unsigned int ppp_check_needs_quote ( const char *  envval)
static

Definition at line 449 of file ppparse.c.

Referenced by ppparse().

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 }

Here is the caller graph for this function:

static unsigned int ppp_compare_vals ( const struct cb_define_struct p1,
const struct cb_define_struct p2,
const unsigned int  cond 
)
static

Definition at line 273 of file ppparse.c.

References _, cb_warning(), COND_EQ, COND_GE, COND_GT, COND_LE, COND_LT, COND_NE, cb_define_struct::dec_part, cb_define_struct::deftype, cb_define_struct::int_part, PLEX_DEF_LIT, PLEX_DEF_NUM, cb_define_struct::sign, and cb_define_struct::value.

Referenced by ppparse().

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 }
#define COND_LT
Definition: ppparse.c:93
int int_part
Definition: cobc.h:183
int dec_part
Definition: cobc.h:184
#define COND_LE
Definition: ppparse.c:95
#define _(s)
Definition: cobcrun.c:59
unsigned int deftype
Definition: cobc.h:181
#define PLEX_DEF_NUM
Definition: cobc.h:99
#define COND_GE
Definition: ppparse.c:96
#define COND_EQ
Definition: ppparse.c:92
#define PLEX_DEF_LIT
Definition: cobc.h:98
#define COND_NE
Definition: ppparse.c:97
char * value
Definition: cobc.h:180
void cb_warning(const char *,...) COB_A_FORMAT12
Definition: error.c:87
#define COND_GT
Definition: ppparse.c:94

Here is the call graph for this function:

Here is the caller graph for this function:

static struct cb_define_struct* ppp_define_add ( struct cb_define_struct list,
const char *  name,
const char *  text,
const unsigned int  override 
)
static

Definition at line 347 of file ppparse.c.

References _, cb_error(), cobc_plex_malloc(), cobc_plex_strdup(), cb_define_struct::deftype, cb_define_struct::last, cb_define_struct::name, cb_define_struct::next, NULL, PLEX_DEF_DEL, ppp_set_value(), and cb_define_struct::value.

Referenced by ppparse(), and ppparse_clear_vars().

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 }
struct cb_define_struct * next
Definition: cobc.h:177
void * cobc_plex_strdup(const char *dupstr)
Definition: cobc.c:933
char * name
Definition: cobc.h:179
#define _(s)
Definition: cobcrun.c:59
unsigned int deftype
Definition: cobc.h:181
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
struct cb_define_struct * last
Definition: cobc.h:178
#define PLEX_DEF_DEL
Definition: cobc.h:100
char * value
Definition: cobc.h:180
void cb_error(const char *,...) COB_A_FORMAT12
Definition: error.c:98
void * cobc_plex_malloc(const size_t size)
Definition: cobc.c:916

Here is the call graph for this function:

Here is the caller graph for this function:

static void ppp_define_del ( const char *  name)
static

Definition at line 388 of file ppparse.c.

References cb_define_struct::dec_part, cb_define_struct::deftype, cb_define_struct::int_part, cb_define_struct::name, cb_define_struct::next, NULL, PLEX_DEF_DEL, cb_define_struct::sign, and cb_define_struct::value.

Referenced by ppparse().

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 }
int int_part
Definition: cobc.h:183
struct cb_define_struct * next
Definition: cobc.h:177
int dec_part
Definition: cobc.h:184
char * name
Definition: cobc.h:179
static struct cb_define_struct * ppp_setvar_list
Definition: ppparse.c:101
unsigned int deftype
Definition: cobc.h:181
EC ARGUMENT EC EC BOUND EC BOUND EC BOUND EC BOUND TABLE EC DATA EC DATA EC DATA PTR NULL
Definition: exception.def:95
#define PLEX_DEF_DEL
Definition: cobc.h:100
char * value
Definition: cobc.h:180

Here is the caller graph for this function:

static struct cb_text_list* ppp_list_add ( struct cb_text_list list,
const char *  text 
)
static

Definition at line 423 of file ppparse.c.

References cobc_plex_malloc(), cobc_plex_strdup(), cb_text_list::last, cb_text_list::next, and cb_text_list::text.

Referenced by ppparse().

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 }
struct cb_text_list * next
Definition: cobc.h:160
const char * text
Definition: cobc.h:162
void * cobc_plex_strdup(const char *dupstr)
Definition: cobc.c:933
struct cb_text_list * last
Definition: cobc.h:161
void * cobc_plex_malloc(const size_t size)
Definition: cobc.c:916

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 169 of file ppparse.c.

References cobc_plex_malloc(), cb_replace_list::last, cb_replace_list::lead_trail, cb_replace_list::new_text, cb_replace_list::next, and cb_replace_list::old_text.

Referenced by ppparse().

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 }
struct cb_replace_list * last
Definition: cobc.h:168
unsigned int lead_trail
Definition: cobc.h:172
struct cb_replace_list * next
Definition: cobc.h:167
void * cobc_plex_malloc(const size_t size)
Definition: cobc.c:916
const struct cb_text_list * old_text
Definition: cobc.h:170
const struct cb_text_list * new_text
Definition: cobc.h:171

Here is the call graph for this function:

Here is the caller graph for this function:

static unsigned int ppp_search_comp_vars ( const char *  name)
static

Definition at line 439 of file ppparse.c.

Referenced by ppparse().

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 }

Here is the caller graph for this function:

static struct cb_define_struct* ppp_search_lists ( const char *  name)
static

Definition at line 407 of file ppparse.c.

References cb_define_struct::deftype, cb_define_struct::name, cb_define_struct::next, NULL, and PLEX_DEF_DEL.

Referenced by ppparse().

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 }
struct cb_define_struct * next
Definition: cobc.h:177
char * name
Definition: cobc.h:179
static struct cb_define_struct * ppp_setvar_list
Definition: ppparse.c:101
unsigned int deftype
Definition: cobc.h:181
EC ARGUMENT EC EC BOUND EC BOUND EC BOUND EC BOUND TABLE EC DATA EC DATA EC DATA PTR NULL
Definition: exception.def:95
#define PLEX_DEF_DEL
Definition: cobc.h:100

Here is the caller graph for this function:

static unsigned int ppp_set_value ( struct cb_define_struct p,
const char *  value 
)
static

Definition at line 190 of file ppparse.c.

References cobc_plex_strdup(), cb_define_struct::dec_part, cb_define_struct::deftype, cb_define_struct::int_part, NULL, PLEX_DEF_LIT, PLEX_DEF_NONE, PLEX_DEF_NUM, sign, cb_define_struct::sign, value, and cb_define_struct::value.

Referenced by ppp_define_add(), and ppparse().

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 
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 }
int int_part
Definition: cobc.h:183
#define PLEX_DEF_NONE
Definition: cobc.h:97
int dec_part
Definition: cobc.h:184
void * cobc_plex_strdup(const char *dupstr)
Definition: cobc.c:933
strict implicit external value
Definition: warning.def:54
unsigned int deftype
Definition: cobc.h:181
EC ARGUMENT EC EC BOUND EC BOUND EC BOUND EC BOUND TABLE EC DATA EC DATA EC DATA PTR NULL
Definition: exception.def:95
#define PLEX_DEF_NUM
Definition: cobc.h:99
if sign
Definition: flag.def:42
#define PLEX_DEF_LIT
Definition: cobc.h:98
char * value
Definition: cobc.h:180

Here is the call graph for this function:

Here is the caller graph for this function:

int ppparse ( void  )

Definition at line 1656 of file ppparse.c.

References _, cb_error(), CB_FORMAT_FIXED, CB_FORMAT_FREE, CB_REPLACE_LEADING, CB_REPLACE_TRAILING, cb_source_format, cb_warning(), COB_FOLD_LOWER, COB_FOLD_UPPER, cobc_plex_malloc(), COND_EQ, COND_GE, COND_GT, COND_LE, COND_LT, COND_NE, current_cmd, cb_define_struct::deftype, YYSTYPE::ds, fix_filename(), fold_lower(), fold_upper(), YYSTYPE::l, cb_text_list::next, cb_define_struct::next, NULL, PLEX_ACT_ELIF, PLEX_ACT_ELSE, PLEX_ACT_END, PLEX_ACT_IF, plex_action_directive(), PLEX_DEF_NONE, pp_set_replace_list(), ppcopy(), ppout, ppp_check_needs_quote(), ppp_compare_vals(), ppp_define_add(), ppp_define_del(), ppp_list_add(), ppp_replace_list_add(), ppp_search_comp_vars(), ppp_search_lists(), ppp_set_value(), quote, YYSTYPE::r, YYSTYPE::s, YYSTYPE::ui, YY_, YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN, YY_IGNORE_MAYBE_UNINITIALIZED_END, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, yycheck, yydefact, yydefgoto, yydestruct(), YYDPRINTF, YYEMPTY, YYEOF, yyerror, YYERROR, YYFINAL, YYINITDEPTH, YYLAST, yylex, yylval, YYMAXDEPTH, yynerrs, YYNTOKENS, yypact, yypact_value_is_default, yypgoto, YYPOPSTACK, yyr1, yyr2, YYSIZE_T, yyalloc::yyss_alloc, YYSTACK_ALLOC, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, yystos, YYSYNTAX_ERROR, yytable, yytable_value_is_error, YYTERROR, YYTRANSLATE, and yyalloc::yyvs_alloc.

Referenced by preprocess().

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 }
static const yytype_int16 yypgoto[]
Definition: ppparse.c:1095
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
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
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: ppparse.c:1377
#define yyerror
Definition: ppparse.c:65
static const yytype_int16 yydefgoto[]
Definition: ppparse.c:1105
#define COND_LT
Definition: ppparse.c:93
#define YYEOF
Definition: ppparse.c:1221
#define yylex
Definition: ppparse.c:64
#define yychar
Definition: ppparse.c:70
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
static char * fold_upper(char *name)
Definition: ppparse.c:156
#define YYFINAL
Definition: ppparse.c:913
#define YYINITDEPTH
Definition: ppparse.c:1385
struct cb_define_struct * next
Definition: cobc.h:177
#define YYLAST
Definition: ppparse.c:915
#define PLEX_DEF_NONE
Definition: cobc.h:97
#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
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep)
Definition: ppparse.c:1627
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
#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
#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
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
Definition: ppparse.c:879
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
Definition: ppparse.c:777
#define YYSIZE_T
Definition: ppparse.c:710
#define YYTERROR
Definition: ppparse.c:1248
static const yytype_uint8 yyr2[]
Definition: ppparse.c:1201
#define PLEX_ACT_END
Definition: cobc.h:93
static void ppp_define_del(const char *name)
Definition: ppparse.c:388
static const yytype_uint8 yyr1[]
Definition: ppparse.c:1184
#define YYSTACK_BYTES(N)
Definition: ppparse.c:868
char * s
Definition: ppparse.c:649
static struct cb_define_struct * ppp_setvar_list
Definition: ppparse.c:101
#define CB_REPLACE_TRAILING
Definition: cobc.h:70
#define _(s)
Definition: cobcrun.c:59
unsigned int deftype
Definition: cobc.h:181
#define CB_REPLACE_LEADING
Definition: cobc.h:69
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 COND_GE
Definition: ppparse.c:96
#define COND_EQ
Definition: ppparse.c:92
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Definition: ppparse.c:776
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 YYPOPSTACK(N)
static const yytype_int16 yytable[]
Definition: ppparse.c:1117
#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
#define COB_FOLD_LOWER
Definition: common.h:587
#define YYNTOKENS
Definition: ppparse.c:918
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
static unsigned int current_cmd
Definition: ppparse.c:102
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
#define yypact_value_is_default(Yystate)
Definition: ppparse.c:1037
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
void * cobc_plex_malloc(const size_t size)
Definition: cobc.c:916
#define CB_FORMAT_FREE
Definition: cobc.h:66
static const yytype_int16 yycheck[]
Definition: ppparse.c:1138
#define COND_GT
Definition: ppparse.c:94
#define PLEX_ACT_IF
Definition: cobc.h:91
#define COB_FOLD_UPPER
Definition: common.h:586
#define YY_REDUCE_PRINT(Rule)
Definition: ppparse.c:1379
#define YYEMPTY
Definition: ppparse.c:1220
static char * fold_lower(char *name)
Definition: ppparse.c:143
#define YYERROR
Definition: ppparse.c:1225
static char * fix_filename(char *name)
Definition: ppparse.c:132
cb_tree yyvs_alloc
Definition: parser.c:2067
#define PLEX_ACT_ELSE
Definition: cobc.h:92
#define YYSYNTAX_ERROR
static unsigned int ppp_search_comp_vars(const char *name)
Definition: ppparse.c:439

Here is the call graph for this function:

Here is the caller graph for this function:

void ppparse_clear_vars ( const struct cb_define_struct p)

Definition at line 490 of file ppparse.c.

References cb_define_struct::name, cb_define_struct::next, NULL, ppp_define_add(), and cb_define_struct::value.

Referenced by preprocess().

491 {
492  const struct cb_define_struct *q;
493 
495  /* Set standard DEFINE's */
496  if (cb_perform_osvs) {
498  "PERFORM-TYPE",
499  "'OSVS'", 0);
500  } else {
502  "PERFORM-TYPE",
503  "'MF'", 0);
504  }
505  if (cb_ebcdic_sign) {
507  "SIGN",
508  "'EBCDIC'", 0);
509  } else {
511  "SIGN",
512  "'ASCII'", 0);
513  }
514 #ifdef WORDS_BIGENDIAN
516  "ENDIAN",
517  "'BIG'", 0);
518 #else
520  "ENDIAN",
521  "'LITTLE'", 0);
522 #endif
523 #if ' ' == 0x20
525  "CHARSET",
526  "'ASCII'", 0);
527 #elif ' ' == 0x40
529  "CHARSET",
530  "'EBCDIC'", 0);
531 #else
533  "CHARSET",
534  "'UNKNOWN'", 0);
535 #endif
536  /* Set DEFINE's from '-D' option(s) */
537  for (q = p; q; q = q->next) {
539  q->name,
540  q->value, 0);
541  }
542 }
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_define_struct * next
Definition: cobc.h:177
char * name
Definition: cobc.h:179
static struct cb_define_struct * ppp_setvar_list
Definition: ppparse.c:101
EC ARGUMENT EC EC BOUND EC BOUND EC BOUND EC BOUND TABLE EC DATA EC DATA EC DATA PTR NULL
Definition: exception.def:95
char * value
Definition: cobc.h:180

Here is the call graph for this function:

Here is the caller graph for this function:

static void yydestruct ( const char *  yymsg,
int  yytype,
YYSTYPE yyvaluep 
)
static

Definition at line 1627 of file ppparse.c.

References YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN, YY_IGNORE_MAYBE_UNINITIALIZED_END, YY_SYMBOL_PRINT, and YYUSE.

Referenced by ppparse().

1628 {
1629  YYUSE (yyvaluep);
1630  if (!yymsg)
1631  yymsg = "Deleting";
1632  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1633 
1635  YYUSE (yytype);
1637 }
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: ppparse.c:1377
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
Definition: ppparse.c:777
#define YYUSE(E)
Definition: ppparse.c:759
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Definition: ppparse.c:776

Here is the caller graph for this function:

static char* yystpcpy ( char *  yydest,
const char *  yysrc 
)
static

Definition at line 1425 of file ppparse.c.

Referenced by yytnamerr().

1426 {
1427  char *yyd = yydest;
1428  const char *yys = yysrc;
1429 
1430  while ((*yyd++ = *yys++) != '\0')
1431  continue;
1432 
1433  return yyd - 1;
1434 }

Here is the caller graph for this function:

static size_t yystrlen ( const char *  yystr)
static

Definition at line 1408 of file ppparse.c.

References YYSIZE_T.

Referenced by yysyntax_error(), and yytnamerr().

1409 {
1410  YYSIZE_T yylen;
1411  for (yylen = 0; yystr[yylen]; yylen++)
1412  continue;
1413  return yylen;
1414 }
#define YYSIZE_T
Definition: ppparse.c:710

Here is the caller graph for this function:

static int yysyntax_error ( size_t *  yymsg_alloc,
char **  yymsg,
yytype_int16 yyssp,
int  yytoken 
)
static

Definition at line 1495 of file ppparse.c.

References YY_, YY_NULLPTR, YYCASE_, yycheck, YYEMPTY, YYLAST, YYNTOKENS, yypact, yypact_value_is_default, YYSIZE_T, YYSTACK_ALLOC_MAXIMUM, yystrlen(), yytable, yytable_value_is_error, YYTERROR, yytname, and yytnamerr().

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 }
static size_t yystrlen(const char *yystr)
Definition: ppparse.c:1408
static const char *const yytname[]
Definition: ppparse.c:994
#define yytable_value_is_error(Yytable_value)
Definition: ppparse.c:1042
#define YYLAST
Definition: ppparse.c:915
#define YY_NULLPTR
Definition: ppparse.c:551
#define YYSTACK_ALLOC_MAXIMUM
Definition: ppparse.c:826
#define YYSIZE_T
Definition: ppparse.c:710
#define YYTERROR
Definition: ppparse.c:1248
static const yytype_int16 yytable[]
Definition: ppparse.c:1117
static const yytype_int16 yypact[]
Definition: ppparse.c:1047
#define YYNTOKENS
Definition: ppparse.c:918
#define YYCASE_(N, S)
#define yypact_value_is_default(Yystate)
Definition: ppparse.c:1037
#define YY_(Msgid)
Definition: ppparse.c:726
static const yytype_int16 yycheck[]
Definition: ppparse.c:1138
#define YYEMPTY
Definition: ppparse.c:1220
static size_t yytnamerr(char *yyres, const char *yystr)
Definition: ppparse.c:1447

Here is the call graph for this function:

static size_t yytnamerr ( char *  yyres,
const char *  yystr 
)
static

Definition at line 1447 of file ppparse.c.

References YYSIZE_T, yystpcpy(), and yystrlen().

Referenced by yysyntax_error().

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 }
static size_t yystrlen(const char *yystr)
Definition: ppparse.c:1408
#define YYSIZE_T
Definition: ppparse.c:710
static char * yystpcpy(char *yydest, const char *yysrc)
Definition: ppparse.c:1425

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

unsigned int current_cmd
static

Definition at line 102 of file ppparse.c.

Referenced by ppparse().

int ppchar

Definition at line 1643 of file ppparse.c.

YYSTYPE pplval

Definition at line 1646 of file ppparse.c.

Referenced by pplex().

int ppnerrs

Definition at line 1648 of file ppparse.c.

struct cb_define_struct* ppp_setvar_list
static

Definition at line 101 of file ppparse.c.

const yytype_int16 yycheck[]
static
Initial value:
=
{
53, 53, 7, 0, 11, 10, 6, 6, 5, 21,
9, 6, 6, 6, 6, 21, 13, 16, 83, 26,
31, 32, 19, 34, 96, 11, 58, 24, 18, 25,
54, 28, 22, 23, 59, 59, 33, 34, 35, 36,
25, 29, 58, 20, 7, 57, 62, 10, 57, 60,
115, 57, 63, 60, 126, 52, 61, 17, 58, 58,
17, 57, 11, 58, 58, 58, 58, 53, 59, 55,
56, 59, 60, 55, 56, 60, 29, 30, 31, 32,
59, 60, 21, 136, 136, 37, 38, 39, 40, 41,
42, 59, 60, 69, 70, 47, 48, 49, 50, 51,
37, 38, 39, 40, 41, 42, 59, 25, 3, 59,
47, 48, 49, 8, 176, 177, 11, 15, 58, 4,
58, 12, 6, 4, 60, 60, 60, 14, 58, 58,
58, 58, 4, 27, 60, 60, 43, 56, 4, 6,
45, 6, 44, 6, 47, 46, 46, 35, 47, 104,
6, 159, 38, 133, 115, 111, 102, 138, 82, 117,
-1, -1, -1, -1, -1, -1, 155
}

Definition at line 1138 of file ppparse.c.

Referenced by ppparse(), and yysyntax_error().

const yytype_uint8 yydefact[]
static
Initial value:
=
{
2, 0, 1, 0, 101, 107, 0, 0, 11, 15,
16, 13, 0, 3, 0, 0, 0, 65, 102, 104,
0, 0, 108, 7, 109, 0, 105, 50, 8, 34,
0, 105, 105, 22, 24, 9, 17, 0, 0, 36,
10, 0, 6, 4, 5, 67, 68, 69, 0, 0,
95, 96, 89, 73, 0, 80, 0, 74, 110, 0,
105, 106, 0, 105, 0, 0, 20, 0, 18, 109,
109, 12, 48, 14, 38, 37, 111, 71, 66, 87,
0, 0, 0, 0, 0, 0, 0, 0, 0, 29,
27, 28, 26, 0, 30, 97, 97, 0, 21, 23,
25, 99, 99, 39, 0, 0, 43, 35, 41, 112,
70, 0, 64, 79, 88, 0, 0, 0, 75, 83,
90, 91, 93, 0, 0, 0, 97, 98, 31, 32,
19, 100, 0, 0, 40, 42, 72, 77, 0, 81,
0, 94, 92, 84, 0, 76, 33, 58, 60, 61,
59, 62, 63, 115, 113, 113, 45, 44, 0, 0,
78, 82, 85, 0, 116, 57, 114, 54, 56, 52,
51, 46, 47, 86, 0, 0, 115, 115, 53, 55
}

Definition at line 1072 of file ppparse.c.

Referenced by ppparse().

const yytype_int16 yydefgoto[]
static
Initial value:
=
{
-1, 1, 13, 14, 37, 38, 35, 36, 66, 23,
92, 28, 40, 41, 107, 108, 71, 72, 171, 158,
15, 47, 48, 77, 112, 16, 53, 54, 118, 88,
145, 80, 55, 123, 56, 128, 132, 20, 21, 62,
24, 59, 110, 167, 165
}

Definition at line 1105 of file ppparse.c.

Referenced by ppparse().

const yytype_int16 yypact[]
static
Initial value:
=
{
-73, 3, -73, -32, 105, 23, 12, 47, -73, -73,
-73, -73, -25, -73, -9, 40, 43, 37, -73, -73,
1, 51, -73, -73, 61, 9, 4, -73, -73, -73,
50, 82, 82, -73, 15, 47, -73, 21, 21, -73,
-73, -24, -73, -73, -73, -73, -73, 102, 60, 62,
-73, -73, -73, 1, 115, -5, 116, -73, -73, 10,
82, -73, -7, 82, 64, 65, -73, 66, -73, -12,
-6, -73, -73, -73, 14, -73, 109, 113, -73, -73,
0, 119, 116, 5, 70, 71, 72, 73, 128, -73,
-73, -73, -73, 74, -73, 106, 106, 75, -73, -73,
-73, 93, 93, -73, 18, 81, -73, -73, -73, -73,
-73, 1, -73, -73, -73, 5, 134, 6, -73, -5,
-73, -73, -73, -16, 133, 135, 106, -73, -73, -73,
-73, -73, 48, 63, -73, -73, 1, -73, 135, -73,
7, -73, -73, -73, 8, -73, -73, -73, -73, -73,
-73, -73, -73, 95, 98, 98, -73, -73, 32, 32,
-73, -73, -73, 137, -73, -73, -73, 99, 100, -73,
-73, -73, -73, -73, 97, 101, 95, 95, -73, -73
}

Definition at line 1047 of file ppparse.c.

Referenced by ppparse(), and yysyntax_error().

const yytype_int16 yypgoto[]
static
Initial value:
=
{
-73, -73, -73, -73, -73, -73, -73, 112, -73, -73,
-73, -73, -73, -73, -73, 45, 114, 144, -8, 20,
-73, -73, -73, -73, -73, -73, 44, -53, 39, 76,
19, 42, -65, -73, -52, -72, 54, -73, -73, -11,
-73, 24, -73, 11, -62
}

Definition at line 1095 of file ppparse.c.

Referenced by ppparse().

const yytype_uint8 yyr1[]
static
Initial value:
=
{
0, 63, 64, 64, 65, 65, 65, 66, 66, 66,
66, 67, 66, 68, 66, 66, 66, 69, 69, 70,
70, 70, 70, 70, 71, 71, 72, 73, 73, 73,
74, 74, 74, 74, 74, 75, 76, 76, 77, 77,
77, 77, 78, 78, 79, 79, 79, 79, 79, 80,
80, 81, 81, 82, 82, 82, 82, 82, 82, 82,
82, 82, 82, 82, 83, 84, 84, 85, 85, 86,
86, 87, 87, 88, 88, 89, 89, 89, 89, 90,
90, 91, 91, 91, 92, 93, 93, 94, 94, 95,
95, 95, 95, 96, 96, 97, 97, 98, 98, 99,
99, 100, 100, 101, 101, 102, 102, 103, 103, 104,
104, 105, 105, 106, 106, 107, 107
}

Definition at line 1184 of file ppparse.c.

Referenced by ppparse().

const yytype_uint8 yyr2[]
static
Initial value:
=
{
0, 2, 0, 2, 2, 2, 2, 2, 2, 2,
2, 0, 3, 0, 3, 1, 1, 1, 2, 4,
2, 3, 1, 3, 0, 2, 3, 1, 1, 1,
3, 4, 4, 5, 1, 3, 1, 2, 0, 1,
2, 1, 2, 1, 4, 4, 5, 5, 1, 1,
1, 1, 1, 5, 2, 5, 2, 2, 1, 1,
1, 1, 1, 1, 5, 0, 2, 1, 1, 0,
2, 0, 2, 3, 3, 3, 4, 4, 5, 3,
1, 2, 3, 1, 3, 2, 3, 1, 2, 1,
3, 3, 4, 1, 2, 1, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1
}

Definition at line 1201 of file ppparse.c.

Referenced by ppparse().

const yytype_uint8 yystos[]
static
Initial value:
=
{
0, 64, 0, 5, 13, 19, 24, 28, 33, 34,
35, 36, 52, 65, 66, 83, 88, 58, 3, 8,
100, 101, 20, 72, 103, 29, 59, 60, 74, 80,
29, 30, 31, 32, 59, 69, 70, 67, 68, 59,
75, 76, 57, 17, 17, 7, 10, 84, 85, 6,
9, 16, 58, 89, 90, 95, 97, 11, 21, 104,
59, 25, 102, 59, 102, 102, 71, 102, 70, 59,
60, 79, 80, 79, 54, 59, 15, 86, 58, 58,
94, 90, 97, 4, 7, 10, 61, 6, 92, 18,
22, 23, 73, 102, 11, 26, 60, 102, 60, 60,
60, 104, 104, 11, 53, 55, 56, 77, 78, 12,
105, 14, 87, 6, 58, 4, 92, 6, 91, 95,
58, 58, 58, 96, 58, 4, 60, 27, 98, 98,
60, 43, 99, 99, 78, 56, 89, 91, 4, 6,
94, 58, 62, 6, 6, 93, 98, 37, 38, 39,
40, 41, 42, 47, 48, 49, 50, 51, 82, 82,
93, 6, 6, 58, 45, 107, 44, 106, 106, 59,
60, 81, 81, 6, 46, 46, 47, 47, 107, 107
}

Definition at line 1161 of file ppparse.c.

Referenced by ppparse().

const yytype_int16 yytable[]
static
Initial value:
=
{
81, 82, 84, 2, 94, 85, 113, 49, 3, 58,
50, 117, 139, 161, 162, 58, 4, 51, 119, 95,
64, 65, 5, 67, 129, 103, 17, 6, 89, 61,
74, 7, 90, 91, 39, 75, 8, 9, 10, 11,
61, 25, 141, 22, 45, -49, 142, 46, 42, 93,
119, -50, 97, 96, 146, 12, 86, 43, 114, 52,
44, -49, 57, 52, 79, 114, 163, 104, 60, 105,
106, 26, 27, 105, 106, -105, 30, 31, 32, 33,
69, 70, 58, 81, 82, 147, 148, 149, 150, 151,
152, 169, 170, 101, 102, 153, 154, 155, 156, 157,
147, 148, 149, 150, 151, 152, 34, 61, 18, 63,
153, 154, 155, 19, 178, 179, -103, 76, 78, 83,
79, 109, 87, 115, 98, 99, 100, 111, 120, 121,
122, 124, 125, 127, 126, 130, 131, 135, 138, 143,
164, 144, 166, 173, 176, 174, 175, 68, 177, 134,
29, 172, 73, 159, 137, 136, 133, 160, 116, 140,
0, 0, 0, 0, 0, 0, 168
}

Definition at line 1117 of file ppparse.c.

Referenced by ppparse(), and yysyntax_error().

const char* const yytname[]
static
Initial value:
=
{
"\"end of file\"", "error", "$undefined", "ALSO", "BY", "COPY",
"\"==\"", "IN", "LAST", "LEADING", "OF", "OFF", "PRINTING", "REPLACE",
"REPLACING", "SUPPRESS", "TRAILING", "\".\"", "\"word\"",
"SOURCE_DIRECTIVE", "FORMAT", "IS", "FIXED", "FREE", "DEFINE_DIRECTIVE",
"AS", "PARAMETER", "OVERRIDE", "SET_DIRECTIVE", "CONSTANT",
"SOURCEFORMAT", "FOLDCOPYNAME", "NOFOLDCOPYNAME", "IF_DIRECTIVE",
"ELSE_DIRECTIVE", "ENDIF_DIRECTIVE", "ELIF_DIRECTIVE", "\">=\"",
"\"<=\"", "\"<\"", "\">\"", "\"=\"", "\"<>\"", "NOT", "THAN", "TO", "OR",
"EQUAL", "GREATER", "LESS", "SET", "DEFINED", "TURN_DIRECTIVE", "ON",
"CHECKING", "WITH", "LOCATION", "\"end of line\"",
"\"Identifier or Literal\"", "\"Variable\"", "\"Literal\"", "'('", "')'",
"$accept", "statement_list", "statement", "directive", "$@1", "$@2",
"set_directive", "set_choice", "set_options", "source_directive",
"format_type", "define_directive", "turn_directive", "ec_list",
"on_or_off", "with_loc", "if_directive", "variable_or_literal",
"object_id", "condition_clause", "copy_statement", "copy_in", "in_or_of",
"copy_suppress", "copy_replacing", "replace_statement", "replacing_list",
"text_src", "text_dst", "text_partial_src", "text_partial_dst",
"token_list", "identifier", "subscripts", "lead_trail", "_override",
"_not", "_also", "_last", "_as", "_format", "_is", "_printing", "_than",
"_to", 0
}

Definition at line 994 of file ppparse.c.

Referenced by yysyntax_error().

const yytype_uint8 yytranslate[]
static

Definition at line 936 of file ppparse.c.