Subversion Repositories tendra.SVN

Rev

Rev 2 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
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
#ifndef PREPROC_INCLUDED
32
#define PREPROC_INCLUDED
33
 
34
 
35
/*
36
    PREPROCESSING DECLARATIONS
37
 
38
    The routines in this module are concerned with the processing of
39
    preprocessing directives.  They include preprocess_file which is the
40
    stand-alone preprocessing action of the program.
41
*/
42
 
43
extern int read_preproc_dir PROTO_S ( ( int, int ) ) ;
44
extern void patch_preproc_dir PROTO_S ( ( PPTOKEN * ) ) ;
45
extern int read_include PROTO_S ( ( int, int ) ) ;
46
extern unsigned check_macro PROTO_S ( ( HASHID, int ) ) ;
47
extern IDENTIFIER make_assert PROTO_S ( ( HASHID, int ) ) ;
48
extern void read_ident PROTO_S ( ( int ) ) ;
49
extern void read_weak PROTO_S ( ( int ) ) ;
50
extern void preprocess_file PROTO_S ( ( void ) ) ;
51
extern void start_preproc_if PROTO_S ( ( void ) ) ;
52
extern int clear_preproc_if PROTO_S ( ( void ) ) ;
53
extern int patch_cond PROTO_S ( ( int, int ) ) ;
54
 
55
 
56
/*
57
    PREPROCESSING VARIABLES
58
 
59
    These variables are used by the preprocessing routines.
60
*/
61
 
62
extern int preproc_only ;
63
extern int preproc_space ;
64
extern int pragma_number ;
65
extern int in_preproc_dir ;
66
extern int no_preproc_dir ;
67
extern int in_pragma_dir ;
68
extern int in_hash_if_exp ;
69
extern EXP crt_hash_if_exp ;
70
extern LOCATION preproc_loc ;
71
extern IDENTIFIER token_macro ;
72
 
73
 
74
/*
75
    CONDITIONAL COMPILATION STATES
76
 
77
    These values are used to identify the various conditional compilation
78
    states.  The condition may be true, false, being skipped, or unresolved.
79
    In addition a conditional compilation may or may not have associated
80
    '#else' and '#elif' statements.  There is a special value for indicating
81
    the end of an individual file.
82
*/
83
 
84
#define PP_FALSE			( ( unsigned ) 0x00 )
85
#define PP_TRUE				( ( unsigned ) 0x01 )
86
#define PP_PAST				( ( unsigned ) 0x02 )
87
#define PP_SKIP				( ( unsigned ) 0x03 )
88
#define PP_UNRESOLVED			( ( unsigned ) 0x04 )
89
#define PP_COND_MASK			( ( unsigned ) 0x0f )
90
#define PP_HAVE_ELSE			( ( unsigned ) 0x10 )
91
#define PP_HAVE_ELIF			( ( unsigned ) 0x20 )
92
#define PP_TOKEN			( ( unsigned ) 0x40 )
93
#define PP_END				( ( unsigned ) 0xff )
94
 
95
 
96
#endif