]> git.saurik.com Git - apple/security.git/blob - SecuritySNACCRuntime/compiler/back-ends/idl-gen/rules.c
Security-54.1.3.tar.gz
[apple/security.git] / SecuritySNACCRuntime / compiler / back-ends / idl-gen / rules.c
1 /*
2 * Copyright (c) 2000-2001 Apple Computer, Inc. All Rights Reserved.
3 *
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please obtain
7 * a copy of the License at http://www.apple.com/publicsource and read it before
8 * using this file.
9 *
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
12 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
13 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
15 * specific language governing rights and limitations under the License.
16 */
17
18
19 /*
20 * compiler/back_ends/idl_gen/rules.c - initialized c rule structure
21 * inits a table that contains info about
22 * converting each ASN.1 type to an IDL type
23 *
24 * Copyright (C) 1991, 1992 Michael Sample
25 * and the University of British Columbia
26 *
27 * This program is free software; you can redistribute it and/or modify
28 * it under the terms of the GNU General Public License as published by
29 * the Free Software Foundation; either version 2 of the License, or
30 * (at your option) any later version.
31 *
32 * $Header: /cvs/Darwin/src/live/Security/SecuritySNACCRuntime/compiler/back-ends/idl-gen/rules.c,v 1.1.1.1 2001/05/18 23:14:09 mb Exp $
33 * $Log: rules.c,v $
34 * Revision 1.1.1.1 2001/05/18 23:14:09 mb
35 * Move from private repository to open source repository
36 *
37 * Revision 1.2 2001/05/05 00:59:29 rmurphy
38 * Adding darwin license headers
39 *
40 * Revision 1.1.1.1 1999/03/16 18:06:45 aram
41 * Originals from SMIME Free Library.
42 *
43 * Revision 1.1 1997/01/01 20:25:38 rj
44 * first draft
45 *
46 * Revision 1.3 1994/10/08 03:47:49 rj
47 */
48
49 #include "asn-incl.h"
50 #include "asn1module.h"
51 #include "rules.h"
52
53
54 IDLRules idlRulesG =
55 {
56 4,
57
58 "",
59 "_T",
60
61 "Choice",
62 "a",
63 "ChoiceUnion",
64 FALSE,
65 {
66 {
67 BASICTYPE_UNKNOWN,
68 "???",
69 FALSE,
70 FALSE,
71 FALSE,
72 TRUE,
73 TRUE,
74 TRUE,
75 TRUE,
76 "NOT_NULL",
77 "unknown"
78 },
79 {
80 BASICTYPE_BOOLEAN,
81 "BOOLEAN",
82 FALSE,
83 TRUE,
84 FALSE,
85 TRUE,
86 TRUE,
87 FALSE,
88 TRUE,
89 "NOT_NULL",
90 "bool"
91 },
92 {
93 BASICTYPE_INTEGER,
94 "INTEGER",
95 FALSE,
96 TRUE,
97 FALSE,
98 TRUE,
99 TRUE,
100 FALSE,
101 TRUE,
102 "NOT_NULL",
103 "integer"
104 },
105 {
106 BASICTYPE_BITSTRING,
107 "BitString",
108 FALSE,
109 TRUE,
110 FALSE,
111 TRUE,
112 TRUE,
113 FALSE,
114 TRUE,
115 "NOT_NULL",
116 "bits"
117 },
118 {
119 BASICTYPE_OCTETSTRING,
120 "OctetString",
121 FALSE,
122 TRUE,
123 FALSE,
124 TRUE,
125 TRUE,
126 FALSE,
127 TRUE,
128 "NOT_NULL",
129 "octs"
130 },
131 {
132 BASICTYPE_NULL,
133 "NULL",
134 FALSE,
135 TRUE,
136 FALSE,
137 TRUE,
138 TRUE,
139 FALSE,
140 TRUE,
141 "NOT_NULL",
142 "null"
143 },
144 {
145 BASICTYPE_OID,
146 "ObjectIdentifier",
147 FALSE,
148 TRUE,
149 FALSE,
150 TRUE,
151 TRUE,
152 FALSE,
153 TRUE,
154 "NOT_NULL",
155 "oid"
156 },
157 {
158 BASICTYPE_REAL,
159 "REAL",
160 FALSE,
161 TRUE,
162 FALSE,
163 TRUE,
164 TRUE,
165 FALSE,
166 TRUE,
167 "NOT_NULL",
168 "real"
169 },
170 {
171 BASICTYPE_ENUMERATED,
172 "???",
173 FALSE,
174 TRUE,
175 FALSE,
176 TRUE,
177 TRUE,
178 FALSE,
179 TRUE,
180 "NOT_NULL",
181 "enumeration"
182 },
183 {
184 BASICTYPE_SEQUENCE,
185 NULL,
186 FALSE,
187 TRUE,
188 FALSE,
189 TRUE,
190 TRUE,
191 TRUE,
192 TRUE,
193 "NOT_NULL",
194 "seq"
195 },
196 {
197 BASICTYPE_SEQUENCEOF,
198 "AsnList",
199 FALSE,
200 TRUE,
201 FALSE,
202 TRUE,
203 TRUE,
204 FALSE,
205 TRUE,
206 "NOT_NULL",
207 "seqOf"
208 },
209 {
210 BASICTYPE_SET,
211 NULL,
212 FALSE,
213 TRUE,
214 FALSE,
215 TRUE,
216 TRUE,
217 TRUE,
218 FALSE,
219 "NOT_NULL",
220 "set"
221 },
222 {
223 BASICTYPE_SETOF,
224 "AsnList",
225 FALSE,
226 TRUE,
227 FALSE,
228 TRUE,
229 TRUE,
230 FALSE,
231 TRUE,
232 "NOT_NULL",
233 "setOf"
234 },
235 {
236 BASICTYPE_CHOICE,
237 NULL,
238 FALSE,
239 TRUE,
240 FALSE,
241 TRUE,
242 TRUE,
243 TRUE,
244 FALSE,
245 "NOT_NULL",
246 "choice"
247 },
248 {
249 BASICTYPE_SELECTION,
250 NULL,
251 FALSE,
252 TRUE,
253 FALSE,
254 TRUE,
255 TRUE,
256 FALSE,
257 TRUE,
258 "NOT_NULL",
259 "foo"
260 },
261 {
262 BASICTYPE_COMPONENTSOF,
263 NULL,
264 FALSE,
265 TRUE,
266 FALSE,
267 TRUE,
268 TRUE,
269 FALSE,
270 TRUE,
271 "NOT_NULL",
272 "bar"
273 },
274 {
275 BASICTYPE_ANY,
276 "any",
277 FALSE,
278 TRUE,
279 FALSE,
280 TRUE,
281 TRUE,
282 FALSE,
283 TRUE,
284 "NOT_NULL",
285 "any"
286 },
287 {
288 BASICTYPE_ANYDEFINEDBY,
289 "any",
290 FALSE,
291 TRUE,
292 FALSE,
293 TRUE,
294 TRUE,
295 FALSE,
296 TRUE,
297 "NOT_NULL",
298 "anyDefBy"
299 },
300 {
301 BASICTYPE_LOCALTYPEREF,
302 NULL,
303 FALSE,
304 TRUE,
305 FALSE,
306 TRUE,
307 TRUE,
308 FALSE,
309 TRUE,
310 "NOT_NULL",
311 "foo"
312 },
313 {
314 BASICTYPE_IMPORTTYPEREF,
315 NULL,
316 FALSE,
317 TRUE,
318 FALSE,
319 TRUE,
320 TRUE,
321 FALSE,
322 TRUE,
323 "NOT_NULL",
324 "bar"
325 },
326 {
327 BASICTYPE_MACROTYPE,
328 NULL,
329 FALSE,
330 FALSE,
331 FALSE,
332 TRUE,
333 TRUE,
334 FALSE,
335 TRUE,
336 "NOT_NULL",
337 "foo"
338 },
339 {
340 BASICTYPE_MACRODEF,
341 NULL,
342 FALSE,
343 FALSE,
344 FALSE,
345 TRUE,
346 TRUE,
347 FALSE,
348 TRUE,
349 "NOT_NULL",
350 "foo"
351 }
352 }
353 };