annotate gcc/fortran/match.h @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* All matcher functions.
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 Copyright (C) 2003-2018 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3 Contributed by Steven Bosscher
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 This file is part of GCC.
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 GCC is free software; you can redistribute it and/or modify it under
kono
parents:
diff changeset
8 the terms of the GNU General Public License as published by the Free
kono
parents:
diff changeset
9 Software Foundation; either version 3, or (at your option) any later
kono
parents:
diff changeset
10 version.
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
kono
parents:
diff changeset
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
kono
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
kono
parents:
diff changeset
15 for more details.
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
18 along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
19 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 #ifndef GFC_MATCH_H
kono
parents:
diff changeset
23 #define GFC_MATCH_H
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 /* gfc_new_block points to the symbol of a newly matched block. */
kono
parents:
diff changeset
26 extern gfc_symbol *gfc_new_block;
kono
parents:
diff changeset
27
kono
parents:
diff changeset
28 /* Current statement label. Zero means no statement label. Because
kono
parents:
diff changeset
29 new_st can get wiped during statement matching, we have to keep it
kono
parents:
diff changeset
30 separate. */
kono
parents:
diff changeset
31 extern gfc_st_label *gfc_statement_label;
kono
parents:
diff changeset
32
kono
parents:
diff changeset
33 extern int gfc_matching_ptr_assignment;
kono
parents:
diff changeset
34 extern int gfc_matching_procptr_assignment;
kono
parents:
diff changeset
35 extern bool gfc_matching_prefix;
kono
parents:
diff changeset
36
kono
parents:
diff changeset
37 /* Default access specifier while matching procedure bindings. */
kono
parents:
diff changeset
38 extern gfc_access gfc_typebound_default_access;
kono
parents:
diff changeset
39
kono
parents:
diff changeset
40 /****************** All gfc_match* routines *****************/
kono
parents:
diff changeset
41
kono
parents:
diff changeset
42 /* match.c. */
kono
parents:
diff changeset
43
kono
parents:
diff changeset
44 /* Generic match subroutines. */
kono
parents:
diff changeset
45 match gfc_match_special_char (gfc_char_t *);
kono
parents:
diff changeset
46 match gfc_match_space (void);
kono
parents:
diff changeset
47 match gfc_match_eos (void);
kono
parents:
diff changeset
48 match gfc_match_small_literal_int (int *, int *);
kono
parents:
diff changeset
49 match gfc_match_st_label (gfc_st_label **);
kono
parents:
diff changeset
50 match gfc_match_label (void);
kono
parents:
diff changeset
51 match gfc_match_small_int (int *);
kono
parents:
diff changeset
52 match gfc_match_small_int_expr (int *, gfc_expr **);
kono
parents:
diff changeset
53 match gfc_match_name (char *);
kono
parents:
diff changeset
54 match gfc_match_name_C (const char **buffer);
kono
parents:
diff changeset
55 match gfc_match_symbol (gfc_symbol **, int);
kono
parents:
diff changeset
56 match gfc_match_sym_tree (gfc_symtree **, int);
kono
parents:
diff changeset
57 match gfc_match_intrinsic_op (gfc_intrinsic_op *);
kono
parents:
diff changeset
58 match gfc_match_char (char);
kono
parents:
diff changeset
59 match gfc_match (const char *, ...);
kono
parents:
diff changeset
60 match gfc_match_iterator (gfc_iterator *, int);
kono
parents:
diff changeset
61 match gfc_match_parens (void);
kono
parents:
diff changeset
62 match gfc_match_type_spec (gfc_typespec *);
kono
parents:
diff changeset
63 match gfc_match_member_sep(gfc_symbol *);
kono
parents:
diff changeset
64
kono
parents:
diff changeset
65
kono
parents:
diff changeset
66 /* Statement matchers. */
kono
parents:
diff changeset
67 match gfc_match_program (void);
kono
parents:
diff changeset
68 match gfc_match_pointer_assignment (void);
kono
parents:
diff changeset
69 match gfc_match_assignment (void);
kono
parents:
diff changeset
70 match gfc_match_if (gfc_statement *);
kono
parents:
diff changeset
71 match gfc_match_else (void);
kono
parents:
diff changeset
72 match gfc_match_elseif (void);
kono
parents:
diff changeset
73 match gfc_match_event_post (void);
kono
parents:
diff changeset
74 match gfc_match_event_wait (void);
kono
parents:
diff changeset
75 match gfc_match_critical (void);
kono
parents:
diff changeset
76 match gfc_match_fail_image (void);
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
77 match gfc_match_change_team (void);
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
78 match gfc_match_end_team (void);
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
79 match gfc_match_form_team (void);
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
80 match gfc_match_sync_team (void);
111
kono
parents:
diff changeset
81 match gfc_match_block (void);
kono
parents:
diff changeset
82 match gfc_match_associate (void);
kono
parents:
diff changeset
83 match gfc_match_do (void);
kono
parents:
diff changeset
84 match gfc_match_cycle (void);
kono
parents:
diff changeset
85 match gfc_match_exit (void);
kono
parents:
diff changeset
86 match gfc_match_lock (void);
kono
parents:
diff changeset
87 match gfc_match_pause (void);
kono
parents:
diff changeset
88 match gfc_match_stop (void);
kono
parents:
diff changeset
89 match gfc_match_error_stop (void);
kono
parents:
diff changeset
90 match gfc_match_continue (void);
kono
parents:
diff changeset
91 match gfc_match_assign (void);
kono
parents:
diff changeset
92 match gfc_match_goto (void);
kono
parents:
diff changeset
93 match gfc_match_sync_all (void);
kono
parents:
diff changeset
94 match gfc_match_sync_images (void);
kono
parents:
diff changeset
95 match gfc_match_sync_memory (void);
kono
parents:
diff changeset
96 match gfc_match_unlock (void);
kono
parents:
diff changeset
97
kono
parents:
diff changeset
98 match gfc_match_allocate (void);
kono
parents:
diff changeset
99 match gfc_match_nullify (void);
kono
parents:
diff changeset
100 match gfc_match_deallocate (void);
kono
parents:
diff changeset
101 match gfc_match_return (void);
kono
parents:
diff changeset
102 match gfc_match_call (void);
kono
parents:
diff changeset
103
kono
parents:
diff changeset
104 /* We want to use this function to check for a common-block-name
kono
parents:
diff changeset
105 that can exist in a bind statement, so removed the "static"
kono
parents:
diff changeset
106 declaration of the function in match.c.
kono
parents:
diff changeset
107
kono
parents:
diff changeset
108 TODO: should probably rename this now that it'll be globally seen to
kono
parents:
diff changeset
109 gfc_match_common_name. */
kono
parents:
diff changeset
110 match match_common_name (char *name);
kono
parents:
diff changeset
111
kono
parents:
diff changeset
112 match gfc_match_common (void);
kono
parents:
diff changeset
113 match gfc_match_block_data (void);
kono
parents:
diff changeset
114 match gfc_match_namelist (void);
kono
parents:
diff changeset
115 match gfc_match_module (void);
kono
parents:
diff changeset
116 match gfc_match_equivalence (void);
kono
parents:
diff changeset
117 match gfc_match_st_function (void);
kono
parents:
diff changeset
118 match gfc_match_ptr_fcn_assign (void);
kono
parents:
diff changeset
119 match gfc_match_case (void);
kono
parents:
diff changeset
120 match gfc_match_select (void);
kono
parents:
diff changeset
121 match gfc_match_select_type (void);
kono
parents:
diff changeset
122 match gfc_match_type_is (void);
kono
parents:
diff changeset
123 match gfc_match_class_is (void);
kono
parents:
diff changeset
124 match gfc_match_where (gfc_statement *);
kono
parents:
diff changeset
125 match gfc_match_elsewhere (void);
kono
parents:
diff changeset
126 match gfc_match_forall (gfc_statement *);
kono
parents:
diff changeset
127
kono
parents:
diff changeset
128 /* Other functions. */
kono
parents:
diff changeset
129
kono
parents:
diff changeset
130 gfc_common_head *gfc_get_common (const char *, int);
kono
parents:
diff changeset
131
kono
parents:
diff changeset
132 /* openmp.c. */
kono
parents:
diff changeset
133
kono
parents:
diff changeset
134 /* OpenACC directive matchers. */
kono
parents:
diff changeset
135 match gfc_match_oacc_atomic (void);
kono
parents:
diff changeset
136 match gfc_match_oacc_cache (void);
kono
parents:
diff changeset
137 match gfc_match_oacc_wait (void);
kono
parents:
diff changeset
138 match gfc_match_oacc_update (void);
kono
parents:
diff changeset
139 match gfc_match_oacc_declare (void);
kono
parents:
diff changeset
140 match gfc_match_oacc_loop (void);
kono
parents:
diff changeset
141 match gfc_match_oacc_host_data (void);
kono
parents:
diff changeset
142 match gfc_match_oacc_data (void);
kono
parents:
diff changeset
143 match gfc_match_oacc_kernels (void);
kono
parents:
diff changeset
144 match gfc_match_oacc_kernels_loop (void);
kono
parents:
diff changeset
145 match gfc_match_oacc_parallel (void);
kono
parents:
diff changeset
146 match gfc_match_oacc_parallel_loop (void);
kono
parents:
diff changeset
147 match gfc_match_oacc_enter_data (void);
kono
parents:
diff changeset
148 match gfc_match_oacc_exit_data (void);
kono
parents:
diff changeset
149 match gfc_match_oacc_routine (void);
kono
parents:
diff changeset
150
kono
parents:
diff changeset
151 /* OpenMP directive matchers. */
kono
parents:
diff changeset
152 match gfc_match_omp_eos (void);
kono
parents:
diff changeset
153 match gfc_match_omp_atomic (void);
kono
parents:
diff changeset
154 match gfc_match_omp_barrier (void);
kono
parents:
diff changeset
155 match gfc_match_omp_cancel (void);
kono
parents:
diff changeset
156 match gfc_match_omp_cancellation_point (void);
kono
parents:
diff changeset
157 match gfc_match_omp_critical (void);
kono
parents:
diff changeset
158 match gfc_match_omp_declare_reduction (void);
kono
parents:
diff changeset
159 match gfc_match_omp_declare_simd (void);
kono
parents:
diff changeset
160 match gfc_match_omp_declare_target (void);
kono
parents:
diff changeset
161 match gfc_match_omp_distribute (void);
kono
parents:
diff changeset
162 match gfc_match_omp_distribute_parallel_do (void);
kono
parents:
diff changeset
163 match gfc_match_omp_distribute_parallel_do_simd (void);
kono
parents:
diff changeset
164 match gfc_match_omp_distribute_simd (void);
kono
parents:
diff changeset
165 match gfc_match_omp_do (void);
kono
parents:
diff changeset
166 match gfc_match_omp_do_simd (void);
kono
parents:
diff changeset
167 match gfc_match_omp_flush (void);
kono
parents:
diff changeset
168 match gfc_match_omp_master (void);
kono
parents:
diff changeset
169 match gfc_match_omp_ordered (void);
kono
parents:
diff changeset
170 match gfc_match_omp_ordered_depend (void);
kono
parents:
diff changeset
171 match gfc_match_omp_parallel (void);
kono
parents:
diff changeset
172 match gfc_match_omp_parallel_do (void);
kono
parents:
diff changeset
173 match gfc_match_omp_parallel_do_simd (void);
kono
parents:
diff changeset
174 match gfc_match_omp_parallel_sections (void);
kono
parents:
diff changeset
175 match gfc_match_omp_parallel_workshare (void);
kono
parents:
diff changeset
176 match gfc_match_omp_sections (void);
kono
parents:
diff changeset
177 match gfc_match_omp_simd (void);
kono
parents:
diff changeset
178 match gfc_match_omp_single (void);
kono
parents:
diff changeset
179 match gfc_match_omp_target (void);
kono
parents:
diff changeset
180 match gfc_match_omp_target_data (void);
kono
parents:
diff changeset
181 match gfc_match_omp_target_enter_data (void);
kono
parents:
diff changeset
182 match gfc_match_omp_target_exit_data (void);
kono
parents:
diff changeset
183 match gfc_match_omp_target_parallel (void);
kono
parents:
diff changeset
184 match gfc_match_omp_target_parallel_do (void);
kono
parents:
diff changeset
185 match gfc_match_omp_target_parallel_do_simd (void);
kono
parents:
diff changeset
186 match gfc_match_omp_target_simd (void);
kono
parents:
diff changeset
187 match gfc_match_omp_target_teams (void);
kono
parents:
diff changeset
188 match gfc_match_omp_target_teams_distribute (void);
kono
parents:
diff changeset
189 match gfc_match_omp_target_teams_distribute_parallel_do (void);
kono
parents:
diff changeset
190 match gfc_match_omp_target_teams_distribute_parallel_do_simd (void);
kono
parents:
diff changeset
191 match gfc_match_omp_target_teams_distribute_simd (void);
kono
parents:
diff changeset
192 match gfc_match_omp_target_update (void);
kono
parents:
diff changeset
193 match gfc_match_omp_task (void);
kono
parents:
diff changeset
194 match gfc_match_omp_taskgroup (void);
kono
parents:
diff changeset
195 match gfc_match_omp_taskloop (void);
kono
parents:
diff changeset
196 match gfc_match_omp_taskloop_simd (void);
kono
parents:
diff changeset
197 match gfc_match_omp_taskwait (void);
kono
parents:
diff changeset
198 match gfc_match_omp_taskyield (void);
kono
parents:
diff changeset
199 match gfc_match_omp_teams (void);
kono
parents:
diff changeset
200 match gfc_match_omp_teams_distribute (void);
kono
parents:
diff changeset
201 match gfc_match_omp_teams_distribute_parallel_do (void);
kono
parents:
diff changeset
202 match gfc_match_omp_teams_distribute_parallel_do_simd (void);
kono
parents:
diff changeset
203 match gfc_match_omp_teams_distribute_simd (void);
kono
parents:
diff changeset
204 match gfc_match_omp_threadprivate (void);
kono
parents:
diff changeset
205 match gfc_match_omp_workshare (void);
kono
parents:
diff changeset
206 match gfc_match_omp_end_critical (void);
kono
parents:
diff changeset
207 match gfc_match_omp_end_nowait (void);
kono
parents:
diff changeset
208 match gfc_match_omp_end_single (void);
kono
parents:
diff changeset
209
kono
parents:
diff changeset
210 /* decl.c. */
kono
parents:
diff changeset
211
kono
parents:
diff changeset
212 match gfc_match_data (void);
kono
parents:
diff changeset
213 match gfc_match_null (gfc_expr **);
kono
parents:
diff changeset
214 match gfc_match_kind_spec (gfc_typespec *, bool);
kono
parents:
diff changeset
215 match gfc_match_old_kind_spec (gfc_typespec *);
kono
parents:
diff changeset
216 match gfc_match_decl_type_spec (gfc_typespec *, int);
kono
parents:
diff changeset
217
kono
parents:
diff changeset
218 match gfc_match_end (gfc_statement *);
kono
parents:
diff changeset
219 match gfc_match_data_decl (void);
kono
parents:
diff changeset
220 match gfc_match_formal_arglist (gfc_symbol *, int, int, bool = false);
kono
parents:
diff changeset
221 match gfc_match_procedure (void);
kono
parents:
diff changeset
222 match gfc_match_generic (void);
kono
parents:
diff changeset
223 match gfc_match_function_decl (void);
kono
parents:
diff changeset
224 match gfc_match_entry (void);
kono
parents:
diff changeset
225 match gfc_match_subroutine (void);
kono
parents:
diff changeset
226 match gfc_match_submod_proc (void);
kono
parents:
diff changeset
227 match gfc_match_map (void);
kono
parents:
diff changeset
228 match gfc_match_union (void);
kono
parents:
diff changeset
229 match gfc_match_structure_decl (void);
kono
parents:
diff changeset
230 match gfc_match_derived_decl (void);
kono
parents:
diff changeset
231 match gfc_match_final_decl (void);
kono
parents:
diff changeset
232 match gfc_match_type (gfc_statement *);
kono
parents:
diff changeset
233
kono
parents:
diff changeset
234 match gfc_match_implicit_none (void);
kono
parents:
diff changeset
235 match gfc_match_implicit (void);
kono
parents:
diff changeset
236
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
237 void gfc_set_constant_character_len (gfc_charlen_t, gfc_expr *,
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
238 gfc_charlen_t);
111
kono
parents:
diff changeset
239
kono
parents:
diff changeset
240 /* Matchers for attribute declarations. */
kono
parents:
diff changeset
241 match gfc_match_allocatable (void);
kono
parents:
diff changeset
242 match gfc_match_asynchronous (void);
kono
parents:
diff changeset
243 match gfc_match_automatic (void);
kono
parents:
diff changeset
244 match gfc_match_codimension (void);
kono
parents:
diff changeset
245 match gfc_match_contiguous (void);
kono
parents:
diff changeset
246 match gfc_match_dimension (void);
kono
parents:
diff changeset
247 match gfc_match_external (void);
kono
parents:
diff changeset
248 match gfc_match_gcc_attributes (void);
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
249 match gfc_match_gcc_unroll (void);
111
kono
parents:
diff changeset
250 match gfc_match_import (void);
kono
parents:
diff changeset
251 match gfc_match_intent (void);
kono
parents:
diff changeset
252 match gfc_match_intrinsic (void);
kono
parents:
diff changeset
253 match gfc_match_optional (void);
kono
parents:
diff changeset
254 match gfc_match_parameter (void);
kono
parents:
diff changeset
255 match gfc_match_pointer (void);
kono
parents:
diff changeset
256 match gfc_match_protected (void);
kono
parents:
diff changeset
257 match gfc_match_private (gfc_statement *);
kono
parents:
diff changeset
258 match gfc_match_public (gfc_statement *);
kono
parents:
diff changeset
259 match gfc_match_save (void);
kono
parents:
diff changeset
260 match gfc_match_static (void);
kono
parents:
diff changeset
261 match gfc_match_modproc (void);
kono
parents:
diff changeset
262 match gfc_match_target (void);
kono
parents:
diff changeset
263 match gfc_match_value (void);
kono
parents:
diff changeset
264 match gfc_match_volatile (void);
kono
parents:
diff changeset
265
kono
parents:
diff changeset
266 /* decl.c. */
kono
parents:
diff changeset
267
kono
parents:
diff changeset
268 /* Fortran 2003 c interop.
kono
parents:
diff changeset
269 TODO: some of these should be moved to another file rather than decl.c */
kono
parents:
diff changeset
270 void set_com_block_bind_c (gfc_common_head *, int);
kono
parents:
diff changeset
271 bool set_verify_bind_c_sym (gfc_symbol *, int);
kono
parents:
diff changeset
272 bool set_verify_bind_c_com_block (gfc_common_head *, int);
kono
parents:
diff changeset
273 bool get_bind_c_idents (void);
kono
parents:
diff changeset
274 match gfc_match_bind_c_stmt (void);
kono
parents:
diff changeset
275 match gfc_match_suffix (gfc_symbol *, gfc_symbol **);
kono
parents:
diff changeset
276 match gfc_match_bind_c (gfc_symbol *, bool);
kono
parents:
diff changeset
277 match gfc_get_type_attr_spec (symbol_attribute *, char*);
kono
parents:
diff changeset
278
kono
parents:
diff changeset
279 /* primary.c. */
kono
parents:
diff changeset
280 match gfc_match_structure_constructor (gfc_symbol *, gfc_expr **);
kono
parents:
diff changeset
281 match gfc_match_variable (gfc_expr **, int);
kono
parents:
diff changeset
282 match gfc_match_equiv_variable (gfc_expr **);
kono
parents:
diff changeset
283 match gfc_match_actual_arglist (int, gfc_actual_arglist **, bool = false);
kono
parents:
diff changeset
284 match gfc_match_literal_constant (gfc_expr **, int);
kono
parents:
diff changeset
285
kono
parents:
diff changeset
286 /* expr.c -- FIXME: this one should be eliminated by moving the
kono
parents:
diff changeset
287 matcher to matchexp.c and a call to a new function in expr.c that
kono
parents:
diff changeset
288 only makes sure the init expr. is valid. */
kono
parents:
diff changeset
289 bool gfc_reduce_init_expr (gfc_expr *expr);
kono
parents:
diff changeset
290 match gfc_match_init_expr (gfc_expr **);
kono
parents:
diff changeset
291
kono
parents:
diff changeset
292 /* array.c. */
kono
parents:
diff changeset
293 match gfc_match_array_spec (gfc_array_spec **, bool, bool);
kono
parents:
diff changeset
294 match gfc_match_array_ref (gfc_array_ref *, gfc_array_spec *, int, int);
kono
parents:
diff changeset
295 match gfc_match_array_constructor (gfc_expr **);
kono
parents:
diff changeset
296
kono
parents:
diff changeset
297 /* interface.c. */
kono
parents:
diff changeset
298 match gfc_match_abstract_interface (void);
kono
parents:
diff changeset
299 match gfc_match_generic_spec (interface_type *, char *, gfc_intrinsic_op *);
kono
parents:
diff changeset
300 match gfc_match_interface (void);
kono
parents:
diff changeset
301 match gfc_match_end_interface (void);
kono
parents:
diff changeset
302
kono
parents:
diff changeset
303 /* io.c. */
kono
parents:
diff changeset
304 match gfc_match_format (void);
kono
parents:
diff changeset
305 match gfc_match_open (void);
kono
parents:
diff changeset
306 match gfc_match_close (void);
kono
parents:
diff changeset
307 match gfc_match_endfile (void);
kono
parents:
diff changeset
308 match gfc_match_backspace (void);
kono
parents:
diff changeset
309 match gfc_match_rewind (void);
kono
parents:
diff changeset
310 match gfc_match_flush (void);
kono
parents:
diff changeset
311 match gfc_match_inquire (void);
kono
parents:
diff changeset
312 match gfc_match_read (void);
kono
parents:
diff changeset
313 match gfc_match_wait (void);
kono
parents:
diff changeset
314 match gfc_match_write (void);
kono
parents:
diff changeset
315 match gfc_match_print (void);
kono
parents:
diff changeset
316
kono
parents:
diff changeset
317 /* matchexp.c. */
kono
parents:
diff changeset
318 match gfc_match_defined_op_name (char *, int);
kono
parents:
diff changeset
319 match gfc_match_expr (gfc_expr **);
kono
parents:
diff changeset
320
kono
parents:
diff changeset
321 /* module.c. */
kono
parents:
diff changeset
322 match gfc_match_use (void);
kono
parents:
diff changeset
323 match gfc_match_submodule (void);
kono
parents:
diff changeset
324 void gfc_use_modules (void);
kono
parents:
diff changeset
325
kono
parents:
diff changeset
326 #endif /* GFC_MATCH_H */
kono
parents:
diff changeset
327