]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/m2/mc/keyc.def
Merge modula-2 front end onto gcc.
[thirdparty/gcc.git] / gcc / m2 / mc / keyc.def
1 (* keyc.def provides an interface to emitting symbols which.
2
3 Copyright (C) 2016-2022 Free Software Foundation, Inc.
4 Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
5
6 This file is part of GNU Modula-2.
7
8 GNU Modula-2 is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3, or (at your option)
11 any later version.
12
13 GNU Modula-2 is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with GNU Modula-2; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>. *)
21
22 DEFINITION MODULE keyc ;
23
24 FROM mcPretty IMPORT pretty ;
25 FROM DynamicStrings IMPORT String ;
26 FROM decl IMPORT node ;
27 FROM nameKey IMPORT Name ;
28
29
30 (*
31 useUnistd - need to use unistd.h call using open/close/read/write require this header.
32 *)
33
34 PROCEDURE useUnistd ;
35
36
37 (*
38 useThrow - use the throw function.
39 *)
40
41 PROCEDURE useThrow ;
42
43
44 (*
45 useStorage - indicate we have used storage.
46 *)
47
48 PROCEDURE useStorage ;
49
50
51 (*
52 useFree - indicate we have used free.
53 *)
54
55 PROCEDURE useFree ;
56
57
58 (*
59 useMalloc - indicate we have used malloc.
60 *)
61
62 PROCEDURE useMalloc ;
63
64
65 (*
66 useProc - indicate we have used proc.
67 *)
68
69 PROCEDURE useProc ;
70
71
72 (*
73 useTrue - indicate we have used TRUE.
74 *)
75
76 PROCEDURE useTrue ;
77
78
79 (*
80 useFalse - indicate we have used FALSE.
81 *)
82
83 PROCEDURE useFalse ;
84
85
86 (*
87 useNull - indicate we have used NULL.
88 *)
89
90 PROCEDURE useNull ;
91
92
93 (*
94 useMemcpy - indicate we have used memcpy.
95 *)
96
97 PROCEDURE useMemcpy ;
98
99
100 (*
101 useIntMin - indicate we have used INT_MIN.
102 *)
103
104 PROCEDURE useIntMin ;
105
106
107 (*
108 useUIntMin - indicate we have used UINT_MIN.
109 *)
110
111 PROCEDURE useUIntMin ;
112
113
114 (*
115 useLongMin - indicate we have used LONG_MIN.
116 *)
117
118 PROCEDURE useLongMin ;
119
120
121 (*
122 useULongMin - indicate we have used ULONG_MIN.
123 *)
124
125 PROCEDURE useULongMin ;
126
127
128 (*
129 useCharMin - indicate we have used CHAR_MIN.
130 *)
131
132 PROCEDURE useCharMin ;
133
134
135 (*
136 useUCharMin - indicate we have used UCHAR_MIN.
137 *)
138
139 PROCEDURE useUCharMin ;
140
141
142 (*
143 useIntMax - indicate we have used INT_MAX.
144 *)
145
146 PROCEDURE useIntMax ;
147
148
149 (*
150 useUIntMax - indicate we have used UINT_MAX.
151 *)
152
153 PROCEDURE useUIntMax ;
154
155
156 (*
157 useLongMax - indicate we have used LONG_MAX.
158 *)
159
160 PROCEDURE useLongMax ;
161
162
163 (*
164 useULongMax - indicate we have used ULONG_MAX.
165 *)
166
167 PROCEDURE useULongMax ;
168
169
170 (*
171 useCharMax - indicate we have used CHAR_MAX.
172 *)
173
174 PROCEDURE useCharMax ;
175
176
177 (*
178 useUCharMax - indicate we have used UChar_MAX.
179 *)
180
181 PROCEDURE useUCharMax ;
182
183
184 (*
185 useSize_t - indicate we have used size_t.
186 *)
187
188 PROCEDURE useSize_t ;
189
190
191 (*
192 useSSize_t - indicate we have used ssize_t.
193 *)
194
195 PROCEDURE useSSize_t ;
196
197
198 (*
199 useLabs - indicate we have used labs.
200 *)
201
202 PROCEDURE useLabs ;
203
204
205 (*
206 useAbs - indicate we have used abs.
207 *)
208
209 PROCEDURE useAbs ;
210
211
212 (*
213 useFabs - indicate we have used fabs.
214 *)
215
216 PROCEDURE useFabs ;
217
218
219 (*
220 useFabsl - indicate we have used fabsl.
221 *)
222
223 PROCEDURE useFabsl ;
224
225
226 (*
227 useException - use the exceptions module, mcrts.
228 *)
229
230 PROCEDURE useException ;
231
232
233 (*
234 useComplex - use the complex data type.
235 *)
236
237 PROCEDURE useComplex ;
238
239
240 (*
241 useM2RTS - indicate we have used M2RTS in the converted code.
242 *)
243
244 PROCEDURE useM2RTS ;
245
246
247 (*
248 useStrlen - indicate we have used strlen in the converted code.
249 *)
250
251 PROCEDURE useStrlen ;
252
253
254 (*
255 useCtype - indicate we have used the toupper function.
256 *)
257
258 PROCEDURE useCtype ;
259
260
261 (*
262 genDefs - generate definitions or includes for all
263 macros and prototypes used.
264 *)
265
266 PROCEDURE genDefs (p: pretty) ;
267
268
269 (*
270 genConfigSystem - generate include files for config.h and system.h
271 within the GCC framework.
272 *)
273
274 PROCEDURE genConfigSystem (p: pretty) ;
275
276
277 (*
278 enterScope - enter a scope defined by, n.
279 *)
280
281 PROCEDURE enterScope (n: node) ;
282
283
284 (*
285 leaveScope - leave the scope defined by, n.
286 *)
287
288 PROCEDURE leaveScope (n: node) ;
289
290
291 (*
292 cname - attempts to declare a symbol with name, n, in the
293 current scope. If there is no conflict with the
294 target language then NIL is returned, otherwise
295 a mangled name is returned as a String.
296 If scopes is FALSE then only the keywords and
297 macros are detected for a clash (all scoping
298 is ignored).
299 *)
300
301 PROCEDURE cname (n: Name; scopes: BOOLEAN) : String ;
302
303
304 (*
305 cnamen - attempts to declare a symbol with name, n, in the
306 current scope. If there is no conflict with the
307 target language then NIL is returned, otherwise
308 a mangled name is returned as a Name
309 If scopes is FALSE then only the keywords and
310 macros are detected for a clash (all scoping
311 is ignored).
312 *)
313
314 PROCEDURE cnamen (n: Name; scopes: BOOLEAN) : Name ;
315
316
317 (*
318 cp - include C++ keywords and standard declarations to avoid.
319 *)
320
321 PROCEDURE cp ;
322
323
324 END keyc.