acinclude.m4: Restore the situation that we don't build modules on darwin.
[official-gcc.git] / gcc / fortran / match.h
blob19340cee0f185587378fab1c24f31de009d7d90a
1 /* All matcher functions.
2 Copyright (C) 2003, 2005 Free Software Foundation, Inc.
3 Contributed by Steven Bosscher
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
10 version.
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING. If not, write to the Free
19 Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
20 02110-1301, USA. */
23 #ifndef GFC_MATCH_H
24 #define GFC_MATCH_H
26 #include "gfortran.h"
28 /* gfc_new_block points to the symbol of a newly matched block. */
29 extern gfc_symbol *gfc_new_block;
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. */
34 extern gfc_st_label *gfc_statement_label;
36 /****************** All gfc_match* routines *****************/
38 /* match.c */
40 /* Generic match subroutines */
41 match gfc_match_space (void);
42 match gfc_match_eos (void);
43 match gfc_match_small_literal_int (int *, int *);
44 match gfc_match_st_label (gfc_st_label **);
45 match gfc_match_label (void);
46 match gfc_match_small_int (int *);
47 int gfc_match_strings (mstring *);
48 match gfc_match_name (char *);
49 match gfc_match_symbol (gfc_symbol **, int);
50 match gfc_match_sym_tree (gfc_symtree **, int);
51 match gfc_match_intrinsic_op (gfc_intrinsic_op *);
52 match gfc_match_char (char);
53 match gfc_match (const char *, ...);
54 match gfc_match_iterator (gfc_iterator *, int);
56 /* Statement matchers */
57 match gfc_match_program (void);
58 match gfc_match_pointer_assignment (void);
59 match gfc_match_assignment (void);
60 match gfc_match_if (gfc_statement *);
61 match gfc_match_else (void);
62 match gfc_match_elseif (void);
63 match gfc_match_do (void);
64 match gfc_match_cycle (void);
65 match gfc_match_exit (void);
66 match gfc_match_pause (void);
67 match gfc_match_stop (void);
68 match gfc_match_continue (void);
69 match gfc_match_assign (void);
70 match gfc_match_goto (void);
72 match gfc_match_allocate (void);
73 match gfc_match_nullify (void);
74 match gfc_match_deallocate (void);
75 match gfc_match_return (void);
76 match gfc_match_call (void);
77 match gfc_match_common (void);
78 match gfc_match_block_data (void);
79 match gfc_match_namelist (void);
80 match gfc_match_module (void);
81 match gfc_match_equivalence (void);
82 match gfc_match_st_function (void);
83 match gfc_match_case (void);
84 match gfc_match_select (void);
85 match gfc_match_where (gfc_statement *);
86 match gfc_match_elsewhere (void);
87 match gfc_match_forall (gfc_statement *);
89 /* Other functions. */
91 gfc_common_head *gfc_get_common (const char *, int);
93 /* openmp.c */
95 /* OpenMP directive matchers */
96 match gfc_match_omp_eos (void);
97 match gfc_match_omp_atomic (void);
98 match gfc_match_omp_barrier (void);
99 match gfc_match_omp_critical (void);
100 match gfc_match_omp_do (void);
101 match gfc_match_omp_flush (void);
102 match gfc_match_omp_master (void);
103 match gfc_match_omp_ordered (void);
104 match gfc_match_omp_parallel (void);
105 match gfc_match_omp_parallel_do (void);
106 match gfc_match_omp_parallel_sections (void);
107 match gfc_match_omp_parallel_workshare (void);
108 match gfc_match_omp_sections (void);
109 match gfc_match_omp_single (void);
110 match gfc_match_omp_threadprivate (void);
111 match gfc_match_omp_workshare (void);
112 match gfc_match_omp_end_nowait (void);
113 match gfc_match_omp_end_single (void);
115 /* decl.c */
117 match gfc_match_data (void);
118 match gfc_match_null (gfc_expr **);
119 match gfc_match_kind_spec (gfc_typespec *);
120 match gfc_match_old_kind_spec (gfc_typespec *);
122 match gfc_match_end (gfc_statement *);
123 match gfc_match_data_decl (void);
124 match gfc_match_formal_arglist (gfc_symbol *, int, int);
125 match gfc_match_function_decl (void);
126 match gfc_match_entry (void);
127 match gfc_match_subroutine (void);
128 match gfc_match_derived_decl (void);
130 match gfc_match_implicit_none (void);
131 match gfc_match_implicit (void);
133 void gfc_set_constant_character_len (int, gfc_expr *);
135 /* Matchers for attribute declarations */
136 match gfc_match_allocatable (void);
137 match gfc_match_dimension (void);
138 match gfc_match_external (void);
139 match gfc_match_intent (void);
140 match gfc_match_intrinsic (void);
141 match gfc_match_optional (void);
142 match gfc_match_parameter (void);
143 match gfc_match_pointer (void);
144 match gfc_match_private (gfc_statement *);
145 match gfc_match_public (gfc_statement *);
146 match gfc_match_save (void);
147 match gfc_match_modproc (void);
148 match gfc_match_target (void);
150 /* primary.c */
151 match gfc_match_structure_constructor (gfc_symbol *, gfc_expr **);
152 match gfc_match_rvalue (gfc_expr **);
153 match gfc_match_variable (gfc_expr **, int);
154 match gfc_match_equiv_variable (gfc_expr **);
155 match gfc_match_actual_arglist (int, gfc_actual_arglist **);
156 match gfc_match_literal_constant (gfc_expr **, int);
158 /* expr.c -- FIXME: this one should be eliminated by moving the
159 matcher to matchexp.c and a call to a new function in expr.c that
160 only makes sure the init expr. is valid. */
161 match gfc_match_init_expr (gfc_expr **);
163 /* array.c */
164 match gfc_match_array_spec (gfc_array_spec **);
165 match gfc_match_array_ref (gfc_array_ref *, gfc_array_spec *, int);
166 match gfc_match_array_constructor (gfc_expr **);
168 /* interface.c */
169 match gfc_match_generic_spec (interface_type *, char *, gfc_intrinsic_op *);
170 match gfc_match_interface (void);
171 match gfc_match_end_interface (void);
173 /* io.c */
174 match gfc_match_format (void);
175 match gfc_match_open (void);
176 match gfc_match_close (void);
177 match gfc_match_endfile (void);
178 match gfc_match_backspace (void);
179 match gfc_match_rewind (void);
180 match gfc_match_flush (void);
181 match gfc_match_inquire (void);
182 match gfc_match_read (void);
183 match gfc_match_write (void);
184 match gfc_match_print (void);
186 /* matchexp.c */
187 match gfc_match_defined_op_name (char *, int);
188 match gfc_match_expr (gfc_expr **);
190 /* module.c */
191 match gfc_match_use (void);
192 void gfc_use_module (void);
194 #endif /* GFC_MATCH_H */