oops - omitted from previous delta fixing UNIQUE_SECTION
[official-gcc.git] / gcc / f / str.c
blobf03c893f209db5cf1099c90eea084928afb46f62
1 /* str.c -- Implementation File (module.c 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 Related Modules:
23 None
25 Description:
26 Handles recognition of keywords.
28 Modifications:
31 /* Include files. */
33 #include "proj.h"
34 #include "src.h"
35 #include "str.h"
36 #include "lex.h"
38 /* Externals defined here. */
41 /* Simple definitions and enumerations. */
44 /* Internal typedefs. */
47 /* Private include files. */
50 /* Internal structure definitions. */
53 /* Static objects accessed by functions in this module. */
56 /* Static functions (internal). */
59 /* Internal macros. */
62 /* ffestr_first -- Look up the first names in a statement
64 ffestrFirst kw;
65 ffelexToken t;
66 kw = ffestr_first(t);
68 Returns FFESTR_firstNone if no matches, else FFESTR_firstXYZ if the
69 NAME or NAMES token matches XYZ. t must be a NAME or NAMES token or this
70 routine will crash.
72 This routine's code is actually written by a utility called FINI, itself
73 written specifically for the Gnu Fortran project. FINI takes an input
74 file, in this case "ffe_first.fini", consisting primarily of a
75 list of statements (ASSIGN, IF, DO, DOWHILE), and outputs a C file,
76 "str-1t.j", that contains the definition of the
77 ffestr_first function. We #include that file here.
79 30-Jan-90 JCB 2.0
80 Updated for Fortran 90.
83 #ifndef MAKING_DEPENDENCIES
84 #include "str-1t.j"
85 #endif
86 /* ffestr_format -- Look up format names in a statement
88 ffestrFormat kw;
89 ffelexToken t;
90 kw = ffestr_format(t);
92 Returns FFESTR_formatNone if no matches, else FFESTR_formatXYZ if the
93 NAME or NAMES token matches XYZ. t must be a NAME or NAMES token or this
94 routine will crash.
96 This routine's code is actually written by a utility called FINI, itself
97 written specifically for the Gnu Fortran project. FINI takes an input
98 file, in this case "ffe_format.fini", consisting primarily of a
99 list of format keywords (I, F, TL, TR), and outputs a C file,
100 "str-fo.j", that contains the definition of the
101 ffestr_format function. We #include that file here.
105 #ifndef MAKING_DEPENDENCIES
106 #include "str-fo.j"
107 #endif
108 /* ffestr_genio -- Look up genio names in a statement
110 ffestrGenio kw;
111 ffelexToken t;
112 kw = ffestr_genio(t);
114 Returns FFESTR_genioNone if no matches, else FFESTR_genioXYZ if the
115 NAME or NAMES token matches XYZ. t must be a NAME or NAMES token or this
116 routine will crash.
118 This routine's code is actually written by a utility called FINI, itself
119 written specifically for the Gnu Fortran project. FINI takes an input
120 file, in this case "ffe_genio.fini", consisting primarily of a
121 list of statement keywords (TO, FUNCTION), and outputs a C file,
122 "str-io.j", that contains the definition of the
123 ffestr_genio function. We #include that file here.
127 #ifndef MAKING_DEPENDENCIES
128 #include "str-io.j"
129 #endif
130 /* ffestr_inquire -- Look up inquire names in a statement
132 ffestrInquire kw;
133 ffelexToken t;
134 kw = ffestr_inquire(t);
136 Returns FFESTR_inquireNone if no matches, else FFESTR_inquireXYZ if the
137 NAME or NAMES token matches XYZ. t must be a NAME or NAMES token or this
138 routine will crash.
140 This routine's code is actually written by a utility called FINI, itself
141 written specifically for the Gnu Fortran project. FINI takes an input
142 file, in this case "ffe_inquire.fini", consisting primarily of a
143 list of statement keywords (TO, FUNCTION), and outputs a C file,
144 "str-nq.j", that contains the definition of the
145 ffestr_inquire function. We #include that file here.
149 #ifndef MAKING_DEPENDENCIES
150 #include "str-nq.j"
151 #endif
152 /* ffestr_open -- Look up open names in a statement
154 ffestrOpen kw;
155 ffelexToken t;
156 kw = ffestr_open(t);
158 Returns FFESTR_openNone if no matches, else FFESTR_openXYZ if the
159 NAME or NAMES token matches XYZ. t must be a NAME or NAMES token or this
160 routine will crash.
162 This routine's code is actually written by a utility called FINI, itself
163 written specifically for the Gnu Fortran project. FINI takes an input
164 file, in this case "ffe_open.fini", consisting primarily of a
165 list of statement keywords (TO, FUNCTION), and outputs a C file,
166 "str-op.j", that contains the definition of the
167 ffestr_open function. We #include that file here.
171 #ifndef MAKING_DEPENDENCIES
172 #include "str-op.j"
173 #endif
174 /* ffestr_other -- Look up other names in a statement
176 ffestrOther kw;
177 ffelexToken t;
178 kw = ffestr_other(t);
180 Returns FFESTR_otherNone if no matches, else FFESTR_otherXYZ if the
181 NAME or NAMES token matches XYZ. t must be a NAME or NAMES token or this
182 routine will crash.
184 This routine's code is actually written by a utility called FINI, itself
185 written specifically for the Gnu Fortran project. FINI takes an input
186 file, in this case "ffe_other.fini", consisting primarily of a
187 list of statement keywords (TO, FUNCTION), and outputs a C file,
188 "str-ot.j", that contains the definition of the
189 ffestr_other function. We #include that file here.
193 #ifndef MAKING_DEPENDENCIES
194 #include "str-ot.j"
195 #endif
196 /* ffestr_second -- Look up the second name in a statement
198 ffestrSecond kw;
199 ffelexToken t;
200 kw = ffestr_second(t);
202 Returns FFESTR_secondNone if no matches, else FFESTR_secondXYZ if the
203 NAME or NAMES token matches XYZ. t must be a NAME or NAMES token or this
204 routine will crash.
206 This routine's code is actually written by a utility called FINI, itself
207 written specifically for the Gnu Fortran project. FINI takes an input
208 file, in this case "ffe_second.fini", consisting primarily of a
209 list of statement keywords (TO, FUNCTION), and outputs a C file,
210 "str-2t.j", that contains the definition of the
211 ffestr_second function. We #include that file here.
215 #ifndef MAKING_DEPENDENCIES
216 #include "str-2t.j"
217 #endif