GnuCOBOL  2.0
A free COBOL compiler
cobc.h File Reference
#include <stdio.h>
#include "libcob.h"
#include "flag.def"
#include "warning.def"
#include "codeoptim.def"
#include "config.def"
Include dependency graph for cobc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cb_text_list
 
struct  cb_replace_list
 
struct  cb_define_struct
 
struct  local_filename
 
struct  filename
 
struct  cb_exception
 
struct  reserved_word_list
 
struct  cobc_mem_struct
 

Macros

#define _(s)   s
 
#define N_(s)   s
 
#define F_OK   0
 
#define X_OK   1
 
#define W_OK   2
 
#define R_OK   4
 
#define COBC_ABORT()   cobc_abort(__FILE__, __LINE__)
 
#define COBC_DUMB_ABORT()   cobc_dumb_abort(__FILE__, __LINE__)
 
#define CB_FORMAT_FIXED   0
 
#define CB_FORMAT_FREE   1
 
#define CB_REPLACE_LEADING   1U
 
#define CB_REPLACE_TRAILING   2U
 
#define CB_STRINGIFY(s)   #s
 
#define CB_XSTRINGIFY(s)   CB_STRINGIFY(s)
 
#define CB_ASSIGN_MF   0 /* Micro Focus compatibility */
 
#define CB_ASSIGN_IBM   1U /* IBM compatibility */
 
#define CB_ASSIGN_COBOL2002   2U /* COBOL 2002 standard */
 
#define CB_BYTEORDER_BIG_ENDIAN   0
 
#define CB_BYTEORDER_NATIVE   1U
 
#define CB_BINARY_SIZE_1_2_4_8   0 /* 1,2,4,8 bytes */
 
#define CB_BINARY_SIZE_1__8   1U /* 1,2,3,4,5,6,7,8 bytes */
 
#define CB_BINARY_SIZE_2_4_8   2U /* 2,4,8 bytes */
 
#define PLEX_ACT_IF   0
 
#define PLEX_ACT_ELSE   1U
 
#define PLEX_ACT_END   2U
 
#define PLEX_ACT_ELIF   3U
 
#define PLEX_DEF_NONE   0
 
#define PLEX_DEF_LIT   1U
 
#define PLEX_DEF_NUM   2U
 
#define PLEX_DEF_DEL   3U
 
#define CB_CS_ACCEPT   (1U << 0)
 
#define CB_CS_ALPHABET   (1U << 1)
 
#define CB_CS_ASSIGN   (1U << 2)
 
#define CB_CS_CALL   (1U << 3)
 
#define CB_CS_CONSTANT   (1U << 4)
 
#define CB_CS_DATE   (1U << 5)
 
#define CB_CS_DAY   (1U << 6)
 
#define CB_CS_DISPLAY   (1U << 7)
 
#define CB_CS_ERASE   (1U << 8)
 
#define CB_CS_EXIT   (1U << 9)
 
#define CB_CS_FROM   (1U << 10)
 
#define CB_CS_PROGRAM_ID   (1U << 11)
 
#define CB_CS_ROUNDED   (1U << 12)
 
#define CB_CS_SET   (1U << 13)
 
#define CB_CS_STOP   (1U << 14)
 
#define CB_CS_WITH   (1U << 15)
 
#define COB_DASH   "-"
 
#define COB_DASH_NAME   "a.cob"
 
#define COB_DASH_OUT   "a.out"
 
#define CB_EXCEPTION_NAME(id)   cb_exception_table[id].name
 
#define CB_EXCEPTION_CODE(id)   cb_exception_table[id].code
 
#define CB_EXCEPTION_ENABLE(id)   cb_exception_table[id].enable
 
#define CB_FLAG(var, pdok, name, doc)   extern int var;
 
#define CB_FLAG_RQ(var, pdok, name, def, opt, doc)   extern int var;
 
#define CB_FLAG_NQ(pdok, name, opt, doc)
 
#define CB_WARNDEF(var, name, doc)   extern int var;
 
#define CB_NOWARNDEF(var, name, doc)   extern int var;
 
#define CB_OPTIM_DEF(x)   x,
 
#define CB_CONFIG_ANY(type, var, name)   extern type var;
 
#define CB_CONFIG_INT(var, name)   extern unsigned int var;
 
#define CB_CONFIG_STRING(var, name)   extern const char *var;
 
#define CB_CONFIG_BOOLEAN(var, name)   extern unsigned int var;
 
#define CB_CONFIG_SUPPORT(var, name)   extern enum cb_support var;
 
#define CB_MSG_STYLE_GCC   0
 
#define CB_MSG_STYLE_MSC   1U
 

Enumerations

enum  cb_operation_type { CB_OPERATION_READ = 0, CB_OPERATION_WRITE, CB_OPERATION_ASSIGN }
 
enum  cb_support {
  CB_OK = 0, CB_WARNING, CB_ARCHAIC, CB_OBSOLETE,
  CB_SKIP, CB_IGNORE, CB_ERROR, CB_UNCONFORMABLE
}
 
enum  cb_std_def {
  CB_STD_OC = 0, CB_STD_MF, CB_STD_IBM, CB_STD_MVS,
  CB_STD_BS2000, CB_STD_ACU, CB_STD_85, CB_STD_2002,
  CB_STD_2014
}
 
enum  cb_optim {
  COB_OPTIM_MIN = 0, COB_SET_SCREEN, COB_POINTER_MANIP, COB_GET_NUMDISP,
  COB_CMP_PACKED_INT, COB_GET_PACKED_INT, COB_ADD_PACKED_INT, COB_CMP_ALIGN_U16,
  COB_CMP_ALIGN_S16, COB_CMP_ALIGN_U32, COB_CMP_ALIGN_S32, COB_CMP_ALIGN_U64,
  COB_CMP_ALIGN_S64, COB_ADD_ALIGN_U16, COB_ADD_ALIGN_S16, COB_ADD_ALIGN_U32,
  COB_ADD_ALIGN_S32, COB_ADD_ALIGN_U64, COB_ADD_ALIGN_S64, COB_SUB_ALIGN_U16,
  COB_SUB_ALIGN_S16, COB_SUB_ALIGN_U32, COB_SUB_ALIGN_S32, COB_SUB_ALIGN_U64,
  COB_SUB_ALIGN_S64, COB_CMPSWP_ALIGN_U16, COB_CMPSWP_ALIGN_S16, COB_CMPSWP_ALIGN_U32,
  COB_CMPSWP_ALIGN_S32, COB_CMPSWP_ALIGN_U64, COB_CMPSWP_ALIGN_S64, COB_CMP_U8,
  COB_CMP_S8, COB_CMP_U16, COB_CMP_S16, COB_CMP_U24,
  COB_CMP_S24, COB_CMP_U32, COB_CMP_S32, COB_CMP_U40,
  COB_CMP_S40, COB_CMP_U48, COB_CMP_S48, COB_CMP_U56,
  COB_CMP_S56, COB_CMP_U64, COB_CMP_S64, COB_ADD_U8,
  COB_ADD_S8, COB_ADD_U16, COB_ADD_S16, COB_ADD_U24,
  COB_ADD_S24, COB_ADD_U32, COB_ADD_S32, COB_ADD_U40,
  COB_ADD_S40, COB_ADD_U48, COB_ADD_S48, COB_ADD_U56,
  COB_ADD_S56, COB_ADD_U64, COB_ADD_S64, COB_SUB_U8,
  COB_SUB_S8, COB_SUB_U16, COB_SUB_S16, COB_SUB_U24,
  COB_SUB_S24, COB_SUB_U32, COB_SUB_S32, COB_SUB_U40,
  COB_SUB_S40, COB_SUB_U48, COB_SUB_S48, COB_SUB_U56,
  COB_SUB_S56, COB_SUB_U64, COB_SUB_S64, COB_CMPSWP_U16,
  COB_CMPSWP_S16, COB_CMPSWP_U24, COB_CMPSWP_S24, COB_CMPSWP_U32,
  COB_CMPSWP_S32, COB_CMPSWP_U40, COB_CMPSWP_S40, COB_CMPSWP_U48,
  COB_CMPSWP_S48, COB_CMPSWP_U56, COB_CMPSWP_S56, COB_CMPSWP_U64,
  COB_CMPSWP_S64, COB_ADDSWP_U16, COB_ADDSWP_S16, COB_ADDSWP_U24,
  COB_ADDSWP_S24, COB_ADDSWP_U32, COB_ADDSWP_S32, COB_ADDSWP_U40,
  COB_ADDSWP_S40, COB_ADDSWP_U48, COB_ADDSWP_S48, COB_ADDSWP_U56,
  COB_ADDSWP_S56, COB_ADDSWP_U64, COB_ADDSWP_S64, COB_SUBSWP_U16,
  COB_SUBSWP_S16, COB_SUBSWP_U24, COB_SUBSWP_S24, COB_SUBSWP_U32,
  COB_SUBSWP_S32, COB_SUBSWP_U40, COB_SUBSWP_S40, COB_SUBSWP_U48,
  COB_SUBSWP_S48, COB_SUBSWP_U56, COB_SUBSWP_S56, COB_SUBSWP_U64,
  COB_SUBSWP_S64, COB_SETSWP_U16, COB_SETSWP_S16, COB_SETSWP_U24,
  COB_SETSWP_S24, COB_SETSWP_U32, COB_SETSWP_S32, COB_SETSWP_U40,
  COB_SETSWP_S40, COB_SETSWP_U48, COB_SETSWP_S48, COB_SETSWP_U56,
  COB_SETSWP_S56, COB_SETSWP_U64, COB_SETSWP_S64, COB_OPTIM_MAX
}
 

Functions

void * cobc_malloc (const size_t)
 
void cobc_free (void *)
 
void * cobc_strdup (const char *)
 
void * cobc_realloc (void *, const size_t)
 
void * cobc_main_malloc (const size_t)
 
void * cobc_main_strdup (const char *)
 
void * cobc_main_realloc (void *, const size_t)
 
void cobc_main_free (void *)
 
void * cobc_parse_malloc (const size_t)
 
void * cobc_parse_strdup (const char *)
 
void * cobc_parse_realloc (void *, const size_t)
 
void cobc_parse_free (void *)
 
void * cobc_plex_malloc (const size_t)
 
void * cobc_plex_strdup (const char *)
 
void * cobc_check_string (const char *)
 
void cobc_abort_pr (const char *,...) COB_A_FORMAT12
 
DECLNORET void cobc_abort (const char *, const int) COB_A_NORETURN
 
DECLNORET void cobc_too_many_errors (void) COB_A_NORETURN
 
DECLNORET void cobc_dumb_abort (const char *, const int)
 
size_t cobc_check_valid_name (const char *, const unsigned int)
 
int cb_load_std (const char *)
 
int cb_config_entry (char *, const char *, const int)
 
int cb_load_conf (const char *, const int)
 
void cobc_init_scanner (void)
 
void cobc_init_typeck (void)
 
void cobc_init_reserved (void)
 
int pplex (void)
 The main scanner function which does all the work. More...
 
int ppparse (void)
 
int ppopen (const char *, struct cb_replace_list *)
 
int ppcopy (const char *, const char *, struct cb_replace_list *)
 
void pp_set_replace_list (struct cb_replace_list *, const cob_u32_t)
 
void ppparse_error (const char *)
 
void ppparse_clear_vars (const struct cb_define_struct *)
 
void plex_clear_vars (void)
 
void plex_clear_all (void)
 
void plex_call_destroy (void)
 
void plex_action_directive (const unsigned int, const unsigned int)
 
int yylex (void)
 The main scanner function which does all the work. More...
 
int yyparse (void)
 
void ylex_clear_all (void)
 
void ylex_call_destroy (void)
 
void cob_gen_optim (const enum cb_optim)
 
void cb_warning (const char *,...) COB_A_FORMAT12
 
void cb_error (const char *,...) COB_A_FORMAT12
 
void cb_plex_warning (const size_t, const char *,...) COB_A_FORMAT23
 
void cb_plex_error (const size_t, const char *,...) COB_A_FORMAT23
 
void configuration_warning (const char *, const int, const char *,...) COB_A_FORMAT34
 
void configuration_error (const char *, const int, const int, const char *,...) COB_A_FORMAT45
 
unsigned int cb_verify (const enum cb_support, const char *)
 
void remove_reserved_word (const char *)
 
void add_reserved_word (const char *, const char *, const int)
 

Variables

int cb_source_format
 
struct cb_exception cb_exception_table []
 
int cb_id
 
int cb_attr_id
 
int cb_literal_id
 
int cb_field_id
 
int cobc_flag_main
 
int cb_flag_functions_all
 
int cb_flag_main
 
int cobc_wants_debug
 
int cobc_seen_stdin
 
int errorcount
 
int warningcount
 
int warningopt
 
int no_physical_cancel
 
cob_u32_t optimize_defs []
 
char * cb_oc_build_stamp
 
const char * cb_source_file
 
int cb_source_line
 
const char * cob_config_dir
 
unsigned int cobc_gen_listing
 
const char * demangle_name
 
FILE * cb_storage_file
 
const char * cb_storage_file_name
 
char ** cb_saveargv
 
int cb_saveargc
 
FILE * cb_listing_file
 
struct cb_text_listcb_include_list
 
struct cb_text_listcb_intrinsic_list
 
struct cb_text_listcb_extension_list
 
struct cb_text_listcb_static_call_list
 
struct cb_text_listcb_early_exit_list
 
struct cb_programcurrent_program
 
struct cb_statementcurrent_statement
 
struct cb_labelcurrent_section
 
struct cb_labelcurrent_paragraph
 
int cb_exp_line
 
int functions_are_all
 
struct cb_tree_commondefined_prog_list
 
struct reserved_word_listcob_user_res_list
 
FILE * ppin = (FILE *) 0
 
FILE * ppout = (FILE *) 0
 
char * cobc_glob_line
 
FILE * yyin
 
FILE * yyout
 
size_t suppress_warn
 
size_t cb_msg_style
 
struct reserved_word_listcobc_user_res_list
 

Macro Definition Documentation

#define _ (   s)    s

Definition at line 40 of file cobc.h.

#define CB_ASSIGN_COBOL2002   2U /* COBOL 2002 standard */

Definition at line 79 of file cobc.h.

#define CB_ASSIGN_IBM   1U /* IBM compatibility */

Definition at line 78 of file cobc.h.

Referenced by cb_build_assignment_name(), and cb_config_entry().

#define CB_ASSIGN_MF   0 /* Micro Focus compatibility */

Definition at line 77 of file cobc.h.

Referenced by cb_build_assignment_name(), cb_config_entry(), and cb_validate_program_data().

#define CB_BINARY_SIZE_1_2_4_8   0 /* 1,2,4,8 bytes */

Definition at line 86 of file cobc.h.

Referenced by cb_config_entry(), and compute_binary_size().

#define CB_BINARY_SIZE_1__8   1U /* 1,2,3,4,5,6,7,8 bytes */

Definition at line 87 of file cobc.h.

Referenced by cb_config_entry(), and compute_binary_size().

#define CB_BINARY_SIZE_2_4_8   2U /* 2,4,8 bytes */

Definition at line 88 of file cobc.h.

Referenced by cb_config_entry(), and compute_binary_size().

#define CB_BYTEORDER_BIG_ENDIAN   0

Definition at line 82 of file cobc.h.

Referenced by cb_config_entry(), and setup_parameters().

#define CB_BYTEORDER_NATIVE   1U

Definition at line 83 of file cobc.h.

Referenced by cb_config_entry().

#define CB_CONFIG_ANY (   type,
  var,
  name 
)    extern type var;

Definition at line 362 of file cobc.h.

#define CB_CONFIG_BOOLEAN (   var,
  name 
)    extern unsigned int var;

Definition at line 365 of file cobc.h.

#define CB_CONFIG_INT (   var,
  name 
)    extern unsigned int var;

Definition at line 363 of file cobc.h.

#define CB_CONFIG_STRING (   var,
  name 
)    extern const char *var;

Definition at line 364 of file cobc.h.

#define CB_CONFIG_SUPPORT (   var,
  name 
)    extern enum cb_support var;

Definition at line 366 of file cobc.h.

#define CB_CS_ACCEPT   (1U << 0)

Definition at line 103 of file cobc.h.

#define CB_CS_ALPHABET   (1U << 1)

Definition at line 104 of file cobc.h.

#define CB_CS_ASSIGN   (1U << 2)

Definition at line 105 of file cobc.h.

Referenced by yyparse().

#define CB_CS_CALL   (1U << 3)

Definition at line 106 of file cobc.h.

Referenced by yyparse().

#define CB_CS_CONSTANT   (1U << 4)

Definition at line 107 of file cobc.h.

#define CB_CS_DATE   (1U << 5)

Definition at line 108 of file cobc.h.

#define CB_CS_DAY   (1U << 6)

Definition at line 109 of file cobc.h.

#define CB_CS_DISPLAY   (1U << 7)

Definition at line 110 of file cobc.h.

Referenced by yyparse().

#define CB_CS_ERASE   (1U << 8)

Definition at line 111 of file cobc.h.

#define CB_CS_EXIT   (1U << 9)

Definition at line 112 of file cobc.h.

Referenced by yylex(), and yyparse().

#define CB_CS_FROM   (1U << 10)

Definition at line 113 of file cobc.h.

#define CB_CS_PROGRAM_ID   (1U << 11)

Definition at line 114 of file cobc.h.

Referenced by lookup_reserved_word().

#define CB_CS_ROUNDED   (1U << 12)

Definition at line 115 of file cobc.h.

#define CB_CS_SET   (1U << 13)

Definition at line 116 of file cobc.h.

Referenced by yyparse().

#define CB_CS_STOP   (1U << 14)

Definition at line 117 of file cobc.h.

#define CB_CS_WITH   (1U << 15)

Definition at line 118 of file cobc.h.

#define CB_EXCEPTION_CODE (   id)    cb_exception_table[id].code

Definition at line 242 of file cobc.h.

Referenced by output_stmt().

#define CB_EXCEPTION_ENABLE (   id)    cb_exception_table[id].enable
#define CB_EXCEPTION_NAME (   id)    cb_exception_table[id].name

Definition at line 241 of file cobc.h.

#define CB_FLAG (   var,
  pdok,
  name,
  doc 
)    extern int var;

Definition at line 248 of file cobc.h.

#define CB_FLAG_NQ (   pdok,
  name,
  opt,
  doc 
)

Definition at line 250 of file cobc.h.

#define CB_FLAG_RQ (   var,
  pdok,
  name,
  def,
  opt,
  doc 
)    extern int var;

Definition at line 249 of file cobc.h.

#define CB_FORMAT_FIXED   0

Definition at line 65 of file cobc.h.

Referenced by check_listing(), ppinput(), and ppparse().

#define CB_FORMAT_FREE   1

Definition at line 66 of file cobc.h.

Referenced by ppinput(), pplex(), ppparse(), and process_command_line().

#define CB_MSG_STYLE_GCC   0

Definition at line 435 of file cobc.h.

Referenced by main().

#define CB_MSG_STYLE_MSC   1U

Definition at line 436 of file cobc.h.

Referenced by cobc_print_info(), main(), and print_error().

#define CB_NOWARNDEF (   var,
  name,
  doc 
)    extern int var;

Definition at line 259 of file cobc.h.

#define CB_OPTIM_DEF (   x)    x,

Definition at line 265 of file cobc.h.

#define CB_REPLACE_LEADING   1U

Definition at line 69 of file cobc.h.

Referenced by ppecho(), and ppparse().

#define CB_REPLACE_TRAILING   2U

Definition at line 70 of file cobc.h.

Referenced by ppecho(), and ppparse().

#define CB_STRINGIFY (   s)    #s

Definition at line 73 of file cobc.h.

#define CB_WARNDEF (   var,
  name,
  doc 
)    extern int var;

Definition at line 258 of file cobc.h.

#define CB_XSTRINGIFY (   s)    CB_STRINGIFY(s)

Definition at line 74 of file cobc.h.

Referenced by codegen().

#define COB_DASH   "-"

Definition at line 121 of file cobc.h.

Referenced by ppopen(), preprocess(), and process_filename().

#define COB_DASH_NAME   "a.cob"

Definition at line 122 of file cobc.h.

Referenced by process_filename().

#define COB_DASH_OUT   "a.out"

Definition at line 123 of file cobc.h.

Referenced by process_link().

#define COBC_DUMB_ABORT ( )    cobc_dumb_abort(__FILE__, __LINE__)

Definition at line 62 of file cobc.h.

Referenced by cb_field_size(), and cb_tree_type().

#define N_ (   s)    s

Definition at line 41 of file cobc.h.

#define PLEX_ACT_ELIF   3U

Definition at line 94 of file cobc.h.

Referenced by plex_action_directive(), and ppparse().

#define PLEX_ACT_ELSE   1U

Definition at line 92 of file cobc.h.

Referenced by plex_action_directive(), and ppparse().

#define PLEX_ACT_END   2U

Definition at line 93 of file cobc.h.

Referenced by plex_action_directive(), and ppparse().

#define PLEX_ACT_IF   0

Definition at line 91 of file cobc.h.

Referenced by plex_action_directive(), and ppparse().

#define PLEX_DEF_DEL   3U

Definition at line 100 of file cobc.h.

Referenced by ppp_define_add(), ppp_define_del(), and ppp_search_lists().

#define PLEX_DEF_LIT   1U

Definition at line 98 of file cobc.h.

Referenced by cobc_set_value(), ppp_compare_vals(), and ppp_set_value().

#define PLEX_DEF_NONE   0

Definition at line 97 of file cobc.h.

Referenced by cb_define_list_add(), cobc_set_value(), ppp_set_value(), and ppparse().

#define PLEX_DEF_NUM   2U

Definition at line 99 of file cobc.h.

Referenced by cobc_set_value(), ppp_compare_vals(), and ppp_set_value().

#define R_OK   4
#define W_OK   2

Definition at line 54 of file cobc.h.

Referenced by indexed_open().

#define X_OK   1

Definition at line 50 of file cobc.h.

Enumeration Type Documentation

Enumerator
CB_OPERATION_READ 
CB_OPERATION_WRITE 
CB_OPERATION_ASSIGN 

Definition at line 127 of file cobc.h.

enum cb_optim
Enumerator
COB_OPTIM_MIN 
COB_SET_SCREEN 
COB_POINTER_MANIP 
COB_GET_NUMDISP 
COB_CMP_PACKED_INT 
COB_GET_PACKED_INT 
COB_ADD_PACKED_INT 
COB_CMP_ALIGN_U16 
COB_CMP_ALIGN_S16 
COB_CMP_ALIGN_U32 
COB_CMP_ALIGN_S32 
COB_CMP_ALIGN_U64 
COB_CMP_ALIGN_S64 
COB_ADD_ALIGN_U16 
COB_ADD_ALIGN_S16 
COB_ADD_ALIGN_U32 
COB_ADD_ALIGN_S32 
COB_ADD_ALIGN_U64 
COB_ADD_ALIGN_S64 
COB_SUB_ALIGN_U16 
COB_SUB_ALIGN_S16 
COB_SUB_ALIGN_U32 
COB_SUB_ALIGN_S32 
COB_SUB_ALIGN_U64 
COB_SUB_ALIGN_S64 
COB_CMPSWP_ALIGN_U16 
COB_CMPSWP_ALIGN_S16 
COB_CMPSWP_ALIGN_U32 
COB_CMPSWP_ALIGN_S32 
COB_CMPSWP_ALIGN_U64 
COB_CMPSWP_ALIGN_S64 
COB_CMP_U8 
COB_CMP_S8 
COB_CMP_U16 
COB_CMP_S16 
COB_CMP_U24 
COB_CMP_S24 
COB_CMP_U32 
COB_CMP_S32 
COB_CMP_U40 
COB_CMP_S40 
COB_CMP_U48 
COB_CMP_S48 
COB_CMP_U56 
COB_CMP_S56 
COB_CMP_U64 
COB_CMP_S64 
COB_ADD_U8 
COB_ADD_S8 
COB_ADD_U16 
COB_ADD_S16 
COB_ADD_U24 
COB_ADD_S24 
COB_ADD_U32 
COB_ADD_S32 
COB_ADD_U40 
COB_ADD_S40 
COB_ADD_U48 
COB_ADD_S48 
COB_ADD_U56 
COB_ADD_S56 
COB_ADD_U64 
COB_ADD_S64 
COB_SUB_U8 
COB_SUB_S8 
COB_SUB_U16 
COB_SUB_S16 
COB_SUB_U24 
COB_SUB_S24 
COB_SUB_U32 
COB_SUB_S32 
COB_SUB_U40 
COB_SUB_S40 
COB_SUB_U48 
COB_SUB_S48 
COB_SUB_U56 
COB_SUB_S56 
COB_SUB_U64 
COB_SUB_S64 
COB_CMPSWP_U16 
COB_CMPSWP_S16 
COB_CMPSWP_U24 
COB_CMPSWP_S24 
COB_CMPSWP_U32 
COB_CMPSWP_S32 
COB_CMPSWP_U40 
COB_CMPSWP_S40 
COB_CMPSWP_U48 
COB_CMPSWP_S48 
COB_CMPSWP_U56 
COB_CMPSWP_S56 
COB_CMPSWP_U64 
COB_CMPSWP_S64 
COB_ADDSWP_U16 
COB_ADDSWP_S16 
COB_ADDSWP_U24 
COB_ADDSWP_S24 
COB_ADDSWP_U32 
COB_ADDSWP_S32 
COB_ADDSWP_U40 
COB_ADDSWP_S40 
COB_ADDSWP_U48 
COB_ADDSWP_S48 
COB_ADDSWP_U56 
COB_ADDSWP_S56 
COB_ADDSWP_U64 
COB_ADDSWP_S64 
COB_SUBSWP_U16 
COB_SUBSWP_S16 
COB_SUBSWP_U24 
COB_SUBSWP_S24 
COB_SUBSWP_U32 
COB_SUBSWP_S32 
COB_SUBSWP_U40 
COB_SUBSWP_S40 
COB_SUBSWP_U48 
COB_SUBSWP_S48 
COB_SUBSWP_U56 
COB_SUBSWP_S56 
COB_SUBSWP_U64 
COB_SUBSWP_S64 
COB_SETSWP_U16 
COB_SETSWP_S16 
COB_SETSWP_U24 
COB_SETSWP_S24 
COB_SETSWP_U32 
COB_SETSWP_S32 
COB_SETSWP_U40 
COB_SETSWP_S40 
COB_SETSWP_U48 
COB_SETSWP_S48 
COB_SETSWP_U56 
COB_SETSWP_S56 
COB_SETSWP_U64 
COB_SETSWP_S64 
COB_OPTIM_MAX 

Definition at line 266 of file cobc.h.

266  {
267  COB_OPTIM_MIN = 0,
268 #include "codeoptim.def"
270 };
enum cb_std_def
Enumerator
CB_STD_OC 
CB_STD_MF 
CB_STD_IBM 
CB_STD_MVS 
CB_STD_BS2000 
CB_STD_ACU 
CB_STD_85 
CB_STD_2002 
CB_STD_2014 

Definition at line 146 of file cobc.h.

146  {
147  CB_STD_OC = 0,
148  CB_STD_MF,
149  CB_STD_IBM,
150  CB_STD_MVS,
152  CB_STD_ACU,
153  CB_STD_85,
154  CB_STD_2002,
156 };
enum cb_support
Enumerator
CB_OK 
CB_WARNING 
CB_ARCHAIC 
CB_OBSOLETE 
CB_SKIP 
CB_IGNORE 
CB_ERROR 
CB_UNCONFORMABLE 

Definition at line 134 of file cobc.h.

134  {
135  CB_OK = 0,
136  CB_WARNING,
137  CB_ARCHAIC,
138  CB_OBSOLETE,
139  CB_SKIP,
140  CB_IGNORE,
141  CB_ERROR,
143 };
Definition: cobc.h:139
Definition: cobc.h:141
Definition: cobc.h:135

Function Documentation

void add_reserved_word ( const char *  ,
const char *  ,
const int   
)

Definition at line 2903 of file reserved.c.

References add_reserved_word_without_init(), and initialize_user_res_list_if_needed().

Referenced by cb_config_entry().

2904 {
2906  add_reserved_word_without_init (word, fname, line);
2907 }
static void add_reserved_word_without_init(const char *word, const char *fname, const int line)
Definition: reserved.c:2683
static void initialize_user_res_list_if_needed(void)
Definition: reserved.c:2725
if fold fold static computed alternate extra correct stack on syntax debugging line
Definition: flag.def:90

Here is the call graph for this function:

Here is the caller graph for this function:

int cb_config_entry ( char *  ,
const char *  ,
const int   
)

Definition at line 153 of file config.c.

References _, add_reserved_word(), CB_ANY, CB_ARCHAIC, CB_ASSIGN_IBM, CB_ASSIGN_MF, CB_BINARY_SIZE_1_2_4_8, CB_BINARY_SIZE_1__8, CB_BINARY_SIZE_2_4_8, CB_BOOLEAN, CB_BYTEORDER_BIG_ENDIAN, CB_BYTEORDER_NATIVE, CB_CONFIG_SIZE, CB_ERROR, CB_IGNORE, CB_INT, CB_OBSOLETE, CB_OK, CB_SKIP, CB_STRING, CB_SUPPORT, CB_UNCONFORMABLE, CB_WARNING, cob_expand_env_string(), cob_free(), COB_MAX_WORDLEN, config_table, configuration_error(), invalid_value(), config_struct::name, includelist::name, NULL, read_string(), remove_reserved_word(), unsupported_value(), config_struct::val, and config_struct::var.

Referenced by cb_load_conf_file(), and process_command_line().

154 {
155  char *s;
156  const char *name;
157  char *e;
158  const char *val;
159  void *var;
160  size_t i;
161  size_t j;
162  int v;
163 
164  /* Get tag */
165  s = strpbrk (buff, " \t:=");
166  if (!s) {
167  for (j=strlen(buff); buff[j-1] == '\r' || buff[j-1] == '\n'; ) /* Remove CR LF */
168  buff[--j] = 0;
169  configuration_error (fname, line, 1,
170  _("Invalid configuration tag '%s'"), buff);
171  return -1;
172  }
173  *s = 0;
174 
175  /* Find entry */
176  for (i = 0; i < CB_CONFIG_SIZE; i++) {
177  if (strcmp (buff, config_table[i].name) == 0) {
178  break;
179  }
180  }
181  if (i == CB_CONFIG_SIZE) {
182  configuration_error (fname, line, 1, _("Unknown configuration tag '%s'"), buff);
183  return -1;
184  }
185 
186  /* Get value */
187  /* Move pointer to beginning of value */
188  for (s++; *s && strchr (" \t:=", *s); s++) {
189  ;
190  }
191  /* Set end pointer to first # (comment) or end of value */
192  for (e = s + 1; *e && !strchr ("#", *e); e++) {
193  ;
194  }
195  /* Remove trailing white-spaces */
196  for (--e; e >= s && strchr (" \t\r\n", *e); e--) {
197  ;
198  }
199  e[1] = 0;
200  config_table[i].val = s;
201 
202  /* Set value */
203  name = config_table[i].name;
204  var = config_table[i].var;
205  val = config_table[i].val;
206  switch (config_table[i].type) {
207  case CB_ANY:
208  if (strcmp (name, "assign-clause") == 0) {
209  if (strcmp (val, "cobol2002") == 0) {
210  unsupported_value (fname, line, name, val);
211  return -1;
212  } else if (strcmp (val, "mf") == 0) {
213  cb_assign_clause = CB_ASSIGN_MF;
214  } else if (strcmp (val, "ibm") == 0) {
215  cb_assign_clause = CB_ASSIGN_IBM;
216  } else {
217  invalid_value (fname, line, name, val, "cobol2002, mf, ibm", 0, 0);
218  return -1;
219  }
220  } else if (strcmp (name, "binary-size") == 0) {
221  if (strcmp (val, "2-4-8") == 0) {
222  cb_binary_size = CB_BINARY_SIZE_2_4_8;
223  } else if (strcmp (val, "1-2-4-8") == 0) {
224  cb_binary_size = CB_BINARY_SIZE_1_2_4_8;
225  } else if (strcmp (val, "1--8") == 0) {
226  cb_binary_size = CB_BINARY_SIZE_1__8;
227  } else {
228  invalid_value (fname, line, name, val, "2-4-8, 1-2-4-8, 1--8", 0, 0);
229  return -1;
230  }
231  } else if (strcmp (name, "binary-byteorder") == 0) {
232  if (strcmp (val, "native") == 0) {
233  cb_binary_byteorder = CB_BYTEORDER_NATIVE;
234  } else if (strcmp (val, "big-endian") == 0) {
235  cb_binary_byteorder = CB_BYTEORDER_BIG_ENDIAN;
236  } else {
237  invalid_value (fname, line, name, val, "native, big-endian", 0, 0);
238  return -1;
239  }
240  }
241  break;
242  case CB_INT:
243  for (j = 0; val[j]; j++) {
244  if (val[j] < '0' || val[j] > '9') {
245  invalid_value (fname, line, name, val, NULL, 0, 0);
246  return -1;
247  break;
248  }
249  }
250  v = atoi (val);
251  if (strcmp (name, "tab-width") == 0) {
252  if (v < 1) {
253  invalid_value (fname, line, name, val, NULL, 1, 0);
254  return -1;
255  }
256  if (v > 8) {
257  invalid_value (fname, line, name, val, NULL, 0, 8);
258  return -1;
259  }
260  } else if (strcmp (name, "text-column") == 0) {
261  if (v < 72) {
262  invalid_value (fname, line, name, val, NULL, 72, 0);
263  return -1;
264  }
265  if (v > 255) {
266  invalid_value (fname, line, name, val, NULL, 0, 255);
267  return -1;
268  }
269  } else if (strcmp (name, "word-length") == 0) {
270  if (v < 1) {
271  invalid_value (fname, line, name, val, NULL, 1, 0);
272  return -1;
273  }
274  if (v > COB_MAX_WORDLEN) {
275  invalid_value (fname, line, name, val, NULL, 0, COB_MAX_WORDLEN);
276  return -1;
277  }
278  }
279  *((int *)var) = v;
280  break;
281  case CB_STRING:
282  val = read_string (val);
283 
284  if (strcmp (name, "include") == 0 ||
285  strcmp (name, "includeif") == 0) {
286  if (fname) {
287  /* Include another conf file */
288  s = cob_expand_env_string((char *)val);
289  strcpy (buff, s);
290  cob_free (s);
291  if (strcmp (name, "includeif") == 0) {
292  return 3;
293  } else {
294  return 1;
295  }
296  } else {
297  configuration_error (NULL, 0, 1,
298  _("'%s' not supported with -cb_conf"), name);
299  return -1;
300  }
301  } else if (strcmp (name, "not-reserved") == 0) {
302  remove_reserved_word (val);
303  } else if (strcmp (name, "reserved") == 0) {
304  add_reserved_word (val, fname, line);
305  } else {
306  *((const char **)var) = val;
307  }
308 
309  break;
310  case CB_BOOLEAN:
311  if (strcmp (val, "yes") == 0) {
312  *((int *)var) = 1;
313  } else if (strcmp (val, "no") == 0) {
314  *((int *)var) = 0;
315  } else {
316  invalid_value (fname, line, name, val, "yes, no", 0, 0);
317  return -1;
318  }
319  break;
320  case CB_SUPPORT:
321  if (strcmp (val, "ok") == 0) {
322  *((enum cb_support *)var) = CB_OK;
323  } else if (strcmp (val, "warning") == 0) {
324  *((enum cb_support *)var) = CB_WARNING;
325  } else if (strcmp (val, "archaic") == 0) {
326  *((enum cb_support *)var) = CB_ARCHAIC;
327  } else if (strcmp (val, "obsolete") == 0) {
328  *((enum cb_support *)var) = CB_OBSOLETE;
329  } else if (strcmp (val, "skip") == 0) {
330  *((enum cb_support *)var) = CB_SKIP;
331  } else if (strcmp (val, "ignore") == 0) {
332  *((enum cb_support *)var) = CB_IGNORE;
333  } else if (strcmp (val, "error") == 0) {
334  *((enum cb_support *)var) = CB_ERROR;
335  } else if (strcmp (val, "unconformable") == 0) {
336  *((enum cb_support *)var) = CB_UNCONFORMABLE;
337  } else {
338  invalid_value (fname, line, name, val,
339  "ok, warning, archaic, obsolete, skip, ignore, error, unconformable", 0, 0);
340  return -1;
341  }
342  break;
343  default:
344  configuration_error (fname, line, 1, _("Invalid type for '%s'"), name);
345  return -1;
346  }
347  return 0;
348 }
void cob_free(void *mptr)
Definition: common.c:1284
Definition: cobc.h:139
void * var
Definition: config.c:75
Definition: cobc.h:141
#define CB_ASSIGN_IBM
Definition: cobc.h:78
void remove_reserved_word(const char *)
Definition: reserved.c:2882
#define CB_CONFIG_SIZE
Definition: config.c:97
static void unsupported_value(const char *fname, const int line, const char *name, const char *val)
Definition: config.c:138
Definition: cobc.h:135
#define COB_MAX_WORDLEN
Definition: common.h:574
cb_support
Definition: cobc.h:134
#define _(s)
Definition: cobcrun.c:59
#define CB_BINARY_SIZE_2_4_8
Definition: cobc.h:88
const char * name
Definition: config.c:74
char * val
Definition: config.c:76
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 CB_BYTEORDER_BIG_ENDIAN
Definition: cobc.h:82
Definition: config.c:35
static struct config_struct config_table[]
#define CB_BYTEORDER_NATIVE
Definition: cobc.h:83
#define CB_ASSIGN_MF
Definition: cobc.h:77
#define CB_BINARY_SIZE_1_2_4_8
Definition: cobc.h:86
static char * read_string(const char *text)
Definition: config.c:102
Definition: config.c:34
char * cob_expand_env_string(char *strval)
Definition: common.c:4406
void configuration_error(const char *, const int, const int, const char *,...) COB_A_FORMAT45
Definition: error.c:178
if fold fold static computed alternate extra correct stack on syntax debugging line
Definition: flag.def:90
static void invalid_value(const char *fname, const int line, const char *name, const char *val, const char *str, const int max, const int min)
Definition: config.c:120
void add_reserved_word(const char *, const char *, const int)
Definition: reserved.c:2903
#define CB_BINARY_SIZE_1__8
Definition: cobc.h:87

Here is the call graph for this function:

Here is the caller graph for this function:

void cb_error ( const char *  ,
  ... 
)

Definition at line 98 of file error.c.

References _, cobc_cs_check, cobc_in_repository, cobc_too_many_errors(), errorcount, NULL, and print_error().

Referenced by build_evaluate(), cb_build_const_length(), cb_build_locale_name(), cb_build_picture(), cb_expr_finish(), cb_get_int(), cb_get_long_long(), cb_get_u_long_long(), cb_validate_program_data(), cb_verify(), check_not_88_level(), check_not_both(), check_relaxed_syntax(), cobc_error_name(), decrement_depth(), emit_conflicting_clause_message(), emit_default_displays_for_x_list(), emit_duplicate_clause_message(), error_if_no_advancing_in_screen_display(), error_literal(), error_numeric_literal(), finalize_file(), increment_depth(), lookup_reserved_word(), make_intrinsic(), ppcopy(), pplex(), ppopen(), ppp_define_add(), ppparse(), scan_define_options(), set_up_use_file(), valid_format(), valid_screen_pos(), yylex(), and yyparse().

99 {
100  va_list ap;
101 
102  cobc_in_repository = 0;
103 #if 0 /* RXWRXW - Is this right? */
104  cobc_cs_check = 0;
105 #endif
106  va_start (ap, fmt);
107  print_error (NULL, 0, _("Error: "), fmt, ap);
108  va_end (ap);
109  if (++errorcount > 100) {
111  }
112 }
unsigned int cobc_in_repository
Definition: parser.c:180
#define _(s)
Definition: cobcrun.c:59
EC ARGUMENT EC EC BOUND EC BOUND EC BOUND EC BOUND TABLE EC DATA EC DATA EC DATA PTR NULL
Definition: exception.def:95
unsigned int cobc_cs_check
Definition: parser.c:182
void cobc_too_many_errors(void)
Definition: cobc.c:599
int errorcount
Definition: cobc.c:173
static void print_error(const char *file, int line, const char *prefix, const char *fmt, va_list ap)
Definition: error.c:46

Here is the call graph for this function:

Here is the caller graph for this function:

int cb_load_conf ( const char *  ,
const int   
)

Definition at line 476 of file config.c.

References _, CB_CONFIG_SIZE, cb_load_conf_file(), cob_config_dir, COB_NORMAL_BUFF, COB_NORMAL_MAX, config_table, configuration_error(), configuration_warning(), includelist::name, NULL, SLASH_CHAR, unlikely, and config_struct::val.

Referenced by cb_load_std(), and process_command_line().

477 {
478  const char *name;
479  int ret;
480  size_t i;
481  char buff[COB_NORMAL_BUFF];
482 
483  /* Warn if we drop the configuration read already */
484  if (unlikely(cb_config_name != NULL)) {
485  configuration_warning (fname, 0,
486  _("The previous loaded configuration '%s' will be discarded"),
487  cb_config_name);
488  }
489 
490  /* Initialize the configuration table */
491  for (i = 0; i < CB_CONFIG_SIZE; i++) {
492  config_table[i].val = NULL;
493  }
494 
495  /* Get the name for the configuration file */
496  if (prefix_dir) {
497  snprintf (buff, (size_t)COB_NORMAL_MAX,
498  "%s%c%s", cob_config_dir, SLASH_CHAR, fname);
499  name = buff;
500  } else {
501  name = fname;
502  }
503 
504  ret = cb_load_conf_file (name, 0);
505 
506  /* Checks for missing definitions */
507  if (ret == 0) {
508  for (i = 4U; i < CB_CONFIG_SIZE; i++) {
509  if (config_table[i].val == NULL) {
510  /* as there are likely more than one definition missing group it */
511  if (ret == 0) {
512  configuration_error (fname, 0, 1, _("Missing definitions:"));
513  }
514  configuration_error (fname, 0, 1, _("\tNo definition of '%s'"),
515  config_table[i].name);
516  ret = -1;
517  }
518  }
519  }
520 
521  return ret;
522 }
const char * cob_config_dir
Definition: cobc.c:155
static int cb_load_conf_file(const char *conf_file, int isoptional)
Definition: config.c:351
#define COB_NORMAL_BUFF
Definition: common.h:541
#define CB_CONFIG_SIZE
Definition: config.c:97
void configuration_warning(const char *, const int, const char *,...) COB_A_FORMAT34
Definition: error.c:144
#define _(s)
Definition: cobcrun.c:59
#define unlikely(x)
Definition: common.h:437
char * val
Definition: config.c:76
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 SLASH_CHAR
Definition: common.h:505
#define COB_NORMAL_MAX
Definition: common.h:547
static struct config_struct config_table[]
void configuration_error(const char *, const int, const int, const char *,...) COB_A_FORMAT45
Definition: error.c:178

Here is the call graph for this function:

Here is the caller graph for this function:

int cb_load_std ( const char *  )

Definition at line 147 of file config.c.

References cb_load_conf().

Referenced by process_command_line().

148 {
149  return cb_load_conf (name, 1);
150 }
int cb_load_conf(const char *fname, const int prefix_dir)
Definition: config.c:476

Here is the call graph for this function:

Here is the caller graph for this function:

void cb_plex_error ( const size_t  ,
const char *  ,
  ... 
)

Definition at line 130 of file error.c.

References _, cb_source_line, cobc_too_many_errors(), errorcount, NULL, and print_error().

Referenced by plex_action_directive(), ppinput(), and ppparse_error().

131 {
132  va_list ap;
133 
134  va_start (ap, fmt);
135  print_error (NULL, (int)(cb_source_line + sline), _("Error: "), fmt, ap);
136  va_end (ap);
137  if (++errorcount > 100) {
139  }
140 }
#define _(s)
Definition: cobcrun.c:59
EC ARGUMENT EC EC BOUND EC BOUND EC BOUND EC BOUND TABLE EC DATA EC DATA EC DATA PTR NULL
Definition: exception.def:95
int cb_source_line
Definition: cobc.c:178
void cobc_too_many_errors(void)
Definition: cobc.c:599
int errorcount
Definition: cobc.c:173
static void print_error(const char *file, int line, const char *prefix, const char *fmt, va_list ap)
Definition: error.c:46

Here is the call graph for this function:

Here is the caller graph for this function:

void cb_plex_warning ( const size_t  ,
const char *  ,
  ... 
)

Definition at line 119 of file error.c.

References _, cb_source_line, NULL, print_error(), and warningcount.

Referenced by ppinput(), and pplex().

120 {
121  va_list ap;
122 
123  va_start (ap, fmt);
124  print_error (NULL, (int)(cb_source_line + sline), _("Warning: "), fmt, ap);
125  va_end (ap);
126  warningcount++;
127 }
int warningcount
Definition: cobc.c:174
#define _(s)
Definition: cobcrun.c:59
EC ARGUMENT EC EC BOUND EC BOUND EC BOUND EC BOUND TABLE EC DATA EC DATA EC DATA PTR NULL
Definition: exception.def:95
int cb_source_line
Definition: cobc.c:178
static void print_error(const char *file, int line, const char *prefix, const char *fmt, va_list ap)
Definition: error.c:46

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int cb_verify ( const enum  cb_support,
const char *   
)

Definition at line 246 of file error.c.

References _, CB_ARCHAIC, cb_error(), CB_ERROR, CB_IGNORE, CB_OBSOLETE, CB_OK, CB_SKIP, CB_UNCONFORMABLE, cb_warning(), CB_WARNING, and warningopt.

Referenced by cb_emit_goto(), check_comments(), compute_size(), ppinput(), pplex(), scan_b(), scan_h(), scan_o(), validate_field_1(), and yyparse().

247 {
248  switch (tag) {
249  case CB_OK:
250  return 1;
251  case CB_WARNING:
252  cb_warning (_("%s used"), feature);
253  return 1;
254  case CB_ARCHAIC:
255  if (cb_warn_archaic) {
256  cb_warning (_("%s is archaic in %s"), feature, cb_config_name);
257  }
258  return 1;
259  case CB_OBSOLETE:
260  if (cb_warn_obsolete) {
261  cb_warning (_("%s is obsolete in %s"), feature, cb_config_name);
262  }
263  return 1;
264  case CB_SKIP:
265  return 0;
266  case CB_IGNORE:
267  if (warningopt) {
268  cb_warning (_("%s ignored"), feature);
269  }
270  return 0;
271  case CB_ERROR:
272  cb_error (_("%s used"), feature);
273  return 0;
274  case CB_UNCONFORMABLE:
275  cb_error (_("%s does not conform to %s"), feature, cb_config_name);
276  return 0;
277  default:
278  break;
279  }
280  return 0;
281 }
Definition: cobc.h:139
Definition: cobc.h:141
int warningopt
Definition: cobc.c:176
Definition: cobc.h:135
#define _(s)
Definition: cobcrun.c:59
void cb_error(const char *fmt,...)
Definition: error.c:98
void cb_warning(const char *fmt,...)
Definition: error.c:87

Here is the call graph for this function:

Here is the caller graph for this function:

void cb_warning ( const char *  ,
  ... 
)

Definition at line 87 of file error.c.

References _, NULL, print_error(), and warningcount.

Referenced by begin_statement(), cb_build_assignment_name(), cb_emit_call(), cb_emit_read(), cb_validate_program_data(), cb_verify(), check_relaxed_syntax(), emit_conflicting_clause_message(), emit_duplicate_clause_message(), emit_entry(), expr_reduce(), ppp_compare_vals(), ppparse(), read_literal(), warning_destination(), yylex(), and yyparse().

88 {
89  va_list ap;
90 
91  va_start (ap, fmt);
92  print_error (NULL, 0, _("Warning: "), fmt, ap);
93  va_end (ap);
94  warningcount++;
95 }
int warningcount
Definition: cobc.c:174
#define _(s)
Definition: cobcrun.c:59
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 void print_error(const char *file, int line, const char *prefix, const char *fmt, va_list ap)
Definition: error.c:46

Here is the call graph for this function:

Here is the caller graph for this function:

void cob_gen_optim ( const enum  cb_optim)

Definition at line 48 of file codeoptim.c.

References _, COB_ADD_ALIGN_S16, COB_ADD_ALIGN_S32, COB_ADD_ALIGN_S64, COB_ADD_ALIGN_U16, COB_ADD_ALIGN_U32, COB_ADD_ALIGN_U64, COB_ADD_PACKED_INT, COB_ADD_S16, COB_ADD_S24, COB_ADD_S32, COB_ADD_S40, COB_ADD_S48, COB_ADD_S56, COB_ADD_S64, COB_ADD_S8, COB_ADD_U16, COB_ADD_U24, COB_ADD_U32, COB_ADD_U40, COB_ADD_U48, COB_ADD_U56, COB_ADD_U64, COB_ADD_U8, COB_ADDSWP_S16, COB_ADDSWP_S24, COB_ADDSWP_S32, COB_ADDSWP_S40, COB_ADDSWP_S48, COB_ADDSWP_S56, COB_ADDSWP_S64, COB_ADDSWP_U16, COB_ADDSWP_U24, COB_ADDSWP_U32, COB_ADDSWP_U40, COB_ADDSWP_U48, COB_ADDSWP_U56, COB_ADDSWP_U64, COB_CMP_ALIGN_S16, COB_CMP_ALIGN_S32, COB_CMP_ALIGN_S64, COB_CMP_ALIGN_U16, COB_CMP_ALIGN_U32, COB_CMP_ALIGN_U64, COB_CMP_PACKED_INT, COB_CMP_S16, COB_CMP_S24, COB_CMP_S32, COB_CMP_S40, COB_CMP_S48, COB_CMP_S56, COB_CMP_S64, COB_CMP_S8, COB_CMP_U16, COB_CMP_U24, COB_CMP_U32, COB_CMP_U40, COB_CMP_U48, COB_CMP_U56, COB_CMP_U64, COB_CMP_U8, COB_CMPSWP_ALIGN_S16, COB_CMPSWP_ALIGN_S32, COB_CMPSWP_ALIGN_S64, COB_CMPSWP_ALIGN_U16, COB_CMPSWP_ALIGN_U32, COB_CMPSWP_ALIGN_U64, COB_CMPSWP_S16, COB_CMPSWP_S24, COB_CMPSWP_S32, COB_CMPSWP_S40, COB_CMPSWP_S48, COB_CMPSWP_S56, COB_CMPSWP_S64, COB_CMPSWP_U16, COB_CMPSWP_U24, COB_CMPSWP_U32, COB_CMPSWP_U40, COB_CMPSWP_U48, COB_CMPSWP_U56, COB_CMPSWP_U64, COB_GET_NUMDISP, COB_GET_PACKED_INT, COB_POINTER_MANIP, COB_SET_SCREEN, COB_SETSWP_S16, COB_SETSWP_S24, COB_SETSWP_S32, COB_SETSWP_S40, COB_SETSWP_S48, COB_SETSWP_S56, COB_SETSWP_S64, COB_SETSWP_U16, COB_SETSWP_U24, COB_SETSWP_U32, COB_SETSWP_U40, COB_SETSWP_U48, COB_SETSWP_U56, COB_SETSWP_U64, COB_SUB_ALIGN_S16, COB_SUB_ALIGN_S32, COB_SUB_ALIGN_S64, COB_SUB_ALIGN_U16, COB_SUB_ALIGN_U32, COB_SUB_ALIGN_U64, COB_SUB_S16, COB_SUB_S24, COB_SUB_S32, COB_SUB_S40, COB_SUB_S48, COB_SUB_S56, COB_SUB_S64, COB_SUB_S8, COB_SUB_U16, COB_SUB_U24, COB_SUB_U32, COB_SUB_U40, COB_SUB_U48, COB_SUB_U56, COB_SUB_U64, COB_SUB_U8, COB_SUBSWP_S16, COB_SUBSWP_S24, COB_SUBSWP_S32, COB_SUBSWP_S40, COB_SUBSWP_S48, COB_SUBSWP_S56, COB_SUBSWP_S64, COB_SUBSWP_U16, COB_SUBSWP_U24, COB_SUBSWP_U32, COB_SUBSWP_U40, COB_SUBSWP_U48, COB_SUBSWP_U56, COB_SUBSWP_U64, COBC_ABORT, cobc_abort_pr(), and output_storage().

Referenced by codegen().

49 {
50  switch (val) {
51 
52  case COB_SET_SCREEN:
53  output_storage ("static void COB_NOINLINE");
54  output_storage ("cob_set_screen (cob_screen *s, cob_screen *next,");
55  output_storage (" cob_screen *prev, cob_screen *child, cob_screen *parent,");
56  output_storage (" cob_field *field, cob_field *value,");
57  output_storage (" cob_field *line, cob_field *column,");
58  output_storage (" cob_field *foreg, cob_field *backg, cob_field *prompt,");
59  output_storage (" const int type, const int occurs, const int attr)");
60  output_storage ("{");
61  output_storage (" s->next = next;");
62  output_storage (" s->prev = prev;");
63  output_storage (" s->child = child;");
64  output_storage (" s->parent = parent;");
65  output_storage (" s->field = field;");
66  output_storage (" s->value = value;");
67  output_storage (" s->line = line;");
68  output_storage (" s->column = column;");
69  output_storage (" s->foreg = foreg;");
70  output_storage (" s->backg = backg;");
71  output_storage (" s->prompt = prompt;");
72  output_storage (" s->type = type;");
73  output_storage (" s->occurs = occurs;");
74  output_storage (" s->attr = attr;");
75  output_storage ("}");
76  return;
77 
78  case COB_POINTER_MANIP:
79  output_storage ("static void COB_NOINLINE");
80  output_storage ("cob_pointer_manip (cob_field *f1, cob_field *f2, const unsigned int addsub)");
81  output_storage ("{");
82  output_storage (" unsigned char *tmptr;");
83  output_storage (" memcpy (&tmptr, f1->data, sizeof(void *));");
84  output_storage (" if (addsub) {");
85  output_storage (" tmptr -= cob_get_int (f2);");
86  output_storage (" } else {");
87  output_storage (" tmptr += cob_get_int (f2);");
88  output_storage (" }");
89  output_storage (" memcpy (f1->data, &tmptr, sizeof(void *));");
90  output_storage ("}");
91  return;
92 
93  case COB_GET_NUMDISP:
94  output_storage ("static int COB_NOINLINE");
95  output_storage ("cob_get_numdisp (const void *data, const size_t size)");
96  output_storage ("{");
97  output_storage (" const unsigned char *p;");
98  output_storage (" size_t n;");
99  output_storage (" int retval;");
100 
101  output_storage (" p = (const unsigned char *)data;");
102  output_storage (" retval = 0;");
103  output_storage (" for (n = 0; n < size; ++n, ++p) {");
104  output_storage (" retval *= 10;");
105  output_storage (" retval += (*p & 0x0F);");
106  output_storage (" }");
107  output_storage (" return retval;");
108  output_storage ("}");
109  return;
110 
111  case COB_CMP_PACKED_INT:
112  output_storage ("static int COB_NOINLINE");
113  output_storage ("cob_cmp_packed_int (const cob_field *f, const cob_s64_t n)");
114  output_storage ("{");
115  output_storage (" unsigned char *p;");
116  output_storage (" size_t size;");
117  output_storage (" cob_s64_t val;");
118 
119  output_storage (" val = 0;");
120  output_storage (" p = f->data;");
121  output_storage (" for (size = 0; size < f->size - 1; ++size, ++p) {");
122  output_storage (" val *= 10;");
123  output_storage (" val += *p >> 4;");
124  output_storage (" val *= 10;");
125  output_storage (" val += *p & 0x0f;");
126  output_storage (" }");
127  output_storage (" val *= 10;");
128  output_storage (" val += *p >> 4;");
129  output_storage (" if ((*p & 0x0f) == 0x0d) {");
130  output_storage (" val = -val;");
131  output_storage (" }");
132  output_storage (" return (val < n) ? -1 : (val > n);");
133  output_storage ("}");
134  return;
135 
136  case COB_GET_PACKED_INT:
137  output_storage ("static int COB_NOINLINE");
138  output_storage ("cob_get_packed_int (const cob_field *f)");
139  output_storage ("{");
140  output_storage (" unsigned char *p;");
141  output_storage (" size_t size;");
142  output_storage (" int val = 0;");
143 
144  output_storage (" p = f->data;");
145  output_storage (" for (size = 0; size < f->size - 1; ++size, ++p) {");
146  output_storage (" val *= 10;");
147  output_storage (" val += *p >> 4;");
148  output_storage (" val *= 10;");
149  output_storage (" val += *p & 0x0f;");
150  output_storage (" }");
151  output_storage (" val *= 10;");
152  output_storage (" val += *p >> 4;");
153  output_storage (" if ((*p & 0x0f) == 0x0d) {");
154  output_storage (" val = -val;");
155  output_storage (" }");
156  output_storage (" return val;");
157  output_storage ("}");
158  return;
159 
160  case COB_ADD_PACKED_INT:
161  output_storage ("static int COB_NOINLINE");
162  output_storage ("cob_add_packed_int (cob_field *f, const int val)");
163  output_storage ("{");
164  output_storage (" unsigned char *p;");
165  output_storage (" size_t size;");
166  output_storage (" int carry = 0;");
167  output_storage (" int n;");
168  output_storage (" int inc;");
169 
170  output_storage (" if (val == 0) {");
171  output_storage (" return 0;");
172  output_storage (" }");
173  output_storage (" p = f->data + f->size - 1;");
174  output_storage (" if ((*p & 0x0f) == 0x0d) {");
175  output_storage (" if (val > 0) {");
176  output_storage (" return cob_add_int (f, val, 0);");
177  output_storage (" }");
178  output_storage (" n = -val;");
179  output_storage (" } else {");
180  output_storage (" if (val < 0) {");
181  output_storage (" return cob_add_int (f, val, 0);");
182  output_storage (" }");
183  output_storage (" n = val;");
184  output_storage (" }");
185  output_storage (" inc = (*p >> 4) + (n %% 10);");
186  output_storage (" n /= 10;");
187  output_storage (" carry = inc / 10;");
188  output_storage (" *p = ((inc %% 10) << 4) | (*p & 0x0f);");
189  output_storage (" p--;");
190 
191  output_storage (" for (size = 0; size < f->size - 1; ++size, --p) {");
192  output_storage (" if (!carry && !n) {");
193  output_storage (" break;");
194  output_storage (" }");
195  output_storage (" inc = ((*p >> 4) * 10) + (*p & 0x0f) + carry + (n %% 100);");
196  output_storage (" carry = inc / 100;");
197  output_storage (" n /= 100;");
198  output_storage (" inc %%= 100;");
199  output_storage (" *p = ((inc / 10) << 4) | (inc %% 10);");
200  output_storage (" }");
201  output_storage (" return 0;");
202  output_storage ("}");
203  return;
204 
205  /* Aligned variants */
206 
207  /* Aligned compares */
208 
209  case COB_CMP_ALIGN_U16:
210  output_storage ("static COB_INLINE COB_A_INLINE int");
211  output_storage ("cob_cmp_align_u16 (const void *p, const cob_s64_t n)");
212  output_storage ("{");
213  output_storage (" unsigned short val;");
214 
215  output_storage (" if (unlikely(n < 0)) {");
216  output_storage (" return 1;");
217  output_storage (" }");
218  output_storage (" val = *(unsigned short __unaligned *)p;");
219  output_storage (" return (val < n) ? -1 : (val > n);");
220  output_storage ("}");
221  return;
222 
223  case COB_CMP_ALIGN_S16:
224  output_storage ("static COB_INLINE COB_A_INLINE int");
225  output_storage ("cob_cmp_align_s16 (const void *p, const cob_s64_t n)");
226  output_storage ("{");
227  output_storage (" short val;");
228 
229  output_storage (" val = *(short __unaligned *)p;");
230  output_storage (" return (val < n) ? -1 : (val > n);");
231  output_storage ("}");
232  return;
233 
234  case COB_CMP_ALIGN_U32:
235  output_storage ("static COB_INLINE COB_A_INLINE int");
236  output_storage ("cob_cmp_align_u32 (const void *p, const cob_s64_t n)");
237  output_storage ("{");
238  output_storage (" unsigned int val;");
239 
240  output_storage (" if (unlikely(n < 0)) {");
241  output_storage (" return 1;");
242  output_storage (" }");
243  output_storage (" val = *(unsigned int __unaligned *)p;");
244  output_storage (" return (val < n) ? -1 : (val > n);");
245  output_storage ("}");
246  return;
247 
248  case COB_CMP_ALIGN_S32:
249  output_storage ("static COB_INLINE COB_A_INLINE int");
250  output_storage ("cob_cmp_align_s32 (const void *p, const cob_s64_t n)");
251  output_storage ("{");
252  output_storage (" int val;");
253 
254  output_storage (" val = *(int __unaligned *)p;");
255  output_storage (" return (val < n) ? -1 : (val > n);");
256  output_storage ("}");
257  return;
258 
259  case COB_CMP_ALIGN_U64:
260  output_storage ("static COB_INLINE COB_A_INLINE int");
261  output_storage ("cob_cmp_align_u64 (const void *p, const cob_s64_t n)");
262  output_storage ("{");
263  output_storage (" cob_u64_t val;");
264 
265  output_storage (" if (unlikely(n < 0)) {");
266  output_storage (" return 1;");
267  output_storage (" }");
268  output_storage (" val = *(cob_u64_t __unaligned *)p;");
269  output_storage (" return (val < n) ? -1 : (val > n);");
270  output_storage ("}");
271  return;
272 
273  case COB_CMP_ALIGN_S64:
274  output_storage ("static COB_INLINE COB_A_INLINE int");
275  output_storage ("cob_cmp_align_s64 (const void *p, const cob_s64_t n)");
276  output_storage ("{");
277  output_storage (" cob_s64_t val;");
278 
279  output_storage (" val = *(cob_s64_t __unaligned *)p;");
280  output_storage (" return (val < n) ? -1 : (val > n);");
281  output_storage ("}");
282  return;
283 
284  /* Aligned adds */
285 
286  case COB_ADD_ALIGN_U16:
287  output_storage ("static COB_INLINE COB_A_INLINE void");
288  output_storage ("cob_add_align_u16 (void *p, const int val)");
289  output_storage ("{");
290  output_storage (" *(unsigned short __unaligned *)p += val;");
291  output_storage ("}");
292  return;
293 
294  case COB_ADD_ALIGN_S16:
295  output_storage ("static COB_INLINE COB_A_INLINE void");
296  output_storage ("cob_add_align_s16 (void *p, const int val)");
297  output_storage ("{");
298  output_storage (" *(short __unaligned *)p += val;");
299  output_storage ("}");
300  return;
301 
302  case COB_ADD_ALIGN_U32:
303  output_storage ("static COB_INLINE COB_A_INLINE void");
304  output_storage ("cob_add_align_u32 (void *p, const int val)");
305  output_storage ("{");
306  output_storage (" *(unsigned int __unaligned *)p += val;");
307  output_storage ("}");
308  return;
309 
310  case COB_ADD_ALIGN_S32:
311  output_storage ("static COB_INLINE COB_A_INLINE void");
312  output_storage ("cob_add_align_s32 (void *p, const int val)");
313  output_storage ("{");
314  output_storage (" *(int __unaligned *)p += val;");
315  output_storage ("}");
316  return;
317 
318  case COB_ADD_ALIGN_U64:
319  output_storage ("static COB_INLINE COB_A_INLINE void");
320  output_storage ("cob_add_align_u64 (void *p, const int val)");
321  output_storage ("{");
322  output_storage (" *(cob_u64_t __unaligned *)p += val;");
323  output_storage ("}");
324  return;
325 
326  case COB_ADD_ALIGN_S64:
327  output_storage ("static COB_INLINE COB_A_INLINE void");
328  output_storage ("cob_add_align_s64 (void *p, const int val)");
329  output_storage ("{");
330  output_storage (" *(cob_s64_t __unaligned *)p += val;");
331  output_storage ("}");
332  return;
333 
334  /* Aligned subtracts */
335 
336  case COB_SUB_ALIGN_U16:
337  output_storage ("static COB_INLINE COB_A_INLINE void");
338  output_storage ("cob_sub_align_u16 (void *p, const int val)");
339  output_storage ("{");
340  output_storage (" *(unsigned short __unaligned *)p -= val;");
341  output_storage ("}");
342  return;
343 
344  case COB_SUB_ALIGN_S16:
345  output_storage ("static COB_INLINE COB_A_INLINE void");
346  output_storage ("cob_sub_align_s16 (void *p, const int val)");
347  output_storage ("{");
348  output_storage (" *(short __unaligned *)p -= val;");
349  output_storage ("}");
350  return;
351 
352  case COB_SUB_ALIGN_U32:
353  output_storage ("static COB_INLINE COB_A_INLINE void");
354  output_storage ("cob_sub_align_u32 (void *p, const int val)");
355  output_storage ("{");
356  output_storage (" *(unsigned int __unaligned *)p -= val;");
357  output_storage ("}");
358  return;
359 
360  case COB_SUB_ALIGN_S32:
361  output_storage ("static COB_INLINE COB_A_INLINE void");
362  output_storage ("cob_sub_align_s32 (void *p, const int val)");
363  output_storage ("{");
364  output_storage (" *(int __unaligned *)p -= val;");
365  output_storage ("}");
366  return;
367 
368  case COB_SUB_ALIGN_U64:
369  output_storage ("static COB_INLINE COB_A_INLINE void");
370  output_storage ("cob_sub_align_u64 (void *p, const int val)");
371  output_storage ("{");
372  output_storage (" *(cob_u64_t __unaligned *)p -= val;");
373  output_storage ("}");
374  return;
375 
376  case COB_SUB_ALIGN_S64:
377  output_storage ("static COB_INLINE COB_A_INLINE void");
378  output_storage ("cob_sub_align_s64 (void *p, const int val)");
379  output_storage ("{");
380  output_storage (" *(cob_s64_t __unaligned *)p -= val;");
381  output_storage ("}");
382  return;
383 
385  output_storage ("static COB_INLINE COB_A_INLINE int");
386  output_storage ("cob_cmpswp_align_u16 (const void *p, const cob_s64_t n)");
387  output_storage ("{");
388  output_storage (" unsigned short val;");
389 
390  output_storage (" if (unlikely(n < 0)) {");
391  output_storage (" return 1;");
392  output_storage (" }");
393  output_storage (" val = COB_BSWAP_16 (*(unsigned short __unaligned *)p);");
394  output_storage (" return (val < n) ? -1 : (val > n);");
395  output_storage ("}");
396  return;
397 
399  output_storage ("static COB_INLINE COB_A_INLINE int");
400  output_storage ("cob_cmpswp_align_s16 (const void *p, const cob_s64_t n)");
401  output_storage ("{");
402  output_storage (" short val;");
403 
404  output_storage (" val = COB_BSWAP_16 (*(short __unaligned *)p);");
405  output_storage (" return (val < n) ? -1 : (val > n);");
406  output_storage ("}");
407  return;
408 
410  output_storage ("static COB_INLINE COB_A_INLINE int");
411  output_storage ("cob_cmpswp_align_u32 (const void *p, const cob_s64_t n)");
412  output_storage ("{");
413  output_storage (" unsigned int val;");
414 
415  output_storage (" if (unlikely(n < 0)) {");
416  output_storage (" return 1;");
417  output_storage (" }");
418  output_storage (" val = COB_BSWAP_32 (*(unsigned int __unaligned *)p);");
419  output_storage (" return (val < n) ? -1 : (val > n);");
420  output_storage ("}");
421  return;
422 
424  output_storage ("static COB_INLINE COB_A_INLINE int");
425  output_storage ("cob_cmpswp_align_s32 (const void *p, const cob_s64_t n)");
426  output_storage ("{");
427  output_storage (" int val;");
428 
429  output_storage (" val = COB_BSWAP_32 (*(int __unaligned *)p);");
430  output_storage (" return (val < n) ? -1 : (val > n);");
431  output_storage ("}");
432  return;
433 
435  output_storage ("static COB_INLINE COB_A_INLINE int");
436  output_storage ("cob_cmpswp_align_u64 (const void *p, const cob_s64_t n)");
437  output_storage ("{");
438  output_storage (" cob_u64_t val;");
439 
440  output_storage (" if (unlikely(n < 0)) {");
441  output_storage (" return 1;");
442  output_storage (" }");
443  output_storage (" val = COB_BSWAP_64 (*(cob_u64_t __unaligned *)p);");
444  output_storage (" return (val < n) ? -1 : (val > n);");
445  output_storage ("}");
446  return;
447 
449  output_storage ("static COB_INLINE COB_A_INLINE int");
450  output_storage ("cob_cmpswp_align_s64 (const void *p, const cob_s64_t n)");
451  output_storage ("{");
452  output_storage (" cob_s64_t val;");
453 
454  output_storage (" val = COB_BSWAP_64 (*(cob_s64_t __unaligned *)p);");
455  output_storage (" return (val < n) ? -1 : (val > n);");
456  output_storage ("}");
457  return;
458 
459  /* Binary compare */
460 
461  case COB_CMP_U8:
462  output_storage ("static COB_INLINE COB_A_INLINE int");
463  output_storage ("cob_cmp_u8 (const void *p, const cob_s64_t n)");
464  output_storage ("{");
465  output_storage (" if (unlikely(n < 0)) {");
466  output_storage (" return 1;");
467  output_storage (" }");
468  output_storage (" return (*(const unsigned char *)p < n) ? -1 : (*(const unsigned char *)p > n);");
469  output_storage ("}");
470  return;
471 
472  case COB_CMP_S8:
473  output_storage ("static COB_INLINE COB_A_INLINE int");
474  output_storage ("cob_cmp_s8 (const void *p, const cob_s64_t n)");
475  output_storage ("{");
476  output_storage (" return (*(const signed char *)p < n) ? -1 : (*(const signed char *)p > n);");
477  output_storage ("}");
478  return;
479 
480  case COB_CMP_U16:
481  output_storage ("static COB_INLINE COB_A_INLINE int");
482  output_storage ("cob_cmp_u16 (const void *p, const cob_s64_t n)");
483  output_storage ("{");
484 #ifndef COB_ALLOW_UNALIGNED
485  output_storage (" void *x;");
486 #endif
487  output_storage (" unsigned short val;");
488 
489  output_storage (" if (unlikely(n < 0)) {");
490  output_storage (" return 1;");
491  output_storage (" }");
492 #ifdef COB_ALLOW_UNALIGNED
493  output_storage (" val = *(const unsigned short __unaligned *)p;");
494 #else
495  output_storage (" x = &val;");
496  output_storage (" optim_memcpy (x, p, 2);");
497 #endif
498  output_storage (" return (val < n) ? -1 : (val > n);");
499  output_storage ("}");
500  return;
501 
502  case COB_CMP_S16:
503  output_storage ("static COB_INLINE COB_A_INLINE int");
504  output_storage ("cob_cmp_s16 (const void *p, const cob_s64_t n)");
505  output_storage ("{");
506  output_storage (" short val;");
507 
508 #ifdef COB_ALLOW_UNALIGNED
509  output_storage (" val = *(const short __unaligned *)p;");
510 #else
511  output_storage (" void *x;");
512 
513  output_storage (" x = &val;");
514  output_storage (" optim_memcpy (x, p, 2);");
515 #endif
516  output_storage (" return (val < n) ? -1 : (val > n);");
517  output_storage ("}");
518  return;
519 
520  case COB_CMP_U24:
521  output_storage ("static COB_INLINE COB_A_INLINE int");
522  output_storage ("cob_cmp_u24 (const void *p, const cob_s64_t n)");
523  output_storage ("{");
524  output_storage (" unsigned char *x;");
525  output_storage (" unsigned int val = 0;");
526 
527  output_storage (" if (unlikely(n < 0)) {");
528  output_storage (" return 1;");
529  output_storage (" }");
530 #ifdef WORDS_BIGENDIAN
531  output_storage (" x = ((unsigned char *)&val) + 1;");
532 #else
533  output_storage (" x = (unsigned char *)&val;");
534 #endif
535  output_storage (" optim_memcpy (x, p, 3);");
536  output_storage (" return (val < n) ? -1 : (val > n);");
537  output_storage ("}");
538  return;
539 
540  case COB_CMP_S24:
541  output_storage ("static COB_INLINE COB_A_INLINE int");
542  output_storage ("cob_cmp_s24 (const void *p, const cob_s64_t n)");
543  output_storage ("{");
544  output_storage (" unsigned char *x;");
545  output_storage (" int val = 0;");
546 
547 #ifdef WORDS_BIGENDIAN
548  output_storage (" x = (unsigned char *)&val;");
549 #else
550  output_storage (" x = ((unsigned char *)&val) + 1;");
551 #endif
552  output_storage (" optim_memcpy (x, p, 3);");
553  output_storage (" val >>= 8; /* Shift with sign */");
554  output_storage (" return (val < n) ? -1 : (val > n);");
555  output_storage ("}");
556  return;
557 
558  case COB_CMP_U32:
559  output_storage ("static COB_INLINE COB_A_INLINE int");
560  output_storage ("cob_cmp_u32 (const void *p, const cob_s64_t n)");
561  output_storage ("{");
562 #ifndef COB_ALLOW_UNALIGNED
563  output_storage (" void *x;");
564 #endif
565  output_storage (" unsigned int val;");
566 
567  output_storage (" if (unlikely(n < 0)) {");
568  output_storage (" return 1;");
569  output_storage (" }");
570 #ifdef COB_ALLOW_UNALIGNED
571  output_storage (" val = *(const unsigned int __unaligned *)p;");
572 #else
573  output_storage (" x = &val;");
574  output_storage (" optim_memcpy (x, p, 4);");
575 #endif
576  output_storage (" return (val < n) ? -1 : (val > n);");
577  output_storage ("}");
578  return;
579 
580  case COB_CMP_S32:
581  output_storage ("static COB_INLINE COB_A_INLINE int");
582  output_storage ("cob_cmp_s32 (const void *p, const cob_s64_t n)");
583  output_storage ("{");
584  output_storage (" int val;");
585 
586 #ifdef COB_ALLOW_UNALIGNED
587  output_storage (" val = *(const int __unaligned *)p;");
588 #else
589  output_storage (" void *x;");
590 
591  output_storage (" x = &val;");
592  output_storage (" optim_memcpy (x, p, 4);");
593 #endif
594  output_storage (" return (val < n) ? -1 : (val > n);");
595  output_storage ("}");
596  return;
597 
598  case COB_CMP_U40:
599  output_storage ("static COB_INLINE COB_A_INLINE int");
600  output_storage ("cob_cmp_u40 (const void *p, const cob_s64_t n)");
601  output_storage ("{");
602  output_storage (" cob_u64_t val = 0;");
603  output_storage (" unsigned char *x;");
604 
605  output_storage (" if (unlikely(n < 0)) {");
606  output_storage (" return 1;");
607  output_storage (" }");
608 #ifdef WORDS_BIGENDIAN
609  output_storage (" x = ((unsigned char *)&val) + 3;");
610 #else
611  output_storage (" x = (unsigned char *)&val;");
612 #endif
613  output_storage (" optim_memcpy (x, p, 5);");
614  output_storage (" return (val < n) ? -1 : (val > n);");
615  output_storage ("}");
616  return;
617 
618  case COB_CMP_S40:
619  output_storage ("static COB_INLINE COB_A_INLINE int");
620  output_storage ("cob_cmp_s40 (const void *p, const cob_s64_t n)");
621  output_storage ("{");
622  output_storage (" cob_s64_t val = 0;");
623  output_storage (" unsigned char *x;");
624 
625 #ifdef WORDS_BIGENDIAN
626  output_storage (" x = (unsigned char *)&val;");
627 #else
628  output_storage (" x = ((unsigned char *)&val) + 3;");
629 #endif
630  output_storage (" optim_memcpy (x, p, 5);");
631  output_storage (" val >>= 24; /* Shift with sign */");
632  output_storage (" return (val < n) ? -1 : (val > n);");
633  output_storage ("}");
634  return;
635 
636  case COB_CMP_U48:
637  output_storage ("static COB_INLINE COB_A_INLINE int");
638  output_storage ("cob_cmp_u48 (const void *p, const cob_s64_t n)");
639  output_storage ("{");
640  output_storage (" cob_u64_t val = 0;");
641  output_storage (" unsigned char *x;");
642 
643  output_storage (" if (unlikely(n < 0)) {");
644  output_storage (" return 1;");
645  output_storage (" }");
646 #ifdef WORDS_BIGENDIAN
647  output_storage (" x = ((unsigned char *)&val) + 2;");
648 #else
649  output_storage (" x = (unsigned char *)&val;");
650 #endif
651  output_storage (" optim_memcpy (x, p, 6);");
652  output_storage (" return (val < n) ? -1 : (val > n);");
653  output_storage ("}");
654  return;
655 
656  case COB_CMP_S48:
657  output_storage ("static COB_INLINE COB_A_INLINE int");
658  output_storage ("cob_cmp_s48 (const void *p, const cob_s64_t n)");
659  output_storage ("{");
660  output_storage (" cob_s64_t val = 0;");
661  output_storage (" unsigned char *x;");
662 
663 #ifdef WORDS_BIGENDIAN
664  output_storage (" x = (unsigned char *)&val;");
665 #else
666  output_storage (" x = ((unsigned char *)&val) + 2;");
667 #endif
668  output_storage (" optim_memcpy (x, p, 6);");
669  output_storage (" val >>= 16; /* Shift with sign */");
670  output_storage (" return (val < n) ? -1 : (val > n);");
671  output_storage ("}");
672  return;
673 
674  case COB_CMP_U56:
675  output_storage ("static COB_INLINE COB_A_INLINE int");
676  output_storage ("cob_cmp_u56 (const void *p, const cob_s64_t n)");
677  output_storage ("{");
678  output_storage (" cob_u64_t val = 0;");
679  output_storage (" unsigned char *x;");
680 
681  output_storage (" if (unlikely(n < 0)) {");
682  output_storage (" return 1;");
683  output_storage (" }");
684 #ifdef WORDS_BIGENDIAN
685  output_storage (" x = ((unsigned char *)&val) + 1;");
686 #else
687  output_storage (" x = (unsigned char *)&val;");
688 #endif
689  output_storage (" optim_memcpy (x, p, 7);");
690  output_storage (" return (val < n) ? -1 : (val > n);");
691  output_storage ("}");
692  return;
693 
694  case COB_CMP_S56:
695  output_storage ("static COB_INLINE COB_A_INLINE int");
696  output_storage ("cob_cmp_s56 (const void *p, const cob_s64_t n)");
697  output_storage ("{");
698  output_storage (" cob_s64_t val = 0;");
699  output_storage (" unsigned char *x;");
700 
701 #ifdef WORDS_BIGENDIAN
702  output_storage (" x = (unsigned char *)&val;");
703 #else
704  output_storage (" x = ((unsigned char *)&val) + 1;");
705 #endif
706  output_storage (" optim_memcpy (x, p, 7);");
707  output_storage (" val >>= 8; /* Shift with sign */");
708  output_storage (" return (val < n) ? -1 : (val > n);");
709  output_storage ("}");
710  return;
711 
712  case COB_CMP_U64:
713  output_storage ("static COB_INLINE COB_A_INLINE int");
714  output_storage ("cob_cmp_u64 (const void *p, const cob_s64_t n)");
715  output_storage ("{");
716 #ifndef COB_ALLOW_UNALIGNED
717  output_storage (" void *x;");
718 #endif
719  output_storage (" cob_u64_t val;");
720 
721  output_storage (" if (unlikely(n < 0)) {");
722  output_storage (" return 1;");
723  output_storage (" }");
724 #ifdef COB_ALLOW_UNALIGNED
725  output_storage (" val = *(const cob_u64_t __unaligned *)p;");
726 #else
727  output_storage (" x = &val;");
728  output_storage (" optim_memcpy (x, p, 8);");
729 #endif
730  output_storage (" return (val < n) ? -1 : (val > n);");
731  output_storage ("}");
732  return;
733 
734  case COB_CMP_S64:
735  output_storage ("static COB_INLINE COB_A_INLINE int");
736  output_storage ("cob_cmp_s64 (const void *p, const cob_s64_t n)");
737  output_storage ("{");
738  output_storage (" cob_s64_t val;");
739 
740 #ifdef COB_ALLOW_UNALIGNED
741  output_storage (" val = *(const cob_s64_t __unaligned *)p;");
742 #else
743  output_storage (" void *x;");
744 
745  output_storage (" x = &val;");
746  output_storage (" optim_memcpy (x, p, 8);");
747 #endif
748  output_storage (" return (val < n) ? -1 : (val > n);");
749  output_storage ("}");
750  return;
751 
752  /* Add/Subtract */
753 
754  case COB_ADD_U8:
755  output_storage ("static COB_INLINE COB_A_INLINE void");
756  output_storage ("cob_add_u8 (void *p, const int val)");
757  output_storage ("{");
758  output_storage (" *(unsigned char *)p += val;");
759  output_storage ("}");
760  return;
761 
762  case COB_ADD_S8:
763  output_storage ("static COB_INLINE COB_A_INLINE void");
764  output_storage ("cob_add_s8 (void *p, const int val)");
765  output_storage ("{");
766  output_storage (" *(signed char *)p += val;");
767  output_storage ("}");
768  return;
769 
770  case COB_ADD_U16:
771  output_storage ("static COB_INLINE COB_A_INLINE void");
772  output_storage ("cob_add_u16 (void *p, const int val)");
773  output_storage ("{");
774 #ifdef COB_ALLOW_UNALIGNED
775  output_storage (" *(unsigned short __unaligned *)p += val;");
776 #else
777  output_storage (" void *x;");
778  output_storage (" unsigned short n;");
779 
780  output_storage (" x = &n;");
781  output_storage (" optim_memcpy (x, p, 2);");
782  output_storage (" n += val;");
783  output_storage (" optim_memcpy (p, x, 2);");
784 #endif
785  output_storage ("}");
786  return;
787 
788  case COB_ADD_S16:
789  output_storage ("static COB_INLINE COB_A_INLINE void");
790  output_storage ("cob_add_s16 (void *p, const int val)");
791  output_storage ("{");
792 #ifdef COB_ALLOW_UNALIGNED
793  output_storage (" *(short __unaligned *)p += val;");
794 #else
795  output_storage (" void *x;");
796  output_storage (" short n;");
797 
798  output_storage (" x = &n;");
799  output_storage (" optim_memcpy (x, p, 2);");
800  output_storage (" n += val;");
801  output_storage (" optim_memcpy (p, x, 2);");
802 #endif
803  output_storage ("}");
804  return;
805 
806  case COB_ADD_U24:
807  output_storage ("static COB_INLINE COB_A_INLINE void");
808  output_storage ("cob_add_u24 (void *p, const int val)");
809  output_storage ("{");
810  output_storage (" unsigned char *x;");
811  output_storage (" unsigned int n = 0;");
812 
813 #ifdef WORDS_BIGENDIAN
814  output_storage (" x = ((unsigned char *)&n) + 1;");
815 #else
816  output_storage (" x = (unsigned char *)&n;");
817 #endif
818  output_storage (" optim_memcpy (x, p, 3);");
819  output_storage (" n += val;");
820  output_storage (" optim_memcpy (p, x, 3);");
821  output_storage ("}");
822  return;
823 
824  case COB_ADD_S24:
825  output_storage ("static COB_INLINE COB_A_INLINE void");
826  output_storage ("cob_add_s24 (void *p, const int val)");
827  output_storage ("{");
828  output_storage (" unsigned char *x;");
829  output_storage (" int n = 0;");
830 
831 #ifdef WORDS_BIGENDIAN
832  output_storage (" x = (unsigned char *)&n;");
833 #else
834  output_storage (" x = ((unsigned char *)&n) + 1;");
835 #endif
836  output_storage (" optim_memcpy (x, p, 3);");
837  output_storage (" n >>= 8; /* Shift with sign */");
838  output_storage (" n += val;");
839 #ifdef WORDS_BIGENDIAN
840  output_storage (" x = ((unsigned char *)&n) + 1;");
841 #else
842  output_storage (" x = (unsigned char *)&n;");
843 #endif
844  output_storage (" optim_memcpy (p, x, 3);");
845  output_storage ("}");
846  return;
847 
848  case COB_ADD_U32:
849  output_storage ("static COB_INLINE COB_A_INLINE void");
850  output_storage ("cob_add_u32 (void *p, const int val)");
851  output_storage ("{");
852 #ifdef COB_ALLOW_UNALIGNED
853  output_storage (" *(unsigned int __unaligned *)p += val;");
854 #else
855  output_storage (" void *x;");
856  output_storage (" unsigned int n;");
857 
858  output_storage (" x = &n;");
859  output_storage (" optim_memcpy (x, p, 4);");
860  output_storage (" n += val;");
861  output_storage (" optim_memcpy (p, x, 4);");
862 #endif
863  output_storage ("}");
864  return;
865 
866  case COB_ADD_S32:
867  output_storage ("static COB_INLINE COB_A_INLINE void");
868  output_storage ("cob_add_s32 (void *p, const int val)");
869  output_storage ("{");
870 #ifdef COB_ALLOW_UNALIGNED
871  output_storage (" *(int __unaligned *)p += val;");
872 #else
873  output_storage (" void *x;");
874  output_storage (" int n;");
875 
876  output_storage (" x = &n;");
877  output_storage (" optim_memcpy (x, p, 4);");
878  output_storage (" n += val;");
879  output_storage (" optim_memcpy (p, x, 4);");
880 #endif
881  output_storage ("}");
882  return;
883 
884  case COB_ADD_U40:
885  output_storage ("static COB_INLINE COB_A_INLINE void");
886  output_storage ("cob_add_u40 (void *p, const int val)");
887  output_storage ("{");
888  output_storage (" cob_u64_t n = 0;");
889  output_storage (" unsigned char *x;");
890 
891 #ifdef WORDS_BIGENDIAN
892  output_storage (" x = ((unsigned char *)&n) + 3;");
893 #else
894  output_storage (" x = (unsigned char *)&n;");
895 #endif
896  output_storage (" optim_memcpy (x, p, 5);");
897  output_storage (" n += val;");
898  output_storage (" optim_memcpy (p, x, 5);");
899  output_storage ("}");
900  return;
901 
902  case COB_ADD_S40:
903  output_storage ("static COB_INLINE COB_A_INLINE void");
904  output_storage ("cob_add_s40 (void *p, const int val)");
905  output_storage ("{");
906  output_storage (" cob_s64_t n = 0;");
907  output_storage (" unsigned char *x;");
908 
909 #ifdef WORDS_BIGENDIAN
910  output_storage (" x = (unsigned char *)&n;");
911 #else
912  output_storage (" x = ((unsigned char *)&n) + 3;");
913 #endif
914  output_storage (" optim_memcpy (x, p, 5);");
915  output_storage (" n >>= 24; /* Shift with sign */");
916  output_storage (" n += val;");
917 #ifdef WORDS_BIGENDIAN
918  output_storage (" x = ((unsigned char *)&n) + 3;");
919 #else
920  output_storage (" x = (unsigned char *)&n;");
921 #endif
922  output_storage (" optim_memcpy (p, x, 5);");
923  output_storage ("}");
924  return;
925 
926  case COB_ADD_U48:
927  output_storage ("static COB_INLINE COB_A_INLINE void");
928  output_storage ("cob_add_u48 (void *p, const int val)");
929  output_storage ("{");
930  output_storage (" cob_u64_t n = 0;");
931  output_storage (" unsigned char *x;");
932 
933 #ifdef WORDS_BIGENDIAN
934  output_storage (" x = ((unsigned char *)&n) + 2;");
935 #else
936  output_storage (" x = (unsigned char *)&n;");
937 #endif
938  output_storage (" optim_memcpy (x, p, 6);");
939  output_storage (" n += val;");
940  output_storage (" optim_memcpy (p, x, 6);");
941  output_storage ("}");
942  return;
943 
944  case COB_ADD_S48:
945  output_storage ("static COB_INLINE COB_A_INLINE void");
946  output_storage ("cob_add_s48 (void *p, const int val)");
947  output_storage ("{");
948  output_storage (" cob_s64_t n = 0;");
949  output_storage (" unsigned char *x;");
950 
951 #ifdef WORDS_BIGENDIAN
952  output_storage (" x = (unsigned char *)&n;");
953 #else
954  output_storage (" x = ((unsigned char *)&n) + 2;");
955 #endif
956  output_storage (" optim_memcpy (x, p, 6);");
957  output_storage (" n >>= 16; /* Shift with sign */");
958  output_storage (" n += val;");
959 #ifdef WORDS_BIGENDIAN
960  output_storage (" x = ((unsigned char *)&n) + 2;");
961 #else
962  output_storage (" x = (unsigned char *)&n;");
963 #endif
964  output_storage (" optim_memcpy (p, x, 6);");
965  output_storage ("}");
966  return;
967 
968  case COB_ADD_U56:
969  output_storage ("static COB_INLINE COB_A_INLINE void");
970  output_storage ("cob_add_u56 (void *p, const int val)");
971  output_storage ("{");
972  output_storage (" cob_u64_t n = 0;");
973  output_storage (" unsigned char *x;");
974 
975 #ifdef WORDS_BIGENDIAN
976  output_storage (" x = ((unsigned char *)&n) + 1;");
977 #else
978  output_storage (" x = (unsigned char *)&n;");
979 #endif
980  output_storage (" optim_memcpy (x, p, 7);");
981  output_storage (" n += val;");
982  output_storage (" optim_memcpy (p, x, 7);");
983  output_storage ("}");
984  return;
985 
986  case COB_ADD_S56:
987  output_storage ("static COB_INLINE COB_A_INLINE void");
988  output_storage ("cob_add_s56 (void *p, const int val)");
989  output_storage ("{");
990  output_storage (" cob_s64_t n = 0;");
991  output_storage (" unsigned char *x;");
992 
993 #ifdef WORDS_BIGENDIAN
994  output_storage (" x = (unsigned char *)&n;");
995 #else
996  output_storage (" x = ((unsigned char *)&n) + 1;");
997 #endif
998  output_storage (" optim_memcpy (x, p, 7);");
999  output_storage (" n >>= 8; /* Shift with sign */");
1000  output_storage (" n += val;");
1001 #ifdef WORDS_BIGENDIAN
1002  output_storage (" x = ((unsigned char *)&n) + 1;");
1003 #else
1004  output_storage (" x = (unsigned char *)&n;");
1005 #endif
1006  output_storage (" optim_memcpy (p, x, 7);");
1007  output_storage ("}");
1008  return;
1009 
1010  case COB_ADD_U64:
1011  output_storage ("static COB_INLINE COB_A_INLINE void");
1012  output_storage ("cob_add_u64 (void *p, const int val)");
1013  output_storage ("{");
1014 #ifdef COB_ALLOW_UNALIGNED
1015  output_storage (" *(cob_u64_t __unaligned *)p += val;");
1016 #else
1017  output_storage (" void *x;");
1018  output_storage (" cob_u64_t n;");
1019 
1020  output_storage (" x = &n;");
1021  output_storage (" optim_memcpy (x, p, 8);");
1022  output_storage (" n += val;");
1023  output_storage (" optim_memcpy (p, x, 8);");
1024 #endif
1025  output_storage ("}");
1026  return;
1027 
1028  case COB_ADD_S64:
1029  output_storage ("static COB_INLINE COB_A_INLINE void");
1030  output_storage ("cob_add_s64 (void *p, const int val)");
1031  output_storage ("{");
1032 #ifdef COB_ALLOW_UNALIGNED
1033  output_storage (" *(cob_s64_t __unaligned *)p += val;");
1034 #else
1035  output_storage (" void *x;");
1036  output_storage (" cob_s64_t n;");
1037 
1038  output_storage (" x = &n;");
1039  output_storage (" optim_memcpy (x, p, 8);");
1040  output_storage (" n += val;");
1041  output_storage (" optim_memcpy (p, x, 8);");
1042 #endif
1043  output_storage ("}");
1044  return;
1045 
1046  case COB_SUB_U8:
1047  output_storage ("static COB_INLINE COB_A_INLINE void");
1048  output_storage ("cob_sub_u8 (void *p, const int val)");
1049  output_storage ("{");
1050  output_storage (" *(unsigned char *)p -= val;");
1051  output_storage ("}");
1052  return;
1053 
1054  case COB_SUB_S8:
1055  output_storage ("static COB_INLINE COB_A_INLINE void");
1056  output_storage ("cob_sub_s8 (void *p, const int val)");
1057  output_storage ("{");
1058  output_storage (" *(signed char *)p -= val;");
1059  output_storage ("}");
1060  return;
1061 
1062  case COB_SUB_U16:
1063  output_storage ("static COB_INLINE COB_A_INLINE void");
1064  output_storage ("cob_sub_u16 (void *p, const int val)");
1065  output_storage ("{");
1066 #ifdef COB_ALLOW_UNALIGNED
1067  output_storage (" *(unsigned short __unaligned *)p -= val;");
1068 #else
1069  output_storage (" void *x;");
1070  output_storage (" unsigned short n;");
1071 
1072  output_storage (" x = &n;");
1073  output_storage (" optim_memcpy (x, p, 2);");
1074  output_storage (" n -= val;");
1075  output_storage (" optim_memcpy (p, x, 2);");
1076 #endif
1077  output_storage ("}");
1078  return;
1079 
1080  case COB_SUB_S16:
1081  output_storage ("static COB_INLINE COB_A_INLINE void");
1082  output_storage ("cob_sub_s16 (void *p, const int val)");
1083  output_storage ("{");
1084 #ifdef COB_ALLOW_UNALIGNED
1085  output_storage (" *(short __unaligned *)p -= val;");
1086 #else
1087  output_storage (" void *x;");
1088  output_storage (" short n;");
1089 
1090  output_storage (" x = &n;");
1091  output_storage (" optim_memcpy (x, p, 2);");
1092  output_storage (" n -= val;");
1093  output_storage (" optim_memcpy (p, x, 2);");
1094 #endif
1095  output_storage ("}");
1096  return;
1097 
1098  case COB_SUB_U24:
1099  output_storage ("static COB_INLINE COB_A_INLINE void");
1100  output_storage ("cob_sub_u24 (void *p, const int val)");
1101  output_storage ("{");
1102  output_storage (" unsigned char *x;");
1103  output_storage (" unsigned int n = 0;");
1104 
1105 #ifdef WORDS_BIGENDIAN
1106  output_storage (" x = ((unsigned char *)&n) + 1;");
1107 #else
1108  output_storage (" x = (unsigned char *)&n;");
1109 #endif
1110  output_storage (" optim_memcpy (x, p, 3);");
1111  output_storage (" n -= val;");
1112  output_storage (" optim_memcpy (p, x, 3);");
1113  output_storage ("}");
1114  return;
1115 
1116  case COB_SUB_S24:
1117  output_storage ("static COB_INLINE COB_A_INLINE void");
1118  output_storage ("cob_sub_s24 (void *p, const int val)");
1119  output_storage ("{");
1120  output_storage (" unsigned char *x;");
1121  output_storage (" int n = 0;");
1122 
1123 #ifdef WORDS_BIGENDIAN
1124  output_storage (" x = (unsigned char *)&n;");
1125 #else
1126  output_storage (" x = ((unsigned char *)&n) + 1;");
1127 #endif
1128  output_storage (" optim_memcpy (x, p, 3);");
1129  output_storage (" n >>= 8; /* Shift with sign */");
1130  output_storage (" n -= val;");
1131 #ifdef WORDS_BIGENDIAN
1132  output_storage (" x = ((unsigned char *)&n) + 1;");
1133 #else
1134  output_storage (" x = (unsigned char *)&n;");
1135 #endif
1136  output_storage (" optim_memcpy (p, x, 3);");
1137  output_storage ("}");
1138  return;
1139 
1140  case COB_SUB_U32:
1141  output_storage ("static COB_INLINE COB_A_INLINE void");
1142  output_storage ("cob_sub_u32 (void *p, const int val)");
1143  output_storage ("{");
1144 #ifdef COB_ALLOW_UNALIGNED
1145  output_storage (" *(unsigned int __unaligned *)p -= val;");
1146 #else
1147  output_storage (" void *x;");
1148  output_storage (" unsigned int n;");
1149 
1150  output_storage (" x = &n;");
1151  output_storage (" optim_memcpy (x, p, 4);");
1152  output_storage (" n -= val;");
1153  output_storage (" optim_memcpy (p, x, 4);");
1154 #endif
1155  output_storage ("}");
1156  return;
1157 
1158  case COB_SUB_S32:
1159  output_storage ("static COB_INLINE COB_A_INLINE void");
1160  output_storage ("cob_sub_s32 (void *p, const int val)");
1161  output_storage ("{");
1162 #ifdef COB_ALLOW_UNALIGNED
1163  output_storage (" *(int __unaligned *)p -= val;");
1164 #else
1165  output_storage (" void *x;");
1166  output_storage (" int n;");
1167 
1168  output_storage (" x = &n;");
1169  output_storage (" optim_memcpy (x, p, 4);");
1170  output_storage (" n -= val;");
1171  output_storage (" optim_memcpy (p, x, 4);");
1172 #endif
1173  output_storage ("}");
1174  return;
1175 
1176  case COB_SUB_U40:
1177  output_storage ("static COB_INLINE COB_A_INLINE void");
1178  output_storage ("cob_sub_u40 (void *p, const int val)");
1179  output_storage ("{");
1180  output_storage (" cob_u64_t n = 0;");
1181  output_storage (" unsigned char *x;");
1182 
1183 #ifdef WORDS_BIGENDIAN
1184  output_storage (" x = ((unsigned char *)&n) + 3;");
1185 #else
1186  output_storage (" x = (unsigned char *)&n;");
1187 #endif
1188  output_storage (" optim_memcpy (x, p, 5);");
1189  output_storage (" n -= val;");
1190  output_storage (" optim_memcpy (p, x, 5);");
1191  output_storage ("}");
1192  return;
1193 
1194  case COB_SUB_S40:
1195  output_storage ("static COB_INLINE COB_A_INLINE void");
1196  output_storage ("cob_sub_s40 (void *p, const int val)");
1197  output_storage ("{");
1198  output_storage (" cob_s64_t n = 0;");
1199  output_storage (" unsigned char *x;");
1200 
1201 #ifdef WORDS_BIGENDIAN
1202  output_storage (" x = (unsigned char *)&n;");
1203 #else
1204  output_storage (" x = ((unsigned char *)&n) + 3;");
1205 #endif
1206  output_storage (" optim_memcpy (x, p, 5);");
1207  output_storage (" n >>= 24; /* Shift with sign */");
1208  output_storage (" n -= val;");
1209 #ifdef WORDS_BIGENDIAN
1210  output_storage (" x = ((unsigned char *)&n) + 3;");
1211 #else
1212  output_storage (" x = (unsigned char *)&n;");
1213 #endif
1214  output_storage (" optim_memcpy (p, x, 5);");
1215  output_storage ("}");
1216  return;
1217 
1218  case COB_SUB_U48:
1219  output_storage ("static COB_INLINE COB_A_INLINE void");
1220  output_storage ("cob_sub_u48 (void *p, const int val)");
1221  output_storage ("{");
1222  output_storage (" cob_u64_t n = 0;");
1223  output_storage (" unsigned char *x;");
1224 
1225 #ifdef WORDS_BIGENDIAN
1226  output_storage (" x = ((unsigned char *)&n) + 2;");
1227 #else
1228  output_storage (" x = (unsigned char *)&n;");
1229 #endif
1230  output_storage (" optim_memcpy (x, p, 6);");
1231  output_storage (" n -= val;");
1232  output_storage (" optim_memcpy (p, x, 6);");
1233  output_storage ("}");
1234  return;
1235 
1236  case COB_SUB_S48:
1237  output_storage ("static COB_INLINE COB_A_INLINE void");
1238  output_storage ("cob_sub_s48 (void *p, const int val)");
1239  output_storage ("{");
1240  output_storage (" cob_s64_t n = 0;");
1241  output_storage (" unsigned char *x;");
1242 
1243 #ifdef WORDS_BIGENDIAN
1244  output_storage (" x = (unsigned char *)&n;");
1245 #else
1246  output_storage (" x = ((unsigned char *)&n) + 2;");
1247 #endif
1248  output_storage (" optim_memcpy (x, p, 6);");
1249  output_storage (" n >>= 16; /* Shift with sign */");
1250  output_storage (" n -= val;");
1251 #ifdef WORDS_BIGENDIAN
1252  output_storage (" x = ((unsigned char *)&n) + 2;");
1253 #else
1254  output_storage (" x = (unsigned char *)&n;");
1255 #endif
1256  output_storage (" optim_memcpy (p, x, 6);");
1257  output_storage ("}");
1258  return;
1259 
1260  case COB_SUB_U56:
1261  output_storage ("static COB_INLINE COB_A_INLINE void");
1262  output_storage ("cob_sub_u56 (void *p, const int val)");
1263  output_storage ("{");
1264  output_storage (" cob_u64_t n = 0;");
1265  output_storage (" unsigned char *x;");
1266 
1267 #ifdef WORDS_BIGENDIAN
1268  output_storage (" x = ((unsigned char *)&n) + 1;");
1269 #else
1270  output_storage (" x = (unsigned char *)&n;");
1271 #endif
1272  output_storage (" optim_memcpy (x, p, 7);");
1273  output_storage (" n -= val;");
1274  output_storage (" optim_memcpy (p, x, 7);");
1275  output_storage ("}");
1276  return;
1277 
1278  case COB_SUB_S56:
1279  output_storage ("static COB_INLINE COB_A_INLINE void");
1280  output_storage ("cob_sub_s56 (void *p, const int val)");
1281  output_storage ("{");
1282  output_storage (" cob_s64_t n = 0;");
1283  output_storage (" unsigned char *x;");
1284 
1285 #ifdef WORDS_BIGENDIAN
1286  output_storage (" x = (unsigned char *)&n;");
1287 #else
1288  output_storage (" x = ((unsigned char *)&n) + 1;");
1289 #endif
1290  output_storage (" optim_memcpy (x, p, 7);");
1291  output_storage (" n >>= 8; /* Shift with sign */");
1292  output_storage (" n -= val;");
1293 #ifdef WORDS_BIGENDIAN
1294  output_storage (" x = ((unsigned char *)&n) + 1;");
1295 #else
1296  output_storage (" x = (unsigned char *)&n;");
1297 #endif
1298  output_storage (" optim_memcpy (p, x, 7);");
1299  output_storage ("}");
1300  return;
1301 
1302  case COB_SUB_U64:
1303  output_storage ("static COB_INLINE COB_A_INLINE void");
1304  output_storage ("cob_sub_u64 (void *p, const int val)");
1305  output_storage ("{");
1306 #ifdef COB_ALLOW_UNALIGNED
1307  output_storage (" *(cob_u64_t __unaligned *)p -= val;");
1308 #else
1309  output_storage (" void *x;");
1310  output_storage (" cob_u64_t n;");
1311 
1312  output_storage (" x = &n;");
1313  output_storage (" optim_memcpy (x, p, 8);");
1314  output_storage (" n -= val;");
1315  output_storage (" optim_memcpy (p, x, 8);");
1316 #endif
1317  output_storage ("}");
1318  return;
1319 
1320  case COB_SUB_S64:
1321  output_storage ("static COB_INLINE COB_A_INLINE void");
1322  output_storage ("cob_sub_s64 (void *p, const int val)");
1323  output_storage ("{");
1324 #ifdef COB_ALLOW_UNALIGNED
1325  output_storage (" *(cob_s64_t __unaligned *)p -= val;");
1326 #else
1327  output_storage (" void *x;");
1328  output_storage (" cob_s64_t n;");
1329 
1330  output_storage (" x = &n;");
1331  output_storage (" optim_memcpy (x, p, 8);");
1332  output_storage (" n -= val;");
1333  output_storage (" optim_memcpy (p, x, 8);");
1334 #endif
1335  output_storage ("}");
1336  return;
1337 
1338  /* Binary swapped compare */
1339 
1340  case COB_CMPSWP_U16:
1341  output_storage ("static COB_INLINE COB_A_INLINE int");
1342  output_storage ("cob_cmpswp_u16 (const void *p, const cob_s64_t n)");
1343  output_storage ("{");
1344 #ifndef COB_ALLOW_UNALIGNED
1345  output_storage (" void *x;");
1346 #endif
1347  output_storage (" unsigned short val;");
1348 
1349  output_storage (" if (unlikely(n < 0)) {");
1350  output_storage (" return 1;");
1351  output_storage (" }");
1352 #ifdef COB_ALLOW_UNALIGNED
1353  output_storage (" val = COB_BSWAP_16 (*(unsigned short __unaligned *)p);");
1354 #else
1355  output_storage (" x = &val;");
1356  output_storage (" optim_memcpy (x, p, 2);");
1357  output_storage (" val = COB_BSWAP_16 (val);");
1358 #endif
1359  output_storage (" return (val < n) ? -1 : (val > n);");
1360  output_storage ("}");
1361  return;
1362 
1363  case COB_CMPSWP_S16:
1364  output_storage ("static COB_INLINE COB_A_INLINE int");
1365  output_storage ("cob_cmpswp_s16 (const void *p, const cob_s64_t n)");
1366  output_storage ("{");
1367  output_storage (" short val;");
1368 
1369 #ifdef COB_ALLOW_UNALIGNED
1370  output_storage (" val = COB_BSWAP_16 (*(short __unaligned *)p);");
1371 #else
1372  output_storage (" void *x;");
1373 
1374  output_storage (" x = &val;");
1375  output_storage (" optim_memcpy (x, p, 2);");
1376  output_storage (" val = COB_BSWAP_16 (val);");
1377 #endif
1378  output_storage (" return (val < n) ? -1 : (val > n);");
1379  output_storage ("}");
1380  return;
1381 
1382  case COB_CMPSWP_U24:
1383  output_storage ("static COB_INLINE COB_A_INLINE int");
1384  output_storage ("cob_cmpswp_u24 (const void *p, const cob_s64_t n)");
1385  output_storage ("{");
1386  output_storage (" unsigned char *x;");
1387  output_storage (" unsigned int val = 0;");
1388 
1389  output_storage (" if (unlikely(n < 0)) {");
1390  output_storage (" return 1;");
1391  output_storage (" }");
1392  output_storage (" x = ((unsigned char *)&val) + 1;");
1393  output_storage (" optim_memcpy (x, p, 3);");
1394  output_storage (" val = COB_BSWAP_32 (val);");
1395  output_storage (" return (val < n) ? -1 : (val > n);");
1396  output_storage ("}");
1397  return;
1398 
1399  case COB_CMPSWP_S24:
1400  output_storage ("static COB_INLINE COB_A_INLINE int");
1401  output_storage ("cob_cmpswp_s24 (const void *p, const cob_s64_t n)");
1402  output_storage ("{");
1403  output_storage (" unsigned char *x;");
1404  output_storage (" int val = 0;");
1405 
1406  output_storage (" x = (unsigned char *)&val;");
1407  output_storage (" optim_memcpy (x, p, 3);");
1408  output_storage (" val = COB_BSWAP_32 (val);");
1409  output_storage (" val >>= 8; /* Shift with sign */");
1410  output_storage (" return (val < n) ? -1 : (val > n);");
1411  output_storage ("}");
1412  return;
1413 
1414  case COB_CMPSWP_U32:
1415  output_storage ("static COB_INLINE COB_A_INLINE int");
1416  output_storage ("cob_cmpswp_u32 (const void *p, const cob_s64_t n)");
1417  output_storage ("{");
1418 #ifndef COB_ALLOW_UNALIGNED
1419  output_storage (" void *x;");
1420 #endif
1421  output_storage (" unsigned int val;");
1422 
1423  output_storage (" if (unlikely(n < 0)) {");
1424  output_storage (" return 1;");
1425  output_storage (" }");
1426 #ifdef COB_ALLOW_UNALIGNED
1427  output_storage (" val = COB_BSWAP_32 (*(const unsigned int __unaligned *)p);");
1428 #else
1429  output_storage (" x = &val;");
1430  output_storage (" optim_memcpy (x, p, 4);");
1431  output_storage (" val = COB_BSWAP_32 (val);");
1432 #endif
1433  output_storage (" return (val < n) ? -1 : (val > n);");
1434  output_storage ("}");
1435  return;
1436 
1437  case COB_CMPSWP_S32:
1438  output_storage ("static COB_INLINE COB_A_INLINE int");
1439  output_storage ("cob_cmpswp_s32 (const void *p, const cob_s64_t n)");
1440  output_storage ("{");
1441  output_storage (" int val;");
1442 
1443 #ifdef COB_ALLOW_UNALIGNED
1444  output_storage (" val = COB_BSWAP_32 (*(const int __unaligned *)p);");
1445 #else
1446  output_storage (" void *x;");
1447 
1448  output_storage (" x = &val;");
1449  output_storage (" optim_memcpy (x, p, 4);");
1450  output_storage (" val = COB_BSWAP_32 (val);");
1451 #endif
1452  output_storage (" return (val < n) ? -1 : (val > n);");
1453  output_storage ("}");
1454  return;
1455 
1456  case COB_CMPSWP_U40:
1457  output_storage ("static COB_INLINE COB_A_INLINE int");
1458  output_storage ("cob_cmpswp_u40 (const void *p, const cob_s64_t n)");
1459  output_storage ("{");
1460  output_storage (" cob_u64_t val = 0;");
1461  output_storage (" unsigned char *x;");
1462 
1463  output_storage (" if (unlikely(n < 0)) {");
1464  output_storage (" return 1;");
1465  output_storage (" }");
1466  output_storage (" x = ((unsigned char *)&val) + 3;");
1467  output_storage (" optim_memcpy (x, p, 5);");
1468  output_storage (" val = COB_BSWAP_64 (val);");
1469  output_storage (" return (val < n) ? -1 : (val > n);");
1470  output_storage ("}");
1471  return;
1472 
1473  case COB_CMPSWP_S40:
1474  output_storage ("static COB_INLINE COB_A_INLINE int");
1475  output_storage ("cob_cmpswp_s40 (const void *p, const cob_s64_t n)");
1476  output_storage ("{");
1477  output_storage (" cob_s64_t val = 0;");
1478  output_storage (" unsigned char *x;");
1479 
1480  output_storage (" x = (unsigned char *)&val;");
1481  output_storage (" optim_memcpy (x, p, 5);");
1482  output_storage (" val = COB_BSWAP_64 (val);");
1483  output_storage (" val >>= 24; /* Shift with sign */");
1484  output_storage (" return (val < n) ? -1 : (val > n);");
1485  output_storage ("}");
1486  return;
1487 
1488  case COB_CMPSWP_U48:
1489  output_storage ("static COB_INLINE COB_A_INLINE int");
1490  output_storage ("cob_cmpswp_u48 (const void *p, const cob_s64_t n)");
1491  output_storage ("{");
1492  output_storage (" cob_u64_t val = 0;");
1493  output_storage (" unsigned char *x;");
1494 
1495  output_storage (" if (unlikely(n < 0)) {");
1496  output_storage (" return 1;");
1497  output_storage (" }");
1498  output_storage (" x = ((unsigned char *)&val) + 2;");
1499  output_storage (" optim_memcpy (x, p, 6);");
1500  output_storage (" val = COB_BSWAP_64 (val);");
1501  output_storage (" return (val < n) ? -1 : (val > n);");
1502  output_storage ("}");
1503  return;
1504 
1505  case COB_CMPSWP_S48:
1506  output_storage ("static COB_INLINE COB_A_INLINE int");
1507  output_storage ("cob_cmpswp_s48 (const void *p, const cob_s64_t n)");
1508  output_storage ("{");
1509  output_storage (" cob_s64_t val = 0;");
1510  output_storage (" unsigned char *x;");
1511 
1512  output_storage (" x = (unsigned char *)&val;");
1513  output_storage (" optim_memcpy (x, p, 6);");
1514  output_storage (" val = COB_BSWAP_64 (val);");
1515  output_storage (" val >>= 16; /* Shift with sign */");
1516  output_storage (" return (val < n) ? -1 : (val > n);");
1517  output_storage ("}");
1518  return;
1519 
1520  case COB_CMPSWP_U56:
1521  output_storage ("static COB_INLINE COB_A_INLINE int");
1522  output_storage ("cob_cmpswp_u56 (const void *p, const cob_s64_t n)");
1523  output_storage ("{");
1524  output_storage (" cob_u64_t val = 0;");
1525  output_storage (" unsigned char *x;");
1526 
1527  output_storage (" if (unlikely(n < 0)) {");
1528  output_storage (" return 1;");
1529  output_storage (" }");
1530  output_storage (" x = ((unsigned char *)&val) + 1;");
1531  output_storage (" optim_memcpy (x, p, 7);");
1532  output_storage (" val = COB_BSWAP_64 (val);");
1533  output_storage (" return (val < n) ? -1 : (val > n);");
1534  output_storage ("}");
1535  return;
1536 
1537  case COB_CMPSWP_S56:
1538  output_storage ("static COB_INLINE COB_A_INLINE int");
1539  output_storage ("cob_cmpswp_s56 (const void *p, const cob_s64_t n)");
1540  output_storage ("{");
1541  output_storage (" cob_s64_t val = 0;");
1542  output_storage (" unsigned char *x;");
1543 
1544  output_storage (" x = (unsigned char *)&val;");
1545  output_storage (" optim_memcpy (x, p, 7);");
1546  output_storage (" val = COB_BSWAP_64 (val);");
1547  output_storage (" val >>= 8; /* Shift with sign */");
1548  output_storage (" return (val < n) ? -1 : (val > n);");
1549  output_storage ("}");
1550  return;
1551 
1552  case COB_CMPSWP_U64:
1553  output_storage ("static COB_INLINE COB_A_INLINE int");
1554  output_storage ("cob_cmpswp_u64 (const void *p, const cob_s64_t n)");
1555  output_storage ("{");
1556 #ifndef COB_ALLOW_UNALIGNED
1557  output_storage (" void *x;");
1558 #endif
1559  output_storage (" cob_u64_t val;");
1560 
1561  output_storage (" if (unlikely(n < 0)) {");
1562  output_storage (" return 1;");
1563  output_storage (" }");
1564 #ifdef COB_ALLOW_UNALIGNED
1565  output_storage (" val = COB_BSWAP_64 (*(const cob_u64_t __unaligned *)p);");
1566 #else
1567  output_storage (" x = &val;");
1568  output_storage (" optim_memcpy (x, p, 8);");
1569  output_storage (" val = COB_BSWAP_64 (val);");
1570 #endif
1571  output_storage (" return (val < n) ? -1 : (val > n);");
1572  output_storage ("}");
1573  return;
1574 
1575  case COB_CMPSWP_S64:
1576  output_storage ("static COB_INLINE COB_A_INLINE int");
1577  output_storage ("cob_cmpswp_s64 (const void *p, const cob_s64_t n)");
1578  output_storage ("{");
1579  output_storage (" cob_s64_t val;");
1580 
1581 #ifdef COB_ALLOW_UNALIGNED
1582  output_storage (" val = COB_BSWAP_64 (*(const cob_s64_t __unaligned *)p);");
1583 #else
1584  output_storage (" void *x;");
1585  output_storage (" x = &val;");
1586  output_storage (" optim_memcpy (x, p, 8);");
1587  output_storage (" val = COB_BSWAP_64 (val);");
1588 #endif
1589  output_storage (" return (val < n) ? -1 : (val > n);");
1590  output_storage ("}");
1591  return;
1592 
1593  /* Binary swapped add */
1594 
1595  case COB_ADDSWP_U16:
1596  output_storage ("static COB_INLINE COB_A_INLINE void");
1597  output_storage ("cob_addswp_u16 (void *p, const int val)");
1598  output_storage ("{");
1599  output_storage (" unsigned short n;");
1600 
1601 #ifdef COB_ALLOW_UNALIGNED
1602  output_storage (" n = COB_BSWAP_16 (*(unsigned short __unaligned *)p);");
1603  output_storage (" n += val;");
1604  output_storage (" *(unsigned short __unaligned *)p = COB_BSWAP_16(n);");
1605 #else
1606  output_storage (" unsigned char *x;");
1607  output_storage (" unsigned char *px = p;");
1608 
1609  output_storage (" x = (unsigned char *)&n;");
1610  output_storage (" x[0] = px[1];");
1611  output_storage (" x[1] = px[0];");
1612  output_storage (" n += val;");
1613  output_storage (" px[0] = x[1];");
1614  output_storage (" px[1] = x[0];");
1615 #endif
1616  output_storage ("}");
1617  return;
1618 
1619  case COB_ADDSWP_S16:
1620  output_storage ("static COB_INLINE COB_A_INLINE void");
1621  output_storage ("cob_addswp_s16 (void *p, const int val)");
1622  output_storage ("{");
1623  output_storage (" short n;");
1624 
1625 #ifdef COB_ALLOW_UNALIGNED
1626  output_storage (" n = COB_BSWAP_16 (*(short __unaligned *)p);");
1627  output_storage (" n += val;");
1628  output_storage (" *(short __unaligned *)p = COB_BSWAP_16(n);");
1629 #else
1630  output_storage (" unsigned char *x;");
1631  output_storage (" unsigned char *px = p;");
1632 
1633  output_storage (" x = (unsigned char *)&n;");
1634  output_storage (" x[0] = px[1];");
1635  output_storage (" x[1] = px[0];");
1636  output_storage (" n += val;");
1637  output_storage (" px[0] = x[1];");
1638  output_storage (" px[1] = x[0];");
1639 #endif
1640  output_storage ("}");
1641  return;
1642 
1643  case COB_ADDSWP_U24:
1644  output_storage ("static COB_INLINE COB_A_INLINE void");
1645  output_storage ("cob_addswp_u24 (void *p, const int val)");
1646  output_storage ("{");
1647  output_storage (" unsigned char *x;");
1648  output_storage (" unsigned char *px = p;");
1649  output_storage (" unsigned int n = 0;");
1650 
1651  output_storage (" x = (unsigned char *)&n;");
1652  output_storage (" x[0] = px[2];");
1653  output_storage (" x[1] = px[1];");
1654  output_storage (" x[2] = px[0];");
1655  output_storage (" n += val;");
1656  output_storage (" px[0] = x[2];");
1657  output_storage (" px[1] = x[1];");
1658  output_storage (" px[2] = x[0];");
1659  output_storage ("}");
1660  return;
1661 
1662  case COB_ADDSWP_S24:
1663  output_storage ("static COB_INLINE COB_A_INLINE void");
1664  output_storage ("cob_addswp_s24 (void *p, const int val)");
1665  output_storage ("{");
1666  output_storage (" unsigned char *x;");
1667  output_storage (" unsigned char *px = p;");
1668  output_storage (" int n = 0;");
1669 
1670  output_storage (" x = ((unsigned char *)&n) + 1;");
1671  output_storage (" x[0] = px[2];");
1672  output_storage (" x[1] = px[1];");
1673  output_storage (" x[2] = px[0];");
1674  output_storage (" n >>= 8; /* Shift with sign */");
1675  output_storage (" n += val;");
1676  output_storage (" x = (unsigned char *)&n;");
1677  output_storage (" px[0] = x[2];");
1678  output_storage (" px[1] = x[1];");
1679  output_storage (" px[2] = x[0];");
1680  output_storage ("}");
1681  return;
1682 
1683  case COB_ADDSWP_U32:
1684  output_storage ("static COB_INLINE COB_A_INLINE void");
1685  output_storage ("cob_addswp_u32 (void *p, const int val)");
1686  output_storage ("{");
1687  output_storage (" unsigned int n;");
1688 
1689 #ifdef COB_ALLOW_UNALIGNED
1690  output_storage (" n = COB_BSWAP_32 (*(unsigned int __unaligned *)p);");
1691  output_storage (" n += val;");
1692  output_storage (" *(unsigned int __unaligned *)p = COB_BSWAP_32(n);");
1693 #else
1694  output_storage (" unsigned char *x;");
1695  output_storage (" unsigned char *px = p;");
1696 
1697  output_storage (" x = (unsigned char *)&n;");
1698  output_storage (" x[0] = px[3];");
1699  output_storage (" x[1] = px[2];");
1700  output_storage (" x[2] = px[1];");
1701  output_storage (" x[3] = px[0];");
1702  output_storage (" n += val;");
1703  output_storage (" px[0] = x[3];");
1704  output_storage (" px[1] = x[2];");
1705  output_storage (" px[2] = x[1];");
1706  output_storage (" px[3] = x[0];");
1707 #endif
1708  output_storage ("}");
1709  return;
1710 
1711  case COB_ADDSWP_S32:
1712  output_storage ("static COB_INLINE COB_A_INLINE void");
1713  output_storage ("cob_addswp_s32 (void *p, const int val)");
1714  output_storage ("{");
1715  output_storage (" int n;");
1716 
1717 #ifdef COB_ALLOW_UNALIGNED
1718  output_storage (" n = COB_BSWAP_32 (*(int __unaligned *)p);");
1719  output_storage (" n += val;");
1720  output_storage (" *(int __unaligned *)p = COB_BSWAP_32(n);");
1721 #else
1722  output_storage (" unsigned char *x;");
1723  output_storage (" unsigned char *px = p;");
1724 
1725  output_storage (" x = (unsigned char *)&n;");
1726  output_storage (" x[0] = px[3];");
1727  output_storage (" x[1] = px[2];");
1728  output_storage (" x[2] = px[1];");
1729  output_storage (" x[3] = px[0];");
1730  output_storage (" n += val;");
1731  output_storage (" px[0] = x[3];");
1732  output_storage (" px[1] = x[2];");
1733  output_storage (" px[2] = x[1];");
1734  output_storage (" px[3] = x[0];");
1735 #endif
1736  output_storage ("}");
1737  return;
1738 
1739  case COB_ADDSWP_U40:
1740  output_storage ("static COB_INLINE COB_A_INLINE void");
1741  output_storage ("cob_addswp_u40 (void *p, const int val)");
1742  output_storage ("{");
1743  output_storage (" cob_u64_t n = 0;");
1744  output_storage (" unsigned char *x;");
1745  output_storage (" unsigned char *px = p;");
1746 
1747  output_storage (" x = (unsigned char *)&n;");
1748  output_storage (" x[0] = px[4];");
1749  output_storage (" x[1] = px[3];");
1750  output_storage (" x[2] = px[2];");
1751  output_storage (" x[3] = px[1];");
1752  output_storage (" x[4] = px[0];");
1753  output_storage (" n += val;");
1754  output_storage (" px[0] = x[4];");
1755  output_storage (" px[1] = x[3];");
1756  output_storage (" px[2] = x[2];");
1757  output_storage (" px[3] = x[1];");
1758  output_storage (" px[4] = x[0];");
1759  output_storage ("}");
1760  return;
1761 
1762  case COB_ADDSWP_S40:
1763  output_storage ("static COB_INLINE COB_A_INLINE void");
1764  output_storage ("cob_addswp_s40 (void *p, const int val)");
1765  output_storage ("{");
1766  output_storage (" cob_s64_t n = 0;");
1767  output_storage (" unsigned char *x;");
1768  output_storage (" unsigned char *px = p;");
1769 
1770  output_storage (" x = ((unsigned char *)&n) + 3;");
1771  output_storage (" x[0] = px[4];");
1772  output_storage (" x[1] = px[3];");
1773  output_storage (" x[2] = px[2];");
1774  output_storage (" x[3] = px[1];");
1775  output_storage (" x[4] = px[0];");
1776  output_storage (" n >>= 24; /* Shift with sign */");
1777  output_storage (" n += val;");
1778  output_storage (" x = (unsigned char *)&n;");
1779  output_storage (" px[0] = x[4];");
1780  output_storage (" px[1] = x[3];");
1781  output_storage (" px[2] = x[2];");
1782  output_storage (" px[3] = x[1];");
1783  output_storage (" px[4] = x[0];");
1784  output_storage ("}");
1785  return;
1786 
1787  case COB_ADDSWP_U48:
1788  output_storage ("static COB_INLINE COB_A_INLINE void");
1789  output_storage ("cob_addswp_u48 (void *p, const int val)");
1790  output_storage ("{");
1791  output_storage (" cob_u64_t n = 0;");
1792  output_storage (" unsigned char *x;");
1793  output_storage (" unsigned char *px = p;");
1794 
1795  output_storage (" x = (unsigned char *)&n;");
1796  output_storage (" x[0] = px[5];");
1797  output_storage (" x[1] = px[4];");
1798  output_storage (" x[2] = px[3];");
1799  output_storage (" x[3] = px[2];");
1800  output_storage (" x[4] = px[1];");
1801  output_storage (" x[5] = px[0];");
1802  output_storage (" n += val;");
1803  output_storage (" px[0] = x[5];");
1804  output_storage (" px[1] = x[4];");
1805  output_storage (" px[2] = x[3];");
1806  output_storage (" px[3] = x[2];");
1807  output_storage (" px[4] = x[1];");
1808  output_storage (" px[5] = x[0];");
1809  output_storage ("}");
1810  return;
1811 
1812  case COB_ADDSWP_S48:
1813  output_storage ("static COB_INLINE COB_A_INLINE void");
1814  output_storage ("cob_addswp_s48 (void *p, const int val)");
1815  output_storage ("{");
1816  output_storage (" cob_s64_t n = 0;");
1817  output_storage (" unsigned char *x;");
1818  output_storage (" unsigned char *px = p;");
1819 
1820  output_storage (" x = ((unsigned char *)&n) + 2;");
1821  output_storage (" x[0] = px[5];");
1822  output_storage (" x[1] = px[4];");
1823  output_storage (" x[2] = px[3];");
1824  output_storage (" x[3] = px[2];");
1825  output_storage (" x[4] = px[1];");
1826  output_storage (" x[5] = px[0];");
1827  output_storage (" n >>= 16; /* Shift with sign */");
1828  output_storage (" n += val;");
1829  output_storage (" x = (unsigned char *)&n;");
1830  output_storage (" px[0] = x[5];");
1831  output_storage (" px[1] = x[4];");
1832  output_storage (" px[2] = x[3];");
1833  output_storage (" px[3] = x[2];");
1834  output_storage (" px[4] = x[1];");
1835  output_storage (" px[5] = x[0];");
1836  output_storage ("}");
1837  return;
1838 
1839  case COB_ADDSWP_U56:
1840  output_storage ("static COB_INLINE COB_A_INLINE void");
1841  output_storage ("cob_addswp_u56 (void *p, const int val)");
1842  output_storage ("{");
1843  output_storage (" cob_u64_t n = 0;");
1844  output_storage (" unsigned char *x;");
1845  output_storage (" unsigned char *px = p;");
1846 
1847  output_storage (" x = (unsigned char *)&n;");
1848  output_storage (" x[0] = px[6];");
1849  output_storage (" x[1] = px[5];");
1850  output_storage (" x[2] = px[4];");
1851  output_storage (" x[3] = px[3];");
1852  output_storage (" x[4] = px[2];");
1853  output_storage (" x[5] = px[1];");
1854  output_storage (" x[6] = px[0];");
1855  output_storage (" n += val;");
1856  output_storage (" px[0] = x[6];");
1857  output_storage (" px[1] = x[5];");
1858  output_storage (" px[2] = x[4];");
1859  output_storage (" px[3] = x[3];");
1860  output_storage (" px[4] = x[2];");
1861  output_storage (" px[5] = x[1];");
1862  output_storage (" px[6] = x[0];");
1863  output_storage ("}");
1864  return;
1865 
1866  case COB_ADDSWP_S56:
1867  output_storage ("static COB_INLINE COB_A_INLINE void");
1868  output_storage ("cob_addswp_s56 (void *p, const int val)");
1869  output_storage ("{");
1870  output_storage (" cob_s64_t n = 0;");
1871  output_storage (" unsigned char *x;");
1872  output_storage (" unsigned char *px = p;");
1873 
1874  output_storage (" x = ((unsigned char *)&n) + 1;");
1875  output_storage (" x[0] = px[6];");
1876  output_storage (" x[1] = px[5];");
1877  output_storage (" x[2] = px[4];");
1878  output_storage (" x[3] = px[3];");
1879  output_storage (" x[4] = px[2];");
1880  output_storage (" x[5] = px[1];");
1881  output_storage (" x[6] = px[0];");
1882  output_storage (" n >>= 8; /* Shift with sign */");
1883  output_storage (" n += val;");
1884  output_storage (" x = (unsigned char *)&n;");
1885  output_storage (" px[0] = x[6];");
1886  output_storage (" px[1] = x[5];");
1887  output_storage (" px[2] = x[4];");
1888  output_storage (" px[3] = x[3];");
1889  output_storage (" px[4] = x[2];");
1890  output_storage (" px[5] = x[1];");
1891  output_storage (" px[6] = x[0];");
1892  output_storage ("}");
1893  return;
1894 
1895  case COB_ADDSWP_U64:
1896  output_storage ("static COB_INLINE COB_A_INLINE void");
1897  output_storage ("cob_addswp_u64 (void *p, const int val)");
1898  output_storage ("{");
1899  output_storage (" cob_u64_t n;");
1900 
1901 #ifdef COB_ALLOW_UNALIGNED
1902  output_storage (" n = COB_BSWAP_64 (*(cob_u64_t __unaligned *)p);");
1903  output_storage (" n += val;");
1904  output_storage (" *(cob_u64_t __unaligned *)p = COB_BSWAP_64(n);");
1905 #else
1906  output_storage (" unsigned char *x;");
1907  output_storage (" unsigned char *px = p;");
1908 
1909  output_storage (" x = (unsigned char *)&n;");
1910  output_storage (" x[0] = px[7];");
1911  output_storage (" x[1] = px[6];");
1912  output_storage (" x[2] = px[5];");
1913  output_storage (" x[3] = px[4];");
1914  output_storage (" x[4] = px[3];");
1915  output_storage (" x[5] = px[2];");
1916  output_storage (" x[6] = px[1];");
1917  output_storage (" x[7] = px[0];");
1918  output_storage (" n += val;");
1919  output_storage (" px[0] = x[7];");
1920  output_storage (" px[1] = x[6];");
1921  output_storage (" px[2] = x[5];");
1922  output_storage (" px[3] = x[4];");
1923  output_storage (" px[4] = x[3];");
1924  output_storage (" px[5] = x[2];");
1925  output_storage (" px[6] = x[1];");
1926  output_storage (" px[7] = x[0];");
1927 #endif
1928  output_storage ("}");
1929  return;
1930 
1931  case COB_ADDSWP_S64:
1932  output_storage ("static COB_INLINE COB_A_INLINE void");
1933  output_storage ("cob_addswp_s64 (void *p, const int val)");
1934  output_storage ("{");
1935  output_storage (" cob_s64_t n;");
1936 
1937 #ifdef COB_ALLOW_UNALIGNED
1938  output_storage (" n = COB_BSWAP_64 (*(cob_s64_t __unaligned *)p);");
1939  output_storage (" n += val;");
1940  output_storage (" *(cob_s64_t __unaligned *)p = COB_BSWAP_64(n);");
1941 #else
1942  output_storage (" unsigned char *x;");
1943  output_storage (" unsigned char *px = p;");
1944 
1945  output_storage (" x = (unsigned char *)&n;");
1946  output_storage (" x[0] = px[7];");
1947  output_storage (" x[1] = px[6];");
1948  output_storage (" x[2] = px[5];");
1949  output_storage (" x[3] = px[4];");
1950  output_storage (" x[4] = px[3];");
1951  output_storage (" x[5] = px[2];");
1952  output_storage (" x[6] = px[1];");
1953  output_storage (" x[7] = px[0];");
1954  output_storage (" n += val;");
1955  output_storage (" px[0] = x[7];");
1956  output_storage (" px[1] = x[6];");
1957  output_storage (" px[2] = x[5];");
1958  output_storage (" px[3] = x[4];");
1959  output_storage (" px[4] = x[3];");
1960  output_storage (" px[5] = x[2];");
1961  output_storage (" px[6] = x[1];");
1962  output_storage (" px[7] = x[0];");
1963 #endif
1964  output_storage ("}");
1965  return;
1966 
1967  /* Binary swapped subtract */
1968 
1969  case COB_SUBSWP_U16:
1970  output_storage ("static COB_INLINE COB_A_INLINE void");
1971  output_storage ("cob_subswp_u16 (void *p, const int val)");
1972  output_storage ("{");
1973  output_storage (" unsigned short n;");
1974 
1975 #ifdef COB_ALLOW_UNALIGNED
1976  output_storage (" n = COB_BSWAP_16 (*(unsigned short __unaligned *)p);");
1977  output_storage (" n -= val;");
1978  output_storage (" *(unsigned short __unaligned *)p = COB_BSWAP_16(n);");
1979 #else
1980  output_storage (" unsigned char *x;");
1981  output_storage (" unsigned char *px = p;");
1982 
1983  output_storage (" x = (unsigned char *)&n;");
1984  output_storage (" x[0] = px[1];");
1985  output_storage (" x[1] = px[0];");
1986  output_storage (" n -= val;");
1987  output_storage (" px[0] = x[1];");
1988  output_storage (" px[1] = x[0];");
1989 #endif
1990  output_storage ("}");
1991  return;
1992 
1993  case COB_SUBSWP_S16:
1994  output_storage ("static COB_INLINE COB_A_INLINE void");
1995  output_storage ("cob_subswp_s16 (void *p, const int val)");
1996  output_storage ("{");
1997  output_storage (" short n;");
1998 
1999 #ifdef COB_ALLOW_UNALIGNED
2000  output_storage (" n = COB_BSWAP_16 (*(short __unaligned *)p);");
2001  output_storage (" n -= val;");
2002  output_storage (" *(short __unaligned *)p = COB_BSWAP_16(n);");
2003 #else
2004  output_storage (" unsigned char *x;");
2005  output_storage (" unsigned char *px = p;");
2006 
2007  output_storage (" x = (unsigned char *)&n;");
2008  output_storage (" x[0] = px[1];");
2009  output_storage (" x[1] = px[0];");
2010  output_storage (" n -= val;");
2011  output_storage (" px[0] = x[1];");
2012  output_storage (" px[1] = x[0];");
2013 #endif
2014  output_storage ("}");
2015  return;
2016 
2017  case COB_SUBSWP_U24:
2018  output_storage ("static COB_INLINE COB_A_INLINE void");
2019  output_storage ("cob_subswp_u24 (void *p, const int val)");
2020  output_storage ("{");
2021  output_storage (" unsigned char *x;");
2022  output_storage (" unsigned char *px = p;");
2023  output_storage (" unsigned int n = 0;");
2024 
2025  output_storage (" x = (unsigned char *)&n;");
2026  output_storage (" x[0] = px[2];");
2027  output_storage (" x[1] = px[1];");
2028  output_storage (" x[2] = px[0];");
2029  output_storage (" n -= val;");
2030  output_storage (" px[0] = x[2];");
2031  output_storage (" px[1] = x[1];");
2032  output_storage (" px[2] = x[0];");
2033  output_storage ("}");
2034  return;
2035 
2036  case COB_SUBSWP_S24:
2037  output_storage ("static COB_INLINE COB_A_INLINE void");
2038  output_storage ("cob_subswp_s24 (void *p, const int val)");
2039  output_storage ("{");
2040  output_storage (" unsigned char *x;");
2041  output_storage (" unsigned char *px = p;");
2042  output_storage (" int n = 0;");
2043 
2044  output_storage (" x = ((unsigned char *)&n) + 1;");
2045  output_storage (" x[0] = px[2];");
2046  output_storage (" x[1] = px[1];");
2047  output_storage (" x[2] = px[0];");
2048  output_storage (" n >>= 8; /* Shift with sign */");
2049  output_storage (" n -= val;");
2050  output_storage (" x = (unsigned char *)&n;");
2051  output_storage (" px[0] = x[2];");
2052  output_storage (" px[1] = x[1];");
2053  output_storage (" px[2] = x[0];");
2054  output_storage ("}");
2055  return;
2056 
2057  case COB_SUBSWP_U32:
2058  output_storage ("static COB_INLINE COB_A_INLINE void");
2059  output_storage ("cob_subswp_u32 (void *p, const int val)");
2060  output_storage ("{");
2061  output_storage (" unsigned int n;");
2062 
2063 #ifdef COB_ALLOW_UNALIGNED
2064  output_storage (" n = COB_BSWAP_32 (*(unsigned int __unaligned *)p);");
2065  output_storage (" n -= val;");
2066  output_storage (" *(unsigned int __unaligned *)p = COB_BSWAP_32(n);");
2067 #else
2068  output_storage (" unsigned char *x;");
2069  output_storage (" unsigned char *px = p;");
2070 
2071  output_storage (" x = (unsigned char *)&n;");
2072  output_storage (" x[0] = px[3];");
2073  output_storage (" x[1] = px[2];");
2074  output_storage (" x[2] = px[1];");
2075  output_storage (" x[3] = px[0];");
2076  output_storage (" n -= val;");
2077  output_storage (" px[0] = x[3];");
2078  output_storage (" px[1] = x[2];");
2079  output_storage (" px[2] = x[1];");
2080  output_storage (" px[3] = x[0];");
2081 #endif
2082  output_storage ("}");
2083  return;
2084 
2085  case COB_SUBSWP_S32:
2086  output_storage ("static COB_INLINE COB_A_INLINE void");
2087  output_storage ("cob_subswp_s32 (void *p, const int val)");
2088  output_storage ("{");
2089  output_storage (" int n;");
2090 
2091 #ifdef COB_ALLOW_UNALIGNED
2092  output_storage (" n = COB_BSWAP_32 (*(int __unaligned *)p);");
2093  output_storage (" n -= val;");
2094  output_storage (" *(int __unaligned *)p = COB_BSWAP_32(n);");
2095 #else
2096  output_storage (" unsigned char *x;");
2097  output_storage (" unsigned char *px = p;");
2098 
2099  output_storage (" x = (unsigned char *)&n;");
2100  output_storage (" x[0] = px[3];");
2101  output_storage (" x[1] = px[2];");
2102  output_storage (" x[2] = px[1];");
2103  output_storage (" x[3] = px[0];");
2104  output_storage (" n -= val;");
2105  output_storage (" px[0] = x[3];");
2106  output_storage (" px[1] = x[2];");
2107  output_storage (" px[2] = x[1];");
2108  output_storage (" px[3] = x[0];");
2109 #endif
2110  output_storage ("}");
2111  return;
2112 
2113  case COB_SUBSWP_U40:
2114  output_storage ("static COB_INLINE COB_A_INLINE void");
2115  output_storage ("cob_subswp_u40 (void *p, const int val)");
2116  output_storage ("{");
2117  output_storage (" cob_u64_t n = 0;");
2118  output_storage (" unsigned char *x;");
2119  output_storage (" unsigned char *px = p;");
2120 
2121  output_storage (" x = (unsigned char *)&n;");
2122  output_storage (" x[0] = px[4];");
2123  output_storage (" x[1] = px[3];");
2124  output_storage (" x[2] = px[2];");
2125  output_storage (" x[3] = px[1];");
2126  output_storage (" x[4] = px[0];");
2127  output_storage (" n -= val;");
2128  output_storage (" px[0] = x[4];");
2129  output_storage (" px[1] = x[3];");
2130  output_storage (" px[2] = x[2];");
2131  output_storage (" px[3] = x[1];");
2132  output_storage (" px[4] = x[0];");
2133  output_storage ("}");
2134  return;
2135 
2136  case COB_SUBSWP_S40:
2137  output_storage ("static COB_INLINE COB_A_INLINE void");
2138  output_storage ("cob_subswp_s40 (void *p, const int val)");
2139  output_storage ("{");
2140  output_storage (" cob_s64_t n = 0;");
2141  output_storage (" unsigned char *x;");
2142  output_storage (" unsigned char *px = p;");
2143 
2144  output_storage (" x = ((unsigned char *)&n) + 3;");
2145  output_storage (" x[0] = px[4];");
2146  output_storage (" x[1] = px[3];");
2147  output_storage (" x[2] = px[2];");
2148  output_storage (" x[3] = px[1];");
2149  output_storage (" x[4] = px[0];");
2150  output_storage (" n >>= 24; /* Shift with sign */");
2151  output_storage (" n -= val;");
2152  output_storage (" x = (unsigned char *)&n;");
2153  output_storage (" px[0] = x[4];");
2154  output_storage (" px[1] = x[3];");
2155  output_storage (" px[2] = x[2];");
2156  output_storage (" px[3] = x[1];");
2157  output_storage (" px[4] = x[0];");
2158  output_storage ("}");
2159  return;
2160 
2161  case COB_SUBSWP_U48:
2162  output_storage ("static COB_INLINE COB_A_INLINE void");
2163  output_storage ("cob_subswp_u48 (void *p, const int val)");
2164  output_storage ("{");
2165  output_storage (" cob_u64_t n = 0;");
2166  output_storage (" unsigned char *x;");
2167  output_storage (" unsigned char *px = p;");
2168 
2169  output_storage (" x = (unsigned char *)&n;");
2170  output_storage (" x[0] = px[5];");
2171  output_storage (" x[1] = px[4];");
2172  output_storage (" x[2] = px[3];");
2173  output_storage (" x[3] = px[2];");
2174  output_storage (" x[4] = px[1];");
2175  output_storage (" x[5] = px[0];");
2176  output_storage (" n -= val;");
2177  output_storage (" px[0] = x[5];");
2178  output_storage (" px[1] = x[4];");
2179  output_storage (" px[2] = x[3];");
2180  output_storage (" px[3] = x[2];");
2181  output_storage (" px[4] = x[1];");
2182  output_storage (" px[5] = x[0];");
2183  output_storage ("}");
2184  return;
2185 
2186  case COB_SUBSWP_S48:
2187  output_storage ("static COB_INLINE COB_A_INLINE void");
2188  output_storage ("cob_subswp_s48 (void *p, const int val)");
2189  output_storage ("{");
2190  output_storage (" cob_s64_t n = 0;");
2191  output_storage (" unsigned char *x;");
2192  output_storage (" unsigned char *px = p;");
2193 
2194  output_storage (" x = ((unsigned char *)&n) + 2;");
2195  output_storage (" x[0] = px[5];");
2196  output_storage (" x[1] = px[4];");
2197  output_storage (" x[2] = px[3];");
2198  output_storage (" x[3] = px[2];");
2199  output_storage (" x[4] = px[1];");
2200  output_storage (" x[5] = px[0];");
2201  output_storage (" n >>= 16; /* Shift with sign */");
2202  output_storage (" n -= val;");
2203  output_storage (" x = (unsigned char *)&n;");
2204  output_storage (" px[0] = x[5];");
2205  output_storage (" px[1] = x[4];");
2206  output_storage (" px[2] = x[3];");
2207  output_storage (" px[3] = x[2];");
2208  output_storage (" px[4] = x[1];");
2209  output_storage (" px[5] = x[0];");
2210  output_storage ("}");
2211  return;
2212 
2213  case COB_SUBSWP_U56:
2214  output_storage ("static COB_INLINE COB_A_INLINE void");
2215  output_storage ("cob_subswp_u56 (void *p, const int val)");
2216  output_storage ("{");
2217  output_storage (" cob_u64_t n = 0;");
2218  output_storage (" unsigned char *x;");
2219  output_storage (" unsigned char *px = p;");
2220 
2221  output_storage (" x = (unsigned char *)&n;");
2222  output_storage (" x[0] = px[6];");
2223  output_storage (" x[1] = px[5];");
2224  output_storage (" x[2] = px[4];");
2225  output_storage (" x[3] = px[3];");
2226  output_storage (" x[4] = px[2];");
2227  output_storage (" x[5] = px[1];");
2228  output_storage (" x[6] = px[0];");
2229  output_storage (" n -= val;");
2230  output_storage (" px[0] = x[6];");
2231  output_storage (" px[1] = x[5];");
2232  output_storage (" px[2] = x[4];");
2233  output_storage (" px[3] = x[3];");
2234  output_storage (" px[4] = x[2];");
2235  output_storage (" px[5] = x[1];");
2236  output_storage (" px[6] = x[0];");
2237  output_storage ("}");
2238  return;
2239 
2240  case COB_SUBSWP_S56:
2241  output_storage ("static COB_INLINE COB_A_INLINE void");
2242  output_storage ("cob_subswp_s56 (void *p, const int val)");
2243  output_storage ("{");
2244  output_storage (" cob_s64_t n = 0;");
2245  output_storage (" unsigned char *x;");
2246  output_storage (" unsigned char *px = p;");
2247 
2248  output_storage (" x = ((unsigned char *)&n) + 1;");
2249  output_storage (" x[0] = px[6];");
2250  output_storage (" x[1] = px[5];");
2251  output_storage (" x[2] = px[4];");
2252  output_storage (" x[3] = px[3];");
2253  output_storage (" x[4] = px[2];");
2254  output_storage (" x[5] = px[1];");
2255  output_storage (" x[6] = px[0];");
2256  output_storage (" n >>= 8; /* Shift with sign */");
2257  output_storage (" n -= val;");
2258  output_storage (" x = (unsigned char *)&n;");
2259  output_storage (" px[0] = x[6];");
2260  output_storage (" px[1] = x[5];");
2261  output_storage (" px[2] = x[4];");
2262  output_storage (" px[3] = x[3];");
2263  output_storage (" px[4] = x[2];");
2264  output_storage (" px[5] = x[1];");
2265  output_storage (" px[6] = x[0];");
2266  output_storage ("}");
2267  return;
2268 
2269  case COB_SUBSWP_U64:
2270  output_storage ("static COB_INLINE COB_A_INLINE void");
2271  output_storage ("cob_subswp_u64 (void *p, const int val)");
2272  output_storage ("{");
2273  output_storage (" cob_u64_t n;");
2274 
2275 #ifdef COB_ALLOW_UNALIGNED
2276  output_storage (" n = COB_BSWAP_64 (*(cob_u64_t __unaligned *)p);");
2277  output_storage (" n -= val;");
2278  output_storage (" *(cob_u64_t __unaligned *)p = COB_BSWAP_64(n);");
2279 #else
2280  output_storage (" unsigned char *x;");
2281  output_storage (" unsigned char *px = p;");
2282 
2283  output_storage (" x = (unsigned char *)&n;");
2284  output_storage (" x[0] = px[7];");
2285  output_storage (" x[1] = px[6];");
2286  output_storage (" x[2] = px[5];");
2287  output_storage (" x[3] = px[4];");
2288  output_storage (" x[4] = px[3];");
2289  output_storage (" x[5] = px[2];");
2290  output_storage (" x[6] = px[1];");
2291  output_storage (" x[7] = px[0];");
2292  output_storage (" n -= val;");
2293  output_storage (" px[0] = x[7];");
2294  output_storage (" px[1] = x[6];");
2295  output_storage (" px[2] = x[5];");
2296  output_storage (" px[3] = x[4];");
2297  output_storage (" px[4] = x[3];");
2298  output_storage (" px[5] = x[2];");
2299  output_storage (" px[6] = x[1];");
2300  output_storage (" px[7] = x[0];");
2301 #endif
2302  output_storage ("}");
2303  return;
2304 
2305  case COB_SUBSWP_S64:
2306  output_storage ("static COB_INLINE COB_A_INLINE void");
2307  output_storage ("cob_subswp_s64 (void *p, const int val)");
2308  output_storage ("{");
2309  output_storage (" cob_s64_t n;");
2310 
2311 #ifdef COB_ALLOW_UNALIGNED
2312  output_storage (" n = COB_BSWAP_64 (*(cob_s64_t __unaligned *)p);");
2313  output_storage (" n -= val;");
2314  output_storage (" *(cob_s64_t __unaligned *)p = COB_BSWAP_64(n);");
2315 #else
2316  output_storage (" unsigned char *x;");
2317  output_storage (" unsigned char *px = p;");
2318 
2319  output_storage (" x = (unsigned char *)&n;");
2320  output_storage (" x[0] = px[7];");
2321  output_storage (" x[1] = px[6];");
2322  output_storage (" x[2] = px[5];");
2323  output_storage (" x[3] = px[4];");
2324  output_storage (" x[4] = px[3];");
2325  output_storage (" x[5] = px[2];");
2326  output_storage (" x[6] = px[1];");
2327  output_storage (" x[7] = px[0];");
2328  output_storage (" n -= val;");
2329  output_storage (" px[0] = x[7];");
2330  output_storage (" px[1] = x[6];");
2331  output_storage (" px[2] = x[5];");
2332  output_storage (" px[3] = x[4];");
2333  output_storage (" px[4] = x[3];");
2334  output_storage (" px[5] = x[2];");
2335  output_storage (" px[6] = x[1];");
2336  output_storage (" px[7] = x[0];");
2337 #endif
2338  output_storage ("}");
2339  return;
2340 
2341  /* Binary set swapped value */
2342  case COB_SETSWP_U16:
2343  output_storage ("static COB_INLINE COB_A_INLINE void");
2344  output_storage ("cob_setswp_u16 (void *p, const int val)");
2345  output_storage ("{");
2346  output_storage (" unsigned short n;");
2347 
2348 #ifdef COB_ALLOW_UNALIGNED
2349  output_storage (" n = val;");
2350  output_storage (" *(unsigned short __unaligned *)p = COB_BSWAP_16(n);");
2351 #else
2352  output_storage (" unsigned char *x;");
2353  output_storage (" unsigned char *px = p;");
2354 
2355  output_storage (" n = val;");
2356  output_storage (" x = (unsigned char *)&n;");
2357  output_storage (" px[0] = x[1];");
2358  output_storage (" px[1] = x[0];");
2359 #endif
2360  output_storage ("}");
2361  return;
2362 
2363  case COB_SETSWP_S16:
2364  output_storage ("static COB_INLINE COB_A_INLINE void");
2365  output_storage ("cob_setswp_s16 (void *p, const int val)");
2366  output_storage ("{");
2367  output_storage (" short n;");
2368 
2369 #ifdef COB_ALLOW_UNALIGNED
2370  output_storage (" n = val;");
2371  output_storage (" *(short __unaligned *)p = COB_BSWAP_16(n);");
2372 #else
2373  output_storage (" unsigned char *x;");
2374  output_storage (" unsigned char *px = p;");
2375 
2376  output_storage (" n = val;");
2377  output_storage (" x = (unsigned char *)&n;");
2378  output_storage (" px[0] = x[1];");
2379  output_storage (" px[1] = x[0];");
2380 #endif
2381  output_storage ("}");
2382  return;
2383 
2384  case COB_SETSWP_U24:
2385  output_storage ("static COB_INLINE COB_A_INLINE void");
2386  output_storage ("cob_setswp_u24 (void *p, const int val)");
2387  output_storage ("{");
2388  output_storage (" unsigned char *x;");
2389  output_storage (" unsigned char *px = p;");
2390  output_storage (" unsigned int n;");
2391 
2392  output_storage (" n = val;");
2393  output_storage (" x = (unsigned char *)&n;");
2394  output_storage (" px[0] = x[2];");
2395  output_storage (" px[1] = x[1];");
2396  output_storage (" px[2] = x[0];");
2397  output_storage ("}");
2398  return;
2399 
2400  case COB_SETSWP_S24:
2401  output_storage ("static COB_INLINE COB_A_INLINE void");
2402  output_storage ("cob_setswp_s24 (void *p, const int val)");
2403  output_storage ("{");
2404  output_storage (" unsigned char *x;");
2405  output_storage (" unsigned char *px = p;");
2406  output_storage (" int n;");
2407 
2408  output_storage (" n = val;");
2409  output_storage (" x = (unsigned char *)&n;");
2410  output_storage (" px[0] = x[2];");
2411  output_storage (" px[1] = x[1];");
2412  output_storage (" px[2] = x[0];");
2413  output_storage ("}");
2414  return;
2415 
2416  case COB_SETSWP_U32:
2417  output_storage ("static COB_INLINE COB_A_INLINE void");
2418  output_storage ("cob_setswp_u32 (void *p, const int val)");
2419  output_storage ("{");
2420  output_storage (" unsigned int n;");
2421 
2422 #ifdef COB_ALLOW_UNALIGNED
2423  output_storage (" n = val;");
2424  output_storage (" *(unsigned int __unaligned *)p = COB_BSWAP_32(n);");
2425 #else
2426  output_storage (" unsigned char *x;");
2427  output_storage (" unsigned char *px = p;");
2428 
2429  output_storage (" n = val;");
2430  output_storage (" x = (unsigned char *)&n;");
2431  output_storage (" px[0] = x[3];");
2432  output_storage (" px[1] = x[2];");
2433  output_storage (" px[2] = x[1];");
2434  output_storage (" px[3] = x[0];");
2435 #endif
2436  output_storage ("}");
2437  return;
2438 
2439  case COB_SETSWP_S32:
2440  output_storage ("static COB_INLINE COB_A_INLINE void");
2441  output_storage ("cob_setswp_s32 (void *p, const int val)");
2442  output_storage ("{");
2443  output_storage (" int n;");
2444 
2445 #ifdef COB_ALLOW_UNALIGNED
2446  output_storage (" n = val;");
2447  output_storage (" *(int __unaligned *)p = COB_BSWAP_32(n);");
2448 #else
2449  output_storage (" unsigned char *x;");
2450  output_storage (" unsigned char *px = p;");
2451 
2452  output_storage (" n = val;");
2453  output_storage (" x = (unsigned char *)&n;");
2454  output_storage (" px[0] = x[3];");
2455  output_storage (" px[1] = x[2];");
2456  output_storage (" px[2] = x[1];");
2457  output_storage (" px[3] = x[0];");
2458 #endif
2459  output_storage ("}");
2460  return;
2461 
2462  case COB_SETSWP_U40:
2463  output_storage ("static COB_INLINE COB_A_INLINE void");
2464  output_storage ("cob_setswp_u40 (void *p, const int val)");
2465  output_storage ("{");
2466  output_storage (" cob_u64_t n;");
2467  output_storage (" unsigned char *x;");
2468  output_storage (" unsigned char *px = p;");
2469 
2470  output_storage (" n = val;");
2471  output_storage (" x = (unsigned char *)&n;");
2472  output_storage (" px[0] = x[4];");
2473  output_storage (" px[1] = x[3];");
2474  output_storage (" px[2] = x[2];");
2475  output_storage (" px[3] = x[1];");
2476  output_storage (" px[4] = x[0];");
2477  output_storage ("}");
2478  return;
2479 
2480  case COB_SETSWP_S40:
2481  output_storage ("static COB_INLINE COB_A_INLINE void");
2482  output_storage ("cob_setswp_s40 (void *p, const int val)");
2483  output_storage ("{");
2484  output_storage (" cob_s64_t n;");
2485  output_storage (" unsigned char *x;");
2486  output_storage (" unsigned char *px = p;");
2487 
2488  output_storage (" n = val;");
2489  output_storage (" x = (unsigned char *)&n;");
2490  output_storage (" px[0] = x[4];");
2491  output_storage (" px[1] = x[3];");
2492  output_storage (" px[2] = x[2];");
2493  output_storage (" px[3] = x[1];");
2494  output_storage (" px[4] = x[0];");
2495  output_storage ("}");
2496  return;
2497 
2498  case COB_SETSWP_U48:
2499  output_storage ("static COB_INLINE COB_A_INLINE void");
2500  output_storage ("cob_setswp_u48 (void *p, const int val)");
2501  output_storage ("{");
2502  output_storage (" cob_u64_t n;");
2503  output_storage (" unsigned char *x;");
2504  output_storage (" unsigned char *px = p;");
2505 
2506  output_storage (" n = val;");
2507  output_storage (" x = (unsigned char *)&n;");
2508  output_storage (" px[0] = x[5];");
2509  output_storage (" px[1] = x[4];");
2510  output_storage (" px[2] = x[3];");
2511  output_storage (" px[3] = x[2];");
2512  output_storage (" px[4] = x[1];");
2513  output_storage (" px[5] = x[0];");
2514  output_storage ("}");
2515  return;
2516 
2517  case COB_SETSWP_S48:
2518  output_storage ("static COB_INLINE COB_A_INLINE void");
2519  output_storage ("cob_setswp_s48 (void *p, const int val)");
2520  output_storage ("{");
2521  output_storage (" cob_s64_t n;");
2522  output_storage (" unsigned char *x;");
2523  output_storage (" unsigned char *px = p;");
2524 
2525  output_storage (" n = val;");
2526  output_storage (" x = (unsigned char *)&n;");
2527  output_storage (" px[0] = x[5];");
2528  output_storage (" px[1] = x[4];");
2529  output_storage (" px[2] = x[3];");
2530  output_storage (" px[3] = x[2];");
2531  output_storage (" px[4] = x[1];");
2532  output_storage (" px[5] = x[0];");
2533  output_storage ("}");
2534  return;
2535 
2536  case COB_SETSWP_U56:
2537  output_storage ("static COB_INLINE COB_A_INLINE void");
2538  output_storage ("cob_setswp_u56 (void *p, const int val)");
2539  output_storage ("{");
2540  output_storage (" cob_u64_t n;");
2541  output_storage (" unsigned char *x;");
2542  output_storage (" unsigned char *px = p;");
2543 
2544  output_storage (" n = val;");
2545  output_storage (" x = (unsigned char *)&n;");
2546  output_storage (" px[0] = x[6];");
2547  output_storage (" px[1] = x[5];");
2548  output_storage (" px[2] = x[4];");
2549  output_storage (" px[3] = x[3];");
2550  output_storage (" px[4] = x[2];");
2551  output_storage (" px[5] = x[1];");
2552  output_storage (" px[6] = x[0];");
2553  output_storage ("}");
2554  return;
2555 
2556  case COB_SETSWP_S56:
2557  output_storage ("static COB_INLINE COB_A_INLINE void");
2558  output_storage ("cob_setswp_s56 (void *p, const int val)");
2559  output_storage ("{");
2560  output_storage (" cob_s64_t n;");
2561  output_storage (" unsigned char *x;");
2562  output_storage (" unsigned char *px = p;");
2563 
2564  output_storage (" n = val;");
2565  output_storage (" x = (unsigned char *)&n;");
2566  output_storage (" px[0] = x[6];");
2567  output_storage (" px[1] = x[5];");
2568  output_storage (" px[2] = x[4];");
2569  output_storage (" px[3] = x[3];");
2570  output_storage (" px[4] = x[2];");
2571  output_storage (" px[5] = x[1];");
2572  output_storage (" px[6] = x[0];");
2573  output_storage ("}");
2574  return;
2575 
2576  case COB_SETSWP_U64:
2577  output_storage ("static COB_INLINE COB_A_INLINE void");
2578  output_storage ("cob_setswp_u64 (void *p, const int val)");
2579  output_storage ("{");
2580  output_storage (" cob_u64_t n;");
2581 
2582 #ifdef COB_ALLOW_UNALIGNED
2583  output_storage (" n = val;");
2584  output_storage (" *(cob_u64_t __unaligned *)p = COB_BSWAP_64(n);");
2585 #else
2586  output_storage (" unsigned char *x;");
2587  output_storage (" unsigned char *px = p;");
2588 
2589  output_storage (" n = val;");
2590  output_storage (" x = (unsigned char *)&n;");
2591  output_storage (" px[0] = x[7];");
2592  output_storage (" px[1] = x[6];");
2593  output_storage (" px[2] = x[5];");
2594  output_storage (" px[3] = x[4];");
2595  output_storage (" px[4] = x[3];");
2596  output_storage (" px[5] = x[2];");
2597  output_storage (" px[6] = x[1];");
2598  output_storage (" px[7] = x[0];");
2599 #endif
2600  output_storage ("}");
2601  return;
2602 
2603  case COB_SETSWP_S64:
2604  output_storage ("static COB_INLINE COB_A_INLINE void");
2605  output_storage ("cob_setswp_s64 (void *p, const int val)");
2606  output_storage ("{");
2607  output_storage (" cob_s64_t n;");
2608 
2609 #ifdef COB_ALLOW_UNALIGNED
2610  output_storage (" n = val;");
2611  output_storage (" *(cob_s64_t __unaligned *)p = COB_BSWAP_64(n);");
2612 #else
2613  output_storage (" unsigned char *x;");
2614  output_storage (" unsigned char *px = p;");
2615 
2616  output_storage (" n = val;");
2617  output_storage (" x = (unsigned char *)&n;");
2618  output_storage (" px[0] = x[7];");
2619  output_storage (" px[1] = x[6];");
2620  output_storage (" px[2] = x[5];");
2621  output_storage (" px[3] = x[4];");
2622  output_storage (" px[4] = x[3];");
2623  output_storage (" px[5] = x[2];");
2624  output_storage (" px[6] = x[1];");
2625  output_storage (" px[7] = x[0];");
2626 #endif
2627  output_storage ("}");
2628  return;
2629  default:
2630  break;
2631  }
2632  cobc_abort_pr (_("Unexpected optimization value"));
2633  COBC_ABORT ();
2634 }
void cobc_abort_pr(const char *fmt,...)
Definition: cobc.c:587
static void output_storage(const char *fmt,...)
Definition: codeoptim.c:35
#define _(s)
Definition: cobcrun.c:59
#define COBC_ABORT()
Definition: cobc.h:61

Here is the call graph for this function:

Here is the caller graph for this function:

DECLNORET void cobc_abort ( const char *  ,
const int   
)

Definition at line 606 of file cobc.c.

References _, cobc_abort_pr(), and cobc_abort_terminate().

Referenced by cobc_dumb_abort().

607 {
608  cobc_abort_pr (_("%s:%d Internal compiler error"), filename, linenum);
610 }
void cobc_abort_pr(const char *fmt,...)
Definition: cobc.c:587
#define _(s)
Definition: cobcrun.c:59
static DECLNORET void COB_A_NORETURN cobc_abort_terminate(void)
Definition: cobc.c:1486
Definition: cobc.h:195

Here is the call graph for this function:

Here is the caller graph for this function:

void* cobc_check_string ( const char *  )

Definition at line 951 of file cobc.c.

References _, base_string, cobc_abort_pr(), cobc_abort_terminate(), cobc_main_malloc(), cobc_main_strdup(), strcache::next, unlikely, and strcache::val.

Referenced by cb_build_binary_picture(), cb_build_picture(), cb_define_list_add(), and cb_encode_program_id().

952 {
953  struct strcache *s;
954 
955 #ifdef COB_TREE_DEBUG
956  if (unlikely(!dupstr)) {
957  cobc_abort_pr (_("Call to %s with NULL pointer"), "cobc_check_string");
959  }
960 #endif
961  for (s = base_string; s; s = s->next) {
962  if (!strcmp (dupstr, (const char *)s->val)) {
963  return s->val;
964  }
965  }
966  s = cobc_main_malloc (sizeof(struct strcache));
967  s->next = base_string;
968  s->val = cobc_main_strdup (dupstr);
969  base_string = s;
970  return s->val;
971 }
Definition: cobc.c:65
void * cobc_main_malloc(const size_t size)
Definition: cobc.c:702
void cobc_abort_pr(const char *fmt,...)
Definition: cobc.c:587
static struct strcache * base_string
Definition: cobc.c:248
struct strcache * next
Definition: cobc.c:66
#define _(s)
Definition: cobcrun.c:59
#define unlikely(x)
Definition: common.h:437
void * cobc_main_strdup(const char *dupstr)
Definition: cobc.c:720
void * val
Definition: cobc.c:67
static DECLNORET void COB_A_NORETURN cobc_abort_terminate(void)
Definition: cobc.c:1486

Here is the call graph for this function:

Here is the caller graph for this function:

size_t cobc_check_valid_name ( const char *  ,
const unsigned  int 
)

Definition at line 1142 of file cobc.c.

References cob_csyns, COB_NUM_CSYNS, cobc_bcompare(), and cobc_error_name().

Referenced by cb_build_program_id(), process_filename(), and yyparse().

1143 {
1144  const char *p;
1145  size_t len;
1146 
1147  for (p = name, len = 0; *p; p++, len++) {
1148  if (*p == '/' || *p == '\\') {
1149  cobc_error_name (name, prechk, 5U);
1150  return 1;
1151  }
1152  }
1153  if (len < 1) {
1154  cobc_error_name (name, prechk, 1U);
1155  return 1;
1156  }
1157  if (!cb_relaxed_syntax_check && len > 31) {
1158  cobc_error_name (name, prechk, 1U);
1159  return 1;
1160  }
1161  if (*name == '_' || *name == ' ') {
1162  cobc_error_name (name, prechk, 2U);
1163  return 1;
1164  }
1165  if (prechk && len > 3 &&
1166  (!memcmp (name, "cob_", (size_t)4) ||
1167  !memcmp (name, "COB_", (size_t)4))) {
1168  cobc_error_name (name, prechk, 3U);
1169  return 1;
1170  }
1171  if (bsearch (name, cob_csyns, COB_NUM_CSYNS,
1172  sizeof (char *), cobc_bcompare)) {
1173  cobc_error_name (name, prechk, 4U);
1174  return 1;
1175  }
1176  return 0;
1177 }
#define COB_NUM_CSYNS
Definition: cobc.c:388
static void cobc_error_name(const char *name, const unsigned int source, const unsigned int reason)
Definition: cobc.c:1095
static int cobc_bcompare(const void *p1, const void *p2)
Definition: cobc.c:1086
static const char *const cob_csyns[]
Definition: cobc.c:292

Here is the call graph for this function:

Here is the caller graph for this function:

DECLNORET void cobc_dumb_abort ( const char *  ,
const int   
)

Definition at line 613 of file cobc.c.

References cobc_abort().

614 {
615  cobc_abort (filename, linenum);
616 }
void cobc_abort(const char *filename, const int linenum)
Definition: cobc.c:606
Definition: cobc.h:195

Here is the call graph for this function:

void cobc_free ( void *  )

Definition at line 657 of file cobc.c.

References _, cobc_abort_pr(), cobc_abort_terminate(), and unlikely.

Referenced by cb_define_list_add(), cb_reset_78(), cb_reset_global_78(), clear_initial_values(), cobc_cmd_print(), cobc_deciph_funcs(), cobc_free_mem(), cobc_main_free(), cobc_main_realloc(), cobc_parse_free(), cobc_parse_realloc(), cobc_var_print(), main(), plex_clear_all(), ppecho(), pplex(), preprocess(), process(), process_env_copy_path(), scan_define_options(), ylex_clear_all(), and yylex().

658 {
659 #ifdef COB_TREE_DEBUG
660  if (unlikely(!mptr)) {
661  cobc_abort_pr (_("Call to %s with NULL pointer"), "cobc_free");
663  }
664 #endif
665  free(mptr);
666 }
void cobc_abort_pr(const char *fmt,...)
Definition: cobc.c:587
#define _(s)
Definition: cobcrun.c:59
#define unlikely(x)
Definition: common.h:437
static DECLNORET void COB_A_NORETURN cobc_abort_terminate(void)
Definition: cobc.c:1486

Here is the call graph for this function:

Here is the caller graph for this function:

void cobc_init_reserved ( void  )

Definition at line 3133 of file reserved.c.

References cob_lower_tab, pcob_lower_tab, and pcob_lower_val.

Referenced by main().

3134 {
3135  const unsigned char *p;
3136  const unsigned char *v;
3137 
3138  memset (cob_lower_tab, 0, sizeof(cob_lower_tab));
3139  p = pcob_lower_tab;
3140  v = pcob_lower_val;
3141  for (; *p; ++p, ++v) {
3142  cob_lower_tab[*p] = *v;
3143  }
3144 }
static unsigned char cob_lower_tab[256]
Definition: reserved.c:2522
static const unsigned char pcob_lower_val[]
Definition: reserved.c:2524
static const unsigned char pcob_lower_tab[]
Definition: reserved.c:2523

Here is the caller graph for this function:

void cobc_init_scanner ( void  )

Definition at line 4922 of file scanner.c.

Referenced by main().

4923 {
4924  const unsigned char *p;
4925 
4926  memset (valid_char, 0, sizeof(valid_char));
4927  for (p = pvalid_char; *p; ++p) {
4928  valid_char[*p] = 1;
4929  }
4930 }
static const unsigned char pvalid_char[]
Definition: scanner.c:1521
static unsigned char valid_char[256]
Definition: scanner.c:1520

Here is the caller graph for this function:

void cobc_init_typeck ( void  )

Definition at line 8747 of file typeck.c.

References expr_prio, pvalid_char, and valid_char.

Referenced by main().

8748 {
8749  const unsigned char *p;
8750 
8751  memset (valid_char, 0, sizeof(valid_char));
8752  for (p = pvalid_char; *p; ++p) {
8753  valid_char[*p] = 1;
8754  }
8755  memset(expr_prio, 0, sizeof(expr_prio));
8756  expr_prio['x' & 0xFF] = 0;
8757  expr_prio['^' & 0xFF] = 1;
8758  expr_prio['*' & 0xFF] = 2;
8759  expr_prio['/' & 0xFF] = 2;
8760  expr_prio['+' & 0xFF] = 3;
8761  expr_prio['-' & 0xFF] = 3;
8762  expr_prio['=' & 0xFF] = 4;
8763  expr_prio['~' & 0xFF] = 4;
8764  expr_prio['<' & 0xFF] = 4;
8765  expr_prio['>' & 0xFF] = 4;
8766  expr_prio['[' & 0xFF] = 4;
8767  expr_prio[']' & 0xFF] = 4;
8768  expr_prio['!' & 0xFF] = 5;
8769  expr_prio['&' & 0xFF] = 6;
8770  expr_prio['|' & 0xFF] = 7;
8771  expr_prio[')' & 0xFF] = 8;
8772  expr_prio['(' & 0xFF] = 9;
8773  expr_prio[0] = 10;
8774 }
static const unsigned char pvalid_char[]
Definition: typeck.c:201
static unsigned char valid_char[256]
Definition: typeck.c:200
static unsigned char expr_prio[256]
Definition: typeck.c:199

Here is the caller graph for this function:

void cobc_main_free ( void *  )

Definition at line 778 of file cobc.c.

References _, cobc_abort_pr(), cobc_abort_terminate(), cobc_free(), cobc_mem_struct::memptr, cobc_mem_struct::next, NULL, and unlikely.

Referenced by delete_reserved_word_from_list().

779 {
780  struct cobc_mem_struct *curr;
781  struct cobc_mem_struct *prev;
782 
783  prev = NULL;
784  for (curr = cobc_mainmem_base; curr; curr = curr->next) {
785  if (curr->memptr == prevptr) {
786  break;
787  }
788  prev = curr;
789  }
790  if (unlikely(!curr)) {
791 #ifdef COB_TREE_DEBUG
792  cobc_abort_pr (_("Call to %s with invalid pointer, as it is missing in list"), "cobc_main_free");
794 #else
795  return;
796 #endif
797  }
798  if (prev) {
799  prev->next = curr->next;
800  } else {
801  /* At mainmem_base */
802  cobc_mainmem_base = curr->next;
803  }
804  cobc_free (curr);
805 }
void cobc_abort_pr(const char *fmt,...)
Definition: cobc.c:587
void * memptr
Definition: cobc.h:232
void cobc_free(void *mptr)
Definition: cobc.c:657
static struct cobc_mem_struct * cobc_mainmem_base
Definition: cobc.c:220
#define _(s)
Definition: cobcrun.c:59
#define unlikely(x)
Definition: common.h:437
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 DECLNORET void COB_A_NORETURN cobc_abort_terminate(void)
Definition: cobc.c:1486
struct cobc_mem_struct * next
Definition: cobc.h:231

Here is the call graph for this function:

Here is the caller graph for this function:

void* cobc_main_malloc ( const size_t  )

Definition at line 702 of file cobc.c.

References _, cobc_abort_pr(), cobc_abort_terminate(), cobc_mainmem_base, cobc_mem_struct::memlen, cobc_mem_struct::memptr, cobc_mem_struct::next, and unlikely.

Referenced by add_reserved_word_without_init(), allocate_str_removing_asterisk(), ambiguous_error(), cb_build_class_name(), cb_build_picture(), cb_define_list_add(), cb_expr_init(), cb_int(), cb_text_list_add(), cobc_check_string(), cobc_main_strdup(), cobc_set_value(), cobc_stradd_dup(), codegen(), finalize_file(), get_reserved_words_from_user_list(), main(), output_initialize_one(), process_assemble(), process_command_line(), process_filename(), process_module_direct(), process_translate(), and undefined_error().

703 {
704  struct cobc_mem_struct *m;
705 
706  m = calloc ((size_t)1, sizeof(struct cobc_mem_struct) + size);
707  if (unlikely(!m)) {
708  cobc_abort_pr (_("Cannot allocate %d bytes of memory - Aborting"),
709  (int)size);
711  }
712  m->next = cobc_mainmem_base;
713  m->memptr = (char *)m + sizeof(struct cobc_mem_struct);
714  m->memlen = size;
715  cobc_mainmem_base = m;
716  return m->memptr;
717 }
void cobc_abort_pr(const char *fmt,...)
Definition: cobc.c:587
void * memptr
Definition: cobc.h:232
static struct cobc_mem_struct * cobc_mainmem_base
Definition: cobc.c:220
#define _(s)
Definition: cobcrun.c:59
#define unlikely(x)
Definition: common.h:437
size_t memlen
Definition: cobc.h:233
static DECLNORET void COB_A_NORETURN cobc_abort_terminate(void)
Definition: cobc.c:1486
struct cobc_mem_struct * next
Definition: cobc.h:231

Here is the call graph for this function:

Here is the caller graph for this function:

void* cobc_main_realloc ( void *  ,
const size_t   
)

Definition at line 738 of file cobc.c.

References _, cobc_abort_pr(), cobc_abort_terminate(), cobc_free(), cobc_mem_struct::memlen, cobc_mem_struct::memptr, cobc_mem_struct::next, NULL, and unlikely.

Referenced by cb_expr_shift(), cobc_add_str(), cobc_chk_buff_size(), file_basename(), and output_initialize_one().

739 {
740  struct cobc_mem_struct *m;
741  struct cobc_mem_struct *curr;
742  struct cobc_mem_struct *prev;
743 
744  m = calloc ((size_t)1, sizeof(struct cobc_mem_struct) + size);
745  if (unlikely(!m)) {
746  cobc_abort_pr (_("Cannot allocate %d bytes of memory - Aborting"),
747  (int)size);
749  }
750  m->memptr = (char *)m + sizeof(struct cobc_mem_struct);
751  m->memlen = size;
752 
753  prev = NULL;
754  for (curr = cobc_mainmem_base; curr; curr = curr->next) {
755  if (curr->memptr == prevptr) {
756  break;
757  }
758  prev = curr;
759  }
760  if (unlikely(!curr)) {
761  cobc_abort_pr (_("Attempt to reallocate non-allocated memory - Aborting"));
763  }
764  m->next = curr->next;
765  if (prev) {
766  prev->next = m;
767  } else {
768  /* At mainmem_base */
769  cobc_mainmem_base = m;
770  }
771  memcpy (m->memptr, curr->memptr, curr->memlen);
772  cobc_free (curr);
773 
774  return m->memptr;
775 }
void cobc_abort_pr(const char *fmt,...)
Definition: cobc.c:587
void * memptr
Definition: cobc.h:232
void cobc_free(void *mptr)
Definition: cobc.c:657
static struct cobc_mem_struct * cobc_mainmem_base
Definition: cobc.c:220
#define _(s)
Definition: cobcrun.c:59
#define unlikely(x)
Definition: common.h:437
EC ARGUMENT EC EC BOUND EC BOUND EC BOUND EC BOUND TABLE EC DATA EC DATA EC DATA PTR NULL
Definition: exception.def:95
size_t memlen
Definition: cobc.h:233
static DECLNORET void COB_A_NORETURN cobc_abort_terminate(void)
Definition: cobc.c:1486
struct cobc_mem_struct * next
Definition: cobc.h:231

Here is the call graph for this function:

Here is the caller graph for this function:

void* cobc_main_strdup ( const char *  )

Definition at line 720 of file cobc.c.

References _, cobc_abort_pr(), cobc_abort_terminate(), cobc_main_malloc(), and unlikely.

Referenced by cb_text_list_add(), cobc_check_string(), cobc_getenv(), cobc_set_value(), main(), process_command_line(), process_filename(), process_link(), and read_string().

721 {
722  void *p;
723  size_t n;
724 
725 #ifdef COB_TREE_DEBUG
726  if (unlikely(!dupstr)) {
727  cobc_abort_pr (_("Call to %s with NULL pointer"), "cobc_main_strdup");
729  }
730 #endif
731  n = strlen (dupstr);
732  p = cobc_main_malloc (n + 1);
733  memcpy (p, dupstr, n);
734  return p;
735 }
void * cobc_main_malloc(const size_t size)
Definition: cobc.c:702
void cobc_abort_pr(const char *fmt,...)
Definition: cobc.c:587
#define _(s)
Definition: cobcrun.c:59
#define unlikely(x)
Definition: common.h:437
static DECLNORET void COB_A_NORETURN cobc_abort_terminate(void)
Definition: cobc.c:1486

Here is the call graph for this function:

Here is the caller graph for this function:

void* cobc_malloc ( const size_t  )

Definition at line 643 of file cobc.c.

References _, cobc_abort_pr(), cobc_abort_terminate(), and unlikely.

Referenced by cb_add_78(), cb_add_const_var(), cobc_strdup(), ppopen(), and process().

644 {
645  void *mptr;
646 
647  mptr = calloc ((size_t)1, size);
648  if (unlikely(!mptr)) {
649  cobc_abort_pr (_("Cannot allocate %d bytes of memory - Aborting"),
650  (int)size);
652  }
653  return mptr;
654 }
void cobc_abort_pr(const char *fmt,...)
Definition: cobc.c:587
#define _(s)
Definition: cobcrun.c:59
#define unlikely(x)
Definition: common.h:437
static DECLNORET void COB_A_NORETURN cobc_abort_terminate(void)
Definition: cobc.c:1486

Here is the call graph for this function:

Here is the caller graph for this function:

void cobc_parse_free ( void *  )

Definition at line 885 of file cobc.c.

References _, cobc_abort_pr(), cobc_abort_terminate(), cobc_free(), cobc_mem_struct::memptr, cobc_mem_struct::next, NULL, and unlikely.

Referenced by cb_build_move_literal(), remove_program_name(), terminator_clear(), terminator_error(), terminator_warning(), and yyparse().

886 {
887  struct cobc_mem_struct *curr;
888  struct cobc_mem_struct *prev;
889 
890  prev = NULL;
891  for (curr = cobc_parsemem_base; curr; curr = curr->next) {
892  if (curr->memptr == prevptr) {
893  break;
894  }
895  prev = curr;
896  }
897  if (unlikely(!curr)) {
898 #ifdef COB_TREE_DEBUG
899  cobc_abort_pr (_("Call to %s with invalid pointer, as it is missing in list"), "cobc_parse_free");
901 #else
902  return;
903 #endif
904  }
905  if (prev) {
906  prev->next = curr->next;
907  } else {
908  /* At parsemem_base */
909  cobc_parsemem_base = curr->next;
910  }
911  cobc_free (curr);
912 }
void cobc_abort_pr(const char *fmt,...)
Definition: cobc.c:587
void * memptr
Definition: cobc.h:232
void cobc_free(void *mptr)
Definition: cobc.c:657
#define _(s)
Definition: cobcrun.c:59
#define unlikely(x)
Definition: common.h:437
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 DECLNORET void COB_A_NORETURN cobc_abort_terminate(void)
Definition: cobc.c:1486
static struct cobc_mem_struct * cobc_parsemem_base
Definition: cobc.c:221
struct cobc_mem_struct * next
Definition: cobc.h:231

Here is the call graph for this function:

Here is the caller graph for this function:

void* cobc_parse_malloc ( const size_t  )

Definition at line 809 of file cobc.c.

References _, cobc_abort_pr(), cobc_abort_terminate(), cobc_parsemem_base, cobc_mem_struct::memlen, cobc_mem_struct::memptr, cobc_mem_struct::next, and unlikely.

Referenced by add_contained_prog(), attach_attrib_to_cur_stmt(), build_literal(), cb_build_label(), cb_build_move(), cb_build_move_literal(), cb_build_picture(), cb_build_program(), cb_name(), cb_validate_program_body(), cobc_parse_strdup(), concat_literals(), lookup_attr(), lookup_call(), lookup_func_call(), lookup_literal(), lookup_string(), lookup_word(), make_tree(), output_base(), output_internal_function(), output_param(), output_perform_call(), set_up_use_file(), validate_field_1(), and yyparse().

810 {
811  struct cobc_mem_struct *m;
812 
813  m = calloc ((size_t)1, sizeof(struct cobc_mem_struct) + size);
814  if (unlikely(!m)) {
815  cobc_abort_pr (_("Cannot allocate %d bytes of memory - Aborting"),
816  (int)size);
818  }
820  m->memptr = (char *)m + sizeof(struct cobc_mem_struct);
821  m->memlen = size;
822  cobc_parsemem_base = m;
823  return m->memptr;
824 }
void cobc_abort_pr(const char *fmt,...)
Definition: cobc.c:587
void * memptr
Definition: cobc.h:232
#define _(s)
Definition: cobcrun.c:59
#define unlikely(x)
Definition: common.h:437
size_t memlen
Definition: cobc.h:233
static DECLNORET void COB_A_NORETURN cobc_abort_terminate(void)
Definition: cobc.c:1486
static struct cobc_mem_struct * cobc_parsemem_base
Definition: cobc.c:221
struct cobc_mem_struct * next
Definition: cobc.h:231

Here is the call graph for this function:

Here is the caller graph for this function:

void* cobc_parse_realloc ( void *  ,
const size_t   
)

Definition at line 845 of file cobc.c.

References _, cobc_abort_pr(), cobc_abort_terminate(), cobc_free(), cobc_mem_struct::memlen, cobc_mem_struct::memptr, cobc_mem_struct::next, NULL, and unlikely.

846 {
847  struct cobc_mem_struct *m;
848  struct cobc_mem_struct *curr;
849  struct cobc_mem_struct *prev;
850 
851  m = calloc ((size_t)1, sizeof(struct cobc_mem_struct) + size);
852  if (unlikely(!m)) {
853  cobc_abort_pr (_("Cannot allocate %d bytes of memory - Aborting"),
854  (int)size);
856  }
857  m->memptr = (char *)m + sizeof(struct cobc_mem_struct);
858  m->memlen = size;
859 
860  prev = NULL;
861  for (curr = cobc_parsemem_base; curr; curr = curr->next) {
862  if (curr->memptr == prevptr) {
863  break;
864  }
865  prev = curr;
866  }
867  if (unlikely(!curr)) {
868  cobc_abort_pr (_("Attempt to reallocate non-allocated memory - Aborting"));
870  }
871  m->next = curr->next;
872  if (prev) {
873  prev->next = m;
874  } else {
875  /* At parsemem_base */
876  cobc_parsemem_base = m;
877  }
878  memcpy (m->memptr, curr->memptr, curr->memlen);
879  cobc_free (curr);
880 
881  return m->memptr;
882 }
void cobc_abort_pr(const char *fmt,...)
Definition: cobc.c:587
void * memptr
Definition: cobc.h:232
void cobc_free(void *mptr)
Definition: cobc.c:657
#define _(s)
Definition: cobcrun.c:59
#define unlikely(x)
Definition: common.h:437
EC ARGUMENT EC EC BOUND EC BOUND EC BOUND EC BOUND TABLE EC DATA EC DATA EC DATA PTR NULL
Definition: exception.def:95
size_t memlen
Definition: cobc.h:233
static DECLNORET void COB_A_NORETURN cobc_abort_terminate(void)
Definition: cobc.c:1486
static struct cobc_mem_struct * cobc_parsemem_base
Definition: cobc.c:221
struct cobc_mem_struct * next
Definition: cobc.h:231

Here is the call graph for this function:

void* cobc_parse_strdup ( const char *  )

Definition at line 827 of file cobc.c.

References _, cobc_abort_pr(), cobc_abort_terminate(), cobc_parse_malloc(), and unlikely.

Referenced by cb_build_class_name(), cb_build_debug(), cb_emit_evaluate(), cb_to_cname(), lookup_string(), lookup_word(), and yylex().

828 {
829  void *p;
830  size_t n;
831 
832 #ifdef COB_TREE_DEBUG
833  if (unlikely(!dupstr)) {
834  cobc_abort_pr (_("Call to %s with NULL pointer"), "cobc_parse_strdup");
836  }
837 #endif
838  n = strlen (dupstr);
839  p = cobc_parse_malloc (n + 1);
840  memcpy (p, dupstr, n);
841  return p;
842 }
void cobc_abort_pr(const char *fmt,...)
Definition: cobc.c:587
void * cobc_parse_malloc(const size_t size)
Definition: cobc.c:809
#define _(s)
Definition: cobcrun.c:59
#define unlikely(x)
Definition: common.h:437
static DECLNORET void COB_A_NORETURN cobc_abort_terminate(void)
Definition: cobc.c:1486

Here is the call graph for this function:

Here is the caller graph for this function:

void* cobc_plex_malloc ( const size_t  )

Definition at line 916 of file cobc.c.

References _, cobc_abort_pr(), cobc_abort_terminate(), cobc_plexmem_base, cobc_mem_struct::memptr, cobc_mem_struct::next, and unlikely.

Referenced by cobc_plex_strdup(), pp_text_list_add(), ppp_define_add(), ppp_list_add(), ppp_replace_list_add(), and ppparse().

917 {
918  struct cobc_mem_struct *m;
919 
920  m = calloc ((size_t)1, sizeof(struct cobc_mem_struct) + size);
921  if (unlikely(!m)) {
922  cobc_abort_pr (_("Cannot allocate %d bytes of memory - Aborting"),
923  (int)size);
925  }
926  m->memptr = (char *)m + sizeof(struct cobc_mem_struct);
927  m->next = cobc_plexmem_base;
928  cobc_plexmem_base = m;
929  return m->memptr;
930 }
void cobc_abort_pr(const char *fmt,...)
Definition: cobc.c:587
static struct cobc_mem_struct * cobc_plexmem_base
Definition: cobc.c:222
void * memptr
Definition: cobc.h:232
#define _(s)
Definition: cobcrun.c:59
#define unlikely(x)
Definition: common.h:437
static DECLNORET void COB_A_NORETURN cobc_abort_terminate(void)
Definition: cobc.c:1486
struct cobc_mem_struct * next
Definition: cobc.h:231

Here is the call graph for this function:

Here is the caller graph for this function:

void* cobc_plex_strdup ( const char *  )

Definition at line 933 of file cobc.c.

References _, cobc_abort_pr(), cobc_abort_terminate(), cobc_plex_malloc(), and unlikely.

Referenced by pplex(), ppp_define_add(), ppp_list_add(), ppp_set_value(), and switch_to_buffer().

934 {
935  void *p;
936  size_t n;
937 
938 #ifdef COB_TREE_DEBUG
939  if (unlikely(!dupstr)) {
940  cobc_abort_pr (_("Call to %s with NULL pointer"), "cobc_plex_strdup");
942  }
943 #endif
944  n = strlen (dupstr);
945  p = cobc_plex_malloc (n + 1);
946  memcpy (p, dupstr, n);
947  return p;
948 }
void cobc_abort_pr(const char *fmt,...)
Definition: cobc.c:587
#define _(s)
Definition: cobcrun.c:59
#define unlikely(x)
Definition: common.h:437
void * cobc_plex_malloc(const size_t size)
Definition: cobc.c:916
static DECLNORET void COB_A_NORETURN cobc_abort_terminate(void)
Definition: cobc.c:1486

Here is the call graph for this function:

Here is the caller graph for this function:

void* cobc_realloc ( void *  ,
const size_t   
)

Definition at line 687 of file cobc.c.

References _, cobc_abort_pr(), cobc_abort_terminate(), and unlikely.

Referenced by read_literal(), scan_x(), and scan_z().

688 {
689  void *mptr;
690 
691  mptr = realloc (prevptr, size);
692  if (unlikely(!mptr)) {
693  cobc_abort_pr (_("Cannot reallocate %d bytes of memory - Aborting"),
694  (int)size);
696  }
697  return mptr;
698 }
void cobc_abort_pr(const char *fmt,...)
Definition: cobc.c:587
#define _(s)
Definition: cobcrun.c:59
#define unlikely(x)
Definition: common.h:437
static DECLNORET void COB_A_NORETURN cobc_abort_terminate(void)
Definition: cobc.c:1486

Here is the call graph for this function:

Here is the caller graph for this function:

void* cobc_strdup ( const char *  )

Definition at line 669 of file cobc.c.

References _, cobc_abort_pr(), cobc_abort_terminate(), cobc_malloc(), and unlikely.

Referenced by cb_build_program_id(), cb_define_list_add(), cobc_cmd_print(), cobc_deciph_funcs(), cobc_var_print(), ppecho(), ppopen(), process_command_line(), process_env_copy_path(), scan_define_options(), and yylex().

670 {
671  void *p;
672  size_t n;
673 
674 #ifdef COB_TREE_DEBUG
675  if (unlikely(!dupstr)) {
676  cobc_abort_pr (_("Call to %s with NULL pointer"), "cobc_strdup");
678  }
679 #endif
680  n = strlen (dupstr);
681  p = cobc_malloc (n + 1);
682  memcpy (p, dupstr, n);
683  return p;
684 }
void cobc_abort_pr(const char *fmt,...)
Definition: cobc.c:587
#define _(s)
Definition: cobcrun.c:59
#define unlikely(x)
Definition: common.h:437
void * cobc_malloc(const size_t size)
Definition: cobc.c:643
static DECLNORET void COB_A_NORETURN cobc_abort_terminate(void)
Definition: cobc.c:1486

Here is the call graph for this function:

Here is the caller graph for this function:

DECLNORET void cobc_too_many_errors ( void  )

Definition at line 599 of file cobc.c.

References _, cobc_abort_pr(), and cobc_abort_terminate().

Referenced by cb_error(), cb_error_x(), and cb_plex_error().

600 {
601  cobc_abort_pr (_("Too many errors - Aborting compilation"));
603 }
void cobc_abort_pr(const char *fmt,...)
Definition: cobc.c:587
#define _(s)
Definition: cobcrun.c:59
static DECLNORET void COB_A_NORETURN cobc_abort_terminate(void)
Definition: cobc.c:1486

Here is the call graph for this function:

Here is the caller graph for this function:

void configuration_error ( const char *  ,
const int  ,
const int  ,
const char *  ,
  ... 
)

Definition at line 178 of file error.c.

References _, conf_error_displayed, last_error_file, last_error_line, and line.

Referenced by cb_config_entry(), cb_load_conf(), cb_load_conf_file(), get_user_specified_reserved_word(), invalid_value(), and unsupported_value().

179 {
180  va_list args;
181 
182  if (!conf_error_displayed) {
184  fputs (_("Configuration Error"), stderr);
185  putc ('\n', stderr);
186  }
187 
188 
189  /* Prefix */
190  if (fname != last_error_file
191  || line != last_error_line) {
192  last_error_file = fname;
194  if (fname) {
195  fprintf (stderr, "%s: ", fname);
196  } else {
197  fputs ("cb_conf: ", stderr);
198  }
199  if (line) {
200  fprintf (stderr, "%d: ", line);
201  }
202  }
203 
204  /* Body */
205  va_start(args, fmt);
206  vfprintf (stderr, fmt, args);
207  va_end(args);
208 
209  /* Postfix */
210  if (!finish_error) {
211  putc(';', stderr);
212  putc('\n', stderr);
213  putc('\t', stderr);
214  } else {
215  putc('\n', stderr);
216  fflush(stderr);
217  }
218 }
static int conf_error_displayed
Definition: error.c:38
#define _(s)
Definition: cobcrun.c:59
static int last_error_line
Definition: error.c:39
if fold fold static computed alternate extra correct stack on syntax debugging line
Definition: flag.def:90
static const char * last_error_file
Definition: error.c:40

Here is the caller graph for this function:

void configuration_warning ( const char *  ,
const int  ,
const char *  ,
  ... 
)

Definition at line 144 of file error.c.

References _, conf_error_displayed, last_error_file, last_error_line, and line.

Referenced by cb_load_conf(), and initialize_alias_for().

145 {
146  va_list args;
147 
149  fputs (_("Configuration Warning"), stderr);
150  fputs (": ", stderr);
151 
152 
153  /* Prefix */
154  if (fname != last_error_file
155  || line != last_error_line) {
156  last_error_file = fname;
158  if (fname) {
159  fprintf (stderr, "%s: ", fname);
160  } else {
161  fputs ("cb_conf: ", stderr);
162  }
163  if (line) {
164  fprintf (stderr, "%d: ", line);
165  }
166  }
167 
168  /* Body */
169  va_start(args, fmt);
170  vfprintf (stderr, fmt, args);
171  va_end(args);
172 
173  /* Postfix */
174  putc('\n', stderr);
175  fflush(stderr);
176 }
static int conf_error_displayed
Definition: error.c:38
#define _(s)
Definition: cobcrun.c:59
static int last_error_line
Definition: error.c:39
if fold fold static computed alternate extra correct stack on syntax debugging line
Definition: flag.def:90
static const char * last_error_file
Definition: error.c:40

Here is the caller graph for this function:

void plex_action_directive ( const unsigned  int,
const unsigned  int 
)

Definition at line 4589 of file pplex.c.

References _, cb_plex_error(), cb_source_line, plex_stack::cmd, COBC_ABORT, cobc_abort_pr(), plex_stack::cond, plex_stack::line, PLEX_ACT_ELIF, PLEX_ACT_ELSE, PLEX_ACT_END, PLEX_ACT_IF, PLEX_COND_DEPTH, plex_cond_stack, plex_nest_depth, and plex_stack::skip.

Referenced by ppparse().

4590 {
4591  unsigned int n;
4592 
4593  /* Action IF/ELSE/END-IF/ELIF */
4594  switch (cmdtype) {
4595  case PLEX_ACT_IF:
4596  /* Push stack - First occurrence is dummy */
4597  if (++plex_nest_depth >= PLEX_COND_DEPTH) {
4598  cobc_abort_pr (_("Directive nest depth exceeded - %d"),
4599  PLEX_COND_DEPTH);
4600  COBC_ABORT ();
4601  }
4603  /* Intersection with previous - first is always 0 */
4604  n = plex_cond_stack[plex_nest_depth - 1].skip | !is_true;
4608  plex_skip_input = n;
4609  return;
4610  case PLEX_ACT_ELSE:
4611  /* Must have an associated IF/ELIF */
4612  if (!plex_nest_depth ||
4613  plex_cond_stack[plex_nest_depth].cmd != 1) {
4615  _("ELSE directive without matching IF/ELIF"));
4616  return;
4617  }
4619  /* Reverse any IF/ELIF condition */
4623  /* Intersection with previous */
4625  return;
4626  case PLEX_ACT_END:
4627  /* Must have an associated IF/ELIF/ELSE */
4628  if (!plex_nest_depth ||
4631  _("END-IF directive without matching IF/ELIF/ELSE"));
4632  return;
4633  }
4638  /* Pop stack - set skip to previous */
4639  plex_nest_depth--;
4641  return;
4642  case PLEX_ACT_ELIF:
4643  /* Must have an associated IF/ELIF */
4644  if (!plex_nest_depth ||
4645  plex_cond_stack[plex_nest_depth].cmd != 1) {
4647  _("ELIF directive without matching IF/ELIF"));
4648  return;
4649  }
4651  if (plex_cond_stack[plex_nest_depth].cond) {
4652  /* Previous IF or one of previous ELIF was true */
4653  /* Set to skip */
4654  n = 1U;
4655  } else if (is_true) {
4656  /* Condition is true */
4658  n = 0;
4659  } else {
4660  /* Set to skip */
4661  n = 1U;
4662  }
4664  /* Intersection with previous */
4666  return;
4667  default:
4668  cobc_abort_pr (_("Invalid internal case - %u"),
4669  cmdtype);
4670  COBC_ABORT ();
4671  }
4672 }
static unsigned int plex_nest_depth
Definition: pplex.c:2139
void cobc_abort_pr(const char *fmt,...)
Definition: cobc.c:587
#define PLEX_ACT_ELIF
Definition: cobc.h:94
unsigned int skip
Definition: pplex.c:2120
#define PLEX_ACT_END
Definition: cobc.h:93
static size_t newline_count
Definition: pplex.c:2131
#define _(s)
Definition: cobcrun.c:59
#define COBC_ABORT()
Definition: cobc.h:61
unsigned int cmd
Definition: pplex.c:2119
#define PLEX_COND_DEPTH
Definition: pplex.c:2105
unsigned int cond
Definition: pplex.c:2121
int line
Definition: pplex.c:2122
int cb_source_line
Definition: cobc.c:178
#define PLEX_ACT_IF
Definition: cobc.h:91
void cb_plex_error(const size_t, const char *,...) COB_A_FORMAT23
Definition: error.c:130
static struct plex_stack plex_cond_stack[16]
Definition: pplex.c:2153
#define PLEX_ACT_ELSE
Definition: cobc.h:92
static unsigned int plex_skip_input
Definition: pplex.c:2138

Here is the call graph for this function:

Here is the caller graph for this function:

void plex_call_destroy ( void  )

Definition at line 4583 of file pplex.c.

References pplex_destroy().

Referenced by preprocess().

4584 {
4585  (void)pplex_destroy ();
4586 }
int pplex_destroy(void)
Definition: pplex.c:4314

Here is the call graph for this function:

Here is the caller graph for this function:

void plex_clear_all ( void  )

Definition at line 4570 of file pplex.c.

References cobc_free(), and NULL.

Referenced by main().

4571 {
4572  if (plexbuff1) {
4573  cobc_free (plexbuff1);
4574  plexbuff1 = NULL;
4575  }
4576  if (plexbuff2) {
4577  cobc_free (plexbuff2);
4578  plexbuff2 = NULL;
4579  }
4580 }
void cobc_free(void *mptr)
Definition: cobc.c:657
static char * plexbuff2
Definition: pplex.c:2130
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 char * plexbuff1
Definition: pplex.c:2129

Here is the call graph for this function:

Here is the caller graph for this function:

void plex_clear_vars ( void  )

Definition at line 4559 of file pplex.c.

References plex_cond_stack.

Referenced by preprocess().

4560 {
4561  /* Reset variables */
4562  plex_skip_input = 0;
4563  plex_nest_depth = 0;
4564  memset (plex_cond_stack, 0, sizeof(plex_cond_stack));
4566  comment_allowed = 1;
4567 }
static unsigned int plex_nest_depth
Definition: pplex.c:2139
static int requires_listing_line
Definition: pplex.c:2142
static struct plex_stack plex_cond_stack[16]
Definition: pplex.c:2153
static unsigned int plex_skip_input
Definition: pplex.c:2138
static size_t comment_allowed
Definition: pplex.c:2137

Here is the caller graph for this function:

void pp_set_replace_list ( struct cb_replace_list ,
const cob_u32_t   
)

Definition at line 4394 of file pplex.c.

References base_replace_list, cb_replace_list::last, cb_replace_list::next, NULL, and cb_replace_list::prev.

Referenced by ppparse().

4395 {
4396  /* Handle REPLACE verb */
4397  if (!list) {
4398  /* REPLACE [LAST] OFF */
4399  if (!is_pushpop) {
4401  return;
4402  }
4403  if (!base_replace_list) {
4404  return;
4405  }
4407  return;
4408  }
4409  /* REPLACE [ALSO] ... */
4410  if (base_replace_list && is_pushpop) {
4411  list->last->next = base_replace_list;
4412  list->prev = base_replace_list;
4413  } else {
4414  list->prev = NULL;
4415  }
4416  base_replace_list = list;
4417 }
struct cb_replace_list * last
Definition: cobc.h:168
EC ARGUMENT EC EC BOUND EC BOUND EC BOUND EC BOUND TABLE EC DATA EC DATA EC DATA PTR NULL
Definition: exception.def:95
struct cb_replace_list * next
Definition: cobc.h:167
static struct cb_replace_list * base_replace_list
Definition: pplex.c:2147
struct cb_replace_list * prev
Definition: cobc.h:169

Here is the caller graph for this function:

int ppcopy ( const char *  ,
const char *  ,
struct cb_replace_list  
)

Definition at line 4508 of file pplex.c.

References _, cb_error(), cb_extension_list, cb_include_list, COB_SMALL_MAX, cb_text_list::next, plexbuff1, ppopen(), R_OK, and cb_text_list::text.

Referenced by ppparse().

4509 {
4510  struct cb_text_list *il;
4511  struct cb_text_list *el;
4512  const char *s;
4513 
4514  /* Locate and open COPY file */
4515  if (lib) {
4516  snprintf (plexbuff1, (size_t)COB_SMALL_MAX, "%s/%s", lib, name);
4517  plexbuff1[COB_SMALL_MAX] = 0;
4518  s = plexbuff1;
4519  } else {
4520  s = name;
4521  }
4522 
4523  /* Find the file */
4524  if (access (s, R_OK) == 0) {
4525  return ppopen (s, replace_list);
4526  }
4527 
4528  for (el = cb_extension_list; el; el = el->next) {
4529  snprintf (plexbuff2, (size_t)COB_SMALL_MAX, "%s%s", s, el->text);
4530  plexbuff2[COB_SMALL_MAX] = 0;
4531  if (access (plexbuff2, R_OK) == 0) {
4532  return ppopen (plexbuff2, replace_list);
4533  }
4534  }
4535 
4536  if (*s != '/') {
4537  for (il = cb_include_list; il; il = il->next) {
4538  for (el = cb_extension_list; el; el = el->next) {
4539  snprintf (plexbuff2, (size_t)COB_SMALL_MAX,
4540  "%s/%s%s", il->text, name, el->text);
4541  plexbuff2[COB_SMALL_MAX] = 0;
4542  if (access (plexbuff2, R_OK) == 0) {
4543  return ppopen (plexbuff2, replace_list);
4544  }
4545  }
4546  }
4547  }
4548  cb_error ("%s: %s", name, _("No such file or directory"));
4549  return -1;
4550 }
struct cb_text_list * next
Definition: cobc.h:160
struct cb_text_list * cb_extension_list
Definition: cobc.c:151
struct cb_text_list * cb_include_list
Definition: cobc.c:149
const char * text
Definition: cobc.h:162
static char * plexbuff2
Definition: pplex.c:2130
#define COB_SMALL_MAX
Definition: common.h:546
#define _(s)
Definition: cobcrun.c:59
void cb_error(const char *,...) COB_A_FORMAT12
Definition: error.c:98
int ppopen(const char *name, struct cb_replace_list *replacing_list)
Definition: pplex.c:4420
static char * plexbuff1
Definition: pplex.c:2129
#define R_OK
Definition: cobc.h:58

Here is the call graph for this function:

Here is the caller graph for this function:

int pplex ( void  )

The main scanner function which does all the work.

Definition at line 2352 of file pplex.c.

References _, ALSO, AS, BEGIN, copy_info::buffer, BY, cb_error(), CB_FORMAT_FREE, cb_plex_warning(), cb_source_format, cb_source_line, cb_verify(), check_comments(), check_listing(), CHECKING, cobc_free(), cobc_plex_strdup(), CONSTANT, COPY, copy_stack, COPY_STATE, DEFINE_DIRECTIVE, DEFINE_DIRECTIVE_STATE, DEFINED, display_to_eol(), copy_info::dname, DOT, ECHO, ELIF_DIRECTIVE, ELSE_DIRECTIVE, ELSE_DIRECTIVE_STATE, ENDIF_DIRECTIVE, ENDIF_DIRECTIVE_STATE, EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, EQ, EQEQ, EQUAL, copy_info::file, FIXED, FOLDCOPYNAME, FORMAT, FREE, GE, GREATER, GT, IF_DIRECTIVE, IF_DIRECTIVE_STATE, IN, INITIAL, IS, LAST, LE, LEADING, LESS, copy_info::line, plex_stack::line, LITERAL, LOCATION, LT, NE, copy_info::next, NOFOLDCOPYNAME, NOT, NULL, OF, OFF, ON, OR, OVERRIDE, PARAMETER, plex_cond_stack, plex_nest_depth, pp_create_buffer(), pp_delete_buffer(), pp_load_buffer_state(), ppecho(), ppensure_buffer_stack(), ppin, ppleng, pplval, ppout, ppwrap(), PRINTING, PSEUDO_STATE, copy_info::quotation_mark, REPLACE, REPLACING, copy_info::replacing, YYSTYPE::s, SET, SET_DIRECTIVE, SET_DIRECTIVE_STATE, skip_to_eol(), SOURCE_DIRECTIVE, SOURCE_DIRECTIVE_STATE, copy_info::source_format, SOURCEFORMAT, SUPPRESS, switch_to_buffer(), TERMINATOR, THAN, TO, TOKEN, TRAILING, TURN_DIRECTIVE, TURN_DIRECTIVE_STATE, unput, VARIABLE, warningopt, WITH, YY_AT_BOL, YY_BREAK, YY_BUF_SIZE, YY_BUFFER_NEW, YY_BUFFER_NORMAL, yy_c_buf_p, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_did_buffer_switch_on_eof, YY_DO_BEFORE_ACTION, YY_END_OF_BUFFER, YY_FATAL_ERROR, yy_get_next_buffer(), yy_get_previous_state(), yy_hold_char, yy_init, yy_last_accepting_cpos, yy_last_accepting_state, YY_MORE_ADJ, yy_n_chars, YY_NEW_FILE, yy_pop_state(), yy_push_state(), YY_RESTORE_YY_MORE_OFFSET, YY_RULE_SETUP, YY_SC_TO_UI, YY_START, yy_start, YY_STATE_EOF, yy_try_NUL_trans(), YY_USER_INIT, yyterminate, and yytext_ptr.

2353 {
2354  register yy_state_type yy_current_state;
2355  register char *yy_cp, *yy_bp;
2356  register int yy_act;
2357 
2358  if ( !(yy_init) )
2359  {
2360  (yy_init) = 1;
2361 
2362 #ifdef YY_USER_INIT
2363  YY_USER_INIT;
2364 #endif
2365 
2366  if ( ! (yy_start) )
2367  (yy_start) = 1; /* first start state */
2368 
2369  if ( ! ppin )
2370  ppin = stdin;
2371 
2372  if ( ! ppout )
2373  ppout = stdout;
2374 
2375  if ( ! YY_CURRENT_BUFFER ) {
2379  }
2380 
2382  }
2383 
2384  {
2385 #line 174 "pplex.l"
2386 
2387 
2388 
2389 
2390 
2391 #line 2391 "pplex.c"
2392 
2393  while ( 1 ) /* loops until end-of-file is reached */
2394  {
2395  yy_cp = (yy_c_buf_p);
2396 
2397  /* Support of pptext. */
2398  *yy_cp = (yy_hold_char);
2399 
2400  /* yy_bp points to the position in yy_ch_buf of the start of
2401  * the current run.
2402  */
2403  yy_bp = yy_cp;
2404 
2405  yy_current_state = (yy_start);
2406  yy_current_state += YY_AT_BOL();
2407 yy_match:
2408  do
2409  {
2410  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
2411  if ( yy_accept[yy_current_state] )
2412  {
2413  (yy_last_accepting_state) = yy_current_state;
2414  (yy_last_accepting_cpos) = yy_cp;
2415  }
2416  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2417  {
2418  yy_current_state = (int) yy_def[yy_current_state];
2419  if ( yy_current_state >= 1082 )
2420  yy_c = yy_meta[(unsigned int) yy_c];
2421  }
2422  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2423  ++yy_cp;
2424  }
2425  while ( yy_current_state != 1081 );
2426  yy_cp = (yy_last_accepting_cpos);
2427  yy_current_state = (yy_last_accepting_state);
2428 
2429 yy_find_action:
2430  yy_act = yy_accept[yy_current_state];
2431 
2433 
2434 do_action: /* This label is used only to access EOF actions. */
2435 
2436  switch ( yy_act )
2437  { /* beginning of action switch */
2438  case 0: /* must back up */
2439  /* undo the effects of YY_DO_BEFORE_ACTION */
2440  *yy_cp = (yy_hold_char);
2441  yy_cp = (yy_last_accepting_cpos);
2442  yy_current_state = (yy_last_accepting_state);
2443  goto yy_find_action;
2444 
2445 case 1:
2447 #line 179 "pplex.l"
2448 {
2449  #if 0 /* RXWRXW - Directive state */
2450  if (YY_START != DIRECTIVE_STATE && YY_START != SET_DIRECTIVE_STATE) {
2451  ppecho (" ", 0, 1);
2452  }
2453  #endif
2454 }
2455  YY_BREAK
2456 case 2:
2458 #line 187 "pplex.l"
2459 {
2460  /* Define here to preempt next debug rule below */
2462  return DEFINE_DIRECTIVE;
2463 }
2464  YY_BREAK
2465 case 3:
2467 #line 193 "pplex.l"
2468 {
2469  /* Define here to preempt next debug rule below */
2470  display_to_eol ();
2471 }
2472  YY_BREAK
2473 case 4:
2475 #line 198 "pplex.l"
2476 {
2477  /* OC extension for floating debug line */
2478  /* Remove line if debugging lines not activated */
2479  /* Otherwise ignore the directive part of the line */
2480  if (!cb_flag_debugging_line) {
2481  skip_to_eol ();
2482  }
2483 }
2484  YY_BREAK
2485 case 5:
2487 #line 207 "pplex.l"
2488 {
2490  return SOURCE_DIRECTIVE;
2491 }
2492  YY_BREAK
2493 case 6:
2495 #line 212 "pplex.l"
2496 {
2497  /* OC extension */
2499  return SET_DIRECTIVE;
2500 }
2501  YY_BREAK
2502 case 7:
2504 #line 218 "pplex.l"
2505 {
2507  return TURN_DIRECTIVE;
2508 }
2509  YY_BREAK
2510 case 8:
2512 #line 223 "pplex.l"
2513 {
2515  return IF_DIRECTIVE;
2516 }
2517  YY_BREAK
2518 case 9:
2519 #line 229 "pplex.l"
2520 case 10:
2522 #line 229 "pplex.l"
2523 {
2525  return ELIF_DIRECTIVE;
2526 }
2527  YY_BREAK
2528 case 11:
2530 #line 234 "pplex.l"
2531 {
2533  return ELSE_DIRECTIVE;
2534 }
2535  YY_BREAK
2536 case 12:
2538 #line 239 "pplex.l"
2539 {
2541  return ENDIF_DIRECTIVE;
2542 }
2543  YY_BREAK
2544 case 13:
2546 #line 244 "pplex.l"
2547 {
2548  if (warningopt) {
2549  cb_plex_warning (newline_count, _("Ignoring LEAP-SECOND directive"));
2550  }
2551  skip_to_eol ();
2552 }
2553  YY_BREAK
2554 case 14:
2555 /* rule 14 can match eol */
2557 #line 251 "pplex.l"
2558 {
2559  cb_plex_warning (newline_count, _("Ignoring empty directive"));
2560  unput ('\n');
2561 }
2562  YY_BREAK
2563 case 15:
2565 #line 256 "pplex.l"
2566 {
2567  char *s;
2568 
2569  s = strchr (pptext, '>');
2570  cb_plex_warning (newline_count, _("Ignoring invalid directive - '%s'"), s);
2571  skip_to_eol ();
2572 }
2573  YY_BREAK
2574 case 16:
2576 #line 264 "pplex.l"
2577 {
2578  cb_plex_warning (newline_count, _("Ignoring invalid directive"));
2579  skip_to_eol ();
2580 }
2581  YY_BREAK
2582 case 17:
2584 #line 269 "pplex.l"
2585 {
2586  display_to_eol ();
2587 }
2588  YY_BREAK
2589 case 18:
2591 #line 273 "pplex.l"
2592 {
2594  return SET_DIRECTIVE;
2595 }
2596  YY_BREAK
2597 case 19:
2599 #line 278 "pplex.l"
2600 {
2602  return IF_DIRECTIVE;
2603 }
2604  YY_BREAK
2605 case 20:
2606 #line 284 "pplex.l"
2607 case 21:
2609 #line 284 "pplex.l"
2610 {
2612  return ELIF_DIRECTIVE;
2613 }
2614  YY_BREAK
2615 case 22:
2617 #line 289 "pplex.l"
2618 {
2620  return ELSE_DIRECTIVE;
2621 }
2622  YY_BREAK
2623 case 23:
2625 #line 294 "pplex.l"
2626 {
2628  return ENDIF_DIRECTIVE;
2629 }
2630  YY_BREAK
2631 case 24:
2633 #line 299 "pplex.l"
2634 {
2635  char *s;
2636 
2637  s = strchr (pptext, '$');
2638  cb_plex_warning (newline_count, _("Ignoring invalid directive - '%s'"), s);
2639  skip_to_eol ();
2640 }
2641  YY_BREAK
2642 case 25:
2644 #line 307 "pplex.l"
2645 {
2646  /* Allow $ in column 7 for acucomment in fixed format */
2648  cb_plex_warning (newline_count, _("Spurious '$' detected - ignoring"));
2649  skip_to_eol ();
2650  }
2651 }
2652  YY_BREAK
2653 case 26:
2655 #line 315 "pplex.l"
2656 {
2657  cb_plex_warning (newline_count, _("Spurious '$' detected - ignoring"));
2658  skip_to_eol ();
2659 }
2660  YY_BREAK
2661 case 27:
2663 #line 320 "pplex.l"
2664 {
2665  cb_plex_warning (newline_count, _("PROCESS statement ignored"));
2666  skip_to_eol ();
2667 }
2668  YY_BREAK
2669 case 28:
2671 #line 325 "pplex.l"
2672 {
2674  return COPY;
2675 }
2676  YY_BREAK
2677 case 29:
2679 #line 330 "pplex.l"
2680 {
2682  return COPY;
2683 }
2684  YY_BREAK
2685 case 30:
2687 #line 335 "pplex.l"
2688 {
2690  return REPLACE;
2691 }
2692  YY_BREAK
2693 case 31:
2694 #line 341 "pplex.l"
2695 case 32:
2697 #line 341 "pplex.l"
2698 {
2699  /* Allow comment sentences/paragraphs */
2700  comment_allowed = 1;
2701  ppecho (pptext, 0, ppleng);
2702 }
2703  YY_BREAK
2704 case 33:
2706 #line 347 "pplex.l"
2707 {
2708  /* Allow comment sentences/paragraphs */
2709  comment_allowed = 1;
2710  ppecho (pptext, 0, ppleng);
2711 }
2712  YY_BREAK
2713 case 34:
2715 #line 353 "pplex.l"
2716 {
2717  /* Disallow comment sentences/paragraphs */
2718  comment_allowed = 0;
2719  ppecho (pptext, 0, ppleng);
2720 }
2721  YY_BREAK
2722 case 35:
2724 #line 359 "pplex.l"
2725 {
2726  /* Disallow comment sentences/paragraphs */
2727  comment_allowed = 0;
2728  ppecho (pptext, 0, ppleng);
2729 }
2730  YY_BREAK
2731 case 36:
2733 #line 365 "pplex.l"
2734 { check_comments ("AUTHOR", pptext); }
2735  YY_BREAK
2736 case 37:
2738 #line 366 "pplex.l"
2739 { check_comments ("DATE-WRITTEN", pptext); }
2740  YY_BREAK
2741 case 38:
2743 #line 367 "pplex.l"
2744 { check_comments ("DATE-MODIFIED", pptext); }
2745  YY_BREAK
2746 case 39:
2748 #line 368 "pplex.l"
2749 { check_comments ("DATE-COMPILED", pptext); }
2750  YY_BREAK
2751 case 40:
2753 #line 369 "pplex.l"
2754 { check_comments ("INSTALLATION", pptext); }
2755  YY_BREAK
2756 case 41:
2758 #line 370 "pplex.l"
2759 { check_comments ("REMARKS", pptext); }
2760  YY_BREAK
2761 case 42:
2763 #line 371 "pplex.l"
2764 { check_comments ("SECURITY", pptext); }
2765  YY_BREAK
2766 case 43:
2767 #line 374 "pplex.l"
2768 case 44:
2769 #line 375 "pplex.l"
2770 case 45:
2771 #line 376 "pplex.l"
2772 case 46:
2774 #line 376 "pplex.l"
2775 {
2776  /* These words are comments in various COBOL dialects */
2777  if (cb_verify (cb_eject_statement, pptext)) {
2778  /* Ignore */
2779  } else {
2780  ECHO;
2781  check_listing (pptext, 0);
2782  }
2783 }
2784  YY_BREAK
2785 case 47:
2786 #line 387 "pplex.l"
2787 case 48:
2789 #line 387 "pplex.l"
2790 {
2791  /* Pick up early - Also activates debugging lines */
2792  cb_flag_debugging_line = 1;
2793  ppecho (pptext, 0, ppleng);
2794 }
2795  YY_BREAK
2796 case 49:
2797 /* rule 49 can match eol */
2799 #line 393 "pplex.l"
2800 {
2801  ppecho ("\n", 0, 1);
2802  cb_source_line++;
2803 }
2804  YY_BREAK
2805 case 50:
2807 #line 398 "pplex.l"
2808 {
2809  ppecho (" ", 1U, 1);
2810 }
2811  YY_BREAK
2812 case 51:
2814 #line 402 "pplex.l"
2815 {
2816  if (inside_bracket) {
2817  ppecho (", ", 0, 2);
2818  } else {
2819  ppecho (" ", 1U, 1);
2820  }
2821 }
2822  YY_BREAK
2823 case 52:
2825 #line 410 "pplex.l"
2826 {
2827  inside_bracket++;
2828  ppecho ("(", 0, 1);
2829 }
2830  YY_BREAK
2831 case 53:
2833 #line 415 "pplex.l"
2834 {
2835  if (inside_bracket) {
2836  inside_bracket--;
2837  }
2838  ppecho (")", 0, 1);
2839 }
2840  YY_BREAK
2841 case 54:
2842 #line 423 "pplex.l"
2843 case 55:
2844 #line 424 "pplex.l"
2845 case 56:
2846 #line 425 "pplex.l"
2847 case 57:
2849 #line 425 "pplex.l"
2850 {
2851  ppecho (pptext, 0, ppleng);
2852 }
2853  YY_BREAK
2854 
2855 case 58:
2856 /* rule 58 can match eol */
2858 #line 430 "pplex.l"
2859 {
2860  BEGIN INITIAL;
2861  unput ('\n');
2862  return TERMINATOR;
2863  }
2864  YY_BREAK
2865 case 59:
2867 #line 435 "pplex.l"
2868 { return FORMAT; }
2869  YY_BREAK
2870 case 60:
2872 #line 436 "pplex.l"
2873 { return IS; }
2874  YY_BREAK
2875 case 61:
2877 #line 437 "pplex.l"
2878 { return FIXED; }
2879  YY_BREAK
2880 case 62:
2882 #line 438 "pplex.l"
2883 { return FREE; }
2884  YY_BREAK
2885 case 63:
2887 #line 439 "pplex.l"
2888 { /* ignore */ }
2889  YY_BREAK
2890 case 64:
2892 #line 440 "pplex.l"
2893 { }
2894  YY_BREAK
2895 
2896 
2897 case 65:
2898 /* rule 65 can match eol */
2900 #line 444 "pplex.l"
2901 {
2902  BEGIN INITIAL;
2903  unput ('\n');
2904  return TERMINATOR;
2905  }
2906  YY_BREAK
2907 case 66:
2909 #line 449 "pplex.l"
2910 {
2911  return CONSTANT;
2912  }
2913  YY_BREAK
2914 case 67:
2916 #line 452 "pplex.l"
2917 {
2918  return AS;
2919  }
2920  YY_BREAK
2921 case 68:
2923 #line 455 "pplex.l"
2924 {
2925  return OFF;
2926  }
2927  YY_BREAK
2928 case 69:
2930 #line 458 "pplex.l"
2931 {
2932  return OVERRIDE;
2933  }
2934  YY_BREAK
2935 case 70:
2937 #line 461 "pplex.l"
2938 {
2939  return PARAMETER;
2940  }
2941  YY_BREAK
2942 case 71:
2943 #line 465 "pplex.l"
2944 case 72:
2946 #line 465 "pplex.l"
2947 {
2949  return LITERAL;
2950  }
2951  YY_BREAK
2952 case 73:
2954 #line 469 "pplex.l"
2955 {
2957  return VARIABLE;
2958  }
2959  YY_BREAK
2960 case 74:
2962 #line 473 "pplex.l"
2963 { /* ignore */ }
2964  YY_BREAK
2965 case 75:
2967 #line 474 "pplex.l"
2968 { }
2969  YY_BREAK
2970 
2971 
2972 case 76:
2973 /* rule 76 can match eol */
2975 #line 478 "pplex.l"
2976 {
2977  BEGIN INITIAL;
2978  unput ('\n');
2979  return TERMINATOR;
2980  }
2981  YY_BREAK
2982 case 77:
2984 #line 483 "pplex.l"
2985 {
2986  return CONSTANT;
2987  }
2988  YY_BREAK
2989 case 78:
2991 #line 486 "pplex.l"
2992 {
2993  return SOURCEFORMAT;
2994  }
2995  YY_BREAK
2996 case 79:
2997 #line 490 "pplex.l"
2998 case 80:
3000 #line 490 "pplex.l"
3001 {
3002  return FOLDCOPYNAME;
3003  }
3004  YY_BREAK
3005 case 81:
3006 #line 494 "pplex.l"
3007 case 82:
3009 #line 494 "pplex.l"
3010 {
3011  return NOFOLDCOPYNAME;
3012  }
3013  YY_BREAK
3014 case 83:
3016 #line 497 "pplex.l"
3017 {
3018  return AS;
3019  }
3020  YY_BREAK
3021 case 84:
3022 #line 501 "pplex.l"
3023 case 85:
3025 #line 501 "pplex.l"
3026 {
3028  return LITERAL;
3029  }
3030  YY_BREAK
3031 case 86:
3033 #line 505 "pplex.l"
3034 {
3035  pptext[strlen (pptext) - 1] = 0;
3036  pplval.s = cobc_plex_strdup (pptext + 1);
3037  return LITERAL;
3038  }
3039  YY_BREAK
3040 case 87:
3042 #line 510 "pplex.l"
3043 {
3045  return VARIABLE;
3046  }
3047  YY_BREAK
3048 case 88:
3050 #line 514 "pplex.l"
3051 { /* ignore */ }
3052  YY_BREAK
3053 case 89:
3055 #line 515 "pplex.l"
3056 { }
3057  YY_BREAK
3058 
3059 
3060 case 90:
3061 /* rule 90 can match eol */
3063 #line 519 "pplex.l"
3064 {
3065  BEGIN INITIAL;
3066  unput ('\n');
3067  return TERMINATOR;
3068  }
3069  YY_BREAK
3070 case 91:
3072 #line 524 "pplex.l"
3073 {
3074  return ON;
3075  }
3076  YY_BREAK
3077 case 92:
3079 #line 527 "pplex.l"
3080 {
3081  return OFF;
3082  }
3083  YY_BREAK
3084 case 93:
3086 #line 530 "pplex.l"
3087 {
3088  return WITH;
3089  }
3090  YY_BREAK
3091 case 94:
3093 #line 533 "pplex.l"
3094 {
3095  return LOCATION;
3096  }
3097  YY_BREAK
3098 case 95:
3100 #line 536 "pplex.l"
3101 {
3102  return CHECKING;
3103  }
3104  YY_BREAK
3105 case 96:
3106 #line 540 "pplex.l"
3107 case 97:
3109 #line 540 "pplex.l"
3110 {
3112  return LITERAL;
3113  }
3114  YY_BREAK
3115 case 98:
3117 #line 544 "pplex.l"
3118 {
3119  pptext[strlen (pptext) - 1] = 0;
3120  pplval.s = cobc_plex_strdup (pptext + 1);
3121  return LITERAL;
3122  }
3123  YY_BREAK
3124 case 99:
3126 #line 549 "pplex.l"
3127 {
3129  return VARIABLE;
3130  }
3131  YY_BREAK
3132 case 100:
3134 #line 553 "pplex.l"
3135 { /* ignore */ }
3136  YY_BREAK
3137 case 101:
3139 #line 554 "pplex.l"
3140 { }
3141  YY_BREAK
3142 
3143 
3144 case 102:
3145 /* rule 102 can match eol */
3147 #line 558 "pplex.l"
3148 {
3149  BEGIN INITIAL;
3150  unput ('\n');
3151  return TERMINATOR;
3152  }
3153  YY_BREAK
3154 case 103:
3156 #line 563 "pplex.l"
3157 { /* ignore */ }
3158  YY_BREAK
3159 case 104:
3161 #line 564 "pplex.l"
3162 { return IS; }
3163  YY_BREAK
3164 case 105:
3166 #line 565 "pplex.l"
3167 { return NOT; }
3168  YY_BREAK
3169 case 106:
3171 #line 566 "pplex.l"
3172 { return EQUAL; }
3173  YY_BREAK
3174 case 107:
3176 #line 567 "pplex.l"
3177 { return TO; }
3178  YY_BREAK
3179 case 108:
3181 #line 568 "pplex.l"
3182 { return OR; }
3183  YY_BREAK
3184 case 109:
3186 #line 569 "pplex.l"
3187 { return GREATER; }
3188  YY_BREAK
3189 case 110:
3191 #line 570 "pplex.l"
3192 { return LESS; }
3193  YY_BREAK
3194 case 111:
3196 #line 571 "pplex.l"
3197 { return THAN; }
3198  YY_BREAK
3199 case 112:
3201 #line 572 "pplex.l"
3202 { return DEFINED; }
3203  YY_BREAK
3204 case 113:
3206 #line 573 "pplex.l"
3207 { return SET; }
3208  YY_BREAK
3209 case 114:
3211 #line 574 "pplex.l"
3212 { return GE; }
3213  YY_BREAK
3214 case 115:
3216 #line 575 "pplex.l"
3217 { return GT; }
3218  YY_BREAK
3219 case 116:
3221 #line 576 "pplex.l"
3222 { return LE; }
3223  YY_BREAK
3224 case 117:
3226 #line 577 "pplex.l"
3227 { return NE; }
3228  YY_BREAK
3229 case 118:
3231 #line 578 "pplex.l"
3232 { return LT; }
3233  YY_BREAK
3234 case 119:
3236 #line 579 "pplex.l"
3237 { return EQ; }
3238  YY_BREAK
3239 case 120:
3240 #line 581 "pplex.l"
3241 case 121:
3243 #line 581 "pplex.l"
3244 {
3246  return LITERAL;
3247  }
3248  YY_BREAK
3249 case 122:
3251 #line 585 "pplex.l"
3252 {
3254  return VARIABLE;
3255  }
3256  YY_BREAK
3257 case 123:
3259 #line 589 "pplex.l"
3260 { }
3261  YY_BREAK
3262 
3263 
3264 case 124:
3265 /* rule 124 can match eol */
3267 #line 593 "pplex.l"
3268 {
3269  BEGIN INITIAL;
3270  unput ('\n');
3271  return TERMINATOR;
3272  }
3273  YY_BREAK
3274 case 125:
3276 #line 598 "pplex.l"
3277 { /* ignore */ }
3278  YY_BREAK
3279 
3280 
3281 case 126:
3282 /* rule 126 can match eol */
3284 #line 602 "pplex.l"
3285 {
3286  BEGIN INITIAL;
3287  unput ('\n');
3288  return TERMINATOR;
3289  }
3290  YY_BREAK
3291 case 127:
3293 #line 607 "pplex.l"
3294 { /* ignore */ }
3295  YY_BREAK
3296 
3297 
3298 case 128:
3299 /* rule 128 can match eol */
3301 #line 611 "pplex.l"
3302 {
3303  ECHO;
3304  check_listing (pptext, 0);
3305  cb_source_line++;
3306  }
3307  YY_BREAK
3308 case 129:
3310 #line 616 "pplex.l"
3311 { /* ignore */ }
3312  YY_BREAK
3313 case 130:
3315 #line 617 "pplex.l"
3316 { yy_pop_state (); return DOT; }
3317  YY_BREAK
3318 case 131:
3320 #line 618 "pplex.l"
3321 { yy_push_state (PSEUDO_STATE); return EQEQ; }
3322  YY_BREAK
3323 case 132:
3325 #line 619 "pplex.l"
3326 { return '('; }
3327  YY_BREAK
3328 case 133:
3330 #line 620 "pplex.l"
3331 { return ')'; }
3332  YY_BREAK
3333 case 134:
3335 #line 621 "pplex.l"
3336 { return BY; }
3337  YY_BREAK
3338 case 135:
3340 #line 622 "pplex.l"
3341 { return IN; }
3342  YY_BREAK
3343 case 136:
3345 #line 623 "pplex.l"
3346 { return OF; }
3347  YY_BREAK
3348 case 137:
3350 #line 624 "pplex.l"
3351 { return OFF; }
3352  YY_BREAK
3353 case 138:
3355 #line 625 "pplex.l"
3356 { return SUPPRESS; }
3357  YY_BREAK
3358 case 139:
3360 #line 626 "pplex.l"
3361 { return PRINTING; }
3362  YY_BREAK
3363 case 140:
3365 #line 627 "pplex.l"
3366 { return REPLACING; }
3367  YY_BREAK
3368 case 141:
3370 #line 628 "pplex.l"
3371 { return LEADING; }
3372  YY_BREAK
3373 case 142:
3375 #line 629 "pplex.l"
3376 { return TRAILING; }
3377  YY_BREAK
3378 case 143:
3380 #line 630 "pplex.l"
3381 { return ALSO; }
3382  YY_BREAK
3383 case 144:
3385 #line 631 "pplex.l"
3386 { return LAST; }
3387  YY_BREAK
3388 case 145:
3389 #line 633 "pplex.l"
3390 case 146:
3391 #line 634 "pplex.l"
3392 case 147:
3393 #line 635 "pplex.l"
3394 case 148:
3396 #line 635 "pplex.l"
3397 { pplval.s = cobc_plex_strdup (pptext); return TOKEN; }
3398  YY_BREAK
3399 
3400 
3401 case 149:
3402 /* rule 149 can match eol */
3404 #line 639 "pplex.l"
3405 {
3406  ECHO;
3407  check_listing (pptext, 0);
3408  cb_source_line++;
3409  }
3410  YY_BREAK
3411 case 150:
3413 #line 645 "pplex.l"
3414 {
3415  pplval.s = cobc_plex_strdup (" ");
3416  return TOKEN;
3417  }
3418  YY_BREAK
3419 case 151:
3421 #line 650 "pplex.l"
3422 {
3423  yy_pop_state ();
3424  return EQEQ;
3425  }
3426  YY_BREAK
3427 case 152:
3428 #line 656 "pplex.l"
3429 case 153:
3430 #line 657 "pplex.l"
3431 case 154:
3432 #line 658 "pplex.l"
3433 case 155:
3435 #line 658 "pplex.l"
3436 {
3438  return TOKEN;
3439  }
3440  YY_BREAK
3441 
3442 case YY_STATE_EOF(INITIAL):
3443 case YY_STATE_EOF(COPY_STATE):
3444 case YY_STATE_EOF(PSEUDO_STATE):
3445 case YY_STATE_EOF(SOURCE_DIRECTIVE_STATE):
3446 case YY_STATE_EOF(DEFINE_DIRECTIVE_STATE):
3447 case YY_STATE_EOF(SET_DIRECTIVE_STATE):
3448 case YY_STATE_EOF(TURN_DIRECTIVE_STATE):
3449 case YY_STATE_EOF(IF_DIRECTIVE_STATE):
3450 case YY_STATE_EOF(ELSE_DIRECTIVE_STATE):
3451 case YY_STATE_EOF(ENDIF_DIRECTIVE_STATE):
3452 #line 665 "pplex.l"
3453 {
3454  struct copy_info *p;
3455 
3456  p = copy_stack;
3457 
3459 
3460  /* Terminate at the end of all input */
3461  if (p->next == NULL) {
3462  /* Check dangling IF/ELSE */
3463  for (; plex_nest_depth > 0; --plex_nest_depth) {
3465  cb_error (_("Dangling IF/ELSE directive"));
3466  }
3467  plex_nest_depth = 0;
3468  cobc_free (p->dname);
3469  cobc_free (p);
3470  listing_line = 0;
3472  requires_new_line = 0;
3473  need_continuation = 0;
3474  buffer_overflow = 0;
3475  within_comment = 0;
3476  newline_count = 0;
3477  inside_bracket = 0;
3478  comment_allowed = 1;
3482  text_queue = NULL;
3483  copy_stack = NULL;
3484  quotation_mark = 0;
3486  yyterminate ();
3487  }
3488 
3489  /* Close the current file */
3490  fclose (ppin);
3491 
3492  /* Switch to previous buffer */
3493  switch_to_buffer (p->line, p->file, p->buffer);
3494 
3495  /* Restore variables */
3499 
3500  copy_stack = p->next;
3501  cobc_free (p->dname);
3502  cobc_free (p);
3503 }
3504  YY_BREAK
3505 case 156:
3507 #line 717 "pplex.l"
3508 YY_FATAL_ERROR( "flex scanner jammed" );
3509  YY_BREAK
3510 #line 3510 "pplex.c"
3511 
3512  case YY_END_OF_BUFFER:
3513  {
3514  /* Amount of text matched not including the EOB char. */
3515  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
3516 
3517  /* Undo the effects of YY_DO_BEFORE_ACTION. */
3518  *yy_cp = (yy_hold_char);
3520 
3521  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
3522  {
3523  /* We're scanning a new file or input source. It's
3524  * possible that this happened because the user
3525  * just pointed ppin at a new source and called
3526  * pplex(). If so, then we have to assure
3527  * consistency between YY_CURRENT_BUFFER and our
3528  * globals. Here is the right place to do so, because
3529  * this is the first action (other than possibly a
3530  * back-up) that will match for the new input source.
3531  */
3532  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3533  YY_CURRENT_BUFFER_LVALUE->yy_input_file = ppin;
3534  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
3535  }
3536 
3537  /* Note that here we test for yy_c_buf_p "<=" to the position
3538  * of the first EOB in the buffer, since yy_c_buf_p will
3539  * already have been incremented past the NUL character
3540  * (since all states make transitions on EOB to the
3541  * end-of-buffer state). Contrast this with the test
3542  * in input().
3543  */
3544  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
3545  { /* This was really a NUL. */
3546  yy_state_type yy_next_state;
3547 
3548  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
3549 
3550  yy_current_state = yy_get_previous_state( );
3551 
3552  /* Okay, we're now positioned to make the NUL
3553  * transition. We couldn't have
3554  * yy_get_previous_state() go ahead and do it
3555  * for us because it doesn't know how to deal
3556  * with the possibility of jamming (and we don't
3557  * want to build jamming into it because then it
3558  * will run more slowly).
3559  */
3560 
3561  yy_next_state = yy_try_NUL_trans( yy_current_state );
3562 
3563  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3564 
3565  if ( yy_next_state )
3566  {
3567  /* Consume the NUL. */
3568  yy_cp = ++(yy_c_buf_p);
3569  yy_current_state = yy_next_state;
3570  goto yy_match;
3571  }
3572 
3573  else
3574  {
3575  yy_cp = (yy_last_accepting_cpos);
3576  yy_current_state = (yy_last_accepting_state);
3577  goto yy_find_action;
3578  }
3579  }
3580 
3581  else switch ( yy_get_next_buffer( ) )
3582  {
3583  case EOB_ACT_END_OF_FILE:
3584  {
3586 
3587  if ( ppwrap( ) )
3588  {
3589  /* Note: because we've taken care in
3590  * yy_get_next_buffer() to have set up
3591  * pptext, we can now set up
3592  * yy_c_buf_p so that if some total
3593  * hoser (like flex itself) wants to
3594  * call the scanner after we return the
3595  * YY_NULL, it'll still work - another
3596  * YY_NULL will get returned.
3597  */
3599 
3600  yy_act = YY_STATE_EOF(YY_START);
3601  goto do_action;
3602  }
3603 
3604  else
3605  {
3606  if ( ! (yy_did_buffer_switch_on_eof) )
3607  YY_NEW_FILE;
3608  }
3609  break;
3610  }
3611 
3612  case EOB_ACT_CONTINUE_SCAN:
3613  (yy_c_buf_p) =
3614  (yytext_ptr) + yy_amount_of_matched_text;
3615 
3616  yy_current_state = yy_get_previous_state( );
3617 
3618  yy_cp = (yy_c_buf_p);
3619  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3620  goto yy_match;
3621 
3622  case EOB_ACT_LAST_MATCH:
3623  (yy_c_buf_p) =
3624  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
3625 
3626  yy_current_state = yy_get_previous_state( );
3627 
3628  yy_cp = (yy_c_buf_p);
3629  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3630  goto yy_find_action;
3631  }
3632  break;
3633  }
3634 
3635  default:
3637  "fatal flex scanner internal error--no action found" );
3638  } /* end of action switch */
3639  } /* end of scanning one token */
3640  } /* end of user's declarations */
3641 } /* end of pplex */
Definition: parser.c:1852
#define INITIAL
Definition: pplex.c:2177
#define YY_BREAK
Definition: pplex.c:2341
Definition: parser.c:1437
#define YY_END_OF_BUFFER
Definition: pplex.c:394
#define SET_DIRECTIVE_STATE
Definition: pplex.c:2182
static unsigned int plex_nest_depth
Definition: pplex.c:2139
Definition: ppparse.c:615
Definition: ppparse.c:616
#define ENDIF_DIRECTIVE_STATE
Definition: pplex.c:2186
#define YY_DO_BEFORE_ACTION
Definition: pplex.c:386
#define YY_STATE_EOF(state)
Definition: pplex.c:156
static char * yy_last_accepting_cpos
Definition: pplex.c:2028
static int ppwrap(void)
Definition: pplex.c:2068
static flex_int16_t yy_base[1183]
Definition: pplex.c:569
Definition: parser.c:1653
#define ECHO
Definition: pplex.c:2074
Definition: ppparse.c:617
Definition: parser.c:1562
Definition: parser.c:1392
Definition: ppparse.c:600
YYSTYPE pplval
Definition: ppparse.c:1646
void cb_plex_warning(const size_t, const char *,...) COB_A_FORMAT23
Definition: error.c:119
static void ppecho(const char *, const cob_u32_t, const int)
Definition: pplex.c:5117
#define COPY_STATE
Definition: pplex.c:2178
FILE * ppout
Definition: pplex.c:367
Definition: ppparse.c:618
int warningopt
Definition: cobc.c:176
unsigned int cb_verify(const enum cb_support, const char *)
Definition: error.c:246
unsigned char YY_CHAR
Definition: pplex.c:365
void cobc_free(void *mptr)
Definition: cobc.c:657
void * cobc_plex_strdup(const char *dupstr)
Definition: cobc.c:933
static char yy_hold_char
Definition: pplex.c:303
Definition: ppparse.c:620
static int quotation_mark
Definition: pplex.c:2140
static int yy_init
Definition: pplex.c:309
#define YY_START
Definition: pplex.c:152
int cb_source_format
Definition: cobc.c:162
int quotation_mark
Definition: pplex.c:2114
Definition: parser.c:1659
static int requires_listing_line
Definition: pplex.c:2142
#define PSEUDO_STATE
Definition: pplex.c:2179
Definition: parser.c:1655
#define YY_BUFFER_NEW
Definition: pplex.c:265
Definition: parser.c:1796
static flex_int16_t yy_accept[1082]
Definition: pplex.c:402
static struct copy_info * copy_stack
Definition: pplex.c:2151
#define YY_BUFFER_NORMAL
Definition: pplex.c:266
static int yy_get_next_buffer(void)
Definition: pplex.c:3650
#define EOB_ACT_END_OF_FILE
Definition: pplex.c:195
#define TOKEN(offset)
Definition: typeck.c:70
static void switch_to_buffer(const int, const char *, const YY_BUFFER_STATE)
Definition: pplex.c:4677
static int listing_line
Definition: pplex.c:2141
struct copy_info * next
Definition: pplex.c:2108
#define EOB_ACT_CONTINUE_SCAN
Definition: pplex.c:194
static int yy_start
Definition: pplex.c:310
#define yyterminate()
Definition: pplex.c:2306
static size_t buffer_overflow
Definition: pplex.c:2136
#define IF_DIRECTIVE_STATE
Definition: pplex.c:2184
static void yy_push_state(int new_state)
Definition: pplex.c:4216
#define YY_CURRENT_BUFFER_LVALUE
Definition: pplex.c:300
static flex_int32_t yy_meta[74]
Definition: pplex.c:557
char * s
Definition: ppparse.c:649
static flex_int16_t yy_nxt[5374]
Definition: pplex.c:837
static size_t newline_count
Definition: pplex.c:2131
Definition: parser.c:1584
#define SOURCE_DIRECTIVE_STATE
Definition: pplex.c:2180
#define _(s)
Definition: cobcrun.c:59
yy_size_t ppleng
Definition: pplex.c:305
#define ELSE_DIRECTIVE_STATE
Definition: pplex.c:2185
#define YY_AT_BOL()
Definition: pplex.c:361
struct cb_replace_list * replacing
Definition: pplex.c:2111
int line
Definition: pplex.c:2113
static size_t need_continuation
Definition: pplex.c:2135
static yy_size_t yy_n_chars
Definition: pplex.c:304
int source_format
Definition: pplex.c:2115
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 void display_to_eol(void)
Definition: pplex.c:5284
static yy_state_type yy_get_previous_state(void)
Definition: pplex.c:3784
Definition: parser.c:1590
Definition: parser.c:1652
YY_BUFFER_STATE pp_create_buffer(FILE *file, int size)
Allocate and initialize an input buffer state.
Definition: pplex.c:4020
#define YY_USER_INIT
Definition: pplex.c:2076
int yy_state_type
Definition: pplex.c:369
static size_t consecutive_quotation
Definition: pplex.c:2134
Definition: parser.c:1751
char * pptext
Definition: pplex.c:2040
static struct cb_text_list * text_queue
Definition: pplex.c:2149
#define BEGIN
Definition: pplex.c:146
#define YY_CURRENT_BUFFER
Definition: pplex.c:293
static size_t within_comment
Definition: pplex.c:2132
static void pp_load_buffer_state(void)
Definition: pplex.c:4006
#define YY_SC_TO_UI(c)
Definition: pplex.c:140
#define yytext_ptr
Definition: pplex.c:376
static struct cb_replace_list * save_current_replace
Definition: pplex.c:2146
#define TURN_DIRECTIVE_STATE
Definition: pplex.c:2183
Definition: parser.c:1503
static struct cb_replace_list * current_replace_list
Definition: pplex.c:2145
void cb_error(const char *,...) COB_A_FORMAT12
Definition: error.c:98
static flex_int16_t yy_chk[5374]
Definition: pplex.c:1432
if fold fold static computed alternate extra correct stack on syntax debugging line
Definition: flag.def:90
#define YY_RULE_SETUP
Definition: pplex.c:2344
Definition: ppparse.c:584
static char * yy_c_buf_p
Definition: pplex.c:308
static yy_state_type yy_last_accepting_state
Definition: pplex.c:2027
FILE * ppin
Definition: pplex.c:367
static size_t inside_bracket
Definition: pplex.c:2133
YY_BUFFER_STATE buffer
Definition: pplex.c:2112
Definition: parser.c:1538
#define unput(c)
Definition: pplex.c:215
#define YY_FATAL_ERROR(msg)
Definition: pplex.c:2316
Definition: parser.c:1790
static int requires_new_line
Definition: pplex.c:2143
int line
Definition: pplex.c:2122
Definition: parser.c:1634
static void check_comments(const char *, const char *)
Definition: pplex.c:5305
#define CB_FORMAT_FREE
Definition: cobc.h:66
#define YY_MORE_ADJ
Definition: pplex.c:2038
int cb_source_line
Definition: cobc.c:178
Definition: ppparse.c:619
Definition: parser.c:1360
static void yy_pop_state(void)
Definition: pplex.c:4240
#define EOB_ACT_LAST_MATCH
Definition: pplex.c:196
static struct cb_replace_list * base_replace_list
Definition: pplex.c:2147
static flex_int16_t yy_def[1183]
Definition: pplex.c:703
#define YY_NEW_FILE
Definition: pplex.c:159
#define YY_BUF_SIZE
Definition: pplex.c:2065
Definition: parser.c:1369
Definition: ppparse.c:595
static void check_listing(const char *, const unsigned int)
Definition: pplex.c:5319
static void ppensure_buffer_stack(void)
Definition: pplex.c:4173
#define DEFINE_DIRECTIVE_STATE
Definition: pplex.c:2181
static int yy_did_buffer_switch_on_eof
Definition: pplex.c:315
const char * file
Definition: pplex.c:2109
#define YY_RESTORE_YY_MORE_OFFSET
Definition: pplex.c:2039
static yy_state_type yy_try_NUL_trans(yy_state_type current_state)
Definition: pplex.c:3817
char * dname
Definition: pplex.c:2110
static struct plex_stack plex_cond_stack[16]
Definition: pplex.c:2153
void pp_delete_buffer(YY_BUFFER_STATE b)
Destroy the buffer.
Definition: pplex.c:4048
Definition: parser.c:1576
static flex_int32_t yy_ec[256]
Definition: pplex.c:525
static void skip_to_eol(void)
Definition: pplex.c:5268
static size_t comment_allowed
Definition: pplex.c:2137

Here is the call graph for this function:

int ppopen ( const char *  ,
struct cb_replace_list  
)

Definition at line 4420 of file pplex.c.

References _, copy_info::buffer, cb_error(), cb_source_file, cb_source_format, cb_source_line, COB_DASH, cobc_malloc(), cobc_strdup(), copy_stack, current_replace_list, copy_info::dname, errorcount, copy_info::file, cb_replace_list::last, copy_info::line, cb_replace_list::next, copy_info::next, pp_create_buffer(), ppin, copy_info::quotation_mark, quotation_mark, copy_info::replacing, copy_info::source_format, switch_to_buffer(), YY_BUF_SIZE, and YY_CURRENT_BUFFER.

Referenced by ppcopy(), and preprocess().

4421 {
4422  struct copy_info *p;
4423  char *s;
4424  char *dname;
4425 
4426  unsigned char bom[4];
4427 
4428  if (ppin) {
4429  for (; newline_count > 0; newline_count--) {
4430  ungetc ('\n', ppin);
4431  }
4432  }
4433 
4434  /* Open copy/source file, or use stdin */
4435  if (strcmp(name, COB_DASH) == 0) {
4436  ppin = stdin;
4437  } else {
4438 #ifdef __OS400__
4439  ppin = fopen (name, "r");
4440 #else
4441  ppin = fopen (name, "rb");
4442 #endif
4443  }
4444 
4445  if (!ppin) {
4446  if (cb_source_file) {
4447  cb_error ("%s: %s", name,
4448  _("No such file or directory"));
4449  } else {
4450  fflush (stderr);
4451  fprintf (stderr, "%s: %s", name,
4452  _("No such file or directory"));
4453  fflush (stderr);
4454  errorcount++;
4455  }
4456  return -1;
4457  }
4458 
4459  /* Check for BOM - *not* for input from stdin as rewind() clears the input
4460  buffer if used on stdin and output in console has normally no BOM at all */
4461  if (strcmp(name, COB_DASH) != 0) {
4462  if (fread (bom, 3, 1, ppin) == 1) {
4463  if (bom[0] != 0xEF || bom[1] != 0xBB || bom[2] != 0xBF) {
4464  rewind (ppin);
4465  }
4466  } else {
4467  rewind (ppin);
4468  }
4469  }
4470 
4471  /* Preserve the current buffer */
4472  p = cobc_malloc (sizeof (struct copy_info));
4473  p->file = cb_source_file;
4475 
4476  /* Save variables */
4478  p->line = cb_source_line;
4481 
4482  p->next = copy_stack;
4483  copy_stack = p;
4484 
4485  /* Set replacing list */
4486  if (replacing_list) {
4487  if (current_replace_list) {
4488  replacing_list->last->next = current_replace_list;
4489  replacing_list->last = current_replace_list->last;
4490  }
4491  current_replace_list = replacing_list;
4492  }
4493 
4494  dname = cobc_strdup (name);
4495  p->dname = dname;
4496  for (s = dname; *s; ++s) {
4497  if (*s == '\\') {
4498  *s = '/';
4499  }
4500  }
4501 
4502  /* Switch to new buffer */
4504  return 0;
4505 }
const char * cb_source_file
Definition: cobc.c:145
static int quotation_mark
Definition: pplex.c:2140
int cb_source_format
Definition: cobc.c:162
int quotation_mark
Definition: pplex.c:2114
static struct copy_info * copy_stack
Definition: pplex.c:2151
static void switch_to_buffer(const int, const char *, const YY_BUFFER_STATE)
Definition: pplex.c:4677
struct copy_info * next
Definition: pplex.c:2108
static size_t newline_count
Definition: pplex.c:2131
#define _(s)
Definition: cobcrun.c:59
#define COB_DASH
Definition: cobc.h:121
struct cb_replace_list * replacing
Definition: pplex.c:2111
int line
Definition: pplex.c:2113
struct cb_replace_list * last
Definition: cobc.h:168
int source_format
Definition: pplex.c:2115
YY_BUFFER_STATE pp_create_buffer(FILE *file, int size)
Allocate and initialize an input buffer state.
Definition: pplex.c:4020
#define YY_CURRENT_BUFFER
Definition: pplex.c:293
static struct cb_replace_list * current_replace_list
Definition: pplex.c:2145
void * cobc_strdup(const char *dupstr)
Definition: cobc.c:669
void cb_error(const char *,...) COB_A_FORMAT12
Definition: error.c:98
FILE * ppin
Definition: pplex.c:367
YY_BUFFER_STATE buffer
Definition: pplex.c:2112
void * cobc_malloc(const size_t size)
Definition: cobc.c:643
int cb_source_line
Definition: cobc.c:178
#define YY_BUF_SIZE
Definition: pplex.c:2065
const char * file
Definition: pplex.c:2109
char * dname
Definition: pplex.c:2110
int errorcount
Definition: cobc.c:173

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.

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 caller graph for this function:

void ppparse_clear_vars ( const struct cb_define_struct )

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:

void ppparse_error ( const char *  )

Definition at line 4553 of file pplex.c.

References cb_plex_error().

4554 {
4556 }
static size_t newline_count
Definition: pplex.c:2131
void cb_plex_error(const size_t, const char *,...) COB_A_FORMAT23
Definition: error.c:130

Here is the call graph for this function:

void remove_reserved_word ( const char *  )

Definition at line 2882 of file reserved.c.

References cob_strcasecmp(), delete_reserved_word_from_list(), FREE_WORD_STR, initialize_user_res_list_if_needed(), reserved_word_list::next, NULL, and reserved_word_list::word.

Referenced by cb_config_entry().

2883 {
2884  struct reserved_word_list *reserved;
2885  struct reserved_word_list *prev = NULL;
2886 
2888 
2889  for (reserved = cobc_user_res_list; reserved; reserved = reserved->next) {
2890  /*
2891  We can only remove the word if it has already been specified.
2892  */
2893  if (cob_strcasecmp (reserved->word, word) == 0) {
2895  reserved);
2896  return;
2897  }
2898  prev = reserved;
2899  }
2900 }
static void initialize_user_res_list_if_needed(void)
Definition: reserved.c:2725
struct reserved_word_list * cobc_user_res_list
Definition: reserved.c:36
EC ARGUMENT EC EC BOUND EC BOUND EC BOUND EC BOUND TABLE EC DATA EC DATA EC DATA PTR NULL
Definition: exception.def:95
struct reserved_word_list * next
Definition: cobc.h:223
static int cob_strcasecmp(const void *s1, const void *s2)
Definition: reserved.c:2530
static void delete_reserved_word_from_list(struct reserved_word_list *const prev, const enum free_word_action action, struct reserved_word_list *to_delete)
Definition: reserved.c:2619
char * word
Definition: cobc.h:224

Here is the call graph for this function:

Here is the caller graph for this function:

void ylex_call_destroy ( void  )

Definition at line 4757 of file scanner.c.

References NULL, and yylex_destroy().

Referenced by process_translate().

4758 {
4759  /* Release flex buffers */
4760  (void)yylex_destroy ();
4761  const78ptr = NULL;
4762 }
int yylex_destroy(void)
Definition: scanner.c:3770
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 struct cb_level_78 * const78ptr
Definition: scanner.c:1437

Here is the call graph for this function:

Here is the caller graph for this function:

void ylex_clear_all ( void  )

Definition at line 4736 of file scanner.c.

References cobc_free(), and NULL.

Referenced by main().

4737 {
4738  /* Clear buffers after parsing all source elements */
4739  if (picbuff2) {
4740  cobc_free (picbuff2);
4741  picbuff2 = NULL;
4742  }
4743  if (picbuff1) {
4744  cobc_free (picbuff1);
4745  picbuff1 = NULL;
4746  }
4747  if (plexbuff) {
4748  cobc_free (plexbuff);
4749  plexbuff = NULL;
4750  }
4751  plexsize = 0;
4752  pic1size = 0;
4753  pic2size = 0;
4754 }
void cobc_free(void *mptr)
Definition: cobc.c:657
static size_t pic1size
Definition: scanner.c:1444
static size_t pic2size
Definition: scanner.c:1445
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 char * picbuff1
Definition: scanner.c:1441
static size_t plexsize
Definition: scanner.c:1443
static char * plexbuff
Definition: scanner.c:1440
static char * picbuff2
Definition: scanner.c:1442

Here is the call graph for this function:

Here is the caller graph for this function:

int yylex ( void  )

The main scanner function which does all the work.

Definition at line 1705 of file scanner.c.

References _, BEGIN, BOTTOM, cb_build_alphanumeric_literal(), cb_build_comment(), cb_build_numeric_literal(), cb_build_reference(), CB_CHAIN, CB_CS_EXIT, cb_error(), cb_error_node, cb_find_defined_program_by_name(), CB_FUNC_PROTOTYPE, CB_FUNCTION_TYPE, cb_intrinsic_list, CB_LITERAL, cb_source_file, cb_source_line, CB_SYSTEM_NAME_P, CB_VALUE, cb_warning(), CB_WORD_COUNT, CB_WORD_ITEMS, cb_level_78::chk_const, COB_MAX_WORDLEN, cobc_cs_check, cobc_force_literal, cobc_free(), cobc_in_procedure, cobc_in_repository, cobc_parse_strdup(), cobc_strdup(), COMMA_DELIM, count_lines(), current_program, DECIMAL_IS_COMMA, DECIMAL_IS_PERIOD, cb_program::decimal_point, EC, END, END_FUNCTION, END_PROGRAM, EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, EOP, EQUAL, ESCAPE, EVENT_STATUS, EXCEPTION, EXCEPTION_CONDITION, EXPONENTIATION, cb_level_78::fld78, FROM_CRT, FUNCTION, FUNCTION_NAME, cb_program::function_spec_list, FUNCTION_STATE, functions_are_all, cb_level_78::globnext, GREATER, GREATER_OR_EQUAL, INITIAL, input(), INVALID_KEY, LENGTH_OF, LESS, LESS_OR_EQUAL, likely, LITERAL, lookup_intrinsic(), lookup_reserved_word(), MNEMONIC_NAME, cb_field::name, cb_intrinsic_table::name, cb_text_list::next, cb_level_78::next, NEXT_PAGE, NO_ADVANCING, cobc_reserved::nodegen, non_const_word, cb_level_78::not_const, NOT_END, NOT_EOP, NOT_EQUAL, NOT_ESCAPE, NOT_EXCEPTION, NOT_INVALID_KEY, NOT_OVERFLOW, NOT_SIZE_ERROR, NULL, cb_program::orig_program_id, PICTURE, PICTURE_STATE, PICTURE_SYMBOL, cb_level_78::prog, cb_program::prog_type, PROGRAM_NAME, read_literal(), READY_TRACE, REPLACING, RESET_TRACE, scan_b(), scan_define_options(), scan_floating_numeric(), scan_h(), scan_numeric(), scan_o(), scan_options(), scan_picture(), scan_x(), scan_z(), SCREEN_CONTROL, SEMI_COLON, SIZE_ERROR, cb_text_list::text, TOK_AMPER, TOK_CLOSE_PAREN, TOK_COLON, TOK_DIV, TOK_DOT, TOK_EQUAL, TOK_GREATER, TOK_LESS, TOK_MINUS, TOK_MUL, TOK_OPEN_PAREN, TOK_OVERFLOW, TOK_PLUS, cobc_reserved::token, cb_intrinsic_table::token, TOP, unlikely, unput, UPON_ARGUMENT_NUMBER, UPON_COMMAND_LINE, UPON_ENVIRONMENT_NAME, UPON_ENVIRONMENT_VALUE, USER_FUNCTION_NAME, cb_program::user_spec_list, cb_field::values, warningopt, WORD, YY_AT_BOL, YY_BREAK, YY_BUF_SIZE, YY_BUFFER_NEW, YY_BUFFER_NORMAL, yy_c_buf_p, yy_create_buffer(), YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_did_buffer_switch_on_eof, YY_DO_BEFORE_ACTION, YY_END_OF_BUFFER, YY_FATAL_ERROR, yy_get_next_buffer(), yy_get_previous_state(), yy_hold_char, yy_init, yy_last_accepting_cpos, yy_last_accepting_state, yy_load_buffer_state(), YY_MORE_ADJ, yy_n_chars, YY_NEW_FILE, YY_RESTORE_YY_MORE_OFFSET, YY_RULE_SETUP, YY_SC_TO_UI, YY_START, yy_start, YY_STATE_EOF, yy_try_NUL_trans(), YY_USER_INIT, yyensure_buffer_stack(), yyin, yyleng, yylval, yyout, yyterminate, yytext_ptr, and yywrap().

1706 {
1707  register yy_state_type yy_current_state;
1708  register char *yy_cp, *yy_bp;
1709  register int yy_act;
1710 
1711  if ( !(yy_init) )
1712  {
1713  (yy_init) = 1;
1714 
1715 #ifdef YY_USER_INIT
1716  YY_USER_INIT;
1717 #endif
1718 
1719  if ( ! (yy_start) )
1720  (yy_start) = 1; /* first start state */
1721 
1722  if ( ! yyin )
1723  yyin = stdin;
1724 
1725  if ( ! yyout )
1726  yyout = stdout;
1727 
1728  if ( ! YY_CURRENT_BUFFER ) {
1732  }
1733 
1735  }
1736 
1737  {
1738 #line 229 "scanner.l"
1739 
1740 
1741 
1742  if (likely(current_program)) {
1743  if (current_program->decimal_point == '.') {
1745  } else {
1747  }
1748  }
1749 
1750  /* We treat integer literals immediately after '.' as labels;
1751  that is, they must be level numbers or section names. */
1752  if (last_token_is_dot) {
1753  integer_is_label = 1;
1754  last_token_is_dot = 0;
1755  } else {
1756  integer_is_label = 0;
1757  }
1758 
1759 
1760 
1761 #line 1761 "scanner.c"
1762 
1763  while ( 1 ) /* loops until end-of-file is reached */
1764  {
1765  yy_cp = (yy_c_buf_p);
1766 
1767  /* Support of yytext. */
1768  *yy_cp = (yy_hold_char);
1769 
1770  /* yy_bp points to the position in yy_ch_buf of the start of
1771  * the current run.
1772  */
1773  yy_bp = yy_cp;
1774 
1775  yy_current_state = (yy_start);
1776  yy_current_state += YY_AT_BOL();
1777 yy_match:
1778  do
1779  {
1780  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1781  if ( yy_accept[yy_current_state] )
1782  {
1783  (yy_last_accepting_state) = yy_current_state;
1784  (yy_last_accepting_cpos) = yy_cp;
1785  }
1786  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1787  {
1788  yy_current_state = (int) yy_def[yy_current_state];
1789  if ( yy_current_state >= 833 )
1790  yy_c = yy_meta[(unsigned int) yy_c];
1791  }
1792  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1793  ++yy_cp;
1794  }
1795  while ( yy_current_state != 832 );
1796  yy_cp = (yy_last_accepting_cpos);
1797  yy_current_state = (yy_last_accepting_state);
1798 
1799 yy_find_action:
1800  yy_act = yy_accept[yy_current_state];
1801 
1803 
1804 do_action: /* This label is used only to access EOF actions. */
1805 
1806  switch ( yy_act )
1807  { /* beginning of action switch */
1808  case 0: /* must back up */
1809  /* undo the effects of YY_DO_BEFORE_ACTION */
1810  *yy_cp = (yy_hold_char);
1811  yy_cp = (yy_last_accepting_cpos);
1812  yy_current_state = (yy_last_accepting_state);
1813  goto yy_find_action;
1814 
1815 case 1:
1816 /* rule 1 can match eol */
1818 #line 251 "scanner.l"
1819 {
1821 }
1822  YY_BREAK
1823 case 2:
1824 /* rule 2 can match eol */
1826 #line 255 "scanner.l"
1827 {
1828  scan_options (yytext, 1);
1829 }
1830  YY_BREAK
1831 case 3:
1832 /* rule 3 can match eol */
1834 #line 259 "scanner.l"
1835 {
1836  scan_options (yytext, 2);
1837 }
1838  YY_BREAK
1839 case 4:
1840 /* rule 4 can match eol */
1842 #line 263 "scanner.l"
1843 {
1844  scan_options (yytext, 3);
1845 }
1846  YY_BREAK
1847 case 5:
1848 /* rule 5 can match eol */
1850 #line 267 "scanner.l"
1851 {
1852  cb_source_line++;
1853 }
1854  YY_BREAK
1855 case 6:
1857 #line 271 "scanner.l"
1858 {
1859  /* Line directive */
1860  char *p1;
1861  char *p2;
1862 
1863  p1 = strchr (yytext, '"');
1864  if (p1) {
1865  p2 = cobc_strdup (p1 + 1);
1866  p1 = strrchr (p2, '"');
1867  if (p1) {
1868  *p1 = 0;
1870  cb_source_line = (int)strtol (yytext + 5, NULL, 10) - 1;
1871  }
1872  cobc_free (p2);
1873  }
1874 }
1875  YY_BREAK
1876 case 7:
1878 #line 289 "scanner.l"
1879 {
1880  /* Ignore */
1881 }
1882  YY_BREAK
1883 case 8:
1884 #line 294 "scanner.l"
1885 case 9:
1887 #line 294 "scanner.l"
1888 {
1890 }
1891  YY_BREAK
1892 case 10:
1894 #line 298 "scanner.l"
1895 {
1897  yylval = NULL;
1898  return FUNCTION;
1899  }
1901 }
1902  YY_BREAK
1903 case 11:
1905 #line 306 "scanner.l"
1906 {
1907  /* String literal */
1908  cobc_force_literal = 0;
1909  read_literal (yytext[0]);
1910  return LITERAL;
1911 }
1912  YY_BREAK
1913 case 12:
1914 #line 314 "scanner.l"
1915 case 13:
1917 #line 314 "scanner.l"
1918 {
1919  /* X string literal */
1920  cobc_force_literal = 0;
1921  return scan_x (yytext + 2);
1922 }
1923  YY_BREAK
1924 case 14:
1925 #line 321 "scanner.l"
1926 case 15:
1928 #line 321 "scanner.l"
1929 {
1930  /* Z string literal */
1931  cobc_force_literal = 0;
1932  return scan_z (yytext + 2, 0);
1933 }
1934  YY_BREAK
1935 case 16:
1936 #line 328 "scanner.l"
1937 case 17:
1939 #line 328 "scanner.l"
1940 {
1941  /* L string literal */
1942  cobc_force_literal = 0;
1943  return scan_z (yytext + 2, 1);
1944 }
1945  YY_BREAK
1946 case 18:
1947 #line 335 "scanner.l"
1948 case 19:
1950 #line 335 "scanner.l"
1951 {
1952  /* H numeric literal */
1953  cobc_force_literal = 0;
1954  return scan_h (yytext + 2, 1);
1955 }
1956  YY_BREAK
1957 case 20:
1958 #line 342 "scanner.l"
1959 case 21:
1961 #line 342 "scanner.l"
1962 {
1963  /* B boolean/numeric literal */
1964  cobc_force_literal = 0;
1965  return scan_b (yytext + 2, 1);
1966 }
1967  YY_BREAK
1968 case 22:
1970 #line 348 "scanner.l"
1971 {
1972  /*
1973  To avoid subtle silent errors, such as B#021, this rule (and the ones
1974  following) here admit some invalid literals which emit errors when
1975  they are processed.
1976  */
1977  /* ACUCOBOL binary numeric literal */
1978  cobc_force_literal = 0;
1979  return scan_b (yytext + 2, 0);
1980 }
1981  YY_BREAK
1982 case 23:
1984 #line 359 "scanner.l"
1985 {
1986  /* ACUCOBOL octal numeric literal */
1987  cobc_force_literal = 0;
1988  return scan_o (yytext + 2);
1989 }
1990  YY_BREAK
1991 case 24:
1992 #line 366 "scanner.l"
1993 case 25:
1995 #line 366 "scanner.l"
1996 {
1997  /* ACUCOBOL hexadecimal numeric literal */
1998  cobc_force_literal = 0;
1999  return scan_h (yytext + 2, 0);
2000 }
2001  YY_BREAK
2002 case 26:
2004 #line 372 "scanner.l"
2005 {
2006  inside_bracket++;
2007  return TOK_OPEN_PAREN;
2008 }
2009  YY_BREAK
2010 case 27:
2012 #line 377 "scanner.l"
2013 {
2014  if (inside_bracket > 0) {
2015  inside_bracket--;
2016  }
2017  return TOK_CLOSE_PAREN;
2018 }
2019  YY_BREAK
2020 case 28:
2022 #line 384 "scanner.l"
2023 {
2024  cobc_force_literal = 0;
2025  if (integer_is_label) {
2026  /* Integer label or level number */
2028  return WORD;
2029  }
2030  /* Numeric literal or referenced integer label */
2031  /* All transformations/checks are postponed to tree.c */
2033  return LITERAL;
2034 }
2035  YY_BREAK
2036 case 29:
2038 #line 397 "scanner.l"
2039 {
2040  /* Numeric literal (signed) */
2041  return scan_numeric (yytext);
2042 }
2043  YY_BREAK
2044 case 30:
2046 #line 402 "scanner.l"
2047 {
2048  /* Ignore */
2049 }
2050  YY_BREAK
2051 case 31:
2053 #line 406 "scanner.l"
2054 {
2055  if (inside_bracket) {
2056  return SEMI_COLON;
2057  }
2058  /* Ignore */
2059 }
2060  YY_BREAK
2061 case 32:
2063 #line 413 "scanner.l"
2064 {
2065  /* Numeric floating point literal */
2066  return scan_floating_numeric (yytext);
2067 }
2068  YY_BREAK
2069 case 33:
2071 #line 418 "scanner.l"
2072 {
2073  /* Invalid numeric floating point literal */
2074  return scan_floating_numeric (yytext);
2075 }
2076  YY_BREAK
2077 case 34:
2079 #line 423 "scanner.l"
2080 {
2081  /* Numeric literal */
2082  return scan_numeric (yytext);
2083 }
2084  YY_BREAK
2085 case 35:
2087 #line 428 "scanner.l"
2088 {
2089  if (inside_bracket) {
2090  return COMMA_DELIM;
2091  }
2092  /* Ignore */
2093 }
2094  YY_BREAK
2095 case 36:
2097 #line 435 "scanner.l"
2098 {
2099  /* Numeric floating point literal */
2100  return scan_floating_numeric (yytext);
2101 }
2102  YY_BREAK
2103 case 37:
2105 #line 440 "scanner.l"
2106 {
2107  /* Invalid numeric floating point literal */
2108  return scan_floating_numeric (yytext);
2109 }
2110  YY_BREAK
2111 case 38:
2113 #line 445 "scanner.l"
2114 {
2115  /* Numeric literal */
2116  return scan_numeric (yytext);
2117 }
2118  YY_BREAK
2119 case 39:
2121 #line 450 "scanner.l"
2122 {
2123  unput (',');
2124 }
2125  YY_BREAK
2126 case 40:
2128 #line 454 "scanner.l"
2129 {
2130  if (inside_bracket) {
2131  return COMMA_DELIM;
2132  }
2133  /* Ignore */
2134 }
2135  YY_BREAK
2136 case 41:
2137 /* rule 41 can match eol */
2139 #line 461 "scanner.l"
2140 {
2141  cobc_force_literal = 1;
2142  count_lines (yytext);
2143  return END_PROGRAM;
2144 }
2145  YY_BREAK
2146 case 42:
2147 /* rule 42 can match eol */
2149 #line 467 "scanner.l"
2150 {
2151  cobc_force_literal = 1;
2152  count_lines (yytext);
2153  return END_FUNCTION;
2154 }
2155  YY_BREAK
2156 case 43:
2157 /* rule 43 can match eol */
2159 #line 473 "scanner.l"
2160 {
2161  count_lines (yytext);
2162  return PICTURE_SYMBOL;
2163 }
2164  YY_BREAK
2165 case 44:
2166 /* rule 44 can match eol */
2168 #line 478 "scanner.l"
2169 {
2170  count_lines (yytext);
2171  return FROM_CRT;
2172 }
2173  YY_BREAK
2174 case 45:
2175 /* rule 45 can match eol */
2177 #line 483 "scanner.l"
2178 {
2179  count_lines (yytext);
2180  return SCREEN_CONTROL;
2181 }
2182  YY_BREAK
2183 case 46:
2184 /* rule 46 can match eol */
2186 #line 488 "scanner.l"
2187 {
2188  count_lines (yytext);
2189  return EVENT_STATUS;
2190 }
2191  YY_BREAK
2192 case 47:
2193 /* rule 47 can match eol */
2195 #line 493 "scanner.l"
2196 {
2197  count_lines (yytext);
2198  return READY_TRACE;
2199 }
2200  YY_BREAK
2201 case 48:
2202 /* rule 48 can match eol */
2204 #line 498 "scanner.l"
2205 {
2206  count_lines (yytext);
2207  return RESET_TRACE;
2208 }
2209  YY_BREAK
2210 case 49:
2211 /* rule 49 can match eol */
2212 #line 504 "scanner.l"
2213 case 50:
2214 /* rule 50 can match eol */
2215 #line 505 "scanner.l"
2216 case 51:
2217 /* rule 51 can match eol */
2218 #line 506 "scanner.l"
2219 case 52:
2220 /* rule 52 can match eol */
2222 #line 506 "scanner.l"
2223 {
2224  count_lines (yytext);
2225  return GREATER_OR_EQUAL;
2226 }
2227  YY_BREAK
2228 case 53:
2229 /* rule 53 can match eol */
2231 #line 511 "scanner.l"
2232 {
2233  count_lines (yytext);
2234  return GREATER;
2235 }
2236  YY_BREAK
2237 case 54:
2238 /* rule 54 can match eol */
2239 #line 517 "scanner.l"
2240 case 55:
2241 /* rule 55 can match eol */
2242 #line 518 "scanner.l"
2243 case 56:
2244 /* rule 56 can match eol */
2245 #line 519 "scanner.l"
2246 case 57:
2247 /* rule 57 can match eol */
2249 #line 519 "scanner.l"
2250 {
2251  count_lines (yytext);
2252  return LESS_OR_EQUAL;
2253 }
2254  YY_BREAK
2255 case 58:
2256 /* rule 58 can match eol */
2258 #line 524 "scanner.l"
2259 {
2260  count_lines (yytext);
2261  return LESS;
2262 }
2263  YY_BREAK
2264 case 59:
2265 /* rule 59 can match eol */
2267 #line 529 "scanner.l"
2268 {
2269  count_lines (yytext);
2270  return EQUAL;
2271 }
2272  YY_BREAK
2273 case 60:
2274 /* rule 60 can match eol */
2276 #line 534 "scanner.l"
2277 {
2278  count_lines (yytext);
2279  return REPLACING;
2280 }
2281  YY_BREAK
2282 case 61:
2283 /* rule 61 can match eol */
2284 #line 540 "scanner.l"
2285 case 62:
2286 /* rule 62 can match eol */
2287 #line 541 "scanner.l"
2288 case 63:
2289 /* rule 63 can match eol */
2291 #line 541 "scanner.l"
2292 {
2293  count_lines (yytext);
2294  return TOP;
2295 }
2296  YY_BREAK
2297 case 64:
2298 /* rule 64 can match eol */
2299 #line 547 "scanner.l"
2300 case 65:
2301 /* rule 65 can match eol */
2302 #line 548 "scanner.l"
2303 case 66:
2304 /* rule 66 can match eol */
2306 #line 548 "scanner.l"
2307 {
2308  count_lines (yytext);
2309  return BOTTOM;
2310 }
2311  YY_BREAK
2312 case 67:
2313 /* rule 67 can match eol */
2314 #line 554 "scanner.l"
2315 case 68:
2316 /* rule 68 can match eol */
2318 #line 554 "scanner.l"
2319 {
2320  count_lines (yytext);
2321  return NO_ADVANCING;
2322 }
2323  YY_BREAK
2324 case 69:
2325 /* rule 69 can match eol */
2326 #line 560 "scanner.l"
2327 case 70:
2328 /* rule 70 can match eol */
2330 #line 560 "scanner.l"
2331 {
2332  count_lines (yytext);
2333  return NEXT_PAGE;
2334 }
2335  YY_BREAK
2336 case 71:
2337 /* rule 71 can match eol */
2338 #line 566 "scanner.l"
2339 case 72:
2340 /* rule 72 can match eol */
2342 #line 566 "scanner.l"
2343 {
2344  count_lines (yytext);
2345  return NOT_SIZE_ERROR;
2346 }
2347  YY_BREAK
2348 case 73:
2349 /* rule 73 can match eol */
2350 #line 572 "scanner.l"
2351 case 74:
2352 /* rule 74 can match eol */
2354 #line 572 "scanner.l"
2355 {
2356  count_lines (yytext);
2357  return SIZE_ERROR;
2358 }
2359  YY_BREAK
2360 case 75:
2361 /* rule 75 can match eol */
2362 #line 578 "scanner.l"
2363 case 76:
2364 /* rule 76 can match eol */
2366 #line 578 "scanner.l"
2367 {
2368  count_lines (yytext);
2369  return NOT_ESCAPE;
2370 }
2371  YY_BREAK
2372 case 77:
2373 /* rule 77 can match eol */
2374 #line 584 "scanner.l"
2375 case 78:
2376 /* rule 78 can match eol */
2378 #line 584 "scanner.l"
2379 {
2380  count_lines (yytext);
2381  return NOT_EXCEPTION;
2382 }
2383  YY_BREAK
2384 case 79:
2385 /* rule 79 can match eol */
2387 #line 589 "scanner.l"
2388 {
2389  count_lines (yytext);
2390  return ESCAPE;
2391 }
2392  YY_BREAK
2393 case 80:
2394 /* rule 80 can match eol */
2396 #line 594 "scanner.l"
2397 {
2398  count_lines (yytext);
2399  return EXCEPTION;
2400 }
2401  YY_BREAK
2402 case 81:
2403 /* rule 81 can match eol */
2404 #line 600 "scanner.l"
2405 case 82:
2406 /* rule 82 can match eol */
2408 #line 600 "scanner.l"
2409 {
2410  count_lines (yytext);
2411  return NOT_OVERFLOW;
2412 }
2413  YY_BREAK
2414 case 83:
2415 /* rule 83 can match eol */
2416 #line 606 "scanner.l"
2417 case 84:
2418 /* rule 84 can match eol */
2420 #line 606 "scanner.l"
2421 {
2422  count_lines (yytext);
2423  return NOT_END;
2424 }
2425  YY_BREAK
2426 case 85:
2427 /* rule 85 can match eol */
2429 #line 611 "scanner.l"
2430 {
2431  count_lines (yytext);
2432  return END;
2433 }
2434  YY_BREAK
2435 case 86:
2436 /* rule 86 can match eol */
2437 #line 617 "scanner.l"
2438 case 87:
2439 /* rule 87 can match eol */
2441 #line 617 "scanner.l"
2442 {
2443  count_lines (yytext);
2444  return TOK_OVERFLOW;
2445 }
2446  YY_BREAK
2447 case 88:
2448 /* rule 88 can match eol */
2449 #line 623 "scanner.l"
2450 case 89:
2451 /* rule 89 can match eol */
2452 #line 624 "scanner.l"
2453 case 90:
2454 /* rule 90 can match eol */
2455 #line 625 "scanner.l"
2456 case 91:
2457 /* rule 91 can match eol */
2459 #line 625 "scanner.l"
2460 {
2461  count_lines (yytext);
2462  return NOT_EOP;
2463 }
2464  YY_BREAK
2465 case 92:
2466 /* rule 92 can match eol */
2467 #line 631 "scanner.l"
2468 case 93:
2469 /* rule 93 can match eol */
2470 #line 632 "scanner.l"
2471 case 94:
2472 /* rule 94 can match eol */
2473 #line 633 "scanner.l"
2474 case 95:
2475 /* rule 95 can match eol */
2477 #line 633 "scanner.l"
2478 {
2479  count_lines (yytext);
2480  return EOP;
2481 }
2482  YY_BREAK
2483 case 96:
2484 /* rule 96 can match eol */
2486 #line 638 "scanner.l"
2487 {
2488  count_lines (yytext);
2489  return NOT_INVALID_KEY;
2490 }
2491  YY_BREAK
2492 case 97:
2493 /* rule 97 can match eol */
2495 #line 643 "scanner.l"
2496 {
2497  count_lines (yytext);
2498  return NOT_INVALID_KEY;
2499 }
2500  YY_BREAK
2501 case 98:
2502 /* rule 98 can match eol */
2504 #line 648 "scanner.l"
2505 {
2506  count_lines (yytext);
2507  return INVALID_KEY;
2508 }
2509  YY_BREAK
2510 case 99:
2511 /* rule 99 can match eol */
2513 #line 653 "scanner.l"
2514 {
2515  count_lines (yytext);
2516  return INVALID_KEY;
2517 }
2518  YY_BREAK
2519 case 100:
2520 /* rule 100 can match eol */
2522 #line 658 "scanner.l"
2523 {
2524  count_lines (yytext);
2525  return UPON_ENVIRONMENT_NAME;
2526 }
2527  YY_BREAK
2528 case 101:
2529 /* rule 101 can match eol */
2531 #line 663 "scanner.l"
2532 {
2533  count_lines (yytext);
2534  return UPON_ENVIRONMENT_VALUE;
2535 }
2536  YY_BREAK
2537 case 102:
2538 /* rule 102 can match eol */
2540 #line 668 "scanner.l"
2541 {
2542  count_lines (yytext);
2543  return UPON_ARGUMENT_NUMBER;
2544 }
2545  YY_BREAK
2546 case 103:
2547 /* rule 103 can match eol */
2549 #line 673 "scanner.l"
2550 {
2551  count_lines (yytext);
2552  return UPON_COMMAND_LINE;
2553 }
2554  YY_BREAK
2555 case 104:
2556 /* rule 104 can match eol */
2558 #line 678 "scanner.l"
2559 {
2560  count_lines (yytext);
2561  return EXCEPTION_CONDITION;
2562 }
2563  YY_BREAK
2564 case 105:
2565 /* rule 105 can match eol */
2567 #line 683 "scanner.l"
2568 {
2569  count_lines (yytext);
2570  return EXCEPTION_CONDITION;
2571 }
2572  YY_BREAK
2573 case 106:
2574 /* rule 106 can match eol */
2576 #line 688 "scanner.l"
2577 {
2578  count_lines (yytext);
2579  return EC;
2580 }
2581  YY_BREAK
2582 case 107:
2583 /* rule 107 can match eol */
2585 #line 693 "scanner.l"
2586 {
2587  count_lines (yytext);
2588  return LENGTH_OF;
2589 }
2590  YY_BREAK
2591 case 108:
2592 /* rule 108 can match eol */
2594 #line 698 "scanner.l"
2595 {
2596  /* ACUCOBOL extension: switch-names with space and with letter */
2597  char suffix[3] = "";
2598  char name[10] = "";
2599 
2600  unput (yytext[yyleng-1]); /* unput seperator */
2601  if (cobc_in_procedure) {
2602  /* unput characters */
2603  yylval = cb_build_reference ("SWITCH");
2604  if (isdigit((unsigned char)yytext[yyleng-3])) {
2605  unput (yytext[yyleng-2]);
2606  unput (yytext[yyleng-3]);
2607  } else {
2608  unput (yytext[yyleng-2]);
2609  }
2610  } else {
2611  /* we need to return a single word, reverted later in parser.y */
2612  if (yytext[yyleng-3] == ' ' && isdigit((unsigned char)yytext[yyleng-2])) {
2613  /* SWITCH 0 to SWITCH 9 */
2614  suffix[0] = yytext[yyleng-2];
2615  } else if (isdigit((unsigned char)yytext[yyleng-3])) {
2616  /* SWITCH 00 to SWITCH 99 */
2617  suffix[0] = yytext[yyleng-3];
2618  suffix[1] = yytext[yyleng-2];
2619  } else {
2620  suffix[0] = yytext[yyleng-2];
2621  }
2622  strncpy(name, yytext, 6);
2623  strcat(name, "_");
2624  strcat(name, suffix);
2625  yylval = cb_build_reference (name);
2626  }
2627  return WORD;
2628 }
2629  YY_BREAK
2630 case 109:
2632 #line 733 "scanner.l"
2633 {
2634  struct cb_level_78 *p78;
2635  struct cb_intrinsic_table *cbp;
2636  struct cobc_reserved *resptr;
2637  struct cb_text_list *tlp;
2638  cb_tree x;
2639  cb_tree l;
2640  struct cb_program *program;
2641 
2642  /* Check word length */
2643  if (unlikely(yyleng > cb_word_length)) {
2644  if (yyleng > COB_MAX_WORDLEN) {
2645  /* Absolute limit */
2646  cb_error (_("Word length exceeds maximum of %d characters - '%s'"),
2648  } else if (!cb_relaxed_syntax_check) {
2649  cb_error (_("Word length exceeds %d characters - '%s'"),
2650  cb_word_length, yytext);
2651  } else if (warningopt) {
2652  cb_warning (_("Word length exceeds %d characters - '%s'"),
2653  cb_word_length, yytext);
2654  }
2655  }
2656 
2657  /* Check Intrinsic FUNCTION name without keyword */
2660  cbp = lookup_intrinsic (yytext, 1, 0);
2661  if (cbp) {
2662  if (cobc_in_repository) {
2664  return FUNCTION_NAME;
2665  }
2666  if (functions_are_all) {
2668  return (enum yytokentype)(cbp->token);
2669  }
2670  for (tlp = cb_intrinsic_list; tlp; tlp = tlp->next) {
2671  if (!strcasecmp (yytext, tlp->text)) {
2673  return (enum yytokentype)(cbp->token);
2674  }
2675  }
2677  for (; l; l = CB_CHAIN(l)) {
2678  x = CB_VALUE (l);
2679  if (!strcasecmp (yytext,
2680  (char *)(CB_LITERAL(x)->data))) {
2682  return (enum yytokentype)(cbp->token);
2683  }
2684  }
2685  }
2686  }
2687 
2688  /* Bail early for (END) PROGRAM-ID when not a literal */
2690  /* Force PROGRAM-ID / END PROGRAM */
2691  cobc_force_literal = 0;
2692  if (cb_fold_call) {
2694  return PROGRAM_NAME;
2695  } else {
2697  return LITERAL;
2698  }
2699  }
2700 
2701  /* Check reserved word */
2702  resptr = lookup_reserved_word (yytext);
2703  if (resptr != NULL) {
2704  if (resptr->nodegen) {
2705  /* Save location for terminator checking */
2706  /* Misuse comment tree to mark statement */
2708  } else {
2709  yylval = NULL;
2710  }
2711  return resptr->token;
2712  }
2713 
2714  /* Check user function */
2715  if (cobc_in_repository) {
2717  return WORD;
2718  } else {
2720  !functions_are_all &&
2721  !strcasecmp (yytext, current_program->orig_program_id)) {
2722  /* Direct recursive reference */
2724  return USER_FUNCTION_NAME;
2725  }
2726  for (l = current_program->user_spec_list; l; l = CB_CHAIN(l)) {
2727  x = CB_VALUE (l);
2728  if (!strcasecmp (yytext, CB_FUNC_PROTOTYPE (x)->name)) {
2730  return USER_FUNCTION_NAME;
2731  }
2732  }
2733  }
2734 
2735  /* Check user programs */
2737  if (program) {
2739  return PROGRAM_NAME;
2740  }
2741 
2742  /* User word */
2743 
2744  /* Check local, global and source global CONSTANT (78) items */
2745 
2746  for (p78 = top78ptr; p78; p78 = p78->globnext) {
2747  if (strcasecmp (yytext, p78->fld78->name) == 0) {
2748  if (unlikely(non_const_word)) {
2749  if (p78->prog == current_program) {
2750  cb_error (_("A constant may not be used here - '%s'"), yytext);
2752  return WORD;
2753  }
2754  if (p78->chk_const) {
2755  p78->not_const = 1;
2756  }
2757  break;
2758  }
2759  if (p78->chk_const && p78->not_const) {
2760  break;
2761  }
2762  yylval = CB_VALUE (p78->fld78->values);
2763  return LITERAL;
2764  }
2765  }
2766 
2768 
2769  /* Special name handling */
2770  if (CB_WORD_COUNT (yylval) > 0 && CB_WORD_ITEMS (yylval)) {
2771  x = CB_VALUE (CB_WORD_ITEMS (yylval));
2772  if (CB_SYSTEM_NAME_P (x)) {
2773  return MNEMONIC_NAME;
2774  }
2775  }
2776 
2777  return WORD;
2778 }
2779  YY_BREAK
2780 case 110:
2782 #line 880 "scanner.l"
2783 {
2784  yylval = NULL;
2785  return LESS_OR_EQUAL;
2786 }
2787  YY_BREAK
2788 case 111:
2790 #line 885 "scanner.l"
2791 {
2792  yylval = NULL;
2793  return GREATER_OR_EQUAL;
2794 }
2795  YY_BREAK
2796 case 112:
2798 #line 890 "scanner.l"
2799 {
2800  yylval = NULL;
2801  return NOT_EQUAL;
2802 }
2803  YY_BREAK
2804 case 113:
2806 #line 895 "scanner.l"
2807 {
2808  yylval = NULL;
2809  return EXPONENTIATION;
2810 }
2811  YY_BREAK
2812 case 114:
2814 #line 900 "scanner.l"
2815 {
2816  last_token_is_dot = 1;
2817  yylval = NULL;
2818  return TOK_DOT;
2819 }
2820  YY_BREAK
2821 case 115:
2823 #line 906 "scanner.l"
2824 {
2825  yylval = NULL;
2826  return TOK_AMPER;
2827 }
2828  YY_BREAK
2829 case 116:
2831 #line 911 "scanner.l"
2832 {
2833  yylval = NULL;
2834  return TOK_COLON;
2835 }
2836  YY_BREAK
2837 case 117:
2839 #line 916 "scanner.l"
2840 {
2841  yylval = NULL;
2842  return TOK_EQUAL;
2843 }
2844  YY_BREAK
2845 case 118:
2847 #line 921 "scanner.l"
2848 {
2849  yylval = NULL;
2850  return TOK_DIV;
2851 }
2852  YY_BREAK
2853 case 119:
2855 #line 926 "scanner.l"
2856 {
2857  yylval = NULL;
2858  return TOK_MUL;
2859 }
2860  YY_BREAK
2861 case 120:
2863 #line 931 "scanner.l"
2864 {
2865  yylval = NULL;
2866  return TOK_PLUS;
2867 }
2868  YY_BREAK
2869 case 121:
2871 #line 936 "scanner.l"
2872 {
2873  yylval = NULL;
2874  return TOK_MINUS;
2875 }
2876  YY_BREAK
2877 case 122:
2879 #line 941 "scanner.l"
2880 {
2881  yylval = NULL;
2882  return TOK_LESS;
2883 }
2884  YY_BREAK
2885 case 123:
2887 #line 946 "scanner.l"
2888 {
2889  yylval = NULL;
2890  return TOK_GREATER;
2891 }
2892  YY_BREAK
2893 case 124:
2895 #line 951 "scanner.l"
2896 {
2897  int c;
2898 
2899  cb_error (_("Invalid symbol: %s - Skipping word"), yytext);
2900  while ((c = input ()) != EOF) {
2901  if (c == '\n' || c == ' ') {
2902  break;
2903  }
2904  }
2905  if (c != EOF) {
2906  unput (c);
2907  }
2908 }
2909  YY_BREAK
2910 
2911 case 125:
2913 #line 967 "scanner.l"
2914 {
2915  /* Ignore */
2916  }
2917  YY_BREAK
2918 case 126:
2920 #line 970 "scanner.l"
2921 {
2922  BEGIN INITIAL;
2923  scan_picture (yytext);
2924  return PICTURE;
2925  }
2926  YY_BREAK
2927 
2928 
2929 case 127:
2931 #line 978 "scanner.l"
2932 {
2933  struct cb_intrinsic_table *cbp;
2934  cb_tree l;
2935  cb_tree x;
2936 
2937  BEGIN INITIAL;
2939  for (l = current_program->user_spec_list; l; l = CB_CHAIN(l)) {
2940  x = CB_VALUE (l);
2941  if (!strcasecmp (yytext, CB_FUNC_PROTOTYPE (x)->name)) {
2942  return USER_FUNCTION_NAME;
2943  }
2944  }
2945  cbp = lookup_intrinsic (yytext, 1, 0);
2946  if (cbp) {
2947  return (enum yytokentype)(cbp->token);
2948  }
2949  return FUNCTION_NAME;
2950  }
2951  YY_BREAK
2952 case 128:
2954 #line 997 "scanner.l"
2955 {
2956  yylval = NULL;
2957  return yytext[0];
2958  }
2959  YY_BREAK
2960 
2961 case YY_STATE_EOF(INITIAL):
2962 case YY_STATE_EOF(DECIMAL_IS_PERIOD):
2963 case YY_STATE_EOF(DECIMAL_IS_COMMA):
2964 case YY_STATE_EOF(PICTURE_STATE):
2965 case YY_STATE_EOF(FUNCTION_STATE):
2966 #line 1003 "scanner.l"
2967 {
2968  struct cb_level_78 *p78;
2969  struct cb_level_78 *p782;
2970 
2971  /* At EOF - Clear variables */
2972  for (p78 = lev78ptr; p78; ) {
2973  p782 = p78->next;
2974  cobc_free (p78);
2975  p78 = p782;
2976  }
2977  for (p78 = globlev78ptr; p78; ) {
2978  p782 = p78->next;
2979  cobc_free (p78);
2980  p78 = p782;
2981  }
2982  for (p78 = const78ptr; p78; ) {
2983  p782 = p78->next;
2984  cobc_free (p78);
2985  p78 = p782;
2986  }
2987  top78ptr = NULL;
2988  last_token_is_dot = 0;
2989  integer_is_label = 0;
2990  inside_bracket = 0;
2991  lev78ptr = NULL;
2992  globlev78ptr = NULL;
2993  cobc_force_literal = 0;
2994  yyterminate ();
2995 }
2996  YY_BREAK
2997 case 129:
2999 #line 1033 "scanner.l"
3000 YY_FATAL_ERROR( "flex scanner jammed" );
3001  YY_BREAK
3002 #line 3002 "scanner.c"
3003 
3004  case YY_END_OF_BUFFER:
3005  {
3006  /* Amount of text matched not including the EOB char. */
3007  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
3008 
3009  /* Undo the effects of YY_DO_BEFORE_ACTION. */
3010  *yy_cp = (yy_hold_char);
3012 
3013  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
3014  {
3015  /* We're scanning a new file or input source. It's
3016  * possible that this happened because the user
3017  * just pointed yyin at a new source and called
3018  * yylex(). If so, then we have to assure
3019  * consistency between YY_CURRENT_BUFFER and our
3020  * globals. Here is the right place to do so, because
3021  * this is the first action (other than possibly a
3022  * back-up) that will match for the new input source.
3023  */
3024  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3025  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
3026  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
3027  }
3028 
3029  /* Note that here we test for yy_c_buf_p "<=" to the position
3030  * of the first EOB in the buffer, since yy_c_buf_p will
3031  * already have been incremented past the NUL character
3032  * (since all states make transitions on EOB to the
3033  * end-of-buffer state). Contrast this with the test
3034  * in input().
3035  */
3036  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
3037  { /* This was really a NUL. */
3038  yy_state_type yy_next_state;
3039 
3040  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
3041 
3042  yy_current_state = yy_get_previous_state( );
3043 
3044  /* Okay, we're now positioned to make the NUL
3045  * transition. We couldn't have
3046  * yy_get_previous_state() go ahead and do it
3047  * for us because it doesn't know how to deal
3048  * with the possibility of jamming (and we don't
3049  * want to build jamming into it because then it
3050  * will run more slowly).
3051  */
3052 
3053  yy_next_state = yy_try_NUL_trans( yy_current_state );
3054 
3055  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3056 
3057  if ( yy_next_state )
3058  {
3059  /* Consume the NUL. */
3060  yy_cp = ++(yy_c_buf_p);
3061  yy_current_state = yy_next_state;
3062  goto yy_match;
3063  }
3064 
3065  else
3066  {
3067  yy_cp = (yy_last_accepting_cpos);
3068  yy_current_state = (yy_last_accepting_state);
3069  goto yy_find_action;
3070  }
3071  }
3072 
3073  else switch ( yy_get_next_buffer( ) )
3074  {
3075  case EOB_ACT_END_OF_FILE:
3076  {
3078 
3079  if ( yywrap( ) )
3080  {
3081  /* Note: because we've taken care in
3082  * yy_get_next_buffer() to have set up
3083  * yytext, we can now set up
3084  * yy_c_buf_p so that if some total
3085  * hoser (like flex itself) wants to
3086  * call the scanner after we return the
3087  * YY_NULL, it'll still work - another
3088  * YY_NULL will get returned.
3089  */
3091 
3092  yy_act = YY_STATE_EOF(YY_START);
3093  goto do_action;
3094  }
3095 
3096  else
3097  {
3098  if ( ! (yy_did_buffer_switch_on_eof) )
3099  YY_NEW_FILE;
3100  }
3101  break;
3102  }
3103 
3104  case EOB_ACT_CONTINUE_SCAN:
3105  (yy_c_buf_p) =
3106  (yytext_ptr) + yy_amount_of_matched_text;
3107 
3108  yy_current_state = yy_get_previous_state( );
3109 
3110  yy_cp = (yy_c_buf_p);
3111  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3112  goto yy_match;
3113 
3114  case EOB_ACT_LAST_MATCH:
3115  (yy_c_buf_p) =
3116  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
3117 
3118  yy_current_state = yy_get_previous_state( );
3119 
3120  yy_cp = (yy_c_buf_p);
3121  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3122  goto yy_find_action;
3123  }
3124  break;
3125  }
3126 
3127  default:
3129  "fatal flex scanner internal error--no action found" );
3130  } /* end of action switch */
3131  } /* end of scanning one token */
3132  } /* end of user's declarations */
3133 } /* end of yylex */
static flex_int16_t yy_accept[833]
Definition: scanner.c:383
const char * name
Definition: tree.h:645
struct cb_text_list * next
Definition: cobc.h:160
static void scan_define_options(const char *)
Definition: scanner.c:4634
static char yy_hold_char
Definition: scanner.c:284
YY_BUFFER_STATE yy_create_buffer(FILE *file, int size)
Allocate and initialize an input buffer state.
Definition: scanner.c:3512
static int scan_o(const char *)
Definition: scanner.c:4174
unsigned int cobc_force_literal
Definition: parser.c:181
cb_tree cb_build_comment(const char *str)
Definition: tree.c:1540
const char * cb_source_file
Definition: cobc.c:145
static void read_literal(const char)
Definition: scanner.c:3873
struct cb_text_list * cb_intrinsic_list
Definition: cobc.c:150
#define EOB_ACT_LAST_MATCH
Definition: scanner.c:177
static struct cb_level_78 * globlev78ptr
Definition: scanner.c:1439
const char * text
Definition: cobc.h:162
#define EOB_ACT_END_OF_FILE
Definition: scanner.c:176
#define YY_END_OF_BUFFER
Definition: scanner.c:375
#define CB_LITERAL(x)
Definition: tree.h:601
#define YY_CURRENT_BUFFER_LVALUE
Definition: scanner.c:281
static yy_size_t yy_n_chars
Definition: scanner.c:285
#define yytext_ptr
Definition: scanner.c:357
#define YY_BREAK
Definition: scanner.c:1694
const int token
Definition: tree.h:982
int warningopt
Definition: cobc.c:176
unsigned char YY_CHAR
Definition: pplex.c:365
static int yy_did_buffer_switch_on_eof
Definition: scanner.c:296
void cobc_free(void *mptr)
Definition: cobc.c:657
#define YY_FATAL_ERROR(msg)
Definition: scanner.c:1669
struct cb_level_78 * globnext
Definition: scanner.c:1419
struct cb_intrinsic_table * lookup_intrinsic(const char *name, const int checkres, const int checkimpl)
Definition: reserved.c:2976
static flex_int16_t yy_def[865]
Definition: scanner.c:622
static flex_int16_t yy_nxt[2719]
Definition: scanner.c:721
#define YY_BUFFER_NORMAL
Definition: scanner.c:247
#define YY_RULE_SETUP
Definition: scanner.c:1697
static void scan_options(const char *, const unsigned int)
Definition: scanner.c:4627
void * cobc_parse_strdup(const char *dupstr)
Definition: cobc.c:827
#define unput(c)
Definition: scanner.c:196
#define CB_WORD_ITEMS(x)
Definition: tree.h:906
static flex_int16_t yy_chk[2719]
Definition: scanner.c:1024
static char * yy_c_buf_p
Definition: scanner.c:289
#define CB_CS_EXIT
Definition: cobc.h:112
#define YY_STATE_EOF(state)
Definition: scanner.c:137
static yy_state_type yy_last_accepting_state
Definition: scanner.c:1327
static char * yy_last_accepting_cpos
Definition: scanner.c:1328
struct cb_field * fld78
Definition: scanner.c:1421
static void count_lines(const char *)
Definition: scanner.c:4570
static unsigned int inside_bracket
Definition: scanner.c:1448
#define CB_VALUE(x)
Definition: tree.h:1193
Definition: parser.c:1815
struct cb_level_78 * next
Definition: scanner.c:1418
Definition: parser.c:1471
static int scan_numeric(const char *)
Definition: scanner.c:4244
#define COB_MAX_WORDLEN
Definition: common.h:574
#define PICTURE_STATE
Definition: scanner.c:1546
static struct cb_level_78 * lev78ptr
Definition: scanner.c:1438
cb_tree cb_build_alphanumeric_literal(const void *data, const size_t size)
Definition: tree.c:1716
static int scan_floating_numeric(const char *)
Definition: scanner.c:4309
#define YY_MORE_ADJ
Definition: scanner.c:1338
#define YY_USER_INIT
Definition: scanner.c:1382
#define YY_SC_TO_UI(c)
Definition: scanner.c:121
#define YY_BUF_SIZE
Definition: scanner.c:1366
static void scan_picture(const char *)
Definition: scanner.c:4517
#define EOB_ACT_CONTINUE_SCAN
Definition: scanner.c:175
static flex_int32_t yy_ec[256]
Definition: scanner.c:479
cb_tree cb_build_numeric_literal(const int sign, const void *data, const int scale)
Definition: tree.c:1681
static int yy_init
Definition: scanner.c:290
#define YY_START
Definition: scanner.c:133
#define YY_CURRENT_BUFFER
Definition: scanner.c:274
static int scan_x(const char *)
Definition: scanner.c:3930
cb_tree function_spec_list
Definition: tree.h:1271
unsigned int cobc_in_repository
Definition: parser.c:180
FILE * yyin
Definition: scanner.c:348
#define _(s)
Definition: cobcrun.c:59
struct cb_program * prog
Definition: scanner.c:1422
static int scan_b(const char *, const cob_u32_t)
Definition: scanner.c:4112
#define unlikely(x)
Definition: common.h:437
#define BEGIN
Definition: scanner.c:127
#define CB_CHAIN(x)
Definition: tree.h:1194
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 INITIAL
Definition: scanner.c:1543
Definition: parser.c:1590
#define DECIMAL_IS_COMMA
Definition: scanner.c:1545
struct cobc_reserved * lookup_reserved_word(const char *name)
Definition: reserved.c:2910
int yy_state_type
Definition: pplex.c:369
unsigned char prog_type
Definition: tree.h:1303
static int input(void)
Definition: scanner.c:3373
#define CB_FUNC_PROTOTYPE(x)
Definition: tree.h:1339
#define YY_NEW_FILE
Definition: scanner.c:140
Definition: parser.c:1473
static int scan_h(const char *, const cob_u32_t)
Definition: scanner.c:4048
static void yyensure_buffer_stack(void)
Definition: scanner.c:3665
int non_const_word
Definition: parser.c:178
cb_tree cb_build_reference(const char *name)
Definition: tree.c:2572
#define yyterminate()
Definition: scanner.c:1659
unsigned short nodegen
Definition: tree.h:419
cb_tree cb_error_node
Definition: tree.c:140
static yy_state_type yy_try_NUL_trans(yy_state_type current_state)
Definition: scanner.c:3309
Definition: parser.c:1503
static int scan_z(const char *, const cob_u32_t)
Definition: scanner.c:4013
void * cobc_strdup(const char *dupstr)
Definition: cobc.c:669
void cb_error(const char *,...) COB_A_FORMAT12
Definition: error.c:98
static struct cb_level_78 * const78ptr
Definition: scanner.c:1437
int functions_are_all
Definition: parser.c:177
#define YY_RESTORE_YY_MORE_OFFSET
Definition: scanner.c:1339
#define CB_FUNCTION_TYPE
Definition: tree.h:42
if fold fold static computed alternate extra correct stack on syntax debugging line
Definition: flag.def:90
struct cb_program * current_program
Definition: parser.c:168
unsigned int cobc_in_procedure
Definition: parser.c:179
static unsigned int integer_is_label
Definition: scanner.c:1447
#define FUNCTION_STATE
Definition: scanner.c:1547
yytokentype
Definition: parser.c:1343
#define CB_WORD_COUNT(x)
Definition: tree.h:905
void cb_warning(const char *,...) COB_A_FORMAT12
Definition: error.c:87
yy_size_t yyleng
Definition: scanner.c:286
#define yylval
Definition: ppparse.c:69
static int yy_get_next_buffer(void)
Definition: scanner.c:3142
int token
Definition: tree.h:421
static struct cb_level_78 * top78ptr
Definition: scanner.c:1436
int cb_source_line
Definition: cobc.c:178
cob_u32_t not_const
Definition: scanner.c:1426
static int yywrap(void)
Definition: scanner.c:1369
struct cb_program * cb_find_defined_program_by_name(const char *name)
Definition: scanner.c:4882
static unsigned int last_token_is_dot
Definition: scanner.c:1446
cob_u32_t chk_const
Definition: scanner.c:1427
FILE * yyout
Definition: scanner.c:348
#define CB_SYSTEM_NAME_P(x)
Definition: tree.h:587
#define YY_AT_BOL()
Definition: scanner.c:342
Definition: parser.c:1501
unsigned int cobc_cs_check
Definition: parser.c:182
cb_tree user_spec_list
Definition: tree.h:1272
cb_tree values
Definition: tree.h:648
static flex_int16_t yy_base[865]
Definition: scanner.c:523
char * yytext
Definition: scanner.c:1340
#define DECIMAL_IS_PERIOD
Definition: scanner.c:1544
static int yy_start
Definition: scanner.c:291
Definition: parser.c:1853
static void yy_load_buffer_state(void)
Definition: scanner.c:3498
#define likely(x)
Definition: common.h:436
static flex_int32_t yy_meta[75]
Definition: scanner.c:511
static yy_state_type yy_get_previous_state(void)
Definition: scanner.c:3276
unsigned char decimal_point
Definition: tree.h:1300
#define YY_BUFFER_NEW
Definition: scanner.c:246
char * orig_program_id
Definition: tree.h:1246
#define YY_DO_BEFORE_ACTION
Definition: scanner.c:367

Here is the call graph for this function:

int yyparse ( void  )

Definition at line 6565 of file parser.c.

6566 {
6567  int yystate;
6568  /* Number of tokens to shift before error messages enabled. */
6569  int yyerrstatus;
6570 
6571  /* The stacks and their tools:
6572  'yyss': related to states.
6573  'yyvs': related to semantic values.
6574 
6575  Refer to the stacks through separate pointers, to allow yyoverflow
6576  to reallocate them elsewhere. */
6577 
6578  /* The state stack. */
6579  yytype_int16 yyssa[YYINITDEPTH];
6580  yytype_int16 *yyss;
6581  yytype_int16 *yyssp;
6582 
6583  /* The semantic value stack. */
6584  YYSTYPE yyvsa[YYINITDEPTH];
6585  YYSTYPE *yyvs;
6586  YYSTYPE *yyvsp;
6587 
6588  YYSIZE_T yystacksize;
6589 
6590  int yyn;
6591  int yyresult;
6592  /* Lookahead token as an internal (translated) token number. */
6593  int yytoken = 0;
6594  /* The variables used to return semantic value and location from the
6595  action routines. */
6596  YYSTYPE yyval;
6597 
6598 #if YYERROR_VERBOSE
6599  /* Buffer for error messages, and its allocated size. */
6600  char yymsgbuf[128];
6601  char *yymsg = yymsgbuf;
6602  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
6603 #endif
6604 
6605 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
6606 
6607  /* The number of symbols on the RHS of the reduced rule.
6608  Keep to zero when no symbol should be popped. */
6609  int yylen = 0;
6610 
6611  yyssp = yyss = yyssa;
6612  yyvsp = yyvs = yyvsa;
6613  yystacksize = YYINITDEPTH;
6614 
6615  YYDPRINTF ((stderr, "Starting parse\n"));
6616 
6617  yystate = 0;
6618  yyerrstatus = 0;
6619  yynerrs = 0;
6620  yychar = YYEMPTY; /* Cause a token to be read. */
6621  goto yysetstate;
6622 
6623 /*------------------------------------------------------------.
6624 | yynewstate -- Push a new state, which is found in yystate. |
6625 `------------------------------------------------------------*/
6626  yynewstate:
6627  /* In all cases, when you get here, the value and location stacks
6628  have just been pushed. So pushing a state here evens the stacks. */
6629  yyssp++;
6630 
6631  yysetstate:
6632  *yyssp = yystate;
6633 
6634  if (yyss + yystacksize - 1 <= yyssp)
6635  {
6636  /* Get the current used size of the three stacks, in elements. */
6637  YYSIZE_T yysize = yyssp - yyss + 1;
6638 
6639 #ifdef yyoverflow
6640  {
6641  /* Give user a chance to reallocate the stack. Use copies of
6642  these so that the &'s don't force the real ones into
6643  memory. */
6644  YYSTYPE *yyvs1 = yyvs;
6645  yytype_int16 *yyss1 = yyss;
6646 
6647  /* Each stack pointer address is followed by the size of the
6648  data in use in that stack, in bytes. This used to be a
6649  conditional around just the two extra args, but that might
6650  be undefined if yyoverflow is a macro. */
6651  yyoverflow (YY_("memory exhausted"),
6652  &yyss1, yysize * sizeof (*yyssp),
6653  &yyvs1, yysize * sizeof (*yyvsp),
6654  &yystacksize);
6655 
6656  yyss = yyss1;
6657  yyvs = yyvs1;
6658  }
6659 #else /* no yyoverflow */
6660 # ifndef YYSTACK_RELOCATE
6661  goto yyexhaustedlab;
6662 # else
6663  /* Extend the stack our own way. */
6664  if (YYMAXDEPTH <= yystacksize)
6665  goto yyexhaustedlab;
6666  yystacksize *= 2;
6667  if (YYMAXDEPTH < yystacksize)
6668  yystacksize = YYMAXDEPTH;
6669 
6670  {
6671  yytype_int16 *yyss1 = yyss;
6672  union yyalloc *yyptr =
6673  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
6674  if (! yyptr)
6675  goto yyexhaustedlab;
6676  YYSTACK_RELOCATE (yyss_alloc, yyss);
6677  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
6678 # undef YYSTACK_RELOCATE
6679  if (yyss1 != yyssa)
6680  YYSTACK_FREE (yyss1);
6681  }
6682 # endif
6683 #endif /* no yyoverflow */
6684 
6685  yyssp = yyss + yysize - 1;
6686  yyvsp = yyvs + yysize - 1;
6687 
6688  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
6689  (unsigned long int) yystacksize));
6690 
6691  if (yyss + yystacksize - 1 <= yyssp)
6692  YYABORT;
6693  }
6694 
6695  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
6696 
6697  if (yystate == YYFINAL)
6698  YYACCEPT;
6699 
6700  goto yybackup;
6701 
6702 /*-----------.
6703 | yybackup. |
6704 `-----------*/
6705 yybackup:
6706 
6707  /* Do appropriate processing given the current state. Read a
6708  lookahead token if we need one and don't already have one. */
6709 
6710  /* First try to decide what to do without reference to lookahead token. */
6711  yyn = yypact[yystate];
6712  if (yypact_value_is_default (yyn))
6713  goto yydefault;
6714 
6715  /* Not known => get a lookahead token if don't already have one. */
6716 
6717  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
6718  if (yychar == YYEMPTY)
6719  {
6720  YYDPRINTF ((stderr, "Reading a token: "));
6721  yychar = yylex ();
6722  }
6723 
6724  if (yychar <= YYEOF)
6725  {
6726  yychar = yytoken = YYEOF;
6727  YYDPRINTF ((stderr, "Now at end of input.\n"));
6728  }
6729  else
6730  {
6731  yytoken = YYTRANSLATE (yychar);
6732  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
6733  }
6734 
6735  /* If the proper action on seeing token YYTOKEN is to reduce or to
6736  detect an error, take that action. */
6737  yyn += yytoken;
6738  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
6739  goto yydefault;
6740  yyn = yytable[yyn];
6741  if (yyn <= 0)
6742  {
6743  if (yytable_value_is_error (yyn))
6744  goto yyerrlab;
6745  yyn = -yyn;
6746  goto yyreduce;
6747  }
6748 
6749  /* Count tokens shifted since error; after three, turn off error
6750  status. */
6751  if (yyerrstatus)
6752  yyerrstatus--;
6753 
6754  /* Shift the lookahead token. */
6755  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
6756 
6757  /* Discard the shifted token. */
6758  yychar = YYEMPTY;
6759 
6760  yystate = yyn;
6762  *++yyvsp = yylval;
6764 
6765  goto yynewstate;
6766 
6767 
6768 /*-----------------------------------------------------------.
6769 | yydefault -- do the default action for the current state. |
6770 `-----------------------------------------------------------*/
6771 yydefault:
6772  yyn = yydefact[yystate];
6773  if (yyn == 0)
6774  goto yyerrlab;
6775  goto yyreduce;
6776 
6777 
6778 /*-----------------------------.
6779 | yyreduce -- Do a reduction. |
6780 `-----------------------------*/
6781 yyreduce:
6782  /* yyn is the number of a rule to reduce with. */
6783  yylen = yyr2[yyn];
6784 
6785  /* If YYLEN is nonzero, implement the default value of the action:
6786  '$$ = $1'.
6787 
6788  Otherwise, the following line sets YYVAL to garbage.
6789  This behavior is undocumented and Bison
6790  users should not rely upon it. Assigning to YYVAL
6791  unconditionally makes the parser a bit smaller, and it avoids a
6792  GCC warning that YYVAL may be used uninitialized. */
6793  yyval = yyvsp[1-yylen];
6794 
6795 
6796  YY_REDUCE_PRINT (yyn);
6797  switch (yyn)
6798  {
6799  case 2:
6800 #line 1893 "parser.y" /* yacc.c:1646 */
6801  {
6805  cobc_cs_check = 0;
6806  prog_end = 0;
6807  depth = 0;
6808  main_flag_set = 0;
6810  cb_build_registers ();
6811  }
6812 #line 6742 "parser.c" /* yacc.c:1646 */
6813  break;
6814 
6815  case 3:
6816 #line 1905 "parser.y" /* yacc.c:1646 */
6817  {
6821  }
6822  if (depth > 1) {
6823  cb_error (_("Multiple PROGRAM-ID's without matching END PROGRAM"));
6824  }
6825  if (cobc_flag_main && !main_flag_set) {
6826  cb_error (_("Executable requested but no program found"));
6827  }
6828  if (errorcount > 0) {
6829  YYABORT;
6830  }
6831  if (!current_program->entry_list) {
6833  }
6834  }
6835 #line 6765 "parser.c" /* yacc.c:1646 */
6836  break;
6837 
6838  case 10:
6839 #line 1941 "parser.y" /* yacc.c:1646 */
6840  {
6841  cb_tree l;
6842 
6845  prog_end = 1;
6846  if (increment_depth ()) {
6847  YYABORT;
6848  }
6850  strlen (demangle_name));
6853  if (!main_flag_set) {
6854  main_flag_set = 1;
6856  }
6858  }
6859 #line 6789 "parser.c" /* yacc.c:1646 */
6860  break;
6861 
6862  case 18:
6863 #line 1992 "parser.y" /* yacc.c:1646 */
6864  {
6866  clean_up_program ((yyvsp[-1]), CB_PROGRAM_TYPE);
6867  }
6868 #line 6798 "parser.c" /* yacc.c:1646 */
6869  break;
6870 
6871  case 19:
6872 #line 2000 "parser.y" /* yacc.c:1646 */
6873  {
6874  clean_up_program ((yyvsp[-1]), CB_FUNCTION_TYPE);
6875  }
6876 #line 6806 "parser.c" /* yacc.c:1646 */
6877  break;
6878 
6879  case 23:
6880 #line 2022 "parser.y" /* yacc.c:1646 */
6881  {
6882  if (set_up_program ((yyvsp[-1]), (yyvsp[0]), CB_PROGRAM_TYPE)) {
6883  YYABORT;
6884  }
6885  }
6886 #line 6816 "parser.c" /* yacc.c:1646 */
6887  break;
6888 
6889  case 24:
6890 #line 2028 "parser.y" /* yacc.c:1646 */
6891  {
6892  cobc_cs_check = 0;
6893  }
6894 #line 6824 "parser.c" /* yacc.c:1646 */
6895  break;
6896 
6897  case 25:
6898 #line 2035 "parser.y" /* yacc.c:1646 */
6899  {
6900  if (set_up_program ((yyvsp[-2]), (yyvsp[-1]), CB_FUNCTION_TYPE)) {
6901  YYABORT;
6902  }
6903  set_up_func_prototype ((yyvsp[-2]), (yyvsp[-1]), 1);
6904  cobc_cs_check = 0;
6905  }
6906 #line 6836 "parser.c" /* yacc.c:1646 */
6907  break;
6908 
6909  case 26:
6910 #line 2046 "parser.y" /* yacc.c:1646 */
6911  {
6912  if (CB_REFERENCE_P ((yyvsp[0])) && CB_WORD_COUNT ((yyvsp[0])) > 0) {
6913  redefinition_error ((yyvsp[0]));
6914  }
6915  /*
6916  The program name is a key part of defining the current_program, so we
6917  mustn't lose it (unlike in undefined_word).
6918  */
6919  (yyval) = (yyvsp[0]);
6920  }
6921 #line 6851 "parser.c" /* yacc.c:1646 */
6922  break;
6923 
6924  case 30:
6925 #line 2065 "parser.y" /* yacc.c:1646 */
6926  { (yyval) = NULL; }
6927 #line 6857 "parser.c" /* yacc.c:1646 */
6928  break;
6929 
6930  case 31:
6931 #line 2066 "parser.y" /* yacc.c:1646 */
6932  { (yyval) = (yyvsp[0]); }
6933 #line 6863 "parser.c" /* yacc.c:1646 */
6934  break;
6935 
6936  case 34:
6937 #line 2075 "parser.y" /* yacc.c:1646 */
6938  {
6939  if (!current_program->nested_level) {
6940  cb_error (_("COMMON may only be used in a contained program"));
6941  } else {
6944  }
6945  }
6946 #line 6876 "parser.c" /* yacc.c:1646 */
6947  break;
6948 
6949  case 35:
6950 #line 2084 "parser.y" /* yacc.c:1646 */
6951  {
6952  if (!current_program->nested_level) {
6953  cb_error (_("COMMON may only be used in a contained program"));
6954  } else {
6957  }
6958  }
6959 #line 6889 "parser.c" /* yacc.c:1646 */
6960  break;
6961 
6962  case 38:
6963 #line 2098 "parser.y" /* yacc.c:1646 */
6964  {
6966  }
6967 #line 6897 "parser.c" /* yacc.c:1646 */
6968  break;
6969 
6970  case 39:
6971 #line 2102 "parser.y" /* yacc.c:1646 */
6972  {
6974  }
6975 #line 6905 "parser.c" /* yacc.c:1646 */
6976  break;
6977 
6978  case 42:
6979 #line 2118 "parser.y" /* yacc.c:1646 */
6980  {
6982  }
6983 #line 6913 "parser.c" /* yacc.c:1646 */
6984  break;
6985 
6986  case 45:
6987 #line 2135 "parser.y" /* yacc.c:1646 */
6988  {
6992  cb_error (_("%s not allowed in nested programs"), "CONFIGURATION SECTION");
6993  }
6994  }
6995 #line 6925 "parser.c" /* yacc.c:1646 */
6996  break;
6997 
6998  case 50:
6999 #line 2149 "parser.y" /* yacc.c:1646 */
7000  {
7002  cb_warning (_("Phrases in non-standard order"));
7003  }
7004  }
7005 #line 6935 "parser.c" /* yacc.c:1646 */
7006  break;
7007 
7008  case 51:
7009 #line 2161 "parser.y" /* yacc.c:1646 */
7010  {
7013  check_repeated ("SOURCE-COMPUTER", SYN_CLAUSE_1, &check_comp_duplicate);
7014  }
7015 #line 6945 "parser.c" /* yacc.c:1646 */
7016  break;
7017 
7018  case 56:
7019 #line 2176 "parser.y" /* yacc.c:1646 */
7020  {
7021  cb_verify (cb_debugging_line, "DEBUGGING MODE");
7023  needs_debug_item = 1;
7024  cobc_cs_check = 0;
7026  }
7027 #line 6957 "parser.c" /* yacc.c:1646 */
7028  break;
7029 
7030  case 57:
7031 #line 2189 "parser.y" /* yacc.c:1646 */
7032  {
7035  check_repeated ("OBJECT-COMPUTER", SYN_CLAUSE_2, &check_comp_duplicate);
7036  }
7037 #line 6967 "parser.c" /* yacc.c:1646 */
7038  break;
7039 
7040  case 69:
7041 #line 2218 "parser.y" /* yacc.c:1646 */
7042  {
7043  cb_verify (cb_memory_size_clause, "MEMORY SIZE");
7044  }
7045 #line 6975 "parser.c" /* yacc.c:1646 */
7046  break;
7047 
7048  case 70:
7049 #line 2226 "parser.y" /* yacc.c:1646 */
7050  {
7051  current_program->collating_sequence = (yyvsp[0]);
7052  }
7053 #line 6983 "parser.c" /* yacc.c:1646 */
7054  break;
7055 
7056  case 71:
7057 #line 2233 "parser.y" /* yacc.c:1646 */
7058  {
7059  /* Ignore */
7060  }
7061 #line 6991 "parser.c" /* yacc.c:1646 */
7062  break;
7063 
7064  case 72:
7065 #line 2240 "parser.y" /* yacc.c:1646 */
7066  {
7068  cb_error (_("Duplicate CLASSIFICATION clause"));
7069  } else {
7070  current_program->classification = (yyvsp[0]);
7071  }
7072  }
7073 #line 7003 "parser.c" /* yacc.c:1646 */
7074  break;
7075 
7076  case 73:
7077 #line 2251 "parser.y" /* yacc.c:1646 */
7078  {
7079  (yyval) = (yyvsp[0]);
7080  }
7081 #line 7011 "parser.c" /* yacc.c:1646 */
7082  break;
7083 
7084  case 74:
7085 #line 2255 "parser.y" /* yacc.c:1646 */
7086  {
7087  (yyval) = NULL;
7088  }
7089 #line 7019 "parser.c" /* yacc.c:1646 */
7090  break;
7091 
7092  case 75:
7093 #line 2259 "parser.y" /* yacc.c:1646 */
7094  {
7095  (yyval) = cb_int1;
7096  }
7097 #line 7027 "parser.c" /* yacc.c:1646 */
7098  break;
7099 
7100  case 76:
7101 #line 2263 "parser.y" /* yacc.c:1646 */
7102  {
7103  (yyval) = cb_int1;
7104  }
7105 #line 7035 "parser.c" /* yacc.c:1646 */
7106  break;
7107 
7108  case 80:
7109 #line 2277 "parser.y" /* yacc.c:1646 */
7110  {
7113  }
7114 #line 7044 "parser.c" /* yacc.c:1646 */
7115  break;
7116 
7117  case 81:
7118 #line 2282 "parser.y" /* yacc.c:1646 */
7119  {
7120  cobc_in_repository = 0;
7121  }
7122 #line 7052 "parser.c" /* yacc.c:1646 */
7123  break;
7124 
7125  case 84:
7126 #line 2290 "parser.y" /* yacc.c:1646 */
7127  {
7128  yyerrok;
7129  }
7130 #line 7060 "parser.c" /* yacc.c:1646 */
7131  break;
7132 
7133  case 87:
7134 #line 2302 "parser.y" /* yacc.c:1646 */
7135  {
7136  functions_are_all = 1;
7137  }
7138 #line 7068 "parser.c" /* yacc.c:1646 */
7139  break;
7140 
7141  case 88:
7142 #line 2306 "parser.y" /* yacc.c:1646 */
7143  {
7144  if ((yyvsp[-1]) != cb_error_node) {
7145  set_up_func_prototype ((yyvsp[-1]), (yyvsp[0]), 0);
7146  }
7147  }
7148 #line 7078 "parser.c" /* yacc.c:1646 */
7149  break;
7150 
7151  case 90:
7152 #line 2316 "parser.y" /* yacc.c:1646 */
7153  {
7154  (yyval) = NULL;
7155  }
7156 #line 7086 "parser.c" /* yacc.c:1646 */
7157  break;
7158 
7159  case 91:
7160 #line 2320 "parser.y" /* yacc.c:1646 */
7161  {
7162  (yyval) = (yyvsp[0]);
7163  }
7164 #line 7094 "parser.c" /* yacc.c:1646 */
7165  break;
7166 
7167  case 92:
7168 #line 2327 "parser.y" /* yacc.c:1646 */
7169  {
7172  }
7173 #line 7103 "parser.c" /* yacc.c:1646 */
7174  break;
7175 
7176  case 93:
7177 #line 2332 "parser.y" /* yacc.c:1646 */
7178  {
7181  }
7182 #line 7112 "parser.c" /* yacc.c:1646 */
7183  break;
7184 
7185  case 95:
7186 #line 2343 "parser.y" /* yacc.c:1646 */
7187  {
7188  check_duplicate = 0;
7193  cb_error (_("%s not allowed in nested programs"), "SPECIAL-NAMES");
7194  }
7195  }
7196 #line 7126 "parser.c" /* yacc.c:1646 */
7197  break;
7198 
7199  case 114:
7200 #line 2388 "parser.y" /* yacc.c:1646 */
7201  {
7202  char system_name[16];
7206  check_duplicate = 0;
7208  cb_error (_("%s not allowed in nested programs"), "SPECIAL-NAMES");
7209  save_tree = NULL;
7210  } else {
7211  /* get system name and revert word-combination of scanner.l,
7212  if necessary (e.g. SWITCH A <--> SWITCH_A) */
7213  strncpy(system_name, CB_NAME ((yyvsp[0])), 15);
7214  if (system_name [6] == '_') {
7215  system_name [6] = ' ';
7216  }
7217  /* lookup system name */
7218  save_tree = lookup_system_name (system_name);
7219  if (!save_tree) {
7220  cb_error_x ((yyvsp[0]), _("Invalid system-name '%s'"), system_name);
7221  }
7222  }
7223  }
7224 #line 7154 "parser.c" /* yacc.c:1646 */
7225  break;
7226 
7227  case 116:
7228 #line 2416 "parser.y" /* yacc.c:1646 */
7229  {
7230  if (save_tree) {
7231  if (CB_SYSTEM_NAME(save_tree)->token != CB_DEVICE_CONSOLE) {
7232  cb_error_x (save_tree, _("Invalid CRT clause"));
7233  } else {
7235  }
7236  }
7237  }
7238 #line 7168 "parser.c" /* yacc.c:1646 */
7239  break;
7240 
7241  case 117:
7242 #line 2426 "parser.y" /* yacc.c:1646 */
7243  {
7244  if (save_tree) {
7246  cb_error_x (save_tree, _("Invalid special names clause"));
7247  } else if (CB_VALID_TREE ((yyvsp[0]))) {
7248  CB_SYSTEM_NAME(save_tree)->value = (yyvsp[-2]);
7249  cb_define ((yyvsp[0]), save_tree);
7251  (yyvsp[0]), save_tree);
7252  }
7253  }
7254  }
7255 #line 7185 "parser.c" /* yacc.c:1646 */
7256  break;
7257 
7258  case 118:
7259 #line 2439 "parser.y" /* yacc.c:1646 */
7260  {
7261  if (save_tree && CB_VALID_TREE ((yyvsp[-1]))) {
7262  cb_define ((yyvsp[-1]), save_tree);
7264  (yyvsp[-1]), save_tree);
7265  }
7266  }
7267 #line 7197 "parser.c" /* yacc.c:1646 */
7268  break;
7269 
7270  case 122:
7271 #line 2455 "parser.y" /* yacc.c:1646 */
7272  {
7274  }
7275 #line 7205 "parser.c" /* yacc.c:1646 */
7276  break;
7277 
7278  case 123:
7279 #line 2462 "parser.y" /* yacc.c:1646 */
7280  {
7281  cb_tree x;
7282 
7283  /* cb_define_switch_name checks param validity */
7284  x = cb_define_switch_name ((yyvsp[0]), save_tree, (yyvsp[-2]) == cb_int1);
7285  if (x) {
7286  if ((yyvsp[-2]) == cb_int1) {
7288  } else {
7289  check_repeated ("OFF", SYN_CLAUSE_2, &check_on_off_duplicate);
7290  }
7292  }
7293  }
7294 #line 7224 "parser.c" /* yacc.c:1646 */
7295  break;
7296 
7297  case 124:
7298 #line 2477 "parser.y" /* yacc.c:1646 */
7299  {
7300  cb_tree x;
7301 
7302  /* cb_define_switch_name checks param validity */
7303  x = cb_define_switch_name ((yyvsp[0]), save_tree, (yyvsp[-2]) == cb_int1);
7304  if (x) {
7305  if ((yyvsp[-2]) == cb_int1) {
7307  } else {
7308  check_repeated ("OFF", SYN_CLAUSE_2, &check_on_off_duplicate);
7309  }
7311  }
7312  }
7313 #line 7243 "parser.c" /* yacc.c:1646 */
7314  break;
7315 
7316  case 125:
7317 #line 2497 "parser.y" /* yacc.c:1646 */
7318  {
7323  cb_error (_("%s not allowed in nested programs"), "SPECIAL-NAMES");
7324  (yyval) = NULL;
7325  } else {
7326  /* Returns null on error */
7327  (yyval) = cb_build_alphabet_name ((yyvsp[0]));
7328  }
7329  }
7330 #line 7260 "parser.c" /* yacc.c:1646 */
7331  break;
7332 
7333  case 126:
7334 #line 2510 "parser.y" /* yacc.c:1646 */
7335  {
7336  if ((yyvsp[-2])) {
7339  }
7340  cobc_cs_check = 0;
7341  }
7342 #line 7272 "parser.c" /* yacc.c:1646 */
7343  break;
7344 
7345  case 127:
7346 #line 2521 "parser.y" /* yacc.c:1646 */
7347  {
7348  if ((yyvsp[(-1) - (1)])) {
7349  CB_ALPHABET_NAME ((yyvsp[(-1) - (1)]))->alphabet_type = CB_ALPHABET_NATIVE;
7350  }
7351  }
7352 #line 7282 "parser.c" /* yacc.c:1646 */
7353  break;
7354 
7355  case 128:
7356 #line 2527 "parser.y" /* yacc.c:1646 */
7357  {
7358  if ((yyvsp[(-1) - (1)])) {
7359  CB_ALPHABET_NAME ((yyvsp[(-1) - (1)]))->alphabet_type = CB_ALPHABET_ASCII;
7360  }
7361  }
7362 #line 7292 "parser.c" /* yacc.c:1646 */
7363  break;
7364 
7365  case 129:
7366 #line 2533 "parser.y" /* yacc.c:1646 */
7367  {
7368  if ((yyvsp[(-1) - (1)])) {
7369  CB_ALPHABET_NAME ((yyvsp[(-1) - (1)]))->alphabet_type = CB_ALPHABET_ASCII;
7370  }
7371  }
7372 #line 7302 "parser.c" /* yacc.c:1646 */
7373  break;
7374 
7375  case 130:
7376 #line 2539 "parser.y" /* yacc.c:1646 */
7377  {
7378  if ((yyvsp[(-1) - (1)])) {
7379  CB_ALPHABET_NAME ((yyvsp[(-1) - (1)]))->alphabet_type = CB_ALPHABET_EBCDIC;
7380  }
7381  }
7382 #line 7312 "parser.c" /* yacc.c:1646 */
7383  break;
7384 
7385  case 131:
7386 #line 2545 "parser.y" /* yacc.c:1646 */
7387  {
7388  if ((yyvsp[(-1) - (1)])) {
7389  CB_ALPHABET_NAME ((yyvsp[(-1) - (1)]))->alphabet_type = CB_ALPHABET_ASCII;
7390  }
7391  }
7392 #line 7322 "parser.c" /* yacc.c:1646 */
7393  break;
7394 
7395  case 132:
7396 #line 2551 "parser.y" /* yacc.c:1646 */
7397  {
7398  if ((yyvsp[(-1) - (1)])) {
7399  CB_ALPHABET_NAME ((yyvsp[(-1) - (1)]))->alphabet_type = CB_ALPHABET_CUSTOM;
7400  CB_ALPHABET_NAME ((yyvsp[(-1) - (1)]))->custom_list = (yyvsp[0]);
7401  }
7402  }
7403 #line 7333 "parser.c" /* yacc.c:1646 */
7404  break;
7405 
7406  case 133:
7407 #line 2561 "parser.y" /* yacc.c:1646 */
7408  {
7409  (yyval) = CB_LIST_INIT ((yyvsp[0]));
7410  }
7411 #line 7341 "parser.c" /* yacc.c:1646 */
7412  break;
7413 
7414  case 134:
7415 #line 2565 "parser.y" /* yacc.c:1646 */
7416  {
7417  (yyval) = cb_list_add ((yyvsp[-1]), (yyvsp[0]));
7418  }
7419 #line 7349 "parser.c" /* yacc.c:1646 */
7420  break;
7421 
7422  case 135:
7423 #line 2572 "parser.y" /* yacc.c:1646 */
7424  {
7425  (yyval) = (yyvsp[0]);
7426  }
7427 #line 7357 "parser.c" /* yacc.c:1646 */
7428  break;
7429 
7430  case 136:
7431 #line 2576 "parser.y" /* yacc.c:1646 */
7432  {
7433  (yyval) = CB_BUILD_PAIR ((yyvsp[-2]), (yyvsp[0]));
7434  }
7435 #line 7365 "parser.c" /* yacc.c:1646 */
7436  break;
7437 
7438  case 137:
7439 #line 2580 "parser.y" /* yacc.c:1646 */
7440  {
7441  (yyval) = CB_LIST_INIT ((yyvsp[-1]));
7442  }
7443 #line 7373 "parser.c" /* yacc.c:1646 */
7444  break;
7445 
7446  case 138:
7447 #line 2584 "parser.y" /* yacc.c:1646 */
7448  {
7449  (yyval) = (yyvsp[-1]);
7450  }
7451 #line 7381 "parser.c" /* yacc.c:1646 */
7452  break;
7453 
7454  case 139:
7455 #line 2591 "parser.y" /* yacc.c:1646 */
7456  {
7457  cb_list_add ((yyvsp[-1]), (yyvsp[0]));
7458  }
7459 #line 7389 "parser.c" /* yacc.c:1646 */
7460  break;
7461 
7462  case 140:
7463 #line 2595 "parser.y" /* yacc.c:1646 */
7464  {
7465  cb_list_add ((yyvsp[-3]), (yyvsp[0]));
7466  }
7467 #line 7397 "parser.c" /* yacc.c:1646 */
7468  break;
7469 
7470  case 141:
7471 #line 2601 "parser.y" /* yacc.c:1646 */
7472  { (yyval) = (yyvsp[0]); }
7473 #line 7403 "parser.c" /* yacc.c:1646 */
7474  break;
7475 
7476  case 142:
7477 #line 2602 "parser.y" /* yacc.c:1646 */
7478  { (yyval) = cb_space; }
7479 #line 7409 "parser.c" /* yacc.c:1646 */
7480  break;
7481 
7482  case 143:
7483 #line 2603 "parser.y" /* yacc.c:1646 */
7484  { (yyval) = cb_zero; }
7485 #line 7415 "parser.c" /* yacc.c:1646 */
7486  break;
7487 
7488  case 144:
7489 #line 2604 "parser.y" /* yacc.c:1646 */
7490  { (yyval) = cb_quote; }
7491 #line 7421 "parser.c" /* yacc.c:1646 */
7492  break;
7493 
7494  case 145:
7495 #line 2605 "parser.y" /* yacc.c:1646 */
7496  { (yyval) = cb_norm_high; }
7497 #line 7427 "parser.c" /* yacc.c:1646 */
7498  break;
7499 
7500  case 146:
7501 #line 2606 "parser.y" /* yacc.c:1646 */
7502  { (yyval) = cb_norm_low; }
7503 #line 7433 "parser.c" /* yacc.c:1646 */
7504  break;
7505 
7506  case 147:
7507 #line 2610 "parser.y" /* yacc.c:1646 */
7508  { (yyval) = cb_space; }
7509 #line 7439 "parser.c" /* yacc.c:1646 */
7510  break;
7511 
7512  case 148:
7513 #line 2611 "parser.y" /* yacc.c:1646 */
7514  { (yyval) = cb_zero; }
7515 #line 7445 "parser.c" /* yacc.c:1646 */
7516  break;
7517 
7518  case 149:
7519 #line 2619 "parser.y" /* yacc.c:1646 */
7520  {
7525  cb_error (_("%s not allowed in nested programs"), "SPECIAL-NAMES");
7526  } else if ((yyvsp[-1])) {
7527  CB_CHAIN_PAIR (current_program->symbolic_char_list, (yyvsp[-1]), (yyvsp[0]));
7528  }
7529  }
7530 #line 7460 "parser.c" /* yacc.c:1646 */
7531  break;
7532 
7533  case 150:
7534 #line 2633 "parser.y" /* yacc.c:1646 */
7535  {
7536  (yyval) = NULL;
7537  }
7538 #line 7468 "parser.c" /* yacc.c:1646 */
7539  break;
7540 
7541  case 151:
7542 #line 2637 "parser.y" /* yacc.c:1646 */
7543  {
7544  (yyval) = (yyvsp[0]);
7545  }
7546 #line 7476 "parser.c" /* yacc.c:1646 */
7547  break;
7548 
7549  case 152:
7550 #line 2645 "parser.y" /* yacc.c:1646 */
7551  {
7552  (yyval) = (yyvsp[0]);
7553  }
7554 #line 7484 "parser.c" /* yacc.c:1646 */
7555  break;
7556 
7557  case 153:
7558 #line 2652 "parser.y" /* yacc.c:1646 */
7559  {
7560  (yyval) = (yyvsp[0]);
7561  }
7562 #line 7492 "parser.c" /* yacc.c:1646 */
7563  break;
7564 
7565  case 154:
7566 #line 2656 "parser.y" /* yacc.c:1646 */
7567  {
7568  if ((yyvsp[0])) {
7569  (yyval) = cb_list_append ((yyvsp[-1]), (yyvsp[0]));
7570  } else {
7571  (yyval) = (yyvsp[-1]);
7572  }
7573  }
7574 #line 7504 "parser.c" /* yacc.c:1646 */
7575  break;
7576 
7577  case 155:
7578 #line 2667 "parser.y" /* yacc.c:1646 */
7579  {
7580  cb_tree l1;
7581  cb_tree l2;
7582 
7583  if (cb_list_length ((yyvsp[-2])) != cb_list_length ((yyvsp[0]))) {
7584  cb_error (_("Invalid SYMBOLIC clause"));
7585  (yyval) = NULL;
7586  } else {
7587  l1 = (yyvsp[-2]);
7588  l2 = (yyvsp[0]);
7589  for (; l1; l1 = CB_CHAIN (l1), l2 = CB_CHAIN (l2)) {
7590  CB_PURPOSE (l1) = CB_VALUE (l2);
7591  }
7592  (yyval) = (yyvsp[-2]);
7593  }
7594  }
7595 #line 7525 "parser.c" /* yacc.c:1646 */
7596  break;
7597 
7598  case 156:
7599 #line 2687 "parser.y" /* yacc.c:1646 */
7600  {
7601  if ((yyvsp[0]) == NULL) {
7602  (yyval) = NULL;
7603  } else {
7604  (yyval) = CB_LIST_INIT ((yyvsp[0]));
7605  }
7606  }
7607 #line 7537 "parser.c" /* yacc.c:1646 */
7608  break;
7609 
7610  case 157:
7611 #line 2695 "parser.y" /* yacc.c:1646 */
7612  {
7613  if ((yyvsp[0]) == NULL) {
7614  (yyval) = (yyvsp[-1]);
7615  } else {
7616  (yyval) = cb_list_add ((yyvsp[-1]), (yyvsp[0]));
7617  }
7618  }
7619 #line 7549 "parser.c" /* yacc.c:1646 */
7620  break;
7621 
7622  case 158:
7623 #line 2705 "parser.y" /* yacc.c:1646 */
7624  { (yyval) = CB_LIST_INIT ((yyvsp[0])); }
7625 #line 7555 "parser.c" /* yacc.c:1646 */
7626  break;
7627 
7628  case 159:
7629 #line 2706 "parser.y" /* yacc.c:1646 */
7630  { (yyval) = cb_list_add ((yyvsp[-1]), (yyvsp[0])); }
7631 #line 7561 "parser.c" /* yacc.c:1646 */
7632  break;
7633 
7634  case 160:
7635 #line 2713 "parser.y" /* yacc.c:1646 */
7636  {
7637  cb_tree x;
7638 
7643  cb_error (_("%s not allowed in nested programs"), "SPECIAL-NAMES");
7644  } else {
7645  /* Returns null on error */
7646  x = cb_build_class_name ((yyvsp[-2]), (yyvsp[0]));
7647  if (x) {
7650  }
7651  }
7652  }
7653 #line 7583 "parser.c" /* yacc.c:1646 */
7654  break;
7655 
7656  case 161:
7657 #line 2733 "parser.y" /* yacc.c:1646 */
7658  { (yyval) = CB_LIST_INIT ((yyvsp[0])); }
7659 #line 7589 "parser.c" /* yacc.c:1646 */
7660  break;
7661 
7662  case 162:
7663 #line 2734 "parser.y" /* yacc.c:1646 */
7664  { (yyval) = cb_list_add ((yyvsp[-1]), (yyvsp[0])); }
7665 #line 7595 "parser.c" /* yacc.c:1646 */
7666  break;
7667 
7668  case 163:
7669 #line 2739 "parser.y" /* yacc.c:1646 */
7670  {
7671  (yyval) = (yyvsp[0]);
7672  }
7673 #line 7603 "parser.c" /* yacc.c:1646 */
7674  break;
7675 
7676  case 164:
7677 #line 2743 "parser.y" /* yacc.c:1646 */
7678  {
7679  if (CB_TREE_CLASS ((yyvsp[-2])) != CB_CLASS_NUMERIC &&
7680  CB_LITERAL_P ((yyvsp[-2])) && CB_LITERAL ((yyvsp[-2]))->size != 1) {
7681  cb_error (_("CLASS literal with THRU must have size 1"));
7682  }
7683  if (CB_TREE_CLASS ((yyvsp[0])) != CB_CLASS_NUMERIC &&
7684  CB_LITERAL_P ((yyvsp[0])) && CB_LITERAL ((yyvsp[0]))->size != 1) {
7685  cb_error (_("CLASS literal with THRU must have size 1"));
7686  }
7687  if (literal_value ((yyvsp[-2])) <= literal_value ((yyvsp[0]))) {
7688  (yyval) = CB_BUILD_PAIR ((yyvsp[-2]), (yyvsp[0]));
7689  } else {
7690  (yyval) = CB_BUILD_PAIR ((yyvsp[0]), (yyvsp[-2]));
7691  }
7692  }
7693 #line 7623 "parser.c" /* yacc.c:1646 */
7694  break;
7695 
7696  case 165:
7697 #line 2764 "parser.y" /* yacc.c:1646 */
7698  {
7699  cb_tree l;
7700 
7705  cb_error (_("%s not allowed in nested programs"), "SPECIAL-NAMES");
7706  } else {
7707  /* Returns null on error */
7708  l = cb_build_locale_name ((yyvsp[-2]), (yyvsp[0]));
7709  if (l) {
7712  }
7713  }
7714  }
7715 #line 7645 "parser.c" /* yacc.c:1646 */
7716  break;
7717 
7718  case 166:
7719 #line 2787 "parser.y" /* yacc.c:1646 */
7720  {
7721  unsigned char *s = CB_LITERAL ((yyvsp[-1]))->data;
7722  unsigned int error_ind = 0;
7723 
7728  cb_error (_("%s not allowed in nested programs"), "SPECIAL-NAMES");
7729  error_ind = 1;
7730  }
7732  if ((yyvsp[0])) {
7733  PENDING ("PICTURE SYMBOL");
7734  }
7735  if (CB_LITERAL ((yyvsp[-1]))->size != 1) {
7736  cb_error_x ((yyvsp[-1]), _("Invalid currency sign '%s'"), (char *)s);
7737  error_ind = 1;
7738  }
7739  switch (*s) {
7740  case '0':
7741  case '1':
7742  case '2':
7743  case '3':
7744  case '4':
7745  case '5':
7746  case '6':
7747  case '7':
7748  case '8':
7749  case '9':
7750  case 'A':
7751  case 'B':
7752  case 'C':
7753  case 'D':
7754  case 'E':
7755  case 'N':
7756  case 'P':
7757  case 'R':
7758  case 'S':
7759  case 'V':
7760  case 'X':
7761  case 'Z':
7762  case 'a':
7763  case 'b':
7764  case 'c':
7765  case 'd':
7766  case 'e':
7767  case 'n':
7768  case 'p':
7769  case 'r':
7770  case 's':
7771  case 'v':
7772  case 'x':
7773  case 'z':
7774  case '+':
7775  case '-':
7776  case ',':
7777  case '.':
7778  case '*':
7779  case '/':
7780  case ';':
7781  case '(':
7782  case ')':
7783  case '=':
7784  case '\'':
7785  case '"':
7786  case ' ':
7787  cb_error_x ((yyvsp[-1]), _("Invalid currency sign '%s'"), (char *)s);
7788  break;
7789  default:
7790  if (!error_ind) {
7792  }
7793  break;
7794  }
7795  }
7796 #line 7726 "parser.c" /* yacc.c:1646 */
7797  break;
7798 
7799  case 167:
7800 #line 2868 "parser.y" /* yacc.c:1646 */
7801  {
7802  (yyval) = NULL;
7803  }
7804 #line 7734 "parser.c" /* yacc.c:1646 */
7805  break;
7806 
7807  case 168:
7808 #line 2872 "parser.y" /* yacc.c:1646 */
7809  {
7810  (yyval) = (yyvsp[0]);
7811  }
7812 #line 7742 "parser.c" /* yacc.c:1646 */
7813  break;
7814 
7815  case 169:
7816 #line 2881 "parser.y" /* yacc.c:1646 */
7817  {
7822  cb_error (_("%s not allowed in nested programs"), "SPECIAL-NAMES");
7823  } else {
7824  check_repeated ("DECIMAL-POINT", SYN_CLAUSE_2, &check_duplicate);
7827  }
7828  }
7829 #line 7759 "parser.c" /* yacc.c:1646 */
7830  break;
7831 
7832  case 170:
7833 #line 2900 "parser.y" /* yacc.c:1646 */
7834  {
7839  cb_error (_("%s not allowed in nested programs"), "SPECIAL-NAMES");
7840  } else {
7842  }
7843  }
7844 #line 7774 "parser.c" /* yacc.c:1646 */
7845  break;
7846 
7847  case 171:
7848 #line 2916 "parser.y" /* yacc.c:1646 */
7849  {
7854  cb_error (_("%s not allowed in nested programs"), "SPECIAL-NAMES");
7855  } else {
7857  current_program->cursor_pos = (yyvsp[0]);
7858  }
7859  }
7860 #line 7790 "parser.c" /* yacc.c:1646 */
7861  break;
7862 
7863  case 172:
7864 #line 2934 "parser.y" /* yacc.c:1646 */
7865  {
7870  cb_error (_("%s not allowed in nested programs"), "SPECIAL-NAMES");
7871  } else {
7872  check_repeated ("CRT STATUS", SYN_CLAUSE_4, &check_duplicate);
7873  current_program->crt_status = (yyvsp[0]);
7874  }
7875  }
7876 #line 7806 "parser.c" /* yacc.c:1646 */
7877  break;
7878 
7879  case 173:
7880 #line 2952 "parser.y" /* yacc.c:1646 */
7881  {
7886  cb_error (_("%s not allowed in nested programs"), "SPECIAL-NAMES");
7887  } else {
7888  check_repeated ("SCREEN CONTROL", SYN_CLAUSE_5, &check_duplicate);
7889  PENDING ("SCREEN CONTROL");
7890  }
7891  }
7892 #line 7822 "parser.c" /* yacc.c:1646 */
7893  break;
7894 
7895  case 174:
7896 #line 2969 "parser.y" /* yacc.c:1646 */
7897  {
7902  cb_error (_("%s not allowed in nested programs"), "SPECIAL-NAMES");
7903  } else {
7904  check_repeated ("EVENT STATUS", SYN_CLAUSE_6, &check_duplicate);
7905  PENDING ("EVENT STATUS");
7906  }
7907  }
7908 #line 7838 "parser.c" /* yacc.c:1646 */
7909  break;
7910 
7911  case 175:
7912 #line 2990 "parser.y" /* yacc.c:1646 */
7913  {
7915  }
7916 #line 7846 "parser.c" /* yacc.c:1646 */
7917  break;
7918 
7919  case 177:
7920 #line 2997 "parser.y" /* yacc.c:1646 */
7921  {
7924  }
7925 #line 7855 "parser.c" /* yacc.c:1646 */
7926  break;
7927 
7928  case 179:
7929 #line 3005 "parser.y" /* yacc.c:1646 */
7930  {
7934  }
7935 #line 7865 "parser.c" /* yacc.c:1646 */
7936  break;
7937 
7938  case 181:
7939 #line 3014 "parser.y" /* yacc.c:1646 */
7940  {
7944  }
7945 #line 7875 "parser.c" /* yacc.c:1646 */
7946  break;
7947 
7948  case 184:
7949 #line 3029 "parser.y" /* yacc.c:1646 */
7950  {
7954  check_duplicate = 0;
7955  if (CB_VALID_TREE ((yyvsp[0]))) {
7956  /* Build new file */
7957  current_file = build_file ((yyvsp[0]));
7958  current_file->optional = CB_INTEGER ((yyvsp[-1]))->val;
7959 
7960  /* Add file to current program list */
7963  } else {
7964  current_file = NULL;
7965  if (current_program->file_list) {
7968  }
7969  }
7970  }
7971 #line 7901 "parser.c" /* yacc.c:1646 */
7972  break;
7973 
7974  case 185:
7975 #line 3051 "parser.y" /* yacc.c:1646 */
7976  {
7977  if (CB_VALID_TREE ((yyvsp[-3]))) {
7978  validate_file (current_file, (yyvsp[-3]));
7979  }
7980  }
7981 #line 7911 "parser.c" /* yacc.c:1646 */
7982  break;
7983 
7984  case 201:
7985 #line 3083 "parser.y" /* yacc.c:1646 */
7986  {
7988  cobc_cs_check = 0;
7990  }
7991 #line 7921 "parser.c" /* yacc.c:1646 */
7992  break;
7993 
7994  case 202:
7995 #line 3089 "parser.y" /* yacc.c:1646 */
7996  {
7998  cobc_cs_check = 0;
7999  if ((yyvsp[0])) {
8001  } else {
8003  }
8004  }
8005 #line 7935 "parser.c" /* yacc.c:1646 */
8006  break;
8007 
8008  case 203:
8009 #line 3099 "parser.y" /* yacc.c:1646 */
8010  {
8012  cobc_cs_check = 0;
8013  if ((yyvsp[0])) {
8015  } else {
8017  current_file->assign =
8018  cb_build_alphanumeric_literal ("stdout", (size_t)6);
8020  }
8021  }
8022 #line 7952 "parser.c" /* yacc.c:1646 */
8023  break;
8024 
8025  case 204:
8026 #line 3112 "parser.y" /* yacc.c:1646 */
8027  {
8029  cobc_cs_check = 0;
8030  if ((yyvsp[0])) {
8032  } else {
8034  current_file->assign =
8035  cb_build_alphanumeric_literal ("stdin", (size_t)5);
8037  }
8038  }
8039 #line 7969 "parser.c" /* yacc.c:1646 */
8040  break;
8041 
8042  case 205:
8043 #line 3125 "parser.y" /* yacc.c:1646 */
8044  {
8046  cobc_cs_check = 0;
8048  if ((yyvsp[0])) {
8050  } else {
8051  /* RM/COBOL always expects an assignment name here - we ignore this
8052  for PRINTER + PRINTER-1 as ACUCOBOL allows this for using as alias */
8054  if ((yyvsp[-1]) == cb_int0) {
8055  current_file->assign =
8056  cb_build_alphanumeric_literal ("PRINTER", (size_t)7);
8057  } else if ((yyvsp[-1]) == cb_int1) {
8058  current_file->assign =
8059  cb_build_alphanumeric_literal ("PRINTER-1", (size_t)9);
8060  } else {
8061  current_file->assign =
8062  cb_build_alphanumeric_literal ("LPT1", (size_t)4);
8063  }
8064 
8065  }
8066  }
8067 #line 7997 "parser.c" /* yacc.c:1646 */
8068  break;
8069 
8070  case 206:
8071 #line 3151 "parser.y" /* yacc.c:1646 */
8072  { (yyval) = cb_int0; }
8073 #line 8003 "parser.c" /* yacc.c:1646 */
8074  break;
8075 
8076  case 207:
8077 #line 3152 "parser.y" /* yacc.c:1646 */
8078  { (yyval) = cb_int1; }
8079 #line 8009 "parser.c" /* yacc.c:1646 */
8080  break;
8081 
8082  case 208:
8083 #line 3153 "parser.y" /* yacc.c:1646 */
8084  { (yyval) = cb_int4; }
8085 #line 8015 "parser.c" /* yacc.c:1646 */
8086  break;
8087 
8088  case 214:
8089 #line 3165 "parser.y" /* yacc.c:1646 */
8090  {
8092  }
8093 #line 8023 "parser.c" /* yacc.c:1646 */
8094  break;
8095 
8096  case 216:
8097 #line 3172 "parser.y" /* yacc.c:1646 */
8098  {
8100  }
8101 #line 8031 "parser.c" /* yacc.c:1646 */
8102  break;
8103 
8104  case 220:
8105 #line 3185 "parser.y" /* yacc.c:1646 */
8106  {
8107  (yyval) = NULL;
8108  }
8109 #line 8039 "parser.c" /* yacc.c:1646 */
8110  break;
8111 
8112  case 223:
8113 #line 3197 "parser.y" /* yacc.c:1646 */
8114  {
8115  cobc_cs_check = 0;
8116  check_repeated ("ACCESS", SYN_CLAUSE_2, &check_duplicate);
8117  }
8118 #line 8048 "parser.c" /* yacc.c:1646 */
8119  break;
8120 
8121  case 224:
8122 #line 3204 "parser.y" /* yacc.c:1646 */
8124 #line 8054 "parser.c" /* yacc.c:1646 */
8125  break;
8126 
8127  case 225:
8128 #line 3205 "parser.y" /* yacc.c:1646 */
8130 #line 8060 "parser.c" /* yacc.c:1646 */
8131  break;
8132 
8133  case 226:
8134 #line 3206 "parser.y" /* yacc.c:1646 */
8136 #line 8066 "parser.c" /* yacc.c:1646 */
8137  break;
8138 
8139  case 227:
8140 #line 3214 "parser.y" /* yacc.c:1646 */
8141  {
8142  struct cb_alt_key *p;
8143  struct cb_alt_key *l;
8144 
8145  p = cobc_parse_malloc (sizeof (struct cb_alt_key));
8146  p->key = (yyvsp[-2]);
8147  p->duplicates = CB_INTEGER ((yyvsp[-1]))->val;
8148  p->next = NULL;
8149 
8150  /* Add to the end of list */
8151  if (current_file->alt_key_list == NULL) {
8153  } else {
8155  for (; l->next; l = l->next) {
8156  ;
8157  }
8158  l->next = p;
8159  }
8160  }
8161 #line 8091 "parser.c" /* yacc.c:1646 */
8162  break;
8163 
8164  case 228:
8165 #line 3237 "parser.y" /* yacc.c:1646 */
8166  { }
8167 #line 8097 "parser.c" /* yacc.c:1646 */
8168  break;
8169 
8170  case 229:
8171 #line 3240 "parser.y" /* yacc.c:1646 */
8172  {
8173  PENDING ("SUPPRESS WHEN ALL");
8174  }
8175 #line 8105 "parser.c" /* yacc.c:1646 */
8176  break;
8177 
8178  case 230:
8179 #line 3245 "parser.y" /* yacc.c:1646 */
8180  {
8181  PENDING ("SUPPRESS WHEN SPACE/ZERO");
8182  }
8183 #line 8113 "parser.c" /* yacc.c:1646 */
8184  break;
8185 
8186  case 231:
8187 #line 3255 "parser.y" /* yacc.c:1646 */
8188  {
8189  check_repeated ("COLLATING", SYN_CLAUSE_3, &check_duplicate);
8190  PENDING ("COLLATING SEQUENCE");
8191  }
8192 #line 8122 "parser.c" /* yacc.c:1646 */
8193  break;
8194 
8195  case 232:
8196 #line 3266 "parser.y" /* yacc.c:1646 */
8197  {
8199  current_file->file_status = (yyvsp[0]);
8200  }
8201 #line 8131 "parser.c" /* yacc.c:1646 */
8202  break;
8203 
8204  case 236:
8205 #line 3281 "parser.y" /* yacc.c:1646 */
8206  {
8208  }
8209 #line 8139 "parser.c" /* yacc.c:1646 */
8210  break;
8211 
8212  case 238:
8213 #line 3289 "parser.y" /* yacc.c:1646 */
8214  {
8216  cobc_cs_check = 0;
8217  }
8218 #line 8148 "parser.c" /* yacc.c:1646 */
8219  break;
8220 
8221  case 239:
8222 #line 3294 "parser.y" /* yacc.c:1646 */
8223  {
8225  cobc_cs_check = 0;
8226  }
8227 #line 8157 "parser.c" /* yacc.c:1646 */
8228  break;
8229 
8230  case 240:
8231 #line 3299 "parser.y" /* yacc.c:1646 */
8232  {
8234  cobc_cs_check = 0;
8235  }
8236 #line 8166 "parser.c" /* yacc.c:1646 */
8237  break;
8238 
8239  case 243:
8240 #line 3308 "parser.y" /* yacc.c:1646 */
8241  {
8243  }
8244 #line 8174 "parser.c" /* yacc.c:1646 */
8245  break;
8246 
8247  case 244:
8248 #line 3312 "parser.y" /* yacc.c:1646 */
8249  {
8251  PENDING ("WITH ROLLBACK");
8252  }
8253 #line 8183 "parser.c" /* yacc.c:1646 */
8254  break;
8255 
8256  case 247:
8257 #line 3328 "parser.y" /* yacc.c:1646 */
8258  {
8259  check_repeated ("ORGANIZATION", SYN_CLAUSE_6, &check_duplicate);
8261  }
8262 #line 8192 "parser.c" /* yacc.c:1646 */
8263  break;
8264 
8265  case 248:
8266 #line 3333 "parser.y" /* yacc.c:1646 */
8267  {
8268  check_repeated ("ORGANIZATION", SYN_CLAUSE_6, &check_duplicate);
8270  }
8271 #line 8201 "parser.c" /* yacc.c:1646 */
8272  break;
8273 
8274  case 249:
8275 #line 3338 "parser.y" /* yacc.c:1646 */
8276  {
8277  check_repeated ("ORGANIZATION", SYN_CLAUSE_6, &check_duplicate);
8279  }
8280 #line 8210 "parser.c" /* yacc.c:1646 */
8281  break;
8282 
8283  case 250:
8284 #line 3343 "parser.y" /* yacc.c:1646 */
8285  {
8286  check_repeated ("ORGANIZATION", SYN_CLAUSE_6, &check_duplicate);
8288  }
8289 #line 8219 "parser.c" /* yacc.c:1646 */
8290  break;
8291 
8292  case 251:
8293 #line 3354 "parser.y" /* yacc.c:1646 */
8294  {
8296  cb_verify (cb_padding_character_clause, "PADDING CHARACTER");
8297  }
8298 #line 8228 "parser.c" /* yacc.c:1646 */
8299  break;
8300 
8301  case 252:
8302 #line 3365 "parser.y" /* yacc.c:1646 */
8303  {
8304  check_repeated ("RECORD DELIMITER", SYN_CLAUSE_8, &check_duplicate);
8305  }
8306 #line 8236 "parser.c" /* yacc.c:1646 */
8307  break;
8308 
8309  case 253:
8310 #line 3375 "parser.y" /* yacc.c:1646 */
8311  {
8312  check_repeated ("RECORD KEY", SYN_CLAUSE_9, &check_duplicate);
8313  current_file->key = (yyvsp[0]);
8314  }
8315 #line 8245 "parser.c" /* yacc.c:1646 */
8316  break;
8317 
8318  case 254:
8319 #line 3382 "parser.y" /* yacc.c:1646 */
8320  { (yyval) = (yyvsp[0]); }
8321 #line 8251 "parser.c" /* yacc.c:1646 */
8322  break;
8323 
8324  case 255:
8325 #line 3383 "parser.y" /* yacc.c:1646 */
8326  { PENDING ("SPLIT KEYS"); }
8327 #line 8257 "parser.c" /* yacc.c:1646 */
8328  break;
8329 
8330  case 256:
8331 #line 3384 "parser.y" /* yacc.c:1646 */
8332  { PENDING ("SPLIT KEYS"); }
8333 #line 8263 "parser.c" /* yacc.c:1646 */
8334  break;
8335 
8336  case 257:
8337 #line 3391 "parser.y" /* yacc.c:1646 */
8338  {
8339  check_repeated ("RELATIVE KEY", SYN_CLAUSE_10, &check_duplicate);
8340  current_file->key = (yyvsp[0]);
8341  }
8342 #line 8272 "parser.c" /* yacc.c:1646 */
8343  break;
8344 
8345  case 258:
8346 #line 3402 "parser.y" /* yacc.c:1646 */
8347  {
8349  }
8350 #line 8280 "parser.c" /* yacc.c:1646 */
8351  break;
8352 
8353  case 261:
8354 #line 3416 "parser.y" /* yacc.c:1646 */
8355  {
8357  current_file->sharing = (yyvsp[0]);
8358  }
8359 #line 8289 "parser.c" /* yacc.c:1646 */
8360  break;
8361 
8362  case 262:
8363 #line 3423 "parser.y" /* yacc.c:1646 */
8364  { (yyval) = NULL; }
8365 #line 8295 "parser.c" /* yacc.c:1646 */
8366  break;
8367 
8368  case 263:
8369 #line 3424 "parser.y" /* yacc.c:1646 */
8370  { (yyval) = cb_int (COB_LOCK_OPEN_EXCLUSIVE); }
8371 #line 8301 "parser.c" /* yacc.c:1646 */
8372  break;
8373 
8374  case 264:
8375 #line 3425 "parser.y" /* yacc.c:1646 */
8376  { (yyval) = NULL; }
8377 #line 8307 "parser.c" /* yacc.c:1646 */
8378  break;
8379 
8380  case 267:
8381 #line 3434 "parser.y" /* yacc.c:1646 */
8382  {
8383  yyerrok;
8384  }
8385 #line 8315 "parser.c" /* yacc.c:1646 */
8386  break;
8387 
8388  case 272:
8389 #line 3453 "parser.y" /* yacc.c:1646 */
8390  {
8391  cb_tree l;
8392 
8395  COBC_HD_I_O_CONTROL, 0);
8396  switch (CB_INTEGER ((yyvsp[-3]))->val) {
8397  case 0:
8398  /* SAME AREA */
8399  break;
8400  case 1:
8401  /* SAME RECORD */
8402  for (l = (yyvsp[0]); l; l = CB_CHAIN (l)) {
8403  if (CB_VALID_TREE (CB_VALUE (l))) {
8404  CB_FILE (cb_ref (CB_VALUE (l)))->same_clause = samearea;
8405  }
8406  }
8407  samearea++;
8408  break;
8409  case 2:
8410  /* SAME SORT-MERGE */
8411  break;
8412  }
8413  }
8414 #line 8344 "parser.c" /* yacc.c:1646 */
8415  break;
8416 
8417  case 273:
8418 #line 3480 "parser.y" /* yacc.c:1646 */
8419  { (yyval) = cb_int0; }
8420 #line 8350 "parser.c" /* yacc.c:1646 */
8421  break;
8422 
8423  case 274:
8424 #line 3481 "parser.y" /* yacc.c:1646 */
8425  { (yyval) = cb_int1; }
8426 #line 8356 "parser.c" /* yacc.c:1646 */
8427  break;
8428 
8429  case 275:
8430 #line 3482 "parser.y" /* yacc.c:1646 */
8431  { (yyval) = cb_int2; }
8432 #line 8362 "parser.c" /* yacc.c:1646 */
8433  break;
8434 
8435  case 276:
8436 #line 3483 "parser.y" /* yacc.c:1646 */
8437  { (yyval) = cb_int2; }
8438 #line 8368 "parser.c" /* yacc.c:1646 */
8439  break;
8440 
8441  case 277:
8442 #line 3490 "parser.y" /* yacc.c:1646 */
8443  {
8444  /* Fake for TAPE */
8446  }
8447 #line 8377 "parser.c" /* yacc.c:1646 */
8448  break;
8449 
8450  case 278:
8451 #line 3495 "parser.y" /* yacc.c:1646 */
8452  {
8455  COBC_HD_I_O_CONTROL, 0);
8456  cb_verify (cb_multiple_file_tape_clause, "MULTIPLE FILE TAPE");
8457  cobc_cs_check = 0;
8458  }
8459 #line 8389 "parser.c" /* yacc.c:1646 */
8460  break;
8461 
8462  case 284:
8463 #line 3524 "parser.y" /* yacc.c:1646 */
8464  {
8466  }
8467 #line 8397 "parser.c" /* yacc.c:1646 */
8468  break;
8469 
8470  case 285:
8471 #line 3532 "parser.y" /* yacc.c:1646 */
8472  {
8474  }
8475 #line 8405 "parser.c" /* yacc.c:1646 */
8476  break;
8477 
8478  case 287:
8479 #line 3539 "parser.y" /* yacc.c:1646 */
8480  {
8482  }
8483 #line 8413 "parser.c" /* yacc.c:1646 */
8484  break;
8485 
8486  case 289:
8487 #line 3548 "parser.y" /* yacc.c:1646 */
8488  {
8490  }
8491 #line 8365 "parser.c" /* yacc.c:1646 */
8492  break;
8493 
8494  case 290:
8495 #line 3552 "parser.y" /* yacc.c:1646 */
8496  {
8500  }
8501 #line 8423 "parser.c" /* yacc.c:1646 */
8502  break;
8503 
8504  case 292:
8505 #line 3562 "parser.y" /* yacc.c:1646 */
8506  {
8507  if (CB_VALID_TREE (current_file)) {
8508  if (CB_VALID_TREE ((yyvsp[0]))) {
8509  if (current_file->reports) {
8510  cb_error (_("RECORD description invalid with REPORT"));
8511  } else {
8512  finalize_file (current_file, CB_FIELD ((yyvsp[0])));
8513  }
8514  } else if (!current_file->reports) {
8515  cb_error (_("RECORD description missing or invalid"));
8516  }
8517  }
8518  }
8519 #line 8441 "parser.c" /* yacc.c:1646 */
8520  break;
8521 
8522  case 293:
8523 #line 3581 "parser.y" /* yacc.c:1646 */
8524  {
8527  COBC_HD_FILE_SECTION, 0, 0);
8528  check_duplicate = 0;
8529  if (CB_INVALID_TREE ((yyvsp[0])) || cb_ref ((yyvsp[0])) == cb_error_node) {
8530  YYERROR;
8531  }
8532  current_file = CB_FILE (cb_ref ((yyvsp[0])));
8533  if (CB_VALID_TREE (current_file)) {
8534  if ((yyvsp[-1])) {
8536  }
8537  }
8538  }
8539 #line 8461 "parser.c" /* yacc.c:1646 */
8540  break;
8541 
8542  case 295:
8543 #line 3598 "parser.y" /* yacc.c:1646 */
8544  {
8545  yyerrok;
8546  }
8547 #line 8469 "parser.c" /* yacc.c:1646 */
8548  break;
8549 
8550  case 296:
8551 #line 3605 "parser.y" /* yacc.c:1646 */
8552  {
8553  (yyval) = NULL;
8554  }
8555 #line 8477 "parser.c" /* yacc.c:1646 */
8556  break;
8557 
8558  case 297:
8559 #line 3609 "parser.y" /* yacc.c:1646 */
8560  {
8561  (yyval) = cb_int1;
8562  }
8563 #line 8485 "parser.c" /* yacc.c:1646 */
8564  break;
8565 
8566  case 300:
8567 #line 3620 "parser.y" /* yacc.c:1646 */
8568  {
8570 #if 0 /* RXWRXW - Global/External */
8571  if (current_file->flag_global) {
8572  cb_error (_("File cannot have both EXTERNAL and GLOBAL clauses"));
8573  }
8574 #endif
8576  }
8577 #line 8499 "parser.c" /* yacc.c:1646 */
8578  break;
8579 
8580  case 301:
8581 #line 3630 "parser.y" /* yacc.c:1646 */
8582  {
8583  check_repeated ("GLOBAL", SYN_CLAUSE_2, &check_duplicate);
8584 #if 0 /* RXWRXW - Global/External */
8585  if (current_file->flag_external) {
8586  cb_error (_("File cannot have both EXTERNAL and GLOBAL clauses"));
8587  }
8588 #endif
8590  cb_error (_("%s is invalid in a user FUNCTION"), "GLOBAL");
8591  } else {
8594  }
8595  }
8596 #line 8518 "parser.c" /* yacc.c:1646 */
8597  break;
8598 
8599  case 311:
8600 #line 3660 "parser.y" /* yacc.c:1646 */
8601  {
8603  /* ignore */
8604  }
8605 #line 8527 "parser.c" /* yacc.c:1646 */
8606  break;
8607 
8608  case 315:
8609 #line 3673 "parser.y" /* yacc.c:1646 */
8610  {
8613  if (warningopt) {
8614  cb_warning (_("RECORD clause ignored for LINE SEQUENTIAL"));
8615  }
8616  } else {
8617  current_file->record_max = cb_get_int ((yyvsp[-1]));
8618  if (current_file->record_max < 1) {
8619  current_file->record_max = 1;
8620  cb_error (_("RECORD clause invalid"));
8621  }
8624  cb_error (_("RECORD size exceeds maximum allowed (%d)"),
8625  MAX_FD_RECORD);
8626  }
8627  }
8628  }
8629 #line 8551 "parser.c" /* yacc.c:1646 */
8630  break;
8631 
8632  case 316:
8633 #line 3693 "parser.y" /* yacc.c:1646 */
8634  {
8635  int error_ind = 0;
8636 
8639  if (warningopt) {
8640  cb_warning (_("RECORD clause ignored for LINE SEQUENTIAL"));
8641  }
8642  } else {
8643  current_file->record_min = cb_get_int ((yyvsp[-3]));
8644  current_file->record_max = cb_get_int ((yyvsp[-1]));
8645  if (current_file->record_min < 0) {
8646  current_file->record_min = 0;
8647  error_ind = 1;
8648  }
8649  if (current_file->record_max < 1) {
8650  current_file->record_max = 1;
8651  error_ind = 1;
8652  }
8655  cb_error (_("RECORD size exceeds maximum allowed (%d)"),
8656  MAX_FD_RECORD);
8657  error_ind = 1;
8658  }
8660  error_ind = 1;
8661  }
8662  if (error_ind) {
8663  cb_error (_("RECORD clause invalid"));
8664  }
8665  }
8666  }
8667 #line 8589 "parser.c" /* yacc.c:1646 */
8668  break;
8669 
8670  case 317:
8671 #line 3728 "parser.y" /* yacc.c:1646 */
8672  {
8673  int error_ind = 0;
8674 
8676  current_file->record_min = (yyvsp[-3]) ? cb_get_int ((yyvsp[-3])) : 0;
8677  current_file->record_max = (yyvsp[-2]) ? cb_get_int ((yyvsp[-2])) : 0;
8678  if ((yyvsp[-3]) && current_file->record_min < 0) {
8679  current_file->record_min = 0;
8680  error_ind = 1;
8681  }
8682  if ((yyvsp[-2]) && current_file->record_max < 1) {
8683  current_file->record_max = 1;
8684  error_ind = 1;
8685  }
8686  if ((yyvsp[-2]) && current_file->record_max > MAX_FD_RECORD) {
8688  cb_error (_("RECORD size exceeds maximum allowed (%d)"),
8689  MAX_FD_RECORD);
8690  error_ind = 1;
8691  }
8692  if (((yyvsp[-3]) || (yyvsp[-2])) && current_file->record_max <= current_file->record_min) {
8693  error_ind = 1;
8694  }
8695  if (error_ind) {
8696  cb_error (_("RECORD clause invalid"));
8697  }
8698  }
8699 #line 8621 "parser.c" /* yacc.c:1646 */
8700  break;
8701 
8702  case 319:
8703 #line 3759 "parser.y" /* yacc.c:1646 */
8704  {
8705  current_file->record_depending = (yyvsp[0]);
8706  }
8707 #line 8629 "parser.c" /* yacc.c:1646 */
8708  break;
8709 
8710  case 320:
8711 #line 3765 "parser.y" /* yacc.c:1646 */
8712  { (yyval) = NULL; }
8713 #line 8635 "parser.c" /* yacc.c:1646 */
8714  break;
8715 
8716  case 321:
8717 #line 3766 "parser.y" /* yacc.c:1646 */
8718  { (yyval) = (yyvsp[0]); }
8719 #line 8641 "parser.c" /* yacc.c:1646 */
8720  break;
8721 
8722  case 322:
8723 #line 3770 "parser.y" /* yacc.c:1646 */
8724  { (yyval) = NULL; }
8725 #line 8647 "parser.c" /* yacc.c:1646 */
8726  break;
8727 
8728  case 323:
8729 #line 3771 "parser.y" /* yacc.c:1646 */
8730  { (yyval) = (yyvsp[0]); }
8731 #line 8653 "parser.c" /* yacc.c:1646 */
8732  break;
8733 
8734  case 324:
8735 #line 3779 "parser.y" /* yacc.c:1646 */
8736  {
8738  cb_verify (cb_label_records_clause, "LABEL RECORDS");
8739  }
8740 #line 8662 "parser.c" /* yacc.c:1646 */
8741  break;
8742 
8743  case 325:
8744 #line 3790 "parser.y" /* yacc.c:1646 */
8745  {
8747  cb_verify (cb_value_of_clause, "VALUE OF");
8748  }
8749 #line 8671 "parser.c" /* yacc.c:1646 */
8750  break;
8751 
8752  case 326:
8753 #line 3795 "parser.y" /* yacc.c:1646 */
8754  {
8756  cb_verify (cb_value_of_clause, "VALUE OF");
8757  if (!current_file->assign) {
8759  }
8760  }
8761 #line 8683 "parser.c" /* yacc.c:1646 */
8762  break;
8763 
8764  case 331:
8765 #line 3818 "parser.y" /* yacc.c:1646 */
8766  {
8768  cb_verify (cb_data_records_clause, "DATA RECORDS");
8769  }
8770 #line 8692 "parser.c" /* yacc.c:1646 */
8771  break;
8772 
8773  case 332:
8774 #line 3830 "parser.y" /* yacc.c:1646 */
8775  {
8779  cb_error (_("LINAGE clause with wrong file type"));
8780  } else {
8781  current_file->linage = (yyvsp[-2]);
8783  if (current_linage == 0) {
8785  }
8786  current_linage++;
8787  }
8788  }
8789 #line 8711 "parser.c" /* yacc.c:1646 */
8790  break;
8791 
8792  case 338:
8793 #line 3858 "parser.y" /* yacc.c:1646 */
8794  {
8795  current_file->latfoot = (yyvsp[0]);
8796  }
8797 #line 8719 "parser.c" /* yacc.c:1646 */
8798  break;
8799 
8800  case 339:
8801 #line 3865 "parser.y" /* yacc.c:1646 */
8802  {
8803  current_file->lattop = (yyvsp[0]);
8804  }
8805 #line 8727 "parser.c" /* yacc.c:1646 */
8806  break;
8807 
8808  case 340:
8809 #line 3872 "parser.y" /* yacc.c:1646 */
8810  {
8811  current_file->latbot = (yyvsp[0]);
8812  }
8813 #line 8735 "parser.c" /* yacc.c:1646 */
8814  break;
8815 
8816  case 341:
8817 #line 3881 "parser.y" /* yacc.c:1646 */
8818  {
8819  cobc_cs_check = 0;
8820  check_repeated ("RECORDING", SYN_CLAUSE_9, &check_duplicate);
8821  /* ignore */
8822  }
8823 #line 8745 "parser.c" /* yacc.c:1646 */
8824  break;
8825 
8826  case 342:
8827 #line 3893 "parser.y" /* yacc.c:1646 */
8828  {
8830  if (CB_VALID_TREE ((yyvsp[0]))) {
8831  cb_tree x;
8832  struct cb_alphabet_name *al;
8833 
8834  x = cb_ref ((yyvsp[0]));
8837  cb_error (_("CODE-SET clause invalid for file type"));
8838  }
8839  if (!CB_ALPHABET_NAME_P (x)) {
8840  cb_error_x ((yyvsp[0]), _("Alphabet-name is expected '%s'"), cb_name ((yyvsp[0])));
8841  } else {
8842  al = CB_ALPHABET_NAME (x);
8843  switch (al->alphabet_type) {
8844 #ifdef COB_EBCDIC_MACHINE
8845  case CB_ALPHABET_ASCII:
8846  case CB_ALPHABET_CUSTOM:
8847  current_file->code_set = al;
8848  break;
8849  default:
8850  if (warningopt) {
8851  cb_warning_x ((yyvsp[0]), _("Ignoring CODE-SET '%s'"),
8852  cb_name ((yyvsp[0])));
8853  }
8854  break;
8855 #else
8856  case CB_ALPHABET_EBCDIC:
8857  case CB_ALPHABET_CUSTOM:
8858  current_file->code_set = al;
8859  break;
8860  default:
8861  if (warningopt) {
8862  cb_warning_x ((yyvsp[0]), _("Ignoring CODE-SET '%s'"),
8863  cb_name ((yyvsp[0])));
8864  }
8865  break;
8866 #endif
8867  }
8868  if (warningopt) {
8869  PENDING ("CODE-SET");
8870  }
8871  }
8872  }
8873  }
8874 #line 8796 "parser.c" /* yacc.c:1646 */
8875  break;
8876 
8877  case 343:
8878 #line 3945 "parser.y" /* yacc.c:1646 */
8879  {
8881  PENDING("REPORT WRITER");
8884  cb_error (_("REPORT clause with wrong file type"));
8885  } else {
8886  current_file->reports = (yyvsp[0]);
8888  }
8889  }
8890 #line 8812 "parser.c" /* yacc.c:1646 */
8891  break;
8892 
8893  case 346:
8894 #line 3965 "parser.y" /* yacc.c:1646 */
8895  {
8896  current_report = build_report ((yyvsp[0]));
8899  if (report_count == 0) {
8901  }
8902  report_count++;
8903  }
8904 #line 8826 "parser.c" /* yacc.c:1646 */
8905  break;
8906 
8907  case 347:
8908 #line 3975 "parser.y" /* yacc.c:1646 */
8909  {
8910  current_report = build_report ((yyvsp[0]));
8912  if (report_count == 0) {
8914  }
8915  report_count++;
8916  }
8917 #line 8839 "parser.c" /* yacc.c:1646 */
8918  break;
8919 
8920  case 349:
8921 #line 3990 "parser.y" /* yacc.c:1646 */
8922  {
8926  }
8927 #line 8849 "parser.c" /* yacc.c:1646 */
8928  break;
8929 
8930  case 350:
8931 #line 3996 "parser.y" /* yacc.c:1646 */
8932  {
8933  if ((yyvsp[0])) {
8935  }
8936  }
8937 #line 8859 "parser.c" /* yacc.c:1646 */
8938  break;
8939 
8940  case 351:
8941 #line 4005 "parser.y" /* yacc.c:1646 */
8942  {
8943  (yyval) = NULL;
8944  }
8945 #line 8867 "parser.c" /* yacc.c:1646 */
8946  break;
8947 
8948  case 352:
8949 #line 4008 "parser.y" /* yacc.c:1646 */
8950  {
8951  current_field = NULL;
8954  }
8955 #line 8877 "parser.c" /* yacc.c:1646 */
8956  break;
8957 
8958  case 353:
8959 #line 4014 "parser.y" /* yacc.c:1646 */
8960  {
8961  struct cb_field *p;
8962 
8963  for (p = description_field; p; p = p->sister) {
8964  cb_validate_field (p);
8965  }
8966  (yyval) = CB_TREE (description_field);
8967  }
8968 #line 8890 "parser.c" /* yacc.c:1646 */
8969  break;
8970 
8971  case 358:
8972 #line 4034 "parser.y" /* yacc.c:1646 */
8973  {
8974  cb_tree x;
8975 
8976  x = cb_build_field_tree ((yyvsp[-1]), (yyvsp[0]), current_field, current_storage,
8977  current_file, 0);
8978  /* Free tree associated with level number */
8979  cobc_parse_free ((yyvsp[-1]));
8980  if (CB_INVALID_TREE (x)) {
8981  YYERROR;
8982  } else {
8983  current_field = CB_FIELD (x);
8984  check_pic_duplicate = 0;
8985  }
8986  }
8987 #line 8909 "parser.c" /* yacc.c:1646 */
8988  break;
8989 
8990  case 359:
8991 #line 4049 "parser.y" /* yacc.c:1646 */
8992  {
8993  if (!qualifier && (current_field->level == 88 ||
8995  cb_error (_("Item requires a data name"));
8996  }
8997  if (!qualifier) {
8999  }
9000  if (current_field->level == 88) {
9002  }
9003  if (current_field->flag_item_78) {
9004  /* Reset to last non-78 item */
9006  }
9007  if (!description_field) {
9009  }
9010  }
9011 #line 8933 "parser.c" /* yacc.c:1646 */
9012  break;
9013 
9014  case 360:
9015 #line 4069 "parser.y" /* yacc.c:1646 */
9016  {
9017  /* Free tree assocated with level number */
9018  cobc_parse_free ((yyvsp[-2]));
9019  yyerrok;
9020  cb_unput_dot ();
9021  check_pic_duplicate = 0;
9022  check_duplicate = 0;
9024  }
9025 #line 8947 "parser.c" /* yacc.c:1646 */
9026  break;
9027 
9028  case 361:
9029 #line 4082 "parser.y" /* yacc.c:1646 */
9030  {
9031  (yyval) = (yyvsp[0]);
9032  }
9033 #line 8955 "parser.c" /* yacc.c:1646 */
9034  break;
9035 
9036  case 362:
9037 #line 4089 "parser.y" /* yacc.c:1646 */
9038  {
9039  (yyval) = cb_build_filler ();
9040  qualifier = NULL;
9041  non_const_word = 0;
9042  }
9043 #line 8965 "parser.c" /* yacc.c:1646 */
9044  break;
9045 
9046  case 363:
9047 #line 4095 "parser.y" /* yacc.c:1646 */
9048  {
9049  (yyval) = cb_build_filler ();
9050  qualifier = NULL;
9051  non_const_word = 0;
9052  }
9053 #line 8975 "parser.c" /* yacc.c:1646 */
9054  break;
9055 
9056  case 364:
9057 #line 4101 "parser.y" /* yacc.c:1646 */
9058  {
9059  (yyval) = (yyvsp[0]);
9060  qualifier = (yyvsp[0]);
9061  non_const_word = 0;
9062  }
9063 #line 8985 "parser.c" /* yacc.c:1646 */
9064  break;
9065 
9066  case 365:
9067 #line 4110 "parser.y" /* yacc.c:1646 */
9068  {
9069  (yyval) = (yyvsp[0]);
9070  qualifier = (yyvsp[0]);
9071  non_const_word = 0;
9072  }
9073 #line 8995 "parser.c" /* yacc.c:1646 */
9074  break;
9075 
9076  case 366:
9077 #line 4119 "parser.y" /* yacc.c:1646 */
9078  {
9079  (yyval)= NULL;
9080  }
9081 #line 9003 "parser.c" /* yacc.c:1646 */
9082  break;
9083 
9084  case 367:
9085 #line 4123 "parser.y" /* yacc.c:1646 */
9086  {
9088  cb_error (_("%s is invalid in a user FUNCTION"), "GLOBAL");
9089  (yyval)= NULL;
9090  } else {
9091  (yyval) = cb_null;
9092  }
9093  }
9094 #line 9016 "parser.c" /* yacc.c:1646 */
9095  break;
9096 
9097  case 368:
9098 #line 4134 "parser.y" /* yacc.c:1646 */
9099  { (yyval) = (yyvsp[0]); }
9100 #line 9022 "parser.c" /* yacc.c:1646 */
9101  break;
9102 
9103  case 369:
9104 #line 4135 "parser.y" /* yacc.c:1646 */
9105  { (yyval) = cb_build_const_length ((yyvsp[0])); }
9106 #line 9028 "parser.c" /* yacc.c:1646 */
9107  break;
9108 
9109  case 370:
9110 #line 4136 "parser.y" /* yacc.c:1646 */
9111  { (yyval) = cb_build_const_length ((yyvsp[0])); }
9112 #line 9034 "parser.c" /* yacc.c:1646 */
9113  break;
9114 
9115  case 371:
9116 #line 4137 "parser.y" /* yacc.c:1646 */
9117  { (yyval) = cb_build_const_length ((yyvsp[0])); }
9118 #line 9040 "parser.c" /* yacc.c:1646 */
9119  break;
9120 
9121  case 372:
9122 #line 4142 "parser.y" /* yacc.c:1646 */
9123  {
9124  (yyval) = (yyvsp[0]);
9125  }
9126 #line 9048 "parser.c" /* yacc.c:1646 */
9127  break;
9128 
9129  case 373:
9130 #line 4146 "parser.y" /* yacc.c:1646 */
9131  {
9132  (yyval) = cb_int1;
9133  }
9134 #line 9056 "parser.c" /* yacc.c:1646 */
9135  break;
9136 
9137  case 374:
9138 #line 4150 "parser.y" /* yacc.c:1646 */
9139  {
9140  (yyval) = cb_int2;
9141  }
9142 #line 9064 "parser.c" /* yacc.c:1646 */
9143  break;
9144 
9145  case 375:
9146 #line 4154 "parser.y" /* yacc.c:1646 */
9147  {
9148  (yyval) = cb_int4;
9149  }
9150 #line 9072 "parser.c" /* yacc.c:1646 */
9151  break;
9152 
9153  case 376:
9154 #line 4158 "parser.y" /* yacc.c:1646 */
9155  {
9156  (yyval) = cb_int (8);
9157  }
9158 #line 9080 "parser.c" /* yacc.c:1646 */
9159  break;
9160 
9161  case 377:
9162 #line 4162 "parser.y" /* yacc.c:1646 */
9163  {
9164  (yyval) = cb_int ((int)sizeof(long));
9165  }
9166 #line 9088 "parser.c" /* yacc.c:1646 */
9167  break;
9168 
9169  case 378:
9170 #line 4166 "parser.y" /* yacc.c:1646 */
9171  {
9172  (yyval) = cb_int ((int)sizeof(void *));
9173  }
9174 #line 9096 "parser.c" /* yacc.c:1646 */
9175  break;
9176 
9177  case 379:
9178 #line 4170 "parser.y" /* yacc.c:1646 */
9179  {
9180  (yyval) = cb_int ((int)sizeof(float));
9181  }
9182 #line 9104 "parser.c" /* yacc.c:1646 */
9183  break;
9184 
9185  case 380:
9186 #line 4174 "parser.y" /* yacc.c:1646 */
9187  {
9188  (yyval) = cb_int ((int)sizeof(double));
9189  }
9190 #line 9112 "parser.c" /* yacc.c:1646 */
9191  break;
9192 
9193  case 381:
9194 #line 4178 "parser.y" /* yacc.c:1646 */
9195  {
9196  (yyval) = cb_int (4);
9197  }
9198 #line 9120 "parser.c" /* yacc.c:1646 */
9199  break;
9200 
9201  case 382:
9202 #line 4182 "parser.y" /* yacc.c:1646 */
9203  {
9204  (yyval) = cb_int (8);
9205  }
9206 #line 9128 "parser.c" /* yacc.c:1646 */
9207  break;
9208 
9209  case 383:
9210 #line 4186 "parser.y" /* yacc.c:1646 */
9211  {
9212  (yyval) = cb_int (16);
9213  }
9214 #line 9136 "parser.c" /* yacc.c:1646 */
9215  break;
9216 
9217  case 384:
9218 #line 4190 "parser.y" /* yacc.c:1646 */
9219  {
9220  yyerrok;
9221  cb_unput_dot ();
9222  check_pic_duplicate = 0;
9223  check_duplicate = 0;
9225  }
9226 #line 9148 "parser.c" /* yacc.c:1646 */
9227  break;
9228 
9229  case 394:
9230 #line 4222 "parser.y" /* yacc.c:1646 */
9231  {
9232  cb_tree x;
9233  int level;
9234 
9235  cobc_cs_check = 0;
9236  level = cb_get_level ((yyvsp[-4]));
9237  /* Free tree assocated with level number */
9238  cobc_parse_free ((yyvsp[-4]));
9239  if (level != 1) {
9240  cb_error (_("CONSTANT item not at 01 level"));
9241  } else if ((yyvsp[0])) {
9242  x = cb_build_constant ((yyvsp[-3]), (yyvsp[0]));
9243  CB_FIELD (x)->flag_item_78 = 1;
9244  CB_FIELD (x)->level = 1;
9245  cb_needs_01 = 1;
9246  if ((yyvsp[-1])) {
9247  CB_FIELD (x)->flag_is_global = 1;
9248  }
9249  /* Ignore return value */
9250  (void)cb_validate_78_item (CB_FIELD (x), 0);
9251  }
9252  }
9253 #line 9175 "parser.c" /* yacc.c:1646 */
9254  break;
9255 
9256  case 395:
9257 #line 4248 "parser.y" /* yacc.c:1646 */
9258  {
9259  (yyval) = (yyvsp[0]);
9260  }
9261 #line 9183 "parser.c" /* yacc.c:1646 */
9262  break;
9263 
9264  case 396:
9265 #line 4252 "parser.y" /* yacc.c:1646 */
9266  {
9267  PENDING ("CONSTANT FROM clause");
9268  (yyval) = NULL;
9269  }
9270 #line 9192 "parser.c" /* yacc.c:1646 */
9271  break;
9272 
9273  case 397:
9274 #line 4260 "parser.y" /* yacc.c:1646 */
9275  {
9276  /* Required to check redefines */
9277  (yyval) = NULL;
9278  }
9279 #line 9201 "parser.c" /* yacc.c:1646 */
9280  break;
9281 
9282  case 398:
9283 #line 4266 "parser.y" /* yacc.c:1646 */
9284  {
9285  /* Required to check redefines */
9286  (yyval) = cb_true;
9287  }
9288 #line 9210 "parser.c" /* yacc.c:1646 */
9289  break;
9290 
9291  case 413:
9292 #line 4294 "parser.y" /* yacc.c:1646 */
9293  {
9295  if ((yyvsp[-2]) != NULL) {
9296  if (cb_relaxed_syntax_check) {
9297  cb_warning_x ((yyvsp[0]), _("REDEFINES clause should follow entry-name"));
9298  } else {
9299  cb_error_x ((yyvsp[0]), _("REDEFINES clause must follow entry-name"));
9300  }
9301  }
9302 
9304  if (current_field->redefines == NULL) {
9307  YYERROR;
9308  }
9309  }
9310 #line 9232 "parser.c" /* yacc.c:1646 */
9311  break;
9312 
9313  case 414:
9314 #line 4318 "parser.y" /* yacc.c:1646 */
9315  {
9316  check_repeated ("EXTERNAL", SYN_CLAUSE_2, &check_pic_duplicate);
9318  cb_error (_("%s not allowed here"), "EXTERNAL");
9319  } else if (current_field->level != 1 && current_field->level != 77) {
9320  cb_error (_("%s only allowed at 01/77 level"), "EXTERNAL");
9321  } else if (!qualifier) {
9322  cb_error (_("%s requires a data name"), "EXTERNAL");
9323 #if 0 /* RXWRXW - Global/External */
9324  } else if (current_field->flag_is_global) {
9325  cb_error (_("%s and %s are mutually exclusive"), "GLOBAL", "EXTERNAL");
9326 #endif
9327  } else if (current_field->flag_item_based) {
9328  cb_error (_("%s and %s are mutually exclusive"), "BASED", "EXTERNAL");
9329  } else if (current_field->redefines) {
9330  cb_error (_("%s and %s are mutually exclusive"), "EXTERNAL", "REDEFINES");
9331  } else if (current_field->flag_occurs) {
9332  cb_error (_("%s and %s are mutually exclusive"), "EXTERNAL", "OCCURS");
9333  } else {
9336  }
9337  }
9338 #line 9260 "parser.c" /* yacc.c:1646 */
9339  break;
9340 
9341  case 415:
9342 #line 4345 "parser.y" /* yacc.c:1646 */
9343  {
9345  }
9346 #line 9268 "parser.c" /* yacc.c:1646 */
9347  break;
9348 
9349  case 416:
9350 #line 4349 "parser.y" /* yacc.c:1646 */
9351  {
9352  current_field->ename = cb_to_cname ((const char *)CB_LITERAL ((yyvsp[0]))->data);
9353  }
9354 #line 9276 "parser.c" /* yacc.c:1646 */
9355  break;
9356 
9357  case 417:
9358 #line 4358 "parser.y" /* yacc.c:1646 */
9359  {
9361  if (current_field->level != 1 && current_field->level != 77) {
9362  cb_error (_("%s only allowed at 01/77 level"), "GLOBAL");
9363  } else if (!qualifier) {
9364  cb_error (_("%s requires a data name"), "GLOBAL");
9365 #if 0 /* RXWRXW - Global/External */
9366  } else if (current_field->flag_external) {
9367  cb_error (_("%s and %s are mutually exclusive"), "GLOBAL", "EXTERNAL");
9368 #endif
9369  } else if (current_program->prog_type == CB_FUNCTION_TYPE) {
9370  cb_error (_("%s is invalid in a user FUNCTION"), "GLOBAL");
9371  } else if (current_storage == CB_STORAGE_LOCAL) {
9372  cb_error (_("%s not allowed here"), "GLOBAL");
9373  } else {
9375  }
9376  }
9377 #line 9299 "parser.c" /* yacc.c:1646 */
9378  break;
9379 
9380  case 418:
9381 #line 4383 "parser.y" /* yacc.c:1646 */
9382  {
9384  current_field->pic = CB_PICTURE ((yyvsp[0]));
9385  }
9386 #line 9308 "parser.c" /* yacc.c:1646 */
9387  break;
9388 
9389  case 421:
9390 #line 4399 "parser.y" /* yacc.c:1646 */
9391  {
9393  }
9394 #line 9316 "parser.c" /* yacc.c:1646 */
9395  break;
9396 
9397  case 422:
9398 #line 4403 "parser.y" /* yacc.c:1646 */
9399  {
9401  }
9402 #line 9324 "parser.c" /* yacc.c:1646 */
9403  break;
9404 
9405  case 423:
9406 #line 4407 "parser.y" /* yacc.c:1646 */
9407  {
9409  }
9410 #line 9332 "parser.c" /* yacc.c:1646 */
9411  break;
9412 
9413  case 424:
9414 #line 4411 "parser.y" /* yacc.c:1646 */
9415  {
9417  }
9418 #line 9340 "parser.c" /* yacc.c:1646 */
9419  break;
9420 
9421  case 425:
9422 #line 4415 "parser.y" /* yacc.c:1646 */
9423  {
9425  }
9426 #line 9348 "parser.c" /* yacc.c:1646 */
9427  break;
9428 
9429  case 426:
9430 #line 4419 "parser.y" /* yacc.c:1646 */
9431  {
9433  }
9434 #line 9356 "parser.c" /* yacc.c:1646 */
9435  break;
9436 
9437  case 427:
9438 #line 4423 "parser.y" /* yacc.c:1646 */
9439  {
9441  }
9442 #line 9364 "parser.c" /* yacc.c:1646 */
9443  break;
9444 
9445  case 428:
9446 #line 4427 "parser.y" /* yacc.c:1646 */
9447  {
9449  }
9450 #line 9372 "parser.c" /* yacc.c:1646 */
9451  break;
9452 
9453  case 429:
9454 #line 4431 "parser.y" /* yacc.c:1646 */
9455  {
9457  }
9458 #line 9380 "parser.c" /* yacc.c:1646 */
9459  break;
9460 
9461  case 430:
9462 #line 4435 "parser.y" /* yacc.c:1646 */
9463  {
9465  }
9466 #line 9388 "parser.c" /* yacc.c:1646 */
9467  break;
9468 
9469  case 431:
9470 #line 4439 "parser.y" /* yacc.c:1646 */
9471  {
9473  }
9474 #line 9396 "parser.c" /* yacc.c:1646 */
9475  break;
9476 
9477  case 432:
9478 #line 4443 "parser.y" /* yacc.c:1646 */
9479  {
9481  }
9482 #line 9404 "parser.c" /* yacc.c:1646 */
9483  break;
9484 
9485  case 433:
9486 #line 4447 "parser.y" /* yacc.c:1646 */
9487  {
9490  }
9491 #line 9413 "parser.c" /* yacc.c:1646 */
9492  break;
9493 
9494  case 434:
9495 #line 4452 "parser.y" /* yacc.c:1646 */
9496  {
9499  }
9500 #line 9422 "parser.c" /* yacc.c:1646 */
9501  break;
9502 
9503  case 435:
9504 #line 4457 "parser.y" /* yacc.c:1646 */
9505  {
9507  }
9508 #line 9430 "parser.c" /* yacc.c:1646 */
9509  break;
9510 
9511  case 436:
9512 #line 4461 "parser.y" /* yacc.c:1646 */
9513  {
9515  }
9516 #line 9438 "parser.c" /* yacc.c:1646 */
9517  break;
9518 
9519  case 437:
9520 #line 4465 "parser.y" /* yacc.c:1646 */
9521  {
9522  if (sizeof(long) == 4) {
9524  } else {
9526  }
9527  }
9528 #line 9450 "parser.c" /* yacc.c:1646 */
9529  break;
9530 
9531  case 438:
9532 #line 4473 "parser.y" /* yacc.c:1646 */
9533  {
9535  }
9536 #line 9458 "parser.c" /* yacc.c:1646 */
9537  break;
9538 
9539  case 439:
9540 #line 4477 "parser.y" /* yacc.c:1646 */
9541  {
9543  }
9544 #line 9466 "parser.c" /* yacc.c:1646 */
9545  break;
9546 
9547  case 440:
9548 #line 4481 "parser.y" /* yacc.c:1646 */
9549  {
9550  if (sizeof(long) == 4) {
9552  } else {
9554  }
9555  }
9556 #line 9478 "parser.c" /* yacc.c:1646 */
9557  break;
9558 
9559  case 441:
9560 #line 4489 "parser.y" /* yacc.c:1646 */
9561  {
9563  }
9564 #line 9486 "parser.c" /* yacc.c:1646 */
9565  break;
9566 
9567  case 442:
9568 #line 4493 "parser.y" /* yacc.c:1646 */
9569  {
9571  }
9572 #line 9494 "parser.c" /* yacc.c:1646 */
9573  break;
9574 
9575  case 443:
9576 #line 4497 "parser.y" /* yacc.c:1646 */
9577  {
9579  }
9580 #line 9502 "parser.c" /* yacc.c:1646 */
9581  break;
9582 
9583  case 444:
9584 #line 4501 "parser.y" /* yacc.c:1646 */
9585  {
9587  }
9588 #line 9510 "parser.c" /* yacc.c:1646 */
9589  break;
9590 
9591  case 445:
9592 #line 4505 "parser.y" /* yacc.c:1646 */
9593  {
9595  }
9596 #line 9518 "parser.c" /* yacc.c:1646 */
9597  break;
9598 
9599  case 446:
9600 #line 4509 "parser.y" /* yacc.c:1646 */
9601  {
9603  }
9604 #line 9526 "parser.c" /* yacc.c:1646 */
9605  break;
9606 
9607  case 447:
9608 #line 4513 "parser.y" /* yacc.c:1646 */
9609  {
9611  }
9612 #line 9534 "parser.c" /* yacc.c:1646 */
9613  break;
9614 
9615  case 448:
9616 #line 4517 "parser.y" /* yacc.c:1646 */
9617  {
9619  }
9620 #line 9542 "parser.c" /* yacc.c:1646 */
9621  break;
9622 
9623  case 449:
9624 #line 4521 "parser.y" /* yacc.c:1646 */
9625  {
9626  if (sizeof(long) == 4) {
9628  } else {
9630  }
9631  }
9632 #line 9554 "parser.c" /* yacc.c:1646 */
9633  break;
9634 
9635  case 450:
9636 #line 4529 "parser.y" /* yacc.c:1646 */
9637  {
9638  if (sizeof(long) == 4) {
9640  } else {
9642  }
9643  }
9644 #line 9566 "parser.c" /* yacc.c:1646 */
9645  break;
9646 
9647  case 451:
9648 #line 4537 "parser.y" /* yacc.c:1646 */
9649  {
9651  }
9652 #line 9574 "parser.c" /* yacc.c:1646 */
9653  break;
9654 
9655  case 452:
9656 #line 4541 "parser.y" /* yacc.c:1646 */
9657  {
9659  }
9660 #line 9582 "parser.c" /* yacc.c:1646 */
9661  break;
9662 
9663  case 453:
9664 #line 4545 "parser.y" /* yacc.c:1646 */
9665  {
9667  }
9668 #line 9590 "parser.c" /* yacc.c:1646 */
9669  break;
9670 
9671  case 454:
9672 #line 4549 "parser.y" /* yacc.c:1646 */
9673  {
9675  }
9676 #line 9598 "parser.c" /* yacc.c:1646 */
9677  break;
9678 
9679  case 455:
9680 #line 4553 "parser.y" /* yacc.c:1646 */
9681  {
9683  }
9684 #line 9606 "parser.c" /* yacc.c:1646 */
9685  break;
9686 
9687  case 456:
9688 #line 4557 "parser.y" /* yacc.c:1646 */
9689  {
9691  PENDING ("USAGE NATIONAL");
9692  }
9693 #line 9615 "parser.c" /* yacc.c:1646 */
9694  break;
9695 
9696  case 461:
9697 #line 4577 "parser.y" /* yacc.c:1646 */
9698  {
9700  current_field->flag_sign_separate = ((yyvsp[0]) ? 1 : 0);
9702  }
9703 #line 9625 "parser.c" /* yacc.c:1646 */
9704  break;
9705 
9706  case 462:
9707 #line 4583 "parser.y" /* yacc.c:1646 */
9708  {
9710  current_field->flag_sign_separate = ((yyvsp[0]) ? 1 : 0);
9712  }
9713 #line 9635 "parser.c" /* yacc.c:1646 */
9714  break;
9715 
9716  case 463:
9717 #line 4596 "parser.y" /* yacc.c:1646 */
9718  {
9720  if (current_field->depending && !((yyvsp[-3]))) {
9721  cb_verify (cb_odo_without_to, _("ODO without TO clause"));
9722  }
9723  current_field->occurs_min = (yyvsp[-3]) ? cb_get_int ((yyvsp[-4])) : 1;
9724  current_field->occurs_max = (yyvsp[-3]) ? cb_get_int ((yyvsp[-3])) : cb_get_int ((yyvsp[-4]));
9727  cb_error (_("Maximum OCCURS depth exceeded (%d)"),
9729  }
9731  }
9732 #line 9654 "parser.c" /* yacc.c:1646 */
9733  break;
9734 
9735  case 465:
9736 #line 4614 "parser.y" /* yacc.c:1646 */
9737  {
9738  current_field->step_count = cb_get_int ((yyvsp[0]));
9739  }
9740 #line 9662 "parser.c" /* yacc.c:1646 */
9741  break;
9742 
9743  case 466:
9744 #line 4624 "parser.y" /* yacc.c:1646 */
9745  {
9748  cb_error (_("Maximum OCCURS depth exceeded (%d)"),
9750  } else {
9752  }
9754  cb_error (_("%s and %s are mutually exclusive"), "BASED", "OCCURS");
9755  } else if (current_field->flag_external) {
9756  cb_error (_("%s and %s are mutually exclusive"), "EXTERNAL", "OCCURS");
9757  }
9758  if ((yyvsp[-4])) {
9759  current_field->occurs_min = cb_get_int ((yyvsp[-5]));
9760  current_field->occurs_max = cb_get_int ((yyvsp[-4]));
9761  if (current_field->depending &&
9762  current_field->occurs_max > 0 &&
9764  cb_error (_("OCCURS max. must be greater than OCCURS min."));
9765  }
9766  } else {
9768  current_field->occurs_max = cb_get_int ((yyvsp[-5]));
9769  if (current_field->depending) {
9770  cb_verify (cb_odo_without_to, "ODO without TO clause");
9771  }
9772  }
9774  }
9775 #line 9697 "parser.c" /* yacc.c:1646 */
9776  break;
9777 
9778  case 467:
9779 #line 4656 "parser.y" /* yacc.c:1646 */
9780  {
9783  cb_error (_("Maximum OCCURS depth exceeded (%d)"),
9785  } else {
9787  }
9789  cb_error (_("%s and %s are mutually exclusive"), "BASED", "OCCURS");
9790  } else if (current_field->flag_external) {
9791  cb_error (_("%s and %s are mutually exclusive"), "EXTERNAL", "OCCURS");
9792  }
9793  current_field->occurs_min = (yyvsp[-4]) ? cb_get_int ((yyvsp[-4])) : 0;
9794  if ((yyvsp[-3])) {
9795  current_field->occurs_max = cb_get_int ((yyvsp[-3]));
9797  cb_error (_("OCCURS max. must be greater than OCCURS min."));
9798  }
9799  } else {
9801  }
9802  PENDING("OCCURS with DYNAMIC capacity");
9804  }
9805 #line 9727 "parser.c" /* yacc.c:1646 */
9806  break;
9807 
9808  case 468:
9809 #line 4684 "parser.y" /* yacc.c:1646 */
9810  { (yyval) = NULL; }
9811 #line 9733 "parser.c" /* yacc.c:1646 */
9812  break;
9813 
9814  case 469:
9815 #line 4685 "parser.y" /* yacc.c:1646 */
9816  { (yyval) = (yyvsp[0]); }
9817 #line 9739 "parser.c" /* yacc.c:1646 */
9818  break;
9819 
9820  case 470:
9821 #line 4689 "parser.y" /* yacc.c:1646 */
9822  { (yyval) = NULL; }
9823 #line 9745 "parser.c" /* yacc.c:1646 */
9824  break;
9825 
9826  case 471:
9827 #line 4690 "parser.y" /* yacc.c:1646 */
9828  { (yyval) = (yyvsp[0]); }
9829 #line 9751 "parser.c" /* yacc.c:1646 */
9830  break;
9831 
9832  case 473:
9833 #line 4695 "parser.y" /* yacc.c:1646 */
9834  {
9835  current_field->depending = (yyvsp[0]);
9836  }
9837 #line 9759 "parser.c" /* yacc.c:1646 */
9838  break;
9839 
9840  case 475:
9841 #line 4702 "parser.y" /* yacc.c:1646 */
9842  {
9843  (yyval) = cb_build_index ((yyvsp[0]), cb_zero, 0, current_field);
9844  CB_FIELD_PTR ((yyval))->special_index = 1;
9845  }
9846 #line 9768 "parser.c" /* yacc.c:1646 */
9847  break;
9848 
9849  case 477:
9850 #line 4710 "parser.y" /* yacc.c:1646 */
9851  {
9852  /* current_field->initialized = 1; */
9853  }
9854 #line 9776 "parser.c" /* yacc.c:1646 */
9855  break;
9856 
9857  case 478:
9858 #line 4717 "parser.y" /* yacc.c:1646 */
9859  {
9860  if ((yyvsp[0])) {
9861  cb_tree l;
9862  struct cb_key *keys;
9863  int i;
9864  int nkeys;
9865 
9866  l = (yyvsp[0]);
9867  nkeys = cb_list_length ((yyvsp[0]));
9868  keys = cobc_parse_malloc (sizeof (struct cb_key) * nkeys);
9869 
9870  for (i = 0; i < nkeys; i++) {
9871  keys[i].dir = CB_PURPOSE_INT (l);
9872  keys[i].key = CB_VALUE (l);
9873  l = CB_CHAIN (l);
9874  }
9875  current_field->keys = keys;
9876  current_field->nkeys = nkeys;
9877  }
9878  }
9879 #line 9801 "parser.c" /* yacc.c:1646 */
9880  break;
9881 
9882  case 479:
9883 #line 4740 "parser.y" /* yacc.c:1646 */
9884  { (yyval) = NULL; }
9885 #line 9807 "parser.c" /* yacc.c:1646 */
9886  break;
9887 
9888  case 480:
9889 #line 4743 "parser.y" /* yacc.c:1646 */
9890  {
9891  cb_tree l;
9892 
9893  for (l = (yyvsp[0]); l; l = CB_CHAIN (l)) {
9894  CB_PURPOSE (l) = (yyvsp[-3]);
9895  if (qualifier && !CB_REFERENCE(CB_VALUE(l))->chain &&
9896  strcasecmp (CB_NAME(CB_VALUE(l)), CB_NAME(qualifier))) {
9897  CB_REFERENCE(CB_VALUE(l))->chain = qualifier;
9898  }
9899  }
9900  (yyval) = cb_list_append ((yyvsp[-4]), (yyvsp[0]));
9901  }
9902 #line 9824 "parser.c" /* yacc.c:1646 */
9903  break;
9904 
9905  case 481:
9906 #line 4758 "parser.y" /* yacc.c:1646 */
9907  { (yyval) = cb_int (COB_ASCENDING); }
9908 #line 9830 "parser.c" /* yacc.c:1646 */
9909  break;
9910 
9911  case 482:
9912 #line 4759 "parser.y" /* yacc.c:1646 */
9913  { (yyval) = cb_int (COB_DESCENDING); }
9914 #line 9836 "parser.c" /* yacc.c:1646 */
9915  break;
9916 
9917  case 484:
9918 #line 4764 "parser.y" /* yacc.c:1646 */
9919  {
9920  current_field->index_list = (yyvsp[0]);
9921  }
9922 #line 9844 "parser.c" /* yacc.c:1646 */
9923  break;
9924 
9925  case 485:
9926 #line 4770 "parser.y" /* yacc.c:1646 */
9927  { (yyval) = CB_LIST_INIT ((yyvsp[0])); }
9928 #line 9850 "parser.c" /* yacc.c:1646 */
9929  break;
9930 
9931  case 486:
9932 #line 4772 "parser.y" /* yacc.c:1646 */
9933  { (yyval) = cb_list_add ((yyvsp[-1]), (yyvsp[0])); }
9934 #line 9856 "parser.c" /* yacc.c:1646 */
9935  break;
9936 
9937  case 487:
9938 #line 4777 "parser.y" /* yacc.c:1646 */
9939  {
9940  (yyval) = cb_build_index ((yyvsp[0]), cb_int1, 1U, current_field);
9941  CB_FIELD_PTR ((yyval))->special_index = 1;
9942  }
9943 #line 9865 "parser.c" /* yacc.c:1646 */
9944  break;
9945 
9946  case 488:
9947 #line 4788 "parser.y" /* yacc.c:1646 */
9948  {
9951  }
9952 #line 9874 "parser.c" /* yacc.c:1646 */
9953  break;
9954 
9955  case 489:
9956 #line 4799 "parser.y" /* yacc.c:1646 */
9957  {
9958  check_repeated ("SYNCHRONIZED", SYN_CLAUSE_9, &check_pic_duplicate);
9960  }
9961 #line 9883 "parser.c" /* yacc.c:1646 */
9962  break;
9963 
9964  case 490:
9965 #line 4810 "parser.y" /* yacc.c:1646 */
9966  {
9969  }
9970 #line 9892 "parser.c" /* yacc.c:1646 */
9971  break;
9972 
9973  case 491:
9974 #line 4821 "parser.y" /* yacc.c:1646 */
9975  {
9980  cb_error (_("%s not allowed here"), "BASED");
9981  } else if (current_field->level != 1 && current_field->level != 77) {
9982  cb_error (_("%s only allowed at 01/77 level"), "BASED");
9983  } else if (!qualifier) {
9984  cb_error (_("%s requires a data name"), "BASED");
9985  } else if (current_field->flag_external) {
9986  cb_error (_("%s and %s are mutually exclusive"), "BASED", "EXTERNAL");
9987  } else if (current_field->redefines) {
9988  cb_error (_("%s and %s are mutually exclusive"), "BASED", "REDEFINES");
9989  } else if (current_field->flag_any_length) {
9990  cb_error (_("%s and %s are mutually exclusive"), "BASED", "ANY LENGTH");
9991  } else if (current_field->flag_occurs) {
9992  cb_error (_("%s and %s are mutually exclusive"), "BASED", "OCCURS");
9993  } else {
9995  }
9996  }
9997 #line 9919 "parser.c" /* yacc.c:1646 */
9998  break;
9999 
10000  case 492:
10001 #line 4849 "parser.y" /* yacc.c:1646 */
10002  {
10004  current_field->values = (yyvsp[0]);
10005  }
10006 #line 9928 "parser.c" /* yacc.c:1646 */
10007  break;
10008 
10009  case 494:
10010 #line 4857 "parser.y" /* yacc.c:1646 */
10011  { (yyval) = CB_LIST_INIT ((yyvsp[0])); }
10012 #line 9934 "parser.c" /* yacc.c:1646 */
10013  break;
10014 
10015  case 495:
10016 #line 4858 "parser.y" /* yacc.c:1646 */
10017  { (yyval) = cb_list_add ((yyvsp[-1]), (yyvsp[0])); }
10018 #line 9940 "parser.c" /* yacc.c:1646 */
10019  break;
10020 
10021  case 496:
10022 #line 4862 "parser.y" /* yacc.c:1646 */
10023  { (yyval) = (yyvsp[0]); }
10024 #line 9946 "parser.c" /* yacc.c:1646 */
10025  break;
10026 
10027  case 497:
10028 #line 4863 "parser.y" /* yacc.c:1646 */
10029  { (yyval) = CB_BUILD_PAIR ((yyvsp[-2]), (yyvsp[0])); }
10030 #line 9952 "parser.c" /* yacc.c:1646 */
10031  break;
10032 
10033  case 499:
10034 #line 4868 "parser.y" /* yacc.c:1646 */
10035  {
10036  if (current_field->level != 88) {
10037  cb_error (_("FALSE clause only allowed for 88 level"));
10038  }
10039  current_field->false_88 = CB_LIST_INIT ((yyvsp[0]));
10040  }
10041 #line 9963 "parser.c" /* yacc.c:1646 */
10042  break;
10043 
10044  case 500:
10045 #line 4881 "parser.y" /* yacc.c:1646 */
10046  {
10048  if (cb_ref ((yyvsp[0])) != cb_error_node) {
10049  if (CB_FIELD (cb_ref ((yyvsp[0])))->level == 01 ||
10050  CB_FIELD (cb_ref ((yyvsp[0])))->level > 50) {
10051  cb_error (_("RENAMES may not reference a level 01 or > 50"));
10052  } else {
10053  current_field->redefines = CB_FIELD (cb_ref ((yyvsp[0])));
10055  }
10056  }
10057  }
10058 #line 9980 "parser.c" /* yacc.c:1646 */
10059  break;
10060 
10061  case 501:
10062 #line 4894 "parser.y" /* yacc.c:1646 */
10063  {
10065  if (cb_ref ((yyvsp[-2])) != cb_error_node && cb_ref ((yyvsp[0])) != cb_error_node) {
10066  if (CB_FIELD (cb_ref ((yyvsp[-2])))->level == 01 ||
10067  CB_FIELD (cb_ref ((yyvsp[-2])))->level > 50) {
10068  cb_error (_("RENAMES may not reference a level 01 or > 50"));
10069  } else if (CB_FIELD (cb_ref ((yyvsp[0])))->level == 01 ||
10070  CB_FIELD (cb_ref ((yyvsp[0])))->level > 50) {
10071  cb_error (_("RENAMES may not reference a level 01 or > 50"));
10072  } else {
10073  current_field->redefines = CB_FIELD (cb_ref ((yyvsp[-2])));
10074  current_field->rename_thru = CB_FIELD (cb_ref ((yyvsp[0])));
10075  }
10076  }
10077  }
10078 #line 10000 "parser.c" /* yacc.c:1646 */
10079  break;
10080 
10081  case 502:
10082 #line 4915 "parser.y" /* yacc.c:1646 */
10083  {
10086  cb_error (_("%s and %s are mutually exclusive"), "BASED", "ANY clause");
10087  } else {
10089  }
10090  }
10091 #line 10013 "parser.c" /* yacc.c:1646 */
10092  break;
10093 
10094  case 503:
10095 #line 4924 "parser.y" /* yacc.c:1646 */
10096  {
10099  cb_error (_("%s and %s are mutually exclusive"), "BASED", "ANY clause");
10100  } else {
10103  }
10104  }
10105 #line 10027 "parser.c" /* yacc.c:1646 */
10106  break;
10107 
10108  case 505:
10109 #line 4939 "parser.y" /* yacc.c:1646 */
10110  {
10115  cb_error (_("%s not allowed in nested programs"), "LOCAL-STORAGE");
10116  }
10117  }
10118 #line 10040 "parser.c" /* yacc.c:1646 */
10119  break;
10120 
10121  case 506:
10122 #line 4948 "parser.y" /* yacc.c:1646 */
10123  {
10124  if ((yyvsp[0])) {
10125  current_program->local_storage = CB_FIELD ((yyvsp[0]));
10126  }
10127  }
10128 #line 10050 "parser.c" /* yacc.c:1646 */
10129  break;
10130 
10131  case 508:
10132 #line 4960 "parser.y" /* yacc.c:1646 */
10133  {
10137  }
10138 #line 10060 "parser.c" /* yacc.c:1646 */
10139  break;
10140 
10141  case 509:
10142 #line 4966 "parser.y" /* yacc.c:1646 */
10143  {
10144  if ((yyvsp[0])) {
10145  current_program->linkage_storage = CB_FIELD ((yyvsp[0]));
10146  }
10147  }
10148 #line 10070 "parser.c" /* yacc.c:1646 */
10149  break;
10150 
10151  case 511:
10152 #line 4977 "parser.y" /* yacc.c:1646 */
10153  {
10154  PENDING("REPORT SECTION");
10157  }
10158 #line 10080 "parser.c" /* yacc.c:1646 */
10159  break;
10160 
10161  case 515:
10162 #line 4993 "parser.y" /* yacc.c:1646 */
10163  {
10164  if (CB_INVALID_TREE ((yyvsp[0]))) {
10165  YYERROR;
10166  } else {
10167  current_report = CB_REPORT (cb_ref ((yyvsp[0])));
10168  }
10169  check_duplicate = 0;
10170  }
10171 #line 10093 "parser.c" /* yacc.c:1646 */
10172  break;
10173 
10174  case 519:
10175 #line 5008 "parser.y" /* yacc.c:1646 */
10176  {
10177  yyerrok;
10178  }
10179 #line 10101 "parser.c" /* yacc.c:1646 */
10180  break;
10181 
10182  case 520:
10183 #line 5015 "parser.y" /* yacc.c:1646 */
10184  {
10186  cb_error (_("GLOBAL is not allowed with RD"));
10187  }
10188 #line 10110 "parser.c" /* yacc.c:1646 */
10189  break;
10190 
10191  case 521:
10192 #line 5020 "parser.y" /* yacc.c:1646 */
10193  {
10194  check_repeated ("CODE", SYN_CLAUSE_2, &check_duplicate);
10195  }
10196 #line 10118 "parser.c" /* yacc.c:1646 */
10197  break;
10198 
10199  case 524:
10200 #line 5031 "parser.y" /* yacc.c:1646 */
10201  {
10203  }
10204 #line 10126 "parser.c" /* yacc.c:1646 */
10205  break;
10206 
10207  case 528:
10208 #line 5050 "parser.y" /* yacc.c:1646 */
10209  {
10211  if (!current_report->heading) {
10212  current_report->heading = 1;
10213  }
10214  if (!current_report->first_detail) {
10216  }
10217  if (!current_report->last_control) {
10218  if (current_report->last_detail) {
10220  } else if (current_report->footing) {
10222  } else {
10224  }
10225  }
10229  } else if (!current_report->last_detail) {
10231  } else if (!current_report->footing) {
10233  }
10238  cb_error (_("Invalid PAGE clause"));
10239  }
10240  }
10241 #line 10163 "parser.c" /* yacc.c:1646 */
10242  break;
10243 
10244  case 529:
10245 #line 5086 "parser.y" /* yacc.c:1646 */
10246  {
10247  current_report->lines = cb_get_int ((yyvsp[0]));
10248  }
10249 #line 10171 "parser.c" /* yacc.c:1646 */
10250  break;
10251 
10252  case 530:
10253 #line 5090 "parser.y" /* yacc.c:1646 */
10254  {
10255  current_report->lines = cb_get_int ((yyvsp[-3]));
10256  current_report->columns = cb_get_int ((yyvsp[-1]));
10257  }
10258 #line 10180 "parser.c" /* yacc.c:1646 */
10259  break;
10260 
10261  case 531:
10262 #line 5095 "parser.y" /* yacc.c:1646 */
10263  {
10264  current_report->lines = cb_get_int ((yyvsp[-1]));
10265  }
10266 #line 10188 "parser.c" /* yacc.c:1646 */
10267  break;
10268 
10269  case 539:
10270 #line 5115 "parser.y" /* yacc.c:1646 */
10271  {
10272  current_report->heading = cb_get_int ((yyvsp[0]));
10273  }
10274 #line 10196 "parser.c" /* yacc.c:1646 */
10275  break;
10276 
10277  case 540:
10278 #line 5122 "parser.y" /* yacc.c:1646 */
10279  {
10280  current_report->first_detail = cb_get_int ((yyvsp[0]));
10281  }
10282 #line 10204 "parser.c" /* yacc.c:1646 */
10283  break;
10284 
10285  case 541:
10286 #line 5129 "parser.y" /* yacc.c:1646 */
10287  {
10288  current_report->last_control = cb_get_int ((yyvsp[0]));
10289  }
10290 #line 10212 "parser.c" /* yacc.c:1646 */
10291  break;
10292 
10293  case 542:
10294 #line 5136 "parser.y" /* yacc.c:1646 */
10295  {
10296  current_report->last_detail = cb_get_int ((yyvsp[0]));
10297  }
10298 #line 10220 "parser.c" /* yacc.c:1646 */
10299  break;
10300 
10301  case 543:
10302 #line 5143 "parser.y" /* yacc.c:1646 */
10303  {
10304  current_report->footing = cb_get_int ((yyvsp[0]));
10305  }
10306 #line 10228 "parser.c" /* yacc.c:1646 */
10307  break;
10308 
10309  case 546:
10310 #line 5154 "parser.y" /* yacc.c:1646 */
10311  {
10312  check_pic_duplicate = 0;
10313  }
10314 #line 10236 "parser.c" /* yacc.c:1646 */
10315  break;
10316 
10317  case 566:
10318 #line 5185 "parser.y" /* yacc.c:1646 */
10319  {
10321  }
10322 #line 10244 "parser.c" /* yacc.c:1646 */
10323  break;
10324 
10325  case 579:
10326 #line 5211 "parser.y" /* yacc.c:1646 */
10327  {
10329  }
10330 #line 10252 "parser.c" /* yacc.c:1646 */
10331  break;
10332 
10333  case 580:
10334 #line 5218 "parser.y" /* yacc.c:1646 */
10335  {
10337  }
10338 #line 10260 "parser.c" /* yacc.c:1646 */
10339  break;
10340 
10341  case 585:
10342 #line 5234 "parser.y" /* yacc.c:1646 */
10343  {
10345  }
10346 #line 10268 "parser.c" /* yacc.c:1646 */
10347  break;
10348 
10349  case 587:
10350 #line 5245 "parser.y" /* yacc.c:1646 */
10351  {
10353  }
10354 #line 10276 "parser.c" /* yacc.c:1646 */
10355  break;
10356 
10357  case 590:
10358 #line 5257 "parser.y" /* yacc.c:1646 */
10359  {
10361  }
10362 #line 10284 "parser.c" /* yacc.c:1646 */
10363  break;
10364 
10365  case 602:
10366 #line 5290 "parser.y" /* yacc.c:1646 */
10367  {
10369  }
10370 #line 10292 "parser.c" /* yacc.c:1646 */
10371  break;
10372 
10373  case 603:
10374 #line 5297 "parser.y" /* yacc.c:1646 */
10375  {
10377  }
10378 #line 10300 "parser.c" /* yacc.c:1646 */
10379  break;
10380 
10381  case 604:
10382 #line 5304 "parser.y" /* yacc.c:1646 */
10383  {
10385  }
10386 #line 10308 "parser.c" /* yacc.c:1646 */
10387  break;
10388 
10389  case 606:
10390 #line 5313 "parser.y" /* yacc.c:1646 */
10391  {
10393  current_field = NULL;
10396  }
10397 #line 10319 "parser.c" /* yacc.c:1646 */
10398  break;
10399 
10400  case 607:
10401 #line 5320 "parser.y" /* yacc.c:1646 */
10402  {
10403  struct cb_field *p;
10404 
10405  if (description_field) {
10406  for (p = description_field; p; p = p->sister) {
10407  cb_validate_field (p);
10408  }
10411  }
10412  }
10413 #line 10335 "parser.c" /* yacc.c:1646 */
10414  break;
10415 
10416  case 613:
10417 #line 5345 "parser.y" /* yacc.c:1646 */
10418  {
10419  cb_tree x;
10420 
10421  x = cb_build_field_tree ((yyvsp[-1]), (yyvsp[0]), current_field, current_storage,
10422  current_file, 0);
10423  /* Free tree assocated with level number */
10424  cobc_parse_free ((yyvsp[-1]));
10425  check_pic_duplicate = 0;
10426  if (CB_INVALID_TREE (x)) {
10427  YYERROR;
10428  }
10429 
10430  current_field = CB_FIELD (x);
10431  if (current_field->parent) {
10435  }
10436  }
10437 #line 10359 "parser.c" /* yacc.c:1646 */
10438  break;
10439 
10440  case 614:
10441 #line 5365 "parser.y" /* yacc.c:1646 */
10442  {
10443  int flags;
10444 
10445  if (current_field->parent) {
10446  flags = current_field->parent->screen_flag;
10447  flags &= ~COB_SCREEN_BLANK_LINE;
10448  flags &= ~COB_SCREEN_BLANK_SCREEN;
10449  flags &= ~COB_SCREEN_ERASE_EOL;
10450  flags &= ~COB_SCREEN_ERASE_EOS;
10451  flags &= ~COB_SCREEN_LINE_PLUS;
10452  flags &= ~COB_SCREEN_LINE_MINUS;
10453  flags &= ~COB_SCREEN_COLUMN_PLUS;
10454  flags &= ~COB_SCREEN_COLUMN_MINUS;
10455 
10457  flags);
10458 
10459  current_field->screen_flag |= flags;
10460  }
10461 
10462  if (!qualifier && (current_field->level == 88 ||
10463  current_field->level == 66 ||
10465  cb_error (_("Item requires a data name"));
10466  }
10469  cb_error (_("INITIAL specified on non-input field"));
10470  }
10471  }
10472  if (!qualifier) {
10474  }
10475  if (current_field->level == 88) {
10477  }
10478  if (current_field->flag_item_78) {
10479  /* Reset to last non-78 item - may set current_field to NULL */
10481  }
10482  if (likely (current_field)) {
10483  if (!description_field) {
10485  }
10488  cb_error (_("Relative LINE/COLUMN clause required with OCCURS"));
10489  }
10490  }
10491  }
10492 #line 10414 "parser.c" /* yacc.c:1646 */
10493  break;
10494 
10495  case 615:
10496 #line 5416 "parser.y" /* yacc.c:1646 */
10497  {
10498  /* Free tree associated with level number */
10499  cobc_parse_free ((yyvsp[-2]));
10500  yyerrok;
10501  cb_unput_dot ();
10502  check_pic_duplicate = 0;
10503  check_duplicate = 0;
10504 #if 1 /* RXWRXW Screen field */
10505  if (current_field) {
10508  }
10509 #endif
10511  }
10512 #line 10434 "parser.c" /* yacc.c:1646 */
10513  break;
10514 
10515  case 618:
10516 #line 5439 "parser.y" /* yacc.c:1646 */
10517  {
10519  "BLANK SCREEN", COB_SCREEN_BLANK_SCREEN);
10520  }
10521 #line 10443 "parser.c" /* yacc.c:1646 */
10522  break;
10523 
10524  case 619:
10525 #line 5444 "parser.y" /* yacc.c:1646 */
10526  {
10528  "BLANK LINE", COB_SCREEN_BLANK_LINE);
10529  }
10530 #line 10452 "parser.c" /* yacc.c:1646 */
10531  break;
10532 
10533  case 620:
10534 #line 5449 "parser.y" /* yacc.c:1646 */
10535  {
10537  }
10538 #line 10460 "parser.c" /* yacc.c:1646 */
10539  break;
10540 
10541  case 621:
10542 #line 5453 "parser.y" /* yacc.c:1646 */
10543  {
10545  }
10546 #line 10468 "parser.c" /* yacc.c:1646 */
10547  break;
10548 
10549  case 622:
10550 #line 5457 "parser.y" /* yacc.c:1646 */
10551  {
10553  "ERASE EOS", COB_SCREEN_ERASE_EOS);
10554  }
10555 #line 10477 "parser.c" /* yacc.c:1646 */
10556  break;
10557 
10558  case 623:
10559 #line 5462 "parser.y" /* yacc.c:1646 */
10560  {
10562  "ERASE EOL", COB_SCREEN_ERASE_EOL);
10563  }
10564 #line 10486 "parser.c" /* yacc.c:1646 */
10565  break;
10566 
10567  case 624:
10568 #line 5467 "parser.y" /* yacc.c:1646 */
10569  {
10571  "LOWLIGHT", COB_SCREEN_LOWLIGHT);
10572  }
10573 #line 10495 "parser.c" /* yacc.c:1646 */
10574  break;
10575 
10576  case 625:
10577 #line 5472 "parser.y" /* yacc.c:1646 */
10578  {
10580  "HIGHLIGHT", COB_SCREEN_HIGHLIGHT);
10581  }
10582 #line 10504 "parser.c" /* yacc.c:1646 */
10583  break;
10584 
10585  case 626:
10586 #line 5477 "parser.y" /* yacc.c:1646 */
10587  {
10588  check_screen_attr ("REVERSE-VIDEO", COB_SCREEN_REVERSE);
10589  }
10590 #line 10512 "parser.c" /* yacc.c:1646 */
10591  break;
10592 
10593  case 627:
10594 #line 5481 "parser.y" /* yacc.c:1646 */
10595  {
10596  check_screen_attr ("UNDERLINE", COB_SCREEN_UNDERLINE);
10597  }
10598 #line 10520 "parser.c" /* yacc.c:1646 */
10599  break;
10600 
10601  case 628:
10602 #line 5485 "parser.y" /* yacc.c:1646 */
10603  {
10604  check_screen_attr ("OVERLINE", COB_SCREEN_OVERLINE);
10605  PENDING ("OVERLINE");
10606  }
10607 #line 10529 "parser.c" /* yacc.c:1646 */
10608  break;
10609 
10610  case 629:
10611 #line 5490 "parser.y" /* yacc.c:1646 */
10612  {
10614  PENDING ("GRID");
10615  }
10616 #line 10538 "parser.c" /* yacc.c:1646 */
10617  break;
10618 
10619  case 630:
10620 #line 5495 "parser.y" /* yacc.c:1646 */
10621  {
10622  check_screen_attr ("LEFTLINE", COB_SCREEN_LEFTLINE);
10623  PENDING ("LEFTLINE");
10624  }
10625 #line 10547 "parser.c" /* yacc.c:1646 */
10626  break;
10627 
10628  case 631:
10629 #line 5500 "parser.y" /* yacc.c:1646 */
10630  {
10632  }
10633 #line 10555 "parser.c" /* yacc.c:1646 */
10634  break;
10635 
10636  case 632:
10637 #line 5504 "parser.y" /* yacc.c:1646 */
10638  {
10640  }
10641 #line 10563 "parser.c" /* yacc.c:1646 */
10642  break;
10643 
10644  case 633:
10645 #line 5508 "parser.y" /* yacc.c:1646 */
10646  {
10647  check_screen_attr ("REQUIRED", COB_SCREEN_REQUIRED);
10648  }
10649 #line 10571 "parser.c" /* yacc.c:1646 */
10650  break;
10651 
10652  case 634:
10653 #line 5512 "parser.y" /* yacc.c:1646 */
10654  {
10656  }
10657 #line 10579 "parser.c" /* yacc.c:1646 */
10658  break;
10659 
10660  case 635:
10661 #line 5516 "parser.y" /* yacc.c:1646 */
10662  {
10664  current_field->screen_prompt = (yyvsp[0]);
10665  }
10666 #line 10588 "parser.c" /* yacc.c:1646 */
10667  break;
10668 
10669  case 636:
10670 #line 5521 "parser.y" /* yacc.c:1646 */
10671  {
10673  }
10674 #line 10596 "parser.c" /* yacc.c:1646 */
10675  break;
10676 
10677  case 637:
10678 #line 5525 "parser.y" /* yacc.c:1646 */
10679  {
10681  }
10682 #line 10604 "parser.c" /* yacc.c:1646 */
10683  break;
10684 
10685  case 638:
10686 #line 5529 "parser.y" /* yacc.c:1646 */
10687  {
10689  current_field->screen_line = (yyvsp[0]);
10690  }
10691 #line 10613 "parser.c" /* yacc.c:1646 */
10692  break;
10693 
10694  case 639:
10695 #line 5534 "parser.y" /* yacc.c:1646 */
10696  {
10698  current_field->screen_column = (yyvsp[0]);
10699  }
10700 #line 10622 "parser.c" /* yacc.c:1646 */
10701  break;
10702 
10703  case 640:
10704 #line 5539 "parser.y" /* yacc.c:1646 */
10705  {
10706  check_repeated ("FOREGROUND-COLOR", SYN_CLAUSE_18, &check_pic_duplicate);
10707  current_field->screen_foreg = (yyvsp[0]);
10708  }
10709 #line 10631 "parser.c" /* yacc.c:1646 */
10710  break;
10711 
10712  case 641:
10713 #line 5544 "parser.y" /* yacc.c:1646 */
10714  {
10715  check_repeated ("BACKGROUND-COLOR", SYN_CLAUSE_19, &check_pic_duplicate);
10716  current_field->screen_backg = (yyvsp[0]);
10717  }
10718 #line 10640 "parser.c" /* yacc.c:1646 */
10719  break;
10720 
10721  case 650:
10722 #line 5557 "parser.y" /* yacc.c:1646 */
10723  {
10724  check_not_88_level ((yyvsp[0]));
10725 
10727  current_field->screen_from = (yyvsp[0]);
10728  current_field->screen_to = (yyvsp[0]);
10730  }
10731 #line 10653 "parser.c" /* yacc.c:1646 */
10732  break;
10733 
10734  case 651:
10735 #line 5566 "parser.y" /* yacc.c:1646 */
10736  {
10738  current_field->screen_from = (yyvsp[0]);
10739  }
10740 #line 10662 "parser.c" /* yacc.c:1646 */
10741  break;
10742 
10743  case 652:
10744 #line 5571 "parser.y" /* yacc.c:1646 */
10745  {
10746  check_not_88_level ((yyvsp[0]));
10747 
10749  current_field->screen_to = (yyvsp[0]);
10751  }
10752 #line 10674 "parser.c" /* yacc.c:1646 */
10753  break;
10754 
10755  case 661:
10756 #line 5602 "parser.y" /* yacc.c:1646 */
10757  {
10758  /* Nothing */
10759  }
10760 #line 10682 "parser.c" /* yacc.c:1646 */
10761  break;
10762 
10763  case 662:
10764 #line 5606 "parser.y" /* yacc.c:1646 */
10765  {
10767  }
10768 #line 10690 "parser.c" /* yacc.c:1646 */
10769  break;
10770 
10771  case 663:
10772 #line 5610 "parser.y" /* yacc.c:1646 */
10773  {
10775  }
10776 #line 10698 "parser.c" /* yacc.c:1646 */
10777  break;
10778 
10779  case 664:
10780 #line 5617 "parser.y" /* yacc.c:1646 */
10781  {
10782  /* Nothing */
10783  }
10784 #line 10706 "parser.c" /* yacc.c:1646 */
10785  break;
10786 
10787  case 665:
10788 #line 5621 "parser.y" /* yacc.c:1646 */
10789  {
10791  }
10792 #line 10714 "parser.c" /* yacc.c:1646 */
10793  break;
10794 
10795  case 666:
10796 #line 5625 "parser.y" /* yacc.c:1646 */
10797  {
10799  }
10800 #line 10722 "parser.c" /* yacc.c:1646 */
10801  break;
10802 
10803  case 667:
10804 #line 5633 "parser.y" /* yacc.c:1646 */
10805  {
10807  current_field->occurs_max = cb_get_int ((yyvsp[-1]));
10811  }
10812 #line 10734 "parser.c" /* yacc.c:1646 */
10813  break;
10814 
10815  case 668:
10816 #line 5644 "parser.y" /* yacc.c:1646 */
10817  {
10818  cb_error (_("GLOBAL is not allowed with screen items"));
10819  }
10820 #line 10742 "parser.c" /* yacc.c:1646 */
10821  break;
10822 
10823  case 670:
10824 #line 5653 "parser.y" /* yacc.c:1646 */
10825  {
10828  check_pic_duplicate = 0;
10829  check_duplicate = 0;
10830  cobc_in_procedure = 1U;
10833  }
10834 #line 10756 "parser.c" /* yacc.c:1646 */
10835  break;
10836 
10837  case 671:
10838 #line 5663 "parser.y" /* yacc.c:1646 */
10839  {
10840  if (current_program->flag_main && !current_program->flag_chained && (yyvsp[-4])) {
10841  cb_error (_("Executable program requested but PROCEDURE/ENTRY has USING clause"));
10842  }
10843  /* Main entry point */
10844  emit_entry (current_program->program_id, 0, (yyvsp[-4]));
10847  emit_entry (current_program->source_name, 1, (yyvsp[-4]));
10848  }
10849  }
10850 #line 10772 "parser.c" /* yacc.c:1646 */
10851  break;
10852 
10853  case 672:
10854 #line 5675 "parser.y" /* yacc.c:1646 */
10855  {
10856  if (current_paragraph) {
10859  }
10861  }
10862  if (current_section) {
10863  if (current_section->exit_label) {
10865  }
10867  }
10868  }
10869 #line 10791 "parser.c" /* yacc.c:1646 */
10870  break;
10871 
10872  case 673:
10873 #line 5690 "parser.y" /* yacc.c:1646 */
10874  {
10875  cb_tree label;
10876 
10877  /* No PROCEDURE DIVISION header ! */
10878  /* Only a statement is allowed as first element */
10879  /* Thereafter, sections/paragraphs may be used */
10880  check_pic_duplicate = 0;
10881  check_duplicate = 0;
10882  cobc_in_procedure = 1U;
10883  label = cb_build_reference ("MAIN SECTION");
10889  CB_TREE (current_section)->source_file = cb_source_file;
10890  CB_TREE (current_section)->source_line = cb_source_line;
10892  label = cb_build_reference ("MAIN PARAGRAPH");
10897  CB_TREE (current_paragraph)->source_file = cb_source_file;
10898  CB_TREE (current_paragraph)->source_line = cb_source_line;
10901  }
10902 #line 10824 "parser.c" /* yacc.c:1646 */
10903  break;
10904 
10905  case 675:
10906 #line 5723 "parser.y" /* yacc.c:1646 */
10907  {
10908  (yyval) = NULL;
10909  }
10910 #line 10832 "parser.c" /* yacc.c:1646 */
10911  break;
10912 
10913  case 676:
10914 #line 5727 "parser.y" /* yacc.c:1646 */
10915  {
10917  size_mode = CB_SIZE_4;
10918  }
10919 #line 10841 "parser.c" /* yacc.c:1646 */
10920  break;
10921 
10922  case 677:
10923 #line 5732 "parser.y" /* yacc.c:1646 */
10924  {
10925  if (cb_list_length ((yyvsp[0])) > COB_MAX_FIELD_PARAMS) {
10926  cb_error (_("Number of parameters exceeds maximum %d"),
10928  }
10929  (yyval) = (yyvsp[0]);
10930  }
10931 #line 10853 "parser.c" /* yacc.c:1646 */
10932  break;
10933 
10934  case 678:
10935 #line 5740 "parser.y" /* yacc.c:1646 */
10936  {
10939  cb_error (_("CHAINING invalid in user FUNCTION"));
10940  } else {
10942  }
10943  }
10944 #line 10866 "parser.c" /* yacc.c:1646 */
10945  break;
10946 
10947  case 679:
10948 #line 5749 "parser.y" /* yacc.c:1646 */
10949  {
10950  if (cb_list_length ((yyvsp[0])) > COB_MAX_FIELD_PARAMS) {
10951  cb_error (_("Number of parameters exceeds maximum %d"),
10953  }
10954  (yyval) = (yyvsp[0]);
10955  }
10956 #line 10878 "parser.c" /* yacc.c:1646 */
10957  break;
10958 
10959  case 680:
10960 #line 5759 "parser.y" /* yacc.c:1646 */
10961  { (yyval) = (yyvsp[0]); }
10962 #line 10884 "parser.c" /* yacc.c:1646 */
10963  break;
10964 
10965  case 681:
10966 #line 5761 "parser.y" /* yacc.c:1646 */
10967  { (yyval) = cb_list_append ((yyvsp[-1]), (yyvsp[0])); }
10968 #line 10890 "parser.c" /* yacc.c:1646 */
10969  break;
10970 
10971  case 682:
10972 #line 5766 "parser.y" /* yacc.c:1646 */
10973  {
10974  cb_tree x;
10975  struct cb_field *f;
10976 
10977  x = cb_build_identifier ((yyvsp[0]), 0);
10978  if ((yyvsp[-1]) == cb_int1 && CB_VALID_TREE (x) && cb_ref (x) != cb_error_node) {
10979  f = CB_FIELD (cb_ref (x));
10980  f->flag_is_pdiv_opt = 1;
10981  }
10982 
10984  && CB_REFERENCE_P ((yyvsp[0]))
10985  && CB_FIELD (cb_ref ((yyvsp[0])))->flag_any_length) {
10986  cb_error_x ((yyvsp[0]), _("ANY LENGTH items may only be BY REFERENCE formal parameters"));
10987  }
10988 
10989  (yyval) = CB_BUILD_PAIR (cb_int (call_mode), x);
10990  CB_SIZES ((yyval)) = size_mode;
10991  }
10992 #line 10914 "parser.c" /* yacc.c:1646 */
10993  break;
10994 
10995  case 684:
10996 #line 5790 "parser.y" /* yacc.c:1646 */
10997  {
10999  }
11000 #line 10922 "parser.c" /* yacc.c:1646 */
11001  break;
11002 
11003  case 685:
11004 #line 5794 "parser.y" /* yacc.c:1646 */
11005  {
11007  cb_error (_("%s not allowed in CHAINED programs"), "BY VALUE");
11008  } else {
11009  PENDING (_("BY VALUE parameters"));
11011  }
11012  }
11013 #line 10935 "parser.c" /* yacc.c:1646 */
11014  break;
11015 
11016  case 687:
11017 #line 5807 "parser.y" /* yacc.c:1646 */
11018  {
11019  if (call_mode != CB_CALL_BY_VALUE) {
11020  cb_error (_("SIZE only allowed for BY VALUE items"));
11021  } else {
11023  }
11024  }
11025 #line 10947 "parser.c" /* yacc.c:1646 */
11026  break;
11027 
11028  case 688:
11029 #line 5815 "parser.y" /* yacc.c:1646 */
11030  {
11031  if (call_mode != CB_CALL_BY_VALUE) {
11032  cb_error (_("SIZE only allowed for BY VALUE items"));
11033  } else {
11034  size_mode = CB_SIZE_4;
11035  }
11036  }
11037 #line 10959 "parser.c" /* yacc.c:1646 */
11038  break;
11039 
11040  case 689:
11041 #line 5823 "parser.y" /* yacc.c:1646 */
11042  {
11043  if (call_mode != CB_CALL_BY_VALUE) {
11044  cb_error (_("SIZE only allowed for BY VALUE items"));
11045  } else {
11047  }
11048  }
11049 #line 10971 "parser.c" /* yacc.c:1646 */
11050  break;
11051 
11052  case 690:
11053 #line 5831 "parser.y" /* yacc.c:1646 */
11054  {
11055  unsigned char *s = CB_LITERAL ((yyvsp[0]))->data;
11056 
11057  if (call_mode != CB_CALL_BY_VALUE) {
11058  cb_error (_("SIZE only allowed for BY VALUE items"));
11059  } else if (CB_LITERAL ((yyvsp[0]))->size != 1) {
11060  cb_error_x ((yyvsp[0]), _("Invalid value for SIZE"));
11061  } else {
11063  switch (*s) {
11064  case '1':
11065  size_mode |= CB_SIZE_1;
11066  break;
11067  case '2':
11068  size_mode |= CB_SIZE_2;
11069  break;
11070  case '4':
11071  size_mode |= CB_SIZE_4;
11072  break;
11073  case '8':
11074  size_mode |= CB_SIZE_8;
11075  break;
11076  default:
11077  cb_error_x ((yyvsp[0]), _("Invalid value for SIZE"));
11078  break;
11079  }
11080  }
11081  }
11082 #line 11004 "parser.c" /* yacc.c:1646 */
11083  break;
11084 
11085  case 691:
11086 #line 5860 "parser.y" /* yacc.c:1646 */
11087  {
11088  unsigned char *s = CB_LITERAL ((yyvsp[0]))->data;
11089 
11090  if (call_mode != CB_CALL_BY_VALUE) {
11091  cb_error (_("SIZE only allowed for BY VALUE items"));
11092  } else if (CB_LITERAL ((yyvsp[0]))->size != 1) {
11093  cb_error_x ((yyvsp[0]), _("Invalid value for SIZE"));
11094  } else {
11095  size_mode = 0;
11096  switch (*s) {
11097  case '1':
11098  size_mode = CB_SIZE_1;
11099  break;
11100  case '2':
11101  size_mode = CB_SIZE_2;
11102  break;
11103  case '4':
11104  size_mode = CB_SIZE_4;
11105  break;
11106  case '8':
11107  size_mode = CB_SIZE_8;
11108  break;
11109  default:
11110  cb_error_x ((yyvsp[0]), _("Invalid value for SIZE"));
11111  break;
11112  }
11113  }
11114  }
11115 #line 11037 "parser.c" /* yacc.c:1646 */
11116  break;
11117 
11118  case 692:
11119 #line 5892 "parser.y" /* yacc.c:1646 */
11120  {
11121  (yyval) = cb_int0;
11122  }
11123 #line 11045 "parser.c" /* yacc.c:1646 */
11124  break;
11125 
11126  case 693:
11127 #line 5896 "parser.y" /* yacc.c:1646 */
11128  {
11130  cb_error (_("OPTIONAL only allowed for BY REFERENCE items"));
11131  (yyval) = cb_int0;
11132  } else {
11133  (yyval) = cb_int1;
11134  }
11135  }
11136 #line 11058 "parser.c" /* yacc.c:1646 */
11137  break;
11138 
11139  case 694:
11140 #line 5908 "parser.y" /* yacc.c:1646 */
11141  {
11143  cb_error (_("RETURNING clause is required for a FUNCTION"));
11144  }
11145  }
11146 #line 11068 "parser.c" /* yacc.c:1646 */
11147  break;
11148 
11149  case 695:
11150 #line 5914 "parser.y" /* yacc.c:1646 */
11151  {
11152  if (current_program->flag_main) {
11153  cb_error (_("RETURNING clause cannot be OMITTED for main program"));
11154  }
11156  cb_error (_("RETURNING clause cannot be OMITTED for a FUNCTION"));
11157  }
11159  }
11160 #line 11082 "parser.c" /* yacc.c:1646 */
11161  break;
11162 
11163  case 696:
11164 #line 5924 "parser.y" /* yacc.c:1646 */
11165  {
11166  struct cb_field *f;
11167 
11168  if (cb_ref ((yyvsp[0])) != cb_error_node) {
11169  f = CB_FIELD_PTR ((yyvsp[0]));
11170 /* RXWRXW
11171  if (f->storage != CB_STORAGE_LINKAGE) {
11172  cb_error (_("RETURNING item is not defined in LINKAGE SECTION"));
11173  } else if (f->level != 1 && f->level != 77) {
11174 */
11175  if (f->level != 1 && f->level != 77) {
11176  cb_error (_("RETURNING item must have level 01"));
11177  } else if(f->flag_occurs) {
11178  cb_error(_("RETURNING item should not have OCCURS"));
11179  } else if(f->storage == CB_STORAGE_LOCAL) {
11180  cb_error (_("RETURNING item should not be in LOCAL-STORAGE"));
11181  } else {
11183  if (f->flag_any_length) {
11184  cb_error (_("Function RETURNING item may not be ANY LENGTH"));
11185  }
11186 
11187  f->flag_is_returning = 1;
11188  }
11189  current_program->returning = (yyvsp[0]);
11190  }
11191  }
11192  }
11193 #line 11115 "parser.c" /* yacc.c:1646 */
11194  break;
11195 
11196  case 698:
11197 #line 5956 "parser.y" /* yacc.c:1646 */
11198  {
11199  in_declaratives = 1;
11200  emit_statement (cb_build_comment ("DECLARATIVES"));
11201  }
11202 #line 11124 "parser.c" /* yacc.c:1646 */
11203  break;
11204 
11205  case 699:
11206 #line 5962 "parser.y" /* yacc.c:1646 */
11207  {
11208  if (needs_field_debug) {
11209  start_debug = 1;
11210  }
11211  in_declaratives = 0;
11212  in_debugging = 0;
11213  if (current_paragraph) {
11216  }
11219  }
11220  if (current_section) {
11221  if (current_section->exit_label) {
11223  }
11227  }
11228  skip_statements = 0;
11229  emit_statement (cb_build_comment ("END DECLARATIVES"));
11230  check_unreached = 0;
11231  }
11232 #line 11154 "parser.c" /* yacc.c:1646 */
11233  break;
11234 
11235  case 704:
11236 #line 6000 "parser.y" /* yacc.c:1646 */
11237  {
11238  if (next_label_list) {
11239  cb_tree plabel;
11240  char name[32];
11241 
11242  snprintf (name, sizeof(name), "L$%d", next_label_id);
11243  plabel = cb_build_label (cb_build_reference (name), NULL);
11244  CB_LABEL (plabel)->flag_next_sentence = 1;
11245  emit_statement (plabel);
11249  next_label_id++;
11250  }
11251  /* check_unreached = 0; */
11252  }
11253 #line 11175 "parser.c" /* yacc.c:1646 */
11254  break;
11255 
11256  case 706:
11257 #line 6018 "parser.y" /* yacc.c:1646 */
11258  {
11259  /* check_unreached = 0; */
11260  }
11261 #line 11183 "parser.c" /* yacc.c:1646 */
11262  break;
11263 
11264  case 707:
11265 #line 6028 "parser.y" /* yacc.c:1646 */
11266  {
11267  non_const_word = 0;
11268  check_unreached = 0;
11269  if (cb_build_section_name ((yyvsp[-3]), 0) == cb_error_node) {
11270  YYERROR;
11271  }
11272 
11273  /* Exit the last paragraph/section */
11274  if (current_paragraph) {
11277  }
11279  }
11280  if (current_section) {
11281  if (current_section->exit_label) {
11283  }
11285  }
11289  "DEBUGGING - Fall through"));
11291  "FALL THROUGH", NULL));
11292  }
11293  }
11294 
11295  /* Begin a new section */
11296  current_section = CB_LABEL (cb_build_label ((yyvsp[-3]), NULL));
11297  if ((yyvsp[-1])) {
11298  current_section->segment = cb_get_int ((yyvsp[-1]));
11299  }
11301  /* Careful here, one negation */
11305  CB_TREE (current_section)->source_file = cb_source_file;
11306  CB_TREE (current_section)->source_line = cb_source_line;
11308  }
11309 #line 11231 "parser.c" /* yacc.c:1646 */
11310  break;
11311 
11312  case 708:
11313 #line 6072 "parser.y" /* yacc.c:1646 */
11314  {
11316  }
11317 #line 11239 "parser.c" /* yacc.c:1646 */
11318  break;
11319 
11320  case 711:
11321 #line 6083 "parser.y" /* yacc.c:1646 */
11322  {
11323  cb_tree label;
11324 
11325  non_const_word = 0;
11326  check_unreached = 0;
11327  if (cb_build_section_name ((yyvsp[-1]), 1) == cb_error_node) {
11328  YYERROR;
11329  }
11330 
11331  /* Exit the last paragraph */
11332  if (current_paragraph) {
11335  }
11339  "DEBUGGING - Fall through"));
11341  "FALL THROUGH", NULL));
11342  }
11343  }
11344 
11345  /* Begin a new paragraph */
11346  if (!current_section) {
11347  label = cb_build_reference ("MAIN SECTION");
11353  CB_TREE (current_section)->source_file = cb_source_file;
11354  CB_TREE (current_section)->source_line = cb_source_line;
11356  }
11362  CB_TREE (current_paragraph)->source_file = cb_source_file;
11363  CB_TREE (current_paragraph)->source_line = cb_source_line;
11365  }
11366 #line 11288 "parser.c" /* yacc.c:1646 */
11367  break;
11368 
11369  case 712:
11370 #line 6131 "parser.y" /* yacc.c:1646 */
11371  {
11372  non_const_word = 0;
11373  check_unreached = 0;
11374  if (cb_build_section_name ((yyvsp[0]), 0) != cb_error_node) {
11375  cb_error_x ((yyvsp[0]), _("Unknown statement '%s'"), CB_NAME ((yyvsp[0])));
11376  }
11377  YYERROR;
11378  }
11379 #line 11301 "parser.c" /* yacc.c:1646 */
11380  break;
11381 
11382  case 713:
11383 #line 6143 "parser.y" /* yacc.c:1646 */
11384  {
11385  (yyval) = NULL;
11386  }
11387 #line 11309 "parser.c" /* yacc.c:1646 */
11388  break;
11389 
11390  case 714:
11391 #line 6147 "parser.y" /* yacc.c:1646 */
11392  {
11393  if (in_declaratives) {
11394  cb_error (_("SECTION segment invalid within DECLARATIVE"));
11395  }
11396  if (cb_verify (cb_section_segments, "SECTION segment")) {
11398  (yyval) = (yyvsp[0]);
11399  } else {
11400  (yyval) = NULL;
11401  }
11402  }
11403 #line 11325 "parser.c" /* yacc.c:1646 */
11404  break;
11405 
11406  case 715:
11407 #line 6165 "parser.y" /* yacc.c:1646 */
11408  {
11409  (yyval) = current_program->exec_list;
11411  check_unreached = 0;
11412  }
11413 #line 11335 "parser.c" /* yacc.c:1646 */
11414  break;
11415 
11416  case 716:
11417 #line 6170 "parser.y" /* yacc.c:1646 */
11418  {
11419  (yyval) = CB_TREE (current_statement);
11421  }
11422 #line 11344 "parser.c" /* yacc.c:1646 */
11423  break;
11424 
11425  case 717:
11426 #line 6175 "parser.y" /* yacc.c:1646 */
11427  {
11429  current_program->exec_list = (yyvsp[-2]);
11430  current_statement = CB_STATEMENT ((yyvsp[-1]));
11431  }
11432 #line 11354 "parser.c" /* yacc.c:1646 */
11433  break;
11434 
11435  case 718:
11436 #line 6183 "parser.y" /* yacc.c:1646 */
11437  {
11438  cb_tree label;
11439 
11440  if (!current_section) {
11441  label = cb_build_reference ("MAIN SECTION");
11447  CB_TREE (current_section)->source_file = cb_source_file;
11448  CB_TREE (current_section)->source_line = cb_source_line;
11450  }
11451  if (!current_paragraph) {
11452  label = cb_build_reference ("MAIN PARAGRAPH");
11457  CB_TREE (current_paragraph)->source_file = cb_source_file;
11458  CB_TREE (current_paragraph)->source_line = cb_source_line;
11460  }
11462  }
11463 #line 11385 "parser.c" /* yacc.c:1646 */
11464  break;
11465 
11466  case 719:
11467 #line 6210 "parser.y" /* yacc.c:1646 */
11468  {
11469  cobc_cs_check = 0;
11470  }
11471 #line 11393 "parser.c" /* yacc.c:1646 */
11472  break;
11473 
11474  case 720:
11475 #line 6214 "parser.y" /* yacc.c:1646 */
11476  {
11477  cobc_cs_check = 0;
11478  }
11479 #line 11401 "parser.c" /* yacc.c:1646 */
11480  break;
11481 
11482  case 770:
11483 #line 6270 "parser.y" /* yacc.c:1646 */
11484  {
11485  if (cb_verify (cb_next_sentence_phrase, "NEXT SENTENCE")) {
11486  cb_tree label;
11487  char name[32];
11488 
11489  begin_statement ("NEXT SENTENCE", 0);
11490  sprintf (name, "L$%d", next_label_id);
11491  label = cb_build_reference (name);
11493  emit_statement (cb_build_goto (label, NULL));
11494  }
11495  check_unreached = 0;
11496  }
11497 #line 11419 "parser.c" /* yacc.c:1646 */
11498  break;
11499 
11500  case 771:
11501 #line 6284 "parser.y" /* yacc.c:1646 */
11502  {
11503  yyerrok;
11504  cobc_cs_check = 0;
11505  }
11506 #line 11428 "parser.c" /* yacc.c:1646 */
11507  break;
11508 
11509  case 772:
11510 #line 6295 "parser.y" /* yacc.c:1646 */
11511  {
11512  begin_statement ("ACCEPT", TERM_ACCEPT);
11513  if (cb_accept_update) {
11515  }
11516  if (cb_accept_auto) {
11518  }
11519  }
11520 #line 11442 "parser.c" /* yacc.c:1646 */
11521  break;
11522 
11523  case 774:
11524 #line 6310 "parser.y" /* yacc.c:1646 */
11525  {
11526  check_duplicate = 0;
11528  line_column = NULL;
11529  }
11530 #line 11452 "parser.c" /* yacc.c:1646 */
11531  break;
11532 
11533  case 775:
11534 #line 6316 "parser.y" /* yacc.c:1646 */
11535  {
11536  cobc_cs_check = 0;
11538  }
11539 #line 11461 "parser.c" /* yacc.c:1646 */
11540  break;
11541 
11542  case 776:
11543 #line 6321 "parser.y" /* yacc.c:1646 */
11544  {
11545  cb_emit_accept_line_or_col ((yyvsp[-2]), 0);
11546  }
11547 #line 11469 "parser.c" /* yacc.c:1646 */
11548  break;
11549 
11550  case 777:
11551 #line 6325 "parser.y" /* yacc.c:1646 */
11552  {
11553  cb_emit_accept_line_or_col ((yyvsp[-2]), 1);
11554  }
11555 #line 11477 "parser.c" /* yacc.c:1646 */
11556  break;
11557 
11558  case 778:
11559 #line 6329 "parser.y" /* yacc.c:1646 */
11560  {
11561  cobc_cs_check = 0;
11562  cb_emit_accept_date_yyyymmdd ((yyvsp[-3]));
11563  }
11564 #line 11486 "parser.c" /* yacc.c:1646 */
11565  break;
11566 
11567  case 779:
11568 #line 6334 "parser.y" /* yacc.c:1646 */
11569  {
11570  cobc_cs_check = 0;
11571  cb_emit_accept_date ((yyvsp[-2]));
11572  }
11573 #line 11495 "parser.c" /* yacc.c:1646 */
11574  break;
11575 
11576  case 780:
11577 #line 6339 "parser.y" /* yacc.c:1646 */
11578  {
11579  cobc_cs_check = 0;
11580  cb_emit_accept_day_yyyyddd ((yyvsp[-3]));
11581  }
11582 #line 11504 "parser.c" /* yacc.c:1646 */
11583  break;
11584 
11585  case 781:
11586 #line 6344 "parser.y" /* yacc.c:1646 */
11587  {
11588  cobc_cs_check = 0;
11589  cb_emit_accept_day ((yyvsp[-2]));
11590  }
11591 #line 11513 "parser.c" /* yacc.c:1646 */
11592  break;
11593 
11594  case 782:
11595 #line 6349 "parser.y" /* yacc.c:1646 */
11596  {
11597  cb_emit_accept_day_of_week ((yyvsp[-2]));
11598  }
11599 #line 11521 "parser.c" /* yacc.c:1646 */
11600  break;
11601 
11602  case 783:
11603 #line 6353 "parser.y" /* yacc.c:1646 */
11604  {
11605  cb_emit_accept_escape_key ((yyvsp[-3]));
11606  }
11607 #line 11529 "parser.c" /* yacc.c:1646 */
11608  break;
11609 
11610  case 784:
11611 #line 6357 "parser.y" /* yacc.c:1646 */
11612  {
11613  cb_emit_accept_exception_status ((yyvsp[-3]));
11614  }
11615 #line 11537 "parser.c" /* yacc.c:1646 */
11616  break;
11617 
11618  case 785:
11619 #line 6361 "parser.y" /* yacc.c:1646 */
11620  {
11621  cb_emit_accept_time ((yyvsp[-2]));
11622  }
11623 #line 11545 "parser.c" /* yacc.c:1646 */
11624  break;
11625 
11626  case 786:
11627 #line 6365 "parser.y" /* yacc.c:1646 */
11628  {
11629  cobc_cs_check = 0;
11630  cb_emit_accept_user_name ((yyvsp[-3]));
11631  }
11632 #line 11554 "parser.c" /* yacc.c:1646 */
11633  break;
11634 
11635  case 787:
11636 #line 6370 "parser.y" /* yacc.c:1646 */
11637  {
11638  cb_emit_accept_command_line ((yyvsp[-2]));
11639  }
11640 #line 11562 "parser.c" /* yacc.c:1646 */
11641  break;
11642 
11643  case 788:
11644 #line 6374 "parser.y" /* yacc.c:1646 */
11645  {
11646  cb_emit_accept_environment ((yyvsp[-3]));
11647  }
11648 #line 11570 "parser.c" /* yacc.c:1646 */
11649  break;
11650 
11651  case 789:
11652 #line 6378 "parser.y" /* yacc.c:1646 */
11653  {
11654  cb_emit_get_environment ((yyvsp[-1]), (yyvsp[-4]));
11655  }
11656 #line 11578 "parser.c" /* yacc.c:1646 */
11657  break;
11658 
11659  case 790:
11660 #line 6382 "parser.y" /* yacc.c:1646 */
11661  {
11662  cb_emit_accept_arg_number ((yyvsp[-2]));
11663  }
11664 #line 11586 "parser.c" /* yacc.c:1646 */
11665  break;
11666 
11667  case 791:
11668 #line 6386 "parser.y" /* yacc.c:1646 */
11669  {
11670  cb_emit_accept_arg_value ((yyvsp[-3]));
11671  }
11672 #line 11594 "parser.c" /* yacc.c:1646 */
11673  break;
11674 
11675  case 792:
11676 #line 6390 "parser.y" /* yacc.c:1646 */
11677  {
11678  cb_emit_accept_mnemonic ((yyvsp[-2]), (yyvsp[0]));
11679  }
11680 #line 11602 "parser.c" /* yacc.c:1646 */
11681  break;
11682 
11683  case 793:
11684 #line 6394 "parser.y" /* yacc.c:1646 */
11685  {
11686  cb_emit_accept_name ((yyvsp[-2]), (yyvsp[0]));
11687  }
11688 #line 11610 "parser.c" /* yacc.c:1646 */
11689  break;
11690 
11691  case 795:
11692 #line 6402 "parser.y" /* yacc.c:1646 */
11693  {
11694  (yyval) = cb_null;
11695  }
11696 #line 11618 "parser.c" /* yacc.c:1646 */
11697  break;
11698 
11699  case 801:
11700 #line 6420 "parser.y" /* yacc.c:1646 */
11701  {
11703  }
11704 #line 11626 "parser.c" /* yacc.c:1646 */
11705  break;
11706 
11707  case 802:
11708 #line 6424 "parser.y" /* yacc.c:1646 */
11709  {
11710  check_repeated ("MODE IS BLOCK", SYN_CLAUSE_2, &check_duplicate);
11711  }
11712 #line 11634 "parser.c" /* yacc.c:1646 */
11713  break;
11714 
11715  case 806:
11716 #line 6437 "parser.y" /* yacc.c:1646 */
11717  {
11719  _("AT screen-location"), SYN_CLAUSE_3,
11721 
11722  if (!line_column) {
11723  line_column = CB_BUILD_PAIR ((yyvsp[0]), cb_int0);
11724  } else {
11725  CB_PAIR_X (line_column) = (yyvsp[0]);
11726  }
11727  }
11728 #line 11650 "parser.c" /* yacc.c:1646 */
11729  break;
11730 
11731  case 807:
11732 #line 6449 "parser.y" /* yacc.c:1646 */
11733  {
11734  check_attr_with_conflict ("COLUMN", SYN_CLAUSE_2,
11735  _("AT screen-location"), SYN_CLAUSE_3,
11737 
11738  if(!line_column) {
11739  line_column = CB_BUILD_PAIR (cb_int0, (yyvsp[0]));
11740  } else {
11741  CB_PAIR_Y (line_column) = (yyvsp[0]);
11742  }
11743  }
11744 #line 11666 "parser.c" /* yacc.c:1646 */
11745  break;
11746 
11747  case 808:
11748 #line 6461 "parser.y" /* yacc.c:1646 */
11749  {
11750  check_attr_with_conflict (_("AT screen-location"), SYN_CLAUSE_3,
11751  _("LINE or COLUMN"), SYN_CLAUSE_1 | SYN_CLAUSE_2,
11753 
11754  line_column = (yyvsp[0]);
11755  }
11756 #line 11678 "parser.c" /* yacc.c:1646 */
11757  break;
11758 
11759  case 809:
11760 #line 6471 "parser.y" /* yacc.c:1646 */
11761  { (yyval) = (yyvsp[0]); }
11762 #line 11684 "parser.c" /* yacc.c:1646 */
11763  break;
11764 
11765  case 810:
11766 #line 6475 "parser.y" /* yacc.c:1646 */
11767  { (yyval) = (yyvsp[0]); }
11768 #line 11690 "parser.c" /* yacc.c:1646 */
11769  break;
11770 
11771  case 811:
11772 #line 6476 "parser.y" /* yacc.c:1646 */
11773  { (yyval) = (yyvsp[0]); }
11774 #line 11696 "parser.c" /* yacc.c:1646 */
11775  break;
11776 
11777  case 812:
11778 #line 6481 "parser.y" /* yacc.c:1646 */
11779  {
11780  cobc_cs_check = 0;
11781  }
11782 #line 11704 "parser.c" /* yacc.c:1646 */
11783  break;
11784 
11785  case 813:
11786 #line 6488 "parser.y" /* yacc.c:1646 */
11787  {
11789  }
11790 #line 11712 "parser.c" /* yacc.c:1646 */
11791  break;
11792 
11793  case 814:
11794 #line 6492 "parser.y" /* yacc.c:1646 */
11795  {
11796  if (cb_accept_auto) {
11798  }
11799  }
11800 #line 11722 "parser.c" /* yacc.c:1646 */
11801  break;
11802 
11803  case 815:
11804 #line 6498 "parser.y" /* yacc.c:1646 */
11805  {
11807  }
11808 #line 11730 "parser.c" /* yacc.c:1646 */
11809  break;
11810 
11811  case 816:
11812 #line 6502 "parser.y" /* yacc.c:1646 */
11813  {
11815  }
11816 #line 11738 "parser.c" /* yacc.c:1646 */
11817  break;
11818 
11819  case 817:
11820 #line 6506 "parser.y" /* yacc.c:1646 */
11821  {
11822  cb_warning (_("Ignoring CONVERSION"));
11823  }
11824 #line 11746 "parser.c" /* yacc.c:1646 */
11825  break;
11826 
11827  case 818:
11828 #line 6510 "parser.y" /* yacc.c:1646 */
11829  {
11831  }
11832 #line 11754 "parser.c" /* yacc.c:1646 */
11833  break;
11834 
11835  case 819:
11836 #line 6514 "parser.y" /* yacc.c:1646 */
11837  {
11839  "HIGHLIGHT", COB_SCREEN_HIGHLIGHT,
11840  "LOWLIGHT", COB_SCREEN_LOWLIGHT);
11841  }
11842 #line 11764 "parser.c" /* yacc.c:1646 */
11843  break;
11844 
11845  case 820:
11846 #line 6520 "parser.y" /* yacc.c:1646 */
11847  {
11849  }
11850 #line 11772 "parser.c" /* yacc.c:1646 */
11851  break;
11852 
11853  case 821:
11854 #line 6524 "parser.y" /* yacc.c:1646 */
11855  {
11857  }
11858 #line 11780 "parser.c" /* yacc.c:1646 */
11859  break;
11860 
11861  case 822:
11862 #line 6528 "parser.y" /* yacc.c:1646 */
11863  {
11865  "LOWLIGHT", COB_SCREEN_LOWLIGHT,
11866  "HIGHLIGHT", COB_SCREEN_HIGHLIGHT);
11867  }
11868 #line 11790 "parser.c" /* yacc.c:1646 */
11869  break;
11870 
11871  case 823:
11872 #line 6534 "parser.y" /* yacc.c:1646 */
11873  {
11875  }
11876 #line 11798 "parser.c" /* yacc.c:1646 */
11877  break;
11878 
11879  case 824:
11880 #line 6538 "parser.y" /* yacc.c:1646 */
11881  {
11883  }
11884 #line 11806 "parser.c" /* yacc.c:1646 */
11885  break;
11886 
11887  case 825:
11888 #line 6542 "parser.y" /* yacc.c:1646 */
11889  {
11890  check_attribs (NULL, NULL, NULL, NULL, (yyvsp[0]), NULL, COB_SCREEN_PROMPT);
11891  }
11892 #line 11814 "parser.c" /* yacc.c:1646 */
11893  break;
11894 
11895  case 826:
11896 #line 6546 "parser.y" /* yacc.c:1646 */
11897  {
11899  }
11900 #line 11822 "parser.c" /* yacc.c:1646 */
11901  break;
11902 
11903  case 827:
11904 #line 6550 "parser.y" /* yacc.c:1646 */
11905  {
11907  }
11908 #line 11830 "parser.c" /* yacc.c:1646 */
11909  break;
11910 
11911  case 828:
11912 #line 6554 "parser.y" /* yacc.c:1646 */
11913  {
11915  }
11916 #line 11838 "parser.c" /* yacc.c:1646 */
11917  break;
11918 
11919  case 829:
11920 #line 6558 "parser.y" /* yacc.c:1646 */
11921  {
11923  }
11924 #line 11846 "parser.c" /* yacc.c:1646 */
11925  break;
11926 
11927  case 830:
11928 #line 6562 "parser.y" /* yacc.c:1646 */
11929  {
11930  check_attribs (NULL, NULL, NULL, NULL, NULL, (yyvsp[0]), 0);
11931  }
11932 #line 11854 "parser.c" /* yacc.c:1646 */
11933  break;
11934 
11935  case 831:
11936 #line 6566 "parser.y" /* yacc.c:1646 */
11937  {
11938  check_attribs (NULL, NULL, NULL, NULL, NULL, (yyvsp[0]), 0);
11939  }
11940 #line 11862 "parser.c" /* yacc.c:1646 */
11941  break;
11942 
11943  case 832:
11944 #line 6570 "parser.y" /* yacc.c:1646 */
11945  {
11947  }
11948 #line 11870 "parser.c" /* yacc.c:1646 */
11949  break;
11950 
11951  case 833:
11952 #line 6574 "parser.y" /* yacc.c:1646 */
11953  {
11954  if (cb_accept_update) {
11956  }
11957  }
11958 #line 11880 "parser.c" /* yacc.c:1646 */
11959  break;
11960 
11961  case 834:
11962 #line 6580 "parser.y" /* yacc.c:1646 */
11963  {
11965  }
11966 #line 11888 "parser.c" /* yacc.c:1646 */
11967  break;
11968 
11969  case 835:
11970 #line 6584 "parser.y" /* yacc.c:1646 */
11971  {
11973  }
11974 #line 11896 "parser.c" /* yacc.c:1646 */
11975  break;
11976 
11977  case 836:
11978 #line 6588 "parser.y" /* yacc.c:1646 */
11979  {
11980  check_attribs ((yyvsp[0]), NULL, NULL, NULL, NULL, NULL, 0);
11981  }
11982 #line 11904 "parser.c" /* yacc.c:1646 */
11983  break;
11984 
11985  case 837:
11986 #line 6592 "parser.y" /* yacc.c:1646 */
11987  {
11988  check_attribs (NULL, (yyvsp[0]), NULL, NULL, NULL, NULL, 0);
11989  }
11990 #line 11912 "parser.c" /* yacc.c:1646 */
11991  break;
11992 
11993  case 838:
11994 #line 6596 "parser.y" /* yacc.c:1646 */
11995  {
11996  check_attribs (NULL, NULL, (yyvsp[0]), NULL, NULL, NULL, 0);
11997  }
11998 #line 11920 "parser.c" /* yacc.c:1646 */
11999  break;
12000 
12001  case 839:
12002 #line 6600 "parser.y" /* yacc.c:1646 */
12003  {
12005  }
12006 #line 11928 "parser.c" /* yacc.c:1646 */
12007  break;
12008 
12009  case 840:
12010 #line 6604 "parser.y" /* yacc.c:1646 */
12011  {
12012  check_attribs (NULL, NULL, NULL, (yyvsp[0]), NULL, NULL, 0);
12013  }
12014 #line 11936 "parser.c" /* yacc.c:1646 */
12015  break;
12016 
12017  case 843:
12018 #line 6616 "parser.y" /* yacc.c:1646 */
12019  {
12020  TERMINATOR_WARNING ((yyvsp[(-2) - (0)]), ACCEPT);
12021  }
12022 #line 11944 "parser.c" /* yacc.c:1646 */
12023  break;
12024 
12025  case 844:
12026 #line 6620 "parser.y" /* yacc.c:1646 */
12027  {
12028  TERMINATOR_CLEAR ((yyvsp[(-2) - (1)]), ACCEPT);
12029 # if 0 /* activate only for debugging purposes for attribs */
12030  if (current_statement->attr_ptr) {
12031  printBits (current_statement->attr_ptr->dispattrs);
12032  } else {
12033  fprintf(stderr, "No Attribs\n");
12034  }
12035 #endif
12036  }
12037 #line 11959 "parser.c" /* yacc.c:1646 */
12038  break;
12039 
12040  case 845:
12041 #line 6637 "parser.y" /* yacc.c:1646 */
12042  {
12043  begin_statement ("ADD", TERM_ADD);
12044  }
12045 #line 11967 "parser.c" /* yacc.c:1646 */
12046  break;
12047 
12048  case 847:
12049 #line 6646 "parser.y" /* yacc.c:1646 */
12050  {
12051  cb_emit_arithmetic ((yyvsp[-1]), '+', cb_build_binary_list ((yyvsp[-3]), '+'));
12052  }
12053 #line 11975 "parser.c" /* yacc.c:1646 */
12054  break;
12055 
12056  case 848:
12057 #line 6650 "parser.y" /* yacc.c:1646 */
12058  {
12059  cb_emit_arithmetic ((yyvsp[-1]), 0, cb_build_binary_list ((yyvsp[-4]), '+'));
12060  }
12061 #line 11983 "parser.c" /* yacc.c:1646 */
12062  break;
12063 
12064  case 849:
12065 #line 6654 "parser.y" /* yacc.c:1646 */
12066  {
12067  cb_emit_corresponding (cb_build_add, (yyvsp[-2]), (yyvsp[-4]), (yyvsp[-1]));
12068  }
12069 #line 11991 "parser.c" /* yacc.c:1646 */
12070  break;
12071 
12072  case 851:
12073 #line 6661 "parser.y" /* yacc.c:1646 */
12074  {
12075  cb_list_add ((yyvsp[-2]), (yyvsp[0]));
12076  }
12077 #line 11999 "parser.c" /* yacc.c:1646 */
12078  break;
12079 
12080  case 852:
12081 #line 6668 "parser.y" /* yacc.c:1646 */
12082  {
12083  TERMINATOR_WARNING ((yyvsp[(-2) - (0)]), ADD);
12084  }
12085 #line 12007 "parser.c" /* yacc.c:1646 */
12086  break;
12087 
12088  case 853:
12089 #line 6672 "parser.y" /* yacc.c:1646 */
12090  {
12091  TERMINATOR_CLEAR ((yyvsp[(-2) - (1)]), ADD);
12092  }
12093 #line 12015 "parser.c" /* yacc.c:1646 */
12094  break;
12095 
12096  case 854:
12097 #line 6682 "parser.y" /* yacc.c:1646 */
12098  {
12099  begin_statement ("ALLOCATE", 0);
12101  }
12102 #line 12024 "parser.c" /* yacc.c:1646 */
12103  break;
12104 
12105  case 856:
12106 #line 6691 "parser.y" /* yacc.c:1646 */
12107  {
12108  cb_emit_allocate ((yyvsp[-2]), (yyvsp[0]), NULL, (yyvsp[-1]));
12109  }
12110 #line 12032 "parser.c" /* yacc.c:1646 */
12111  break;
12112 
12113  case 857:
12114 #line 6695 "parser.y" /* yacc.c:1646 */
12115  {
12116  if ((yyvsp[0]) == NULL) {
12118  _("ALLOCATE CHARACTERS requires RETURNING clause"));
12119  } else {
12120  cb_emit_allocate (NULL, (yyvsp[0]), (yyvsp[-3]), (yyvsp[-1]));
12121  }
12122  }
12123 #line 12045 "parser.c" /* yacc.c:1646 */
12124  break;
12125 
12126  case 858:
12127 #line 6706 "parser.y" /* yacc.c:1646 */
12128  { (yyval) = NULL; }
12129 #line 12051 "parser.c" /* yacc.c:1646 */
12130  break;
12131 
12132  case 859:
12133 #line 6707 "parser.y" /* yacc.c:1646 */
12134  { (yyval) = (yyvsp[0]); }
12135 #line 12057 "parser.c" /* yacc.c:1646 */
12136  break;
12137 
12138  case 860:
12139 #line 6715 "parser.y" /* yacc.c:1646 */
12140  {
12141  begin_statement ("ALTER", 0);
12142  cb_verify (cb_alter_statement, "ALTER statement");
12143  }
12144 #line 12066 "parser.c" /* yacc.c:1646 */
12145  break;
12146 
12147  case 864:
12148 #line 6729 "parser.y" /* yacc.c:1646 */
12149  {
12150  cb_emit_alter ((yyvsp[-3]), (yyvsp[0]));
12151  }
12152 #line 12074 "parser.c" /* yacc.c:1646 */
12153  break;
12154 
12155  case 867:
12156 #line 6741 "parser.y" /* yacc.c:1646 */
12157  {
12158  begin_statement ("CALL", TERM_CALL);
12160  call_nothing = 0;
12161  }
12162 #line 12084 "parser.c" /* yacc.c:1646 */
12163  break;
12164 
12165  case 869:
12166 #line 6757 "parser.y" /* yacc.c:1646 */
12167  {
12168  if (CB_LITERAL_P ((yyvsp[-4])) &&
12171  !strcmp ((const char *)(CB_LITERAL((yyvsp[-4]))->data), current_program->orig_program_id)) {
12172  cb_warning_x ((yyvsp[-4]), _("Recursive program call - assuming RECURSIVE attribute"));
12174  }
12175  /* For CALL ... RETURNING NOTHING, set the call convention bit */
12176  if (call_nothing) {
12177  if ((yyvsp[-5]) && CB_INTEGER_P ((yyvsp[-5]))) {
12178  (yyvsp[-5]) = cb_int ((CB_INTEGER ((yyvsp[-5]))->val) | CB_CONV_NO_RET_UPD);
12179  } else {
12180  (yyvsp[-5]) = cb_int (CB_CONV_NO_RET_UPD);
12181  }
12182  }
12183  cb_emit_call ((yyvsp[-4]), (yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]), (yyvsp[-5]));
12184  }
12185 #line 12107 "parser.c" /* yacc.c:1646 */
12186  break;
12187 
12188  case 870:
12189 #line 6779 "parser.y" /* yacc.c:1646 */
12190  {
12191  (yyval) = NULL;
12192  cobc_cs_check = 0;
12193  }
12194 #line 12116 "parser.c" /* yacc.c:1646 */
12195  break;
12196 
12197  case 871:
12198 #line 6784 "parser.y" /* yacc.c:1646 */
12199  {
12200  (yyval) = cb_int (CB_CONV_STATIC_LINK);
12201  cobc_cs_check = 0;
12202  }
12203 #line 12125 "parser.c" /* yacc.c:1646 */
12204  break;
12205 
12206  case 872:
12207 #line 6789 "parser.y" /* yacc.c:1646 */
12208  {
12209  (yyval) = cb_int (CB_CONV_STDCALL);
12210  cobc_cs_check = 0;
12211  }
12212 #line 12134 "parser.c" /* yacc.c:1646 */
12213  break;
12214 
12215  case 873:
12216 #line 6794 "parser.y" /* yacc.c:1646 */
12217  {
12218  cb_tree x;
12219 
12220  x = cb_ref ((yyvsp[0]));
12221  if (CB_VALID_TREE (x)) {
12222  if (CB_SYSTEM_NAME(x)->token != CB_FEATURE_CONVENTION) {
12223  cb_error_x ((yyvsp[0]), _("Invalid mnemonic name"));
12224  (yyval) = NULL;
12225  } else {
12226  (yyval) = CB_SYSTEM_NAME(x)->value;
12227  }
12228  } else {
12229  (yyval) = NULL;
12230  }
12231  cobc_cs_check = 0;
12232  }
12233 #line 12155 "parser.c" /* yacc.c:1646 */
12234  break;
12235 
12236  case 874:
12237 #line 6814 "parser.y" /* yacc.c:1646 */
12238  {
12239  (yyval) = NULL;
12240  }
12241 #line 12163 "parser.c" /* yacc.c:1646 */
12242  break;
12243 
12244  case 875:
12245 #line 6818 "parser.y" /* yacc.c:1646 */
12246  {
12248  size_mode = CB_SIZE_4;
12249  }
12250 #line 12172 "parser.c" /* yacc.c:1646 */
12251  break;
12252 
12253  case 876:
12254 #line 6823 "parser.y" /* yacc.c:1646 */
12255  {
12256  if (cb_list_length ((yyvsp[0])) > COB_MAX_FIELD_PARAMS) {
12258  _("Number of parameters exceeds maximum %d"),
12260  }
12261  (yyval) = (yyvsp[0]);
12262  }
12263 #line 12185 "parser.c" /* yacc.c:1646 */
12264  break;
12265 
12266  case 877:
12267 #line 6834 "parser.y" /* yacc.c:1646 */
12268  { (yyval) = (yyvsp[0]); }
12269 #line 12191 "parser.c" /* yacc.c:1646 */
12270  break;
12271 
12272  case 878:
12273 #line 6836 "parser.y" /* yacc.c:1646 */
12274  { (yyval) = cb_list_append ((yyvsp[-1]), (yyvsp[0])); }
12275 #line 12197 "parser.c" /* yacc.c:1646 */
12276  break;
12277 
12278  case 879:
12279 #line 6841 "parser.y" /* yacc.c:1646 */
12280  {
12283  _("OMITTED only allowed with BY REFERENCE"));
12284  }
12285  (yyval) = CB_BUILD_PAIR (cb_int (call_mode), cb_null);
12286  }
12287 #line 12209 "parser.c" /* yacc.c:1646 */
12288  break;
12289 
12290  case 880:
12291 #line 6849 "parser.y" /* yacc.c:1646 */
12292  {
12293  int save_mode;
12294 
12295  save_mode = call_mode;
12297  if (CB_FILE_P ((yyvsp[0])) || (CB_REFERENCE_P ((yyvsp[0])) &&
12298  CB_FILE_P (CB_REFERENCE ((yyvsp[0]))->value))) {
12300  _("Invalid file name reference"));
12301  } else if (call_mode == CB_CALL_BY_VALUE) {
12302  if (cb_category_is_alpha ((yyvsp[0]))) {
12303  cb_warning_x ((yyvsp[0]),
12304  _("BY CONTENT assumed for alphanumeric item"));
12305  save_mode = CB_CALL_BY_CONTENT;
12306  }
12307  }
12308  }
12309  (yyval) = CB_BUILD_PAIR (cb_int (save_mode), (yyvsp[0]));
12310  CB_SIZES ((yyval)) = size_mode;
12311  call_mode = save_mode;
12312  }
12313 #line 12235 "parser.c" /* yacc.c:1646 */
12314  break;
12315 
12316  case 882:
12317 #line 6875 "parser.y" /* yacc.c:1646 */
12318  {
12320  }
12321 #line 12243 "parser.c" /* yacc.c:1646 */
12322  break;
12323 
12324  case 883:
12325 #line 6879 "parser.y" /* yacc.c:1646 */
12326  {
12329  _("%s not allowed in CHAINED programs"), "BY CONTENT");
12330  } else {
12332  }
12333  }
12334 #line 12256 "parser.c" /* yacc.c:1646 */
12335  break;
12336 
12337  case 884:
12338 #line 6888 "parser.y" /* yacc.c:1646 */
12339  {
12342  _("%s not allowed in CHAINED programs"), "BY VALUE");
12343  } else {
12345  }
12346  }
12347 #line 12269 "parser.c" /* yacc.c:1646 */
12348  break;
12349 
12350  case 885:
12351 #line 6900 "parser.y" /* yacc.c:1646 */
12352  {
12353  (yyval) = NULL;
12354  }
12355 #line 12277 "parser.c" /* yacc.c:1646 */
12356  break;
12357 
12358  case 886:
12359 #line 6904 "parser.y" /* yacc.c:1646 */
12360  {
12361  (yyval) = (yyvsp[0]);
12362  }
12363 #line 12285 "parser.c" /* yacc.c:1646 */
12364  break;
12365 
12366  case 887:
12367 #line 6908 "parser.y" /* yacc.c:1646 */
12368  {
12369  (yyval) = cb_null;
12370  }
12371 #line 12293 "parser.c" /* yacc.c:1646 */
12372  break;
12373 
12374  case 888:
12375 #line 6912 "parser.y" /* yacc.c:1646 */
12376  {
12378  (yyval) = cb_null;
12379  }
12380 #line 12302 "parser.c" /* yacc.c:1646 */
12381  break;
12382 
12383  case 889:
12384 #line 6917 "parser.y" /* yacc.c:1646 */
12385  {
12386  struct cb_field *f;
12387 
12388  if (cb_ref ((yyvsp[0])) != cb_error_node) {
12389  f = CB_FIELD_PTR ((yyvsp[0]));
12390  if (f->level != 1 && f->level != 77) {
12391  cb_error (_("RETURNING item must have level 01 or 77"));
12392  (yyval) = NULL;
12393  } else if (f->storage != CB_STORAGE_LINKAGE &&
12394  !f->flag_item_based) {
12395  cb_error (_("RETURNING item is neither in LINKAGE SECTION nor is it BASED"));
12396  (yyval) = NULL;
12397  } else {
12398  (yyval) = cb_build_address ((yyvsp[0]));
12399  }
12400  } else {
12401  (yyval) = NULL;
12402  }
12403  }
12404 #line 12326 "parser.c" /* yacc.c:1646 */
12405  break;
12406 
12407  case 894:
12408 #line 6950 "parser.y" /* yacc.c:1646 */
12409  {
12410  (yyval) = NULL;
12411  }
12412 #line 12334 "parser.c" /* yacc.c:1646 */
12413  break;
12414 
12415  case 895:
12416 #line 6955 "parser.y" /* yacc.c:1646 */
12417  {
12418  (yyval) = (yyvsp[0]);
12419  }
12420 #line 12342 "parser.c" /* yacc.c:1646 */
12421  break;
12422 
12423  case 896:
12424 #line 6960 "parser.y" /* yacc.c:1646 */
12425  {
12426  cb_verify (cb_call_overflow, "ON OVERFLOW clause");
12427  (yyval) = (yyvsp[0]);
12428  }
12429 #line 12351 "parser.c" /* yacc.c:1646 */
12430  break;
12431 
12432  case 897:
12433 #line 6968 "parser.y" /* yacc.c:1646 */
12434  {
12435  (yyval) = NULL;
12436  }
12437 #line 12359 "parser.c" /* yacc.c:1646 */
12438  break;
12439 
12440  case 898:
12441 #line 6973 "parser.y" /* yacc.c:1646 */
12442  {
12443  (yyval) = (yyvsp[0]);
12444  }
12445 #line 12367 "parser.c" /* yacc.c:1646 */
12446  break;
12447 
12448  case 899:
12449 #line 6980 "parser.y" /* yacc.c:1646 */
12450  {
12451  TERMINATOR_WARNING ((yyvsp[(-2) - (0)]), CALL);
12452  }
12453 #line 12375 "parser.c" /* yacc.c:1646 */
12454  break;
12455 
12456  case 900:
12457 #line 6984 "parser.y" /* yacc.c:1646 */
12458  {
12459  TERMINATOR_CLEAR ((yyvsp[(-2) - (1)]), CALL);
12460  }
12461 #line 12383 "parser.c" /* yacc.c:1646 */
12462  break;
12463 
12464  case 901:
12465 #line 6994 "parser.y" /* yacc.c:1646 */
12466  {
12467  begin_statement ("CANCEL", 0);
12468  }
12469 #line 12391 "parser.c" /* yacc.c:1646 */
12470  break;
12471 
12472  case 903:
12473 #line 7002 "parser.y" /* yacc.c:1646 */
12474  {
12475  cb_emit_cancel ((yyvsp[0]));
12476  }
12477 #line 12399 "parser.c" /* yacc.c:1646 */
12478  break;
12479 
12480  case 904:
12481 #line 7006 "parser.y" /* yacc.c:1646 */
12482  {
12483  cb_emit_cancel ((yyvsp[0]));
12484  }
12485 #line 12407 "parser.c" /* yacc.c:1646 */
12486  break;
12487 
12488  case 905:
12489 #line 7016 "parser.y" /* yacc.c:1646 */
12490  {
12491  begin_statement ("CLOSE", 0);
12492  }
12493 #line 12415 "parser.c" /* yacc.c:1646 */
12494  break;
12495 
12496  case 907:
12497 #line 7024 "parser.y" /* yacc.c:1646 */
12498  {
12500  cb_emit_close ((yyvsp[-1]), (yyvsp[0]));
12501  }
12502 #line 12424 "parser.c" /* yacc.c:1646 */
12503  break;
12504 
12505  case 908:
12506 #line 7029 "parser.y" /* yacc.c:1646 */
12507  {
12509  cb_emit_close ((yyvsp[-1]), (yyvsp[0]));
12510  }
12511 #line 12433 "parser.c" /* yacc.c:1646 */
12512  break;
12513 
12514  case 909:
12515 #line 7036 "parser.y" /* yacc.c:1646 */
12516  { (yyval) = cb_int (COB_CLOSE_NORMAL); }
12517 #line 12439 "parser.c" /* yacc.c:1646 */
12518  break;
12519 
12520  case 910:
12521 #line 7037 "parser.y" /* yacc.c:1646 */
12522  { (yyval) = cb_int (COB_CLOSE_UNIT); }
12523 #line 12445 "parser.c" /* yacc.c:1646 */
12524  break;
12525 
12526  case 911:
12527 #line 7038 "parser.y" /* yacc.c:1646 */
12528  { (yyval) = cb_int (COB_CLOSE_UNIT_REMOVAL); }
12529 #line 12451 "parser.c" /* yacc.c:1646 */
12530  break;
12531 
12532  case 912:
12533 #line 7039 "parser.y" /* yacc.c:1646 */
12534  { (yyval) = cb_int (COB_CLOSE_NO_REWIND); }
12535 #line 12457 "parser.c" /* yacc.c:1646 */
12536  break;
12537 
12538  case 913:
12539 #line 7040 "parser.y" /* yacc.c:1646 */
12540  { (yyval) = cb_int (COB_CLOSE_LOCK); }
12541 #line 12463 "parser.c" /* yacc.c:1646 */
12542  break;
12543 
12544  case 914:
12545 #line 7048 "parser.y" /* yacc.c:1646 */
12546  {
12547  begin_statement ("COMPUTE", TERM_COMPUTE);
12548  }
12549 #line 12471 "parser.c" /* yacc.c:1646 */
12550  break;
12551 
12552  case 916:
12553 #line 7057 "parser.y" /* yacc.c:1646 */
12554  {
12555  cb_emit_arithmetic ((yyvsp[-3]), 0, (yyvsp[-1]));
12556  }
12557 #line 12479 "parser.c" /* yacc.c:1646 */
12558  break;
12559 
12560  case 917:
12561 #line 7064 "parser.y" /* yacc.c:1646 */
12562  {
12563  TERMINATOR_WARNING ((yyvsp[(-2) - (0)]), COMPUTE);
12564  }
12565 #line 12487 "parser.c" /* yacc.c:1646 */
12566  break;
12567 
12568  case 918:
12569 #line 7068 "parser.y" /* yacc.c:1646 */
12570  {
12571  TERMINATOR_CLEAR ((yyvsp[(-2) - (1)]), COMPUTE);
12572  }
12573 #line 12495 "parser.c" /* yacc.c:1646 */
12574  break;
12575 
12576  case 919:
12577 #line 7078 "parser.y" /* yacc.c:1646 */
12578  {
12579  begin_statement ("COMMIT", 0);
12580  cb_emit_commit ();
12581  }
12582 #line 12504 "parser.c" /* yacc.c:1646 */
12583  break;
12584 
12585  case 920:
12586 #line 7089 "parser.y" /* yacc.c:1646 */
12587  {
12588  size_t save_unreached;
12589 
12590  /* Do not check unreached for CONTINUE */
12591  save_unreached = check_unreached;
12592  check_unreached = 0;
12593  begin_statement ("CONTINUE", 0);
12594  cb_emit_continue ();
12595  check_unreached = (unsigned int) save_unreached;
12596  }
12597 #line 12519 "parser.c" /* yacc.c:1646 */
12598  break;
12599 
12600  case 921:
12601 #line 7106 "parser.y" /* yacc.c:1646 */
12602  {
12603  begin_statement ("DELETE", TERM_DELETE);
12604  }
12605 #line 12527 "parser.c" /* yacc.c:1646 */
12606  break;
12607 
12608  case 923:
12609 #line 7115 "parser.y" /* yacc.c:1646 */
12610  {
12611  cb_emit_delete ((yyvsp[-2]));
12612  }
12613 #line 12535 "parser.c" /* yacc.c:1646 */
12614  break;
12615 
12616  case 925:
12617 #line 7123 "parser.y" /* yacc.c:1646 */
12618  {
12620  cb_emit_delete_file ((yyvsp[0]));
12621  }
12622 #line 12544 "parser.c" /* yacc.c:1646 */
12623  break;
12624 
12625  case 926:
12626 #line 7128 "parser.y" /* yacc.c:1646 */
12627  {
12629  cb_emit_delete_file ((yyvsp[0]));
12630  }
12631 #line 12553 "parser.c" /* yacc.c:1646 */
12632  break;
12633 
12634  case 927:
12635 #line 7136 "parser.y" /* yacc.c:1646 */
12636  {
12637  TERMINATOR_WARNING ((yyvsp[(-2) - (0)]), DELETE);
12638  }
12639 #line 12561 "parser.c" /* yacc.c:1646 */
12640  break;
12641 
12642  case 928:
12643 #line 7140 "parser.y" /* yacc.c:1646 */
12644  {
12645  TERMINATOR_CLEAR ((yyvsp[(-2) - (1)]), DELETE);
12646  }
12647 #line 12569 "parser.c" /* yacc.c:1646 */
12648  break;
12649 
12650  case 929:
12651 #line 7150 "parser.y" /* yacc.c:1646 */
12652  {
12653  begin_statement ("DISPLAY", TERM_DISPLAY);
12655  }
12656 #line 12578 "parser.c" /* yacc.c:1646 */
12657  break;
12658 
12659  case 931:
12660 #line 7160 "parser.y" /* yacc.c:1646 */
12661  {
12662  cb_emit_env_name ((yyvsp[-2]));
12663  }
12664 #line 12586 "parser.c" /* yacc.c:1646 */
12665  break;
12666 
12667  case 932:
12668 #line 7164 "parser.y" /* yacc.c:1646 */
12669  {
12670  cb_emit_env_value ((yyvsp[-2]));
12671  }
12672 #line 12594 "parser.c" /* yacc.c:1646 */
12673  break;
12674 
12675  case 933:
12676 #line 7168 "parser.y" /* yacc.c:1646 */
12677  {
12678  cb_emit_arg_number ((yyvsp[-2]));
12679  }
12680 #line 12602 "parser.c" /* yacc.c:1646 */
12681  break;
12682 
12683  case 934:
12684 #line 7172 "parser.y" /* yacc.c:1646 */
12685  {
12686  cb_emit_command_line ((yyvsp[-2]));
12687  }
12688 #line 12610 "parser.c" /* yacc.c:1646 */
12689  break;
12690 
12691  case 936:
12692 #line 7181 "parser.y" /* yacc.c:1646 */
12693  {
12694  emit_default_displays_for_x_list ((struct cb_list *) (yyvsp[0]));
12695  }
12696 #line 12618 "parser.c" /* yacc.c:1646 */
12697  break;
12698 
12699  case 937:
12700 #line 7185 "parser.y" /* yacc.c:1646 */
12701  {
12702  emit_default_displays_for_x_list ((struct cb_list *) (yyvsp[0]));
12703  }
12704 #line 12626 "parser.c" /* yacc.c:1646 */
12705  break;
12706 
12707  case 940:
12708 #line 7197 "parser.y" /* yacc.c:1646 */
12709  {
12710  check_duplicate = 0;
12713  upon_value = NULL;
12714  line_column = NULL;
12715  }
12716 #line 12638 "parser.c" /* yacc.c:1646 */
12717  break;
12718 
12719  case 941:
12720 #line 7205 "parser.y" /* yacc.c:1646 */
12721  {
12722  /* What if I want to allow implied LINE/COL? */
12723  int is_screen_field =
12724  contains_only_screen_field ((struct cb_list *) (yyvsp[-2]));
12725  int screen_display =
12726  is_screen_field
12727  || upon_value == cb_null
12728  || line_column
12730 
12731  if ((yyvsp[-2]) == cb_null) {
12733 
12736  } else {
12737  if (cb_list_length ((yyvsp[-2])) > 1 && screen_display) {
12738  cb_error (_("Ambiguous DISPLAY; put clauseless items at end or in separate DISPLAY"));
12739  }
12740 
12741  if (screen_display) {
12742  if (upon_value != NULL) {
12743  if (is_screen_field) {
12744  cb_error (_("Screens cannot be displayed on a device"));
12745  } else { /* line_column || current_statement->attr_ptr */
12746  cb_error (_("Cannot use screen clauses with device DISPLAY"));
12747  }
12748  } else {
12749  upon_value = cb_null;
12750  }
12751 
12753 
12754  if (!line_column && !is_screen_field) {
12755  cb_error (_("Screen DISPLAY does not have a LINE or COL clause"));
12756  }
12757 
12758  cb_emit_display ((yyvsp[-2]), cb_null, cb_int1, line_column,
12760  } else { /* device display */
12761  if (upon_value == NULL) {
12763  }
12765  }
12766  }
12767 
12768  /*
12769  This should be placed after the display_list in the second case
12770  of display_list, but that causes a shift/reduce error.
12771  */
12773  }
12774 #line 12696 "parser.c" /* yacc.c:1646 */
12775  break;
12776 
12777  case 942:
12778 #line 7262 "parser.y" /* yacc.c:1646 */
12779  {
12780  (yyval) = (yyvsp[0]);
12781  }
12782 #line 12704 "parser.c" /* yacc.c:1646 */
12783  break;
12784 
12785  case 943:
12786 #line 7266 "parser.y" /* yacc.c:1646 */
12787  {
12788  PENDING ("DISPLAY OMITTED");
12789  (yyval) = cb_null;
12790  }
12791 #line 12713 "parser.c" /* yacc.c:1646 */
12792  break;
12793 
12794  case 946:
12795 #line 7279 "parser.y" /* yacc.c:1646 */
12796  {
12798  }
12799 #line 12721 "parser.c" /* yacc.c:1646 */
12800  break;
12801 
12802  case 947:
12803 #line 7283 "parser.y" /* yacc.c:1646 */
12804  {
12805  check_repeated ("NO ADVANCING", SYN_CLAUSE_2, &check_duplicate);
12807  }
12808 #line 12730 "parser.c" /* yacc.c:1646 */
12809  break;
12810 
12811  case 948:
12812 #line 7288 "parser.y" /* yacc.c:1646 */
12813  {
12814  check_repeated ("MODE IS BLOCK", SYN_CLAUSE_3, &check_duplicate);
12815  }
12816 #line 12738 "parser.c" /* yacc.c:1646 */
12817  break;
12818 
12819  case 951:
12820 #line 7297 "parser.y" /* yacc.c:1646 */
12821  {
12822  upon_value = cb_build_display_mnemonic ((yyvsp[0]));
12823  }
12824 #line 12746 "parser.c" /* yacc.c:1646 */
12825  break;
12826 
12827  case 952:
12828 #line 7301 "parser.y" /* yacc.c:1646 */
12829  {
12830  upon_value = cb_build_display_name ((yyvsp[0]));
12831  }
12832 #line 12754 "parser.c" /* yacc.c:1646 */
12833  break;
12834 
12835  case 953:
12836 #line 7305 "parser.y" /* yacc.c:1646 */
12837  {
12838  upon_value = cb_int0;
12839  }
12840 #line 12762 "parser.c" /* yacc.c:1646 */
12841  break;
12842 
12843  case 957:
12844 #line 7318 "parser.y" /* yacc.c:1646 */
12845  {
12847  }
12848 #line 12770 "parser.c" /* yacc.c:1646 */
12849  break;
12850 
12851  case 958:
12852 #line 7322 "parser.y" /* yacc.c:1646 */
12853  {
12855  "BLANK LINE", COB_SCREEN_BLANK_LINE,
12856  "BLANK SCREEN", COB_SCREEN_BLANK_SCREEN);
12857  }
12858 #line 12780 "parser.c" /* yacc.c:1646 */
12859  break;
12860 
12861  case 959:
12862 #line 7328 "parser.y" /* yacc.c:1646 */
12863  {
12865  "BLANK SCREEN", COB_SCREEN_BLANK_SCREEN,
12866  "BLANK LINE", COB_SCREEN_BLANK_LINE);
12867  }
12868 #line 12790 "parser.c" /* yacc.c:1646 */
12869  break;
12870 
12871  case 960:
12872 #line 7334 "parser.y" /* yacc.c:1646 */
12873  {
12875  }
12876 #line 12798 "parser.c" /* yacc.c:1646 */
12877  break;
12878 
12879  case 961:
12880 #line 7338 "parser.y" /* yacc.c:1646 */
12881  {
12882  cb_warning (_("Ignoring CONVERSION"));
12883  }
12884 #line 12806 "parser.c" /* yacc.c:1646 */
12885  break;
12886 
12887  case 962:
12888 #line 7342 "parser.y" /* yacc.c:1646 */
12889  {
12891  "ERASE EOL", COB_SCREEN_ERASE_EOL,
12892  "ERASE EOS", COB_SCREEN_ERASE_EOS);
12893  }
12894 #line 12816 "parser.c" /* yacc.c:1646 */
12895  break;
12896 
12897  case 963:
12898 #line 7348 "parser.y" /* yacc.c:1646 */
12899  {
12901  "ERASE EOS", COB_SCREEN_ERASE_EOS,
12902  "ERASE EOL", COB_SCREEN_ERASE_EOL);
12903  }
12904 #line 12826 "parser.c" /* yacc.c:1646 */
12905  break;
12906 
12907  case 964:
12908 #line 7354 "parser.y" /* yacc.c:1646 */
12909  {
12911  "HIGHLIGHT", COB_SCREEN_HIGHLIGHT,
12912  "LOWLIGHT", COB_SCREEN_LOWLIGHT);
12913  }
12914 #line 12836 "parser.c" /* yacc.c:1646 */
12915  break;
12916 
12917  case 965:
12918 #line 7360 "parser.y" /* yacc.c:1646 */
12919  {
12921  "LOWLIGHT", COB_SCREEN_LOWLIGHT,
12922  "HIGHLIGHT", COB_SCREEN_HIGHLIGHT);
12923  }
12924 #line 12846 "parser.c" /* yacc.c:1646 */
12925  break;
12926 
12927  case 966:
12928 #line 7366 "parser.y" /* yacc.c:1646 */
12929  {
12931  }
12932 #line 12854 "parser.c" /* yacc.c:1646 */
12933  break;
12934 
12935  case 967:
12936 #line 7370 "parser.y" /* yacc.c:1646 */
12937  {
12939  }
12940 #line 12862 "parser.c" /* yacc.c:1646 */
12941  break;
12942 
12943  case 968:
12944 #line 7374 "parser.y" /* yacc.c:1646 */
12945  {
12946  check_attribs (NULL, NULL, NULL, NULL, NULL, (yyvsp[0]), 0);
12947  }
12948 #line 12870 "parser.c" /* yacc.c:1646 */
12949  break;
12950 
12951  case 969:
12952 #line 7378 "parser.y" /* yacc.c:1646 */
12953  {
12955  }
12956 #line 12878 "parser.c" /* yacc.c:1646 */
12957  break;
12958 
12959  case 970:
12960 #line 7382 "parser.y" /* yacc.c:1646 */
12961  {
12962  check_attribs ((yyvsp[0]), NULL, NULL, NULL, NULL, NULL, 0);
12963  }
12964 #line 12886 "parser.c" /* yacc.c:1646 */
12965  break;
12966 
12967  case 971:
12968 #line 7386 "parser.y" /* yacc.c:1646 */
12969  {
12970  check_attribs (NULL, (yyvsp[0]), NULL, NULL, NULL, NULL, 0);
12971  }
12972 #line 12894 "parser.c" /* yacc.c:1646 */
12973  break;
12974 
12975  case 972:
12976 #line 7390 "parser.y" /* yacc.c:1646 */
12977  {
12978  check_attribs (NULL, NULL, (yyvsp[0]), NULL, NULL, NULL, 0);
12979  }
12980 #line 12902 "parser.c" /* yacc.c:1646 */
12981  break;
12982 
12983  case 973:
12984 #line 7394 "parser.y" /* yacc.c:1646 */
12985  {
12987  }
12988 #line 12910 "parser.c" /* yacc.c:1646 */
12989  break;
12990 
12991  case 974:
12992 #line 7401 "parser.y" /* yacc.c:1646 */
12993  {
12994  TERMINATOR_WARNING ((yyvsp[(-2) - (0)]), DISPLAY);
12995  }
12996 #line 12918 "parser.c" /* yacc.c:1646 */
12997  break;
12998 
12999  case 975:
13000 #line 7405 "parser.y" /* yacc.c:1646 */
13001  {
13002  TERMINATOR_CLEAR ((yyvsp[(-2) - (1)]), DISPLAY);
13003  }
13004 #line 12926 "parser.c" /* yacc.c:1646 */
13005  break;
13006 
13007  case 976:
13008 #line 7415 "parser.y" /* yacc.c:1646 */
13009  {
13010  begin_statement ("DIVIDE", TERM_DIVIDE);
13011  }
13012 #line 12934 "parser.c" /* yacc.c:1646 */
13013  break;
13014 
13015  case 978:
13016 #line 7424 "parser.y" /* yacc.c:1646 */
13017  {
13018  cb_emit_arithmetic ((yyvsp[-1]), '/', (yyvsp[-3]));
13019  }
13020 #line 12942 "parser.c" /* yacc.c:1646 */
13021  break;
13022 
13023  case 979:
13024 #line 7428 "parser.y" /* yacc.c:1646 */
13025  {
13026  cb_emit_arithmetic ((yyvsp[-1]), 0, cb_build_binary_op ((yyvsp[-3]), '/', (yyvsp[-5])));
13027  }
13028 #line 12950 "parser.c" /* yacc.c:1646 */
13029  break;
13030 
13031  case 980:
13032 #line 7432 "parser.y" /* yacc.c:1646 */
13033  {
13034  cb_emit_arithmetic ((yyvsp[-1]), 0, cb_build_binary_op ((yyvsp[-5]), '/', (yyvsp[-3])));
13035  }
13036 #line 12958 "parser.c" /* yacc.c:1646 */
13037  break;
13038 
13039  case 981:
13040 #line 7436 "parser.y" /* yacc.c:1646 */
13041  {
13042  cb_emit_divide ((yyvsp[-5]), (yyvsp[-7]), (yyvsp[-3]), (yyvsp[-1]));
13043  }
13044 #line 12966 "parser.c" /* yacc.c:1646 */
13045  break;
13046 
13047  case 982:
13048 #line 7440 "parser.y" /* yacc.c:1646 */
13049  {
13050  cb_emit_divide ((yyvsp[-7]), (yyvsp[-5]), (yyvsp[-3]), (yyvsp[-1]));
13051  }
13052 #line 12974 "parser.c" /* yacc.c:1646 */
13053  break;
13054 
13055  case 983:
13056 #line 7447 "parser.y" /* yacc.c:1646 */
13057  {
13058  TERMINATOR_WARNING ((yyvsp[(-2) - (0)]), DIVIDE);
13059  }
13060 #line 12982 "parser.c" /* yacc.c:1646 */
13061  break;
13062 
13063  case 984:
13064 #line 7451 "parser.y" /* yacc.c:1646 */
13065  {
13066  TERMINATOR_CLEAR ((yyvsp[(-2) - (1)]), DIVIDE);
13067  }
13068 #line 12990 "parser.c" /* yacc.c:1646 */
13069  break;
13070 
13071  case 985:
13072 #line 7461 "parser.y" /* yacc.c:1646 */
13073  {
13074  check_unreached = 0;
13075  begin_statement ("ENTRY", 0);
13076  }
13077 #line 12999 "parser.c" /* yacc.c:1646 */
13078  break;
13079 
13080  case 987:
13081 #line 7470 "parser.y" /* yacc.c:1646 */
13082  {
13084  cb_error (_("%s is invalid in nested program"), "ENTRY");
13085  } else if (current_program->prog_type == CB_FUNCTION_TYPE) {
13086  cb_error (_("%s is invalid in a user FUNCTION"), "ENTRY");
13087  } else if (cb_verify (cb_entry_statement, "ENTRY")) {
13088  if (!cobc_check_valid_name ((char *)(CB_LITERAL ((yyvsp[-1]))->data), 1U)) {
13089  emit_entry ((char *)(CB_LITERAL ((yyvsp[-1]))->data), 1, (yyvsp[0]));
13090  }
13091  }
13092  }
13093 #line 13015 "parser.c" /* yacc.c:1646 */
13094  break;
13095 
13096  case 988:
13097 #line 7488 "parser.y" /* yacc.c:1646 */
13098  {
13099  begin_statement ("EVALUATE", TERM_EVALUATE);
13100  eval_level++;
13101  if (eval_level >= EVAL_DEPTH) {
13102  cb_error (_("Maximum evaluate depth exceeded (%d)"),
13103  EVAL_DEPTH);
13104  eval_level = 0;
13105  eval_inc = 0;
13106  eval_inc2 = 0;
13107  YYERROR;
13108  } else {
13109  for (eval_inc = 0; eval_inc < EVAL_DEPTH; ++eval_inc) {
13111  }
13112  eval_inc = 0;
13113  eval_inc2 = 0;
13114  }
13115  }
13116 #line 13038 "parser.c" /* yacc.c:1646 */
13117  break;
13118 
13119  case 990:
13120 #line 7512 "parser.y" /* yacc.c:1646 */
13121  {
13122  cb_emit_evaluate ((yyvsp[-1]), (yyvsp[0]));
13123  eval_level--;
13124  }
13125 #line 13047 "parser.c" /* yacc.c:1646 */
13126  break;
13127 
13128  case 991:
13129 #line 7519 "parser.y" /* yacc.c:1646 */
13130  { (yyval) = CB_LIST_INIT ((yyvsp[0])); }
13131 #line 13053 "parser.c" /* yacc.c:1646 */
13132  break;
13133 
13134  case 992:
13135 #line 7521 "parser.y" /* yacc.c:1646 */
13136  { (yyval) = cb_list_add ((yyvsp[-2]), (yyvsp[0])); }
13137 #line 13059 "parser.c" /* yacc.c:1646 */
13138  break;
13139 
13140  case 993:
13141 #line 7526 "parser.y" /* yacc.c:1646 */
13142  {
13143  (yyval) = (yyvsp[0]);
13144  eval_check[eval_level][eval_inc++] = (yyvsp[0]);
13145  if (eval_inc >= EVAL_DEPTH) {
13146  cb_error (_("Maximum evaluate depth exceeded (%d)"),
13147  EVAL_DEPTH);
13148  eval_inc = 0;
13149  YYERROR;
13150  }
13151  }
13152 #line 13074 "parser.c" /* yacc.c:1646 */
13153  break;
13154 
13155  case 994:
13156 #line 7537 "parser.y" /* yacc.c:1646 */
13157  {
13158  (yyval) = cb_true;
13160  if (eval_inc >= EVAL_DEPTH) {
13161  cb_error (_("Maximum evaluate depth exceeded (%d)"),
13162  EVAL_DEPTH);
13163  eval_inc = 0;
13164  YYERROR;
13165  }
13166  }
13167 #line 13089 "parser.c" /* yacc.c:1646 */
13168  break;
13169 
13170  case 995:
13171 #line 7548 "parser.y" /* yacc.c:1646 */
13172  {
13173  (yyval) = cb_false;
13175  if (eval_inc >= EVAL_DEPTH) {
13176  cb_error (_("Maximum evaluate depth exceeded (%d)"),
13177  EVAL_DEPTH);
13178  eval_inc = 0;
13179  YYERROR;
13180  }
13181  }
13182 #line 13104 "parser.c" /* yacc.c:1646 */
13183  break;
13184 
13185  case 996:
13186 #line 7562 "parser.y" /* yacc.c:1646 */
13187  {
13188  (yyval) = cb_list_add ((yyvsp[-1]), (yyvsp[0]));
13189  }
13190 #line 13112 "parser.c" /* yacc.c:1646 */
13191  break;
13192 
13193  case 997:
13194 #line 7566 "parser.y" /* yacc.c:1646 */
13195  {
13196  (yyval) = (yyvsp[0]);
13197  }
13198 #line 13120 "parser.c" /* yacc.c:1646 */
13199  break;
13200 
13201  case 998:
13202 #line 7572 "parser.y" /* yacc.c:1646 */
13203  { (yyval) = CB_LIST_INIT ((yyvsp[0])); }
13204 #line 13126 "parser.c" /* yacc.c:1646 */
13205  break;
13206 
13207  case 999:
13208 #line 7574 "parser.y" /* yacc.c:1646 */
13209  { (yyval) = cb_list_add ((yyvsp[-1]), (yyvsp[0])); }
13210 #line 13132 "parser.c" /* yacc.c:1646 */
13211  break;
13212 
13213  case 1000:
13214 #line 7580 "parser.y" /* yacc.c:1646 */
13215  {
13216  (yyval) = CB_BUILD_CHAIN ((yyvsp[0]), (yyvsp[-1]));
13217  eval_inc2 = 0;
13218  }
13219 #line 13141 "parser.c" /* yacc.c:1646 */
13220  break;
13221 
13222  case 1001:
13223 #line 7589 "parser.y" /* yacc.c:1646 */
13224  {
13225  (yyval) = CB_BUILD_CHAIN ((yyvsp[0]), NULL);
13226  eval_inc2 = 0;
13227  }
13228 #line 13150 "parser.c" /* yacc.c:1646 */
13229  break;
13230 
13231  case 1002:
13232 #line 7597 "parser.y" /* yacc.c:1646 */
13233  {
13234  (yyval) = CB_LIST_INIT ((yyvsp[0]));
13235  eval_inc2 = 0;
13236  }
13237 #line 13159 "parser.c" /* yacc.c:1646 */
13238  break;
13239 
13240  case 1003:
13241 #line 7603 "parser.y" /* yacc.c:1646 */
13242  {
13243  (yyval) = cb_list_add ((yyvsp[-2]), (yyvsp[0]));
13244  eval_inc2 = 0;
13245  }
13246 #line 13168 "parser.c" /* yacc.c:1646 */
13247  break;
13248 
13249  case 1004:
13250 #line 7610 "parser.y" /* yacc.c:1646 */
13251  { (yyval) = CB_LIST_INIT ((yyvsp[0])); }
13252 #line 13174 "parser.c" /* yacc.c:1646 */
13253  break;
13254 
13255  case 1005:
13256 #line 7612 "parser.y" /* yacc.c:1646 */
13257  { (yyval) = cb_list_add ((yyvsp[-2]), (yyvsp[0])); }
13258 #line 13180 "parser.c" /* yacc.c:1646 */
13259  break;
13260 
13261  case 1006:
13262 #line 7617 "parser.y" /* yacc.c:1646 */
13263  {
13264  cb_tree not0;
13265  cb_tree e1;
13266  cb_tree e2;
13267  cb_tree x;
13268  cb_tree parm1;
13269 
13270  not0 = cb_int0;
13271  e2 = (yyvsp[0]);
13272  x = NULL;
13273  parm1 = (yyvsp[-1]);
13275  /* Check if the first token is NOT */
13276  /* It may belong to the EVALUATE, however see */
13277  /* below when it may be part of a partial expression */
13278  if (CB_PURPOSE_INT (parm1) == '!') {
13279  /* Pop stack if subject not TRUE / FALSE */
13280  not0 = cb_int1;
13281  x = parm1;
13282  parm1 = CB_CHAIN (parm1);
13283  }
13284  /* Partial expression handling */
13285  switch (CB_PURPOSE_INT (parm1)) {
13286  /* Relational conditions */
13287  case '<':
13288  case '>':
13289  case '[':
13290  case ']':
13291  case '~':
13292  case '=':
13293  /* Class conditions */
13294  case '9':
13295  case 'A':
13296  case 'L':
13297  case 'U':
13298  case 'P':
13299  case 'N':
13300  case 'O':
13301  case 'C':
13302  if (e2) {
13303  cb_error_x (e2, _("Invalid THROUGH usage"));
13304  e2 = NULL;
13305  }
13306  not0 = CB_PURPOSE (parm1);
13307  if (x) {
13308  /* Rebind the NOT to the partial expression */
13309  parm1 = cb_build_list (cb_int ('!'), NULL, parm1);
13310  }
13311  /* Insert subject at head of list */
13312  parm1 = cb_build_list (cb_int ('x'),
13313  eval_check[eval_level][eval_inc2], parm1);
13314  break;
13315  }
13316  }
13317 
13318  /* Build expr now */
13319  e1 = cb_build_expr (parm1);
13320 
13321  eval_inc2++;
13322  (yyval) = CB_BUILD_PAIR (not0, CB_BUILD_PAIR (e1, e2));
13323  }
13324 #line 13246 "parser.c" /* yacc.c:1646 */
13325  break;
13326 
13327  case 1007:
13328 #line 7678 "parser.y" /* yacc.c:1646 */
13329  { (yyval) = cb_any; eval_inc2++; }
13330 #line 13252 "parser.c" /* yacc.c:1646 */
13331  break;
13332 
13333  case 1008:
13334 #line 7679 "parser.y" /* yacc.c:1646 */
13335  { (yyval) = cb_true; eval_inc2++; }
13336 #line 13258 "parser.c" /* yacc.c:1646 */
13337  break;
13338 
13339  case 1009:
13340 #line 7680 "parser.y" /* yacc.c:1646 */
13341  { (yyval) = cb_false; eval_inc2++; }
13342 #line 13264 "parser.c" /* yacc.c:1646 */
13343  break;
13344 
13345  case 1010:
13346 #line 7684 "parser.y" /* yacc.c:1646 */
13347  { (yyval) = NULL; }
13348 #line 13270 "parser.c" /* yacc.c:1646 */
13349  break;
13350 
13351  case 1011:
13352 #line 7685 "parser.y" /* yacc.c:1646 */
13353  { (yyval) = (yyvsp[0]); }
13354 #line 13276 "parser.c" /* yacc.c:1646 */
13355  break;
13356 
13357  case 1012:
13358 #line 7690 "parser.y" /* yacc.c:1646 */
13359  {
13360  TERMINATOR_WARNING ((yyvsp[(-2) - (0)]), EVALUATE);
13361  }
13362 #line 13284 "parser.c" /* yacc.c:1646 */
13363  break;
13364 
13365  case 1013:
13366 #line 7694 "parser.y" /* yacc.c:1646 */
13367  {
13368  TERMINATOR_CLEAR ((yyvsp[(-2) - (1)]), EVALUATE);
13369  }
13370 #line 13292 "parser.c" /* yacc.c:1646 */
13371  break;
13372 
13373  case 1014:
13374 #line 7704 "parser.y" /* yacc.c:1646 */
13375  {
13376  begin_statement ("EXIT", 0);
13378  }
13379 #line 13301 "parser.c" /* yacc.c:1646 */
13380  break;
13381 
13382  case 1015:
13383 #line 7709 "parser.y" /* yacc.c:1646 */
13384  {
13385  cobc_cs_check = 0;
13386  }
13387 #line 13309 "parser.c" /* yacc.c:1646 */
13388  break;
13389 
13390  case 1017:
13391 #line 7717 "parser.y" /* yacc.c:1646 */
13392  {
13395  _("EXIT PROGRAM is not allowed within a USE GLOBAL procedure"));
13396  }
13399  _("EXIT PROGRAM only allowed within a PROGRAM type"));
13400  }
13401  if (current_program->flag_main) {
13402  check_unreached = 0;
13403  } else {
13404  check_unreached = 1;
13405  }
13406  if ((yyvsp[0]) != NULL) {
13408  }
13409  current_statement->name = (const char *)"EXIT PROGRAM";
13410  cb_emit_exit (0);
13411  }
13412 #line 13334 "parser.c" /* yacc.c:1646 */
13413  break;
13414 
13415  case 1018:
13416 #line 7738 "parser.y" /* yacc.c:1646 */
13417  {
13420  _("EXIT FUNCTION is not allowed within a USE GLOBAL procedure"));
13421  }
13424  _("EXIT FUNCTION only allowed within a FUNCTION type"));
13425  }
13426  check_unreached = 1;
13427  current_statement->name = (const char *)"EXIT FUNCTION";
13428  cb_emit_exit (0);
13429  }
13430 #line 13352 "parser.c" /* yacc.c:1646 */
13431  break;
13432 
13433  case 1019:
13434 #line 7752 "parser.y" /* yacc.c:1646 */
13435  {
13436  struct cb_perform *p;
13437  cb_tree plabel;
13438  char name[64];
13439 
13440  if (!perform_stack) {
13442  _("EXIT PERFORM is only valid with inline PERFORM"));
13443  } else if (CB_VALUE (perform_stack) != cb_error_node) {
13445  if (!p->cycle_label) {
13446  sprintf (name, "EXIT PERFORM CYCLE %d", cb_id);
13447  p->cycle_label = cb_build_reference (name);
13448  plabel = cb_build_label (p->cycle_label, NULL);
13449  CB_LABEL (plabel)->flag_begin = 1;
13450  CB_LABEL (plabel)->flag_dummy_exit = 1;
13451  }
13452  current_statement->name = (const char *)"EXIT PERFORM CYCLE";
13454  }
13455  }
13456 #line 13378 "parser.c" /* yacc.c:1646 */
13457  break;
13458 
13459  case 1020:
13460 #line 7774 "parser.y" /* yacc.c:1646 */
13461  {
13462  struct cb_perform *p;
13463  cb_tree plabel;
13464  char name[64];
13465 
13466  if (!perform_stack) {
13468  _("EXIT PERFORM is only valid with inline PERFORM"));
13469  } else if (CB_VALUE (perform_stack) != cb_error_node) {
13471  if (!p->exit_label) {
13472  sprintf (name, "EXIT PERFORM %d", cb_id);
13473  p->exit_label = cb_build_reference (name);
13474  plabel = cb_build_label (p->exit_label, NULL);
13475  CB_LABEL (plabel)->flag_begin = 1;
13476  CB_LABEL (plabel)->flag_dummy_exit = 1;
13477  }
13478  current_statement->name = (const char *)"EXIT PERFORM";
13480  }
13481  }
13482 #line 13404 "parser.c" /* yacc.c:1646 */
13483  break;
13484 
13485  case 1021:
13486 #line 7796 "parser.y" /* yacc.c:1646 */
13487  {
13488  cb_tree plabel;
13489  char name[64];
13490 
13491  if (!current_section) {
13493  _("EXIT SECTION is only valid with an active SECTION"));
13494  } else {
13495  if (!current_section->exit_label) {
13496  sprintf (name, "EXIT SECTION %d", cb_id);
13499  CB_LABEL (plabel)->flag_begin = 1;
13500  CB_LABEL (plabel)->flag_dummy_exit = 1;
13501  }
13502  current_statement->name = (const char *)"EXIT SECTION";
13504  }
13505  }
13506 #line 13428 "parser.c" /* yacc.c:1646 */
13507  break;
13508 
13509  case 1022:
13510 #line 7816 "parser.y" /* yacc.c:1646 */
13511  {
13512  cb_tree plabel;
13513  char name[64];
13514 
13515  if (!current_paragraph) {
13517  _("EXIT PARAGRAPH is only valid with an active PARAGRAPH"));
13518  } else {
13519  if (!current_paragraph->exit_label) {
13520  sprintf (name, "EXIT PARAGRAPH %d", cb_id);
13523  CB_LABEL (plabel)->flag_begin = 1;
13524  CB_LABEL (plabel)->flag_dummy_exit = 1;
13525  }
13526  current_statement->name = (const char *)"EXIT PARAGRAPH";
13528  }
13529  }
13530 #line 13452 "parser.c" /* yacc.c:1646 */
13531  break;
13532 
13533  case 1023:
13534 #line 7838 "parser.y" /* yacc.c:1646 */
13535  { (yyval) = NULL; }
13536 #line 13458 "parser.c" /* yacc.c:1646 */
13537  break;
13538 
13539  case 1024:
13540 #line 7839 "parser.y" /* yacc.c:1646 */
13541  { (yyval) = (yyvsp[0]); }
13542 #line 13464 "parser.c" /* yacc.c:1646 */
13543  break;
13544 
13545  case 1025:
13546 #line 7847 "parser.y" /* yacc.c:1646 */
13547  {
13548  begin_statement ("FREE", 0);
13550  }
13551 #line 13473 "parser.c" /* yacc.c:1646 */
13552  break;
13553 
13554  case 1027:
13555 #line 7856 "parser.y" /* yacc.c:1646 */
13556  {
13557  cb_emit_free ((yyvsp[0]));
13558  }
13559 #line 13481 "parser.c" /* yacc.c:1646 */
13560  break;
13561 
13562  case 1028:
13563 #line 7866 "parser.y" /* yacc.c:1646 */
13564  {
13565  begin_statement ("GENERATE", 0);
13566  PENDING("GENERATE");
13567  }
13568 #line 13490 "parser.c" /* yacc.c:1646 */
13569  break;
13570 
13571  case 1031:
13572 #line 7882 "parser.y" /* yacc.c:1646 */
13573  {
13576  }
13577  begin_statement ("GO TO", 0);
13579  start_debug = 0;
13580  }
13581 #line 13503 "parser.c" /* yacc.c:1646 */
13582  break;
13583 
13584  case 1033:
13585 #line 7895 "parser.y" /* yacc.c:1646 */
13586  {
13587  cb_emit_goto ((yyvsp[-1]), (yyvsp[0]));
13589  }
13590 #line 13512 "parser.c" /* yacc.c:1646 */
13591  break;
13592 
13593  case 1034:
13594 #line 7903 "parser.y" /* yacc.c:1646 */
13595  {
13596  check_unreached = 1;
13597  (yyval) = NULL;
13598  }
13599 #line 13521 "parser.c" /* yacc.c:1646 */
13600  break;
13601 
13602  case 1035:
13603 #line 7908 "parser.y" /* yacc.c:1646 */
13604  {
13605  check_unreached = 0;
13606  (yyval) = (yyvsp[0]);
13607  }
13608 #line 13530 "parser.c" /* yacc.c:1646 */
13609  break;
13610 
13611  case 1036:
13612 #line 7919 "parser.y" /* yacc.c:1646 */
13613  {
13614  begin_statement ("GOBACK", 0);
13615  check_unreached = 1;
13616  if ((yyvsp[0]) != NULL) {
13618  }
13619  cb_emit_exit (1U);
13620  }
13621 #line 13543 "parser.c" /* yacc.c:1646 */
13622  break;
13623 
13624  case 1037:
13625 #line 7934 "parser.y" /* yacc.c:1646 */
13626  {
13627  begin_statement ("IF", TERM_IF);
13628  }
13629 #line 13551 "parser.c" /* yacc.c:1646 */
13630  break;
13631 
13632  case 1039:
13633 #line 7943 "parser.y" /* yacc.c:1646 */
13634  {
13635  cb_emit_if ((yyvsp[(-1) - (3)]), (yyvsp[-2]), (yyvsp[0]));
13636  }
13637 #line 13559 "parser.c" /* yacc.c:1646 */
13638  break;
13639 
13640  case 1040:
13641 #line 7947 "parser.y" /* yacc.c:1646 */
13642  {
13643  cb_emit_if ((yyvsp[(-1) - (2)]), NULL, (yyvsp[0]));
13644  }
13645 #line 13567 "parser.c" /* yacc.c:1646 */
13646  break;
13647 
13648  case 1041:
13649 #line 7951 "parser.y" /* yacc.c:1646 */
13650  {
13651  cb_emit_if ((yyvsp[(-1) - (1)]), (yyvsp[0]), NULL);
13652  }
13653 #line 13575 "parser.c" /* yacc.c:1646 */
13654  break;
13655 
13656  case 1042:
13657 #line 7958 "parser.y" /* yacc.c:1646 */
13658  {
13659  TERMINATOR_WARNING ((yyvsp[(-4) - (0)]), IF);
13660  }
13661 #line 13583 "parser.c" /* yacc.c:1646 */
13662  break;
13663 
13664  case 1043:
13665 #line 7962 "parser.y" /* yacc.c:1646 */
13666  {
13667  TERMINATOR_CLEAR ((yyvsp[(-4) - (1)]), IF);
13668  }
13669 #line 13591 "parser.c" /* yacc.c:1646 */
13670  break;
13671 
13672  case 1044:
13673 #line 7972 "parser.y" /* yacc.c:1646 */
13674  {
13675  begin_statement ("INITIALIZE", 0);
13676  }
13677 #line 13599 "parser.c" /* yacc.c:1646 */
13678  break;
13679 
13680  case 1046:
13681 #line 7981 "parser.y" /* yacc.c:1646 */
13682  {
13683  cb_emit_initialize ((yyvsp[-4]), (yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]));
13684  }
13685 #line 13607 "parser.c" /* yacc.c:1646 */
13686  break;
13687 
13688  case 1047:
13689 #line 7987 "parser.y" /* yacc.c:1646 */
13690  { (yyval) = NULL; }
13691 #line 13613 "parser.c" /* yacc.c:1646 */
13692  break;
13693 
13694  case 1048:
13695 #line 7988 "parser.y" /* yacc.c:1646 */
13696  { (yyval) = cb_true; }
13697 #line 13619 "parser.c" /* yacc.c:1646 */
13698  break;
13699 
13700  case 1049:
13701 #line 7992 "parser.y" /* yacc.c:1646 */
13702  { (yyval) = NULL; }
13703 #line 13625 "parser.c" /* yacc.c:1646 */
13704  break;
13705 
13706  case 1050:
13707 #line 7993 "parser.y" /* yacc.c:1646 */
13708  { (yyval) = cb_true; }
13709 #line 13631 "parser.c" /* yacc.c:1646 */
13710  break;
13711 
13712  case 1051:
13713 #line 7994 "parser.y" /* yacc.c:1646 */
13714  { (yyval) = (yyvsp[-2]); }
13715 #line 13637 "parser.c" /* yacc.c:1646 */
13716  break;
13717 
13718  case 1052:
13719 #line 7999 "parser.y" /* yacc.c:1646 */
13720  {
13721  (yyval) = NULL;
13722  }
13723 #line 13645 "parser.c" /* yacc.c:1646 */
13724  break;
13725 
13726  case 1053:
13727 #line 8003 "parser.y" /* yacc.c:1646 */
13728  {
13729  (yyval) = (yyvsp[0]);
13730  }
13731 #line 13653 "parser.c" /* yacc.c:1646 */
13732  break;
13733 
13734  case 1054:
13735 #line 8010 "parser.y" /* yacc.c:1646 */
13736  {
13737  (yyval) = (yyvsp[0]);
13738  }
13739 #line 13661 "parser.c" /* yacc.c:1646 */
13740  break;
13741 
13742  case 1055:
13743 #line 8015 "parser.y" /* yacc.c:1646 */
13744  {
13745  (yyval) = cb_list_append ((yyvsp[-1]), (yyvsp[0]));
13746  }
13747 #line 13669 "parser.c" /* yacc.c:1646 */
13748  break;
13749 
13750  case 1056:
13751 #line 8022 "parser.y" /* yacc.c:1646 */
13752  {
13753  (yyval) = CB_BUILD_PAIR ((yyvsp[-3]), (yyvsp[0]));
13754  }
13755 #line 13677 "parser.c" /* yacc.c:1646 */
13756  break;
13757 
13758  case 1057:
13759 #line 8028 "parser.y" /* yacc.c:1646 */
13760  { (yyval) = cb_int (CB_CATEGORY_ALPHABETIC); }
13761 #line 13683 "parser.c" /* yacc.c:1646 */
13762  break;
13763 
13764  case 1058:
13765 #line 8029 "parser.y" /* yacc.c:1646 */
13766  { (yyval) = cb_int (CB_CATEGORY_ALPHANUMERIC); }
13767 #line 13689 "parser.c" /* yacc.c:1646 */
13768  break;
13769 
13770  case 1059:
13771 #line 8030 "parser.y" /* yacc.c:1646 */
13772  { (yyval) = cb_int (CB_CATEGORY_NUMERIC); }
13773 #line 13695 "parser.c" /* yacc.c:1646 */
13774  break;
13775 
13776  case 1060:
13777 #line 8031 "parser.y" /* yacc.c:1646 */
13778  { (yyval) = cb_int (CB_CATEGORY_ALPHANUMERIC_EDITED); }
13779 #line 13701 "parser.c" /* yacc.c:1646 */
13780  break;
13781 
13782  case 1061:
13783 #line 8032 "parser.y" /* yacc.c:1646 */
13784  { (yyval) = cb_int (CB_CATEGORY_NUMERIC_EDITED); }
13785 #line 13707 "parser.c" /* yacc.c:1646 */
13786  break;
13787 
13788  case 1062:
13789 #line 8033 "parser.y" /* yacc.c:1646 */
13790  { (yyval) = cb_int (CB_CATEGORY_NATIONAL); }
13791 #line 13713 "parser.c" /* yacc.c:1646 */
13792  break;
13793 
13794  case 1063:
13795 #line 8034 "parser.y" /* yacc.c:1646 */
13796  { (yyval) = cb_int (CB_CATEGORY_NATIONAL_EDITED); }
13797 #line 13719 "parser.c" /* yacc.c:1646 */
13798  break;
13799 
13800  case 1064:
13801 #line 8039 "parser.y" /* yacc.c:1646 */
13802  {
13803  (yyval) = NULL;
13804  }
13805 #line 13727 "parser.c" /* yacc.c:1646 */
13806  break;
13807 
13808  case 1065:
13809 #line 8043 "parser.y" /* yacc.c:1646 */
13810  {
13811  (yyval) = cb_true;
13812  }
13813 #line 13735 "parser.c" /* yacc.c:1646 */
13814  break;
13815 
13816  case 1066:
13817 #line 8052 "parser.y" /* yacc.c:1646 */
13818  {
13819  begin_statement ("INITIATE", 0);
13820  PENDING("INITIATE");
13821  }
13822 #line 13744 "parser.c" /* yacc.c:1646 */
13823  break;
13824 
13825  case 1068:
13826 #line 8061 "parser.y" /* yacc.c:1646 */
13827  {
13829  if ((yyvsp[0]) != cb_error_node) {
13830  }
13831  }
13832 #line 13754 "parser.c" /* yacc.c:1646 */
13833  break;
13834 
13835  case 1069:
13836 #line 8067 "parser.y" /* yacc.c:1646 */
13837  {
13839  if ((yyvsp[0]) != cb_error_node) {
13840  }
13841  }
13842 #line 13764 "parser.c" /* yacc.c:1646 */
13843  break;
13844 
13845  case 1070:
13846 #line 8078 "parser.y" /* yacc.c:1646 */
13847  {
13848  begin_statement ("INSPECT", 0);
13849  inspect_keyword = 0;
13850  }
13851 #line 13773 "parser.c" /* yacc.c:1646 */
13852  break;
13853 
13854  case 1073:
13855 #line 8091 "parser.y" /* yacc.c:1646 */
13856  {
13857  (yyval) = (yyvsp[0]);
13858  }
13859 #line 13781 "parser.c" /* yacc.c:1646 */
13860  break;
13861 
13862  case 1074:
13863 #line 8095 "parser.y" /* yacc.c:1646 */
13864  {
13865  (yyval) = (yyvsp[0]);
13866  }
13867 #line 13789 "parser.c" /* yacc.c:1646 */
13868  break;
13869 
13870  case 1075:
13871 #line 8099 "parser.y" /* yacc.c:1646 */
13872  {
13873  (yyval) = (yyvsp[0]);
13874  }
13875 #line 13797 "parser.c" /* yacc.c:1646 */
13876  break;
13877 
13878  case 1080:
13879 #line 8115 "parser.y" /* yacc.c:1646 */
13880  {
13881  cb_init_tallying ();
13882  }
13883 #line 13805 "parser.c" /* yacc.c:1646 */
13884  break;
13885 
13886  case 1081:
13887 #line 8119 "parser.y" /* yacc.c:1646 */
13888  {
13889  cb_emit_inspect ((yyvsp[-3]), (yyvsp[0]), cb_int0, 0);
13890  (yyval) = (yyvsp[-3]);
13891  }
13892 #line 13814 "parser.c" /* yacc.c:1646 */
13893  break;
13894 
13895  case 1082:
13896 #line 8129 "parser.y" /* yacc.c:1646 */
13897  {
13898  cb_emit_inspect ((yyvsp[-2]), (yyvsp[0]), cb_int1, 1);
13899  inspect_keyword = 0;
13900  }
13901 #line 13823 "parser.c" /* yacc.c:1646 */
13902  break;
13903 
13904  case 1083:
13905 #line 8139 "parser.y" /* yacc.c:1646 */
13906  {
13907  cb_tree x;
13908  x = cb_build_converting ((yyvsp[-3]), (yyvsp[-1]), (yyvsp[0]));
13909  cb_emit_inspect ((yyvsp[-5]), x, cb_int0, 2);
13910  }
13911 #line 13833 "parser.c" /* yacc.c:1646 */
13912  break;
13913 
13914  case 1084:
13915 #line 8147 "parser.y" /* yacc.c:1646 */
13916  { (yyval) = (yyvsp[0]); }
13917 #line 13839 "parser.c" /* yacc.c:1646 */
13918  break;
13919 
13920  case 1085:
13921 #line 8148 "parser.y" /* yacc.c:1646 */
13922  { (yyval) = cb_list_append ((yyvsp[-1]), (yyvsp[0])); }
13923 #line 13845 "parser.c" /* yacc.c:1646 */
13924  break;
13925 
13926  case 1086:
13927 #line 8152 "parser.y" /* yacc.c:1646 */
13928  { (yyval) = cb_build_tallying_data ((yyvsp[-1])); }
13929 #line 13851 "parser.c" /* yacc.c:1646 */
13930  break;
13931 
13932  case 1087:
13933 #line 8153 "parser.y" /* yacc.c:1646 */
13934  { (yyval) = cb_build_tallying_characters ((yyvsp[0])); }
13935 #line 13857 "parser.c" /* yacc.c:1646 */
13936  break;
13937 
13938  case 1088:
13939 #line 8154 "parser.y" /* yacc.c:1646 */
13940  { (yyval) = cb_build_tallying_all (); }
13941 #line 13863 "parser.c" /* yacc.c:1646 */
13942  break;
13943 
13944  case 1089:
13945 #line 8155 "parser.y" /* yacc.c:1646 */
13946  { (yyval) = cb_build_tallying_leading (); }
13947 #line 13869 "parser.c" /* yacc.c:1646 */
13948  break;
13949 
13950  case 1090:
13951 #line 8156 "parser.y" /* yacc.c:1646 */
13952  { (yyval) = cb_build_tallying_trailing (); }
13953 #line 13875 "parser.c" /* yacc.c:1646 */
13954  break;
13955 
13956  case 1091:
13957 #line 8157 "parser.y" /* yacc.c:1646 */
13958  { (yyval) = cb_build_tallying_value ((yyvsp[-1]), (yyvsp[0])); }
13959 #line 13881 "parser.c" /* yacc.c:1646 */
13960  break;
13961 
13962  case 1092:
13963 #line 8161 "parser.y" /* yacc.c:1646 */
13964  { (yyval) = (yyvsp[0]); }
13965 #line 13887 "parser.c" /* yacc.c:1646 */
13966  break;
13967 
13968  case 1093:
13969 #line 8162 "parser.y" /* yacc.c:1646 */
13970  { (yyval) = cb_list_append ((yyvsp[-1]), (yyvsp[0])); }
13971 #line 13893 "parser.c" /* yacc.c:1646 */
13972  break;
13973 
13974  case 1094:
13975 #line 8167 "parser.y" /* yacc.c:1646 */
13976  {
13977  (yyval) = cb_build_replacing_characters ((yyvsp[-1]), (yyvsp[0]));
13978  inspect_keyword = 0;
13979  }
13980 #line 13902 "parser.c" /* yacc.c:1646 */
13981  break;
13982 
13983  case 1095:
13984 #line 8172 "parser.y" /* yacc.c:1646 */
13985  {
13986  (yyval) = (yyvsp[0]);
13987  }
13988 #line 13910 "parser.c" /* yacc.c:1646 */
13989  break;
13990 
13991  case 1096:
13992 #line 8178 "parser.y" /* yacc.c:1646 */
13993  { /* Nothing */ }
13994 #line 13916 "parser.c" /* yacc.c:1646 */
13995  break;
13996 
13997  case 1097:
13998 #line 8179 "parser.y" /* yacc.c:1646 */
13999  { inspect_keyword = 1; }
14000 #line 13922 "parser.c" /* yacc.c:1646 */
14001  break;
14002 
14003  case 1098:
14004 #line 8180 "parser.y" /* yacc.c:1646 */
14005  { inspect_keyword = 2; }
14006 #line 13928 "parser.c" /* yacc.c:1646 */
14007  break;
14008 
14009  case 1099:
14010 #line 8181 "parser.y" /* yacc.c:1646 */
14011  { inspect_keyword = 3; }
14012 #line 13934 "parser.c" /* yacc.c:1646 */
14013  break;
14014 
14015  case 1100:
14016 #line 8182 "parser.y" /* yacc.c:1646 */
14017  { inspect_keyword = 4; }
14018 #line 13940 "parser.c" /* yacc.c:1646 */
14019  break;
14020 
14021  case 1101:
14022 #line 8187 "parser.y" /* yacc.c:1646 */
14023  {
14024  switch (inspect_keyword) {
14025  case 1:
14026  (yyval) = cb_build_replacing_all ((yyvsp[-3]), (yyvsp[-1]), (yyvsp[0]));
14027  break;
14028  case 2:
14029  (yyval) = cb_build_replacing_leading ((yyvsp[-3]), (yyvsp[-1]), (yyvsp[0]));
14030  break;
14031  case 3:
14032  (yyval) = cb_build_replacing_first ((yyvsp[-3]), (yyvsp[-1]), (yyvsp[0]));
14033  break;
14034  case 4:
14035  (yyval) = cb_build_replacing_trailing ((yyvsp[-3]), (yyvsp[-1]), (yyvsp[0]));
14036  break;
14037  default:
14039  _("INSPECT missing a keyword"));
14040  (yyval) = cb_build_replacing_all ((yyvsp[-3]), (yyvsp[-1]), (yyvsp[0]));
14041  break;
14042  }
14043  }
14044 #line 13966 "parser.c" /* yacc.c:1646 */
14045  break;
14046 
14047  case 1102:
14048 #line 8214 "parser.y" /* yacc.c:1646 */
14049  {
14050  (yyval) = cb_build_inspect_region_start ();
14051  }
14052 #line 13974 "parser.c" /* yacc.c:1646 */
14053  break;
14054 
14055  case 1103:
14056 #line 8218 "parser.y" /* yacc.c:1646 */
14057  {
14058  (yyval) = (yyvsp[0]);
14059  }
14060 #line 13982 "parser.c" /* yacc.c:1646 */
14061  break;
14062 
14063  case 1104:
14064 #line 8225 "parser.y" /* yacc.c:1646 */
14065  {
14066  (yyval) = cb_list_add ((yyvsp[-3]), CB_BUILD_FUNCALL_1 ("cob_inspect_before", (yyvsp[0])));
14067  }
14068 #line 13990 "parser.c" /* yacc.c:1646 */
14069  break;
14070 
14071  case 1105:
14072 #line 8229 "parser.y" /* yacc.c:1646 */
14073  {
14074  (yyval) = cb_list_add ((yyvsp[-3]), CB_BUILD_FUNCALL_1 ("cob_inspect_after", (yyvsp[0])));
14075  }
14076 #line 13998 "parser.c" /* yacc.c:1646 */
14077  break;
14078 
14079  case 1106:
14080 #line 8238 "parser.y" /* yacc.c:1646 */
14081  {
14082  begin_statement ("MERGE", 0);
14084  }
14085 #line 14007 "parser.c" /* yacc.c:1646 */
14086  break;
14087 
14088  case 1108:
14089 #line 8250 "parser.y" /* yacc.c:1646 */
14090  {
14091  begin_statement ("MOVE", 0);
14092  }
14093 #line 14015 "parser.c" /* yacc.c:1646 */
14094  break;
14095 
14096  case 1110:
14097 #line 8258 "parser.y" /* yacc.c:1646 */
14098  {
14099  cb_emit_move ((yyvsp[-2]), (yyvsp[0]));
14100  }
14101 #line 14023 "parser.c" /* yacc.c:1646 */
14102  break;
14103 
14104  case 1111:
14105 #line 8262 "parser.y" /* yacc.c:1646 */
14106  {
14107  cb_emit_move_corresponding ((yyvsp[-2]), (yyvsp[0]));
14108  }
14109 #line 14031 "parser.c" /* yacc.c:1646 */
14110  break;
14111 
14112  case 1112:
14113 #line 8272 "parser.y" /* yacc.c:1646 */
14114  {
14115  begin_statement ("MULTIPLY", TERM_MULTIPLY);
14116  }
14117 #line 14039 "parser.c" /* yacc.c:1646 */
14118  break;
14119 
14120  case 1114:
14121 #line 8281 "parser.y" /* yacc.c:1646 */
14122  {
14123  cb_emit_arithmetic ((yyvsp[-1]), '*', (yyvsp[-3]));
14124  }
14125 #line 14047 "parser.c" /* yacc.c:1646 */
14126  break;
14127 
14128  case 1115:
14129 #line 8285 "parser.y" /* yacc.c:1646 */
14130  {
14131  cb_emit_arithmetic ((yyvsp[-1]), 0, cb_build_binary_op ((yyvsp[-5]), '*', (yyvsp[-3])));
14132  }
14133 #line 14055 "parser.c" /* yacc.c:1646 */
14134  break;
14135 
14136  case 1116:
14137 #line 8292 "parser.y" /* yacc.c:1646 */
14138  {
14139  TERMINATOR_WARNING ((yyvsp[(-2) - (0)]), MULTIPLY);
14140  }
14141 #line 14063 "parser.c" /* yacc.c:1646 */
14142  break;
14143 
14144  case 1117:
14145 #line 8296 "parser.y" /* yacc.c:1646 */
14146  {
14147  TERMINATOR_CLEAR ((yyvsp[(-2) - (1)]), MULTIPLY);
14148  }
14149 #line 14071 "parser.c" /* yacc.c:1646 */
14150  break;
14151 
14152  case 1118:
14153 #line 8306 "parser.y" /* yacc.c:1646 */
14154  {
14155  begin_statement ("OPEN", 0);
14156  }
14157 #line 14079 "parser.c" /* yacc.c:1646 */
14158  break;
14159 
14160  case 1120:
14161 #line 8314 "parser.y" /* yacc.c:1646 */
14162  {
14163  cb_tree l;
14164  cb_tree x;
14165 
14166  if ((yyvsp[-2]) && (yyvsp[0])) {
14168  _("%s and %s are mutually exclusive"), "SHARING", "LOCK clauses");
14169  }
14170  if ((yyvsp[0])) {
14171  x = (yyvsp[0]);
14172  } else {
14173  x = (yyvsp[-2]);
14174  }
14175  for (l = (yyvsp[-1]); l; l = CB_CHAIN (l)) {
14176  if (CB_VALID_TREE (CB_VALUE (l))) {
14178  cb_emit_open (CB_VALUE (l), (yyvsp[-3]), x);
14179  }
14180  }
14181  }
14182 #line 14104 "parser.c" /* yacc.c:1646 */
14183  break;
14184 
14185  case 1121:
14186 #line 8335 "parser.y" /* yacc.c:1646 */
14187  {
14188  cb_tree l;
14189  cb_tree x;
14190 
14191  if ((yyvsp[-2]) && (yyvsp[0])) {
14193  _("%s and %s are mutually exclusive"), "SHARING", "LOCK clauses");
14194  }
14195  if ((yyvsp[0])) {
14196  x = (yyvsp[0]);
14197  } else {
14198  x = (yyvsp[-2]);
14199  }
14200  for (l = (yyvsp[-1]); l; l = CB_CHAIN (l)) {
14201  if (CB_VALID_TREE (CB_VALUE (l))) {
14203  cb_emit_open (CB_VALUE (l), (yyvsp[-3]), x);
14204  }
14205  }
14206  }
14207 #line 14129 "parser.c" /* yacc.c:1646 */
14208  break;
14209 
14210  case 1122:
14211 #line 8358 "parser.y" /* yacc.c:1646 */
14212  { (yyval) = cb_int (COB_OPEN_INPUT); }
14213 #line 14135 "parser.c" /* yacc.c:1646 */
14214  break;
14215 
14216  case 1123:
14217 #line 8359 "parser.y" /* yacc.c:1646 */
14218  { (yyval) = cb_int (COB_OPEN_OUTPUT); }
14219 #line 14141 "parser.c" /* yacc.c:1646 */
14220  break;
14221 
14222  case 1124:
14223 #line 8360 "parser.y" /* yacc.c:1646 */
14224  { (yyval) = cb_int (COB_OPEN_I_O); }
14225 #line 14147 "parser.c" /* yacc.c:1646 */
14226  break;
14227 
14228  case 1125:
14229 #line 8361 "parser.y" /* yacc.c:1646 */
14230  { (yyval) = cb_int (COB_OPEN_EXTEND); }
14231 #line 14153 "parser.c" /* yacc.c:1646 */
14232  break;
14233 
14234  case 1126:
14235 #line 8365 "parser.y" /* yacc.c:1646 */
14236  { (yyval) = NULL; }
14237 #line 14159 "parser.c" /* yacc.c:1646 */
14238  break;
14239 
14240  case 1127:
14241 #line 8366 "parser.y" /* yacc.c:1646 */
14242  { (yyval) = (yyvsp[0]); }
14243 #line 14165 "parser.c" /* yacc.c:1646 */
14244  break;
14245 
14246  case 1128:
14247 #line 8370 "parser.y" /* yacc.c:1646 */
14248  { (yyval) = NULL; }
14249 #line 14171 "parser.c" /* yacc.c:1646 */
14250  break;
14251 
14252  case 1129:
14253 #line 8371 "parser.y" /* yacc.c:1646 */
14254  { (yyval) = NULL; }
14255 #line 14177 "parser.c" /* yacc.c:1646 */
14256  break;
14257 
14258  case 1130:
14259 #line 8372 "parser.y" /* yacc.c:1646 */
14260  { (yyval) = cb_int (COB_LOCK_OPEN_EXCLUSIVE); }
14261 #line 14183 "parser.c" /* yacc.c:1646 */
14262  break;
14263 
14264  case 1131:
14265 #line 8374 "parser.y" /* yacc.c:1646 */
14266  {
14267  (void)cb_verify (CB_OBSOLETE, "REVERSED");
14268  (yyval) = NULL;
14269  }
14270 #line 14192 "parser.c" /* yacc.c:1646 */
14271  break;
14272 
14273  case 1132:
14274 #line 8385 "parser.y" /* yacc.c:1646 */
14275  {
14276  begin_statement ("PERFORM", TERM_PERFORM);
14277  /* Turn off field debug - PERFORM is special */
14279  start_debug = 0;
14280  }
14281 #line 14203 "parser.c" /* yacc.c:1646 */
14282  break;
14283 
14284  case 1134:
14285 #line 8396 "parser.y" /* yacc.c:1646 */
14286  {
14287  cb_emit_perform ((yyvsp[0]), (yyvsp[-1]));
14289  }
14290 #line 14212 "parser.c" /* yacc.c:1646 */
14291  break;
14292 
14293  case 1135:
14294 #line 8401 "parser.y" /* yacc.c:1646 */
14295  {
14296  CB_ADD_TO_CHAIN ((yyvsp[0]), perform_stack);
14297  /* Restore field debug before inline statements */
14299  }
14300 #line 14222 "parser.c" /* yacc.c:1646 */
14301  break;
14302 
14303  case 1136:
14304 #line 8407 "parser.y" /* yacc.c:1646 */
14305  {
14307  cb_emit_perform ((yyvsp[-3]), (yyvsp[-1]));
14308  }
14309 #line 14231 "parser.c" /* yacc.c:1646 */
14310  break;
14311 
14312  case 1137:
14313 #line 8412 "parser.y" /* yacc.c:1646 */
14314  {
14315  cb_emit_perform ((yyvsp[-1]), NULL);
14317  }
14318 #line 14240 "parser.c" /* yacc.c:1646 */
14319  break;
14320 
14321  case 1138:
14322 #line 8420 "parser.y" /* yacc.c:1646 */
14323  {
14324  if (cb_relaxed_syntax_check) {
14325  TERMINATOR_WARNING ((yyvsp[(-4) - (0)]), PERFORM);
14326  } else {
14327  TERMINATOR_ERROR ((yyvsp[(-4) - (0)]), PERFORM);
14328  }
14329  }
14330 #line 14252 "parser.c" /* yacc.c:1646 */
14331  break;
14332 
14333  case 1139:
14334 #line 8428 "parser.y" /* yacc.c:1646 */
14335  {
14336  TERMINATOR_CLEAR ((yyvsp[(-4) - (1)]), PERFORM);
14337  }
14338 #line 14260 "parser.c" /* yacc.c:1646 */
14339  break;
14340 
14341  case 1140:
14342 #line 8435 "parser.y" /* yacc.c:1646 */
14343  {
14344  TERMINATOR_CLEAR ((yyvsp[(-2) - (1)]), PERFORM);
14345  }
14346 #line 14268 "parser.c" /* yacc.c:1646 */
14347  break;
14348 
14349  case 1141:
14350 #line 8439 "parser.y" /* yacc.c:1646 */
14351  {
14352  if (cb_relaxed_syntax_check) {
14353  TERMINATOR_WARNING ((yyvsp[(-2) - (1)]), PERFORM);
14354  } else {
14355  TERMINATOR_ERROR ((yyvsp[(-2) - (1)]), PERFORM);
14356  }
14357  /* Put the dot token back into the stack for reparse */
14358  cb_unput_dot ();
14359  }
14360 #line 14282 "parser.c" /* yacc.c:1646 */
14361  break;
14362 
14363  case 1142:
14364 #line 8452 "parser.y" /* yacc.c:1646 */
14365  {
14366  /* Return from $1 */
14367  CB_REFERENCE ((yyvsp[0]))->length = cb_true;
14368  CB_REFERENCE ((yyvsp[0]))->flag_decl_ok = 1;
14369  (yyval) = CB_BUILD_PAIR ((yyvsp[0]), (yyvsp[0]));
14370  }
14371 #line 14293 "parser.c" /* yacc.c:1646 */
14372  break;
14373 
14374  case 1143:
14375 #line 8459 "parser.y" /* yacc.c:1646 */
14376  {
14377  /* Return from $3 */
14378  CB_REFERENCE ((yyvsp[0]))->length = cb_true;
14379  CB_REFERENCE ((yyvsp[-2]))->flag_decl_ok = 1;
14380  CB_REFERENCE ((yyvsp[0]))->flag_decl_ok = 1;
14381  (yyval) = CB_BUILD_PAIR ((yyvsp[-2]), (yyvsp[0]));
14382  }
14383 #line 14305 "parser.c" /* yacc.c:1646 */
14384  break;
14385 
14386  case 1144:
14387 #line 8470 "parser.y" /* yacc.c:1646 */
14388  {
14389  (yyval) = cb_build_perform_once (NULL);
14390  }
14391 #line 14313 "parser.c" /* yacc.c:1646 */
14392  break;
14393 
14394  case 1145:
14395 #line 8474 "parser.y" /* yacc.c:1646 */
14396  {
14397  (yyval) = cb_build_perform_times ((yyvsp[-1]));
14399  }
14400 #line 14322 "parser.c" /* yacc.c:1646 */
14401  break;
14402 
14403  case 1146:
14404 #line 8479 "parser.y" /* yacc.c:1646 */
14405  {
14406  (yyval) = cb_build_perform_forever (NULL);
14407  }
14408 #line 14330 "parser.c" /* yacc.c:1646 */
14409  break;
14410 
14411  case 1147:
14412 #line 8483 "parser.y" /* yacc.c:1646 */
14413  {
14414  cb_tree varying;
14415 
14416  if (!(yyvsp[0])) {
14417  (yyval) = cb_build_perform_forever (NULL);
14418  } else {
14419  varying = CB_LIST_INIT (cb_build_perform_varying (NULL, NULL, NULL, (yyvsp[0])));
14420  (yyval) = cb_build_perform_until ((yyvsp[-2]), varying);
14421  }
14422  }
14423 #line 14345 "parser.c" /* yacc.c:1646 */
14424  break;
14425 
14426  case 1148:
14427 #line 8494 "parser.y" /* yacc.c:1646 */
14428  {
14429  (yyval) = cb_build_perform_until ((yyvsp[-2]), (yyvsp[0]));
14430  }
14431 #line 14353 "parser.c" /* yacc.c:1646 */
14432  break;
14433 
14434  case 1149:
14435 #line 8500 "parser.y" /* yacc.c:1646 */
14436  { (yyval) = CB_BEFORE; }
14437 #line 14359 "parser.c" /* yacc.c:1646 */
14438  break;
14439 
14440  case 1150:
14441 #line 8501 "parser.y" /* yacc.c:1646 */
14442  { (yyval) = (yyvsp[0]); }
14443 #line 14365 "parser.c" /* yacc.c:1646 */
14444  break;
14445 
14446  case 1151:
14447 #line 8505 "parser.y" /* yacc.c:1646 */
14448  { (yyval) = NULL; }
14449 #line 14371 "parser.c" /* yacc.c:1646 */
14450  break;
14451 
14452  case 1152:
14453 #line 8506 "parser.y" /* yacc.c:1646 */
14454  { (yyval) = (yyvsp[0]); }
14455 #line 14377 "parser.c" /* yacc.c:1646 */
14456  break;
14457 
14458  case 1153:
14459 #line 8509 "parser.y" /* yacc.c:1646 */
14460  { (yyval) = CB_LIST_INIT ((yyvsp[0])); }
14461 #line 14383 "parser.c" /* yacc.c:1646 */
14462  break;
14463 
14464  case 1154:
14465 #line 8511 "parser.y" /* yacc.c:1646 */
14466  { (yyval) = cb_list_add ((yyvsp[-2]), (yyvsp[0])); }
14467 #line 14389 "parser.c" /* yacc.c:1646 */
14468  break;
14469 
14470  case 1155:
14471 #line 8516 "parser.y" /* yacc.c:1646 */
14472  {
14473  (yyval) = cb_build_perform_varying ((yyvsp[-6]), (yyvsp[-4]), (yyvsp[-2]), (yyvsp[0]));
14474  }
14475 #line 14397 "parser.c" /* yacc.c:1646 */
14476  break;
14477 
14478  case 1156:
14479 #line 8526 "parser.y" /* yacc.c:1646 */
14480  {
14481  begin_statement ("READ", TERM_READ);
14482  }
14483 #line 14405 "parser.c" /* yacc.c:1646 */
14484  break;
14485 
14486  case 1158:
14487 #line 8535 "parser.y" /* yacc.c:1646 */
14488  {
14489  if (CB_VALID_TREE ((yyvsp[-6]))) {
14490  struct cb_file *cf;
14491 
14492  cf = CB_FILE(cb_ref ((yyvsp[-6])));
14493  if ((yyvsp[-2]) && (cf->lock_mode & COB_LOCK_AUTOMATIC)) {
14495  _("LOCK clause invalid with file LOCK AUTOMATIC"));
14496  } else if ((yyvsp[-1]) &&
14497  (cf->organization != COB_ORG_RELATIVE &&
14498  cf->organization != COB_ORG_INDEXED)) {
14500  _("KEY clause invalid with this file type"));
14502  (cf->organization != COB_ORG_RELATIVE &&
14503  cf->organization != COB_ORG_INDEXED)) {
14505  _("INVALID KEY clause invalid with this file type"));
14506  } else {
14507  cb_emit_read ((yyvsp[-6]), (yyvsp[-5]), (yyvsp[-3]), (yyvsp[-1]), (yyvsp[-2]));
14508  }
14509  }
14510  }
14511 #line 14433 "parser.c" /* yacc.c:1646 */
14512  break;
14513 
14514  case 1159:
14515 #line 8561 "parser.y" /* yacc.c:1646 */
14516  { (yyval) = NULL; }
14517 #line 14439 "parser.c" /* yacc.c:1646 */
14518  break;
14519 
14520  case 1160:
14521 #line 8562 "parser.y" /* yacc.c:1646 */
14522  { (yyval) = (yyvsp[0]); }
14523 #line 14445 "parser.c" /* yacc.c:1646 */
14524  break;
14525 
14526  case 1161:
14527 #line 8567 "parser.y" /* yacc.c:1646 */
14528  {
14529  (yyval) = NULL;
14530  }
14531 #line 14453 "parser.c" /* yacc.c:1646 */
14532  break;
14533 
14534  case 1162:
14535 #line 8571 "parser.y" /* yacc.c:1646 */
14536  {
14537  (yyval) = cb_int3;
14538  }
14539 #line 14461 "parser.c" /* yacc.c:1646 */
14540  break;
14541 
14542  case 1163:
14543 #line 8575 "parser.y" /* yacc.c:1646 */
14544  {
14545  (yyval) = cb_int1;
14546  }
14547 #line 14469 "parser.c" /* yacc.c:1646 */
14548  break;
14549 
14550  case 1164:
14551 #line 8579 "parser.y" /* yacc.c:1646 */
14552  {
14553  (yyval) = cb_int1;
14554  }
14555 #line 14477 "parser.c" /* yacc.c:1646 */
14556  break;
14557 
14558  case 1165:
14559 #line 8583 "parser.y" /* yacc.c:1646 */
14560  {
14561  (yyval) = cb_int2;
14562  }
14563 #line 14485 "parser.c" /* yacc.c:1646 */
14564  break;
14565 
14566  case 1166:
14567 #line 8587 "parser.y" /* yacc.c:1646 */
14568  {
14569  (yyval) = cb_int3;
14570  }
14571 #line 14493 "parser.c" /* yacc.c:1646 */
14572  break;
14573 
14574  case 1167:
14575 #line 8591 "parser.y" /* yacc.c:1646 */
14576  {
14577  (yyval) = cb_int4;
14578  }
14579 #line 14501 "parser.c" /* yacc.c:1646 */
14580  break;
14581 
14582  case 1168:
14583 #line 8597 "parser.y" /* yacc.c:1646 */
14584  { (yyval) = NULL; }
14585 #line 14507 "parser.c" /* yacc.c:1646 */
14586  break;
14587 
14588  case 1169:
14589 #line 8598 "parser.y" /* yacc.c:1646 */
14590  { (yyval) = (yyvsp[0]); }
14591 #line 14513 "parser.c" /* yacc.c:1646 */
14592  break;
14593 
14594  case 1172:
14595 #line 8608 "parser.y" /* yacc.c:1646 */
14596  {
14597  TERMINATOR_WARNING ((yyvsp[(-2) - (0)]), READ);
14598  }
14599 #line 14521 "parser.c" /* yacc.c:1646 */
14600  break;
14601 
14602  case 1173:
14603 #line 8612 "parser.y" /* yacc.c:1646 */
14604  {
14605  TERMINATOR_CLEAR ((yyvsp[(-2) - (1)]), READ);
14606  }
14607 #line 14529 "parser.c" /* yacc.c:1646 */
14608  break;
14609 
14610  case 1174:
14611 #line 8622 "parser.y" /* yacc.c:1646 */
14612  {
14613  begin_statement ("READY TRACE", 0);
14615  }
14616 #line 14538 "parser.c" /* yacc.c:1646 */
14617  break;
14618 
14619  case 1175:
14620 #line 8632 "parser.y" /* yacc.c:1646 */
14621  {
14622  begin_statement ("RELEASE", 0);
14623  }
14624 #line 14546 "parser.c" /* yacc.c:1646 */
14625  break;
14626 
14627  case 1177:
14628 #line 8640 "parser.y" /* yacc.c:1646 */
14629  {
14630  cb_emit_release ((yyvsp[-1]), (yyvsp[0]));
14631  }
14632 #line 14554 "parser.c" /* yacc.c:1646 */
14633  break;
14634 
14635  case 1178:
14636 #line 8650 "parser.y" /* yacc.c:1646 */
14637  {
14638  begin_statement ("RESET TRACE", 0);
14640  }
14641 #line 14563 "parser.c" /* yacc.c:1646 */
14642  break;
14643 
14644  case 1179:
14645 #line 8660 "parser.y" /* yacc.c:1646 */
14646  {
14647  begin_statement ("RETURN", TERM_RETURN);
14648  }
14649 #line 14571 "parser.c" /* yacc.c:1646 */
14650  break;
14651 
14652  case 1181:
14653 #line 8669 "parser.y" /* yacc.c:1646 */
14654  {
14655  cb_emit_return ((yyvsp[-3]), (yyvsp[-1]));
14656  }
14657 #line 14579 "parser.c" /* yacc.c:1646 */
14658  break;
14659 
14660  case 1182:
14661 #line 8676 "parser.y" /* yacc.c:1646 */
14662  {
14663  TERMINATOR_WARNING ((yyvsp[(-2) - (0)]), RETURN);
14664  }
14665 #line 14587 "parser.c" /* yacc.c:1646 */
14666  break;
14667 
14668  case 1183:
14669 #line 8680 "parser.y" /* yacc.c:1646 */
14670  {
14671  TERMINATOR_CLEAR ((yyvsp[(-2) - (1)]), RETURN);
14672  }
14673 #line 14595 "parser.c" /* yacc.c:1646 */
14674  break;
14675 
14676  case 1184:
14677 #line 8690 "parser.y" /* yacc.c:1646 */
14678  {
14679  begin_statement ("REWRITE", TERM_REWRITE);
14680  /* Special in debugging mode */
14682  start_debug = 0;
14683  }
14684 #line 14606 "parser.c" /* yacc.c:1646 */
14685  break;
14686 
14687  case 1186:
14688 #line 8702 "parser.y" /* yacc.c:1646 */
14689  {
14690  cb_emit_rewrite ((yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]));
14692  }
14693 #line 14615 "parser.c" /* yacc.c:1646 */
14694  break;
14695 
14696  case 1187:
14697 #line 8710 "parser.y" /* yacc.c:1646 */
14698  {
14699  (yyval) = NULL;
14700  }
14701 #line 14623 "parser.c" /* yacc.c:1646 */
14702  break;
14703 
14704  case 1188:
14705 #line 8714 "parser.y" /* yacc.c:1646 */
14706  {
14707  (yyval) = cb_int1;
14708  }
14709 #line 14631 "parser.c" /* yacc.c:1646 */
14710  break;
14711 
14712  case 1189:
14713 #line 8718 "parser.y" /* yacc.c:1646 */
14714  {
14715  (yyval) = cb_int2;
14716  }
14717 #line 14639 "parser.c" /* yacc.c:1646 */
14718  break;
14719 
14720  case 1190:
14721 #line 8725 "parser.y" /* yacc.c:1646 */
14722  {
14723  TERMINATOR_WARNING ((yyvsp[(-2) - (0)]), REWRITE);
14724  }
14725 #line 14647 "parser.c" /* yacc.c:1646 */
14726  break;
14727 
14728  case 1191:
14729 #line 8729 "parser.y" /* yacc.c:1646 */
14730  {
14731  TERMINATOR_CLEAR ((yyvsp[(-2) - (1)]), REWRITE);
14732  }
14733 #line 14655 "parser.c" /* yacc.c:1646 */
14734  break;
14735 
14736  case 1192:
14737 #line 8739 "parser.y" /* yacc.c:1646 */
14738  {
14739  begin_statement ("ROLLBACK", 0);
14740  cb_emit_rollback ();
14741  }
14742 #line 14664 "parser.c" /* yacc.c:1646 */
14743  break;
14744 
14745  case 1193:
14746 #line 8750 "parser.y" /* yacc.c:1646 */
14747  {
14748  begin_statement ("SEARCH", TERM_SEARCH);
14749  }
14750 #line 14672 "parser.c" /* yacc.c:1646 */
14751  break;
14752 
14753  case 1195:
14754 #line 8759 "parser.y" /* yacc.c:1646 */
14755  {
14756  cb_emit_search ((yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]));
14757  }
14758 #line 14680 "parser.c" /* yacc.c:1646 */
14759  break;
14760 
14761  case 1196:
14762 #line 8764 "parser.y" /* yacc.c:1646 */
14763  {
14764  current_statement->name = (const char *)"SEARCH ALL";
14765  cb_emit_search_all ((yyvsp[-4]), (yyvsp[-3]), (yyvsp[-1]), (yyvsp[0]));
14766  }
14767 #line 14689 "parser.c" /* yacc.c:1646 */
14768  break;
14769 
14770  case 1197:
14771 #line 8771 "parser.y" /* yacc.c:1646 */
14772  { (yyval) = NULL; }
14773 #line 14695 "parser.c" /* yacc.c:1646 */
14774  break;
14775 
14776  case 1198:
14777 #line 8772 "parser.y" /* yacc.c:1646 */
14778  { (yyval) = (yyvsp[0]); }
14779 #line 14701 "parser.c" /* yacc.c:1646 */
14780  break;
14781 
14782  case 1199:
14783 #line 8777 "parser.y" /* yacc.c:1646 */
14784  {
14785  (yyval) = NULL;
14786  }
14787 #line 14709 "parser.c" /* yacc.c:1646 */
14788  break;
14789 
14790  case 1200:
14791 #line 8782 "parser.y" /* yacc.c:1646 */
14792  {
14793  (yyval) = (yyvsp[0]);
14794  }
14795 #line 14717 "parser.c" /* yacc.c:1646 */
14796  break;
14797 
14798  case 1201:
14799 #line 8789 "parser.y" /* yacc.c:1646 */
14800  {
14801  (yyval) = CB_LIST_INIT ((yyvsp[0]));
14802  }
14803 #line 14725 "parser.c" /* yacc.c:1646 */
14804  break;
14805 
14806  case 1202:
14807 #line 8793 "parser.y" /* yacc.c:1646 */
14808  {
14809  (yyval) = cb_list_add ((yyvsp[0]), (yyvsp[-1]));
14810  }
14811 #line 14733 "parser.c" /* yacc.c:1646 */
14812  break;
14813 
14814  case 1203:
14815 #line 8801 "parser.y" /* yacc.c:1646 */
14816  {
14817  (yyval) = cb_build_if_check_break ((yyvsp[-1]), (yyvsp[0]));
14818  }
14819 #line 14741 "parser.c" /* yacc.c:1646 */
14820  break;
14821 
14822  case 1204:
14823 #line 8808 "parser.y" /* yacc.c:1646 */
14824  {
14825  TERMINATOR_WARNING ((yyvsp[(-2) - (0)]), SEARCH);
14826  }
14827 #line 14749 "parser.c" /* yacc.c:1646 */
14828  break;
14829 
14830  case 1205:
14831 #line 8812 "parser.y" /* yacc.c:1646 */
14832  {
14833  TERMINATOR_CLEAR ((yyvsp[(-2) - (1)]), SEARCH);
14834  }
14835 #line 14757 "parser.c" /* yacc.c:1646 */
14836  break;
14837 
14838  case 1206:
14839 #line 8822 "parser.y" /* yacc.c:1646 */
14840  {
14841  begin_statement ("SET", 0);
14842  setattr_val_on = 0;
14843  setattr_val_off = 0;
14845  }
14846 #line 14768 "parser.c" /* yacc.c:1646 */
14847  break;
14848 
14849  case 1207:
14850 #line 8829 "parser.y" /* yacc.c:1646 */
14851  {
14852  cobc_cs_check = 0;
14853  }
14854 #line 14776 "parser.c" /* yacc.c:1646 */
14855  break;
14856 
14857  case 1215:
14858 #line 8845 "parser.y" /* yacc.c:1646 */
14859  { (yyval) = cb_int1; }
14860 #line 14782 "parser.c" /* yacc.c:1646 */
14861  break;
14862 
14863  case 1216:
14864 #line 8846 "parser.y" /* yacc.c:1646 */
14865  { (yyval) = cb_int0; }
14866 #line 14788 "parser.c" /* yacc.c:1646 */
14867  break;
14868 
14869  case 1217:
14870 #line 8850 "parser.y" /* yacc.c:1646 */
14871  { (yyval) = cb_int0; }
14872 #line 14794 "parser.c" /* yacc.c:1646 */
14873  break;
14874 
14875  case 1218:
14876 #line 8851 "parser.y" /* yacc.c:1646 */
14877  { (yyval) = cb_int1; }
14878 #line 14800 "parser.c" /* yacc.c:1646 */
14879  break;
14880 
14881  case 1219:
14882 #line 8858 "parser.y" /* yacc.c:1646 */
14883  {
14884  cb_emit_setenv ((yyvsp[-2]), (yyvsp[0]));
14885  }
14886 #line 14808 "parser.c" /* yacc.c:1646 */
14887  break;
14888 
14889  case 1220:
14890 #line 8867 "parser.y" /* yacc.c:1646 */
14891  {
14893  }
14894 #line 14816 "parser.c" /* yacc.c:1646 */
14895  break;
14896 
14897  case 1223:
14898 #line 8879 "parser.y" /* yacc.c:1646 */
14899  {
14900  bit_set_attr ((yyvsp[0]), COB_SCREEN_BELL);
14901  }
14902 #line 14824 "parser.c" /* yacc.c:1646 */
14903  break;
14904 
14905  case 1224:
14906 #line 8883 "parser.y" /* yacc.c:1646 */
14907  {
14908  bit_set_attr ((yyvsp[0]), COB_SCREEN_BLINK);
14909  }
14910 #line 14832 "parser.c" /* yacc.c:1646 */
14911  break;
14912 
14913  case 1225:
14914 #line 8887 "parser.y" /* yacc.c:1646 */
14915  {
14916  bit_set_attr ((yyvsp[0]), COB_SCREEN_HIGHLIGHT);
14919  }
14920 #line 14842 "parser.c" /* yacc.c:1646 */
14921  break;
14922 
14923  case 1226:
14924 #line 8893 "parser.y" /* yacc.c:1646 */
14925  {
14926  bit_set_attr ((yyvsp[0]), COB_SCREEN_LOWLIGHT);
14929  }
14930 #line 14852 "parser.c" /* yacc.c:1646 */
14931  break;
14932 
14933  case 1227:
14934 #line 8899 "parser.y" /* yacc.c:1646 */
14935  {
14936  bit_set_attr ((yyvsp[0]), COB_SCREEN_REVERSE);
14937  }
14938 #line 14860 "parser.c" /* yacc.c:1646 */
14939  break;
14940 
14941  case 1228:
14942 #line 8903 "parser.y" /* yacc.c:1646 */
14943  {
14944  bit_set_attr ((yyvsp[0]), COB_SCREEN_UNDERLINE);
14945  }
14946 #line 14868 "parser.c" /* yacc.c:1646 */
14947  break;
14948 
14949  case 1229:
14950 #line 8907 "parser.y" /* yacc.c:1646 */
14951  {
14952  bit_set_attr ((yyvsp[0]), COB_SCREEN_LEFTLINE);
14953  }
14954 #line 14876 "parser.c" /* yacc.c:1646 */
14955  break;
14956 
14957  case 1230:
14958 #line 8911 "parser.y" /* yacc.c:1646 */
14959  {
14960  bit_set_attr ((yyvsp[0]), COB_SCREEN_OVERLINE);
14961  }
14962 #line 14884 "parser.c" /* yacc.c:1646 */
14963  break;
14964 
14965  case 1231:
14966 #line 8920 "parser.y" /* yacc.c:1646 */
14967  {
14968  cb_emit_set_to ((yyvsp[-3]), cb_build_ppointer ((yyvsp[0])));
14969  }
14970 #line 14892 "parser.c" /* yacc.c:1646 */
14971  break;
14972 
14973  case 1232:
14974 #line 8924 "parser.y" /* yacc.c:1646 */
14975  {
14976  cb_emit_set_to ((yyvsp[-2]), (yyvsp[0]));
14977  }
14978 #line 14900 "parser.c" /* yacc.c:1646 */
14979  break;
14980 
14981  case 1233:
14982 #line 8933 "parser.y" /* yacc.c:1646 */
14983  {
14984  cb_emit_set_up_down ((yyvsp[-3]), (yyvsp[-2]), (yyvsp[0]));
14985  }
14986 #line 14908 "parser.c" /* yacc.c:1646 */
14987  break;
14988 
14989  case 1236:
14990 #line 8947 "parser.y" /* yacc.c:1646 */
14991  {
14992  cb_emit_set_on_off ((yyvsp[-2]), (yyvsp[0]));
14993  }
14994 #line 14916 "parser.c" /* yacc.c:1646 */
14995  break;
14996 
14997  case 1239:
14998 #line 8961 "parser.y" /* yacc.c:1646 */
14999  {
15000  cb_emit_set_true ((yyvsp[-2]));
15001  }
15002 #line 14924 "parser.c" /* yacc.c:1646 */
15003  break;
15004 
15005  case 1240:
15006 #line 8965 "parser.y" /* yacc.c:1646 */
15007  {
15008  cb_emit_set_false ((yyvsp[-2]));
15009  }
15010 #line 14932 "parser.c" /* yacc.c:1646 */
15011  break;
15012 
15013  case 1241:
15014 #line 8974 "parser.y" /* yacc.c:1646 */
15015  {
15017  }
15018 #line 14940 "parser.c" /* yacc.c:1646 */
15019  break;
15020 
15021  case 1242:
15022 #line 8983 "parser.y" /* yacc.c:1646 */
15023  {
15024  begin_statement ("SORT", 0);
15025  }
15026 #line 14948 "parser.c" /* yacc.c:1646 */
15027  break;
15028 
15029  case 1244:
15030 #line 8991 "parser.y" /* yacc.c:1646 */
15031  {
15032  cb_tree x;
15033 
15034  x = cb_ref ((yyvsp[-3]));
15035  if (CB_VALID_TREE (x)) {
15036  if (CB_INVALID_TREE ((yyvsp[-2]))) {
15037  if (CB_FILE_P (x)) {
15038  cb_error (_("File sort requires KEY phrase"));
15039  } else {
15040  cb_error (_("Table sort without keys not implemented yet"));
15041  }
15042  (yyval) = NULL;
15043  } else {
15044  cb_emit_sort_init ((yyvsp[-3]), (yyvsp[-2]), (yyvsp[0]));
15045  (yyval)= (yyvsp[-3]);
15046  }
15047  } else {
15048  (yyval) = NULL;
15049  }
15050  }
15051 #line 14973 "parser.c" /* yacc.c:1646 */
15052  break;
15053 
15054  case 1245:
15055 #line 9012 "parser.y" /* yacc.c:1646 */
15056  {
15057  if ((yyvsp[-2]) && CB_VALID_TREE ((yyvsp[-6]))) {
15058  cb_emit_sort_finish ((yyvsp[-6]));
15059  }
15060  }
15061 #line 14983 "parser.c" /* yacc.c:1646 */
15062  break;
15063 
15064  case 1246:
15065 #line 9021 "parser.y" /* yacc.c:1646 */
15066  {
15067  (yyval) = NULL;
15068  }
15069 #line 14991 "parser.c" /* yacc.c:1646 */
15070  break;
15071 
15072  case 1247:
15073 #line 9026 "parser.y" /* yacc.c:1646 */
15074  {
15075  cb_tree l;
15076  cb_tree lparm;
15077 
15078  if ((yyvsp[0]) == NULL) {
15079  l = CB_LIST_INIT (NULL);
15080  } else {
15081  l = (yyvsp[0]);
15082  }
15083  lparm = l;
15084  for (; l; l = CB_CHAIN (l)) {
15085  CB_PURPOSE (l) = (yyvsp[-2]);
15086  }
15087  (yyval) = cb_list_append ((yyvsp[-4]), lparm);
15088  }
15089 #line 15011 "parser.c" /* yacc.c:1646 */
15090  break;
15091 
15092  case 1248:
15093 #line 9044 "parser.y" /* yacc.c:1646 */
15094  { (yyval) = NULL; }
15095 #line 15017 "parser.c" /* yacc.c:1646 */
15096  break;
15097 
15098  case 1249:
15099 #line 9045 "parser.y" /* yacc.c:1646 */
15100  { (yyval) = cb_list_add ((yyvsp[-1]), (yyvsp[0])); }
15101 #line 15023 "parser.c" /* yacc.c:1646 */
15102  break;
15103 
15104  case 1251:
15105 #line 9050 "parser.y" /* yacc.c:1646 */
15106  {
15107  /* The OC sort is a stable sort. ie. Dups are per default in order */
15108  /* Therefore nothing to do here */
15109  }
15110 #line 15032 "parser.c" /* yacc.c:1646 */
15111  break;
15112 
15113  case 1252:
15114 #line 9057 "parser.y" /* yacc.c:1646 */
15115  { (yyval) = cb_null; }
15116 #line 15038 "parser.c" /* yacc.c:1646 */
15117  break;
15118 
15119  case 1253:
15120 #line 9058 "parser.y" /* yacc.c:1646 */
15121  { (yyval) = cb_ref ((yyvsp[0])); }
15122 #line 15044 "parser.c" /* yacc.c:1646 */
15123  break;
15124 
15125  case 1254:
15126 #line 9063 "parser.y" /* yacc.c:1646 */
15127  {
15128  if ((yyvsp[0]) && CB_FILE_P (cb_ref ((yyvsp[0])))) {
15129  cb_error (_("File sort requires USING or INPUT PROCEDURE"));
15130  }
15131  }
15132 #line 15054 "parser.c" /* yacc.c:1646 */
15133  break;
15134 
15135  case 1255:
15136 #line 9069 "parser.y" /* yacc.c:1646 */
15137  {
15138  if ((yyvsp[-2])) {
15139  if (!CB_FILE_P (cb_ref ((yyvsp[-2])))) {
15140  cb_error (_("USING invalid with table SORT"));
15141  } else {
15142  cb_emit_sort_using ((yyvsp[-2]), (yyvsp[0]));
15143  }
15144  }
15145  }
15146 #line 15068 "parser.c" /* yacc.c:1646 */
15147  break;
15148 
15149  case 1256:
15150 #line 9079 "parser.y" /* yacc.c:1646 */
15151  {
15152  if ((yyvsp[-4])) {
15153  if (!CB_FILE_P (cb_ref ((yyvsp[-4])))) {
15154  cb_error (_("INPUT PROCEDURE invalid with table SORT"));
15155  } else if (current_statement->flag_merge) {
15156  cb_error (_("INPUT PROCEDURE invalid with MERGE"));
15157  } else {
15158  cb_emit_sort_input ((yyvsp[0]));
15159  }
15160  }
15161  }
15162 #line 15084 "parser.c" /* yacc.c:1646 */
15163  break;
15164 
15165  case 1257:
15166 #line 9094 "parser.y" /* yacc.c:1646 */
15167  {
15168  if ((yyvsp[(-1) - (0)]) && CB_FILE_P (cb_ref ((yyvsp[(-1) - (0)])))) {
15169  cb_error (_("File sort requires GIVING or OUTPUT PROCEDURE"));
15170  }
15171  }
15172 #line 15094 "parser.c" /* yacc.c:1646 */
15173  break;
15174 
15175  case 1258:
15176 #line 9100 "parser.y" /* yacc.c:1646 */
15177  {
15178  if ((yyvsp[(-1) - (2)])) {
15179  if (!CB_FILE_P (cb_ref ((yyvsp[(-1) - (2)])))) {
15180  cb_error (_("GIVING invalid with table SORT"));
15181  } else {
15182  cb_emit_sort_giving ((yyvsp[(-1) - (2)]), (yyvsp[0]));
15183  }
15184  }
15185  }
15186 #line 15108 "parser.c" /* yacc.c:1646 */
15187  break;
15188 
15189  case 1259:
15190 #line 9110 "parser.y" /* yacc.c:1646 */
15191  {
15192  if ((yyvsp[(-1) - (4)])) {
15193  if (!CB_FILE_P (cb_ref ((yyvsp[(-1) - (4)])))) {
15194  cb_error (_("OUTPUT PROCEDURE invalid with table SORT"));
15195  } else {
15196  cb_emit_sort_output ((yyvsp[0]));
15197  }
15198  }
15199  }
15200 #line 15122 "parser.c" /* yacc.c:1646 */
15201  break;
15202 
15203  case 1260:
15204 #line 9126 "parser.y" /* yacc.c:1646 */
15205  {
15206  begin_statement ("START", TERM_START);
15207  start_tree = cb_int (COB_EQ);
15208  }
15209 #line 15131 "parser.c" /* yacc.c:1646 */
15210  break;
15211 
15212  case 1262:
15213 #line 9136 "parser.y" /* yacc.c:1646 */
15214  {
15215  if ((yyvsp[-1]) && !(yyvsp[-2])) {
15217  _("SIZE/LENGTH invalid here"));
15218  } else {
15219  cb_emit_start ((yyvsp[-3]), start_tree, (yyvsp[-2]), (yyvsp[-1]));
15220  }
15221  }
15222 #line 15144 "parser.c" /* yacc.c:1646 */
15223  break;
15224 
15225  case 1263:
15226 #line 9148 "parser.y" /* yacc.c:1646 */
15227  {
15228  (yyval) = NULL;
15229  }
15230 #line 15152 "parser.c" /* yacc.c:1646 */
15231  break;
15232 
15233  case 1264:
15234 #line 9152 "parser.y" /* yacc.c:1646 */
15235  {
15236  (yyval) = (yyvsp[0]);
15237  }
15238 #line 15160 "parser.c" /* yacc.c:1646 */
15239  break;
15240 
15241  case 1265:
15242 #line 9159 "parser.y" /* yacc.c:1646 */
15243  {
15244  (yyval) = NULL;
15245  }
15246 #line 15168 "parser.c" /* yacc.c:1646 */
15247  break;
15248 
15249  case 1266:
15250 #line 9163 "parser.y" /* yacc.c:1646 */
15251  {
15252  start_tree = (yyvsp[-1]);
15253  (yyval) = (yyvsp[0]);
15254  }
15255 #line 15177 "parser.c" /* yacc.c:1646 */
15256  break;
15257 
15258  case 1267:
15259 #line 9168 "parser.y" /* yacc.c:1646 */
15260  {
15261  start_tree = cb_int (COB_FI);
15262  (yyval) = NULL;
15263  }
15264 #line 15186 "parser.c" /* yacc.c:1646 */
15265  break;
15266 
15267  case 1268:
15268 #line 9173 "parser.y" /* yacc.c:1646 */
15269  {
15270  start_tree = cb_int (COB_LA);
15271  (yyval) = NULL;
15272  }
15273 #line 15195 "parser.c" /* yacc.c:1646 */
15274  break;
15275 
15276  case 1269:
15277 #line 9180 "parser.y" /* yacc.c:1646 */
15278  { (yyval) = cb_int (COB_EQ); }
15279 #line 15201 "parser.c" /* yacc.c:1646 */
15280  break;
15281 
15282  case 1270:
15283 #line 9181 "parser.y" /* yacc.c:1646 */
15284  { (yyval) = cb_int ((yyvsp[-1]) ? COB_LE : COB_GT); }
15285 #line 15207 "parser.c" /* yacc.c:1646 */
15286  break;
15287 
15288  case 1271:
15289 #line 9182 "parser.y" /* yacc.c:1646 */
15290  { (yyval) = cb_int ((yyvsp[-1]) ? COB_GE : COB_LT); }
15291 #line 15213 "parser.c" /* yacc.c:1646 */
15292  break;
15293 
15294  case 1272:
15295 #line 9183 "parser.y" /* yacc.c:1646 */
15296  { (yyval) = cb_int ((yyvsp[-1]) ? COB_LT : COB_GE); }
15297 #line 15219 "parser.c" /* yacc.c:1646 */
15298  break;
15299 
15300  case 1273:
15301 #line 9184 "parser.y" /* yacc.c:1646 */
15302  { (yyval) = cb_int ((yyvsp[-1]) ? COB_GT : COB_LE); }
15303 #line 15225 "parser.c" /* yacc.c:1646 */
15304  break;
15305 
15306  case 1274:
15307 #line 9185 "parser.y" /* yacc.c:1646 */
15308  { (yyval) = cb_int (COB_NE); }
15309 #line 15231 "parser.c" /* yacc.c:1646 */
15310  break;
15311 
15312  case 1275:
15313 #line 9190 "parser.y" /* yacc.c:1646 */
15314  {
15316  _("NOT EQUAL condition disallowed on START statement"));
15317  }
15318 #line 15240 "parser.c" /* yacc.c:1646 */
15319  break;
15320 
15321  case 1278:
15322 #line 9203 "parser.y" /* yacc.c:1646 */
15323  {
15324  TERMINATOR_WARNING ((yyvsp[(-2) - (0)]), START);
15325  }
15326 #line 15248 "parser.c" /* yacc.c:1646 */
15327  break;
15328 
15329  case 1279:
15330 #line 9207 "parser.y" /* yacc.c:1646 */
15331  {
15332  TERMINATOR_CLEAR ((yyvsp[(-2) - (1)]), START);
15333  }
15334 #line 15256 "parser.c" /* yacc.c:1646 */
15335  break;
15336 
15337  case 1280:
15338 #line 9217 "parser.y" /* yacc.c:1646 */
15339  {
15340  begin_statement ("STOP RUN", 0);
15341  }
15342 #line 15264 "parser.c" /* yacc.c:1646 */
15343  break;
15344 
15345  case 1281:
15346 #line 9221 "parser.y" /* yacc.c:1646 */
15347  {
15348  cb_emit_stop_run ((yyvsp[0]));
15349  check_unreached = 1;
15350  cobc_cs_check = 0;
15351  }
15352 #line 15274 "parser.c" /* yacc.c:1646 */
15353  break;
15354 
15355  case 1282:
15356 #line 9227 "parser.y" /* yacc.c:1646 */
15357  {
15358  begin_statement ("STOP", 0);
15359  cb_verify (cb_stop_literal_statement, "STOP literal");
15360  cb_emit_display (CB_LIST_INIT ((yyvsp[0])), cb_int0, cb_int1, NULL,
15361  NULL);
15363  cobc_cs_check = 0;
15364  }
15365 #line 15287 "parser.c" /* yacc.c:1646 */
15366  break;
15367 
15368  case 1283:
15369 #line 9239 "parser.y" /* yacc.c:1646 */
15370  {
15371  (yyval) = current_program->cb_return_code;
15372  }
15373 #line 15295 "parser.c" /* yacc.c:1646 */
15374  break;
15375 
15376  case 1284:
15377 #line 9243 "parser.y" /* yacc.c:1646 */
15378  {
15379  (yyval) = (yyvsp[0]);
15380  }
15381 #line 15303 "parser.c" /* yacc.c:1646 */
15382  break;
15383 
15384  case 1285:
15385 #line 9247 "parser.y" /* yacc.c:1646 */
15386  {
15387  if ((yyvsp[0])) {
15388  (yyval) = (yyvsp[0]);
15389  } else {
15390  (yyval) = cb_int1;
15391  }
15392  }
15393 #line 15315 "parser.c" /* yacc.c:1646 */
15394  break;
15395 
15396  case 1286:
15397 #line 9255 "parser.y" /* yacc.c:1646 */
15398  {
15399  if ((yyvsp[0])) {
15400  (yyval) = (yyvsp[0]);
15401  } else {
15402  (yyval) = cb_int0;
15403  }
15404  }
15405 #line 15327 "parser.c" /* yacc.c:1646 */
15406  break;
15407 
15408  case 1287:
15409 #line 9266 "parser.y" /* yacc.c:1646 */
15410  {
15411  (yyval) = NULL;
15412  }
15413 #line 15335 "parser.c" /* yacc.c:1646 */
15414  break;
15415 
15416  case 1288:
15417 #line 9270 "parser.y" /* yacc.c:1646 */
15418  {
15419  (yyval) = (yyvsp[0]);
15420  }
15421 #line 15343 "parser.c" /* yacc.c:1646 */
15422  break;
15423 
15424  case 1289:
15425 #line 9276 "parser.y" /* yacc.c:1646 */
15426  { (yyval) = (yyvsp[0]); }
15427 #line 15349 "parser.c" /* yacc.c:1646 */
15428  break;
15429 
15430  case 1290:
15431 #line 9277 "parser.y" /* yacc.c:1646 */
15432  { (yyval) = cb_space; }
15433 #line 15355 "parser.c" /* yacc.c:1646 */
15434  break;
15435 
15436  case 1291:
15437 #line 9278 "parser.y" /* yacc.c:1646 */
15438  { (yyval) = cb_zero; }
15439 #line 15361 "parser.c" /* yacc.c:1646 */
15440  break;
15441 
15442  case 1292:
15443 #line 9279 "parser.y" /* yacc.c:1646 */
15444  { (yyval) = cb_quote; }
15445 #line 15367 "parser.c" /* yacc.c:1646 */
15446  break;
15447 
15448  case 1293:
15449 #line 9286 "parser.y" /* yacc.c:1646 */
15450  {
15451  begin_statement ("STRING", TERM_STRING);
15452  }
15453 #line 15375 "parser.c" /* yacc.c:1646 */
15454  break;
15455 
15456  case 1295:
15457 #line 9295 "parser.y" /* yacc.c:1646 */
15458  {
15459  cb_emit_string ((yyvsp[-4]), (yyvsp[-2]), (yyvsp[-1]));
15460  }
15461 #line 15383 "parser.c" /* yacc.c:1646 */
15462  break;
15463 
15464  case 1296:
15465 #line 9301 "parser.y" /* yacc.c:1646 */
15466  { (yyval) = CB_LIST_INIT ((yyvsp[0])); }
15467 #line 15389 "parser.c" /* yacc.c:1646 */
15468  break;
15469 
15470  case 1297:
15471 #line 9302 "parser.y" /* yacc.c:1646 */
15472  { (yyval) = cb_list_add ((yyvsp[-1]), (yyvsp[0])); }
15473 #line 15395 "parser.c" /* yacc.c:1646 */
15474  break;
15475 
15476  case 1298:
15477 #line 9306 "parser.y" /* yacc.c:1646 */
15478  { (yyval) = (yyvsp[0]); }
15479 #line 15401 "parser.c" /* yacc.c:1646 */
15480  break;
15481 
15482  case 1299:
15483 #line 9307 "parser.y" /* yacc.c:1646 */
15484  { (yyval) = CB_BUILD_PAIR (cb_int0, NULL); }
15485 #line 15407 "parser.c" /* yacc.c:1646 */
15486  break;
15487 
15488  case 1300:
15489 #line 9308 "parser.y" /* yacc.c:1646 */
15490  { (yyval) = CB_BUILD_PAIR ((yyvsp[0]), NULL); }
15491 #line 15413 "parser.c" /* yacc.c:1646 */
15492  break;
15493 
15494  case 1301:
15495 #line 9312 "parser.y" /* yacc.c:1646 */
15496  { (yyval) = NULL; }
15497 #line 15419 "parser.c" /* yacc.c:1646 */
15498  break;
15499 
15500  case 1302:
15501 #line 9313 "parser.y" /* yacc.c:1646 */
15502  { (yyval) = (yyvsp[0]); }
15503 #line 15425 "parser.c" /* yacc.c:1646 */
15504  break;
15505 
15506  case 1303:
15507 #line 9318 "parser.y" /* yacc.c:1646 */
15508  {
15509  TERMINATOR_WARNING ((yyvsp[(-2) - (0)]), STRING);
15510  }
15511 #line 15433 "parser.c" /* yacc.c:1646 */
15512  break;
15513 
15514  case 1304:
15515 #line 9322 "parser.y" /* yacc.c:1646 */
15516  {
15517  TERMINATOR_CLEAR ((yyvsp[(-2) - (1)]), STRING);
15518  }
15519 #line 15441 "parser.c" /* yacc.c:1646 */
15520  break;
15521 
15522  case 1305:
15523 #line 9332 "parser.y" /* yacc.c:1646 */
15524  {
15525  begin_statement ("SUBTRACT", TERM_SUBTRACT);
15526  }
15527 #line 15449 "parser.c" /* yacc.c:1646 */
15528  break;
15529 
15530  case 1307:
15531 #line 9341 "parser.y" /* yacc.c:1646 */
15532  {
15533  cb_emit_arithmetic ((yyvsp[-1]), '-', cb_build_binary_list ((yyvsp[-3]), '+'));
15534  }
15535 #line 15457 "parser.c" /* yacc.c:1646 */
15536  break;
15537 
15538  case 1308:
15539 #line 9345 "parser.y" /* yacc.c:1646 */
15540  {
15541  cb_emit_arithmetic ((yyvsp[-1]), 0, cb_build_binary_list (CB_BUILD_CHAIN ((yyvsp[-3]), (yyvsp[-5])), '-'));
15542  }
15543 #line 15465 "parser.c" /* yacc.c:1646 */
15544  break;
15545 
15546  case 1309:
15547 #line 9349 "parser.y" /* yacc.c:1646 */
15548  {
15549  cb_emit_corresponding (cb_build_sub, (yyvsp[-2]), (yyvsp[-4]), (yyvsp[-1]));
15550  }
15551 #line 15473 "parser.c" /* yacc.c:1646 */
15552  break;
15553 
15554  case 1310:
15555 #line 9356 "parser.y" /* yacc.c:1646 */
15556  {
15557  TERMINATOR_WARNING ((yyvsp[(-2) - (0)]), SUBTRACT);
15558  }
15559 #line 15481 "parser.c" /* yacc.c:1646 */
15560  break;
15561 
15562  case 1311:
15563 #line 9360 "parser.y" /* yacc.c:1646 */
15564  {
15565  TERMINATOR_CLEAR ((yyvsp[(-2) - (1)]), SUBTRACT);
15566  }
15567 #line 15489 "parser.c" /* yacc.c:1646 */
15568  break;
15569 
15570  case 1312:
15571 #line 9370 "parser.y" /* yacc.c:1646 */
15572  {
15573  begin_statement ("SUPPRESS", 0);
15574  if (!in_declaratives) {
15576  _("SUPPRESS statement must be within DECLARATIVES"));
15577  }
15578  PENDING("SUPPRESS");
15579  }
15580 #line 15502 "parser.c" /* yacc.c:1646 */
15581  break;
15582 
15583  case 1315:
15584 #line 9388 "parser.y" /* yacc.c:1646 */
15585  {
15586  begin_statement ("TERMINATE", 0);
15587  PENDING("TERMINATE");
15588  }
15589 #line 15511 "parser.c" /* yacc.c:1646 */
15590  break;
15591 
15592  case 1317:
15593 #line 9397 "parser.y" /* yacc.c:1646 */
15594  {
15596  if ((yyvsp[0]) != cb_error_node) {
15597  }
15598  }
15599 #line 15521 "parser.c" /* yacc.c:1646 */
15600  break;
15601 
15602  case 1318:
15603 #line 9403 "parser.y" /* yacc.c:1646 */
15604  {
15606  if ((yyvsp[0]) != cb_error_node) {
15607  }
15608  }
15609 #line 15531 "parser.c" /* yacc.c:1646 */
15610  break;
15611 
15612  case 1319:
15613 #line 9414 "parser.y" /* yacc.c:1646 */
15614  {
15615  begin_statement ("TRANSFORM", 0);
15616  }
15617 #line 15539 "parser.c" /* yacc.c:1646 */
15618  break;
15619 
15620  case 1321:
15621 #line 9422 "parser.y" /* yacc.c:1646 */
15622  {
15623  cb_tree x;
15624 
15625  x = cb_build_converting ((yyvsp[-2]), (yyvsp[0]), cb_build_inspect_region_start ());
15626  cb_emit_inspect ((yyvsp[-4]), x, cb_int0, 2);
15627  }
15628 #line 15550 "parser.c" /* yacc.c:1646 */
15629  break;
15630 
15631  case 1322:
15632 #line 9435 "parser.y" /* yacc.c:1646 */
15633  {
15634  begin_statement ("UNLOCK", 0);
15635  }
15636 #line 15558 "parser.c" /* yacc.c:1646 */
15637  break;
15638 
15639  case 1324:
15640 #line 9443 "parser.y" /* yacc.c:1646 */
15641  {
15642  if (CB_VALID_TREE ((yyvsp[-1]))) {
15643  if (CB_FILE (cb_ref ((yyvsp[-1])))->organization == COB_ORG_SORT) {
15645  _("UNLOCK invalid for SORT files"));
15646  } else {
15647  cb_emit_unlock ((yyvsp[-1]));
15648  }
15649  }
15650  }
15651 #line 15573 "parser.c" /* yacc.c:1646 */
15652  break;
15653 
15654  case 1325:
15655 #line 9459 "parser.y" /* yacc.c:1646 */
15656  {
15657  begin_statement ("UNSTRING", TERM_UNSTRING);
15658  }
15659 #line 15581 "parser.c" /* yacc.c:1646 */
15660  break;
15661 
15662  case 1327:
15663 #line 9469 "parser.y" /* yacc.c:1646 */
15664  {
15665  cb_emit_unstring ((yyvsp[-5]), (yyvsp[-4]), (yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]));
15666  }
15667 #line 15589 "parser.c" /* yacc.c:1646 */
15668  break;
15669 
15670  case 1328:
15671 #line 9475 "parser.y" /* yacc.c:1646 */
15672  { (yyval) = NULL; }
15673 #line 15595 "parser.c" /* yacc.c:1646 */
15674  break;
15675 
15676  case 1329:
15677 #line 9477 "parser.y" /* yacc.c:1646 */
15678  { (yyval) = (yyvsp[0]); }
15679 #line 15601 "parser.c" /* yacc.c:1646 */
15680  break;
15681 
15682  case 1330:
15683 #line 9481 "parser.y" /* yacc.c:1646 */
15684  { (yyval) = CB_LIST_INIT ((yyvsp[0])); }
15685 #line 15607 "parser.c" /* yacc.c:1646 */
15686  break;
15687 
15688  case 1331:
15689 #line 9483 "parser.y" /* yacc.c:1646 */
15690  { (yyval) = cb_list_add ((yyvsp[-2]), (yyvsp[0])); }
15691 #line 15613 "parser.c" /* yacc.c:1646 */
15692  break;
15693 
15694  case 1332:
15695 #line 9488 "parser.y" /* yacc.c:1646 */
15696  {
15697  (yyval) = cb_build_unstring_delimited ((yyvsp[-1]), (yyvsp[0]));
15698  }
15699 #line 15621 "parser.c" /* yacc.c:1646 */
15700  break;
15701 
15702  case 1333:
15703 #line 9494 "parser.y" /* yacc.c:1646 */
15704  { (yyval) = CB_LIST_INIT ((yyvsp[0])); }
15705 #line 15627 "parser.c" /* yacc.c:1646 */
15706  break;
15707 
15708  case 1334:
15709 #line 9496 "parser.y" /* yacc.c:1646 */
15710  { (yyval) = cb_list_add ((yyvsp[-1]), (yyvsp[0])); }
15711 #line 15633 "parser.c" /* yacc.c:1646 */
15712  break;
15713 
15714  case 1335:
15715 #line 9501 "parser.y" /* yacc.c:1646 */
15716  {
15717  (yyval) = cb_build_unstring_into ((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]));
15718  }
15719 #line 15641 "parser.c" /* yacc.c:1646 */
15720  break;
15721 
15722  case 1336:
15723 #line 9507 "parser.y" /* yacc.c:1646 */
15724  { (yyval) = NULL; }
15725 #line 15647 "parser.c" /* yacc.c:1646 */
15726  break;
15727 
15728  case 1337:
15729 #line 9508 "parser.y" /* yacc.c:1646 */
15730  { (yyval) = (yyvsp[0]); }
15731 #line 15653 "parser.c" /* yacc.c:1646 */
15732  break;
15733 
15734  case 1338:
15735 #line 9512 "parser.y" /* yacc.c:1646 */
15736  { (yyval) = NULL; }
15737 #line 15659 "parser.c" /* yacc.c:1646 */
15738  break;
15739 
15740  case 1339:
15741 #line 9513 "parser.y" /* yacc.c:1646 */
15742  { (yyval) = (yyvsp[0]); }
15743 #line 15665 "parser.c" /* yacc.c:1646 */
15744  break;
15745 
15746  case 1340:
15747 #line 9517 "parser.y" /* yacc.c:1646 */
15748  { (yyval) = NULL; }
15749 #line 15671 "parser.c" /* yacc.c:1646 */
15750  break;
15751 
15752  case 1341:
15753 #line 9518 "parser.y" /* yacc.c:1646 */
15754  { (yyval) = (yyvsp[0]); }
15755 #line 15677 "parser.c" /* yacc.c:1646 */
15756  break;
15757 
15758  case 1342:
15759 #line 9523 "parser.y" /* yacc.c:1646 */
15760  {
15761  TERMINATOR_WARNING ((yyvsp[(-2) - (0)]), UNSTRING);
15762  }
15763 #line 15685 "parser.c" /* yacc.c:1646 */
15764  break;
15765 
15766  case 1343:
15767 #line 9527 "parser.y" /* yacc.c:1646 */
15768  {
15769  TERMINATOR_CLEAR ((yyvsp[(-2) - (1)]), UNSTRING);
15770  }
15771 #line 15693 "parser.c" /* yacc.c:1646 */
15772  break;
15773 
15774  case 1344:
15775 #line 9537 "parser.y" /* yacc.c:1646 */
15776  {
15777  skip_statements = 0;
15778  in_debugging = 0;
15779  }
15780 #line 15702 "parser.c" /* yacc.c:1646 */
15781  break;
15782 
15783  case 1351:
15784 #line 9555 "parser.y" /* yacc.c:1646 */
15785  {
15786  if (!in_declaratives) {
15787  cb_error (_("USE statement must be within DECLARATIVES"));
15788  } else if (!current_section) {
15789  cb_error (_("SECTION header missing before USE statement"));
15790  } else {
15797  if (use_global_ind) {
15802  }
15803  emit_statement (cb_build_comment ("USE AFTER ERROR"));
15804  }
15805  }
15806 #line 15728 "parser.c" /* yacc.c:1646 */
15807  break;
15808 
15809  case 1352:
15810 #line 9580 "parser.y" /* yacc.c:1646 */
15811  {
15812  use_global_ind = 0;
15813  }
15814 #line 15736 "parser.c" /* yacc.c:1646 */
15815  break;
15816 
15817  case 1353:
15818 #line 9584 "parser.y" /* yacc.c:1646 */
15819  {
15821  cb_error (_("%s is invalid in a user FUNCTION"), "GLOBAL");
15822  } else {
15823  use_global_ind = 1;
15825  }
15826  }
15827 #line 15749 "parser.c" /* yacc.c:1646 */
15828  break;
15829 
15830  case 1354:
15831 #line 9596 "parser.y" /* yacc.c:1646 */
15832  {
15833  cb_tree l;
15834 
15835  for (l = (yyvsp[0]); l; l = CB_CHAIN (l)) {
15836  if (CB_VALID_TREE (CB_VALUE (l))) {
15838  }
15839  }
15840  }
15841 #line 15763 "parser.c" /* yacc.c:1646 */
15842  break;
15843 
15844  case 1355:
15845 #line 9606 "parser.y" /* yacc.c:1646 */
15846  {
15849  }
15850 #line 15772 "parser.c" /* yacc.c:1646 */
15851  break;
15852 
15853  case 1356:
15854 #line 9611 "parser.y" /* yacc.c:1646 */
15855  {
15858  }
15859 #line 15781 "parser.c" /* yacc.c:1646 */
15860  break;
15861 
15862  case 1357:
15863 #line 9616 "parser.y" /* yacc.c:1646 */
15864  {
15867  }
15868 #line 15790 "parser.c" /* yacc.c:1646 */
15869  break;
15870 
15871  case 1358:
15872 #line 9621 "parser.y" /* yacc.c:1646 */
15873  {
15876  }
15877 #line 15799 "parser.c" /* yacc.c:1646 */
15878  break;
15879 
15880  case 1359:
15881 #line 9629 "parser.y" /* yacc.c:1646 */
15882  {
15883  cb_tree plabel;
15884  char name[64];
15885 
15886  if (!in_declaratives) {
15887  cb_error (_("USE statement must be within DECLARATIVES"));
15888  } else if (current_program->nested_level) {
15889  cb_error (_("USE DEBUGGING not supported in contained program"));
15890  } else {
15891  in_debugging = 1;
15897  if (!needs_debug_item) {
15898  needs_debug_item = 1;
15900  }
15902  skip_statements = 1;
15904  } else {
15906  sprintf (name, "EXIT SECTION %d", cb_id);
15907  plabel = cb_build_reference (name);
15908  plabel = cb_build_label (plabel, NULL);
15909  CB_LABEL (plabel)->flag_begin = 1;
15910  CB_LABEL (plabel)->flag_dummy_exit = 1;
15911  current_section->exit_label = plabel;
15912  emit_statement (cb_build_comment ("USE FOR DEBUGGING"));
15913  }
15914  }
15915  }
15916 #line 15838 "parser.c" /* yacc.c:1646 */
15917  break;
15918 
15919  case 1362:
15920 #line 9672 "parser.y" /* yacc.c:1646 */
15921  {
15922  cb_tree l;
15923  cb_tree x;
15924  cb_tree z;
15925 
15927  CB_REFERENCE ((yyvsp[0]))->debug_section = current_section;
15928  CB_REFERENCE ((yyvsp[0]))->flag_debug_code = 1;
15929  CB_REFERENCE ((yyvsp[0]))->flag_all_debug = 0;
15930  z = CB_LIST_INIT ((yyvsp[0]));
15933  /* Check backward refs to file/data names */
15934  /* Label refs will be checked later (forward/backward ref) */
15935  if (CB_WORD_COUNT ((yyvsp[0])) > 0) {
15936  l = CB_VALUE(CB_WORD_ITEMS ((yyvsp[0])));
15937  switch (CB_TREE_TAG (l)) {
15938  case CB_TAG_FILE:
15939  CB_FILE (l)->debug_section = current_section;
15940  CB_FILE (l)->flag_fl_debug = 1;
15941  break;
15942  case CB_TAG_FIELD:
15943  {
15944  x = cb_ref((yyvsp[0]));
15945  if(CB_INVALID_TREE(x)) {
15946  break;
15947  }
15948  needs_field_debug = 1;
15949  CB_FIELD(x)->debug_section = current_section;
15950  CB_FIELD(x)->flag_field_debug = 1;
15951  CB_PURPOSE(z) = x;
15952  break;
15953  }
15954  default:
15955  break;
15956  }
15957  }
15958  }
15959  }
15960 #line 15882 "parser.c" /* yacc.c:1646 */
15961  break;
15962 
15963  case 1363:
15964 #line 9712 "parser.y" /* yacc.c:1646 */
15965  {
15968  cb_error (_("Duplicate USE DEBUGGING ON ALL PROCEDURES"));
15969  } else {
15971  }
15972  }
15973  }
15974 #line 15896 "parser.c" /* yacc.c:1646 */
15975  break;
15976 
15977  case 1364:
15978 #line 9722 "parser.y" /* yacc.c:1646 */
15979  {
15980  cb_tree x;
15981 
15983  /* Reference must be a data item */
15984  x = cb_ref ((yyvsp[0]));
15985  if (CB_INVALID_TREE (x) || !CB_FIELD_P (x)) {
15986  cb_error (_("Invalid target for DEBUGGING ALL"));
15987  } else {
15988  needs_field_debug = 1;
15989  CB_FIELD (x)->debug_section = current_section;
15990  CB_FIELD (x)->flag_field_debug = 1;
15991  CB_FIELD (x)->flag_all_debug = 1;
15992  CB_REFERENCE ((yyvsp[0]))->debug_section = current_section;
15993  CB_REFERENCE ((yyvsp[0]))->flag_debug_code = 1;
15994  CB_REFERENCE ((yyvsp[0]))->flag_all_debug = 1;
15995  CB_CHAIN_PAIR (current_program->debug_list, x, (yyvsp[0]));
15996  }
15997  }
15998  }
15999 #line 15921 "parser.c" /* yacc.c:1646 */
16000  break;
16001 
16002  case 1369:
16003 #line 9752 "parser.y" /* yacc.c:1646 */
16004  {
16006  cb_error (_("%s is invalid in nested program"), "USE AT");
16007  }
16008  }
16009 #line 15931 "parser.c" /* yacc.c:1646 */
16010  break;
16011 
16012  case 1370:
16013 #line 9761 "parser.y" /* yacc.c:1646 */
16014  {
16015  emit_statement (cb_build_comment ("USE AT PROGRAM START"));
16016  /* emit_entry ("_START", 0, NULL); */
16017  PENDING ("USE AT PROGRAM START");
16018  }
16019 #line 15941 "parser.c" /* yacc.c:1646 */
16020  break;
16021 
16022  case 1371:
16023 #line 9767 "parser.y" /* yacc.c:1646 */
16024  {
16025  emit_statement (cb_build_comment ("USE AT PROGRAM END"));
16026  /* emit_entry ("_END", 0, NULL); */
16027  PENDING ("USE AT PROGRAM END");
16028  }
16029 #line 15951 "parser.c" /* yacc.c:1646 */
16030  break;
16031 
16032  case 1372:
16033 #line 9777 "parser.y" /* yacc.c:1646 */
16034  {
16036  emit_statement (cb_build_comment ("USE BEFORE REPORTING"));
16037  PENDING ("USE BEFORE REPORTING");
16038  }
16039 #line 15961 "parser.c" /* yacc.c:1646 */
16040  break;
16041 
16042  case 1373:
16043 #line 9786 "parser.y" /* yacc.c:1646 */
16044  {
16046  emit_statement (cb_build_comment ("USE AFTER EXCEPTION CONDITION"));
16047  PENDING ("USE AFTER EXCEPTION CONDITION");
16048  }
16049 #line 15971 "parser.c" /* yacc.c:1646 */
16050  break;
16051 
16052  case 1376:
16053 #line 9802 "parser.y" /* yacc.c:1646 */
16054  {
16055  begin_statement ("WRITE", TERM_WRITE);
16056  /* Special in debugging mode */
16058  start_debug = 0;
16059  }
16060 #line 15982 "parser.c" /* yacc.c:1646 */
16061  break;
16062 
16063  case 1378:
16064 #line 9814 "parser.y" /* yacc.c:1646 */
16065  {
16066  if (CB_VALID_TREE ((yyvsp[-4]))) {
16067  cb_emit_write ((yyvsp[-4]), (yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]));
16068  }
16070  }
16071 #line 15993 "parser.c" /* yacc.c:1646 */
16072  break;
16073 
16074  case 1379:
16075 #line 9823 "parser.y" /* yacc.c:1646 */
16076  { (yyval) = NULL; }
16077 #line 15999 "parser.c" /* yacc.c:1646 */
16078  break;
16079 
16080  case 1380:
16081 #line 9824 "parser.y" /* yacc.c:1646 */
16082  { (yyval) = (yyvsp[0]); }
16083 #line 16005 "parser.c" /* yacc.c:1646 */
16084  break;
16085 
16086  case 1381:
16087 #line 9829 "parser.y" /* yacc.c:1646 */
16088  {
16089  (yyval) = cb_int0;
16090  }
16091 #line 16013 "parser.c" /* yacc.c:1646 */
16092  break;
16093 
16094  case 1382:
16095 #line 9833 "parser.y" /* yacc.c:1646 */
16096  {
16097  (yyval) = cb_build_write_advancing_lines ((yyvsp[-3]), (yyvsp[-1]));
16098  }
16099 #line 16021 "parser.c" /* yacc.c:1646 */
16100  break;
16101 
16102  case 1383:
16103 #line 9837 "parser.y" /* yacc.c:1646 */
16104  {
16105  (yyval) = cb_build_write_advancing_mnemonic ((yyvsp[-2]), (yyvsp[0]));
16106  }
16107 #line 16029 "parser.c" /* yacc.c:1646 */
16108  break;
16109 
16110  case 1384:
16111 #line 9841 "parser.y" /* yacc.c:1646 */
16112  {
16113  (yyval) = cb_build_write_advancing_page ((yyvsp[-2]));
16114  }
16115 #line 16037 "parser.c" /* yacc.c:1646 */
16116  break;
16117 
16118  case 1385:
16119 #line 9847 "parser.y" /* yacc.c:1646 */
16120  { (yyval) = CB_BEFORE; }
16121 #line 16043 "parser.c" /* yacc.c:1646 */
16122  break;
16123 
16124  case 1386:
16125 #line 9848 "parser.y" /* yacc.c:1646 */
16126  { (yyval) = CB_AFTER; }
16127 #line 16049 "parser.c" /* yacc.c:1646 */
16128  break;
16129 
16130  case 1389:
16131 #line 9858 "parser.y" /* yacc.c:1646 */
16132  {
16133  TERMINATOR_WARNING ((yyvsp[(-2) - (0)]), WRITE);
16134  }
16135 #line 16057 "parser.c" /* yacc.c:1646 */
16136  break;
16137 
16138  case 1390:
16139 #line 9862 "parser.y" /* yacc.c:1646 */
16140  {
16141  TERMINATOR_CLEAR ((yyvsp[(-2) - (1)]), WRITE);
16142  }
16143 #line 16065 "parser.c" /* yacc.c:1646 */
16144  break;
16145 
16146  case 1393:
16147 #line 9879 "parser.y" /* yacc.c:1646 */
16148  {
16150  current_statement->handler1 = (yyvsp[0]);
16151  }
16152 #line 16074 "parser.c" /* yacc.c:1646 */
16153  break;
16154 
16155  case 1397:
16156 #line 9894 "parser.y" /* yacc.c:1646 */
16157  {
16159  current_statement->handler2 = (yyvsp[0]);
16160  }
16161 #line 16083 "parser.c" /* yacc.c:1646 */
16162  break;
16163 
16164  case 1402:
16165 #line 9912 "parser.y" /* yacc.c:1646 */
16166  {
16168  current_statement->handler1 = (yyvsp[0]);
16169  }
16170 #line 16092 "parser.c" /* yacc.c:1646 */
16171  break;
16172 
16173  case 1404:
16174 #line 9922 "parser.y" /* yacc.c:1646 */
16175  {
16177  current_statement->handler2 = (yyvsp[0]);
16178  }
16179 #line 16101 "parser.c" /* yacc.c:1646 */
16180  break;
16181 
16182  case 1407:
16183 #line 9937 "parser.y" /* yacc.c:1646 */
16184  {
16186  current_statement->handler1 = (yyvsp[0]);
16187  }
16188 #line 16110 "parser.c" /* yacc.c:1646 */
16189  break;
16190 
16191  case 1409:
16192 #line 9947 "parser.y" /* yacc.c:1646 */
16193  {
16195  current_statement->handler2 = (yyvsp[0]);
16196  }
16197 #line 16119 "parser.c" /* yacc.c:1646 */
16198  break;
16199 
16200  case 1412:
16201 #line 9964 "parser.y" /* yacc.c:1646 */
16202  {
16204  current_statement->handler1 = (yyvsp[0]);
16205  }
16206 #line 16128 "parser.c" /* yacc.c:1646 */
16207  break;
16208 
16209  case 1414:
16210 #line 9975 "parser.y" /* yacc.c:1646 */
16211  {
16213  current_statement->handler2 = (yyvsp[0]);
16214  }
16215 #line 16137 "parser.c" /* yacc.c:1646 */
16216  break;
16217 
16218  case 1420:
16219 #line 9998 "parser.y" /* yacc.c:1646 */
16220  {
16222  current_statement->handler1 = (yyvsp[0]);
16223  }
16224 #line 16146 "parser.c" /* yacc.c:1646 */
16225  break;
16226 
16227  case 1421:
16228 #line 10007 "parser.y" /* yacc.c:1646 */
16229  {
16231  current_statement->handler2 = (yyvsp[0]);
16232  }
16233 #line 16155 "parser.c" /* yacc.c:1646 */
16234  break;
16235 
16236  case 1425:
16237 #line 10024 "parser.y" /* yacc.c:1646 */
16238  {
16240  current_statement->handler1 = (yyvsp[0]);
16241  }
16242 #line 16164 "parser.c" /* yacc.c:1646 */
16243  break;
16244 
16245  case 1426:
16246 #line 10033 "parser.y" /* yacc.c:1646 */
16247  {
16249  current_statement->handler2 = (yyvsp[0]);
16250  }
16251 #line 16173 "parser.c" /* yacc.c:1646 */
16252  break;
16253 
16254  case 1429:
16255 #line 10050 "parser.y" /* yacc.c:1646 */
16256  {
16258  current_statement->handler1 = (yyvsp[0]);
16259  }
16260 #line 16182 "parser.c" /* yacc.c:1646 */
16261  break;
16262 
16263  case 1431:
16264 #line 10060 "parser.y" /* yacc.c:1646 */
16265  {
16267  current_statement->handler2 = (yyvsp[0]);
16268  }
16269 #line 16191 "parser.c" /* yacc.c:1646 */
16270  break;
16271 
16272  case 1432:
16273 #line 10070 "parser.y" /* yacc.c:1646 */
16274  {
16275  (yyval) = cb_one;
16276  }
16277 #line 16199 "parser.c" /* yacc.c:1646 */
16278  break;
16279 
16280  case 1433:
16281 #line 10074 "parser.y" /* yacc.c:1646 */
16282  {
16283  (yyval) = (yyvsp[-1]);
16284  }
16285 #line 16207 "parser.c" /* yacc.c:1646 */
16286  break;
16287 
16288  case 1434:
16289 #line 10084 "parser.y" /* yacc.c:1646 */
16290  {
16291  (yyval) = cb_build_cond ((yyvsp[0]));
16292  }
16293 #line 16215 "parser.c" /* yacc.c:1646 */
16294  break;
16295 
16296  case 1435:
16297 #line 10091 "parser.y" /* yacc.c:1646 */
16298  {
16299  (yyval) = cb_build_expr ((yyvsp[0]));
16300  }
16301 #line 16223 "parser.c" /* yacc.c:1646 */
16302  break;
16303 
16304  case 1436:
16305 #line 10097 "parser.y" /* yacc.c:1646 */
16306  {
16307  current_expr = NULL;
16309  }
16310 #line 16232 "parser.c" /* yacc.c:1646 */
16311  break;
16312 
16313  case 1437:
16314 #line 10102 "parser.y" /* yacc.c:1646 */
16315  {
16316  (yyval) = cb_list_reverse (current_expr);
16317  }
16318 #line 16240 "parser.c" /* yacc.c:1646 */
16319  break;
16320 
16321  case 1441:
16322 #line 10115 "parser.y" /* yacc.c:1646 */
16323  {
16324  if (CB_REFERENCE_P ((yyvsp[0])) && CB_CLASS_NAME_P (cb_ref ((yyvsp[0])))) {
16325  push_expr ('C', (yyvsp[0]));
16326  } else {
16327  push_expr ('x', (yyvsp[0]));
16328  }
16329  }
16330 #line 16252 "parser.c" /* yacc.c:1646 */
16331  break;
16332 
16333  case 1442:
16334 #line 10123 "parser.y" /* yacc.c:1646 */
16335  { push_expr ('(', NULL); }
16336 #line 16258 "parser.c" /* yacc.c:1646 */
16337  break;
16338 
16339  case 1443:
16340 #line 10124 "parser.y" /* yacc.c:1646 */
16341  { push_expr (')', NULL); }
16342 #line 16264 "parser.c" /* yacc.c:1646 */
16343  break;
16344 
16345  case 1444:
16346 #line 10126 "parser.y" /* yacc.c:1646 */
16347  { push_expr ('+', NULL); }
16348 #line 16270 "parser.c" /* yacc.c:1646 */
16349  break;
16350 
16351  case 1445:
16352 #line 10127 "parser.y" /* yacc.c:1646 */
16353  { push_expr ('-', NULL); }
16354 #line 16276 "parser.c" /* yacc.c:1646 */
16355  break;
16356 
16357  case 1446:
16358 #line 10128 "parser.y" /* yacc.c:1646 */
16359  { push_expr ('*', NULL); }
16360 #line 16282 "parser.c" /* yacc.c:1646 */
16361  break;
16362 
16363  case 1447:
16364 #line 10129 "parser.y" /* yacc.c:1646 */
16365  { push_expr ('/', NULL); }
16366 #line 16288 "parser.c" /* yacc.c:1646 */
16367  break;
16368 
16369  case 1448:
16370 #line 10130 "parser.y" /* yacc.c:1646 */
16371  { push_expr ('^', NULL); }
16372 #line 16294 "parser.c" /* yacc.c:1646 */
16373  break;
16374 
16375  case 1449:
16376 #line 10132 "parser.y" /* yacc.c:1646 */
16377  { push_expr ('=', NULL); }
16378 #line 16300 "parser.c" /* yacc.c:1646 */
16379  break;
16380 
16381  case 1450:
16382 #line 10133 "parser.y" /* yacc.c:1646 */
16383  { push_expr ('>', NULL); }
16384 #line 16306 "parser.c" /* yacc.c:1646 */
16385  break;
16386 
16387  case 1451:
16388 #line 10134 "parser.y" /* yacc.c:1646 */
16389  { push_expr ('<', NULL); }
16390 #line 16312 "parser.c" /* yacc.c:1646 */
16391  break;
16392 
16393  case 1452:
16394 #line 10135 "parser.y" /* yacc.c:1646 */
16395  { push_expr (']', NULL); }
16396 #line 16318 "parser.c" /* yacc.c:1646 */
16397  break;
16398 
16399  case 1453:
16400 #line 10136 "parser.y" /* yacc.c:1646 */
16401  { push_expr ('[', NULL); }
16402 #line 16324 "parser.c" /* yacc.c:1646 */
16403  break;
16404 
16405  case 1454:
16406 #line 10137 "parser.y" /* yacc.c:1646 */
16407  { push_expr ('~', NULL); }
16408 #line 16330 "parser.c" /* yacc.c:1646 */
16409  break;
16410 
16411  case 1455:
16412 #line 10139 "parser.y" /* yacc.c:1646 */
16413  { push_expr ('!', NULL); }
16414 #line 16336 "parser.c" /* yacc.c:1646 */
16415  break;
16416 
16417  case 1456:
16418 #line 10140 "parser.y" /* yacc.c:1646 */
16419  { push_expr ('&', NULL); }
16420 #line 16342 "parser.c" /* yacc.c:1646 */
16421  break;
16422 
16423  case 1457:
16424 #line 10141 "parser.y" /* yacc.c:1646 */
16425  { push_expr ('|', NULL); }
16426 #line 16348 "parser.c" /* yacc.c:1646 */
16427  break;
16428 
16429  case 1458:
16430 #line 10143 "parser.y" /* yacc.c:1646 */
16431  { push_expr ('O', NULL); }
16432 #line 16354 "parser.c" /* yacc.c:1646 */
16433  break;
16434 
16435  case 1459:
16436 #line 10144 "parser.y" /* yacc.c:1646 */
16437  { push_expr ('9', NULL); }
16438 #line 16360 "parser.c" /* yacc.c:1646 */
16439  break;
16440 
16441  case 1460:
16442 #line 10145 "parser.y" /* yacc.c:1646 */
16443  { push_expr ('A', NULL); }
16444 #line 16366 "parser.c" /* yacc.c:1646 */
16445  break;
16446 
16447  case 1461:
16448 #line 10146 "parser.y" /* yacc.c:1646 */
16449  { push_expr ('L', NULL); }
16450 #line 16372 "parser.c" /* yacc.c:1646 */
16451  break;
16452 
16453  case 1462:
16454 #line 10147 "parser.y" /* yacc.c:1646 */
16455  { push_expr ('U', NULL); }
16456 #line 16378 "parser.c" /* yacc.c:1646 */
16457  break;
16458 
16459  case 1463:
16460 #line 10150 "parser.y" /* yacc.c:1646 */
16461  { push_expr ('P', NULL); }
16462 #line 16384 "parser.c" /* yacc.c:1646 */
16463  break;
16464 
16465  case 1464:
16466 #line 10151 "parser.y" /* yacc.c:1646 */
16467  { push_expr ('N', NULL); }
16468 #line 16390 "parser.c" /* yacc.c:1646 */
16469  break;
16470 
16471  case 1473:
16472 #line 10181 "parser.y" /* yacc.c:1646 */
16473  {
16474  (yyval) = CB_LIST_INIT ((yyvsp[0]));
16475  }
16476 #line 16398 "parser.c" /* yacc.c:1646 */
16477  break;
16478 
16479  case 1474:
16480 #line 10185 "parser.y" /* yacc.c:1646 */
16481  {
16482  (yyval) = cb_list_add ((yyvsp[-2]), (yyvsp[0]));
16483  }
16484 #line 16406 "parser.c" /* yacc.c:1646 */
16485  break;
16486 
16487  case 1478:
16488 #line 10196 "parser.y" /* yacc.c:1646 */
16489  { (yyval) = cb_build_binary_op ((yyvsp[-2]), '+', (yyvsp[0])); }
16490 #line 16412 "parser.c" /* yacc.c:1646 */
16491  break;
16492 
16493  case 1479:
16494 #line 10197 "parser.y" /* yacc.c:1646 */
16495  { (yyval) = cb_build_binary_op ((yyvsp[-2]), '-', (yyvsp[0])); }
16496 #line 16418 "parser.c" /* yacc.c:1646 */
16497  break;
16498 
16499  case 1480:
16500 #line 10198 "parser.y" /* yacc.c:1646 */
16501  { (yyval) = (yyvsp[0]); }
16502 #line 16424 "parser.c" /* yacc.c:1646 */
16503  break;
16504 
16505  case 1481:
16506 #line 10202 "parser.y" /* yacc.c:1646 */
16507  { (yyval) = cb_build_binary_op ((yyvsp[-2]), '*', (yyvsp[0])); }
16508 #line 16430 "parser.c" /* yacc.c:1646 */
16509  break;
16510 
16511  case 1482:
16512 #line 10203 "parser.y" /* yacc.c:1646 */
16513  { (yyval) = cb_build_binary_op ((yyvsp[-2]), '/', (yyvsp[0])); }
16514 #line 16436 "parser.c" /* yacc.c:1646 */
16515  break;
16516 
16517  case 1483:
16518 #line 10204 "parser.y" /* yacc.c:1646 */
16519  { (yyval) = (yyvsp[0]); }
16520 #line 16442 "parser.c" /* yacc.c:1646 */
16521  break;
16522 
16523  case 1484:
16524 #line 10209 "parser.y" /* yacc.c:1646 */
16525  {
16526  (yyval) = cb_build_binary_op ((yyvsp[-2]), '^', (yyvsp[0]));
16527  }
16528 #line 16450 "parser.c" /* yacc.c:1646 */
16529  break;
16530 
16531  case 1485:
16532 #line 10212 "parser.y" /* yacc.c:1646 */
16533  { (yyval) = (yyvsp[0]); }
16534 #line 16456 "parser.c" /* yacc.c:1646 */
16535  break;
16536 
16537  case 1486:
16538 #line 10216 "parser.y" /* yacc.c:1646 */
16539  { (yyval) = (yyvsp[0]); }
16540 #line 16462 "parser.c" /* yacc.c:1646 */
16541  break;
16542 
16543  case 1487:
16544 #line 10217 "parser.y" /* yacc.c:1646 */
16545  { (yyval) = cb_build_binary_op (cb_zero, '-', (yyvsp[0])); }
16546 #line 16468 "parser.c" /* yacc.c:1646 */
16547  break;
16548 
16549  case 1488:
16550 #line 10218 "parser.y" /* yacc.c:1646 */
16551  { (yyval) = (yyvsp[0]); }
16552 #line 16474 "parser.c" /* yacc.c:1646 */
16553  break;
16554 
16555  case 1489:
16556 #line 10221 "parser.y" /* yacc.c:1646 */
16557  { (yyval) = (yyvsp[-1]); }
16558 #line 16480 "parser.c" /* yacc.c:1646 */
16559  break;
16560 
16561  case 1490:
16562 #line 10222 "parser.y" /* yacc.c:1646 */
16563  { (yyval) = (yyvsp[0]); }
16564 #line 16486 "parser.c" /* yacc.c:1646 */
16565  break;
16566 
16567  case 1491:
16568 #line 10233 "parser.y" /* yacc.c:1646 */
16569  {
16570  if (current_linage > 1) {
16571  cb_error (_("LINAGE-COUNTER must be qualified here"));
16572  (yyval) = cb_error_node;
16573  } else if (current_linage == 0) {
16574  cb_error (_("Invalid LINAGE-COUNTER usage"));
16575  (yyval) = cb_error_node;
16576  } else {
16577  (yyval) = linage_file->linage_ctr;
16578  }
16579  }
16580 #line 16502 "parser.c" /* yacc.c:1646 */
16581  break;
16582 
16583  case 1492:
16584 #line 10245 "parser.y" /* yacc.c:1646 */
16585  {
16586  if (CB_FILE_P (cb_ref ((yyvsp[0])))) {
16587  (yyval) = CB_FILE (cb_ref ((yyvsp[0])))->linage_ctr;
16588  } else {
16589  cb_error_x ((yyvsp[0]), _("'%s' is not a file name"), CB_NAME ((yyvsp[0])));
16590  (yyval) = cb_error_node;
16591  }
16592  }
16593 #line 16515 "parser.c" /* yacc.c:1646 */
16594  break;
16595 
16596  case 1493:
16597 #line 10254 "parser.y" /* yacc.c:1646 */
16598  {
16599  if (report_count > 1) {
16600  cb_error (_("LINE-COUNTER must be qualified here"));
16601  (yyval) = cb_error_node;
16602  } else if (report_count == 0) {
16603  cb_error (_("Invalid LINE-COUNTER usage"));
16604  (yyval) = cb_error_node;
16605  } else {
16606  (yyval) = report_instance->line_counter;
16607  }
16608  }
16609 #line 16531 "parser.c" /* yacc.c:1646 */
16610  break;
16611 
16612  case 1494:
16613 #line 10266 "parser.y" /* yacc.c:1646 */
16614  {
16615  if (CB_REPORT_P (cb_ref ((yyvsp[0])))) {
16616  (yyval) = CB_REPORT (cb_ref ((yyvsp[0])))->line_counter;
16617  } else {
16618  cb_error_x ((yyvsp[0]), _("'%s' is not a report name"), CB_NAME ((yyvsp[0])));
16619  (yyval) = cb_error_node;
16620  }
16621  }
16622 #line 16544 "parser.c" /* yacc.c:1646 */
16623  break;
16624 
16625  case 1495:
16626 #line 10275 "parser.y" /* yacc.c:1646 */
16627  {
16628  if (report_count > 1) {
16629  cb_error (_("PAGE-COUNTER must be qualified here"));
16630  (yyval) = cb_error_node;
16631  } else if (report_count == 0) {
16632  cb_error (_("Invalid PAGE-COUNTER usage"));
16633  (yyval) = cb_error_node;
16634  } else {
16635  (yyval) = report_instance->page_counter;
16636  }
16637  }
16638 #line 16560 "parser.c" /* yacc.c:1646 */
16639  break;
16640 
16641  case 1496:
16642 #line 10287 "parser.y" /* yacc.c:1646 */
16643  {
16644  if (CB_REPORT_P (cb_ref ((yyvsp[0])))) {
16645  (yyval) = CB_REPORT (cb_ref ((yyvsp[0])))->page_counter;
16646  } else {
16647  cb_error_x ((yyvsp[0]), _("'%s' is not a report name"), CB_NAME ((yyvsp[0])));
16648  (yyval) = cb_error_node;
16649  }
16650  }
16651 #line 16573 "parser.c" /* yacc.c:1646 */
16652  break;
16653 
16654  case 1497:
16655 #line 10301 "parser.y" /* yacc.c:1646 */
16656  { (yyval) = (yyvsp[0]); }
16657 #line 16579 "parser.c" /* yacc.c:1646 */
16658  break;
16659 
16660  case 1498:
16661 #line 10303 "parser.y" /* yacc.c:1646 */
16662  { (yyval) = cb_list_append ((yyvsp[-1]), (yyvsp[0])); }
16663 #line 16585 "parser.c" /* yacc.c:1646 */
16664  break;
16665 
16666  case 1499:
16667 #line 10308 "parser.y" /* yacc.c:1646 */
16668  {
16669  (yyval) = CB_BUILD_PAIR ((yyvsp[0]), (yyvsp[-1]));
16670  }
16671 #line 16593 "parser.c" /* yacc.c:1646 */
16672  break;
16673 
16674  case 1500:
16675 #line 10316 "parser.y" /* yacc.c:1646 */
16676  { cb_build_identifier ((yyvsp[0]), 0); }
16677 #line 16599 "parser.c" /* yacc.c:1646 */
16678  break;
16679 
16680  case 1501:
16681 #line 10323 "parser.y" /* yacc.c:1646 */
16682  {
16683  cb_tree x;
16684 
16685  x = cb_ref ((yyvsp[0]));
16686  if (!CB_FIELD_P (x)) {
16687  (yyval) = cb_error_node;
16688  } else if (!CB_FIELD (x)->index_list) {
16689  cb_error_x ((yyvsp[0]), _("'%s' not indexed"), cb_name ((yyvsp[0])));
16690  cb_error_x (x, _("'%s' defined here"), cb_name (x));
16691  (yyval) = cb_error_node;
16692  } else {
16693  (yyval) = (yyvsp[0]);
16694  }
16695  }
16696 #line 16618 "parser.c" /* yacc.c:1646 */
16697  break;
16698 
16699  case 1502:
16700 #line 10343 "parser.y" /* yacc.c:1646 */
16701  {
16702  (yyval) = CB_LIST_INIT ((yyvsp[0]));
16703  }
16704 #line 16626 "parser.c" /* yacc.c:1646 */
16705  break;
16706 
16707  case 1503:
16708 #line 10347 "parser.y" /* yacc.c:1646 */
16709  {
16710  cb_tree l;
16711 
16712  if (CB_VALID_TREE ((yyvsp[0]))) {
16713  for (l = (yyvsp[-1]); l; l = CB_CHAIN (l)) {
16714  if (CB_VALID_TREE (CB_VALUE (l)) &&
16715  !strcasecmp (CB_NAME ((yyvsp[0])), CB_NAME (CB_VALUE (l)))) {
16716  cb_error_x ((yyvsp[0]), _("Multiple reference to '%s' "),
16717  CB_NAME ((yyvsp[0])));
16718  break;
16719  }
16720  }
16721  if (!l) {
16722  (yyval) = cb_list_add ((yyvsp[-1]), (yyvsp[0]));
16723  }
16724  }
16725  }
16726 #line 16648 "parser.c" /* yacc.c:1646 */
16727  break;
16728 
16729  case 1504:
16730 #line 10368 "parser.y" /* yacc.c:1646 */
16731  {
16732  if (CB_FILE_P (cb_ref ((yyvsp[0])))) {
16733  (yyval) = (yyvsp[0]);
16734  } else {
16735  cb_error_x ((yyvsp[0]), _("'%s' is not a file name"), CB_NAME ((yyvsp[0])));
16736  (yyval) = cb_error_node;
16737  }
16738  }
16739 #line 16661 "parser.c" /* yacc.c:1646 */
16740  break;
16741 
16742  case 1505:
16743 #line 10409 "parser.y" /* yacc.c:1646 */
16744  {
16745  if (CB_REPORT_P (cb_ref ((yyvsp[0])))) {
16746  (yyval) = (yyvsp[0]);
16747  } else {
16748  cb_error_x ((yyvsp[0]), _("'%s' is not a report name"), CB_NAME ((yyvsp[0])));
16749  (yyval) = cb_error_node;
16750  }
16751  }
16752 #line 16674 "parser.c" /* yacc.c:1646 */
16753  break;
16754 
16755  case 1506:
16756 #line 10422 "parser.y" /* yacc.c:1646 */
16757  { (yyval) = CB_LIST_INIT ((yyvsp[0])); }
16758 #line 16680 "parser.c" /* yacc.c:1646 */
16759  break;
16760 
16761  case 1507:
16762 #line 10424 "parser.y" /* yacc.c:1646 */
16763  { (yyval) = cb_list_add ((yyvsp[-1]), (yyvsp[0])); }
16764 #line 16686 "parser.c" /* yacc.c:1646 */
16765  break;
16766 
16767  case 1508:
16768 #line 10428 "parser.y" /* yacc.c:1646 */
16769  { (yyval) = (yyvsp[0]); }
16770 #line 16692 "parser.c" /* yacc.c:1646 */
16771  break;
16772 
16773  case 1509:
16774 #line 10434 "parser.y" /* yacc.c:1646 */
16775  { (yyval) = NULL; }
16776 #line 16698 "parser.c" /* yacc.c:1646 */
16777  break;
16778 
16779  case 1510:
16780 #line 10436 "parser.y" /* yacc.c:1646 */
16781  { (yyval) = cb_list_add ((yyvsp[-1]), (yyvsp[0])); }
16782 #line 16704 "parser.c" /* yacc.c:1646 */
16783  break;
16784 
16785  case 1511:
16786 #line 10441 "parser.y" /* yacc.c:1646 */
16787  {
16788  (yyval) = (yyvsp[0]);
16789  CB_REFERENCE ((yyval))->offset = CB_TREE (current_section);
16790  CB_REFERENCE ((yyval))->flag_in_decl = !!in_declaratives;
16791  CB_REFERENCE ((yyval))->section = current_section;
16792  CB_REFERENCE ((yyval))->paragraph = current_paragraph;
16794  }
16795 #line 16717 "parser.c" /* yacc.c:1646 */
16796  break;
16797 
16798  case 1514:
16799 #line 10455 "parser.y" /* yacc.c:1646 */
16800  {
16801  CB_REFERENCE ((yyvsp[-2]))->chain = (yyvsp[0]);
16802  }
16803 #line 16725 "parser.c" /* yacc.c:1646 */
16804  break;
16805 
16806  case 1515:
16807 #line 10462 "parser.y" /* yacc.c:1646 */
16808  {
16809  (yyval) = cb_build_reference ((char *)(CB_LITERAL ((yyvsp[0]))->data));
16810  (yyval)->source_file = (yyvsp[0])->source_file;
16811  (yyval)->source_line = (yyvsp[0])->source_line;
16812  }
16813 #line 16735 "parser.c" /* yacc.c:1646 */
16814  break;
16815 
16816  case 1516:
16817 #line 10472 "parser.y" /* yacc.c:1646 */
16818  { (yyval) = CB_LIST_INIT ((yyvsp[0])); }
16819 #line 16741 "parser.c" /* yacc.c:1646 */
16820  break;
16821 
16822  case 1517:
16823 #line 10473 "parser.y" /* yacc.c:1646 */
16824  { (yyval) = cb_list_add ((yyvsp[-1]), (yyvsp[0])); }
16825 #line 16747 "parser.c" /* yacc.c:1646 */
16826  break;
16827 
16828  case 1518:
16829 #line 10478 "parser.y" /* yacc.c:1646 */
16830  {
16831  (yyval) = (yyvsp[0]);
16833  }
16834 #line 16756 "parser.c" /* yacc.c:1646 */
16835  break;
16836 
16837  case 1519:
16838 #line 10486 "parser.y" /* yacc.c:1646 */
16839  {
16840  (yyval) = (yyvsp[0]);
16842  }
16843 #line 16765 "parser.c" /* yacc.c:1646 */
16844  break;
16845 
16846  case 1520:
16847 #line 10494 "parser.y" /* yacc.c:1646 */
16848  {
16849  (yyval) = CB_LIST_INIT ((yyvsp[0]));
16850  }
16851 #line 16773 "parser.c" /* yacc.c:1646 */
16852  break;
16853 
16854  case 1521:
16855 #line 10498 "parser.y" /* yacc.c:1646 */
16856  {
16857  (yyval) = cb_list_add ((yyvsp[-1]), (yyvsp[0]));
16858  }
16859 #line 16781 "parser.c" /* yacc.c:1646 */
16860  break;
16861 
16862  case 1522:
16863 #line 10505 "parser.y" /* yacc.c:1646 */
16864  {
16865  (yyval) = (yyvsp[0]);
16866  CB_REFERENCE((yyval))->flag_optional = 1;
16868  }
16869 #line 16791 "parser.c" /* yacc.c:1646 */
16870  break;
16871 
16872  case 1525:
16873 #line 10521 "parser.y" /* yacc.c:1646 */
16874  {
16875  if (CB_WORD_COUNT ((yyvsp[0])) > 0) {
16876  redefinition_error ((yyvsp[0]));
16877  (yyval) = cb_error_node;
16878  } else {
16879  (yyval) = (yyvsp[0]);
16880  }
16881  }
16882 #line 16804 "parser.c" /* yacc.c:1646 */
16883  break;
16884 
16885  case 1526:
16886 #line 10530 "parser.y" /* yacc.c:1646 */
16887  {
16888  yyclearin;
16889  yyerrok;
16890  (yyval) = cb_error_node;
16891  }
16892 #line 16814 "parser.c" /* yacc.c:1646 */
16893  break;
16894 
16895  case 1527:
16896 #line 10541 "parser.y" /* yacc.c:1646 */
16897  {
16898  if (CB_REFERENCE ((yyvsp[0]))->flag_duped || CB_WORD_COUNT ((yyvsp[0])) > 0) {
16899  redefinition_error ((yyvsp[0]));
16900  (yyval) = NULL;
16901  } else {
16902  CB_WORD_COUNT ((yyvsp[0]))++;
16903  (yyval) = (yyvsp[0]);
16904  }
16905  }
16906 #line 16828 "parser.c" /* yacc.c:1646 */
16907  break;
16908 
16909  case 1528:
16910 #line 10558 "parser.y" /* yacc.c:1646 */
16911  {
16912  (yyval) = CB_LIST_INIT ((yyvsp[0]));
16913  }
16914 #line 16836 "parser.c" /* yacc.c:1646 */
16915  break;
16916 
16917  case 1529:
16918 #line 10562 "parser.y" /* yacc.c:1646 */
16919  {
16920  (yyval) = cb_list_add ((yyvsp[-1]), (yyvsp[0]));
16921  }
16922 #line 16844 "parser.c" /* yacc.c:1646 */
16923  break;
16924 
16925  case 1532:
16926 #line 10571 "parser.y" /* yacc.c:1646 */
16927  {
16928  (yyval) = cb_build_address ((yyvsp[0]));
16929  }
16930 #line 16852 "parser.c" /* yacc.c:1646 */
16931  break;
16932 
16933  case 1533:
16934 #line 10577 "parser.y" /* yacc.c:1646 */
16935  { (yyval) = NULL; }
16936 #line 16858 "parser.c" /* yacc.c:1646 */
16937  break;
16938 
16939  case 1534:
16940 #line 10578 "parser.y" /* yacc.c:1646 */
16941  { (yyval) = (yyvsp[0]); }
16942 #line 16864 "parser.c" /* yacc.c:1646 */
16943  break;
16944 
16945  case 1535:
16946 #line 10583 "parser.y" /* yacc.c:1646 */
16947  {
16948  (yyval) = CB_LIST_INIT ((yyvsp[0]));
16949  }
16950 #line 16872 "parser.c" /* yacc.c:1646 */
16951  break;
16952 
16953  case 1536:
16954 #line 10587 "parser.y" /* yacc.c:1646 */
16955  {
16956  (yyval) = cb_list_add ((yyvsp[-1]), (yyvsp[0]));
16957  }
16958 #line 16880 "parser.c" /* yacc.c:1646 */
16959  break;
16960 
16961  case 1541:
16962 #line 10598 "parser.y" /* yacc.c:1646 */
16963  {
16964  (yyval) = cb_build_length ((yyvsp[0]));
16965  }
16966 #line 16888 "parser.c" /* yacc.c:1646 */
16967  break;
16968 
16969  case 1542:
16970 #line 10602 "parser.y" /* yacc.c:1646 */
16971  {
16972  (yyval) = cb_build_length ((yyvsp[0]));
16973  }
16974 #line 16896 "parser.c" /* yacc.c:1646 */
16975  break;
16976 
16977  case 1543:
16978 #line 10606 "parser.y" /* yacc.c:1646 */
16979  {
16980  (yyval) = cb_build_length ((yyvsp[0]));
16981  }
16982 #line 16904 "parser.c" /* yacc.c:1646 */
16983  break;
16984 
16985  case 1544:
16986 #line 10610 "parser.y" /* yacc.c:1646 */
16987  {
16988  (yyval) = cb_build_ppointer ((yyvsp[0]));
16989  }
16990 #line 16912 "parser.c" /* yacc.c:1646 */
16991  break;
16992 
16993  case 1545:
16994 #line 10614 "parser.y" /* yacc.c:1646 */
16995  {
16996  (yyval) = cb_build_address ((yyvsp[0]));
16997  }
16998 #line 16920 "parser.c" /* yacc.c:1646 */
16999  break;
17000 
17001  case 1546:
17002 #line 10618 "parser.y" /* yacc.c:1646 */
17003  {
17004  cb_tree x;
17005  cb_tree switch_id;
17006 
17007  x = cb_ref ((yyvsp[0]));
17008  if (CB_VALID_TREE (x)) {
17009  if (CB_SYSTEM_NAME (x)->category != CB_SWITCH_NAME) {
17010  cb_error_x (x, _("Invalid mnemonic identifier"));
17011  (yyval) = cb_error_node;
17012  } else {
17013  switch_id = cb_int (CB_SYSTEM_NAME (x)->token);
17014  (yyval) = CB_BUILD_FUNCALL_1 ("cob_switch_value", switch_id);
17015  }
17016  } else {
17017  (yyval) = cb_error_node;
17018  }
17019  }
17020 #line 16942 "parser.c" /* yacc.c:1646 */
17021  break;
17022 
17023  case 1547:
17024 #line 10639 "parser.y" /* yacc.c:1646 */
17025  {
17026  (yyval) = CB_LIST_INIT ((yyvsp[0]));
17027  }
17028 #line 16950 "parser.c" /* yacc.c:1646 */
17029  break;
17030 
17031  case 1548:
17032 #line 10643 "parser.y" /* yacc.c:1646 */
17033  {
17034  (yyval) = cb_list_add ((yyvsp[-1]), (yyvsp[0]));
17035  }
17036 #line 16958 "parser.c" /* yacc.c:1646 */
17037  break;
17038 
17039  case 1556:
17040 #line 10660 "parser.y" /* yacc.c:1646 */
17041  {
17042  (yyval) = cb_build_length ((yyvsp[0]));
17043  }
17044 #line 16966 "parser.c" /* yacc.c:1646 */
17045  break;
17046 
17047  case 1557:
17048 #line 10664 "parser.y" /* yacc.c:1646 */
17049  {
17050  (yyval) = cb_build_length ((yyvsp[0]));
17051  }
17052 #line 16974 "parser.c" /* yacc.c:1646 */
17053  break;
17054 
17055  case 1558:
17056 #line 10668 "parser.y" /* yacc.c:1646 */
17057  {
17058  (yyval) = cb_build_length ((yyvsp[0]));
17059  }
17060 #line 16982 "parser.c" /* yacc.c:1646 */
17061  break;
17062 
17063  case 1567:
17064 #line 10702 "parser.y" /* yacc.c:1646 */
17065  {
17066  check_not_88_level ((yyvsp[0]));
17067  }
17068 #line 16990 "parser.c" /* yacc.c:1646 */
17069  break;
17070 
17071  case 1569:
17072 #line 10710 "parser.y" /* yacc.c:1646 */
17073  {
17074  check_not_88_level ((yyvsp[0]));
17075  }
17076 #line 16998 "parser.c" /* yacc.c:1646 */
17077  break;
17078 
17079  case 1572:
17080 #line 10719 "parser.y" /* yacc.c:1646 */
17081  {
17082  check_not_88_level ((yyvsp[0]));
17083  }
17084 #line 17006 "parser.c" /* yacc.c:1646 */
17085  break;
17086 
17087  case 1574:
17088 #line 10724 "parser.y" /* yacc.c:1646 */
17089  {
17090  (yyval) = cb_zero;
17091  }
17092 #line 17014 "parser.c" /* yacc.c:1646 */
17093  break;
17094 
17095  case 1575:
17096 #line 10731 "parser.y" /* yacc.c:1646 */
17097  {
17098  check_not_88_level ((yyvsp[0]));
17099  }
17100 #line 17022 "parser.c" /* yacc.c:1646 */
17101  break;
17102 
17103  case 1577:
17104 #line 10739 "parser.y" /* yacc.c:1646 */
17105  {
17106  check_not_88_level ((yyvsp[0]));
17107  }
17108 #line 17030 "parser.c" /* yacc.c:1646 */
17109  break;
17110 
17111  case 1579:
17112 #line 10747 "parser.y" /* yacc.c:1646 */
17113  {
17114  check_not_88_level ((yyvsp[0]));
17115  }
17116 #line 17038 "parser.c" /* yacc.c:1646 */
17117  break;
17118 
17119  case 1582:
17120 #line 10757 "parser.y" /* yacc.c:1646 */
17121  { (yyval) = cb_build_identifier ((yyvsp[0]), 0); }
17122 #line 17044 "parser.c" /* yacc.c:1646 */
17123  break;
17124 
17125  case 1583:
17126 #line 10761 "parser.y" /* yacc.c:1646 */
17127  { (yyval) = cb_build_identifier ((yyvsp[0]), 1); }
17128 #line 17050 "parser.c" /* yacc.c:1646 */
17129  break;
17130 
17131  case 1584:
17132 #line 10765 "parser.y" /* yacc.c:1646 */
17133  { (yyval) = (yyvsp[0]); }
17134 #line 17056 "parser.c" /* yacc.c:1646 */
17135  break;
17136 
17137  case 1585:
17138 #line 10766 "parser.y" /* yacc.c:1646 */
17139  { (yyval) = (yyvsp[-1]); }
17140 #line 17062 "parser.c" /* yacc.c:1646 */
17141  break;
17142 
17143  case 1586:
17144 #line 10770 "parser.y" /* yacc.c:1646 */
17145  { (yyval) = cb_build_identifier ((yyvsp[0]), 0); }
17146 #line 17068 "parser.c" /* yacc.c:1646 */
17147  break;
17148 
17149  case 1587:
17150 #line 10775 "parser.y" /* yacc.c:1646 */
17151  {
17152  (yyval) = (yyvsp[-2]);
17153  if (start_debug) {
17154  cb_check_field_debug ((yyvsp[-2]));
17155  }
17156  }
17157 #line 17079 "parser.c" /* yacc.c:1646 */
17158  break;
17159 
17160  case 1588:
17161 #line 10782 "parser.y" /* yacc.c:1646 */
17162  {
17163  (yyval) = (yyvsp[-1]);
17164  if (start_debug) {
17165  cb_check_field_debug ((yyvsp[-1]));
17166  }
17167  }
17168 #line 17090 "parser.c" /* yacc.c:1646 */
17169  break;
17170 
17171  case 1589:
17172 #line 10789 "parser.y" /* yacc.c:1646 */
17173  {
17174  (yyval) = (yyvsp[-1]);
17175  if (start_debug) {
17176  cb_check_field_debug ((yyvsp[-1]));
17177  }
17178  }
17179 #line 17101 "parser.c" /* yacc.c:1646 */
17180  break;
17181 
17182  case 1590:
17183 #line 10796 "parser.y" /* yacc.c:1646 */
17184  {
17185  (yyval) = (yyvsp[0]);
17186  if (start_debug) {
17187  cb_check_field_debug ((yyvsp[0]));
17188  }
17189  }
17190 #line 17112 "parser.c" /* yacc.c:1646 */
17191  break;
17192 
17193  case 1591:
17194 #line 10806 "parser.y" /* yacc.c:1646 */
17195  {
17196  (yyval) = cb_build_identifier ((yyvsp[0]), 0);
17197  }
17198 #line 17120 "parser.c" /* yacc.c:1646 */
17199  break;
17200 
17201  case 1592:
17202 #line 10813 "parser.y" /* yacc.c:1646 */
17203  {
17204  (yyval) = (yyvsp[-2]);
17205  if (CB_REFERENCE_P ((yyvsp[-2]))) {
17206  CB_REFERENCE ((yyvsp[-2]))->flag_target = 1;
17207  }
17208  if (start_debug) {
17209  cb_check_field_debug ((yyvsp[-2]));
17210  }
17211  }
17212 #line 17134 "parser.c" /* yacc.c:1646 */
17213  break;
17214 
17215  case 1593:
17216 #line 10823 "parser.y" /* yacc.c:1646 */
17217  {
17218  (yyval) = (yyvsp[-1]);
17219  if (CB_REFERENCE_P ((yyvsp[-1]))) {
17220  CB_REFERENCE ((yyvsp[-1]))->flag_target = 1;
17221  }
17222  if (start_debug) {
17223  cb_check_field_debug ((yyvsp[-1]));
17224  }
17225  }
17226 #line 17148 "parser.c" /* yacc.c:1646 */
17227  break;
17228 
17229  case 1594:
17230 #line 10833 "parser.y" /* yacc.c:1646 */
17231  {
17232  (yyval) = (yyvsp[-1]);
17233  if (CB_REFERENCE_P ((yyvsp[-1]))) {
17234  CB_REFERENCE ((yyvsp[-1]))->flag_target = 1;
17235  }
17236  if (start_debug) {
17237  cb_check_field_debug ((yyvsp[-1]));
17238  }
17239  }
17240 #line 17162 "parser.c" /* yacc.c:1646 */
17241  break;
17242 
17243  case 1595:
17244 #line 10843 "parser.y" /* yacc.c:1646 */
17245  {
17246  (yyval) = (yyvsp[0]);
17247  if (CB_REFERENCE_P ((yyvsp[0]))) {
17248  CB_REFERENCE ((yyvsp[0]))->flag_target = 1;
17249  }
17250  if (start_debug) {
17251  cb_check_field_debug ((yyvsp[0]));
17252  }
17253  }
17254 #line 17176 "parser.c" /* yacc.c:1646 */
17255  break;
17256 
17257  case 1596:
17258 #line 10856 "parser.y" /* yacc.c:1646 */
17259  {
17260  (yyval) = (yyvsp[0]);
17261  }
17262 #line 17184 "parser.c" /* yacc.c:1646 */
17263  break;
17264 
17265  case 1597:
17266 #line 10860 "parser.y" /* yacc.c:1646 */
17267  {
17268  (yyval) = (yyvsp[-2]);
17269  CB_REFERENCE ((yyvsp[-2]))->chain = (yyvsp[0]);
17270  }
17271 #line 17193 "parser.c" /* yacc.c:1646 */
17272  break;
17273 
17274  case 1598:
17275 #line 10868 "parser.y" /* yacc.c:1646 */
17276  {
17277  (yyval) = (yyvsp[-3]);
17278  CB_REFERENCE ((yyvsp[-3]))->subs = cb_list_reverse ((yyvsp[-1]));
17279  }
17280 #line 17202 "parser.c" /* yacc.c:1646 */
17281  break;
17282 
17283  case 1599:
17284 #line 10876 "parser.y" /* yacc.c:1646 */
17285  {
17286  CB_REFERENCE ((yyvsp[-4]))->offset = (yyvsp[-2]);
17287  }
17288 #line 17210 "parser.c" /* yacc.c:1646 */
17289  break;
17290 
17291  case 1600:
17292 #line 10880 "parser.y" /* yacc.c:1646 */
17293  {
17294  CB_REFERENCE ((yyvsp[-5]))->offset = (yyvsp[-3]);
17295  CB_REFERENCE ((yyvsp[-5]))->length = (yyvsp[-1]);
17296  }
17297 #line 17219 "parser.c" /* yacc.c:1646 */
17298  break;
17299 
17300  case 1601:
17301 #line 10890 "parser.y" /* yacc.c:1646 */
17302  {
17303  if (cb_tree_category ((yyvsp[0])) != CB_CATEGORY_NUMERIC
17304  || CB_LITERAL ((yyvsp[0]))->sign < 0
17305  || CB_LITERAL ((yyvsp[0]))->scale) {
17306  cb_error (_("Non-negative integer value expected"));
17307  (yyval) = cb_build_numeric_literal(-1, "1", 0);
17308  } else {
17309  (yyval) = (yyvsp[0]);
17310  }
17311  }
17312 #line 17234 "parser.c" /* yacc.c:1646 */
17313  break;
17314 
17315  case 1602:
17316 #line 10904 "parser.y" /* yacc.c:1646 */
17317  {
17318  int n;
17319 
17320  if (cb_tree_category ((yyvsp[0])) != CB_CATEGORY_NUMERIC) {
17321  cb_error (_("Integer value expected"));
17322  (yyval) = cb_int1;
17323  } else if (CB_LITERAL ((yyvsp[0]))->sign || CB_LITERAL ((yyvsp[0]))->scale) {
17324  cb_error (_("Integer value expected"));
17325  (yyval) = cb_int1;
17326  } else {
17327  n = cb_get_int ((yyvsp[0]));
17328  if (n < 1 || n > 256) {
17329  cb_error (_("Invalid SYMBOLIC integer"));
17330  (yyval) = cb_int1;
17331  } else {
17332  (yyval) = (yyvsp[0]);
17333  }
17334  }
17335  }
17336 #line 17258 "parser.c" /* yacc.c:1646 */
17337  break;
17338 
17339  case 1603:
17340 #line 10927 "parser.y" /* yacc.c:1646 */
17341  {
17342  int n;
17343 
17344  if (cb_tree_category ((yyvsp[0])) != CB_CATEGORY_NUMERIC
17345  || CB_LITERAL ((yyvsp[0]))->sign
17346  || CB_LITERAL ((yyvsp[0]))->scale) {
17347  cb_error (_("Unsigned positive integer value expected"));
17348  (yyval) = cb_int1;
17349  } else {
17350  n = cb_get_int ((yyvsp[0]));
17351  if (n < 1) {
17352  cb_error (_("Unsigned positive integer value expected"));
17353  (yyval) = cb_int1;
17354  } else {
17355  (yyval) = (yyvsp[0]);
17356  }
17357  }
17358  }
17359 #line 17281 "parser.c" /* yacc.c:1646 */
17360  break;
17361 
17362  case 1604:
17363 #line 10949 "parser.y" /* yacc.c:1646 */
17364  {
17365  int n;
17366 
17367  if (cb_tree_category ((yyvsp[0])) == CB_CATEGORY_NUMERIC) {
17368  if (CB_LITERAL ((yyvsp[0]))->sign || CB_LITERAL ((yyvsp[0]))->scale) {
17369  cb_error (_("Integer value expected"));
17370  } else {
17371  n = cb_get_int ((yyvsp[0]));
17372  if (n < 1 || n > 256) {
17373  cb_error (_("Invalid CLASS value"));
17374  }
17375  }
17376  }
17377  (yyval) = (yyvsp[0]);
17378  }
17379 #line 17301 "parser.c" /* yacc.c:1646 */
17380  break;
17381 
17382  case 1605:
17383 #line 10964 "parser.y" /* yacc.c:1646 */
17384  { (yyval) = cb_space; }
17385 #line 17307 "parser.c" /* yacc.c:1646 */
17386  break;
17387 
17388  case 1606:
17389 #line 10965 "parser.y" /* yacc.c:1646 */
17390  { (yyval) = cb_zero; }
17391 #line 17313 "parser.c" /* yacc.c:1646 */
17392  break;
17393 
17394  case 1607:
17395 #line 10966 "parser.y" /* yacc.c:1646 */
17396  { (yyval) = cb_quote; }
17397 #line 17319 "parser.c" /* yacc.c:1646 */
17398  break;
17399 
17400  case 1608:
17401 #line 10967 "parser.y" /* yacc.c:1646 */
17402  { (yyval) = cb_high; }
17403 #line 17325 "parser.c" /* yacc.c:1646 */
17404  break;
17405 
17406  case 1609:
17407 #line 10968 "parser.y" /* yacc.c:1646 */
17408  { (yyval) = cb_low; }
17409 #line 17331 "parser.c" /* yacc.c:1646 */
17410  break;
17411 
17412  case 1610:
17413 #line 10969 "parser.y" /* yacc.c:1646 */
17414  { (yyval) = cb_null; }
17415 #line 17337 "parser.c" /* yacc.c:1646 */
17416  break;
17417 
17418  case 1611:
17419 #line 10974 "parser.y" /* yacc.c:1646 */
17420  {
17421  (yyval) = (yyvsp[0]);
17422  }
17423 #line 17345 "parser.c" /* yacc.c:1646 */
17424  break;
17425 
17426  case 1612:
17427 #line 10978 "parser.y" /* yacc.c:1646 */
17428  {
17429  struct cb_literal *l;
17430 
17431  if (CB_LITERAL_P ((yyvsp[0]))) {
17432  /* We must not alter the original definition */
17433  l = cobc_parse_malloc (sizeof(struct cb_literal));
17434  *l = *(CB_LITERAL((yyvsp[0])));
17435  l->all = 1;
17436  (yyval) = CB_TREE (l);
17437  } else {
17438  (yyval) = (yyvsp[0]);
17439  }
17440  }
17441 #line 17363 "parser.c" /* yacc.c:1646 */
17442  break;
17443 
17444  case 1613:
17445 #line 10995 "parser.y" /* yacc.c:1646 */
17446  {
17447  (yyval) = (yyvsp[0]);
17448  }
17449 #line 17371 "parser.c" /* yacc.c:1646 */
17450  break;
17451 
17452  case 1614:
17453 #line 10999 "parser.y" /* yacc.c:1646 */
17454  {
17455  (yyval) = cb_concat_literals ((yyvsp[-2]), (yyvsp[0]));
17456  }
17457 #line 17379 "parser.c" /* yacc.c:1646 */
17458  break;
17459 
17460  case 1615:
17461 #line 11005 "parser.y" /* yacc.c:1646 */
17462  { (yyval) = (yyvsp[0]); }
17463 #line 17385 "parser.c" /* yacc.c:1646 */
17464  break;
17465 
17466  case 1616:
17467 #line 11006 "parser.y" /* yacc.c:1646 */
17468  { (yyval) = cb_space; }
17469 #line 17391 "parser.c" /* yacc.c:1646 */
17470  break;
17471 
17472  case 1617:
17473 #line 11007 "parser.y" /* yacc.c:1646 */
17474  { (yyval) = cb_zero; }
17475 #line 17397 "parser.c" /* yacc.c:1646 */
17476  break;
17477 
17478  case 1618:
17479 #line 11008 "parser.y" /* yacc.c:1646 */
17480  { (yyval) = cb_quote; }
17481 #line 17403 "parser.c" /* yacc.c:1646 */
17482  break;
17483 
17484  case 1619:
17485 #line 11009 "parser.y" /* yacc.c:1646 */
17486  { (yyval) = cb_high; }
17487 #line 17409 "parser.c" /* yacc.c:1646 */
17488  break;
17489 
17490  case 1620:
17491 #line 11010 "parser.y" /* yacc.c:1646 */
17492  { (yyval) = cb_low; }
17493 #line 17415 "parser.c" /* yacc.c:1646 */
17494  break;
17495 
17496  case 1621:
17497 #line 11011 "parser.y" /* yacc.c:1646 */
17498  { (yyval) = cb_null; }
17499 #line 17421 "parser.c" /* yacc.c:1646 */
17500  break;
17501 
17502  case 1622:
17503 #line 11018 "parser.y" /* yacc.c:1646 */
17504  {
17505  (yyval) = cb_build_intrinsic ((yyvsp[-1]), NULL, (yyvsp[0]), 0);
17506  }
17507 #line 17429 "parser.c" /* yacc.c:1646 */
17508  break;
17509 
17510  case 1623:
17511 #line 11022 "parser.y" /* yacc.c:1646 */
17512  {
17513  (yyval) = cb_build_intrinsic ((yyvsp[-4]), CB_LIST_INIT ((yyvsp[-2])), (yyvsp[0]), 0);
17514  }
17515 #line 17437 "parser.c" /* yacc.c:1646 */
17516  break;
17517 
17518  case 1624:
17519 #line 11026 "parser.y" /* yacc.c:1646 */
17520  {
17521  (yyval) = cb_build_intrinsic ((yyvsp[-4]), (yyvsp[-2]), (yyvsp[0]), 0);
17522  }
17523 #line 17445 "parser.c" /* yacc.c:1646 */
17524  break;
17525 
17526  case 1625:
17527 #line 11030 "parser.y" /* yacc.c:1646 */
17528  {
17529  (yyval) = cb_build_intrinsic ((yyvsp[-4]), (yyvsp[-2]), (yyvsp[0]), 0);
17530  }
17531 #line 17453 "parser.c" /* yacc.c:1646 */
17532  break;
17533 
17534  case 1626:
17535 #line 11034 "parser.y" /* yacc.c:1646 */
17536  {
17537  (yyval) = cb_build_intrinsic ((yyvsp[-3]), (yyvsp[-1]), NULL, 0);
17538  }
17539 #line 17461 "parser.c" /* yacc.c:1646 */
17540  break;
17541 
17542  case 1627:
17543 #line 11038 "parser.y" /* yacc.c:1646 */
17544  {
17545  (yyval) = cb_build_intrinsic ((yyvsp[-4]), (yyvsp[-2]), (yyvsp[0]), 0);
17546  }
17547 #line 17469 "parser.c" /* yacc.c:1646 */
17548  break;
17549 
17550  case 1628:
17551 #line 11042 "parser.y" /* yacc.c:1646 */
17552  {
17553  (yyval) = cb_build_intrinsic ((yyvsp[-4]), (yyvsp[-2]), (yyvsp[0]), 0);
17554  }
17555 #line 17477 "parser.c" /* yacc.c:1646 */
17556  break;
17557 
17558  case 1629:
17559 #line 11046 "parser.y" /* yacc.c:1646 */
17560  {
17561  (yyval) = cb_build_intrinsic ((yyvsp[-4]), (yyvsp[-2]), (yyvsp[0]), 0);
17562  }
17563 #line 17485 "parser.c" /* yacc.c:1646 */
17564  break;
17565 
17566  case 1630:
17567 #line 11050 "parser.y" /* yacc.c:1646 */
17568  {
17569  (yyval) = cb_build_intrinsic ((yyvsp[-4]), (yyvsp[-2]), (yyvsp[0]), 0);
17570  }
17571 #line 17493 "parser.c" /* yacc.c:1646 */
17572  break;
17573 
17574  case 1631:
17575 #line 11054 "parser.y" /* yacc.c:1646 */
17576  {
17577  (yyval) = cb_build_intrinsic ((yyvsp[-4]), (yyvsp[-2]), (yyvsp[0]), 0);
17578  }
17579 #line 17501 "parser.c" /* yacc.c:1646 */
17580  break;
17581 
17582  case 1632:
17583 #line 11058 "parser.y" /* yacc.c:1646 */
17584  {
17585  (yyval) = cb_build_intrinsic ((yyvsp[-1]), (yyvsp[0]), NULL, 0);
17586  }
17587 #line 17509 "parser.c" /* yacc.c:1646 */
17588  break;
17589 
17590  case 1633:
17591 #line 11062 "parser.y" /* yacc.c:1646 */
17592  {
17593  (yyval) = cb_build_intrinsic ((yyvsp[-1]), (yyvsp[0]), NULL, 1);
17594  }
17595 #line 17517 "parser.c" /* yacc.c:1646 */
17596  break;
17597 
17598  case 1643:
17599 #line 11087 "parser.y" /* yacc.c:1646 */
17600  {
17601  (yyval) = NULL;
17602  }
17603 #line 17525 "parser.c" /* yacc.c:1646 */
17604  break;
17605 
17606  case 1644:
17607 #line 11091 "parser.y" /* yacc.c:1646 */
17608  {
17609  (yyval) = CB_BUILD_PAIR ((yyvsp[-2]), NULL);
17610  }
17611 #line 17533 "parser.c" /* yacc.c:1646 */
17612  break;
17613 
17614  case 1645:
17615 #line 11095 "parser.y" /* yacc.c:1646 */
17616  {
17617  (yyval) = CB_BUILD_PAIR ((yyvsp[-3]), (yyvsp[-1]));
17618  }
17619 #line 17541 "parser.c" /* yacc.c:1646 */
17620  break;
17621 
17622  case 1646:
17623 #line 11102 "parser.y" /* yacc.c:1646 */
17624  {
17625  (yyval) = NULL;
17626  }
17627 #line 17549 "parser.c" /* yacc.c:1646 */
17628  break;
17629 
17630  case 1647:
17631 #line 11106 "parser.y" /* yacc.c:1646 */
17632  {
17633  (yyval) = (yyvsp[-1]);
17634  }
17635 #line 17557 "parser.c" /* yacc.c:1646 */
17636  break;
17637 
17638  case 1648:
17639 #line 11110 "parser.y" /* yacc.c:1646 */
17640  {
17641  (yyval) = NULL;
17642  }
17643 #line 17565 "parser.c" /* yacc.c:1646 */
17644  break;
17645 
17646  case 1649:
17647 #line 11117 "parser.y" /* yacc.c:1646 */
17648  {
17649  cb_tree x;
17650 
17651  x = CB_LIST_INIT ((yyvsp[0]));
17652  (yyval) = cb_list_add (x, cb_int0);
17653  }
17654 #line 17576 "parser.c" /* yacc.c:1646 */
17655  break;
17656 
17657  case 1650:
17658 #line 11124 "parser.y" /* yacc.c:1646 */
17659  {
17660  cb_tree x;
17661 
17662  x = CB_LIST_INIT ((yyvsp[-2]));
17663  (yyval) = cb_list_add (x, cb_int1);
17664  }
17665 #line 17587 "parser.c" /* yacc.c:1646 */
17666  break;
17667 
17668  case 1651:
17669 #line 11131 "parser.y" /* yacc.c:1646 */
17670  {
17671  cb_tree x;
17672 
17673  x = CB_LIST_INIT ((yyvsp[-2]));
17674  (yyval) = cb_list_add (x, cb_int2);
17675  }
17676 #line 17598 "parser.c" /* yacc.c:1646 */
17677  break;
17678 
17679  case 1652:
17680 #line 11141 "parser.y" /* yacc.c:1646 */
17681  {
17682  cb_tree x;
17683 
17684  x = CB_LIST_INIT ((yyvsp[0]));
17685  (yyval) = cb_list_add (x, cb_null);
17686  }
17687 #line 17609 "parser.c" /* yacc.c:1646 */
17688  break;
17689 
17690  case 1653:
17691 #line 11148 "parser.y" /* yacc.c:1646 */
17692  {
17693  cb_tree x;
17694 
17695  x = CB_LIST_INIT ((yyvsp[-2]));
17696  (yyval) = cb_list_add (x, (yyvsp[0]));
17697  }
17698 #line 17620 "parser.c" /* yacc.c:1646 */
17699  break;
17700 
17701  case 1654:
17702 #line 11158 "parser.y" /* yacc.c:1646 */
17703  {
17704  cb_tree x;
17705 
17706  x = CB_LIST_INIT ((yyvsp[0]));
17707  (yyval) = cb_list_add (x, cb_null);
17708  }
17709 #line 17631 "parser.c" /* yacc.c:1646 */
17710  break;
17711 
17712  case 1655:
17713 #line 11165 "parser.y" /* yacc.c:1646 */
17714  {
17715  cb_tree x;
17716 
17717  x = CB_LIST_INIT ((yyvsp[-2]));
17718  (yyval) = cb_list_add (x, cb_ref ((yyvsp[0])));
17719  }
17720 #line 17642 "parser.c" /* yacc.c:1646 */
17721  break;
17722 
17723  case 1656:
17724 #line 11175 "parser.y" /* yacc.c:1646 */
17725  {
17726  (yyval) = cb_list_add ((yyvsp[0]), cb_int0);
17727  }
17728 #line 17650 "parser.c" /* yacc.c:1646 */
17729  break;
17730 
17731  case 1657:
17732 #line 11179 "parser.y" /* yacc.c:1646 */
17733  {
17734  const int num_args = cb_list_length ((yyvsp[-2]));
17735 
17736  if (num_args == 4) {
17737  cb_error_x ((yyvsp[-2]), _("Cannot specify offset and SYSTEM-OFFSET at the same time."));
17738  }
17739 
17740  (yyval) = cb_list_add ((yyvsp[-2]), cb_int1);
17741  }
17742 #line 17664 "parser.c" /* yacc.c:1646 */
17743  break;
17744 
17745  case 1658:
17746 #line 11192 "parser.y" /* yacc.c:1646 */
17747  {
17748  (yyval) = cb_list_add ((yyvsp[0]), cb_int0);
17749  }
17750 #line 17672 "parser.c" /* yacc.c:1646 */
17751  break;
17752 
17753  case 1659:
17754 #line 11196 "parser.y" /* yacc.c:1646 */
17755  {
17756  const int num_args = cb_list_length ((yyvsp[-2]));
17757 
17758  if (num_args == 3) {
17759  cb_error_x ((yyvsp[-2]), _("Cannot specify offset and SYSTEM-OFFSET at the same time."));
17760  }
17761 
17762  (yyval) = cb_list_add ((yyvsp[-2]), cb_int1);
17763  }
17764 #line 17686 "parser.c" /* yacc.c:1646 */
17765  break;
17766 
17767  case 1660:
17768 #line 11210 "parser.y" /* yacc.c:1646 */
17769  {
17770  non_const_word = 1;
17771  }
17772 #line 17694 "parser.c" /* yacc.c:1646 */
17773  break;
17774 
17775  case 1661:
17776 #line 11218 "parser.y" /* yacc.c:1646 */
17777  { (yyval) = cb_int0; }
17778 #line 17700 "parser.c" /* yacc.c:1646 */
17779  break;
17780 
17781  case 1662:
17782 #line 11219 "parser.y" /* yacc.c:1646 */
17783  { (yyval) = cb_int1; }
17784 #line 17706 "parser.c" /* yacc.c:1646 */
17785  break;
17786 
17787  case 1663:
17788 #line 11223 "parser.y" /* yacc.c:1646 */
17789  { (yyval) = cb_int0; }
17790 #line 17712 "parser.c" /* yacc.c:1646 */
17791  break;
17792 
17793  case 1664:
17794 #line 11224 "parser.y" /* yacc.c:1646 */
17795  { (yyval) = cb_int1; }
17796 #line 17718 "parser.c" /* yacc.c:1646 */
17797  break;
17798 
17799  case 1665:
17800 #line 11228 "parser.y" /* yacc.c:1646 */
17801  { (yyval) = NULL; }
17802 #line 17724 "parser.c" /* yacc.c:1646 */
17803  break;
17804 
17805  case 1666:
17806 #line 11229 "parser.y" /* yacc.c:1646 */
17807  { (yyval) = cb_int1; }
17808 #line 17730 "parser.c" /* yacc.c:1646 */
17809  break;
17810 
17811  case 1667:
17812 #line 11234 "parser.y" /* yacc.c:1646 */
17813  {
17814  (yyval) = NULL;
17815  }
17816 #line 17738 "parser.c" /* yacc.c:1646 */
17817  break;
17818 
17819  case 1668:
17820 #line 11238 "parser.y" /* yacc.c:1646 */
17821  {
17822  (yyval) = (yyvsp[0]);
17823  }
17824 #line 17746 "parser.c" /* yacc.c:1646 */
17825  break;
17826 
17827  case 1669:
17828 #line 11245 "parser.y" /* yacc.c:1646 */
17829  {
17830  (yyval) = NULL;
17831  }
17832 #line 17754 "parser.c" /* yacc.c:1646 */
17833  break;
17834 
17835  case 1670:
17836 #line 11249 "parser.y" /* yacc.c:1646 */
17837  {
17838  (yyval) = (yyvsp[0]);
17839  }
17840 #line 17762 "parser.c" /* yacc.c:1646 */
17841  break;
17842 
17843  case 1671:
17844 #line 11256 "parser.y" /* yacc.c:1646 */
17845  { (yyval) = cb_int0; }
17846 #line 17768 "parser.c" /* yacc.c:1646 */
17847  break;
17848 
17849  case 1672:
17850 #line 11257 "parser.y" /* yacc.c:1646 */
17851  { (yyval) = cb_int1; }
17852 #line 17774 "parser.c" /* yacc.c:1646 */
17853  break;
17854 
17855  case 1673:
17856 #line 11258 "parser.y" /* yacc.c:1646 */
17857  { (yyval) = cb_int2; }
17858 #line 17780 "parser.c" /* yacc.c:1646 */
17859  break;
17860 
17861  case 1674:
17862 #line 11262 "parser.y" /* yacc.c:1646 */
17863  { (yyval) = NULL; }
17864 #line 17786 "parser.c" /* yacc.c:1646 */
17865  break;
17866 
17867  case 1675:
17868 #line 11263 "parser.y" /* yacc.c:1646 */
17869  { (yyval) = cb_true; }
17870 #line 17792 "parser.c" /* yacc.c:1646 */
17871  break;
17872 
17873  case 1676:
17874 #line 11267 "parser.y" /* yacc.c:1646 */
17875  { (yyval) = cb_int (cb_flag_optional_file); }
17876 #line 17798 "parser.c" /* yacc.c:1646 */
17877  break;
17878 
17879  case 1677:
17880 #line 11268 "parser.y" /* yacc.c:1646 */
17881  { (yyval) = cb_int1; }
17882 #line 17804 "parser.c" /* yacc.c:1646 */
17883  break;
17884 
17885  case 1678:
17886 #line 11269 "parser.y" /* yacc.c:1646 */
17887  { (yyval) = cb_int0; }
17888 #line 17810 "parser.c" /* yacc.c:1646 */
17889  break;
17890 
17891  case 1679:
17892 #line 11274 "parser.y" /* yacc.c:1646 */
17893  {
17894  (yyval) = cb_int0;
17895  }
17896 #line 17818 "parser.c" /* yacc.c:1646 */
17897  break;
17898 
17899  case 1680:
17900 #line 11278 "parser.y" /* yacc.c:1646 */
17901  {
17902  if ((yyvsp[0])) {
17903  (yyval) = (yyvsp[0]);
17904  } else {
17905  (yyval) = cb_int (COB_STORE_ROUND);
17906  }
17907  cobc_cs_check = 0;
17908  }
17909 #line 17831 "parser.c" /* yacc.c:1646 */
17910  break;
17911 
17912  case 1681:
17913 #line 11290 "parser.y" /* yacc.c:1646 */
17914  {
17915  (yyval) = NULL;
17916  cobc_cs_check = 0;
17917  }
17918 #line 17840 "parser.c" /* yacc.c:1646 */
17919  break;
17920 
17921  case 1682:
17922 #line 11295 "parser.y" /* yacc.c:1646 */
17923  {
17924  (yyval) = (yyvsp[0]);
17925  cobc_cs_check = 0;
17926  }
17927 #line 17849 "parser.c" /* yacc.c:1646 */
17928  break;
17929 
17930  case 1683:
17931 #line 11303 "parser.y" /* yacc.c:1646 */
17932  {
17934  }
17935 #line 17857 "parser.c" /* yacc.c:1646 */
17936  break;
17937 
17938  case 1684:
17939 #line 11307 "parser.y" /* yacc.c:1646 */
17940  {
17942  }
17943 #line 17865 "parser.c" /* yacc.c:1646 */
17944  break;
17945 
17946  case 1685:
17947 #line 11311 "parser.y" /* yacc.c:1646 */
17948  {
17950  }
17951 #line 17873 "parser.c" /* yacc.c:1646 */
17952  break;
17953 
17954  case 1686:
17955 #line 11315 "parser.y" /* yacc.c:1646 */
17956  {
17958  }
17959 #line 17881 "parser.c" /* yacc.c:1646 */
17960  break;
17961 
17962  case 1687:
17963 #line 11319 "parser.y" /* yacc.c:1646 */
17964  {
17966  }
17967 #line 17889 "parser.c" /* yacc.c:1646 */
17968  break;
17969 
17970  case 1688:
17971 #line 11323 "parser.y" /* yacc.c:1646 */
17972  {
17974  }
17975 #line 17897 "parser.c" /* yacc.c:1646 */
17976  break;
17977 
17978  case 1689:
17979 #line 11327 "parser.y" /* yacc.c:1646 */
17980  {
17982  }
17983 #line 17905 "parser.c" /* yacc.c:1646 */
17984  break;
17985 
17986  case 1690:
17987 #line 11331 "parser.y" /* yacc.c:1646 */
17988  {
17990  }
17991 #line 17913 "parser.c" /* yacc.c:1646 */
17992  break;
17993 
17994  case 1691:
17995 #line 11337 "parser.y" /* yacc.c:1646 */
17996  { (yyval) = NULL; }
17997 #line 17919 "parser.c" /* yacc.c:1646 */
17998  break;
17999 
18000  case 1692:
18001 #line 11338 "parser.y" /* yacc.c:1646 */
18002  { (yyval) = cb_int1; }
18003 #line 17925 "parser.c" /* yacc.c:1646 */
18004  break;
18005 
18006 
18007 #line 17929 "parser.c" /* yacc.c:1646 */
18008  default: break;
18009  }
18010  /* User semantic actions sometimes alter yychar, and that requires
18011  that yytoken be updated with the new translation. We take the
18012  approach of translating immediately before every use of yytoken.
18013  One alternative is translating here after every semantic action,
18014  but that translation would be missed if the semantic action invokes
18015  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
18016  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
18017  incorrect destructor might then be invoked immediately. In the
18018  case of YYERROR or YYBACKUP, subsequent parser actions might lead
18019  to an incorrect destructor call or verbose syntax error message
18020  before the lookahead is translated. */
18021  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
18022 
18023  YYPOPSTACK (yylen);
18024  yylen = 0;
18025  YY_STACK_PRINT (yyss, yyssp);
18026 
18027  *++yyvsp = yyval;
18028 
18029  /* Now 'shift' the result of the reduction. Determine what state
18030  that goes to, based on the state we popped back to and the rule
18031  number reduced by. */
18032 
18033  yyn = yyr1[yyn];
18034 
18035  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
18036  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
18037  yystate = yytable[yystate];
18038  else
18039  yystate = yydefgoto[yyn - YYNTOKENS];
18040 
18041  goto yynewstate;
18042 
18043 
18044 /*--------------------------------------.
18045 | yyerrlab -- here on detecting error. |
18046 `--------------------------------------*/
18047 yyerrlab:
18048  /* Make sure we have latest lookahead translation. See comments at
18049  user semantic actions for why this is necessary. */
18050  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
18051 
18052  /* If not already recovering from an error, report this error. */
18053  if (!yyerrstatus)
18054  {
18055  ++yynerrs;
18056 #if ! YYERROR_VERBOSE
18057  yyerror (YY_("syntax error"));
18058 #else
18059 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
18060  yyssp, yytoken)
18061  {
18062  char const *yymsgp = YY_("syntax error");
18063  int yysyntax_error_status;
18064  yysyntax_error_status = YYSYNTAX_ERROR;
18065  if (yysyntax_error_status == 0)
18066  yymsgp = yymsg;
18067  else if (yysyntax_error_status == 1)
18068  {
18069  if (yymsg != yymsgbuf)
18070  YYSTACK_FREE (yymsg);
18071  yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
18072  if (!yymsg)
18073  {
18074  yymsg = yymsgbuf;
18075  yymsg_alloc = sizeof yymsgbuf;
18076  yysyntax_error_status = 2;
18077  }
18078  else
18079  {
18080  yysyntax_error_status = YYSYNTAX_ERROR;
18081  yymsgp = yymsg;
18082  }
18083  }
18084  yyerror (yymsgp);
18085  if (yysyntax_error_status == 2)
18086  goto yyexhaustedlab;
18087  }
18088 # undef YYSYNTAX_ERROR
18089 #endif
18090  }
18091 
18092 
18093 
18094  if (yyerrstatus == 3)
18095  {
18096  /* If just tried and failed to reuse lookahead token after an
18097  error, discard it. */
18098 
18099  if (yychar <= YYEOF)
18100  {
18101  /* Return failure if at end of input. */
18102  if (yychar == YYEOF)
18103  YYABORT;
18104  }
18105  else
18106  {
18107  yydestruct ("Error: discarding",
18108  yytoken, &yylval);
18109  yychar = YYEMPTY;
18110  }
18111  }
18112 
18113  /* Else will try to reuse lookahead token after shifting the error
18114  token. */
18115  goto yyerrlab1;
18116 
18117 
18118 /*---------------------------------------------------.
18119 | yyerrorlab -- error raised explicitly by YYERROR. |
18120 `---------------------------------------------------*/
18121 yyerrorlab:
18122 
18123  /* Pacify compilers like GCC when the user code never invokes
18124  YYERROR and the label yyerrorlab therefore never appears in user
18125  code. */
18126  if (/*CONSTCOND*/ 0)
18127  goto yyerrorlab;
18128 
18129  /* Do not reclaim the symbols of the rule whose action triggered
18130  this YYERROR. */
18131  YYPOPSTACK (yylen);
18132  yylen = 0;
18133  YY_STACK_PRINT (yyss, yyssp);
18134  yystate = *yyssp;
18135  goto yyerrlab1;
18136 
18137 
18138 /*-------------------------------------------------------------.
18139 | yyerrlab1 -- common code for both syntax error and YYERROR. |
18140 `-------------------------------------------------------------*/
18141 yyerrlab1:
18142  yyerrstatus = 3; /* Each real token shifted decrements this. */
18143 
18144  for (;;)
18145  {
18146  yyn = yypact[yystate];
18147  if (!yypact_value_is_default (yyn))
18148  {
18149  yyn += YYTERROR;
18150  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
18151  {
18152  yyn = yytable[yyn];
18153  if (0 < yyn)
18154  break;
18155  }
18156  }
18157 
18158  /* Pop the current state because it cannot handle the error token. */
18159  if (yyssp == yyss)
18160  YYABORT;
18161 
18162 
18163  yydestruct ("Error: popping",
18164  yystos[yystate], yyvsp);
18165  YYPOPSTACK (1);
18166  yystate = *yyssp;
18167  YY_STACK_PRINT (yyss, yyssp);
18168  }
18169 
18171  *++yyvsp = yylval;
18173 
18174 
18175  /* Shift the error token. */
18176  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
18177 
18178  yystate = yyn;
18179  goto yynewstate;
18180 
18181 
18182 /*-------------------------------------.
18183 | yyacceptlab -- YYACCEPT comes here. |
18184 `-------------------------------------*/
18185 yyacceptlab:
18186  yyresult = 0;
18187  goto yyreturn;
18188 
18189 /*-----------------------------------.
18190 | yyabortlab -- YYABORT comes here. |
18191 `-----------------------------------*/
18192 yyabortlab:
18193  yyresult = 1;
18194  goto yyreturn;
18195 
18196 #if !defined yyoverflow || YYERROR_VERBOSE
18197 /*-------------------------------------------------.
18198 | yyexhaustedlab -- memory exhaustion comes here. |
18199 `-------------------------------------------------*/
18200 yyexhaustedlab:
18201  yyerror (YY_("memory exhausted"));
18202  yyresult = 2;
18203  /* Fall through. */
18204 #endif
18205 
18206 yyreturn:
18207  if (yychar != YYEMPTY)
18208  {
18209  /* Make sure we have latest lookahead translation. See comments at
18210  user semantic actions for why this is necessary. */
18211  yytoken = YYTRANSLATE (yychar);
18212  yydestruct ("Cleanup: discarding lookahead",
18213  yytoken, &yylval);
18214  }
18215  /* Do not reclaim the symbols of the rule whose action triggered
18216  this YYABORT or YYACCEPT. */
18217  YYPOPSTACK (yylen);
18218  YY_STACK_PRINT (yyss, yyssp);
18219  while (yyssp != yyss)
18220  {
18221  yydestruct ("Cleanup: popping",
18222  yystos[*yyssp], yyvsp);
18223  YYPOPSTACK (1);
18224  }
18225 #ifndef yyoverflow
18226  if (yyss != yyssa)
18227  YYSTACK_FREE (yyss);
18228 #endif
18229 #if YYERROR_VERBOSE
18230  if (yymsg != yymsgbuf)
18231  YYSTACK_FREE (yymsg);
18232 #endif
18233  return yyresult;
18234 }
#define COB_SCREEN_SCROLL_DOWN
Definition: common.h:917
unsigned int flag_justified
Definition: tree.h:706
int optional
Definition: tree.h:843
int indexes
Definition: tree.h:678
#define SYN_CLAUSE_10
Definition: parser.c:139
struct cb_label * handler_label
Definition: tree.h:805
#define COB_SCREEN_BLINK
Definition: common.h:903
unsigned int flag_is_debug_sect
Definition: tree.h:797
const char * name
Definition: tree.h:645
#define CB_CHAIN_PAIR(x, y, z)
Definition: tree.h:1855
#define TERM_SEARCH
Definition: parser.c:115
#define SYN_CLAUSE_6
Definition: parser.c:135
#define COBC_HD_I_O_CONTROL
Definition: parser.c:256
unsigned int flag_is_pointer
Definition: tree.h:710
#define CB_PAIR_X(x)
Definition: tree.h:1205
Definition: tree.h:1181
int occurs_max
Definition: tree.h:677
void cb_emit_sort_using(cb_tree, cb_tree)
Definition: typeck.c:8293
#define COB_STORE_AWAY_FROM_ZERO
Definition: common.h:871
cb_tree line_counter
Definition: tree.h:1215
#define CB_TREE(x)
Definition: tree.h:440
cb_tree returning
Definition: tree.h:1288
#define PENDING(x)
Definition: parser.c:86
#define CB_REFERENCE_P(x)
Definition: tree.h:902
struct cb_label * current_section
Definition: parser.c:170
#define CB_SIZES(x)
Definition: tree.h:1195
void cb_error_x(cb_tree x, const char *fmt,...)
Definition: error.c:233
cb_tree cb_true
Definition: tree.c:122
#define CB_LABEL(x)
Definition: tree.h:801
#define CB_SYSTEM_NAME(x)
Definition: tree.h:586
#define COB_GT
Definition: common.h:729
cb_tree cb_list_append(cb_tree l1, cb_tree l2)
Definition: tree.c:1305
#define SYN_CLAUSE_17
Definition: parser.c:146
static const yytype_int16 yypact[]
Definition: parser.c:2827
cb_tree cb_build_intrinsic(cb_tree name, cb_tree args, cb_tree refmod, const int isuser)
Definition: tree.c:3304
cb_tree cb_int1
Definition: tree.c:134
struct cb_field * local_storage
Definition: tree.h:1277
static void check_not_88_level(cb_tree x)
Definition: parser.c:1191
static void emit_default_displays_for_x_list(struct cb_list *x_list)
Definition: parser.c:1250
#define COBC_HD_PROCEDURE_DIVISION
Definition: parser.c:265
int record_max
Definition: tree.h:842
size_t cb_needs_01
Definition: field.c:37
void cb_emit_search(cb_tree, cb_tree, cb_tree, cb_tree)
Definition: typeck.c:7965
void cb_emit_accept_date_yyyymmdd(cb_tree)
Definition: typeck.c:4521
#define CB_INTEGER(x)
Definition: tree.h:522
cb_tree cb_build_perform_exit(struct cb_label *)
Definition: typeck.c:7574
#define COB_SCREEN_BELL
Definition: common.h:900
void cb_emit_accept_exception_status(cb_tree)
Definition: typeck.c:4494
#define CB_CALL_BY_REFERENCE
Definition: tree.h:44
cb_tree cb_build_comment(const char *str)
Definition: tree.c:1540
#define YY_(Msgid)
Definition: parser.c:1933
unsigned int flag_filler
Definition: tree.h:714
const char * cb_source_file
Definition: cobc.c:145
#define COB_STORE_NEAR_TOWARD_ZERO
Definition: common.h:874
unsigned int flag_is_pdiv_opt
Definition: tree.h:725
cb_tree cb_build_filler(void)
Definition: tree.c:2591
static struct cb_report * report_instance
Definition: parser.c:193
static unsigned int in_declaratives
Definition: parser.c:209
unsigned int flag_gen_debug
Definition: tree.h:1321
unsigned int flag_line_adv
Definition: tree.h:855
static unsigned int call_nothing
Definition: parser.c:240
#define SYN_CLAUSE_18
Definition: parser.c:147
#define CB_VALID_TREE(x)
Definition: tree.h:445
cb_tree report_list
Definition: tree.h:1262
static int has_relative_pos(struct cb_field const *field)
Definition: parser.c:1183
cb_tree mnemonic_spec_list
Definition: tree.h:1268
cb_tree cb_build_constant(cb_tree name, cb_tree value)
Definition: tree.c:2189
#define COB_STORE_NEAR_AWAY_FROM_ZERO
Definition: common.h:872
#define TERM_DIVIDE
Definition: parser.c:106
static void set_up_func_prototype(cb_tree prototype_name, cb_tree ext_name, const int is_current_func)
Definition: parser.c:943
unsigned int flag_any_length
Definition: tree.h:712
void * cobc_parse_malloc(const size_t size)
Definition: cobc.c:809
void cb_validate_program_body(struct cb_program *)
Definition: typeck.c:2554
unsigned int flag_global
Definition: tree.h:853
#define SYN_CLAUSE_13
Definition: parser.c:142
unsigned int flag_initial
Definition: tree.h:1307
#define CB_FIELD_ADD(x, y)
Definition: tree.h:1856
#define YYNTOKENS
Definition: parser.c:2125
void cb_warning_x(cb_tree x, const char *fmt,...)
Definition: error.c:222
void cb_emit_set_on_off(cb_tree, cb_tree)
Definition: typeck.c:8124
cb_tree cb_norm_high
Definition: tree.c:131
struct cb_field * sister
Definition: tree.h:653
static int call_mode
Definition: parser.c:224
static cb_tree qualifier
Definition: parser.c:203
#define COB_CLOSE_UNIT_REMOVAL
Definition: common.h:796
unsigned int flag_global_use
Definition: tree.h:1312
static int first_nested_program
Definition: parser.c:223
#define CB_CALL_BY_CONTENT
Definition: tree.h:45
cb_tree screen_backg
Definition: tree.h:668
void cb_emit_write(cb_tree, cb_tree, cb_tree, cb_tree)
Definition: typeck.c:8604
#define MAX_FD_RECORD
Definition: common.h:556
unsigned int flag_no_based
Definition: tree.h:1149
cb_tree cb_build_unstring_delimited(cb_tree, cb_tree)
Definition: typeck.c:8578
#define emit_statement(x)
Definition: parser.c:88
int cb_exp_line
Definition: parser.c:174
#define COB_LOCK_AUTOMATIC
Definition: common.h:775
#define CB_LITERAL(x)
Definition: tree.h:601
static cb_tree get_default_display_device()
Definition: parser.c:1233
int lock_mode
Definition: tree.h:846
unsigned int flag_global
Definition: tree.h:782
void cb_emit_move_corresponding(cb_tree, cb_tree)
Definition: typeck.c:4175
void cb_add_common_prog(struct cb_program *prog)
Definition: tree.c:1469
int occurs_min
Definition: tree.h:676
void cb_emit_call(cb_tree, cb_tree, cb_tree, cb_tree, cb_tree, cb_tree)
Definition: typeck.c:4748
#define CB_FIELD_PTR(x)
Definition: tree.h:745
#define SYN_CLAUSE_4
Definition: parser.c:133
static const yytype_uint16 yydefact[]
Definition: parser.c:3111
static unsigned int needs_debug_item
Definition: parser.c:237
#define CB_CONV_STDCALL
Definition: tree.h:135
cb_tree cb_build_class_name(cb_tree name, cb_tree list)
Definition: tree.c:1622
void cb_emit_stop_run(cb_tree)
Definition: typeck.c:8482
#define COBC_HD_FILE_CONTROL
Definition: parser.c:255
Definition: parser.c:1856
static void check_attribs_with_conflict(cb_tree fgc, cb_tree bgc, cb_tree scroll, cb_tree timeout, cb_tree prompt, cb_tree size_is, const char *attrib_name, const int attrib, const char *confl_name, const int confl_attrib)
Definition: parser.c:1125
#define CB_SIZE_8
Definition: tree.h:52
int cb_get_int(const cb_tree x)
Definition: tree.c:1101
static int check_line_col_duplicate
Definition: parser.c:232
#define SYN_CLAUSE_9
Definition: parser.c:138
cb_tree reference_list
Definition: tree.h:1255
#define COB_SCREEN_NO_ECHO
Definition: common.h:919
#define YY_STACK_PRINT(Bottom, Top)
Definition: parser.c:6244
#define CB_CS_ASSIGN
Definition: cobc.h:105
cb_tree screen_from
Definition: tree.h:665
unsigned int flag_synchronized
Definition: tree.h:715
cb_tree cb_norm_low
Definition: tree.c:130
int warningopt
Definition: cobc.c:176
void cb_emit_move(cb_tree, cb_tree)
Definition: typeck.c:7416
struct cb_file * file
Definition: tree.h:1214
unsigned int cb_verify(const enum cb_support, const char *)
Definition: error.c:246
int cb_id
Definition: cobc.c:163
cb_tree cb_build_list(cb_tree purpose, cb_tree value, cb_tree chain)
Definition: tree.c:1293
void cb_emit_open(cb_tree, cb_tree, cb_tree)
Definition: typeck.c:7461
unsigned int flag_fatal_check
Definition: tree.h:786
void cb_emit_set_false(cb_tree)
Definition: typeck.c:8171
unsigned int flag_real_label
Definition: tree.h:781
#define CB_PURPOSE_INT(x)
Definition: tree.h:1197
static unsigned int report_count
Definition: parser.c:212
cb_tree exit_label
Definition: tree.h:771
unsigned int flag_is_returning
Definition: tree.h:737
cb_tree cb_ref(cb_tree x)
Definition: tree.c:2653
cb_tree cb_build_field_tree(cb_tree level, cb_tree name, struct cb_field *last_field, enum cb_storage storage, struct cb_file *fn, const int expl_level)
Definition: field.c:90
unsigned int flag_fileid
Definition: tree.h:852
#define COB_STORE_ROUND
Definition: common.h:867
const char * source_file
Definition: tree.h:431
#define COB_NE
Definition: common.h:731
char * cb_name(cb_tree x)
Definition: tree.c:735
cb_tree cb_build_expr(cb_tree)
Definition: typeck.c:3136
void cb_emit_accept_mnemonic(cb_tree, cb_tree)
Definition: typeck.c:4614
#define CB_SIZE_2
Definition: tree.h:50
#define COB_STORE_NEAR_EVEN
Definition: common.h:873
#define CB_PAIR_Y(x)
Definition: tree.h:1206
#define CB_ALPHABET_ASCII
Definition: tree.h:108
cb_tree cb_build_write_advancing_lines(cb_tree, cb_tree)
Definition: typeck.c:8685
int nested_level
Definition: tree.h:1295
void cb_emit_read(cb_tree, cb_tree, cb_tree, cb_tree, cb_tree)
Definition: typeck.c:7586
struct cb_picture * pic
Definition: tree.h:659
#define COB_LOCK_MANUAL
Definition: common.h:774
#define CB_BUILD_FUNCALL_1(f, a1)
Definition: tree.h:1799
#define COB_SCREEN_COLUMN_PLUS
Definition: common.h:897
#define YY_REDUCE_PRINT(Rule)
Definition: parser.c:6275
#define SYN_CLAUSE_1
Definition: parser.c:130
#define TERM_ACCEPT
Definition: parser.c:100
cb_tree cb_build_cond(cb_tree)
Definition: typeck.c:3737
cb_tree lattop
Definition: tree.h:835
cb_tree cb_zero
Definition: tree.c:125
short int yytype_int16
Definition: parser.c:1907
cb_tree cb_build_address(cb_tree)
Definition: typeck.c:1357
#define CB_PICTURE(x)
Definition: tree.h:631
static int next_label_id
Definition: parser.c:218
cb_tree crt_status
Definition: tree.h:1287
#define CB_ALPHABET_NATIVE
Definition: tree.h:107
static void clean_up_program(cb_tree name, const unsigned char type)
Definition: parser.c:866
unsigned int flag_main
Definition: tree.h:1305
void cb_emit_accept(cb_tree, cb_tree, struct cb_attr_struct *)
Definition: typeck.c:4341
#define COB_ORG_INDEXED
Definition: common.h:745
#define CB_PURPOSE(x)
Definition: tree.h:1192
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Definition: parser.c:1983
cb_tree cb_build_tallying_characters(cb_tree)
Definition: typeck.c:5863
struct cb_alt_key * next
Definition: tree.h:812
struct cb_field * cb_resolve_redefines(struct cb_field *field, cb_tree redefines)
Definition: field.c:247
void cb_emit_inspect(cb_tree, cb_tree, cb_tree, const unsigned int)
Definition: typeck.c:5805
void cb_emit_allocate(cb_tree, cb_tree, cb_tree, cb_tree)
Definition: typeck.c:4668
void cb_emit_set_true(cb_tree)
Definition: typeck.c:8139
#define COB_CLOSE_UNIT
Definition: common.h:795
#define COB_SCREEN_LINE_MINUS
Definition: common.h:896
int handler_id
Definition: tree.h:1148
#define YYFINAL
Definition: parser.c:2120
void cb_emit_accept_day(cb_tree)
Definition: typeck.c:4530
struct cb_attr_struct * attr_ptr
Definition: tree.h:1147
cb_tree linage
Definition: tree.h:832
void cb_emit_get_environment(cb_tree, cb_tree)
Definition: typeck.c:4575
void cb_emit_accept_day_of_week(cb_tree)
Definition: typeck.c:4548
cb_tree cb_false
Definition: tree.c:123
#define COB_SELECT_STDIN
Definition: common.h:761
cb_tree file_list
Definition: tree.h:1252
#define COB_SCREEN_LEFTLINE
Definition: common.h:920
cb_tree cb_build_add(cb_tree, cb_tree, cb_tree)
Definition: typeck.c:4015
enum cb_category cb_tree_category(cb_tree x)
Definition: tree.c:745
static unsigned int in_debugging
Definition: parser.c:210
cb_tree cb_any
Definition: tree.c:121
int last_detail
Definition: tree.h:1224
static void bit_set_attr(const cb_tree onoff, const int attrval)
Definition: parser.c:1065
int level
Definition: tree.h:673
unsigned char flag_is_global
Definition: tree.h:699
#define YYEMPTY
Definition: parser.c:6129
#define COB_SCREEN_FULL
Definition: common.h:906
void cb_emit_continue(void)
Definition: typeck.c:5031
#define COB_LE
Definition: common.h:728
#define SYN_CLAUSE_2
Definition: parser.c:131
cb_tree cb_quote
Definition: tree.c:132
#define CB_WORD_ITEMS(x)
Definition: tree.h:906
static enum cb_storage current_storage
Definition: parser.c:200
#define SYN_CLAUSE_20
Definition: parser.c:149
unsigned int flag_ext_assign
Definition: tree.h:851
cb_tree cb_space
Definition: tree.c:127
#define COB_FI
Definition: common.h:732
void cb_emit_command_line(cb_tree)
Definition: typeck.c:5133
static unsigned int needs_field_debug
Definition: parser.c:236
#define CB_CS_EXIT
Definition: cobc.h:112
#define COB_GE
Definition: common.h:730
cb_tree cb_build_perform_times(cb_tree)
Definition: typeck.c:7536
void cb_emit_accept_environment(cb_tree)
Definition: typeck.c:4587
#define CB_FILE(x)
Definition: tree.h:858
cb_tree cb_build_perform_once(cb_tree)
Definition: typeck.c:7523
#define yyclearin
Definition: parser.c:6128
unsigned int flag_screen
Definition: tree.h:1309
void cb_emit_arg_number(cb_tree)
Definition: typeck.c:5124
struct cb_program * current_program
Definition: parser.c:168
cb_tree cb_build_const_length(cb_tree)
Definition: typeck.c:1730
#define COB_SCREEN_OVERLINE
Definition: common.h:913
void cb_validate_program_environment(struct cb_program *)
Definition: typeck.c:1891
unsigned int flag_debugging
Definition: tree.h:1320
unsigned int flag_dummy_paragraph
Definition: tree.h:788
#define TERMINATOR_ERROR(x, z)
Definition: parser.c:124
void cb_emit_delete_file(cb_tree)
Definition: typeck.c:5076
#define CB_SIZE_4
Definition: tree.h:51
unsigned int flag_file_global
Definition: tree.h:1315
#define CB_LITERAL_P(x)
Definition: tree.h:602
#define SYN_CLAUSE_19
Definition: parser.c:148
cb_tree cb_build_perform_until(cb_tree, cb_tree)
Definition: typeck.c:7550
static cb_tree line_column
Definition: parser.c:244
static const yytype_uint16 yyr1[]
Definition: parser.c:5707
void cb_emit_sort_init(cb_tree, cb_tree, cb_tree)
Definition: typeck.c:8237
short all
Definition: tree.h:598
char * cb_to_cname(const char *s)
Definition: tree.c:705
const char * name
Definition: tree.h:1137
static struct cb_report * current_report
Definition: parser.c:192
static struct cb_file * current_file
Definition: parser.c:191
cb_tree debug_list
Definition: tree.h:1264
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: parser.c:6182
#define TERM_SUBTRACT
Definition: parser.c:118
static const yytype_int16 yytable[]
Definition: parser.c:3571
#define CB_VALUE(x)
Definition: tree.h:1193
void cb_emit_accept_name(cb_tree, cb_tree)
Definition: typeck.c:4635
#define YYSTACK_ALLOC
Definition: parser.c:2030
static cb_tree save_tree
Definition: parser.c:205
void cb_emit_set_to(cb_tree, cb_tree)
Definition: typeck.c:8019
#define CB_TREE_CLASS(x)
Definition: tree.h:442
void cb_emit_arithmetic(cb_tree, const int, cb_tree)
Definition: typeck.c:3465
static unsigned int check_unreached
Definition: parser.c:208
#define YYSYNTAX_ERROR
cb_tree cb_build_inspect_region_start(void)
Definition: typeck.c:5961
cb_tree cb_build_perform_forever(cb_tree)
Definition: typeck.c:7561
unsigned int flag_item_78
Definition: tree.h:711
void cb_emit_accept_command_line(cb_tree)
Definition: typeck.c:4566
struct cb_report * build_report(cb_tree name)
Definition: tree.c:2324
#define COB_ACCESS_DYNAMIC
Definition: common.h:752
int yychar
Definition: parser.c:6552
cb_tree cb_build_replacing_trailing(cb_tree, cb_tree, cb_tree)
Definition: typeck.c:5947
static void remove_attrib(int attrib)
Definition: parser.c:1166
#define COBC_HD_LINKAGE_SECTION
Definition: parser.c:261
#define CB_SIZE_AUTO
Definition: tree.h:48
#define COB_SCREEN_ERASE_EOL
Definition: common.h:904
static void check_set_usage(const enum cb_usage usage)
Definition: parser.c:1176
#define COBC_HD_CONFIGURATION_SECTION
Definition: parser.c:252
cb_tree cb_build_alphanumeric_literal(const void *data, const size_t size)
Definition: tree.c:1716
cb_tree cb_build_converting(cb_tree, cb_tree, cb_tree)
Definition: typeck.c:5954
cb_tree cb_build_sub(cb_tree, cb_tree, cb_tree)
Definition: typeck.c:4058
cb_tree cb_build_replacing_characters(cb_tree, cb_tree)
Definition: typeck.c:5916
#define COBC_HD_WORKING_STORAGE_SECTION
Definition: parser.c:259
#define YYERROR
Definition: parser.c:6134
struct cb_alphabet_name * code_set
Definition: tree.h:840
int record_min
Definition: tree.h:841
#define YYEOF
Definition: parser.c:6130
#define CB_PERFORM(x)
Definition: tree.h:1118
void cb_emit_if(cb_tree, cb_tree, cb_tree)
Definition: typeck.c:5665
void cb_emit_evaluate(cb_tree, cb_tree)
Definition: typeck.c:5571
static unsigned int save_debug
Definition: parser.c:235
int cb_list_length(cb_tree l)
Definition: tree.c:1342
#define COB_SCREEN_UNDERLINE
Definition: common.h:912
cb_tree depending
Definition: tree.h:647
unsigned int flag_section
Definition: tree.h:777
#define SYN_CLAUSE_3
Definition: parser.c:132
static void set_up_use_file(struct cb_file *fileptr)
Definition: parser.c:498
cb_tree cb_build_numeric_literal(const int sign, const void *data, const int scale)
Definition: tree.c:1681
struct cb_file * build_file(cb_tree name)
Definition: tree.c:2344
cb_tree defined_prog_list
Definition: parser.c:172
#define TERM_COMPUTE
Definition: parser.c:103
cb_tree cb_build_perform_varying(cb_tree name, cb_tree from, cb_tree by, cb_tree until)
Definition: tree.c:3160
strict implicit external value
Definition: warning.def:54
unsigned int flag_return
Definition: tree.h:780
static int size_mode
Definition: parser.c:225
static const yytype_uint16 yystos[]
Definition: parser.c:5425
#define CB_FIELD_P(x)
Definition: tree.h:741
unsigned int flag_is_verified
Definition: tree.h:722
cb_tree function_spec_list
Definition: tree.h:1271
cb_tree cb_build_replacing_leading(cb_tree, cb_tree, cb_tree)
Definition: typeck.c:5933
int lines
Definition: tree.h:1219
#define CB_ALPHABET_NAME(x)
Definition: tree.h:550
cb_tree screen_column
Definition: tree.h:664
#define YYSTACK_BYTES(N)
Definition: parser.c:2075
#define YYDPRINTF(Args)
Definition: parser.c:6170
cb_tree cb_build_assignment_name(struct cb_file *, cb_tree)
Definition: typeck.c:1276
unsigned int flag_sign_leading
Definition: tree.h:704
unsigned int cobc_in_repository
Definition: parser.c:180
#define TERM_CALL
Definition: parser.c:102
void cobc_parse_free(void *prevptr)
Definition: cobc.c:885
void cb_emit_accept_time(cb_tree)
Definition: typeck.c:4557
#define CB_SIZE_1
Definition: tree.h:49
#define _(s)
Definition: cobcrun.c:59
#define SYN_CLAUSE_23
Definition: parser.c:152
#define COBC_HD_SPECIAL_NAMES
Definition: parser.c:253
#define COB_OPEN_EXTEND
Definition: common.h:787
#define COB_OPEN_INPUT
Definition: common.h:784
cb_tree lookup_system_name(const char *name)
Definition: reserved.c:2860
#define COB_SCREEN_REVERSE
Definition: common.h:910
Definition: tree.h:643
void cb_emit_initialize(cb_tree, cb_tree, cb_tree, cb_tree, cb_tree)
Definition: typeck.c:5682
#define SYN_CLAUSE_7
Definition: parser.c:136
#define CB_CALL_BY_VALUE
Definition: tree.h:46
Definition: parser.c:1348
#define yytable_value_is_error(Yytable_value)
Definition: parser.c:2822
int footing
Definition: tree.h:1225
static int literal_value(cb_tree x)
Definition: parser.c:476
static size_t increment_depth(void)
Definition: parser.c:423
static cb_tree upon_value
Definition: parser.c:243
static int is_screen_field(cb_tree x)
Definition: parser.c:1207
#define CB_SIZE_UNSIGNED
Definition: tree.h:53
cb_tree reports
Definition: tree.h:831
yytype_int16 yyss_alloc
Definition: parser.c:2066
static cb_tree start_tree
Definition: parser.c:206
#define TERM_IF
Definition: parser.c:108
cb_tree cb_build_tallying_trailing(void)
Definition: typeck.c:5896
cb_tree cb_build_label(cb_tree name, struct cb_label *section)
Definition: tree.c:2988
void cb_init_tallying(void)
Definition: typeck.c:5849
#define CB_CHAIN(x)
Definition: tree.h:1194
Definition: parser.c:1698
static const yytype_int16 yycheck[]
Definition: parser.c:4482
static struct cb_field * description_field
Definition: parser.c:190
static cb_tree current_expr
Definition: parser.c:188
#define yyerrok
Definition: parser.c:6127
cb_tree cb_build_ppointer(cb_tree)
Definition: typeck.c:1824
EC ARGUMENT EC EC BOUND EC BOUND EC BOUND EC BOUND TABLE EC DATA EC DATA EC DATA PTR NULL
Definition: exception.def:95
Definition: tree.h:636
#define CB_TREE_TAG(x)
Definition: tree.h:441
unsigned int flag_external
Definition: tree.h:850
static unsigned int check_pic_duplicate
Definition: parser.c:230
#define COB_CLOSE_NO_REWIND
Definition: common.h:794
cb_tree cb_int4
Definition: tree.c:137
#define CB_REPORT_P(x)
Definition: tree.h:1229
unsigned int flag_statement
Definition: tree.h:792
#define COB_ORG_SEQUENTIAL
Definition: common.h:742
if sign
Definition: flag.def:42
void cb_emit_return(cb_tree, cb_tree)
Definition: typeck.c:7818
static int set_up_program(cb_tree id, cb_tree as_literal, const unsigned char type)
Definition: parser.c:777
Definition: parser.c:1559
#define TERM_WRITE
Definition: parser.c:120
static struct cb_field * current_field
Definition: parser.c:189
int screen_flag
Definition: tree.h:684
cb_tree cb_return_code
Definition: tree.h:1265
#define COB_SCREEN_LOWER
Definition: common.h:924
#define COB_LOCK_EXCLUSIVE
Definition: common.h:773
#define SYN_CLAUSE_11
Definition: parser.c:140
cb_tree cb_build_locale_name(cb_tree name, cb_tree list)
Definition: tree.c:1645
#define yylex
Definition: pplex.c:18
#define CB_CS_CALL
Definition: cobc.h:106
cb_tree locale_list
Definition: tree.h:1260
void cb_emit_start(cb_tree, cb_tree, cb_tree, cb_tree)
Definition: typeck.c:8414
void cb_emit_sort_input(cb_tree)
Definition: typeck.c:8309
void cb_emit_free(cb_tree)
Definition: typeck.c:5588
void cb_emit_release(cb_tree, cb_tree)
Definition: typeck.c:7780
cb_tree cb_int0
Definition: tree.c:133
void cb_emit_ready_trace(void)
Definition: typeck.c:7690
#define CB_STATEMENT(x)
Definition: tree.h:1155
cb_tree latbot
Definition: tree.h:836
unsigned char prog_type
Definition: tree.h:1303
cb_tree cb_concat_literals(const cb_tree x1, const cb_tree x2)
Definition: tree.c:1729
void cb_emit_rollback(void)
Definition: typeck.c:7844
#define COB_STORE_TRUNCATION
Definition: common.h:878
#define CB_NAME(x)
Definition: tree.h:904
#define TERM_RETURN
Definition: parser.c:113
cb_tree page_counter
Definition: tree.h:1216
struct cb_field * cb_validate_78_item(struct cb_field *f, const cob_u32_t no78add)
Definition: field.c:1415
int first_detail
Definition: tree.h:1222
static unsigned int header_check
Definition: parser.c:239
unsigned int flag_occurs
Definition: tree.h:702
unsigned int flag_invalid
Definition: tree.h:716
#define CB_REFERENCE(x)
Definition: tree.h:901
cb_tree alphabet_name_list
Definition: tree.h:1256
static int zero_conflicting_flags(const int screen_flag, int parent_flag)
Definition: parser.c:1150
#define COB_ORG_RELATIVE
Definition: common.h:744
#define COB_CLOSE_LOCK
Definition: common.h:793
void cb_build_debug_item(void)
Definition: typeck.c:2243
cb_tree cb_one
Definition: tree.c:126
#define CB_BEFORE
Definition: tree.h:25
#define CB_CLASS_NAME_P(x)
Definition: tree.h:563
static unsigned int main_flag_set
Definition: parser.c:217
cb_tree cb_int3
Definition: tree.c:136
struct cb_program * handler_prog
Definition: tree.h:806
int dir
Definition: tree.h:640
static COB_INLINE COB_A_INLINE void check_not_highlight_and_lowlight(const int flags, const int flag_to_set)
Definition: parser.c:1005
void redefinition_error(cb_tree x)
Definition: error.c:284
#define COB_SCREEN_LOWLIGHT
Definition: common.h:908
int segment
Definition: tree.h:775
#define CB_PROGRAM_TYPE
Definition: tree.h:41
cb_tree exit_label
Definition: tree.h:1111
void cb_emit_reset_trace(void)
Definition: typeck.c:7699
cb_tree global_list
Definition: tree.h:1261
#define SYN_CLAUSE_8
Definition: parser.c:137
#define CB_CONV_STATIC_LINK
Definition: tree.h:132
int loop_counter
Definition: tree.h:1292
cb_tree cb_build_if_check_break(cb_tree, cb_tree)
Definition: typeck.c:5671
cb_tree cb_int(const int n)
Definition: tree.c:1488
void cb_emit_commit(void)
Definition: typeck.c:5023
static void check_repeated(const char *clause, const unsigned int bitval, unsigned int *already_seen)
Definition: parser.c:980
#define CB_FEATURE_CONVENTION
Definition: tree.h:197
void cb_emit_unstring(cb_tree, cb_tree, cb_tree, cb_tree, cb_tree)
Definition: typeck.c:8552
#define YYABORT
Definition: parser.c:6133
#define TERM_STRING
Definition: parser.c:117
#define COB_ACCESS_SEQUENTIAL
Definition: common.h:751
#define TERM_DELETE
Definition: parser.c:104
cb_tree sharing
Definition: tree.h:825
cb_tree linage_ctr
Definition: tree.h:833
unsigned int flag_console_is_crt
Definition: tree.h:1319
#define CB_FILE_P(x)
Definition: tree.h:859
cb_tree latfoot
Definition: tree.h:834
int size
Definition: tree.h:672
Definition: tree.h:818
int non_const_word
Definition: parser.c:178
cb_tree entry_list
Definition: tree.h:1251
#define TERM_PERFORM
Definition: parser.c:110
void cb_emit_accept_arg_value(cb_tree)
Definition: typeck.c:4605
#define CB_ALPHABET_CUSTOM
Definition: tree.h:110
#define COB_SCREEN_INITIAL
Definition: common.h:918
static void clear_initial_values(void)
Definition: parser.c:641
int functions_are_all
Definition: parser.c:177
static void begin_statement(const char *name, const unsigned int term)
Definition: parser.c:271
#define TERMINATOR_CLEAR(x, z)
Definition: parser.c:125
unsigned char currency_symbol
Definition: tree.h:1301
cb_tree cb_build_reference(const char *name)
Definition: tree.c:2572
#define COB_SCREEN_REQUIRED
Definition: common.h:909
cb_tree cb_build_tallying_all(void)
Definition: typeck.c:5874
void finalize_file(struct cb_file *f, struct cb_field *records)
Definition: tree.c:2409
int cb_get_level(cb_tree x)
Definition: field.c:46
#define TERM_MULTIPLY
Definition: parser.c:109
unsigned int flag_any_numeric
Definition: tree.h:736
int duplicates
Definition: tree.h:814
#define yypact_value_is_default(Yystate)
Definition: parser.c:2817
struct cb_field * rename_thru
Definition: tree.h:655
static void yydestruct(const char *yymsg, int yytype, cb_tree *yyvaluep)
Definition: parser.c:6536
void cb_validate_88_item(struct cb_field *f)
Definition: field.c:1386
cb_tree cb_error_node
Definition: tree.c:140
cb_tree screen_to
Definition: tree.h:666
#define COB_DESCENDING
Definition: common.h:736
#define COB_OPEN_I_O
Definition: common.h:786
void cb_emit_search_all(cb_tree, cb_tree, cb_tree, cb_tree)
Definition: typeck.c:7985
cb_tree cb_build_display_name(cb_tree)
Definition: typeck.c:5362
#define COBC_HD_FILE_SECTION
Definition: parser.c:258
struct cb_field * parent
Definition: tree.h:651
void cb_emit_sort_finish(cb_tree)
Definition: typeck.c:8356
#define TERM_REWRITE
Definition: parser.c:114
cb_tree cb_build_write_advancing_mnemonic(cb_tree, cb_tree)
Definition: typeck.c:8701
cb_tree cb_build_tallying_data(cb_tree)
Definition: typeck.c:5856
cb_tree yylval
Definition: parser.c:6555
static cb_tree advancing_value
Definition: parser.c:242
void cb_emit_delete(cb_tree)
Definition: typeck.c:5039
#define EVAL_DEPTH
Definition: parser.c:163
const char * program_id
Definition: tree.h:1244
static unsigned int use_global_ind
Definition: parser.c:214
static int contains_only_screen_field(struct cb_list *x_list)
Definition: parser.c:1219
void cb_emit_perform(cb_tree, cb_tree)
Definition: typeck.c:7509
cb_tree class_name_list
Definition: tree.h:1258
#define COB_SCREEN_BLANK_LINE
Definition: common.h:901
unsigned int flag_segments
Definition: tree.h:1317
void cb_emit_goto(cb_tree, cb_tree)
Definition: typeck.c:5629
#define CB_DEVICE_CONSOLE
Definition: tree.h:156
unsigned int flag_blank_zero
Definition: tree.h:705
#define COBC_HD_LOCAL_STORAGE_SECTION
Definition: parser.c:260
#define CB_BUILD_CHAIN(x, y)
Definition: tree.h:1852
void cb_emit_set_up_down(cb_tree, cb_tree, cb_tree)
Definition: typeck.c:8106
cb_tree index_list
Definition: tree.h:650
cb_tree cb_build_replacing_all(cb_tree, cb_tree, cb_tree)
Definition: typeck.c:5926
#define COB_SCREEN_SECURE
Definition: common.h:911
void validate_file(struct cb_file *f, cb_tree name)
Definition: tree.c:2360
#define COB_SCREEN_HIGHLIGHT
Definition: common.h:907
void cb_error(const char *,...) COB_A_FORMAT12
Definition: error.c:98
#define COB_SCREEN_PROMPT
Definition: common.h:914
static unsigned int inspect_keyword
Definition: parser.c:216
unsigned int flag_recursive
Definition: tree.h:1308
#define COB_STORE_PROHIBITED
Definition: common.h:875
int access_mode
Definition: tree.h:845
#define SYN_CLAUSE_21
Definition: parser.c:150
#define COB_EQ
Definition: common.h:726
static unsigned int samearea
Definition: parser.c:215
static COB_INLINE COB_A_INLINE void check_screen_attr_with_conflict(const char *clause, const int bitval, const char *confl_clause, const int confl_bit)
Definition: parser.c:1049
Definition: parser.c:1394
static unsigned int current_linage
Definition: parser.c:211
#define COB_SCREEN_ERASE_EOS
Definition: common.h:905
static cb_tree next_label_list
Definition: parser.c:196
#define COBC_HD_ENVIRONMENT_DIVISION
Definition: parser.c:251
struct cb_field * cb_get_real_field(void)
Definition: field.c:1445
cb_tree label_list
Definition: tree.h:1254
unsigned int flag_chained
Definition: tree.h:1311
#define COBC_HD_INPUT_OUTPUT_SECTION
Definition: parser.c:254
#define COB_SCREEN_GRID
Definition: common.h:925
static unsigned int skip_statements
Definition: parser.c:233
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
Definition: parser.c:2086
#define CB_INVALID_TREE(x)
Definition: tree.h:446
char * source_name
Definition: tree.h:1245
#define CB_FUNCTION_TYPE
Definition: tree.h:42
cb_tree file_status
Definition: tree.h:824
#define COB_SCREEN_LINE_PLUS
Definition: common.h:895
#define TERM_UNSTRING
Definition: parser.c:119
int special
Definition: tree.h:847
cb_tree assign
Definition: tree.h:823
static const yytype_int16 yydefgoto[]
Definition: parser.c:3481
#define CB_ADD_TO_CHAIN(x, y)
Definition: tree.h:1854
unsigned int flag_common
Definition: tree.h:1306
void cb_emit_set_attribute(cb_tree, const int, const int)
Definition: typeck.c:8207
#define YYTERROR
Definition: parser.c:6157
#define YYPOPSTACK(N)
static void screen_display(cob_screen *s, const int line, const int column)
Definition: screenio.c:1591
cb_tree key
Definition: tree.h:813
cb_tree cb_null
Definition: tree.c:124
#define COBC_HD_DATA_DIVISION
Definition: parser.c:257
static unsigned int check_duplicate
Definition: parser.c:228
#define COB_STORE_TOWARD_GREATER
Definition: common.h:876
cb_tree cb_build_unstring_into(cb_tree, cb_tree, cb_tree)
Definition: typeck.c:8587
void cb_emit_display(cb_tree, cb_tree, cb_tree, cb_tree, struct cb_attr_struct *)
Definition: typeck.c:5236
static int eval_inc2
Definition: parser.c:221
cb_tree screen_prompt
Definition: tree.h:669
cb_tree collating_sequence
Definition: tree.h:1284
int yynerrs
Definition: parser.c:6557
struct handler_struct global_handler[5]
Definition: tree.h:1283
#define TERM_READ
Definition: parser.c:111
cb_tree screen_line
Definition: tree.h:663
const char * ename
Definition: tree.h:646
cb_tree classification
Definition: tree.h:1285
#define CB_EXCEPTION_ENABLE(id)
Definition: cobc.h:243
unsigned int cobc_in_procedure
Definition: parser.c:179
cb_tree cb_build_display_mnemonic(cb_tree)
Definition: typeck.c:5340
#define CB_CS_DISPLAY
Definition: cobc.h:110
cb_tree cursor_pos
Definition: tree.h:1286
static int depth
Definition: parser.c:222
void cb_emit_display_omitted(cb_tree, struct cb_attr_struct *)
Definition: typeck.c:5217
cb_tree cb_build_binary_list(cb_tree l, const int op)
Definition: tree.c:2902
unsigned int flag_declaratives
Definition: tree.h:784
#define YYMAXDEPTH
Definition: parser.c:6305
static unsigned int start_debug
Definition: parser.c:234
#define COB_MAX_SUBSCRIPTS
Definition: codegen.c:44
cb_tree cb_build_tallying_leading(void)
Definition: typeck.c:5885
unsigned int flag_sign_separate
Definition: tree.h:703
#define TERM_EVALUATE
Definition: parser.c:107
#define COBC_HD_PROGRAM_ID
Definition: parser.c:266
#define yyerror
Definition: parser.c:84
cb_tree cb_high
Definition: tree.c:129
void cb_check_field_debug(cb_tree)
Definition: typeck.c:904
#define COB_LOCK_MULTIPLE
Definition: common.h:776
#define CB_REPORT(x)
Definition: tree.h:1228
void cb_emit_set_last_exception_to_off(void)
Definition: typeck.c:8229
int cb_category_is_alpha(cb_tree x)
Definition: tree.c:843
cb_tree cb_build_identifier(cb_tree, const int)
Definition: typeck.c:1426
int organization
Definition: tree.h:844
cb_tree key
Definition: tree.h:637
#define CB_WORD_COUNT(x)
Definition: tree.h:905
void cb_warning(const char *,...) COB_A_FORMAT12
Definition: error.c:87
void cb_emit_accept_escape_key(cb_tree)
Definition: typeck.c:4485
#define CB_LIST_INIT(x)
Definition: tree.h:1851
static int eval_inc
Definition: parser.c:220
const char * demangle_name
Definition: cobc.c:147
unsigned int flag_declarative_exit
Definition: tree.h:783
#define TERMINATOR_WARNING(x, z)
Definition: parser.c:123
#define SYN_CLAUSE_22
Definition: parser.c:151
static cb_tree eval_check[32][32]
Definition: parser.c:247
#define YYINITDEPTH
Definition: parser.c:6294
#define COB_ORG_SORT
Definition: common.h:746
#define CB_ALPHABET_NAME_P(x)
Definition: tree.h:551
static cb_tree perform_stack
Definition: parser.c:202
void cb_emit_sort_giving(cb_tree, cb_tree)
Definition: typeck.c:8319
#define COB_SCREEN_UPDATE
Definition: common.h:915
cb_tree cb_build_tallying_value(cb_tree, cb_tree)
Definition: typeck.c:5907
void cb_emit_exit(const unsigned int)
Definition: typeck.c:5653
static int eval_level
Definition: parser.c:219
#define COB_ACCESS_RANDOM
Definition: common.h:753
struct cb_label * all_procedure
Definition: tree.h:1289
struct cb_field * linkage_storage
Definition: tree.h:1278
static void check_attr_with_conflict(const char *clause, const int bitval, const char *confl_clause, const int confl_bit, int *flags)
Definition: parser.c:1035
static void check_relaxed_syntax(const unsigned int lev)
Definition: parser.c:525
#define YYTRANSLATE(YYX)
Definition: parser.c:2138
#define CB_AFTER
Definition: tree.h:26
int cb_source_line
Definition: cobc.c:178
#define CB_CS_SET
Definition: cobc.h:116
#define SYN_CLAUSE_12
Definition: parser.c:141
unsigned char numeric_separator
Definition: tree.h:1302
#define COB_ORG_LINE_SEQUENTIAL
Definition: common.h:743
unsigned int flag_trailing_separate
Definition: tree.h:1318
cb_tree exec_list
Definition: tree.h:1253
void cb_emit_accept_date(cb_tree)
Definition: typeck.c:4512
#define COB_LOCK_OPEN_EXCLUSIVE
Definition: common.h:777
void cb_emit_env_value(cb_tree)
Definition: typeck.c:5115
#define CB_BUILD_PAIR(x, y)
Definition: tree.h:1853
static unsigned int check_on_off_duplicate
Definition: parser.c:229
static void begin_implicit_statement(void)
Definition: parser.c:290
struct cb_field * working_storage
Definition: tree.h:1276
#define COB_STORE_TOWARD_LESSER
Definition: common.h:877
void cb_emit_corresponding(cb_tree(*)(cb_tree, cb_tree, cb_tree), cb_tree, cb_tree, cb_tree)
Definition: parser.c:1769
void cb_emit_unlock(cb_tree)
Definition: typeck.c:8535
#define YYACCEPT
Definition: parser.c:6132
void cb_emit_cancel(cb_tree)
Definition: typeck.c:4977
char * cb_build_program_id(cb_tree, cb_tree, const cob_u32_t)
Definition: typeck.c:1190
#define TERM_DISPLAY
Definition: parser.c:105
static unsigned int prog_end
Definition: parser.c:213
unsigned int flag_begin
Definition: tree.h:779
int last_control
Definition: tree.h:1223
void cb_emit_accept_line_or_col(cb_tree, const int)
Definition: typeck.c:4476
void cb_emit_close(cb_tree, cb_tree)
Definition: typeck.c:4988
cb_tree cb_build_write_advancing_page(cb_tree)
Definition: typeck.c:8738
unsigned int flag_validated
Definition: tree.h:1310
static void error_if_no_advancing_in_screen_display(cb_tree advancing)
Definition: parser.c:1302
static int setattr_val_on
Definition: parser.c:226
cb_tree cycle_label
Definition: tree.h:1112
static void check_attribs(cb_tree fgc, cb_tree bgc, cb_tree scroll, cb_tree timeout, cb_tree prompt, cb_tree size_is, const int attrib)
Definition: parser.c:1114
#define SYN_CLAUSE_5
Definition: parser.c:134
#define YYLAST
Definition: parser.c:2122
#define COB_OPEN_OUTPUT
Definition: common.h:785
#define COB_LA
Definition: common.h:733
static void check_headers_present(const unsigned int lev1, const unsigned int lev2, const unsigned int lev3, const unsigned int lev4)
Definition: parser.c:590
struct cb_program * cb_build_program(struct cb_program *last_program, const int nest_level)
Definition: tree.c:1400
unsigned int flag_void
Definition: tree.h:1325
#define SYN_CLAUSE_16
Definition: parser.c:145
cb_tree cb_build_debug(const cb_tree target, const char *str, const cb_tree fld)
Definition: tree.c:1566
int heading
Definition: tree.h:1221
void cb_validate_field(struct cb_field *f)
Definition: field.c:1338
size_t cobc_check_valid_name(const char *name, const unsigned int prechk)
Definition: cobc.c:1142
cb_tree key
Definition: tree.h:826
#define COB_SCREEN_COLUMN_MINUS
Definition: common.h:898
void cb_build_registers(void)
Definition: typeck.c:1051
void cb_emit_divide(cb_tree, cb_tree, cb_tree, cb_tree)
Definition: typeck.c:5399
#define COB_CLOSE_NORMAL
Definition: common.h:792
unsigned int flag_skip_label
Definition: tree.h:798
struct cb_statement * current_statement
Definition: parser.c:169
cb_tree cb_list_reverse(cb_tree l)
Definition: tree.c:1327
unsigned int flag_dummy_section
Definition: tree.h:787
#define COB_SCREEN_AUTO
Definition: common.h:899
void cb_emit_string(cb_tree, cb_tree, cb_tree)
Definition: typeck.c:8490
unsigned int cobc_cs_check
Definition: parser.c:182
void cb_emit_sort_output(cb_tree)
Definition: typeck.c:8340
static const yytype_uint8 yyr2[]
Definition: parser.c:5906
#define COB_MAX_FIELD_PARAMS
Definition: common.h:559
#define COB_SCREEN_INPUT
Definition: common.h:916
cb_tree handler1
Definition: tree.h:1141
cb_tree cb_build_length(cb_tree)
Definition: typeck.c:1781
struct cb_field * redefines
Definition: tree.h:654
int dispattrs
Definition: tree.h:1130
cb_tree values
Definition: tree.h:648
cb_tree cb_build_section_name(cb_tree, const int)
Definition: typeck.c:1251
cb_tree cb_build_alphabet_name(cb_tree name)
Definition: tree.c:1605
#define TERM_START
Definition: parser.c:116
static unsigned int check_comp_duplicate
Definition: parser.c:231
static struct cb_file * linage_file
Definition: parser.c:195
cb_tree screen_foreg
Definition: tree.h:667
static void check_screen_attr(const char *clause, const int bitval)
Definition: parser.c:1012
struct cb_label * current_paragraph
Definition: parser.c:171
int step_count
Definition: tree.h:685
#define COB_SCREEN_BLANK_SCREEN
Definition: common.h:902
#define CB_INTEGER_P(x)
Definition: tree.h:523
int cobc_flag_main
Definition: cobc.c:167
struct cb_alt_key * alt_key_list
Definition: tree.h:827
#define COB_SELECT_STDOUT
Definition: common.h:762
unsigned int flag_has_external
Definition: tree.h:1316
void cb_set_system_names(void)
Definition: tree.c:2637
#define COB_ASCENDING
Definition: common.h:735
#define COB_LT
Definition: common.h:727
void cb_clear_real_field(void)
Definition: field.c:1439
static int setattr_val_off
Definition: parser.c:227
const char * cb_define(cb_tree name, cb_tree val)
Definition: tree.c:1367
#define COB_SCREEN_UPPER
Definition: common.h:923
#define push_expr(type, node)
Definition: parser.c:95
unsigned int alphabet_type
Definition: tree.h:543
#define SYN_CLAUSE_14
Definition: parser.c:143
unsigned int flag_merge
Definition: tree.h:1151
#define SYN_CLAUSE_24
Definition: parser.c:153
cb_tree cb_build_binary_op(cb_tree x, const int op, cb_tree y)
Definition: tree.c:2827
void cb_unput_dot(void)
Definition: scanner.c:4765
cb_tree record_depending
Definition: tree.h:830
static const yytype_int16 yypgoto[]
Definition: parser.c:3393
cb_tree cb_debug_contents
Definition: typeck.c:88
struct cb_key * keys
Definition: tree.h:658
#define CB_ALPHABET_EBCDIC
Definition: tree.h:109
#define likely(x)
Definition: common.h:436
enum cb_storage storage
Definition: tree.h:692
#define YYSTACK_FREE
Definition: parser.c:2031
#define CB_CONV_NO_RET_UPD
Definition: tree.h:131
int nkeys
Definition: tree.h:682
cb_tree cb_low
Definition: tree.c:128
cb_tree cb_int2
Definition: tree.c:135
cb_tree yyvs_alloc
Definition: parser.c:2067
static void emit_entry(const char *name, const int encode, cb_tree using_list)
Definition: parser.c:315
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
Definition: parser.c:1984
#define YYSIZE_T
Definition: parser.c:1917
cb_tree cb_build_replacing_first(cb_tree, cb_tree, cb_tree)
Definition: typeck.c:5940
cb_tree cb_define_switch_name(cb_tree, cb_tree, const int)
Definition: typeck.c:1228
cb_tree symbolic_char_list
Definition: tree.h:1257
unsigned char decimal_point
Definition: tree.h:1300
#define CB_FIELD(x)
Definition: tree.h:740
#define TERM_ADD
Definition: parser.c:101
struct cb_field * screen_storage
Definition: tree.h:1279
unsigned int flag_first_is_goto
Definition: tree.h:793
cb_tree cb_build_goto(const cb_tree target, const cb_tree depending)
Definition: tree.c:3118
cb_tree varying
Definition: tree.h:1110
int errorcount
Definition: cobc.c:173
void cb_emit_accept_day_yyyyddd(cb_tree)
Definition: typeck.c:4539
cb_tree cb_build_index(cb_tree, cb_tree, const unsigned int, struct cb_field *)
Definition: typeck.c:1337
char * orig_program_id
Definition: tree.h:1246
void cb_emit_setenv(cb_tree, cb_tree)
Definition: typeck.c:8013
int num_proc_params
Definition: tree.h:1296
int columns
Definition: tree.h:1220
unsigned char flag_external
Definition: tree.h:697
void cb_emit_accept_arg_number(cb_tree)
Definition: typeck.c:4596
cb_tree cb_list_add(cb_tree l, cb_tree x)
Definition: tree.c:1315
void cb_emit_accept_user_name(cb_tree)
Definition: typeck.c:4503
cb_tree handler2
Definition: tree.h:1142
void cb_emit_alter(cb_tree, cb_tree)
Definition: typeck.c:4733
void cb_validate_program_data(struct cb_program *)
Definition: typeck.c:2344
unsigned int flag_item_based
Definition: tree.h:713
void cb_emit_env_name(cb_tree)
Definition: typeck.c:5106
void cb_emit_rewrite(cb_tree, cb_tree, cb_tree)
Definition: typeck.c:7707
cb_tree false_88
Definition: tree.h:649

Variable Documentation

int cb_attr_id

Definition at line 164 of file cobc.c.

Referenced by lookup_attr(), and main().

struct cb_text_list* cb_early_exit_list

Definition at line 153 of file cobc.c.

Referenced by output_call().

struct cb_exception cb_exception_table[]

Definition at line 186 of file cobc.c.

int cb_exp_line

Definition at line 174 of file parser.c.

Referenced by cb_expr_finish(), and yyparse().

struct cb_text_list* cb_extension_list

Definition at line 151 of file cobc.c.

Referenced by ppcopy().

int cb_field_id

Definition at line 166 of file cobc.c.

Referenced by cb_build_field(), and main().

int cb_flag_functions_all

Definition at line 170 of file cobc.c.

Referenced by cb_build_program(), and cobc_deciph_funcs().

int cb_flag_main

Definition at line 168 of file cobc.c.

Referenced by process_command_line().

int cb_id
struct cb_text_list* cb_include_list

Definition at line 149 of file cobc.c.

Referenced by ppcopy().

struct cb_text_list* cb_intrinsic_list

Definition at line 150 of file cobc.c.

Referenced by yylex().

FILE* cb_listing_file

Definition at line 157 of file cobc.c.

Referenced by check_listing(), cobc_clean_up(), main(), ppecho(), and preprocess().

int cb_literal_id

Definition at line 165 of file cobc.c.

Referenced by lookup_literal(), and main().

size_t cb_msg_style

Definition at line 43 of file error.c.

Referenced by cobc_print_info(), main(), and print_error().

char* cb_oc_build_stamp

Definition at line 146 of file cobc.c.

Referenced by cobc_print_version(), main(), and output_header().

int cb_saveargc

Definition at line 179 of file cobc.c.

Referenced by main(), and output_header().

char** cb_saveargv

Definition at line 154 of file cobc.c.

Referenced by main(), and output_header().

int cb_source_format

Definition at line 162 of file cobc.c.

Referenced by check_listing(), ppinput(), pplex(), ppopen(), ppparse(), preprocess(), and process_command_line().

struct cb_text_list* cb_static_call_list

Definition at line 152 of file cobc.c.

Referenced by output_call().

FILE* cb_storage_file

Definition at line 156 of file cobc.c.

Referenced by cobc_clean_up(), codegen(), output_storage(), and process_translate().

const char* cb_storage_file_name

Definition at line 148 of file cobc.c.

Referenced by codegen(), and process_translate().

const char* cob_config_dir

Definition at line 155 of file cobc.c.

Referenced by cb_load_conf(), cb_load_conf_file(), and main().

struct reserved_word_list* cob_user_res_list
int cobc_flag_main
unsigned int cobc_gen_listing

Definition at line 180 of file cobc.c.

Referenced by check_listing(), preprocess(), process_command_line(), and process_filename().

char* cobc_glob_line

Definition at line 173 of file parser.c.

Referenced by begin_statement(), and clear_initial_values().

int cobc_seen_stdin

Definition at line 171 of file cobc.c.

Referenced by process_filename().

int cobc_wants_debug

Definition at line 169 of file cobc.c.

Referenced by main(), and process_command_line().

struct cb_label* current_paragraph

Definition at line 171 of file parser.c.

Referenced by cb_validate_program_body(), print_error(), and yyparse().

struct cb_label* current_section

Definition at line 170 of file parser.c.

Referenced by cb_validate_program_body(), print_error(), set_up_use_file(), and yyparse().

struct cb_tree_common* defined_prog_list

Definition at line 172 of file parser.c.

Referenced by cb_find_defined_program_by_id(), and cb_find_defined_program_by_name().

const char* demangle_name

Definition at line 147 of file cobc.c.

Referenced by main(), and yyparse().

int errorcount

Definition at line 173 of file cobc.c.

Referenced by cb_error(), cb_error_x(), cb_plex_error(), ppopen(), preprocess(), process_translate(), and yyparse().

int functions_are_all

Definition at line 177 of file parser.c.

Referenced by cb_build_program(), yylex(), and yyparse().

int no_physical_cancel

Definition at line 177 of file cobc.c.

Referenced by output_module_init(), and process_command_line().

FILE * ppin = (FILE *) 0

Definition at line 367 of file pplex.c.

Referenced by cobc_clean_up(), main(), and preprocess().

FILE * ppout = (FILE *) 0

Definition at line 367 of file pplex.c.

Referenced by cobc_clean_up(), main(), ppparse(), and preprocess().

size_t suppress_warn

Definition at line 90 of file typeck.c.

Referenced by cb_check_overlapping(), move_warning(), output_move(), and validate_move().

int warningcount

Definition at line 174 of file cobc.c.

Referenced by cb_plex_warning(), cb_warning(), and cb_warning_x().

FILE* yyin
FILE* yyout