Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
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/tokens.h 5.3 08/30/99 11:18:28\n" */ 00038 00039 00040 /*******************************************************\ 00041 |* type specifiers used within lex and parser modules. *| 00042 \*******************************************************/ 00043 00044 enum ch_class_values {Ch_Class_Letter, 00045 Ch_Class_Digit, 00046 Ch_Class_Symbol, 00047 Ch_Class_Dir1, /* CDIR$ or CMIC$ */ 00048 Ch_Class_Dir2, /* CDIR$ or CMIC$ */ 00049 Ch_Class_Dir3, /* CDIR$ or CMIC$ */ 00050 Ch_Class_Dir4, /* CDIR$ or CMIC$ */ 00051 /* eraxxon: OpenAD */ 00052 Ch_Class_Dir7, /* C$OPENAD */ 00053 Ch_Class_EOS, /* End-Of-Stmt */ 00054 Ch_Class_EOF }; /* End-Of-File */ 00055 00056 /* The tokens implied by the following token_class_values are: */ 00057 /* Tok_Class_Label ==> Tok_Label */ 00058 /* Tok_Class_Id ==> Tok_Id */ 00059 /* Tok_Class_Keyword ==> Tok_Kwd_* | Tok_Id */ 00060 /* Tok_Class_Construct_Def ==> Tok_Id */ 00061 /* Tok_Class_DO ==> Tok_Kwd_Do */ 00062 /* Tok_Class_Dir_Kwd ==> Tok_Dir_* */ 00063 /* Tok_Class_Mic_Kwd ==> Tok_Mic_* */ 00064 /* Tok_Class_SGI_Dir_Kwd ==> Tok_SGI_Dir_* !$par !$ and !*$* dirs */ 00065 /* Tok_Class_Open_Mp_Dir_Kwd==> Tok_Open_Mp_* !$omp */ 00066 /* Tok_Class_OpenAD_Dir_Kwd==> Tok_OpenAD_* !$OpenAD */ 00067 /* Tok_Class_Mic_Kwd ==> Tok_Dbg_* DEBUG ONLY */ 00068 /* Tok_Class_Punct ==> Tok_Punc_* | Tok_Eos */ 00069 /* Tok_Class_Int_Spec ==> Tok_Const_Int */ 00070 /* Tok_Class_Format_Str ==> tok str is chars between ( and matching ) */ 00071 /* Tok_Class_Program_Str ==> tok str is chars between ( and matching ) */ 00072 /* Tok_Class_Op ==> Tok_Op_* */ 00073 /* Tok_Class_Opnd ==> Tok_Id | Tok_Const_* | Tok_Op_Defined */ 00074 00075 enum token_class_values {Tok_Class_Label, 00076 Tok_Class_Id, 00077 Tok_Class_Keyword, 00078 Tok_Class_Construct_Def, 00079 Tok_Class_DO, 00080 Tok_Class_Dir_Kwd, 00081 Tok_Class_Mic_Kwd, 00082 Tok_Class_SGI_Dir_Kwd, 00083 Tok_Class_Open_Mp_Dir_Kwd, 00084 Tok_Class_OpenAD_Dir_Kwd, /* eraxxon: OpenAD */ 00085 Tok_Class_Dbg_Kwd, 00086 Tok_Class_Punct, 00087 Tok_Class_Int_Spec, 00088 Tok_Class_Format_Str, 00089 Tok_Class_Program_Str, 00090 Tok_Class_Op, 00091 Tok_Class_Opnd }; 00092 00093 /* The following data objects are order/addition/deletion dependent on the */ 00094 /* token_values enumeration (any changes to this definition must also be */ 00095 /* reflected in these objects): */ 00096 /* token_to_stmt_type array in p_driver.h */ 00097 00098 enum token_values { 00099 Tok_Label, /* label */ 00100 Tok_Id, /* identifier, */ 00101 /* construct-name, */ 00102 /* kind-param-name */ 00103 Tok_Kwd_Allocatable, /* ALLOCATABLE */ 00104 Tok_Kwd_Allocate, /* ALLOCATE */ 00105 Tok_Kwd_Assign, /* ASSIGN */ 00106 Tok_Kwd_Assignment, /* ASSIGNMENT */ 00107 Tok_Kwd_Automatic, /* AUTOMATIC */ 00108 Tok_Kwd_Backspace, /* BACKSPACE */ 00109 Tok_Kwd_Block, /* BLOCK BLOCKDATA, ENDBLOCKDATA */ 00110 Tok_Kwd_Buffer, /* BUFFER BUFFERIN, BUFFEROUT */ 00111 Tok_Kwd_Byte, /* BYTE */ 00112 Tok_Kwd_Call, /* CALL */ 00113 Tok_Kwd_Case, /* CASE SELECTCASE */ 00114 Tok_Kwd_Character, /* CHARACTER */ 00115 Tok_Kwd_Close, /* CLOSE */ 00116 Tok_Kwd_Common, /* COMMON */ 00117 Tok_Kwd_Complex, /* COMPLEX */ 00118 Tok_Kwd_Contains, /* CONTAINS */ 00119 Tok_Kwd_Continue, /* CONTINUE */ 00120 Tok_Kwd_Cycle, /* CYCLE */ 00121 Tok_Kwd_Data, /* DATA BLOCKDATA, ENDBLOCKDATA */ 00122 Tok_Kwd_Deallocate, /* DEALLOCATE */ 00123 Tok_Kwd_Decode, /* DECODE */ 00124 Tok_Kwd_Default, /* DEFAULT CASE DEFAULT */ 00125 Tok_Kwd_Dimension, /* DIMENSION */ 00126 Tok_Kwd_Dir, /* DIR$ CDIR$, CDIR@, */ 00127 /* !DIR$, !DIR@ */ 00128 /* MIC$ CMIC$, !MIC$ */ 00129 Tok_Kwd_Do, /* DO ENDDO */ 00130 Tok_Kwd_Double, /* DOUBLE DOUBLEPRECISION, */ 00131 Tok_Kwd_Elemental, /* ELEMENTAL */ 00132 Tok_Kwd_Else, /* ELSE ELSEIF, ELSEWHERE */ 00133 Tok_Kwd_Encode, /* ENCODE */ 00134 Tok_Kwd_End, /* END ENDBLOCKDATA, ENDDO, */ 00135 /* ENDFILE, ENDFUNCTION, */ 00136 /* ENDIF, ENDINTERFACE, */ 00137 /* ENDMODULE, ENDPROGRAM, */ 00138 /* ENDSELECT, ENDSUBROUTINE,*/ 00139 /* ENDTYPE, ENDWHERE */ 00140 Tok_Kwd_Entry, /* ENTRY */ 00141 Tok_Kwd_Equivalence, /* EQUIVALENCE */ 00142 Tok_Kwd_Exit, /* EXIT */ 00143 Tok_Kwd_External, /* EXTERNAL */ 00144 Tok_Kwd_File, /* FILE ENDFILE */ 00145 Tok_Kwd_Forall, /* FORALL */ 00146 Tok_Kwd_Format, /* FORMAT */ 00147 Tok_Kwd_Function, /* FUNCTION ENDFUNCTION */ 00148 Tok_Kwd_Go, /* GO GOTO */ 00149 Tok_Kwd_If, /* IF ELSEIF, ENDIF */ 00150 Tok_Kwd_Implicit, /* IMPLICIT */ 00151 Tok_Kwd_In, /* IN BUFFERIN, INOUT */ 00152 Tok_Kwd_Inquire, /* INQUIRE */ 00153 Tok_Kwd_Integer, /* INTEGER */ 00154 Tok_Kwd_Intent, /* INTENT */ 00155 Tok_Kwd_Interface, /* INTERFACE ENDINTERFACE */ 00156 Tok_Kwd_Intrinsic, /* INTRINSIC */ 00157 Tok_Kwd_Kind, /* KIND */ 00158 Tok_Kwd_Len, /* LEN */ 00159 Tok_Kwd_Logical, /* LOGICAL */ 00160 Tok_Kwd_Module, /* MODULE ENDMODULE, */ 00161 /* MODULEPROCEDURE */ 00162 Tok_Kwd_Namelist, /* NAMELIST */ 00163 Tok_Kwd_None, /* NONE */ 00164 Tok_Kwd_Nullify, /* NULLIFY */ 00165 Tok_Kwd_Only, /* ONLY */ 00166 Tok_Kwd_Open, /* OPEN */ 00167 Tok_Kwd_Operator, /* OPERATOR */ 00168 Tok_Kwd_Optional, /* OPTIONAL */ 00169 Tok_Kwd_Out, /* OUT BUFFEROUT, INOUT */ 00170 Tok_Kwd_Parameter, /* PARAMETER */ 00171 Tok_Kwd_Pause, /* PAUSE */ 00172 Tok_Kwd_Pointer, /* POINTER */ 00173 Tok_Kwd_Precision, /* PRECISION DOUBLEPRECISION */ 00174 Tok_Kwd_Print, /* PRINT */ 00175 Tok_Kwd_Private, /* PRIVATE */ 00176 Tok_Kwd_Procedure, /* PROCEDURE MODULEPROCEDURE */ 00177 Tok_Kwd_Program, /* PROGRAM ENDPROGRAM */ 00178 Tok_Kwd_Public, /* PUBLIC */ 00179 Tok_Kwd_Pure, /* PURE */ 00180 Tok_Kwd_Read, /* READ */ 00181 Tok_Kwd_Real, /* REAL */ 00182 Tok_Kwd_Recursive, /* RECURSIVE */ 00183 Tok_Kwd_Result, /* RESULT */ 00184 Tok_Kwd_Return, /* RETURN */ 00185 Tok_Kwd_Rewind, /* REWIND */ 00186 Tok_Kwd_Save, /* SAVE */ 00187 Tok_Kwd_Select, /* SELECT ENDSELECT, SELECTCASE */ 00188 Tok_Kwd_Sequence, /* SEQUENCE */ 00189 Tok_Kwd_Span, /* SPAN */ 00190 Tok_Kwd_Stat, /* STAT */ 00191 Tok_Kwd_Static, /* STATIC */ 00192 Tok_Kwd_Stop, /* STOP */ 00193 Tok_Kwd_Subroutine, /* SUBROUTINE ENDSUBROUTINE */ 00194 Tok_Kwd_Target, /* TARGET */ 00195 Tok_Kwd_Task, /* TASK */ 00196 Tok_Kwd_Then, /* THEN */ 00197 Tok_Kwd_To, /* TO GOTO */ 00198 Tok_Kwd_Type, /* TYPE ENDTYPE */ 00199 Tok_Kwd_Use, /* USE */ 00200 Tok_Kwd_Undefined, /* UNDEFINED */ 00201 Tok_Kwd_Volatile, /* VOLATILE */ 00202 Tok_Kwd_Where, /* WHERE ELSEWHERE, ENDWHERE */ 00203 Tok_Kwd_While, /* WHILE */ 00204 Tok_Kwd_Write, /* WRITE */ 00205 00206 /* FMZ add for co-array fortran Feb 15,2006 */ 00207 Tok_Kwd_CoSubroutine, /* CoSubroutine */ 00208 Tok_Kwd_CoFunction, /* CoFunction */ 00209 00210 /* NOTE -> If a new Tok_Dir is added, directive_str in */ 00211 /* main.h needs to be updated. */ 00212 00213 /* NOTE again -> also tied to cdir_info in p_directiv.h */ 00214 00215 Tok_Dir_Start, /* Need to mark start of directives. */ 00216 Tok_Dir_Align, /* ALIGN */ 00217 Tok_Dir_Atomicupdate, /* ATOMIC UPDATE */ 00218 Tok_Dir_Autoscope, /* AUTOSCOPE */ 00219 Tok_Dir_Auxiliary, /* AUXILIARY */ 00220 Tok_Dir_Barrier, /* BARRIER */ 00221 Tok_Dir_Bl, /* BL */ 00222 Tok_Dir_Block, /* BLOCK */ 00223 Tok_Dir_Blockable, /* BLOCKABLE */ 00224 Tok_Dir_Blockingsize, /* BLOCKINGSIZE */ 00225 Tok_Dir_Bounds, /* BOUNDS */ 00226 Tok_Dir_Cache_Align, /* CACHE_ALIGN */ 00227 Tok_Dir_Cache_Bypass, /* CACHE_BYPASS */ 00228 Tok_Dir_Cache_Noalloc, /* CACHE_NOALLOCATE */ 00229 Tok_Dir_Chunksize, /* CHUNKSIZE */ 00230 Tok_Dir_Cncall, /* CNCALL */ 00231 Tok_Dir_Code, /* CODE */ 00232 Tok_Dir_Common, /* COMMON */ 00233 Tok_Dir_Concurrent, /* CONCURRENT */ 00234 Tok_Dir_Control, /* CONTROL */ 00235 Tok_Dir_Copy_Assumed_Shape, /* COPY_ASSUMED_SHAPE */ 00236 Tok_Dir_Critical, /* CRITICAL */ 00237 Tok_Dir_Doshared, /* DOSHARED */ 00238 Tok_Dir_Dynamic, /* DYNAMIC */ 00239 Tok_Dir_Eject, /* EJECT */ 00240 Tok_Dir_Endcritical, /* END CRITICAL */ 00241 Tok_Dir_Endmaster, /* END MASTER */ 00242 Tok_Dir_Fixed, /* FIXED */ 00243 Tok_Dir_Flow, /* FLOW */ 00244 Tok_Dir_Free, /* FREE */ 00245 Tok_Dir_Geometry, /* GEOMETRY */ 00246 Tok_Dir_Getfirst, /* GETFIRST */ 00247 Tok_Dir_Guided, /* GUIDED */ 00248 Tok_Dir_Id, /* ID */ 00249 Tok_Dir_If, /* IF */ 00250 Tok_Dir_Ignore_TKR, /* IGNORE_TKR */ 00251 Tok_Dir_Inline, /* INLINE */ 00252 Tok_Dir_Inline_Always, /* INLINE ALWAYS */ 00253 Tok_Dir_Inline_Never, /* INLINE NEVER */ 00254 Tok_Dir_Integer, /* INTEGER */ 00255 Tok_Dir_Interchange, /* INTERCHANGE */ 00256 Tok_Dir_Ivdep, /* IVDEP */ 00257 Tok_Dir_List, /* LIST */ 00258 Tok_Dir_Mark, /* MARK */ 00259 Tok_Dir_Master, /* MASTER */ 00260 Tok_Dir_Maxcpus, /* MAXCPUS */ 00261 Tok_Dir_Modinline, /* MODINLINE */ 00262 Tok_Dir_Name, /* NAME */ 00263 Tok_Dir_Ncpus_Chunks, /* NCPUS_CHUNKS */ 00264 Tok_Dir_Nextscalar, /* NEXTSCALAR */ 00265 Tok_Dir_Nobarrier, /* NO BARRIER */ 00266 Tok_Dir_Nobl, /* NOBL */ 00267 Tok_Dir_Noblocking, /* NOBLOCKING */ 00268 Tok_Dir_Nobounds, /* NOBOUNDS */ 00269 Tok_Dir_Nocinv, /* NOCINV */ 00270 Tok_Dir_Nocode, /* NOCODE */ 00271 Tok_Dir_Noflow, /* NOFLOW */ 00272 Tok_Dir_Noinline, /* NOINLINE */ 00273 Tok_Dir_Nointerchange, /* NOINTERCHANGE */ 00274 Tok_Dir_Nolist, /* NOLIST */ 00275 Tok_Dir_Nomark, /* NOMARK */ 00276 Tok_Dir_Nomodinline, /* NOMODINLINE */ 00277 Tok_Dir_Nopattern, /* NOPATTERN */ 00278 Tok_Dir_Norecurrence, /* NORECURRENCE */ 00279 Tok_Dir_Nosideeffects, /* NOSIDEEFFECTS */ 00280 Tok_Dir_Nosplit, /* NOSPLIT (T3E only) */ 00281 Tok_Dir_Nostream, /* NOSTREAM */ 00282 Tok_Dir_Notask, /* NOTASK */ 00283 Tok_Dir_Nounroll, /* NOUNROLL */ 00284 Tok_Dir_Novector, /* NOVECTOR */ 00285 Tok_Dir_Novsearch, /* NOVSEARCH */ 00286 Tok_Dir_Numchunks, /* NUMCHUNKS */ 00287 Tok_Dir_Numcpus, /* NUMCPUS */ 00288 Tok_Dir_Parallel_Only, /* PARALLEL_ONLY */ 00289 Tok_Dir_Pattern, /* PATTERN */ 00290 Tok_Dir_Pe_Private, /* PE_PRIVATE */ 00291 Tok_Dir_Pe_Resident, /* PE_RESIDENT */ 00292 Tok_Dir_Permutation, /* PERMUTATION */ 00293 Tok_Dir_Preferstream, /* PREFERSTREAM */ 00294 Tok_Dir_Prefertask, /* PREFERTASK */ 00295 Tok_Dir_Prefervector, /* PREFERVECTOR */ 00296 Tok_Dir_Private, /* PRIVATE */ 00297 Tok_Dir_Recurrence, /* RECURRENCE */ 00298 Tok_Dir_Regfile, /* REGFILE */ 00299 Tok_Dir_Savelast, /* SAVELAST */ 00300 Tok_Dir_Semextern, /* SEMEXTERN */ 00301 Tok_Dir_Serial_Only, /* SERIAL_ONLY */ 00302 Tok_Dir_Shared, /* SHARED */ 00303 Tok_Dir_Shortloop, /* SHORTLOOP */ 00304 Tok_Dir_Shortsequence, /* SHORTSEQUENCE */ 00305 Tok_Dir_Single, /* SINGLE */ 00306 Tok_Dir_Split, /* SPLIT (T3E only) */ 00307 Tok_Dir_Stack, /* STACK */ 00308 Tok_Dir_Static, /* STATIC */ 00309 Tok_Dir_Stream, /* STREAM */ 00310 Tok_Dir_Suppress, /* SUPPRESS */ 00311 Tok_Dir_Symmetric, /* SYMMETRIC */ 00312 Tok_Dir_System_Module, /* SYSTEM_MODULE */ 00313 Tok_Dir_Task, /* TASK */ 00314 Tok_Dir_Taskcommon, /* TASKCOMMON */ 00315 Tok_Dir_Taskhead, /* TASKHEAD */ 00316 Tok_Dir_Unknown, /* UNKNOWN */ 00317 Tok_Dir_Unknown_Shared, /* UNKNOWN_SHARED */ 00318 Tok_Dir_Unroll, /* UNROLL */ 00319 Tok_Dir_Uses_Eregs, /* USES EREGS */ 00320 Tok_Dir_Vector, /* VECTOR */ 00321 Tok_Dir_Vfunction, /* VFUNCTION */ 00322 Tok_Dir_Vsearch, /* VSEARCH */ 00323 Tok_Dir_End, /* Need to mark end of directives. */ 00324 00325 Tok_Mic_Start, /* Need to mark start of cmics. */ 00326 Tok_Mic_Case, /* CASE */ 00327 Tok_Mic_End_Case, /* END CASE */ 00328 Tok_Mic_Cncall, /* CNCALL */ 00329 Tok_Mic_Continue, /* CONTINUE */ 00330 Tok_Mic_Do_All, /* DO ALL */ 00331 Tok_Mic_Do_Parallel, /* DO PARALLEL */ 00332 Tok_Mic_End_Do, /* END DO */ 00333 Tok_Mic_Guard, /* GUARD */ 00334 Tok_Mic_End_Guard, /* END GUARD */ 00335 Tok_Mic_If, /* IF */ 00336 Tok_Mic_Maxcpus, /* MAXCPUS */ 00337 Tok_Mic_Numcpus, /* NUMCPUS */ 00338 Tok_Mic_Parallel, /* PARALLEL */ 00339 Tok_Mic_End_Parallel, /* END PARALLEL */ 00340 Tok_Mic_Permutation, /* PERMUTATION */ 00341 Tok_Mic_Point, /* POINT */ 00342 Tok_Mic_Send, /* SEND */ 00343 Tok_Mic_Span, /* SPAN */ 00344 Tok_Mic_Taskcommon, /* TASKCOMMON */ 00345 Tok_Mic_Wait, /* WAIT */ 00346 Tok_Mic_End, /* Need to mark end of cmics. */ 00347 00348 Tok_SGI_Dir_Start, /* Start of SGI directives */ 00349 Tok_SGI_Dir_Affinity, /* AFFINITY */ 00350 Tok_SGI_Dir_Aggressiveinner, /* AGGRESSIVEINNERLOOPFUSION */ 00351 Tok_SGI_Dir_Align_Symbol, /* ALIGN SYMBOL */ 00352 Tok_SGI_Dir_Argumentaliasing, /* ARGUMENT ALIASING */ 00353 00354 Tok_SGI_Dir_Assert, /* ASSERT */ 00355 Tok_SGI_Dir_Barrier, /* BARRIER */ 00356 Tok_SGI_Dir_Benign, /* BENIGN */ 00357 Tok_SGI_Dir_Block, /* BLOCK */ 00358 Tok_SGI_Dir_Blockable, /* BLOCKABLE */ 00359 Tok_SGI_Dir_Blocked, /* BLOCKED */ 00360 Tok_SGI_Dir_Blockingsize, /* BLOCKING SIZE */ 00361 Tok_SGI_Dir_Boundsviolations, /* BOUNDS VIOLATIONS */ 00362 Tok_SGI_Dir_Chunk, /* CHUNK */ 00363 Tok_SGI_Dir_Concur, /* CONCUR */ 00364 Tok_SGI_Dir_Concurrent, /* CONCURRENT */ 00365 Tok_SGI_Dir_Concurrentcall, /* CONCURRENT CALL */ 00366 Tok_SGI_Dir_Concurrentize, /* CONCURRENTIZE */ 00367 Tok_SGI_Dir_Copyin, /* COPYIN */ 00368 Tok_SGI_Dir_Criticalsection, /* CRITICAL SECTION */ 00369 Tok_SGI_Dir_Cyclic, /* CYCLIC */ 00370 Tok_SGI_Dir_Data, /* DATA */ 00371 Tok_SGI_Dir_Dependence, /* DEPENDENCE */ 00372 Tok_SGI_Dir_Distribute, /* DISTRIBUTE */ 00373 Tok_SGI_Dir_Distribute_Reshape, /* DISTRIBUTE_RESHAPE */ 00374 Tok_SGI_Dir_Do, /* DO */ 00375 Tok_SGI_Dir_Doacross, /* DO ACROSS */ 00376 Tok_SGI_Dir_Doprefer, /* DO PREFER */ 00377 Tok_SGI_Dir_Dynamic, /* DYNAMIC */ 00378 Tok_SGI_Dir_Endcriticalsection, /* END CRITICAL SECTION */ 00379 Tok_SGI_Dir_Endparallel, /* END PARALLEL */ 00380 Tok_SGI_Dir_Endpdo, /* END PDO */ 00381 Tok_SGI_Dir_Endpsection, /* END PSECTION */ 00382 Tok_SGI_Dir_Endpsections, /* END PSECTIONS */ 00383 Tok_SGI_Dir_Endsingleprocess, /* END SINGLE PROCESS */ 00384 Tok_SGI_Dir_Equivalencehazard, /* EQUIVALENCE HAZARD */ 00385 Tok_SGI_Dir_Fill_Symbol, /* FILL SYMBOL */ 00386 Tok_SGI_Dir_Fission, /* FISSION */ 00387 Tok_SGI_Dir_Fissionable, /* FISSIONABLE */ 00388 Tok_SGI_Dir_Flush, /* FLUSH */ 00389 Tok_SGI_Dir_Frequency, /* FREQUENCY */ 00390 Tok_SGI_Dir_Fusable, /* FUSABLE */ 00391 Tok_SGI_Dir_Fuse, /* FUSE */ 00392 Tok_SGI_Dir_Global, /* GLOBAL */ 00393 Tok_SGI_Dir_Gss, /* GSS */ 00394 Tok_SGI_Dir_Guided, /* GUIDED */ 00395 Tok_SGI_Dir_Here, /* HERE */ 00396 Tok_SGI_Dir_If, /* IF */ 00397 Tok_SGI_Dir_Ignoreanydependence,/* IGNORE ANY DEPENDENCE */ 00398 Tok_SGI_Dir_Ignoreanydependences,/* IGNORE ANY DEPENDENCES */ 00399 Tok_SGI_Dir_Ignoreassumeddependence, 00400 /* IGNORE ASSUMED DEPENDENCE */ 00401 Tok_SGI_Dir_Ignoreassumeddependences, 00402 /* IGNORE ASSUMED DEPENDENCES */ 00403 Tok_SGI_Dir_Inline, /* INLINE */ 00404 Tok_SGI_Dir_Interchange, /* INTERCHANGE */ 00405 Tok_SGI_Dir_Interleave, /* INTERLEAVE */ 00406 Tok_SGI_Dir_Interleaved, /* INTERLEAVED */ 00407 Tok_SGI_Dir_Ipa, /* IPA */ 00408 Tok_SGI_Dir_Kind, /* KIND */ 00409 Tok_SGI_Dir_Lastlocal, /* LASTLOCAL */ 00410 Tok_SGI_Dir_Lastthread, /* LAST THREAD */ 00411 Tok_SGI_Dir_Lastvalueneeded, /* LAST VALUE NEEDED */ 00412 Tok_SGI_Dir_Lastvaluesneeded, /* LAST VALUES NEEDED */ 00413 Tok_SGI_Dir_Level, /* LEVEL */ 00414 Tok_SGI_Dir_Limit, /* LIMIT */ 00415 Tok_SGI_Dir_Local, /* LOCAL */ 00416 Tok_SGI_Dir_L1cacheline, /* L1CACHELINE */ 00417 Tok_SGI_Dir_L2cacheline, /* L2CACHELINE */ 00418 Tok_SGI_Dir_Minconcurrent, /* MINCONCURRENT */ 00419 Tok_SGI_Dir_Mp_Schedtype, /* MP_SCHEDTYPE */ 00420 Tok_SGI_Dir_Ncpus_Chunk, /* NCPUS_CHUNK */ 00421 Tok_SGI_Dir_Nest, /* NEST */ 00422 Tok_SGI_Dir_Noargumentaliasing, /* NOARGUMENTALIASING */ 00423 Tok_SGI_Dir_Noblocking, /* NO BLOCKING */ 00424 Tok_SGI_Dir_Noboundsviolations, /* NO BOUNDS VIOLATIONS */ 00425 Tok_SGI_Dir_Noconcurrentcall, /* NO CONCURRENT CALL */ 00426 Tok_SGI_Dir_Noconcurrentize, /* NO CONCURRENTIZE */ 00427 Tok_SGI_Dir_Noequivalencehazard,/* NO EQUIVALENCE HAZARD */ 00428 Tok_SGI_Dir_Nofission, /* NO FISSION */ 00429 Tok_SGI_Dir_Nofusion, /* NO FUSION */ 00430 Tok_SGI_Dir_Noinline, /* NO INLINE */ 00431 Tok_SGI_Dir_Nointerchange, /* NO INTERCHANGE */ 00432 Tok_SGI_Dir_Noipa, /* NO IPA */ 00433 Tok_SGI_Dir_Nolastvalueneeded, /* NO LASTVALUE NEEDED */ 00434 Tok_SGI_Dir_Nolastvaluesneeded, /* NO LASTVALUES NEEDED */ 00435 Tok_SGI_Dir_Norecurrence, /* NO RECURRENCE */ 00436 Tok_SGI_Dir_Nosync, /* NO SYNC */ 00437 Tok_SGI_Dir_Notemporariesforconstantarguments, 00438 /* NO TEMPORARIES FOR CONSTANT ARGUMENTS */ 00439 Tok_SGI_Dir_Nowait, /* NOWAIT */ 00440 Tok_SGI_Dir_Numchunks, /* NUMCHUNKS */ 00441 Tok_SGI_Dir_Onto, /* ONTO */ 00442 Tok_SGI_Dir_Opaque, /* OPAQUE */ 00443 Tok_SGI_Dir_Optional, /* OPTIONAL */ 00444 Tok_SGI_Dir_Ordered, /* ORDERED */ 00445 Tok_SGI_Dir_Page, /* PAGE */ 00446 Tok_SGI_Dir_Page_Place, /* PAGE_PLACE */ 00447 Tok_SGI_Dir_Parallel, /* PARALLEL */ 00448 Tok_SGI_Dir_Paralleldo, /* PARALLEL DO */ 00449 Tok_SGI_Dir_Pdo, /* PDO */ 00450 Tok_SGI_Dir_Permutation, /* PERMUTATION */ 00451 Tok_SGI_Dir_Prefetch, /* PREFETCH */ 00452 Tok_SGI_Dir_Prefetch_Manual, /* PREFETCH_MANUAL */ 00453 Tok_SGI_Dir_Prefetch_Ref, /* PREFETCH_REF */ 00454 Tok_SGI_Dir_Prefetch_Ref_Disable,/* PREFETCH_REF_DISABLE */ 00455 Tok_SGI_Dir_Private, /* PRIVATE */ 00456 Tok_SGI_Dir_Psection, /* PSECTION */ 00457 Tok_SGI_Dir_Psections, /* PSECTIONS */ 00458 Tok_SGI_Dir_Purpleconditional, /* PURPLECONDITIONAL */ 00459 Tok_SGI_Dir_Purpleunconditional,/* PURPLEUNCONDITIONAL */ 00460 Tok_SGI_Dir_Redistribute, /* REDISTRIBUTE */ 00461 Tok_SGI_Dir_Reduction, /* REDUCTION */ 00462 Tok_SGI_Dir_Regionbegin, /* REGIONBEGIN */ 00463 Tok_SGI_Dir_Regionend, /* REGIONEND */ 00464 Tok_SGI_Dir_Relation, /* RELATION */ 00465 Tok_SGI_Dir_Routine, /* ROUTINE */ 00466 Tok_SGI_Dir_Runtime, /* RUNTIME */ 00467 Tok_SGI_Dir_Section, /* SECTION */ 00468 Tok_SGI_Dir_Section_Gp, /* SECTION_GP */ 00469 Tok_SGI_Dir_Section_Non_Gp, /* SECTION_NON_GP */ 00470 Tok_SGI_Dir_Serial, /* SERIAL */ 00471 Tok_SGI_Dir_Share, /* SHARE */ 00472 Tok_SGI_Dir_Shared, /* SHARED */ 00473 Tok_SGI_Dir_Simple, /* SIMPLE */ 00474 Tok_SGI_Dir_Single, /* SINGLE */ 00475 Tok_SGI_Dir_Singleprocess, /* SINGLE PROCESS */ 00476 Tok_SGI_Dir_Size, /* SIZE */ 00477 Tok_SGI_Dir_Static, /* STATIC */ 00478 Tok_SGI_Dir_Stride, /* STRIDE */ 00479 Tok_SGI_Dir_Unroll, /* UNROLL */ 00480 Tok_SGI_Dir_Usecompress, /* USE COMPRESS */ 00481 Tok_SGI_Dir_Usecontrolledstore, /* USE CONTROLLED STORE */ 00482 Tok_SGI_Dir_Useexpand, /* USE EXPAND */ 00483 Tok_SGI_Dir_Usegather, /* USE GATHER */ 00484 Tok_SGI_Dir_Usescatter, /* USE SCATTER */ 00485 Tok_SGI_Dir_Temporariesforconstantarguments, 00486 /* TEMPORARIES FOR CONSTANT ARGUMENTS */ 00487 Tok_SGI_Dir_Thread, /* THREAD */ 00488 Tok_SGI_Dir_Tile, /* TILE */ 00489 Tok_SGI_Dir_Vector, /* VECTOR */ 00490 Tok_SGI_Dir_End, /* End of SGI directives */ 00491 00492 00493 Tok_Open_Mp_Dir_Start, /* Start of open mp directives*/ 00494 Tok_Open_Mp_Dir_Affinity, /* AFFINITY */ 00495 Tok_Open_Mp_Dir_Atomic, /* ATOMIC */ 00496 Tok_Open_Mp_Dir_Barrier, /* BARRIER */ 00497 Tok_Open_Mp_Dir_Copyin, /* COPYIN */ 00498 Tok_Open_Mp_Dir_Copyprivate, /* COPYPRIVATE */ 00499 Tok_Open_Mp_Dir_Critical, /* CRITICAL */ 00500 Tok_Open_Mp_Dir_Data, /* DATA */ 00501 Tok_Open_Mp_Dir_Default, /* DEFAULT */ 00502 Tok_Open_Mp_Dir_Distribute, /* DISTRIBUTE */ 00503 Tok_Open_Mp_Dir_Distribute_Reshape, /* DISTRIBUTE_RESHAPE */ 00504 Tok_Open_Mp_Dir_Do, /* DO */ 00505 Tok_Open_Mp_Dir_Dynamic, /* DYNAMIC */ 00506 Tok_Open_Mp_Dir_Endcritical, /* END CRITICAL */ 00507 Tok_Open_Mp_Dir_Enddo, /* END DO */ 00508 Tok_Open_Mp_Dir_Endparallel, /* END PARALLEL */ 00509 Tok_Open_Mp_Dir_Endparalleldo, /* END PARALLEL DO */ 00510 Tok_Open_Mp_Dir_Endparallelsections, /* END PARALLEL SECTIONS */ 00511 Tok_Open_Mp_Dir_Endparallelworkshare,/* END PARALLEL WORKSHARE*/ 00512 Tok_Open_Mp_Dir_Endmaster, /* END MASTER */ 00513 Tok_Open_Mp_Dir_Endordered, /* END ORDERED */ 00514 Tok_Open_Mp_Dir_Endsections, /* END SECTIONS */ 00515 Tok_Open_Mp_Dir_Endsingle, /* END SINGLE */ 00516 Tok_Open_Mp_Dir_Endworkshare, /* END WORKSHARE */ 00517 Tok_Open_Mp_Dir_Firstprivate, /* FIRSTPRIVATE */ 00518 Tok_Open_Mp_Dir_Flush, /* FLUSH */ 00519 Tok_Open_Mp_Dir_Guided, /* GUIDED */ 00520 Tok_Open_Mp_Dir_If, /* IF */ 00521 Tok_Open_Mp_Dir_Lastprivate, /* LASTPRIVATE */ 00522 Tok_Open_Mp_Dir_Master, /* MASTER */ 00523 Tok_Open_Mp_Dir_Nest, /* NEST */ 00524 Tok_Open_Mp_Dir_None, /* NONE */ 00525 Tok_Open_Mp_Dir_Nowait, /* NOWAIT */ 00526 Tok_Open_Mp_Dir_Onto, /* ONTO */ 00527 Tok_Open_Mp_Dir_Ordered, /* ORDERED */ 00528 Tok_Open_Mp_Dir_Page_Place, /* PAGE PLACE */ 00529 Tok_Open_Mp_Dir_Parallel, /* PARALLEL */ 00530 Tok_Open_Mp_Dir_Paralleldo, /* PARALLEL DO */ 00531 Tok_Open_Mp_Dir_Parallelsections, 00532 /* PARALLEL SECTIONS */ 00533 Tok_Open_Mp_Dir_Parallelworkshare, 00534 /* PARALLEL WORKSHARE */ 00535 Tok_Open_Mp_Dir_Private, /* PRIVATE */ 00536 Tok_Open_Mp_Dir_Redistribute, /* REDISTRIBUTE */ 00537 Tok_Open_Mp_Dir_Reduction, /* REDUCTION */ 00538 Tok_Open_Mp_Dir_Runtime, /* RUNTIME */ 00539 Tok_Open_Mp_Dir_Schedule, /* SCHEDULE */ 00540 Tok_Open_Mp_Dir_Section, /* SECTION */ 00541 Tok_Open_Mp_Dir_Sections, /* SECTIONS */ 00542 Tok_Open_Mp_Dir_Shared, /* SHARED */ 00543 Tok_Open_Mp_Dir_Single, /* SINGLE */ 00544 Tok_Open_Mp_Dir_Static, /* STATIC */ 00545 Tok_Open_Mp_Dir_Thread, /* THREAD */ 00546 Tok_Open_Mp_Dir_Threadprivate, /* THREADPRIVATE */ 00547 Tok_Open_Mp_Dir_Workshare, /* WORKSHARE */ 00548 Tok_Open_Mp_Dir_End, /* End of Open Mp directives */ 00549 00550 /* eraxxon: OpenAD directive */ 00551 Tok_OpenAD_Dir_Start, /* Start of OpenAD directives */ 00552 Tok_OpenAD_Dir_XXX, /* XXX */ 00553 Tok_OpenAD_Dir_Dependent, /* DEPENDENT */ 00554 Tok_OpenAD_Dir_Independent, /* INDEPENDENT */ 00555 Tok_OpenAD_Dir_Simple, /* SIMPLE */ 00556 Tok_OpenAD_Dir_EndSimple, /* END SIMPLE */ 00557 Tok_OpenAD_Dir_End, /* End of OpenAD directives */ 00558 00559 Tok_Dbg_Sytb, /* Symbol table */ 00560 Tok_Dbg_Stmt, /* Statement */ 00561 00562 Tok_Punct_Colon, /* : construct-name-sep, */ 00563 /* array-shape-spec-sep, */ 00564 /* substring-range-sep, */ 00565 /* subscript-triplet-sep, */ 00566 /* case-value-range-sep, */ 00567 /* only-list-sep */ 00568 Tok_Punct_Colon_Colon, /* :: declaration-spec-sep */ 00569 Tok_Punct_Comma, /* , list-item-sep */ 00570 Tok_Punct_Dash, /* - letter-spec-sep */ 00571 Tok_Punct_Eq, /* = initialization-exp-sep, */ 00572 /* kind-spec-sep, */ 00573 /* char-len-spec-sep, */ 00574 /* IO-spec-sep, */ 00575 /* actual-arg-spec-sep, */ 00576 /* stmt-func-def-sep */ 00577 Tok_Punct_Lbrkt, /* (/ array-constructor-delim */ 00578 Tok_Punct_Lparen, /* ( left-paren-delim */ 00579 Tok_Punct_Rbrkt, /* /) array-constructor-delim */ 00580 Tok_Punct_Rename, /* => rename-sep */ 00581 Tok_Punct_Rparen, /* ) right-paren-delim */ 00582 Tok_Punct_Slash, /* / common-name-sep, */ 00583 /* data-value-list-sep, */ 00584 /* save-list-sep, */ 00585 /* namelist-group-sep */ 00586 Tok_Punct_Star, /* * char-len-spec, */ 00587 /* data-repeat-spec, */ 00588 /* array-size-spec, */ 00589 /* IO-unit-spec, */ 00590 /* format-spec, */ 00591 /* alt-return-spec, */ 00592 /* dummy-arg-spec */ 00593 00594 Tok_Const_False, /* .FALSE. logical-false-constant, */ 00595 /* .F. logical-false-constant */ 00596 Tok_Const_True, /* .TRUE. logical-true-constant, */ 00597 /* .T. logical-true-constant */ 00598 Tok_Const_Hollerith, /* hollerith-constant */ 00599 Tok_Const_Boolean, /* short-hollerith-constant,*/ 00600 /* octal-constant, */ 00601 /* hex-constant */ 00602 Tok_Const_Boz, /* binary-constant, */ 00603 /* octal-constant, */ 00604 /* hex-constant */ 00605 Tok_Const_Char, /* character-constant */ 00606 Tok_Const_Int, /* integer-constant */ 00607 Tok_Const_Real, /* real-constant */ 00608 Tok_Const_Dbl, /* double-constant */ 00609 Tok_Const_Quad, /* quad-constant */ 00610 00611 Tok_Op_Add, /* + addition-op */ 00612 Tok_Op_Div, /* / division-op, */ 00613 Tok_Op_Mult, /* * multiplication-op */ 00614 Tok_Op_Power, /* ** exponentiation-op */ 00615 Tok_Op_Sub, /* - subtraction-op */ 00616 00617 Tok_Op_Concat, /* // concatenation-op */ 00618 00619 Tok_Op_Eq, /* .EQ. == equal-op */ 00620 Tok_Op_Ge, /* .GE. >= greater-equal-op */ 00621 Tok_Op_Gt, /* .GT. > greater-op */ 00622 Tok_Op_Le, /* .LE. <= less-equal-op */ 00623 Tok_Op_Lt, /* .LT. < less-op */ 00624 Tok_Op_Ne, /* .NE. /= not-equal-op */ 00625 Tok_Op_Lg, /* .LG. <> lg_op */ 00626 00627 Tok_Op_And, /* .AND. .A. and-op */ 00628 Tok_Op_Eqv, /* .EQV. equivalence-op */ 00629 Tok_Op_Neqv, /* .NEQV. non-equivalence-op */ 00630 /* .XOR. .X. non-equivalence-op */ 00631 Tok_Op_Not, /* .NOT. .N. negation-op */ 00632 Tok_Op_Or, /* .OR. .O. or-op */ 00633 00634 Tok_Op_Assign, /* = assignment-op, */ 00635 /* generic-spec-assign-op, */ 00636 /* implied-do-control-op */ 00637 Tok_Op_Defined, /* .letters. defined-op */ 00638 Tok_Op_Deref, /* % struct-comp-derefer-op */ 00639 Tok_Op_Ptr_Assign, /* => pointer-assignment-op */ 00640 00641 Tok_Unknown, /* ? unknown symbol */ 00642 Tok_EOS, /* EOS ; end-of-statement */ 00643 Tok_EOF, /* EOF end-of-file - end parse */ 00644 00645 Tok_LAST }; /* THIS MUST BE THE LAST ENUM ENTRY */ 00646 00647 /******************************************************************************/ 00648 00649 typedef enum ch_class_values ch_class_type; 00650 typedef enum token_class_values token_class_type; 00651 typedef enum token_values token_values_type; 00652 00653 typedef struct la_entry la_type; 00654 typedef union token_str_entry token_str_type; 00655 typedef struct token_entry token_type; 00656 00657 /******************************************************************************/ 00658 00659 struct la_entry {char value; 00660 ch_class_type ch_class; 00661 int line; 00662 int column; 00663 int stmt_buf_idx; 00664 int stmt_num; }; 00665 00666 /* NOTE: the id_str member of the following struct must be the first */ 00667 /* member so that it is word aligned for symbol table searches */ 00668 /* id_str_type is declared in globals.h */ 00669 00670 struct token_entry {id_str_type token_str; 00671 int token_len; 00672 boolean token_err; 00673 token_values_type value; 00674 char kind_str[MAX_ID_LEN+1]; 00675 int kind_len; 00676 int line; 00677 int column; 00678 int stmt_buf_idx; 00679 int stmt_num; }; 00680 00681 /*********************************\ 00682 |* lex and parser interface data *| 00683 \*********************************/ 00684 00685 extern la_type la_ch; 00686 extern token_type token; 00687 00688 /************************************************\ 00689 |* lex and parser interface function prototypes *| 00690 \************************************************/ 00691 00692 extern boolean get_token (token_class_type); 00693 extern token_type initial_token; 00694