37 #define _(s) gettext(s)
38 #define N_(s) gettext_noop(s)
61 #define COBC_ABORT() cobc_abort(__FILE__, __LINE__)
62 #define COBC_DUMB_ABORT() cobc_dumb_abort(__FILE__, __LINE__)
65 #define CB_FORMAT_FIXED 0
66 #define CB_FORMAT_FREE 1
69 #define CB_REPLACE_LEADING 1U
70 #define CB_REPLACE_TRAILING 2U
73 #define CB_STRINGIFY(s) #s
74 #define CB_XSTRINGIFY(s) CB_STRINGIFY(s)
77 #define CB_ASSIGN_MF 0
78 #define CB_ASSIGN_IBM 1U
79 #define CB_ASSIGN_COBOL2002 2U
82 #define CB_BYTEORDER_BIG_ENDIAN 0
83 #define CB_BYTEORDER_NATIVE 1U
86 #define CB_BINARY_SIZE_1_2_4_8 0
87 #define CB_BINARY_SIZE_1__8 1U
88 #define CB_BINARY_SIZE_2_4_8 2U
92 #define PLEX_ACT_ELSE 1U
93 #define PLEX_ACT_END 2U
94 #define PLEX_ACT_ELIF 3U
97 #define PLEX_DEF_NONE 0
98 #define PLEX_DEF_LIT 1U
99 #define PLEX_DEF_NUM 2U
100 #define PLEX_DEF_DEL 3U
103 #define CB_CS_ACCEPT (1U << 0)
104 #define CB_CS_ALPHABET (1U << 1)
105 #define CB_CS_ASSIGN (1U << 2)
106 #define CB_CS_CALL (1U << 3)
107 #define CB_CS_CONSTANT (1U << 4)
108 #define CB_CS_DATE (1U << 5)
109 #define CB_CS_DAY (1U << 6)
110 #define CB_CS_DISPLAY (1U << 7)
111 #define CB_CS_ERASE (1U << 8)
112 #define CB_CS_EXIT (1U << 9)
113 #define CB_CS_FROM (1U << 10)
114 #define CB_CS_PROGRAM_ID (1U << 11)
115 #define CB_CS_ROUNDED (1U << 12)
116 #define CB_CS_SET (1U << 13)
117 #define CB_CS_STOP (1U << 14)
118 #define CB_CS_WITH (1U << 15)
122 #define COB_DASH_NAME "a.cob"
123 #define COB_DASH_OUT "a.out"
241 #define CB_EXCEPTION_NAME(id) cb_exception_table[id].name
242 #define CB_EXCEPTION_CODE(id) cb_exception_table[id].code
243 #define CB_EXCEPTION_ENABLE(id) cb_exception_table[id].enable
248 #define CB_FLAG(var,pdok,name,doc) extern int var;
249 #define CB_FLAG_RQ(var,pdok,name,def,opt,doc) extern int var;
250 #define CB_FLAG_NQ(pdok,name,opt,doc)
258 #define CB_WARNDEF(var,name,doc) extern int var;
259 #define CB_NOWARNDEF(var,name,doc) extern int var;
265 #define CB_OPTIM_DEF(x) x,
358 #undef CB_CONFIG_STRING
359 #undef CB_CONFIG_BOOLEAN
360 #undef CB_CONFIG_SUPPORT
362 #define CB_CONFIG_ANY(type,var,name) extern type var;
363 #define CB_CONFIG_INT(var,name) extern unsigned int var;
364 #define CB_CONFIG_STRING(var,name) extern const char *var;
365 #define CB_CONFIG_BOOLEAN(var,name) extern unsigned int var;
366 #define CB_CONFIG_SUPPORT(var,name) extern enum cb_support var;
372 #undef CB_CONFIG_STRING
373 #undef CB_CONFIG_BOOLEAN
374 #undef CB_CONFIG_SUPPORT
380 #ifndef HAVE_DESIGNATED_INITS
388 #if !defined (COB_IN_SCANNER ) && !defined (COB_IN_PPLEX)
391 extern int pplex (
void);
394 #ifndef COB_IN_PPPARSE
399 extern int ppcopy (
const char *,
const char *,
414 #if !defined (COB_IN_SCANNER ) && !defined (COB_IN_PPLEX) && \
415 !defined (COB_IN_PPPARSE)
421 #if !defined (COB_IN_PPPARSE) && !defined (COB_IN_PARSER)
435 #define CB_MSG_STYLE_GCC 0
436 #define CB_MSG_STYLE_MSC 1U
445 const
char *, ...) COB_A_FORMAT23;
struct cb_text_list * next
struct cb_tree_common * defined_prog_list
void ylex_call_destroy(void)
struct cb_text_list * cb_intrinsic_list
void plex_call_destroy(void)
struct reserved_word_list * cobc_user_res_list
void cb_plex_warning(const size_t, const char *,...) COB_A_FORMAT23
struct cb_define_struct * next
void * cobc_main_malloc(const size_t)
unsigned int need_assemble
unsigned int cb_verify(const enum cb_support, const char *)
int cb_load_conf(const char *, const int)
const char * listing_file
struct cb_text_list * cb_extension_list
void ppparse_clear_vars(const struct cb_define_struct *)
int ppcopy(const char *, const char *, struct cb_replace_list *)
struct reserved_word_list * cob_user_res_list
void plex_clear_all(void)
void ylex_clear_all(void)
const char * demangle_source
void ppparse_error(const char *)
void plex_action_directive(const unsigned int, const unsigned int)
unsigned int need_translate
void * cobc_malloc(const size_t)
void cobc_main_free(void *)
void remove_reserved_word(const char *)
void configuration_warning(const char *, const int, const char *,...) COB_A_FORMAT34
int yylex(void)
The main scanner function which does all the work.
struct cb_exception cb_exception_table[]
void * cobc_realloc(void *, const size_t)
struct local_filename * localfile
void * cobc_parse_realloc(void *, const size_t)
cob_u32_t optimize_defs[]
struct cb_replace_list * last
size_t cobc_check_valid_name(const char *, const unsigned int)
void cobc_init_scanner(void)
int pplex(void)
The main scanner function which does all the work.
struct reserved_word_list * next
const char * cb_storage_file_name
void cobc_parse_free(void *)
const char * cob_config_dir
void plex_clear_vars(void)
struct cb_text_list * last
int ppopen(const char *, struct cb_replace_list *)
struct cb_define_struct * last
void pp_set_replace_list(struct cb_replace_list *, const cob_u32_t)
struct cb_text_list * cb_include_list
void * cobc_main_realloc(void *, const size_t)
DECLNORET void cobc_abort(const char *, const int) COB_A_NORETURN
void * cobc_plex_strdup(const char *)
struct cb_label * current_paragraph
void cobc_abort_pr(const char *,...) COB_A_FORMAT12
void * cobc_plex_malloc(const size_t)
void cb_error(const char *,...) COB_A_FORMAT12
void * cobc_strdup(const char *)
struct cb_replace_list * next
void configuration_error(const char *, const int, const int, const char *,...) COB_A_FORMAT45
struct cb_program * current_program
void cob_gen_optim(const enum cb_optim)
int cb_load_std(const char *)
const char * cb_source_file
void cb_warning(const char *,...) COB_A_FORMAT12
void add_reserved_word(const char *, const char *, const int)
void * cobc_main_strdup(const char *)
void * cobc_parse_malloc(const size_t)
struct cb_label * current_section
unsigned int need_preprocess
struct local_filename * next
void * cobc_check_string(const char *)
const struct cb_text_list * old_text
unsigned int cobc_gen_listing
const struct cb_text_list * new_text
DECLNORET void cobc_dumb_abort(const char *, const int)
const char * demangle_name
void * cobc_parse_strdup(const char *)
void cobc_init_typeck(void)
struct cb_text_list * cb_static_call_list
struct cb_text_list * cb_early_exit_list
int cb_flag_functions_all
void cb_plex_error(const size_t, const char *,...) COB_A_FORMAT23
struct cb_statement * current_statement
DECLNORET void cobc_too_many_errors(void) COB_A_NORETURN
int cb_config_entry(char *, const char *, const int)
struct cb_replace_list * prev
void cobc_init_reserved(void)
struct cobc_mem_struct * next