Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – tendra.SVN – Blame – /branches/algol60/src/utilities/make_err/errors.alg – Rev 7

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
7 7u83 3
 
2 7u83 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:-
7 7u83 12
 
2 7u83 13
        (1) Its Recipients shall ensure that this Notice is
14
        reproduced upon any copies or amended versions of it;
7 7u83 15
 
2 7u83 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;
7 7u83 19
 
2 7u83 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;
7 7u83 23
 
2 7u83 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
    TYPE ALGEBRA FOR ERRORS TOOL
33
 
34
    This algebra describes the types used by the errors tool.
35
*/
36
 
37
ALGEBRA errors:
38
 
39
 
40
/*
41
    PRIMITIVE TYPES
42
 
43
    The primitive types, from which everything else is built are integers
44
    and strings.
45
*/
46
 
47
int = "int" ;
48
string = "char *" ;
49
 
50
 
51
/*
52
    NUMBERED IDENTIFIERS
53
 
54
    Keys, properties, types and usages are all examples of numbered
55
    identifiers.  These consist of a string and an associated number.
56
*/
57
 
58
union NAME (name) = {
59
    string id ;
60
    int number ;
61
} + {
62
    basic -> {
63
	/* empty */
64
    }
65
} ;
66
 
67
KEY = NAME ;
68
PROPERTY = NAME ;
69
TYPE = NAME ;
70
USAGE = NAME ;
71
 
72
 
73
/*
74
    MESSAGE COMPONENT
75
 
76
    A message component can be either a parameter name or a string.
77
*/
78
 
79
union MESSAGE (msg) = {
80
    /* empty */
81
} + {
82
    param -> {
83
	PARAM arg ;
84
    },
85
    text -> {
86
	string arg ;
87
    }
88
} ;
89
 
90
 
91
/*
92
    MESSAGE MAPPING
93
 
94
    A message mapping associates a list of message components with a key.
95
*/
96
 
97
union MAP (map) = {
98
    KEY key ;
99
    LIST MESSAGE msg ;
100
    LIST MESSAGE alt_msg ;
101
} + {
102
    basic -> {
103
	/* empty */
104
    }
105
} ;
106
 
107
 
108
/*
109
    MESSAGE PARAMETER
110
 
111
    A message parameter consists of a name, the type associated with that
112
    name, and a parameter number.
113
*/
114
 
115
union PARAM (param) = {
116
    TYPE type ;
117
    string name ;
118
    int number ;
119
} + {
120
    basic -> {
121
	/* empty */
122
    }
123
} ;
124
 
125
 
126
/*
127
    DATABASE ENTRY
128
 
129
    A database entry consists of two entry names, a list of message
130
    parameters, an associated usage and list of properties, plus a list
131
    of message maps.
132
*/
133
 
134
union ENTRY (entry) = {
135
    string name ;
136
    string alt_name ;
137
    LIST PARAM signature ;
138
    USAGE use ;
139
    USAGE alt_use ;
140
    LIST PROPERTY props ;
141
    LIST MAP maps ;
142
} + {
143
    basic -> {
144
	/* empty */
145
    }
146
} ;