lex.h

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 
00037 /* USMID:  "\n@(#)5.0_pl/headers/lex.h  5.3     08/30/99 11:18:28\n" */
00038 
00039 /********************************************\
00040 |* type specifiers used within this module. *|
00041 \********************************************/
00042 
00043 typedef struct  alt_kwd_entry   alt_kwd_type;
00044 typedef struct  kwd_entry       kwd_type;
00045 
00046 struct  alt_kwd_entry  {char                   *name;
00047                         int                     len;
00048                         token_values_type       value;
00049                         int                     val_len; };
00050 
00051 struct  kwd_entry      {char                   *name;
00052                         token_values_type       value; };
00053 
00054 union aligned_value_entry       {
00055                                 long double     d;
00056                                 long_type       v[MAX_WORDS_FOR_NUMERIC];
00057                                 };
00058 
00059 typedef union aligned_value_entry aligned_value_type;
00060 
00061 
00062 /****************************************\
00063 |* static data used within this module. *|
00064 \****************************************/
00065 
00066 
00067 static  char                    const_buf[MAX_CHAR_CONST_LEN];
00068 
00069 token_type              initial_token;
00070 
00071 /******************************************************************************\
00072 |*                    GENERAL RULE FOR THESE STRING TABLES                    *|
00073 |*                                                                            *|
00074 |*   All strings are grouped by the beginning letter.  In this group, they    *|
00075 |* are ordered longest to shortest.  That means FALSE comes before F.         *|
00076 |*                                                                            *|
00077 |*   The idx table is indexed by a zero based alphabet.  That is, the index = *|
00078 |* character - 'A'.  If a letter has no corresponding keyword, it has the     *|
00079 |* index of the next letter that has keywords.                                *|
00080 |*                                                                            *|
00081 \******************************************************************************/
00082 
00083 
00084 static  int                     *dot_op_len;
00085 
00086 static  kwd_type                dot_op[] = {
00087                                 "AND",               Tok_Op_And,
00088                                 "A",                 Tok_Op_And,
00089 
00090                                 "EQV",               Tok_Op_Eqv,
00091                                 "EQ",                Tok_Op_Eq,
00092 
00093                                 "FALSE",             Tok_Const_False,
00094                                 "F",                 Tok_Const_False,
00095 
00096                                 "GE",                Tok_Op_Ge,
00097                                 "GT",                Tok_Op_Gt,
00098 
00099                                 "LE",                Tok_Op_Le,
00100                                 "LG",                Tok_Op_Lg,
00101                                 "LT",                Tok_Op_Lt,
00102 
00103                                 "NEQV",              Tok_Op_Neqv,
00104                                 "NOT",               Tok_Op_Not,
00105                                 "NE",                Tok_Op_Ne,
00106                                 "N",                 Tok_Op_Not,
00107 
00108                                 "OR",                Tok_Op_Or,
00109                                 "O",                 Tok_Op_Or,
00110   
00111                                 "TRUE",              Tok_Const_True,
00112                                 "T",                 Tok_Const_True,
00113 
00114                                 "XOR",               Tok_Op_Neqv,
00115                                 "X",                 Tok_Op_Neqv,
00116 
00117                                 "",                  Tok_LAST };
00118 
00119 static  int                     dot_op_idx[27];
00120 
00121 /******************************************************************************\
00122 |*                    GENERAL RULES FOR THESE STRING TABLES                   *|
00123 |*                                                                            *|
00124 |*   All strings are grouped by the beginning letter.  In this group,         *|
00125 |* they are ordered longest to shortest.  That means ALLOCATABLE comes before *|
00126 |* ASSIGN.                                                                    *|
00127 |*                                                                            *|
00128 |*   The idx table is indexed by a zero based alphabet.  That is, the index = *|
00129 |* character - 'A'.  If a letter has no corresponding keyword, it has the     *|
00130 |* index of the next letter that has keywords.                                *|
00131 |*                                                                            *|
00132 \******************************************************************************/
00133 
00134 static  int                     *kwd_len;
00135 
00136 static  kwd_type                kwd[] = {
00137                                 "ALLOCATABLE",       Tok_Kwd_Allocatable,
00138                                 "ASSIGNMENT",        Tok_Kwd_Assignment,
00139                                 "AUTOMATIC",         Tok_Kwd_Automatic,
00140                                 "ALLOCATE",          Tok_Kwd_Allocate,
00141                                 "ASSIGN",            Tok_Kwd_Assign,
00142 
00143                                 "BACKSPACE",         Tok_Kwd_Backspace,
00144                                 "BUFFER",            Tok_Kwd_Buffer,
00145                                 "BLOCK",             Tok_Kwd_Block,
00146                                 "BYTE",              Tok_Kwd_Byte, 
00147 
00148                                 "CHARACTER",         Tok_Kwd_Character,
00149                                 "COFUNCTION",        Tok_Kwd_CoFunction,
00150                                 "COSUBROUTINE",      Tok_Kwd_CoSubroutine,
00151 
00152                                 "CONTAINS",          Tok_Kwd_Contains,
00153                                 "CONTINUE",          Tok_Kwd_Continue,
00154                                 "COMPLEX",           Tok_Kwd_Complex,
00155                                 "COMMON",            Tok_Kwd_Common,
00156                                 "CLOSE",             Tok_Kwd_Close,
00157                                 "CYCLE",             Tok_Kwd_Cycle,
00158                                 "CALL",              Tok_Kwd_Call,
00159                                 "CASE",              Tok_Kwd_Case,
00160 
00161                                 "DEALLOCATE",        Tok_Kwd_Deallocate,
00162                                 "DIMENSION",         Tok_Kwd_Dimension,
00163                                 "DEFAULT",           Tok_Kwd_Default,
00164                                 "DECODE",            Tok_Kwd_Decode,
00165                                 "DOUBLE",            Tok_Kwd_Double,
00166                                 "DATA",              Tok_Kwd_Data,
00167                                 "DO",                Tok_Kwd_Do,
00168 
00169                                 "EQUIVALENCE",       Tok_Kwd_Equivalence,
00170                                 "ELEMENTAL",         Tok_Kwd_Elemental,
00171                                 "EXTERNAL",          Tok_Kwd_External,
00172                                 "ENCODE",            Tok_Kwd_Encode,
00173                                 "ENTRY",             Tok_Kwd_Entry,
00174                                 "ELSE",              Tok_Kwd_Else,
00175                                 "EXIT",              Tok_Kwd_Exit,
00176                                 "END",               Tok_Kwd_End,
00177 
00178                                 "FUNCTION",          Tok_Kwd_Function,
00179                                 "FORALL",            Tok_Kwd_Forall,
00180                                 "FORMAT",            Tok_Kwd_Format,
00181                                 "FILE",              Tok_Kwd_File,
00182 
00183                                 "GO",                Tok_Kwd_Go,
00184 
00185                                 "INTERFACE",         Tok_Kwd_Interface,
00186                                 "INTRINSIC",         Tok_Kwd_Intrinsic,
00187                                 "IMPLICIT",          Tok_Kwd_Implicit,
00188                                 "INQUIRE",           Tok_Kwd_Inquire,
00189                                 "INTEGER",           Tok_Kwd_Integer,
00190                                 "INTENT",            Tok_Kwd_Intent,
00191                                 "IF",                Tok_Kwd_If,
00192                                 "IN",                Tok_Kwd_In,
00193 
00194                                 "KIND",              Tok_Kwd_Kind,
00195 
00196                                 "LOGICAL",           Tok_Kwd_Logical,
00197                                 "LEN",               Tok_Kwd_Len,
00198 
00199                                 "MODULE",            Tok_Kwd_Module,
00200 
00201                                 "NAMELIST",          Tok_Kwd_Namelist,
00202                                 "NULLIFY",           Tok_Kwd_Nullify,
00203                                 "NONE",              Tok_Kwd_None,
00204 
00205                                 "OPERATOR",          Tok_Kwd_Operator,
00206                                 "OPTIONAL",          Tok_Kwd_Optional,
00207                                 "ONLY",              Tok_Kwd_Only,
00208                                 "OPEN",              Tok_Kwd_Open,
00209                                 "OUT",               Tok_Kwd_Out,
00210 
00211                                 "PARAMETER",         Tok_Kwd_Parameter,
00212                                 "PRECISION",         Tok_Kwd_Precision,
00213                                 "PROCEDURE",         Tok_Kwd_Procedure,
00214                                 "POINTER",           Tok_Kwd_Pointer,
00215                                 "PRIVATE",           Tok_Kwd_Private,
00216                                 "PROGRAM",           Tok_Kwd_Program,
00217                                 "PUBLIC",            Tok_Kwd_Public,
00218                                 "PAUSE",             Tok_Kwd_Pause,
00219                                 "PRINT",             Tok_Kwd_Print,
00220                                 "PURE",              Tok_Kwd_Pure,
00221 
00222                                 "RECURSIVE",         Tok_Kwd_Recursive,
00223                                 "RESULT",            Tok_Kwd_Result,
00224                                 "RETURN",            Tok_Kwd_Return,
00225                                 "REWIND",            Tok_Kwd_Rewind,
00226                                 "READ",              Tok_Kwd_Read,
00227                                 "REAL",              Tok_Kwd_Real,
00228 
00229                                 "SUBROUTINE",        Tok_Kwd_Subroutine,
00230                                 "SEQUENCE",          Tok_Kwd_Sequence,
00231                                 "SELECT",            Tok_Kwd_Select,
00232                                 "STATIC",            Tok_Kwd_Static,
00233                                 "SAVE",              Tok_Kwd_Save,
00234                                 "STAT",              Tok_Kwd_Stat,
00235                                 "STOP",              Tok_Kwd_Stop,
00236                                 "SPAN",              Tok_Kwd_Span,
00237  
00238                                 "TARGET",            Tok_Kwd_Target,
00239                                 "TASK",              Tok_Kwd_Task,
00240                                 "THEN",              Tok_Kwd_Then,
00241                                 "TYPE",              Tok_Kwd_Type,
00242                                 "TO",                Tok_Kwd_To,
00243 
00244                                 "UNDEFINED",         Tok_Kwd_Undefined,
00245                                 "USE",               Tok_Kwd_Use,
00246 
00247                                 "VOLATILE",          Tok_Kwd_Volatile,
00248  
00249                                 "WHERE",             Tok_Kwd_Where,
00250                                 "WHILE",             Tok_Kwd_While,
00251                                 "WRITE",             Tok_Kwd_Write,
00252  
00253                                 "",                  Tok_LAST };
00254 
00255 static  int                     kwd_idx[27];
00256 
00257 /******************************************************************************\
00258 |*                   GENERAL RULES FOR THESE STRING TABLES                    *|
00259 |*                                                                            *|
00260 |*   All strings are grouped by the beginning letter.  In this group,         *|
00261 |* they are ordered longest to shortest.  That means ELSEWHERE comes before   *|
00262 |* ENDFILE.                                                                   *|
00263 |*                                                                            *|
00264 |*   The idx table is indexed by a zero based alphabet.  That is, the index = *|
00265 |* character - 'A'.  If a letter has no corresponding keyword, it has the     *|
00266 |* index of the next letter that has keywords.                                *|
00267 |*                                                                            *|
00268 \******************************************************************************/
00269 
00270 /* THIS TABLE IS NOT HANDLED THE SAME AS THE OTHERS !!!!!!!!!!!!!!!!! */
00271 /* PAY ATTENTION  */
00272 /* Note: additions/deletions to this table must be reflected in alt_kwd_idx.  */
00273 
00274 static  alt_kwd_type            alt_kwd[] = {
00275 
00276                                 "BLOCKDATA",     9,  Tok_Kwd_Block,     5,
00277 
00278                                 "DOUBLEPRECISION",
00279                                                 15,  Tok_Kwd_Double,    6,
00280 
00281                                 "ENDSUBROUTINE",13,  Tok_Kwd_End,       3,
00282                                 "ENDBLOCKDATA", 12,  Tok_Kwd_End,       3,
00283                                 "ENDINTERFACE", 12,  Tok_Kwd_End,       3,
00284                                 "ENDFUNCTION",  11,  Tok_Kwd_End,       3,
00285                                 "ENDPROGRAM",   10,  Tok_Kwd_End,       3,
00286                                 "ENDMODULE",     9,  Tok_Kwd_End,       3,
00287                                 "ENDFORALL",     9,  Tok_Kwd_End,       3,
00288                                 "ENDSELECT",     9,  Tok_Kwd_End,       3,
00289                                 "ELSEWHERE",     9,  Tok_Kwd_Else,      4,
00290                                 "ENDWHERE",      8,  Tok_Kwd_End,       3,
00291                                 "ENDBLOCK",      8,  Tok_Kwd_End,       3,
00292                                 "ENDFILE",       7,  Tok_Kwd_End,       3,
00293                                 "ENDTYPE",       7,  Tok_Kwd_End,       3,
00294                                 "ELSEIF",        6,  Tok_Kwd_Else,      4,
00295                                 "ENDDO",         5,  Tok_Kwd_End,       3,
00296                                 "ENDIF",         5,  Tok_Kwd_End,       3,
00297 
00298                                 "GOTO",          4,  Tok_Kwd_Go,        2,
00299 
00300                                 "INOUT",         5,  Tok_Kwd_In,        2,
00301 
00302                                 "SELECTCASE",   10,  Tok_Kwd_Select,    6 };
00303 
00304 static  int                     alt_kwd_idx[] = {
00305                                   0,   0,   1,   1,   2,  18,  18,     /* A-G */
00306                                  19,  19,  20,  20,  20,  20,  20,     /* H-N */
00307                                  20,  20,  20,  20,  20,  21,  21,     /* O-U */
00308                                  21,  21,  21,  21,  21,               /* V-Z */
00309                                  21 };                                 /* end */
00310 
00311 
00312 /******************************************************************************\
00313 |*                    GENERAL RULES FOR THESE STRING TABLES                   *|
00314 |*                                                                            *|
00315 |*   All strings are grouped by the beginning letter.  In this group, they    *|
00316 |* are ordered longest to shortest.  That means BOUNDS comes before BL.       *|
00317 |*                                                                            *|
00318 |*   The idx table is indexed by a zero based alphabet.  That is, the index = *|
00319 |* character - 'A'.  If a letter has no corresponding keyword, it has the     *|
00320 |* index of the next letter that has keywords.                                *|
00321 |*                                                                            *|
00322 |*                    * * * * *   ATTENTION   * * * * *                       *|
00323 |*                                                                            *|
00324 |* Additions/deletions to this table must be reflected in kwd_dir_idx below   *|
00325 |* and in procedure cif_misc_compiler_opts_rec in fecif.c                     *|
00326 |*                                                                            *|
00327 \******************************************************************************/
00328 
00329 static  int             *kwd_dir_len;
00330 
00331 static  kwd_type        kwd_dir[] = {
00332 
00333                         "ATOMICUPDATE",                 Tok_Dir_Atomicupdate,
00334                         "AUTOSCOPE",                    Tok_Dir_Autoscope,
00335                         "AUXILIARY",                    Tok_Dir_Auxiliary,
00336                         "ALIGN",                        Tok_Dir_Align,
00337 
00338                         "BLOCKINGSIZE",                 Tok_Dir_Blockingsize,
00339                         "BLOCKABLE",                    Tok_Dir_Blockable,
00340                         "BARRIER",                      Tok_Dir_Barrier,
00341                         "BOUNDS",                       Tok_Dir_Bounds,
00342                         "BLOCK",                        Tok_Dir_Block,
00343                         "BL",                           Tok_Dir_Bl,
00344 
00345                         "COPY_ASSUMED_SHAPE",       Tok_Dir_Copy_Assumed_Shape,
00346                         "CACHE_NOALLOCATE",             Tok_Dir_Cache_Noalloc,
00347                         "CACHE_BYPASS",                 Tok_Dir_Cache_Bypass,
00348                         "CACHE_ALIGN",                  Tok_Dir_Cache_Align,
00349                         "CONCURRENT",                   Tok_Dir_Concurrent,
00350                         "CHUNKSIZE",                    Tok_Dir_Chunksize,
00351                         "CRITICAL",                     Tok_Dir_Critical,
00352                         "CONTROL",                      Tok_Dir_Control,
00353                         "CNCALL",                       Tok_Dir_Cncall,
00354                         "COMMON",                       Tok_Dir_Common,
00355                         "CODE",                         Tok_Dir_Code,
00356 
00357                         "DOSHARED",                     Tok_Dir_Doshared,
00358                         "DYNAMIC",                      Tok_Dir_Dynamic,
00359  
00360                         "ENDCRITICAL",                  Tok_Dir_Endcritical,
00361                         "ENDMASTER",                    Tok_Dir_Endmaster,
00362                         "EJECT",                        Tok_Dir_Eject,
00363 
00364                         "FIXED",                        Tok_Dir_Fixed,
00365                         "FLOW",                         Tok_Dir_Flow,
00366                         "FREE",                         Tok_Dir_Free,
00367 
00368                         "GEOMETRY",                     Tok_Dir_Geometry,
00369                         "GETFIRST",                     Tok_Dir_Getfirst,
00370                         "GUIDED",                       Tok_Dir_Guided,
00371 
00372                         "INLINEALWAYS",                 Tok_Dir_Inline_Always,
00373                         "INLINENEVER",                  Tok_Dir_Inline_Never,
00374                         "INTERCHANGE",                  Tok_Dir_Interchange,
00375                         "IGNORE_TKR",                   Tok_Dir_Ignore_TKR,
00376                         "INTEGER",                      Tok_Dir_Integer,
00377                         "INLINE",                       Tok_Dir_Inline,
00378                         "IVDEP",                        Tok_Dir_Ivdep,
00379                         "ID",                           Tok_Dir_Id,
00380                         "IF",                           Tok_Dir_If,
00381 
00382                         "LIST",                         Tok_Dir_List,
00383 
00384                         "MODINLINE",                    Tok_Dir_Modinline,
00385                         "MAXCPUS",                      Tok_Dir_Maxcpus,
00386                         "MASTER",                       Tok_Dir_Master,
00387                         "MARK",                         Tok_Dir_Mark,
00388 
00389                         "NOSIDEEFFECTS",                Tok_Dir_Nosideeffects,
00390                         "NOINTERCHANGE",                Tok_Dir_Nointerchange,
00391                         "NORECURRENCE",                 Tok_Dir_Norecurrence,
00392                         "NCPUS_CHUNKS",                 Tok_Dir_Ncpus_Chunks,
00393                         "NOMODINLINE",                  Tok_Dir_Nomodinline,
00394                         "NEXTSCALAR",                   Tok_Dir_Nextscalar,
00395                         "NOBLOCKING",                   Tok_Dir_Noblocking,
00396                         "NOBARRIER",                    Tok_Dir_Nobarrier,
00397                         "NOPATTERN",                    Tok_Dir_Nopattern,
00398                         "NOVSEARCH",                    Tok_Dir_Novsearch,
00399                         "NUMCHUNKS",                    Tok_Dir_Numchunks,
00400                         "NOBOUNDS",                     Tok_Dir_Nobounds,
00401                         "NOINLINE",                     Tok_Dir_Noinline,
00402                         "NOVECTOR",                     Tok_Dir_Novector,
00403                         "NOSTREAM",                     Tok_Dir_Nostream,
00404                         "NOUNROLL",                     Tok_Dir_Nounroll,
00405                         "NOSPLIT",                      Tok_Dir_Nosplit,
00406                         "NUMCPUS",                      Tok_Dir_Numcpus,
00407                         "NOCINV",                       Tok_Dir_Nocinv,
00408                         "NOCODE",                       Tok_Dir_Nocode,
00409                         "NOFLOW",                       Tok_Dir_Noflow,
00410                         "NOLIST",                       Tok_Dir_Nolist,
00411                         "NOMARK",                       Tok_Dir_Nomark,
00412                         "NOTASK",                       Tok_Dir_Notask,
00413                         "NAME",                         Tok_Dir_Name,
00414                         "NOBL",                         Tok_Dir_Nobl,
00415 
00416                         "PARALLEL_ONLY",                Tok_Dir_Parallel_Only,
00417                         "PREFERVECTOR",                 Tok_Dir_Prefervector,
00418                         "PREFERSTREAM",                 Tok_Dir_Preferstream,
00419                         "PE_RESIDENT",                  Tok_Dir_Pe_Resident,
00420                         "PERMUTATION",                  Tok_Dir_Permutation,
00421                         "PREFERTASK",                   Tok_Dir_Prefertask,
00422                         "PE_PRIVATE",                   Tok_Dir_Pe_Private,
00423                         "PATTERN",                      Tok_Dir_Pattern,
00424                         "PRIVATE",                      Tok_Dir_Private,
00425 
00426                         "RECURRENCE",                   Tok_Dir_Recurrence,
00427                         "REGFILE",                      Tok_Dir_Regfile,
00428 
00429                         "SYSTEM_MODULE",                Tok_Dir_System_Module,
00430                         "SHORTSEQUENCE",                Tok_Dir_Shortsequence,
00431                         "SERIAL_ONLY",                  Tok_Dir_Serial_Only,
00432                         "SEMEXTERN",                    Tok_Dir_Semextern,
00433                         "SHORTLOOP",                    Tok_Dir_Shortloop,
00434                         "SYMMETRIC",                    Tok_Dir_Symmetric,
00435                         "SUPPRESS",                     Tok_Dir_Suppress,
00436                         "SAVELAST",                     Tok_Dir_Savelast,
00437                         "STREAM",                       Tok_Dir_Stream,
00438                         "STATIC",                       Tok_Dir_Static,
00439                         "SHARED",                       Tok_Dir_Shared,
00440                         "SINGLE",                       Tok_Dir_Single,
00441                         "SPLIT",                        Tok_Dir_Split,
00442                         "STACK",                        Tok_Dir_Stack,
00443 
00444                         "TASKCOMMON",                   Tok_Dir_Taskcommon,
00445                         "TASKHEAD",                     Tok_Dir_Taskhead,
00446                         "TASK",                         Tok_Dir_Task,
00447 
00448                         "UNKNOWN_SHARED",               Tok_Dir_Unknown_Shared,
00449                         "USES_EREGS",                   Tok_Dir_Uses_Eregs,
00450                         "UNKNOWN",                      Tok_Dir_Unknown,
00451                         "UNROLL",                       Tok_Dir_Unroll,
00452 
00453                         "VFUNCTION",                    Tok_Dir_Vfunction,
00454                         "VSEARCH",                      Tok_Dir_Vsearch,
00455                         "VECTOR",                       Tok_Dir_Vector,
00456 
00457                         "",                             Tok_LAST };
00458 
00459 static  int                     kwd_dir_idx[27];
00460 
00461 /**************************************************************************\
00462 |*                 GENERAL RULE FOR THESE STRING TABLES                   *|
00463 |*                                                                        *|
00464 |*   All strings are grouped by the beginning letter. In this group,      *|
00465 |* they are ordered longest to shortest. That means CONTINUE comes before *|
00466 |* CASE.                                                                  *|
00467 |*                                                                        *|
00468 |*   The idx table is indexed by a zero based alphabet. That is, the      *|
00469 |* index = character - 'A'. If a letter has no corresponding keyword,     *|
00470 |* it has the index of the next letter that has keywords.                 *|
00471 |*                                                                        *|
00472 \**************************************************************************/
00473 
00474 static  int                     *kwd_mic_len;
00475 
00476 static  kwd_type                kwd_mic[] = {
00477                                 "CONTINUE",          Tok_Mic_Continue,
00478                                 "CNCALL",            Tok_Mic_Cncall,
00479                                 "CASE",              Tok_Mic_Case,
00480 
00481                                 "DOPARALLEL",        Tok_Mic_Do_Parallel,
00482                                 "DOALL",             Tok_Mic_Do_All,
00483 
00484                                 "ENDPARALLEL",       Tok_Mic_End_Parallel,
00485                                 "ENDGUARD",          Tok_Mic_End_Guard,
00486                                 "ENDCASE",           Tok_Mic_End_Case,
00487                                 "ENDDO",             Tok_Mic_End_Do,
00488 
00489                                 "GUARD",             Tok_Mic_Guard,
00490 
00491                                 "IF",                Tok_Mic_If,
00492 
00493                                 "MAXCPUS",           Tok_Mic_Maxcpus,
00494 
00495                                 "NUMCPUS",           Tok_Mic_Numcpus,
00496 
00497                                 "PERMUTATION",       Tok_Mic_Permutation,
00498                                 "PARALLEL",          Tok_Mic_Parallel,
00499                                 "POINT",             Tok_Mic_Point,
00500 
00501                                 "SEND",              Tok_Mic_Send,
00502                                 "SPAN",              Tok_Mic_Span,
00503 
00504                                 "TASKCOMMON",        Tok_Mic_Taskcommon,
00505 
00506                                 "WAIT",              Tok_Mic_Wait,
00507 
00508                                 "",                  Tok_LAST };
00509 
00510 static  int                     kwd_mic_idx[27];
00511 
00512 /**************************************************************************\
00513 |*                 GENERAL RULE FOR THESE STRING TABLES                   *|
00514 |*                                                                        *|
00515 |*   All strings are grouped by the beginning letter. In this group,      *|
00516 |* they are ordered longest to shortest. That means CONTINUE comes before *|
00517 |* CASE.                                                                  *|
00518 |*                                                                        *|
00519 |*   The idx table is indexed by a zero based alphabet. That is, the      *|
00520 |* index = character - 'A'. If a letter has no corresponding keyword,     *|
00521 |* it has the index of the next letter that has keywords.                 *|
00522 |*                                                                        *|
00523 \**************************************************************************/
00524 
00525 static  int             *kwd_sgi_dir_len;
00526 
00527 static  kwd_type        kwd_sgi_dir[] = {
00528 
00529         "AGGRESSIVEINNERLOOPFISSION",     Tok_SGI_Dir_Aggressiveinner,
00530         "ARGUMENTALIASING",               Tok_SGI_Dir_Argumentaliasing,
00531         "ALIGN_SYMBOL",                   Tok_SGI_Dir_Align_Symbol,
00532         "AFFINITY",                       Tok_SGI_Dir_Affinity,
00533         "ASSERT",                         Tok_SGI_Dir_Assert,
00534 
00535         "BOUNDSVIOLATIONS",               Tok_SGI_Dir_Boundsviolations,
00536         "BLOCKINGSIZE",                   Tok_SGI_Dir_Blockingsize,
00537         "BLOCKABLE",                      Tok_SGI_Dir_Blockable,
00538         "BARRIER",                        Tok_SGI_Dir_Barrier,
00539         "BLOCKED",                        Tok_SGI_Dir_Blocked,
00540         "BENIGN",                         Tok_SGI_Dir_Benign,
00541         "BLOCK",                          Tok_SGI_Dir_Block,
00542 
00543         "CRITICALSECTION",                Tok_SGI_Dir_Criticalsection,
00544         "CONCURRENTCALL",                 Tok_SGI_Dir_Concurrentcall,
00545         "CONCURRENTIZE",                  Tok_SGI_Dir_Concurrentize,
00546         "CONCURRENT",                     Tok_SGI_Dir_Concurrent,
00547         "CONCUR",                         Tok_SGI_Dir_Concur,
00548         "CYCLIC",                         Tok_SGI_Dir_Cyclic,
00549         "COPYIN",                         Tok_SGI_Dir_Copyin,
00550         "CHUNK",                          Tok_SGI_Dir_Chunk,
00551 
00552         "DISTRIBUTE_RESHAPE",             Tok_SGI_Dir_Distribute_Reshape,
00553         "DISTRIBUTE",                     Tok_SGI_Dir_Distribute,
00554         "DEPENDENCE",                     Tok_SGI_Dir_Dependence,
00555         "DOPREFER",                       Tok_SGI_Dir_Doprefer,
00556         "DOACROSS",                       Tok_SGI_Dir_Doacross,
00557         "DYNAMIC",                        Tok_SGI_Dir_Dynamic,
00558         "DATA",                           Tok_SGI_Dir_Data,
00559         "DO",                             Tok_SGI_Dir_Do,
00560 
00561         "ENDCRITICALSECTION",             Tok_SGI_Dir_Endcriticalsection,
00562         "EQUIVALENCEHAZARD",              Tok_SGI_Dir_Equivalencehazard,
00563         "ENDSINGLEPROCESS",               Tok_SGI_Dir_Endsingleprocess,
00564         "ENDPSECTIONS",                   Tok_SGI_Dir_Endpsections,
00565         "ENDPARALLEL",                    Tok_SGI_Dir_Endparallel,
00566         "ENDPSECTION",                    Tok_SGI_Dir_Endpsection,
00567         "ENDPDO",                         Tok_SGI_Dir_Endpdo,
00568 
00569         "FILL_SYMBOL",                    Tok_SGI_Dir_Fill_Symbol,
00570         "FISSIONABLE",                    Tok_SGI_Dir_Fissionable,
00571         "FREQUENCY",                      Tok_SGI_Dir_Frequency,
00572         "FISSION",                        Tok_SGI_Dir_Fission,
00573         "FUSABLE",                        Tok_SGI_Dir_Fusable,
00574         "FLUSH",                          Tok_SGI_Dir_Flush,
00575         "FUSE",                           Tok_SGI_Dir_Fuse,
00576 
00577         "GUIDED",                         Tok_SGI_Dir_Guided,
00578         "GLOBAL",                         Tok_SGI_Dir_Global,
00579         "GSS",                            Tok_SGI_Dir_Gss,
00580 
00581         "HERE",                           Tok_SGI_Dir_Here,
00582 
00583         "IGNOREASSUMEDDEPENDENCES",       Tok_SGI_Dir_Ignoreassumeddependences,
00584         "IGNOREASSUMEDDEPENDENCE",        Tok_SGI_Dir_Ignoreassumeddependence,
00585         "IGNOREANYDEPENDENCES",           Tok_SGI_Dir_Ignoreanydependences,
00586         "IGNOREANYDEPENDENCE",            Tok_SGI_Dir_Ignoreanydependence,
00587         "INTERLEAVED",                    Tok_SGI_Dir_Interleaved,
00588         "INTERCHANGE",                    Tok_SGI_Dir_Interchange,
00589         "INTERLEAVE",                     Tok_SGI_Dir_Interleave,
00590         "INLINE",                         Tok_SGI_Dir_Inline,
00591         "IPA",                            Tok_SGI_Dir_Ipa,
00592         "IF",                             Tok_SGI_Dir_If,
00593 
00594         "KIND",                           Tok_SGI_Dir_Kind,
00595 
00596         "LASTVALUESNEEDED",               Tok_SGI_Dir_Lastvaluesneeded,
00597         "LASTVALUENEEDED",                Tok_SGI_Dir_Lastvalueneeded,
00598         "L1CACHELINE",                    Tok_SGI_Dir_L1cacheline,
00599         "L2CACHELINE",                    Tok_SGI_Dir_L2cacheline,
00600         "LASTTHREAD",                     Tok_SGI_Dir_Lastthread,
00601         "LASTLOCAL",                      Tok_SGI_Dir_Lastlocal,
00602         "LOCAL",                          Tok_SGI_Dir_Local,
00603         "LIMIT",                          Tok_SGI_Dir_Limit,
00604         "LEVEL",                          Tok_SGI_Dir_Level,
00605 
00606         "MINCONCURRENT",                  Tok_SGI_Dir_Minconcurrent,
00607         "MP_SCHEDTYPE",                   Tok_SGI_Dir_Mp_Schedtype,
00608 
00609         "NOTEMPORARIESFORCONSTANTARGUMEN",
00610                                  Tok_SGI_Dir_Notemporariesforconstantarguments,
00611         "NOEQUIVALENCEHAZARD",            Tok_SGI_Dir_Noequivalencehazard,
00612         "NOBOUNDSVIOLATIONS",             Tok_SGI_Dir_Noboundsviolations,
00613         "NOARGUMENTALIASING",             Tok_SGI_Dir_Noargumentaliasing,
00614         "NOLASTVALUESNEEDED",             Tok_SGI_Dir_Nolastvaluesneeded,
00615         "NOLASTVALUENEEDED",              Tok_SGI_Dir_Nolastvalueneeded,
00616         "NOCONCURRENTCALL",               Tok_SGI_Dir_Noconcurrentcall,
00617         "NOCONCURRENTIZE",                Tok_SGI_Dir_Noconcurrentize,
00618         "NOINTERCHANGE",                  Tok_SGI_Dir_Nointerchange,
00619         "NORECURRENCE",                   Tok_SGI_Dir_Norecurrence,
00620         "NCPUS_CHUNK",                    Tok_SGI_Dir_Ncpus_Chunk,
00621         "NOBLOCKING",                     Tok_SGI_Dir_Noblocking,
00622         "NOFISSION",                      Tok_SGI_Dir_Nofission,
00623         "NUMCHUNKS",                      Tok_SGI_Dir_Numchunks,
00624         "NOFUSION",                       Tok_SGI_Dir_Nofusion,
00625         "NOINLINE",                       Tok_SGI_Dir_Noinline,
00626         "NOSYNC",                         Tok_SGI_Dir_Nosync,
00627         "NOWAIT",                         Tok_SGI_Dir_Nowait,
00628         "NOIPA",                          Tok_SGI_Dir_Noipa,
00629         "NEST",                           Tok_SGI_Dir_Nest,
00630 
00631         "OPTIONAL",                       Tok_SGI_Dir_Optional,
00632         "ORDERED",                        Tok_SGI_Dir_Ordered,
00633         "OPAQUE",                         Tok_SGI_Dir_Opaque,
00634         "ONTO",                           Tok_SGI_Dir_Onto,
00635 
00636         "PREFETCH_REF_DISABLE",           Tok_SGI_Dir_Prefetch_Ref_Disable,
00637         "PURPLEUNCONDITIONAL",            Tok_SGI_Dir_Purpleunconditional,
00638         "PURPLECONDITIONAL",              Tok_SGI_Dir_Purpleconditional,
00639         "PREFETCH_MANUAL",                Tok_SGI_Dir_Prefetch_Manual,
00640         "PREFETCH_REF",                   Tok_SGI_Dir_Prefetch_Ref,
00641         "PERMUTATION",                    Tok_SGI_Dir_Permutation,
00642         "PAGE_PLACE",                     Tok_SGI_Dir_Page_Place,
00643         "PARALLELDO",                     Tok_SGI_Dir_Paralleldo,
00644         "PSECTIONS",                      Tok_SGI_Dir_Psections,
00645         "PARALLEL",                       Tok_SGI_Dir_Parallel,
00646         "PREFETCH",                       Tok_SGI_Dir_Prefetch,
00647         "PSECTION",                       Tok_SGI_Dir_Psection,
00648         "PRIVATE",                        Tok_SGI_Dir_Private,
00649         "PAGE",                           Tok_SGI_Dir_Page,
00650         "PDO",                            Tok_SGI_Dir_Pdo,
00651 
00652         "REDISTRIBUTE",                   Tok_SGI_Dir_Redistribute,
00653         "REGIONBEGIN",                    Tok_SGI_Dir_Regionbegin,
00654         "REDUCTION",                      Tok_SGI_Dir_Reduction,
00655         "REGIONEND",                      Tok_SGI_Dir_Regionend,
00656         "RELATION",                       Tok_SGI_Dir_Relation,
00657         "RUNTIME",                        Tok_SGI_Dir_Runtime,
00658         "ROUTINE",                        Tok_SGI_Dir_Routine,
00659 
00660         "SECTION_NON_GP",                 Tok_SGI_Dir_Section_Non_Gp,
00661         "SINGLEPROCESS",                  Tok_SGI_Dir_Singleprocess,
00662         "SECTION_GP",                     Tok_SGI_Dir_Section_Gp,
00663         "SECTION",                        Tok_SGI_Dir_Section,
00664         "SERIAL",                         Tok_SGI_Dir_Serial,
00665         "SHARED",                         Tok_SGI_Dir_Shared,
00666         "SINGLE",                         Tok_SGI_Dir_Single,
00667         "STATIC",                         Tok_SGI_Dir_Static,
00668         "STRIDE",                         Tok_SGI_Dir_Stride,
00669         "SIMPLE",                         Tok_SGI_Dir_Simple,
00670         "SHARE",                          Tok_SGI_Dir_Share,
00671         "SIZE",                           Tok_SGI_Dir_Size,
00672 
00673         "TEMPORARIESFORCONSTANTARGUMENTS",
00674                                   Tok_SGI_Dir_Temporariesforconstantarguments,
00675         "THREAD",                         Tok_SGI_Dir_Thread,
00676         "TILE",                           Tok_SGI_Dir_Tile,
00677 
00678         "USECONTROLLEDSTORE",             Tok_SGI_Dir_Usecontrolledstore,
00679         "USECOMPRESS",                    Tok_SGI_Dir_Usecompress,
00680         "USESCATTER",                     Tok_SGI_Dir_Usescatter,
00681         "USEEXPAND",                      Tok_SGI_Dir_Useexpand,
00682         "USEGATHER",                      Tok_SGI_Dir_Usegather,
00683         "UNROLL",                         Tok_SGI_Dir_Unroll,
00684 
00685         "VECTOR",                         Tok_SGI_Dir_Vector,
00686 
00687         "",                               Tok_LAST };
00688 
00689 static  int                     kwd_sgi_dir_idx[27];
00690 
00691 /**************************************************************************\
00692 |*                 GENERAL RULE FOR THESE STRING TABLES                   *|
00693 |*                                                                        *|
00694 |*   All strings are grouped by the beginning letter. In this group,      *|
00695 |* they are ordered longest to shortest. That means CONTINUE comes before *|
00696 |* CASE.                                                                  *|
00697 |*                                                                        *|
00698 |*   The idx table is indexed by a zero based alphabet. That is, the      *|
00699 |* index = character - 'A'. If a letter has no corresponding keyword,     *|
00700 |* it has the index of the next letter that has keywords.                 *|
00701 |*                                                                        *|
00702 \**************************************************************************/
00703 
00704 
00705 static  int             *kwd_open_mp_dir_len;
00706 
00707 static  kwd_type        kwd_open_mp_dir[] = {
00708         "AFFINITY",                     Tok_Open_Mp_Dir_Affinity,
00709         "ATOMIC",                       Tok_Open_Mp_Dir_Atomic,
00710 
00711         "BARRIER",                      Tok_Open_Mp_Dir_Barrier,
00712 
00713         "COPYPRIVATE",                  Tok_Open_Mp_Dir_Copyprivate,
00714         "CRITICAL",                     Tok_Open_Mp_Dir_Critical,
00715         "COPYIN",                       Tok_Open_Mp_Dir_Copyin,
00716 
00717         "DISTRIBUTE_RESHAPE",           Tok_Open_Mp_Dir_Distribute_Reshape,
00718         "DISTRIBUTE",                   Tok_Open_Mp_Dir_Distribute,
00719         "DEFAULT",                      Tok_Open_Mp_Dir_Default,
00720         "DYNAMIC",                      Tok_Open_Mp_Dir_Dynamic,
00721         "DATA",                         Tok_Open_Mp_Dir_Data,
00722         "DO",                           Tok_Open_Mp_Dir_Do,
00723 
00724         "ENDPARALLELWORKSHARE",         Tok_Open_Mp_Dir_Endparallelworkshare,
00725         "ENDPARALLELSECTIONS",          Tok_Open_Mp_Dir_Endparallelsections,
00726         "ENDPARALLELDO",                Tok_Open_Mp_Dir_Endparalleldo,
00727         "ENDWORKSHARE",                 Tok_Open_Mp_Dir_Endworkshare,
00728         "ENDCRITICAL",                  Tok_Open_Mp_Dir_Endcritical,
00729         "ENDPARALLEL",                  Tok_Open_Mp_Dir_Endparallel,
00730         "ENDSECTIONS",                  Tok_Open_Mp_Dir_Endsections,
00731         "ENDORDERED",                   Tok_Open_Mp_Dir_Endordered,
00732         "ENDMASTER",                    Tok_Open_Mp_Dir_Endmaster,
00733         "ENDSINGLE",                    Tok_Open_Mp_Dir_Endsingle,
00734         "ENDDO",                        Tok_Open_Mp_Dir_Enddo,
00735 
00736         "FIRSTPRIVATE",                 Tok_Open_Mp_Dir_Firstprivate,
00737         "FLUSH",                        Tok_Open_Mp_Dir_Flush,
00738 
00739         "GUIDED",                       Tok_Open_Mp_Dir_Guided,
00740 
00741         "IF",                           Tok_Open_Mp_Dir_If,
00742 
00743         "LASTPRIVATE",                  Tok_Open_Mp_Dir_Lastprivate,
00744 
00745         "MASTER",                       Tok_Open_Mp_Dir_Master,
00746 
00747         "NOWAIT",                       Tok_Open_Mp_Dir_Nowait,
00748         "NEST",                         Tok_Open_Mp_Dir_Nest,
00749         "NONE",                         Tok_Open_Mp_Dir_None,
00750 
00751         "ORDERED",                      Tok_Open_Mp_Dir_Ordered,
00752         "ONTO",                         Tok_Open_Mp_Dir_Onto,
00753 
00754         "PARALLELWORKSHARE",            Tok_Open_Mp_Dir_Parallelworkshare,
00755         "PARALLELSECTIONS",             Tok_Open_Mp_Dir_Parallelsections,
00756         "PAGE_PLACE",                   Tok_Open_Mp_Dir_Page_Place,
00757         "PARALLELDO",                   Tok_Open_Mp_Dir_Paralleldo,
00758         "PARALLEL",                     Tok_Open_Mp_Dir_Parallel,
00759         "PRIVATE",                      Tok_Open_Mp_Dir_Private,
00760 
00761         "REDISTRIBUTE",                 Tok_Open_Mp_Dir_Redistribute,
00762         "REDUCTION",                    Tok_Open_Mp_Dir_Reduction,
00763         "RUNTIME",                      Tok_Open_Mp_Dir_Runtime,
00764 
00765         "SCHEDULE",                     Tok_Open_Mp_Dir_Schedule,
00766         "SECTIONS",                     Tok_Open_Mp_Dir_Sections,
00767         "SECTION",                      Tok_Open_Mp_Dir_Section,
00768         "SHARED",                       Tok_Open_Mp_Dir_Shared,
00769         "SINGLE",                       Tok_Open_Mp_Dir_Single,
00770         "STATIC",                       Tok_Open_Mp_Dir_Static,
00771 
00772         "THREADPRIVATE",                Tok_Open_Mp_Dir_Threadprivate,
00773         "THREAD",                       Tok_Open_Mp_Dir_Thread,
00774 
00775         "WORKSHARE",                    Tok_Open_Mp_Dir_Workshare,
00776         "",                             Tok_LAST };
00777 
00778 static  int                     kwd_open_mp_dir_idx[27];
00779 
00780 /**************************************************************************\
00781 |*                 GENERAL RULE FOR THESE STRING TABLES                   *|
00782 |*                                                                        *|
00783 |*   All strings are grouped by the beginning letter. In this group,      *|
00784 |* they are ordered longest to shortest. That means CONTINUE comes before *|
00785 |* CASE.                                                                  *|
00786 |*                                                                        *|
00787 |*   The idx table is indexed by a zero based alphabet. That is, the      *|
00788 |* index = character - 'A'. If a letter has no corresponding keyword,     *|
00789 |* it has the index of the next letter that has keywords.                 *|
00790 |*                                                                        *|
00791 \**************************************************************************/
00792 
00793 /* eraxxon: OpenAD directive */
00794 
00795 static  int             *kwd_openad_dir_len;
00796 
00797 static  kwd_type        kwd_openad_dir[] = {
00798         "DEPENDENT",                    Tok_OpenAD_Dir_Dependent,
00799 
00800         "ENDSIMPLE",                    Tok_OpenAD_Dir_EndSimple,
00801 
00802         "INDEPENDENT",                  Tok_OpenAD_Dir_Independent,
00803 
00804         "SIMPLE",                       Tok_OpenAD_Dir_Simple,
00805 
00806         "XXX",                          Tok_OpenAD_Dir_XXX,
00807 
00808         "",                             Tok_LAST };
00809 
00810 static  int                     kwd_openad_dir_idx[27];
00811 
00812 /**************************************************************************/
00813 
00814 # ifdef _DEBUG
00815 static  int                     *kwd_dbg_len;
00816 
00817 static  kwd_type                kwd_dbg[] = {
00818                                 "STMT",              Tok_Dbg_Stmt,
00819                                 "SYTB",              Tok_Dbg_Sytb,
00820                                 "",                  Tok_LAST };
00821 
00822 static  int                     kwd_dbg_idx[27];
00823 # endif
00824 
00825 /*************************************\
00826 |* objects referenced by this module *|
00827 \*************************************/
00828 extern boolean  sig_blank;
00829 extern la_type  stmt_EOS_la_ch;
00830 
00831 extern int      nxt_line[];
00832 
00833 # ifdef _ARITH_H
00834 extern long input_arith_type[Num_Linear_Types];
00835 extern char arith_type_string[Num_Linear_Types][25];
00836 # endif
00837 
00838 extern ch_class_type           ch_class[];
00839 
00840 
00841 static boolean  havent_issued_ndollarpes_ansi;

Generated on Thu Dec 18 05:52:03 2008 for Open64 (mfef90, whirl2f, and IR tools) by  doxygen 1.5.7.1