Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
src_input.c File Reference
#include "defines.h"
#include "host.m"
#include "host.h"
#include "target.m"
#include "target.h"
#include "globals.m"
#include "tokens.m"
#include "sytb.m"
#include "p_globals.m"
#include "src_input.m"
#include "debug.m"
#include "globals.h"
#include "tokens.h"
#include "sytb.h"
#include "p_globals.h"
#include "src_input.h"
Include dependency graph for src_input.c:

Go to the source code of this file.

Functions

static boolean is_pound_line_dir (void)
static void fixed_classify_line (void)
static void fixed_get_stmt (void)
boolean read_line (boolean)
static void free_classify_line (void)
static void free_get_stmt (void)
void ntr_next_msg_queue (int, int, msg_severities_type, int, char *, long, int)
static void move_up_next_msg_queue (void)
static boolean open_include_file (boolean)
static void update_global_line (void)
static int whats_after_paren_group (int *, int *, int)
static int whats_after_brkt_group (int *, int *, int)
static void print_nxt_line (void)
static void classify_line (void)
static boolean get_nxt_line (void)
static void pp_get_stmt (void)
static void shift_to_line_size (int)
static void print_stmt (void)
static void print_src (void)
void init_src_input (void)
void reset_src_input (int buf_idx, int stmt_num)
void fixed_get_char (void)
void fixed_get_char_literal (void)
void free_get_char (void)
void free_get_char_literal (void)
void print_err_line (line, column)
char scan_thru_close_paren (int idx, int line_idx, int cnt)
boolean set_stmt_type_known (void)
boolean next_arg_is_kwd_equal (void)
boolean stmt_is_DATA_stmt (void)
boolean stmt_has_double_colon (void)
boolean stmt_is_DO_stmt (void)
void format_line_n_col (int *line, int *col, int format_col)
void set_format_start_idx (int buf_idx)
int put_char_const_in_tbl (char holler, int *len)
int put_format_in_tbl (void)
boolean is_implied_do (void)
boolean is_substring_ref (void)
boolean next_id_is_imp_control (void)
void issue_deferred_msgs (void)
void print_src_stk_entry (int ss_idx)
void print_src_input_tbls (void)
boolean digit_is_format_label (void)
char * get_src_path_name (void)
boolean next_tok_is_paren_slash (void)
void prev_char_line_and_col (int *line, int *col)
boolean stmt_is_save_stmt (int buf_idx, int stmt_num)
void ntr_msg_queue (int line, int msg_num, msg_severities_type severity, int column, char *str, long arg, int order)
void final_src_input (void)
void preprocess_only_driver (void)
void set_related_gl_source_lines (int gl_idx)
int ntr_io_string_constant (void)
boolean omp_extension_prefix (int line)
void get_curr_file_name (char *str)

Variables

static char USMID [] = "\n@(#)5.0_pl/sources/src_input.c 5.5 10/20/99 17:17:46\n"
static boolean issue_classify_msg = TRUE

Function Documentation

void final_src_input ( void  )

Definition at line 7703 of file src_input.c.

References Func_Entry, Func_Exit, MEM_REPORT, msg_queue, NULL, src_stk, and TRACE.

Referenced by main().

static void fixed_classify_line ( void  ) [static]

Definition at line 1834 of file src_input.c.

