blob: 9656f17316e06dc82096f1fad24a13dcbbc9f918 [file] [log] [blame]
Lev Walkinf15320b2004-06-03 03:38:44 +00001
Lev Walkin1004aa92004-09-08 00:28:11 +00002/* A Bison parser, made from asn1p_y.y
3 by GNU Bison version 1.28 */
Lev Walkinf15320b2004-06-03 03:38:44 +00004
Lev Walkin1004aa92004-09-08 00:28:11 +00005#define YYBISON 1 /* Identify Bison output. */
Lev Walkinf15320b2004-06-03 03:38:44 +00006
7#define yyparse asn1p_parse
Lev Walkin1004aa92004-09-08 00:28:11 +00008#define yylex asn1p_lex
Lev Walkinf15320b2004-06-03 03:38:44 +00009#define yyerror asn1p_error
Lev Walkin1004aa92004-09-08 00:28:11 +000010#define yylval asn1p_lval
11#define yychar asn1p_char
Lev Walkinf15320b2004-06-03 03:38:44 +000012#define yydebug asn1p_debug
13#define yynerrs asn1p_nerrs
Lev Walkin1004aa92004-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
Lev Walkind9574ae2005-03-24 16:22:35 +000021#define TOK_tuple 264
22#define TOK_quadruple 265
23#define TOK_number_negative 266
24#define TOK_typereference 267
25#define TOK_capitalreference 268
26#define TOK_typefieldreference 269
27#define TOK_valuefieldreference 270
28#define TOK_ABSENT 271
29#define TOK_ABSTRACT_SYNTAX 272
30#define TOK_ALL 273
31#define TOK_ANY 274
32#define TOK_APPLICATION 275
33#define TOK_AUTOMATIC 276
34#define TOK_BEGIN 277
35#define TOK_BIT 278
36#define TOK_BMPString 279
37#define TOK_BOOLEAN 280
38#define TOK_BY 281
39#define TOK_CHARACTER 282
40#define TOK_CHOICE 283
41#define TOK_CLASS 284
42#define TOK_COMPONENT 285
43#define TOK_COMPONENTS 286
44#define TOK_CONSTRAINED 287
45#define TOK_CONTAINING 288
46#define TOK_DEFAULT 289
47#define TOK_DEFINITIONS 290
48#define TOK_DEFINED 291
49#define TOK_EMBEDDED 292
50#define TOK_ENCODED 293
51#define TOK_ENCODING_CONTROL 294
52#define TOK_END 295
53#define TOK_ENUMERATED 296
54#define TOK_EXPLICIT 297
55#define TOK_EXPORTS 298
56#define TOK_EXTENSIBILITY 299
57#define TOK_EXTERNAL 300
58#define TOK_FALSE 301
59#define TOK_FROM 302
60#define TOK_GeneralizedTime 303
61#define TOK_GeneralString 304
62#define TOK_GraphicString 305
63#define TOK_IA5String 306
64#define TOK_IDENTIFIER 307
65#define TOK_IMPLICIT 308
66#define TOK_IMPLIED 309
67#define TOK_IMPORTS 310
68#define TOK_INCLUDES 311
69#define TOK_INSTANCE 312
70#define TOK_INSTRUCTIONS 313
71#define TOK_INTEGER 314
72#define TOK_ISO646String 315
73#define TOK_MAX 316
74#define TOK_MIN 317
75#define TOK_MINUS_INFINITY 318
76#define TOK_NULL 319
77#define TOK_NumericString 320
78#define TOK_OBJECT 321
79#define TOK_ObjectDescriptor 322
80#define TOK_OCTET 323
81#define TOK_OF 324
82#define TOK_OPTIONAL 325
83#define TOK_PATTERN 326
84#define TOK_PDV 327
85#define TOK_PLUS_INFINITY 328
86#define TOK_PRESENT 329
87#define TOK_PrintableString 330
88#define TOK_PRIVATE 331
89#define TOK_REAL 332
90#define TOK_RELATIVE_OID 333
91#define TOK_SEQUENCE 334
92#define TOK_SET 335
93#define TOK_SIZE 336
94#define TOK_STRING 337
95#define TOK_SYNTAX 338
96#define TOK_T61String 339
97#define TOK_TAGS 340
98#define TOK_TeletexString 341
99#define TOK_TRUE 342
100#define TOK_TYPE_IDENTIFIER 343
101#define TOK_UNIQUE 344
102#define TOK_UNIVERSAL 345
103#define TOK_UniversalString 346
104#define TOK_UTCTime 347
105#define TOK_UTF8String 348
106#define TOK_VideotexString 349
107#define TOK_VisibleString 350
108#define TOK_WITH 351
109#define TOK_EXCEPT 352
110#define TOK_INTERSECTION 353
111#define TOK_UNION 354
112#define TOK_TwoDots 355
113#define TOK_ThreeDots 356
Lev Walkinf15320b2004-06-03 03:38:44 +0000114
115#line 1 "asn1p_y.y"
116
117
118#include <stdlib.h>
119#include <stdio.h>
120#include <string.h>
121#include <errno.h>
122#include <assert.h>
123
124#include "asn1parser.h"
125
126#define YYPARSE_PARAM param
Lev Walkin4a4bdf72005-06-07 21:43:32 +0000127#define YYPARSE_PARAM_TYPE void **
Lev Walkinf15320b2004-06-03 03:38:44 +0000128#define YYERROR_VERBOSE
129
130int yylex(void);
131int yyerror(const char *msg);
Lev Walkin4a4bdf72005-06-07 21:43:32 +0000132#ifdef YYBYACC
133int yyparse(void **param); /* byacc does not produce a prototype */
134#endif
Lev Walkinf15320b2004-06-03 03:38:44 +0000135void asn1p_lexer_hack_push_opaque_state(void);
136void asn1p_lexer_hack_enable_with_syntax(void);
Lev Walkinf59d0752004-08-18 04:59:12 +0000137void asn1p_lexer_hack_push_encoding_control(void);
Lev Walkinf15320b2004-06-03 03:38:44 +0000138#define yylineno asn1p_lineno
139extern int asn1p_lineno;
140
141
142static asn1p_value_t *
143 _convert_bitstring2binary(char *str, int base);
144
Lev Walkin1004aa92004-09-08 00:28:11 +0000145#define checkmem(ptr) do { \
146 if(!(ptr)) \
147 return yyerror("Memory failure"); \
Lev Walkinf15320b2004-06-03 03:38:44 +0000148 } while(0)
149
150#define CONSTRAINT_INSERT(root, constr_type, arg1, arg2) do { \
151 if(arg1->type != constr_type) { \
152 int __ret; \
153 root = asn1p_constraint_new(yylineno); \
154 checkmem(root); \
155 root->type = constr_type; \
156 __ret = asn1p_constraint_insert(root, \
157 arg1); \
158 checkmem(__ret == 0); \
159 } else { \
160 root = arg1; \
161 } \
162 if(arg2) { \
163 int __ret \
164 = asn1p_constraint_insert(root, arg2); \
165 checkmem(__ret == 0); \
166 } \
167 } while(0)
168
169
Lev Walkin4a4bdf72005-06-07 21:43:32 +0000170#line 62 "asn1p_y.y"
Lev Walkinf15320b2004-06-03 03:38:44 +0000171typedef union {
172 asn1p_t *a_grammar;
173 asn1p_module_flags_e a_module_flags;
174 asn1p_module_t *a_module;
175 asn1p_expr_type_e a_type; /* ASN.1 Type */
176 asn1p_expr_t *a_expr; /* Constructed collection */
177 asn1p_constraint_t *a_constr; /* Constraint */
178 enum asn1p_constraint_type_e a_ctype;/* Constraint type */
179 asn1p_xports_t *a_xports; /* IMports/EXports */
180 asn1p_oid_t *a_oid; /* Object Identifier */
181 asn1p_oid_arc_t a_oid_arc; /* Single OID's arc */
182 struct asn1p_type_tag_s a_tag; /* A tag */
183 asn1p_ref_t *a_ref; /* Reference to custom type */
184 asn1p_wsyntx_t *a_wsynt; /* WITH SYNTAX contents */
185 asn1p_wsyntx_chunk_t *a_wchunk; /* WITH SYNTAX chunk */
186 struct asn1p_ref_component_s a_refcomp; /* Component of a reference */
187 asn1p_value_t *a_value; /* Number, DefinedValue, etc */
188 struct asn1p_param_s a_parg; /* A parameter argument */
189 asn1p_paramlist_t *a_plist; /* A pargs list */
Lev Walkin9c974182004-09-15 11:59:51 +0000190 struct asn1p_expr_marker_s a_marker; /* OPTIONAL/DEFAULT */
Lev Walkinf15320b2004-06-03 03:38:44 +0000191 enum asn1p_constr_pres_e a_pres; /* PRESENT/ABSENT/OPTIONAL */
Lev Walkind21c5052004-09-29 13:18:09 +0000192 asn1c_integer_t a_int;
Lev Walkinf15320b2004-06-03 03:38:44 +0000193 char *tv_str;
194 struct {
195 char *buf;
196 int len;
197 } tv_opaque;
198 struct {
199 char *name;
200 struct asn1p_type_tag_s tag;
201 } tv_nametag;
Lev Walkin1004aa92004-09-08 00:28:11 +0000202} YYSTYPE;
203#include <stdio.h>
204
205#ifndef __cplusplus
206#ifndef __STDC__
207#define const
208#endif
Lev Walkinf15320b2004-06-03 03:38:44 +0000209#endif
210
211
212
Lev Walkin8ea99482005-03-31 21:48:13 +0000213#define YYFINAL 425
Lev Walkin1004aa92004-09-08 00:28:11 +0000214#define YYFLAG -32768
Lev Walkind9574ae2005-03-24 16:22:35 +0000215#define YYNTBASE 118
Lev Walkinf15320b2004-06-03 03:38:44 +0000216
Lev Walkin8ea99482005-03-31 21:48:13 +0000217#define YYTRANSLATE(x) ((unsigned)(x) <= 356 ? yytranslate[x] : 220)
Lev Walkinf15320b2004-06-03 03:38:44 +0000218
Lev Walkin1004aa92004-09-08 00:28:11 +0000219static const char yytranslate[] = { 0,
220 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
221 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
222 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
Lev Walkind9574ae2005-03-24 16:22:35 +0000223 2, 2, 112, 2, 2, 2, 2, 2, 2, 107,
224 108, 2, 2, 110, 2, 113, 2, 2, 2, 2,
225 2, 2, 2, 2, 2, 2, 2, 111, 109, 114,
226 2, 2, 2, 115, 2, 2, 2, 2, 2, 2,
Lev Walkin1004aa92004-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,
Lev Walkind9574ae2005-03-24 16:22:35 +0000229 116, 2, 117, 99, 2, 2, 2, 2, 2, 2,
Lev Walkin1004aa92004-09-08 00:28:11 +0000230 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
231 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
Lev Walkind9574ae2005-03-24 16:22:35 +0000232 2, 2, 105, 101, 106, 2, 2, 2, 2, 2,
Lev Walkin1004aa92004-09-08 00:28:11 +0000233 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, 2, 2, 2, 2, 2,
240 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
241 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
242 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
243 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
244 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
245 2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
246 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
247 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
248 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
249 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
250 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
251 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
252 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
253 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
254 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
Lev Walkind9574ae2005-03-24 16:22:35 +0000255 97, 98, 100, 102, 103, 104
Lev Walkin1004aa92004-09-08 00:28:11 +0000256};
Lev Walkinf15320b2004-06-03 03:38:44 +0000257
Lev Walkin1004aa92004-09-08 00:28:11 +0000258#if YYDEBUG != 0
259static const short yyprhs[] = { 0,
260 0, 2, 4, 7, 16, 17, 19, 23, 26, 28,
261 31, 33, 38, 40, 41, 43, 45, 48, 51, 54,
262 57, 60, 63, 64, 66, 68, 71, 73, 75, 77,
263 79, 81, 82, 86, 88, 92, 95, 97, 100, 105,
Lev Walkin144db9b2004-10-12 23:26:53 +0000264 107, 111, 113, 117, 119, 123, 127, 130, 132, 136,
Lev Walkin8ea99482005-03-31 21:48:13 +0000265 138, 142, 144, 145, 152, 154, 156, 161, 165, 169,
266 176, 178, 182, 184, 188, 192, 196, 198, 202, 204,
267 206, 207, 209, 211, 215, 219, 223, 225, 227, 231,
268 234, 236, 242, 243, 245, 247, 251, 254, 259, 264,
269 265, 267, 268, 275, 277, 280, 282, 284, 286, 290,
270 294, 298, 300, 305, 310, 315, 322, 329, 331, 336,
271 341, 343, 347, 349, 353, 357, 361, 363, 367, 369,
272 373, 375, 377, 379, 381, 386, 390, 391, 395, 397,
273 399, 401, 403, 405, 407, 409, 411, 413, 417, 419,
274 421, 423, 425, 428, 430, 432, 434, 436, 439, 442,
275 444, 446, 449, 452, 454, 456, 458, 460, 462, 465,
276 467, 470, 472, 474, 476, 478, 480, 482, 484, 486,
277 488, 490, 492, 494, 496, 498, 500, 502, 504, 506,
278 508, 509, 511, 513, 518, 522, 527, 529, 533, 539,
279 541, 545, 549, 553, 557, 562, 566, 568, 570, 574,
280 578, 582, 586, 588, 590, 591, 597, 599, 602, 605,
281 609, 611, 613, 615, 617, 619, 621, 623, 625, 629,
282 635, 637, 641, 643, 647, 648, 650, 652, 654, 656,
283 658, 660, 664, 669, 671, 675, 678, 682, 684, 688,
284 689, 691, 693, 696, 699, 703, 705, 709, 711, 716,
285 721, 723, 725, 727, 729, 730, 732, 735, 740, 741,
286 743, 745, 747, 748, 750, 752, 754, 756, 758, 759,
287 761
Lev Walkin1004aa92004-09-08 00:28:11 +0000288};
Lev Walkinf15320b2004-06-03 03:38:44 +0000289
Lev Walkind9574ae2005-03-24 16:22:35 +0000290static const short yyrhs[] = { 119,
Lev Walkin8ea99482005-03-31 21:48:13 +0000291 0, 120, 0, 119, 120, 0, 216, 121, 36, 125,
Lev Walkind9574ae2005-03-24 16:22:35 +0000292 3, 23, 128, 41, 0, 0, 122, 0, 105, 123,
293 106, 0, 105, 106, 0, 124, 0, 123, 124, 0,
Lev Walkin8ea99482005-03-31 21:48:13 +0000294 219, 0, 219, 107, 9, 108, 0, 9, 0, 0,
Lev Walkind9574ae2005-03-24 16:22:35 +0000295 126, 0, 127, 0, 126, 127, 0, 43, 86, 0,
296 54, 86, 0, 22, 86, 0, 45, 55, 0, 14,
297 59, 0, 0, 129, 0, 130, 0, 129, 130, 0,
Lev Walkin8ea99482005-03-31 21:48:13 +0000298 132, 0, 137, 0, 143, 0, 170, 0, 140, 0,
299 0, 40, 14, 131, 0, 179, 0, 56, 133, 109,
Lev Walkind9574ae2005-03-24 16:22:35 +0000300 0, 56, 48, 0, 134, 0, 133, 134, 0, 135,
Lev Walkin8ea99482005-03-31 21:48:13 +0000301 48, 216, 121, 0, 136, 0, 135, 110, 136, 0,
302 216, 0, 216, 105, 106, 0, 219, 0, 44, 138,
Lev Walkind9574ae2005-03-24 16:22:35 +0000303 109, 0, 44, 19, 109, 0, 44, 109, 0, 139,
Lev Walkin8ea99482005-03-31 21:48:13 +0000304 0, 138, 110, 139, 0, 216, 0, 216, 105, 106,
305 0, 219, 0, 0, 216, 142, 3, 105, 141, 175,
306 0, 165, 0, 176, 0, 216, 3, 211, 89, 0,
307 216, 3, 163, 0, 216, 3, 153, 0, 216, 105,
308 144, 106, 3, 163, 0, 145, 0, 144, 110, 145,
309 0, 216, 0, 216, 111, 219, 0, 216, 111, 216,
310 0, 176, 111, 219, 0, 147, 0, 146, 110, 147,
311 0, 163, 0, 219, 0, 0, 149, 0, 150, 0,
312 149, 110, 150, 0, 219, 163, 205, 0, 32, 70,
313 163, 0, 162, 0, 152, 0, 151, 110, 152, 0,
314 219, 163, 0, 162, 0, 30, 105, 155, 106, 157,
315 0, 0, 90, 0, 156, 0, 155, 110, 156, 0,
316 168, 205, 0, 168, 163, 154, 205, 0, 168, 168,
317 154, 205, 0, 0, 158, 0, 0, 97, 84, 105,
318 159, 160, 106, 0, 161, 0, 160, 161, 0, 4,
319 0, 168, 0, 104, 0, 104, 112, 173, 0, 104,
320 112, 210, 0, 211, 164, 183, 0, 178, 0, 29,
321 105, 151, 106, 0, 80, 105, 148, 106, 0, 81,
322 105, 148, 106, 0, 80, 183, 70, 218, 211, 164,
323 0, 81, 183, 70, 218, 211, 164, 0, 20, 0,
324 20, 37, 27, 219, 0, 216, 105, 146, 106, 0,
325 165, 0, 58, 70, 165, 0, 13, 0, 13, 113,
326 216, 0, 217, 113, 216, 0, 13, 113, 219, 0,
327 217, 0, 217, 113, 166, 0, 167, 0, 166, 113,
328 167, 0, 169, 0, 169, 0, 15, 0, 16, 0,
329 219, 142, 3, 171, 0, 219, 111, 171, 0, 0,
330 105, 172, 175, 0, 65, 0, 47, 0, 88, 0,
331 5, 0, 7, 0, 174, 0, 210, 0, 173, 0,
332 219, 0, 216, 113, 219, 0, 6, 0, 10, 0,
333 11, 0, 4, 0, 175, 4, 0, 26, 0, 65,
334 0, 78, 0, 177, 0, 69, 83, 0, 67, 53,
335 0, 79, 0, 46, 0, 38, 73, 0, 28, 83,
336 0, 93, 0, 49, 0, 179, 0, 60, 0, 42,
337 0, 24, 83, 0, 176, 0, 177, 207, 0, 25,
338 0, 50, 0, 51, 0, 52, 0, 61, 0, 66,
339 0, 76, 0, 85, 0, 87, 0, 92, 0, 94,
340 0, 95, 0, 96, 0, 68, 0, 101, 0, 102,
341 0, 99, 0, 100, 0, 98, 0, 0, 184, 0,
342 185, 0, 82, 107, 186, 108, 0, 107, 186, 108,
343 0, 185, 107, 186, 108, 0, 187, 0, 187, 110,
344 104, 0, 187, 110, 104, 110, 187, 0, 188, 0,
345 19, 98, 188, 0, 187, 180, 188, 0, 187, 181,
346 188, 0, 188, 182, 188, 0, 191, 107, 186, 108,
347 0, 107, 186, 108, 0, 192, 0, 193, 0, 192,
348 190, 192, 0, 63, 190, 192, 0, 192, 190, 62,
349 0, 63, 190, 62, 0, 199, 0, 194, 0, 0,
350 33, 27, 105, 189, 175, 0, 103, 0, 103, 114,
351 0, 114, 103, 0, 114, 103, 114, 0, 82, 0,
352 48, 0, 47, 0, 88, 0, 210, 0, 174, 0,
353 219, 0, 216, 0, 97, 31, 185, 0, 97, 32,
354 105, 195, 106, 0, 196, 0, 195, 110, 196, 0,
355 104, 0, 219, 183, 197, 0, 0, 198, 0, 75,
356 0, 17, 0, 71, 0, 200, 0, 201, 0, 105,
357 216, 106, 0, 200, 105, 202, 106, 0, 203, 0,
358 202, 110, 203, 0, 115, 204, 0, 115, 113, 204,
359 0, 219, 0, 204, 113, 219, 0, 0, 206, 0,
360 71, 0, 35, 171, 0, 105, 106, 0, 105, 208,
361 106, 0, 209, 0, 208, 110, 209, 0, 219, 0,
362 219, 107, 210, 108, 0, 219, 107, 173, 108, 0,
363 210, 0, 104, 0, 9, 0, 12, 0, 0, 212,
364 0, 213, 215, 0, 116, 214, 9, 117, 0, 0,
365 91, 0, 21, 0, 77, 0, 0, 54, 0, 43,
366 0, 13, 0, 14, 0, 14, 0, 0, 219, 0,
367 8, 0
Lev Walkin1004aa92004-09-08 00:28:11 +0000368};
Lev Walkinf15320b2004-06-03 03:38:44 +0000369
370#endif
371
Lev Walkin1004aa92004-09-08 00:28:11 +0000372#if YYDEBUG != 0
373static const short yyrline[] = { 0,
Lev Walkin4a4bdf72005-06-07 21:43:32 +0000374 306, 312, 318, 334, 359, 361, 364, 368, 373, 380,
375 388, 393, 397, 406, 408, 416, 420, 428, 432, 435,
376 438, 442, 462, 464, 472, 476, 508, 512, 521, 528,
377 541, 548, 550, 562, 575, 582, 587, 593, 599, 608,
378 614, 620, 627, 633, 641, 645, 648, 655, 661, 667,
379 674, 680, 689, 691, 700, 708, 722, 734, 740, 756,
380 765, 775, 785, 790, 797, 804, 814, 820, 826, 830,
381 853, 855, 857, 863, 869, 876, 883, 888, 894, 900,
382 906, 911, 921, 923, 926, 934, 940, 949, 955, 972,
383 974, 979, 983, 988, 993, 999, 1003, 1014, 1023, 1032,
384 1043, 1065, 1069, 1075, 1081, 1087, 1097, 1107, 1113, 1127,
385 1151, 1158, 1172, 1181, 1191, 1201, 1211, 1219, 1240, 1249,
386 1258, 1259, 1261, 1268, 1280, 1290, 1298, 1298, 1303, 1308,
387 1313, 1318, 1322, 1326, 1329, 1332, 1337, 1349, 1366, 1371,
388 1376, 1409, 1419, 1433, 1435, 1436, 1437, 1438, 1439, 1440,
389 1441, 1442, 1443, 1444, 1445, 1446, 1452, 1454, 1455, 1458,
390 1465, 1477, 1479, 1483, 1487, 1488, 1489, 1490, 1491, 1495,
391 1496, 1497, 1498, 1502, 1503, 1510, 1510, 1511, 1511, 1512,
392 1514, 1516, 1521, 1525, 1534, 1538, 1543, 1547, 1553, 1563,
393 1567, 1570, 1573, 1576, 1581, 1590, 1598, 1604, 1610, 1617,
394 1625, 1633, 1642, 1645, 1648, 1649, 1659, 1661, 1662, 1663,
395 1666, 1670, 1675, 1681, 1686, 1689, 1692, 1705, 1719, 1723,
396 1728, 1732, 1737, 1744, 1757, 1759, 1762, 1766, 1769, 1774,
397 1778, 1786, 1801, 1807, 1814, 1827, 1839, 1854, 1858, 1875,
398 1880, 1883, 1888, 1910, 1915, 1920, 1926, 1932, 1940, 1948,
399 1956, 1963, 1973, 1978, 2008, 2010, 2013, 2020, 2026, 2028,
400 2029, 2030, 2033, 2035, 2036, 2039, 2044, 2051, 2058, 2060,
401 2065
Lev Walkin1004aa92004-09-08 00:28:11 +0000402};
403#endif
404
405
406#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
407
408static const char * const yytname[] = { "$","error","$undefined.","TOK_PPEQ",
409"TOK_opaque","TOK_bstring","TOK_cstring","TOK_hstring","TOK_identifier","TOK_number",
Lev Walkind9574ae2005-03-24 16:22:35 +0000410"TOK_tuple","TOK_quadruple","TOK_number_negative","TOK_typereference","TOK_capitalreference",
411"TOK_typefieldreference","TOK_valuefieldreference","TOK_ABSENT","TOK_ABSTRACT_SYNTAX",
412"TOK_ALL","TOK_ANY","TOK_APPLICATION","TOK_AUTOMATIC","TOK_BEGIN","TOK_BIT",
413"TOK_BMPString","TOK_BOOLEAN","TOK_BY","TOK_CHARACTER","TOK_CHOICE","TOK_CLASS",
414"TOK_COMPONENT","TOK_COMPONENTS","TOK_CONSTRAINED","TOK_CONTAINING","TOK_DEFAULT",
415"TOK_DEFINITIONS","TOK_DEFINED","TOK_EMBEDDED","TOK_ENCODED","TOK_ENCODING_CONTROL",
416"TOK_END","TOK_ENUMERATED","TOK_EXPLICIT","TOK_EXPORTS","TOK_EXTENSIBILITY",
417"TOK_EXTERNAL","TOK_FALSE","TOK_FROM","TOK_GeneralizedTime","TOK_GeneralString",
418"TOK_GraphicString","TOK_IA5String","TOK_IDENTIFIER","TOK_IMPLICIT","TOK_IMPLIED",
419"TOK_IMPORTS","TOK_INCLUDES","TOK_INSTANCE","TOK_INSTRUCTIONS","TOK_INTEGER",
420"TOK_ISO646String","TOK_MAX","TOK_MIN","TOK_MINUS_INFINITY","TOK_NULL","TOK_NumericString",
421"TOK_OBJECT","TOK_ObjectDescriptor","TOK_OCTET","TOK_OF","TOK_OPTIONAL","TOK_PATTERN",
422"TOK_PDV","TOK_PLUS_INFINITY","TOK_PRESENT","TOK_PrintableString","TOK_PRIVATE",
423"TOK_REAL","TOK_RELATIVE_OID","TOK_SEQUENCE","TOK_SET","TOK_SIZE","TOK_STRING",
424"TOK_SYNTAX","TOK_T61String","TOK_TAGS","TOK_TeletexString","TOK_TRUE","TOK_TYPE_IDENTIFIER",
425"TOK_UNIQUE","TOK_UNIVERSAL","TOK_UniversalString","TOK_UTCTime","TOK_UTF8String",
426"TOK_VideotexString","TOK_VisibleString","TOK_WITH","TOK_EXCEPT","'^'","TOK_INTERSECTION",
427"'|'","TOK_UNION","TOK_TwoDots","TOK_ThreeDots","'{'","'}'","'('","')'","';'",
428"','","':'","'!'","'.'","'<'","'@'","'['","']'","ParsedGrammar","ModuleList",
429"ModuleSpecification","optObjectIdentifier","ObjectIdentifier","ObjectIdentifierBody",
430"ObjectIdentifierElement","optModuleSpecificationFlags","ModuleSpecificationFlags",
431"ModuleSpecificationFlag","optModuleSpecificationBody","ModuleSpecificationBody",
432"ModuleSpecificationElement","@1","ImportsDefinition","ImportsBundleSet","ImportsBundle",
433"ImportsList","ImportsElement","ExportsDefinition","ExportsBody","ExportsElement",
Lev Walkin8ea99482005-03-31 21:48:13 +0000434"ValueSetDefinition","@2","DefinedTypeRef","DataTypeReference","ParameterArgumentList",
435"ParameterArgumentName","ActualParameterList","ActualParameter","optComponentTypeLists",
436"ComponentTypeLists","ComponentType","AlternativeTypeLists","AlternativeType",
437"ClassDeclaration","optUnique","ClassFieldList","ClassField","optWithSyntax",
438"WithSyntax","@3","WithSyntaxFormat","WithSyntaxFormatToken","ExtensionAndException",
439"Type","TypeDeclaration","ComplexTypeReference","ComplexTypeReferenceAmpList",
Lev Walkin144db9b2004-10-12 23:26:53 +0000440"ComplexTypeReferenceElement","ClassFieldIdentifier","ClassFieldName","ValueDefinition",
Lev Walkin8ea99482005-03-31 21:48:13 +0000441"Value","@4","DefinedValue","RestrictedCharacterStringValue","Opaque","BasicTypeId",
Lev Walkin1e448d32005-03-24 14:26:38 +0000442"BasicTypeId_UniverationCompatible","BasicType","BasicString","Union","Intersection",
443"Except","optConstraints","Constraints","SetOfConstraints","ElementSetSpecs",
Lev Walkin8ea99482005-03-31 21:48:13 +0000444"ElementSetSpec","ConstraintSubtypeElement","@5","ConstraintRangeSpec","ConstraintSpec",
Lev Walkine596bf02005-03-28 15:01:27 +0000445"SingleValue","ContainedSubtype","InnerTypeConstraint","WithComponentsList",
446"WithComponentsElement","optPresenceConstraint","PresenceConstraint","TableConstraint",
447"SimpleTableConstraint","ComponentRelationConstraint","AtNotationList","AtNotationElement",
448"ComponentIdList","optMarker","Marker","UniverationDefinition","UniverationList",
449"UniverationElement","SignedNumber","optTag","Tag","TagTypeValue","TagClass",
450"TagPlicit","TypeRefName","ObjectClassReference","optIdentifier","Identifier", NULL
Lev Walkin1004aa92004-09-08 00:28:11 +0000451};
452#endif
453
454static const short yyr1[] = { 0,
Lev Walkind9574ae2005-03-24 16:22:35 +0000455 118, 119, 119, 120, 121, 121, 122, 122, 123, 123,
456 124, 124, 124, 125, 125, 126, 126, 127, 127, 127,
457 127, 127, 128, 128, 129, 129, 130, 130, 130, 130,
458 130, 131, 130, 130, 132, 132, 133, 133, 134, 135,
459 135, 136, 136, 136, 137, 137, 137, 138, 138, 139,
Lev Walkin8ea99482005-03-31 21:48:13 +0000460 139, 139, 141, 140, 142, 142, 143, 143, 143, 143,
461 144, 144, 145, 145, 145, 145, 146, 146, 147, 147,
462 148, 148, 149, 149, 150, 150, 150, 151, 151, 152,
463 152, 153, 154, 154, 155, 155, 156, 156, 156, 157,
464 157, 159, 158, 160, 160, 161, 161, 162, 162, 162,
465 163, 164, 164, 164, 164, 164, 164, 164, 164, 164,
466 164, 164, 165, 165, 165, 165, 165, 165, 166, 166,
467 167, 168, 169, 169, 170, 171, 172, 171, 171, 171,
468 171, 171, 171, 171, 171, 171, 173, 173, 174, 174,
469 174, 175, 175, 176, 176, 176, 176, 176, 176, 176,
470 176, 176, 176, 176, 176, 176, 177, 177, 177, 178,
471 178, 179, 179, 179, 179, 179, 179, 179, 179, 179,
472 179, 179, 179, 179, 179, 180, 180, 181, 181, 182,
473 183, 183, 184, 184, 185, 185, 186, 186, 186, 187,
474 187, 187, 187, 187, 188, 188, 188, 188, 188, 188,
475 188, 188, 188, 188, 189, 188, 190, 190, 190, 190,
476 191, 191, 192, 192, 192, 192, 192, 193, 194, 194,
477 195, 195, 196, 196, 197, 197, 198, 198, 198, 199,
478 199, 200, 201, 202, 202, 203, 203, 204, 204, 205,
479 205, 206, 206, 207, 207, 208, 208, 209, 209, 209,
480 209, 209, 210, 210, 211, 211, 212, 213, 214, 214,
481 214, 214, 215, 215, 215, 216, 216, 217, 218, 218,
482 219
Lev Walkin1004aa92004-09-08 00:28:11 +0000483};
484
485static const short yyr2[] = { 0,
486 1, 1, 2, 8, 0, 1, 3, 2, 1, 2,
487 1, 4, 1, 0, 1, 1, 2, 2, 2, 2,
488 2, 2, 0, 1, 1, 2, 1, 1, 1, 1,
489 1, 0, 3, 1, 3, 2, 1, 2, 4, 1,
Lev Walkin144db9b2004-10-12 23:26:53 +0000490 3, 1, 3, 1, 3, 3, 2, 1, 3, 1,
Lev Walkin8ea99482005-03-31 21:48:13 +0000491 3, 1, 0, 6, 1, 1, 4, 3, 3, 6,
492 1, 3, 1, 3, 3, 3, 1, 3, 1, 1,
493 0, 1, 1, 3, 3, 3, 1, 1, 3, 2,
494 1, 5, 0, 1, 1, 3, 2, 4, 4, 0,
495 1, 0, 6, 1, 2, 1, 1, 1, 3, 3,
496 3, 1, 4, 4, 4, 6, 6, 1, 4, 4,
497 1, 3, 1, 3, 3, 3, 1, 3, 1, 3,
498 1, 1, 1, 1, 4, 3, 0, 3, 1, 1,
499 1, 1, 1, 1, 1, 1, 1, 3, 1, 1,
500 1, 1, 2, 1, 1, 1, 1, 2, 2, 1,
501 1, 2, 2, 1, 1, 1, 1, 1, 2, 1,
502 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Lev Walkin1004aa92004-09-08 00:28:11 +0000503 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Lev Walkin8ea99482005-03-31 21:48:13 +0000504 0, 1, 1, 4, 3, 4, 1, 3, 5, 1,
505 3, 3, 3, 3, 4, 3, 1, 1, 3, 3,
506 3, 3, 1, 1, 0, 5, 1, 2, 2, 3,
507 1, 1, 1, 1, 1, 1, 1, 1, 3, 5,
508 1, 3, 1, 3, 0, 1, 1, 1, 1, 1,
509 1, 3, 4, 1, 3, 2, 3, 1, 3, 0,
510 1, 1, 2, 2, 3, 1, 3, 1, 4, 4,
511 1, 1, 1, 1, 0, 1, 2, 4, 0, 1,
512 1, 1, 0, 1, 1, 1, 1, 1, 0, 1,
513 1
Lev Walkin1004aa92004-09-08 00:28:11 +0000514};
515
516static const short yydefact[] = { 0,
Lev Walkin8ea99482005-03-31 21:48:13 +0000517 266, 267, 1, 2, 5, 3, 0, 0, 6, 271,
Lev Walkin1004aa92004-09-08 00:28:11 +0000518 13, 8, 0, 9, 11, 14, 7, 10, 0, 0,
519 0, 0, 0, 0, 0, 15, 16, 0, 22, 20,
Lev Walkin8ea99482005-03-31 21:48:13 +0000520 18, 21, 19, 0, 17, 12, 23, 162, 0, 0,
521 163, 164, 165, 0, 166, 167, 175, 168, 169, 170,
522 171, 172, 173, 174, 0, 24, 25, 27, 28, 31,
Lev Walkin144db9b2004-10-12 23:26:53 +0000523 29, 30, 34, 0, 0, 32, 0, 47, 0, 48,
524 50, 52, 36, 0, 37, 0, 40, 42, 44, 4,
Lev Walkin8ea99482005-03-31 21:48:13 +0000525 26, 255, 113, 268, 0, 144, 0, 0, 158, 151,
526 155, 157, 145, 0, 0, 146, 150, 154, 0, 0,
527 55, 56, 147, 156, 117, 0, 33, 46, 45, 0,
528 0, 35, 38, 0, 0, 0, 0, 259, 59, 58,
529 0, 256, 263, 0, 159, 153, 152, 149, 148, 0,
530 61, 0, 63, 0, 0, 0, 49, 51, 5, 41,
531 43, 0, 261, 262, 260, 0, 113, 268, 108, 0,
532 0, 181, 181, 57, 181, 111, 160, 147, 102, 0,
533 265, 264, 257, 114, 116, 0, 0, 0, 0, 53,
534 123, 124, 118, 119, 121, 115, 132, 139, 133, 253,
535 140, 141, 254, 130, 129, 131, 127, 125, 136, 134,
536 135, 0, 137, 39, 0, 85, 255, 122, 0, 0,
537 0, 0, 0, 71, 0, 0, 182, 183, 71, 0,
538 101, 0, 161, 255, 255, 62, 66, 65, 64, 0,
539 0, 0, 0, 0, 90, 0, 0, 242, 83, 83,
540 87, 241, 0, 258, 0, 98, 0, 78, 81, 255,
541 112, 0, 0, 0, 72, 73, 77, 255, 0, 0,
542 213, 212, 0, 211, 214, 0, 0, 0, 216, 0,
543 187, 190, 0, 197, 198, 204, 203, 230, 231, 215,
544 218, 217, 269, 0, 0, 269, 252, 244, 0, 246,
545 251, 248, 0, 67, 69, 70, 60, 142, 54, 120,
546 128, 138, 126, 0, 82, 91, 86, 243, 84, 240,
547 240, 109, 0, 103, 0, 80, 0, 255, 104, 0,
548 240, 0, 0, 207, 0, 0, 0, 0, 0, 0,
549 185, 178, 179, 176, 177, 0, 0, 0, 180, 0,
550 0, 0, 0, 255, 270, 0, 105, 255, 245, 0,
551 0, 110, 255, 143, 0, 88, 89, 99, 100, 137,
552 79, 184, 76, 74, 75, 191, 205, 208, 209, 202,
553 200, 219, 0, 232, 196, 188, 192, 193, 194, 0,
554 201, 199, 0, 0, 234, 0, 186, 0, 247, 0,
555 0, 68, 92, 0, 210, 223, 0, 221, 181, 0,
556 195, 0, 236, 238, 233, 0, 106, 107, 250, 249,
557 0, 206, 220, 0, 225, 189, 237, 0, 235, 96,
558 0, 94, 97, 222, 228, 229, 227, 224, 226, 239,
559 93, 95, 0, 0, 0
Lev Walkin1004aa92004-09-08 00:28:11 +0000560};
561
Lev Walkin8ea99482005-03-31 21:48:13 +0000562static const short yydefgoto[] = { 423,
Lev Walkin1004aa92004-09-08 00:28:11 +0000563 3, 4, 8, 9, 13, 14, 25, 26, 27, 55,
Lev Walkinc7d939d2005-03-20 11:12:40 +0000564 56, 57, 107, 58, 74, 75, 76, 77, 59, 69,
Lev Walkin8ea99482005-03-31 21:48:13 +0000565 70, 60, 220, 100, 61, 130, 131, 283, 284, 244,
566 245, 246, 237, 238, 119, 300, 195, 196, 295, 296,
567 401, 411, 412, 247, 285, 155, 156, 173, 174, 197,
568 198, 62, 188, 222, 189, 259, 289, 157, 103, 159,
569 104, 327, 328, 330, 206, 207, 208, 260, 261, 262,
570 384, 316, 263, 264, 265, 266, 387, 388, 418, 419,
571 267, 268, 269, 374, 375, 393, 231, 232, 213, 279,
572 280, 270, 233, 122, 123, 146, 163, 271, 105, 334,
573 272
Lev Walkin1004aa92004-09-08 00:28:11 +0000574};
575
Lev Walkin8ea99482005-03-31 21:48:13 +0000576static const short yypact[] = { 228,
577-32768,-32768, 228,-32768, -83,-32768, 30, 43,-32768,-32768,
578-32768,-32768, 36,-32768, -14, 181,-32768,-32768, 132, 85,
579 68, 73, 109, 95, 193, 181,-32768, 93,-32768,-32768,
580-32768,-32768,-32768, 189,-32768,-32768, 429,-32768, 209, 21,
581-32768,-32768,-32768, 144,-32768,-32768,-32768,-32768,-32768,-32768,
582-32768,-32768,-32768,-32768, 184, 429,-32768,-32768,-32768,-32768,
583-32768,-32768,-32768, 354, 658,-32768, 118,-32768, 190,-32768,
584 134,-32768,-32768, 18,-32768, -27,-32768, 156,-32768,-32768,
585-32768, -12, 150,-32768, 182,-32768, 204, 195,-32768,-32768,
586-32768,-32768,-32768, 236, 212,-32768,-32768,-32768, 733, 299,
587-32768,-32768,-32768,-32768, 205, 316,-32768,-32768,-32768, 185,
588 216,-32768,-32768, 228, 185, 217, 219, 25,-32768,-32768,
589 506,-32768, 117, 185,-32768,-32768,-32768,-32768,-32768, -55,
590-32768, 210, 214, 223, 266, 63,-32768,-32768, -83,-32768,
591-32768, 268,-32768,-32768,-32768, 321, 34, 226, 295, 232,
592 269, -18, -17,-32768, -2,-32768,-32768, 233,-32768, 235,
593-32768,-32768,-32768,-32768,-32768, 338, 733, 334, 185,-32768,
594-32768,-32768, 234,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
Lev Walkin1e448d32005-03-24 14:26:38 +0000595-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
Lev Walkin8ea99482005-03-31 21:48:13 +0000596-32768, 237, 242,-32768, 81,-32768, 27,-32768, 231, 322,
597 11, 240, 247, 49, 238, 285,-32768, 251, 49, 289,
598-32768, 44,-32768, 7, 244,-32768,-32768,-32768,-32768, 358,
599 268, 358, 334, 63, 267, 268, 63,-32768, 273, 273,
600-32768,-32768, 583,-32768, 334, 253, 98,-32768,-32768, 244,
601-32768, 238, 302, 270, 263,-32768,-32768, 244, 276, 348,
602-32768,-32768, 64,-32768,-32768, 275, 228, 238,-32768, 279,
603 130, 283, 277, 64,-32768,-32768,-32768, 272,-32768,-32768,
604-32768,-32768, 334, 238, 284, 334,-32768,-32768, 100,-32768,
605-32768, 286, 105,-32768,-32768,-32768,-32768,-32768, 379,-32768,
606 379,-32768,-32768, 305,-32768,-32768,-32768,-32768,-32768, -10,
607 -10,-32768, 296,-32768, 11,-32768, 287, 244,-32768, 49,
608 -10, 264, 293, 280, 288, 174, 292, 297, 301, 300,
609-32768,-32768,-32768,-32768,-32768, 306, 264, 264,-32768, 264,
610 238, 282, 294, 244,-32768, 303,-32768, 244,-32768, 51,
611 296,-32768, 7,-32768, 307,-32768,-32768,-32768,-32768,-32768,
612-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 304,-32768,
613-32768, 251, 28,-32768,-32768, 314,-32768,-32768,-32768, 308,
614-32768,-32768, 6, 112,-32768, 583,-32768, 583,-32768, 309,
615 317,-32768,-32768, 358,-32768,-32768, 154,-32768, -2, 238,
616-32768, 334, 313,-32768,-32768, 294,-32768,-32768,-32768,-32768,
617 159, 379,-32768, 28, 24, 215, 313, 334,-32768,-32768,
618 12,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
619-32768,-32768, 413, 427,-32768
Lev Walkin1004aa92004-09-08 00:28:11 +0000620};
621
622static const short yypgoto[] = {-32768,
Lev Walkin8ea99482005-03-31 21:48:13 +0000623-32768, 425, 290,-32768,-32768, 418,-32768,-32768, 408,-32768,
624-32768, 380,-32768,-32768,-32768, 361,-32768, 323,-32768,-32768,
625 330,-32768,-32768, 386,-32768,-32768, 278,-32768, 101, 243,
626-32768, 143,-32768, 151,-32768, 225,-32768, 239,-32768,-32768,
627-32768,-32768, 46, -184, -75, -284, -53,-32768, 241, -192,
628 -115,-32768, -89,-32768, -255, -58, -214, -41, -120,-32768,
629 45,-32768,-32768,-32768, -151,-32768, 141, -86, 70, -216,
630-32768, 197,-32768, -225,-32768,-32768,-32768, 59,-32768,-32768,
631-32768,-32768,-32768,-32768, 71, 72, -111,-32768,-32768,-32768,
632 126, -127, -79,-32768,-32768,-32768,-32768, 10,-32768, 192,
633 -7
Lev Walkin1004aa92004-09-08 00:28:11 +0000634};
635
636
Lev Walkin8ea99482005-03-31 21:48:13 +0000637#define YYLAST 829
Lev Walkin1004aa92004-09-08 00:28:11 +0000638
639
640static const short yytable[] = { 15,
Lev Walkin8ea99482005-03-31 21:48:13 +0000641 158, 210, 121, 211, 230, 15, 120, 291, 191, 5,
642 101, 101, 5, 10, 10, 410, 239, 117, 10, 175,
643 114, 7, 102, 102, 227, 10, 171, 172, 10, 65,
644 1, 2, 72, 1, 2, 10, 79, 10, 11, 67,
645 415, 171, 172, 10, 11, 143, 64, 348, 65, 71,
646 166, 10, 180, 78, 167, 183, 10, 132, 10, 180,
647 228, 227, 183, 203, 203, 64, 79, 177, 178, 179,
648 10, 180, 181, 182, 183, 1, 2, 190, 16, 203,
649 243, 63, 115, 78, 281, 380, 204, 209, 205, 205,
650 361, 397, 19, 398, 416, 356, 191, 228, 417, 191,
651 63, 144, 72, 118, 205, 175, 372, 79, 133, 184,
652 367, 368, 158, 369, 236, 145, 165, 421, 392, 71,
653 239, 229, 118, 139, 78, 132, 112, 185, 193, 68,
654 160, 386, -240, 164, 293, 12, -240, 298, -266, 287,
655 28, 17, 118, 29, 176, 192, 124, 277, 241, 278,
656 186, 10, 236, 30, 277, 307, 1, 2, 31, 161,
657 217, 219, 410, 32, 306, 190, 314, 187, 190, 402,
658 162, 320, 311, 171, 172, 349, 133, 315, 218, 178,
659 33, 10, 180, 181, 182, 183, 225, 336, 346, 347,
660 226, 73, 10, 240, 20, 34, 248, 1, 2, 355,
661 36, 248, 21, 304, 282, 339, 286, 305, 413, 340,
662 342, 37, 281, 381, 343, 292, 193, 395, 413, 193,
663 251, 396, 66, 22, 80, 23, 108, 302, 322, 323,
664 324, 325, 353, 192, 24, 360, 192, 405, 111, 326,
665 1, 2, 160, 178, 370, 10, 180, 181, 182, 183,
666 1, 2, 83, 84, 376, 158, 249, 158, 378, 403,
667 116, 255, 124, 404, 125, 335, 319, 127, 335, 178,
668 250, 10, 180, 181, 182, 183, 1, 2, 1, 2,
669 171, 172, 171, 172, 251, 252, 126, 178, 128, 10,
670 180, 181, 182, 183, 129, 350, 250, 240, 109, 110,
671 253, 134, 248, 10, 180, 317, 318, 183, 1, 2,
672 251, 252, 192, 322, 323, 324, 325, 135, 136, 254,
673 168, 138, 141, 142, 169, 255, 253, 170, 251, 199,
674 -267, 200, 282, 350, 256, 286, 201, 212, 202, 214,
675 215, 10, 257, 371, 258, 254, 221, 234, 235, 223,
676 192, 255, 224, 242, 273, 389, 82, 274, 276, 118,
677 256, 288, 299, 294, 303, 394, 83, 84, 257, 255,
678 258, 308, 310, 312, 313, 309, 333, 85, 38, 86,
679 329, 87, 344, 331, 394, 160, 321, 160, 345, 337,
680 359, 88, 341, 358, 352, 89, 389, 357, 205, 90,
681 420, 363, 91, 41, 42, 43, 364, 365, 373, 366,
682 377, 383, 424, 92, 45, 391, 399, 385, 93, 46,
683 94, 47, 95, 390, 400, 408, 425, 6, 194, 48,
684 18, 96, 97, 35, 113, 81, 10, 140, 49, 137,
685 50, 1, 2, 382, 216, 51, 98, 52, 53, 54,
686 106, 275, 354, 38, 301, 351, 422, 362, 99, 406,
687 332, 290, 414, 407, 297, 379, 409, 338, 39, 0,
688 0, 0, 40, 0, 0, 0, 0, 0, 41, 42,
689 43, 0, 0, 0, 44, 0, 0, 0, 0, 45,
690 0, 0, 0, 0, 46, 0, 47, 0, 0, 0,
691 0, 0, 0, 0, 48, 0, 0, 0, 0, 0,
692 0, 0, 0, 49, 0, 50, 0, 0, 147, 148,
693 51, 0, 52, 53, 54, 149, 0, 0, 0, 85,
694 38, 86, 0, 87, 150, 0, 0, 0, 0, 0,
Lev Walkind9574ae2005-03-24 16:22:35 +0000695 0, 0, 0, 88, 0, 0, 0, 89, 0, 0,
696 0, 90, 0, 0, 91, 41, 42, 43, 0, 0,
Lev Walkin8ea99482005-03-31 21:48:13 +0000697 0, 0, 0, 151, 0, 92, 45, 0, 0, 0,
Lev Walkind9574ae2005-03-24 16:22:35 +0000698 93, 46, 94, 47, 95, 0, 0, 0, 0, 0,
Lev Walkin8ea99482005-03-31 21:48:13 +0000699 0, 48, 0, 96, 97, 152, 153, 0, 0, 0,
700 49, 0, 50, 0, 154, 147, 148, 51, 98, 52,
701 53, 54, 149, 0, 0, 0, 85, 38, 86, 0,
702 87, 150, 0, 0, 0, 0, 0, 0, 0, 0,
703 88, 0, 0, 0, 89, 0, 0, 0, 90, 0,
704 0, 91, 41, 42, 43, 0, 0, 0, 0, 0,
705 151, 0, 92, 45, 0, 0, 0, 93, 46, 94,
706 47, 95, 0, 0, 0, 0, 0, 0, 48, 0,
707 96, 97, 152, 153, 0, 0, 0, 49, 0, 50,
708 83, 84, 0, 0, 51, 98, 52, 53, 54, 0,
709 0, 85, 38, 86, 0, 87, 0, 0, 0, 0,
710 0, 0, 0, 0, 0, 88, 0, 0, 0, 89,
711 0, 0, 0, 90, 0, 0, 91, 41, 42, 43,
712 0, 0, 0, 0, 0, 0, 0, 92, 45, 0,
713 0, 0, 93, 46, 94, 47, 95, 0, 0, 0,
714 0, 0, 0, 48, 0, 96, 97, 0, 0, 0,
715 0, 0, 49, 0, 50, 1, 2, 0, 0, 51,
716 98, 52, 53, 54, 0, 0, 85, 38, 86, 0,
717 87, 0, 0, 0, 0, 0, 0, 0, 0, 0,
718 88, 0, 0, 0, 89, 0, 0, 0, 90, 0,
719 0, 91, 41, 42, 43, 0, 0, 0, 0, 0,
720 0, 0, 92, 45, 0, 0, 0, 93, 46, 94,
721 47, 95, 0, 0, 0, 0, 0, 0, 48, 0,
722 96, 97, 0, 0, 0, 0, 0, 49, 0, 50,
723 0, 0, 0, 0, 51, 98, 52, 53, 54
Lev Walkin1004aa92004-09-08 00:28:11 +0000724};
725
726static const short yycheck[] = { 7,
Lev Walkin8ea99482005-03-31 21:48:13 +0000727 121, 153, 82, 155, 197, 13, 82, 222, 136, 0,
728 64, 65, 3, 8, 8, 4, 201, 30, 8, 135,
729 48, 105, 64, 65, 35, 8, 15, 16, 8, 37,
730 13, 14, 40, 13, 14, 8, 44, 8, 9, 19,
731 17, 15, 16, 8, 9, 21, 37, 303, 56, 40,
732 106, 8, 9, 44, 110, 12, 8, 99, 8, 9,
733 71, 35, 12, 82, 82, 56, 74, 5, 6, 7,
734 8, 9, 10, 11, 12, 13, 14, 136, 36, 82,
735 32, 37, 110, 74, 212, 341, 105, 105, 107, 107,
736 316, 376, 107, 378, 71, 312, 224, 71, 75, 227,
737 56, 77, 110, 116, 107, 221, 332, 115, 99, 47,
738 327, 328, 233, 330, 104, 91, 124, 106, 113, 110,
739 305, 197, 116, 114, 115, 167, 109, 65, 136, 109,
740 121, 104, 106, 124, 224, 106, 110, 227, 105, 215,
741 9, 106, 116, 59, 135, 136, 113, 104, 202, 106,
742 88, 8, 104, 86, 104, 242, 13, 14, 86, 43,
743 168, 169, 4, 55, 240, 224, 103, 105, 227, 384,
744 54, 258, 248, 15, 16, 303, 167, 114, 169, 6,
745 86, 8, 9, 10, 11, 12, 106, 274, 300, 301,
746 110, 48, 8, 201, 14, 3, 204, 13, 14, 311,
747 108, 209, 22, 106, 212, 106, 214, 110, 401, 110,
748 106, 23, 340, 341, 110, 223, 224, 106, 411, 227,
749 47, 110, 14, 43, 41, 45, 109, 235, 99, 100,
750 101, 102, 308, 224, 54, 62, 227, 389, 105, 110,
751 13, 14, 233, 6, 331, 8, 9, 10, 11, 12,
752 13, 14, 13, 14, 334, 376, 19, 378, 338, 106,
753 105, 88, 113, 110, 83, 273, 257, 73, 276, 6,
754 33, 8, 9, 10, 11, 12, 13, 14, 13, 14,
755 15, 16, 15, 16, 47, 48, 83, 6, 53, 8,
756 9, 10, 11, 12, 83, 303, 33, 305, 109, 110,
757 63, 3, 310, 8, 9, 31, 32, 12, 13, 14,
758 47, 48, 303, 99, 100, 101, 102, 113, 3, 82,
759 111, 106, 106, 105, 111, 88, 63, 105, 47, 9,
760 105, 37, 340, 341, 97, 343, 105, 105, 70, 105,
761 3, 8, 105, 62, 107, 82, 113, 117, 27, 113,
762 341, 88, 111, 107, 70, 363, 3, 107, 70, 116,
763 97, 4, 90, 97, 112, 373, 13, 14, 105, 88,
764 107, 70, 110, 98, 27, 106, 105, 24, 25, 26,
765 98, 28, 4, 107, 392, 376, 108, 378, 84, 106,
766 103, 38, 107, 114, 108, 42, 404, 105, 107, 46,
767 408, 105, 49, 50, 51, 52, 106, 108, 115, 104,
768 108, 105, 0, 60, 61, 108, 108, 114, 65, 66,
769 67, 68, 69, 110, 108, 113, 0, 3, 139, 76,
770 13, 78, 79, 26, 74, 56, 8, 115, 85, 110,
771 87, 13, 14, 343, 167, 92, 93, 94, 95, 96,
772 65, 209, 310, 25, 230, 305, 411, 317, 105, 390,
773 264, 221, 404, 392, 226, 340, 396, 276, 40, -1,
774 -1, -1, 44, -1, -1, -1, -1, -1, 50, 51,
775 52, -1, -1, -1, 56, -1, -1, -1, -1, 61,
776 -1, -1, -1, -1, 66, -1, 68, -1, -1, -1,
777 -1, -1, -1, -1, 76, -1, -1, -1, -1, -1,
778 -1, -1, -1, 85, -1, 87, -1, -1, 13, 14,
779 92, -1, 94, 95, 96, 20, -1, -1, -1, 24,
780 25, 26, -1, 28, 29, -1, -1, -1, -1, -1,
Lev Walkind9574ae2005-03-24 16:22:35 +0000781 -1, -1, -1, 38, -1, -1, -1, 42, -1, -1,
782 -1, 46, -1, -1, 49, 50, 51, 52, -1, -1,
Lev Walkin8ea99482005-03-31 21:48:13 +0000783 -1, -1, -1, 58, -1, 60, 61, -1, -1, -1,
Lev Walkind9574ae2005-03-24 16:22:35 +0000784 65, 66, 67, 68, 69, -1, -1, -1, -1, -1,
Lev Walkin8ea99482005-03-31 21:48:13 +0000785 -1, 76, -1, 78, 79, 80, 81, -1, -1, -1,
786 85, -1, 87, -1, 89, 13, 14, 92, 93, 94,
787 95, 96, 20, -1, -1, -1, 24, 25, 26, -1,
788 28, 29, -1, -1, -1, -1, -1, -1, -1, -1,
789 38, -1, -1, -1, 42, -1, -1, -1, 46, -1,
790 -1, 49, 50, 51, 52, -1, -1, -1, -1, -1,
791 58, -1, 60, 61, -1, -1, -1, 65, 66, 67,
792 68, 69, -1, -1, -1, -1, -1, -1, 76, -1,
793 78, 79, 80, 81, -1, -1, -1, 85, -1, 87,
794 13, 14, -1, -1, 92, 93, 94, 95, 96, -1,
795 -1, 24, 25, 26, -1, 28, -1, -1, -1, -1,
796 -1, -1, -1, -1, -1, 38, -1, -1, -1, 42,
797 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
798 -1, -1, -1, -1, -1, -1, -1, 60, 61, -1,
799 -1, -1, 65, 66, 67, 68, 69, -1, -1, -1,
800 -1, -1, -1, 76, -1, 78, 79, -1, -1, -1,
801 -1, -1, 85, -1, 87, 13, 14, -1, -1, 92,
802 93, 94, 95, 96, -1, -1, 24, 25, 26, -1,
803 28, -1, -1, -1, -1, -1, -1, -1, -1, -1,
804 38, -1, -1, -1, 42, -1, -1, -1, 46, -1,
805 -1, 49, 50, 51, 52, -1, -1, -1, -1, -1,
806 -1, -1, 60, 61, -1, -1, -1, 65, 66, 67,
807 68, 69, -1, -1, -1, -1, -1, -1, 76, -1,
808 78, 79, -1, -1, -1, -1, -1, 85, -1, 87,
809 -1, -1, -1, -1, 92, 93, 94, 95, 96
Lev Walkin1004aa92004-09-08 00:28:11 +0000810};
811/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
812#line 3 "/usr/share/bison.simple"
813/* This file comes from bison-1.28. */
814
815/* Skeleton output parser for bison,
816 Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
817
818 This program is free software; you can redistribute it and/or modify
819 it under the terms of the GNU General Public License as published by
820 the Free Software Foundation; either version 2, or (at your option)
821 any later version.
822
823 This program is distributed in the hope that it will be useful,
824 but WITHOUT ANY WARRANTY; without even the implied warranty of
825 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
826 GNU General Public License for more details.
827
828 You should have received a copy of the GNU General Public License
829 along with this program; if not, write to the Free Software
830 Foundation, Inc., 59 Temple Place - Suite 330,
831 Boston, MA 02111-1307, USA. */
832
833/* As a special exception, when this file is copied by Bison into a
834 Bison output file, you may use that output file without restriction.
835 This special exception was added by the Free Software Foundation
836 in version 1.24 of Bison. */
837
838/* This is the parser code that is written into each bison parser
839 when the %semantic_parser declaration is not specified in the grammar.
840 It was written by Richard Stallman by simplifying the hairy parser
841 used when %semantic_parser is specified. */
842
843#ifndef YYSTACK_USE_ALLOCA
844#ifdef alloca
845#define YYSTACK_USE_ALLOCA
846#else /* alloca not defined */
847#ifdef __GNUC__
848#define YYSTACK_USE_ALLOCA
849#define alloca __builtin_alloca
850#else /* not GNU C. */
851#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
852#define YYSTACK_USE_ALLOCA
853#include <alloca.h>
854#else /* not sparc */
855/* We think this test detects Watcom and Microsoft C. */
856/* This used to test MSDOS, but that is a bad idea
857 since that symbol is in the user namespace. */
858#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
859#if 0 /* No need for malloc.h, which pollutes the namespace;
860 instead, just don't use alloca. */
861#include <malloc.h>
862#endif
863#else /* not MSDOS, or __TURBOC__ */
864#if defined(_AIX)
865/* I don't know what this was needed for, but it pollutes the namespace.
866 So I turned it off. rms, 2 May 1997. */
867/* #include <malloc.h> */
868 #pragma alloca
869#define YYSTACK_USE_ALLOCA
870#else /* not MSDOS, or __TURBOC__, or _AIX */
871#if 0
872#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
873 and on HPUX 10. Eventually we can turn this on. */
874#define YYSTACK_USE_ALLOCA
875#define alloca __builtin_alloca
876#endif /* __hpux */
877#endif
878#endif /* not _AIX */
879#endif /* not MSDOS, or __TURBOC__ */
880#endif /* not sparc */
881#endif /* not GNU C */
882#endif /* alloca not defined */
883#endif /* YYSTACK_USE_ALLOCA not defined */
884
885#ifdef YYSTACK_USE_ALLOCA
886#define YYSTACK_ALLOC alloca
Lev Walkinf15320b2004-06-03 03:38:44 +0000887#else
Lev Walkin1004aa92004-09-08 00:28:11 +0000888#define YYSTACK_ALLOC malloc
Lev Walkinf15320b2004-06-03 03:38:44 +0000889#endif
890
Lev Walkin1004aa92004-09-08 00:28:11 +0000891/* Note: there must be only one dollar sign in this file.
892 It is replaced by the list of actions, each action
893 as one case of the switch. */
Lev Walkinf15320b2004-06-03 03:38:44 +0000894
895#define yyerrok (yyerrstatus = 0)
896#define yyclearin (yychar = YYEMPTY)
897#define YYEMPTY -2
898#define YYEOF 0
899#define YYACCEPT goto yyacceptlab
Lev Walkin1004aa92004-09-08 00:28:11 +0000900#define YYABORT goto yyabortlab
Lev Walkinf15320b2004-06-03 03:38:44 +0000901#define YYERROR goto yyerrlab1
Lev Walkin1004aa92004-09-08 00:28:11 +0000902/* Like YYERROR except do call yyerror.
903 This remains here temporarily to ease the
904 transition to the new meaning of YYERROR, for GCC.
Lev Walkinf15320b2004-06-03 03:38:44 +0000905 Once GCC version 2 has supplanted version 1, this can go. */
906#define YYFAIL goto yyerrlab
907#define YYRECOVERING() (!!yyerrstatus)
Lev Walkin1004aa92004-09-08 00:28:11 +0000908#define YYBACKUP(token, value) \
Lev Walkinf15320b2004-06-03 03:38:44 +0000909do \
910 if (yychar == YYEMPTY && yylen == 1) \
Lev Walkin1004aa92004-09-08 00:28:11 +0000911 { yychar = (token), yylval = (value); \
Lev Walkinf15320b2004-06-03 03:38:44 +0000912 yychar1 = YYTRANSLATE (yychar); \
913 YYPOPSTACK; \
914 goto yybackup; \
915 } \
916 else \
Lev Walkin1004aa92004-09-08 00:28:11 +0000917 { yyerror ("syntax error: cannot back up"); YYERROR; } \
Lev Walkinf15320b2004-06-03 03:38:44 +0000918while (0)
919
920#define YYTERROR 1
921#define YYERRCODE 256
922
Lev Walkin1004aa92004-09-08 00:28:11 +0000923#ifndef YYPURE
924#define YYLEX yylex()
Lev Walkinf15320b2004-06-03 03:38:44 +0000925#endif
926
Lev Walkin1004aa92004-09-08 00:28:11 +0000927#ifdef YYPURE
928#ifdef YYLSP_NEEDED
929#ifdef YYLEX_PARAM
930#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
931#else
932#define YYLEX yylex(&yylval, &yylloc)
933#endif
934#else /* not YYLSP_NEEDED */
935#ifdef YYLEX_PARAM
936#define YYLEX yylex(&yylval, YYLEX_PARAM)
937#else
938#define YYLEX yylex(&yylval)
939#endif
940#endif /* not YYLSP_NEEDED */
941#endif
Lev Walkinf15320b2004-06-03 03:38:44 +0000942
Lev Walkin1004aa92004-09-08 00:28:11 +0000943/* If nonreentrant, generate the variables here */
Lev Walkinf15320b2004-06-03 03:38:44 +0000944
Lev Walkin1004aa92004-09-08 00:28:11 +0000945#ifndef YYPURE
Lev Walkinf15320b2004-06-03 03:38:44 +0000946
Lev Walkin1004aa92004-09-08 00:28:11 +0000947int yychar; /* the lookahead symbol */
948YYSTYPE yylval; /* the semantic value of the */
949 /* lookahead symbol */
Lev Walkinf15320b2004-06-03 03:38:44 +0000950
Lev Walkin1004aa92004-09-08 00:28:11 +0000951#ifdef YYLSP_NEEDED
952YYLTYPE yylloc; /* location data for the lookahead */
953 /* symbol */
954#endif
Lev Walkinf15320b2004-06-03 03:38:44 +0000955
Lev Walkin1004aa92004-09-08 00:28:11 +0000956int yynerrs; /* number of parse errors so far */
957#endif /* not YYPURE */
958
959#if YYDEBUG != 0
960int yydebug; /* nonzero means print parse trace */
961/* Since this is uninitialized, it does not stop multiple parsers
962 from coexisting. */
963#endif
964
965/* YYINITDEPTH indicates the initial size of the parser's stacks */
966
Lev Walkinf15320b2004-06-03 03:38:44 +0000967#ifndef YYINITDEPTH
Lev Walkin1004aa92004-09-08 00:28:11 +0000968#define YYINITDEPTH 200
Lev Walkinf15320b2004-06-03 03:38:44 +0000969#endif
970
Lev Walkin1004aa92004-09-08 00:28:11 +0000971/* YYMAXDEPTH is the maximum size the stacks can grow to
972 (effective only if the built-in stack extension method is used). */
Lev Walkinf15320b2004-06-03 03:38:44 +0000973
974#if YYMAXDEPTH == 0
Lev Walkin1004aa92004-09-08 00:28:11 +0000975#undef YYMAXDEPTH
Lev Walkinf15320b2004-06-03 03:38:44 +0000976#endif
977
978#ifndef YYMAXDEPTH
Lev Walkin1004aa92004-09-08 00:28:11 +0000979#define YYMAXDEPTH 10000
Lev Walkinf15320b2004-06-03 03:38:44 +0000980#endif
981
Lev Walkin1004aa92004-09-08 00:28:11 +0000982/* Define __yy_memcpy. Note that the size argument
983 should be passed with type unsigned int, because that is what the non-GCC
984 definitions require. With GCC, __builtin_memcpy takes an arg
985 of type size_t, but it can handle unsigned int. */
Lev Walkinf15320b2004-06-03 03:38:44 +0000986
Lev Walkin1004aa92004-09-08 00:28:11 +0000987#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
988#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
989#else /* not GNU C or C++ */
990#ifndef __cplusplus
Lev Walkinf15320b2004-06-03 03:38:44 +0000991
Lev Walkin1004aa92004-09-08 00:28:11 +0000992/* This is the most reliable way to avoid incompatibilities
993 in available built-in functions on various systems. */
Lev Walkin459ab022004-09-07 10:39:09 +0000994static void
Lev Walkin1004aa92004-09-08 00:28:11 +0000995__yy_memcpy (to, from, count)
996 char *to;
997 char *from;
998 unsigned int count;
Lev Walkin459ab022004-09-07 10:39:09 +0000999{
Lev Walkin1004aa92004-09-08 00:28:11 +00001000 register char *f = from;
1001 register char *t = to;
1002 register int i = count;
Lev Walkin459ab022004-09-07 10:39:09 +00001003
Lev Walkin1004aa92004-09-08 00:28:11 +00001004 while (i-- > 0)
1005 *t++ = *f++;
Lev Walkin459ab022004-09-07 10:39:09 +00001006}
Lev Walkin459ab022004-09-07 10:39:09 +00001007
Lev Walkin1004aa92004-09-08 00:28:11 +00001008#else /* __cplusplus */
Lev Walkin459ab022004-09-07 10:39:09 +00001009
Lev Walkin1004aa92004-09-08 00:28:11 +00001010/* This is the most reliable way to avoid incompatibilities
1011 in available built-in functions on various systems. */
Lev Walkin459ab022004-09-07 10:39:09 +00001012static void
Lev Walkin1004aa92004-09-08 00:28:11 +00001013__yy_memcpy (char *to, char *from, unsigned int count)
Lev Walkin459ab022004-09-07 10:39:09 +00001014{
Lev Walkin1004aa92004-09-08 00:28:11 +00001015 register char *t = to;
1016 register char *f = from;
1017 register int i = count;
Lev Walkin459ab022004-09-07 10:39:09 +00001018
Lev Walkin1004aa92004-09-08 00:28:11 +00001019 while (i-- > 0)
1020 *t++ = *f++;
Lev Walkin609ccbb2004-09-04 04:49:21 +00001021}
Lev Walkin609ccbb2004-09-04 04:49:21 +00001022
Lev Walkin1004aa92004-09-08 00:28:11 +00001023#endif
1024#endif
Lev Walkinf15320b2004-06-03 03:38:44 +00001025
Lev Walkin1004aa92004-09-08 00:28:11 +00001026#line 217 "/usr/share/bison.simple"
Lev Walkinf15320b2004-06-03 03:38:44 +00001027
1028/* The user can define YYPARSE_PARAM as the name of an argument to be passed
1029 into yyparse. The argument should have type void *.
1030 It should actually point to an object.
1031 Grammar actions can access the variable by casting it
1032 to the proper pointer type. */
1033
1034#ifdef YYPARSE_PARAM
Lev Walkin1004aa92004-09-08 00:28:11 +00001035#ifdef __cplusplus
1036#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
1037#define YYPARSE_PARAM_DECL
1038#else /* not __cplusplus */
1039#define YYPARSE_PARAM_ARG YYPARSE_PARAM
1040#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
1041#endif /* not __cplusplus */
1042#else /* not YYPARSE_PARAM */
1043#define YYPARSE_PARAM_ARG
1044#define YYPARSE_PARAM_DECL
1045#endif /* not YYPARSE_PARAM */
Lev Walkinf15320b2004-06-03 03:38:44 +00001046
1047/* Prevent warning if -Wstrict-prototypes. */
1048#ifdef __GNUC__
Lev Walkin1004aa92004-09-08 00:28:11 +00001049#ifdef YYPARSE_PARAM
Lev Walkinf15320b2004-06-03 03:38:44 +00001050int yyparse (void *);
Lev Walkin1004aa92004-09-08 00:28:11 +00001051#else
Lev Walkinf15320b2004-06-03 03:38:44 +00001052int yyparse (void);
Lev Walkin1004aa92004-09-08 00:28:11 +00001053#endif
Lev Walkinceb20e72004-09-05 10:40:41 +00001054#endif
Lev Walkin459ab022004-09-07 10:39:09 +00001055
Lev Walkinf15320b2004-06-03 03:38:44 +00001056int
Lev Walkin1004aa92004-09-08 00:28:11 +00001057yyparse(YYPARSE_PARAM_ARG)
Lev Walkinf15320b2004-06-03 03:38:44 +00001058 YYPARSE_PARAM_DECL
1059{
1060 register int yystate;
1061 register int yyn;
1062 register short *yyssp;
1063 register YYSTYPE *yyvsp;
Lev Walkin1004aa92004-09-08 00:28:11 +00001064 int yyerrstatus; /* number of tokens to shift before error messages enabled */
1065 int yychar1 = 0; /* lookahead token as an internal (translated) token number */
Lev Walkinf15320b2004-06-03 03:38:44 +00001066
Lev Walkin1004aa92004-09-08 00:28:11 +00001067 short yyssa[YYINITDEPTH]; /* the state stack */
1068 YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
Lev Walkinf15320b2004-06-03 03:38:44 +00001069
Lev Walkin1004aa92004-09-08 00:28:11 +00001070 short *yyss = yyssa; /* refer to the stacks thru separate pointers */
1071 YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
Lev Walkinf15320b2004-06-03 03:38:44 +00001072
Lev Walkin1004aa92004-09-08 00:28:11 +00001073#ifdef YYLSP_NEEDED
1074 YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
1075 YYLTYPE *yyls = yylsa;
1076 YYLTYPE *yylsp;
1077
1078#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
1079#else
Lev Walkinf15320b2004-06-03 03:38:44 +00001080#define YYPOPSTACK (yyvsp--, yyssp--)
Lev Walkin1004aa92004-09-08 00:28:11 +00001081#endif
Lev Walkinf15320b2004-06-03 03:38:44 +00001082
Lev Walkin1004aa92004-09-08 00:28:11 +00001083 int yystacksize = YYINITDEPTH;
1084 int yyfree_stacks = 0;
Lev Walkinf15320b2004-06-03 03:38:44 +00001085
Lev Walkin1004aa92004-09-08 00:28:11 +00001086#ifdef YYPURE
1087 int yychar;
1088 YYSTYPE yylval;
1089 int yynerrs;
1090#ifdef YYLSP_NEEDED
1091 YYLTYPE yylloc;
1092#endif
1093#endif
Lev Walkinf15320b2004-06-03 03:38:44 +00001094
Lev Walkin1004aa92004-09-08 00:28:11 +00001095 YYSTYPE yyval; /* the variable used to return */
1096 /* semantic values from the action */
1097 /* routines */
Lev Walkinf15320b2004-06-03 03:38:44 +00001098
1099 int yylen;
1100
Lev Walkin1004aa92004-09-08 00:28:11 +00001101#if YYDEBUG != 0
1102 if (yydebug)
1103 fprintf(stderr, "Starting parse\n");
1104#endif
Lev Walkinf15320b2004-06-03 03:38:44 +00001105
1106 yystate = 0;
1107 yyerrstatus = 0;
1108 yynerrs = 0;
1109 yychar = YYEMPTY; /* Cause a token to be read. */
1110
1111 /* Initialize stack pointers.
1112 Waste one element of value and location stack
1113 so that they stay on the same level as the state stack.
1114 The wasted elements are never initialized. */
1115
Lev Walkin1004aa92004-09-08 00:28:11 +00001116 yyssp = yyss - 1;
Lev Walkinf15320b2004-06-03 03:38:44 +00001117 yyvsp = yyvs;
Lev Walkin1004aa92004-09-08 00:28:11 +00001118#ifdef YYLSP_NEEDED
1119 yylsp = yyls;
1120#endif
Lev Walkinf15320b2004-06-03 03:38:44 +00001121
Lev Walkin1004aa92004-09-08 00:28:11 +00001122/* Push a new state, which is found in yystate . */
1123/* In all cases, when you get here, the value and location stacks
1124 have just been pushed. so pushing a state here evens the stacks. */
1125yynewstate:
Lev Walkinf15320b2004-06-03 03:38:44 +00001126
Lev Walkin1004aa92004-09-08 00:28:11 +00001127 *++yyssp = yystate;
Lev Walkinf15320b2004-06-03 03:38:44 +00001128
1129 if (yyssp >= yyss + yystacksize - 1)
1130 {
Lev Walkin1004aa92004-09-08 00:28:11 +00001131 /* Give user a chance to reallocate the stack */
1132 /* Use copies of these so that the &'s don't force the real ones into memory. */
1133 YYSTYPE *yyvs1 = yyvs;
1134 short *yyss1 = yyss;
1135#ifdef YYLSP_NEEDED
1136 YYLTYPE *yyls1 = yyls;
1137#endif
1138
Lev Walkinf15320b2004-06-03 03:38:44 +00001139 /* Get the current used size of the three stacks, in elements. */
Lev Walkin1004aa92004-09-08 00:28:11 +00001140 int size = yyssp - yyss + 1;
Lev Walkinf15320b2004-06-03 03:38:44 +00001141
1142#ifdef yyoverflow
Lev Walkin1004aa92004-09-08 00:28:11 +00001143 /* Each stack pointer address is followed by the size of
1144 the data in use in that stack, in bytes. */
1145#ifdef YYLSP_NEEDED
1146 /* This used to be a conditional around just the two extra args,
1147 but that might be undefined if yyoverflow is a macro. */
1148 yyoverflow("parser stack overflow",
1149 &yyss1, size * sizeof (*yyssp),
1150 &yyvs1, size * sizeof (*yyvsp),
1151 &yyls1, size * sizeof (*yylsp),
1152 &yystacksize);
1153#else
1154 yyoverflow("parser stack overflow",
1155 &yyss1, size * sizeof (*yyssp),
1156 &yyvs1, size * sizeof (*yyvsp),
1157 &yystacksize);
1158#endif
Lev Walkinf15320b2004-06-03 03:38:44 +00001159
Lev Walkin1004aa92004-09-08 00:28:11 +00001160 yyss = yyss1; yyvs = yyvs1;
1161#ifdef YYLSP_NEEDED
1162 yyls = yyls1;
1163#endif
Lev Walkinf15320b2004-06-03 03:38:44 +00001164#else /* no yyoverflow */
1165 /* Extend the stack our own way. */
1166 if (yystacksize >= YYMAXDEPTH)
Lev Walkin1004aa92004-09-08 00:28:11 +00001167 {
1168 yyerror("parser stack overflow");
1169 if (yyfree_stacks)
1170 {
1171 free (yyss);
1172 free (yyvs);
1173#ifdef YYLSP_NEEDED
1174 free (yyls);
1175#endif
1176 }
1177 return 2;
1178 }
Lev Walkinf15320b2004-06-03 03:38:44 +00001179 yystacksize *= 2;
1180 if (yystacksize > YYMAXDEPTH)
1181 yystacksize = YYMAXDEPTH;
Lev Walkin1004aa92004-09-08 00:28:11 +00001182#ifndef YYSTACK_USE_ALLOCA
1183 yyfree_stacks = 1;
1184#endif
1185 yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
1186 __yy_memcpy ((char *)yyss, (char *)yyss1,
1187 size * (unsigned int) sizeof (*yyssp));
1188 yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
1189 __yy_memcpy ((char *)yyvs, (char *)yyvs1,
1190 size * (unsigned int) sizeof (*yyvsp));
1191#ifdef YYLSP_NEEDED
1192 yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
1193 __yy_memcpy ((char *)yyls, (char *)yyls1,
1194 size * (unsigned int) sizeof (*yylsp));
1195#endif
Lev Walkinf15320b2004-06-03 03:38:44 +00001196#endif /* no yyoverflow */
1197
Lev Walkin1004aa92004-09-08 00:28:11 +00001198 yyssp = yyss + size - 1;
1199 yyvsp = yyvs + size - 1;
1200#ifdef YYLSP_NEEDED
1201 yylsp = yyls + size - 1;
1202#endif
Lev Walkinf15320b2004-06-03 03:38:44 +00001203
Lev Walkin1004aa92004-09-08 00:28:11 +00001204#if YYDEBUG != 0
1205 if (yydebug)
1206 fprintf(stderr, "Stack size increased to %d\n", yystacksize);
1207#endif
Lev Walkinf15320b2004-06-03 03:38:44 +00001208
1209 if (yyssp >= yyss + yystacksize - 1)
1210 YYABORT;
1211 }
1212
Lev Walkin1004aa92004-09-08 00:28:11 +00001213#if YYDEBUG != 0
1214 if (yydebug)
1215 fprintf(stderr, "Entering state %d\n", yystate);
1216#endif
Lev Walkinf15320b2004-06-03 03:38:44 +00001217
1218 goto yybackup;
Lev Walkin1004aa92004-09-08 00:28:11 +00001219 yybackup:
Lev Walkinf15320b2004-06-03 03:38:44 +00001220
1221/* Do appropriate processing given the current state. */
1222/* Read a lookahead token if we need one and don't already have one. */
1223/* yyresume: */
1224
1225 /* First try to decide what to do without reference to lookahead token. */
1226
1227 yyn = yypact[yystate];
Lev Walkin1004aa92004-09-08 00:28:11 +00001228 if (yyn == YYFLAG)
Lev Walkinf15320b2004-06-03 03:38:44 +00001229 goto yydefault;
1230
1231 /* Not known => get a lookahead token if don't already have one. */
1232
1233 /* yychar is either YYEMPTY or YYEOF
1234 or a valid token in external form. */
1235
1236 if (yychar == YYEMPTY)
1237 {
Lev Walkin1004aa92004-09-08 00:28:11 +00001238#if YYDEBUG != 0
1239 if (yydebug)
1240 fprintf(stderr, "Reading a token: ");
1241#endif
Lev Walkinf15320b2004-06-03 03:38:44 +00001242 yychar = YYLEX;
1243 }
1244
Lev Walkin1004aa92004-09-08 00:28:11 +00001245 /* Convert token to internal form (in yychar1) for indexing tables with */
Lev Walkinf15320b2004-06-03 03:38:44 +00001246
Lev Walkin1004aa92004-09-08 00:28:11 +00001247 if (yychar <= 0) /* This means end of input. */
Lev Walkinf15320b2004-06-03 03:38:44 +00001248 {
1249 yychar1 = 0;
Lev Walkin1004aa92004-09-08 00:28:11 +00001250 yychar = YYEOF; /* Don't call YYLEX any more */
Lev Walkinf15320b2004-06-03 03:38:44 +00001251
Lev Walkin1004aa92004-09-08 00:28:11 +00001252#if YYDEBUG != 0
1253 if (yydebug)
1254 fprintf(stderr, "Now at end of input.\n");
1255#endif
Lev Walkinf15320b2004-06-03 03:38:44 +00001256 }
1257 else
1258 {
Lev Walkin1004aa92004-09-08 00:28:11 +00001259 yychar1 = YYTRANSLATE(yychar);
Lev Walkinf15320b2004-06-03 03:38:44 +00001260
Lev Walkin1004aa92004-09-08 00:28:11 +00001261#if YYDEBUG != 0
1262 if (yydebug)
1263 {
1264 fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
1265 /* Give the individual parser a way to print the precise meaning
1266 of a token, for further debugging info. */
1267#ifdef YYPRINT
1268 YYPRINT (stderr, yychar, yylval);
1269#endif
1270 fprintf (stderr, ")\n");
1271 }
1272#endif
Lev Walkinf15320b2004-06-03 03:38:44 +00001273 }
1274
1275 yyn += yychar1;
Lev Walkin1004aa92004-09-08 00:28:11 +00001276 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
Lev Walkinf15320b2004-06-03 03:38:44 +00001277 goto yydefault;
Lev Walkin1004aa92004-09-08 00:28:11 +00001278
Lev Walkinf15320b2004-06-03 03:38:44 +00001279 yyn = yytable[yyn];
Lev Walkin1004aa92004-09-08 00:28:11 +00001280
1281 /* yyn is what to do for this token type in this state.
1282 Negative => reduce, -yyn is rule number.
1283 Positive => shift, yyn is new state.
1284 New state is final state => don't bother to shift,
1285 just return success.
1286 0, or most negative number => error. */
1287
1288 if (yyn < 0)
Lev Walkinf15320b2004-06-03 03:38:44 +00001289 {
Lev Walkin1004aa92004-09-08 00:28:11 +00001290 if (yyn == YYFLAG)
Lev Walkinf15320b2004-06-03 03:38:44 +00001291 goto yyerrlab;
1292 yyn = -yyn;
1293 goto yyreduce;
1294 }
Lev Walkin1004aa92004-09-08 00:28:11 +00001295 else if (yyn == 0)
1296 goto yyerrlab;
Lev Walkinf15320b2004-06-03 03:38:44 +00001297
1298 if (yyn == YYFINAL)
1299 YYACCEPT;
1300
1301 /* Shift the lookahead token. */
Lev Walkin1004aa92004-09-08 00:28:11 +00001302
1303#if YYDEBUG != 0
1304 if (yydebug)
1305 fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
1306#endif
Lev Walkinf15320b2004-06-03 03:38:44 +00001307
1308 /* Discard the token being shifted unless it is eof. */
1309 if (yychar != YYEOF)
1310 yychar = YYEMPTY;
1311
1312 *++yyvsp = yylval;
Lev Walkin1004aa92004-09-08 00:28:11 +00001313#ifdef YYLSP_NEEDED
1314 *++yylsp = yylloc;
1315#endif
Lev Walkinf15320b2004-06-03 03:38:44 +00001316
Lev Walkin1004aa92004-09-08 00:28:11 +00001317 /* count tokens shifted since error; after three, turn off error status. */
1318 if (yyerrstatus) yyerrstatus--;
Lev Walkinf15320b2004-06-03 03:38:44 +00001319
1320 yystate = yyn;
1321 goto yynewstate;
1322
Lev Walkin1004aa92004-09-08 00:28:11 +00001323/* Do the default action for the current state. */
Lev Walkin459ab022004-09-07 10:39:09 +00001324yydefault:
Lev Walkin1004aa92004-09-08 00:28:11 +00001325
Lev Walkinf15320b2004-06-03 03:38:44 +00001326 yyn = yydefact[yystate];
1327 if (yyn == 0)
1328 goto yyerrlab;
1329
Lev Walkin1004aa92004-09-08 00:28:11 +00001330/* Do a reduction. yyn is the number of a rule to reduce with. */
Lev Walkinf15320b2004-06-03 03:38:44 +00001331yyreduce:
1332 yylen = yyr2[yyn];
Lev Walkin1004aa92004-09-08 00:28:11 +00001333 if (yylen > 0)
1334 yyval = yyvsp[1-yylen]; /* implement default value of the action */
Lev Walkinf15320b2004-06-03 03:38:44 +00001335
Lev Walkin1004aa92004-09-08 00:28:11 +00001336#if YYDEBUG != 0
Lev Walkinf15320b2004-06-03 03:38:44 +00001337 if (yydebug)
1338 {
Lev Walkin1004aa92004-09-08 00:28:11 +00001339 int i;
Lev Walkinf15320b2004-06-03 03:38:44 +00001340
Lev Walkin1004aa92004-09-08 00:28:11 +00001341 fprintf (stderr, "Reducing via rule %d (line %d), ",
1342 yyn, yyrline[yyn]);
Lev Walkinf15320b2004-06-03 03:38:44 +00001343
1344 /* Print the symbols being reduced, and their result. */
Lev Walkin1004aa92004-09-08 00:28:11 +00001345 for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
1346 fprintf (stderr, "%s ", yytname[yyrhs[i]]);
1347 fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
Lev Walkinf15320b2004-06-03 03:38:44 +00001348 }
1349#endif
Lev Walkin459ab022004-09-07 10:39:09 +00001350
Lev Walkin1004aa92004-09-08 00:28:11 +00001351
1352 switch (yyn) {
1353
1354case 1:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001355#line 307 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001356{
1357 *(void **)param = yyvsp[0].a_grammar;
1358 ;
1359 break;}
1360case 2:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001361#line 313 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001362{
Lev Walkinf15320b2004-06-03 03:38:44 +00001363 yyval.a_grammar = asn1p_new();
1364 checkmem(yyval.a_grammar);
1365 TQ_ADD(&(yyval.a_grammar->modules), yyvsp[0].a_module, mod_next);
Lev Walkin1004aa92004-09-08 00:28:11 +00001366 ;
1367 break;}
1368case 3:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001369#line 318 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001370{
Lev Walkinf15320b2004-06-03 03:38:44 +00001371 yyval.a_grammar = yyvsp[-1].a_grammar;
1372 TQ_ADD(&(yyval.a_grammar->modules), yyvsp[0].a_module, mod_next);
Lev Walkin1004aa92004-09-08 00:28:11 +00001373 ;
1374 break;}
1375case 4:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001376#line 339 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001377{
Lev Walkinf15320b2004-06-03 03:38:44 +00001378
1379 if(yyvsp[-1].a_module) {
1380 yyval.a_module = yyvsp[-1].a_module;
1381 } else {
1382 /* There's a chance that a module is just plain empty */
1383 yyval.a_module = asn1p_module_new();
1384 }
1385 checkmem(yyval.a_module);
1386
1387 yyval.a_module->Identifier = yyvsp[-7].tv_str;
1388 yyval.a_module->module_oid = yyvsp[-6].a_oid;
1389 yyval.a_module->module_flags = yyvsp[-4].a_module_flags;
Lev Walkin1004aa92004-09-08 00:28:11 +00001390 ;
1391 break;}
1392case 5:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001393#line 360 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001394{ yyval.a_oid = 0; ;
1395 break;}
1396case 6:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001397#line 361 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001398{ yyval.a_oid = yyvsp[0].a_oid; ;
1399 break;}
1400case 7:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001401#line 365 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001402{
Lev Walkinf15320b2004-06-03 03:38:44 +00001403 yyval.a_oid = yyvsp[-1].a_oid;
Lev Walkin1004aa92004-09-08 00:28:11 +00001404 ;
1405 break;}
1406case 8:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001407#line 368 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001408{
Lev Walkinf15320b2004-06-03 03:38:44 +00001409 yyval.a_oid = 0;
Lev Walkin1004aa92004-09-08 00:28:11 +00001410 ;
1411 break;}
1412case 9:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001413#line 374 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001414{
Lev Walkinf15320b2004-06-03 03:38:44 +00001415 yyval.a_oid = asn1p_oid_new();
1416 asn1p_oid_add_arc(yyval.a_oid, &yyvsp[0].a_oid_arc);
1417 if(yyvsp[0].a_oid_arc.name)
1418 free(yyvsp[0].a_oid_arc.name);
Lev Walkin1004aa92004-09-08 00:28:11 +00001419 ;
1420 break;}
1421case 10:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001422#line 380 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001423{
Lev Walkinf15320b2004-06-03 03:38:44 +00001424 yyval.a_oid = yyvsp[-1].a_oid;
1425 asn1p_oid_add_arc(yyval.a_oid, &yyvsp[0].a_oid_arc);
1426 if(yyvsp[0].a_oid_arc.name)
1427 free(yyvsp[0].a_oid_arc.name);
Lev Walkin1004aa92004-09-08 00:28:11 +00001428 ;
1429 break;}
1430case 11:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001431#line 389 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001432{ /* iso */
Lev Walkinf15320b2004-06-03 03:38:44 +00001433 yyval.a_oid_arc.name = yyvsp[0].tv_str;
1434 yyval.a_oid_arc.number = -1;
Lev Walkin1004aa92004-09-08 00:28:11 +00001435 ;
1436 break;}
1437case 12:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001438#line 393 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001439{ /* iso(1) */
Lev Walkinf15320b2004-06-03 03:38:44 +00001440 yyval.a_oid_arc.name = yyvsp[-3].tv_str;
1441 yyval.a_oid_arc.number = yyvsp[-1].a_int;
Lev Walkin1004aa92004-09-08 00:28:11 +00001442 ;
1443 break;}
1444case 13:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001445#line 397 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001446{ /* 1 */
Lev Walkinf15320b2004-06-03 03:38:44 +00001447 yyval.a_oid_arc.name = 0;
1448 yyval.a_oid_arc.number = yyvsp[0].a_int;
Lev Walkin1004aa92004-09-08 00:28:11 +00001449 ;
1450 break;}
1451case 14:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001452#line 407 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001453{ yyval.a_module_flags = MSF_NOFLAGS; ;
1454 break;}
1455case 15:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001456#line 408 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001457{
Lev Walkinf15320b2004-06-03 03:38:44 +00001458 yyval.a_module_flags = yyvsp[0].a_module_flags;
Lev Walkin1004aa92004-09-08 00:28:11 +00001459 ;
1460 break;}
1461case 16:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001462#line 417 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001463{
Lev Walkinf15320b2004-06-03 03:38:44 +00001464 yyval.a_module_flags = yyvsp[0].a_module_flags;
Lev Walkin1004aa92004-09-08 00:28:11 +00001465 ;
1466 break;}
1467case 17:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001468#line 420 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001469{
Lev Walkinf15320b2004-06-03 03:38:44 +00001470 yyval.a_module_flags = yyvsp[-1].a_module_flags | yyvsp[0].a_module_flags;
Lev Walkin1004aa92004-09-08 00:28:11 +00001471 ;
1472 break;}
1473case 18:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001474#line 429 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001475{
Lev Walkinf15320b2004-06-03 03:38:44 +00001476 yyval.a_module_flags = MSF_EXPLICIT_TAGS;
Lev Walkin1004aa92004-09-08 00:28:11 +00001477 ;
1478 break;}
1479case 19:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001480#line 432 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001481{
Lev Walkinf15320b2004-06-03 03:38:44 +00001482 yyval.a_module_flags = MSF_IMPLICIT_TAGS;
Lev Walkin1004aa92004-09-08 00:28:11 +00001483 ;
1484 break;}
1485case 20:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001486#line 435 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001487{
Lev Walkinf15320b2004-06-03 03:38:44 +00001488 yyval.a_module_flags = MSF_AUTOMATIC_TAGS;
Lev Walkin1004aa92004-09-08 00:28:11 +00001489 ;
1490 break;}
1491case 21:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001492#line 438 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001493{
Lev Walkinf15320b2004-06-03 03:38:44 +00001494 yyval.a_module_flags = MSF_EXTENSIBILITY_IMPLIED;
Lev Walkin1004aa92004-09-08 00:28:11 +00001495 ;
1496 break;}
1497case 22:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001498#line 442 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001499{
Lev Walkinf59d0752004-08-18 04:59:12 +00001500 /* X.680Amd1 specifies TAG and XER */
1501 if(strcmp(yyvsp[-1].tv_str, "TAG") == 0) {
1502 yyval.a_module_flags = MSF_TAG_INSTRUCTIONS;
1503 } else if(strcmp(yyvsp[-1].tv_str, "XER") == 0) {
1504 yyval.a_module_flags = MSF_XER_INSTRUCTIONS;
1505 } else {
1506 fprintf(stderr,
1507 "WARNING: %s INSTRUCTIONS at line %d: "
1508 "Unrecognized encoding reference\n",
1509 yyvsp[-1].tv_str, yylineno);
1510 yyval.a_module_flags = MSF_unk_INSTRUCTIONS;
1511 }
1512 free(yyvsp[-1].tv_str);
Lev Walkin1004aa92004-09-08 00:28:11 +00001513 ;
1514 break;}
1515case 23:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001516#line 463 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001517{ yyval.a_module = 0; ;
1518 break;}
1519case 24:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001520#line 464 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001521{
Lev Walkinf15320b2004-06-03 03:38:44 +00001522 yyval.a_module = yyvsp[0].a_module;
Lev Walkin1004aa92004-09-08 00:28:11 +00001523 ;
1524 break;}
1525case 25:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001526#line 473 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001527{
Lev Walkinf59d0752004-08-18 04:59:12 +00001528 yyval.a_module = yyvsp[0].a_module;
Lev Walkin1004aa92004-09-08 00:28:11 +00001529 ;
1530 break;}
1531case 26:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001532#line 476 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001533{
Lev Walkinf15320b2004-06-03 03:38:44 +00001534 yyval.a_module = yyvsp[-1].a_module;
1535
Lev Walkinf59d0752004-08-18 04:59:12 +00001536 /* Behave well when one of them is skipped. */
1537 if(!(yyvsp[-1].a_module)) {
1538 if(yyvsp[0].a_module) yyval.a_module = yyvsp[0].a_module;
1539 break;
1540 }
1541
Lev Walkinf15320b2004-06-03 03:38:44 +00001542#ifdef MY_IMPORT
1543#error MY_IMPORT DEFINED ELSEWHERE!
1544#endif
1545#define MY_IMPORT(foo,field) do { \
Lev Walkinbc55d232004-08-13 12:31:09 +00001546 while(TQ_FIRST(&(yyvsp[0].a_module->foo))) { \
Lev Walkinf15320b2004-06-03 03:38:44 +00001547 TQ_ADD(&(yyval.a_module->foo), \
1548 TQ_REMOVE(&(yyvsp[0].a_module->foo), field), \
1549 field); \
Lev Walkinbc55d232004-08-13 12:31:09 +00001550 } \
1551 assert(TQ_FIRST(&(yyvsp[0].a_module->foo)) == 0); \
1552 } while(0)
Lev Walkinf15320b2004-06-03 03:38:44 +00001553
1554 MY_IMPORT(imports, xp_next);
1555 MY_IMPORT(exports, xp_next);
1556 MY_IMPORT(members, next);
1557#undef MY_IMPORT
1558
Lev Walkin1004aa92004-09-08 00:28:11 +00001559 ;
1560 break;}
1561case 27:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001562#line 509 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001563{
Lev Walkinf15320b2004-06-03 03:38:44 +00001564 yyval.a_module = yyvsp[0].a_module;
Lev Walkin1004aa92004-09-08 00:28:11 +00001565 ;
1566 break;}
1567case 28:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001568#line 512 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001569{
Lev Walkinf15320b2004-06-03 03:38:44 +00001570 yyval.a_module = asn1p_module_new();
1571 checkmem(yyval.a_module);
1572 if(yyvsp[0].a_xports) {
1573 TQ_ADD(&(yyval.a_module->exports), yyvsp[0].a_xports, xp_next);
1574 } else {
1575 /* "EXPORTS ALL;" ? */
1576 }
Lev Walkin1004aa92004-09-08 00:28:11 +00001577 ;
1578 break;}
1579case 29:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001580#line 521 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001581{
Lev Walkinf15320b2004-06-03 03:38:44 +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);
Lev Walkin1004aa92004-09-08 00:28:11 +00001587 ;
1588 break;}
1589case 30:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001590#line 528 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001591{
Lev Walkinf59d0752004-08-18 04:59:12 +00001592 yyval.a_module = asn1p_module_new();
1593 checkmem(yyval.a_module);
1594 assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
1595 assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
1596 TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
Lev Walkin1004aa92004-09-08 00:28:11 +00001597 ;
1598 break;}
1599case 31:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001600#line 541 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001601{
Lev Walkinf59d0752004-08-18 04:59:12 +00001602 yyval.a_module = asn1p_module_new();
1603 checkmem(yyval.a_module);
1604 assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
1605 assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
1606 TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
Lev Walkin1004aa92004-09-08 00:28:11 +00001607 ;
1608 break;}
1609case 32:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001610#line 549 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001611{ asn1p_lexer_hack_push_encoding_control(); ;
1612 break;}
1613case 33:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001614#line 550 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001615{
Lev Walkinf59d0752004-08-18 04:59:12 +00001616 fprintf(stderr,
1617 "WARNING: ENCODING-CONTROL %s "
1618 "specification at line %d ignored\n",
1619 yyvsp[-1].tv_str, yylineno);
1620 free(yyvsp[-1].tv_str);
1621 yyval.a_module = 0;
Lev Walkin1004aa92004-09-08 00:28:11 +00001622 ;
1623 break;}
1624case 34:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001625#line 562 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001626{
Lev Walkinf15320b2004-06-03 03:38:44 +00001627 return yyerror(
1628 "Attempt to redefine a standard basic type, "
1629 "use -ftypesXY to switch back "
1630 "to older version of ASN.1 standard");
Lev Walkin1004aa92004-09-08 00:28:11 +00001631 ;
1632 break;}
1633case 35:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001634#line 576 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001635{
Lev Walkinf15320b2004-06-03 03:38:44 +00001636 yyval.a_module = yyvsp[-1].a_module;
Lev Walkin1004aa92004-09-08 00:28:11 +00001637 ;
1638 break;}
1639case 36:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001640#line 582 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001641{
Lev Walkinf15320b2004-06-03 03:38:44 +00001642 return yyerror("Empty IMPORTS list");
Lev Walkin1004aa92004-09-08 00:28:11 +00001643 ;
1644 break;}
1645case 37:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001646#line 588 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001647{
Lev Walkinf15320b2004-06-03 03:38:44 +00001648 yyval.a_module = asn1p_module_new();
1649 checkmem(yyval.a_module);
1650 TQ_ADD(&(yyval.a_module->imports), yyvsp[0].a_xports, xp_next);
Lev Walkin1004aa92004-09-08 00:28:11 +00001651 ;
1652 break;}
1653case 38:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001654#line 593 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001655{
Lev Walkinf15320b2004-06-03 03:38:44 +00001656 yyval.a_module = yyvsp[-1].a_module;
1657 TQ_ADD(&(yyval.a_module->imports), yyvsp[0].a_xports, xp_next);
Lev Walkin1004aa92004-09-08 00:28:11 +00001658 ;
1659 break;}
1660case 39:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001661#line 600 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001662{
Lev Walkinf15320b2004-06-03 03:38:44 +00001663 yyval.a_xports = yyvsp[-3].a_xports;
1664 yyval.a_xports->from = yyvsp[-1].tv_str;
1665 yyval.a_xports->from_oid = yyvsp[0].a_oid;
1666 checkmem(yyval.a_xports);
Lev Walkin1004aa92004-09-08 00:28:11 +00001667 ;
1668 break;}
1669case 40:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001670#line 609 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001671{
Lev Walkinf15320b2004-06-03 03:38:44 +00001672 yyval.a_xports = asn1p_xports_new();
1673 checkmem(yyval.a_xports);
1674 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
Lev Walkin1004aa92004-09-08 00:28:11 +00001675 ;
1676 break;}
1677case 41:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001678#line 614 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001679{
Lev Walkinf15320b2004-06-03 03:38:44 +00001680 yyval.a_xports = yyvsp[-2].a_xports;
1681 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
Lev Walkin1004aa92004-09-08 00:28:11 +00001682 ;
1683 break;}
1684case 42:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001685#line 621 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001686{
Lev Walkinf15320b2004-06-03 03:38:44 +00001687 yyval.a_expr = asn1p_expr_new(yylineno);
1688 checkmem(yyval.a_expr);
1689 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1690 yyval.a_expr->expr_type = A1TC_REFERENCE;
Lev Walkin1004aa92004-09-08 00:28:11 +00001691 ;
1692 break;}
1693case 43:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001694#line 627 "asn1p_y.y"
Lev Walkin144db9b2004-10-12 23:26:53 +00001695{ /* Completely equivalent to above */
1696 yyval.a_expr = asn1p_expr_new(yylineno);
1697 checkmem(yyval.a_expr);
1698 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
1699 yyval.a_expr->expr_type = A1TC_REFERENCE;
1700 ;
1701 break;}
1702case 44:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001703#line 633 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001704{
Lev Walkinf15320b2004-06-03 03:38:44 +00001705 yyval.a_expr = asn1p_expr_new(yylineno);
1706 checkmem(yyval.a_expr);
1707 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1708 yyval.a_expr->expr_type = A1TC_REFERENCE;
Lev Walkin1004aa92004-09-08 00:28:11 +00001709 ;
1710 break;}
Lev Walkin144db9b2004-10-12 23:26:53 +00001711case 45:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001712#line 642 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001713{
Lev Walkinf15320b2004-06-03 03:38:44 +00001714 yyval.a_xports = yyvsp[-1].a_xports;
Lev Walkin1004aa92004-09-08 00:28:11 +00001715 ;
1716 break;}
Lev Walkin144db9b2004-10-12 23:26:53 +00001717case 46:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001718#line 645 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001719{
Lev Walkinf15320b2004-06-03 03:38:44 +00001720 yyval.a_xports = 0;
Lev Walkin1004aa92004-09-08 00:28:11 +00001721 ;
1722 break;}
Lev Walkin144db9b2004-10-12 23:26:53 +00001723case 47:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001724#line 648 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001725{
Lev Walkinf15320b2004-06-03 03:38:44 +00001726 /* Empty EXPORTS clause effectively prohibits export. */
1727 yyval.a_xports = asn1p_xports_new();
1728 checkmem(yyval.a_xports);
Lev Walkin1004aa92004-09-08 00:28:11 +00001729 ;
1730 break;}
Lev Walkin144db9b2004-10-12 23:26:53 +00001731case 48:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001732#line 656 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001733{
Lev Walkinf15320b2004-06-03 03:38:44 +00001734 yyval.a_xports = asn1p_xports_new();
1735 assert(yyval.a_xports);
1736 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
Lev Walkin1004aa92004-09-08 00:28:11 +00001737 ;
1738 break;}
Lev Walkin144db9b2004-10-12 23:26:53 +00001739case 49:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001740#line 661 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001741{
Lev Walkinf15320b2004-06-03 03:38:44 +00001742 yyval.a_xports = yyvsp[-2].a_xports;
1743 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
Lev Walkin1004aa92004-09-08 00:28:11 +00001744 ;
1745 break;}
Lev Walkin1004aa92004-09-08 00:28:11 +00001746case 50:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001747#line 668 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001748{
Lev Walkinf15320b2004-06-03 03:38:44 +00001749 yyval.a_expr = asn1p_expr_new(yylineno);
1750 checkmem(yyval.a_expr);
1751 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1752 yyval.a_expr->expr_type = A1TC_EXPORTVAR;
Lev Walkin1004aa92004-09-08 00:28:11 +00001753 ;
1754 break;}
1755case 51:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001756#line 674 "asn1p_y.y"
Lev Walkin144db9b2004-10-12 23:26:53 +00001757{
1758 yyval.a_expr = asn1p_expr_new(yylineno);
1759 checkmem(yyval.a_expr);
1760 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
1761 yyval.a_expr->expr_type = A1TC_EXPORTVAR;
1762 ;
1763 break;}
1764case 52:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001765#line 680 "asn1p_y.y"
Lev Walkin144db9b2004-10-12 23:26:53 +00001766{
1767 yyval.a_expr = asn1p_expr_new(yylineno);
1768 checkmem(yyval.a_expr);
1769 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1770 yyval.a_expr->expr_type = A1TC_EXPORTVAR;
1771 ;
1772 break;}
1773case 53:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001774#line 691 "asn1p_y.y"
Lev Walkin8ea99482005-03-31 21:48:13 +00001775{ asn1p_lexer_hack_push_opaque_state(); ;
1776 break;}
1777case 54:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001778#line 691 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001779{
Lev Walkinf15320b2004-06-03 03:38:44 +00001780 yyval.a_expr = yyvsp[-4].a_expr;
1781 assert(yyval.a_expr->Identifier == 0);
1782 yyval.a_expr->Identifier = yyvsp[-5].tv_str;
1783 yyval.a_expr->meta_type = AMT_VALUESET;
Lev Walkin8ea99482005-03-31 21:48:13 +00001784 // take care of ValueSet body
Lev Walkin1004aa92004-09-08 00:28:11 +00001785 ;
1786 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00001787case 55:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001788#line 701 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001789{
Lev Walkinf15320b2004-06-03 03:38:44 +00001790 yyval.a_expr = asn1p_expr_new(yylineno);
1791 checkmem(yyval.a_expr);
1792 yyval.a_expr->reference = yyvsp[0].a_ref;
1793 yyval.a_expr->expr_type = A1TC_REFERENCE;
1794 yyval.a_expr->meta_type = AMT_TYPEREF;
Lev Walkin1004aa92004-09-08 00:28:11 +00001795 ;
1796 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00001797case 56:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001798#line 708 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001799{
Lev Walkinf15320b2004-06-03 03:38:44 +00001800 yyval.a_expr = asn1p_expr_new(yylineno);
1801 checkmem(yyval.a_expr);
1802 yyval.a_expr->expr_type = yyvsp[0].a_type;
1803 yyval.a_expr->meta_type = AMT_TYPE;
Lev Walkin1004aa92004-09-08 00:28:11 +00001804 ;
1805 break;}
Lev Walkin1004aa92004-09-08 00:28:11 +00001806case 57:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001807#line 726 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001808{
Lev Walkinf15320b2004-06-03 03:38:44 +00001809 yyval.a_expr = asn1p_expr_new(yylineno);
1810 checkmem(yyval.a_expr);
1811 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
1812 yyval.a_expr->tag = yyvsp[-1].a_tag;
1813 yyval.a_expr->expr_type = A1TC_TYPEID;
1814 yyval.a_expr->meta_type = AMT_TYPE;
Lev Walkin1004aa92004-09-08 00:28:11 +00001815 ;
1816 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00001817case 58:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001818#line 734 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001819{
Lev Walkinf15320b2004-06-03 03:38:44 +00001820 yyval.a_expr = yyvsp[0].a_expr;
Lev Walkinaf120f72004-09-14 02:36:39 +00001821 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
Lev Walkinf15320b2004-06-03 03:38:44 +00001822 assert(yyval.a_expr->expr_type);
1823 assert(yyval.a_expr->meta_type);
Lev Walkin1004aa92004-09-08 00:28:11 +00001824 ;
1825 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00001826case 59:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001827#line 740 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001828{
Lev Walkinf15320b2004-06-03 03:38:44 +00001829 yyval.a_expr = yyvsp[0].a_expr;
1830 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
1831 assert(yyval.a_expr->expr_type == A1TC_CLASSDEF);
1832 assert(yyval.a_expr->meta_type == AMT_OBJECT);
Lev Walkin1004aa92004-09-08 00:28:11 +00001833 ;
1834 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00001835case 60:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001836#line 756 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001837{
Lev Walkinf15320b2004-06-03 03:38:44 +00001838 yyval.a_expr = yyvsp[0].a_expr;
1839 assert(yyval.a_expr->Identifier == 0);
1840 yyval.a_expr->Identifier = yyvsp[-5].tv_str;
1841 yyval.a_expr->params = yyvsp[-3].a_plist;
1842 yyval.a_expr->meta_type = AMT_PARAMTYPE;
Lev Walkin1004aa92004-09-08 00:28:11 +00001843 ;
1844 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00001845case 61:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001846#line 766 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001847{
Lev Walkinf15320b2004-06-03 03:38:44 +00001848 int ret;
1849 yyval.a_plist = asn1p_paramlist_new(yylineno);
1850 checkmem(yyval.a_plist);
1851 ret = asn1p_paramlist_add_param(yyval.a_plist, yyvsp[0].a_parg.governor, yyvsp[0].a_parg.argument);
1852 checkmem(ret == 0);
1853 if(yyvsp[0].a_parg.governor) asn1p_ref_free(yyvsp[0].a_parg.governor);
1854 if(yyvsp[0].a_parg.argument) free(yyvsp[0].a_parg.argument);
Lev Walkin1004aa92004-09-08 00:28:11 +00001855 ;
1856 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00001857case 62:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001858#line 775 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001859{
Lev Walkinf15320b2004-06-03 03:38:44 +00001860 int ret;
1861 yyval.a_plist = yyvsp[-2].a_plist;
1862 ret = asn1p_paramlist_add_param(yyval.a_plist, yyvsp[0].a_parg.governor, yyvsp[0].a_parg.argument);
1863 checkmem(ret == 0);
1864 if(yyvsp[0].a_parg.governor) asn1p_ref_free(yyvsp[0].a_parg.governor);
1865 if(yyvsp[0].a_parg.argument) free(yyvsp[0].a_parg.argument);
Lev Walkin1004aa92004-09-08 00:28:11 +00001866 ;
1867 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00001868case 63:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001869#line 786 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001870{
Lev Walkinf15320b2004-06-03 03:38:44 +00001871 yyval.a_parg.governor = NULL;
1872 yyval.a_parg.argument = yyvsp[0].tv_str;
Lev Walkin1004aa92004-09-08 00:28:11 +00001873 ;
1874 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00001875case 64:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001876#line 790 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001877{
Lev Walkinf15320b2004-06-03 03:38:44 +00001878 int ret;
1879 yyval.a_parg.governor = asn1p_ref_new(yylineno);
1880 ret = asn1p_ref_add_component(yyval.a_parg.governor, yyvsp[-2].tv_str, 0);
1881 checkmem(ret == 0);
1882 yyval.a_parg.argument = yyvsp[0].tv_str;
Lev Walkin1004aa92004-09-08 00:28:11 +00001883 ;
1884 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00001885case 65:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001886#line 797 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001887{
Lev Walkinf15320b2004-06-03 03:38:44 +00001888 int ret;
1889 yyval.a_parg.governor = asn1p_ref_new(yylineno);
Lev Walkinc8092cb2005-02-18 16:34:21 +00001890 ret = asn1p_ref_add_component(yyval.a_parg.governor, yyvsp[-2].tv_str, 0);
1891 checkmem(ret == 0);
1892 yyval.a_parg.argument = yyvsp[0].tv_str;
1893 ;
1894 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00001895case 66:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001896#line 804 "asn1p_y.y"
Lev Walkinc8092cb2005-02-18 16:34:21 +00001897{
1898 int ret;
1899 yyval.a_parg.governor = asn1p_ref_new(yylineno);
Lev Walkinf15320b2004-06-03 03:38:44 +00001900 ret = asn1p_ref_add_component(yyval.a_parg.governor,
1901 ASN_EXPR_TYPE2STR(yyvsp[-2].a_type), 1);
1902 checkmem(ret == 0);
1903 yyval.a_parg.argument = yyvsp[0].tv_str;
Lev Walkin1004aa92004-09-08 00:28:11 +00001904 ;
1905 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00001906case 67:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001907#line 815 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001908{
Lev Walkinf15320b2004-06-03 03:38:44 +00001909 yyval.a_expr = asn1p_expr_new(yylineno);
1910 checkmem(yyval.a_expr);
Lev Walkin1004aa92004-09-08 00:28:11 +00001911 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1912 ;
1913 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00001914case 68:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001915#line 820 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001916{
Lev Walkinf15320b2004-06-03 03:38:44 +00001917 yyval.a_expr = yyvsp[-2].a_expr;
Lev Walkin1004aa92004-09-08 00:28:11 +00001918 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1919 ;
1920 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00001921case 69:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001922#line 827 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001923{
Lev Walkinf15320b2004-06-03 03:38:44 +00001924 yyval.a_expr = yyvsp[0].a_expr;
Lev Walkin1004aa92004-09-08 00:28:11 +00001925 ;
1926 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00001927case 70:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001928#line 830 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001929{
Lev Walkinf15320b2004-06-03 03:38:44 +00001930 yyval.a_expr = asn1p_expr_new(yylineno);
1931 checkmem(yyval.a_expr);
1932 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1933 yyval.a_expr->expr_type = A1TC_REFERENCE;
1934 yyval.a_expr->meta_type = AMT_VALUE;
Lev Walkin1004aa92004-09-08 00:28:11 +00001935 ;
1936 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00001937case 71:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001938#line 854 "asn1p_y.y"
Lev Walkin144db9b2004-10-12 23:26:53 +00001939{ yyval.a_expr = asn1p_expr_new(yylineno); ;
1940 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00001941case 72:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001942#line 855 "asn1p_y.y"
Lev Walkin144db9b2004-10-12 23:26:53 +00001943{ yyval.a_expr = yyvsp[0].a_expr; ;
1944 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00001945case 73:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001946#line 858 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001947{
Lev Walkinf15320b2004-06-03 03:38:44 +00001948 yyval.a_expr = asn1p_expr_new(yylineno);
1949 checkmem(yyval.a_expr);
Lev Walkin1004aa92004-09-08 00:28:11 +00001950 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1951 ;
1952 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00001953case 74:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001954#line 863 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001955{
Lev Walkinf15320b2004-06-03 03:38:44 +00001956 yyval.a_expr = yyvsp[-2].a_expr;
Lev Walkin1004aa92004-09-08 00:28:11 +00001957 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1958 ;
1959 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00001960case 75:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001961#line 870 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001962{
Lev Walkin070a52d2004-08-22 03:19:54 +00001963 yyval.a_expr = yyvsp[-1].a_expr;
1964 assert(yyval.a_expr->Identifier == 0);
Lev Walkinaf120f72004-09-14 02:36:39 +00001965 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
Lev Walkin070a52d2004-08-22 03:19:54 +00001966 yyval.a_expr->marker = yyvsp[0].a_marker;
Lev Walkin1004aa92004-09-08 00:28:11 +00001967 ;
1968 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00001969case 76:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001970#line 876 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001971{
Lev Walkin070a52d2004-08-22 03:19:54 +00001972 yyval.a_expr = asn1p_expr_new(yylineno);
1973 checkmem(yyval.a_expr);
1974 yyval.a_expr->meta_type = yyvsp[0].a_expr->meta_type;
1975 yyval.a_expr->expr_type = A1TC_COMPONENTS_OF;
Lev Walkin1004aa92004-09-08 00:28:11 +00001976 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1977 ;
1978 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00001979case 77:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001980#line 883 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001981{
Lev Walkin070a52d2004-08-22 03:19:54 +00001982 yyval.a_expr = yyvsp[0].a_expr;
Lev Walkin1004aa92004-09-08 00:28:11 +00001983 ;
1984 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00001985case 78:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001986#line 889 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001987{
Lev Walkin070a52d2004-08-22 03:19:54 +00001988 yyval.a_expr = asn1p_expr_new(yylineno);
1989 checkmem(yyval.a_expr);
Lev Walkin1004aa92004-09-08 00:28:11 +00001990 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1991 ;
1992 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00001993case 79:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00001994#line 894 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00001995{
Lev Walkin070a52d2004-08-22 03:19:54 +00001996 yyval.a_expr = yyvsp[-2].a_expr;
Lev Walkin1004aa92004-09-08 00:28:11 +00001997 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1998 ;
1999 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002000case 80:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002001#line 901 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002002{
Lev Walkin070a52d2004-08-22 03:19:54 +00002003 yyval.a_expr = yyvsp[0].a_expr;
2004 assert(yyval.a_expr->Identifier == 0);
Lev Walkinaf120f72004-09-14 02:36:39 +00002005 yyval.a_expr->Identifier = yyvsp[-1].tv_str;
Lev Walkin1004aa92004-09-08 00:28:11 +00002006 ;
2007 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002008case 81:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002009#line 906 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002010{
Lev Walkin070a52d2004-08-22 03:19:54 +00002011 yyval.a_expr = yyvsp[0].a_expr;
Lev Walkin1004aa92004-09-08 00:28:11 +00002012 ;
2013 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002014case 82:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002015#line 912 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002016{
Lev Walkinf15320b2004-06-03 03:38:44 +00002017 yyval.a_expr = yyvsp[-2].a_expr;
2018 checkmem(yyval.a_expr);
2019 yyval.a_expr->with_syntax = yyvsp[0].a_wsynt;
2020 assert(yyval.a_expr->expr_type == A1TC_CLASSDEF);
2021 assert(yyval.a_expr->meta_type == AMT_OBJECT);
Lev Walkin1004aa92004-09-08 00:28:11 +00002022 ;
2023 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002024case 83:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002025#line 922 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002026{ yyval.a_int = 0; ;
2027 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002028case 84:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002029#line 923 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002030{ yyval.a_int = 1; ;
2031 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002032case 85:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002033#line 927 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002034{
Lev Walkinf15320b2004-06-03 03:38:44 +00002035 yyval.a_expr = asn1p_expr_new(yylineno);
2036 checkmem(yyval.a_expr);
2037 yyval.a_expr->expr_type = A1TC_CLASSDEF;
2038 yyval.a_expr->meta_type = AMT_OBJECT;
Lev Walkin1004aa92004-09-08 00:28:11 +00002039 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
2040 ;
2041 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002042case 86:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002043#line 934 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002044{
Lev Walkinf15320b2004-06-03 03:38:44 +00002045 yyval.a_expr = yyvsp[-2].a_expr;
Lev Walkin1004aa92004-09-08 00:28:11 +00002046 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
2047 ;
2048 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002049case 87:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002050#line 941 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002051{
Lev Walkinf15320b2004-06-03 03:38:44 +00002052 yyval.a_expr = asn1p_expr_new(yylineno);
2053 checkmem(yyval.a_expr);
2054 yyval.a_expr->Identifier = yyvsp[-1].a_refcomp.name;
2055 yyval.a_expr->expr_type = A1TC_CLASSFIELD;
2056 yyval.a_expr->meta_type = AMT_OBJECTFIELD;
2057 yyval.a_expr->marker = yyvsp[0].a_marker;
Lev Walkin1004aa92004-09-08 00:28:11 +00002058 ;
2059 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002060case 88:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002061#line 949 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002062{
Lev Walkin070a52d2004-08-22 03:19:54 +00002063 yyval.a_expr = yyvsp[-2].a_expr;
2064 yyval.a_expr->Identifier = yyvsp[-3].a_refcomp.name;
Lev Walkinb7c45ca2004-11-24 17:43:29 +00002065 yyval.a_expr->marker = yyvsp[0].a_marker;
2066 yyval.a_expr->unique = yyvsp[-1].a_int;
Lev Walkin1004aa92004-09-08 00:28:11 +00002067 ;
2068 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002069case 89:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002070#line 955 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002071{
Lev Walkinf15320b2004-06-03 03:38:44 +00002072 int ret;
2073 yyval.a_expr = asn1p_expr_new(yylineno);
2074 checkmem(yyval.a_expr);
2075 yyval.a_expr->Identifier = yyvsp[-3].a_refcomp.name;
2076 yyval.a_expr->reference = asn1p_ref_new(yylineno);
2077 checkmem(yyval.a_expr->reference);
2078 ret = asn1p_ref_add_component(yyval.a_expr->reference,
2079 yyvsp[-2].a_refcomp.name, yyvsp[-2].a_refcomp.lex_type);
2080 checkmem(ret == 0);
2081 yyval.a_expr->expr_type = A1TC_CLASSFIELD;
2082 yyval.a_expr->meta_type = AMT_OBJECTFIELD;
Lev Walkinb7c45ca2004-11-24 17:43:29 +00002083 yyval.a_expr->marker = yyvsp[0].a_marker;
2084 yyval.a_expr->unique = yyvsp[-1].a_int;
Lev Walkin1004aa92004-09-08 00:28:11 +00002085 ;
2086 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002087case 90:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002088#line 973 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002089{ yyval.a_wsynt = 0; ;
2090 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002091case 91:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002092#line 974 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002093{
Lev Walkinf15320b2004-06-03 03:38:44 +00002094 yyval.a_wsynt = yyvsp[0].a_wsynt;
Lev Walkin1004aa92004-09-08 00:28:11 +00002095 ;
2096 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002097case 92:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002098#line 981 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002099{ asn1p_lexer_hack_enable_with_syntax(); ;
2100 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002101case 93:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002102#line 983 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002103{
Lev Walkinf15320b2004-06-03 03:38:44 +00002104 yyval.a_wsynt = yyvsp[-1].a_wsynt;
Lev Walkin1004aa92004-09-08 00:28:11 +00002105 ;
2106 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002107case 94:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002108#line 989 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002109{
Lev Walkinf15320b2004-06-03 03:38:44 +00002110 yyval.a_wsynt = asn1p_wsyntx_new();
2111 TQ_ADD(&(yyval.a_wsynt->chunks), yyvsp[0].a_wchunk, next);
Lev Walkin1004aa92004-09-08 00:28:11 +00002112 ;
2113 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002114case 95:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002115#line 993 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002116{
Lev Walkinf15320b2004-06-03 03:38:44 +00002117 yyval.a_wsynt = yyvsp[-1].a_wsynt;
2118 TQ_ADD(&(yyval.a_wsynt->chunks), yyvsp[0].a_wchunk, next);
Lev Walkin1004aa92004-09-08 00:28:11 +00002119 ;
2120 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002121case 96:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002122#line 1000 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002123{
Lev Walkinf15320b2004-06-03 03:38:44 +00002124 yyval.a_wchunk = asn1p_wsyntx_chunk_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
Lev Walkin1004aa92004-09-08 00:28:11 +00002125 ;
2126 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002127case 97:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002128#line 1003 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002129{
Lev Walkinf15320b2004-06-03 03:38:44 +00002130 asn1p_ref_t *ref;
2131 int ret;
2132 ref = asn1p_ref_new(yylineno);
2133 checkmem(ref);
2134 ret = asn1p_ref_add_component(ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
2135 checkmem(ret == 0);
2136 yyval.a_wchunk = asn1p_wsyntx_chunk_fromref(ref, 0);
Lev Walkin1004aa92004-09-08 00:28:11 +00002137 ;
2138 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002139case 98:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002140#line 1015 "asn1p_y.y"
Lev Walkin144db9b2004-10-12 23:26:53 +00002141{
2142 yyval.a_expr = asn1p_expr_new(yylineno);
2143 checkmem(yyval.a_expr);
2144 yyval.a_expr->Identifier = strdup("...");
2145 checkmem(yyval.a_expr->Identifier);
Lev Walkin144db9b2004-10-12 23:26:53 +00002146 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
2147 yyval.a_expr->meta_type = AMT_TYPE;
2148 ;
2149 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002150case 99:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002151#line 1023 "asn1p_y.y"
Lev Walkinc8092cb2005-02-18 16:34:21 +00002152{
2153 yyval.a_expr = asn1p_expr_new(yylineno);
2154 checkmem(yyval.a_expr);
2155 yyval.a_expr->Identifier = strdup("...");
2156 checkmem(yyval.a_expr->Identifier);
2157 yyval.a_expr->value = yyvsp[0].a_value;
2158 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
2159 yyval.a_expr->meta_type = AMT_TYPE;
2160 ;
2161 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002162case 100:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002163#line 1032 "asn1p_y.y"
Lev Walkin144db9b2004-10-12 23:26:53 +00002164{
2165 yyval.a_expr = asn1p_expr_new(yylineno);
2166 checkmem(yyval.a_expr);
2167 yyval.a_expr->Identifier = strdup("...");
Lev Walkind2ea1de2004-08-20 13:25:29 +00002168 yyval.a_expr->value = yyvsp[0].a_value;
2169 checkmem(yyval.a_expr->Identifier);
2170 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
2171 yyval.a_expr->meta_type = AMT_TYPE;
Lev Walkin1004aa92004-09-08 00:28:11 +00002172 ;
2173 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002174case 101:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002175#line 1044 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002176{
Lev Walkin070a52d2004-08-22 03:19:54 +00002177 yyval.a_expr = yyvsp[-1].a_expr;
Lev Walkinaf120f72004-09-14 02:36:39 +00002178 yyval.a_expr->tag = yyvsp[-2].a_tag;
Lev Walkin070a52d2004-08-22 03:19:54 +00002179 /*
2180 * Outer constraint for SEQUENCE OF and SET OF applies
2181 * to the inner type.
2182 */
2183 if(yyval.a_expr->expr_type == ASN_CONSTR_SEQUENCE_OF
2184 || yyval.a_expr->expr_type == ASN_CONSTR_SET_OF) {
2185 assert(!TQ_FIRST(&(yyval.a_expr->members))->constraints);
2186 TQ_FIRST(&(yyval.a_expr->members))->constraints = yyvsp[0].a_constr;
2187 } else {
2188 if(yyval.a_expr->constraints) {
Lev Walkinaf120f72004-09-14 02:36:39 +00002189 assert(!yyvsp[-1].a_expr);
Lev Walkin070a52d2004-08-22 03:19:54 +00002190 } else {
2191 yyval.a_expr->constraints = yyvsp[0].a_constr;
2192 }
2193 }
Lev Walkin1004aa92004-09-08 00:28:11 +00002194 ;
2195 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002196case 102:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002197#line 1066 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002198{
Lev Walkind2ea1de2004-08-20 13:25:29 +00002199 yyval.a_expr = yyvsp[0].a_expr;
Lev Walkin1004aa92004-09-08 00:28:11 +00002200 ;
2201 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002202case 103:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002203#line 1069 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002204{
Lev Walkinc7d939d2005-03-20 11:12:40 +00002205 yyval.a_expr = yyvsp[-1].a_expr;
2206 assert(yyval.a_expr->expr_type == A1TC_INVALID);
2207 yyval.a_expr->expr_type = ASN_CONSTR_CHOICE;
Lev Walkinf15320b2004-06-03 03:38:44 +00002208 yyval.a_expr->meta_type = AMT_TYPE;
Lev Walkin1004aa92004-09-08 00:28:11 +00002209 ;
2210 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002211case 104:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002212#line 1075 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002213{
Lev Walkin070a52d2004-08-22 03:19:54 +00002214 yyval.a_expr = yyvsp[-1].a_expr;
2215 assert(yyval.a_expr->expr_type == A1TC_INVALID);
Lev Walkinc7d939d2005-03-20 11:12:40 +00002216 yyval.a_expr->expr_type = ASN_CONSTR_SEQUENCE;
Lev Walkin070a52d2004-08-22 03:19:54 +00002217 yyval.a_expr->meta_type = AMT_TYPE;
Lev Walkin1004aa92004-09-08 00:28:11 +00002218 ;
2219 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002220case 105:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002221#line 1081 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002222{
Lev Walkin070a52d2004-08-22 03:19:54 +00002223 yyval.a_expr = yyvsp[-1].a_expr;
2224 assert(yyval.a_expr->expr_type == A1TC_INVALID);
Lev Walkinc7d939d2005-03-20 11:12:40 +00002225 yyval.a_expr->expr_type = ASN_CONSTR_SET;
Lev Walkin070a52d2004-08-22 03:19:54 +00002226 yyval.a_expr->meta_type = AMT_TYPE;
Lev Walkin1004aa92004-09-08 00:28:11 +00002227 ;
2228 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002229case 106:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002230#line 1087 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002231{
Lev Walkinceb20e72004-09-05 10:40:41 +00002232 yyval.a_expr = asn1p_expr_new(yylineno);
Lev Walkin070a52d2004-08-22 03:19:54 +00002233 checkmem(yyval.a_expr);
Lev Walkin83cac2f2004-09-22 16:03:36 +00002234 yyval.a_expr->constraints = yyvsp[-4].a_constr;
Lev Walkin070a52d2004-08-22 03:19:54 +00002235 yyval.a_expr->expr_type = ASN_CONSTR_SEQUENCE_OF;
2236 yyval.a_expr->meta_type = AMT_TYPE;
Lev Walkin83cac2f2004-09-22 16:03:36 +00002237 yyvsp[0].a_expr->Identifier = yyvsp[-2].tv_str;
Lev Walkinec208e62004-09-14 02:44:07 +00002238 yyvsp[0].a_expr->tag = yyvsp[-1].a_tag;
Lev Walkin1004aa92004-09-08 00:28:11 +00002239 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
2240 ;
2241 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002242case 107:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002243#line 1097 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002244{
Lev Walkinceb20e72004-09-05 10:40:41 +00002245 yyval.a_expr = asn1p_expr_new(yylineno);
Lev Walkin070a52d2004-08-22 03:19:54 +00002246 checkmem(yyval.a_expr);
Lev Walkin83cac2f2004-09-22 16:03:36 +00002247 yyval.a_expr->constraints = yyvsp[-4].a_constr;
Lev Walkin070a52d2004-08-22 03:19:54 +00002248 yyval.a_expr->expr_type = ASN_CONSTR_SET_OF;
2249 yyval.a_expr->meta_type = AMT_TYPE;
Lev Walkin83cac2f2004-09-22 16:03:36 +00002250 yyvsp[0].a_expr->Identifier = yyvsp[-2].tv_str;
Lev Walkinec208e62004-09-14 02:44:07 +00002251 yyvsp[0].a_expr->tag = yyvsp[-1].a_tag;
Lev Walkin1004aa92004-09-08 00:28:11 +00002252 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
2253 ;
2254 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002255case 108:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002256#line 1107 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002257{
Lev Walkinceb20e72004-09-05 10:40:41 +00002258 yyval.a_expr = asn1p_expr_new(yylineno);
Lev Walkin070a52d2004-08-22 03:19:54 +00002259 checkmem(yyval.a_expr);
Lev Walkin609ccbb2004-09-04 04:49:21 +00002260 yyval.a_expr->expr_type = ASN_TYPE_ANY;
Lev Walkin070a52d2004-08-22 03:19:54 +00002261 yyval.a_expr->meta_type = AMT_TYPE;
Lev Walkin1004aa92004-09-08 00:28:11 +00002262 ;
2263 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002264case 109:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002265#line 1113 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002266{
Lev Walkin070a52d2004-08-22 03:19:54 +00002267 int ret;
Lev Walkinceb20e72004-09-05 10:40:41 +00002268 yyval.a_expr = asn1p_expr_new(yylineno);
Lev Walkin070a52d2004-08-22 03:19:54 +00002269 checkmem(yyval.a_expr);
2270 yyval.a_expr->reference = asn1p_ref_new(yylineno);
2271 ret = asn1p_ref_add_component(yyval.a_expr->reference,
2272 yyvsp[0].tv_str, RLT_lowercase);
2273 checkmem(ret == 0);
Lev Walkin609ccbb2004-09-04 04:49:21 +00002274 yyval.a_expr->expr_type = ASN_TYPE_ANY;
Lev Walkin070a52d2004-08-22 03:19:54 +00002275 yyval.a_expr->meta_type = AMT_TYPE;
Lev Walkin1004aa92004-09-08 00:28:11 +00002276 ;
2277 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002278case 110:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002279#line 1127 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002280{
Lev Walkinf15320b2004-06-03 03:38:44 +00002281 int ret;
2282 yyval.a_expr = yyvsp[-1].a_expr;
2283 assert(yyval.a_expr->expr_type == 0);
2284 assert(yyval.a_expr->meta_type == 0);
2285 assert(yyval.a_expr->reference == 0);
2286 yyval.a_expr->reference = asn1p_ref_new(yylineno);
2287 checkmem(yyval.a_expr->reference);
2288 ret = asn1p_ref_add_component(yyval.a_expr->reference, yyvsp[-3].tv_str, RLT_UNKNOWN);
2289 checkmem(ret == 0);
2290 free(yyvsp[-3].tv_str);
2291 yyval.a_expr->expr_type = A1TC_PARAMETRIZED;
2292 yyval.a_expr->meta_type = AMT_TYPE;
Lev Walkin1004aa92004-09-08 00:28:11 +00002293 ;
2294 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002295case 111:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002296#line 1151 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002297{
Lev Walkinf15320b2004-06-03 03:38:44 +00002298 yyval.a_expr = asn1p_expr_new(yylineno);
2299 checkmem(yyval.a_expr);
2300 yyval.a_expr->reference = yyvsp[0].a_ref;
2301 yyval.a_expr->expr_type = A1TC_REFERENCE;
2302 yyval.a_expr->meta_type = AMT_TYPEREF;
Lev Walkin1004aa92004-09-08 00:28:11 +00002303 ;
2304 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002305case 112:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002306#line 1158 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002307{
Lev Walkinf15320b2004-06-03 03:38:44 +00002308 yyval.a_expr = asn1p_expr_new(yylineno);
2309 checkmem(yyval.a_expr);
2310 yyval.a_expr->reference = yyvsp[0].a_ref;
2311 yyval.a_expr->expr_type = A1TC_INSTANCE;
2312 yyval.a_expr->meta_type = AMT_TYPE;
Lev Walkin1004aa92004-09-08 00:28:11 +00002313 ;
2314 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002315case 113:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002316#line 1173 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002317{
Lev Walkinf15320b2004-06-03 03:38:44 +00002318 int ret;
2319 yyval.a_ref = asn1p_ref_new(yylineno);
2320 checkmem(yyval.a_ref);
2321 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN);
2322 checkmem(ret == 0);
2323 free(yyvsp[0].tv_str);
Lev Walkin1004aa92004-09-08 00:28:11 +00002324 ;
2325 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002326case 114:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002327#line 1181 "asn1p_y.y"
Lev Walkinc7d939d2005-03-20 11:12:40 +00002328{
2329 int ret;
2330 yyval.a_ref = asn1p_ref_new(yylineno);
2331 checkmem(yyval.a_ref);
2332 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2333 checkmem(ret == 0);
2334 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN);
2335 checkmem(ret == 0);
2336 free(yyvsp[-2].tv_str);
2337 ;
2338 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002339case 115:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002340#line 1191 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002341{
Lev Walkinf15320b2004-06-03 03:38:44 +00002342 int ret;
2343 yyval.a_ref = asn1p_ref_new(yylineno);
2344 checkmem(yyval.a_ref);
2345 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2346 checkmem(ret == 0);
Lev Walkin9c974182004-09-15 11:59:51 +00002347 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN);
Lev Walkinf15320b2004-06-03 03:38:44 +00002348 checkmem(ret == 0);
2349 free(yyvsp[-2].tv_str);
Lev Walkin1004aa92004-09-08 00:28:11 +00002350 ;
2351 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002352case 116:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002353#line 1201 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002354{
Lev Walkinf15320b2004-06-03 03:38:44 +00002355 int ret;
2356 yyval.a_ref = asn1p_ref_new(yylineno);
2357 checkmem(yyval.a_ref);
Lev Walkin9c974182004-09-15 11:59:51 +00002358 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2359 checkmem(ret == 0);
2360 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_lowercase);
2361 checkmem(ret == 0);
2362 free(yyvsp[-2].tv_str);
2363 ;
2364 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002365case 117:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002366#line 1211 "asn1p_y.y"
Lev Walkin9c974182004-09-15 11:59:51 +00002367{
2368 int ret;
2369 yyval.a_ref = asn1p_ref_new(yylineno);
2370 checkmem(yyval.a_ref);
Lev Walkinf15320b2004-06-03 03:38:44 +00002371 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_CAPITALS);
2372 free(yyvsp[0].tv_str);
2373 checkmem(ret == 0);
Lev Walkin1004aa92004-09-08 00:28:11 +00002374 ;
2375 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002376case 118:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002377#line 1219 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002378{
Lev Walkinf15320b2004-06-03 03:38:44 +00002379 int ret;
2380 yyval.a_ref = yyvsp[0].a_ref;
2381 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_CAPITALS);
2382 free(yyvsp[-2].tv_str);
2383 checkmem(ret == 0);
2384 /*
2385 * Move the last element infront.
2386 */
2387 {
2388 struct asn1p_ref_component_s tmp_comp;
2389 tmp_comp = yyval.a_ref->components[yyval.a_ref->comp_count-1];
2390 memmove(&yyval.a_ref->components[1],
2391 &yyval.a_ref->components[0],
2392 sizeof(yyval.a_ref->components[0])
2393 * (yyval.a_ref->comp_count - 1));
2394 yyval.a_ref->components[0] = tmp_comp;
2395 }
Lev Walkin1004aa92004-09-08 00:28:11 +00002396 ;
2397 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002398case 119:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002399#line 1241 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002400{
Lev Walkinf15320b2004-06-03 03:38:44 +00002401 int ret;
2402 yyval.a_ref = asn1p_ref_new(yylineno);
2403 checkmem(yyval.a_ref);
2404 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
2405 free(yyvsp[0].a_refcomp.name);
2406 checkmem(ret == 0);
Lev Walkin1004aa92004-09-08 00:28:11 +00002407 ;
2408 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002409case 120:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002410#line 1249 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002411{
Lev Walkinf15320b2004-06-03 03:38:44 +00002412 int ret;
2413 yyval.a_ref = yyvsp[-2].a_ref;
2414 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
2415 free(yyvsp[0].a_refcomp.name);
2416 checkmem(ret == 0);
Lev Walkin1004aa92004-09-08 00:28:11 +00002417 ;
2418 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002419case 123:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002420#line 1263 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002421{
Lev Walkinf15320b2004-06-03 03:38:44 +00002422 yyval.a_refcomp.lex_type = RLT_AmpUppercase;
2423 yyval.a_refcomp.name = yyvsp[0].tv_str;
Lev Walkin1004aa92004-09-08 00:28:11 +00002424 ;
2425 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002426case 124:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002427#line 1268 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002428{
Lev Walkinf15320b2004-06-03 03:38:44 +00002429 yyval.a_refcomp.lex_type = RLT_Amplowercase;
2430 yyval.a_refcomp.name = yyvsp[0].tv_str;
Lev Walkin1004aa92004-09-08 00:28:11 +00002431 ;
2432 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002433case 125:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002434#line 1281 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002435{
Lev Walkinf15320b2004-06-03 03:38:44 +00002436 yyval.a_expr = yyvsp[-2].a_expr;
2437 assert(yyval.a_expr->Identifier == NULL);
2438 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
2439 yyval.a_expr->meta_type = AMT_VALUE;
2440 yyval.a_expr->value = yyvsp[0].a_value;
Lev Walkin1004aa92004-09-08 00:28:11 +00002441 ;
2442 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002443case 126:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002444#line 1291 "asn1p_y.y"
Lev Walkin9c974182004-09-15 11:59:51 +00002445{
2446 yyval.a_value = asn1p_value_fromint(0);
2447 checkmem(yyval.a_value);
2448 yyval.a_value->type = ATV_CHOICE_IDENTIFIER;
2449 yyval.a_value->value.choice_identifier.identifier = yyvsp[-2].tv_str;
2450 yyval.a_value->value.choice_identifier.value = yyvsp[0].a_value;
2451 ;
2452 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002453case 127:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002454#line 1298 "asn1p_y.y"
Lev Walkincbad2512005-03-24 16:27:02 +00002455{ asn1p_lexer_hack_push_opaque_state(); ;
Lev Walkin1004aa92004-09-08 00:28:11 +00002456 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002457case 128:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002458#line 1298 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002459{
Lev Walkinf15320b2004-06-03 03:38:44 +00002460 yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
2461 checkmem(yyval.a_value);
2462 yyval.a_value->type = ATV_UNPARSED;
Lev Walkin1004aa92004-09-08 00:28:11 +00002463 ;
2464 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002465case 129:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002466#line 1303 "asn1p_y.y"
Lev Walkin9c974182004-09-15 11:59:51 +00002467{
2468 yyval.a_value = asn1p_value_fromint(0);
2469 checkmem(yyval.a_value);
2470 yyval.a_value->type = ATV_NULL;
2471 ;
2472 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002473case 130:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002474#line 1308 "asn1p_y.y"
Lev Walkin9c974182004-09-15 11:59:51 +00002475{
2476 yyval.a_value = asn1p_value_fromint(0);
2477 checkmem(yyval.a_value);
2478 yyval.a_value->type = ATV_FALSE;
2479 ;
2480 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002481case 131:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002482#line 1313 "asn1p_y.y"
Lev Walkin9c974182004-09-15 11:59:51 +00002483{
2484 yyval.a_value = asn1p_value_fromint(0);
2485 checkmem(yyval.a_value);
2486 yyval.a_value->type = ATV_TRUE;
2487 ;
2488 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002489case 132:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002490#line 1318 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002491{
Lev Walkinf15320b2004-06-03 03:38:44 +00002492 yyval.a_value = _convert_bitstring2binary(yyvsp[0].tv_str, 'B');
2493 checkmem(yyval.a_value);
Lev Walkin1004aa92004-09-08 00:28:11 +00002494 ;
2495 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002496case 133:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002497#line 1322 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002498{
Lev Walkinf15320b2004-06-03 03:38:44 +00002499 yyval.a_value = _convert_bitstring2binary(yyvsp[0].tv_str, 'H');
2500 checkmem(yyval.a_value);
Lev Walkin1004aa92004-09-08 00:28:11 +00002501 ;
2502 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002503case 134:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002504#line 1326 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002505{
Lev Walkin1e448d32005-03-24 14:26:38 +00002506 yyval.a_value = yyval.a_value;
Lev Walkin1004aa92004-09-08 00:28:11 +00002507 ;
2508 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002509case 135:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002510#line 1329 "asn1p_y.y"
Lev Walkinc7d939d2005-03-20 11:12:40 +00002511{
2512 yyval.a_value = yyvsp[0].a_value;
2513 ;
2514 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002515case 136:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002516#line 1332 "asn1p_y.y"
Lev Walkin83cac2f2004-09-22 16:03:36 +00002517{
2518 yyval.a_value = yyvsp[0].a_value;
2519 ;
2520 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002521case 137:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002522#line 1338 "asn1p_y.y"
Lev Walkinc8092cb2005-02-18 16:34:21 +00002523{
Lev Walkinf15320b2004-06-03 03:38:44 +00002524 asn1p_ref_t *ref;
2525 int ret;
2526 ref = asn1p_ref_new(yylineno);
2527 checkmem(ref);
2528 ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
2529 checkmem(ret == 0);
2530 yyval.a_value = asn1p_value_fromref(ref, 0);
2531 checkmem(yyval.a_value);
2532 free(yyvsp[0].tv_str);
Lev Walkin1004aa92004-09-08 00:28:11 +00002533 ;
2534 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002535case 138:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002536#line 1349 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002537{
Lev Walkinf15320b2004-06-03 03:38:44 +00002538 asn1p_ref_t *ref;
2539 int ret;
2540 ref = asn1p_ref_new(yylineno);
2541 checkmem(ref);
2542 ret = asn1p_ref_add_component(ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2543 checkmem(ret == 0);
2544 ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
2545 checkmem(ret == 0);
2546 yyval.a_value = asn1p_value_fromref(ref, 0);
2547 checkmem(yyval.a_value);
2548 free(yyvsp[-2].tv_str);
2549 free(yyvsp[0].tv_str);
Lev Walkin1004aa92004-09-08 00:28:11 +00002550 ;
2551 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002552case 139:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002553#line 1367 "asn1p_y.y"
Lev Walkin1e448d32005-03-24 14:26:38 +00002554{
2555 yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
2556 checkmem(yyval.a_value);
2557 ;
2558 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002559case 140:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002560#line 1371 "asn1p_y.y"
Lev Walkin1e448d32005-03-24 14:26:38 +00002561{
Lev Walkind9574ae2005-03-24 16:22:35 +00002562 yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int);
Lev Walkin1e448d32005-03-24 14:26:38 +00002563 checkmem(yyval.a_value);
2564 yyval.a_value->type = ATV_TUPLE;
2565 ;
2566 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002567case 141:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002568#line 1376 "asn1p_y.y"
Lev Walkin1e448d32005-03-24 14:26:38 +00002569{
Lev Walkind9574ae2005-03-24 16:22:35 +00002570 yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int);
Lev Walkin1e448d32005-03-24 14:26:38 +00002571 checkmem(yyval.a_value);
2572 yyval.a_value->type = ATV_QUADRUPLE;
2573 ;
2574 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002575case 142:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002576#line 1410 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002577{
Lev Walkin1893ddf2005-03-20 14:28:32 +00002578 yyval.tv_opaque.len = yyvsp[0].tv_opaque.len + 1;
Lev Walkinf15320b2004-06-03 03:38:44 +00002579 yyval.tv_opaque.buf = malloc(yyval.tv_opaque.len + 1);
2580 checkmem(yyval.tv_opaque.buf);
2581 yyval.tv_opaque.buf[0] = '{';
Lev Walkin1893ddf2005-03-20 14:28:32 +00002582 memcpy(yyval.tv_opaque.buf + 1, yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len);
Lev Walkinf15320b2004-06-03 03:38:44 +00002583 yyval.tv_opaque.buf[yyval.tv_opaque.len] = '\0';
2584 free(yyvsp[0].tv_opaque.buf);
Lev Walkin1004aa92004-09-08 00:28:11 +00002585 ;
2586 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002587case 143:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002588#line 1419 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002589{
Lev Walkinf15320b2004-06-03 03:38:44 +00002590 int newsize = yyvsp[-1].tv_opaque.len + yyvsp[0].tv_opaque.len;
2591 char *p = malloc(newsize + 1);
2592 checkmem(p);
2593 memcpy(p , yyvsp[-1].tv_opaque.buf, yyvsp[-1].tv_opaque.len);
2594 memcpy(p + yyvsp[-1].tv_opaque.len, yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len);
2595 p[newsize] = '\0';
2596 free(yyvsp[-1].tv_opaque.buf);
2597 free(yyvsp[0].tv_opaque.buf);
2598 yyval.tv_opaque.buf = p;
2599 yyval.tv_opaque.len = newsize;
Lev Walkin1004aa92004-09-08 00:28:11 +00002600 ;
2601 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002602case 144:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002603#line 1434 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002604{ yyval.a_type = ASN_BASIC_BOOLEAN; ;
2605 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002606case 145:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002607#line 1435 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002608{ yyval.a_type = ASN_BASIC_NULL; ;
2609 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002610case 146:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002611#line 1436 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002612{ yyval.a_type = ASN_BASIC_REAL; ;
2613 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002614case 147:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002615#line 1437 "asn1p_y.y"
Lev Walkin1e448d32005-03-24 14:26:38 +00002616{ yyval.a_type = yyvsp[0].a_type; ;
Lev Walkin1004aa92004-09-08 00:28:11 +00002617 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002618case 148:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002619#line 1438 "asn1p_y.y"
Lev Walkin1e448d32005-03-24 14:26:38 +00002620{ yyval.a_type = ASN_BASIC_OCTET_STRING; ;
Lev Walkin1004aa92004-09-08 00:28:11 +00002621 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002622case 149:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002623#line 1439 "asn1p_y.y"
Lev Walkin1e448d32005-03-24 14:26:38 +00002624{ yyval.a_type = ASN_BASIC_OBJECT_IDENTIFIER; ;
Lev Walkin1004aa92004-09-08 00:28:11 +00002625 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002626case 150:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002627#line 1440 "asn1p_y.y"
Lev Walkin1e448d32005-03-24 14:26:38 +00002628{ yyval.a_type = ASN_BASIC_RELATIVE_OID; ;
Lev Walkin1004aa92004-09-08 00:28:11 +00002629 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002630case 151:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002631#line 1441 "asn1p_y.y"
Lev Walkin1e448d32005-03-24 14:26:38 +00002632{ yyval.a_type = ASN_BASIC_EXTERNAL; ;
Lev Walkin1004aa92004-09-08 00:28:11 +00002633 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002634case 152:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002635#line 1442 "asn1p_y.y"
Lev Walkin1e448d32005-03-24 14:26:38 +00002636{ yyval.a_type = ASN_BASIC_EMBEDDED_PDV; ;
Lev Walkin1004aa92004-09-08 00:28:11 +00002637 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002638case 153:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002639#line 1443 "asn1p_y.y"
Lev Walkin1e448d32005-03-24 14:26:38 +00002640{ yyval.a_type = ASN_BASIC_CHARACTER_STRING; ;
Lev Walkinc7d939d2005-03-20 11:12:40 +00002641 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002642case 154:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002643#line 1444 "asn1p_y.y"
Lev Walkin1e448d32005-03-24 14:26:38 +00002644{ yyval.a_type = ASN_BASIC_UTCTime; ;
Lev Walkin1004aa92004-09-08 00:28:11 +00002645 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002646case 155:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002647#line 1445 "asn1p_y.y"
Lev Walkin1e448d32005-03-24 14:26:38 +00002648{ yyval.a_type = ASN_BASIC_GeneralizedTime; ;
Lev Walkin1004aa92004-09-08 00:28:11 +00002649 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002650case 156:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002651#line 1446 "asn1p_y.y"
Lev Walkin1e448d32005-03-24 14:26:38 +00002652{ yyval.a_type = yyvsp[0].a_type; ;
Lev Walkin1004aa92004-09-08 00:28:11 +00002653 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002654case 157:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002655#line 1453 "asn1p_y.y"
Lev Walkin1e448d32005-03-24 14:26:38 +00002656{ yyval.a_type = ASN_BASIC_INTEGER; ;
2657 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002658case 158:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002659#line 1454 "asn1p_y.y"
Lev Walkin1e448d32005-03-24 14:26:38 +00002660{ yyval.a_type = ASN_BASIC_ENUMERATED; ;
2661 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002662case 159:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002663#line 1455 "asn1p_y.y"
Lev Walkin1e448d32005-03-24 14:26:38 +00002664{ yyval.a_type = ASN_BASIC_BIT_STRING; ;
2665 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002666case 160:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002667#line 1459 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002668{
Lev Walkinceb20e72004-09-05 10:40:41 +00002669 yyval.a_expr = asn1p_expr_new(yylineno);
Lev Walkinf15320b2004-06-03 03:38:44 +00002670 checkmem(yyval.a_expr);
2671 yyval.a_expr->expr_type = yyvsp[0].a_type;
2672 yyval.a_expr->meta_type = AMT_TYPE;
Lev Walkin1004aa92004-09-08 00:28:11 +00002673 ;
2674 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002675case 161:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002676#line 1465 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002677{
Lev Walkinf15320b2004-06-03 03:38:44 +00002678 if(yyvsp[0].a_expr) {
2679 yyval.a_expr = yyvsp[0].a_expr;
2680 } else {
Lev Walkinceb20e72004-09-05 10:40:41 +00002681 yyval.a_expr = asn1p_expr_new(yylineno);
Lev Walkinf15320b2004-06-03 03:38:44 +00002682 checkmem(yyval.a_expr);
2683 }
2684 yyval.a_expr->expr_type = yyvsp[-1].a_type;
2685 yyval.a_expr->meta_type = AMT_TYPE;
Lev Walkin1004aa92004-09-08 00:28:11 +00002686 ;
2687 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002688case 162:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002689#line 1478 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002690{ yyval.a_type = ASN_STRING_BMPString; ;
2691 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002692case 163:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002693#line 1479 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002694{
Lev Walkinf15320b2004-06-03 03:38:44 +00002695 yyval.a_type = ASN_STRING_GeneralString;
Lev Walkin9c974182004-09-15 11:59:51 +00002696 fprintf(stderr, "WARNING: GeneralString is not fully supported\n");
Lev Walkin1004aa92004-09-08 00:28:11 +00002697 ;
2698 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002699case 164:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002700#line 1483 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002701{
Lev Walkin9c974182004-09-15 11:59:51 +00002702 yyval.a_type = ASN_STRING_GraphicString;
2703 fprintf(stderr, "WARNING: GraphicString is not fully supported\n");
Lev Walkin1004aa92004-09-08 00:28:11 +00002704 ;
2705 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002706case 165:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002707#line 1487 "asn1p_y.y"
Lev Walkin9c974182004-09-15 11:59:51 +00002708{ yyval.a_type = ASN_STRING_IA5String; ;
Lev Walkin1004aa92004-09-08 00:28:11 +00002709 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002710case 166:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002711#line 1488 "asn1p_y.y"
Lev Walkin9c974182004-09-15 11:59:51 +00002712{ yyval.a_type = ASN_STRING_ISO646String; ;
Lev Walkin1004aa92004-09-08 00:28:11 +00002713 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002714case 167:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002715#line 1489 "asn1p_y.y"
Lev Walkin9c974182004-09-15 11:59:51 +00002716{ yyval.a_type = ASN_STRING_NumericString; ;
Lev Walkin1004aa92004-09-08 00:28:11 +00002717 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002718case 168:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002719#line 1490 "asn1p_y.y"
Lev Walkin9c974182004-09-15 11:59:51 +00002720{ yyval.a_type = ASN_STRING_PrintableString; ;
Lev Walkin1004aa92004-09-08 00:28:11 +00002721 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002722case 169:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002723#line 1491 "asn1p_y.y"
Lev Walkin9c974182004-09-15 11:59:51 +00002724{
2725 yyval.a_type = ASN_STRING_T61String;
2726 fprintf(stderr, "WARNING: T61String is not fully supported\n");
2727 ;
Lev Walkin1004aa92004-09-08 00:28:11 +00002728 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002729case 170:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002730#line 1495 "asn1p_y.y"
Lev Walkin9c974182004-09-15 11:59:51 +00002731{ yyval.a_type = ASN_STRING_TeletexString; ;
2732 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002733case 171:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002734#line 1496 "asn1p_y.y"
Lev Walkin9c974182004-09-15 11:59:51 +00002735{ yyval.a_type = ASN_STRING_UniversalString; ;
2736 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002737case 172:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002738#line 1497 "asn1p_y.y"
Lev Walkin9c974182004-09-15 11:59:51 +00002739{ yyval.a_type = ASN_STRING_UTF8String; ;
2740 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002741case 173:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002742#line 1498 "asn1p_y.y"
Lev Walkin9c974182004-09-15 11:59:51 +00002743{
2744 yyval.a_type = ASN_STRING_VideotexString;
2745 fprintf(stderr, "WARNING: VideotexString is not fully supported\n");
2746 ;
2747 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002748case 174:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002749#line 1502 "asn1p_y.y"
Lev Walkin9c974182004-09-15 11:59:51 +00002750{ yyval.a_type = ASN_STRING_VisibleString; ;
2751 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002752case 175:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002753#line 1503 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002754{ yyval.a_type = ASN_STRING_ObjectDescriptor; ;
2755 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002756case 181:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002757#line 1515 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002758{ yyval.a_constr = 0; ;
2759 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002760case 182:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002761#line 1516 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002762{
Lev Walkinceb20e72004-09-05 10:40:41 +00002763 yyval.a_constr = yyvsp[0].a_constr;
Lev Walkin1004aa92004-09-08 00:28:11 +00002764 ;
2765 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002766case 183:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002767#line 1522 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002768{
Lev Walkinceb20e72004-09-05 10:40:41 +00002769 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_SET, yyvsp[0].a_constr, 0);
Lev Walkin1004aa92004-09-08 00:28:11 +00002770 ;
2771 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002772case 184:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002773#line 1525 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002774{
Lev Walkinf15320b2004-06-03 03:38:44 +00002775 /*
2776 * This is a special case, for compatibility purposes.
Lev Walkinf59d0752004-08-18 04:59:12 +00002777 * It goes without parentheses.
Lev Walkinf15320b2004-06-03 03:38:44 +00002778 */
Lev Walkind2ea1de2004-08-20 13:25:29 +00002779 CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_SIZE, yyvsp[-1].a_constr, 0);
Lev Walkin1004aa92004-09-08 00:28:11 +00002780 ;
2781 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002782case 185:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002783#line 1535 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002784{
Lev Walkinf15320b2004-06-03 03:38:44 +00002785 yyval.a_constr = yyvsp[-1].a_constr;
Lev Walkin1004aa92004-09-08 00:28:11 +00002786 ;
2787 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002788case 186:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002789#line 1538 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002790{
Lev Walkinf59d0752004-08-18 04:59:12 +00002791 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_SET, yyvsp[-3].a_constr, yyvsp[-1].a_constr);
Lev Walkin1004aa92004-09-08 00:28:11 +00002792 ;
2793 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002794case 187:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002795#line 1544 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002796{
Lev Walkinf15320b2004-06-03 03:38:44 +00002797 yyval.a_constr = yyvsp[0].a_constr;
Lev Walkin1004aa92004-09-08 00:28:11 +00002798 ;
2799 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002800case 188:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002801#line 1547 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002802{
Lev Walkinf15320b2004-06-03 03:38:44 +00002803 asn1p_constraint_t *ct;
2804 ct = asn1p_constraint_new(yylineno);
Lev Walkinf15320b2004-06-03 03:38:44 +00002805 ct->type = ACT_EL_EXT;
2806 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-2].a_constr, ct);
Lev Walkin1004aa92004-09-08 00:28:11 +00002807 ;
2808 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002809case 189:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002810#line 1553 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002811{
Lev Walkinf15320b2004-06-03 03:38:44 +00002812 asn1p_constraint_t *ct;
2813 ct = asn1p_constraint_new(yylineno);
Lev Walkinf15320b2004-06-03 03:38:44 +00002814 ct->type = ACT_EL_EXT;
2815 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-4].a_constr, ct);
Lev Walkinb4fcdd22004-08-13 12:35:09 +00002816 ct = yyval.a_constr;
2817 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, ct, yyvsp[0].a_constr);
Lev Walkin1004aa92004-09-08 00:28:11 +00002818 ;
2819 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002820case 190:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002821#line 1564 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002822{
Lev Walkinf59d0752004-08-18 04:59:12 +00002823 yyval.a_constr = yyvsp[0].a_constr;
Lev Walkin1004aa92004-09-08 00:28:11 +00002824 ;
2825 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002826case 191:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002827#line 1567 "asn1p_y.y"
Lev Walkin1e448d32005-03-24 14:26:38 +00002828{
2829 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_AEX, yyvsp[0].a_constr, 0);
2830 ;
2831 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002832case 192:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002833#line 1570 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002834{
Lev Walkinf15320b2004-06-03 03:38:44 +00002835 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_UNI, yyvsp[-2].a_constr, yyvsp[0].a_constr);
Lev Walkin1004aa92004-09-08 00:28:11 +00002836 ;
2837 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002838case 193:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002839#line 1573 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002840{
Lev Walkinf15320b2004-06-03 03:38:44 +00002841 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_INT, yyvsp[-2].a_constr, yyvsp[0].a_constr);
Lev Walkin1004aa92004-09-08 00:28:11 +00002842 ;
2843 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002844case 194:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002845#line 1576 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002846{
Lev Walkinf15320b2004-06-03 03:38:44 +00002847 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_EXC, yyvsp[-2].a_constr, yyvsp[0].a_constr);
Lev Walkin1004aa92004-09-08 00:28:11 +00002848 ;
2849 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002850case 195:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002851#line 1582 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002852{
Lev Walkinf15320b2004-06-03 03:38:44 +00002853 int ret;
2854 yyval.a_constr = asn1p_constraint_new(yylineno);
2855 checkmem(yyval.a_constr);
2856 yyval.a_constr->type = yyvsp[-3].a_ctype;
2857 ret = asn1p_constraint_insert(yyval.a_constr, yyvsp[-1].a_constr);
2858 checkmem(ret == 0);
Lev Walkin1004aa92004-09-08 00:28:11 +00002859 ;
2860 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002861case 196:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002862#line 1590 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002863{
Lev Walkinf59d0752004-08-18 04:59:12 +00002864 int ret;
2865 yyval.a_constr = asn1p_constraint_new(yylineno);
2866 checkmem(yyval.a_constr);
2867 yyval.a_constr->type = ACT_CA_SET;
2868 ret = asn1p_constraint_insert(yyval.a_constr, yyvsp[-1].a_constr);
2869 checkmem(ret == 0);
Lev Walkin1004aa92004-09-08 00:28:11 +00002870 ;
2871 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002872case 197:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002873#line 1598 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002874{
Lev Walkinf59d0752004-08-18 04:59:12 +00002875 yyval.a_constr = asn1p_constraint_new(yylineno);
2876 checkmem(yyval.a_constr);
2877 yyval.a_constr->type = ACT_EL_VALUE;
2878 yyval.a_constr->value = yyvsp[0].a_value;
Lev Walkin1004aa92004-09-08 00:28:11 +00002879 ;
2880 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002881case 198:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002882#line 1604 "asn1p_y.y"
Lev Walkin9c974182004-09-15 11:59:51 +00002883{
Lev Walkin144db9b2004-10-12 23:26:53 +00002884 yyval.a_constr = asn1p_constraint_new(yylineno);
2885 checkmem(yyval.a_constr);
Lev Walkinff7dd142005-03-20 12:58:00 +00002886 yyval.a_constr->type = ACT_EL_TYPE;
2887 yyval.a_constr->containedSubtype = yyvsp[0].a_value;
Lev Walkin9c974182004-09-15 11:59:51 +00002888 ;
2889 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002890case 199:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002891#line 1610 "asn1p_y.y"
Lev Walkinc8092cb2005-02-18 16:34:21 +00002892{
Lev Walkin1e448d32005-03-24 14:26:38 +00002893 yyval.a_constr = asn1p_constraint_new(yylineno);
2894 checkmem(yyval.a_constr);
2895 yyval.a_constr->type = yyvsp[-1].a_ctype;
2896 yyval.a_constr->range_start = yyvsp[-2].a_value;
2897 yyval.a_constr->range_stop = yyvsp[0].a_value;
Lev Walkinc8092cb2005-02-18 16:34:21 +00002898 ;
Lev Walkin144db9b2004-10-12 23:26:53 +00002899 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002900case 200:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002901#line 1617 "asn1p_y.y"
Lev Walkin8ea99482005-03-31 21:48:13 +00002902{
2903 yyval.a_constr = asn1p_constraint_new(yylineno);
2904 checkmem(yyval.a_constr);
2905 yyval.a_constr->type = yyvsp[-1].a_ctype;
2906 yyval.a_constr->range_start = asn1p_value_fromint(-123);
2907 yyval.a_constr->range_stop = yyvsp[0].a_value;
2908 yyval.a_constr->range_start->type = ATV_MIN;
2909 ;
2910 break;}
2911case 201:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002912#line 1625 "asn1p_y.y"
Lev Walkin8ea99482005-03-31 21:48:13 +00002913{
2914 yyval.a_constr = asn1p_constraint_new(yylineno);
2915 checkmem(yyval.a_constr);
2916 yyval.a_constr->type = yyvsp[-1].a_ctype;
2917 yyval.a_constr->range_start = yyvsp[-2].a_value;
2918 yyval.a_constr->range_stop = asn1p_value_fromint(321);
2919 yyval.a_constr->range_stop->type = ATV_MAX;
2920 ;
2921 break;}
2922case 202:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002923#line 1633 "asn1p_y.y"
Lev Walkin8ea99482005-03-31 21:48:13 +00002924{
2925 yyval.a_constr = asn1p_constraint_new(yylineno);
2926 checkmem(yyval.a_constr);
2927 yyval.a_constr->type = yyvsp[-1].a_ctype;
2928 yyval.a_constr->range_start = asn1p_value_fromint(-123);
2929 yyval.a_constr->range_stop = asn1p_value_fromint(321);
2930 yyval.a_constr->range_start->type = ATV_MIN;
2931 yyval.a_constr->range_stop->type = ATV_MAX;
2932 ;
2933 break;}
2934case 203:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002935#line 1642 "asn1p_y.y"
Lev Walkin8ea99482005-03-31 21:48:13 +00002936{
2937 yyval.a_constr = yyvsp[0].a_constr;
2938 ;
2939 break;}
2940case 204:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002941#line 1645 "asn1p_y.y"
Lev Walkin8ea99482005-03-31 21:48:13 +00002942{
2943 yyval.a_constr = yyvsp[0].a_constr;
2944 ;
2945 break;}
Lev Walkin144db9b2004-10-12 23:26:53 +00002946case 205:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002947#line 1649 "asn1p_y.y"
Lev Walkin1893ddf2005-03-20 14:28:32 +00002948{ asn1p_lexer_hack_push_opaque_state(); ;
Lev Walkin144db9b2004-10-12 23:26:53 +00002949 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002950case 206:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002951#line 1649 "asn1p_y.y"
Lev Walkin1893ddf2005-03-20 14:28:32 +00002952{
2953 yyval.a_constr = asn1p_constraint_new(yylineno);
2954 checkmem(yyval.a_constr);
2955 yyval.a_constr->type = ACT_CT_CTDBY;
2956 yyval.a_constr->value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
2957 checkmem(yyval.a_constr->value);
2958 yyval.a_constr->value->type = ATV_UNPARSED;
2959 ;
Lev Walkin144db9b2004-10-12 23:26:53 +00002960 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002961case 207:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002962#line 1660 "asn1p_y.y"
Lev Walkin1893ddf2005-03-20 14:28:32 +00002963{ yyval.a_ctype = ACT_EL_RANGE; ;
Lev Walkinc8092cb2005-02-18 16:34:21 +00002964 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002965case 208:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002966#line 1661 "asn1p_y.y"
Lev Walkin1893ddf2005-03-20 14:28:32 +00002967{ yyval.a_ctype = ACT_EL_RLRANGE; ;
Lev Walkinff7dd142005-03-20 12:58:00 +00002968 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002969case 209:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002970#line 1662 "asn1p_y.y"
Lev Walkin1893ddf2005-03-20 14:28:32 +00002971{ yyval.a_ctype = ACT_EL_LLRANGE; ;
2972 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002973case 210:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002974#line 1663 "asn1p_y.y"
Lev Walkin1893ddf2005-03-20 14:28:32 +00002975{ yyval.a_ctype = ACT_EL_ULRANGE; ;
2976 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002977case 211:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002978#line 1667 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002979{
Lev Walkinceb20e72004-09-05 10:40:41 +00002980 yyval.a_ctype = ACT_CT_SIZE;
Lev Walkin1004aa92004-09-08 00:28:11 +00002981 ;
2982 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002983case 212:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002984#line 1670 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00002985{
Lev Walkinceb20e72004-09-05 10:40:41 +00002986 yyval.a_ctype = ACT_CT_FROM;
Lev Walkin1004aa92004-09-08 00:28:11 +00002987 ;
2988 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002989case 213:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002990#line 1676 "asn1p_y.y"
Lev Walkinc8092cb2005-02-18 16:34:21 +00002991{
2992 yyval.a_value = asn1p_value_fromint(0);
2993 checkmem(yyval.a_value);
2994 yyval.a_value->type = ATV_FALSE;
2995 ;
2996 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00002997case 214:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00002998#line 1681 "asn1p_y.y"
Lev Walkinc8092cb2005-02-18 16:34:21 +00002999{
3000 yyval.a_value = asn1p_value_fromint(1);
3001 checkmem(yyval.a_value);
3002 yyval.a_value->type = ATV_TRUE;
3003 ;
3004 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003005case 215:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003006#line 1686 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003007{
Lev Walkinf15320b2004-06-03 03:38:44 +00003008 yyval.a_value = yyvsp[0].a_value;
Lev Walkin1004aa92004-09-08 00:28:11 +00003009 ;
3010 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003011case 216:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003012#line 1689 "asn1p_y.y"
Lev Walkinc8092cb2005-02-18 16:34:21 +00003013{
Lev Walkin1e448d32005-03-24 14:26:38 +00003014 yyval.a_value = yyvsp[0].a_value;
Lev Walkinc8092cb2005-02-18 16:34:21 +00003015 ;
3016 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003017case 217:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003018#line 1692 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003019{
Lev Walkinf15320b2004-06-03 03:38:44 +00003020 asn1p_ref_t *ref;
3021 int ret;
3022 ref = asn1p_ref_new(yylineno);
3023 checkmem(ref);
3024 ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
3025 checkmem(ret == 0);
3026 yyval.a_value = asn1p_value_fromref(ref, 0);
3027 checkmem(yyval.a_value);
3028 free(yyvsp[0].tv_str);
Lev Walkin1004aa92004-09-08 00:28:11 +00003029 ;
3030 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003031case 218:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003032#line 1706 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003033{
Lev Walkinc8092cb2005-02-18 16:34:21 +00003034 asn1p_ref_t *ref;
3035 int ret;
3036 ref = asn1p_ref_new(yylineno);
3037 checkmem(ref);
3038 ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_UNKNOWN);
3039 checkmem(ret == 0);
3040 yyval.a_value = asn1p_value_fromref(ref, 0);
Lev Walkinf15320b2004-06-03 03:38:44 +00003041 checkmem(yyval.a_value);
Lev Walkinc8092cb2005-02-18 16:34:21 +00003042 free(yyvsp[0].tv_str);
Lev Walkin1004aa92004-09-08 00:28:11 +00003043 ;
3044 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003045case 219:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003046#line 1720 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003047{
Lev Walkine596bf02005-03-28 15:01:27 +00003048 CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_WCOMP, yyvsp[0].a_constr, 0);
Lev Walkin1004aa92004-09-08 00:28:11 +00003049 ;
3050 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003051case 220:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003052#line 1723 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003053{
Lev Walkine596bf02005-03-28 15:01:27 +00003054 CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_WCOMPS, yyvsp[-1].a_constr, 0);
Lev Walkin1004aa92004-09-08 00:28:11 +00003055 ;
3056 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003057case 221:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003058#line 1729 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003059{
Lev Walkine596bf02005-03-28 15:01:27 +00003060 yyval.a_constr = yyvsp[0].a_constr;
Lev Walkin1004aa92004-09-08 00:28:11 +00003061 ;
3062 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003063case 222:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003064#line 1732 "asn1p_y.y"
Lev Walkine596bf02005-03-28 15:01:27 +00003065{
3066 CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_WCOMPS, yyvsp[-2].a_constr, yyvsp[0].a_constr);
3067 ;
3068 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003069case 223:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003070#line 1738 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003071{
Lev Walkinf15320b2004-06-03 03:38:44 +00003072 yyval.a_constr = asn1p_constraint_new(yylineno);
3073 checkmem(yyval.a_constr);
3074 yyval.a_constr->type = ACT_EL_EXT;
Lev Walkine596bf02005-03-28 15:01:27 +00003075 yyval.a_constr->value = asn1p_value_frombuf("...", 3, 0);
Lev Walkin1004aa92004-09-08 00:28:11 +00003076 ;
3077 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003078case 224:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003079#line 1744 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003080{
Lev Walkinf15320b2004-06-03 03:38:44 +00003081 yyval.a_constr = asn1p_constraint_new(yylineno);
3082 checkmem(yyval.a_constr);
3083 yyval.a_constr->type = ACT_EL_VALUE;
3084 yyval.a_constr->value = asn1p_value_frombuf(yyvsp[-2].tv_str, strlen(yyvsp[-2].tv_str), 0);
3085 yyval.a_constr->presence = yyvsp[0].a_pres;
Lev Walkine596bf02005-03-28 15:01:27 +00003086 if(yyvsp[-1].a_constr) asn1p_constraint_insert(yyval.a_constr, yyvsp[-1].a_constr);
Lev Walkin1004aa92004-09-08 00:28:11 +00003087 ;
3088 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003089case 225:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003090#line 1758 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003091{ yyval.a_pres = ACPRES_DEFAULT; ;
3092 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003093case 226:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003094#line 1759 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003095{ yyval.a_pres = yyvsp[0].a_pres; ;
3096 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003097case 227:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003098#line 1763 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003099{
Lev Walkinf15320b2004-06-03 03:38:44 +00003100 yyval.a_pres = ACPRES_PRESENT;
Lev Walkin1004aa92004-09-08 00:28:11 +00003101 ;
3102 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003103case 228:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003104#line 1766 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003105{
Lev Walkinf15320b2004-06-03 03:38:44 +00003106 yyval.a_pres = ACPRES_ABSENT;
Lev Walkin1004aa92004-09-08 00:28:11 +00003107 ;
3108 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003109case 229:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003110#line 1769 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003111{
Lev Walkinf15320b2004-06-03 03:38:44 +00003112 yyval.a_pres = ACPRES_OPTIONAL;
Lev Walkin1004aa92004-09-08 00:28:11 +00003113 ;
3114 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003115case 230:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003116#line 1775 "asn1p_y.y"
Lev Walkin1893ddf2005-03-20 14:28:32 +00003117{
3118 yyval.a_constr = yyvsp[0].a_constr;
3119 ;
3120 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003121case 231:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003122#line 1778 "asn1p_y.y"
Lev Walkine596bf02005-03-28 15:01:27 +00003123{
3124 yyval.a_constr = yyvsp[0].a_constr;
3125 ;
3126 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003127case 232:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003128#line 1787 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003129{
Lev Walkinf15320b2004-06-03 03:38:44 +00003130 asn1p_ref_t *ref = asn1p_ref_new(yylineno);
3131 asn1p_constraint_t *ct;
3132 int ret;
3133 ret = asn1p_ref_add_component(ref, yyvsp[-1].tv_str, 0);
3134 checkmem(ret == 0);
3135 ct = asn1p_constraint_new(yylineno);
3136 checkmem(yyval.a_constr);
3137 ct->type = ACT_EL_VALUE;
3138 ct->value = asn1p_value_fromref(ref, 0);
3139 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CRC, ct, 0);
Lev Walkin1004aa92004-09-08 00:28:11 +00003140 ;
3141 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003142case 233:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003143#line 1802 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003144{
Lev Walkinf15320b2004-06-03 03:38:44 +00003145 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CRC, yyvsp[-3].a_constr, yyvsp[-1].a_constr);
Lev Walkin1004aa92004-09-08 00:28:11 +00003146 ;
3147 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003148case 234:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003149#line 1808 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003150{
Lev Walkinf15320b2004-06-03 03:38:44 +00003151 yyval.a_constr = asn1p_constraint_new(yylineno);
3152 checkmem(yyval.a_constr);
3153 yyval.a_constr->type = ACT_EL_VALUE;
3154 yyval.a_constr->value = asn1p_value_fromref(yyvsp[0].a_ref, 0);
Lev Walkin1004aa92004-09-08 00:28:11 +00003155 ;
3156 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003157case 235:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003158#line 1814 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003159{
Lev Walkinf15320b2004-06-03 03:38:44 +00003160 asn1p_constraint_t *ct;
3161 ct = asn1p_constraint_new(yylineno);
3162 checkmem(ct);
3163 ct->type = ACT_EL_VALUE;
3164 ct->value = asn1p_value_fromref(yyvsp[0].a_ref, 0);
3165 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-2].a_constr, ct);
Lev Walkin1004aa92004-09-08 00:28:11 +00003166 ;
3167 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003168case 236:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003169#line 1828 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003170{
Lev Walkinf15320b2004-06-03 03:38:44 +00003171 char *p = malloc(strlen(yyvsp[0].tv_str) + 2);
3172 int ret;
3173 *p = '@';
3174 strcpy(p + 1, yyvsp[0].tv_str);
3175 yyval.a_ref = asn1p_ref_new(yylineno);
3176 ret = asn1p_ref_add_component(yyval.a_ref, p, 0);
3177 checkmem(ret == 0);
3178 free(p);
3179 free(yyvsp[0].tv_str);
Lev Walkin1004aa92004-09-08 00:28:11 +00003180 ;
3181 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003182case 237:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003183#line 1839 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003184{
Lev Walkinf15320b2004-06-03 03:38:44 +00003185 char *p = malloc(strlen(yyvsp[0].tv_str) + 3);
3186 int ret;
3187 p[0] = '@';
3188 p[1] = '.';
3189 strcpy(p + 2, yyvsp[0].tv_str);
3190 yyval.a_ref = asn1p_ref_new(yylineno);
3191 ret = asn1p_ref_add_component(yyval.a_ref, p, 0);
3192 checkmem(ret == 0);
3193 free(p);
3194 free(yyvsp[0].tv_str);
Lev Walkin1004aa92004-09-08 00:28:11 +00003195 ;
3196 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003197case 238:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003198#line 1855 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003199{
Lev Walkinf15320b2004-06-03 03:38:44 +00003200 yyval.tv_str = yyvsp[0].tv_str;
Lev Walkin1004aa92004-09-08 00:28:11 +00003201 ;
3202 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003203case 239:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003204#line 1858 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003205{
Lev Walkinf15320b2004-06-03 03:38:44 +00003206 int l1 = strlen(yyvsp[-2].tv_str);
3207 int l3 = strlen(yyvsp[0].tv_str);
3208 yyval.tv_str = malloc(l1 + 1 + l3 + 1);
3209 memcpy(yyval.tv_str, yyvsp[-2].tv_str, l1);
3210 yyval.tv_str[l1] = '.';
3211 memcpy(yyval.tv_str + l1 + 1, yyvsp[0].tv_str, l3);
3212 yyval.tv_str[l1 + 1 + l3] = '\0';
Lev Walkin1004aa92004-09-08 00:28:11 +00003213 ;
3214 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003215case 240:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003216#line 1876 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003217{
Lev Walkin9c974182004-09-15 11:59:51 +00003218 yyval.a_marker.flags = EM_NOMARK;
3219 yyval.a_marker.default_value = 0;
Lev Walkin1004aa92004-09-08 00:28:11 +00003220 ;
3221 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003222case 241:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003223#line 1880 "asn1p_y.y"
Lev Walkin9c974182004-09-15 11:59:51 +00003224{ yyval.a_marker = yyvsp[0].a_marker; ;
Lev Walkinec208e62004-09-14 02:44:07 +00003225 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003226case 242:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003227#line 1884 "asn1p_y.y"
Lev Walkinec208e62004-09-14 02:44:07 +00003228{
Lev Walkin9c974182004-09-15 11:59:51 +00003229 yyval.a_marker.flags = EM_OPTIONAL;
3230 yyval.a_marker.default_value = 0;
Lev Walkinec208e62004-09-14 02:44:07 +00003231 ;
3232 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003233case 243:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003234#line 1888 "asn1p_y.y"
Lev Walkin9c974182004-09-15 11:59:51 +00003235{
3236 yyval.a_marker.flags = EM_DEFAULT;
3237 yyval.a_marker.default_value = yyvsp[0].a_value;
3238 ;
3239 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003240case 244:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003241#line 1911 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003242{
Lev Walkinceb20e72004-09-05 10:40:41 +00003243 yyval.a_expr = asn1p_expr_new(yylineno);
Lev Walkinf15320b2004-06-03 03:38:44 +00003244 checkmem(yyval.a_expr);
Lev Walkin1004aa92004-09-08 00:28:11 +00003245 ;
3246 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003247case 245:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003248#line 1915 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003249{
Lev Walkine596bf02005-03-28 15:01:27 +00003250 yyval.a_expr = yyvsp[-1].a_expr;
Lev Walkin1004aa92004-09-08 00:28:11 +00003251 ;
3252 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003253case 246:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003254#line 1921 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003255{
Lev Walkine596bf02005-03-28 15:01:27 +00003256 yyval.a_expr = asn1p_expr_new(yylineno);
3257 checkmem(yyval.a_expr);
Lev Walkin1004aa92004-09-08 00:28:11 +00003258 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
3259 ;
3260 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003261case 247:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003262#line 1926 "asn1p_y.y"
Lev Walkine596bf02005-03-28 15:01:27 +00003263{
3264 yyval.a_expr = yyvsp[-2].a_expr;
3265 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
3266 ;
3267 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003268case 248:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003269#line 1933 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003270{
Lev Walkinceb20e72004-09-05 10:40:41 +00003271 yyval.a_expr = asn1p_expr_new(yylineno);
Lev Walkinf15320b2004-06-03 03:38:44 +00003272 checkmem(yyval.a_expr);
3273 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3274 yyval.a_expr->meta_type = AMT_VALUE;
3275 yyval.a_expr->Identifier = yyvsp[0].tv_str;
Lev Walkin1004aa92004-09-08 00:28:11 +00003276 ;
3277 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003278case 249:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003279#line 1940 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003280{
Lev Walkinceb20e72004-09-05 10:40:41 +00003281 yyval.a_expr = asn1p_expr_new(yylineno);
Lev Walkinf15320b2004-06-03 03:38:44 +00003282 checkmem(yyval.a_expr);
3283 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3284 yyval.a_expr->meta_type = AMT_VALUE;
Lev Walkin1893ddf2005-03-20 14:28:32 +00003285 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
3286 yyval.a_expr->value = yyvsp[-1].a_value;
3287 ;
3288 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003289case 250:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003290#line 1948 "asn1p_y.y"
Lev Walkine596bf02005-03-28 15:01:27 +00003291{
3292 yyval.a_expr = asn1p_expr_new(yylineno);
3293 checkmem(yyval.a_expr);
3294 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3295 yyval.a_expr->meta_type = AMT_VALUE;
3296 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
3297 yyval.a_expr->value = yyvsp[-1].a_value;
3298 ;
3299 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003300case 251:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003301#line 1956 "asn1p_y.y"
Lev Walkin1893ddf2005-03-20 14:28:32 +00003302{
3303 yyval.a_expr = asn1p_expr_new(yylineno);
3304 checkmem(yyval.a_expr);
3305 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3306 yyval.a_expr->meta_type = AMT_VALUE;
Lev Walkinf15320b2004-06-03 03:38:44 +00003307 yyval.a_expr->value = yyvsp[0].a_value;
Lev Walkin1004aa92004-09-08 00:28:11 +00003308 ;
3309 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003310case 252:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003311#line 1963 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003312{
Lev Walkinceb20e72004-09-05 10:40:41 +00003313 yyval.a_expr = asn1p_expr_new(yylineno);
Lev Walkinf15320b2004-06-03 03:38:44 +00003314 checkmem(yyval.a_expr);
3315 yyval.a_expr->Identifier = strdup("...");
3316 checkmem(yyval.a_expr->Identifier);
3317 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
3318 yyval.a_expr->meta_type = AMT_VALUE;
Lev Walkin1004aa92004-09-08 00:28:11 +00003319 ;
3320 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003321case 253:
Lev Walkin8ea99482005-03-31 21:48:13 +00003322#line 1974 "asn1p_y.y"
Lev Walkine596bf02005-03-28 15:01:27 +00003323{
3324 yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int);
3325 checkmem(yyval.a_value);
3326 ;
Lev Walkin1893ddf2005-03-20 14:28:32 +00003327 break;}
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003328case 254:
3329#line 1978 "asn1p_y.y"
3330{
3331 yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int);
3332 checkmem(yyval.a_value);
3333 ;
3334 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003335case 255:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003336#line 2009 "asn1p_y.y"
Lev Walkine596bf02005-03-28 15:01:27 +00003337{ memset(&yyval.a_tag, 0, sizeof(yyval.a_tag)); ;
Lev Walkin1893ddf2005-03-20 14:28:32 +00003338 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003339case 256:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003340#line 2010 "asn1p_y.y"
Lev Walkine596bf02005-03-28 15:01:27 +00003341{ yyval.a_tag = yyvsp[0].a_tag; ;
3342 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003343case 257:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003344#line 2014 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003345{
Lev Walkinc603f102005-01-23 09:51:44 +00003346 yyval.a_tag = yyvsp[-1].a_tag;
3347 yyval.a_tag.tag_mode = yyvsp[0].a_tag.tag_mode;
Lev Walkin1004aa92004-09-08 00:28:11 +00003348 ;
3349 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003350case 258:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003351#line 2021 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003352{
Lev Walkinc603f102005-01-23 09:51:44 +00003353 yyval.a_tag = yyvsp[-2].a_tag;
3354 yyval.a_tag.tag_value = yyvsp[-1].a_int;
Lev Walkin1004aa92004-09-08 00:28:11 +00003355 ;
3356 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003357case 259:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003358#line 2027 "asn1p_y.y"
Lev Walkinc603f102005-01-23 09:51:44 +00003359{ yyval.a_tag.tag_class = TC_CONTEXT_SPECIFIC; ;
Lev Walkin1004aa92004-09-08 00:28:11 +00003360 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003361case 260:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003362#line 2028 "asn1p_y.y"
Lev Walkinc603f102005-01-23 09:51:44 +00003363{ yyval.a_tag.tag_class = TC_UNIVERSAL; ;
Lev Walkin83cac2f2004-09-22 16:03:36 +00003364 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003365case 261:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003366#line 2029 "asn1p_y.y"
Lev Walkinc603f102005-01-23 09:51:44 +00003367{ yyval.a_tag.tag_class = TC_APPLICATION; ;
Lev Walkin144db9b2004-10-12 23:26:53 +00003368 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003369case 262:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003370#line 2030 "asn1p_y.y"
Lev Walkinc603f102005-01-23 09:51:44 +00003371{ yyval.a_tag.tag_class = TC_PRIVATE; ;
3372 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003373case 263:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003374#line 2034 "asn1p_y.y"
Lev Walkinc603f102005-01-23 09:51:44 +00003375{ yyval.a_tag.tag_mode = TM_DEFAULT; ;
3376 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003377case 264:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003378#line 2035 "asn1p_y.y"
Lev Walkin1893ddf2005-03-20 14:28:32 +00003379{ yyval.a_tag.tag_mode = TM_IMPLICIT; ;
Lev Walkin144db9b2004-10-12 23:26:53 +00003380 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003381case 265:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003382#line 2036 "asn1p_y.y"
Lev Walkin1893ddf2005-03-20 14:28:32 +00003383{ yyval.a_tag.tag_mode = TM_EXPLICIT; ;
Lev Walkin144db9b2004-10-12 23:26:53 +00003384 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003385case 266:
Lev Walkin8ea99482005-03-31 21:48:13 +00003386#line 2040 "asn1p_y.y"
Lev Walkin1e448d32005-03-24 14:26:38 +00003387{
3388 checkmem(yyvsp[0].tv_str);
3389 yyval.tv_str = yyvsp[0].tv_str;
3390 ;
3391 break;}
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003392case 267:
3393#line 2044 "asn1p_y.y"
3394{
3395 checkmem(yyvsp[0].tv_str);
3396 yyval.tv_str = yyvsp[0].tv_str;
3397 ;
3398 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003399case 268:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003400#line 2052 "asn1p_y.y"
Lev Walkine596bf02005-03-28 15:01:27 +00003401{
3402 checkmem(yyvsp[0].tv_str);
3403 yyval.tv_str = yyvsp[0].tv_str;
3404 ;
Lev Walkin1e448d32005-03-24 14:26:38 +00003405 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003406case 269:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003407#line 2059 "asn1p_y.y"
Lev Walkine596bf02005-03-28 15:01:27 +00003408{ yyval.tv_str = 0; ;
3409 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003410case 270:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003411#line 2060 "asn1p_y.y"
Lev Walkin1e448d32005-03-24 14:26:38 +00003412{
3413 yyval.tv_str = yyvsp[0].tv_str;
3414 ;
3415 break;}
Lev Walkin8ea99482005-03-31 21:48:13 +00003416case 271:
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003417#line 2066 "asn1p_y.y"
Lev Walkin1004aa92004-09-08 00:28:11 +00003418{
Lev Walkinceb20e72004-09-05 10:40:41 +00003419 checkmem(yyvsp[0].tv_str);
3420 yyval.tv_str = yyvsp[0].tv_str;
Lev Walkin1004aa92004-09-08 00:28:11 +00003421 ;
3422 break;}
Lev Walkin1004aa92004-09-08 00:28:11 +00003423}
3424 /* the action file gets copied in in place of this dollarsign */
3425#line 543 "/usr/share/bison.simple"
Lev Walkinf15320b2004-06-03 03:38:44 +00003426
3427 yyvsp -= yylen;
3428 yyssp -= yylen;
Lev Walkin1004aa92004-09-08 00:28:11 +00003429#ifdef YYLSP_NEEDED
3430 yylsp -= yylen;
3431#endif
Lev Walkinf15320b2004-06-03 03:38:44 +00003432
Lev Walkin1004aa92004-09-08 00:28:11 +00003433#if YYDEBUG != 0
Lev Walkinf15320b2004-06-03 03:38:44 +00003434 if (yydebug)
3435 {
Lev Walkin1004aa92004-09-08 00:28:11 +00003436 short *ssp1 = yyss - 1;
3437 fprintf (stderr, "state stack now");
3438 while (ssp1 != yyssp)
3439 fprintf (stderr, " %d", *++ssp1);
3440 fprintf (stderr, "\n");
Lev Walkinf15320b2004-06-03 03:38:44 +00003441 }
3442#endif
3443
3444 *++yyvsp = yyval;
3445
Lev Walkin1004aa92004-09-08 00:28:11 +00003446#ifdef YYLSP_NEEDED
3447 yylsp++;
3448 if (yylen == 0)
3449 {
3450 yylsp->first_line = yylloc.first_line;
3451 yylsp->first_column = yylloc.first_column;
3452 yylsp->last_line = (yylsp-1)->last_line;
3453 yylsp->last_column = (yylsp-1)->last_column;
3454 yylsp->text = 0;
3455 }
3456 else
3457 {
3458 yylsp->last_line = (yylsp+yylen-1)->last_line;
3459 yylsp->last_column = (yylsp+yylen-1)->last_column;
3460 }
3461#endif
Lev Walkinf15320b2004-06-03 03:38:44 +00003462
Lev Walkin1004aa92004-09-08 00:28:11 +00003463 /* Now "shift" the result of the reduction.
3464 Determine what state that goes to,
3465 based on the state we popped back to
3466 and the rule number reduced by. */
Lev Walkinf15320b2004-06-03 03:38:44 +00003467
3468 yyn = yyr1[yyn];
3469
Lev Walkin1004aa92004-09-08 00:28:11 +00003470 yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
3471 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
Lev Walkinf15320b2004-06-03 03:38:44 +00003472 yystate = yytable[yystate];
3473 else
Lev Walkin1004aa92004-09-08 00:28:11 +00003474 yystate = yydefgoto[yyn - YYNTBASE];
Lev Walkinf15320b2004-06-03 03:38:44 +00003475
3476 goto yynewstate;
3477
Lev Walkin1004aa92004-09-08 00:28:11 +00003478yyerrlab: /* here on detecting error */
Lev Walkinf15320b2004-06-03 03:38:44 +00003479
Lev Walkin1004aa92004-09-08 00:28:11 +00003480 if (! yyerrstatus)
3481 /* If not already recovering from an error, report this error. */
Lev Walkinf15320b2004-06-03 03:38:44 +00003482 {
3483 ++yynerrs;
Lev Walkin1004aa92004-09-08 00:28:11 +00003484
3485#ifdef YYERROR_VERBOSE
Lev Walkinf15320b2004-06-03 03:38:44 +00003486 yyn = yypact[yystate];
3487
Lev Walkin1004aa92004-09-08 00:28:11 +00003488 if (yyn > YYFLAG && yyn < YYLAST)
Lev Walkinf15320b2004-06-03 03:38:44 +00003489 {
Lev Walkin1004aa92004-09-08 00:28:11 +00003490 int size = 0;
3491 char *msg;
3492 int x, count;
Lev Walkinf15320b2004-06-03 03:38:44 +00003493
Lev Walkin1004aa92004-09-08 00:28:11 +00003494 count = 0;
3495 /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
3496 for (x = (yyn < 0 ? -yyn : 0);
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003497 x < (int)(sizeof(yytname) / sizeof(char *)); x++)
Lev Walkin1004aa92004-09-08 00:28:11 +00003498 if (yycheck[x + yyn] == x)
3499 size += strlen(yytname[x]) + 15, count++;
3500 msg = (char *) malloc(size + 15);
3501 if (msg != 0)
Lev Walkinf15320b2004-06-03 03:38:44 +00003502 {
Lev Walkin1004aa92004-09-08 00:28:11 +00003503 strcpy(msg, "parse error");
Lev Walkinf15320b2004-06-03 03:38:44 +00003504
Lev Walkin1004aa92004-09-08 00:28:11 +00003505 if (count < 5)
Lev Walkinf15320b2004-06-03 03:38:44 +00003506 {
Lev Walkin1004aa92004-09-08 00:28:11 +00003507 count = 0;
3508 for (x = (yyn < 0 ? -yyn : 0);
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003509 x < (int)(sizeof(yytname) / sizeof(char *)); x++)
Lev Walkin1004aa92004-09-08 00:28:11 +00003510 if (yycheck[x + yyn] == x)
Lev Walkinf15320b2004-06-03 03:38:44 +00003511 {
Lev Walkin1004aa92004-09-08 00:28:11 +00003512 strcat(msg, count == 0 ? ", expecting `" : " or `");
3513 strcat(msg, yytname[x]);
3514 strcat(msg, "'");
3515 count++;
Lev Walkinf15320b2004-06-03 03:38:44 +00003516 }
3517 }
Lev Walkin1004aa92004-09-08 00:28:11 +00003518 yyerror(msg);
3519 free(msg);
Lev Walkinf15320b2004-06-03 03:38:44 +00003520 }
3521 else
Lev Walkin1004aa92004-09-08 00:28:11 +00003522 yyerror ("parse error; also virtual memory exceeded");
Lev Walkinf15320b2004-06-03 03:38:44 +00003523 }
3524 else
3525#endif /* YYERROR_VERBOSE */
Lev Walkin1004aa92004-09-08 00:28:11 +00003526 yyerror("parse error");
Lev Walkinf15320b2004-06-03 03:38:44 +00003527 }
Lev Walkin1004aa92004-09-08 00:28:11 +00003528
Lev Walkinf15320b2004-06-03 03:38:44 +00003529 goto yyerrlab1;
Lev Walkin1004aa92004-09-08 00:28:11 +00003530yyerrlab1: /* here on error raised explicitly by an action */
Lev Walkinf15320b2004-06-03 03:38:44 +00003531
3532 if (yyerrstatus == 3)
3533 {
Lev Walkin1004aa92004-09-08 00:28:11 +00003534 /* if just tried and failed to reuse lookahead token after an error, discard it. */
Lev Walkinf15320b2004-06-03 03:38:44 +00003535
Lev Walkin1004aa92004-09-08 00:28:11 +00003536 /* return failure if at end of input */
Lev Walkinf15320b2004-06-03 03:38:44 +00003537 if (yychar == YYEOF)
Lev Walkin1004aa92004-09-08 00:28:11 +00003538 YYABORT;
Lev Walkinf15320b2004-06-03 03:38:44 +00003539
Lev Walkin1004aa92004-09-08 00:28:11 +00003540#if YYDEBUG != 0
3541 if (yydebug)
3542 fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
3543#endif
3544
Lev Walkinf15320b2004-06-03 03:38:44 +00003545 yychar = YYEMPTY;
3546 }
3547
Lev Walkin1004aa92004-09-08 00:28:11 +00003548 /* Else will try to reuse lookahead token
3549 after shifting the error token. */
Lev Walkinf15320b2004-06-03 03:38:44 +00003550
Lev Walkin1004aa92004-09-08 00:28:11 +00003551 yyerrstatus = 3; /* Each real token shifted decrements this */
Lev Walkinf15320b2004-06-03 03:38:44 +00003552
Lev Walkin1004aa92004-09-08 00:28:11 +00003553 goto yyerrhandle;
Lev Walkin459ab022004-09-07 10:39:09 +00003554
Lev Walkin1004aa92004-09-08 00:28:11 +00003555yyerrdefault: /* current state does not do anything special for the error token. */
Lev Walkin459ab022004-09-07 10:39:09 +00003556
Lev Walkin1004aa92004-09-08 00:28:11 +00003557#if 0
3558 /* This is wrong; only states that explicitly want error tokens
3559 should shift them. */
3560 yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
3561 if (yyn) goto yydefault;
Lev Walkinceb20e72004-09-05 10:40:41 +00003562#endif
Lev Walkin1004aa92004-09-08 00:28:11 +00003563
3564yyerrpop: /* pop the current state because it cannot handle the error token */
3565
3566 if (yyssp == yyss) YYABORT;
3567 yyvsp--;
3568 yystate = *--yyssp;
3569#ifdef YYLSP_NEEDED
3570 yylsp--;
3571#endif
3572
3573#if YYDEBUG != 0
3574 if (yydebug)
3575 {
3576 short *ssp1 = yyss - 1;
3577 fprintf (stderr, "Error: state stack now");
3578 while (ssp1 != yyssp)
3579 fprintf (stderr, " %d", *++ssp1);
3580 fprintf (stderr, "\n");
Lev Walkinceb20e72004-09-05 10:40:41 +00003581 }
Lev Walkin1004aa92004-09-08 00:28:11 +00003582#endif
3583
3584yyerrhandle:
3585
3586 yyn = yypact[yystate];
3587 if (yyn == YYFLAG)
3588 goto yyerrdefault;
3589
3590 yyn += YYTERROR;
3591 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
3592 goto yyerrdefault;
3593
3594 yyn = yytable[yyn];
3595 if (yyn < 0)
3596 {
3597 if (yyn == YYFLAG)
3598 goto yyerrpop;
3599 yyn = -yyn;
3600 goto yyreduce;
3601 }
3602 else if (yyn == 0)
3603 goto yyerrpop;
Lev Walkinf15320b2004-06-03 03:38:44 +00003604
3605 if (yyn == YYFINAL)
3606 YYACCEPT;
3607
Lev Walkin1004aa92004-09-08 00:28:11 +00003608#if YYDEBUG != 0
3609 if (yydebug)
3610 fprintf(stderr, "Shifting error token, ");
3611#endif
Lev Walkinf15320b2004-06-03 03:38:44 +00003612
3613 *++yyvsp = yylval;
Lev Walkin1004aa92004-09-08 00:28:11 +00003614#ifdef YYLSP_NEEDED
3615 *++yylsp = yylloc;
3616#endif
Lev Walkinf15320b2004-06-03 03:38:44 +00003617
3618 yystate = yyn;
3619 goto yynewstate;
3620
Lev Walkin1004aa92004-09-08 00:28:11 +00003621 yyacceptlab:
3622 /* YYACCEPT comes here. */
3623 if (yyfree_stacks)
3624 {
3625 free (yyss);
3626 free (yyvs);
3627#ifdef YYLSP_NEEDED
3628 free (yyls);
Lev Walkin609ccbb2004-09-04 04:49:21 +00003629#endif
Lev Walkin1004aa92004-09-08 00:28:11 +00003630 }
3631 return 0;
Lev Walkin459ab022004-09-07 10:39:09 +00003632
Lev Walkin1004aa92004-09-08 00:28:11 +00003633 yyabortlab:
3634 /* YYABORT comes here. */
3635 if (yyfree_stacks)
3636 {
3637 free (yyss);
3638 free (yyvs);
3639#ifdef YYLSP_NEEDED
3640 free (yyls);
Lev Walkin459ab022004-09-07 10:39:09 +00003641#endif
Lev Walkin1004aa92004-09-08 00:28:11 +00003642 }
3643 return 1;
Lev Walkinf15320b2004-06-03 03:38:44 +00003644}
Lev Walkin4a4bdf72005-06-07 21:43:32 +00003645#line 2072 "asn1p_y.y"
Lev Walkinf15320b2004-06-03 03:38:44 +00003646
3647
3648
3649/*
3650 * Convert Xstring ('0101'B or '5'H) to the binary vector.
3651 */
3652static asn1p_value_t *
3653_convert_bitstring2binary(char *str, int base) {
3654 asn1p_value_t *val;
3655 int slen;
3656 int memlen;
3657 int baselen;
3658 int bits;
3659 uint8_t *binary_vector;
3660 uint8_t *bv_ptr;
3661 uint8_t cur_val;
3662
3663 assert(str);
3664 assert(str[0] == '\'');
3665
3666 switch(base) {
3667 case 'B':
3668 baselen = 1;
3669 break;
3670 case 'H':
3671 baselen = 4;
3672 break;
3673 default:
3674 assert(base == 'B' || base == 'H');
3675 errno = EINVAL;
3676 return NULL;
3677 }
3678
3679 slen = strlen(str);
3680 assert(str[slen - 1] == base);
3681 assert(str[slen - 2] == '\'');
3682
3683 memlen = slen / (8 / baselen); /* Conservative estimate */
3684
3685 bv_ptr = binary_vector = malloc(memlen + 1);
3686 if(bv_ptr == NULL)
3687 /* ENOMEM */
3688 return NULL;
3689
3690 cur_val = 0;
3691 bits = 0;
3692 while(*(++str) != '\'') {
3693 switch(baselen) {
3694 case 1:
3695 switch(*str) {
3696 case '1':
3697 cur_val |= 1 << (7 - (bits % 8));
3698 case '0':
3699 break;
3700 default:
3701 assert(!"_y UNREACH1");
3702 case ' ': case '\r': case '\n':
3703 continue;
3704 }
3705 break;
3706 case 4:
3707 switch(*str) {
3708 case '0': case '1': case '2': case '3': case '4':
3709 case '5': case '6': case '7': case '8': case '9':
3710 cur_val |= (*str - '0') << (4 - (bits % 8));
3711 break;
3712 case 'A': case 'B': case 'C':
3713 case 'D': case 'E': case 'F':
3714 cur_val |= ((*str - 'A') + 10)
3715 << (4 - (bits % 8));
3716 break;
3717 default:
3718 assert(!"_y UNREACH2");
3719 case ' ': case '\r': case '\n':
3720 continue;
3721 }
3722 break;
3723 }
3724
3725 bits += baselen;
3726 if((bits % 8) == 0) {
3727 *bv_ptr++ = cur_val;
3728 cur_val = 0;
3729 }
3730 }
3731
3732 *bv_ptr = cur_val;
3733 assert((bv_ptr - binary_vector) <= memlen);
3734
3735 val = asn1p_value_frombits(binary_vector, bits, 0);
3736 if(val == NULL) {
3737 free(binary_vector);
3738 }
3739
3740 return val;
3741}
3742
3743extern char *asn1p_text;
3744
3745int
3746yyerror(const char *msg) {
3747 fprintf(stderr,
3748 "ASN.1 grammar parse error "
3749 "near line %d (token \"%s\"): %s\n",
Lev Walkinceb20e72004-09-05 10:40:41 +00003750 yylineno, asn1p_text, msg);
Lev Walkinf15320b2004-06-03 03:38:44 +00003751 return -1;
3752}
3753
3754