blob: 82e1509d5b1402f2797ff181ef955754a868085e [file] [log] [blame]
vlmfa67ddc2004-06-03 03:38:44 +00001
vlm6a02a8a2004-09-08 00:28:11 +00002/* A Bison parser, made from asn1p_y.y
3 by GNU Bison version 1.28 */
vlmfa67ddc2004-06-03 03:38:44 +00004
vlm6a02a8a2004-09-08 00:28:11 +00005#define YYBISON 1 /* Identify Bison output. */
vlmfa67ddc2004-06-03 03:38:44 +00006
7#define yyparse asn1p_parse
vlm6a02a8a2004-09-08 00:28:11 +00008#define yylex asn1p_lex
vlmfa67ddc2004-06-03 03:38:44 +00009#define yyerror asn1p_error
vlm6a02a8a2004-09-08 00:28:11 +000010#define yylval asn1p_lval
11#define yychar asn1p_char
vlmfa67ddc2004-06-03 03:38:44 +000012#define yydebug asn1p_debug
13#define yynerrs asn1p_nerrs
vlm6a02a8a2004-09-08 00:28:11 +000014#define TOK_PPEQ 257
15#define TOK_opaque 258
16#define TOK_bstring 259
17#define TOK_cstring 260
18#define TOK_hstring 261
19#define TOK_identifier 262
20#define TOK_number 263
21#define TOK_number_negative 264
22#define TOK_typereference 265
23#define TOK_capitalreference 266
24#define TOK_typefieldreference 267
25#define TOK_valuefieldreference 268
26#define TOK_ABSENT 269
27#define TOK_ABSTRACT_SYNTAX 270
28#define TOK_ALL 271
29#define TOK_ANY 272
30#define TOK_APPLICATION 273
31#define TOK_AUTOMATIC 274
32#define TOK_BEGIN 275
33#define TOK_BIT 276
34#define TOK_BMPString 277
35#define TOK_BOOLEAN 278
36#define TOK_BY 279
37#define TOK_CHARACTER 280
38#define TOK_CHOICE 281
39#define TOK_CLASS 282
40#define TOK_COMPONENT 283
41#define TOK_COMPONENTS 284
42#define TOK_CONSTRAINED 285
43#define TOK_CONTAINING 286
44#define TOK_DEFAULT 287
45#define TOK_DEFINITIONS 288
46#define TOK_DEFINED 289
47#define TOK_EMBEDDED 290
48#define TOK_ENCODED 291
49#define TOK_ENCODING_CONTROL 292
50#define TOK_END 293
51#define TOK_ENUMERATED 294
52#define TOK_EXPLICIT 295
53#define TOK_EXPORTS 296
54#define TOK_EXTENSIBILITY 297
55#define TOK_EXTERNAL 298
56#define TOK_FALSE 299
57#define TOK_FROM 300
58#define TOK_GeneralizedTime 301
59#define TOK_GeneralString 302
60#define TOK_GraphicString 303
61#define TOK_IA5String 304
62#define TOK_IDENTIFIER 305
63#define TOK_IMPLICIT 306
64#define TOK_IMPLIED 307
65#define TOK_IMPORTS 308
66#define TOK_INCLUDES 309
67#define TOK_INSTANCE 310
68#define TOK_INSTRUCTIONS 311
69#define TOK_INTEGER 312
70#define TOK_ISO646String 313
71#define TOK_MAX 314
72#define TOK_MIN 315
73#define TOK_MINUS_INFINITY 316
74#define TOK_NULL 317
75#define TOK_NumericString 318
76#define TOK_OBJECT 319
77#define TOK_ObjectDescriptor 320
78#define TOK_OCTET 321
79#define TOK_OF 322
80#define TOK_OPTIONAL 323
81#define TOK_PATTERN 324
82#define TOK_PDV 325
83#define TOK_PLUS_INFINITY 326
84#define TOK_PRESENT 327
85#define TOK_PrintableString 328
86#define TOK_PRIVATE 329
87#define TOK_REAL 330
88#define TOK_RELATIVE_OID 331
89#define TOK_SEQUENCE 332
90#define TOK_SET 333
91#define TOK_SIZE 334
92#define TOK_STRING 335
93#define TOK_SYNTAX 336
94#define TOK_T61String 337
95#define TOK_TAGS 338
96#define TOK_TeletexString 339
97#define TOK_TRUE 340
98#define TOK_TYPE_IDENTIFIER 341
99#define TOK_UNIQUE 342
100#define TOK_UNIVERSAL 343
101#define TOK_UniversalString 344
102#define TOK_UTCTime 345
103#define TOK_UTF8String 346
104#define TOK_VideotexString 347
105#define TOK_VisibleString 348
106#define TOK_WITH 349
107#define TOK_EXCEPT 350
108#define TOK_INTERSECTION 351
109#define TOK_UNION 352
110#define TOK_TwoDots 353
111#define TOK_ThreeDots 354
vlmfa67ddc2004-06-03 03:38:44 +0000112
113#line 1 "asn1p_y.y"
114
115
116#include <stdlib.h>
117#include <stdio.h>
118#include <string.h>
119#include <errno.h>
120#include <assert.h>
121
122#include "asn1parser.h"
123
124#define YYPARSE_PARAM param
125#define YYERROR_VERBOSE
126
127int yylex(void);
128int yyerror(const char *msg);
129void asn1p_lexer_hack_push_opaque_state(void);
130void asn1p_lexer_hack_enable_with_syntax(void);
vlm9283dbe2004-08-18 04:59:12 +0000131void asn1p_lexer_hack_push_encoding_control(void);
vlmfa67ddc2004-06-03 03:38:44 +0000132#define yylineno asn1p_lineno
133extern int asn1p_lineno;
134
135
136static asn1p_value_t *
137 _convert_bitstring2binary(char *str, int base);
138
vlm6a02a8a2004-09-08 00:28:11 +0000139#define checkmem(ptr) do { \
140 if(!(ptr)) \
141 return yyerror("Memory failure"); \
vlmfa67ddc2004-06-03 03:38:44 +0000142 } while(0)
143
144#define CONSTRAINT_INSERT(root, constr_type, arg1, arg2) do { \
145 if(arg1->type != constr_type) { \
146 int __ret; \
147 root = asn1p_constraint_new(yylineno); \
148 checkmem(root); \
149 root->type = constr_type; \
150 __ret = asn1p_constraint_insert(root, \
151 arg1); \
152 checkmem(__ret == 0); \
153 } else { \
154 root = arg1; \
155 } \
156 if(arg2) { \
157 int __ret \
158 = asn1p_constraint_insert(root, arg2); \
159 checkmem(__ret == 0); \
160 } \
161 } while(0)
162
163
vlm9283dbe2004-08-18 04:59:12 +0000164#line 58 "asn1p_y.y"
vlmfa67ddc2004-06-03 03:38:44 +0000165typedef union {
166 asn1p_t *a_grammar;
167 asn1p_module_flags_e a_module_flags;
168 asn1p_module_t *a_module;
169 asn1p_expr_type_e a_type; /* ASN.1 Type */
170 asn1p_expr_t *a_expr; /* Constructed collection */
171 asn1p_constraint_t *a_constr; /* Constraint */
172 enum asn1p_constraint_type_e a_ctype;/* Constraint type */
173 asn1p_xports_t *a_xports; /* IMports/EXports */
174 asn1p_oid_t *a_oid; /* Object Identifier */
175 asn1p_oid_arc_t a_oid_arc; /* Single OID's arc */
176 struct asn1p_type_tag_s a_tag; /* A tag */
177 asn1p_ref_t *a_ref; /* Reference to custom type */
178 asn1p_wsyntx_t *a_wsynt; /* WITH SYNTAX contents */
179 asn1p_wsyntx_chunk_t *a_wchunk; /* WITH SYNTAX chunk */
180 struct asn1p_ref_component_s a_refcomp; /* Component of a reference */
181 asn1p_value_t *a_value; /* Number, DefinedValue, etc */
182 struct asn1p_param_s a_parg; /* A parameter argument */
183 asn1p_paramlist_t *a_plist; /* A pargs list */
vlmc94e28f2004-09-15 11:59:51 +0000184 struct asn1p_expr_marker_s a_marker; /* OPTIONAL/DEFAULT */
vlmfa67ddc2004-06-03 03:38:44 +0000185 enum asn1p_constr_pres_e a_pres; /* PRESENT/ABSENT/OPTIONAL */
vlmec6acd42004-09-29 13:18:09 +0000186 asn1c_integer_t a_int;
vlmfa67ddc2004-06-03 03:38:44 +0000187 char *tv_str;
188 struct {
189 char *buf;
190 int len;
191 } tv_opaque;
192 struct {
193 char *name;
194 struct asn1p_type_tag_s tag;
195 } tv_nametag;
vlm6a02a8a2004-09-08 00:28:11 +0000196} YYSTYPE;
197#include <stdio.h>
198
199#ifndef __cplusplus
200#ifndef __STDC__
201#define const
202#endif
vlmfa67ddc2004-06-03 03:38:44 +0000203#endif
204
205
206
vlm4053ca52005-02-18 16:34:21 +0000207#define YYFINAL 417
vlm6a02a8a2004-09-08 00:28:11 +0000208#define YYFLAG -32768
vlm2728a8d2005-01-23 09:51:44 +0000209#define YYNTBASE 116
vlmfa67ddc2004-06-03 03:38:44 +0000210
vlm2728a8d2005-01-23 09:51:44 +0000211#define YYTRANSLATE(x) ((unsigned)(x) <= 354 ? yytranslate[x] : 217)
vlmfa67ddc2004-06-03 03:38:44 +0000212
vlm6a02a8a2004-09-08 00:28:11 +0000213static const char yytranslate[] = { 0,
214 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
215 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
216 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
vlm2728a8d2005-01-23 09:51:44 +0000217 2, 2, 110, 2, 2, 2, 2, 2, 2, 105,
218 106, 2, 2, 108, 2, 111, 2, 2, 2, 2,
219 2, 2, 2, 2, 2, 2, 2, 109, 107, 112,
220 2, 2, 2, 113, 2, 2, 2, 2, 2, 2,
vlm6a02a8a2004-09-08 00:28:11 +0000221 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
222 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
vlm2728a8d2005-01-23 09:51:44 +0000223 114, 2, 115, 97, 2, 2, 2, 2, 2, 2,
vlm6a02a8a2004-09-08 00:28:11 +0000224 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
225 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
vlm2728a8d2005-01-23 09:51:44 +0000226 2, 2, 103, 99, 104, 2, 2, 2, 2, 2,
vlm6a02a8a2004-09-08 00:28:11 +0000227 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
228 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
229 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
230 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
231 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
232 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
233 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
234 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
235 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
236 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
237 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
238 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
239 2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
240 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
241 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
242 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
243 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
244 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
245 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
246 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
247 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
248 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
vlm2728a8d2005-01-23 09:51:44 +0000249 98, 100, 101, 102
vlm6a02a8a2004-09-08 00:28:11 +0000250};
vlmfa67ddc2004-06-03 03:38:44 +0000251
vlm6a02a8a2004-09-08 00:28:11 +0000252#if YYDEBUG != 0
253static const short yyprhs[] = { 0,
254 0, 2, 4, 7, 16, 17, 19, 23, 26, 28,
255 31, 33, 38, 40, 41, 43, 45, 48, 51, 54,
256 57, 60, 63, 64, 66, 68, 71, 73, 75, 77,
257 79, 81, 82, 86, 88, 92, 95, 97, 100, 105,
vlm0aa86902004-10-12 23:26:53 +0000258 107, 111, 113, 117, 119, 123, 127, 130, 132, 136,
259 138, 142, 144, 151, 153, 155, 156, 158, 160, 164,
260 166, 168, 173, 177, 181, 188, 190, 194, 196, 200,
vlm4053ca52005-02-18 16:34:21 +0000261 204, 208, 210, 214, 216, 218, 219, 221, 223, 227,
262 231, 235, 237, 239, 243, 246, 248, 254, 255, 257,
263 259, 263, 266, 271, 276, 277, 279, 280, 287, 289,
vlm5e2c4b92005-03-20 11:12:40 +0000264 292, 294, 296, 298, 302, 306, 310, 312, 317, 322,
265 327, 334, 341, 343, 348, 353, 355, 359, 361, 365,
266 369, 373, 375, 379, 381, 385, 387, 389, 391, 393,
267 398, 402, 403, 407, 409, 411, 413, 415, 417, 419,
268 421, 423, 425, 429, 431, 434, 436, 438, 440, 442,
269 445, 448, 450, 452, 455, 458, 460, 462, 464, 466,
vlm4053ca52005-02-18 16:34:21 +0000270 468, 471, 473, 476, 478, 480, 482, 484, 486, 488,
271 490, 492, 494, 496, 498, 500, 502, 504, 506, 508,
272 510, 512, 514, 515, 517, 519, 524, 528, 533, 535,
273 539, 545, 547, 551, 555, 559, 564, 568, 570, 574,
274 578, 582, 586, 588, 590, 592, 595, 598, 602, 604,
275 606, 608, 610, 612, 614, 616, 618, 624, 626, 630,
276 632, 636, 637, 639, 641, 643, 645, 647, 649, 653,
277 658, 660, 664, 667, 671, 673, 677, 678, 680, 682,
278 685, 688, 692, 694, 698, 700, 705, 710, 712, 714,
279 716, 718, 719, 721, 724, 729, 730, 732, 734, 736,
280 737, 739, 741, 743, 745, 747, 748, 750
vlm6a02a8a2004-09-08 00:28:11 +0000281};
vlmfa67ddc2004-06-03 03:38:44 +0000282
vlm2728a8d2005-01-23 09:51:44 +0000283static const short yyrhs[] = { 117,
284 0, 118, 0, 117, 118, 0, 213, 119, 34, 123,
285 3, 21, 126, 39, 0, 0, 120, 0, 103, 121,
286 104, 0, 103, 104, 0, 122, 0, 121, 122, 0,
287 216, 0, 216, 105, 9, 106, 0, 9, 0, 0,
288 124, 0, 125, 0, 124, 125, 0, 41, 84, 0,
vlm6a02a8a2004-09-08 00:28:11 +0000289 52, 84, 0, 20, 84, 0, 43, 53, 0, 12,
vlm2728a8d2005-01-23 09:51:44 +0000290 57, 0, 0, 127, 0, 128, 0, 127, 128, 0,
291 130, 0, 135, 0, 143, 0, 170, 0, 138, 0,
292 0, 38, 12, 129, 0, 178, 0, 54, 131, 107,
293 0, 54, 46, 0, 132, 0, 131, 132, 0, 133,
294 46, 213, 119, 0, 134, 0, 133, 108, 134, 0,
295 213, 0, 213, 103, 104, 0, 216, 0, 42, 136,
296 107, 0, 42, 17, 107, 0, 42, 107, 0, 137,
297 0, 136, 108, 137, 0, 213, 0, 213, 103, 104,
298 0, 216, 0, 213, 139, 3, 103, 140, 104, 0,
299 165, 0, 175, 0, 0, 141, 0, 142, 0, 141,
300 108, 142, 0, 102, 0, 186, 0, 213, 3, 208,
301 87, 0, 213, 3, 163, 0, 213, 3, 153, 0,
302 213, 103, 144, 104, 3, 163, 0, 145, 0, 144,
vlm4053ca52005-02-18 16:34:21 +0000303 108, 145, 0, 213, 0, 213, 109, 216, 0, 213,
304 109, 213, 0, 175, 109, 216, 0, 147, 0, 146,
305 108, 147, 0, 163, 0, 216, 0, 0, 149, 0,
306 150, 0, 149, 108, 150, 0, 216, 163, 202, 0,
307 30, 68, 163, 0, 162, 0, 152, 0, 151, 108,
308 152, 0, 216, 163, 0, 162, 0, 28, 103, 155,
309 104, 157, 0, 0, 88, 0, 156, 0, 155, 108,
310 156, 0, 168, 202, 0, 168, 163, 154, 202, 0,
311 168, 168, 154, 202, 0, 0, 158, 0, 0, 95,
312 82, 103, 159, 160, 104, 0, 161, 0, 160, 161,
313 0, 4, 0, 168, 0, 102, 0, 102, 110, 173,
314 0, 102, 110, 207, 0, 208, 164, 182, 0, 177,
vlm5e2c4b92005-03-20 11:12:40 +0000315 0, 27, 103, 151, 104, 0, 78, 103, 148, 104,
316 0, 79, 103, 148, 104, 0, 78, 182, 68, 215,
317 208, 164, 0, 79, 182, 68, 215, 208, 164, 0,
318 18, 0, 18, 35, 25, 216, 0, 213, 103, 146,
319 104, 0, 165, 0, 56, 68, 165, 0, 11, 0,
320 11, 111, 213, 0, 214, 111, 213, 0, 11, 111,
321 216, 0, 214, 0, 214, 111, 166, 0, 167, 0,
322 166, 111, 167, 0, 169, 0, 169, 0, 13, 0,
323 14, 0, 216, 139, 3, 171, 0, 216, 109, 171,
324 0, 0, 103, 172, 174, 0, 63, 0, 45, 0,
325 86, 0, 5, 0, 7, 0, 6, 0, 207, 0,
326 173, 0, 216, 0, 213, 111, 216, 0, 4, 0,
327 174, 4, 0, 24, 0, 63, 0, 76, 0, 176,
328 0, 67, 81, 0, 65, 51, 0, 77, 0, 44,
329 0, 36, 71, 0, 26, 81, 0, 91, 0, 47,
330 0, 178, 0, 58, 0, 40, 0, 22, 81, 0,
vlm4053ca52005-02-18 16:34:21 +0000331 175, 0, 176, 204, 0, 23, 0, 48, 0, 49,
332 0, 50, 0, 59, 0, 64, 0, 74, 0, 83,
333 0, 85, 0, 90, 0, 92, 0, 93, 0, 94,
334 0, 66, 0, 99, 0, 100, 0, 97, 0, 98,
335 0, 96, 0, 0, 183, 0, 184, 0, 80, 105,
336 185, 106, 0, 105, 185, 106, 0, 184, 105, 185,
337 106, 0, 186, 0, 186, 108, 102, 0, 186, 108,
338 102, 108, 186, 0, 187, 0, 186, 179, 187, 0,
339 186, 180, 187, 0, 187, 181, 187, 0, 189, 105,
340 185, 106, 0, 105, 185, 106, 0, 190, 0, 190,
341 188, 190, 0, 61, 188, 190, 0, 190, 188, 60,
342 0, 61, 188, 60, 0, 196, 0, 191, 0, 101,
343 0, 101, 112, 0, 112, 101, 0, 112, 101, 112,
344 0, 80, 0, 46, 0, 45, 0, 86, 0, 207,
345 0, 6, 0, 216, 0, 213, 0, 95, 30, 103,
346 192, 104, 0, 193, 0, 192, 108, 193, 0, 102,
347 0, 216, 182, 194, 0, 0, 195, 0, 73, 0,
348 15, 0, 69, 0, 197, 0, 198, 0, 103, 213,
349 104, 0, 197, 103, 199, 104, 0, 200, 0, 199,
350 108, 200, 0, 113, 201, 0, 113, 111, 201, 0,
351 216, 0, 201, 111, 216, 0, 0, 203, 0, 69,
352 0, 33, 171, 0, 103, 104, 0, 103, 205, 104,
353 0, 206, 0, 205, 108, 206, 0, 216, 0, 216,
354 105, 207, 106, 0, 216, 105, 173, 106, 0, 207,
355 0, 102, 0, 9, 0, 10, 0, 0, 209, 0,
356 210, 212, 0, 114, 211, 9, 115, 0, 0, 89,
357 0, 19, 0, 75, 0, 0, 52, 0, 41, 0,
358 11, 0, 12, 0, 12, 0, 0, 216, 0, 8,
359 0
vlm6a02a8a2004-09-08 00:28:11 +0000360};
vlmfa67ddc2004-06-03 03:38:44 +0000361
362#endif
363
vlm6a02a8a2004-09-08 00:28:11 +0000364#if YYDEBUG != 0
365static const short yyrline[] = { 0,
vlm0aa86902004-10-12 23:26:53 +0000366 301, 307, 313, 329, 354, 356, 359, 363, 368, 375,
367 383, 388, 392, 401, 403, 411, 415, 423, 427, 430,
368 433, 437, 457, 459, 467, 471, 503, 507, 516, 523,
369 536, 543, 545, 557, 570, 577, 582, 588, 594, 603,
370 609, 615, 622, 628, 636, 640, 643, 650, 656, 662,
371 669, 675, 684, 694, 702, 710, 712, 722, 725, 729,
372 732, 744, 756, 762, 778, 787, 797, 807, 812, 819,
vlm4053ca52005-02-18 16:34:21 +0000373 826, 836, 842, 848, 852, 875, 877, 879, 885, 891,
374 898, 905, 910, 916, 922, 928, 933, 943, 945, 948,
375 956, 962, 971, 977, 994, 996, 1001, 1005, 1010, 1015,
376 1021, 1025, 1036, 1045, 1054, 1065, 1087, 1091, 1097, 1103,
vlm5e2c4b92005-03-20 11:12:40 +0000377 1109, 1119, 1129, 1135, 1149, 1173, 1180, 1194, 1203, 1213,
378 1223, 1233, 1241, 1262, 1271, 1280, 1281, 1283, 1290, 1302,
379 1312, 1320, 1320, 1325, 1330, 1335, 1340, 1344, 1348, 1352,
380 1355, 1360, 1372, 1388, 1399, 1413, 1415, 1416, 1417, 1418,
381 1419, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1432, 1434,
382 1435, 1438, 1445, 1457, 1459, 1463, 1467, 1468, 1469, 1470,
383 1471, 1475, 1476, 1477, 1478, 1482, 1483, 1490, 1490, 1491,
384 1491, 1492, 1494, 1496, 1501, 1505, 1514, 1518, 1523, 1527,
385 1533, 1543, 1547, 1550, 1553, 1558, 1567, 1575, 1581, 1588,
386 1596, 1604, 1613, 1616, 1621, 1623, 1624, 1625, 1628, 1632,
387 1637, 1643, 1648, 1651, 1655, 1666, 1679, 1685, 1689, 1694,
388 1700, 1712, 1714, 1717, 1721, 1724, 1729, 1733, 1741, 1756,
389 1762, 1769, 1782, 1794, 1809, 1813, 1830, 1835, 1838, 1843,
390 1865, 1870, 1875, 1881, 1887, 1895, 1903, 1911, 1918, 1928,
391 1933, 1963, 1965, 1968, 1975, 1981, 1983, 1984, 1985, 1988,
392 1990, 1991, 1994, 1999, 2006, 2013, 2015, 2019
vlm6a02a8a2004-09-08 00:28:11 +0000393};
394#endif
395
396
397#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
398
399static const char * const yytname[] = { "$","error","$undefined.","TOK_PPEQ",
400"TOK_opaque","TOK_bstring","TOK_cstring","TOK_hstring","TOK_identifier","TOK_number",
401"TOK_number_negative","TOK_typereference","TOK_capitalreference","TOK_typefieldreference",
402"TOK_valuefieldreference","TOK_ABSENT","TOK_ABSTRACT_SYNTAX","TOK_ALL","TOK_ANY",
403"TOK_APPLICATION","TOK_AUTOMATIC","TOK_BEGIN","TOK_BIT","TOK_BMPString","TOK_BOOLEAN",
404"TOK_BY","TOK_CHARACTER","TOK_CHOICE","TOK_CLASS","TOK_COMPONENT","TOK_COMPONENTS",
405"TOK_CONSTRAINED","TOK_CONTAINING","TOK_DEFAULT","TOK_DEFINITIONS","TOK_DEFINED",
406"TOK_EMBEDDED","TOK_ENCODED","TOK_ENCODING_CONTROL","TOK_END","TOK_ENUMERATED",
407"TOK_EXPLICIT","TOK_EXPORTS","TOK_EXTENSIBILITY","TOK_EXTERNAL","TOK_FALSE",
408"TOK_FROM","TOK_GeneralizedTime","TOK_GeneralString","TOK_GraphicString","TOK_IA5String",
409"TOK_IDENTIFIER","TOK_IMPLICIT","TOK_IMPLIED","TOK_IMPORTS","TOK_INCLUDES","TOK_INSTANCE",
410"TOK_INSTRUCTIONS","TOK_INTEGER","TOK_ISO646String","TOK_MAX","TOK_MIN","TOK_MINUS_INFINITY",
411"TOK_NULL","TOK_NumericString","TOK_OBJECT","TOK_ObjectDescriptor","TOK_OCTET",
412"TOK_OF","TOK_OPTIONAL","TOK_PATTERN","TOK_PDV","TOK_PLUS_INFINITY","TOK_PRESENT",
413"TOK_PrintableString","TOK_PRIVATE","TOK_REAL","TOK_RELATIVE_OID","TOK_SEQUENCE",
414"TOK_SET","TOK_SIZE","TOK_STRING","TOK_SYNTAX","TOK_T61String","TOK_TAGS","TOK_TeletexString",
415"TOK_TRUE","TOK_TYPE_IDENTIFIER","TOK_UNIQUE","TOK_UNIVERSAL","TOK_UniversalString",
416"TOK_UTCTime","TOK_UTF8String","TOK_VideotexString","TOK_VisibleString","TOK_WITH",
417"TOK_EXCEPT","'^'","TOK_INTERSECTION","'|'","TOK_UNION","TOK_TwoDots","TOK_ThreeDots",
vlm2728a8d2005-01-23 09:51:44 +0000418"'{'","'}'","'('","')'","';'","','","':'","'!'","'.'","'<'","'@'","'['","']'",
vlm6a02a8a2004-09-08 00:28:11 +0000419"ParsedGrammar","ModuleList","ModuleSpecification","optObjectIdentifier","ObjectIdentifier",
420"ObjectIdentifierBody","ObjectIdentifierElement","optModuleSpecificationFlags",
421"ModuleSpecificationFlags","ModuleSpecificationFlag","optModuleSpecificationBody",
422"ModuleSpecificationBody","ModuleSpecificationElement","@1","ImportsDefinition",
423"ImportsBundleSet","ImportsBundle","ImportsList","ImportsElement","ExportsDefinition",
424"ExportsBody","ExportsElement","ValueSetDefinition","DefinedTypeRef","optValueSetBody",
425"ValueSetBody","ValueSetElement","DataTypeReference","ParameterArgumentList",
vlm0aa86902004-10-12 23:26:53 +0000426"ParameterArgumentName","ActualParameterList","ActualParameter","optComponentTypeLists",
427"ComponentTypeLists","ComponentType","AlternativeTypeLists","AlternativeType",
428"ClassDeclaration","optUnique","ClassFieldList","ClassField","optWithSyntax",
429"WithSyntax","@2","WithSyntaxFormat","WithSyntaxFormatToken","ExtensionAndException",
430"Type","TypeDeclaration","ComplexTypeReference","ComplexTypeReferenceAmpList",
431"ComplexTypeReferenceElement","ClassFieldIdentifier","ClassFieldName","ValueDefinition",
432"Value","@3","DefinedValue","Opaque","BasicTypeId","BasicTypeId_UniverationCompatible",
433"BasicType","BasicString","Union","Intersection","Except","optConstraints","Constraints",
434"SetOfConstraints","ElementSetSpecs","ElementSetSpec","ConstraintSubtypeElement",
435"ConstraintRangeSpec","ConstraintSpec","ConstraintValue","WithComponents","WithComponentsList",
436"WithComponentsElement","optPresenceConstraint","PresenceConstraint","TableConstraint",
437"SimpleTableConstraint","ComponentRelationConstraint","AtNotationList","AtNotationElement",
438"ComponentIdList","optMarker","Marker","UniverationDefinition","UniverationList",
vlm2728a8d2005-01-23 09:51:44 +0000439"UniverationElement","SignedNumber","optTag","Tag","TagTypeValue","TagClass",
440"TagPlicit","TypeRefName","ObjectClassReference","optIdentifier","Identifier", NULL
vlm6a02a8a2004-09-08 00:28:11 +0000441};
442#endif
443
444static const short yyr1[] = { 0,
vlm2728a8d2005-01-23 09:51:44 +0000445 116, 117, 117, 118, 119, 119, 120, 120, 121, 121,
446 122, 122, 122, 123, 123, 124, 124, 125, 125, 125,
447 125, 125, 126, 126, 127, 127, 128, 128, 128, 128,
448 128, 129, 128, 128, 130, 130, 131, 131, 132, 133,
449 133, 134, 134, 134, 135, 135, 135, 136, 136, 137,
450 137, 137, 138, 139, 139, 140, 140, 141, 141, 142,
451 142, 143, 143, 143, 143, 144, 144, 145, 145, 145,
vlm4053ca52005-02-18 16:34:21 +0000452 145, 146, 146, 147, 147, 148, 148, 149, 149, 150,
453 150, 150, 151, 151, 152, 152, 153, 154, 154, 155,
454 155, 156, 156, 156, 157, 157, 159, 158, 160, 160,
455 161, 161, 162, 162, 162, 163, 164, 164, 164, 164,
vlm5e2c4b92005-03-20 11:12:40 +0000456 164, 164, 164, 164, 164, 164, 164, 165, 165, 165,
457 165, 165, 165, 166, 166, 167, 168, 169, 169, 170,
458 171, 172, 171, 171, 171, 171, 171, 171, 171, 171,
459 171, 173, 173, 174, 174, 175, 175, 175, 175, 175,
vlm4053ca52005-02-18 16:34:21 +0000460 175, 175, 175, 175, 175, 175, 175, 175, 176, 176,
461 176, 177, 177, 178, 178, 178, 178, 178, 178, 178,
462 178, 178, 178, 178, 178, 178, 178, 179, 179, 180,
463 180, 181, 182, 182, 183, 183, 184, 184, 185, 185,
464 185, 186, 186, 186, 186, 187, 187, 187, 187, 187,
465 187, 187, 187, 187, 188, 188, 188, 188, 189, 189,
466 190, 190, 190, 190, 190, 190, 191, 192, 192, 193,
467 193, 194, 194, 195, 195, 195, 196, 196, 197, 198,
468 199, 199, 200, 200, 201, 201, 202, 202, 203, 203,
469 204, 204, 205, 205, 206, 206, 206, 206, 206, 207,
470 207, 208, 208, 209, 210, 211, 211, 211, 211, 212,
471 212, 212, 213, 213, 214, 215, 215, 216
vlm6a02a8a2004-09-08 00:28:11 +0000472};
473
474static const short yyr2[] = { 0,
475 1, 1, 2, 8, 0, 1, 3, 2, 1, 2,
476 1, 4, 1, 0, 1, 1, 2, 2, 2, 2,
477 2, 2, 0, 1, 1, 2, 1, 1, 1, 1,
478 1, 0, 3, 1, 3, 2, 1, 2, 4, 1,
vlm0aa86902004-10-12 23:26:53 +0000479 3, 1, 3, 1, 3, 3, 2, 1, 3, 1,
480 3, 1, 6, 1, 1, 0, 1, 1, 3, 1,
481 1, 4, 3, 3, 6, 1, 3, 1, 3, 3,
vlm4053ca52005-02-18 16:34:21 +0000482 3, 1, 3, 1, 1, 0, 1, 1, 3, 3,
483 3, 1, 1, 3, 2, 1, 5, 0, 1, 1,
484 3, 2, 4, 4, 0, 1, 0, 6, 1, 2,
vlm5e2c4b92005-03-20 11:12:40 +0000485 1, 1, 1, 3, 3, 3, 1, 4, 4, 4,
486 6, 6, 1, 4, 4, 1, 3, 1, 3, 3,
487 3, 1, 3, 1, 3, 1, 1, 1, 1, 4,
488 3, 0, 3, 1, 1, 1, 1, 1, 1, 1,
489 1, 1, 3, 1, 2, 1, 1, 1, 1, 2,
490 2, 1, 1, 2, 2, 1, 1, 1, 1, 1,
vlm4053ca52005-02-18 16:34:21 +0000491 2, 1, 2, 1, 1, 1, 1, 1, 1, 1,
vlm6a02a8a2004-09-08 00:28:11 +0000492 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
vlm4053ca52005-02-18 16:34:21 +0000493 1, 1, 0, 1, 1, 4, 3, 4, 1, 3,
494 5, 1, 3, 3, 3, 4, 3, 1, 3, 3,
495 3, 3, 1, 1, 1, 2, 2, 3, 1, 1,
496 1, 1, 1, 1, 1, 1, 5, 1, 3, 1,
497 3, 0, 1, 1, 1, 1, 1, 1, 3, 4,
498 1, 3, 2, 3, 1, 3, 0, 1, 1, 2,
499 2, 3, 1, 3, 1, 4, 4, 1, 1, 1,
500 1, 0, 1, 2, 4, 0, 1, 1, 1, 0,
501 1, 1, 1, 1, 1, 0, 1, 1
vlm6a02a8a2004-09-08 00:28:11 +0000502};
503
504static const short yydefact[] = { 0,
vlm4053ca52005-02-18 16:34:21 +0000505 263, 264, 1, 2, 5, 3, 0, 0, 6, 268,
vlm6a02a8a2004-09-08 00:28:11 +0000506 13, 8, 0, 9, 11, 14, 7, 10, 0, 0,
507 0, 0, 0, 0, 0, 15, 16, 0, 22, 20,
vlm4053ca52005-02-18 16:34:21 +0000508 18, 21, 19, 0, 17, 12, 23, 164, 0, 0,
509 165, 166, 167, 0, 168, 169, 177, 170, 171, 172,
510 173, 174, 175, 176, 0, 24, 25, 27, 28, 31,
vlm0aa86902004-10-12 23:26:53 +0000511 29, 30, 34, 0, 0, 32, 0, 47, 0, 48,
512 50, 52, 36, 0, 37, 0, 40, 42, 44, 4,
vlm5e2c4b92005-03-20 11:12:40 +0000513 26, 252, 118, 265, 0, 146, 0, 0, 160, 153,
514 157, 159, 147, 0, 0, 148, 152, 156, 0, 0,
515 54, 55, 149, 158, 122, 0, 33, 46, 45, 0,
516 0, 35, 38, 0, 0, 0, 0, 256, 64, 63,
517 0, 253, 260, 0, 161, 155, 154, 151, 150, 0,
518 66, 0, 68, 0, 0, 0, 49, 51, 5, 41,
519 43, 0, 258, 259, 257, 0, 118, 265, 113, 0,
520 0, 183, 183, 62, 183, 116, 162, 149, 107, 0,
521 262, 261, 254, 119, 121, 0, 0, 0, 0, 56,
522 128, 129, 123, 124, 126, 120, 137, 139, 138, 250,
523 251, 135, 134, 136, 132, 130, 141, 140, 0, 142,
524 39, 0, 90, 252, 127, 0, 0, 0, 0, 0,
vlm4053ca52005-02-18 16:34:21 +0000525 76, 0, 0, 184, 185, 76, 0, 106, 0, 163,
526 252, 252, 67, 71, 70, 69, 214, 211, 210, 0,
527 209, 212, 0, 60, 0, 0, 0, 57, 58, 61,
528 192, 0, 198, 204, 203, 227, 228, 213, 216, 215,
529 0, 0, 0, 0, 95, 0, 0, 239, 88, 88,
530 92, 238, 0, 255, 0, 103, 0, 83, 86, 252,
vlm5e2c4b92005-03-20 11:12:40 +0000531 117, 0, 0, 0, 77, 78, 82, 252, 0, 189,
vlm4053ca52005-02-18 16:34:21 +0000532 266, 0, 0, 266, 249, 241, 0, 243, 248, 245,
533 0, 72, 74, 75, 65, 205, 0, 0, 0, 0,
534 0, 53, 0, 180, 181, 178, 179, 0, 0, 182,
vlm5e2c4b92005-03-20 11:12:40 +0000535 0, 0, 0, 0, 125, 144, 133, 143, 131, 0,
536 87, 96, 91, 240, 89, 237, 237, 114, 0, 108,
537 0, 85, 0, 252, 109, 0, 237, 187, 0, 252,
538 267, 0, 110, 252, 242, 0, 0, 115, 252, 206,
vlm4053ca52005-02-18 16:34:21 +0000539 207, 202, 200, 0, 229, 197, 59, 193, 194, 195,
vlm5e2c4b92005-03-20 11:12:40 +0000540 0, 201, 199, 0, 0, 231, 145, 0, 93, 94,
541 104, 105, 142, 84, 186, 81, 79, 80, 190, 0,
vlm4053ca52005-02-18 16:34:21 +0000542 188, 0, 244, 0, 0, 73, 208, 220, 0, 218,
vlm5e2c4b92005-03-20 11:12:40 +0000543 183, 196, 0, 233, 235, 230, 0, 97, 0, 111,
544 112, 247, 246, 217, 0, 222, 234, 0, 232, 0,
vlm4053ca52005-02-18 16:34:21 +0000545 191, 219, 225, 226, 224, 221, 223, 236, 101, 0,
546 99, 102, 98, 100, 0, 0, 0
vlm6a02a8a2004-09-08 00:28:11 +0000547};
548
vlm4053ca52005-02-18 16:34:21 +0000549static const short yydefgoto[] = { 415,
vlm6a02a8a2004-09-08 00:28:11 +0000550 3, 4, 8, 9, 13, 14, 25, 26, 27, 55,
vlm5e2c4b92005-03-20 11:12:40 +0000551 56, 57, 107, 58, 74, 75, 76, 77, 59, 69,
552 70, 60, 100, 227, 228, 229, 61, 130, 131, 281,
553 282, 264, 265, 266, 257, 258, 119, 316, 192, 193,
554 311, 312, 400, 410, 411, 267, 283, 155, 156, 173,
555 174, 194, 195, 62, 186, 242, 187, 307, 157, 103,
556 159, 104, 298, 299, 301, 203, 204, 205, 269, 270,
vlm4053ca52005-02-18 16:34:21 +0000557 231, 288, 232, 233, 234, 379, 380, 406, 407, 235,
558 236, 237, 355, 356, 384, 251, 252, 210, 277, 278,
vlm5e2c4b92005-03-20 11:12:40 +0000559 238, 253, 122, 123, 146, 163, 239, 105, 330, 240
vlm6a02a8a2004-09-08 00:28:11 +0000560};
561
vlm5e2c4b92005-03-20 11:12:40 +0000562static const short yypact[] = { 152,
563-32768,-32768, 152,-32768, -74,-32768, 12, 5,-32768,-32768,
564-32768,-32768, 38,-32768, -16, 54,-32768,-32768, 44, 56,
565 47, 72, 85, 81, 141, 54,-32768, 64,-32768,-32768,
566-32768,-32768,-32768, 132,-32768,-32768, 407,-32768, 161, 33,
567-32768,-32768,-32768, 53,-32768,-32768,-32768,-32768,-32768,-32768,
568-32768,-32768,-32768,-32768, 156, 407,-32768,-32768,-32768,-32768,
569-32768,-32768,-32768, 331, 636,-32768, 118,-32768, 105,-32768,
570 124,-32768,-32768, 16,-32768, -23,-32768, 147,-32768,-32768,
571-32768, -3, 140,-32768, 176,-32768, 182, 203,-32768,-32768,
572-32768,-32768,-32768, 225, 198,-32768,-32768,-32768, 711, 278,
573-32768,-32768,-32768,-32768, 171, 283,-32768,-32768,-32768, 65,
574 189,-32768,-32768, 152, 65, 194, 200, 3,-32768,-32768,
575 484,-32768, 84, 65,-32768,-32768,-32768,-32768,-32768, 67,
576-32768, 192, 195, 204, 248, 210,-32768,-32768, -74,-32768,
577-32768, 163,-32768,-32768,-32768, 306, -10, 213, 282, 215,
578 253, -1, 69,-32768, -42,-32768,-32768, 219,-32768, 223,
579-32768,-32768,-32768,-32768,-32768, 320, 711, 319, 65, 197,
580-32768,-32768, 217,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
581-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 222, 226,
582-32768, 82,-32768, 29,-32768, 216, 311, 7, 235, 233,
583 10, 279, 271,-32768, 236, 10, 276,-32768, 46,-32768,
584 1, 231,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 27,
585-32768,-32768, 318,-32768, 152, 279, 245, 243,-32768, 211,
586 256, 251, 27,-32768,-32768, 255,-32768,-32768,-32768,-32768,
587 163, 356, 319, 210, 266, 163, 210,-32768, 274, 274,
588-32768,-32768, 561,-32768, 319, 254, 88,-32768,-32768, 231,
589-32768, 279, 295, 262, 261,-32768,-32768, 231, 264, 60,
590 319, 279, 268, 319,-32768,-32768, 93,-32768,-32768, 272,
591 130,-32768,-32768,-32768,-32768, 273, 285, 220, 270, 288,
592 277,-32768, 197,-32768,-32768,-32768,-32768, 279, 279,-32768,
593 279, 279, 260, 280,-32768,-32768, 383,-32768,-32768, 317,
594-32768,-32768,-32768,-32768,-32768, 19, 19,-32768, 173,-32768,
595 7,-32768, 294, 231,-32768, 10, 19,-32768, 300, 231,
596-32768, 298,-32768, 231,-32768, 49, 173,-32768, 1,-32768,
597 297,-32768,-32768, 52,-32768,-32768,-32768,-32768,-32768,-32768,
598 304,-32768,-32768, 11, 131,-32768,-32768, 303,-32768,-32768,
599-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 305, 561,
600-32768, 561,-32768, 314, 321,-32768,-32768,-32768, 137,-32768,
601 -42,-32768, 319, 301,-32768,-32768, 280,-32768, 279,-32768,
602-32768,-32768,-32768,-32768, 52, 17, 301, 319,-32768, 165,
603 211,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 22,
604-32768,-32768,-32768,-32768, 411, 417,-32768
vlm6a02a8a2004-09-08 00:28:11 +0000605};
606
607static const short yypgoto[] = {-32768,
vlm5e2c4b92005-03-20 11:12:40 +0000608-32768, 423, 289,-32768,-32768, 416,-32768,-32768, 405,-32768,
609-32768, 376,-32768,-32768,-32768, 359,-32768, 322,-32768,-32768,
610 325,-32768, 371,-32768,-32768, 145,-32768,-32768, 275,-32768,
611 100, 234,-32768, 115,-32768, 122,-32768, 196,-32768, 201,
612-32768,-32768,-32768,-32768, 34, -187, -80, -183, -52,-32768,
613 207, -186, -121,-32768, -137,-32768, -237,-32768, -48, -118,
614-32768, 35,-32768,-32768,-32768, -148,-32768,-32768, -178, -166,
615 -4, 218,-32768, -207,-32768,-32768, 55,-32768,-32768,-32768,
616-32768,-32768,-32768, 66, 71, -247,-32768,-32768,-32768, 116,
617 -126, -81,-32768,-32768,-32768,-32768, 31,-32768, 184, -7
vlm6a02a8a2004-09-08 00:28:11 +0000618};
619
620
vlm5e2c4b92005-03-20 11:12:40 +0000621#define YYLAST 805
vlm6a02a8a2004-09-08 00:28:11 +0000622
623
624static const short yytable[] = { 15,
vlm5e2c4b92005-03-20 11:12:40 +0000625 121, 120, 158, 230, 207, 15, 208, 250, 10, 188,
626 259, 101, 101, 175, 10, 102, 102, 10, 10, 10,
627 11, 143, 114, 10, 117, 409, 1, 2, 7, 65,
628 5, 403, 72, 5, 171, 172, 79, 200, 16, 263,
629 10, 171, 172, 1, 2, 10, 11, 291, 65, 67,
630 132, 247, 28, 10, 180, 181, 10, 180, 181, 10,
631 10, 247, 202, 1, 2, 20, 79, 64, 359, 360,
632 71, 63, 10, 21, 78, 1, 2, 144, 200, 368,
633 343, 361, 279, 323, 115, 404, 64, 248, 19, 405,
634 63, 145, -263, 332, 22, 353, 23, 248, 73, 374,
635 124, 201, 72, 202, 78, 24, 309, 79, 256, 314,
636 118, 256, 29, 249, 118, 12, 165, 188, 132, 175,
637 188, 383, 112, 351, 161, 413, 230, 286, 190, 133,
638 30, 285, -237, 259, 158, 162, -237, 32, 287, 68,
639 71, 17, 118, 34, 139, 78, 261, 275, 200, 276,
640 275, 160, 37, 378, 164, 31, 294, 295, 296, 297,
641 214, 216, 1, 2, 33, 176, 189, 329, 409, 36,
642 166, 206, 66, 202, 167, 171, 172, 171, 172, 322,
643 10, 180, 181, 1, 2, 245, 390, 327, 391, 246,
644 260, 320, 362, 268, 80, 321, 335, 133, 268, 215,
645 336, 280, 217, 284, 10, 180, 181, 1, 2, 279,
646 375, 109, 110, 412, 177, 178, 179, 10, 180, 181,
647 1, 2, 401, 412, 108, 217, 111, 10, 180, 181,
648 1, 2, 396, 338, 386, 308, 190, 339, 387, 190,
649 394, 218, 219, 366, 395, 83, 84, 318, 370, 116,
650 124, 158, 372, 158, 182, 290, 125, 220, 1, 2,
651 171, 172, 126, 331, 218, 217, 331, 10, 180, 181,
652 1, 2, 183, 127, 189, 128, 221, 189, 129, 342,
653 134, 135, 222, 160, 217, 136, 10, 180, 181, 1,
654 2, 223, 138, 348, 349, 184, 350, 141, 224, 225,
655 168, 226, 142, 169, 218, 222, 170, 294, 295, 296,
656 297, 363, 185, 260, 196, -264, 197, 198, 268, 352,
657 199, 209, 212, 218, 219, 211, 10, 241, 280, 363,
658 254, 284, 243, 82, 244, 255, 381, 262, 271, 220,
659 272, 83, 84, 274, 118, 222, 385, 289, 292, 189,
660 293, 300, 85, 38, 86, 302, 87, 304, 221, 306,
661 310, 315, 324, 319, 222, 325, 88, 189, 326, 328,
662 89, 333, 344, 223, 90, 385, 337, 91, 41, 42,
663 43, 225, 346, 226, 340, 341, 357, 381, 92, 45,
664 408, 345, 354, 93, 46, 94, 47, 95, 358, 365,
665 160, 369, 160, 371, 48, 388, 96, 97, 377, 382,
666 416, 398, 389, 49, 10, 50, 417, 1, 2, 392,
667 51, 98, 52, 53, 54, 6, 393, 191, 18, 38,
668 35, 81, 113, 99, 137, 106, 140, 347, 376, 273,
669 367, 213, 364, 414, 39, 317, 313, 305, 40, 402,
670 303, 373, 399, 397, 41, 42, 43, 334, 0, 0,
671 44, 0, 0, 0, 0, 45, 0, 0, 0, 0,
672 46, 0, 47, 0, 0, 0, 0, 0, 0, 0,
673 48, 0, 0, 0, 0, 0, 0, 0, 0, 49,
674 0, 50, 0, 0, 147, 148, 51, 0, 52, 53,
675 54, 149, 0, 0, 0, 85, 38, 86, 0, 87,
676 150, 0, 0, 0, 0, 0, 0, 0, 0, 88,
vlm4053ca52005-02-18 16:34:21 +0000677 0, 0, 0, 89, 0, 0, 0, 90, 0, 0,
vlm5e2c4b92005-03-20 11:12:40 +0000678 91, 41, 42, 43, 0, 0, 0, 0, 0, 151,
vlm4053ca52005-02-18 16:34:21 +0000679 0, 92, 45, 0, 0, 0, 93, 46, 94, 47,
680 95, 0, 0, 0, 0, 0, 0, 48, 0, 96,
vlm5e2c4b92005-03-20 11:12:40 +0000681 97, 152, 153, 0, 0, 0, 49, 0, 50, 0,
682 154, 147, 148, 51, 98, 52, 53, 54, 149, 0,
683 0, 0, 85, 38, 86, 0, 87, 150, 0, 0,
vlm4053ca52005-02-18 16:34:21 +0000684 0, 0, 0, 0, 0, 0, 88, 0, 0, 0,
685 89, 0, 0, 0, 90, 0, 0, 91, 41, 42,
vlm5e2c4b92005-03-20 11:12:40 +0000686 43, 0, 0, 0, 0, 0, 151, 0, 92, 45,
vlm4053ca52005-02-18 16:34:21 +0000687 0, 0, 0, 93, 46, 94, 47, 95, 0, 0,
vlm5e2c4b92005-03-20 11:12:40 +0000688 0, 0, 0, 0, 48, 0, 96, 97, 152, 153,
689 0, 0, 0, 49, 0, 50, 83, 84, 0, 0,
690 51, 98, 52, 53, 54, 0, 0, 85, 38, 86,
691 0, 87, 0, 0, 0, 0, 0, 0, 0, 0,
692 0, 88, 0, 0, 0, 89, 0, 0, 0, 90,
693 0, 0, 91, 41, 42, 43, 0, 0, 0, 0,
694 0, 0, 0, 92, 45, 0, 0, 0, 93, 46,
695 94, 47, 95, 0, 0, 0, 0, 0, 0, 48,
696 0, 96, 97, 0, 0, 0, 0, 0, 49, 0,
697 50, 1, 2, 0, 0, 51, 98, 52, 53, 54,
698 0, 0, 85, 38, 86, 0, 87, 0, 0, 0,
699 0, 0, 0, 0, 0, 0, 88, 0, 0, 0,
700 89, 0, 0, 0, 90, 0, 0, 91, 41, 42,
701 43, 0, 0, 0, 0, 0, 0, 0, 92, 45,
702 0, 0, 0, 93, 46, 94, 47, 95, 0, 0,
703 0, 0, 0, 0, 48, 0, 96, 97, 0, 0,
704 0, 0, 0, 49, 0, 50, 0, 0, 0, 0,
705 51, 98, 52, 53, 54
vlm6a02a8a2004-09-08 00:28:11 +0000706};
707
708static const short yycheck[] = { 7,
vlm5e2c4b92005-03-20 11:12:40 +0000709 82, 82, 121, 170, 153, 13, 155, 194, 8, 136,
710 198, 64, 65, 135, 8, 64, 65, 8, 8, 8,
711 9, 19, 46, 8, 28, 4, 11, 12, 103, 37,
712 0, 15, 40, 3, 13, 14, 44, 80, 34, 30,
713 8, 13, 14, 11, 12, 8, 9, 226, 56, 17,
714 99, 33, 9, 8, 9, 10, 8, 9, 10, 8,
715 8, 33, 105, 11, 12, 12, 74, 37, 316, 317,
716 40, 37, 8, 20, 44, 11, 12, 75, 80, 327,
717 288, 319, 209, 262, 108, 69, 56, 69, 105, 73,
718 56, 89, 103, 272, 41, 303, 43, 69, 46, 337,
719 111, 103, 110, 105, 74, 52, 244, 115, 102, 247,
720 114, 102, 57, 194, 114, 104, 124, 244, 167, 241,
721 247, 111, 107, 302, 41, 104, 293, 101, 136, 99,
722 84, 212, 104, 321, 253, 52, 108, 53, 112, 107,
723 110, 104, 114, 3, 114, 115, 199, 102, 80, 104,
724 102, 121, 21, 102, 124, 84, 97, 98, 99, 100,
725 168, 169, 11, 12, 84, 135, 136, 108, 4, 106,
726 104, 103, 12, 105, 108, 13, 14, 13, 14, 260,
727 8, 9, 10, 11, 12, 104, 370, 268, 372, 108,
728 198, 104, 319, 201, 39, 108, 104, 167, 206, 169,
729 108, 209, 6, 211, 8, 9, 10, 11, 12, 336,
730 337, 107, 108, 400, 5, 6, 7, 8, 9, 10,
731 11, 12, 389, 410, 107, 6, 103, 8, 9, 10,
732 11, 12, 381, 104, 104, 243, 244, 108, 108, 247,
733 104, 45, 46, 324, 108, 11, 12, 255, 330, 103,
734 111, 370, 334, 372, 45, 225, 81, 61, 11, 12,
735 13, 14, 81, 271, 45, 6, 274, 8, 9, 10,
736 11, 12, 63, 71, 244, 51, 80, 247, 81, 60,
737 3, 111, 86, 253, 6, 3, 8, 9, 10, 11,
738 12, 95, 104, 298, 299, 86, 301, 104, 102, 103,
739 109, 105, 103, 109, 45, 86, 103, 97, 98, 99,
740 100, 319, 103, 321, 9, 103, 35, 103, 326, 60,
741 68, 103, 3, 45, 46, 103, 8, 111, 336, 337,
742 115, 339, 111, 3, 109, 25, 344, 105, 68, 61,
743 105, 11, 12, 68, 114, 86, 354, 30, 104, 319,
744 108, 96, 22, 23, 24, 105, 26, 103, 80, 4,
745 95, 88, 68, 110, 86, 104, 36, 337, 108, 106,
746 40, 104, 103, 95, 44, 383, 105, 47, 48, 49,
747 50, 103, 106, 105, 112, 101, 4, 395, 58, 59,
748 398, 104, 113, 63, 64, 65, 66, 67, 82, 106,
749 370, 102, 372, 106, 74, 103, 76, 77, 112, 106,
750 0, 111, 108, 83, 8, 85, 0, 11, 12, 106,
751 90, 91, 92, 93, 94, 3, 106, 139, 13, 23,
752 26, 56, 74, 103, 110, 65, 115, 293, 339, 206,
753 326, 167, 321, 410, 38, 250, 246, 241, 42, 395,
754 233, 336, 387, 383, 48, 49, 50, 274, -1, -1,
755 54, -1, -1, -1, -1, 59, -1, -1, -1, -1,
756 64, -1, 66, -1, -1, -1, -1, -1, -1, -1,
757 74, -1, -1, -1, -1, -1, -1, -1, -1, 83,
vlm4053ca52005-02-18 16:34:21 +0000758 -1, 85, -1, -1, 11, 12, 90, -1, 92, 93,
759 94, 18, -1, -1, -1, 22, 23, 24, -1, 26,
760 27, -1, -1, -1, -1, -1, -1, -1, -1, 36,
761 -1, -1, -1, 40, -1, -1, -1, 44, -1, -1,
762 47, 48, 49, 50, -1, -1, -1, -1, -1, 56,
763 -1, 58, 59, -1, -1, -1, 63, 64, 65, 66,
764 67, -1, -1, -1, -1, -1, -1, 74, -1, 76,
765 77, 78, 79, -1, -1, -1, 83, -1, 85, -1,
766 87, 11, 12, 90, 91, 92, 93, 94, 18, -1,
767 -1, -1, 22, 23, 24, -1, 26, 27, -1, -1,
768 -1, -1, -1, -1, -1, -1, 36, -1, -1, -1,
769 40, -1, -1, -1, 44, -1, -1, 47, 48, 49,
770 50, -1, -1, -1, -1, -1, 56, -1, 58, 59,
771 -1, -1, -1, 63, 64, 65, 66, 67, -1, -1,
vlm5e2c4b92005-03-20 11:12:40 +0000772 -1, -1, -1, -1, 74, -1, 76, 77, 78, 79,
773 -1, -1, -1, 83, -1, 85, 11, 12, -1, -1,
774 90, 91, 92, 93, 94, -1, -1, 22, 23, 24,
775 -1, 26, -1, -1, -1, -1, -1, -1, -1, -1,
776 -1, 36, -1, -1, -1, 40, -1, -1, -1, 44,
777 -1, -1, 47, 48, 49, 50, -1, -1, -1, -1,
778 -1, -1, -1, 58, 59, -1, -1, -1, 63, 64,
779 65, 66, 67, -1, -1, -1, -1, -1, -1, 74,
780 -1, 76, 77, -1, -1, -1, -1, -1, 83, -1,
781 85, 11, 12, -1, -1, 90, 91, 92, 93, 94,
782 -1, -1, 22, 23, 24, -1, 26, -1, -1, -1,
783 -1, -1, -1, -1, -1, -1, 36, -1, -1, -1,
784 40, -1, -1, -1, 44, -1, -1, 47, 48, 49,
785 50, -1, -1, -1, -1, -1, -1, -1, 58, 59,
786 -1, -1, -1, 63, 64, 65, 66, 67, -1, -1,
787 -1, -1, -1, -1, 74, -1, 76, 77, -1, -1,
788 -1, -1, -1, 83, -1, 85, -1, -1, -1, -1,
789 90, 91, 92, 93, 94
vlm6a02a8a2004-09-08 00:28:11 +0000790};
791/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
792#line 3 "/usr/share/bison.simple"
793/* This file comes from bison-1.28. */
794
795/* Skeleton output parser for bison,
796 Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
797
798 This program is free software; you can redistribute it and/or modify
799 it under the terms of the GNU General Public License as published by
800 the Free Software Foundation; either version 2, or (at your option)
801 any later version.
802
803 This program is distributed in the hope that it will be useful,
804 but WITHOUT ANY WARRANTY; without even the implied warranty of
805 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
806 GNU General Public License for more details.
807
808 You should have received a copy of the GNU General Public License
809 along with this program; if not, write to the Free Software
810 Foundation, Inc., 59 Temple Place - Suite 330,
811 Boston, MA 02111-1307, USA. */
812
813/* As a special exception, when this file is copied by Bison into a
814 Bison output file, you may use that output file without restriction.
815 This special exception was added by the Free Software Foundation
816 in version 1.24 of Bison. */
817
818/* This is the parser code that is written into each bison parser
819 when the %semantic_parser declaration is not specified in the grammar.
820 It was written by Richard Stallman by simplifying the hairy parser
821 used when %semantic_parser is specified. */
822
823#ifndef YYSTACK_USE_ALLOCA
824#ifdef alloca
825#define YYSTACK_USE_ALLOCA
826#else /* alloca not defined */
827#ifdef __GNUC__
828#define YYSTACK_USE_ALLOCA
829#define alloca __builtin_alloca
830#else /* not GNU C. */
831#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
832#define YYSTACK_USE_ALLOCA
833#include <alloca.h>
834#else /* not sparc */
835/* We think this test detects Watcom and Microsoft C. */
836/* This used to test MSDOS, but that is a bad idea
837 since that symbol is in the user namespace. */
838#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
839#if 0 /* No need for malloc.h, which pollutes the namespace;
840 instead, just don't use alloca. */
841#include <malloc.h>
842#endif
843#else /* not MSDOS, or __TURBOC__ */
844#if defined(_AIX)
845/* I don't know what this was needed for, but it pollutes the namespace.
846 So I turned it off. rms, 2 May 1997. */
847/* #include <malloc.h> */
848 #pragma alloca
849#define YYSTACK_USE_ALLOCA
850#else /* not MSDOS, or __TURBOC__, or _AIX */
851#if 0
852#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
853 and on HPUX 10. Eventually we can turn this on. */
854#define YYSTACK_USE_ALLOCA
855#define alloca __builtin_alloca
856#endif /* __hpux */
857#endif
858#endif /* not _AIX */
859#endif /* not MSDOS, or __TURBOC__ */
860#endif /* not sparc */
861#endif /* not GNU C */
862#endif /* alloca not defined */
863#endif /* YYSTACK_USE_ALLOCA not defined */
864
865#ifdef YYSTACK_USE_ALLOCA
866#define YYSTACK_ALLOC alloca
vlmfa67ddc2004-06-03 03:38:44 +0000867#else
vlm6a02a8a2004-09-08 00:28:11 +0000868#define YYSTACK_ALLOC malloc
vlmfa67ddc2004-06-03 03:38:44 +0000869#endif
870
vlm6a02a8a2004-09-08 00:28:11 +0000871/* Note: there must be only one dollar sign in this file.
872 It is replaced by the list of actions, each action
873 as one case of the switch. */
vlmfa67ddc2004-06-03 03:38:44 +0000874
875#define yyerrok (yyerrstatus = 0)
876#define yyclearin (yychar = YYEMPTY)
877#define YYEMPTY -2
878#define YYEOF 0
879#define YYACCEPT goto yyacceptlab
vlm6a02a8a2004-09-08 00:28:11 +0000880#define YYABORT goto yyabortlab
vlmfa67ddc2004-06-03 03:38:44 +0000881#define YYERROR goto yyerrlab1
vlm6a02a8a2004-09-08 00:28:11 +0000882/* Like YYERROR except do call yyerror.
883 This remains here temporarily to ease the
884 transition to the new meaning of YYERROR, for GCC.
vlmfa67ddc2004-06-03 03:38:44 +0000885 Once GCC version 2 has supplanted version 1, this can go. */
886#define YYFAIL goto yyerrlab
887#define YYRECOVERING() (!!yyerrstatus)
vlm6a02a8a2004-09-08 00:28:11 +0000888#define YYBACKUP(token, value) \
vlmfa67ddc2004-06-03 03:38:44 +0000889do \
890 if (yychar == YYEMPTY && yylen == 1) \
vlm6a02a8a2004-09-08 00:28:11 +0000891 { yychar = (token), yylval = (value); \
vlmfa67ddc2004-06-03 03:38:44 +0000892 yychar1 = YYTRANSLATE (yychar); \
893 YYPOPSTACK; \
894 goto yybackup; \
895 } \
896 else \
vlm6a02a8a2004-09-08 00:28:11 +0000897 { yyerror ("syntax error: cannot back up"); YYERROR; } \
vlmfa67ddc2004-06-03 03:38:44 +0000898while (0)
899
900#define YYTERROR 1
901#define YYERRCODE 256
902
vlm6a02a8a2004-09-08 00:28:11 +0000903#ifndef YYPURE
904#define YYLEX yylex()
vlmfa67ddc2004-06-03 03:38:44 +0000905#endif
906
vlm6a02a8a2004-09-08 00:28:11 +0000907#ifdef YYPURE
908#ifdef YYLSP_NEEDED
909#ifdef YYLEX_PARAM
910#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
911#else
912#define YYLEX yylex(&yylval, &yylloc)
913#endif
914#else /* not YYLSP_NEEDED */
915#ifdef YYLEX_PARAM
916#define YYLEX yylex(&yylval, YYLEX_PARAM)
917#else
918#define YYLEX yylex(&yylval)
919#endif
920#endif /* not YYLSP_NEEDED */
921#endif
vlmfa67ddc2004-06-03 03:38:44 +0000922
vlm6a02a8a2004-09-08 00:28:11 +0000923/* If nonreentrant, generate the variables here */
vlmfa67ddc2004-06-03 03:38:44 +0000924
vlm6a02a8a2004-09-08 00:28:11 +0000925#ifndef YYPURE
vlmfa67ddc2004-06-03 03:38:44 +0000926
vlm6a02a8a2004-09-08 00:28:11 +0000927int yychar; /* the lookahead symbol */
928YYSTYPE yylval; /* the semantic value of the */
929 /* lookahead symbol */
vlmfa67ddc2004-06-03 03:38:44 +0000930
vlm6a02a8a2004-09-08 00:28:11 +0000931#ifdef YYLSP_NEEDED
932YYLTYPE yylloc; /* location data for the lookahead */
933 /* symbol */
934#endif
vlmfa67ddc2004-06-03 03:38:44 +0000935
vlm6a02a8a2004-09-08 00:28:11 +0000936int yynerrs; /* number of parse errors so far */
937#endif /* not YYPURE */
938
939#if YYDEBUG != 0
940int yydebug; /* nonzero means print parse trace */
941/* Since this is uninitialized, it does not stop multiple parsers
942 from coexisting. */
943#endif
944
945/* YYINITDEPTH indicates the initial size of the parser's stacks */
946
vlmfa67ddc2004-06-03 03:38:44 +0000947#ifndef YYINITDEPTH
vlm6a02a8a2004-09-08 00:28:11 +0000948#define YYINITDEPTH 200
vlmfa67ddc2004-06-03 03:38:44 +0000949#endif
950
vlm6a02a8a2004-09-08 00:28:11 +0000951/* YYMAXDEPTH is the maximum size the stacks can grow to
952 (effective only if the built-in stack extension method is used). */
vlmfa67ddc2004-06-03 03:38:44 +0000953
954#if YYMAXDEPTH == 0
vlm6a02a8a2004-09-08 00:28:11 +0000955#undef YYMAXDEPTH
vlmfa67ddc2004-06-03 03:38:44 +0000956#endif
957
958#ifndef YYMAXDEPTH
vlm6a02a8a2004-09-08 00:28:11 +0000959#define YYMAXDEPTH 10000
vlmfa67ddc2004-06-03 03:38:44 +0000960#endif
961
vlm6a02a8a2004-09-08 00:28:11 +0000962/* Define __yy_memcpy. Note that the size argument
963 should be passed with type unsigned int, because that is what the non-GCC
964 definitions require. With GCC, __builtin_memcpy takes an arg
965 of type size_t, but it can handle unsigned int. */
vlmfa67ddc2004-06-03 03:38:44 +0000966
vlm6a02a8a2004-09-08 00:28:11 +0000967#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
968#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
969#else /* not GNU C or C++ */
970#ifndef __cplusplus
vlmfa67ddc2004-06-03 03:38:44 +0000971
vlm6a02a8a2004-09-08 00:28:11 +0000972/* This is the most reliable way to avoid incompatibilities
973 in available built-in functions on various systems. */
vlm80103492004-09-07 10:39:09 +0000974static void
vlm6a02a8a2004-09-08 00:28:11 +0000975__yy_memcpy (to, from, count)
976 char *to;
977 char *from;
978 unsigned int count;
vlm80103492004-09-07 10:39:09 +0000979{
vlm6a02a8a2004-09-08 00:28:11 +0000980 register char *f = from;
981 register char *t = to;
982 register int i = count;
vlm80103492004-09-07 10:39:09 +0000983
vlm6a02a8a2004-09-08 00:28:11 +0000984 while (i-- > 0)
985 *t++ = *f++;
vlm80103492004-09-07 10:39:09 +0000986}
vlm80103492004-09-07 10:39:09 +0000987
vlm6a02a8a2004-09-08 00:28:11 +0000988#else /* __cplusplus */
vlm80103492004-09-07 10:39:09 +0000989
vlm6a02a8a2004-09-08 00:28:11 +0000990/* This is the most reliable way to avoid incompatibilities
991 in available built-in functions on various systems. */
vlm80103492004-09-07 10:39:09 +0000992static void
vlm6a02a8a2004-09-08 00:28:11 +0000993__yy_memcpy (char *to, char *from, unsigned int count)
vlm80103492004-09-07 10:39:09 +0000994{
vlm6a02a8a2004-09-08 00:28:11 +0000995 register char *t = to;
996 register char *f = from;
997 register int i = count;
vlm80103492004-09-07 10:39:09 +0000998
vlm6a02a8a2004-09-08 00:28:11 +0000999 while (i-- > 0)
1000 *t++ = *f++;
vlm044f7442004-09-04 04:49:21 +00001001}
vlm044f7442004-09-04 04:49:21 +00001002
vlm6a02a8a2004-09-08 00:28:11 +00001003#endif
1004#endif
vlmfa67ddc2004-06-03 03:38:44 +00001005
vlm6a02a8a2004-09-08 00:28:11 +00001006#line 217 "/usr/share/bison.simple"
vlmfa67ddc2004-06-03 03:38:44 +00001007
1008/* The user can define YYPARSE_PARAM as the name of an argument to be passed
1009 into yyparse. The argument should have type void *.
1010 It should actually point to an object.
1011 Grammar actions can access the variable by casting it
1012 to the proper pointer type. */
1013
1014#ifdef YYPARSE_PARAM
vlm6a02a8a2004-09-08 00:28:11 +00001015#ifdef __cplusplus
1016#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
1017#define YYPARSE_PARAM_DECL
1018#else /* not __cplusplus */
1019#define YYPARSE_PARAM_ARG YYPARSE_PARAM
1020#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
1021#endif /* not __cplusplus */
1022#else /* not YYPARSE_PARAM */
1023#define YYPARSE_PARAM_ARG
1024#define YYPARSE_PARAM_DECL
1025#endif /* not YYPARSE_PARAM */
vlmfa67ddc2004-06-03 03:38:44 +00001026
1027/* Prevent warning if -Wstrict-prototypes. */
1028#ifdef __GNUC__
vlm6a02a8a2004-09-08 00:28:11 +00001029#ifdef YYPARSE_PARAM
vlmfa67ddc2004-06-03 03:38:44 +00001030int yyparse (void *);
vlm6a02a8a2004-09-08 00:28:11 +00001031#else
vlmfa67ddc2004-06-03 03:38:44 +00001032int yyparse (void);
vlm6a02a8a2004-09-08 00:28:11 +00001033#endif
vlm39e5ed72004-09-05 10:40:41 +00001034#endif
vlm80103492004-09-07 10:39:09 +00001035
vlmfa67ddc2004-06-03 03:38:44 +00001036int
vlm6a02a8a2004-09-08 00:28:11 +00001037yyparse(YYPARSE_PARAM_ARG)
vlmfa67ddc2004-06-03 03:38:44 +00001038 YYPARSE_PARAM_DECL
1039{
1040 register int yystate;
1041 register int yyn;
1042 register short *yyssp;
1043 register YYSTYPE *yyvsp;
vlm6a02a8a2004-09-08 00:28:11 +00001044 int yyerrstatus; /* number of tokens to shift before error messages enabled */
1045 int yychar1 = 0; /* lookahead token as an internal (translated) token number */
vlmfa67ddc2004-06-03 03:38:44 +00001046
vlm6a02a8a2004-09-08 00:28:11 +00001047 short yyssa[YYINITDEPTH]; /* the state stack */
1048 YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
vlmfa67ddc2004-06-03 03:38:44 +00001049
vlm6a02a8a2004-09-08 00:28:11 +00001050 short *yyss = yyssa; /* refer to the stacks thru separate pointers */
1051 YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
vlmfa67ddc2004-06-03 03:38:44 +00001052
vlm6a02a8a2004-09-08 00:28:11 +00001053#ifdef YYLSP_NEEDED
1054 YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
1055 YYLTYPE *yyls = yylsa;
1056 YYLTYPE *yylsp;
1057
1058#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
1059#else
vlmfa67ddc2004-06-03 03:38:44 +00001060#define YYPOPSTACK (yyvsp--, yyssp--)
vlm6a02a8a2004-09-08 00:28:11 +00001061#endif
vlmfa67ddc2004-06-03 03:38:44 +00001062
vlm6a02a8a2004-09-08 00:28:11 +00001063 int yystacksize = YYINITDEPTH;
1064 int yyfree_stacks = 0;
vlmfa67ddc2004-06-03 03:38:44 +00001065
vlm6a02a8a2004-09-08 00:28:11 +00001066#ifdef YYPURE
1067 int yychar;
1068 YYSTYPE yylval;
1069 int yynerrs;
1070#ifdef YYLSP_NEEDED
1071 YYLTYPE yylloc;
1072#endif
1073#endif
vlmfa67ddc2004-06-03 03:38:44 +00001074
vlm6a02a8a2004-09-08 00:28:11 +00001075 YYSTYPE yyval; /* the variable used to return */
1076 /* semantic values from the action */
1077 /* routines */
vlmfa67ddc2004-06-03 03:38:44 +00001078
1079 int yylen;
1080
vlm6a02a8a2004-09-08 00:28:11 +00001081#if YYDEBUG != 0
1082 if (yydebug)
1083 fprintf(stderr, "Starting parse\n");
1084#endif
vlmfa67ddc2004-06-03 03:38:44 +00001085
1086 yystate = 0;
1087 yyerrstatus = 0;
1088 yynerrs = 0;
1089 yychar = YYEMPTY; /* Cause a token to be read. */
1090
1091 /* Initialize stack pointers.
1092 Waste one element of value and location stack
1093 so that they stay on the same level as the state stack.
1094 The wasted elements are never initialized. */
1095
vlm6a02a8a2004-09-08 00:28:11 +00001096 yyssp = yyss - 1;
vlmfa67ddc2004-06-03 03:38:44 +00001097 yyvsp = yyvs;
vlm6a02a8a2004-09-08 00:28:11 +00001098#ifdef YYLSP_NEEDED
1099 yylsp = yyls;
1100#endif
vlmfa67ddc2004-06-03 03:38:44 +00001101
vlm6a02a8a2004-09-08 00:28:11 +00001102/* Push a new state, which is found in yystate . */
1103/* In all cases, when you get here, the value and location stacks
1104 have just been pushed. so pushing a state here evens the stacks. */
1105yynewstate:
vlmfa67ddc2004-06-03 03:38:44 +00001106
vlm6a02a8a2004-09-08 00:28:11 +00001107 *++yyssp = yystate;
vlmfa67ddc2004-06-03 03:38:44 +00001108
1109 if (yyssp >= yyss + yystacksize - 1)
1110 {
vlm6a02a8a2004-09-08 00:28:11 +00001111 /* Give user a chance to reallocate the stack */
1112 /* Use copies of these so that the &'s don't force the real ones into memory. */
1113 YYSTYPE *yyvs1 = yyvs;
1114 short *yyss1 = yyss;
1115#ifdef YYLSP_NEEDED
1116 YYLTYPE *yyls1 = yyls;
1117#endif
1118
vlmfa67ddc2004-06-03 03:38:44 +00001119 /* Get the current used size of the three stacks, in elements. */
vlm6a02a8a2004-09-08 00:28:11 +00001120 int size = yyssp - yyss + 1;
vlmfa67ddc2004-06-03 03:38:44 +00001121
1122#ifdef yyoverflow
vlm6a02a8a2004-09-08 00:28:11 +00001123 /* Each stack pointer address is followed by the size of
1124 the data in use in that stack, in bytes. */
1125#ifdef YYLSP_NEEDED
1126 /* This used to be a conditional around just the two extra args,
1127 but that might be undefined if yyoverflow is a macro. */
1128 yyoverflow("parser stack overflow",
1129 &yyss1, size * sizeof (*yyssp),
1130 &yyvs1, size * sizeof (*yyvsp),
1131 &yyls1, size * sizeof (*yylsp),
1132 &yystacksize);
1133#else
1134 yyoverflow("parser stack overflow",
1135 &yyss1, size * sizeof (*yyssp),
1136 &yyvs1, size * sizeof (*yyvsp),
1137 &yystacksize);
1138#endif
vlmfa67ddc2004-06-03 03:38:44 +00001139
vlm6a02a8a2004-09-08 00:28:11 +00001140 yyss = yyss1; yyvs = yyvs1;
1141#ifdef YYLSP_NEEDED
1142 yyls = yyls1;
1143#endif
vlmfa67ddc2004-06-03 03:38:44 +00001144#else /* no yyoverflow */
1145 /* Extend the stack our own way. */
1146 if (yystacksize >= YYMAXDEPTH)
vlm6a02a8a2004-09-08 00:28:11 +00001147 {
1148 yyerror("parser stack overflow");
1149 if (yyfree_stacks)
1150 {
1151 free (yyss);
1152 free (yyvs);
1153#ifdef YYLSP_NEEDED
1154 free (yyls);
1155#endif
1156 }
1157 return 2;
1158 }
vlmfa67ddc2004-06-03 03:38:44 +00001159 yystacksize *= 2;
1160 if (yystacksize > YYMAXDEPTH)
1161 yystacksize = YYMAXDEPTH;
vlm6a02a8a2004-09-08 00:28:11 +00001162#ifndef YYSTACK_USE_ALLOCA
1163 yyfree_stacks = 1;
1164#endif
1165 yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
1166 __yy_memcpy ((char *)yyss, (char *)yyss1,
1167 size * (unsigned int) sizeof (*yyssp));
1168 yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
1169 __yy_memcpy ((char *)yyvs, (char *)yyvs1,
1170 size * (unsigned int) sizeof (*yyvsp));
1171#ifdef YYLSP_NEEDED
1172 yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
1173 __yy_memcpy ((char *)yyls, (char *)yyls1,
1174 size * (unsigned int) sizeof (*yylsp));
1175#endif
vlmfa67ddc2004-06-03 03:38:44 +00001176#endif /* no yyoverflow */
1177
vlm6a02a8a2004-09-08 00:28:11 +00001178 yyssp = yyss + size - 1;
1179 yyvsp = yyvs + size - 1;
1180#ifdef YYLSP_NEEDED
1181 yylsp = yyls + size - 1;
1182#endif
vlmfa67ddc2004-06-03 03:38:44 +00001183
vlm6a02a8a2004-09-08 00:28:11 +00001184#if YYDEBUG != 0
1185 if (yydebug)
1186 fprintf(stderr, "Stack size increased to %d\n", yystacksize);
1187#endif
vlmfa67ddc2004-06-03 03:38:44 +00001188
1189 if (yyssp >= yyss + yystacksize - 1)
1190 YYABORT;
1191 }
1192
vlm6a02a8a2004-09-08 00:28:11 +00001193#if YYDEBUG != 0
1194 if (yydebug)
1195 fprintf(stderr, "Entering state %d\n", yystate);
1196#endif
vlmfa67ddc2004-06-03 03:38:44 +00001197
1198 goto yybackup;
vlm6a02a8a2004-09-08 00:28:11 +00001199 yybackup:
vlmfa67ddc2004-06-03 03:38:44 +00001200
1201/* Do appropriate processing given the current state. */
1202/* Read a lookahead token if we need one and don't already have one. */
1203/* yyresume: */
1204
1205 /* First try to decide what to do without reference to lookahead token. */
1206
1207 yyn = yypact[yystate];
vlm6a02a8a2004-09-08 00:28:11 +00001208 if (yyn == YYFLAG)
vlmfa67ddc2004-06-03 03:38:44 +00001209 goto yydefault;
1210
1211 /* Not known => get a lookahead token if don't already have one. */
1212
1213 /* yychar is either YYEMPTY or YYEOF
1214 or a valid token in external form. */
1215
1216 if (yychar == YYEMPTY)
1217 {
vlm6a02a8a2004-09-08 00:28:11 +00001218#if YYDEBUG != 0
1219 if (yydebug)
1220 fprintf(stderr, "Reading a token: ");
1221#endif
vlmfa67ddc2004-06-03 03:38:44 +00001222 yychar = YYLEX;
1223 }
1224
vlm6a02a8a2004-09-08 00:28:11 +00001225 /* Convert token to internal form (in yychar1) for indexing tables with */
vlmfa67ddc2004-06-03 03:38:44 +00001226
vlm6a02a8a2004-09-08 00:28:11 +00001227 if (yychar <= 0) /* This means end of input. */
vlmfa67ddc2004-06-03 03:38:44 +00001228 {
1229 yychar1 = 0;
vlm6a02a8a2004-09-08 00:28:11 +00001230 yychar = YYEOF; /* Don't call YYLEX any more */
vlmfa67ddc2004-06-03 03:38:44 +00001231
vlm6a02a8a2004-09-08 00:28:11 +00001232#if YYDEBUG != 0
1233 if (yydebug)
1234 fprintf(stderr, "Now at end of input.\n");
1235#endif
vlmfa67ddc2004-06-03 03:38:44 +00001236 }
1237 else
1238 {
vlm6a02a8a2004-09-08 00:28:11 +00001239 yychar1 = YYTRANSLATE(yychar);
vlmfa67ddc2004-06-03 03:38:44 +00001240
vlm6a02a8a2004-09-08 00:28:11 +00001241#if YYDEBUG != 0
1242 if (yydebug)
1243 {
1244 fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
1245 /* Give the individual parser a way to print the precise meaning
1246 of a token, for further debugging info. */
1247#ifdef YYPRINT
1248 YYPRINT (stderr, yychar, yylval);
1249#endif
1250 fprintf (stderr, ")\n");
1251 }
1252#endif
vlmfa67ddc2004-06-03 03:38:44 +00001253 }
1254
1255 yyn += yychar1;
vlm6a02a8a2004-09-08 00:28:11 +00001256 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
vlmfa67ddc2004-06-03 03:38:44 +00001257 goto yydefault;
vlm6a02a8a2004-09-08 00:28:11 +00001258
vlmfa67ddc2004-06-03 03:38:44 +00001259 yyn = yytable[yyn];
vlm6a02a8a2004-09-08 00:28:11 +00001260
1261 /* yyn is what to do for this token type in this state.
1262 Negative => reduce, -yyn is rule number.
1263 Positive => shift, yyn is new state.
1264 New state is final state => don't bother to shift,
1265 just return success.
1266 0, or most negative number => error. */
1267
1268 if (yyn < 0)
vlmfa67ddc2004-06-03 03:38:44 +00001269 {
vlm6a02a8a2004-09-08 00:28:11 +00001270 if (yyn == YYFLAG)
vlmfa67ddc2004-06-03 03:38:44 +00001271 goto yyerrlab;
1272 yyn = -yyn;
1273 goto yyreduce;
1274 }
vlm6a02a8a2004-09-08 00:28:11 +00001275 else if (yyn == 0)
1276 goto yyerrlab;
vlmfa67ddc2004-06-03 03:38:44 +00001277
1278 if (yyn == YYFINAL)
1279 YYACCEPT;
1280
1281 /* Shift the lookahead token. */
vlm6a02a8a2004-09-08 00:28:11 +00001282
1283#if YYDEBUG != 0
1284 if (yydebug)
1285 fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
1286#endif
vlmfa67ddc2004-06-03 03:38:44 +00001287
1288 /* Discard the token being shifted unless it is eof. */
1289 if (yychar != YYEOF)
1290 yychar = YYEMPTY;
1291
1292 *++yyvsp = yylval;
vlm6a02a8a2004-09-08 00:28:11 +00001293#ifdef YYLSP_NEEDED
1294 *++yylsp = yylloc;
1295#endif
vlmfa67ddc2004-06-03 03:38:44 +00001296
vlm6a02a8a2004-09-08 00:28:11 +00001297 /* count tokens shifted since error; after three, turn off error status. */
1298 if (yyerrstatus) yyerrstatus--;
vlmfa67ddc2004-06-03 03:38:44 +00001299
1300 yystate = yyn;
1301 goto yynewstate;
1302
vlm6a02a8a2004-09-08 00:28:11 +00001303/* Do the default action for the current state. */
vlm80103492004-09-07 10:39:09 +00001304yydefault:
vlm6a02a8a2004-09-08 00:28:11 +00001305
vlmfa67ddc2004-06-03 03:38:44 +00001306 yyn = yydefact[yystate];
1307 if (yyn == 0)
1308 goto yyerrlab;
1309
vlm6a02a8a2004-09-08 00:28:11 +00001310/* Do a reduction. yyn is the number of a rule to reduce with. */
vlmfa67ddc2004-06-03 03:38:44 +00001311yyreduce:
1312 yylen = yyr2[yyn];
vlm6a02a8a2004-09-08 00:28:11 +00001313 if (yylen > 0)
1314 yyval = yyvsp[1-yylen]; /* implement default value of the action */
vlmfa67ddc2004-06-03 03:38:44 +00001315
vlm6a02a8a2004-09-08 00:28:11 +00001316#if YYDEBUG != 0
vlmfa67ddc2004-06-03 03:38:44 +00001317 if (yydebug)
1318 {
vlm6a02a8a2004-09-08 00:28:11 +00001319 int i;
vlmfa67ddc2004-06-03 03:38:44 +00001320
vlm6a02a8a2004-09-08 00:28:11 +00001321 fprintf (stderr, "Reducing via rule %d (line %d), ",
1322 yyn, yyrline[yyn]);
vlmfa67ddc2004-06-03 03:38:44 +00001323
1324 /* Print the symbols being reduced, and their result. */
vlm6a02a8a2004-09-08 00:28:11 +00001325 for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
1326 fprintf (stderr, "%s ", yytname[yyrhs[i]]);
1327 fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
vlmfa67ddc2004-06-03 03:38:44 +00001328 }
1329#endif
vlm80103492004-09-07 10:39:09 +00001330
vlm6a02a8a2004-09-08 00:28:11 +00001331
1332 switch (yyn) {
1333
1334case 1:
vlm0aa86902004-10-12 23:26:53 +00001335#line 302 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001336{
1337 *(void **)param = yyvsp[0].a_grammar;
1338 ;
1339 break;}
1340case 2:
vlm0aa86902004-10-12 23:26:53 +00001341#line 308 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001342{
vlmfa67ddc2004-06-03 03:38:44 +00001343 yyval.a_grammar = asn1p_new();
1344 checkmem(yyval.a_grammar);
1345 TQ_ADD(&(yyval.a_grammar->modules), yyvsp[0].a_module, mod_next);
vlm6a02a8a2004-09-08 00:28:11 +00001346 ;
1347 break;}
1348case 3:
vlm0aa86902004-10-12 23:26:53 +00001349#line 313 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001350{
vlmfa67ddc2004-06-03 03:38:44 +00001351 yyval.a_grammar = yyvsp[-1].a_grammar;
1352 TQ_ADD(&(yyval.a_grammar->modules), yyvsp[0].a_module, mod_next);
vlm6a02a8a2004-09-08 00:28:11 +00001353 ;
1354 break;}
1355case 4:
vlm0aa86902004-10-12 23:26:53 +00001356#line 334 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001357{
vlmfa67ddc2004-06-03 03:38:44 +00001358
1359 if(yyvsp[-1].a_module) {
1360 yyval.a_module = yyvsp[-1].a_module;
1361 } else {
1362 /* There's a chance that a module is just plain empty */
1363 yyval.a_module = asn1p_module_new();
1364 }
1365 checkmem(yyval.a_module);
1366
1367 yyval.a_module->Identifier = yyvsp[-7].tv_str;
1368 yyval.a_module->module_oid = yyvsp[-6].a_oid;
1369 yyval.a_module->module_flags = yyvsp[-4].a_module_flags;
vlm6a02a8a2004-09-08 00:28:11 +00001370 ;
1371 break;}
1372case 5:
vlm0aa86902004-10-12 23:26:53 +00001373#line 355 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001374{ yyval.a_oid = 0; ;
1375 break;}
1376case 6:
vlm0aa86902004-10-12 23:26:53 +00001377#line 356 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001378{ yyval.a_oid = yyvsp[0].a_oid; ;
1379 break;}
1380case 7:
vlm0aa86902004-10-12 23:26:53 +00001381#line 360 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001382{
vlmfa67ddc2004-06-03 03:38:44 +00001383 yyval.a_oid = yyvsp[-1].a_oid;
vlm6a02a8a2004-09-08 00:28:11 +00001384 ;
1385 break;}
1386case 8:
vlm0aa86902004-10-12 23:26:53 +00001387#line 363 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001388{
vlmfa67ddc2004-06-03 03:38:44 +00001389 yyval.a_oid = 0;
vlm6a02a8a2004-09-08 00:28:11 +00001390 ;
1391 break;}
1392case 9:
vlm0aa86902004-10-12 23:26:53 +00001393#line 369 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001394{
vlmfa67ddc2004-06-03 03:38:44 +00001395 yyval.a_oid = asn1p_oid_new();
1396 asn1p_oid_add_arc(yyval.a_oid, &yyvsp[0].a_oid_arc);
1397 if(yyvsp[0].a_oid_arc.name)
1398 free(yyvsp[0].a_oid_arc.name);
vlm6a02a8a2004-09-08 00:28:11 +00001399 ;
1400 break;}
1401case 10:
vlm0aa86902004-10-12 23:26:53 +00001402#line 375 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001403{
vlmfa67ddc2004-06-03 03:38:44 +00001404 yyval.a_oid = yyvsp[-1].a_oid;
1405 asn1p_oid_add_arc(yyval.a_oid, &yyvsp[0].a_oid_arc);
1406 if(yyvsp[0].a_oid_arc.name)
1407 free(yyvsp[0].a_oid_arc.name);
vlm6a02a8a2004-09-08 00:28:11 +00001408 ;
1409 break;}
1410case 11:
vlm0aa86902004-10-12 23:26:53 +00001411#line 384 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001412{ /* iso */
vlmfa67ddc2004-06-03 03:38:44 +00001413 yyval.a_oid_arc.name = yyvsp[0].tv_str;
1414 yyval.a_oid_arc.number = -1;
vlm6a02a8a2004-09-08 00:28:11 +00001415 ;
1416 break;}
1417case 12:
vlm0aa86902004-10-12 23:26:53 +00001418#line 388 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001419{ /* iso(1) */
vlmfa67ddc2004-06-03 03:38:44 +00001420 yyval.a_oid_arc.name = yyvsp[-3].tv_str;
1421 yyval.a_oid_arc.number = yyvsp[-1].a_int;
vlm6a02a8a2004-09-08 00:28:11 +00001422 ;
1423 break;}
1424case 13:
vlm0aa86902004-10-12 23:26:53 +00001425#line 392 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001426{ /* 1 */
vlmfa67ddc2004-06-03 03:38:44 +00001427 yyval.a_oid_arc.name = 0;
1428 yyval.a_oid_arc.number = yyvsp[0].a_int;
vlm6a02a8a2004-09-08 00:28:11 +00001429 ;
1430 break;}
1431case 14:
vlm0aa86902004-10-12 23:26:53 +00001432#line 402 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001433{ yyval.a_module_flags = MSF_NOFLAGS; ;
1434 break;}
1435case 15:
vlm0aa86902004-10-12 23:26:53 +00001436#line 403 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001437{
vlmfa67ddc2004-06-03 03:38:44 +00001438 yyval.a_module_flags = yyvsp[0].a_module_flags;
vlm6a02a8a2004-09-08 00:28:11 +00001439 ;
1440 break;}
1441case 16:
vlm0aa86902004-10-12 23:26:53 +00001442#line 412 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001443{
vlmfa67ddc2004-06-03 03:38:44 +00001444 yyval.a_module_flags = yyvsp[0].a_module_flags;
vlm6a02a8a2004-09-08 00:28:11 +00001445 ;
1446 break;}
1447case 17:
vlm0aa86902004-10-12 23:26:53 +00001448#line 415 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001449{
vlmfa67ddc2004-06-03 03:38:44 +00001450 yyval.a_module_flags = yyvsp[-1].a_module_flags | yyvsp[0].a_module_flags;
vlm6a02a8a2004-09-08 00:28:11 +00001451 ;
1452 break;}
1453case 18:
vlm0aa86902004-10-12 23:26:53 +00001454#line 424 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001455{
vlmfa67ddc2004-06-03 03:38:44 +00001456 yyval.a_module_flags = MSF_EXPLICIT_TAGS;
vlm6a02a8a2004-09-08 00:28:11 +00001457 ;
1458 break;}
1459case 19:
vlm0aa86902004-10-12 23:26:53 +00001460#line 427 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001461{
vlmfa67ddc2004-06-03 03:38:44 +00001462 yyval.a_module_flags = MSF_IMPLICIT_TAGS;
vlm6a02a8a2004-09-08 00:28:11 +00001463 ;
1464 break;}
1465case 20:
vlm0aa86902004-10-12 23:26:53 +00001466#line 430 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001467{
vlmfa67ddc2004-06-03 03:38:44 +00001468 yyval.a_module_flags = MSF_AUTOMATIC_TAGS;
vlm6a02a8a2004-09-08 00:28:11 +00001469 ;
1470 break;}
1471case 21:
vlm0aa86902004-10-12 23:26:53 +00001472#line 433 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001473{
vlmfa67ddc2004-06-03 03:38:44 +00001474 yyval.a_module_flags = MSF_EXTENSIBILITY_IMPLIED;
vlm6a02a8a2004-09-08 00:28:11 +00001475 ;
1476 break;}
1477case 22:
vlm0aa86902004-10-12 23:26:53 +00001478#line 437 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001479{
vlm9283dbe2004-08-18 04:59:12 +00001480 /* X.680Amd1 specifies TAG and XER */
1481 if(strcmp(yyvsp[-1].tv_str, "TAG") == 0) {
1482 yyval.a_module_flags = MSF_TAG_INSTRUCTIONS;
1483 } else if(strcmp(yyvsp[-1].tv_str, "XER") == 0) {
1484 yyval.a_module_flags = MSF_XER_INSTRUCTIONS;
1485 } else {
1486 fprintf(stderr,
1487 "WARNING: %s INSTRUCTIONS at line %d: "
1488 "Unrecognized encoding reference\n",
1489 yyvsp[-1].tv_str, yylineno);
1490 yyval.a_module_flags = MSF_unk_INSTRUCTIONS;
1491 }
1492 free(yyvsp[-1].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00001493 ;
1494 break;}
1495case 23:
vlm0aa86902004-10-12 23:26:53 +00001496#line 458 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001497{ yyval.a_module = 0; ;
1498 break;}
1499case 24:
vlm0aa86902004-10-12 23:26:53 +00001500#line 459 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001501{
vlmfa67ddc2004-06-03 03:38:44 +00001502 yyval.a_module = yyvsp[0].a_module;
vlm6a02a8a2004-09-08 00:28:11 +00001503 ;
1504 break;}
1505case 25:
vlm0aa86902004-10-12 23:26:53 +00001506#line 468 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001507{
vlm9283dbe2004-08-18 04:59:12 +00001508 yyval.a_module = yyvsp[0].a_module;
vlm6a02a8a2004-09-08 00:28:11 +00001509 ;
1510 break;}
1511case 26:
vlm0aa86902004-10-12 23:26:53 +00001512#line 471 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001513{
vlmfa67ddc2004-06-03 03:38:44 +00001514 yyval.a_module = yyvsp[-1].a_module;
1515
vlm9283dbe2004-08-18 04:59:12 +00001516 /* Behave well when one of them is skipped. */
1517 if(!(yyvsp[-1].a_module)) {
1518 if(yyvsp[0].a_module) yyval.a_module = yyvsp[0].a_module;
1519 break;
1520 }
1521
vlmfa67ddc2004-06-03 03:38:44 +00001522#ifdef MY_IMPORT
1523#error MY_IMPORT DEFINED ELSEWHERE!
1524#endif
1525#define MY_IMPORT(foo,field) do { \
vlm97ed7152004-08-13 12:31:09 +00001526 while(TQ_FIRST(&(yyvsp[0].a_module->foo))) { \
vlmfa67ddc2004-06-03 03:38:44 +00001527 TQ_ADD(&(yyval.a_module->foo), \
1528 TQ_REMOVE(&(yyvsp[0].a_module->foo), field), \
1529 field); \
vlm97ed7152004-08-13 12:31:09 +00001530 } \
1531 assert(TQ_FIRST(&(yyvsp[0].a_module->foo)) == 0); \
1532 } while(0)
vlmfa67ddc2004-06-03 03:38:44 +00001533
1534 MY_IMPORT(imports, xp_next);
1535 MY_IMPORT(exports, xp_next);
1536 MY_IMPORT(members, next);
1537#undef MY_IMPORT
1538
vlm6a02a8a2004-09-08 00:28:11 +00001539 ;
1540 break;}
1541case 27:
vlm0aa86902004-10-12 23:26:53 +00001542#line 504 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001543{
vlmfa67ddc2004-06-03 03:38:44 +00001544 yyval.a_module = yyvsp[0].a_module;
vlm6a02a8a2004-09-08 00:28:11 +00001545 ;
1546 break;}
1547case 28:
vlm0aa86902004-10-12 23:26:53 +00001548#line 507 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001549{
vlmfa67ddc2004-06-03 03:38:44 +00001550 yyval.a_module = asn1p_module_new();
1551 checkmem(yyval.a_module);
1552 if(yyvsp[0].a_xports) {
1553 TQ_ADD(&(yyval.a_module->exports), yyvsp[0].a_xports, xp_next);
1554 } else {
1555 /* "EXPORTS ALL;" ? */
1556 }
vlm6a02a8a2004-09-08 00:28:11 +00001557 ;
1558 break;}
1559case 29:
vlm0aa86902004-10-12 23:26:53 +00001560#line 516 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001561{
vlmfa67ddc2004-06-03 03:38:44 +00001562 yyval.a_module = asn1p_module_new();
1563 checkmem(yyval.a_module);
1564 assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
1565 assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
1566 TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001567 ;
1568 break;}
1569case 30:
vlm0aa86902004-10-12 23:26:53 +00001570#line 523 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001571{
vlm9283dbe2004-08-18 04:59:12 +00001572 yyval.a_module = asn1p_module_new();
1573 checkmem(yyval.a_module);
1574 assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
1575 assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
1576 TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001577 ;
1578 break;}
1579case 31:
vlm0aa86902004-10-12 23:26:53 +00001580#line 536 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001581{
vlm9283dbe2004-08-18 04:59:12 +00001582 yyval.a_module = asn1p_module_new();
1583 checkmem(yyval.a_module);
1584 assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
1585 assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
1586 TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001587 ;
1588 break;}
1589case 32:
vlm0aa86902004-10-12 23:26:53 +00001590#line 544 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001591{ asn1p_lexer_hack_push_encoding_control(); ;
1592 break;}
1593case 33:
vlm0aa86902004-10-12 23:26:53 +00001594#line 545 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001595{
vlm9283dbe2004-08-18 04:59:12 +00001596 fprintf(stderr,
1597 "WARNING: ENCODING-CONTROL %s "
1598 "specification at line %d ignored\n",
1599 yyvsp[-1].tv_str, yylineno);
1600 free(yyvsp[-1].tv_str);
1601 yyval.a_module = 0;
vlm6a02a8a2004-09-08 00:28:11 +00001602 ;
1603 break;}
1604case 34:
vlm0aa86902004-10-12 23:26:53 +00001605#line 557 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001606{
vlmfa67ddc2004-06-03 03:38:44 +00001607 return yyerror(
1608 "Attempt to redefine a standard basic type, "
1609 "use -ftypesXY to switch back "
1610 "to older version of ASN.1 standard");
vlm6a02a8a2004-09-08 00:28:11 +00001611 ;
1612 break;}
1613case 35:
vlm0aa86902004-10-12 23:26:53 +00001614#line 571 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001615{
vlmfa67ddc2004-06-03 03:38:44 +00001616 yyval.a_module = yyvsp[-1].a_module;
vlm6a02a8a2004-09-08 00:28:11 +00001617 ;
1618 break;}
1619case 36:
vlm0aa86902004-10-12 23:26:53 +00001620#line 577 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001621{
vlmfa67ddc2004-06-03 03:38:44 +00001622 return yyerror("Empty IMPORTS list");
vlm6a02a8a2004-09-08 00:28:11 +00001623 ;
1624 break;}
1625case 37:
vlm0aa86902004-10-12 23:26:53 +00001626#line 583 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001627{
vlmfa67ddc2004-06-03 03:38:44 +00001628 yyval.a_module = asn1p_module_new();
1629 checkmem(yyval.a_module);
1630 TQ_ADD(&(yyval.a_module->imports), yyvsp[0].a_xports, xp_next);
vlm6a02a8a2004-09-08 00:28:11 +00001631 ;
1632 break;}
1633case 38:
vlm0aa86902004-10-12 23:26:53 +00001634#line 588 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001635{
vlmfa67ddc2004-06-03 03:38:44 +00001636 yyval.a_module = yyvsp[-1].a_module;
1637 TQ_ADD(&(yyval.a_module->imports), yyvsp[0].a_xports, xp_next);
vlm6a02a8a2004-09-08 00:28:11 +00001638 ;
1639 break;}
1640case 39:
vlm0aa86902004-10-12 23:26:53 +00001641#line 595 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001642{
vlmfa67ddc2004-06-03 03:38:44 +00001643 yyval.a_xports = yyvsp[-3].a_xports;
1644 yyval.a_xports->from = yyvsp[-1].tv_str;
1645 yyval.a_xports->from_oid = yyvsp[0].a_oid;
1646 checkmem(yyval.a_xports);
vlm6a02a8a2004-09-08 00:28:11 +00001647 ;
1648 break;}
1649case 40:
vlm0aa86902004-10-12 23:26:53 +00001650#line 604 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001651{
vlmfa67ddc2004-06-03 03:38:44 +00001652 yyval.a_xports = asn1p_xports_new();
1653 checkmem(yyval.a_xports);
1654 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001655 ;
1656 break;}
1657case 41:
vlm0aa86902004-10-12 23:26:53 +00001658#line 609 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001659{
vlmfa67ddc2004-06-03 03:38:44 +00001660 yyval.a_xports = yyvsp[-2].a_xports;
1661 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001662 ;
1663 break;}
1664case 42:
vlm0aa86902004-10-12 23:26:53 +00001665#line 616 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001666{
vlmfa67ddc2004-06-03 03:38:44 +00001667 yyval.a_expr = asn1p_expr_new(yylineno);
1668 checkmem(yyval.a_expr);
1669 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1670 yyval.a_expr->expr_type = A1TC_REFERENCE;
vlm6a02a8a2004-09-08 00:28:11 +00001671 ;
1672 break;}
1673case 43:
vlm0aa86902004-10-12 23:26:53 +00001674#line 622 "asn1p_y.y"
1675{ /* Completely equivalent to above */
1676 yyval.a_expr = asn1p_expr_new(yylineno);
1677 checkmem(yyval.a_expr);
1678 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
1679 yyval.a_expr->expr_type = A1TC_REFERENCE;
1680 ;
1681 break;}
1682case 44:
1683#line 628 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001684{
vlmfa67ddc2004-06-03 03:38:44 +00001685 yyval.a_expr = asn1p_expr_new(yylineno);
1686 checkmem(yyval.a_expr);
1687 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1688 yyval.a_expr->expr_type = A1TC_REFERENCE;
vlm6a02a8a2004-09-08 00:28:11 +00001689 ;
1690 break;}
vlm0aa86902004-10-12 23:26:53 +00001691case 45:
1692#line 637 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001693{
vlmfa67ddc2004-06-03 03:38:44 +00001694 yyval.a_xports = yyvsp[-1].a_xports;
vlm6a02a8a2004-09-08 00:28:11 +00001695 ;
1696 break;}
vlm0aa86902004-10-12 23:26:53 +00001697case 46:
1698#line 640 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001699{
vlmfa67ddc2004-06-03 03:38:44 +00001700 yyval.a_xports = 0;
vlm6a02a8a2004-09-08 00:28:11 +00001701 ;
1702 break;}
vlm0aa86902004-10-12 23:26:53 +00001703case 47:
1704#line 643 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001705{
vlmfa67ddc2004-06-03 03:38:44 +00001706 /* Empty EXPORTS clause effectively prohibits export. */
1707 yyval.a_xports = asn1p_xports_new();
1708 checkmem(yyval.a_xports);
vlm6a02a8a2004-09-08 00:28:11 +00001709 ;
1710 break;}
vlm0aa86902004-10-12 23:26:53 +00001711case 48:
1712#line 651 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001713{
vlmfa67ddc2004-06-03 03:38:44 +00001714 yyval.a_xports = asn1p_xports_new();
1715 assert(yyval.a_xports);
1716 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001717 ;
1718 break;}
vlm0aa86902004-10-12 23:26:53 +00001719case 49:
1720#line 656 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001721{
vlmfa67ddc2004-06-03 03:38:44 +00001722 yyval.a_xports = yyvsp[-2].a_xports;
1723 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001724 ;
1725 break;}
vlm6a02a8a2004-09-08 00:28:11 +00001726case 50:
vlm0aa86902004-10-12 23:26:53 +00001727#line 663 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001728{
vlmfa67ddc2004-06-03 03:38:44 +00001729 yyval.a_expr = asn1p_expr_new(yylineno);
1730 checkmem(yyval.a_expr);
1731 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1732 yyval.a_expr->expr_type = A1TC_EXPORTVAR;
vlm6a02a8a2004-09-08 00:28:11 +00001733 ;
1734 break;}
1735case 51:
vlm0aa86902004-10-12 23:26:53 +00001736#line 669 "asn1p_y.y"
1737{
1738 yyval.a_expr = asn1p_expr_new(yylineno);
1739 checkmem(yyval.a_expr);
1740 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
1741 yyval.a_expr->expr_type = A1TC_EXPORTVAR;
1742 ;
1743 break;}
1744case 52:
1745#line 675 "asn1p_y.y"
1746{
1747 yyval.a_expr = asn1p_expr_new(yylineno);
1748 checkmem(yyval.a_expr);
1749 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1750 yyval.a_expr->expr_type = A1TC_EXPORTVAR;
1751 ;
1752 break;}
1753case 53:
1754#line 685 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001755{
vlmfa67ddc2004-06-03 03:38:44 +00001756 yyval.a_expr = yyvsp[-4].a_expr;
1757 assert(yyval.a_expr->Identifier == 0);
1758 yyval.a_expr->Identifier = yyvsp[-5].tv_str;
1759 yyval.a_expr->meta_type = AMT_VALUESET;
1760 // take care of optValueSetBody
vlm6a02a8a2004-09-08 00:28:11 +00001761 ;
1762 break;}
vlm0aa86902004-10-12 23:26:53 +00001763case 54:
1764#line 695 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001765{
vlmfa67ddc2004-06-03 03:38:44 +00001766 yyval.a_expr = asn1p_expr_new(yylineno);
1767 checkmem(yyval.a_expr);
1768 yyval.a_expr->reference = yyvsp[0].a_ref;
1769 yyval.a_expr->expr_type = A1TC_REFERENCE;
1770 yyval.a_expr->meta_type = AMT_TYPEREF;
vlm6a02a8a2004-09-08 00:28:11 +00001771 ;
1772 break;}
vlm0aa86902004-10-12 23:26:53 +00001773case 55:
1774#line 702 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001775{
vlmfa67ddc2004-06-03 03:38:44 +00001776 yyval.a_expr = asn1p_expr_new(yylineno);
1777 checkmem(yyval.a_expr);
1778 yyval.a_expr->expr_type = yyvsp[0].a_type;
1779 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00001780 ;
1781 break;}
vlm6a02a8a2004-09-08 00:28:11 +00001782case 56:
vlm0aa86902004-10-12 23:26:53 +00001783#line 711 "asn1p_y.y"
1784{ ;
vlm6a02a8a2004-09-08 00:28:11 +00001785 break;}
1786case 57:
vlm151c0b22004-09-22 16:03:36 +00001787#line 712 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001788{
1789 ;
1790 break;}
1791case 58:
vlm0aa86902004-10-12 23:26:53 +00001792#line 723 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001793{
1794 ;
1795 break;}
1796case 59:
vlm0aa86902004-10-12 23:26:53 +00001797#line 725 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001798{
1799 ;
1800 break;}
1801case 60:
vlm0aa86902004-10-12 23:26:53 +00001802#line 730 "asn1p_y.y"
1803{
1804 ;
1805 break;}
1806case 61:
1807#line 732 "asn1p_y.y"
1808{
1809 ;
1810 break;}
1811case 62:
1812#line 748 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001813{
vlmfa67ddc2004-06-03 03:38:44 +00001814 yyval.a_expr = asn1p_expr_new(yylineno);
1815 checkmem(yyval.a_expr);
1816 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
1817 yyval.a_expr->tag = yyvsp[-1].a_tag;
1818 yyval.a_expr->expr_type = A1TC_TYPEID;
1819 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00001820 ;
1821 break;}
vlm0aa86902004-10-12 23:26:53 +00001822case 63:
1823#line 756 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001824{
vlmfa67ddc2004-06-03 03:38:44 +00001825 yyval.a_expr = yyvsp[0].a_expr;
vlmfce48a42004-09-14 02:36:39 +00001826 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
vlmfa67ddc2004-06-03 03:38:44 +00001827 assert(yyval.a_expr->expr_type);
1828 assert(yyval.a_expr->meta_type);
vlm6a02a8a2004-09-08 00:28:11 +00001829 ;
1830 break;}
vlm0aa86902004-10-12 23:26:53 +00001831case 64:
1832#line 762 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001833{
vlmfa67ddc2004-06-03 03:38:44 +00001834 yyval.a_expr = yyvsp[0].a_expr;
1835 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
1836 assert(yyval.a_expr->expr_type == A1TC_CLASSDEF);
1837 assert(yyval.a_expr->meta_type == AMT_OBJECT);
vlm6a02a8a2004-09-08 00:28:11 +00001838 ;
1839 break;}
vlm0aa86902004-10-12 23:26:53 +00001840case 65:
1841#line 778 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001842{
vlmfa67ddc2004-06-03 03:38:44 +00001843 yyval.a_expr = yyvsp[0].a_expr;
1844 assert(yyval.a_expr->Identifier == 0);
1845 yyval.a_expr->Identifier = yyvsp[-5].tv_str;
1846 yyval.a_expr->params = yyvsp[-3].a_plist;
1847 yyval.a_expr->meta_type = AMT_PARAMTYPE;
vlm6a02a8a2004-09-08 00:28:11 +00001848 ;
1849 break;}
vlm0aa86902004-10-12 23:26:53 +00001850case 66:
1851#line 788 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001852{
vlmfa67ddc2004-06-03 03:38:44 +00001853 int ret;
1854 yyval.a_plist = asn1p_paramlist_new(yylineno);
1855 checkmem(yyval.a_plist);
1856 ret = asn1p_paramlist_add_param(yyval.a_plist, yyvsp[0].a_parg.governor, yyvsp[0].a_parg.argument);
1857 checkmem(ret == 0);
1858 if(yyvsp[0].a_parg.governor) asn1p_ref_free(yyvsp[0].a_parg.governor);
1859 if(yyvsp[0].a_parg.argument) free(yyvsp[0].a_parg.argument);
vlm6a02a8a2004-09-08 00:28:11 +00001860 ;
1861 break;}
vlm0aa86902004-10-12 23:26:53 +00001862case 67:
1863#line 797 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001864{
vlmfa67ddc2004-06-03 03:38:44 +00001865 int ret;
1866 yyval.a_plist = yyvsp[-2].a_plist;
1867 ret = asn1p_paramlist_add_param(yyval.a_plist, yyvsp[0].a_parg.governor, yyvsp[0].a_parg.argument);
1868 checkmem(ret == 0);
1869 if(yyvsp[0].a_parg.governor) asn1p_ref_free(yyvsp[0].a_parg.governor);
1870 if(yyvsp[0].a_parg.argument) free(yyvsp[0].a_parg.argument);
vlm6a02a8a2004-09-08 00:28:11 +00001871 ;
1872 break;}
vlm0aa86902004-10-12 23:26:53 +00001873case 68:
1874#line 808 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001875{
vlmfa67ddc2004-06-03 03:38:44 +00001876 yyval.a_parg.governor = NULL;
1877 yyval.a_parg.argument = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00001878 ;
1879 break;}
vlm0aa86902004-10-12 23:26:53 +00001880case 69:
1881#line 812 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001882{
vlmfa67ddc2004-06-03 03:38:44 +00001883 int ret;
1884 yyval.a_parg.governor = asn1p_ref_new(yylineno);
1885 ret = asn1p_ref_add_component(yyval.a_parg.governor, yyvsp[-2].tv_str, 0);
1886 checkmem(ret == 0);
1887 yyval.a_parg.argument = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00001888 ;
1889 break;}
vlm0aa86902004-10-12 23:26:53 +00001890case 70:
1891#line 819 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001892{
vlmfa67ddc2004-06-03 03:38:44 +00001893 int ret;
1894 yyval.a_parg.governor = asn1p_ref_new(yylineno);
vlm4053ca52005-02-18 16:34:21 +00001895 ret = asn1p_ref_add_component(yyval.a_parg.governor, yyvsp[-2].tv_str, 0);
1896 checkmem(ret == 0);
1897 yyval.a_parg.argument = yyvsp[0].tv_str;
1898 ;
1899 break;}
1900case 71:
1901#line 826 "asn1p_y.y"
1902{
1903 int ret;
1904 yyval.a_parg.governor = asn1p_ref_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00001905 ret = asn1p_ref_add_component(yyval.a_parg.governor,
1906 ASN_EXPR_TYPE2STR(yyvsp[-2].a_type), 1);
1907 checkmem(ret == 0);
1908 yyval.a_parg.argument = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00001909 ;
1910 break;}
vlm4053ca52005-02-18 16:34:21 +00001911case 72:
1912#line 837 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001913{
vlmfa67ddc2004-06-03 03:38:44 +00001914 yyval.a_expr = asn1p_expr_new(yylineno);
1915 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00001916 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1917 ;
1918 break;}
vlm4053ca52005-02-18 16:34:21 +00001919case 73:
1920#line 842 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001921{
vlmfa67ddc2004-06-03 03:38:44 +00001922 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001923 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1924 ;
1925 break;}
vlm4053ca52005-02-18 16:34:21 +00001926case 74:
1927#line 849 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001928{
vlmfa67ddc2004-06-03 03:38:44 +00001929 yyval.a_expr = yyvsp[0].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001930 ;
1931 break;}
vlm4053ca52005-02-18 16:34:21 +00001932case 75:
1933#line 852 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001934{
vlmfa67ddc2004-06-03 03:38:44 +00001935 yyval.a_expr = asn1p_expr_new(yylineno);
1936 checkmem(yyval.a_expr);
1937 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1938 yyval.a_expr->expr_type = A1TC_REFERENCE;
1939 yyval.a_expr->meta_type = AMT_VALUE;
vlm6a02a8a2004-09-08 00:28:11 +00001940 ;
1941 break;}
vlm4053ca52005-02-18 16:34:21 +00001942case 76:
1943#line 876 "asn1p_y.y"
vlm0aa86902004-10-12 23:26:53 +00001944{ yyval.a_expr = asn1p_expr_new(yylineno); ;
1945 break;}
vlm4053ca52005-02-18 16:34:21 +00001946case 77:
1947#line 877 "asn1p_y.y"
vlm0aa86902004-10-12 23:26:53 +00001948{ yyval.a_expr = yyvsp[0].a_expr; ;
1949 break;}
vlm4053ca52005-02-18 16:34:21 +00001950case 78:
1951#line 880 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001952{
vlmfa67ddc2004-06-03 03:38:44 +00001953 yyval.a_expr = asn1p_expr_new(yylineno);
1954 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00001955 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1956 ;
1957 break;}
vlm4053ca52005-02-18 16:34:21 +00001958case 79:
1959#line 885 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001960{
vlmfa67ddc2004-06-03 03:38:44 +00001961 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001962 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1963 ;
1964 break;}
vlm4053ca52005-02-18 16:34:21 +00001965case 80:
1966#line 892 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001967{
vlmec8f6812004-08-22 03:19:54 +00001968 yyval.a_expr = yyvsp[-1].a_expr;
1969 assert(yyval.a_expr->Identifier == 0);
vlmfce48a42004-09-14 02:36:39 +00001970 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
vlmec8f6812004-08-22 03:19:54 +00001971 yyval.a_expr->marker = yyvsp[0].a_marker;
vlm6a02a8a2004-09-08 00:28:11 +00001972 ;
1973 break;}
vlm4053ca52005-02-18 16:34:21 +00001974case 81:
1975#line 898 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001976{
vlmec8f6812004-08-22 03:19:54 +00001977 yyval.a_expr = asn1p_expr_new(yylineno);
1978 checkmem(yyval.a_expr);
1979 yyval.a_expr->meta_type = yyvsp[0].a_expr->meta_type;
1980 yyval.a_expr->expr_type = A1TC_COMPONENTS_OF;
vlm6a02a8a2004-09-08 00:28:11 +00001981 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1982 ;
1983 break;}
vlm4053ca52005-02-18 16:34:21 +00001984case 82:
1985#line 905 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001986{
vlmec8f6812004-08-22 03:19:54 +00001987 yyval.a_expr = yyvsp[0].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001988 ;
1989 break;}
vlm4053ca52005-02-18 16:34:21 +00001990case 83:
1991#line 911 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001992{
vlmec8f6812004-08-22 03:19:54 +00001993 yyval.a_expr = asn1p_expr_new(yylineno);
1994 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00001995 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1996 ;
1997 break;}
vlm4053ca52005-02-18 16:34:21 +00001998case 84:
1999#line 916 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002000{
vlmec8f6812004-08-22 03:19:54 +00002001 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00002002 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
2003 ;
2004 break;}
vlm4053ca52005-02-18 16:34:21 +00002005case 85:
2006#line 923 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002007{
vlmec8f6812004-08-22 03:19:54 +00002008 yyval.a_expr = yyvsp[0].a_expr;
2009 assert(yyval.a_expr->Identifier == 0);
vlmfce48a42004-09-14 02:36:39 +00002010 yyval.a_expr->Identifier = yyvsp[-1].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00002011 ;
2012 break;}
vlm4053ca52005-02-18 16:34:21 +00002013case 86:
2014#line 928 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002015{
vlmec8f6812004-08-22 03:19:54 +00002016 yyval.a_expr = yyvsp[0].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00002017 ;
2018 break;}
vlm4053ca52005-02-18 16:34:21 +00002019case 87:
2020#line 934 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002021{
vlmfa67ddc2004-06-03 03:38:44 +00002022 yyval.a_expr = yyvsp[-2].a_expr;
2023 checkmem(yyval.a_expr);
2024 yyval.a_expr->with_syntax = yyvsp[0].a_wsynt;
2025 assert(yyval.a_expr->expr_type == A1TC_CLASSDEF);
2026 assert(yyval.a_expr->meta_type == AMT_OBJECT);
vlm6a02a8a2004-09-08 00:28:11 +00002027 ;
2028 break;}
vlm4053ca52005-02-18 16:34:21 +00002029case 88:
2030#line 944 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002031{ yyval.a_int = 0; ;
2032 break;}
vlm4053ca52005-02-18 16:34:21 +00002033case 89:
2034#line 945 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002035{ yyval.a_int = 1; ;
2036 break;}
vlm4053ca52005-02-18 16:34:21 +00002037case 90:
2038#line 949 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002039{
vlmfa67ddc2004-06-03 03:38:44 +00002040 yyval.a_expr = asn1p_expr_new(yylineno);
2041 checkmem(yyval.a_expr);
2042 yyval.a_expr->expr_type = A1TC_CLASSDEF;
2043 yyval.a_expr->meta_type = AMT_OBJECT;
vlm6a02a8a2004-09-08 00:28:11 +00002044 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
2045 ;
2046 break;}
vlm4053ca52005-02-18 16:34:21 +00002047case 91:
2048#line 956 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002049{
vlmfa67ddc2004-06-03 03:38:44 +00002050 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00002051 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
2052 ;
2053 break;}
vlm4053ca52005-02-18 16:34:21 +00002054case 92:
2055#line 963 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002056{
vlmfa67ddc2004-06-03 03:38:44 +00002057 yyval.a_expr = asn1p_expr_new(yylineno);
2058 checkmem(yyval.a_expr);
2059 yyval.a_expr->Identifier = yyvsp[-1].a_refcomp.name;
2060 yyval.a_expr->expr_type = A1TC_CLASSFIELD;
2061 yyval.a_expr->meta_type = AMT_OBJECTFIELD;
2062 yyval.a_expr->marker = yyvsp[0].a_marker;
vlm6a02a8a2004-09-08 00:28:11 +00002063 ;
2064 break;}
vlm4053ca52005-02-18 16:34:21 +00002065case 93:
2066#line 971 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002067{
vlmec8f6812004-08-22 03:19:54 +00002068 yyval.a_expr = yyvsp[-2].a_expr;
2069 yyval.a_expr->Identifier = yyvsp[-3].a_refcomp.name;
vlmbde35d42004-11-24 17:43:29 +00002070 yyval.a_expr->marker = yyvsp[0].a_marker;
2071 yyval.a_expr->unique = yyvsp[-1].a_int;
vlm6a02a8a2004-09-08 00:28:11 +00002072 ;
2073 break;}
vlm4053ca52005-02-18 16:34:21 +00002074case 94:
2075#line 977 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002076{
vlmfa67ddc2004-06-03 03:38:44 +00002077 int ret;
2078 yyval.a_expr = asn1p_expr_new(yylineno);
2079 checkmem(yyval.a_expr);
2080 yyval.a_expr->Identifier = yyvsp[-3].a_refcomp.name;
2081 yyval.a_expr->reference = asn1p_ref_new(yylineno);
2082 checkmem(yyval.a_expr->reference);
2083 ret = asn1p_ref_add_component(yyval.a_expr->reference,
2084 yyvsp[-2].a_refcomp.name, yyvsp[-2].a_refcomp.lex_type);
2085 checkmem(ret == 0);
2086 yyval.a_expr->expr_type = A1TC_CLASSFIELD;
2087 yyval.a_expr->meta_type = AMT_OBJECTFIELD;
vlmbde35d42004-11-24 17:43:29 +00002088 yyval.a_expr->marker = yyvsp[0].a_marker;
2089 yyval.a_expr->unique = yyvsp[-1].a_int;
vlm6a02a8a2004-09-08 00:28:11 +00002090 ;
2091 break;}
vlm4053ca52005-02-18 16:34:21 +00002092case 95:
2093#line 995 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002094{ yyval.a_wsynt = 0; ;
2095 break;}
vlm4053ca52005-02-18 16:34:21 +00002096case 96:
2097#line 996 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002098{
vlmfa67ddc2004-06-03 03:38:44 +00002099 yyval.a_wsynt = yyvsp[0].a_wsynt;
vlm6a02a8a2004-09-08 00:28:11 +00002100 ;
2101 break;}
vlm4053ca52005-02-18 16:34:21 +00002102case 97:
2103#line 1003 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002104{ asn1p_lexer_hack_enable_with_syntax(); ;
2105 break;}
vlm4053ca52005-02-18 16:34:21 +00002106case 98:
2107#line 1005 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002108{
vlmfa67ddc2004-06-03 03:38:44 +00002109 yyval.a_wsynt = yyvsp[-1].a_wsynt;
vlm6a02a8a2004-09-08 00:28:11 +00002110 ;
2111 break;}
vlm4053ca52005-02-18 16:34:21 +00002112case 99:
2113#line 1011 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002114{
vlmfa67ddc2004-06-03 03:38:44 +00002115 yyval.a_wsynt = asn1p_wsyntx_new();
2116 TQ_ADD(&(yyval.a_wsynt->chunks), yyvsp[0].a_wchunk, next);
vlm6a02a8a2004-09-08 00:28:11 +00002117 ;
2118 break;}
vlm4053ca52005-02-18 16:34:21 +00002119case 100:
2120#line 1015 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002121{
vlmfa67ddc2004-06-03 03:38:44 +00002122 yyval.a_wsynt = yyvsp[-1].a_wsynt;
2123 TQ_ADD(&(yyval.a_wsynt->chunks), yyvsp[0].a_wchunk, next);
vlm6a02a8a2004-09-08 00:28:11 +00002124 ;
2125 break;}
vlm4053ca52005-02-18 16:34:21 +00002126case 101:
2127#line 1022 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002128{
vlmfa67ddc2004-06-03 03:38:44 +00002129 yyval.a_wchunk = asn1p_wsyntx_chunk_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002130 ;
2131 break;}
vlm4053ca52005-02-18 16:34:21 +00002132case 102:
2133#line 1025 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002134{
vlmfa67ddc2004-06-03 03:38:44 +00002135 asn1p_ref_t *ref;
2136 int ret;
2137 ref = asn1p_ref_new(yylineno);
2138 checkmem(ref);
2139 ret = asn1p_ref_add_component(ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
2140 checkmem(ret == 0);
2141 yyval.a_wchunk = asn1p_wsyntx_chunk_fromref(ref, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002142 ;
2143 break;}
vlm0aa86902004-10-12 23:26:53 +00002144case 103:
vlm4053ca52005-02-18 16:34:21 +00002145#line 1037 "asn1p_y.y"
vlm0aa86902004-10-12 23:26:53 +00002146{
2147 yyval.a_expr = asn1p_expr_new(yylineno);
2148 checkmem(yyval.a_expr);
2149 yyval.a_expr->Identifier = strdup("...");
2150 checkmem(yyval.a_expr->Identifier);
vlm0aa86902004-10-12 23:26:53 +00002151 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
2152 yyval.a_expr->meta_type = AMT_TYPE;
2153 ;
2154 break;}
2155case 104:
vlm4053ca52005-02-18 16:34:21 +00002156#line 1045 "asn1p_y.y"
2157{
2158 yyval.a_expr = asn1p_expr_new(yylineno);
2159 checkmem(yyval.a_expr);
2160 yyval.a_expr->Identifier = strdup("...");
2161 checkmem(yyval.a_expr->Identifier);
2162 yyval.a_expr->value = yyvsp[0].a_value;
2163 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
2164 yyval.a_expr->meta_type = AMT_TYPE;
2165 ;
2166 break;}
2167case 105:
2168#line 1054 "asn1p_y.y"
vlm0aa86902004-10-12 23:26:53 +00002169{
2170 yyval.a_expr = asn1p_expr_new(yylineno);
2171 checkmem(yyval.a_expr);
2172 yyval.a_expr->Identifier = strdup("...");
vlm5f0128b2004-08-20 13:25:29 +00002173 yyval.a_expr->value = yyvsp[0].a_value;
2174 checkmem(yyval.a_expr->Identifier);
2175 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
2176 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002177 ;
2178 break;}
vlm4053ca52005-02-18 16:34:21 +00002179case 106:
2180#line 1066 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002181{
vlmec8f6812004-08-22 03:19:54 +00002182 yyval.a_expr = yyvsp[-1].a_expr;
vlmfce48a42004-09-14 02:36:39 +00002183 yyval.a_expr->tag = yyvsp[-2].a_tag;
vlmec8f6812004-08-22 03:19:54 +00002184 /*
2185 * Outer constraint for SEQUENCE OF and SET OF applies
2186 * to the inner type.
2187 */
2188 if(yyval.a_expr->expr_type == ASN_CONSTR_SEQUENCE_OF
2189 || yyval.a_expr->expr_type == ASN_CONSTR_SET_OF) {
2190 assert(!TQ_FIRST(&(yyval.a_expr->members))->constraints);
2191 TQ_FIRST(&(yyval.a_expr->members))->constraints = yyvsp[0].a_constr;
2192 } else {
2193 if(yyval.a_expr->constraints) {
vlmfce48a42004-09-14 02:36:39 +00002194 assert(!yyvsp[-1].a_expr);
vlmec8f6812004-08-22 03:19:54 +00002195 } else {
2196 yyval.a_expr->constraints = yyvsp[0].a_constr;
2197 }
2198 }
vlm6a02a8a2004-09-08 00:28:11 +00002199 ;
2200 break;}
vlm4053ca52005-02-18 16:34:21 +00002201case 107:
2202#line 1088 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002203{
vlm5f0128b2004-08-20 13:25:29 +00002204 yyval.a_expr = yyvsp[0].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00002205 ;
2206 break;}
vlm4053ca52005-02-18 16:34:21 +00002207case 108:
2208#line 1091 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002209{
vlm5e2c4b92005-03-20 11:12:40 +00002210 yyval.a_expr = yyvsp[-1].a_expr;
2211 assert(yyval.a_expr->expr_type == A1TC_INVALID);
2212 yyval.a_expr->expr_type = ASN_CONSTR_CHOICE;
vlmfa67ddc2004-06-03 03:38:44 +00002213 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002214 ;
2215 break;}
vlm4053ca52005-02-18 16:34:21 +00002216case 109:
2217#line 1097 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002218{
vlmec8f6812004-08-22 03:19:54 +00002219 yyval.a_expr = yyvsp[-1].a_expr;
2220 assert(yyval.a_expr->expr_type == A1TC_INVALID);
vlm5e2c4b92005-03-20 11:12:40 +00002221 yyval.a_expr->expr_type = ASN_CONSTR_SEQUENCE;
vlmec8f6812004-08-22 03:19:54 +00002222 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002223 ;
2224 break;}
vlm4053ca52005-02-18 16:34:21 +00002225case 110:
2226#line 1103 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002227{
vlmec8f6812004-08-22 03:19:54 +00002228 yyval.a_expr = yyvsp[-1].a_expr;
2229 assert(yyval.a_expr->expr_type == A1TC_INVALID);
vlm5e2c4b92005-03-20 11:12:40 +00002230 yyval.a_expr->expr_type = ASN_CONSTR_SET;
vlmec8f6812004-08-22 03:19:54 +00002231 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002232 ;
2233 break;}
vlm4053ca52005-02-18 16:34:21 +00002234case 111:
2235#line 1109 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002236{
vlm39e5ed72004-09-05 10:40:41 +00002237 yyval.a_expr = asn1p_expr_new(yylineno);
vlmec8f6812004-08-22 03:19:54 +00002238 checkmem(yyval.a_expr);
vlm151c0b22004-09-22 16:03:36 +00002239 yyval.a_expr->constraints = yyvsp[-4].a_constr;
vlmec8f6812004-08-22 03:19:54 +00002240 yyval.a_expr->expr_type = ASN_CONSTR_SEQUENCE_OF;
2241 yyval.a_expr->meta_type = AMT_TYPE;
vlm151c0b22004-09-22 16:03:36 +00002242 yyvsp[0].a_expr->Identifier = yyvsp[-2].tv_str;
vlma2374a02004-09-14 02:44:07 +00002243 yyvsp[0].a_expr->tag = yyvsp[-1].a_tag;
vlm6a02a8a2004-09-08 00:28:11 +00002244 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
2245 ;
2246 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002247case 112:
2248#line 1119 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002249{
vlm39e5ed72004-09-05 10:40:41 +00002250 yyval.a_expr = asn1p_expr_new(yylineno);
vlmec8f6812004-08-22 03:19:54 +00002251 checkmem(yyval.a_expr);
vlm151c0b22004-09-22 16:03:36 +00002252 yyval.a_expr->constraints = yyvsp[-4].a_constr;
vlmec8f6812004-08-22 03:19:54 +00002253 yyval.a_expr->expr_type = ASN_CONSTR_SET_OF;
2254 yyval.a_expr->meta_type = AMT_TYPE;
vlm151c0b22004-09-22 16:03:36 +00002255 yyvsp[0].a_expr->Identifier = yyvsp[-2].tv_str;
vlma2374a02004-09-14 02:44:07 +00002256 yyvsp[0].a_expr->tag = yyvsp[-1].a_tag;
vlm6a02a8a2004-09-08 00:28:11 +00002257 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
2258 ;
2259 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002260case 113:
2261#line 1129 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002262{
vlm39e5ed72004-09-05 10:40:41 +00002263 yyval.a_expr = asn1p_expr_new(yylineno);
vlmec8f6812004-08-22 03:19:54 +00002264 checkmem(yyval.a_expr);
vlm044f7442004-09-04 04:49:21 +00002265 yyval.a_expr->expr_type = ASN_TYPE_ANY;
vlmec8f6812004-08-22 03:19:54 +00002266 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002267 ;
2268 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002269case 114:
2270#line 1135 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002271{
vlmec8f6812004-08-22 03:19:54 +00002272 int ret;
vlm39e5ed72004-09-05 10:40:41 +00002273 yyval.a_expr = asn1p_expr_new(yylineno);
vlmec8f6812004-08-22 03:19:54 +00002274 checkmem(yyval.a_expr);
2275 yyval.a_expr->reference = asn1p_ref_new(yylineno);
2276 ret = asn1p_ref_add_component(yyval.a_expr->reference,
2277 yyvsp[0].tv_str, RLT_lowercase);
2278 checkmem(ret == 0);
vlm044f7442004-09-04 04:49:21 +00002279 yyval.a_expr->expr_type = ASN_TYPE_ANY;
vlmec8f6812004-08-22 03:19:54 +00002280 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002281 ;
2282 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002283case 115:
2284#line 1149 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002285{
vlmfa67ddc2004-06-03 03:38:44 +00002286 int ret;
2287 yyval.a_expr = yyvsp[-1].a_expr;
2288 assert(yyval.a_expr->expr_type == 0);
2289 assert(yyval.a_expr->meta_type == 0);
2290 assert(yyval.a_expr->reference == 0);
2291 yyval.a_expr->reference = asn1p_ref_new(yylineno);
2292 checkmem(yyval.a_expr->reference);
2293 ret = asn1p_ref_add_component(yyval.a_expr->reference, yyvsp[-3].tv_str, RLT_UNKNOWN);
2294 checkmem(ret == 0);
2295 free(yyvsp[-3].tv_str);
2296 yyval.a_expr->expr_type = A1TC_PARAMETRIZED;
2297 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002298 ;
2299 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002300case 116:
2301#line 1173 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002302{
vlmfa67ddc2004-06-03 03:38:44 +00002303 yyval.a_expr = asn1p_expr_new(yylineno);
2304 checkmem(yyval.a_expr);
2305 yyval.a_expr->reference = yyvsp[0].a_ref;
2306 yyval.a_expr->expr_type = A1TC_REFERENCE;
2307 yyval.a_expr->meta_type = AMT_TYPEREF;
vlm6a02a8a2004-09-08 00:28:11 +00002308 ;
2309 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002310case 117:
2311#line 1180 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002312{
vlmfa67ddc2004-06-03 03:38:44 +00002313 yyval.a_expr = asn1p_expr_new(yylineno);
2314 checkmem(yyval.a_expr);
2315 yyval.a_expr->reference = yyvsp[0].a_ref;
2316 yyval.a_expr->expr_type = A1TC_INSTANCE;
2317 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002318 ;
2319 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002320case 118:
2321#line 1195 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002322{
vlmfa67ddc2004-06-03 03:38:44 +00002323 int ret;
2324 yyval.a_ref = asn1p_ref_new(yylineno);
2325 checkmem(yyval.a_ref);
2326 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN);
2327 checkmem(ret == 0);
2328 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002329 ;
2330 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002331case 119:
2332#line 1203 "asn1p_y.y"
2333{
2334 int ret;
2335 yyval.a_ref = asn1p_ref_new(yylineno);
2336 checkmem(yyval.a_ref);
2337 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2338 checkmem(ret == 0);
2339 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN);
2340 checkmem(ret == 0);
2341 free(yyvsp[-2].tv_str);
2342 ;
2343 break;}
vlm0aa86902004-10-12 23:26:53 +00002344case 120:
vlm5e2c4b92005-03-20 11:12:40 +00002345#line 1213 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002346{
vlmfa67ddc2004-06-03 03:38:44 +00002347 int ret;
2348 yyval.a_ref = asn1p_ref_new(yylineno);
2349 checkmem(yyval.a_ref);
2350 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2351 checkmem(ret == 0);
vlmc94e28f2004-09-15 11:59:51 +00002352 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN);
vlmfa67ddc2004-06-03 03:38:44 +00002353 checkmem(ret == 0);
2354 free(yyvsp[-2].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002355 ;
2356 break;}
vlm0aa86902004-10-12 23:26:53 +00002357case 121:
vlm5e2c4b92005-03-20 11:12:40 +00002358#line 1223 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002359{
vlmfa67ddc2004-06-03 03:38:44 +00002360 int ret;
2361 yyval.a_ref = asn1p_ref_new(yylineno);
2362 checkmem(yyval.a_ref);
vlmc94e28f2004-09-15 11:59:51 +00002363 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2364 checkmem(ret == 0);
2365 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_lowercase);
2366 checkmem(ret == 0);
2367 free(yyvsp[-2].tv_str);
2368 ;
2369 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002370case 122:
2371#line 1233 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002372{
2373 int ret;
2374 yyval.a_ref = asn1p_ref_new(yylineno);
2375 checkmem(yyval.a_ref);
vlmfa67ddc2004-06-03 03:38:44 +00002376 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_CAPITALS);
2377 free(yyvsp[0].tv_str);
2378 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002379 ;
2380 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002381case 123:
2382#line 1241 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002383{
vlmfa67ddc2004-06-03 03:38:44 +00002384 int ret;
2385 yyval.a_ref = yyvsp[0].a_ref;
2386 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_CAPITALS);
2387 free(yyvsp[-2].tv_str);
2388 checkmem(ret == 0);
2389 /*
2390 * Move the last element infront.
2391 */
2392 {
2393 struct asn1p_ref_component_s tmp_comp;
2394 tmp_comp = yyval.a_ref->components[yyval.a_ref->comp_count-1];
2395 memmove(&yyval.a_ref->components[1],
2396 &yyval.a_ref->components[0],
2397 sizeof(yyval.a_ref->components[0])
2398 * (yyval.a_ref->comp_count - 1));
2399 yyval.a_ref->components[0] = tmp_comp;
2400 }
vlm6a02a8a2004-09-08 00:28:11 +00002401 ;
2402 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002403case 124:
2404#line 1263 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002405{
vlmfa67ddc2004-06-03 03:38:44 +00002406 int ret;
2407 yyval.a_ref = asn1p_ref_new(yylineno);
2408 checkmem(yyval.a_ref);
2409 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
2410 free(yyvsp[0].a_refcomp.name);
2411 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002412 ;
2413 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002414case 125:
2415#line 1271 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002416{
vlmfa67ddc2004-06-03 03:38:44 +00002417 int ret;
2418 yyval.a_ref = yyvsp[-2].a_ref;
2419 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
2420 free(yyvsp[0].a_refcomp.name);
2421 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002422 ;
2423 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002424case 128:
2425#line 1285 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002426{
vlmfa67ddc2004-06-03 03:38:44 +00002427 yyval.a_refcomp.lex_type = RLT_AmpUppercase;
2428 yyval.a_refcomp.name = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00002429 ;
2430 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002431case 129:
2432#line 1290 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002433{
vlmfa67ddc2004-06-03 03:38:44 +00002434 yyval.a_refcomp.lex_type = RLT_Amplowercase;
2435 yyval.a_refcomp.name = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00002436 ;
2437 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002438case 130:
2439#line 1303 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002440{
vlmfa67ddc2004-06-03 03:38:44 +00002441 yyval.a_expr = yyvsp[-2].a_expr;
2442 assert(yyval.a_expr->Identifier == NULL);
2443 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
2444 yyval.a_expr->meta_type = AMT_VALUE;
2445 yyval.a_expr->value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002446 ;
2447 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002448case 131:
2449#line 1313 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002450{
2451 yyval.a_value = asn1p_value_fromint(0);
2452 checkmem(yyval.a_value);
2453 yyval.a_value->type = ATV_CHOICE_IDENTIFIER;
2454 yyval.a_value->value.choice_identifier.identifier = yyvsp[-2].tv_str;
2455 yyval.a_value->value.choice_identifier.value = yyvsp[0].a_value;
2456 ;
2457 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002458case 132:
2459#line 1320 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002460{ asn1p_lexer_hack_push_opaque_state(); ;
2461 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002462case 133:
2463#line 1320 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002464{
vlmfa67ddc2004-06-03 03:38:44 +00002465 yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
2466 checkmem(yyval.a_value);
2467 yyval.a_value->type = ATV_UNPARSED;
vlm6a02a8a2004-09-08 00:28:11 +00002468 ;
2469 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002470case 134:
2471#line 1325 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002472{
2473 yyval.a_value = asn1p_value_fromint(0);
2474 checkmem(yyval.a_value);
2475 yyval.a_value->type = ATV_NULL;
2476 ;
2477 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002478case 135:
2479#line 1330 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002480{
2481 yyval.a_value = asn1p_value_fromint(0);
2482 checkmem(yyval.a_value);
2483 yyval.a_value->type = ATV_FALSE;
2484 ;
2485 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002486case 136:
2487#line 1335 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002488{
2489 yyval.a_value = asn1p_value_fromint(0);
2490 checkmem(yyval.a_value);
2491 yyval.a_value->type = ATV_TRUE;
2492 ;
2493 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002494case 137:
2495#line 1340 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002496{
vlmfa67ddc2004-06-03 03:38:44 +00002497 yyval.a_value = _convert_bitstring2binary(yyvsp[0].tv_str, 'B');
2498 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00002499 ;
2500 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002501case 138:
2502#line 1344 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002503{
vlmfa67ddc2004-06-03 03:38:44 +00002504 yyval.a_value = _convert_bitstring2binary(yyvsp[0].tv_str, 'H');
2505 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00002506 ;
2507 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002508case 139:
2509#line 1348 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002510{
vlmfa67ddc2004-06-03 03:38:44 +00002511 yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
2512 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00002513 ;
2514 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002515case 140:
2516#line 1352 "asn1p_y.y"
2517{
2518 yyval.a_value = yyvsp[0].a_value;
2519 ;
2520 break;}
vlm0aa86902004-10-12 23:26:53 +00002521case 141:
vlm5e2c4b92005-03-20 11:12:40 +00002522#line 1355 "asn1p_y.y"
vlm151c0b22004-09-22 16:03:36 +00002523{
2524 yyval.a_value = yyvsp[0].a_value;
2525 ;
2526 break;}
vlm0aa86902004-10-12 23:26:53 +00002527case 142:
vlm4053ca52005-02-18 16:34:21 +00002528#line 1361 "asn1p_y.y"
2529{
vlmfa67ddc2004-06-03 03:38:44 +00002530 asn1p_ref_t *ref;
2531 int ret;
2532 ref = asn1p_ref_new(yylineno);
2533 checkmem(ref);
2534 ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
2535 checkmem(ret == 0);
2536 yyval.a_value = asn1p_value_fromref(ref, 0);
2537 checkmem(yyval.a_value);
2538 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002539 ;
2540 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002541case 143:
2542#line 1372 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002543{
vlmfa67ddc2004-06-03 03:38:44 +00002544 asn1p_ref_t *ref;
2545 int ret;
2546 ref = asn1p_ref_new(yylineno);
2547 checkmem(ref);
2548 ret = asn1p_ref_add_component(ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2549 checkmem(ret == 0);
2550 ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
2551 checkmem(ret == 0);
2552 yyval.a_value = asn1p_value_fromref(ref, 0);
2553 checkmem(yyval.a_value);
2554 free(yyvsp[-2].tv_str);
2555 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002556 ;
2557 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002558case 144:
2559#line 1389 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002560{
vlmfa67ddc2004-06-03 03:38:44 +00002561 yyval.tv_opaque.len = yyvsp[0].tv_opaque.len + 2;
2562 yyval.tv_opaque.buf = malloc(yyval.tv_opaque.len + 1);
2563 checkmem(yyval.tv_opaque.buf);
2564 yyval.tv_opaque.buf[0] = '{';
2565 yyval.tv_opaque.buf[1] = ' ';
2566 memcpy(yyval.tv_opaque.buf + 2, yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len);
2567 yyval.tv_opaque.buf[yyval.tv_opaque.len] = '\0';
2568 free(yyvsp[0].tv_opaque.buf);
vlm6a02a8a2004-09-08 00:28:11 +00002569 ;
2570 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002571case 145:
2572#line 1399 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002573{
vlmfa67ddc2004-06-03 03:38:44 +00002574 int newsize = yyvsp[-1].tv_opaque.len + yyvsp[0].tv_opaque.len;
2575 char *p = malloc(newsize + 1);
2576 checkmem(p);
2577 memcpy(p , yyvsp[-1].tv_opaque.buf, yyvsp[-1].tv_opaque.len);
2578 memcpy(p + yyvsp[-1].tv_opaque.len, yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len);
2579 p[newsize] = '\0';
2580 free(yyvsp[-1].tv_opaque.buf);
2581 free(yyvsp[0].tv_opaque.buf);
2582 yyval.tv_opaque.buf = p;
2583 yyval.tv_opaque.len = newsize;
vlm6a02a8a2004-09-08 00:28:11 +00002584 ;
2585 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002586case 146:
2587#line 1414 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002588{ yyval.a_type = ASN_BASIC_BOOLEAN; ;
2589 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002590case 147:
2591#line 1415 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002592{ yyval.a_type = ASN_BASIC_NULL; ;
2593 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002594case 148:
2595#line 1416 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002596{ yyval.a_type = ASN_BASIC_REAL; ;
2597 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002598case 149:
2599#line 1417 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002600{ yyval.a_type = yyvsp[0].a_type; ;
2601 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002602case 150:
2603#line 1418 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002604{ yyval.a_type = ASN_BASIC_OCTET_STRING; ;
2605 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002606case 151:
2607#line 1419 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002608{ yyval.a_type = ASN_BASIC_OBJECT_IDENTIFIER; ;
2609 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002610case 152:
2611#line 1420 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002612{ yyval.a_type = ASN_BASIC_RELATIVE_OID; ;
2613 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002614case 153:
2615#line 1421 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002616{ yyval.a_type = ASN_BASIC_EXTERNAL; ;
2617 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002618case 154:
2619#line 1422 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002620{ yyval.a_type = ASN_BASIC_EMBEDDED_PDV; ;
2621 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002622case 155:
2623#line 1423 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002624{ yyval.a_type = ASN_BASIC_CHARACTER_STRING; ;
2625 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002626case 156:
2627#line 1424 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002628{ yyval.a_type = ASN_BASIC_UTCTime; ;
2629 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002630case 157:
2631#line 1425 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002632{ yyval.a_type = ASN_BASIC_GeneralizedTime; ;
2633 break;}
vlm5e2c4b92005-03-20 11:12:40 +00002634case 158:
2635#line 1426 "asn1p_y.y"
2636{ yyval.a_type = yyvsp[0].a_type; ;
2637 break;}
vlm4053ca52005-02-18 16:34:21 +00002638case 159:
vlm5e2c4b92005-03-20 11:12:40 +00002639#line 1433 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002640{ yyval.a_type = ASN_BASIC_INTEGER; ;
2641 break;}
vlm4053ca52005-02-18 16:34:21 +00002642case 160:
vlm5e2c4b92005-03-20 11:12:40 +00002643#line 1434 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002644{ yyval.a_type = ASN_BASIC_ENUMERATED; ;
2645 break;}
vlm4053ca52005-02-18 16:34:21 +00002646case 161:
vlm5e2c4b92005-03-20 11:12:40 +00002647#line 1435 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002648{ yyval.a_type = ASN_BASIC_BIT_STRING; ;
2649 break;}
vlm4053ca52005-02-18 16:34:21 +00002650case 162:
vlm5e2c4b92005-03-20 11:12:40 +00002651#line 1439 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002652{
vlm39e5ed72004-09-05 10:40:41 +00002653 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00002654 checkmem(yyval.a_expr);
2655 yyval.a_expr->expr_type = yyvsp[0].a_type;
2656 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002657 ;
2658 break;}
vlm4053ca52005-02-18 16:34:21 +00002659case 163:
vlm5e2c4b92005-03-20 11:12:40 +00002660#line 1445 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002661{
vlmfa67ddc2004-06-03 03:38:44 +00002662 if(yyvsp[0].a_expr) {
2663 yyval.a_expr = yyvsp[0].a_expr;
2664 } else {
vlm39e5ed72004-09-05 10:40:41 +00002665 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00002666 checkmem(yyval.a_expr);
2667 }
2668 yyval.a_expr->expr_type = yyvsp[-1].a_type;
2669 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002670 ;
2671 break;}
vlm4053ca52005-02-18 16:34:21 +00002672case 164:
vlm5e2c4b92005-03-20 11:12:40 +00002673#line 1458 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002674{ yyval.a_type = ASN_STRING_BMPString; ;
2675 break;}
vlm4053ca52005-02-18 16:34:21 +00002676case 165:
vlm5e2c4b92005-03-20 11:12:40 +00002677#line 1459 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002678{
vlmfa67ddc2004-06-03 03:38:44 +00002679 yyval.a_type = ASN_STRING_GeneralString;
vlmc94e28f2004-09-15 11:59:51 +00002680 fprintf(stderr, "WARNING: GeneralString is not fully supported\n");
vlm6a02a8a2004-09-08 00:28:11 +00002681 ;
2682 break;}
vlm4053ca52005-02-18 16:34:21 +00002683case 166:
vlm5e2c4b92005-03-20 11:12:40 +00002684#line 1463 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002685{
vlmc94e28f2004-09-15 11:59:51 +00002686 yyval.a_type = ASN_STRING_GraphicString;
2687 fprintf(stderr, "WARNING: GraphicString is not fully supported\n");
vlm6a02a8a2004-09-08 00:28:11 +00002688 ;
2689 break;}
vlm4053ca52005-02-18 16:34:21 +00002690case 167:
vlm5e2c4b92005-03-20 11:12:40 +00002691#line 1467 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002692{ yyval.a_type = ASN_STRING_IA5String; ;
vlm6a02a8a2004-09-08 00:28:11 +00002693 break;}
vlm4053ca52005-02-18 16:34:21 +00002694case 168:
vlm5e2c4b92005-03-20 11:12:40 +00002695#line 1468 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002696{ yyval.a_type = ASN_STRING_ISO646String; ;
vlm6a02a8a2004-09-08 00:28:11 +00002697 break;}
vlm4053ca52005-02-18 16:34:21 +00002698case 169:
vlm5e2c4b92005-03-20 11:12:40 +00002699#line 1469 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002700{ yyval.a_type = ASN_STRING_NumericString; ;
vlm6a02a8a2004-09-08 00:28:11 +00002701 break;}
vlm4053ca52005-02-18 16:34:21 +00002702case 170:
vlm5e2c4b92005-03-20 11:12:40 +00002703#line 1470 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002704{ yyval.a_type = ASN_STRING_PrintableString; ;
vlm6a02a8a2004-09-08 00:28:11 +00002705 break;}
vlm4053ca52005-02-18 16:34:21 +00002706case 171:
vlm5e2c4b92005-03-20 11:12:40 +00002707#line 1471 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002708{
2709 yyval.a_type = ASN_STRING_T61String;
2710 fprintf(stderr, "WARNING: T61String is not fully supported\n");
2711 ;
vlm6a02a8a2004-09-08 00:28:11 +00002712 break;}
vlm4053ca52005-02-18 16:34:21 +00002713case 172:
vlm5e2c4b92005-03-20 11:12:40 +00002714#line 1475 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002715{ yyval.a_type = ASN_STRING_TeletexString; ;
2716 break;}
vlm4053ca52005-02-18 16:34:21 +00002717case 173:
vlm5e2c4b92005-03-20 11:12:40 +00002718#line 1476 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002719{ yyval.a_type = ASN_STRING_UniversalString; ;
2720 break;}
vlm4053ca52005-02-18 16:34:21 +00002721case 174:
vlm5e2c4b92005-03-20 11:12:40 +00002722#line 1477 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002723{ yyval.a_type = ASN_STRING_UTF8String; ;
2724 break;}
vlm4053ca52005-02-18 16:34:21 +00002725case 175:
vlm5e2c4b92005-03-20 11:12:40 +00002726#line 1478 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002727{
2728 yyval.a_type = ASN_STRING_VideotexString;
2729 fprintf(stderr, "WARNING: VideotexString is not fully supported\n");
2730 ;
2731 break;}
vlm4053ca52005-02-18 16:34:21 +00002732case 176:
vlm5e2c4b92005-03-20 11:12:40 +00002733#line 1482 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002734{ yyval.a_type = ASN_STRING_VisibleString; ;
2735 break;}
vlm4053ca52005-02-18 16:34:21 +00002736case 177:
vlm5e2c4b92005-03-20 11:12:40 +00002737#line 1483 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002738{ yyval.a_type = ASN_STRING_ObjectDescriptor; ;
2739 break;}
vlm4053ca52005-02-18 16:34:21 +00002740case 183:
vlm5e2c4b92005-03-20 11:12:40 +00002741#line 1495 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002742{ yyval.a_constr = 0; ;
2743 break;}
vlm4053ca52005-02-18 16:34:21 +00002744case 184:
vlm5e2c4b92005-03-20 11:12:40 +00002745#line 1496 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002746{
vlm39e5ed72004-09-05 10:40:41 +00002747 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002748 ;
2749 break;}
vlm4053ca52005-02-18 16:34:21 +00002750case 185:
vlm5e2c4b92005-03-20 11:12:40 +00002751#line 1502 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002752{
vlm39e5ed72004-09-05 10:40:41 +00002753 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_SET, yyvsp[0].a_constr, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002754 ;
2755 break;}
vlm4053ca52005-02-18 16:34:21 +00002756case 186:
vlm5e2c4b92005-03-20 11:12:40 +00002757#line 1505 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002758{
vlmfa67ddc2004-06-03 03:38:44 +00002759 /*
2760 * This is a special case, for compatibility purposes.
vlm9283dbe2004-08-18 04:59:12 +00002761 * It goes without parentheses.
vlmfa67ddc2004-06-03 03:38:44 +00002762 */
vlm5f0128b2004-08-20 13:25:29 +00002763 CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_SIZE, yyvsp[-1].a_constr, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002764 ;
2765 break;}
vlm4053ca52005-02-18 16:34:21 +00002766case 187:
vlm5e2c4b92005-03-20 11:12:40 +00002767#line 1515 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002768{
vlmfa67ddc2004-06-03 03:38:44 +00002769 yyval.a_constr = yyvsp[-1].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002770 ;
2771 break;}
vlm4053ca52005-02-18 16:34:21 +00002772case 188:
vlm5e2c4b92005-03-20 11:12:40 +00002773#line 1518 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002774{
vlm9283dbe2004-08-18 04:59:12 +00002775 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_SET, yyvsp[-3].a_constr, yyvsp[-1].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002776 ;
2777 break;}
vlm4053ca52005-02-18 16:34:21 +00002778case 189:
vlm5e2c4b92005-03-20 11:12:40 +00002779#line 1524 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002780{
vlmfa67ddc2004-06-03 03:38:44 +00002781 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002782 ;
2783 break;}
vlm4053ca52005-02-18 16:34:21 +00002784case 190:
vlm5e2c4b92005-03-20 11:12:40 +00002785#line 1527 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002786{
vlmfa67ddc2004-06-03 03:38:44 +00002787 asn1p_constraint_t *ct;
2788 ct = asn1p_constraint_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00002789 ct->type = ACT_EL_EXT;
2790 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-2].a_constr, ct);
vlm6a02a8a2004-09-08 00:28:11 +00002791 ;
2792 break;}
vlm4053ca52005-02-18 16:34:21 +00002793case 191:
vlm5e2c4b92005-03-20 11:12:40 +00002794#line 1533 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002795{
vlmfa67ddc2004-06-03 03:38:44 +00002796 asn1p_constraint_t *ct;
2797 ct = asn1p_constraint_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00002798 ct->type = ACT_EL_EXT;
2799 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-4].a_constr, ct);
vlm6f5eb0b2004-08-13 12:35:09 +00002800 ct = yyval.a_constr;
2801 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, ct, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002802 ;
2803 break;}
vlm4053ca52005-02-18 16:34:21 +00002804case 192:
vlm5e2c4b92005-03-20 11:12:40 +00002805#line 1544 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002806{
vlm9283dbe2004-08-18 04:59:12 +00002807 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002808 ;
2809 break;}
vlm4053ca52005-02-18 16:34:21 +00002810case 193:
vlm5e2c4b92005-03-20 11:12:40 +00002811#line 1547 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002812{
vlmfa67ddc2004-06-03 03:38:44 +00002813 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_UNI, yyvsp[-2].a_constr, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002814 ;
2815 break;}
vlm4053ca52005-02-18 16:34:21 +00002816case 194:
vlm5e2c4b92005-03-20 11:12:40 +00002817#line 1550 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002818{
vlmfa67ddc2004-06-03 03:38:44 +00002819 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_INT, yyvsp[-2].a_constr, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002820 ;
2821 break;}
vlm4053ca52005-02-18 16:34:21 +00002822case 195:
vlm5e2c4b92005-03-20 11:12:40 +00002823#line 1553 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002824{
vlmfa67ddc2004-06-03 03:38:44 +00002825 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_EXC, yyvsp[-2].a_constr, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002826 ;
2827 break;}
vlm4053ca52005-02-18 16:34:21 +00002828case 196:
vlm5e2c4b92005-03-20 11:12:40 +00002829#line 1559 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002830{
vlmfa67ddc2004-06-03 03:38:44 +00002831 int ret;
2832 yyval.a_constr = asn1p_constraint_new(yylineno);
2833 checkmem(yyval.a_constr);
2834 yyval.a_constr->type = yyvsp[-3].a_ctype;
2835 ret = asn1p_constraint_insert(yyval.a_constr, yyvsp[-1].a_constr);
2836 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002837 ;
2838 break;}
vlm4053ca52005-02-18 16:34:21 +00002839case 197:
vlm5e2c4b92005-03-20 11:12:40 +00002840#line 1567 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002841{
vlm9283dbe2004-08-18 04:59:12 +00002842 int ret;
2843 yyval.a_constr = asn1p_constraint_new(yylineno);
2844 checkmem(yyval.a_constr);
2845 yyval.a_constr->type = ACT_CA_SET;
2846 ret = asn1p_constraint_insert(yyval.a_constr, yyvsp[-1].a_constr);
2847 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002848 ;
2849 break;}
vlm4053ca52005-02-18 16:34:21 +00002850case 198:
vlm5e2c4b92005-03-20 11:12:40 +00002851#line 1575 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002852{
vlm9283dbe2004-08-18 04:59:12 +00002853 yyval.a_constr = asn1p_constraint_new(yylineno);
2854 checkmem(yyval.a_constr);
2855 yyval.a_constr->type = ACT_EL_VALUE;
2856 yyval.a_constr->value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002857 ;
2858 break;}
vlm4053ca52005-02-18 16:34:21 +00002859case 199:
vlm5e2c4b92005-03-20 11:12:40 +00002860#line 1581 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002861{
vlm0aa86902004-10-12 23:26:53 +00002862 yyval.a_constr = asn1p_constraint_new(yylineno);
2863 checkmem(yyval.a_constr);
2864 yyval.a_constr->type = yyvsp[-1].a_ctype;
2865 yyval.a_constr->range_start = yyvsp[-2].a_value;
2866 yyval.a_constr->range_stop = yyvsp[0].a_value;
vlmc94e28f2004-09-15 11:59:51 +00002867 ;
2868 break;}
vlm0aa86902004-10-12 23:26:53 +00002869case 200:
vlm5e2c4b92005-03-20 11:12:40 +00002870#line 1588 "asn1p_y.y"
vlm4053ca52005-02-18 16:34:21 +00002871{
2872 yyval.a_constr = asn1p_constraint_new(yylineno);
2873 checkmem(yyval.a_constr);
2874 yyval.a_constr->type = yyvsp[-1].a_ctype;
2875 yyval.a_constr->range_start = asn1p_value_fromint(-123);
2876 yyval.a_constr->range_stop = yyvsp[0].a_value;
2877 yyval.a_constr->range_start->type = ATV_MIN;
2878 ;
2879 break;}
2880case 201:
vlm5e2c4b92005-03-20 11:12:40 +00002881#line 1596 "asn1p_y.y"
vlm0aa86902004-10-12 23:26:53 +00002882{
2883 yyval.a_constr = asn1p_constraint_new(yylineno);
2884 checkmem(yyval.a_constr);
2885 yyval.a_constr->type = yyvsp[-1].a_ctype;
2886 yyval.a_constr->range_start = yyvsp[-2].a_value;
2887 yyval.a_constr->range_stop = asn1p_value_fromint(321);
2888 yyval.a_constr->range_stop->type = ATV_MAX;
2889 ;
2890 break;}
vlm0aa86902004-10-12 23:26:53 +00002891case 202:
vlm5e2c4b92005-03-20 11:12:40 +00002892#line 1604 "asn1p_y.y"
vlm151c0b22004-09-22 16:03:36 +00002893{
vlm4053ca52005-02-18 16:34:21 +00002894 yyval.a_constr = asn1p_constraint_new(yylineno);
2895 checkmem(yyval.a_constr);
2896 yyval.a_constr->type = yyvsp[-1].a_ctype;
2897 yyval.a_constr->range_start = asn1p_value_fromint(-123);
2898 yyval.a_constr->range_stop = asn1p_value_fromint(321);
2899 yyval.a_constr->range_start->type = ATV_MIN;
2900 yyval.a_constr->range_stop->type = ATV_MAX;
vlm151c0b22004-09-22 16:03:36 +00002901 ;
2902 break;}
vlmc94e28f2004-09-15 11:59:51 +00002903case 203:
vlm5e2c4b92005-03-20 11:12:40 +00002904#line 1613 "asn1p_y.y"
vlm0aa86902004-10-12 23:26:53 +00002905{
2906 yyval.a_constr = yyvsp[0].a_constr;
2907 ;
vlmc94e28f2004-09-15 11:59:51 +00002908 break;}
2909case 204:
vlm5e2c4b92005-03-20 11:12:40 +00002910#line 1616 "asn1p_y.y"
vlm4053ca52005-02-18 16:34:21 +00002911{
2912 yyval.a_constr = yyvsp[0].a_constr;
2913 ;
vlm0aa86902004-10-12 23:26:53 +00002914 break;}
2915case 205:
vlm5e2c4b92005-03-20 11:12:40 +00002916#line 1622 "asn1p_y.y"
vlm4053ca52005-02-18 16:34:21 +00002917{ yyval.a_ctype = ACT_EL_RANGE; ;
vlm0aa86902004-10-12 23:26:53 +00002918 break;}
2919case 206:
vlm5e2c4b92005-03-20 11:12:40 +00002920#line 1623 "asn1p_y.y"
vlm4053ca52005-02-18 16:34:21 +00002921{ yyval.a_ctype = ACT_EL_RLRANGE; ;
vlm0aa86902004-10-12 23:26:53 +00002922 break;}
2923case 207:
vlm5e2c4b92005-03-20 11:12:40 +00002924#line 1624 "asn1p_y.y"
vlm4053ca52005-02-18 16:34:21 +00002925{ yyval.a_ctype = ACT_EL_LLRANGE; ;
vlm0aa86902004-10-12 23:26:53 +00002926 break;}
2927case 208:
vlm5e2c4b92005-03-20 11:12:40 +00002928#line 1625 "asn1p_y.y"
vlm4053ca52005-02-18 16:34:21 +00002929{ yyval.a_ctype = ACT_EL_ULRANGE; ;
2930 break;}
2931case 209:
vlm5e2c4b92005-03-20 11:12:40 +00002932#line 1629 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002933{
vlm39e5ed72004-09-05 10:40:41 +00002934 yyval.a_ctype = ACT_CT_SIZE;
vlm6a02a8a2004-09-08 00:28:11 +00002935 ;
2936 break;}
vlm4053ca52005-02-18 16:34:21 +00002937case 210:
vlm5e2c4b92005-03-20 11:12:40 +00002938#line 1632 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002939{
vlm39e5ed72004-09-05 10:40:41 +00002940 yyval.a_ctype = ACT_CT_FROM;
vlm6a02a8a2004-09-08 00:28:11 +00002941 ;
2942 break;}
vlm4053ca52005-02-18 16:34:21 +00002943case 211:
vlm5e2c4b92005-03-20 11:12:40 +00002944#line 1638 "asn1p_y.y"
vlm4053ca52005-02-18 16:34:21 +00002945{
2946 yyval.a_value = asn1p_value_fromint(0);
2947 checkmem(yyval.a_value);
2948 yyval.a_value->type = ATV_FALSE;
2949 ;
2950 break;}
2951case 212:
vlm5e2c4b92005-03-20 11:12:40 +00002952#line 1643 "asn1p_y.y"
vlm4053ca52005-02-18 16:34:21 +00002953{
2954 yyval.a_value = asn1p_value_fromint(1);
2955 checkmem(yyval.a_value);
2956 yyval.a_value->type = ATV_TRUE;
2957 ;
2958 break;}
2959case 213:
vlm5e2c4b92005-03-20 11:12:40 +00002960#line 1648 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002961{
vlmfa67ddc2004-06-03 03:38:44 +00002962 yyval.a_value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002963 ;
2964 break;}
vlm4053ca52005-02-18 16:34:21 +00002965case 214:
vlm5e2c4b92005-03-20 11:12:40 +00002966#line 1651 "asn1p_y.y"
vlm4053ca52005-02-18 16:34:21 +00002967{
2968 yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
2969 checkmem(yyval.a_value);
2970 ;
2971 break;}
2972case 215:
vlm5e2c4b92005-03-20 11:12:40 +00002973#line 1655 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002974{
vlmfa67ddc2004-06-03 03:38:44 +00002975 asn1p_ref_t *ref;
2976 int ret;
2977 ref = asn1p_ref_new(yylineno);
2978 checkmem(ref);
2979 ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
2980 checkmem(ret == 0);
2981 yyval.a_value = asn1p_value_fromref(ref, 0);
2982 checkmem(yyval.a_value);
2983 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002984 ;
2985 break;}
vlm4053ca52005-02-18 16:34:21 +00002986case 216:
vlm5e2c4b92005-03-20 11:12:40 +00002987#line 1666 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002988{
vlm4053ca52005-02-18 16:34:21 +00002989 asn1p_ref_t *ref;
2990 int ret;
2991 ref = asn1p_ref_new(yylineno);
2992 checkmem(ref);
2993 ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_UNKNOWN);
2994 checkmem(ret == 0);
2995 yyval.a_value = asn1p_value_fromref(ref, 0);
vlmfa67ddc2004-06-03 03:38:44 +00002996 checkmem(yyval.a_value);
vlm4053ca52005-02-18 16:34:21 +00002997 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002998 ;
2999 break;}
vlm4053ca52005-02-18 16:34:21 +00003000case 217:
vlm5e2c4b92005-03-20 11:12:40 +00003001#line 1680 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003002{
vlmfa67ddc2004-06-03 03:38:44 +00003003 CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_WCOMPS, yyvsp[-1].a_constr, 0);
vlm6a02a8a2004-09-08 00:28:11 +00003004 ;
3005 break;}
vlm4053ca52005-02-18 16:34:21 +00003006case 218:
vlm5e2c4b92005-03-20 11:12:40 +00003007#line 1686 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003008{
vlmfa67ddc2004-06-03 03:38:44 +00003009 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00003010 ;
3011 break;}
vlm4053ca52005-02-18 16:34:21 +00003012case 219:
vlm5e2c4b92005-03-20 11:12:40 +00003013#line 1689 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003014{
vlmfa67ddc2004-06-03 03:38:44 +00003015 CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_WCOMPS, yyvsp[-2].a_constr, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00003016 ;
3017 break;}
vlm4053ca52005-02-18 16:34:21 +00003018case 220:
vlm5e2c4b92005-03-20 11:12:40 +00003019#line 1695 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003020{
vlmfa67ddc2004-06-03 03:38:44 +00003021 yyval.a_constr = asn1p_constraint_new(yylineno);
3022 checkmem(yyval.a_constr);
3023 yyval.a_constr->type = ACT_EL_EXT;
vlm6a02a8a2004-09-08 00:28:11 +00003024 ;
3025 break;}
vlm4053ca52005-02-18 16:34:21 +00003026case 221:
vlm5e2c4b92005-03-20 11:12:40 +00003027#line 1700 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003028{
vlmfa67ddc2004-06-03 03:38:44 +00003029 yyval.a_constr = asn1p_constraint_new(yylineno);
3030 checkmem(yyval.a_constr);
3031 yyval.a_constr->type = ACT_EL_VALUE;
3032 yyval.a_constr->value = asn1p_value_frombuf(yyvsp[-2].tv_str, strlen(yyvsp[-2].tv_str), 0);
3033 yyval.a_constr->presence = yyvsp[0].a_pres;
vlm6a02a8a2004-09-08 00:28:11 +00003034 ;
3035 break;}
vlm4053ca52005-02-18 16:34:21 +00003036case 222:
vlm5e2c4b92005-03-20 11:12:40 +00003037#line 1713 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003038{ yyval.a_pres = ACPRES_DEFAULT; ;
3039 break;}
vlm4053ca52005-02-18 16:34:21 +00003040case 223:
vlm5e2c4b92005-03-20 11:12:40 +00003041#line 1714 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003042{ yyval.a_pres = yyvsp[0].a_pres; ;
3043 break;}
vlm4053ca52005-02-18 16:34:21 +00003044case 224:
vlm5e2c4b92005-03-20 11:12:40 +00003045#line 1718 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003046{
vlmfa67ddc2004-06-03 03:38:44 +00003047 yyval.a_pres = ACPRES_PRESENT;
vlm6a02a8a2004-09-08 00:28:11 +00003048 ;
3049 break;}
vlm4053ca52005-02-18 16:34:21 +00003050case 225:
vlm5e2c4b92005-03-20 11:12:40 +00003051#line 1721 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003052{
vlmfa67ddc2004-06-03 03:38:44 +00003053 yyval.a_pres = ACPRES_ABSENT;
vlm6a02a8a2004-09-08 00:28:11 +00003054 ;
3055 break;}
vlm4053ca52005-02-18 16:34:21 +00003056case 226:
vlm5e2c4b92005-03-20 11:12:40 +00003057#line 1724 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003058{
vlmfa67ddc2004-06-03 03:38:44 +00003059 yyval.a_pres = ACPRES_OPTIONAL;
vlm6a02a8a2004-09-08 00:28:11 +00003060 ;
3061 break;}
vlm0aa86902004-10-12 23:26:53 +00003062case 227:
vlm5e2c4b92005-03-20 11:12:40 +00003063#line 1730 "asn1p_y.y"
vlm4053ca52005-02-18 16:34:21 +00003064{
3065 yyval.a_constr = yyvsp[0].a_constr;
3066 ;
3067 break;}
3068case 228:
vlm5e2c4b92005-03-20 11:12:40 +00003069#line 1733 "asn1p_y.y"
vlm4053ca52005-02-18 16:34:21 +00003070{
3071 yyval.a_constr = yyvsp[0].a_constr;
3072 ;
3073 break;}
3074case 229:
vlm5e2c4b92005-03-20 11:12:40 +00003075#line 1742 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003076{
vlmfa67ddc2004-06-03 03:38:44 +00003077 asn1p_ref_t *ref = asn1p_ref_new(yylineno);
3078 asn1p_constraint_t *ct;
3079 int ret;
3080 ret = asn1p_ref_add_component(ref, yyvsp[-1].tv_str, 0);
3081 checkmem(ret == 0);
3082 ct = asn1p_constraint_new(yylineno);
3083 checkmem(yyval.a_constr);
3084 ct->type = ACT_EL_VALUE;
3085 ct->value = asn1p_value_fromref(ref, 0);
3086 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CRC, ct, 0);
vlm6a02a8a2004-09-08 00:28:11 +00003087 ;
3088 break;}
vlm4053ca52005-02-18 16:34:21 +00003089case 230:
vlm5e2c4b92005-03-20 11:12:40 +00003090#line 1757 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003091{
vlmfa67ddc2004-06-03 03:38:44 +00003092 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CRC, yyvsp[-3].a_constr, yyvsp[-1].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00003093 ;
3094 break;}
vlm4053ca52005-02-18 16:34:21 +00003095case 231:
vlm5e2c4b92005-03-20 11:12:40 +00003096#line 1763 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003097{
vlmfa67ddc2004-06-03 03:38:44 +00003098 yyval.a_constr = asn1p_constraint_new(yylineno);
3099 checkmem(yyval.a_constr);
3100 yyval.a_constr->type = ACT_EL_VALUE;
3101 yyval.a_constr->value = asn1p_value_fromref(yyvsp[0].a_ref, 0);
vlm6a02a8a2004-09-08 00:28:11 +00003102 ;
3103 break;}
vlm4053ca52005-02-18 16:34:21 +00003104case 232:
vlm5e2c4b92005-03-20 11:12:40 +00003105#line 1769 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003106{
vlmfa67ddc2004-06-03 03:38:44 +00003107 asn1p_constraint_t *ct;
3108 ct = asn1p_constraint_new(yylineno);
3109 checkmem(ct);
3110 ct->type = ACT_EL_VALUE;
3111 ct->value = asn1p_value_fromref(yyvsp[0].a_ref, 0);
3112 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-2].a_constr, ct);
vlm6a02a8a2004-09-08 00:28:11 +00003113 ;
3114 break;}
vlm4053ca52005-02-18 16:34:21 +00003115case 233:
vlm5e2c4b92005-03-20 11:12:40 +00003116#line 1783 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003117{
vlmfa67ddc2004-06-03 03:38:44 +00003118 char *p = malloc(strlen(yyvsp[0].tv_str) + 2);
3119 int ret;
3120 *p = '@';
3121 strcpy(p + 1, yyvsp[0].tv_str);
3122 yyval.a_ref = asn1p_ref_new(yylineno);
3123 ret = asn1p_ref_add_component(yyval.a_ref, p, 0);
3124 checkmem(ret == 0);
3125 free(p);
3126 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00003127 ;
3128 break;}
vlm4053ca52005-02-18 16:34:21 +00003129case 234:
vlm5e2c4b92005-03-20 11:12:40 +00003130#line 1794 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003131{
vlmfa67ddc2004-06-03 03:38:44 +00003132 char *p = malloc(strlen(yyvsp[0].tv_str) + 3);
3133 int ret;
3134 p[0] = '@';
3135 p[1] = '.';
3136 strcpy(p + 2, yyvsp[0].tv_str);
3137 yyval.a_ref = asn1p_ref_new(yylineno);
3138 ret = asn1p_ref_add_component(yyval.a_ref, p, 0);
3139 checkmem(ret == 0);
3140 free(p);
3141 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00003142 ;
3143 break;}
vlm4053ca52005-02-18 16:34:21 +00003144case 235:
vlm5e2c4b92005-03-20 11:12:40 +00003145#line 1810 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003146{
vlmfa67ddc2004-06-03 03:38:44 +00003147 yyval.tv_str = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003148 ;
3149 break;}
vlm4053ca52005-02-18 16:34:21 +00003150case 236:
vlm5e2c4b92005-03-20 11:12:40 +00003151#line 1813 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003152{
vlmfa67ddc2004-06-03 03:38:44 +00003153 int l1 = strlen(yyvsp[-2].tv_str);
3154 int l3 = strlen(yyvsp[0].tv_str);
3155 yyval.tv_str = malloc(l1 + 1 + l3 + 1);
3156 memcpy(yyval.tv_str, yyvsp[-2].tv_str, l1);
3157 yyval.tv_str[l1] = '.';
3158 memcpy(yyval.tv_str + l1 + 1, yyvsp[0].tv_str, l3);
3159 yyval.tv_str[l1 + 1 + l3] = '\0';
vlm6a02a8a2004-09-08 00:28:11 +00003160 ;
3161 break;}
vlm4053ca52005-02-18 16:34:21 +00003162case 237:
vlm5e2c4b92005-03-20 11:12:40 +00003163#line 1831 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003164{
vlmc94e28f2004-09-15 11:59:51 +00003165 yyval.a_marker.flags = EM_NOMARK;
3166 yyval.a_marker.default_value = 0;
vlm6a02a8a2004-09-08 00:28:11 +00003167 ;
3168 break;}
vlm4053ca52005-02-18 16:34:21 +00003169case 238:
vlm5e2c4b92005-03-20 11:12:40 +00003170#line 1835 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00003171{ yyval.a_marker = yyvsp[0].a_marker; ;
vlma2374a02004-09-14 02:44:07 +00003172 break;}
vlm4053ca52005-02-18 16:34:21 +00003173case 239:
vlm5e2c4b92005-03-20 11:12:40 +00003174#line 1839 "asn1p_y.y"
vlma2374a02004-09-14 02:44:07 +00003175{
vlmc94e28f2004-09-15 11:59:51 +00003176 yyval.a_marker.flags = EM_OPTIONAL;
3177 yyval.a_marker.default_value = 0;
vlma2374a02004-09-14 02:44:07 +00003178 ;
3179 break;}
vlm4053ca52005-02-18 16:34:21 +00003180case 240:
vlm5e2c4b92005-03-20 11:12:40 +00003181#line 1843 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00003182{
3183 yyval.a_marker.flags = EM_DEFAULT;
3184 yyval.a_marker.default_value = yyvsp[0].a_value;
3185 ;
3186 break;}
vlm4053ca52005-02-18 16:34:21 +00003187case 241:
vlm5e2c4b92005-03-20 11:12:40 +00003188#line 1866 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003189{
vlm39e5ed72004-09-05 10:40:41 +00003190 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003191 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00003192 ;
3193 break;}
vlm4053ca52005-02-18 16:34:21 +00003194case 242:
vlm5e2c4b92005-03-20 11:12:40 +00003195#line 1870 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003196{
vlmfa67ddc2004-06-03 03:38:44 +00003197 yyval.a_expr = yyvsp[-1].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00003198 ;
3199 break;}
vlm4053ca52005-02-18 16:34:21 +00003200case 243:
vlm5e2c4b92005-03-20 11:12:40 +00003201#line 1876 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003202{
vlm39e5ed72004-09-05 10:40:41 +00003203 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003204 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00003205 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
3206 ;
3207 break;}
vlm4053ca52005-02-18 16:34:21 +00003208case 244:
vlm5e2c4b92005-03-20 11:12:40 +00003209#line 1881 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003210{
vlmfa67ddc2004-06-03 03:38:44 +00003211 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00003212 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
3213 ;
3214 break;}
vlm4053ca52005-02-18 16:34:21 +00003215case 245:
vlm5e2c4b92005-03-20 11:12:40 +00003216#line 1888 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003217{
vlm39e5ed72004-09-05 10:40:41 +00003218 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003219 checkmem(yyval.a_expr);
3220 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3221 yyval.a_expr->meta_type = AMT_VALUE;
3222 yyval.a_expr->Identifier = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003223 ;
3224 break;}
vlm0aa86902004-10-12 23:26:53 +00003225case 246:
vlm5e2c4b92005-03-20 11:12:40 +00003226#line 1895 "asn1p_y.y"
vlm4053ca52005-02-18 16:34:21 +00003227{
3228 yyval.a_expr = asn1p_expr_new(yylineno);
3229 checkmem(yyval.a_expr);
3230 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3231 yyval.a_expr->meta_type = AMT_VALUE;
3232 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
3233 yyval.a_expr->value = yyvsp[-1].a_value;
3234 ;
3235 break;}
3236case 247:
vlm5e2c4b92005-03-20 11:12:40 +00003237#line 1903 "asn1p_y.y"
vlm4053ca52005-02-18 16:34:21 +00003238{
3239 yyval.a_expr = asn1p_expr_new(yylineno);
3240 checkmem(yyval.a_expr);
3241 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3242 yyval.a_expr->meta_type = AMT_VALUE;
3243 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
3244 yyval.a_expr->value = yyvsp[-1].a_value;
3245 ;
3246 break;}
3247case 248:
vlm5e2c4b92005-03-20 11:12:40 +00003248#line 1911 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003249{
vlm39e5ed72004-09-05 10:40:41 +00003250 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003251 checkmem(yyval.a_expr);
3252 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3253 yyval.a_expr->meta_type = AMT_VALUE;
3254 yyval.a_expr->value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00003255 ;
3256 break;}
vlm4053ca52005-02-18 16:34:21 +00003257case 249:
vlm5e2c4b92005-03-20 11:12:40 +00003258#line 1918 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003259{
vlm39e5ed72004-09-05 10:40:41 +00003260 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003261 checkmem(yyval.a_expr);
3262 yyval.a_expr->Identifier = strdup("...");
3263 checkmem(yyval.a_expr->Identifier);
3264 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
3265 yyval.a_expr->meta_type = AMT_VALUE;
vlm6a02a8a2004-09-08 00:28:11 +00003266 ;
3267 break;}
vlm0aa86902004-10-12 23:26:53 +00003268case 250:
vlm5e2c4b92005-03-20 11:12:40 +00003269#line 1929 "asn1p_y.y"
vlm4053ca52005-02-18 16:34:21 +00003270{
3271 yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int);
3272 checkmem(yyval.a_value);
3273 ;
vlm6a02a8a2004-09-08 00:28:11 +00003274 break;}
vlm0aa86902004-10-12 23:26:53 +00003275case 251:
vlm5e2c4b92005-03-20 11:12:40 +00003276#line 1933 "asn1p_y.y"
vlm4053ca52005-02-18 16:34:21 +00003277{
3278 yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int);
3279 checkmem(yyval.a_value);
3280 ;
vlmc94e28f2004-09-15 11:59:51 +00003281 break;}
vlm0aa86902004-10-12 23:26:53 +00003282case 252:
vlm5e2c4b92005-03-20 11:12:40 +00003283#line 1964 "asn1p_y.y"
vlm4053ca52005-02-18 16:34:21 +00003284{ memset(&yyval.a_tag, 0, sizeof(yyval.a_tag)); ;
3285 break;}
3286case 253:
vlm5e2c4b92005-03-20 11:12:40 +00003287#line 1965 "asn1p_y.y"
vlm4053ca52005-02-18 16:34:21 +00003288{ yyval.a_tag = yyvsp[0].a_tag; ;
3289 break;}
3290case 254:
vlm5e2c4b92005-03-20 11:12:40 +00003291#line 1969 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003292{
vlm2728a8d2005-01-23 09:51:44 +00003293 yyval.a_tag = yyvsp[-1].a_tag;
3294 yyval.a_tag.tag_mode = yyvsp[0].a_tag.tag_mode;
vlm6a02a8a2004-09-08 00:28:11 +00003295 ;
3296 break;}
vlm4053ca52005-02-18 16:34:21 +00003297case 255:
vlm5e2c4b92005-03-20 11:12:40 +00003298#line 1976 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003299{
vlm2728a8d2005-01-23 09:51:44 +00003300 yyval.a_tag = yyvsp[-2].a_tag;
3301 yyval.a_tag.tag_value = yyvsp[-1].a_int;
vlm6a02a8a2004-09-08 00:28:11 +00003302 ;
3303 break;}
vlm4053ca52005-02-18 16:34:21 +00003304case 256:
vlm5e2c4b92005-03-20 11:12:40 +00003305#line 1982 "asn1p_y.y"
vlm2728a8d2005-01-23 09:51:44 +00003306{ yyval.a_tag.tag_class = TC_CONTEXT_SPECIFIC; ;
vlm6a02a8a2004-09-08 00:28:11 +00003307 break;}
vlm4053ca52005-02-18 16:34:21 +00003308case 257:
vlm5e2c4b92005-03-20 11:12:40 +00003309#line 1983 "asn1p_y.y"
vlm2728a8d2005-01-23 09:51:44 +00003310{ yyval.a_tag.tag_class = TC_UNIVERSAL; ;
vlm151c0b22004-09-22 16:03:36 +00003311 break;}
vlm4053ca52005-02-18 16:34:21 +00003312case 258:
vlm5e2c4b92005-03-20 11:12:40 +00003313#line 1984 "asn1p_y.y"
vlm2728a8d2005-01-23 09:51:44 +00003314{ yyval.a_tag.tag_class = TC_APPLICATION; ;
vlm0aa86902004-10-12 23:26:53 +00003315 break;}
vlm4053ca52005-02-18 16:34:21 +00003316case 259:
vlm5e2c4b92005-03-20 11:12:40 +00003317#line 1985 "asn1p_y.y"
vlm2728a8d2005-01-23 09:51:44 +00003318{ yyval.a_tag.tag_class = TC_PRIVATE; ;
3319 break;}
vlm4053ca52005-02-18 16:34:21 +00003320case 260:
vlm5e2c4b92005-03-20 11:12:40 +00003321#line 1989 "asn1p_y.y"
vlm2728a8d2005-01-23 09:51:44 +00003322{ yyval.a_tag.tag_mode = TM_DEFAULT; ;
3323 break;}
vlm4053ca52005-02-18 16:34:21 +00003324case 261:
vlm5e2c4b92005-03-20 11:12:40 +00003325#line 1990 "asn1p_y.y"
vlm2728a8d2005-01-23 09:51:44 +00003326{ yyval.a_tag.tag_mode = TM_IMPLICIT; ;
3327 break;}
vlm4053ca52005-02-18 16:34:21 +00003328case 262:
vlm5e2c4b92005-03-20 11:12:40 +00003329#line 1991 "asn1p_y.y"
vlm2728a8d2005-01-23 09:51:44 +00003330{ yyval.a_tag.tag_mode = TM_EXPLICIT; ;
3331 break;}
vlm2728a8d2005-01-23 09:51:44 +00003332case 263:
vlm5e2c4b92005-03-20 11:12:40 +00003333#line 1995 "asn1p_y.y"
vlm2728a8d2005-01-23 09:51:44 +00003334{
3335 checkmem(yyvsp[0].tv_str);
3336 yyval.tv_str = yyvsp[0].tv_str;
3337 ;
3338 break;}
3339case 264:
vlm5e2c4b92005-03-20 11:12:40 +00003340#line 1999 "asn1p_y.y"
vlm4053ca52005-02-18 16:34:21 +00003341{
3342 checkmem(yyvsp[0].tv_str);
3343 yyval.tv_str = yyvsp[0].tv_str;
3344 ;
vlm0aa86902004-10-12 23:26:53 +00003345 break;}
vlm2728a8d2005-01-23 09:51:44 +00003346case 265:
vlm5e2c4b92005-03-20 11:12:40 +00003347#line 2007 "asn1p_y.y"
vlm0aa86902004-10-12 23:26:53 +00003348{
vlm4053ca52005-02-18 16:34:21 +00003349 checkmem(yyvsp[0].tv_str);
vlm0aa86902004-10-12 23:26:53 +00003350 yyval.tv_str = yyvsp[0].tv_str;
3351 ;
3352 break;}
vlm2728a8d2005-01-23 09:51:44 +00003353case 266:
vlm5e2c4b92005-03-20 11:12:40 +00003354#line 2014 "asn1p_y.y"
vlm4053ca52005-02-18 16:34:21 +00003355{ yyval.tv_str = 0; ;
3356 break;}
3357case 267:
vlm5e2c4b92005-03-20 11:12:40 +00003358#line 2015 "asn1p_y.y"
vlm4053ca52005-02-18 16:34:21 +00003359{
3360 yyval.tv_str = yyvsp[0].tv_str;
3361 ;
3362 break;}
3363case 268:
vlm5e2c4b92005-03-20 11:12:40 +00003364#line 2020 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003365{
vlm39e5ed72004-09-05 10:40:41 +00003366 checkmem(yyvsp[0].tv_str);
3367 yyval.tv_str = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003368 ;
3369 break;}
vlm6a02a8a2004-09-08 00:28:11 +00003370}
3371 /* the action file gets copied in in place of this dollarsign */
3372#line 543 "/usr/share/bison.simple"
vlmfa67ddc2004-06-03 03:38:44 +00003373
3374 yyvsp -= yylen;
3375 yyssp -= yylen;
vlm6a02a8a2004-09-08 00:28:11 +00003376#ifdef YYLSP_NEEDED
3377 yylsp -= yylen;
3378#endif
vlmfa67ddc2004-06-03 03:38:44 +00003379
vlm6a02a8a2004-09-08 00:28:11 +00003380#if YYDEBUG != 0
vlmfa67ddc2004-06-03 03:38:44 +00003381 if (yydebug)
3382 {
vlm6a02a8a2004-09-08 00:28:11 +00003383 short *ssp1 = yyss - 1;
3384 fprintf (stderr, "state stack now");
3385 while (ssp1 != yyssp)
3386 fprintf (stderr, " %d", *++ssp1);
3387 fprintf (stderr, "\n");
vlmfa67ddc2004-06-03 03:38:44 +00003388 }
3389#endif
3390
3391 *++yyvsp = yyval;
3392
vlm6a02a8a2004-09-08 00:28:11 +00003393#ifdef YYLSP_NEEDED
3394 yylsp++;
3395 if (yylen == 0)
3396 {
3397 yylsp->first_line = yylloc.first_line;
3398 yylsp->first_column = yylloc.first_column;
3399 yylsp->last_line = (yylsp-1)->last_line;
3400 yylsp->last_column = (yylsp-1)->last_column;
3401 yylsp->text = 0;
3402 }
3403 else
3404 {
3405 yylsp->last_line = (yylsp+yylen-1)->last_line;
3406 yylsp->last_column = (yylsp+yylen-1)->last_column;
3407 }
3408#endif
vlmfa67ddc2004-06-03 03:38:44 +00003409
vlm6a02a8a2004-09-08 00:28:11 +00003410 /* Now "shift" the result of the reduction.
3411 Determine what state that goes to,
3412 based on the state we popped back to
3413 and the rule number reduced by. */
vlmfa67ddc2004-06-03 03:38:44 +00003414
3415 yyn = yyr1[yyn];
3416
vlm6a02a8a2004-09-08 00:28:11 +00003417 yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
3418 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
vlmfa67ddc2004-06-03 03:38:44 +00003419 yystate = yytable[yystate];
3420 else
vlm6a02a8a2004-09-08 00:28:11 +00003421 yystate = yydefgoto[yyn - YYNTBASE];
vlmfa67ddc2004-06-03 03:38:44 +00003422
3423 goto yynewstate;
3424
vlm6a02a8a2004-09-08 00:28:11 +00003425yyerrlab: /* here on detecting error */
vlmfa67ddc2004-06-03 03:38:44 +00003426
vlm6a02a8a2004-09-08 00:28:11 +00003427 if (! yyerrstatus)
3428 /* If not already recovering from an error, report this error. */
vlmfa67ddc2004-06-03 03:38:44 +00003429 {
3430 ++yynerrs;
vlm6a02a8a2004-09-08 00:28:11 +00003431
3432#ifdef YYERROR_VERBOSE
vlmfa67ddc2004-06-03 03:38:44 +00003433 yyn = yypact[yystate];
3434
vlm6a02a8a2004-09-08 00:28:11 +00003435 if (yyn > YYFLAG && yyn < YYLAST)
vlmfa67ddc2004-06-03 03:38:44 +00003436 {
vlm6a02a8a2004-09-08 00:28:11 +00003437 int size = 0;
3438 char *msg;
3439 int x, count;
vlmfa67ddc2004-06-03 03:38:44 +00003440
vlm6a02a8a2004-09-08 00:28:11 +00003441 count = 0;
3442 /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
3443 for (x = (yyn < 0 ? -yyn : 0);
3444 x < (ssize_t)(sizeof(yytname) / sizeof(char *)); x++)
3445 if (yycheck[x + yyn] == x)
3446 size += strlen(yytname[x]) + 15, count++;
3447 msg = (char *) malloc(size + 15);
3448 if (msg != 0)
vlmfa67ddc2004-06-03 03:38:44 +00003449 {
vlm6a02a8a2004-09-08 00:28:11 +00003450 strcpy(msg, "parse error");
vlmfa67ddc2004-06-03 03:38:44 +00003451
vlm6a02a8a2004-09-08 00:28:11 +00003452 if (count < 5)
vlmfa67ddc2004-06-03 03:38:44 +00003453 {
vlm6a02a8a2004-09-08 00:28:11 +00003454 count = 0;
3455 for (x = (yyn < 0 ? -yyn : 0);
3456 x < (ssize_t)(sizeof(yytname) / sizeof(char *)); x++)
3457 if (yycheck[x + yyn] == x)
vlmfa67ddc2004-06-03 03:38:44 +00003458 {
vlm6a02a8a2004-09-08 00:28:11 +00003459 strcat(msg, count == 0 ? ", expecting `" : " or `");
3460 strcat(msg, yytname[x]);
3461 strcat(msg, "'");
3462 count++;
vlmfa67ddc2004-06-03 03:38:44 +00003463 }
3464 }
vlm6a02a8a2004-09-08 00:28:11 +00003465 yyerror(msg);
3466 free(msg);
vlmfa67ddc2004-06-03 03:38:44 +00003467 }
3468 else
vlm6a02a8a2004-09-08 00:28:11 +00003469 yyerror ("parse error; also virtual memory exceeded");
vlmfa67ddc2004-06-03 03:38:44 +00003470 }
3471 else
3472#endif /* YYERROR_VERBOSE */
vlm6a02a8a2004-09-08 00:28:11 +00003473 yyerror("parse error");
vlmfa67ddc2004-06-03 03:38:44 +00003474 }
vlm6a02a8a2004-09-08 00:28:11 +00003475
vlmfa67ddc2004-06-03 03:38:44 +00003476 goto yyerrlab1;
vlm6a02a8a2004-09-08 00:28:11 +00003477yyerrlab1: /* here on error raised explicitly by an action */
vlmfa67ddc2004-06-03 03:38:44 +00003478
3479 if (yyerrstatus == 3)
3480 {
vlm6a02a8a2004-09-08 00:28:11 +00003481 /* if just tried and failed to reuse lookahead token after an error, discard it. */
vlmfa67ddc2004-06-03 03:38:44 +00003482
vlm6a02a8a2004-09-08 00:28:11 +00003483 /* return failure if at end of input */
vlmfa67ddc2004-06-03 03:38:44 +00003484 if (yychar == YYEOF)
vlm6a02a8a2004-09-08 00:28:11 +00003485 YYABORT;
vlmfa67ddc2004-06-03 03:38:44 +00003486
vlm6a02a8a2004-09-08 00:28:11 +00003487#if YYDEBUG != 0
3488 if (yydebug)
3489 fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
3490#endif
3491
vlmfa67ddc2004-06-03 03:38:44 +00003492 yychar = YYEMPTY;
3493 }
3494
vlm6a02a8a2004-09-08 00:28:11 +00003495 /* Else will try to reuse lookahead token
3496 after shifting the error token. */
vlmfa67ddc2004-06-03 03:38:44 +00003497
vlm6a02a8a2004-09-08 00:28:11 +00003498 yyerrstatus = 3; /* Each real token shifted decrements this */
vlmfa67ddc2004-06-03 03:38:44 +00003499
vlm6a02a8a2004-09-08 00:28:11 +00003500 goto yyerrhandle;
vlm80103492004-09-07 10:39:09 +00003501
vlm6a02a8a2004-09-08 00:28:11 +00003502yyerrdefault: /* current state does not do anything special for the error token. */
vlm80103492004-09-07 10:39:09 +00003503
vlm6a02a8a2004-09-08 00:28:11 +00003504#if 0
3505 /* This is wrong; only states that explicitly want error tokens
3506 should shift them. */
3507 yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
3508 if (yyn) goto yydefault;
vlm39e5ed72004-09-05 10:40:41 +00003509#endif
vlm6a02a8a2004-09-08 00:28:11 +00003510
3511yyerrpop: /* pop the current state because it cannot handle the error token */
3512
3513 if (yyssp == yyss) YYABORT;
3514 yyvsp--;
3515 yystate = *--yyssp;
3516#ifdef YYLSP_NEEDED
3517 yylsp--;
3518#endif
3519
3520#if YYDEBUG != 0
3521 if (yydebug)
3522 {
3523 short *ssp1 = yyss - 1;
3524 fprintf (stderr, "Error: state stack now");
3525 while (ssp1 != yyssp)
3526 fprintf (stderr, " %d", *++ssp1);
3527 fprintf (stderr, "\n");
vlm39e5ed72004-09-05 10:40:41 +00003528 }
vlm6a02a8a2004-09-08 00:28:11 +00003529#endif
3530
3531yyerrhandle:
3532
3533 yyn = yypact[yystate];
3534 if (yyn == YYFLAG)
3535 goto yyerrdefault;
3536
3537 yyn += YYTERROR;
3538 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
3539 goto yyerrdefault;
3540
3541 yyn = yytable[yyn];
3542 if (yyn < 0)
3543 {
3544 if (yyn == YYFLAG)
3545 goto yyerrpop;
3546 yyn = -yyn;
3547 goto yyreduce;
3548 }
3549 else if (yyn == 0)
3550 goto yyerrpop;
vlmfa67ddc2004-06-03 03:38:44 +00003551
3552 if (yyn == YYFINAL)
3553 YYACCEPT;
3554
vlm6a02a8a2004-09-08 00:28:11 +00003555#if YYDEBUG != 0
3556 if (yydebug)
3557 fprintf(stderr, "Shifting error token, ");
3558#endif
vlmfa67ddc2004-06-03 03:38:44 +00003559
3560 *++yyvsp = yylval;
vlm6a02a8a2004-09-08 00:28:11 +00003561#ifdef YYLSP_NEEDED
3562 *++yylsp = yylloc;
3563#endif
vlmfa67ddc2004-06-03 03:38:44 +00003564
3565 yystate = yyn;
3566 goto yynewstate;
3567
vlm6a02a8a2004-09-08 00:28:11 +00003568 yyacceptlab:
3569 /* YYACCEPT comes here. */
3570 if (yyfree_stacks)
3571 {
3572 free (yyss);
3573 free (yyvs);
3574#ifdef YYLSP_NEEDED
3575 free (yyls);
vlm044f7442004-09-04 04:49:21 +00003576#endif
vlm6a02a8a2004-09-08 00:28:11 +00003577 }
3578 return 0;
vlm80103492004-09-07 10:39:09 +00003579
vlm6a02a8a2004-09-08 00:28:11 +00003580 yyabortlab:
3581 /* YYABORT comes here. */
3582 if (yyfree_stacks)
3583 {
3584 free (yyss);
3585 free (yyvs);
3586#ifdef YYLSP_NEEDED
3587 free (yyls);
vlm80103492004-09-07 10:39:09 +00003588#endif
vlm6a02a8a2004-09-08 00:28:11 +00003589 }
3590 return 1;
vlmfa67ddc2004-06-03 03:38:44 +00003591}
vlm5e2c4b92005-03-20 11:12:40 +00003592#line 2026 "asn1p_y.y"
vlmfa67ddc2004-06-03 03:38:44 +00003593
3594
3595
3596/*
3597 * Convert Xstring ('0101'B or '5'H) to the binary vector.
3598 */
3599static asn1p_value_t *
3600_convert_bitstring2binary(char *str, int base) {
3601 asn1p_value_t *val;
3602 int slen;
3603 int memlen;
3604 int baselen;
3605 int bits;
3606 uint8_t *binary_vector;
3607 uint8_t *bv_ptr;
3608 uint8_t cur_val;
3609
3610 assert(str);
3611 assert(str[0] == '\'');
3612
3613 switch(base) {
3614 case 'B':
3615 baselen = 1;
3616 break;
3617 case 'H':
3618 baselen = 4;
3619 break;
3620 default:
3621 assert(base == 'B' || base == 'H');
3622 errno = EINVAL;
3623 return NULL;
3624 }
3625
3626 slen = strlen(str);
3627 assert(str[slen - 1] == base);
3628 assert(str[slen - 2] == '\'');
3629
3630 memlen = slen / (8 / baselen); /* Conservative estimate */
3631
3632 bv_ptr = binary_vector = malloc(memlen + 1);
3633 if(bv_ptr == NULL)
3634 /* ENOMEM */
3635 return NULL;
3636
3637 cur_val = 0;
3638 bits = 0;
3639 while(*(++str) != '\'') {
3640 switch(baselen) {
3641 case 1:
3642 switch(*str) {
3643 case '1':
3644 cur_val |= 1 << (7 - (bits % 8));
3645 case '0':
3646 break;
3647 default:
3648 assert(!"_y UNREACH1");
3649 case ' ': case '\r': case '\n':
3650 continue;
3651 }
3652 break;
3653 case 4:
3654 switch(*str) {
3655 case '0': case '1': case '2': case '3': case '4':
3656 case '5': case '6': case '7': case '8': case '9':
3657 cur_val |= (*str - '0') << (4 - (bits % 8));
3658 break;
3659 case 'A': case 'B': case 'C':
3660 case 'D': case 'E': case 'F':
3661 cur_val |= ((*str - 'A') + 10)
3662 << (4 - (bits % 8));
3663 break;
3664 default:
3665 assert(!"_y UNREACH2");
3666 case ' ': case '\r': case '\n':
3667 continue;
3668 }
3669 break;
3670 }
3671
3672 bits += baselen;
3673 if((bits % 8) == 0) {
3674 *bv_ptr++ = cur_val;
3675 cur_val = 0;
3676 }
3677 }
3678
3679 *bv_ptr = cur_val;
3680 assert((bv_ptr - binary_vector) <= memlen);
3681
3682 val = asn1p_value_frombits(binary_vector, bits, 0);
3683 if(val == NULL) {
3684 free(binary_vector);
3685 }
3686
3687 return val;
3688}
3689
3690extern char *asn1p_text;
3691
3692int
3693yyerror(const char *msg) {
3694 fprintf(stderr,
3695 "ASN.1 grammar parse error "
3696 "near line %d (token \"%s\"): %s\n",
vlm39e5ed72004-09-05 10:40:41 +00003697 yylineno, asn1p_text, msg);
vlmfa67ddc2004-06-03 03:38:44 +00003698 return -1;
3699}
3700
3701