References amp, Ansi, ARG_ARG, at_sign, bang, blank, Cdbg_Dir, Cdir_Dir, Cdollar_Dir, ch_class, Ch_Class_Digit, Ch_Class_Letter, change_orig_src_file, char_delim, cmd_line_flags, Cmic_Dir, Comment, Comment_Line, Comp_Dir, Cond_Comp_Line, Continuation_Line, CONTINUE_COLUMN, Copenad_Dir, Cpar_Dir, Csgi_Dir, Cstar_Dir, curr_glb_line, on_off_flags_entry::d_lines, db_quote, delim, digit_start, Dir_Continuation_Line, Dir_Line, cmd_line_flags_entry::disregard_conditional_omp, disregard_directive, dollar, dump_flags, EOF, EOS, eos, equal, EQUAL_STRS, Error, FALSE, first_line, first_pound_line, format_idx, format_str, Func_Entry, Func_Exit, GL_FILE_LINE, GL_GLOBAL_LINE, global_line_tbl_idx, idx, ignore_source_line, in_format, include_file, Include_Line, IS_1TO9, IS_DIR_CONTINUATION, is_dollar_directive(), is_par_directive(), is_pound_line_dir(), is_star_directive(), issue_classify_msg, issue_obsolete_src_form_msg, lc_a, lc_b, lc_c, lc_d, lc_e, lc_f, lc_g, lc_h, lc_i, lc_l, lc_m, lc_n, lc_o, lc_p, lc_r, lc_s, line_type_str, lines_in_buf, lparen, MARK_CHAR_CONST, marked_blank, MAX_FILE_NAME_SIZE, dump_flags_entry::mp, newline, nine, NO_ARG, ntr_next_msg_queue(), NULL, NULL_IDX, num_idx, num_str, NXT_COL, nxt_line, nxt_line_col, nxt_line_end_idx, nxt_line_num_lines, on_off_flags, dump_flags_entry::open_mp, pound, pound_file, Pound_Include_Enter_Line, Pound_Include_Exit_Line, Pound_Src_Line, PP_ACTUAL_DIR_PREFIX, PP_CHANGE_SOURCE_FORM, PP_DIR_PREFIX, PP_EOL, PP_IDX, PP_LABEL, pp_line_idx, PP_LINE_NUM, PP_LINE_TYPE, PP_MP_LINE, PP_ORIG_SIZE, PP_PREFIX_LEN, on_off_flags_entry::preprocess, on_off_flags_entry::preprocess_only, prev_char_delim, prev_char_delim_idx, previous_char, quote, Regular_Line, seen_lp_eq_slash, semi_colon, shift_to_line_size(), slash, SRC_STK_FILE_LINE, src_stk_idx, star, stmt_buf, stmt_line_end_idx, stmt_line_start_idx, STR_ARG, strcpy, tab, Tok_Dir_Free, Tok_Dir_Start, TOUPPER, TRACE, TRUE, uc_a, uc_b, uc_c, uc_d, uc_e, uc_f, uc_g, uc_h, uc_i, uc_l, uc_m, uc_n, uc_o, uc_p, uc_r, uc_s, underscore, valid_f90_char, and zero.

Referenced by classify_line(), and pp_get_stmt().

Here is the call graph for this function:

static void fixed_get_stmt ( void  ) [static]

Definition at line 1154 of file src_input.c.

References angle_brkt_include, Ansi, ARG_STR_ARG, blank, change_source_form, cif_cont_line_rec(), cif_flags, classify_line(), cmd_line_flags, la_entry::column, Comment_Line, Cond_Comp_Line, continuation_count, Continuation_Line, CONTINUE_COLUMN, curr_glb_line, Dir_Continuation_Line, Dir_Line, dot_i_fptr, EOF_Line, Error, FALSE, fprintf(), Func_Entry, Func_Exit, get_nxt_line(), GL_SOURCE_LINES, havent_issued_tab_ansi, idx, ignore_source_line, include_complete, include_found, Include_Line, include_stmt_file_line, include_switch, INCREMENT_STATEMENT_NUMBER, Internal, issue_deferred_msgs(), issue_pound_exit_line, label_ok, la_entry::line, line_dir_prefix, line_size, lines_in_buf, MAX_ANSI_FIXED_LINES, MAX_FIXED_LINES, MISC_RECS, move_up_next_msg_queue(), NO_ARG, ntr_msg_queue(), NULL, NULL_IDX, NXT_COL, nxt_line, nxt_line_actual_dir_prefix, nxt_line_col, nxt_line_dir_prefix, nxt_line_EOL, nxt_line_idx, nxt_line_label, nxt_line_mp_line, nxt_line_num, nxt_line_prefix_len, nxt_line_type, on_off_flags, open_include_file(), OUTPUT_POUND_INCLUDE_EXIT_LINE, parse_cc_line(), POP_SRC, Pound_Include_Enter_Line, Pound_Include_Exit_Line, Pound_Src_Line, pp_line_idx, cmd_line_flags_entry::pp_macro_expansion, PP_ORIG_SIZE, prev_statement_number, previous_global_line, print_nxt_line(), PRINT_STMT_SRC, PRINTMSG(), Regular_Line, on_off_flags_entry::save_dot_i, semi_colon, set_related_gl_source_lines(), source_form, SRC_STK_BASE_IDX, SRC_STK_FILE_LINE, SRC_STK_GLOBAL_LINE_IDX, src_stk_idx, SRC_STK_PREV_SRC_FORM, starting_pt, statement_number, stmt_buf, stmt_buf_col, stmt_buf_dir_prefix, stmt_buf_EOS_idx, stmt_buf_idx, la_entry::stmt_buf_idx, stmt_buf_type, stmt_EOS_la_ch, stmt_line_end_idx, stmt_line_idx, stmt_line_num, stmt_line_offset, stmt_line_start_idx, la_entry::stmt_num, stmt_prefix_len, tab, TRACE, TRUE, and update_global_line().

