Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
#include "lio.h"
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <cray/format.h>
#include <cray/nassert.h>
#include <cray/portdefs.h>
Go to the source code of this file.
Classes | |
struct | parse_block |
Defines | |
#define | GET(P) |
#define | GETNUM(P, M) |
#define | E_WITH_D_NON_ANSI DW_IS_NON_ANSI |
Functions | |
static void | fmterr (parse_block *pfmt, short msg_num, short code, long column) |
static short | process_paren_group (parse_block *pfmt, fmt_type *ploc) |
fmt_type * | _fmt_parse (_Error_function **msg_rtn, char *format_str, long routine_caller, long *fmt_str_len, msg_type *lib_err_msg) |
static void | recover (parse_block *pfmt) |
static short | nonzero_integer (parse_block *pfmt, long *size) |
static void | process_arl (parse_block *pfmt, unsigned short op_code) |
static void | process_defg (parse_block *pfmt, unsigned short op_code) |
static void | process_bioz (parse_block *pfmt, unsigned short op_code) |
static void | process_t (parse_block *pfmt) |
static void | process_p (parse_block *pfmt, long scale_factor) |
static void | process_char_string (parse_block *pfmt) |
static short | process_minus (parse_block *pfmt) |
Variables | |
static int64 | non_repeatable [2] |
#define E_WITH_D_NON_ANSI DW_IS_NON_ANSI |
Definition at line 113 of file fmtparse.c.
Referenced by process_defg().
{ \ do { \ if (++P->fmt_pos > P->fmt_len) { \ P->fmt_ch = '\0'; \ P->fmt_pos--; \ break; \ } \ P->fmt_ch = *(++P->fmt_ptr); \ } while (P->fmt_ch == ' ' || P->fmt_ch == '\t'); \ }
Definition at line 92 of file fmtparse.c.
Referenced by _fmt_parse(), process_arl(), process_bioz(), process_char_string(), process_defg(), process_minus(), process_p(), process_paren_group(), process_t(), and recover().
{ \ do { \ M = (M + M + (M << 3)) + ((int64) P->fmt_ch - ZERO);\ GET(P); \ } while (IS_DIGIT(P->fmt_ch)); \ }
Definition at line 103 of file fmtparse.c.
Referenced by nonzero_integer(), process_arl(), process_bioz(), process_defg(), process_minus(), and process_paren_group().
fmt_type* _fmt_parse | ( | _Error_function ** | msg_rtn, |
char * | format_str, | ||
long | routine_caller, | ||
long * | fmt_str_len, | ||
msg_type * | lib_err_msg | ||
) |
Definition at line 152 of file fmtparse.c.
References parse_block::caller, parse_block::depth, parse_block::desc_col, EXPECTING_LEFT_PAREN, FALL, FALSE, parse_block::fatal_err, parse_block::fmt_ch, FMT_ENTRY_BYTE_SIZE, FMT_ENTRY_WORD_SIZE, parse_block::fmt_len, parse_block::fmt_pos, parse_block::fmt_ptr, fmterr(), free(), GET, parse_block::iss_msg, LIB_CALL, MAX_CALL_FLAG, parse_block::maxdepth, NULL, fmt_entry::offset, parse_block::parsed, PARSER_LEVEL, parse_block::pptr, process_paren_group(), fmt_entry::rep_count, parse_block::revert, parse_block::stat, TRAILING_CHARS, and UNABLE_TO_MALLOC_MEMORY.
static void fmterr | ( | parse_block * | pfmt, |
short | msg_num, | ||
short | code, | ||
long | column | ||
) | [static] |
Definition at line 291 of file fmtparse.c.
References parse_block::caller, COMPILER_CALL_ANSI, COMPILER_CALL_ANSI_77, COMPILER_CALL_ANSI_90, COMPILER_CALL_ANSI_95, COMPILER_CALL_NO_ANSI, parse_block::desc_col, msg_entry::desc_column, F77, F90, F95, parse_block::fatal_err, FIRST_FATAL_MESSAGE, FIRST_NON_ANSI_MESSAGE, parse_block::fmt_pos, parse_block::iss_msg, LIB_CALL, msg_entry::msg_column, msg_entry::msg_number, parse_block::stat, and TRUE.
Referenced by _fmt_parse(), nonzero_integer(), process_arl(), process_bioz(), process_char_string(), process_defg(), process_minus(), process_p(), and process_paren_group().
static short nonzero_integer | ( | parse_block * | pfmt, |
long * | size | ||
) | [static] |
Definition at line 437 of file fmtparse.c.
References EXPECTING_INTEGER, FALL, FALSE, FIELD_TOO_LARGE, FIELD_WIDTH_ZERO, parse_block::fmt_ch, parse_block::fmt_pos, fmterr(), GETNUM, IS_DIGIT, MAX_FIELD_WIDTH, size, and TRUE.
Referenced by process_t().
static void process_arl | ( | parse_block * | pfmt, |
unsigned short | op_code | ||
) | [static] |
Definition at line 502 of file fmtparse.c.
References A_ED, EXPECTING_INTEGER, FALL, FIELD_TOO_LARGE, fmt_entry::field_width, FIELD_WIDTH_ZERO, parse_block::fmt_ch, parse_block::fmt_pos, fmterr(), GET, GETNUM, IS_DIGIT, MAX_FIELD_WIDTH, MISSING_WIDTH_NON_ANSI, fmt_entry::op_code, parse_block::pptr, recover(), size, and ZERO_WIDTH_NON_ANSI.
Referenced by process_paren_group().
static void process_bioz | ( | parse_block * | pfmt, |
unsigned short | op_code | ||
) | [static] |
Definition at line 750 of file fmtparse.c.
References fmt_entry::default_digits, fmt_entry::digits_field, EXPECTING_INTEGER, F77, F90, FALL, FIELD_TOO_LARGE, fmt_entry::field_width, FIELD_WIDTH_ZERO, parse_block::fmt_ch, parse_block::fmt_pos, fmterr(), GET, GETNUM, IS_DIGIT, MAX_DECIMAL_FIELD, MAX_FIELD_WIDTH, MISSING_WIDTH_NON_ANSI, fmt_entry::op_code, parse_block::pptr, recover(), and ZERO_WIDTH_NON_ANSI.
Referenced by process_paren_group().
static void process_char_string | ( | parse_block * | pfmt | ) | [static] |
Definition at line 966 of file fmtparse.c.
References FALL, fmt_entry::field_width, parse_block::fmt_ch, FMT_ENTRY_BYTE_SIZE, parse_block::fmt_len, parse_block::fmt_pos, parse_block::fmt_ptr, fmterr(), GET, NONTERMINATED_LITERAL, fmt_entry::op_code, parse_block::pptr, size, and STRING_ED.
Referenced by process_paren_group().
static void process_defg | ( | parse_block * | pfmt, |
unsigned short | op_code | ||
) | [static] |
Definition at line 589 of file fmtparse.c.
References code, D_ED, fmt_entry::default_digits, fmt_entry::digits_field, E_WITH_D_NON_ANSI, EXPECTING_INTEGER, EXPECTING_PERIOD, fmt_entry::exponent, F77, F90, F_ED, FALL, FIELD_TOO_LARGE, fmt_entry::field_width, FIELD_WIDTH_ZERO, parse_block::fmt_ch, parse_block::fmt_pos, fmterr(), GET, GETNUM, IS_DIGIT, MAX_DECIMAL_FIELD, MAX_EXPONENT, MAX_FIELD_WIDTH, MISSING_WIDTH_NON_ANSI, fmt_entry::op_code, parse_block::pptr, recover(), and ZERO_WIDTH_NON_ANSI.
Referenced by process_paren_group().
static short process_minus | ( | parse_block * | pfmt | ) | [static] |
Definition at line 1035 of file fmtparse.c.
References parse_block::desc_col, EXPECTING_INTEGER, EXPECTING_P_OR_X, FALL, FALSE, FIELD_TOO_LARGE, fmt_entry::field_width, FIELD_WIDTH_ZERO, parse_block::fmt_ch, parse_block::fmt_pos, fmterr(), GET, GETNUM, IS_DIGIT, MAX_FIELD_WIDTH, MAX_REP_COUNT, MINUS_X_NON_ANSI, fmt_entry::offset, fmt_entry::op_code, parse_block::pptr, process_p(), recover(), size, TL_ED, and TRUE.
Referenced by process_paren_group().
static void process_p | ( | parse_block * | pfmt, |
long | scale_factor | ||
) | [static] |
Definition at line 912 of file fmtparse.c.
References ANSI_COMMA_REQ, FALL, parse_block::fmt_ch, parse_block::fmt_pos, fmterr(), GET, fmt_entry::offset, fmt_entry::op_code, P_ED, parse_block::pptr, and fmt_entry::rep_count.
Referenced by process_minus(), and process_paren_group().
static short process_paren_group | ( | parse_block * | pfmt, |
fmt_type * | ploc | ||
) | [static] |
Definition at line 1155 of file fmtparse.c.
References A_ED, ANSI_COMMA_REQ, ANSI_EMPTY_PAREN_MSG, B_ED, BN_ED, BZ_ED, parse_block::caller, COLON_ED, COMMA_NON_ANSI, D_ED, parse_block::depth, parse_block::desc_col, DOLLAR_ED, E_ED, EN_ED, ENDREP_OP, ES_ED, EXPECTING_INTEGER, EXPECTING_P_OR_X, EXPECTING_RIGHT_PAREN, F77, F90, F95, F_ED, FALL, FALSE, parse_block::fatal_err, FIELD_TOO_LARGE, fmt_entry::field_width, parse_block::fmt_ch, FMT_ENTRY_BYTE_SIZE, parse_block::fmt_len, parse_block::fmt_pos, parse_block::fmt_ptr, fmterr(), G_ED, GET, GETNUM, H_IS_OBSOLETE_IN_F90, I_ED, INVALID_REP_COUNT, IS_DIGIT, L_ED, LIB_CALL, MAX_FIELD_WIDTH, MAX_REP_COUNT, parse_block::maxdepth, NON_ANSI_EDIT_DESCRIPTOR, NON_ANSI_NULL_DESCRIPTOR, non_repeatable, NONTERMINATED_LITERAL, O_ED, fmt_entry::offset, fmt_entry::op_code, P_ED, parse_block::pptr, process_arl(), process_bioz(), process_char_string(), process_defg(), process_minus(), process_p(), process_t(), Q_ED, R_ED, recover(), fmt_entry::rep_count, REP_SLASH_NON_ANSI, REPEAT_OP, parse_block::revert, REVERT_OP, fmt_entry::rgcdedf, S_ED, size, SLASH_ED, SP_ED, SS_ED, STRING_ED, T_ED, TL_ED, TR_ED, TRUE, UNKNOWN_EDIT_DESCRIPTOR, Z_ED, ZERO_OR_NO_HOLLERITH_CNT, and ZERO_REP_COUNT.
Referenced by _fmt_parse().
static void process_t | ( | parse_block * | pfmt | ) | [static] |
Definition at line 844 of file fmtparse.c.
References fmt_entry::field_width, parse_block::fmt_ch, GET, nonzero_integer(), fmt_entry::op_code, parse_block::pptr, fmt_entry::rep_count, size, T_ED, TL_ED, and TR_ED.
Referenced by process_paren_group().
static void recover | ( | parse_block * | pfmt | ) | [static] |
Definition at line 386 of file fmtparse.c.
References parse_block::caller, FALSE, parse_block::fmt_ch, GET, LIB_CALL, and TRUE.
Referenced by process_arl(), process_bioz(), process_defg(), process_minus(), and process_paren_group().
int64 non_repeatable[2] [static] |
{ 0x00000000297EFFE0, 0x0000180800001800 }
Definition at line 80 of file fmtparse.c.
Referenced by process_paren_group().