]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/fortran/match.h
* c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to
[thirdparty/gcc.git] / gcc / fortran / match.h
CommitLineData
4ee9c684 1/* All matcher functions.
f3db21c0 2 Copyright (C) 2003, 2005, 2007, 2008
f6d0e37a 3 Free Software Foundation, Inc.
4ee9c684 4 Contributed by Steven Bosscher
5
c84b470d 6This file is part of GCC.
4ee9c684 7
c84b470d 8GCC is free software; you can redistribute it and/or modify it under
9the terms of the GNU General Public License as published by the Free
bdabe786 10Software Foundation; either version 3, or (at your option) any later
c84b470d 11version.
4ee9c684 12
c84b470d 13GCC is distributed in the hope that it will be useful, but WITHOUT ANY
14WARRANTY; without even the implied warranty of MERCHANTABILITY or
15FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16for more details.
4ee9c684 17
18You should have received a copy of the GNU General Public License
bdabe786 19along with GCC; see the file COPYING3. If not see
20<http://www.gnu.org/licenses/>. */
4ee9c684 21
22
23#ifndef GFC_MATCH_H
24#define GFC_MATCH_H
25
26#include "gfortran.h"
27
28/* gfc_new_block points to the symbol of a newly matched block. */
29extern gfc_symbol *gfc_new_block;
30
31/* Current statement label. Zero means no statement label. Because
32 new_st can get wiped during statement matching, we have to keep it
33 separate. */
34extern gfc_st_label *gfc_statement_label;
35
36/****************** All gfc_match* routines *****************/
37
f6d0e37a 38/* match.c. */
4ee9c684 39
f6d0e37a 40/* Generic match subroutines. */
e0be6f02 41match gfc_match_special_char (gfc_char_t *);
4ee9c684 42match gfc_match_space (void);
43match gfc_match_eos (void);
a26cd850 44match gfc_match_small_literal_int (int *, int *);
90ba4622 45match gfc_match_st_label (gfc_st_label **);
4ee9c684 46match gfc_match_label (void);
47match gfc_match_small_int (int *);
c5d33754 48match gfc_match_small_int_expr (int *, gfc_expr **);
4ee9c684 49match gfc_match_name (char *);
c5d33754 50match gfc_match_name_C (char *buffer);
4ee9c684 51match gfc_match_symbol (gfc_symbol **, int);
52match gfc_match_sym_tree (gfc_symtree **, int);
53match gfc_match_intrinsic_op (gfc_intrinsic_op *);
54match gfc_match_char (char);
55match gfc_match (const char *, ...);
56match gfc_match_iterator (gfc_iterator *, int);
bd7403cb 57match gfc_match_parens (void);
4ee9c684 58
f6d0e37a 59/* Statement matchers. */
4ee9c684 60match gfc_match_program (void);
61match gfc_match_pointer_assignment (void);
62match gfc_match_assignment (void);
63match gfc_match_if (gfc_statement *);
64match gfc_match_else (void);
65match gfc_match_elseif (void);
66match gfc_match_do (void);
67match gfc_match_cycle (void);
68match gfc_match_exit (void);
69match gfc_match_pause (void);
70match gfc_match_stop (void);
71match gfc_match_continue (void);
72match gfc_match_assign (void);
73match gfc_match_goto (void);
74
75match gfc_match_allocate (void);
76match gfc_match_nullify (void);
77match gfc_match_deallocate (void);
78match gfc_match_return (void);
79match gfc_match_call (void);
c5d33754 80
81/* We want to use this function to check for a common-block-name
82 that can exist in a bind statement, so removed the "static"
83 declaration of the function in match.c.
84
85 TODO: should probably rename this now that it'll be globally seen to
86 gfc_match_common_name. */
87match match_common_name (char *name);
88
4ee9c684 89match gfc_match_common (void);
4ee9c684 90match gfc_match_block_data (void);
91match gfc_match_namelist (void);
92match gfc_match_module (void);
93match gfc_match_equivalence (void);
94match gfc_match_st_function (void);
4ee9c684 95match gfc_match_case (void);
96match gfc_match_select (void);
97match gfc_match_where (gfc_statement *);
98match gfc_match_elsewhere (void);
99match gfc_match_forall (gfc_statement *);
100
82f5ee13 101/* Other functions. */
102
403ddc45 103gfc_common_head *gfc_get_common (const char *, int);
82f5ee13 104
f6d0e37a 105/* openmp.c. */
764f1175 106
f6d0e37a 107/* OpenMP directive matchers. */
764f1175 108match gfc_match_omp_eos (void);
109match gfc_match_omp_atomic (void);
110match gfc_match_omp_barrier (void);
111match gfc_match_omp_critical (void);
112match gfc_match_omp_do (void);
113match gfc_match_omp_flush (void);
114match gfc_match_omp_master (void);
115match gfc_match_omp_ordered (void);
116match gfc_match_omp_parallel (void);
117match gfc_match_omp_parallel_do (void);
118match gfc_match_omp_parallel_sections (void);
119match gfc_match_omp_parallel_workshare (void);
120match gfc_match_omp_sections (void);
121match gfc_match_omp_single (void);
fd6481cf 122match gfc_match_omp_task (void);
123match gfc_match_omp_taskwait (void);
764f1175 124match gfc_match_omp_threadprivate (void);
125match gfc_match_omp_workshare (void);
126match gfc_match_omp_end_nowait (void);
127match gfc_match_omp_end_single (void);
128
f6d0e37a 129/* decl.c. */
4ee9c684 130
b4f45d02 131match gfc_match_data (void);
4ee9c684 132match gfc_match_null (gfc_expr **);
67a51c8e 133match gfc_match_kind_spec (gfc_typespec *, bool);
4ee9c684 134match gfc_match_old_kind_spec (gfc_typespec *);
67a51c8e 135match gfc_match_type_spec (gfc_typespec *, int);
4ee9c684 136
137match gfc_match_end (gfc_statement *);
138match gfc_match_data_decl (void);
139match gfc_match_formal_arglist (gfc_symbol *, int, int);
af1a34ee 140match gfc_match_procedure (void);
4ee9c684 141match gfc_match_function_decl (void);
142match gfc_match_entry (void);
143match gfc_match_subroutine (void);
144match gfc_match_derived_decl (void);
223f0f57 145match gfc_match_final_decl (void);
4ee9c684 146
39351103 147match gfc_match_implicit_none (void);
148match gfc_match_implicit (void);
149
1bfea7e8 150void gfc_set_constant_character_len (int, gfc_expr *, bool);
a270dc8e 151
f6d0e37a 152/* Matchers for attribute declarations. */
4ee9c684 153match gfc_match_allocatable (void);
154match gfc_match_dimension (void);
155match gfc_match_external (void);
d67fc9ae 156match gfc_match_import (void);
4ee9c684 157match gfc_match_intent (void);
158match gfc_match_intrinsic (void);
159match gfc_match_optional (void);
160match gfc_match_parameter (void);
161match gfc_match_pointer (void);
3ea52af3 162match gfc_match_protected (void);
4ee9c684 163match gfc_match_private (gfc_statement *);
164match gfc_match_public (gfc_statement *);
165match gfc_match_save (void);
166match gfc_match_modproc (void);
167match gfc_match_target (void);
8f6339b6 168match gfc_match_value (void);
ef814c81 169match gfc_match_volatile (void);
4ee9c684 170
c5d33754 171/* decl.c. */
172
173/* Fortran 2003 c interop.
174 TODO: some of these should be moved to another file rather than decl.c */
175void set_com_block_bind_c (gfc_common_head *, int);
176try set_binding_label (char *, const char *, int);
177try set_verify_bind_c_sym (gfc_symbol *, int);
178try set_verify_bind_c_com_block (gfc_common_head *, int);
179try get_bind_c_idents (void);
180match gfc_match_bind_c_stmt (void);
181match gfc_match_suffix (gfc_symbol *, gfc_symbol **);
75ae7f6c 182match gfc_match_bind_c (gfc_symbol *, bool);
c5d33754 183match gfc_get_type_attr_spec (symbol_attribute *);
184
185/* primary.c. */
d88b1bc0 186match gfc_match_structure_constructor (gfc_symbol *, gfc_expr **);
4ee9c684 187match gfc_match_variable (gfc_expr **, int);
8a5a20bd 188match gfc_match_equiv_variable (gfc_expr **);
4ee9c684 189match gfc_match_actual_arglist (int, gfc_actual_arglist **);
190match gfc_match_literal_constant (gfc_expr **, int);
191
192/* expr.c -- FIXME: this one should be eliminated by moving the
193 matcher to matchexp.c and a call to a new function in expr.c that
194 only makes sure the init expr. is valid. */
195match gfc_match_init_expr (gfc_expr **);
196
f6d0e37a 197/* array.c. */
4ee9c684 198match gfc_match_array_spec (gfc_array_spec **);
199match gfc_match_array_ref (gfc_array_ref *, gfc_array_spec *, int);
200match gfc_match_array_constructor (gfc_expr **);
201
f6d0e37a 202/* interface.c. */
94fa7146 203match gfc_match_abstract_interface (void);
4ee9c684 204match gfc_match_generic_spec (interface_type *, char *, gfc_intrinsic_op *);
205match gfc_match_interface (void);
206match gfc_match_end_interface (void);
207
f6d0e37a 208/* io.c. */
4ee9c684 209match gfc_match_format (void);
210match gfc_match_open (void);
211match gfc_match_close (void);
212match gfc_match_endfile (void);
213match gfc_match_backspace (void);
214match gfc_match_rewind (void);
6c306f90 215match gfc_match_flush (void);
4ee9c684 216match gfc_match_inquire (void);
217match gfc_match_read (void);
ff6af856 218match gfc_match_wait (void);
4ee9c684 219match gfc_match_write (void);
220match gfc_match_print (void);
221
f6d0e37a 222/* matchexp.c. */
4ee9c684 223match gfc_match_defined_op_name (char *, int);
224match gfc_match_expr (gfc_expr **);
225
f6d0e37a 226/* module.c. */
4ee9c684 227match gfc_match_use (void);
228void gfc_use_module (void);
229
230#endif /* GFC_MATCH_H */
231