Referenced by fixed_get_char(), and init_src_input().

Here is the call graph for this function:

void format_line_n_col ( int *  line,
int *  col,
int  format_col 
)
static void free_classify_line ( void  ) [static]

Definition at line 3510 of file src_input.c.

References AMP, amp, Ansi, ARG_ARG, at_sign, BANG, bang, blank, Cdbg_Dir, Cdir_Dir, Cdollar_Dir, ch_class, Ch_Class_Digit, Ch_Class_Letter, change_orig_src_file, char_delim, cmd_line_flags, Cmic_Dir, Comment, Comment_Line, Comp_Dir, Cond_Comp_Line, Continuation_Line, Copenad_Dir, Cpar_Dir, Csgi_Dir, Cstar_Dir, curr_glb_line, db_quote, delim, digit_start, Dir_Continuation_Line, Dir_Line, cmd_line_flags_entry::disregard_conditional_omp, disregard_directive, dollar, dump_flags, EOF, EOS, eos, equal, EQUAL_STRS, Error, expected_line, FALSE, first_pound_line, format_idx, format_str, Func_Entry, Func_Exit, GL_FILE_LINE, GL_GLOBAL_LINE, global_line_tbl_idx, idx, ignore_source_line, in_format, include_file, Include_Line, IS_DIR_CONTINUATION, is_dollar_directive(), is_par_directive(), is_pound_line_dir(), is_star_directive(), issue_classify_msg, issue_obsolete_src_form_msg, lc_a, lc_b, lc_c, lc_d, lc_e, lc_f, lc_g, lc_h, lc_i, lc_l, lc_m, lc_n, lc_o, lc_p, lc_r, lc_s, line_type_str, lines_in_buf, lparen, MARK_CHAR_CONST, marked_blank, MAX_FILE_NAME_SIZE, dump_flags_entry::mp, NEWLINE, newline, NO_ARG, ntr_next_msg_queue(), NULL, NULL_IDX, num_idx, num_str, NXT_COL, nxt_line, nxt_line_col, nxt_line_end_idx, nxt_line_num_lines, on_off_flags, dump_flags_entry::open_mp, pound, pound_file, Pound_Include_Enter_Line, Pound_Include_Exit_Line, Pound_Src_Line, PP_ACTUAL_DIR_PREFIX, PP_CHANGE_SOURCE_FORM, PP_DIR_PREFIX, PP_EOL, PP_EXPECTED_LINE, PP_IDX, pp_line_idx, PP_LINE_NUM, PP_LINE_TYPE, PP_MP_LINE, PP_ORIG_SIZE, PP_PREFIX_LEN, on_off_flags_entry::preprocess, on_off_flags_entry::preprocess_only, prev_char_delim, prev_char_delim_idx, previous_char, quote, Regular_Line, seen_lp_eq_slash, semi_colon, shift_to_line_size(), slash, SRC_STK_FILE_LINE, src_stk_idx, star, stmt_buf, stmt_line_end_idx, stmt_line_start_idx, strcpy, tab, Tok_Dir_Fixed, Tok_Dir_Start, TOUPPER, TRACE, TRUE, uc_a, uc_b, uc_c, uc_d, uc_e, uc_f, uc_g, uc_h, uc_i, uc_l, uc_m, uc_n, uc_o, uc_p, uc_r, uc_s, underscore, and zero.

Referenced by classify_line(), and pp_get_stmt().

Here is the call graph for this function:

static void free_get_stmt ( void  ) [static]

Definition at line 3104 of file src_input.c.

