GnuCOBOL
2.0
A free COBOL compiler
|
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <ctype.h>
#include <stdarg.h>
#include "cobc.h"
#include "tree.h"
Go to the source code of this file.
Functions | |
static void | print_error (const char *file, int line, const char *prefix, const char *fmt, va_list ap) |
void | cb_warning (const char *fmt,...) |
void | cb_error (const char *fmt,...) |
void | cb_plex_warning (const size_t sline, const char *fmt,...) |
void | cb_plex_error (const size_t sline, const char *fmt,...) |
void | configuration_warning (const char *fname, const int line, const char *fmt,...) |
void | configuration_error (const char *fname, const int line, const int finish_error, const char *fmt,...) |
void | cb_warning_x (cb_tree x, const char *fmt,...) |
void | cb_error_x (cb_tree x, const char *fmt,...) |
unsigned int | cb_verify (const enum cb_support tag, const char *feature) |
void | redefinition_error (cb_tree x) |
void | redefinition_warning (cb_tree x, cb_tree y) |
void | undefined_error (cb_tree x) |
void | ambiguous_error (cb_tree x) |
void | group_error (cb_tree x, const char *clause) |
void | level_redundant_error (cb_tree x, const char *clause) |
void | level_require_error (cb_tree x, const char *clause) |
void | level_except_error (cb_tree x, const char *clause) |
Variables | |
static char * | errnamebuff = ((void*)0) |
static struct cb_label * | last_section = ((void*)0) |
static struct cb_label * | last_paragraph = ((void*)0) |
static int | conf_error_displayed = 0 |
static int | last_error_line = 0 |
static const char * | last_error_file = "Unknown" |
size_t | cb_msg_style |
void ambiguous_error | ( | cb_tree | x | ) |
Definition at line 341 of file error.c.
References _, CB_CHAIN, cb_error_x(), CB_FIELD, CB_LABEL, cb_name(), CB_NAME, CB_REFERENCE, CB_TAG_FIELD, CB_TAG_LABEL, CB_TREE, CB_TREE_TAG, CB_VALUE, COB_NORMAL_BUFF, COB_NORMAL_MAX, cobc_main_malloc(), errnamebuff, cb_word::error, cb_word::items, cb_label::name, cb_word::name, cb_field::parent, and cb_label::section.
Referenced by cb_ref().
void cb_error | ( | const char * | fmt, |
... | |||
) |
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().
void cb_error_x | ( | cb_tree | x, |
const char * | fmt, | ||
... | |||
) |
Definition at line 233 of file error.c.
References _, cobc_too_many_errors(), errorcount, print_error(), cb_tree_common::source_file, and cb_tree_common::source_line.
Referenced by ambiguous_error(), begin_scope_of_program_name(), cb_build_address(), cb_build_binary_op(), cb_build_cond(), cb_build_display_mnemonic(), cb_build_display_name(), cb_build_field_tree(), cb_build_identifier(), cb_build_intrinsic(), cb_build_replacing_characters(), cb_build_tallying_all(), cb_build_tallying_characters(), cb_build_tallying_leading(), cb_build_tallying_trailing(), cb_build_tallying_value(), cb_build_write_advancing_mnemonic(), cb_check_group_name(), cb_check_integer_value(), cb_check_numeric_edited_name(), cb_check_numeric_name(), cb_check_numeric_value(), cb_concat_literals(), cb_define_switch_name(), cb_emit_accept(), cb_emit_accept_mnemonic(), cb_emit_accept_name(), cb_emit_allocate(), cb_emit_call(), cb_emit_close(), cb_emit_delete(), cb_emit_delete_file(), cb_emit_display(), cb_emit_free(), cb_emit_goto(), cb_emit_initialize(), cb_emit_inspect(), cb_emit_move(), cb_emit_open(), cb_emit_read(), cb_emit_release(), cb_emit_rewrite(), cb_emit_set_attribute(), cb_emit_set_false(), cb_emit_set_to(), cb_emit_set_true(), cb_emit_sort_giving(), cb_emit_sort_init(), cb_emit_sort_using(), cb_emit_start(), cb_emit_write(), cb_expr_finish(), cb_get_level(), cb_resolve_redefines(), cb_validate_88_item(), cb_validate_collating(), cb_validate_one(), cb_validate_program_body(), cb_validate_program_data(), cb_validate_program_environment(), check_for_duplicate_prototype(), check_picture_item(), check_valid_key(), compute_size(), emit_entry(), evaluate_test(), file_error(), group_error(), level_except_error(), level_redundant_error(), level_require_error(), redefinition_error(), search_set_keys(), terminator_error(), undefined_error(), valid_const_date_time_args(), validate_field_1(), validate_field_clauses(), validate_inspect(), validate_move(), warn_cannot_get_utc(), and yyparse().
void cb_plex_error | ( | const size_t | sline, |
const char * | fmt, | ||
... | |||
) |
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().
void cb_plex_warning | ( | const size_t | sline, |
const char * | fmt, | ||
... | |||
) |
Definition at line 119 of file error.c.
References _, cb_source_line, NULL, print_error(), and warningcount.
Referenced by ppinput(), and pplex().
unsigned int cb_verify | ( | const enum cb_support | tag, |
const char * | feature | ||
) |
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().
void cb_warning | ( | const char * | fmt, |
... | |||
) |
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().
void cb_warning_x | ( | cb_tree | x, |
const char * | fmt, | ||
... | |||
) |
Definition at line 222 of file error.c.
References _, print_error(), cb_tree_common::source_file, cb_tree_common::source_line, and warningcount.
Referenced by cb_build_address(), cb_build_display_name(), cb_build_field_tree(), cb_build_identifier(), cb_check_overlapping(), cb_emit_accept_name(), cb_emit_call(), cb_emit_corresponding(), cb_emit_move_corresponding(), cb_validate_program_body(), cb_validate_program_environment(), check_for_duplicate_prototype(), check_picture_item(), check_prototype_redefines_current_func(), check_prototype_seen(), compute_size(), move_warning(), redefinition_warning(), terminator_warning(), undefined_error(), valid_const_date_time_args(), validate_field_1(), validate_move(), warn_cannot_get_utc(), warning_destination(), and yyparse().
void configuration_error | ( | const char * | fname, |
const int | line, | ||
const int | finish_error, | ||
const char * | fmt, | ||
... | |||
) |
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().
void configuration_warning | ( | const char * | fname, |
const int | line, | ||
const char * | fmt, | ||
... | |||
) |
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().
void group_error | ( | cb_tree | x, |
const char * | clause | ||
) |
Definition at line 398 of file error.c.
References _, cb_error_x(), and cb_name().
Referenced by validate_field_1().
void level_except_error | ( | cb_tree | x, |
const char * | clause | ||
) |
Definition at line 441 of file error.c.
References _, cb_error_x(), CB_FIELD_PTR, cb_name(), cb_field::flag_item_78, and cb_field::level.
Referenced by cb_validate_78_item(), cb_validate_88_item(), and validate_field_1().
void level_redundant_error | ( | cb_tree | x, |
const char * | clause | ||
) |
Definition at line 405 of file error.c.
References _, cb_error_x(), CB_FIELD_PTR, cb_name(), cb_field::flag_item_78, and cb_field::level.
Referenced by validate_field_1().
void level_require_error | ( | cb_tree | x, |
const char * | clause | ||
) |
Definition at line 423 of file error.c.
References _, cb_error_x(), CB_FIELD_PTR, cb_name(), cb_field::flag_item_78, and cb_field::level.
Referenced by cb_validate_78_item(), cb_validate_88_item(), check_picture_item(), and validate_field_1().
|
static |
Definition at line 46 of file error.c.
References _, cb_msg_style, CB_MSG_STYLE_MSC, cb_source_file, cb_source_line, current_paragraph, current_section, cb_label::flag_dummy_paragraph, cb_label::flag_dummy_section, and cb_label::name.
Referenced by cb_error(), cb_error_x(), cb_plex_error(), cb_plex_warning(), cb_warning(), and cb_warning_x().
void redefinition_error | ( | cb_tree | x | ) |
Definition at line 284 of file error.c.
References _, cb_error_x(), CB_REFERENCE, CB_VALUE, cb_word::items, and cb_word::name.
Referenced by cb_build_section_name(), cb_validate_program_data(), check_for_duplicate_prototype(), and yyparse().
Definition at line 297 of file error.c.
References _, CB_REFERENCE, CB_VALUE, cb_warning_x(), cb_word::items, cb_word::name, and NULL.
Referenced by cb_build_field_tree().
void undefined_error | ( | cb_tree | x | ) |
Definition at line 317 of file error.c.
References _, cb_error_x(), CB_NAME, CB_REFERENCE, cb_warning_x(), cb_reference::chain, COB_NORMAL_BUFF, COB_NORMAL_MAX, cobc_main_malloc(), errnamebuff, and cb_reference::flag_optional.
Referenced by cb_ref(), and cb_resolve_redefines().
size_t cb_msg_style |
Definition at line 43 of file error.c.
Referenced by cobc_print_info(), main(), and print_error().
|
static |
Definition at line 38 of file error.c.
Referenced by configuration_error(), and configuration_warning().
|
static |
Definition at line 34 of file error.c.
Referenced by ambiguous_error(), and undefined_error().
|
static |
Definition at line 40 of file error.c.
Referenced by configuration_error(), and configuration_warning().
|
static |
Definition at line 39 of file error.c.
Referenced by configuration_error(), and configuration_warning().