34 #define PIC_ALPHABETIC 0x01
35 #define PIC_NUMERIC 0x02
36 #define PIC_NATIONAL 0x04
37 #define PIC_EDITED 0x08
38 #define PIC_ALPHANUMERIC (PIC_ALPHABETIC | PIC_NUMERIC)
39 #define PIC_ALPHABETIC_EDITED (PIC_ALPHABETIC | PIC_EDITED)
40 #define PIC_ALPHANUMERIC_EDITED (PIC_ALPHANUMERIC | PIC_EDITED)
41 #define PIC_NUMERIC_EDITED (PIC_NUMERIC | PIC_EDITED)
42 #define PIC_NATIONAL_EDITED (PIC_NATIONAL | PIC_EDITED)
113 {
"USER FUNCTION",
"cob_user_function", -1, 1,
160 for (; *s; s++, pos++) {
161 val += pos * toupper (*s);
175 val =
hash ((
const unsigned char *)name);
179 if (strcasecmp (w->
name, name) == 0) {
201 #define CB_FILE_ERR_REQUIRED 1
202 #define CB_FILE_ERR_INVALID_FT 2
203 #define CB_FILE_ERR_INVALID 3
210 cb_error_x (name,
_(
"%s clause is required for file '%s'"),
214 cb_error_x (name,
_(
"%s clause is invalid for file '%s' (file type)"),
218 cb_error_x (name,
_(
"%s clause is invalid for file '%s'"),
272 strcpy (s,
"(void pointer)");
273 return strlen (orig);
279 }
else if (x == cb_true) {
281 }
else if (x == cb_false) {
283 }
else if (x == cb_null) {
285 }
else if (x == cb_zero) {
287 }
else if (x == cb_space) {
289 }
else if (x == cb_low || x == cb_norm_low) {
290 strcpy (s,
"LOW-VALUE");
291 }
else if (x == cb_high || x == cb_norm_high) {
292 strcpy (s,
"HIGH-VALUE");
293 }
else if (x == cb_quote) {
295 }
else if (x == cb_error_node) {
296 strcpy (s,
_(
"Internal error node"));
298 strcpy (s,
_(
"Unknown constant"));
306 sprintf (s,
"\"%s\"", (
char *)
CB_LITERAL (x)->data);
313 strcpy (s,
"FILLER");
322 s += sprintf (s,
"FILLER");
324 s += sprintf (s,
"%s", p->
word->
name);
327 s += sprintf (s,
" (");
331 s += sprintf (s,
CB_CHAIN (l) ?
", " :
")");
336 s += sprintf (s,
" (");
338 s += sprintf (s,
":");
345 s += sprintf (s,
" in ");
368 if (cbop->
op ==
'@') {
369 s += sprintf (s,
"(");
371 s += sprintf (s,
")");
372 }
else if (cbop->
op ==
'!') {
373 s += sprintf (s,
"!");
376 s += sprintf (s,
"(");
378 s += sprintf (s,
" %c ", cbop->
op);
386 s += sprintf (s,
"%s", cbip->
name);
387 for (i = 0; i < cbip->
argc; i++) {
388 s += sprintf (s, (i == 0) ?
"(" :
", ");
391 s += sprintf (s,
")");
397 sprintf (s,
"USER FUNCTION");
406 sprintf (s,
_(
"<Unexpected tree tag %d>"), (
int)
CB_TREE_TAG (x));
409 return strlen (orig);
420 for (l = args; l; l =
CB_CHAIN(l)) {
431 cb_error (
_(
"FUNCTION %s has invalid/not supported arguments - Tag %d"),
461 for (; items; items =
CB_CHAIN (items)) {
477 for (; p; p = p->
parent) {
494 if (candidate ==
NULL) {
545 cb_error (
_(
"Invalid date/time function - '%d'"), intr);
578 cb_error_x (tree,
_(
"FUNCTION '%s' has invalid date/time format"),
583 cb_warning_x (tree,
_(
"FUNCTION '%s' has format in variable"),
599 #if !defined (COB_STRFTIME) && !defined (COB_TIMEZONE)
605 int is_variable_format = data ==
NULL;
606 int is_constant_utc_format
607 = data !=
NULL && strchr (data,
'Z') !=
NULL;
608 int is_formatted_current_date
611 int has_system_offset_arg
615 && ((
struct cb_integer *) last_arg)->val == 1;
616 #define ERR_MSG _("Cannot find the UTC offset on this system")
618 if (!is_formatted_current_date && !has_system_offset_arg) {
622 if (is_variable_format) {
624 }
else if (is_constant_utc_format) {
635 if (const_val == cb_space) {
636 *data = (
unsigned char *)
" ";
637 }
else if (const_val == cb_zero) {
638 *data = (
unsigned char *)
"0";
639 }
else if (const_val == cb_quote) {
640 if (cb_flag_apostrophe) {
641 *data = (
unsigned char *)
"'";
643 *data = (
unsigned char *)
"\"";
645 }
else if (const_val == cb_norm_low) {
646 *data = (
unsigned char *)
"\0";
647 }
else if (const_val == cb_norm_high) {
648 *data = (
unsigned char *)
"\255";
649 }
else if (const_val == cb_null) {
650 *data = (
unsigned char *)
"\0";
680 unsigned char *ldata;
681 unsigned char *rdata;
694 p->
size = lsize + rsize;
696 memcpy (p->
data, ldata, lsize);
697 memcpy (p->
data + lsize, rdata, rsize);
711 for (p = (
unsigned char *)copy; *p; p++) {
712 if (*p ==
'-' || *p ==
' ') {
730 memcpy (p->
data, data, size);
751 if (x == cb_error_node) {
919 const unsigned char *p;
928 for (size = 0, p = l->
data; size < l->size; ++size, ++p) {
929 if (*p != (
unsigned char)
'0') {
945 if (memcmp (p, s, (
size_t)10) > 0) {
961 if (f->
pic->
scale <= 0 && f->
size <= (
int)sizeof (
int)) {
996 const unsigned char *p;
1005 for (size = 0, p = l->
data; size < l->size; ++size, ++p) {
1006 if (*p != (
unsigned char)
'0') {
1018 s =
"9223372036854775808";
1020 s =
"9223372036854775807";
1022 if (memcmp (p, s, (
size_t)19) > 0) {
1072 strncpy (lit_out, literal, 38);
1073 if (strlen (literal) > 38) {
1074 strcpy (lit_out + 35,
"...");
1078 cb_error (
_(
"Invalid numeric literal: '%s'"), lit_out);
1089 _(
"Literal length %d exceeds maximum of %d digits"),
1092 }
else if (
unlikely(size > cb_numlit_length)) {
1094 _(
"Literal length %d exceeds %d digits"),
1095 size, cb_numlit_length);
1116 for (i = 0; i < l->
size; i++) {
1117 if (l->
data[i] !=
'0') {
1126 #if INT_MAX >= 9223372036854775807
1129 s =
"9223372036854775808";
1131 s =
"9223372036854775807";
1133 if (size > 19U || memcmp (&l->
data[i], s, (
size_t)19) > 0) {
1134 cb_error (
_(
"Numeric literal '%s' exceeds limit '%s'"), &l->
data[i], s);
1138 #elif INT_MAX >= 2147483647
1145 if (size > 10U || memcmp (&l->
data[i], s, (
size_t)10) > 0) {
1146 cb_error (
_ (
"Numeric literal '%s' exceeds limit '%s'"), &l->
data[i], s);
1157 if (size == 5U || memcmp (&l->
data[i], s, (
size_t)5) > 0) {
1158 cb_error (
_ (
"Numeric literal '%s' exceeds limit '%s'"), &l->
data[i], s);
1165 for (; i < l->
size; i++) {
1166 val = val * 10 + l->
data[i] -
'0';
1168 if (val && l->
sign < 0) {
1190 for (i = 0; i < l->
size; i++) {
1191 if (l->
data[i] !=
'0') {
1202 s =
"9223372036854775808";
1204 s =
"9223372036854775807";
1206 if (size == 19U || memcmp (&(l->
data[i]), s, (
size_t)19) > 0) {
1207 cb_error (
_ (
"Numeric literal '%s' exceeds limit '%s'"), &l->
data[i], s);
1213 for (; i < l->
size; i++) {
1214 val = val * 10 + (l->
data[i] & 0x0F);
1216 if (val && l->
sign < 0) {
1234 for (i = 0; i < l->
size; i++) {
1235 if (l->
data[i] !=
'0') {
1245 s =
"18446744073709551615";
1246 if (size == 20U || memcmp (&(l->
data[i]), s, (
size_t)20) > 0) {
1247 cb_error (
_ (
"Numeric literal '%s' exceeds limit '%s'"), &l->
data[i], s);
1252 for (; i < l->
size; i++) {
1253 val = val * 10 + (l->
data[i] & 0x0F);
1286 CB_LABEL (cb_standard_error_handler)->flag_default_handler = 1;
1287 memset (container_progs, 0,
sizeof(container_progs));
1333 for (; l; l = next) {
1346 if (l == cb_error_node) {
1388 for (nlp = parent_list; nlp; nlp = nlp->
next) {
1394 nlp->
next = parent_list;
1405 if (!last_program) {
1426 container_progs[nest_level] = p;
1457 q = container_progs[nest_level - 1];
1493 for (p = int_node_table; p; p = p->
next) {
1576 p->
size = strlen (str);
1609 if (!name || name == cb_error_node) {
1626 if (!name || name == cb_error_node) {
1649 if (!name || name == cb_error_node) {
1687 p->
sign = (short)sign;
1705 p->
sign = (short)sign;
1735 if (x1 == cb_error_node || x2 == cb_error_node) {
1741 cb_error_x (x1,
_(
"Non-alphanumeric literals cannot be concatenated"));
1749 if (p->
size > cb_lit_length) {
1751 strncpy (lit_out, (
char *)p->
data, 38);
1752 strcpy (lit_out + 35,
"...");
1753 cb_error_x (x1,
_(
"Invalid literal: '%s'"), lit_out);
1754 cb_error_x (x1,
_(
"Literal length %d exceeds %d characters"),
1755 p->
size, cb_lit_length);
1803 const unsigned char *p;
1823 unsigned char lastonechar;
1824 unsigned char lasttwochar;
1828 if (strlen (str) > 50) {
1852 for (p = (
const unsigned char *)str; *p; p++) {
1865 for (; *p ==
'0'; p++) {
1868 for (; *p !=
')'; p++) {
1869 if (!isdigit (*p)) {
1873 if (allocated > 9) {
1876 i = i * 10 + (*p -
'0');
1890 if (s_char_seen || p_char_seen) {
1898 if (s_char_seen || p_char_seen) {
1915 if (s_char_seen || p_char_seen) {
1928 if (s_count > 1 || idx != 0) {
1937 if (s_char_seen || p_char_seen) {
1947 if (category & PIC_ALPHABETIC) {
1958 if (category & PIC_ALPHABETIC) {
1961 if (p_char_seen || dp_char_seen) {
1974 if (lastonechar ==
'V' || lastonechar ==
'S') {
1980 if (lasttwochar ==
'S' && lastonechar ==
'V') {
1987 if (p[1] == 0 || (p[1] ==
'V' && p[2] == 0)) {
1992 if (!at_beginning && !at_end) {
2012 if (s_char_seen || p_char_seen) {
2020 if (category & PIC_ALPHABETIC) {
2023 if (s_char_seen || p_char_seen) {
2035 if (category & PIC_ALPHABETIC) {
2038 if (s_char_seen || p_char_seen) {
2048 if (!(p[1] ==
'R' && p[2] == 0)) {
2051 if (s_char_seen || p_char_seen) {
2060 if (!(p[1] ==
'B' && p[2] == 0)) {
2063 if (s_char_seen || p_char_seen) {
2082 if (c !=
'V' && c !=
'P') {
2085 if (c ==
'C' || c ==
'D') {
2094 lasttwochar = lastonechar;
2096 memcpy (&
pic_buff[idx], (
void *)&n,
sizeof(
int));
2102 if (size == 0 && v_count) {
2150 cb_error (
_(
"Invalid picture string - '%s'"), str);
2181 memset (pic, 0,
sizeof(pic));
2182 snprintf (pic,
sizeof(pic),
"X(%d)", len);
2296 unsigned char buff[4];
2303 for (l = sym_list; l; l =
CB_CHAIN (l)) {
2306 buff[0] = (
unsigned char)ap->
alphachr[n];
2308 buff[0] = (
unsigned char)n;
2335 p->handler =
CB_LABEL (cb_standard_error_handler);
2427 (l =
cb_ref (f->
key)) != cb_error_node) {
2429 for (p = records; p; p = p->
sister) {
2442 if (l == cb_error_node) {
2446 for (p = records; p; p = p->
sister) {
2459 for (p = records; p; p = p->
sister) {
2462 cb_error (
_(
"Record size too small '%s' (%d)"),
2468 cb_error (
_(
"Record size too large '%s' (%d)"),
2482 for (p = records; p; p = p->
sister) {
2496 cb_error (
_(
"Record size exceeds maximum allowed (%d) - File '%s'"),
2509 for (p = records; p; p = p->
sister) {
2546 for (p = records; p; p = p->
sister) {
2558 "LINAGE-COUNTER %s", f->
name);
2596 sprintf (name,
"FILLER %d",
filler_id++);
2692 if (
CB_FIELD (v)->flag_indexed_by) {
2698 for (; p; p = p->
parent) {
2699 if (c && strcasecmp (
CB_NAME (c), p->
name) == 0) {
2724 if (s ==
CB_LABEL (cb2)->section) {
2734 if (c && s && strcasecmp (
CB_NAME (c), (
char *)s->
name) == 0) {
2746 if (candidate ==
NULL) {
2759 if (candidate ==
NULL) {
2805 if (
CB_FIELD (candidate)->flag_invalid) {
2809 CB_LABEL (candidate)->flag_alter = 1;
2812 r->
value = candidate;
2846 if (x == cb_error_node || y == cb_error_node) {
3029 const unsigned int def,
3030 const unsigned int is_statement,
3031 const unsigned int no_filler_init)
3069 const cob_u32_t is_system_call,
const int convention)
3133 const unsigned int is_if)
3138 sizeof (
struct cb_if));
3172 if (name == cb_error_node) {
3227 const int val_on,
const int val_off)
3251 if (cb_warn_prototypes) {
3254 _(
"No definition/prototype seen for function '%s'"),
3258 _(
"No definition/prototype seen for function with external name '%s'"),
3273 func_prototype->
name
3274 = (
const char *)
CB_LITERAL (prototype_name)->data;
3276 func_prototype->
name = (
const char *)
CB_NAME (prototype_name);
3284 (
const char *)
CB_LITERAL (prototype_name)->data;
3291 return CB_TREE (func_prototype);
3317 cb_error_x (name,
_(
"FUNCTION '%s' has invalid reference modification"),
CB_NAME(name));
3323 cb_error_x (name,
_(
"FUNCTION '%s' has invalid reference modification"),
CB_NAME(name));
3338 cb_error_x (name,
_(
"FUNCTION '%s' not implemented"),
3342 if ((cbp->
args == -1)) {
3345 _ (
"FUNCTION '%s' has wrong number of arguments"),
3352 _(
"FUNCTION '%s' has wrong number of arguments"),
3359 cb_error_x (name,
_(
"FUNCTION '%s' can not have reference modification"), cbp->
name);
3365 cb_error_x (name,
_(
"FUNCTION '%s' has invalid reference modification"), cbp->
name);
3370 cb_error_x (name,
_(
"FUNCTION '%s' has invalid reference modification"), cbp->
name);
3379 #if !defined (COB_STRFTIME) && !defined (COB_TIMEZONE)
3427 cb_error_x (name,
_(
"FUNCTION '%s' has invalid parameter"), cbp->
name);
3488 cb_error_x (name,
_(
"FUNCTION '%s' has invalid parameter"), cbp->
name);
3494 cb_error_x (name,
_(
"FUNCTION '%s' has invalid parameter"), cbp->
name);
3528 if ((numargs % 2) == 0) {
3529 cb_error_x (name,
_(
"FUNCTION '%s' has wrong number of arguments"), cbp->
name);
3535 cb_error_x (name,
_(
"FUNCTION '%s' has invalid first parameter"), cbp->
name);
struct cb_literal * build_literal(const enum cb_category category, const void *data, const size_t size)
#define CB_NUMERIC_LITERAL_P(x)
int cb_field_subordinate(const struct cb_field *pfld, const struct cb_field *f)
cb_tree cb_build_any_intrinsic(cb_tree args)
#define CB_REFERENCE_P(x)
static void error_numeric_literal(const char *literal)
void cb_error_x(cb_tree x, const char *fmt,...)
cob_u64_t cb_get_u_long_long(const cb_tree x)
void * cobc_main_malloc(const size_t size)
cb_tree cb_list_append(cb_tree l1, cb_tree l2)
static struct cb_program * container_progs[64]
cb_tree cb_build_intrinsic(cb_tree name, cb_tree args, cb_tree refmod, const int isuser)
#define CB_TREE_CATEGORY(x)
static cb_tree get_last_elt(cb_tree l)
void cobc_abort_pr(const char *fmt,...)
cb_tree cb_build_comment(const char *str)
cb_tree cb_build_cancel(const cb_tree target)
const char * cb_source_file
cb_tree cb_build_filler(void)
unsigned int flag_line_adv
#define COB_TYPE_NUMERIC_PACKED
cb_tree mnemonic_spec_list
cb_tree cb_build_constant(cb_tree name, cb_tree value)
void * cobc_parse_malloc(const size_t size)
#define CB_FIELD_ADD(x, y)
void cb_warning_x(cb_tree x, const char *fmt,...)
cb_tree cb_build_call(const cb_tree name, const cb_tree args, const cb_tree stmt1, const cb_tree stmt2, const cb_tree returning, const cob_u32_t is_system_call, const int convention)
static int category_is_alphanumeric[]
struct cb_field * children
cb_tree program_spec_list
static struct nested_list * add_contained_prog(struct nested_list *parent_list, struct cb_program *child_prog)
#define COB_TYPE_ALPHANUMERIC
cb_tree cb_build_implicit_field(cb_tree name, const int len)
void cb_add_common_prog(struct cb_program *prog)
cb_tree property_spec_list
static cb_tree make_intrinsic(cb_tree name, struct cb_intrinsic_table *cbp, cb_tree args, cb_tree field, cb_tree refmod, const int isuser)
#define COB_TYPE_NUMERIC_FP_BIN32
static void check_prototype_seen(const struct cb_func_prototype *fp)
unsigned int flag_filler_ref
cb_tree cb_build_class_name(cb_tree name, cb_tree list)
unsigned int cb_field_variable_address(const struct cb_field *fld)
int cb_get_int(const cb_tree x)
cb_tree cb_build_list(cb_tree purpose, cb_tree value, cb_tree chain)
cb_tree cb_build_field_reference(struct cb_field *f, cb_tree ref)
cb_tree cb_build_funcall(const char *name, const int argc, const cb_tree a1, const cb_tree a2, const cb_tree a3, const cb_tree a4, const cb_tree a5, const cb_tree a6, const cb_tree a7, const cb_tree a8, const cb_tree a9, const cb_tree a10, const cb_tree a11)
cb_tree cb_ref(cb_tree x)
char * cb_name(cb_tree x)
struct cb_field * cb_field_add(struct cb_field *f, struct cb_field *p)
cb_tree cb_build_field(cb_tree name)
static size_t hash(const unsigned char *s)
struct cb_intrinsic_table * lookup_intrinsic(const char *name, const int checkres, const int checkimpl)
void cb_build_symbolic_chars(const cb_tree sym_list, const cb_tree alphabet)
static cb_tree global_check(struct cb_reference *r, cb_tree items, size_t *ambiguous)
unsigned char flag_default
struct nested_list * next
cb_tree cb_build_search(const int flag_all, const cb_tree table, const cb_tree var, const cb_tree end_stmt, const cb_tree whens)
struct cb_para_label * para_label
int cob_valid_date_format(const char *)
struct cb_field * cb_field_variable_size(const struct cb_field *f)
void * cobc_check_string(const char *dupstr)
cb_tree cb_build_add(cb_tree, cb_tree, cb_tree)
enum cb_category cb_tree_category(cb_tree x)
static struct cb_intrinsic_table userbp
unsigned char flag_init_statement
enum cb_category category
unsigned char flag_is_global
cb_tree cb_build_decimal(const int id)
int cb_fits_long_long(const cb_tree x)
cb_tree cb_build_numsize_literal(const void *data, const size_t size, const int sign)
void * cobc_parse_strdup(const char *dupstr)
static int get_data_and_size_from_lit(cb_tree x, unsigned char **data, size_t *size)
#define CB_WORD_HASH_SIZE
static int valid_format(const enum cb_intr_enum intr, const char *format)
cb_tree interface_spec_list
cb_tree cb_build_string(const void *data, const size_t size)
if fold fold static computed alternate extra correct stack on syntax debugging source implicit stack syntax write single recursive relax optional file
unsigned int flag_debugging
static struct cb_literal * concat_literals(const cb_tree left, const cb_tree right)
cb_tree cb_build_set_attribute(const struct cb_field *fld, const int val_on, const int val_off)
static int iso_8601_func(const enum cb_intr_enum intr)
cb_tree cb_build_picture(const char *str)
char * cb_to_cname(const char *s)
#define CB_FILE_ERR_INVALID_FT
#define COB_TYPE_NUMERIC_FP_BIN64
struct cb_report * build_report(cb_tree name)
#define COB_ACCESS_DYNAMIC
static const char * try_get_constant_data(cb_tree val)
cb_tree cb_build_alphanumeric_literal(const void *data, const size_t size)
struct cb_intrinsic_table * intr_tab
struct cb_tree_common common
int cb_list_length(cb_tree l)
cb_tree cb_build_func_prototype(const cb_tree prototype_name, const cb_tree ext_name)
static void warn_cannot_get_utc(const cb_tree tree, const enum cb_intr_enum intr, cb_tree args)
void ambiguous_error(cb_tree x)
static void check_lit_length(const int size, const char *lit)
cb_tree cb_build_numeric_literal(const int sign, const void *data, const int scale)
struct cb_file * build_file(cb_tree name)
struct cb_program * nested_prog
struct cb_statement * cb_build_statement(const char *name)
#define COB_TYPE_NUMERIC_FP_DEC64
const unsigned int refmod
cb_tree cb_build_perform_varying(cb_tree name, cb_tree from, cb_tree by, cb_tree until)
strict implicit external value
struct cb_label * section
unsigned int flag_in_debug
struct cb_program * handler_prog
enum cb_category category
cb_tree function_spec_list
cb_tree cb_pair_add(cb_tree l, cb_tree x, cb_tree y)
int cb_flag_functions_all
#define CB_ALPHABET_NAME(x)
unsigned int cobc_in_repository
#define COB_TYPE_NUMERIC_FLOAT
cb_tree cb_check_numeric_value(cb_tree)
cb_tree lookup_system_name(const char *name)
#define CB_LOCALE_NAME(x)
int cob_valid_datetime_format(const char *, const char)
cb_tree cb_build_direct(const char *str, const unsigned int flagnl)
#define CB_FILE_ERR_INVALID
cb_tree cb_build_label(cb_tree name, struct cb_label *section)
cb_tree cb_int_hex(const int n)
EC ARGUMENT EC EC BOUND EC BOUND EC BOUND EC BOUND TABLE EC DATA EC DATA EC DATA PTR NULL
unsigned int flag_external
static void * make_tree(const enum cb_tag tag, const enum cb_category category, const size_t size)
#define COB_ORG_SEQUENTIAL
unsigned int flag_indexed_by
struct cb_label * handler
static struct int_node * int_node_table
cb_tree cb_standard_error_handler
struct cb_program * cb_find_defined_program_by_id(const char *orig_id)
static int valid_const_date_time_args(const cb_tree tree, const struct cb_intrinsic_table *intr, cb_tree args)
cb_tree cb_build_locale_name(cb_tree name, cb_tree list)
#define CB_FILE_ERR_REQUIRED
static cb_tree make_constant_label(const char *name)
struct cb_program * next_program
cb_tree cb_concat_literals(const cb_tree x1, const cb_tree x2)
struct cb_field * cb_validate_78_item(struct cb_field *f, const cob_u32_t no78add)
#define PIC_NUMERIC_EDITED
#define COB_TYPE_NUMERIC_BINARY
cb_tree cb_build_cast_llint(const cb_tree val)
cb_tree alphabet_name_list
enum cb_category category
static char * scratch_buff
void cb_insert_common_prog(struct cb_program *prog, struct cb_program *comprog)
void undefined_error(cb_tree x)
int cb_fits_int(const cb_tree x)
#define COB_TYPE_ALPHANUMERIC_EDITED
cb_tree cb_build_debug_call(struct cb_label *target)
cb_tree cb_int(const int n)
#define COB_TYPE_NUMERIC_DISPLAY
static void lookup_word(struct cb_reference *p, const char *name)
#define COB_ACCESS_SEQUENTIAL
struct cb_tree_common common
#define COB_TYPE_NUMERIC_FP_BIN128
unsigned int flag_console_is_crt
static enum cb_class category_to_class_table[]
unsigned char currency_symbol
cb_tree cb_build_reference(const char *name)
void finalize_file(struct cb_file *f, struct cb_field *records)
struct cb_field * rename_thru
enum cb_system_name_category category
const unsigned char * data
unsigned int gen_screen_ptr
void validate_file(struct cb_file *f, cb_tree name)
static int get_data_from_const(cb_tree const_val, unsigned char **data)
static cb_tree make_constant(const enum cb_category category, const char *val)
void cb_error(const char *,...) COB_A_FORMAT12
enum cb_cast_type cast_type
struct cb_para_label * next
struct cb_picture * cb_build_binary_picture(const char *str, const cob_u32_t size, const cob_u32_t sign)
#define CB_INVALID_TREE(x)
struct cb_word ** word_table
int cob_valid_time_format(const char *, const char)
cb_tree cb_build_alter(const cb_tree source, const cb_tree target)
static char err_msg[COB_MINI_BUFF]
#define PIC_ALPHABETIC_EDITED
#define COB_TYPE_NUMERIC_DOUBLE
struct cb_program * current_program
struct nested_list * common_prog_list
cb_tree cb_build_initialize(const cb_tree var, const cb_tree val, const cb_tree rep, const unsigned int def, const unsigned int is_statement, const unsigned int no_filler_init)
cb_tree collating_sequence
void cb_init_constants(void)
unsigned int cobc_in_procedure
unsigned int flag_alter_code
cb_tree cb_build_continue(void)
cb_tree cb_build_binary_list(cb_tree l, const int op)
#define COB_MAX_SUBSCRIPTS
unsigned char flag_no_filler_init
int cb_category_is_alpha(cb_tree x)
struct nested_list * nested_prog_list
cb_tree cb_build_assign(const cb_tree var, const cb_tree val)
#define PIC_NATIONAL_EDITED
#define COB_ACCESS_RANDOM
void cb_reset_global_78(void)
#define COBC_DUMB_ABORT()
unsigned char numeric_separator
void cb_list_map(cb_tree(*func)(cb_tree x), cb_tree l)
#define COB_ORG_LINE_SEQUENTIAL
unsigned int flag_trailing_separate
#define CB_BUILD_PAIR(x, y)
static size_t cb_name_1(char *s, cb_tree x)
struct cb_field * working_storage
cb_tree cb_build_perform(const enum cb_perform_type type)
#define PIC_ALPHANUMERIC_EDITED
enum cb_class cb_tree_class(cb_tree x)
#define COB_NATIONAL_SIZE
static void file_error(cb_tree name, const char *clause, const char errtype)
struct cb_program * cb_build_program(struct cb_program *last_program, const int nest_level)
cb_tree cb_build_debug(const cb_tree target, const char *str, const cb_tree fld)
void cb_validate_field(struct cb_field *f)
cb_tree cb_list_reverse(cb_tree l)
unsigned int cobc_cs_check
static const char *const cb_const_subs[]
#define COB_TYPE_NUMERIC_FP_DEC128
cb_tree cb_build_length(cb_tree)
struct cb_field * redefines
#define CB_WORD_HASH_MASK
cb_tree cb_build_cast_int(const cb_tree val)
cob_s64_t cb_get_long_long(const cb_tree x)
cb_tree cb_build_alphabet_name(cb_tree name)
#define CB_WORD_TABLE_SIZE
unsigned int flag_finalized
struct cb_alt_key * alt_key_list
int cb_tree_type(const cb_tree x, const struct cb_field *f)
unsigned int flag_has_external
void cb_set_system_names(void)
#define CB_REF_OR_FIELD_P(x)
enum cb_intr_enum intr_enum
void cb_clear_real_field(void)
const char * cb_define(cb_tree name, cb_tree val)
unsigned int flag_gen_error
struct cb_statement * current_statement
cb_tree cb_build_binary_op(cb_tree x, const int op, cb_tree y)
#define COB_TYPE_NUMERIC_EDITED
cb_tree cb_build_if(const cb_tree test, const cb_tree stmt1, const cb_tree stmt2, const unsigned int is_if)
cb_tree cb_debug_contents
static void cb_define_system_name(const char *name)
#define COB_TYPE_NUMERIC_L_DOUBLE
struct cb_field * cb_field_founder(const struct cb_field *f)
cb_tree symbolic_char_list
unsigned char decimal_point
cb_tree cb_build_goto(const cb_tree target, const cb_tree depending)
cb_tree cb_build_cast(const enum cb_cast_type type, const cb_tree val)
cb_tree cb_build_system_name(const enum cb_system_name_category category, const int token)
unsigned char flag_external
cb_tree cb_list_add(cb_tree l, cb_tree x)