References angle_brkt_include, Ansi, ARG_STR_ARG, blank, change_source_form, cif_cont_line_rec(), cif_flags, classify_line(), cmd_line_flags, la_entry::column, Comment_Line, Cond_Comp_Line, continuation_count, Continuation_Line, CONTINUE_COLUMN, curr_glb_line, Dir_Continuation_Line, Dir_Line, dot_i_fptr, EOF_Line, Error, expected_line, FALSE, fprintf(), Func_Entry, Func_Exit, get_nxt_line(), GL_SOURCE_LINES, havent_issued_tab_ansi, idx, ignore_source_line, include_complete, include_found, Include_Line, include_stmt_file_line, include_switch, INCREMENT_STATEMENT_NUMBER, Internal, issue_deferred_msgs(), issue_pound_exit_line, label_ok, la_entry::line, line_dir_prefix, line_size, lines_in_buf, MAX_ANSI_FREE_LINES, MAX_FREE_LINES, MISC_RECS, move_up_next_msg_queue(), NO_ARG, ntr_msg_queue(), NULL, NULL_IDX, NXT_COL, nxt_line, nxt_line_actual_dir_prefix, nxt_line_col, nxt_line_dir_prefix, nxt_line_EOL, nxt_line_idx, nxt_line_mp_line, nxt_line_num, nxt_line_prefix_len, nxt_line_type, on_off_flags, open_include_file(), OUTPUT_POUND_INCLUDE_EXIT_LINE, parse_cc_line(), POP_SRC, Pound_Include_Enter_Line, Pound_Include_Exit_Line, Pound_Src_Line, pp_line_idx, cmd_line_flags_entry::pp_macro_expansion, PP_ORIG_SIZE, prev_statement_number, previous_global_line, print_nxt_line(), PRINT_STMT_SRC, PRINTMSG(), Regular_Line, on_off_flags_entry::save_dot_i, semi_colon, set_related_gl_source_lines(), source_form, SRC_STK_BASE_IDX, SRC_STK_FILE_LINE, SRC_STK_GLOBAL_LINE_IDX, src_stk_idx, SRC_STK_PREV_SRC_FORM, starting_pt, statement_number, stmt_buf, stmt_buf_col, stmt_buf_dir_prefix, stmt_buf_EOS_idx, stmt_buf_idx, la_entry::stmt_buf_idx, stmt_buf_type, stmt_EOS_la_ch, stmt_line_end_idx, stmt_line_idx, stmt_line_num, stmt_line_offset, stmt_line_start_idx, la_entry::stmt_num, stmt_prefix_len, tab, TRACE, TRUE, and update_global_line().

Referenced by free_get_char(), and init_src_input().

Here is the call graph for this function:

void get_curr_file_name ( char *  str)

Definition at line 8724 of file src_input.c.

References Func_Entry, Func_Exit, NULL, SRC_STK_FILE_NAME, src_stk_idx, and TRACE.

Referenced by get_dynamic_predef_str().

char* get_src_path_name ( void  )

Definition at line 7251 of file src_input.c.

References SRC_STK_BASE_IDX, and SRC_STK_PATH_NAME.

Referenced by cvrt_proc_to_pdg(), and init_PDGCS().

void init_src_input ( void  )

Definition at line 209 of file src_input.c.

References blank, c_i_f, change_orig_src_file, CHECK_INITIAL_ALLOC, cif_actual_file, cif_file_name_rec(), cif_file_rec_issued, cif_flags, cif_source_file_rec(), cif_tmp_file, cmd_line_flags, Comment_Line, dot_i_file, dot_i_fptr, EOS, eos, exit_compiler(), expected_line, FALSE, Fixed_Form, fixed_get_stmt(), FIXED_SRC_LINE_SIZE_132, FIXED_SRC_LINE_SIZE_72, FIXED_SRC_LINE_SIZE_80, fprintf(), free_get_stmt(), FREE_SRC_LINE_SIZE, Func_Entry, Func_Exit, GL_CIF_FILE_ID, GL_FILE_LINE, GL_GLOBAL_LINE, global_line_tbl_idx, have_issued_msg_37, havent_issued_at_ansi, havent_issued_dollar_ansi, havent_issued_tab_ansi, Input_Src, line_size, cmd_line_flags_entry::line_size_132, cmd_line_flags_entry::line_size_80, Log_Error, MAX_FILE_NAME_SIZE, newline, NULL, NULL_IDX, nxt_line, nxt_line_col, nxt_line_end_idx, nxt_line_idx, nxt_line_num, nxt_line_num_lines, nxt_line_start_idx, nxt_line_type, on_off_flags, on_off_flags_entry::output_pound_lines, pound_file, PP_EOL, pp_line_idx, PP_LINE_TYPE, pp_nxt_line_type, on_off_flags_entry::preprocess_only, previous_global_line, PRINTMSG(), RC_USER_ERROR, Regular_Line, on_off_flags_entry::save_dot_i, SLASH, source_form, src_file, cmd_line_flags_entry::src_form, src_stk, SRC_STK_BASE_IDX, SRC_STK_CIF_FILE_ID, SRC_STK_FILE_IDX, SRC_STK_FILE_LINE, SRC_STK_FILE_NAME, SRC_STK_FILE_PTR, SRC_STK_FILE_TYPE, SRC_STK_GLOBAL_LINE_IDX, src_stk_idx, SRC_STK_PATH_NAME, SRC_STK_PREV_SRC_FORM, starting_pt, Stdin_Src, strcpy, TRACE, TRUE, and update_global_line().

Referenced by init_compiler().

Here is the call graph for this function:

static boolean is_pound_line_dir ( void  ) [static]

