2 |
7u83 |
1 |
/*
|
|
|
2 |
Crown Copyright (c) 1997
|
|
|
3 |
|
|
|
4 |
This TenDRA(r) Computer Program is subject to Copyright
|
|
|
5 |
owned by the United Kingdom Secretary of State for Defence
|
|
|
6 |
acting through the Defence Evaluation and Research Agency
|
|
|
7 |
(DERA). It is made available to Recipients with a
|
|
|
8 |
royalty-free licence for its use, reproduction, transfer
|
|
|
9 |
to other parties and amendment for any purpose not excluding
|
|
|
10 |
product development provided that any such use et cetera
|
|
|
11 |
shall be deemed to be acceptance of the following conditions:-
|
|
|
12 |
|
|
|
13 |
(1) Its Recipients shall ensure that this Notice is
|
|
|
14 |
reproduced upon any copies or amended versions of it;
|
|
|
15 |
|
|
|
16 |
(2) Any amended version of it shall be clearly marked to
|
|
|
17 |
show both the nature of and the organisation responsible
|
|
|
18 |
for the relevant amendment or amendments;
|
|
|
19 |
|
|
|
20 |
(3) Its onward transfer from a recipient to another
|
|
|
21 |
party shall be deemed to be that party's acceptance of
|
|
|
22 |
these conditions;
|
|
|
23 |
|
|
|
24 |
(4) DERA gives no warranty or assurance as to its
|
|
|
25 |
quality or suitability for any purpose and DERA accepts
|
|
|
26 |
no liability whatsoever in relation to any use to which
|
|
|
27 |
it may be put.
|
|
|
28 |
*/
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
/**********************************************************************
|
|
|
32 |
$Author: release $
|
|
|
33 |
$Date: 1998/01/17 15:57:25 $
|
|
|
34 |
$Revision: 1.1.1.1 $
|
|
|
35 |
$Log: namedecs.h,v $
|
|
|
36 |
* Revision 1.1.1.1 1998/01/17 15:57:25 release
|
|
|
37 |
* First version to be checked into rolling release.
|
|
|
38 |
*
|
|
|
39 |
* Revision 1.1 1995/04/07 14:29:07 currie
|
|
|
40 |
* Initial revision
|
|
|
41 |
*
|
|
|
42 |
* Revision 1.3 1994/12/01 15:35:51 currie
|
|
|
43 |
* Fixed common_tagdefs
|
|
|
44 |
*
|
|
|
45 |
* Revision 1.2 1994/07/21 10:36:27 currie
|
|
|
46 |
* Added banner
|
|
|
47 |
*
|
|
|
48 |
***********************************************************************/
|
|
|
49 |
#ifndef NAMEDECS_INCLUDED
|
|
|
50 |
#define NAMEDECS_INCLUDED
|
|
|
51 |
|
|
|
52 |
#include "units.h"
|
|
|
53 |
|
|
|
54 |
|
|
|
55 |
typedef struct{ char * id; Name name;} IdName;
|
|
|
56 |
|
|
|
57 |
typedef struct Sort_struct{ int sort; struct Toksort_struct * toksort;} Sort;
|
|
|
58 |
/* sort of TOKEN is { token_sort , ptr to res and pars}
|
|
|
59 |
other sorts are { X_sort, nil}
|
|
|
60 |
*/
|
|
|
61 |
|
|
|
62 |
|
|
|
63 |
typedef struct Toksort_struct{Sort ressort;
|
|
|
64 |
struct Tokpar_struct * pars;} TokSort;
|
|
|
65 |
/* if ressort is token then pars = nil */
|
|
|
66 |
|
|
|
67 |
|
|
|
68 |
typedef struct Tokpar_struct { Sort par;
|
|
|
69 |
struct Tokpar_struct * next; } Tokpar;
|
|
|
70 |
|
|
|
71 |
|
|
|
72 |
typedef struct Tokdec_struct
|
|
|
73 |
{ IdName idname;
|
|
|
74 |
TokSort sort;
|
|
|
75 |
struct Tokdec_struct * next;
|
|
|
76 |
Bool isdeffed; Bool isused; Bool iskept; Bool isparam;
|
|
|
77 |
} Tokdec;
|
|
|
78 |
|
|
|
79 |
extern Tokdec * tokdecs;
|
|
|
80 |
|
|
|
81 |
typedef union { Name shtok; TDF tdfsh; } Tagshape;
|
|
|
82 |
|
|
|
83 |
typedef struct Tagdec_struct
|
|
|
84 |
{ IdName idname; Bool isvar; Bool isdeffed; char hassh;
|
|
|
85 |
Bool isused; Bool iskept; Bool iscommon;
|
|
|
86 |
Tagshape sh; struct Tagdec_struct * next;
|
|
|
87 |
} Tagdec;
|
|
|
88 |
|
|
|
89 |
extern Tagdec * tagdecs;
|
|
|
90 |
extern Tagdec * localdecs;
|
|
|
91 |
|
|
|
92 |
|
|
|
93 |
typedef struct Al_tagdec_struct
|
|
|
94 |
{ IdName idname;
|
|
|
95 |
struct Al_tagdec_struct * next;
|
|
|
96 |
Bool isdeffed; Bool iskept; Bool isused;} Al_tagdec;
|
|
|
97 |
|
|
|
98 |
extern Al_tagdec * al_tagdecs;
|
|
|
99 |
|
|
|
100 |
typedef struct Labdec_struct
|
|
|
101 |
{ IdName idname; Bool declared;
|
|
|
102 |
struct Labdec_struct * next ;} Labdec;
|
|
|
103 |
|
|
|
104 |
extern Labdec * labdecs;
|
|
|
105 |
|
|
|
106 |
extern Tokdec * find_tok PROTO_S((char * s));
|
|
|
107 |
extern Tagdec * find_tag PROTO_S((char * s));
|
|
|
108 |
extern Al_tagdec * find_al_tag PROTO_S((char * s));
|
|
|
109 |
extern Labdec * find_lab PROTO_S((char * s));
|
|
|
110 |
|
|
|
111 |
#define NEW_IDNAME(idn, s,ent)\
|
|
|
112 |
(idn).id = s; (idn).name = next_name(ent);
|
|
|
113 |
|
|
|
114 |
#define LOCNAME(x) (unsigned long)((x).name.unit_name)
|
|
|
115 |
|
|
|
116 |
#endif
|