xref: /openbsd/gnu/usr.bin/gcc/gcc/f/stv.h (revision c87b03e5)
1 /* stv.h -- Private #include File (module.h template V1.0)
2    Copyright (C) 1995 Free Software Foundation, Inc.
3    Contributed by James Craig Burley.
4 
5 This file is part of GNU Fortran.
6 
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.
11 
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.
16 
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.
21 
22    Owning Modules:
23       stv.c
24 
25    Modifications:
26 */
27 
28 /* Allow multiple inclusion to work. */
29 
30 #ifndef GCC_F_STV_H
31 #define GCC_F_STV_H
32 
33 /* Simple definitions and enumerations. */
34 
35 typedef enum
36   {
37     FFESTV_accessstateNONE,	/* Haven't seen PUBLIC or PRIVATE yet. */
38     FFESTV_accessstatePUBLIC,	/* Seen PUBLIC stmt w/o args. */
39     FFESTV_accessstatePRIVATE,	/* Seen PRIVATE stmt w/o args. */
40     FFESTV_accessstateANY,	/* Conflict seen and reported, so stop
41 				   whining. */
42     FFESTV_accessstate
43   } ffestvAccessstate;
44 
45 typedef enum
46   {				/* Format specifier in an I/O statement. */
47     FFESTV_formatNONE,		/* None. */
48     FFESTV_formatLABEL,		/* Label (normal format). */
49     FFESTV_formatCHAREXPR,	/* Character expression (normal format). */
50     FFESTV_formatASTERISK,	/* Asterisk (list-directed). */
51     FFESTV_formatINTEXPR,	/* Integer expression (assigned label). */
52     FFESTV_formatNAMELIST,	/* Namelist (namelist-directed). */
53     FFESTV_format
54   } ffestvFormat;
55 
56 typedef enum
57   {
58     FFESTV_savestateNONE,	/* Haven't seen SAVE stmt or attribute yet. */
59     FFESTV_savestateSPECIFIC,	/* Seen SAVE stmt w/args or SAVE attr. */
60     FFESTV_savestateALL,	/* Seen SAVE stmt w/o args. */
61     FFESTV_savestateANY,	/* Conflict seen and reported, so stop
62 				   whining. */
63     FFESTV_savestate
64   } ffestvSavestate;
65 
66 typedef enum
67   {
68     FFESTV_stateNIL,		/* Initial state, and after end of outer prog
69 				   unit. */
70     FFESTV_statePROGRAM0,	/* After PROGRAM. */
71     FFESTV_statePROGRAM1,	/* Before first non-USE statement. */
72     FFESTV_statePROGRAM2,	/* After IMPLICIT NONE. */
73     FFESTV_statePROGRAM3,	/* After IMPLICIT, PARAMETER, FORMAT. */
74     FFESTV_statePROGRAM4,	/* Before executable stmt or CONTAINS. */
75     FFESTV_statePROGRAM5,	/* After CONTAINS. */
76     FFESTV_stateSUBROUTINE0,	/* After SUBROUTINE. */
77     FFESTV_stateSUBROUTINE1,	/* Before first non-USE statement. */
78     FFESTV_stateSUBROUTINE2,	/* After IMPLICIT NONE. */
79     FFESTV_stateSUBROUTINE3,	/* After IMPLICIT, PARAMETER, FORMAT, ENTRY. */
80     FFESTV_stateSUBROUTINE4,	/* Before executable stmt or CONTAINS. */
81     FFESTV_stateSUBROUTINE5,	/* After CONTAINS. */
82     FFESTV_stateFUNCTION0,	/* After FUNCTION. */
83     FFESTV_stateFUNCTION1,	/* Before first non-USE statement. */
84     FFESTV_stateFUNCTION2,	/* After IMPLICIT NONE. */
85     FFESTV_stateFUNCTION3,	/* After IMPLICIT, PARAMETER, FORMAT, ENTRY. */
86     FFESTV_stateFUNCTION4,	/* Before executable stmt or CONTAINS. */
87     FFESTV_stateFUNCTION5,	/* After CONTAINS. */
88     FFESTV_stateMODULE0,	/* After MODULE. */
89     FFESTV_stateMODULE1,	/* Before first non-USE statement. */
90     FFESTV_stateMODULE2,	/* After IMPLICIT NONE. */
91     FFESTV_stateMODULE3,	/* After IMPLICIT, PARAMETER, FORMAT, ENTRY. */
92     FFESTV_stateMODULE4,	/* Before executable stmt or CONTAINS. */
93     FFESTV_stateMODULE5,	/* After CONTAINS. */
94     FFESTV_stateBLOCKDATA0,	/* After BLOCKDATA. */
95     FFESTV_stateBLOCKDATA1,	/* Before first non-USE statement. */
96     FFESTV_stateBLOCKDATA2,	/* After IMPLICIT NONE. */
97     FFESTV_stateBLOCKDATA3,	/* After IMPLICIT, PARAMETER, FORMAT, ENTRY. */
98     FFESTV_stateBLOCKDATA4,	/* Before executable stmt or CONTAINS. */
99     FFESTV_stateBLOCKDATA5,	/* After CONTAINS. */
100     FFESTV_stateUSE,		/* Before first USE thru last USE. */
101     FFESTV_stateTYPE,		/* After TYPE thru END TYPE. */
102     FFESTV_stateINTERFACE0,	/* After INTERFACE thru MODULE PROCEDURE. */
103     FFESTV_stateINTERFACE1,	/* After MODULE PROCEDURE thru END INTERFACE. */
104     FFESTV_stateSTRUCTURE,	/* After STRUCTURE thru END STRUCTURE. */
105     FFESTV_stateUNION,		/* After UNION thru END UNION. */
106     FFESTV_stateMAP,		/* After MAP thru END MAP. */
107     FFESTV_stateWHERETHEN,	/* After WHERE-construct thru END WHERE. */
108     FFESTV_stateWHERE,		/* After WHERE-stmt thru next stmt. */
109     FFESTV_stateIFTHEN,		/* After IF THEN thru END IF. */
110     FFESTV_stateIF,		/* After IF thru next stmt. */
111     FFESTV_stateDO,		/* After DO thru END DO or terminating label. */
112     FFESTV_stateSELECT0,	/* After SELECT to before first CASE. */
113     FFESTV_stateSELECT1,	/* First CASE in SELECT thru END SELECT. */
114     FFESTV_state
115   } ffestvState;
116 
117 typedef enum
118   {				/* Unit specifier. */
119     FFESTV_unitNONE,		/* None. */
120     FFESTV_unitINTEXPR,		/* Integer expression (external file unit). */
121     FFESTV_unitASTERISK,	/* Default unit. */
122     FFESTV_unitCHAREXPR,	/* Character expression (internal file unit). */
123     FFESTV_unit
124   } ffestvUnit;
125 
126 /* Typedefs. */
127 
128 
129 /* Include files needed by this one. */
130 
131 #include "lab.h"
132 #include "where.h"
133 
134 /* Structure definitions. */
135 
136 
137 /* Global objects accessed by users of this module. */
138 
139 extern ffestvSavestate ffestv_save_state_;
140 extern ffewhereLine ffestv_save_line_;
141 extern ffewhereColumn ffestv_save_col_;
142 extern ffestvAccessstate ffestv_access_state_;
143 extern ffewhereLine ffestv_access_line_;
144 extern ffewhereColumn ffestv_access_col_;
145 extern ffelabNumber ffestv_num_label_defines_;
146 
147 /* Declare functions with prototypes. */
148 
149 
150 /* Define macros. */
151 
152 #define ffestv_init_0()
153 #define ffestv_init_1()
154 #define ffestv_init_2()
155 #define ffestv_init_3()
156 #define ffestv_init_4()
157 #define ffestv_terminate_0()
158 #define ffestv_terminate_1()
159 #define ffestv_terminate_2()
160 #define ffestv_terminate_3()
161 #define ffestv_terminate_4()
162 
163 /* End of #include file. */
164 
165 #endif /* ! GCC_F_STV_H */
166