Subversion Repositories tendra.SVN

Rev

Go to most recent revision | Details | 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 MACRO_INCLUDED
32
#define MACRO_INCLUDED
33
 
34
 
35
/*
36
    TYPE REPRESENTING THE LOCATION OF A LIST OF TOKENS
37
 
38
    This type represents the location of a list of tokens and it used in
39
    expand_macro.  The toks field gives a pointer to this list, while the
40
    next field allows these locations to be formed into lists.
41
*/
42
 
43
typedef struct tok_loc_tag {
44
    PPTOKEN **toks ;
45
    struct tok_loc_tag *next ;
46
} TOKEN_LOC ;
47
 
48
 
49
/*
50
    MACRO EXPANSION DECLARATIONS
51
 
52
    The routines in this module are concerned with the manipulation of
53
    lists of preprocessing tokens, including the expansion of macros.
54
*/
55
 
56
extern void init_macros PROTO_S ( ( int, int ) ) ;
57
extern void term_macros PROTO_S ( ( void ) ) ;
58
extern PPTOKEN *recognise_strings PROTO_S ( ( PPTOKEN *, HASHID, int ) ) ;
59
extern PPTOKEN *expand_macro PROTO_S ( ( HASHID, TOKEN_LOC *, int ) ) ;
60
extern PPTOKEN *read_line PROTO_S ( ( int, int ) ) ;
61
extern PPTOKEN *expand_tok_list PROTO_S ( ( PPTOKEN * ) ) ;
62
extern PPTOKEN *clean_tok_list PROTO_S ( ( PPTOKEN * ) ) ;
63
extern PPTOKEN *new_pptok PROTO_S ( ( void ) ) ;
64
extern void free_tok_list PROTO_S ( ( PPTOKEN * ) ) ;
65
extern int quote_tok_list PROTO_S ( ( PPTOKEN *, int, int ) ) ;
66
extern void token_parts PROTO_S ( ( int, PPTOKEN * ) ) ;
67
 
68
 
69
/*
70
    MACRO EXPANSION VARIABLES
71
 
72
    These variables are used in the macro expansion routines.
73
*/
74
 
75
extern NAMESPACE assert_namespace ;
76
extern PPTOKEN *free_tokens ;
77
extern TOKEN_LOC *file_loc ;
78
 
79
 
80
/*
81
    BUILT-IN MACRO FLAG
82
 
83
    This flag is used as part of the storage field of a macro to indicate
84
    a built-in macro.
85
*/
86
 
87
#define dspec_builtin		dspec_static
88
 
89
 
90
#endif