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 NAMES_INCLUDED
32
#define NAMES_INCLUDED
33
 
34
 
35
/*
36
    MACROS GIVING CHARACTER TYPES
37
 
38
    These macros determine the character types for input text
39
*/
40
 
41
#include <ctype.h>
42
 
43
#define white_space( X )	( (X) == ' ' || (X) == '\n' || (X) == '\t' )
44
#define octal_digit( X )	( (X) >= '0' && (X) <= '7' )
45
#define dec_digit( X )		( (X) >= '0' && (X) <= '9' )
46
#define terminator( X )		( white_space ( X ) || (X) == '(' ||\
47
				  (X) == ')' || (X) == '#' || (X) == ',' ||\
48
				  (X) == EOF )
49
#define alpha( X )		( isalpha ( (X) ) ||\
50
				  (X) == '_' || (X) == '~' || (X) == '.' )
51
#define alphanum( X )		( alpha (X) || dec_digit (X) )
52
 
53
 
54
/*
55
    BASIC CONSTRUCT NAMES
56
 
57
    These macros give the names of the basic constructs used in
58
    input text.
59
*/
60
 
61
#define MAKE_ALDEC		"make_al_tagdec"
62
#define MAKE_ALDEF		"make_al_tagdef"
63
#define MAKE_ID_TAGDEC		"make_id_tagdec"
64
#define MAKE_VAR_TAGDEC		"make_var_tagdec"
65
#define COMMON_TAGDEC		"common_tagdec"
66
#define MAKE_ID_TAGDEF		"make_id_tagdef"
67
#define MAKE_VAR_TAGDEF		"make_var_tagdef"
68
#define COMMON_TAGDEF		"common_tagdef"
69
#define MAKE_TOKDEC		"make_tokdec"
70
#define MAKE_TOKDEF		"make_tokdef"
71
#define MAKE_SORT		"make_token_sort"
72
 
73
 
74
/*
75
    INCLUDE CONSTRUCT NAMES
76
 
77
    These macros give the names of the constructs used to include
78
    code in input text.
79
*/
80
 
81
#define INCLUDE_CODE		"code"
82
#define INCLUDE_LIB		"lib"
83
#define INCLUDE_TEXT		"include"
84
#define USE_CODE		"use_code"
85
#define USE_LIB			"use_lib"
86
 
87
 
88
/*
89
    OTHER NAMES
90
 
91
    These macros gives other names used in input text.
92
*/
93
 
94
#define LOCAL_DECL		"local"
95
#define MAKE_STRING_EXTERN	"string_extern"
96
#define MAKE_UNIQUE_EXTERN	"unique_extern"
97
#define MAKE_CHAIN_EXTERN	"chain_extern"
98
#define MAKE_STRING		"multi_string"
99
 
100
 
101
#endif