2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / f / stp.h
blobeca8d0d563daf97b08fe4ab9fb08135443f626d4
1 /* stp.h -- Private #include File (module.h template V1.0)
2 Copyright (C) 1995 Free Software Foundation, Inc.
3 Contributed by James Craig Burley.
5 This file is part of GNU Fortran.
7 GNU Fortran is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
12 GNU Fortran is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GNU Fortran; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA.
22 Owning Modules:
23 stp.c
25 Modifications:
28 /* Allow multiple inclusion to work. */
30 #ifndef GCC_F_STP_H
31 #define GCC_F_STP_H
33 /* Simple definitions and enumerations. */
35 enum _ffestp_acceptix_
37 FFESTP_acceptixFORMAT,
38 FFESTP_acceptix
40 typedef enum _ffestp_acceptix_ ffestpAcceptIx;
42 enum _ffestp_attrib_
44 #if FFESTR_F90
45 FFESTP_attribALLOCATABLE,
46 #endif
47 FFESTP_attribDIMENSION,
48 FFESTP_attribEXTERNAL,
49 #if FFESTR_F90
50 FFESTP_attribINTENT,
51 #endif
52 FFESTP_attribINTRINSIC,
53 #if FFESTR_F90
54 FFESTP_attribOPTIONAL,
55 #endif
56 FFESTP_attribPARAMETER,
57 #if FFESTR_F90
58 FFESTP_attribPOINTER,
59 #endif
60 #if FFESTR_F90
61 FFESTP_attribPRIVATE,
62 FFESTP_attribPUBLIC,
63 #endif
64 FFESTP_attribSAVE,
65 #if FFESTR_F90
66 FFESTP_attribTARGET,
67 #endif
68 FFESTP_attrib
70 typedef enum _ffestp_attrib_ ffestpAttrib;
72 enum _ffestp_beruix_
74 FFESTP_beruixERR,
75 FFESTP_beruixIOSTAT,
76 FFESTP_beruixUNIT,
77 FFESTP_beruix
79 typedef enum _ffestp_beruix_ ffestpBeruIx;
81 enum _ffestp_closeix_
83 FFESTP_closeixERR,
84 FFESTP_closeixIOSTAT,
85 FFESTP_closeixSTATUS,
86 FFESTP_closeixUNIT,
87 FFESTP_closeix
89 typedef enum _ffestp_closeix_ ffestpCloseIx;
91 enum _ffestp_deleteix_
93 FFESTP_deleteixERR,
94 FFESTP_deleteixIOSTAT,
95 FFESTP_deleteixREC,
96 FFESTP_deleteixUNIT,
97 FFESTP_deleteix
99 typedef enum _ffestp_deleteix_ ffestpDeleteIx;
101 enum _ffestp_findix_
103 FFESTP_findixERR,
104 FFESTP_findixIOSTAT,
105 FFESTP_findixREC,
106 FFESTP_findixUNIT,
107 FFESTP_findix
109 typedef enum _ffestp_findix_ ffestpFindIx;
111 enum _ffestp_inquireix_
113 FFESTP_inquireixACCESS,
114 FFESTP_inquireixACTION,
115 FFESTP_inquireixBLANK,
116 FFESTP_inquireixCARRIAGECONTROL,
117 FFESTP_inquireixDEFAULTFILE,
118 FFESTP_inquireixDELIM,
119 FFESTP_inquireixDIRECT,
120 FFESTP_inquireixERR,
121 FFESTP_inquireixEXIST,
122 FFESTP_inquireixFILE,
123 FFESTP_inquireixFORM,
124 FFESTP_inquireixFORMATTED,
125 FFESTP_inquireixIOLENGTH,
126 FFESTP_inquireixIOSTAT,
127 FFESTP_inquireixKEYED,
128 FFESTP_inquireixNAME,
129 FFESTP_inquireixNAMED,
130 FFESTP_inquireixNEXTREC,
131 FFESTP_inquireixNUMBER,
132 FFESTP_inquireixOPENED,
133 FFESTP_inquireixORGANIZATION,
134 FFESTP_inquireixPAD,
135 FFESTP_inquireixPOSITION,
136 FFESTP_inquireixREAD,
137 FFESTP_inquireixREADWRITE,
138 FFESTP_inquireixRECL,
139 FFESTP_inquireixRECORDTYPE,
140 FFESTP_inquireixSEQUENTIAL,
141 FFESTP_inquireixUNFORMATTED,
142 FFESTP_inquireixUNIT,
143 FFESTP_inquireixWRITE,
144 FFESTP_inquireix
146 typedef enum _ffestp_inquireix_ ffestpInquireIx;
148 enum _ffestp_openix_
150 FFESTP_openixACCESS,
151 FFESTP_openixACTION,
152 FFESTP_openixASSOCIATEVARIABLE,
153 FFESTP_openixBLANK,
154 FFESTP_openixBLOCKSIZE,
155 FFESTP_openixBUFFERCOUNT,
156 FFESTP_openixCARRIAGECONTROL,
157 FFESTP_openixDEFAULTFILE,
158 FFESTP_openixDELIM,
159 FFESTP_openixDISPOSE,
160 FFESTP_openixERR,
161 FFESTP_openixEXTENDSIZE,
162 FFESTP_openixFILE,
163 FFESTP_openixFORM,
164 FFESTP_openixINITIALSIZE,
165 FFESTP_openixIOSTAT,
166 FFESTP_openixKEY,
167 FFESTP_openixMAXREC,
168 FFESTP_openixNOSPANBLOCKS,
169 FFESTP_openixORGANIZATION,
170 FFESTP_openixPAD,
171 FFESTP_openixPOSITION,
172 FFESTP_openixREADONLY,
173 FFESTP_openixRECL,
174 FFESTP_openixRECORDTYPE,
175 FFESTP_openixSHARED,
176 FFESTP_openixSTATUS,
177 FFESTP_openixUNIT,
178 FFESTP_openixUSEROPEN,
179 FFESTP_openix
181 typedef enum _ffestp_openix_ ffestpOpenIx;
183 enum _ffestp_printix_
185 FFESTP_printixFORMAT,
186 FFESTP_printix
188 typedef enum _ffestp_printix_ ffestpPrintIx;
190 enum _ffestp_readix_
192 FFESTP_readixADVANCE,
193 FFESTP_readixEND,
194 FFESTP_readixEOR,
195 FFESTP_readixERR,
196 FFESTP_readixFORMAT, /* Or NAMELIST (use expr info to
197 distinguish). */
198 FFESTP_readixIOSTAT,
199 FFESTP_readixKEYEQ,
200 FFESTP_readixKEYGE,
201 FFESTP_readixKEYGT,
202 FFESTP_readixKEYID,
203 FFESTP_readixNULLS,
204 FFESTP_readixREC,
205 FFESTP_readixSIZE,
206 FFESTP_readixUNIT,
207 FFESTP_readix
209 typedef enum _ffestp_readix_ ffestpReadIx;
211 enum _ffestp_rewriteix_
213 FFESTP_rewriteixERR,
214 FFESTP_rewriteixFMT,
215 FFESTP_rewriteixIOSTAT,
216 FFESTP_rewriteixUNIT,
217 FFESTP_rewriteix
219 typedef enum _ffestp_rewriteix_ ffestpRewriteIx;
221 enum _ffestp_typeix_
223 FFESTP_typeixFORMAT,
224 FFESTP_typeix
226 typedef enum _ffestp_typeix_ ffestpTypeIx;
228 enum _ffestp_vxtcodeix_
230 FFESTP_vxtcodeixB,
231 FFESTP_vxtcodeixC,
232 FFESTP_vxtcodeixERR,
233 FFESTP_vxtcodeixF,
234 FFESTP_vxtcodeixIOSTAT,
235 FFESTP_vxtcodeix
237 typedef enum _ffestp_vxtcodeix_ ffestpVxtcodeIx;
239 enum _ffestp_writeix_
241 FFESTP_writeixADVANCE,
242 FFESTP_writeixEOR,
243 FFESTP_writeixERR,
244 FFESTP_writeixFORMAT, /* Or NAMELIST (use expr info to
245 distinguish). */
246 FFESTP_writeixIOSTAT,
247 FFESTP_writeixREC,
248 FFESTP_writeixUNIT,
249 FFESTP_writeix
251 typedef enum _ffestp_writeix_ ffestpWriteIx;
253 #if FFESTR_F90
254 enum _ffestp_definedoperator_
256 FFESTP_definedoperatorNone, /* INTERFACE generic-name. */
257 FFESTP_definedoperatorOPERATOR, /* INTERFACE
258 OPERATOR(defined-operator). */
259 FFESTP_definedoperatorASSIGNMENT, /* INTERFACE ASSIGNMENT(=). */
260 FFESTP_definedoperatorPOWER,
261 FFESTP_definedoperatorMULT,
262 FFESTP_definedoperatorADD,
263 FFESTP_definedoperatorCONCAT,
264 FFESTP_definedoperatorDIVIDE,
265 FFESTP_definedoperatorSUBTRACT,
266 FFESTP_definedoperatorNOT,
267 FFESTP_definedoperatorAND,
268 FFESTP_definedoperatorOR,
269 FFESTP_definedoperatorEQV,
270 FFESTP_definedoperatorNEQV,
271 FFESTP_definedoperatorEQ,
272 FFESTP_definedoperatorNE,
273 FFESTP_definedoperatorLT,
274 FFESTP_definedoperatorLE,
275 FFESTP_definedoperatorGT,
276 FFESTP_definedoperatorGE,
277 FFESTP_definedoperator
279 typedef enum _ffestp_definedoperator_ ffestpDefinedOperator;
280 #endif
282 enum _ffestp_dimtype_
284 FFESTP_dimtypeNONE,
285 FFESTP_dimtypeKNOWN, /* Known-bounds dimension list. */
286 FFESTP_dimtypeADJUSTABLE, /* Adjustable dimension list. */
287 FFESTP_dimtypeASSUMED, /* Assumed dimension list (known except for
288 last). */
289 FFESTP_dimtypeADJUSTABLEASSUMED, /* Both. */
290 FFESTP_dimtype
292 typedef enum _ffestp_dimtype_ ffestpDimtype;
294 enum _ffestp_formattype_
296 FFESTP_formattypeNone,
297 FFESTP_formattypeI,
298 FFESTP_formattypeB,
299 FFESTP_formattypeO,
300 FFESTP_formattypeZ,
301 FFESTP_formattypeF,
302 FFESTP_formattypeE,
303 FFESTP_formattypeEN,
304 FFESTP_formattypeG,
305 FFESTP_formattypeL,
306 FFESTP_formattypeA,
307 FFESTP_formattypeD,
308 FFESTP_formattypeQ,
309 FFESTP_formattypeDOLLAR, /* $ (V-extension). */
310 FFESTP_formattypeP,
311 FFESTP_formattypeT,
312 FFESTP_formattypeTL,
313 FFESTP_formattypeTR,
314 FFESTP_formattypeX,
315 FFESTP_formattypeS,
316 FFESTP_formattypeSP,
317 FFESTP_formattypeSS,
318 FFESTP_formattypeBN,
319 FFESTP_formattypeBZ,
320 FFESTP_formattypeH, /* Hollerith, used only for error-reporting. */
321 FFESTP_formattypeSLASH,
322 FFESTP_formattypeCOLON,
323 FFESTP_formattypeR1016, /* char-literal-constant or cHchars. */
324 FFESTP_formattypeFORMAT, /* [r](format-item-list). */
325 FFESTP_formattype
327 typedef enum _ffestp_formattype_ ffestpFormatType;
329 enum _ffestp_type_
331 FFESTP_typeNone,
332 FFESTP_typeINTEGER,
333 FFESTP_typeREAL,
334 FFESTP_typeCOMPLEX,
335 FFESTP_typeLOGICAL,
336 FFESTP_typeCHARACTER,
337 FFESTP_typeDBLPRCSN,
338 FFESTP_typeDBLCMPLX,
339 FFESTP_typeBYTE,
340 FFESTP_typeWORD,
341 #if FFESTR_F90
342 FFESTP_typeTYPE,
343 #endif
344 FFESTP_type
346 typedef enum _ffestp_type_ ffestpType;
348 /* Typedefs. */
350 typedef struct _ffest_accept_stmt_ ffestpAcceptStmt;
351 typedef struct _ffest_beru_stmt_ ffestpBeruStmt;
352 typedef struct _ffest_close_stmt_ ffestpCloseStmt;
353 typedef struct _ffest_delete_stmt_ ffestpDeleteStmt;
354 typedef struct _ffestp_file ffestpFile;
355 typedef struct _ffest_find_stmt_ ffestpFindStmt;
356 typedef struct _ffest_inquire_stmt_ ffestpInquireStmt;
357 typedef struct _ffest_open_stmt_ ffestpOpenStmt;
358 typedef struct _ffest_print_stmt_ ffestpPrintStmt;
359 typedef struct _ffest_read_stmt_ ffestpReadStmt;
360 typedef struct _ffest_rewrite_stmt_ ffestpRewriteStmt;
361 typedef struct _ffest_type_stmt_ ffestpTypeStmt;
362 typedef struct _ffest_vxtcode_stmt_ ffestpVxtcodeStmt;
363 typedef struct _ffest_write_stmt_ ffestpWriteStmt;
365 /* Include files needed by this one. */
367 #include "bld.h"
368 #include "lab.h"
369 #include "lex.h"
370 #include "stp.h"
371 #include "stt.h"
373 /* Structure definitions. */
375 struct _ffestp_file
377 bool kw_or_val_present; /* If FALSE, all else is n/a. */
378 bool kw_present; /* Indicates whether kw has a token. */
379 bool value_present; /* Indicates whether value/expr are valid. */
380 bool value_is_label; /* TRUE if expr has no expression, value is
381 NUMBER. */
382 ffelexToken kw; /* The keyword, iff kw_or_val_present &&
383 kw_present. */
384 ffelexToken value; /* The value, iff kw_or_val_present &&
385 value_present. */
386 union
388 ffebld expr; /* The expr, iff kw_or_val_present &&
389 value_present && !value_is_label. */
390 ffelab label; /* The label, iff kw_or_val_present &&
391 value_present && value_is_label. */
396 struct _ffest_accept_stmt_
398 ffestpFile accept_spec[FFESTP_acceptix];
401 struct _ffest_beru_stmt_
403 ffestpFile beru_spec[FFESTP_beruix];
406 struct _ffest_close_stmt_
408 ffestpFile close_spec[FFESTP_closeix];
411 struct _ffest_delete_stmt_
413 ffestpFile delete_spec[FFESTP_deleteix];
416 struct _ffest_find_stmt_
418 ffestpFile find_spec[FFESTP_findix];
421 struct _ffest_imp_list_
423 ffesttImpList next;
424 ffesttImpList previous;
425 ffelexToken first;
426 ffelexToken last; /* NULL if a single letter. */
429 struct _ffest_inquire_stmt_
431 ffestpFile inquire_spec[FFESTP_inquireix];
434 struct _ffest_open_stmt_
436 ffestpFile open_spec[FFESTP_openix];
439 struct _ffest_print_stmt_
441 ffestpFile print_spec[FFESTP_printix];
444 struct _ffest_read_stmt_
446 ffestpFile read_spec[FFESTP_readix];
449 struct _ffest_rewrite_stmt_
451 ffestpFile rewrite_spec[FFESTP_rewriteix];
454 struct _ffest_type_stmt_
456 ffestpFile type_spec[FFESTP_typeix];
459 struct _ffest_vxtcode_stmt_
461 ffestpFile vxtcode_spec[FFESTP_vxtcodeix];
464 struct _ffest_write_stmt_
466 ffestpFile write_spec[FFESTP_writeix];
469 union _ffestp_fileu_
471 ffestpAcceptStmt accept;
472 ffestpBeruStmt beru;
473 ffestpCloseStmt close;
474 ffestpDeleteStmt delete;
475 ffestpFindStmt find;
476 ffestpInquireStmt inquire;
477 ffestpOpenStmt open;
478 ffestpPrintStmt print;
479 ffestpReadStmt read;
480 ffestpRewriteStmt rewrite;
481 ffestpTypeStmt type;
482 ffestpVxtcodeStmt vxtcode;
483 ffestpWriteStmt write;
486 /* Global objects accessed by users of this module. */
488 extern union _ffestp_fileu_ ffestp_file;
490 /* Declare functions with prototypes. */
493 /* Define macros. */
495 #define ffestp_init_0()
496 #define ffestp_init_1()
497 #define ffestp_init_2()
498 #define ffestp_init_3()
499 #define ffestp_init_4()
500 #define ffestp_terminate_0()
501 #define ffestp_terminate_1()
502 #define ffestp_terminate_2()
503 #define ffestp_terminate_3()
504 #define ffestp_terminate_4()
506 /* End of #include file. */
508 #endif /* ! GCC_F_STP_H */