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)
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
28 /* Allow multiple inclusion to work. */
33 /* Simple definitions and enumerations. */
35 enum _ffestp_acceptix_
37 FFESTP_acceptixFORMAT
,
40 typedef enum _ffestp_acceptix_ ffestpAcceptIx
;
45 FFESTP_attribALLOCATABLE
,
47 FFESTP_attribDIMENSION
,
48 FFESTP_attribEXTERNAL
,
52 FFESTP_attribINTRINSIC
,
54 FFESTP_attribOPTIONAL
,
56 FFESTP_attribPARAMETER
,
70 typedef enum _ffestp_attrib_ ffestpAttrib
;
79 typedef enum _ffestp_beruix_ ffestpBeruIx
;
89 typedef enum _ffestp_closeix_ ffestpCloseIx
;
91 enum _ffestp_deleteix_
94 FFESTP_deleteixIOSTAT
,
99 typedef enum _ffestp_deleteix_ ffestpDeleteIx
;
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
,
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
,
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
,
146 typedef enum _ffestp_inquireix_ ffestpInquireIx
;
152 FFESTP_openixASSOCIATEVARIABLE
,
154 FFESTP_openixBLOCKSIZE
,
155 FFESTP_openixBUFFERCOUNT
,
156 FFESTP_openixCARRIAGECONTROL
,
157 FFESTP_openixDEFAULTFILE
,
159 FFESTP_openixDISPOSE
,
161 FFESTP_openixEXTENDSIZE
,
164 FFESTP_openixINITIALSIZE
,
168 FFESTP_openixNOSPANBLOCKS
,
169 FFESTP_openixORGANIZATION
,
171 FFESTP_openixPOSITION
,
172 FFESTP_openixREADONLY
,
174 FFESTP_openixRECORDTYPE
,
178 FFESTP_openixUSEROPEN
,
181 typedef enum _ffestp_openix_ ffestpOpenIx
;
183 enum _ffestp_printix_
185 FFESTP_printixFORMAT
,
188 typedef enum _ffestp_printix_ ffestpPrintIx
;
192 FFESTP_readixADVANCE
,
196 FFESTP_readixFORMAT
, /* Or NAMELIST (use expr info to
209 typedef enum _ffestp_readix_ ffestpReadIx
;
211 enum _ffestp_rewriteix_
215 FFESTP_rewriteixIOSTAT
,
216 FFESTP_rewriteixUNIT
,
219 typedef enum _ffestp_rewriteix_ ffestpRewriteIx
;
226 typedef enum _ffestp_typeix_ ffestpTypeIx
;
228 enum _ffestp_vxtcodeix_
234 FFESTP_vxtcodeixIOSTAT
,
237 typedef enum _ffestp_vxtcodeix_ ffestpVxtcodeIx
;
239 enum _ffestp_writeix_
241 FFESTP_writeixADVANCE
,
244 FFESTP_writeixFORMAT
, /* Or NAMELIST (use expr info to
246 FFESTP_writeixIOSTAT
,
251 typedef enum _ffestp_writeix_ ffestpWriteIx
;
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
;
282 enum _ffestp_dimtype_
285 FFESTP_dimtypeKNOWN
, /* Known-bounds dimension list. */
286 FFESTP_dimtypeADJUSTABLE
, /* Adjustable dimension list. */
287 FFESTP_dimtypeASSUMED
, /* Assumed dimension list (known except for
289 FFESTP_dimtypeADJUSTABLEASSUMED
, /* Both. */
292 typedef enum _ffestp_dimtype_ ffestpDimtype
;
294 enum _ffestp_formattype_
296 FFESTP_formattypeNone
,
309 FFESTP_formattypeDOLLAR
, /* $ (V-extension). */
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). */
327 typedef enum _ffestp_formattype_ ffestpFormatType
;
336 FFESTP_typeCHARACTER
,
346 typedef enum _ffestp_type_ ffestpType
;
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. */
373 /* Structure definitions. */
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
382 ffelexToken kw
; /* The keyword, iff kw_or_val_present &&
384 ffelexToken value
; /* The value, iff kw_or_val_present &&
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_
424 ffesttImpList previous
;
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
];
471 ffestpAcceptStmt accept
;
473 ffestpCloseStmt close
;
474 ffestpDeleteStmt
delete;
476 ffestpInquireStmt inquire
;
478 ffestpPrintStmt print
;
480 ffestpRewriteStmt rewrite
;
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. */
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. */