Home | History | Annotate | Download | only in src

Lines Matching refs:ext

160 compute_exts_from_gf (const char *ext)
162 src_extension = tr (ext, 'y', 'c');
164 header_extension = tr (ext, 'y', 'h');
170 compute_exts_from_src (const char *ext)
175 src_extension = xstrdup (ext);
176 header_extension = tr (ext, 'c', 'h');
181 /* Decompose FILE_NAME in four parts: *BASE, *TAB, and *EXT, the fourth
185 *EXT points to the last period in the basename, or NULL if none.
187 If there is no *EXT, *TAB is NULL. Otherwise, *TAB points to
188 `.tab' or `_tab' if present right before *EXT, or is NULL. *TAB
194 '/tmp/foo.tab.c' -> *BASE = 'foo.tab.c', *TAB = '.tab.c', *EXT =
197 'foo.c' -> *BASE = 'foo.c', *TAB = NULL, *EXT = '.c'
199 'tab.c' -> *BASE = 'tab.c', *TAB = NULL, *EXT = '.c'
201 '.tab.c' -> *BASE = '.tab.c', *TAB = NULL, *EXT = '.c'
203 'foo.tab' -> *BASE = 'foo.tab', *TAB = NULL, *EXT = '.tab'
205 'foo_tab' -> *BASE = 'foo_tab', *TAB = NULL, *EXT = NULL
207 'foo' -> *BASE = 'foo', *TAB = NULL, *EXT = NULL. */
211 const char **base, const char **tab, const char **ext)
216 *ext = strrchr (*base, '.');
221 if (*ext)
223 size_t baselen = *ext - *base;
226 && (strncmp (*ext - dottablen, ".tab", dottablen) == 0
227 || strncmp (*ext - dottablen, "_tab", dottablen) == 0))
228 *tab = *ext - dottablen;
236 const char *base, *tab, *ext;
245 file_name_split (spec_outfile, &base, &tab, &ext);
248 /* ALL_BUT_EXT goes up the EXT, excluding it. */
251 (strlen (spec_outfile) - (ext ? strlen (ext) : 0)));
257 - (tab ? strlen (tab) : (ext ? strlen (ext) : 0))));
259 if (ext)
260 compute_exts_from_src (ext);
264 file_name_split (grammar_file, &base, &tab, &ext);
284 xstrndup (base, (strlen (base) - (ext ? strlen (ext) : 0)));
290 if (ext && !yacc_flag)
291 compute_exts_from_gf (ext);