Definition at line 1785 of file src_input.c.

References blank, FALSE, Func_Entry, Func_Exit, idx, NULL, NXT_COL, nxt_line, pound, tab, TRACE, and TRUE.

Referenced by fixed_classify_line(), and free_classify_line().

static boolean open_include_file ( boolean  pound_include_line) [static]

Definition at line 4883 of file src_input.c.

References angle_brkt_include, c_i_f, cif_actual_file, cif_file_id, cif_file_name_rec(), cif_file_rec_issued, cif_flags, cif_include_rec(), CIF_Include_Stmt, cif_need_unit_rec, cif_source_file_rec(), cif_stmt_type_rec(), cif_tmp_file, CLEAR_TBL_NTRY, cmd_line_flags, Comment_Line, curr_glb_line, DBL_QUOTE, dot_i_fptr, EOS, EQUAL_STRS, Error, FALSE, file_path_tbl, file_path_tbl_idx, FP_CIF_ID, FP_NAME_IDX, FP_NAME_LEN, FP_NAME_PTR, FP_NEXT_FILE_IDX, fprintf(), full_include_name_idx, Func_Entry, Func_Exit, GL_CIF_FILE_ID, global_line_tbl_idx, include_file, include_path_idx, Include_Src, include_stmt_file_col, line_size, MAX_FILE_NAME_SIZE, MAX_PATH_NAME_SIZE, MISC_RECS, name_pool_entry::name_long, ntr_msg_queue(), NULL, NULL_IDX, NXT_COL, nxt_line, nxt_line_end_idx, nxt_line_idx, nxt_line_num, nxt_line_num_lines, nxt_line_start_idx, nxt_line_type, on_off_flags, on_off_flags_entry::output_pound_lines, Pound_Include_Enter_Line, PP_EXPECTED_LINE, pp_line_idx, PP_LINE_NUM, PP_LINE_TYPE, cmd_line_flags_entry::pp_macro_expansion, on_off_flags_entry::preprocess_only, QUOTE, Regular_Line, result, on_off_flags_entry::save_dot_i, SLASH, source_form, src_file, cmd_line_flags_entry::src_form, src_stk, SRC_STK_BASE_IDX, SRC_STK_CIF_FILE_ID, SRC_STK_DO_NOT_FCLOSE, SRC_STK_FILE_IDX, SRC_STK_FILE_LINE, SRC_STK_FILE_PTR, SRC_STK_FILE_TYPE, SRC_STK_GLOBAL_LINE_IDX, src_stk_idx, SRC_STK_PATH_NAME, SRC_STK_PREV_SRC_FORM, statement_number, stmt_start_col, stmt_start_line, STR_ARG, str_pool, str_pool_idx, strcpy, TBL_REALLOC_CK, TRACE, TRUE, and WORD_LEN.

Referenced by fixed_get_stmt(), free_get_stmt(), pp_get_stmt(), and preprocess_only_driver().

Here is the call graph for this function:

void print_err_line ( line  ,
column   
)
static void print_src ( void  ) [static]

Definition at line 155 of file src_input.c.

References Fixed_Form, fprintf(), idx, lines_in_buf, source_form, stmt_buf, stmt_line_end_idx, stmt_line_num, and stmt_line_start_idx.

Here is the call graph for this function:

void print_src_input_tbls ( void  )

Definition at line 7140 of file src_input.c.

References debug_file, fprintf(), msg_queue_inc, msg_queue_init_size, msg_queue_num_wds, src_stk_inc, src_stk_init_size, and src_stk_num_wds.

Referenced by print_mem_usage_report().

Here is the call graph for this function:

static void print_stmt ( void  ) [static]

Definition at line 114 of file src_input.c.

References eos, fprintf(), idx, lines_in_buf, newline, stmt_buf, and stmt_line_start_idx.

Here is the call graph for this function:

boolean stmt_is_save_stmt ( int  buf_idx,
int  stmt_num 
)

Definition at line 7409 of file src_input.c.

References EXIT, FALSE, Free_Form, Func_Entry, Func_Exit, LA_CH_VALUE, NEXT_LA_CH, NULL, reset_src_input(), source_form, TRACE, and TRUE.

Here is the call graph for this function:

static int whats_after_brkt_group ( int *  idx,
int *  line_idx,
int  cnt 
) [static]
static int whats_after_paren_group ( int *  idx,
int *  line_idx,
int  cnt 
) [static]

Variable Documentation

char USMID[] = "\n@(#)5.0_pl/sources/src_input.c 5.5 10/20/99 17:17:46\n" [static]

Definition at line 37 of file src_input.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines