Use MODE_BASE_REG_CLASS in legitimize macros.
[official-gcc.git] / gcc / f / name.h
blob4b18805d3d0a55e06e7d101f674c9f335478d288
1 /* name.h -- Public #include File (module.h template V1.0)
2 Copyright (C) 1995 Free Software Foundation, Inc.
3 Contributed by James Craig Burley.
5 This file is part of GNU Fortran.
7 GNU Fortran is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
12 GNU Fortran is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GNU Fortran; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA.
22 Owning Modules:
23 name.c
25 Modifications:
28 /* Allow multiple inclusion to work. */
30 #ifndef GCC_F_NAME_H
31 #define GCC_F_NAME_H
33 /* Simple definitions and enumerations. */
36 /* Typedefs. */
38 typedef struct _ffename_ *ffename;
39 typedef struct _ffename_space_ *ffenameSpace;
41 /* Include files needed by this one. */
43 #include "global.h"
44 #include "lex.h"
45 #include "malloc.h"
46 #include "symbol.h"
48 /* Structure definitions. */
50 struct _ffename_
52 ffename next;
53 ffename previous;
54 ffelexToken t;
55 union
57 ffesymbol s;
58 ffeglobal g;
63 struct _ffename_space_
65 ffename first;
66 ffename last;
67 mallocPool pool;
70 /* Global objects accessed by users of this module. */
73 /* Declare functions with prototypes. */
75 ffename ffename_find (ffenameSpace ns, ffelexToken t);
76 void ffename_kill (ffenameSpace ns, ffename n);
77 ffename ffename_lookup (ffenameSpace ns, ffelexToken t);
78 void ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) (ffeglobal));
79 void ffename_space_drive_symbol (ffenameSpace ns, ffesymbol (*fn) (ffesymbol));
80 void ffename_space_kill (ffenameSpace ns);
81 ffenameSpace ffename_space_new (mallocPool pool);
83 /* Define macros. */
85 #define ffename_first_token(n) ((n)->t)
86 #define ffename_global(n) ((n)->u.g)
87 #define ffename_init_0()
88 #define ffename_init_1()
89 #define ffename_init_2()
90 #define ffename_init_3()
91 #define ffename_init_4()
92 #define ffename_set_global(n,glob) ((n)->u.g = (glob))
93 #define ffename_set_symbol(n,sym) ((n)->u.s = (sym))
94 #define ffename_symbol(n) ((n)->u.s)
95 #define ffename_terminate_0()
96 #define ffename_terminate_1()
97 #define ffename_terminate_2()
98 #define ffename_terminate_3()
99 #define ffename_terminate_4()
100 #define ffename_text(n) ffelex_token_text((n)->t)
101 #define ffename_token(n) ((n)->t)
102 #define ffename_where_filename(n) ffelex_token_where_filename((n)->t)
103 #define ffename_where_filelinenum(n) ffelex_token_where_filelinenum((n)->t)
104 #define ffename_where_line(n) ffelex_token_where_line((n)->t)
105 #define ffename_where_column(n) ffelex_token_where_column((n)->t)
107 /* End of #include file. */
109 #endif /* ! GCC_F_NAME_H */