Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
tokens.m
Go to the documentation of this file.
00001 /*
00002 
00003   Copyright (C) 2000, 2001 Silicon Graphics, Inc.  All Rights Reserved.
00004 
00005   This program is free software; you can redistribute it and/or modify it
00006   under the terms of version 2 of the GNU General Public License as
00007   published by the Free Software Foundation.
00008 
00009   This program is distributed in the hope that it would be useful, but
00010   WITHOUT ANY WARRANTY; without even the implied warranty of
00011   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
00012 
00013   Further, this software is distributed without any warranty that it is
00014   free of the rightful claim of any third person regarding infringement 
00015   or the like.  Any license provided herein, whether implied or 
00016   otherwise, applies only to this software file.  Patent licenses, if 
00017   any, provided herein do not apply to combinations of this program with 
00018   other software, or any other product whatsoever.  
00019 
00020   You should have received a copy of the GNU General Public License along
00021   with this program; if not, write the Free Software Foundation, Inc., 59
00022   Temple Place - Suite 330, Boston MA 02111-1307, USA.
00023 
00024   Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
00025   Mountain View, CA 94043, or:
00026 
00027   http://www.sgi.com
00028 
00029   For further information regarding this notice, see:
00030 
00031   http://oss.sgi.com/projects/GenInfo/NoticeExplan
00032 
00033 */
00034 
00035 
00036 /* USMID:  "\n@(#)5.0_pl/macros/tokens.m        5.1     04/29/99 21:22:31\n" */
00037  
00038 
00039 /*****************\
00040 |* MISCELLANEOUS *|
00041 \*****************/
00042 
00043 
00044 /********************\
00045 |* SIZES AND LIMITS *|
00046 \********************/
00047 
00048 
00049 /******************************\
00050 |* OBJECT REPLACEMENT STRINGS *|
00051 \******************************/
00052 
00053 # define  LA_CH_CLASS                   la_ch.ch_class
00054 # define  LA_CH_COLUMN                  la_ch.column
00055 # define  LA_CH_LINE                    la_ch.line
00056 # define  LA_CH_VALUE                   la_ch.value
00057 # define  LA_CH_BUF_IDX                 la_ch.stmt_buf_idx
00058 # define  LA_CH_STMT_NUM                la_ch.stmt_num
00059 
00060 # define  TOKEN_COLUMN(TOK)             (TOK).column
00061 # define  TOKEN_CONST_TBL_IDX(TOK)      TOKEN_STR_WD(TOK, 0)
00062 # define  TOKEN_KIND_LEN(TOK)           (TOK).kind_len
00063 # define  TOKEN_KIND_STR(TOK)           (TOK).kind_str
00064 # define  TOKEN_LEN(TOK)                (TOK).token_len
00065 # define  TOKEN_LINE(TOK)               (TOK).line
00066 # define  TOKEN_STR(TOK)                (TOK).token_str.string
00067 # define  TOKEN_STR_WD(TOK, WD)         (TOK).token_str.words[WD]
00068 # define  TOKEN_VALUE(TOK)              (TOK).value
00069 # define  TOKEN_ID(TOK)                 (TOK).token_str
00070 # define  TOKEN_ERR(TOK)                (TOK).token_err
00071 # define  TOKEN_BUF_IDX(TOK)            (TOK).stmt_buf_idx
00072 # define  TOKEN_STMT_NUM(TOK)           (TOK).stmt_num
00073 
00074 
00075 /***********************************\
00076 |* CONDITIONAL REPLACEMENT STRINGS *|
00077 \***********************************/
00078 
00079 
00080 /***********************************************\
00081 |* STATEMENT/FUNCTION-LIKE REPLACEMENT STRINGS *|
00082 \***********************************************/
00083 # define LA_CH_TO_ERR_STR(STR,THE_LA)                                          \
00084          STR =  (THE_LA.ch_class == Ch_Class_EOS) ? "EOS" : &THE_LA.value
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines