Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
lex.m File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define MAX_BIN_CONST_LEN   256 /* max binary const len */
#define MAX_HEX_CONST_LEN   64 /* max hex const len */
#define MAX_OCT_CONST_LEN   86 /* max octal const len */
#define MAX_CHAR_CONST_LEN   1320 /* max character const len */
#define MAX_KWD_LEN   31 /* max keyword len */
#define IS_BIN_DIGIT(CH)   ((((CH) - '0') >> 1) == 0)
#define IS_OCT_DIGIT(CH)   ((((CH) - '0') >> 3) == 0)
#define VALID_LA_CH
#define CHECK_FOR_FREE_BLANK
#define ADD_TO_TOKEN_KIND_STR(CH, LEN)
#define ADD_TO_TOKEN_STR(CH, LEN)
#define ADD_TO_CONST_BUF(CH, LEN)
#define OVERFLOW_MESSAGE(RESULT)
#define CONVERT_INT_CONST(TYPE, LEN, RESULT)
#define CONVERT_REAL_CONST(TYPE, LEN, RESULT)
#define CONVERT_DBL_CONST(TYPE, LEN, RESULT)

Define Documentation

#define ADD_TO_CONST_BUF (   CH,
  LEN 
)
Value:
if ((LEN) < MAX_CHAR_CONST_LEN) {                             \
                   const_buf[(LEN)] = (CH);                                   \
                }                                                             \
                (LEN)++

Definition at line 97 of file lex.m.

Referenced by get_operand_digit(), get_operand_dot(), get_operand_letter(), get_operand_quote(), and get_token().

#define ADD_TO_TOKEN_KIND_STR (   CH,
  LEN 
)
Value:
if ((LEN) < MAX_ID_LEN) {                                     \
                   TOKEN_KIND_STR(token)[(LEN)] = (CH);                       \
                }                                                             \
                (LEN)++

Definition at line 85 of file lex.m.

Referenced by get_operand_digit(), and get_operand_dot().

Value:
if (source_form == Free_Form        &&                        \
                    VALID_LA_CH)                    {                         \
                   PRINTMSG(LA_CH_LINE, 415, Error, LA_CH_COLUMN);            \
                }

Definition at line 79 of file lex.m.

Referenced by get_label(), get_operand_digit(), get_operand_dot(), and get_token().

#define CONVERT_DBL_CONST (   TYPE,
  LEN,
  RESULT 
)
Value:
{ double a_const;                                             \
                  const_buf[(LEN)] = '\0';                                    \
                  errno = 0;                                                  \
                  a_const = atof(const_buf);                                  \
                  if (errno == 0) {                                           \
                    TOKEN_CONST_TBL_IDX(token) = ntr_const_tbl(TYPE,          \
                                                FALSE, (long_type *)&a_const);\
                  } else {                                                    \
                    OVERFLOW_MESSAGE(RESULT);                                 \
                  }                                                           \
                }

Definition at line 424 of file lex.m.

Referenced by convert_const(), cvrt_str_to_cn(), get_operand_digit(), and get_operand_dot().

#define CONVERT_INT_CONST (   TYPE,
  LEN,
  RESULT 
)
Value:
{ long_type     a_const;                                      \
                  const_buf[(LEN)] = '\0';                                    \
                  errno = 0;                                                  \
                  a_const = LEX_STRTOL(const_buf, (char **) NULL, 10);        \
                  if (errno == 0) {                                           \
                     TOKEN_CONST_TBL_IDX(token) = ntr_const_tbl(TYPE,         \
                                                            FALSE, &a_const); \
                  } else {                                                    \
                    OVERFLOW_MESSAGE(RESULT);                                 \
                  }                                                           \
                }

Definition at line 398 of file lex.m.

Referenced by convert_const(), cvrt_str_to_cn(), and get_token().

#define CONVERT_REAL_CONST (   TYPE,
  LEN,
  RESULT 
)
Value:
{ float a_const;                                              \
                  const_buf[(LEN)] = '\0';                                    \
                  errno = 0;                                                  \
                  a_const = (float)atof(const_buf);                           \
                  if (errno == 0) {                                           \
                    TOKEN_CONST_TBL_IDX(token) = ntr_const_tbl(TYPE,          \
                                                FALSE, (long_type *)&a_const);\
                  } else {                                                    \
                    OVERFLOW_MESSAGE(RESULT);                                 \
                  }                                                           \
                }

Definition at line 411 of file lex.m.

Referenced by convert_const(), cvrt_str_to_cn(), get_operand_digit(), and get_operand_dot().

#define IS_BIN_DIGIT (   CH)    ((((CH) - '0') >> 1) == 0)

Definition at line 63 of file lex.m.

Referenced by get_operand_letter().

#define IS_OCT_DIGIT (   CH)    ((((CH) - '0') >> 3) == 0)

Definition at line 64 of file lex.m.

Referenced by get_operand_digit(), get_operand_letter(), and get_operand_quote().

#define MAX_BIN_CONST_LEN   256 /* max binary const len */

Definition at line 47 of file lex.m.

Referenced by get_operand_letter().

#define MAX_CHAR_CONST_LEN   1320 /* max character const len */

Definition at line 51 of file lex.m.

#define MAX_HEX_CONST_LEN   64 /* max hex const len */

Definition at line 48 of file lex.m.

Referenced by get_operand_letter(), and get_operand_quote().

#define MAX_OCT_CONST_LEN   86 /* max octal const len */

Definition at line 49 of file lex.m.

Referenced by get_operand_digit(), get_operand_letter(), and get_operand_quote().

#define OVERFLOW_MESSAGE (   RESULT)
Value:

Definition at line 107 of file lex.m.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines