2 |
7u83 |
1 |
/*
|
|
|
2 |
Crown Copyright (c) 1997, 1998
|
|
|
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 |
#ifndef PREDICT_INCLUDED
|
|
|
32 |
#define PREDICT_INCLUDED
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
/*
|
|
|
36 |
PARSER LOOK-AHEAD DECLARATIONS
|
|
|
37 |
|
|
|
38 |
The routines in this module are used to implement look-ahead functions
|
|
|
39 |
within the parser in order to get round some of the more complex parsing
|
|
|
40 |
problems (such as resolving between declarations and expressions).
|
|
|
41 |
*/
|
|
|
42 |
|
|
|
43 |
extern int predict_array PROTO_S ( ( void ) ) ;
|
|
|
44 |
extern int predict_class PROTO_S ( ( int ) ) ;
|
|
|
45 |
extern int predict_decl PROTO_S ( ( void ) ) ;
|
|
|
46 |
extern int predict_destr PROTO_S ( ( NAMESPACE ) ) ;
|
|
|
47 |
extern int predict_dspec PROTO_S ( ( int ) ) ;
|
|
|
48 |
extern int predict_func_defn PROTO_S ( ( void ) ) ;
|
|
|
49 |
extern int predict_init PROTO_S ( ( void ) ) ;
|
|
|
50 |
extern int predict_obj_defn PROTO_S ( ( void ) ) ;
|
|
|
51 |
extern int predict_operator PROTO_S ( ( void ) ) ;
|
|
|
52 |
extern int predict_param PROTO_S ( ( void ) ) ;
|
|
|
53 |
extern int predict_ptr PROTO_S ( ( int ) ) ;
|
|
|
54 |
extern int predict_template PROTO_S ( ( void ) ) ;
|
|
|
55 |
extern int predict_tspec PROTO_S ( ( int ) ) ;
|
|
|
56 |
extern int predict_typeid PROTO_S ( ( int ) ) ;
|
|
|
57 |
extern int predict_typename PROTO_S ( ( void ) ) ;
|
|
|
58 |
|
|
|
59 |
|
|
|
60 |
/*
|
|
|
61 |
PARSER STATE VARIABLES
|
|
|
62 |
|
|
|
63 |
These variables are used by the parser to store information about the
|
|
|
64 |
current parser state.
|
|
|
65 |
*/
|
|
|
66 |
|
|
|
67 |
extern int have_type_specifier ;
|
|
|
68 |
extern int have_type_declaration ;
|
|
|
69 |
extern int have_func_declarator ;
|
|
|
70 |
extern int in_function_defn ;
|
|
|
71 |
extern int in_class_defn ;
|
|
|
72 |
extern int in_declaration ;
|
|
|
73 |
extern int in_default_arg ;
|
|
|
74 |
extern int in_weak_param ;
|
|
|
75 |
extern int in_ptr_mem_selector ;
|
|
|
76 |
extern int in_token_decl ;
|
|
|
77 |
extern int in_template_decl ;
|
|
|
78 |
extern int really_in_function_defn ;
|
|
|
79 |
extern int really_in_class_defn ;
|
|
|
80 |
extern int is_function_next ;
|
|
|
81 |
extern int is_constructor_next ;
|
|
|
82 |
|
|
|
83 |
extern int no_side_effects ;
|
|
|
84 |
extern int no_type_defns ;
|
|
|
85 |
extern int have_destructor ;
|
|
|
86 |
extern unsigned long no_declarations ;
|
|
|
87 |
extern unsigned long no_token_defns ;
|
|
|
88 |
|
|
|
89 |
|
|
|
90 |
/*
|
|
|
91 |
FEATURE USE FLAGS
|
|
|
92 |
|
|
|
93 |
These flags are set to indicate that certain features, which require
|
|
|
94 |
the program to perform extra checks, have been used.
|
|
|
95 |
*/
|
|
|
96 |
|
|
|
97 |
extern int used_extern_volatile ;
|
|
|
98 |
extern int used_register ;
|
|
|
99 |
|
|
|
100 |
|
|
|
101 |
/*
|
|
|
102 |
TYPE DECLARATION VALUES
|
|
|
103 |
|
|
|
104 |
These macros give the various values assigned to have_type_declaration.
|
|
|
105 |
If no types have been declared in a sequence of type specifiers it is
|
|
|
106 |
TYPE_DECL_NONE, if an anonymous class is defined it is TYPE_DECL_ANON,
|
|
|
107 |
if an elaborated type specifier is declared it is TYPE_DECL_ELABORATE,
|
|
|
108 |
otherwise it is TYPE_DECL_NORMAL.
|
|
|
109 |
*/
|
|
|
110 |
|
|
|
111 |
#define TYPE_DECL_NONE 0
|
|
|
112 |
#define TYPE_DECL_NORMAL 1
|
|
|
113 |
#define TYPE_DECL_ANON 2
|
|
|
114 |
#define TYPE_DECL_ELABORATE 3
|
|
|
115 |
#define TYPE_DECL_OVER_ELAB 4
|
|
|
116 |
|
|
|
117 |
|
|
|
118 |
#endif
|