68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1 /* MD reader definitions.
|
111
|
2 Copyright (C) 1987-2017 Free Software Foundation, Inc.
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
3
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
4 This file is part of GCC.
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
5
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
6 GCC is free software; you can redistribute it and/or modify it under
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
7 the terms of the GNU General Public License as published by the Free
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
8 Software Foundation; either version 3, or (at your option) any later
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
9 version.
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
10
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
14 for more details.
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
15
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
16 You should have received a copy of the GNU General Public License
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
17 along with GCC; see the file COPYING3. If not see
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
18 <http://www.gnu.org/licenses/>. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
19
|
111
|
20 #ifndef GCC_READ_MD_H
|
|
21 #define GCC_READ_MD_H
|
|
22
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
23 #include "obstack.h"
|
111
|
24
|
|
25 /* Records a position in the file. */
|
|
26 struct file_location {
|
|
27 file_location () {}
|
|
28 file_location (const char *, int, int);
|
|
29
|
|
30 const char *filename;
|
|
31 int lineno;
|
|
32 int colno;
|
|
33 };
|
|
34
|
|
35 inline file_location::file_location (const char *filename_in, int lineno_in, int colno_in)
|
|
36 : filename (filename_in), lineno (lineno_in), colno (colno_in) {}
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
37
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
38 /* Holds one symbol or number in the .md file. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
39 struct md_name {
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
40 /* The name as it appeared in the .md file. Names are syntactically
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
41 limited to the length of this buffer. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
42 char buffer[256];
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
43
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
44 /* The name that should actually be used by the generator programs.
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
45 This is an expansion of NAME, after things like constant substitution. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
46 char *string;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
47 };
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
48
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
49 /* This structure represents a constant defined by define_constant,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
50 define_enum, or such-like. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
51 struct md_constant {
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
52 /* The name of the constant. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
53 char *name;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
54
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
55 /* The string to which the constants expands. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
56 char *value;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
57
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
58 /* If the constant is associated with a enumeration, this field
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
59 points to that enumeration, otherwise it is null. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
60 struct enum_type *parent_enum;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
61 };
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
62
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
63 /* This structure represents one value in an enum_type. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
64 struct enum_value {
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
65 /* The next value in the enum, or null if this is the last. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
66 struct enum_value *next;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
67
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
68 /* The name of the value as it appears in the .md file. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
69 char *name;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
70
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
71 /* The definition of the related C value. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
72 struct md_constant *def;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
73 };
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
74
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
75 /* This structure represents an enum defined by define_enum or the like. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
76 struct enum_type {
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
77 /* The C name of the enumeration. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
78 char *name;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
79
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
80 /* True if this is an md-style enum (DEFINE_ENUM) rather than
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
81 a C-style enum (DEFINE_C_ENUM). */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
82 bool md_p;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
83
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
84 /* The values of the enumeration. There is always at least one. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
85 struct enum_value *values;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
86
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
87 /* A pointer to the null terminator in VALUES. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
88 struct enum_value **tail_ptr;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
89
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
90 /* The number of enumeration values. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
91 unsigned int num_values;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
92 };
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
93
|
111
|
94 /* A class for reading .md files and RTL dump files.
|
|
95
|
|
96 Implemented in read-md.c.
|
|
97
|
|
98 This class has responsibility for reading chars from input files, and
|
|
99 for certain common top-level directives including the "include"
|
|
100 directive.
|
|
101
|
|
102 It does not handle parsing the hierarchically-nested expressions of
|
|
103 rtl.def; for that see the rtx_reader subclass below (implemented in
|
|
104 read-rtl.c). */
|
|
105
|
|
106 class md_reader
|
|
107 {
|
|
108 public:
|
|
109 md_reader (bool compact);
|
|
110 virtual ~md_reader ();
|
|
111
|
|
112 bool read_md_files (int, const char **, bool (*) (const char *));
|
|
113 bool read_file (const char *filename);
|
|
114 bool read_file_fragment (const char *filename,
|
|
115 int first_line,
|
|
116 int last_line);
|
|
117
|
|
118 /* A hook that handles a single .md-file directive, up to but not
|
|
119 including the closing ')'. It takes two arguments: the file position
|
|
120 at which the directive started, and the name of the directive. The next
|
|
121 unread character is the optional space after the directive name. */
|
|
122 virtual void handle_unknown_directive (file_location, const char *) = 0;
|
|
123
|
|
124 file_location get_current_location () const;
|
|
125
|
|
126 bool is_compact () const { return m_compact; }
|
|
127
|
|
128 /* Defined in read-md.c. */
|
|
129 int read_char (void);
|
|
130 void unread_char (int ch);
|
|
131 file_location read_name (struct md_name *name);
|
|
132 file_location read_name_or_nil (struct md_name *);
|
|
133 void read_escape ();
|
|
134 char *read_quoted_string ();
|
|
135 char *read_braced_string ();
|
|
136 char *read_string (int star_if_braced);
|
|
137 void read_skip_construct (int depth, file_location loc);
|
|
138 void require_char (char expected);
|
|
139 void require_char_ws (char expected);
|
|
140 void require_word_ws (const char *expected);
|
|
141 int peek_char (void);
|
|
142
|
|
143 void set_md_ptr_loc (const void *ptr, const char *filename, int lineno);
|
|
144 const struct ptr_loc *get_md_ptr_loc (const void *ptr);
|
|
145 void copy_md_ptr_loc (const void *new_ptr, const void *old_ptr);
|
|
146 void fprint_md_ptr_loc (FILE *outf, const void *ptr);
|
|
147 void print_md_ptr_loc (const void *ptr);
|
|
148
|
|
149 struct enum_type *lookup_enum_type (const char *name);
|
|
150 void traverse_enum_types (htab_trav callback, void *info);
|
|
151
|
|
152 void handle_constants ();
|
|
153 void traverse_md_constants (htab_trav callback, void *info);
|
|
154 void handle_enum (file_location loc, bool md_p);
|
|
155
|
|
156 const char *join_c_conditions (const char *cond1, const char *cond2);
|
|
157 void fprint_c_condition (FILE *outf, const char *cond);
|
|
158 void print_c_condition (const char *cond);
|
|
159
|
|
160 /* Defined in read-rtl.c. */
|
|
161 const char *apply_iterator_to_string (const char *string);
|
|
162 rtx copy_rtx_for_iterators (rtx original);
|
|
163 void read_conditions ();
|
|
164 void record_potential_iterator_use (struct iterator_group *group,
|
|
165 rtx x, unsigned int index,
|
|
166 const char *name);
|
|
167 struct mapping *read_mapping (struct iterator_group *group, htab_t table);
|
|
168
|
|
169 const char *get_top_level_filename () const { return m_toplevel_fname; }
|
|
170 const char *get_filename () const { return m_read_md_filename; }
|
|
171 int get_lineno () const { return m_read_md_lineno; }
|
|
172 int get_colno () const { return m_read_md_colno; }
|
|
173
|
|
174 struct obstack *get_string_obstack () { return &m_string_obstack; }
|
|
175 htab_t get_md_constants () { return m_md_constants; }
|
|
176
|
|
177 private:
|
|
178 /* A singly-linked list of filenames. */
|
|
179 struct file_name_list {
|
|
180 struct file_name_list *next;
|
|
181 const char *fname;
|
|
182 };
|
|
183
|
|
184 private:
|
|
185 void handle_file ();
|
|
186 void handle_toplevel_file ();
|
|
187 void handle_include (file_location loc);
|
|
188 void add_include_path (const char *arg);
|
|
189
|
|
190 bool read_name_1 (struct md_name *name, file_location *out_loc);
|
|
191
|
|
192 private:
|
|
193 /* Are we reading a compact dump? */
|
|
194 bool m_compact;
|
|
195
|
|
196 /* The name of the toplevel file that indirectly included
|
|
197 m_read_md_file. */
|
|
198 const char *m_toplevel_fname;
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
199
|
111
|
200 /* The directory part of m_toplevel_fname
|
|
201 NULL if m_toplevel_fname is a bare filename. */
|
|
202 char *m_base_dir;
|
|
203
|
|
204 /* The file we are reading. */
|
|
205 FILE *m_read_md_file;
|
|
206
|
|
207 /* The filename of m_read_md_file. */
|
|
208 const char *m_read_md_filename;
|
|
209
|
|
210 /* The current line number in m_read_md_file. */
|
|
211 int m_read_md_lineno;
|
|
212
|
|
213 /* The current column number in m_read_md_file. */
|
|
214 int m_read_md_colno;
|
|
215
|
|
216 /* The column number before the last newline, so that
|
|
217 we can handle unread_char ('\n') at least once whilst
|
|
218 retaining column information. */
|
|
219 int m_last_line_colno;
|
|
220
|
|
221 /* The first directory to search. */
|
|
222 file_name_list *m_first_dir_md_include;
|
|
223
|
|
224 /* A pointer to the null terminator of the md include chain. */
|
|
225 file_name_list **m_last_dir_md_include_ptr;
|
|
226
|
|
227 /* Obstack used for allocating MD strings. */
|
|
228 struct obstack m_string_obstack;
|
|
229
|
|
230 /* A table of ptr_locs, hashed on the PTR field. */
|
|
231 htab_t m_ptr_locs;
|
|
232
|
|
233 /* An obstack for the above. Plain xmalloc is a bit heavyweight for a
|
|
234 small structure like ptr_loc. */
|
|
235 struct obstack m_ptr_loc_obstack;
|
|
236
|
|
237 /* A hash table of triples (A, B, C), where each of A, B and C is a condition
|
|
238 and A is equivalent to "B && C". This is used to keep track of the source
|
|
239 of conditions that are made up of separate MD strings (such as the split
|
|
240 condition of a define_insn_and_split). */
|
|
241 htab_t m_joined_conditions;
|
|
242
|
|
243 /* An obstack for allocating joined_conditions entries. */
|
|
244 struct obstack m_joined_conditions_obstack;
|
|
245
|
|
246 /* A table of md_constant structures, hashed by name. Null if no
|
|
247 constant expansion should occur. */
|
|
248 htab_t m_md_constants;
|
|
249
|
|
250 /* A table of enum_type structures, hashed by name. */
|
|
251 htab_t m_enum_types;
|
|
252
|
|
253 /* If non-zero, filter the input to just this subset of lines. */
|
|
254 int m_first_line;
|
|
255 int m_last_line;
|
|
256 };
|
|
257
|
|
258 /* Global singleton; constrast with rtx_reader_ptr below. */
|
|
259 extern md_reader *md_reader_ptr;
|
|
260
|
|
261 /* An md_reader subclass which skips unknown directives, for
|
|
262 the gen* tools that purely use read-md.o. */
|
|
263
|
|
264 class noop_reader : public md_reader
|
|
265 {
|
|
266 public:
|
|
267 noop_reader () : md_reader (false) {}
|
|
268
|
|
269 /* A dummy implementation which skips unknown directives. */
|
|
270 void handle_unknown_directive (file_location, const char *);
|
|
271 };
|
|
272
|
|
273 /* An md_reader subclass that actually handles full hierarchical
|
|
274 rtx expressions.
|
|
275
|
|
276 Implemented in read-rtl.c. */
|
|
277
|
|
278 class rtx_reader : public md_reader
|
|
279 {
|
|
280 public:
|
|
281 rtx_reader (bool compact);
|
|
282 ~rtx_reader ();
|
|
283
|
|
284 bool read_rtx (const char *rtx_name, vec<rtx> *rtxen);
|
|
285 rtx read_rtx_code (const char *code_name);
|
|
286 virtual rtx read_rtx_operand (rtx return_rtx, int idx);
|
|
287 rtx read_nested_rtx ();
|
|
288 rtx read_rtx_variadic (rtx form);
|
|
289 char *read_until (const char *terminator_chars, bool consume_terminator);
|
|
290
|
|
291 virtual void handle_any_trailing_information (rtx) {}
|
|
292 virtual rtx postprocess (rtx x) { return x; }
|
|
293
|
|
294 /* Hook to allow function_reader subclass to put STRINGBUF into gc-managed
|
|
295 memory, rather than within an obstack.
|
|
296 This base class implementation is a no-op. */
|
|
297 virtual const char *finalize_string (char *stringbuf) { return stringbuf; }
|
|
298
|
|
299 protected:
|
|
300 /* Analogous to rtx_writer's m_in_call_function_usage. */
|
|
301 bool m_in_call_function_usage;
|
|
302
|
|
303 /* Support for "reuse_rtx" directives. */
|
|
304 auto_vec<rtx> m_reuse_rtx_by_id;
|
|
305 };
|
|
306
|
|
307 /* Global singleton; constrast with md_reader_ptr above. */
|
|
308 extern rtx_reader *rtx_reader_ptr;
|
|
309
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
310 extern void (*include_callback) (const char *);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
311
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
312 /* Read the next character from the MD file. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
313
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
314 static inline int
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
315 read_char (void)
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
316 {
|
111
|
317 return md_reader_ptr->read_char ();
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
318 }
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
319
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
320 /* Put back CH, which was the last character read from the MD file. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
321
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
322 static inline void
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
323 unread_char (int ch)
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
324 {
|
111
|
325 md_reader_ptr->unread_char (ch);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
326 }
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
327
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
328 extern hashval_t leading_string_hash (const void *);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
329 extern int leading_string_eq_p (const void *, const void *);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
330 extern const char *join_c_conditions (const char *, const char *);
|
111
|
331 extern void message_at (file_location, const char *, ...) ATTRIBUTE_PRINTF_2;
|
|
332 extern void error_at (file_location, const char *, ...) ATTRIBUTE_PRINTF_2;
|
|
333 extern void fatal_at (file_location, const char *, ...) ATTRIBUTE_PRINTF_2;
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
334 extern void fatal_with_file_and_line (const char *, ...)
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
335 ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
336 extern void fatal_expected_char (int, int) ATTRIBUTE_NORETURN;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
337 extern int read_skip_spaces (void);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
338 extern int n_comma_elts (const char *);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
339 extern const char *scan_comma_elt (const char **);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
340 extern void upcase_string (char *);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
341 extern void traverse_enum_types (htab_trav, void *);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
342 extern struct enum_type *lookup_enum_type (const char *);
|
111
|
343
|
|
344 #endif /* GCC_READ_MD_H */
|