blob: 4cbd21fedec4e4742d098d1147ae7910a2ff17cf [file] [log] [blame]
vlmfa67ddc2004-06-03 03:38:44 +00001
vlm6a02a8a2004-09-08 00:28:11 +00002/* A Bison parser, made from asn1p_y.y
3 by GNU Bison version 1.28 */
vlmfa67ddc2004-06-03 03:38:44 +00004
vlm6a02a8a2004-09-08 00:28:11 +00005#define YYBISON 1 /* Identify Bison output. */
vlmfa67ddc2004-06-03 03:38:44 +00006
7#define yyparse asn1p_parse
vlm6a02a8a2004-09-08 00:28:11 +00008#define yylex asn1p_lex
vlmfa67ddc2004-06-03 03:38:44 +00009#define yyerror asn1p_error
vlm6a02a8a2004-09-08 00:28:11 +000010#define yylval asn1p_lval
11#define yychar asn1p_char
vlmfa67ddc2004-06-03 03:38:44 +000012#define yydebug asn1p_debug
13#define yynerrs asn1p_nerrs
vlm6a02a8a2004-09-08 00:28:11 +000014#define TOK_PPEQ 257
15#define TOK_opaque 258
16#define TOK_bstring 259
17#define TOK_cstring 260
18#define TOK_hstring 261
19#define TOK_identifier 262
20#define TOK_number 263
21#define TOK_number_negative 264
22#define TOK_typereference 265
23#define TOK_capitalreference 266
24#define TOK_typefieldreference 267
25#define TOK_valuefieldreference 268
26#define TOK_ABSENT 269
27#define TOK_ABSTRACT_SYNTAX 270
28#define TOK_ALL 271
29#define TOK_ANY 272
30#define TOK_APPLICATION 273
31#define TOK_AUTOMATIC 274
32#define TOK_BEGIN 275
33#define TOK_BIT 276
34#define TOK_BMPString 277
35#define TOK_BOOLEAN 278
36#define TOK_BY 279
37#define TOK_CHARACTER 280
38#define TOK_CHOICE 281
39#define TOK_CLASS 282
40#define TOK_COMPONENT 283
41#define TOK_COMPONENTS 284
42#define TOK_CONSTRAINED 285
43#define TOK_CONTAINING 286
44#define TOK_DEFAULT 287
45#define TOK_DEFINITIONS 288
46#define TOK_DEFINED 289
47#define TOK_EMBEDDED 290
48#define TOK_ENCODED 291
49#define TOK_ENCODING_CONTROL 292
50#define TOK_END 293
51#define TOK_ENUMERATED 294
52#define TOK_EXPLICIT 295
53#define TOK_EXPORTS 296
54#define TOK_EXTENSIBILITY 297
55#define TOK_EXTERNAL 298
56#define TOK_FALSE 299
57#define TOK_FROM 300
58#define TOK_GeneralizedTime 301
59#define TOK_GeneralString 302
60#define TOK_GraphicString 303
61#define TOK_IA5String 304
62#define TOK_IDENTIFIER 305
63#define TOK_IMPLICIT 306
64#define TOK_IMPLIED 307
65#define TOK_IMPORTS 308
66#define TOK_INCLUDES 309
67#define TOK_INSTANCE 310
68#define TOK_INSTRUCTIONS 311
69#define TOK_INTEGER 312
70#define TOK_ISO646String 313
71#define TOK_MAX 314
72#define TOK_MIN 315
73#define TOK_MINUS_INFINITY 316
74#define TOK_NULL 317
75#define TOK_NumericString 318
76#define TOK_OBJECT 319
77#define TOK_ObjectDescriptor 320
78#define TOK_OCTET 321
79#define TOK_OF 322
80#define TOK_OPTIONAL 323
81#define TOK_PATTERN 324
82#define TOK_PDV 325
83#define TOK_PLUS_INFINITY 326
84#define TOK_PRESENT 327
85#define TOK_PrintableString 328
86#define TOK_PRIVATE 329
87#define TOK_REAL 330
88#define TOK_RELATIVE_OID 331
89#define TOK_SEQUENCE 332
90#define TOK_SET 333
91#define TOK_SIZE 334
92#define TOK_STRING 335
93#define TOK_SYNTAX 336
94#define TOK_T61String 337
95#define TOK_TAGS 338
96#define TOK_TeletexString 339
97#define TOK_TRUE 340
98#define TOK_TYPE_IDENTIFIER 341
99#define TOK_UNIQUE 342
100#define TOK_UNIVERSAL 343
101#define TOK_UniversalString 344
102#define TOK_UTCTime 345
103#define TOK_UTF8String 346
104#define TOK_VideotexString 347
105#define TOK_VisibleString 348
106#define TOK_WITH 349
107#define TOK_EXCEPT 350
108#define TOK_INTERSECTION 351
109#define TOK_UNION 352
110#define TOK_TwoDots 353
111#define TOK_ThreeDots 354
112#define TOK_tag 355
vlmfa67ddc2004-06-03 03:38:44 +0000113
114#line 1 "asn1p_y.y"
115
116
117#include <stdlib.h>
118#include <stdio.h>
119#include <string.h>
120#include <errno.h>
121#include <assert.h>
122
123#include "asn1parser.h"
124
125#define YYPARSE_PARAM param
126#define YYERROR_VERBOSE
127
128int yylex(void);
129int yyerror(const char *msg);
130void asn1p_lexer_hack_push_opaque_state(void);
131void asn1p_lexer_hack_enable_with_syntax(void);
vlm9283dbe2004-08-18 04:59:12 +0000132void asn1p_lexer_hack_push_encoding_control(void);
vlmfa67ddc2004-06-03 03:38:44 +0000133#define yylineno asn1p_lineno
134extern int asn1p_lineno;
135
136
137static asn1p_value_t *
138 _convert_bitstring2binary(char *str, int base);
139
vlm6a02a8a2004-09-08 00:28:11 +0000140#define checkmem(ptr) do { \
141 if(!(ptr)) \
142 return yyerror("Memory failure"); \
vlmfa67ddc2004-06-03 03:38:44 +0000143 } while(0)
144
145#define CONSTRAINT_INSERT(root, constr_type, arg1, arg2) do { \
146 if(arg1->type != constr_type) { \
147 int __ret; \
148 root = asn1p_constraint_new(yylineno); \
149 checkmem(root); \
150 root->type = constr_type; \
151 __ret = asn1p_constraint_insert(root, \
152 arg1); \
153 checkmem(__ret == 0); \
154 } else { \
155 root = arg1; \
156 } \
157 if(arg2) { \
158 int __ret \
159 = asn1p_constraint_insert(root, arg2); \
160 checkmem(__ret == 0); \
161 } \
162 } while(0)
163
164
vlm9283dbe2004-08-18 04:59:12 +0000165#line 58 "asn1p_y.y"
vlmfa67ddc2004-06-03 03:38:44 +0000166typedef union {
167 asn1p_t *a_grammar;
168 asn1p_module_flags_e a_module_flags;
169 asn1p_module_t *a_module;
170 asn1p_expr_type_e a_type; /* ASN.1 Type */
171 asn1p_expr_t *a_expr; /* Constructed collection */
172 asn1p_constraint_t *a_constr; /* Constraint */
173 enum asn1p_constraint_type_e a_ctype;/* Constraint type */
174 asn1p_xports_t *a_xports; /* IMports/EXports */
175 asn1p_oid_t *a_oid; /* Object Identifier */
176 asn1p_oid_arc_t a_oid_arc; /* Single OID's arc */
177 struct asn1p_type_tag_s a_tag; /* A tag */
178 asn1p_ref_t *a_ref; /* Reference to custom type */
179 asn1p_wsyntx_t *a_wsynt; /* WITH SYNTAX contents */
180 asn1p_wsyntx_chunk_t *a_wchunk; /* WITH SYNTAX chunk */
181 struct asn1p_ref_component_s a_refcomp; /* Component of a reference */
182 asn1p_value_t *a_value; /* Number, DefinedValue, etc */
183 struct asn1p_param_s a_parg; /* A parameter argument */
184 asn1p_paramlist_t *a_plist; /* A pargs list */
vlmc94e28f2004-09-15 11:59:51 +0000185 struct asn1p_expr_marker_s a_marker; /* OPTIONAL/DEFAULT */
vlmfa67ddc2004-06-03 03:38:44 +0000186 enum asn1p_constr_pres_e a_pres; /* PRESENT/ABSENT/OPTIONAL */
187 asn1_integer_t a_int;
188 char *tv_str;
189 struct {
190 char *buf;
191 int len;
192 } tv_opaque;
193 struct {
194 char *name;
195 struct asn1p_type_tag_s tag;
196 } tv_nametag;
vlm6a02a8a2004-09-08 00:28:11 +0000197} YYSTYPE;
198#include <stdio.h>
199
200#ifndef __cplusplus
201#ifndef __STDC__
202#define const
203#endif
vlmfa67ddc2004-06-03 03:38:44 +0000204#endif
205
206
207
vlmc94e28f2004-09-15 11:59:51 +0000208#define YYFINAL 399
vlm6a02a8a2004-09-08 00:28:11 +0000209#define YYFLAG -32768
210#define YYNTBASE 115
vlmfa67ddc2004-06-03 03:38:44 +0000211
vlmc94e28f2004-09-15 11:59:51 +0000212#define YYTRANSLATE(x) ((unsigned)(x) <= 355 ? yytranslate[x] : 211)
vlmfa67ddc2004-06-03 03:38:44 +0000213
vlm6a02a8a2004-09-08 00:28:11 +0000214static const char yytranslate[] = { 0,
215 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
216 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
217 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
218 2, 2, 111, 2, 2, 2, 2, 2, 2, 106,
219 107, 2, 2, 109, 2, 112, 2, 2, 2, 2,
220 2, 2, 2, 2, 2, 2, 2, 110, 108, 113,
221 2, 2, 2, 114, 2, 2, 2, 2, 2, 2,
222 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
223 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
224 2, 2, 2, 97, 2, 2, 2, 2, 2, 2,
225 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
226 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
227 2, 2, 104, 99, 105, 2, 2, 2, 2, 2,
228 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
229 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
230 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
231 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
232 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
233 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
234 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
235 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
236 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
237 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
238 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
239 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
240 2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
241 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
242 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
243 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
244 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
245 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
246 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
247 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
248 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
249 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
250 98, 100, 101, 102, 103
251};
vlmfa67ddc2004-06-03 03:38:44 +0000252
vlm6a02a8a2004-09-08 00:28:11 +0000253#if YYDEBUG != 0
254static const short yyprhs[] = { 0,
255 0, 2, 4, 7, 16, 17, 19, 23, 26, 28,
256 31, 33, 38, 40, 41, 43, 45, 48, 51, 54,
257 57, 60, 63, 64, 66, 68, 71, 73, 75, 77,
258 79, 81, 82, 86, 88, 92, 95, 97, 100, 105,
259 107, 111, 113, 115, 119, 123, 126, 128, 132, 134,
260 136, 143, 145, 147, 148, 150, 152, 156, 158, 160,
vlmfce48a42004-09-14 02:36:39 +0000261 165, 169, 173, 180, 182, 186, 188, 192, 196, 198,
262 202, 204, 206, 208, 212, 216, 220, 222, 224, 228,
263 231, 233, 239, 240, 242, 244, 248, 251, 256, 261,
264 262, 264, 265, 272, 274, 277, 279, 281, 283, 287,
vlma2374a02004-09-14 02:44:07 +0000265 291, 295, 297, 299, 304, 309, 314, 320, 326, 328,
vlmc94e28f2004-09-15 11:59:51 +0000266 333, 338, 340, 344, 346, 350, 354, 358, 360, 364,
267 366, 370, 372, 374, 376, 378, 383, 387, 388, 392,
268 394, 396, 398, 400, 402, 404, 406, 408, 410, 414,
269 416, 419, 421, 423, 425, 427, 430, 433, 435, 437,
270 440, 443, 445, 447, 449, 451, 454, 456, 459, 461,
271 463, 465, 467, 469, 471, 473, 475, 477, 479, 481,
272 483, 485, 487, 489, 491, 493, 495, 497, 498, 500,
273 502, 507, 511, 516, 518, 522, 528, 530, 534, 538,
274 542, 547, 551, 553, 557, 561, 565, 569, 571, 573,
275 575, 578, 581, 585, 587, 589, 591, 593, 595, 597,
276 599, 605, 607, 611, 613, 617, 618, 620, 622, 624,
277 626, 628, 630, 634, 639, 641, 645, 648, 652, 654,
278 658, 659, 661, 663, 666, 669, 673, 675, 679, 681,
279 686, 691, 693, 695, 697, 699, 700, 702, 704, 707,
280 710, 712, 714, 716
vlm6a02a8a2004-09-08 00:28:11 +0000281};
vlmfa67ddc2004-06-03 03:38:44 +0000282
vlm6a02a8a2004-09-08 00:28:11 +0000283static const short yyrhs[] = { 116,
vlmc94e28f2004-09-15 11:59:51 +0000284 0, 117, 0, 116, 117, 0, 208, 118, 34, 122,
vlm6a02a8a2004-09-08 00:28:11 +0000285 3, 21, 125, 39, 0, 0, 119, 0, 104, 120,
286 105, 0, 104, 105, 0, 121, 0, 120, 121, 0,
vlmc94e28f2004-09-15 11:59:51 +0000287 210, 0, 210, 106, 9, 107, 0, 9, 0, 0,
vlm6a02a8a2004-09-08 00:28:11 +0000288 123, 0, 124, 0, 123, 124, 0, 41, 84, 0,
289 52, 84, 0, 20, 84, 0, 43, 53, 0, 12,
290 57, 0, 0, 126, 0, 127, 0, 126, 127, 0,
291 129, 0, 134, 0, 142, 0, 168, 0, 137, 0,
292 0, 38, 12, 128, 0, 176, 0, 54, 130, 108,
293 0, 54, 46, 0, 131, 0, 130, 131, 0, 132,
vlmc94e28f2004-09-15 11:59:51 +0000294 46, 208, 118, 0, 133, 0, 132, 109, 133, 0,
295 208, 0, 210, 0, 42, 135, 108, 0, 42, 17,
vlm6a02a8a2004-09-08 00:28:11 +0000296 108, 0, 42, 108, 0, 136, 0, 135, 109, 136,
vlmc94e28f2004-09-15 11:59:51 +0000297 0, 208, 0, 210, 0, 208, 138, 3, 104, 139,
vlm6a02a8a2004-09-08 00:28:11 +0000298 105, 0, 163, 0, 173, 0, 0, 140, 0, 141,
vlmc94e28f2004-09-15 11:59:51 +0000299 0, 140, 109, 141, 0, 102, 0, 184, 0, 208,
300 3, 206, 87, 0, 208, 3, 161, 0, 208, 3,
301 151, 0, 208, 104, 143, 105, 3, 161, 0, 144,
302 0, 143, 109, 144, 0, 208, 0, 208, 110, 210,
303 0, 173, 110, 210, 0, 146, 0, 145, 109, 146,
304 0, 161, 0, 210, 0, 148, 0, 147, 109, 148,
305 0, 210, 161, 200, 0, 30, 68, 161, 0, 160,
306 0, 150, 0, 149, 109, 150, 0, 210, 161, 0,
vlmfce48a42004-09-14 02:36:39 +0000307 160, 0, 28, 104, 153, 105, 155, 0, 0, 88,
308 0, 154, 0, 153, 109, 154, 0, 166, 200, 0,
309 166, 161, 200, 152, 0, 166, 166, 200, 152, 0,
310 0, 156, 0, 0, 95, 82, 104, 157, 158, 105,
311 0, 159, 0, 158, 159, 0, 4, 0, 166, 0,
vlmc94e28f2004-09-15 11:59:51 +0000312 102, 0, 102, 111, 171, 0, 102, 111, 205, 0,
313 206, 162, 180, 0, 175, 0, 176, 0, 27, 104,
vlm6a02a8a2004-09-08 00:28:11 +0000314 149, 105, 0, 78, 104, 147, 105, 0, 79, 104,
vlmc94e28f2004-09-15 11:59:51 +0000315 147, 105, 0, 78, 180, 68, 206, 162, 0, 79,
316 180, 68, 206, 162, 0, 18, 0, 18, 35, 25,
317 210, 0, 208, 104, 145, 105, 0, 163, 0, 56,
318 68, 163, 0, 11, 0, 11, 112, 208, 0, 209,
319 112, 208, 0, 11, 112, 210, 0, 209, 0, 209,
320 112, 164, 0, 165, 0, 164, 112, 165, 0, 167,
321 0, 167, 0, 13, 0, 14, 0, 210, 138, 3,
322 169, 0, 210, 110, 169, 0, 0, 104, 170, 172,
323 0, 63, 0, 45, 0, 86, 0, 5, 0, 7,
324 0, 6, 0, 205, 0, 171, 0, 210, 0, 208,
325 112, 210, 0, 4, 0, 172, 4, 0, 24, 0,
326 63, 0, 76, 0, 174, 0, 67, 81, 0, 65,
327 51, 0, 77, 0, 44, 0, 36, 71, 0, 26,
328 81, 0, 91, 0, 47, 0, 58, 0, 40, 0,
329 22, 81, 0, 173, 0, 174, 202, 0, 23, 0,
330 48, 0, 49, 0, 50, 0, 59, 0, 64, 0,
331 74, 0, 83, 0, 85, 0, 90, 0, 92, 0,
332 93, 0, 94, 0, 66, 0, 99, 0, 100, 0,
333 97, 0, 98, 0, 96, 0, 0, 181, 0, 182,
334 0, 80, 106, 183, 107, 0, 106, 183, 107, 0,
335 182, 106, 183, 107, 0, 184, 0, 184, 109, 102,
336 0, 184, 109, 102, 109, 184, 0, 185, 0, 184,
337 177, 185, 0, 184, 178, 185, 0, 185, 179, 185,
338 0, 187, 106, 183, 107, 0, 106, 183, 107, 0,
339 188, 0, 188, 186, 188, 0, 61, 186, 188, 0,
340 188, 186, 60, 0, 61, 186, 60, 0, 194, 0,
341 189, 0, 101, 0, 101, 113, 0, 113, 101, 0,
342 113, 101, 113, 0, 80, 0, 46, 0, 205, 0,
343 210, 0, 6, 0, 45, 0, 86, 0, 95, 30,
344 104, 190, 105, 0, 191, 0, 190, 109, 191, 0,
345 102, 0, 210, 180, 192, 0, 0, 193, 0, 73,
346 0, 15, 0, 69, 0, 195, 0, 196, 0, 104,
347 208, 105, 0, 195, 104, 197, 105, 0, 198, 0,
348 197, 109, 198, 0, 114, 199, 0, 114, 112, 199,
349 0, 210, 0, 199, 112, 210, 0, 0, 201, 0,
350 69, 0, 33, 169, 0, 104, 105, 0, 104, 203,
351 105, 0, 204, 0, 203, 109, 204, 0, 210, 0,
352 210, 106, 205, 107, 0, 210, 106, 171, 107, 0,
353 205, 0, 102, 0, 9, 0, 10, 0, 0, 207,
354 0, 103, 0, 103, 52, 0, 103, 41, 0, 11,
355 0, 12, 0, 12, 0, 8, 0
vlm6a02a8a2004-09-08 00:28:11 +0000356};
vlmfa67ddc2004-06-03 03:38:44 +0000357
358#endif
359
vlm6a02a8a2004-09-08 00:28:11 +0000360#if YYDEBUG != 0
361static const short yyrline[] = { 0,
vlmfce48a42004-09-14 02:36:39 +0000362 299, 305, 311, 327, 352, 354, 357, 361, 366, 373,
363 381, 386, 390, 399, 401, 409, 413, 421, 425, 428,
364 431, 435, 455, 457, 465, 469, 501, 505, 514, 521,
365 534, 541, 543, 555, 568, 575, 580, 586, 592, 601,
366 607, 613, 620, 628, 632, 635, 642, 648, 654, 661,
367 670, 680, 688, 696, 698, 708, 711, 715, 718, 730,
368 742, 748, 764, 773, 783, 793, 798, 805, 815, 821,
369 827, 831, 843, 849, 855, 862, 869, 874, 880, 886,
370 892, 897, 907, 909, 912, 920, 926, 935, 941, 958,
371 960, 965, 969, 974, 979, 985, 989, 1000, 1009, 1018,
vlma2374a02004-09-14 02:44:07 +0000372 1029, 1051, 1055, 1061, 1067, 1073, 1079, 1088, 1097, 1103,
vlmc94e28f2004-09-15 11:59:51 +0000373 1117, 1141, 1148, 1162, 1171, 1181, 1191, 1201, 1209, 1230,
374 1239, 1248, 1249, 1251, 1258, 1270, 1280, 1288, 1288, 1293,
375 1298, 1303, 1308, 1312, 1316, 1320, 1323, 1328, 1340, 1356,
376 1367, 1381, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390,
377 1391, 1392, 1393, 1399, 1401, 1402, 1405, 1412, 1424, 1426,
378 1430, 1434, 1435, 1436, 1437, 1438, 1442, 1443, 1444, 1445,
379 1449, 1450, 1457, 1457, 1458, 1458, 1459, 1461, 1463, 1468,
380 1472, 1481, 1485, 1490, 1494, 1500, 1510, 1514, 1517, 1520,
381 1525, 1534, 1542, 1548, 1555, 1563, 1571, 1580, 1583, 1588,
382 1590, 1591, 1592, 1595, 1599, 1604, 1608, 1619, 1623, 1628,
383 1635, 1641, 1645, 1650, 1656, 1668, 1670, 1673, 1677, 1680,
384 1685, 1689, 1697, 1712, 1718, 1725, 1738, 1750, 1765, 1769,
385 1786, 1791, 1794, 1799, 1821, 1826, 1831, 1837, 1843, 1851,
386 1859, 1867, 1874, 1884, 1889, 1919, 1921, 1924, 1929, 1933,
387 1939, 1944, 1951, 1958
vlm6a02a8a2004-09-08 00:28:11 +0000388};
389#endif
390
391
392#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
393
394static const char * const yytname[] = { "$","error","$undefined.","TOK_PPEQ",
395"TOK_opaque","TOK_bstring","TOK_cstring","TOK_hstring","TOK_identifier","TOK_number",
396"TOK_number_negative","TOK_typereference","TOK_capitalreference","TOK_typefieldreference",
397"TOK_valuefieldreference","TOK_ABSENT","TOK_ABSTRACT_SYNTAX","TOK_ALL","TOK_ANY",
398"TOK_APPLICATION","TOK_AUTOMATIC","TOK_BEGIN","TOK_BIT","TOK_BMPString","TOK_BOOLEAN",
399"TOK_BY","TOK_CHARACTER","TOK_CHOICE","TOK_CLASS","TOK_COMPONENT","TOK_COMPONENTS",
400"TOK_CONSTRAINED","TOK_CONTAINING","TOK_DEFAULT","TOK_DEFINITIONS","TOK_DEFINED",
401"TOK_EMBEDDED","TOK_ENCODED","TOK_ENCODING_CONTROL","TOK_END","TOK_ENUMERATED",
402"TOK_EXPLICIT","TOK_EXPORTS","TOK_EXTENSIBILITY","TOK_EXTERNAL","TOK_FALSE",
403"TOK_FROM","TOK_GeneralizedTime","TOK_GeneralString","TOK_GraphicString","TOK_IA5String",
404"TOK_IDENTIFIER","TOK_IMPLICIT","TOK_IMPLIED","TOK_IMPORTS","TOK_INCLUDES","TOK_INSTANCE",
405"TOK_INSTRUCTIONS","TOK_INTEGER","TOK_ISO646String","TOK_MAX","TOK_MIN","TOK_MINUS_INFINITY",
406"TOK_NULL","TOK_NumericString","TOK_OBJECT","TOK_ObjectDescriptor","TOK_OCTET",
407"TOK_OF","TOK_OPTIONAL","TOK_PATTERN","TOK_PDV","TOK_PLUS_INFINITY","TOK_PRESENT",
408"TOK_PrintableString","TOK_PRIVATE","TOK_REAL","TOK_RELATIVE_OID","TOK_SEQUENCE",
409"TOK_SET","TOK_SIZE","TOK_STRING","TOK_SYNTAX","TOK_T61String","TOK_TAGS","TOK_TeletexString",
410"TOK_TRUE","TOK_TYPE_IDENTIFIER","TOK_UNIQUE","TOK_UNIVERSAL","TOK_UniversalString",
411"TOK_UTCTime","TOK_UTF8String","TOK_VideotexString","TOK_VisibleString","TOK_WITH",
412"TOK_EXCEPT","'^'","TOK_INTERSECTION","'|'","TOK_UNION","TOK_TwoDots","TOK_ThreeDots",
413"TOK_tag","'{'","'}'","'('","')'","';'","','","':'","'!'","'.'","'<'","'@'",
414"ParsedGrammar","ModuleList","ModuleSpecification","optObjectIdentifier","ObjectIdentifier",
415"ObjectIdentifierBody","ObjectIdentifierElement","optModuleSpecificationFlags",
416"ModuleSpecificationFlags","ModuleSpecificationFlag","optModuleSpecificationBody",
417"ModuleSpecificationBody","ModuleSpecificationElement","@1","ImportsDefinition",
418"ImportsBundleSet","ImportsBundle","ImportsList","ImportsElement","ExportsDefinition",
419"ExportsBody","ExportsElement","ValueSetDefinition","DefinedTypeRef","optValueSetBody",
420"ValueSetBody","ValueSetElement","DataTypeReference","ParameterArgumentList",
421"ParameterArgumentName","ActualParameterList","ActualParameter","ComponentTypeLists",
422"ComponentType","AlternativeTypeLists","AlternativeType","ClassDeclaration",
423"optUnique","ClassFieldList","ClassField","optWithSyntax","WithSyntax","@2",
424"WithSyntaxFormat","WithSyntaxFormatToken","ExtensionAndException","Type","TypeDeclaration",
425"ComplexTypeReference","ComplexTypeReferenceAmpList","ComplexTypeReferenceElement",
vlmc94e28f2004-09-15 11:59:51 +0000426"ClassFieldIdentifier","ClassFieldName","ValueDefinition","Value","@3","DefinedValue",
427"Opaque","BasicTypeId","BasicTypeId_UniverationCompatible","BasicType","BasicString",
428"Union","Intersection","Except","optConstraints","Constraints","SetOfConstraints",
429"ElementSetSpecs","ElementSetSpec","ConstraintSubtypeElement","ConstraintRangeSpec",
430"ConstraintSpec","ConstraintValue","WithComponents","WithComponentsList","WithComponentsElement",
431"optPresenceConstraint","PresenceConstraint","TableConstraint","SimpleTableConstraint",
432"ComponentRelationConstraint","AtNotationList","AtNotationElement","ComponentIdList",
433"optMarker","Marker","UniverationDefinition","UniverationList","UniverationElement",
434"SignedNumber","optTag","Tag","TypeRefName","ObjectClassReference","Identifier", NULL
vlm6a02a8a2004-09-08 00:28:11 +0000435};
436#endif
437
438static const short yyr1[] = { 0,
439 115, 116, 116, 117, 118, 118, 119, 119, 120, 120,
440 121, 121, 121, 122, 122, 123, 123, 124, 124, 124,
441 124, 124, 125, 125, 126, 126, 127, 127, 127, 127,
442 127, 128, 127, 127, 129, 129, 130, 130, 131, 132,
443 132, 133, 133, 134, 134, 134, 135, 135, 136, 136,
444 137, 138, 138, 139, 139, 140, 140, 141, 141, 142,
445 142, 142, 142, 143, 143, 144, 144, 144, 145, 145,
446 146, 146, 147, 147, 148, 148, 148, 149, 149, 150,
447 150, 151, 152, 152, 153, 153, 154, 154, 154, 155,
448 155, 157, 156, 158, 158, 159, 159, 160, 160, 160,
449 161, 162, 162, 162, 162, 162, 162, 162, 162, 162,
vlmc94e28f2004-09-15 11:59:51 +0000450 162, 162, 162, 163, 163, 163, 163, 163, 163, 164,
451 164, 165, 166, 167, 167, 168, 169, 170, 169, 169,
452 169, 169, 169, 169, 169, 169, 169, 171, 171, 172,
453 172, 173, 173, 173, 173, 173, 173, 173, 173, 173,
454 173, 173, 173, 174, 174, 174, 175, 175, 176, 176,
455 176, 176, 176, 176, 176, 176, 176, 176, 176, 176,
456 176, 176, 177, 177, 178, 178, 179, 180, 180, 181,
457 181, 182, 182, 183, 183, 183, 184, 184, 184, 184,
458 185, 185, 185, 185, 185, 185, 185, 185, 185, 186,
459 186, 186, 186, 187, 187, 188, 188, 188, 188, 188,
460 189, 190, 190, 191, 191, 192, 192, 193, 193, 193,
461 194, 194, 195, 196, 197, 197, 198, 198, 199, 199,
462 200, 200, 201, 201, 202, 202, 203, 203, 204, 204,
463 204, 204, 204, 205, 205, 206, 206, 207, 207, 207,
464 208, 208, 209, 210
vlm6a02a8a2004-09-08 00:28:11 +0000465};
466
467static const short yyr2[] = { 0,
468 1, 1, 2, 8, 0, 1, 3, 2, 1, 2,
469 1, 4, 1, 0, 1, 1, 2, 2, 2, 2,
470 2, 2, 0, 1, 1, 2, 1, 1, 1, 1,
471 1, 0, 3, 1, 3, 2, 1, 2, 4, 1,
472 3, 1, 1, 3, 3, 2, 1, 3, 1, 1,
473 6, 1, 1, 0, 1, 1, 3, 1, 1, 4,
vlmfce48a42004-09-14 02:36:39 +0000474 3, 3, 6, 1, 3, 1, 3, 3, 1, 3,
vlm6a02a8a2004-09-08 00:28:11 +0000475 1, 1, 1, 3, 3, 3, 1, 1, 3, 2,
476 1, 5, 0, 1, 1, 3, 2, 4, 4, 0,
477 1, 0, 6, 1, 2, 1, 1, 1, 3, 3,
vlma2374a02004-09-14 02:44:07 +0000478 3, 1, 1, 4, 4, 4, 5, 5, 1, 4,
vlmc94e28f2004-09-15 11:59:51 +0000479 4, 1, 3, 1, 3, 3, 3, 1, 3, 1,
480 3, 1, 1, 1, 1, 4, 3, 0, 3, 1,
481 1, 1, 1, 1, 1, 1, 1, 1, 3, 1,
482 2, 1, 1, 1, 1, 2, 2, 1, 1, 2,
483 2, 1, 1, 1, 1, 2, 1, 2, 1, 1,
vlm6a02a8a2004-09-08 00:28:11 +0000484 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
vlmc94e28f2004-09-15 11:59:51 +0000485 1, 1, 1, 1, 1, 1, 1, 0, 1, 1,
486 4, 3, 4, 1, 3, 5, 1, 3, 3, 3,
487 4, 3, 1, 3, 3, 3, 3, 1, 1, 1,
488 2, 2, 3, 1, 1, 1, 1, 1, 1, 1,
489 5, 1, 3, 1, 3, 0, 1, 1, 1, 1,
490 1, 1, 3, 4, 1, 3, 2, 3, 1, 3,
491 0, 1, 1, 2, 2, 3, 1, 3, 1, 4,
492 4, 1, 1, 1, 1, 0, 1, 1, 2, 2,
493 1, 1, 1, 1
vlm6a02a8a2004-09-08 00:28:11 +0000494};
495
496static const short yydefact[] = { 0,
vlmc94e28f2004-09-15 11:59:51 +0000497 251, 252, 1, 2, 5, 3, 0, 0, 6, 254,
vlm6a02a8a2004-09-08 00:28:11 +0000498 13, 8, 0, 9, 11, 14, 7, 10, 0, 0,
499 0, 0, 0, 0, 0, 15, 16, 0, 22, 20,
vlmc94e28f2004-09-15 11:59:51 +0000500 18, 21, 19, 0, 17, 12, 23, 159, 0, 0,
501 160, 161, 162, 0, 163, 164, 172, 165, 166, 167,
502 168, 169, 170, 171, 0, 24, 25, 27, 28, 31,
vlm6a02a8a2004-09-08 00:28:11 +0000503 29, 30, 34, 0, 0, 32, 0, 46, 0, 47,
504 49, 50, 36, 0, 37, 0, 40, 42, 43, 4,
vlmc94e28f2004-09-15 11:59:51 +0000505 26, 246, 114, 253, 0, 142, 0, 0, 155, 149,
506 153, 154, 143, 0, 0, 144, 148, 152, 0, 0,
507 52, 53, 145, 118, 0, 33, 45, 44, 0, 35,
508 38, 0, 0, 0, 248, 62, 61, 0, 247, 0,
509 156, 151, 150, 147, 146, 0, 64, 0, 66, 0,
510 0, 0, 48, 5, 41, 0, 250, 249, 114, 253,
511 109, 0, 0, 178, 178, 60, 178, 112, 157, 145,
512 102, 103, 0, 115, 117, 0, 0, 0, 0, 54,
513 124, 125, 119, 120, 122, 116, 133, 135, 134, 244,
514 245, 131, 130, 132, 128, 126, 137, 136, 0, 138,
515 39, 0, 85, 246, 123, 0, 0, 0, 0, 0,
516 0, 0, 179, 180, 0, 0, 101, 0, 158, 246,
517 246, 65, 68, 67, 208, 209, 205, 0, 204, 210,
518 0, 58, 0, 0, 0, 55, 56, 59, 187, 0,
519 193, 199, 198, 221, 222, 206, 207, 0, 0, 0,
520 0, 90, 0, 0, 233, 231, 231, 87, 232, 0,
521 0, 98, 0, 78, 81, 246, 113, 0, 0, 0,
522 73, 77, 246, 0, 184, 246, 0, 0, 246, 243,
523 235, 0, 237, 242, 239, 0, 69, 71, 72, 63,
524 200, 0, 0, 0, 0, 0, 51, 0, 175, 176,
525 173, 174, 0, 0, 177, 0, 0, 0, 0, 121,
526 140, 129, 139, 127, 0, 82, 91, 86, 234, 83,
527 83, 110, 0, 104, 0, 80, 0, 246, 105, 0,
528 231, 182, 0, 0, 0, 106, 0, 236, 0, 0,
529 111, 246, 201, 202, 197, 195, 0, 223, 192, 57,
530 188, 189, 190, 0, 196, 194, 0, 0, 225, 141,
531 0, 84, 88, 89, 99, 100, 138, 79, 181, 76,
532 74, 75, 185, 107, 183, 108, 238, 0, 0, 70,
533 203, 214, 0, 212, 178, 191, 0, 227, 229, 224,
534 0, 92, 0, 241, 240, 211, 0, 216, 228, 0,
535 226, 0, 186, 213, 219, 220, 218, 215, 217, 230,
536 96, 0, 94, 97, 93, 95, 0, 0, 0
vlm6a02a8a2004-09-08 00:28:11 +0000537};
538
vlmc94e28f2004-09-15 11:59:51 +0000539static const short yydefgoto[] = { 397,
vlm6a02a8a2004-09-08 00:28:11 +0000540 3, 4, 8, 9, 13, 14, 25, 26, 27, 55,
541 56, 57, 106, 58, 74, 75, 76, 77, 59, 69,
vlmc94e28f2004-09-15 11:59:51 +0000542 70, 60, 100, 215, 216, 217, 61, 126, 127, 266,
543 267, 250, 251, 243, 244, 116, 343, 182, 183, 296,
544 297, 382, 392, 393, 252, 268, 147, 148, 163, 164,
545 184, 185, 62, 176, 229, 177, 292, 149, 103, 151,
546 152, 283, 284, 286, 192, 193, 194, 254, 255, 219,
547 273, 220, 221, 222, 363, 364, 388, 389, 223, 224,
548 225, 338, 339, 368, 238, 239, 199, 262, 263, 226,
549 240, 119, 179, 104, 227
vlm6a02a8a2004-09-08 00:28:11 +0000550};
551
vlmc94e28f2004-09-15 11:59:51 +0000552static const short yypact[] = { 42,
553-32768,-32768, 42,-32768, -6,-32768, 72, 111,-32768,-32768,
554-32768,-32768, 74,-32768, -1, 162,-32768,-32768, 138, 99,
555 83, 91, 123, 97, 222, 162,-32768, 121,-32768,-32768,
556-32768,-32768,-32768, 209,-32768,-32768, 313,-32768, 219, 33,
557-32768,-32768,-32768, 96,-32768,-32768,-32768,-32768,-32768,-32768,
558-32768,-32768,-32768,-32768, 210, 313,-32768,-32768,-32768,-32768,
559-32768,-32768,-32768, 12, 527,-32768, 185,-32768, -18,-32768,
560-32768,-32768,-32768, 49,-32768, -25,-32768,-32768,-32768,-32768,
561-32768, -3, 145,-32768, 186,-32768, 202, 229,-32768,-32768,
562-32768,-32768,-32768, 250, 223,-32768,-32768,-32768, 544, 302,
563-32768,-32768,-32768, 194, 311,-32768,-32768,-32768, 158,-32768,
564-32768, 42, 158, 214, 102,-32768,-32768, 390,-32768, 158,
565-32768,-32768,-32768,-32768,-32768, 87,-32768, 213, 216, 225,
566 297, 254,-32768, -6,-32768, 124,-32768,-32768, -57, 231,
567 292, 233, 270, -12, 149,-32768, -37,-32768,-32768, 235,
568-32768,-32768, 237,-32768,-32768, 339, 544, 335, 335, 152,
569-32768,-32768, 232,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
570-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 238, 236,
571-32768, 90,-32768, 176,-32768, 320, 8, 207, 241, 32,
572 140, 281,-32768, 246, 32, 285,-32768, 63,-32768, 20,
573 251,-32768,-32768,-32768,-32768,-32768,-32768, -16,-32768,-32768,
574 326,-32768, 42, 140, 252, 255,-32768, 234, 263, 259,
575 -16,-32768,-32768, 264,-32768,-32768,-32768, 124, 362, 335,
576 254, 274, 124, 254,-32768, 18, 18,-32768,-32768, 467,
577 335, 260, 101,-32768,-32768, 251,-32768, 140, 306, 131,
578-32768,-32768, 251, 268, 177, 251, 140, 132, 251,-32768,
579-32768, 134,-32768,-32768, 272, 164,-32768,-32768,-32768,-32768,
580 267, 275, 242, 277, 278, 279,-32768, 152,-32768,-32768,
581-32768,-32768, 140, 140,-32768, 140, 140, 262, 271,-32768,
582-32768, 378,-32768,-32768, 307,-32768,-32768,-32768,-32768, 296,
583 296,-32768, 280,-32768, 8,-32768, 283, 251,-32768, 32,
584 18,-32768, 286, 467, 284,-32768, 467,-32768, 10, 280,
585-32768, 20,-32768, 282,-32768,-32768, 27,-32768,-32768,-32768,
586-32768,-32768,-32768, 287,-32768,-32768, 5, 173,-32768,-32768,
587 288,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
588-32768,-32768, 290,-32768,-32768,-32768,-32768, 293, 303,-32768,
589-32768,-32768, 175,-32768, -37,-32768, 335, 299,-32768,-32768,
590 271,-32768, 140,-32768,-32768,-32768, 27, 71, 299, 335,
591-32768, 159, 234,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
592-32768, 13,-32768,-32768,-32768,-32768, 393, 397,-32768
vlm6a02a8a2004-09-08 00:28:11 +0000593};
594
595static const short yypgoto[] = {-32768,
vlmc94e28f2004-09-15 11:59:51 +0000596-32768, 401, 289,-32768,-32768, 396,-32768,-32768, 389,-32768,
597-32768, 363,-32768,-32768,-32768, 344,-32768, 308,-32768,-32768,
598 315,-32768, 355,-32768,-32768, 144,-32768,-32768, 276,-32768,
599 103, 240, 117,-32768, 126,-32768, 127,-32768, 196,-32768,
600-32768,-32768,-32768, 40, -173, -75, -218, -53,-32768, 208,
601 -180, -109,-32768, -23,-32768, -167,-32768, -33, -110,-32768,
602 37,-32768,-32768,-32768, -144,-32768,-32768, -93, -151, 11,
603 220,-32768, -210,-32768,-32768, 65,-32768,-32768,-32768,-32768,
604-32768,-32768, 73, 76, -172,-32768,-32768,-32768, 128, -103,
605 -72,-32768, 2,-32768, -7
vlm6a02a8a2004-09-08 00:28:11 +0000606};
607
608
vlmc94e28f2004-09-15 11:59:51 +0000609#define YYLAST 635
vlm6a02a8a2004-09-08 00:28:11 +0000610
611
612static const short yytable[] = { 15,
vlmc94e28f2004-09-15 11:59:51 +0000613 196, 5, 197, 237, 5, 15, 117, 150, 218, 118,
614 101, 101, 10, 245, 82, 10, 391, 10, 170, 171,
615 112, 165, 83, 84, 114, 161, 162, 10, 178, 65,
616 102, 102, 72, 85, 10, 86, 79, 87, 64, 10,
617 10, 71, 189, 1, 2, 78, -251, 88, 65, 67,
618 234, 89, 1, 2, 120, 90, 10, 64, 91, 1,
619 2, 249, 326, 300, 301, 128, 79, 189, 191, 92,
620 10, 170, 171, 63, 93, 78, 94, 336, 95, 10,
621 11, 10, 11, 113, 271, 385, 235, 96, 97, 108,
622 109, 190, 63, 191, 264, 354, 272, 7, 356, 115,
623 129, 72, 98, 10, 19, 79, 1, 2, 236, 242,
624 71, 260, 155, 134, 78, 99, 367, 395, 165, 153,
625 276, 154, 115, 128, 180, 270, 218, 178, 362, 150,
626 178, 245, 166, 242, 247, 345, 161, 162, 352, 386,
627 68, 73, 137, 387, 16, 205, 28, 10, 170, 171,
628 203, 204, 358, 138, 307, 29, 110, 205, 129, 10,
629 170, 171, 391, 315, 260, 10, 30, 261, 1, 2,
630 306, 161, 162, 20, 31, 32, 12, 311, 17, 246,
631 33, 21, 253, 314, 206, 207, 317, 253, 161, 162,
632 265, 156, 269, 334, 232, 157, 206, 207, 233, 346,
633 208, 394, 22, 150, 23, 304, 150, 294, 234, 305,
634 299, 394, 208, 24, 275, 264, 359, 83, 84, 209,
635 378, 383, 293, 180, 34, 210, 180, 36, 189, 37,
636 66, 209, 350, 302, 211, 309, 316, 210, 318, 310,
637 310, 153, 319, 213, 235, 214, 211, 205, 80, 10,
638 170, 171, 195, 212, 191, 213, 120, 214, 167, 168,
639 169, 10, 170, 171, 1, 2, 121, 205, 321, 10,
640 170, 171, 322, 279, 280, 281, 282, 370, 115, 376,
641 -231, 371, 122, 377, -231, 313, 206, 10, 170, 171,
642 1, 2, 107, 331, 332, 347, 333, 246, 172, 123,
643 124, 325, 253, 125, 130, 131, 206, 1, 2, 161,
644 162, 265, 347, 132, 269, 153, 173, 136, 153, 365,
645 10, 335, 158, 1, 2, 159, 186, 210, 160, 369,
646 279, 280, 281, 282, -252, 38, 187, 188, 198, 174,
647 200, 201, 10, 228, 241, 231, 248, 210, 256, 230,
648 39, 257, 259, 115, 40, 274, 277, 175, 285, 369,
649 41, 42, 43, 278, 287, 291, 44, 289, 295, 365,
650 303, 45, 390, 308, 312, 324, 46, 320, 47, 323,
651 327, 340, 328, 342, 337, 329, 48, 353, 341, 349,
652 355, 372, 398, 366, 361, 49, 399, 50, 373, 374,
653 139, 140, 51, 6, 52, 53, 54, 141, 18, 375,
654 380, 85, 38, 86, 35, 87, 142, 111, 81, 105,
655 135, 330, 181, 133, 360, 88, 351, 344, 298, 89,
656 348, 396, 202, 90, 258, 290, 91, 41, 42, 43,
657 288, 384, 379, 381, 0, 143, 357, 92, 45, 0,
658 0, 0, 93, 46, 94, 47, 95, 0, 0, 0,
659 0, 0, 0, 48, 0, 96, 97, 144, 145, 0,
660 0, 0, 49, 0, 50, 0, 146, 139, 140, 51,
661 98, 52, 53, 54, 141, 0, 0, 0, 85, 38,
662 86, 0, 87, 142, 0, 0, 0, 0, 0, 0,
663 0, 0, 88, 0, 0, 0, 89, 0, 0, 0,
664 90, 0, 0, 91, 41, 42, 43, 0, 0, 0,
665 0, 0, 143, 0, 92, 45, 0, 0, 0, 93,
666 46, 94, 47, 95, 0, 0, 0, 83, 84, 0,
667 48, 0, 96, 97, 144, 145, 0, 0, 85, 49,
668 86, 50, 87, 0, 1, 2, 51, 98, 52, 53,
669 54, 0, 88, 0, 0, 85, 89, 86, 0, 87,
670 90, 0, 0, 91, 0, 0, 0, 0, 0, 88,
671 0, 0, 0, 89, 92, 0, 0, 90, 0, 93,
672 91, 94, 0, 95, 0, 0, 0, 0, 0, 0,
673 0, 92, 96, 97, 0, 0, 93, 0, 94, 0,
674 95, 0, 0, 0, 0, 0, 0, 98, 0, 96,
675 97, 0, 0, 0, 0, 0, 0, 0, 0, 0,
676 0, 0, 0, 0, 98
vlm6a02a8a2004-09-08 00:28:11 +0000677};
678
679static const short yycheck[] = { 7,
vlmc94e28f2004-09-15 11:59:51 +0000680 145, 0, 147, 184, 3, 13, 82, 118, 160, 82,
681 64, 65, 8, 187, 3, 8, 4, 8, 9, 10,
682 46, 131, 11, 12, 28, 13, 14, 8, 132, 37,
683 64, 65, 40, 22, 8, 24, 44, 26, 37, 8,
684 8, 40, 80, 11, 12, 44, 104, 36, 56, 17,
685 33, 40, 11, 12, 112, 44, 8, 56, 47, 11,
686 12, 30, 273, 236, 237, 99, 74, 80, 106, 58,
687 8, 9, 10, 37, 63, 74, 65, 288, 67, 8,
688 9, 8, 9, 109, 101, 15, 69, 76, 77, 108,
689 109, 104, 56, 106, 198, 314, 113, 104, 317, 103,
690 99, 109, 91, 8, 106, 113, 11, 12, 184, 102,
691 109, 102, 120, 112, 113, 104, 112, 105, 228, 118,
692 214, 120, 103, 157, 132, 201, 278, 231, 102, 240,
693 234, 305, 131, 102, 188, 303, 13, 14, 311, 69,
694 108, 46, 41, 73, 34, 6, 9, 8, 9, 10,
695 158, 159, 320, 52, 248, 57, 108, 6, 157, 8,
696 9, 10, 4, 257, 102, 8, 84, 105, 11, 12,
697 246, 13, 14, 12, 84, 53, 105, 253, 105, 187,
698 84, 20, 190, 256, 45, 46, 259, 195, 13, 14,
699 198, 105, 200, 287, 105, 109, 45, 46, 109, 303,
700 61, 382, 41, 314, 43, 105, 317, 231, 33, 109,
701 234, 392, 61, 52, 213, 319, 320, 11, 12, 80,
702 365, 373, 230, 231, 3, 86, 234, 107, 80, 21,
703 12, 80, 308, 241, 95, 105, 105, 86, 105, 109,
704 109, 240, 109, 104, 69, 106, 95, 6, 39, 8,
705 9, 10, 104, 102, 106, 104, 112, 106, 5, 6,
706 7, 8, 9, 10, 11, 12, 81, 6, 105, 8,
707 9, 10, 109, 97, 98, 99, 100, 105, 103, 105,
708 105, 109, 81, 109, 109, 109, 45, 8, 9, 10,
709 11, 12, 108, 283, 284, 303, 286, 305, 45, 71,
710 51, 60, 310, 81, 3, 112, 45, 11, 12, 13,
711 14, 319, 320, 3, 322, 314, 63, 104, 317, 327,
712 8, 60, 110, 11, 12, 110, 35, 86, 104, 337,
713 97, 98, 99, 100, 104, 23, 104, 68, 104, 86,
714 104, 3, 8, 112, 25, 110, 106, 86, 68, 112,
715 38, 106, 68, 103, 42, 30, 105, 104, 96, 367,
716 48, 49, 50, 109, 106, 4, 54, 104, 95, 377,
717 111, 59, 380, 68, 107, 101, 64, 106, 66, 113,
718 104, 4, 105, 88, 114, 107, 74, 102, 82, 107,
719 107, 104, 0, 107, 113, 83, 0, 85, 109, 107,
720 11, 12, 90, 3, 92, 93, 94, 18, 13, 107,
721 112, 22, 23, 24, 26, 26, 27, 74, 56, 65,
722 113, 278, 134, 109, 322, 36, 310, 301, 233, 40,
723 305, 392, 157, 44, 195, 228, 47, 48, 49, 50,
724 221, 377, 367, 371, -1, 56, 319, 58, 59, -1,
725 -1, -1, 63, 64, 65, 66, 67, -1, -1, -1,
726 -1, -1, -1, 74, -1, 76, 77, 78, 79, -1,
727 -1, -1, 83, -1, 85, -1, 87, 11, 12, 90,
728 91, 92, 93, 94, 18, -1, -1, -1, 22, 23,
729 24, -1, 26, 27, -1, -1, -1, -1, -1, -1,
730 -1, -1, 36, -1, -1, -1, 40, -1, -1, -1,
731 44, -1, -1, 47, 48, 49, 50, -1, -1, -1,
732 -1, -1, 56, -1, 58, 59, -1, -1, -1, 63,
733 64, 65, 66, 67, -1, -1, -1, 11, 12, -1,
734 74, -1, 76, 77, 78, 79, -1, -1, 22, 83,
735 24, 85, 26, -1, 11, 12, 90, 91, 92, 93,
736 94, -1, 36, -1, -1, 22, 40, 24, -1, 26,
737 44, -1, -1, 47, -1, -1, -1, -1, -1, 36,
738 -1, -1, -1, 40, 58, -1, -1, 44, -1, 63,
739 47, 65, -1, 67, -1, -1, -1, -1, -1, -1,
740 -1, 58, 76, 77, -1, -1, 63, -1, 65, -1,
741 67, -1, -1, -1, -1, -1, -1, 91, -1, 76,
742 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
743 -1, -1, -1, -1, 91
vlm6a02a8a2004-09-08 00:28:11 +0000744};
745/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
746#line 3 "/usr/share/bison.simple"
747/* This file comes from bison-1.28. */
748
749/* Skeleton output parser for bison,
750 Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
751
752 This program is free software; you can redistribute it and/or modify
753 it under the terms of the GNU General Public License as published by
754 the Free Software Foundation; either version 2, or (at your option)
755 any later version.
756
757 This program is distributed in the hope that it will be useful,
758 but WITHOUT ANY WARRANTY; without even the implied warranty of
759 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
760 GNU General Public License for more details.
761
762 You should have received a copy of the GNU General Public License
763 along with this program; if not, write to the Free Software
764 Foundation, Inc., 59 Temple Place - Suite 330,
765 Boston, MA 02111-1307, USA. */
766
767/* As a special exception, when this file is copied by Bison into a
768 Bison output file, you may use that output file without restriction.
769 This special exception was added by the Free Software Foundation
770 in version 1.24 of Bison. */
771
772/* This is the parser code that is written into each bison parser
773 when the %semantic_parser declaration is not specified in the grammar.
774 It was written by Richard Stallman by simplifying the hairy parser
775 used when %semantic_parser is specified. */
776
777#ifndef YYSTACK_USE_ALLOCA
778#ifdef alloca
779#define YYSTACK_USE_ALLOCA
780#else /* alloca not defined */
781#ifdef __GNUC__
782#define YYSTACK_USE_ALLOCA
783#define alloca __builtin_alloca
784#else /* not GNU C. */
785#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
786#define YYSTACK_USE_ALLOCA
787#include <alloca.h>
788#else /* not sparc */
789/* We think this test detects Watcom and Microsoft C. */
790/* This used to test MSDOS, but that is a bad idea
791 since that symbol is in the user namespace. */
792#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
793#if 0 /* No need for malloc.h, which pollutes the namespace;
794 instead, just don't use alloca. */
795#include <malloc.h>
796#endif
797#else /* not MSDOS, or __TURBOC__ */
798#if defined(_AIX)
799/* I don't know what this was needed for, but it pollutes the namespace.
800 So I turned it off. rms, 2 May 1997. */
801/* #include <malloc.h> */
802 #pragma alloca
803#define YYSTACK_USE_ALLOCA
804#else /* not MSDOS, or __TURBOC__, or _AIX */
805#if 0
806#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
807 and on HPUX 10. Eventually we can turn this on. */
808#define YYSTACK_USE_ALLOCA
809#define alloca __builtin_alloca
810#endif /* __hpux */
811#endif
812#endif /* not _AIX */
813#endif /* not MSDOS, or __TURBOC__ */
814#endif /* not sparc */
815#endif /* not GNU C */
816#endif /* alloca not defined */
817#endif /* YYSTACK_USE_ALLOCA not defined */
818
819#ifdef YYSTACK_USE_ALLOCA
820#define YYSTACK_ALLOC alloca
vlmfa67ddc2004-06-03 03:38:44 +0000821#else
vlm6a02a8a2004-09-08 00:28:11 +0000822#define YYSTACK_ALLOC malloc
vlmfa67ddc2004-06-03 03:38:44 +0000823#endif
824
vlm6a02a8a2004-09-08 00:28:11 +0000825/* Note: there must be only one dollar sign in this file.
826 It is replaced by the list of actions, each action
827 as one case of the switch. */
vlmfa67ddc2004-06-03 03:38:44 +0000828
829#define yyerrok (yyerrstatus = 0)
830#define yyclearin (yychar = YYEMPTY)
831#define YYEMPTY -2
832#define YYEOF 0
833#define YYACCEPT goto yyacceptlab
vlm6a02a8a2004-09-08 00:28:11 +0000834#define YYABORT goto yyabortlab
vlmfa67ddc2004-06-03 03:38:44 +0000835#define YYERROR goto yyerrlab1
vlm6a02a8a2004-09-08 00:28:11 +0000836/* Like YYERROR except do call yyerror.
837 This remains here temporarily to ease the
838 transition to the new meaning of YYERROR, for GCC.
vlmfa67ddc2004-06-03 03:38:44 +0000839 Once GCC version 2 has supplanted version 1, this can go. */
840#define YYFAIL goto yyerrlab
841#define YYRECOVERING() (!!yyerrstatus)
vlm6a02a8a2004-09-08 00:28:11 +0000842#define YYBACKUP(token, value) \
vlmfa67ddc2004-06-03 03:38:44 +0000843do \
844 if (yychar == YYEMPTY && yylen == 1) \
vlm6a02a8a2004-09-08 00:28:11 +0000845 { yychar = (token), yylval = (value); \
vlmfa67ddc2004-06-03 03:38:44 +0000846 yychar1 = YYTRANSLATE (yychar); \
847 YYPOPSTACK; \
848 goto yybackup; \
849 } \
850 else \
vlm6a02a8a2004-09-08 00:28:11 +0000851 { yyerror ("syntax error: cannot back up"); YYERROR; } \
vlmfa67ddc2004-06-03 03:38:44 +0000852while (0)
853
854#define YYTERROR 1
855#define YYERRCODE 256
856
vlm6a02a8a2004-09-08 00:28:11 +0000857#ifndef YYPURE
858#define YYLEX yylex()
vlmfa67ddc2004-06-03 03:38:44 +0000859#endif
860
vlm6a02a8a2004-09-08 00:28:11 +0000861#ifdef YYPURE
862#ifdef YYLSP_NEEDED
863#ifdef YYLEX_PARAM
864#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
865#else
866#define YYLEX yylex(&yylval, &yylloc)
867#endif
868#else /* not YYLSP_NEEDED */
869#ifdef YYLEX_PARAM
870#define YYLEX yylex(&yylval, YYLEX_PARAM)
871#else
872#define YYLEX yylex(&yylval)
873#endif
874#endif /* not YYLSP_NEEDED */
875#endif
vlmfa67ddc2004-06-03 03:38:44 +0000876
vlm6a02a8a2004-09-08 00:28:11 +0000877/* If nonreentrant, generate the variables here */
vlmfa67ddc2004-06-03 03:38:44 +0000878
vlm6a02a8a2004-09-08 00:28:11 +0000879#ifndef YYPURE
vlmfa67ddc2004-06-03 03:38:44 +0000880
vlm6a02a8a2004-09-08 00:28:11 +0000881int yychar; /* the lookahead symbol */
882YYSTYPE yylval; /* the semantic value of the */
883 /* lookahead symbol */
vlmfa67ddc2004-06-03 03:38:44 +0000884
vlm6a02a8a2004-09-08 00:28:11 +0000885#ifdef YYLSP_NEEDED
886YYLTYPE yylloc; /* location data for the lookahead */
887 /* symbol */
888#endif
vlmfa67ddc2004-06-03 03:38:44 +0000889
vlm6a02a8a2004-09-08 00:28:11 +0000890int yynerrs; /* number of parse errors so far */
891#endif /* not YYPURE */
892
893#if YYDEBUG != 0
894int yydebug; /* nonzero means print parse trace */
895/* Since this is uninitialized, it does not stop multiple parsers
896 from coexisting. */
897#endif
898
899/* YYINITDEPTH indicates the initial size of the parser's stacks */
900
vlmfa67ddc2004-06-03 03:38:44 +0000901#ifndef YYINITDEPTH
vlm6a02a8a2004-09-08 00:28:11 +0000902#define YYINITDEPTH 200
vlmfa67ddc2004-06-03 03:38:44 +0000903#endif
904
vlm6a02a8a2004-09-08 00:28:11 +0000905/* YYMAXDEPTH is the maximum size the stacks can grow to
906 (effective only if the built-in stack extension method is used). */
vlmfa67ddc2004-06-03 03:38:44 +0000907
908#if YYMAXDEPTH == 0
vlm6a02a8a2004-09-08 00:28:11 +0000909#undef YYMAXDEPTH
vlmfa67ddc2004-06-03 03:38:44 +0000910#endif
911
912#ifndef YYMAXDEPTH
vlm6a02a8a2004-09-08 00:28:11 +0000913#define YYMAXDEPTH 10000
vlmfa67ddc2004-06-03 03:38:44 +0000914#endif
915
vlm6a02a8a2004-09-08 00:28:11 +0000916/* Define __yy_memcpy. Note that the size argument
917 should be passed with type unsigned int, because that is what the non-GCC
918 definitions require. With GCC, __builtin_memcpy takes an arg
919 of type size_t, but it can handle unsigned int. */
vlmfa67ddc2004-06-03 03:38:44 +0000920
vlm6a02a8a2004-09-08 00:28:11 +0000921#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
922#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
923#else /* not GNU C or C++ */
924#ifndef __cplusplus
vlmfa67ddc2004-06-03 03:38:44 +0000925
vlm6a02a8a2004-09-08 00:28:11 +0000926/* This is the most reliable way to avoid incompatibilities
927 in available built-in functions on various systems. */
vlm80103492004-09-07 10:39:09 +0000928static void
vlm6a02a8a2004-09-08 00:28:11 +0000929__yy_memcpy (to, from, count)
930 char *to;
931 char *from;
932 unsigned int count;
vlm80103492004-09-07 10:39:09 +0000933{
vlm6a02a8a2004-09-08 00:28:11 +0000934 register char *f = from;
935 register char *t = to;
936 register int i = count;
vlm80103492004-09-07 10:39:09 +0000937
vlm6a02a8a2004-09-08 00:28:11 +0000938 while (i-- > 0)
939 *t++ = *f++;
vlm80103492004-09-07 10:39:09 +0000940}
vlm80103492004-09-07 10:39:09 +0000941
vlm6a02a8a2004-09-08 00:28:11 +0000942#else /* __cplusplus */
vlm80103492004-09-07 10:39:09 +0000943
vlm6a02a8a2004-09-08 00:28:11 +0000944/* This is the most reliable way to avoid incompatibilities
945 in available built-in functions on various systems. */
vlm80103492004-09-07 10:39:09 +0000946static void
vlm6a02a8a2004-09-08 00:28:11 +0000947__yy_memcpy (char *to, char *from, unsigned int count)
vlm80103492004-09-07 10:39:09 +0000948{
vlm6a02a8a2004-09-08 00:28:11 +0000949 register char *t = to;
950 register char *f = from;
951 register int i = count;
vlm80103492004-09-07 10:39:09 +0000952
vlm6a02a8a2004-09-08 00:28:11 +0000953 while (i-- > 0)
954 *t++ = *f++;
vlm044f7442004-09-04 04:49:21 +0000955}
vlm044f7442004-09-04 04:49:21 +0000956
vlm6a02a8a2004-09-08 00:28:11 +0000957#endif
958#endif
vlmfa67ddc2004-06-03 03:38:44 +0000959
vlm6a02a8a2004-09-08 00:28:11 +0000960#line 217 "/usr/share/bison.simple"
vlmfa67ddc2004-06-03 03:38:44 +0000961
962/* The user can define YYPARSE_PARAM as the name of an argument to be passed
963 into yyparse. The argument should have type void *.
964 It should actually point to an object.
965 Grammar actions can access the variable by casting it
966 to the proper pointer type. */
967
968#ifdef YYPARSE_PARAM
vlm6a02a8a2004-09-08 00:28:11 +0000969#ifdef __cplusplus
970#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
971#define YYPARSE_PARAM_DECL
972#else /* not __cplusplus */
973#define YYPARSE_PARAM_ARG YYPARSE_PARAM
974#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
975#endif /* not __cplusplus */
976#else /* not YYPARSE_PARAM */
977#define YYPARSE_PARAM_ARG
978#define YYPARSE_PARAM_DECL
979#endif /* not YYPARSE_PARAM */
vlmfa67ddc2004-06-03 03:38:44 +0000980
981/* Prevent warning if -Wstrict-prototypes. */
982#ifdef __GNUC__
vlm6a02a8a2004-09-08 00:28:11 +0000983#ifdef YYPARSE_PARAM
vlmfa67ddc2004-06-03 03:38:44 +0000984int yyparse (void *);
vlm6a02a8a2004-09-08 00:28:11 +0000985#else
vlmfa67ddc2004-06-03 03:38:44 +0000986int yyparse (void);
vlm6a02a8a2004-09-08 00:28:11 +0000987#endif
vlm39e5ed72004-09-05 10:40:41 +0000988#endif
vlm80103492004-09-07 10:39:09 +0000989
vlmfa67ddc2004-06-03 03:38:44 +0000990int
vlm6a02a8a2004-09-08 00:28:11 +0000991yyparse(YYPARSE_PARAM_ARG)
vlmfa67ddc2004-06-03 03:38:44 +0000992 YYPARSE_PARAM_DECL
993{
994 register int yystate;
995 register int yyn;
996 register short *yyssp;
997 register YYSTYPE *yyvsp;
vlm6a02a8a2004-09-08 00:28:11 +0000998 int yyerrstatus; /* number of tokens to shift before error messages enabled */
999 int yychar1 = 0; /* lookahead token as an internal (translated) token number */
vlmfa67ddc2004-06-03 03:38:44 +00001000
vlm6a02a8a2004-09-08 00:28:11 +00001001 short yyssa[YYINITDEPTH]; /* the state stack */
1002 YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
vlmfa67ddc2004-06-03 03:38:44 +00001003
vlm6a02a8a2004-09-08 00:28:11 +00001004 short *yyss = yyssa; /* refer to the stacks thru separate pointers */
1005 YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
vlmfa67ddc2004-06-03 03:38:44 +00001006
vlm6a02a8a2004-09-08 00:28:11 +00001007#ifdef YYLSP_NEEDED
1008 YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
1009 YYLTYPE *yyls = yylsa;
1010 YYLTYPE *yylsp;
1011
1012#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
1013#else
vlmfa67ddc2004-06-03 03:38:44 +00001014#define YYPOPSTACK (yyvsp--, yyssp--)
vlm6a02a8a2004-09-08 00:28:11 +00001015#endif
vlmfa67ddc2004-06-03 03:38:44 +00001016
vlm6a02a8a2004-09-08 00:28:11 +00001017 int yystacksize = YYINITDEPTH;
1018 int yyfree_stacks = 0;
vlmfa67ddc2004-06-03 03:38:44 +00001019
vlm6a02a8a2004-09-08 00:28:11 +00001020#ifdef YYPURE
1021 int yychar;
1022 YYSTYPE yylval;
1023 int yynerrs;
1024#ifdef YYLSP_NEEDED
1025 YYLTYPE yylloc;
1026#endif
1027#endif
vlmfa67ddc2004-06-03 03:38:44 +00001028
vlm6a02a8a2004-09-08 00:28:11 +00001029 YYSTYPE yyval; /* the variable used to return */
1030 /* semantic values from the action */
1031 /* routines */
vlmfa67ddc2004-06-03 03:38:44 +00001032
1033 int yylen;
1034
vlm6a02a8a2004-09-08 00:28:11 +00001035#if YYDEBUG != 0
1036 if (yydebug)
1037 fprintf(stderr, "Starting parse\n");
1038#endif
vlmfa67ddc2004-06-03 03:38:44 +00001039
1040 yystate = 0;
1041 yyerrstatus = 0;
1042 yynerrs = 0;
1043 yychar = YYEMPTY; /* Cause a token to be read. */
1044
1045 /* Initialize stack pointers.
1046 Waste one element of value and location stack
1047 so that they stay on the same level as the state stack.
1048 The wasted elements are never initialized. */
1049
vlm6a02a8a2004-09-08 00:28:11 +00001050 yyssp = yyss - 1;
vlmfa67ddc2004-06-03 03:38:44 +00001051 yyvsp = yyvs;
vlm6a02a8a2004-09-08 00:28:11 +00001052#ifdef YYLSP_NEEDED
1053 yylsp = yyls;
1054#endif
vlmfa67ddc2004-06-03 03:38:44 +00001055
vlm6a02a8a2004-09-08 00:28:11 +00001056/* Push a new state, which is found in yystate . */
1057/* In all cases, when you get here, the value and location stacks
1058 have just been pushed. so pushing a state here evens the stacks. */
1059yynewstate:
vlmfa67ddc2004-06-03 03:38:44 +00001060
vlm6a02a8a2004-09-08 00:28:11 +00001061 *++yyssp = yystate;
vlmfa67ddc2004-06-03 03:38:44 +00001062
1063 if (yyssp >= yyss + yystacksize - 1)
1064 {
vlm6a02a8a2004-09-08 00:28:11 +00001065 /* Give user a chance to reallocate the stack */
1066 /* Use copies of these so that the &'s don't force the real ones into memory. */
1067 YYSTYPE *yyvs1 = yyvs;
1068 short *yyss1 = yyss;
1069#ifdef YYLSP_NEEDED
1070 YYLTYPE *yyls1 = yyls;
1071#endif
1072
vlmfa67ddc2004-06-03 03:38:44 +00001073 /* Get the current used size of the three stacks, in elements. */
vlm6a02a8a2004-09-08 00:28:11 +00001074 int size = yyssp - yyss + 1;
vlmfa67ddc2004-06-03 03:38:44 +00001075
1076#ifdef yyoverflow
vlm6a02a8a2004-09-08 00:28:11 +00001077 /* Each stack pointer address is followed by the size of
1078 the data in use in that stack, in bytes. */
1079#ifdef YYLSP_NEEDED
1080 /* This used to be a conditional around just the two extra args,
1081 but that might be undefined if yyoverflow is a macro. */
1082 yyoverflow("parser stack overflow",
1083 &yyss1, size * sizeof (*yyssp),
1084 &yyvs1, size * sizeof (*yyvsp),
1085 &yyls1, size * sizeof (*yylsp),
1086 &yystacksize);
1087#else
1088 yyoverflow("parser stack overflow",
1089 &yyss1, size * sizeof (*yyssp),
1090 &yyvs1, size * sizeof (*yyvsp),
1091 &yystacksize);
1092#endif
vlmfa67ddc2004-06-03 03:38:44 +00001093
vlm6a02a8a2004-09-08 00:28:11 +00001094 yyss = yyss1; yyvs = yyvs1;
1095#ifdef YYLSP_NEEDED
1096 yyls = yyls1;
1097#endif
vlmfa67ddc2004-06-03 03:38:44 +00001098#else /* no yyoverflow */
1099 /* Extend the stack our own way. */
1100 if (yystacksize >= YYMAXDEPTH)
vlm6a02a8a2004-09-08 00:28:11 +00001101 {
1102 yyerror("parser stack overflow");
1103 if (yyfree_stacks)
1104 {
1105 free (yyss);
1106 free (yyvs);
1107#ifdef YYLSP_NEEDED
1108 free (yyls);
1109#endif
1110 }
1111 return 2;
1112 }
vlmfa67ddc2004-06-03 03:38:44 +00001113 yystacksize *= 2;
1114 if (yystacksize > YYMAXDEPTH)
1115 yystacksize = YYMAXDEPTH;
vlm6a02a8a2004-09-08 00:28:11 +00001116#ifndef YYSTACK_USE_ALLOCA
1117 yyfree_stacks = 1;
1118#endif
1119 yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
1120 __yy_memcpy ((char *)yyss, (char *)yyss1,
1121 size * (unsigned int) sizeof (*yyssp));
1122 yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
1123 __yy_memcpy ((char *)yyvs, (char *)yyvs1,
1124 size * (unsigned int) sizeof (*yyvsp));
1125#ifdef YYLSP_NEEDED
1126 yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
1127 __yy_memcpy ((char *)yyls, (char *)yyls1,
1128 size * (unsigned int) sizeof (*yylsp));
1129#endif
vlmfa67ddc2004-06-03 03:38:44 +00001130#endif /* no yyoverflow */
1131
vlm6a02a8a2004-09-08 00:28:11 +00001132 yyssp = yyss + size - 1;
1133 yyvsp = yyvs + size - 1;
1134#ifdef YYLSP_NEEDED
1135 yylsp = yyls + size - 1;
1136#endif
vlmfa67ddc2004-06-03 03:38:44 +00001137
vlm6a02a8a2004-09-08 00:28:11 +00001138#if YYDEBUG != 0
1139 if (yydebug)
1140 fprintf(stderr, "Stack size increased to %d\n", yystacksize);
1141#endif
vlmfa67ddc2004-06-03 03:38:44 +00001142
1143 if (yyssp >= yyss + yystacksize - 1)
1144 YYABORT;
1145 }
1146
vlm6a02a8a2004-09-08 00:28:11 +00001147#if YYDEBUG != 0
1148 if (yydebug)
1149 fprintf(stderr, "Entering state %d\n", yystate);
1150#endif
vlmfa67ddc2004-06-03 03:38:44 +00001151
1152 goto yybackup;
vlm6a02a8a2004-09-08 00:28:11 +00001153 yybackup:
vlmfa67ddc2004-06-03 03:38:44 +00001154
1155/* Do appropriate processing given the current state. */
1156/* Read a lookahead token if we need one and don't already have one. */
1157/* yyresume: */
1158
1159 /* First try to decide what to do without reference to lookahead token. */
1160
1161 yyn = yypact[yystate];
vlm6a02a8a2004-09-08 00:28:11 +00001162 if (yyn == YYFLAG)
vlmfa67ddc2004-06-03 03:38:44 +00001163 goto yydefault;
1164
1165 /* Not known => get a lookahead token if don't already have one. */
1166
1167 /* yychar is either YYEMPTY or YYEOF
1168 or a valid token in external form. */
1169
1170 if (yychar == YYEMPTY)
1171 {
vlm6a02a8a2004-09-08 00:28:11 +00001172#if YYDEBUG != 0
1173 if (yydebug)
1174 fprintf(stderr, "Reading a token: ");
1175#endif
vlmfa67ddc2004-06-03 03:38:44 +00001176 yychar = YYLEX;
1177 }
1178
vlm6a02a8a2004-09-08 00:28:11 +00001179 /* Convert token to internal form (in yychar1) for indexing tables with */
vlmfa67ddc2004-06-03 03:38:44 +00001180
vlm6a02a8a2004-09-08 00:28:11 +00001181 if (yychar <= 0) /* This means end of input. */
vlmfa67ddc2004-06-03 03:38:44 +00001182 {
1183 yychar1 = 0;
vlm6a02a8a2004-09-08 00:28:11 +00001184 yychar = YYEOF; /* Don't call YYLEX any more */
vlmfa67ddc2004-06-03 03:38:44 +00001185
vlm6a02a8a2004-09-08 00:28:11 +00001186#if YYDEBUG != 0
1187 if (yydebug)
1188 fprintf(stderr, "Now at end of input.\n");
1189#endif
vlmfa67ddc2004-06-03 03:38:44 +00001190 }
1191 else
1192 {
vlm6a02a8a2004-09-08 00:28:11 +00001193 yychar1 = YYTRANSLATE(yychar);
vlmfa67ddc2004-06-03 03:38:44 +00001194
vlm6a02a8a2004-09-08 00:28:11 +00001195#if YYDEBUG != 0
1196 if (yydebug)
1197 {
1198 fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
1199 /* Give the individual parser a way to print the precise meaning
1200 of a token, for further debugging info. */
1201#ifdef YYPRINT
1202 YYPRINT (stderr, yychar, yylval);
1203#endif
1204 fprintf (stderr, ")\n");
1205 }
1206#endif
vlmfa67ddc2004-06-03 03:38:44 +00001207 }
1208
1209 yyn += yychar1;
vlm6a02a8a2004-09-08 00:28:11 +00001210 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
vlmfa67ddc2004-06-03 03:38:44 +00001211 goto yydefault;
vlm6a02a8a2004-09-08 00:28:11 +00001212
vlmfa67ddc2004-06-03 03:38:44 +00001213 yyn = yytable[yyn];
vlm6a02a8a2004-09-08 00:28:11 +00001214
1215 /* yyn is what to do for this token type in this state.
1216 Negative => reduce, -yyn is rule number.
1217 Positive => shift, yyn is new state.
1218 New state is final state => don't bother to shift,
1219 just return success.
1220 0, or most negative number => error. */
1221
1222 if (yyn < 0)
vlmfa67ddc2004-06-03 03:38:44 +00001223 {
vlm6a02a8a2004-09-08 00:28:11 +00001224 if (yyn == YYFLAG)
vlmfa67ddc2004-06-03 03:38:44 +00001225 goto yyerrlab;
1226 yyn = -yyn;
1227 goto yyreduce;
1228 }
vlm6a02a8a2004-09-08 00:28:11 +00001229 else if (yyn == 0)
1230 goto yyerrlab;
vlmfa67ddc2004-06-03 03:38:44 +00001231
1232 if (yyn == YYFINAL)
1233 YYACCEPT;
1234
1235 /* Shift the lookahead token. */
vlm6a02a8a2004-09-08 00:28:11 +00001236
1237#if YYDEBUG != 0
1238 if (yydebug)
1239 fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
1240#endif
vlmfa67ddc2004-06-03 03:38:44 +00001241
1242 /* Discard the token being shifted unless it is eof. */
1243 if (yychar != YYEOF)
1244 yychar = YYEMPTY;
1245
1246 *++yyvsp = yylval;
vlm6a02a8a2004-09-08 00:28:11 +00001247#ifdef YYLSP_NEEDED
1248 *++yylsp = yylloc;
1249#endif
vlmfa67ddc2004-06-03 03:38:44 +00001250
vlm6a02a8a2004-09-08 00:28:11 +00001251 /* count tokens shifted since error; after three, turn off error status. */
1252 if (yyerrstatus) yyerrstatus--;
vlmfa67ddc2004-06-03 03:38:44 +00001253
1254 yystate = yyn;
1255 goto yynewstate;
1256
vlm6a02a8a2004-09-08 00:28:11 +00001257/* Do the default action for the current state. */
vlm80103492004-09-07 10:39:09 +00001258yydefault:
vlm6a02a8a2004-09-08 00:28:11 +00001259
vlmfa67ddc2004-06-03 03:38:44 +00001260 yyn = yydefact[yystate];
1261 if (yyn == 0)
1262 goto yyerrlab;
1263
vlm6a02a8a2004-09-08 00:28:11 +00001264/* Do a reduction. yyn is the number of a rule to reduce with. */
vlmfa67ddc2004-06-03 03:38:44 +00001265yyreduce:
1266 yylen = yyr2[yyn];
vlm6a02a8a2004-09-08 00:28:11 +00001267 if (yylen > 0)
1268 yyval = yyvsp[1-yylen]; /* implement default value of the action */
vlmfa67ddc2004-06-03 03:38:44 +00001269
vlm6a02a8a2004-09-08 00:28:11 +00001270#if YYDEBUG != 0
vlmfa67ddc2004-06-03 03:38:44 +00001271 if (yydebug)
1272 {
vlm6a02a8a2004-09-08 00:28:11 +00001273 int i;
vlmfa67ddc2004-06-03 03:38:44 +00001274
vlm6a02a8a2004-09-08 00:28:11 +00001275 fprintf (stderr, "Reducing via rule %d (line %d), ",
1276 yyn, yyrline[yyn]);
vlmfa67ddc2004-06-03 03:38:44 +00001277
1278 /* Print the symbols being reduced, and their result. */
vlm6a02a8a2004-09-08 00:28:11 +00001279 for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
1280 fprintf (stderr, "%s ", yytname[yyrhs[i]]);
1281 fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
vlmfa67ddc2004-06-03 03:38:44 +00001282 }
1283#endif
vlm80103492004-09-07 10:39:09 +00001284
vlm6a02a8a2004-09-08 00:28:11 +00001285
1286 switch (yyn) {
1287
1288case 1:
vlmfce48a42004-09-14 02:36:39 +00001289#line 300 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001290{
1291 *(void **)param = yyvsp[0].a_grammar;
1292 ;
1293 break;}
1294case 2:
vlmfce48a42004-09-14 02:36:39 +00001295#line 306 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001296{
vlmfa67ddc2004-06-03 03:38:44 +00001297 yyval.a_grammar = asn1p_new();
1298 checkmem(yyval.a_grammar);
1299 TQ_ADD(&(yyval.a_grammar->modules), yyvsp[0].a_module, mod_next);
vlm6a02a8a2004-09-08 00:28:11 +00001300 ;
1301 break;}
1302case 3:
vlmfce48a42004-09-14 02:36:39 +00001303#line 311 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001304{
vlmfa67ddc2004-06-03 03:38:44 +00001305 yyval.a_grammar = yyvsp[-1].a_grammar;
1306 TQ_ADD(&(yyval.a_grammar->modules), yyvsp[0].a_module, mod_next);
vlm6a02a8a2004-09-08 00:28:11 +00001307 ;
1308 break;}
1309case 4:
vlmfce48a42004-09-14 02:36:39 +00001310#line 332 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001311{
vlmfa67ddc2004-06-03 03:38:44 +00001312
1313 if(yyvsp[-1].a_module) {
1314 yyval.a_module = yyvsp[-1].a_module;
1315 } else {
1316 /* There's a chance that a module is just plain empty */
1317 yyval.a_module = asn1p_module_new();
1318 }
1319 checkmem(yyval.a_module);
1320
1321 yyval.a_module->Identifier = yyvsp[-7].tv_str;
1322 yyval.a_module->module_oid = yyvsp[-6].a_oid;
1323 yyval.a_module->module_flags = yyvsp[-4].a_module_flags;
vlm6a02a8a2004-09-08 00:28:11 +00001324 ;
1325 break;}
1326case 5:
vlmfce48a42004-09-14 02:36:39 +00001327#line 353 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001328{ yyval.a_oid = 0; ;
1329 break;}
1330case 6:
vlmfce48a42004-09-14 02:36:39 +00001331#line 354 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001332{ yyval.a_oid = yyvsp[0].a_oid; ;
1333 break;}
1334case 7:
vlmfce48a42004-09-14 02:36:39 +00001335#line 358 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001336{
vlmfa67ddc2004-06-03 03:38:44 +00001337 yyval.a_oid = yyvsp[-1].a_oid;
vlm6a02a8a2004-09-08 00:28:11 +00001338 ;
1339 break;}
1340case 8:
vlmfce48a42004-09-14 02:36:39 +00001341#line 361 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001342{
vlmfa67ddc2004-06-03 03:38:44 +00001343 yyval.a_oid = 0;
vlm6a02a8a2004-09-08 00:28:11 +00001344 ;
1345 break;}
1346case 9:
vlmfce48a42004-09-14 02:36:39 +00001347#line 367 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001348{
vlmfa67ddc2004-06-03 03:38:44 +00001349 yyval.a_oid = asn1p_oid_new();
1350 asn1p_oid_add_arc(yyval.a_oid, &yyvsp[0].a_oid_arc);
1351 if(yyvsp[0].a_oid_arc.name)
1352 free(yyvsp[0].a_oid_arc.name);
vlm6a02a8a2004-09-08 00:28:11 +00001353 ;
1354 break;}
1355case 10:
vlmfce48a42004-09-14 02:36:39 +00001356#line 373 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001357{
vlmfa67ddc2004-06-03 03:38:44 +00001358 yyval.a_oid = yyvsp[-1].a_oid;
1359 asn1p_oid_add_arc(yyval.a_oid, &yyvsp[0].a_oid_arc);
1360 if(yyvsp[0].a_oid_arc.name)
1361 free(yyvsp[0].a_oid_arc.name);
vlm6a02a8a2004-09-08 00:28:11 +00001362 ;
1363 break;}
1364case 11:
vlmfce48a42004-09-14 02:36:39 +00001365#line 382 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001366{ /* iso */
vlmfa67ddc2004-06-03 03:38:44 +00001367 yyval.a_oid_arc.name = yyvsp[0].tv_str;
1368 yyval.a_oid_arc.number = -1;
vlm6a02a8a2004-09-08 00:28:11 +00001369 ;
1370 break;}
1371case 12:
vlmfce48a42004-09-14 02:36:39 +00001372#line 386 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001373{ /* iso(1) */
vlmfa67ddc2004-06-03 03:38:44 +00001374 yyval.a_oid_arc.name = yyvsp[-3].tv_str;
1375 yyval.a_oid_arc.number = yyvsp[-1].a_int;
vlm6a02a8a2004-09-08 00:28:11 +00001376 ;
1377 break;}
1378case 13:
vlmfce48a42004-09-14 02:36:39 +00001379#line 390 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001380{ /* 1 */
vlmfa67ddc2004-06-03 03:38:44 +00001381 yyval.a_oid_arc.name = 0;
1382 yyval.a_oid_arc.number = yyvsp[0].a_int;
vlm6a02a8a2004-09-08 00:28:11 +00001383 ;
1384 break;}
1385case 14:
vlmfce48a42004-09-14 02:36:39 +00001386#line 400 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001387{ yyval.a_module_flags = MSF_NOFLAGS; ;
1388 break;}
1389case 15:
vlmfce48a42004-09-14 02:36:39 +00001390#line 401 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001391{
vlmfa67ddc2004-06-03 03:38:44 +00001392 yyval.a_module_flags = yyvsp[0].a_module_flags;
vlm6a02a8a2004-09-08 00:28:11 +00001393 ;
1394 break;}
1395case 16:
vlmfce48a42004-09-14 02:36:39 +00001396#line 410 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001397{
vlmfa67ddc2004-06-03 03:38:44 +00001398 yyval.a_module_flags = yyvsp[0].a_module_flags;
vlm6a02a8a2004-09-08 00:28:11 +00001399 ;
1400 break;}
1401case 17:
vlmfce48a42004-09-14 02:36:39 +00001402#line 413 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001403{
vlmfa67ddc2004-06-03 03:38:44 +00001404 yyval.a_module_flags = yyvsp[-1].a_module_flags | yyvsp[0].a_module_flags;
vlm6a02a8a2004-09-08 00:28:11 +00001405 ;
1406 break;}
1407case 18:
vlmfce48a42004-09-14 02:36:39 +00001408#line 422 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001409{
vlmfa67ddc2004-06-03 03:38:44 +00001410 yyval.a_module_flags = MSF_EXPLICIT_TAGS;
vlm6a02a8a2004-09-08 00:28:11 +00001411 ;
1412 break;}
1413case 19:
vlmfce48a42004-09-14 02:36:39 +00001414#line 425 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001415{
vlmfa67ddc2004-06-03 03:38:44 +00001416 yyval.a_module_flags = MSF_IMPLICIT_TAGS;
vlm6a02a8a2004-09-08 00:28:11 +00001417 ;
1418 break;}
1419case 20:
vlmfce48a42004-09-14 02:36:39 +00001420#line 428 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001421{
vlmfa67ddc2004-06-03 03:38:44 +00001422 yyval.a_module_flags = MSF_AUTOMATIC_TAGS;
vlm6a02a8a2004-09-08 00:28:11 +00001423 ;
1424 break;}
1425case 21:
vlmfce48a42004-09-14 02:36:39 +00001426#line 431 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001427{
vlmfa67ddc2004-06-03 03:38:44 +00001428 yyval.a_module_flags = MSF_EXTENSIBILITY_IMPLIED;
vlm6a02a8a2004-09-08 00:28:11 +00001429 ;
1430 break;}
1431case 22:
vlmfce48a42004-09-14 02:36:39 +00001432#line 435 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001433{
vlm9283dbe2004-08-18 04:59:12 +00001434 /* X.680Amd1 specifies TAG and XER */
1435 if(strcmp(yyvsp[-1].tv_str, "TAG") == 0) {
1436 yyval.a_module_flags = MSF_TAG_INSTRUCTIONS;
1437 } else if(strcmp(yyvsp[-1].tv_str, "XER") == 0) {
1438 yyval.a_module_flags = MSF_XER_INSTRUCTIONS;
1439 } else {
1440 fprintf(stderr,
1441 "WARNING: %s INSTRUCTIONS at line %d: "
1442 "Unrecognized encoding reference\n",
1443 yyvsp[-1].tv_str, yylineno);
1444 yyval.a_module_flags = MSF_unk_INSTRUCTIONS;
1445 }
1446 free(yyvsp[-1].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00001447 ;
1448 break;}
1449case 23:
vlmfce48a42004-09-14 02:36:39 +00001450#line 456 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001451{ yyval.a_module = 0; ;
1452 break;}
1453case 24:
vlmfce48a42004-09-14 02:36:39 +00001454#line 457 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001455{
vlmfa67ddc2004-06-03 03:38:44 +00001456 yyval.a_module = yyvsp[0].a_module;
vlm6a02a8a2004-09-08 00:28:11 +00001457 ;
1458 break;}
1459case 25:
vlmfce48a42004-09-14 02:36:39 +00001460#line 466 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001461{
vlm9283dbe2004-08-18 04:59:12 +00001462 yyval.a_module = yyvsp[0].a_module;
vlm6a02a8a2004-09-08 00:28:11 +00001463 ;
1464 break;}
1465case 26:
vlmfce48a42004-09-14 02:36:39 +00001466#line 469 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001467{
vlmfa67ddc2004-06-03 03:38:44 +00001468 yyval.a_module = yyvsp[-1].a_module;
1469
vlm9283dbe2004-08-18 04:59:12 +00001470 /* Behave well when one of them is skipped. */
1471 if(!(yyvsp[-1].a_module)) {
1472 if(yyvsp[0].a_module) yyval.a_module = yyvsp[0].a_module;
1473 break;
1474 }
1475
vlmfa67ddc2004-06-03 03:38:44 +00001476#ifdef MY_IMPORT
1477#error MY_IMPORT DEFINED ELSEWHERE!
1478#endif
1479#define MY_IMPORT(foo,field) do { \
vlm97ed7152004-08-13 12:31:09 +00001480 while(TQ_FIRST(&(yyvsp[0].a_module->foo))) { \
vlmfa67ddc2004-06-03 03:38:44 +00001481 TQ_ADD(&(yyval.a_module->foo), \
1482 TQ_REMOVE(&(yyvsp[0].a_module->foo), field), \
1483 field); \
vlm97ed7152004-08-13 12:31:09 +00001484 } \
1485 assert(TQ_FIRST(&(yyvsp[0].a_module->foo)) == 0); \
1486 } while(0)
vlmfa67ddc2004-06-03 03:38:44 +00001487
1488 MY_IMPORT(imports, xp_next);
1489 MY_IMPORT(exports, xp_next);
1490 MY_IMPORT(members, next);
1491#undef MY_IMPORT
1492
vlm6a02a8a2004-09-08 00:28:11 +00001493 ;
1494 break;}
1495case 27:
vlmfce48a42004-09-14 02:36:39 +00001496#line 502 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001497{
vlmfa67ddc2004-06-03 03:38:44 +00001498 yyval.a_module = yyvsp[0].a_module;
vlm6a02a8a2004-09-08 00:28:11 +00001499 ;
1500 break;}
1501case 28:
vlmfce48a42004-09-14 02:36:39 +00001502#line 505 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001503{
vlmfa67ddc2004-06-03 03:38:44 +00001504 yyval.a_module = asn1p_module_new();
1505 checkmem(yyval.a_module);
1506 if(yyvsp[0].a_xports) {
1507 TQ_ADD(&(yyval.a_module->exports), yyvsp[0].a_xports, xp_next);
1508 } else {
1509 /* "EXPORTS ALL;" ? */
1510 }
vlm6a02a8a2004-09-08 00:28:11 +00001511 ;
1512 break;}
1513case 29:
vlmfce48a42004-09-14 02:36:39 +00001514#line 514 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001515{
vlmfa67ddc2004-06-03 03:38:44 +00001516 yyval.a_module = asn1p_module_new();
1517 checkmem(yyval.a_module);
1518 assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
1519 assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
1520 TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001521 ;
1522 break;}
1523case 30:
vlmfce48a42004-09-14 02:36:39 +00001524#line 521 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001525{
vlm9283dbe2004-08-18 04:59:12 +00001526 yyval.a_module = asn1p_module_new();
1527 checkmem(yyval.a_module);
1528 assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
1529 assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
1530 TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001531 ;
1532 break;}
1533case 31:
vlmfce48a42004-09-14 02:36:39 +00001534#line 534 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001535{
vlm9283dbe2004-08-18 04:59:12 +00001536 yyval.a_module = asn1p_module_new();
1537 checkmem(yyval.a_module);
1538 assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
1539 assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
1540 TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001541 ;
1542 break;}
1543case 32:
vlmfce48a42004-09-14 02:36:39 +00001544#line 542 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001545{ asn1p_lexer_hack_push_encoding_control(); ;
1546 break;}
1547case 33:
vlmfce48a42004-09-14 02:36:39 +00001548#line 543 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001549{
vlm9283dbe2004-08-18 04:59:12 +00001550 fprintf(stderr,
1551 "WARNING: ENCODING-CONTROL %s "
1552 "specification at line %d ignored\n",
1553 yyvsp[-1].tv_str, yylineno);
1554 free(yyvsp[-1].tv_str);
1555 yyval.a_module = 0;
vlm6a02a8a2004-09-08 00:28:11 +00001556 ;
1557 break;}
1558case 34:
vlmfce48a42004-09-14 02:36:39 +00001559#line 555 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001560{
vlmfa67ddc2004-06-03 03:38:44 +00001561 return yyerror(
1562 "Attempt to redefine a standard basic type, "
1563 "use -ftypesXY to switch back "
1564 "to older version of ASN.1 standard");
vlm6a02a8a2004-09-08 00:28:11 +00001565 ;
1566 break;}
1567case 35:
vlmfce48a42004-09-14 02:36:39 +00001568#line 569 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001569{
vlmfa67ddc2004-06-03 03:38:44 +00001570 yyval.a_module = yyvsp[-1].a_module;
vlm6a02a8a2004-09-08 00:28:11 +00001571 ;
1572 break;}
1573case 36:
vlmfce48a42004-09-14 02:36:39 +00001574#line 575 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001575{
vlmfa67ddc2004-06-03 03:38:44 +00001576 return yyerror("Empty IMPORTS list");
vlm6a02a8a2004-09-08 00:28:11 +00001577 ;
1578 break;}
1579case 37:
vlmfce48a42004-09-14 02:36:39 +00001580#line 581 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001581{
vlmfa67ddc2004-06-03 03:38:44 +00001582 yyval.a_module = asn1p_module_new();
1583 checkmem(yyval.a_module);
1584 TQ_ADD(&(yyval.a_module->imports), yyvsp[0].a_xports, xp_next);
vlm6a02a8a2004-09-08 00:28:11 +00001585 ;
1586 break;}
1587case 38:
vlmfce48a42004-09-14 02:36:39 +00001588#line 586 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001589{
vlmfa67ddc2004-06-03 03:38:44 +00001590 yyval.a_module = yyvsp[-1].a_module;
1591 TQ_ADD(&(yyval.a_module->imports), yyvsp[0].a_xports, xp_next);
vlm6a02a8a2004-09-08 00:28:11 +00001592 ;
1593 break;}
1594case 39:
vlmfce48a42004-09-14 02:36:39 +00001595#line 593 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001596{
vlmfa67ddc2004-06-03 03:38:44 +00001597 yyval.a_xports = yyvsp[-3].a_xports;
1598 yyval.a_xports->from = yyvsp[-1].tv_str;
1599 yyval.a_xports->from_oid = yyvsp[0].a_oid;
1600 checkmem(yyval.a_xports);
vlm6a02a8a2004-09-08 00:28:11 +00001601 ;
1602 break;}
1603case 40:
vlmfce48a42004-09-14 02:36:39 +00001604#line 602 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001605{
vlmfa67ddc2004-06-03 03:38:44 +00001606 yyval.a_xports = asn1p_xports_new();
1607 checkmem(yyval.a_xports);
1608 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001609 ;
1610 break;}
1611case 41:
vlmfce48a42004-09-14 02:36:39 +00001612#line 607 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001613{
vlmfa67ddc2004-06-03 03:38:44 +00001614 yyval.a_xports = yyvsp[-2].a_xports;
1615 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001616 ;
1617 break;}
1618case 42:
vlmfce48a42004-09-14 02:36:39 +00001619#line 614 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001620{
vlmfa67ddc2004-06-03 03:38:44 +00001621 yyval.a_expr = asn1p_expr_new(yylineno);
1622 checkmem(yyval.a_expr);
1623 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1624 yyval.a_expr->expr_type = A1TC_REFERENCE;
vlm6a02a8a2004-09-08 00:28:11 +00001625 ;
1626 break;}
1627case 43:
vlmfce48a42004-09-14 02:36:39 +00001628#line 620 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001629{
vlmfa67ddc2004-06-03 03:38:44 +00001630 yyval.a_expr = asn1p_expr_new(yylineno);
1631 checkmem(yyval.a_expr);
1632 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1633 yyval.a_expr->expr_type = A1TC_REFERENCE;
vlm6a02a8a2004-09-08 00:28:11 +00001634 ;
1635 break;}
1636case 44:
vlmfce48a42004-09-14 02:36:39 +00001637#line 629 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001638{
vlmfa67ddc2004-06-03 03:38:44 +00001639 yyval.a_xports = yyvsp[-1].a_xports;
vlm6a02a8a2004-09-08 00:28:11 +00001640 ;
1641 break;}
1642case 45:
vlmfce48a42004-09-14 02:36:39 +00001643#line 632 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001644{
vlmfa67ddc2004-06-03 03:38:44 +00001645 yyval.a_xports = 0;
vlm6a02a8a2004-09-08 00:28:11 +00001646 ;
1647 break;}
1648case 46:
vlmfce48a42004-09-14 02:36:39 +00001649#line 635 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001650{
vlmfa67ddc2004-06-03 03:38:44 +00001651 /* Empty EXPORTS clause effectively prohibits export. */
1652 yyval.a_xports = asn1p_xports_new();
1653 checkmem(yyval.a_xports);
vlm6a02a8a2004-09-08 00:28:11 +00001654 ;
1655 break;}
1656case 47:
vlmfce48a42004-09-14 02:36:39 +00001657#line 643 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001658{
vlmfa67ddc2004-06-03 03:38:44 +00001659 yyval.a_xports = asn1p_xports_new();
1660 assert(yyval.a_xports);
1661 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001662 ;
1663 break;}
1664case 48:
vlmfce48a42004-09-14 02:36:39 +00001665#line 648 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001666{
vlmfa67ddc2004-06-03 03:38:44 +00001667 yyval.a_xports = yyvsp[-2].a_xports;
1668 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001669 ;
1670 break;}
1671case 49:
vlmfce48a42004-09-14 02:36:39 +00001672#line 655 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001673{
vlmfa67ddc2004-06-03 03:38:44 +00001674 yyval.a_expr = asn1p_expr_new(yylineno);
1675 checkmem(yyval.a_expr);
1676 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1677 yyval.a_expr->expr_type = A1TC_EXPORTVAR;
vlm6a02a8a2004-09-08 00:28:11 +00001678 ;
1679 break;}
1680case 50:
vlmfce48a42004-09-14 02:36:39 +00001681#line 661 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001682{
vlmfa67ddc2004-06-03 03:38:44 +00001683 yyval.a_expr = asn1p_expr_new(yylineno);
1684 checkmem(yyval.a_expr);
1685 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1686 yyval.a_expr->expr_type = A1TC_EXPORTVAR;
vlm6a02a8a2004-09-08 00:28:11 +00001687 ;
1688 break;}
1689case 51:
vlmfce48a42004-09-14 02:36:39 +00001690#line 671 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001691{
vlmfa67ddc2004-06-03 03:38:44 +00001692 yyval.a_expr = yyvsp[-4].a_expr;
1693 assert(yyval.a_expr->Identifier == 0);
1694 yyval.a_expr->Identifier = yyvsp[-5].tv_str;
1695 yyval.a_expr->meta_type = AMT_VALUESET;
1696 // take care of optValueSetBody
vlm6a02a8a2004-09-08 00:28:11 +00001697 ;
1698 break;}
1699case 52:
vlmfce48a42004-09-14 02:36:39 +00001700#line 681 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001701{
vlmfa67ddc2004-06-03 03:38:44 +00001702 yyval.a_expr = asn1p_expr_new(yylineno);
1703 checkmem(yyval.a_expr);
1704 yyval.a_expr->reference = yyvsp[0].a_ref;
1705 yyval.a_expr->expr_type = A1TC_REFERENCE;
1706 yyval.a_expr->meta_type = AMT_TYPEREF;
vlm6a02a8a2004-09-08 00:28:11 +00001707 ;
1708 break;}
1709case 53:
vlmfce48a42004-09-14 02:36:39 +00001710#line 688 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001711{
vlmfa67ddc2004-06-03 03:38:44 +00001712 yyval.a_expr = asn1p_expr_new(yylineno);
1713 checkmem(yyval.a_expr);
1714 yyval.a_expr->expr_type = yyvsp[0].a_type;
1715 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00001716 ;
1717 break;}
1718case 54:
vlmfce48a42004-09-14 02:36:39 +00001719#line 697 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001720{ ;
1721 break;}
1722case 55:
vlmfce48a42004-09-14 02:36:39 +00001723#line 698 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001724{
1725 ;
1726 break;}
1727case 56:
vlmfce48a42004-09-14 02:36:39 +00001728#line 709 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001729{
1730 ;
1731 break;}
1732case 57:
vlmfce48a42004-09-14 02:36:39 +00001733#line 711 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001734{
1735 ;
1736 break;}
1737case 58:
vlmfce48a42004-09-14 02:36:39 +00001738#line 716 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001739{
1740 ;
1741 break;}
1742case 59:
vlmfce48a42004-09-14 02:36:39 +00001743#line 718 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001744{
1745 ;
1746 break;}
1747case 60:
vlmfce48a42004-09-14 02:36:39 +00001748#line 734 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001749{
vlmfa67ddc2004-06-03 03:38:44 +00001750 yyval.a_expr = asn1p_expr_new(yylineno);
1751 checkmem(yyval.a_expr);
1752 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
1753 yyval.a_expr->tag = yyvsp[-1].a_tag;
1754 yyval.a_expr->expr_type = A1TC_TYPEID;
1755 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00001756 ;
1757 break;}
1758case 61:
vlmfce48a42004-09-14 02:36:39 +00001759#line 742 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001760{
vlmfa67ddc2004-06-03 03:38:44 +00001761 yyval.a_expr = yyvsp[0].a_expr;
vlmfce48a42004-09-14 02:36:39 +00001762 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
vlmfa67ddc2004-06-03 03:38:44 +00001763 assert(yyval.a_expr->expr_type);
1764 assert(yyval.a_expr->meta_type);
vlm6a02a8a2004-09-08 00:28:11 +00001765 ;
1766 break;}
1767case 62:
vlmfce48a42004-09-14 02:36:39 +00001768#line 748 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001769{
vlmfa67ddc2004-06-03 03:38:44 +00001770 yyval.a_expr = yyvsp[0].a_expr;
1771 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
1772 assert(yyval.a_expr->expr_type == A1TC_CLASSDEF);
1773 assert(yyval.a_expr->meta_type == AMT_OBJECT);
vlm6a02a8a2004-09-08 00:28:11 +00001774 ;
1775 break;}
1776case 63:
vlmfce48a42004-09-14 02:36:39 +00001777#line 764 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001778{
vlmfa67ddc2004-06-03 03:38:44 +00001779 yyval.a_expr = yyvsp[0].a_expr;
1780 assert(yyval.a_expr->Identifier == 0);
1781 yyval.a_expr->Identifier = yyvsp[-5].tv_str;
1782 yyval.a_expr->params = yyvsp[-3].a_plist;
1783 yyval.a_expr->meta_type = AMT_PARAMTYPE;
vlm6a02a8a2004-09-08 00:28:11 +00001784 ;
1785 break;}
1786case 64:
vlmfce48a42004-09-14 02:36:39 +00001787#line 774 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001788{
vlmfa67ddc2004-06-03 03:38:44 +00001789 int ret;
1790 yyval.a_plist = asn1p_paramlist_new(yylineno);
1791 checkmem(yyval.a_plist);
1792 ret = asn1p_paramlist_add_param(yyval.a_plist, yyvsp[0].a_parg.governor, yyvsp[0].a_parg.argument);
1793 checkmem(ret == 0);
1794 if(yyvsp[0].a_parg.governor) asn1p_ref_free(yyvsp[0].a_parg.governor);
1795 if(yyvsp[0].a_parg.argument) free(yyvsp[0].a_parg.argument);
vlm6a02a8a2004-09-08 00:28:11 +00001796 ;
1797 break;}
1798case 65:
vlmfce48a42004-09-14 02:36:39 +00001799#line 783 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001800{
vlmfa67ddc2004-06-03 03:38:44 +00001801 int ret;
1802 yyval.a_plist = yyvsp[-2].a_plist;
1803 ret = asn1p_paramlist_add_param(yyval.a_plist, yyvsp[0].a_parg.governor, yyvsp[0].a_parg.argument);
1804 checkmem(ret == 0);
1805 if(yyvsp[0].a_parg.governor) asn1p_ref_free(yyvsp[0].a_parg.governor);
1806 if(yyvsp[0].a_parg.argument) free(yyvsp[0].a_parg.argument);
vlm6a02a8a2004-09-08 00:28:11 +00001807 ;
1808 break;}
1809case 66:
vlmfce48a42004-09-14 02:36:39 +00001810#line 794 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001811{
vlmfa67ddc2004-06-03 03:38:44 +00001812 yyval.a_parg.governor = NULL;
1813 yyval.a_parg.argument = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00001814 ;
1815 break;}
1816case 67:
vlmfce48a42004-09-14 02:36:39 +00001817#line 798 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001818{
vlmfa67ddc2004-06-03 03:38:44 +00001819 int ret;
1820 yyval.a_parg.governor = asn1p_ref_new(yylineno);
1821 ret = asn1p_ref_add_component(yyval.a_parg.governor, yyvsp[-2].tv_str, 0);
1822 checkmem(ret == 0);
1823 yyval.a_parg.argument = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00001824 ;
1825 break;}
1826case 68:
vlmfce48a42004-09-14 02:36:39 +00001827#line 805 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001828{
vlmfa67ddc2004-06-03 03:38:44 +00001829 int ret;
1830 yyval.a_parg.governor = asn1p_ref_new(yylineno);
1831 ret = asn1p_ref_add_component(yyval.a_parg.governor,
1832 ASN_EXPR_TYPE2STR(yyvsp[-2].a_type), 1);
1833 checkmem(ret == 0);
1834 yyval.a_parg.argument = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00001835 ;
1836 break;}
1837case 69:
vlmfce48a42004-09-14 02:36:39 +00001838#line 816 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001839{
vlmfa67ddc2004-06-03 03:38:44 +00001840 yyval.a_expr = asn1p_expr_new(yylineno);
1841 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00001842 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1843 ;
1844 break;}
1845case 70:
vlmfce48a42004-09-14 02:36:39 +00001846#line 821 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001847{
vlmfa67ddc2004-06-03 03:38:44 +00001848 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001849 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1850 ;
1851 break;}
1852case 71:
vlmfce48a42004-09-14 02:36:39 +00001853#line 828 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001854{
vlmfa67ddc2004-06-03 03:38:44 +00001855 yyval.a_expr = yyvsp[0].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001856 ;
1857 break;}
1858case 72:
vlmfce48a42004-09-14 02:36:39 +00001859#line 831 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001860{
vlmfa67ddc2004-06-03 03:38:44 +00001861 yyval.a_expr = asn1p_expr_new(yylineno);
1862 checkmem(yyval.a_expr);
1863 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1864 yyval.a_expr->expr_type = A1TC_REFERENCE;
1865 yyval.a_expr->meta_type = AMT_VALUE;
vlm6a02a8a2004-09-08 00:28:11 +00001866 ;
1867 break;}
1868case 73:
vlmfce48a42004-09-14 02:36:39 +00001869#line 844 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001870{
vlmfa67ddc2004-06-03 03:38:44 +00001871 yyval.a_expr = asn1p_expr_new(yylineno);
1872 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00001873 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1874 ;
1875 break;}
1876case 74:
vlmfce48a42004-09-14 02:36:39 +00001877#line 849 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001878{
vlmfa67ddc2004-06-03 03:38:44 +00001879 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001880 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1881 ;
1882 break;}
1883case 75:
vlmfce48a42004-09-14 02:36:39 +00001884#line 856 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001885{
vlmec8f6812004-08-22 03:19:54 +00001886 yyval.a_expr = yyvsp[-1].a_expr;
1887 assert(yyval.a_expr->Identifier == 0);
vlmfce48a42004-09-14 02:36:39 +00001888 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
vlmec8f6812004-08-22 03:19:54 +00001889 yyval.a_expr->marker = yyvsp[0].a_marker;
vlm6a02a8a2004-09-08 00:28:11 +00001890 ;
1891 break;}
1892case 76:
vlmfce48a42004-09-14 02:36:39 +00001893#line 862 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001894{
vlmec8f6812004-08-22 03:19:54 +00001895 yyval.a_expr = asn1p_expr_new(yylineno);
1896 checkmem(yyval.a_expr);
1897 yyval.a_expr->meta_type = yyvsp[0].a_expr->meta_type;
1898 yyval.a_expr->expr_type = A1TC_COMPONENTS_OF;
vlm6a02a8a2004-09-08 00:28:11 +00001899 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1900 ;
1901 break;}
1902case 77:
vlmfce48a42004-09-14 02:36:39 +00001903#line 869 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001904{
vlmec8f6812004-08-22 03:19:54 +00001905 yyval.a_expr = yyvsp[0].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001906 ;
1907 break;}
1908case 78:
vlmfce48a42004-09-14 02:36:39 +00001909#line 875 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001910{
vlmec8f6812004-08-22 03:19:54 +00001911 yyval.a_expr = asn1p_expr_new(yylineno);
1912 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00001913 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1914 ;
1915 break;}
1916case 79:
vlmfce48a42004-09-14 02:36:39 +00001917#line 880 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001918{
vlmec8f6812004-08-22 03:19:54 +00001919 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001920 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1921 ;
1922 break;}
1923case 80:
vlmfce48a42004-09-14 02:36:39 +00001924#line 887 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001925{
vlmec8f6812004-08-22 03:19:54 +00001926 yyval.a_expr = yyvsp[0].a_expr;
1927 assert(yyval.a_expr->Identifier == 0);
vlmfce48a42004-09-14 02:36:39 +00001928 yyval.a_expr->Identifier = yyvsp[-1].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00001929 ;
1930 break;}
1931case 81:
vlmfce48a42004-09-14 02:36:39 +00001932#line 892 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001933{
vlmec8f6812004-08-22 03:19:54 +00001934 yyval.a_expr = yyvsp[0].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001935 ;
1936 break;}
1937case 82:
vlmfce48a42004-09-14 02:36:39 +00001938#line 898 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001939{
vlmfa67ddc2004-06-03 03:38:44 +00001940 yyval.a_expr = yyvsp[-2].a_expr;
1941 checkmem(yyval.a_expr);
1942 yyval.a_expr->with_syntax = yyvsp[0].a_wsynt;
1943 assert(yyval.a_expr->expr_type == A1TC_CLASSDEF);
1944 assert(yyval.a_expr->meta_type == AMT_OBJECT);
vlm6a02a8a2004-09-08 00:28:11 +00001945 ;
1946 break;}
1947case 83:
vlmfce48a42004-09-14 02:36:39 +00001948#line 908 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001949{ yyval.a_int = 0; ;
1950 break;}
1951case 84:
vlmfce48a42004-09-14 02:36:39 +00001952#line 909 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001953{ yyval.a_int = 1; ;
1954 break;}
1955case 85:
vlmfce48a42004-09-14 02:36:39 +00001956#line 913 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001957{
vlmfa67ddc2004-06-03 03:38:44 +00001958 yyval.a_expr = asn1p_expr_new(yylineno);
1959 checkmem(yyval.a_expr);
1960 yyval.a_expr->expr_type = A1TC_CLASSDEF;
1961 yyval.a_expr->meta_type = AMT_OBJECT;
vlm6a02a8a2004-09-08 00:28:11 +00001962 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1963 ;
1964 break;}
1965case 86:
vlmfce48a42004-09-14 02:36:39 +00001966#line 920 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001967{
vlmfa67ddc2004-06-03 03:38:44 +00001968 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001969 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1970 ;
1971 break;}
1972case 87:
vlmfce48a42004-09-14 02:36:39 +00001973#line 927 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001974{
vlmfa67ddc2004-06-03 03:38:44 +00001975 yyval.a_expr = asn1p_expr_new(yylineno);
1976 checkmem(yyval.a_expr);
1977 yyval.a_expr->Identifier = yyvsp[-1].a_refcomp.name;
1978 yyval.a_expr->expr_type = A1TC_CLASSFIELD;
1979 yyval.a_expr->meta_type = AMT_OBJECTFIELD;
1980 yyval.a_expr->marker = yyvsp[0].a_marker;
vlm6a02a8a2004-09-08 00:28:11 +00001981 ;
1982 break;}
1983case 88:
vlmfce48a42004-09-14 02:36:39 +00001984#line 935 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001985{
vlmec8f6812004-08-22 03:19:54 +00001986 yyval.a_expr = yyvsp[-2].a_expr;
1987 yyval.a_expr->Identifier = yyvsp[-3].a_refcomp.name;
1988 yyval.a_expr->marker = yyvsp[-1].a_marker;
vlmfa67ddc2004-06-03 03:38:44 +00001989 yyval.a_expr->unique = yyvsp[0].a_int;
vlm6a02a8a2004-09-08 00:28:11 +00001990 ;
1991 break;}
1992case 89:
vlmfce48a42004-09-14 02:36:39 +00001993#line 941 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001994{
vlmfa67ddc2004-06-03 03:38:44 +00001995 int ret;
1996 yyval.a_expr = asn1p_expr_new(yylineno);
1997 checkmem(yyval.a_expr);
1998 yyval.a_expr->Identifier = yyvsp[-3].a_refcomp.name;
1999 yyval.a_expr->reference = asn1p_ref_new(yylineno);
2000 checkmem(yyval.a_expr->reference);
2001 ret = asn1p_ref_add_component(yyval.a_expr->reference,
2002 yyvsp[-2].a_refcomp.name, yyvsp[-2].a_refcomp.lex_type);
2003 checkmem(ret == 0);
2004 yyval.a_expr->expr_type = A1TC_CLASSFIELD;
2005 yyval.a_expr->meta_type = AMT_OBJECTFIELD;
2006 yyval.a_expr->marker = yyvsp[-1].a_marker;
2007 yyval.a_expr->unique = yyvsp[0].a_int;
vlm6a02a8a2004-09-08 00:28:11 +00002008 ;
2009 break;}
2010case 90:
vlmfce48a42004-09-14 02:36:39 +00002011#line 959 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002012{ yyval.a_wsynt = 0; ;
2013 break;}
2014case 91:
vlmfce48a42004-09-14 02:36:39 +00002015#line 960 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002016{
vlmfa67ddc2004-06-03 03:38:44 +00002017 yyval.a_wsynt = yyvsp[0].a_wsynt;
vlm6a02a8a2004-09-08 00:28:11 +00002018 ;
2019 break;}
2020case 92:
vlmfce48a42004-09-14 02:36:39 +00002021#line 967 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002022{ asn1p_lexer_hack_enable_with_syntax(); ;
2023 break;}
2024case 93:
vlmfce48a42004-09-14 02:36:39 +00002025#line 969 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002026{
vlmfa67ddc2004-06-03 03:38:44 +00002027 yyval.a_wsynt = yyvsp[-1].a_wsynt;
vlm6a02a8a2004-09-08 00:28:11 +00002028 ;
2029 break;}
2030case 94:
vlmfce48a42004-09-14 02:36:39 +00002031#line 975 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002032{
vlmfa67ddc2004-06-03 03:38:44 +00002033 yyval.a_wsynt = asn1p_wsyntx_new();
2034 TQ_ADD(&(yyval.a_wsynt->chunks), yyvsp[0].a_wchunk, next);
vlm6a02a8a2004-09-08 00:28:11 +00002035 ;
2036 break;}
2037case 95:
vlmfce48a42004-09-14 02:36:39 +00002038#line 979 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002039{
vlmfa67ddc2004-06-03 03:38:44 +00002040 yyval.a_wsynt = yyvsp[-1].a_wsynt;
2041 TQ_ADD(&(yyval.a_wsynt->chunks), yyvsp[0].a_wchunk, next);
vlm6a02a8a2004-09-08 00:28:11 +00002042 ;
2043 break;}
2044case 96:
vlmfce48a42004-09-14 02:36:39 +00002045#line 986 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002046{
vlmfa67ddc2004-06-03 03:38:44 +00002047 yyval.a_wchunk = asn1p_wsyntx_chunk_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002048 ;
2049 break;}
2050case 97:
vlmfce48a42004-09-14 02:36:39 +00002051#line 989 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002052{
vlmfa67ddc2004-06-03 03:38:44 +00002053 asn1p_ref_t *ref;
2054 int ret;
2055 ref = asn1p_ref_new(yylineno);
2056 checkmem(ref);
2057 ret = asn1p_ref_add_component(ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
2058 checkmem(ret == 0);
2059 yyval.a_wchunk = asn1p_wsyntx_chunk_fromref(ref, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002060 ;
2061 break;}
2062case 98:
vlmfce48a42004-09-14 02:36:39 +00002063#line 1001 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002064{
vlm39e5ed72004-09-05 10:40:41 +00002065 yyval.a_expr = asn1p_expr_new(yylineno);
vlm9283dbe2004-08-18 04:59:12 +00002066 checkmem(yyval.a_expr);
2067 yyval.a_expr->Identifier = strdup("...");
2068 checkmem(yyval.a_expr->Identifier);
vlm9283dbe2004-08-18 04:59:12 +00002069 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
2070 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002071 ;
2072 break;}
2073case 99:
vlmfce48a42004-09-14 02:36:39 +00002074#line 1009 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002075{
vlm39e5ed72004-09-05 10:40:41 +00002076 yyval.a_expr = asn1p_expr_new(yylineno);
vlm9283dbe2004-08-18 04:59:12 +00002077 checkmem(yyval.a_expr);
2078 yyval.a_expr->Identifier = strdup("...");
vlm9283dbe2004-08-18 04:59:12 +00002079 checkmem(yyval.a_expr->Identifier);
vlm5f0128b2004-08-20 13:25:29 +00002080 yyval.a_expr->value = yyvsp[0].a_value;
vlm9283dbe2004-08-18 04:59:12 +00002081 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
2082 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002083 ;
2084 break;}
2085case 100:
vlmfce48a42004-09-14 02:36:39 +00002086#line 1018 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002087{
vlm39e5ed72004-09-05 10:40:41 +00002088 yyval.a_expr = asn1p_expr_new(yylineno);
vlm5f0128b2004-08-20 13:25:29 +00002089 checkmem(yyval.a_expr);
2090 yyval.a_expr->Identifier = strdup("...");
2091 yyval.a_expr->value = yyvsp[0].a_value;
2092 checkmem(yyval.a_expr->Identifier);
2093 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
2094 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002095 ;
2096 break;}
2097case 101:
vlmfce48a42004-09-14 02:36:39 +00002098#line 1030 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002099{
vlmec8f6812004-08-22 03:19:54 +00002100 yyval.a_expr = yyvsp[-1].a_expr;
vlmfce48a42004-09-14 02:36:39 +00002101 yyval.a_expr->tag = yyvsp[-2].a_tag;
vlmec8f6812004-08-22 03:19:54 +00002102 /*
2103 * Outer constraint for SEQUENCE OF and SET OF applies
2104 * to the inner type.
2105 */
2106 if(yyval.a_expr->expr_type == ASN_CONSTR_SEQUENCE_OF
2107 || yyval.a_expr->expr_type == ASN_CONSTR_SET_OF) {
2108 assert(!TQ_FIRST(&(yyval.a_expr->members))->constraints);
2109 TQ_FIRST(&(yyval.a_expr->members))->constraints = yyvsp[0].a_constr;
2110 } else {
2111 if(yyval.a_expr->constraints) {
vlmfce48a42004-09-14 02:36:39 +00002112 assert(!yyvsp[-1].a_expr);
vlmec8f6812004-08-22 03:19:54 +00002113 } else {
2114 yyval.a_expr->constraints = yyvsp[0].a_constr;
2115 }
2116 }
vlm6a02a8a2004-09-08 00:28:11 +00002117 ;
2118 break;}
2119case 102:
vlmfce48a42004-09-14 02:36:39 +00002120#line 1052 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002121{
vlm5f0128b2004-08-20 13:25:29 +00002122 yyval.a_expr = yyvsp[0].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00002123 ;
2124 break;}
2125case 103:
vlmfce48a42004-09-14 02:36:39 +00002126#line 1055 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002127{
vlmfa67ddc2004-06-03 03:38:44 +00002128 yyval.a_expr = asn1p_expr_new(yylineno);
2129 checkmem(yyval.a_expr);
2130 yyval.a_expr->expr_type = yyvsp[0].a_type;
2131 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002132 ;
2133 break;}
2134case 104:
vlmfce48a42004-09-14 02:36:39 +00002135#line 1061 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002136{
vlmec8f6812004-08-22 03:19:54 +00002137 yyval.a_expr = yyvsp[-1].a_expr;
2138 assert(yyval.a_expr->expr_type == A1TC_INVALID);
2139 yyval.a_expr->expr_type = ASN_CONSTR_CHOICE;
2140 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002141 ;
2142 break;}
2143case 105:
vlmfce48a42004-09-14 02:36:39 +00002144#line 1067 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002145{
vlmec8f6812004-08-22 03:19:54 +00002146 yyval.a_expr = yyvsp[-1].a_expr;
2147 assert(yyval.a_expr->expr_type == A1TC_INVALID);
2148 yyval.a_expr->expr_type = ASN_CONSTR_SEQUENCE;
2149 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002150 ;
2151 break;}
2152case 106:
vlmfce48a42004-09-14 02:36:39 +00002153#line 1073 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002154{
vlmec8f6812004-08-22 03:19:54 +00002155 yyval.a_expr = yyvsp[-1].a_expr;
2156 assert(yyval.a_expr->expr_type == A1TC_INVALID);
2157 yyval.a_expr->expr_type = ASN_CONSTR_SET;
2158 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002159 ;
2160 break;}
2161case 107:
vlmfce48a42004-09-14 02:36:39 +00002162#line 1079 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002163{
vlm39e5ed72004-09-05 10:40:41 +00002164 yyval.a_expr = asn1p_expr_new(yylineno);
vlmec8f6812004-08-22 03:19:54 +00002165 checkmem(yyval.a_expr);
vlma2374a02004-09-14 02:44:07 +00002166 yyval.a_expr->constraints = yyvsp[-3].a_constr;
vlmec8f6812004-08-22 03:19:54 +00002167 yyval.a_expr->expr_type = ASN_CONSTR_SEQUENCE_OF;
2168 yyval.a_expr->meta_type = AMT_TYPE;
vlma2374a02004-09-14 02:44:07 +00002169 yyvsp[0].a_expr->tag = yyvsp[-1].a_tag;
vlm6a02a8a2004-09-08 00:28:11 +00002170 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
2171 ;
2172 break;}
2173case 108:
vlma2374a02004-09-14 02:44:07 +00002174#line 1088 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002175{
vlm39e5ed72004-09-05 10:40:41 +00002176 yyval.a_expr = asn1p_expr_new(yylineno);
vlmec8f6812004-08-22 03:19:54 +00002177 checkmem(yyval.a_expr);
vlma2374a02004-09-14 02:44:07 +00002178 yyval.a_expr->constraints = yyvsp[-3].a_constr;
vlmec8f6812004-08-22 03:19:54 +00002179 yyval.a_expr->expr_type = ASN_CONSTR_SET_OF;
2180 yyval.a_expr->meta_type = AMT_TYPE;
vlma2374a02004-09-14 02:44:07 +00002181 yyvsp[0].a_expr->tag = yyvsp[-1].a_tag;
vlm6a02a8a2004-09-08 00:28:11 +00002182 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
2183 ;
2184 break;}
2185case 109:
vlma2374a02004-09-14 02:44:07 +00002186#line 1097 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002187{
vlm39e5ed72004-09-05 10:40:41 +00002188 yyval.a_expr = asn1p_expr_new(yylineno);
vlmec8f6812004-08-22 03:19:54 +00002189 checkmem(yyval.a_expr);
vlm044f7442004-09-04 04:49:21 +00002190 yyval.a_expr->expr_type = ASN_TYPE_ANY;
vlmec8f6812004-08-22 03:19:54 +00002191 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002192 ;
2193 break;}
2194case 110:
vlma2374a02004-09-14 02:44:07 +00002195#line 1103 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002196{
vlmec8f6812004-08-22 03:19:54 +00002197 int ret;
vlm39e5ed72004-09-05 10:40:41 +00002198 yyval.a_expr = asn1p_expr_new(yylineno);
vlmec8f6812004-08-22 03:19:54 +00002199 checkmem(yyval.a_expr);
2200 yyval.a_expr->reference = asn1p_ref_new(yylineno);
2201 ret = asn1p_ref_add_component(yyval.a_expr->reference,
2202 yyvsp[0].tv_str, RLT_lowercase);
2203 checkmem(ret == 0);
vlm044f7442004-09-04 04:49:21 +00002204 yyval.a_expr->expr_type = ASN_TYPE_ANY;
vlmec8f6812004-08-22 03:19:54 +00002205 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002206 ;
2207 break;}
2208case 111:
vlma2374a02004-09-14 02:44:07 +00002209#line 1117 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002210{
vlmfa67ddc2004-06-03 03:38:44 +00002211 int ret;
2212 yyval.a_expr = yyvsp[-1].a_expr;
2213 assert(yyval.a_expr->expr_type == 0);
2214 assert(yyval.a_expr->meta_type == 0);
2215 assert(yyval.a_expr->reference == 0);
2216 yyval.a_expr->reference = asn1p_ref_new(yylineno);
2217 checkmem(yyval.a_expr->reference);
2218 ret = asn1p_ref_add_component(yyval.a_expr->reference, yyvsp[-3].tv_str, RLT_UNKNOWN);
2219 checkmem(ret == 0);
2220 free(yyvsp[-3].tv_str);
2221 yyval.a_expr->expr_type = A1TC_PARAMETRIZED;
2222 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002223 ;
2224 break;}
2225case 112:
vlma2374a02004-09-14 02:44:07 +00002226#line 1141 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002227{
vlmfa67ddc2004-06-03 03:38:44 +00002228 yyval.a_expr = asn1p_expr_new(yylineno);
2229 checkmem(yyval.a_expr);
2230 yyval.a_expr->reference = yyvsp[0].a_ref;
2231 yyval.a_expr->expr_type = A1TC_REFERENCE;
2232 yyval.a_expr->meta_type = AMT_TYPEREF;
vlm6a02a8a2004-09-08 00:28:11 +00002233 ;
2234 break;}
2235case 113:
vlma2374a02004-09-14 02:44:07 +00002236#line 1148 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002237{
vlmfa67ddc2004-06-03 03:38:44 +00002238 yyval.a_expr = asn1p_expr_new(yylineno);
2239 checkmem(yyval.a_expr);
2240 yyval.a_expr->reference = yyvsp[0].a_ref;
2241 yyval.a_expr->expr_type = A1TC_INSTANCE;
2242 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002243 ;
2244 break;}
2245case 114:
vlma2374a02004-09-14 02:44:07 +00002246#line 1163 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002247{
vlmfa67ddc2004-06-03 03:38:44 +00002248 int ret;
2249 yyval.a_ref = asn1p_ref_new(yylineno);
2250 checkmem(yyval.a_ref);
2251 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN);
2252 checkmem(ret == 0);
2253 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002254 ;
2255 break;}
2256case 115:
vlma2374a02004-09-14 02:44:07 +00002257#line 1171 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002258{
vlmfa67ddc2004-06-03 03:38:44 +00002259 int ret;
2260 yyval.a_ref = asn1p_ref_new(yylineno);
2261 checkmem(yyval.a_ref);
2262 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2263 checkmem(ret == 0);
2264 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN);
2265 checkmem(ret == 0);
2266 free(yyvsp[-2].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002267 ;
2268 break;}
2269case 116:
vlma2374a02004-09-14 02:44:07 +00002270#line 1181 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002271{
vlmfa67ddc2004-06-03 03:38:44 +00002272 int ret;
2273 yyval.a_ref = asn1p_ref_new(yylineno);
2274 checkmem(yyval.a_ref);
2275 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2276 checkmem(ret == 0);
vlmc94e28f2004-09-15 11:59:51 +00002277 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN);
vlmfa67ddc2004-06-03 03:38:44 +00002278 checkmem(ret == 0);
2279 free(yyvsp[-2].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002280 ;
2281 break;}
2282case 117:
vlma2374a02004-09-14 02:44:07 +00002283#line 1191 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002284{
vlmfa67ddc2004-06-03 03:38:44 +00002285 int ret;
2286 yyval.a_ref = asn1p_ref_new(yylineno);
2287 checkmem(yyval.a_ref);
vlmc94e28f2004-09-15 11:59:51 +00002288 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2289 checkmem(ret == 0);
2290 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_lowercase);
2291 checkmem(ret == 0);
2292 free(yyvsp[-2].tv_str);
2293 ;
2294 break;}
2295case 118:
2296#line 1201 "asn1p_y.y"
2297{
2298 int ret;
2299 yyval.a_ref = asn1p_ref_new(yylineno);
2300 checkmem(yyval.a_ref);
vlmfa67ddc2004-06-03 03:38:44 +00002301 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_CAPITALS);
2302 free(yyvsp[0].tv_str);
2303 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002304 ;
2305 break;}
vlmc94e28f2004-09-15 11:59:51 +00002306case 119:
2307#line 1209 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002308{
vlmfa67ddc2004-06-03 03:38:44 +00002309 int ret;
2310 yyval.a_ref = yyvsp[0].a_ref;
2311 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_CAPITALS);
2312 free(yyvsp[-2].tv_str);
2313 checkmem(ret == 0);
2314 /*
2315 * Move the last element infront.
2316 */
2317 {
2318 struct asn1p_ref_component_s tmp_comp;
2319 tmp_comp = yyval.a_ref->components[yyval.a_ref->comp_count-1];
2320 memmove(&yyval.a_ref->components[1],
2321 &yyval.a_ref->components[0],
2322 sizeof(yyval.a_ref->components[0])
2323 * (yyval.a_ref->comp_count - 1));
2324 yyval.a_ref->components[0] = tmp_comp;
2325 }
vlm6a02a8a2004-09-08 00:28:11 +00002326 ;
2327 break;}
vlmc94e28f2004-09-15 11:59:51 +00002328case 120:
2329#line 1231 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002330{
vlmfa67ddc2004-06-03 03:38:44 +00002331 int ret;
2332 yyval.a_ref = asn1p_ref_new(yylineno);
2333 checkmem(yyval.a_ref);
2334 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
2335 free(yyvsp[0].a_refcomp.name);
2336 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002337 ;
2338 break;}
vlmc94e28f2004-09-15 11:59:51 +00002339case 121:
2340#line 1239 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002341{
vlmfa67ddc2004-06-03 03:38:44 +00002342 int ret;
2343 yyval.a_ref = yyvsp[-2].a_ref;
2344 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
2345 free(yyvsp[0].a_refcomp.name);
2346 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002347 ;
2348 break;}
vlmc94e28f2004-09-15 11:59:51 +00002349case 124:
2350#line 1253 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002351{
vlmfa67ddc2004-06-03 03:38:44 +00002352 yyval.a_refcomp.lex_type = RLT_AmpUppercase;
2353 yyval.a_refcomp.name = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00002354 ;
2355 break;}
vlmc94e28f2004-09-15 11:59:51 +00002356case 125:
2357#line 1258 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002358{
vlmfa67ddc2004-06-03 03:38:44 +00002359 yyval.a_refcomp.lex_type = RLT_Amplowercase;
2360 yyval.a_refcomp.name = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00002361 ;
2362 break;}
vlmc94e28f2004-09-15 11:59:51 +00002363case 126:
2364#line 1271 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002365{
vlmfa67ddc2004-06-03 03:38:44 +00002366 yyval.a_expr = yyvsp[-2].a_expr;
2367 assert(yyval.a_expr->Identifier == NULL);
2368 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
2369 yyval.a_expr->meta_type = AMT_VALUE;
2370 yyval.a_expr->value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002371 ;
2372 break;}
vlmc94e28f2004-09-15 11:59:51 +00002373case 127:
2374#line 1281 "asn1p_y.y"
2375{
2376 yyval.a_value = asn1p_value_fromint(0);
2377 checkmem(yyval.a_value);
2378 yyval.a_value->type = ATV_CHOICE_IDENTIFIER;
2379 yyval.a_value->value.choice_identifier.identifier = yyvsp[-2].tv_str;
2380 yyval.a_value->value.choice_identifier.value = yyvsp[0].a_value;
2381 ;
2382 break;}
2383case 128:
2384#line 1288 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002385{ asn1p_lexer_hack_push_opaque_state(); ;
2386 break;}
vlmc94e28f2004-09-15 11:59:51 +00002387case 129:
2388#line 1288 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002389{
vlmfa67ddc2004-06-03 03:38:44 +00002390 yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
2391 checkmem(yyval.a_value);
2392 yyval.a_value->type = ATV_UNPARSED;
vlm6a02a8a2004-09-08 00:28:11 +00002393 ;
2394 break;}
vlmc94e28f2004-09-15 11:59:51 +00002395case 130:
2396#line 1293 "asn1p_y.y"
2397{
2398 yyval.a_value = asn1p_value_fromint(0);
2399 checkmem(yyval.a_value);
2400 yyval.a_value->type = ATV_NULL;
2401 ;
2402 break;}
2403case 131:
2404#line 1298 "asn1p_y.y"
2405{
2406 yyval.a_value = asn1p_value_fromint(0);
2407 checkmem(yyval.a_value);
2408 yyval.a_value->type = ATV_FALSE;
2409 ;
2410 break;}
2411case 132:
2412#line 1303 "asn1p_y.y"
2413{
2414 yyval.a_value = asn1p_value_fromint(0);
2415 checkmem(yyval.a_value);
2416 yyval.a_value->type = ATV_TRUE;
2417 ;
2418 break;}
2419case 133:
2420#line 1308 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002421{
vlmfa67ddc2004-06-03 03:38:44 +00002422 yyval.a_value = _convert_bitstring2binary(yyvsp[0].tv_str, 'B');
2423 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00002424 ;
2425 break;}
vlmc94e28f2004-09-15 11:59:51 +00002426case 134:
2427#line 1312 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002428{
vlmfa67ddc2004-06-03 03:38:44 +00002429 yyval.a_value = _convert_bitstring2binary(yyvsp[0].tv_str, 'H');
2430 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00002431 ;
2432 break;}
vlmc94e28f2004-09-15 11:59:51 +00002433case 135:
2434#line 1316 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002435{
vlmfa67ddc2004-06-03 03:38:44 +00002436 yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
2437 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00002438 ;
2439 break;}
vlmc94e28f2004-09-15 11:59:51 +00002440case 136:
2441#line 1320 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002442{
vlmfa67ddc2004-06-03 03:38:44 +00002443 yyval.a_value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002444 ;
2445 break;}
vlmc94e28f2004-09-15 11:59:51 +00002446case 137:
2447#line 1323 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002448{
vlm5f0128b2004-08-20 13:25:29 +00002449 yyval.a_value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002450 ;
2451 break;}
vlmc94e28f2004-09-15 11:59:51 +00002452case 138:
2453#line 1329 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002454{
vlmfa67ddc2004-06-03 03:38:44 +00002455 asn1p_ref_t *ref;
2456 int ret;
2457 ref = asn1p_ref_new(yylineno);
2458 checkmem(ref);
2459 ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
2460 checkmem(ret == 0);
2461 yyval.a_value = asn1p_value_fromref(ref, 0);
2462 checkmem(yyval.a_value);
2463 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002464 ;
2465 break;}
vlmc94e28f2004-09-15 11:59:51 +00002466case 139:
2467#line 1340 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002468{
vlmfa67ddc2004-06-03 03:38:44 +00002469 asn1p_ref_t *ref;
2470 int ret;
2471 ref = asn1p_ref_new(yylineno);
2472 checkmem(ref);
2473 ret = asn1p_ref_add_component(ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2474 checkmem(ret == 0);
2475 ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
2476 checkmem(ret == 0);
2477 yyval.a_value = asn1p_value_fromref(ref, 0);
2478 checkmem(yyval.a_value);
2479 free(yyvsp[-2].tv_str);
2480 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002481 ;
2482 break;}
vlmc94e28f2004-09-15 11:59:51 +00002483case 140:
2484#line 1357 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002485{
vlmfa67ddc2004-06-03 03:38:44 +00002486 yyval.tv_opaque.len = yyvsp[0].tv_opaque.len + 2;
2487 yyval.tv_opaque.buf = malloc(yyval.tv_opaque.len + 1);
2488 checkmem(yyval.tv_opaque.buf);
2489 yyval.tv_opaque.buf[0] = '{';
2490 yyval.tv_opaque.buf[1] = ' ';
2491 memcpy(yyval.tv_opaque.buf + 2, yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len);
2492 yyval.tv_opaque.buf[yyval.tv_opaque.len] = '\0';
2493 free(yyvsp[0].tv_opaque.buf);
vlm6a02a8a2004-09-08 00:28:11 +00002494 ;
2495 break;}
vlmc94e28f2004-09-15 11:59:51 +00002496case 141:
2497#line 1367 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002498{
vlmfa67ddc2004-06-03 03:38:44 +00002499 int newsize = yyvsp[-1].tv_opaque.len + yyvsp[0].tv_opaque.len;
2500 char *p = malloc(newsize + 1);
2501 checkmem(p);
2502 memcpy(p , yyvsp[-1].tv_opaque.buf, yyvsp[-1].tv_opaque.len);
2503 memcpy(p + yyvsp[-1].tv_opaque.len, yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len);
2504 p[newsize] = '\0';
2505 free(yyvsp[-1].tv_opaque.buf);
2506 free(yyvsp[0].tv_opaque.buf);
2507 yyval.tv_opaque.buf = p;
2508 yyval.tv_opaque.len = newsize;
vlm6a02a8a2004-09-08 00:28:11 +00002509 ;
2510 break;}
vlmc94e28f2004-09-15 11:59:51 +00002511case 142:
2512#line 1382 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002513{ yyval.a_type = ASN_BASIC_BOOLEAN; ;
2514 break;}
vlmc94e28f2004-09-15 11:59:51 +00002515case 143:
2516#line 1383 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002517{ yyval.a_type = ASN_BASIC_NULL; ;
2518 break;}
vlmc94e28f2004-09-15 11:59:51 +00002519case 144:
2520#line 1384 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002521{ yyval.a_type = ASN_BASIC_REAL; ;
2522 break;}
vlmc94e28f2004-09-15 11:59:51 +00002523case 145:
2524#line 1385 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002525{ yyval.a_type = yyvsp[0].a_type; ;
2526 break;}
vlmc94e28f2004-09-15 11:59:51 +00002527case 146:
2528#line 1386 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002529{ yyval.a_type = ASN_BASIC_OCTET_STRING; ;
2530 break;}
vlmc94e28f2004-09-15 11:59:51 +00002531case 147:
2532#line 1387 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002533{ yyval.a_type = ASN_BASIC_OBJECT_IDENTIFIER; ;
2534 break;}
vlmc94e28f2004-09-15 11:59:51 +00002535case 148:
2536#line 1388 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002537{ yyval.a_type = ASN_BASIC_RELATIVE_OID; ;
2538 break;}
vlmc94e28f2004-09-15 11:59:51 +00002539case 149:
2540#line 1389 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002541{ yyval.a_type = ASN_BASIC_EXTERNAL; ;
2542 break;}
vlmc94e28f2004-09-15 11:59:51 +00002543case 150:
2544#line 1390 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002545{ yyval.a_type = ASN_BASIC_EMBEDDED_PDV; ;
2546 break;}
vlmc94e28f2004-09-15 11:59:51 +00002547case 151:
2548#line 1391 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002549{ yyval.a_type = ASN_BASIC_CHARACTER_STRING; ;
2550 break;}
vlmc94e28f2004-09-15 11:59:51 +00002551case 152:
2552#line 1392 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002553{ yyval.a_type = ASN_BASIC_UTCTime; ;
2554 break;}
vlmc94e28f2004-09-15 11:59:51 +00002555case 153:
2556#line 1393 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002557{ yyval.a_type = ASN_BASIC_GeneralizedTime; ;
2558 break;}
vlmc94e28f2004-09-15 11:59:51 +00002559case 154:
2560#line 1400 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002561{ yyval.a_type = ASN_BASIC_INTEGER; ;
2562 break;}
vlmc94e28f2004-09-15 11:59:51 +00002563case 155:
2564#line 1401 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002565{ yyval.a_type = ASN_BASIC_ENUMERATED; ;
2566 break;}
vlmc94e28f2004-09-15 11:59:51 +00002567case 156:
2568#line 1402 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002569{ yyval.a_type = ASN_BASIC_BIT_STRING; ;
2570 break;}
vlmc94e28f2004-09-15 11:59:51 +00002571case 157:
2572#line 1406 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002573{
vlm39e5ed72004-09-05 10:40:41 +00002574 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00002575 checkmem(yyval.a_expr);
2576 yyval.a_expr->expr_type = yyvsp[0].a_type;
2577 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002578 ;
2579 break;}
vlmc94e28f2004-09-15 11:59:51 +00002580case 158:
2581#line 1412 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002582{
vlmfa67ddc2004-06-03 03:38:44 +00002583 if(yyvsp[0].a_expr) {
2584 yyval.a_expr = yyvsp[0].a_expr;
2585 } else {
vlm39e5ed72004-09-05 10:40:41 +00002586 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00002587 checkmem(yyval.a_expr);
2588 }
2589 yyval.a_expr->expr_type = yyvsp[-1].a_type;
2590 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002591 ;
2592 break;}
vlmc94e28f2004-09-15 11:59:51 +00002593case 159:
2594#line 1425 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002595{ yyval.a_type = ASN_STRING_BMPString; ;
2596 break;}
vlmc94e28f2004-09-15 11:59:51 +00002597case 160:
2598#line 1426 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002599{
vlmfa67ddc2004-06-03 03:38:44 +00002600 yyval.a_type = ASN_STRING_GeneralString;
vlmc94e28f2004-09-15 11:59:51 +00002601 fprintf(stderr, "WARNING: GeneralString is not fully supported\n");
vlm6a02a8a2004-09-08 00:28:11 +00002602 ;
2603 break;}
vlm6a02a8a2004-09-08 00:28:11 +00002604case 161:
vlmc94e28f2004-09-15 11:59:51 +00002605#line 1430 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002606{
vlmc94e28f2004-09-15 11:59:51 +00002607 yyval.a_type = ASN_STRING_GraphicString;
2608 fprintf(stderr, "WARNING: GraphicString is not fully supported\n");
vlm6a02a8a2004-09-08 00:28:11 +00002609 ;
2610 break;}
2611case 162:
vlmc94e28f2004-09-15 11:59:51 +00002612#line 1434 "asn1p_y.y"
2613{ yyval.a_type = ASN_STRING_IA5String; ;
vlm6a02a8a2004-09-08 00:28:11 +00002614 break;}
2615case 163:
vlmc94e28f2004-09-15 11:59:51 +00002616#line 1435 "asn1p_y.y"
2617{ yyval.a_type = ASN_STRING_ISO646String; ;
vlm6a02a8a2004-09-08 00:28:11 +00002618 break;}
2619case 164:
vlmc94e28f2004-09-15 11:59:51 +00002620#line 1436 "asn1p_y.y"
2621{ yyval.a_type = ASN_STRING_NumericString; ;
vlm6a02a8a2004-09-08 00:28:11 +00002622 break;}
2623case 165:
vlmc94e28f2004-09-15 11:59:51 +00002624#line 1437 "asn1p_y.y"
2625{ yyval.a_type = ASN_STRING_PrintableString; ;
vlm6a02a8a2004-09-08 00:28:11 +00002626 break;}
2627case 166:
vlmc94e28f2004-09-15 11:59:51 +00002628#line 1438 "asn1p_y.y"
2629{
2630 yyval.a_type = ASN_STRING_T61String;
2631 fprintf(stderr, "WARNING: T61String is not fully supported\n");
2632 ;
vlm6a02a8a2004-09-08 00:28:11 +00002633 break;}
2634case 167:
vlmc94e28f2004-09-15 11:59:51 +00002635#line 1442 "asn1p_y.y"
2636{ yyval.a_type = ASN_STRING_TeletexString; ;
2637 break;}
2638case 168:
2639#line 1443 "asn1p_y.y"
2640{ yyval.a_type = ASN_STRING_UniversalString; ;
2641 break;}
2642case 169:
2643#line 1444 "asn1p_y.y"
2644{ yyval.a_type = ASN_STRING_UTF8String; ;
2645 break;}
2646case 170:
2647#line 1445 "asn1p_y.y"
2648{
2649 yyval.a_type = ASN_STRING_VideotexString;
2650 fprintf(stderr, "WARNING: VideotexString is not fully supported\n");
2651 ;
2652 break;}
2653case 171:
2654#line 1449 "asn1p_y.y"
2655{ yyval.a_type = ASN_STRING_VisibleString; ;
2656 break;}
2657case 172:
2658#line 1450 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002659{ yyval.a_type = ASN_STRING_ObjectDescriptor; ;
2660 break;}
vlmc94e28f2004-09-15 11:59:51 +00002661case 178:
2662#line 1462 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002663{ yyval.a_constr = 0; ;
2664 break;}
vlmc94e28f2004-09-15 11:59:51 +00002665case 179:
2666#line 1463 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002667{
vlm39e5ed72004-09-05 10:40:41 +00002668 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002669 ;
2670 break;}
vlmc94e28f2004-09-15 11:59:51 +00002671case 180:
2672#line 1469 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002673{
vlm39e5ed72004-09-05 10:40:41 +00002674 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_SET, yyvsp[0].a_constr, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002675 ;
2676 break;}
vlmc94e28f2004-09-15 11:59:51 +00002677case 181:
2678#line 1472 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002679{
vlmfa67ddc2004-06-03 03:38:44 +00002680 /*
2681 * This is a special case, for compatibility purposes.
vlm9283dbe2004-08-18 04:59:12 +00002682 * It goes without parentheses.
vlmfa67ddc2004-06-03 03:38:44 +00002683 */
vlm5f0128b2004-08-20 13:25:29 +00002684 CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_SIZE, yyvsp[-1].a_constr, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002685 ;
2686 break;}
vlmc94e28f2004-09-15 11:59:51 +00002687case 182:
2688#line 1482 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002689{
vlmfa67ddc2004-06-03 03:38:44 +00002690 yyval.a_constr = yyvsp[-1].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002691 ;
2692 break;}
vlmc94e28f2004-09-15 11:59:51 +00002693case 183:
2694#line 1485 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002695{
vlm9283dbe2004-08-18 04:59:12 +00002696 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_SET, yyvsp[-3].a_constr, yyvsp[-1].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002697 ;
2698 break;}
vlmc94e28f2004-09-15 11:59:51 +00002699case 184:
2700#line 1491 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002701{
vlmfa67ddc2004-06-03 03:38:44 +00002702 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002703 ;
2704 break;}
vlmc94e28f2004-09-15 11:59:51 +00002705case 185:
2706#line 1494 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002707{
vlmfa67ddc2004-06-03 03:38:44 +00002708 asn1p_constraint_t *ct;
2709 ct = asn1p_constraint_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00002710 ct->type = ACT_EL_EXT;
2711 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-2].a_constr, ct);
vlm6a02a8a2004-09-08 00:28:11 +00002712 ;
2713 break;}
vlmc94e28f2004-09-15 11:59:51 +00002714case 186:
2715#line 1500 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002716{
vlmfa67ddc2004-06-03 03:38:44 +00002717 asn1p_constraint_t *ct;
2718 ct = asn1p_constraint_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00002719 ct->type = ACT_EL_EXT;
2720 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-4].a_constr, ct);
vlm6f5eb0b2004-08-13 12:35:09 +00002721 ct = yyval.a_constr;
2722 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, ct, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002723 ;
2724 break;}
vlmc94e28f2004-09-15 11:59:51 +00002725case 187:
2726#line 1511 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002727{
vlm9283dbe2004-08-18 04:59:12 +00002728 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002729 ;
2730 break;}
vlmc94e28f2004-09-15 11:59:51 +00002731case 188:
2732#line 1514 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002733{
vlmfa67ddc2004-06-03 03:38:44 +00002734 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_UNI, yyvsp[-2].a_constr, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002735 ;
2736 break;}
vlmc94e28f2004-09-15 11:59:51 +00002737case 189:
2738#line 1517 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002739{
vlmfa67ddc2004-06-03 03:38:44 +00002740 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_INT, yyvsp[-2].a_constr, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002741 ;
2742 break;}
vlmc94e28f2004-09-15 11:59:51 +00002743case 190:
2744#line 1520 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002745{
vlmfa67ddc2004-06-03 03:38:44 +00002746 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_EXC, yyvsp[-2].a_constr, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002747 ;
2748 break;}
vlmc94e28f2004-09-15 11:59:51 +00002749case 191:
2750#line 1526 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002751{
vlmfa67ddc2004-06-03 03:38:44 +00002752 int ret;
2753 yyval.a_constr = asn1p_constraint_new(yylineno);
2754 checkmem(yyval.a_constr);
2755 yyval.a_constr->type = yyvsp[-3].a_ctype;
2756 ret = asn1p_constraint_insert(yyval.a_constr, yyvsp[-1].a_constr);
2757 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002758 ;
2759 break;}
vlmc94e28f2004-09-15 11:59:51 +00002760case 192:
2761#line 1534 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002762{
vlm9283dbe2004-08-18 04:59:12 +00002763 int ret;
2764 yyval.a_constr = asn1p_constraint_new(yylineno);
2765 checkmem(yyval.a_constr);
2766 yyval.a_constr->type = ACT_CA_SET;
2767 ret = asn1p_constraint_insert(yyval.a_constr, yyvsp[-1].a_constr);
2768 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002769 ;
2770 break;}
vlmc94e28f2004-09-15 11:59:51 +00002771case 193:
2772#line 1542 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002773{
vlm9283dbe2004-08-18 04:59:12 +00002774 yyval.a_constr = asn1p_constraint_new(yylineno);
2775 checkmem(yyval.a_constr);
2776 yyval.a_constr->type = ACT_EL_VALUE;
2777 yyval.a_constr->value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002778 ;
2779 break;}
vlm6a02a8a2004-09-08 00:28:11 +00002780case 194:
vlmc94e28f2004-09-15 11:59:51 +00002781#line 1548 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002782{
vlmc94e28f2004-09-15 11:59:51 +00002783 yyval.a_constr = asn1p_constraint_new(yylineno);
2784 checkmem(yyval.a_constr);
2785 yyval.a_constr->type = yyvsp[-1].a_ctype;
2786 yyval.a_constr->range_start = yyvsp[-2].a_value;
2787 yyval.a_constr->range_stop = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002788 ;
2789 break;}
2790case 195:
vlmc94e28f2004-09-15 11:59:51 +00002791#line 1555 "asn1p_y.y"
2792{
2793 yyval.a_constr = asn1p_constraint_new(yylineno);
2794 checkmem(yyval.a_constr);
2795 yyval.a_constr->type = yyvsp[-1].a_ctype;
2796 yyval.a_constr->range_start = asn1p_value_fromint(-123);
2797 yyval.a_constr->range_stop = yyvsp[0].a_value;
2798 yyval.a_constr->range_start->type = ATV_MIN;
2799 ;
vlm6a02a8a2004-09-08 00:28:11 +00002800 break;}
2801case 196:
vlmc94e28f2004-09-15 11:59:51 +00002802#line 1563 "asn1p_y.y"
2803{
2804 yyval.a_constr = asn1p_constraint_new(yylineno);
2805 checkmem(yyval.a_constr);
2806 yyval.a_constr->type = yyvsp[-1].a_ctype;
2807 yyval.a_constr->range_start = yyvsp[-2].a_value;
2808 yyval.a_constr->range_stop = asn1p_value_fromint(321);
2809 yyval.a_constr->range_stop->type = ATV_MAX;
2810 ;
vlm6a02a8a2004-09-08 00:28:11 +00002811 break;}
2812case 197:
vlmc94e28f2004-09-15 11:59:51 +00002813#line 1571 "asn1p_y.y"
2814{
2815 yyval.a_constr = asn1p_constraint_new(yylineno);
2816 checkmem(yyval.a_constr);
2817 yyval.a_constr->type = yyvsp[-1].a_ctype;
2818 yyval.a_constr->range_start = asn1p_value_fromint(-123);
2819 yyval.a_constr->range_stop = asn1p_value_fromint(321);
2820 yyval.a_constr->range_start->type = ATV_MIN;
2821 yyval.a_constr->range_stop->type = ATV_MAX;
2822 ;
vlm6a02a8a2004-09-08 00:28:11 +00002823 break;}
2824case 198:
vlmc94e28f2004-09-15 11:59:51 +00002825#line 1580 "asn1p_y.y"
2826{
2827 yyval.a_constr = yyvsp[0].a_constr;
2828 ;
vlm6a02a8a2004-09-08 00:28:11 +00002829 break;}
2830case 199:
vlmc94e28f2004-09-15 11:59:51 +00002831#line 1583 "asn1p_y.y"
2832{
2833 yyval.a_constr = yyvsp[0].a_constr;
2834 ;
2835 break;}
2836case 200:
2837#line 1589 "asn1p_y.y"
2838{ yyval.a_ctype = ACT_EL_RANGE; ;
2839 break;}
2840case 201:
2841#line 1590 "asn1p_y.y"
2842{ yyval.a_ctype = ACT_EL_RLRANGE; ;
2843 break;}
2844case 202:
2845#line 1591 "asn1p_y.y"
2846{ yyval.a_ctype = ACT_EL_LLRANGE; ;
2847 break;}
2848case 203:
2849#line 1592 "asn1p_y.y"
2850{ yyval.a_ctype = ACT_EL_ULRANGE; ;
2851 break;}
2852case 204:
2853#line 1596 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002854{
vlm39e5ed72004-09-05 10:40:41 +00002855 yyval.a_ctype = ACT_CT_SIZE;
vlm6a02a8a2004-09-08 00:28:11 +00002856 ;
2857 break;}
vlmc94e28f2004-09-15 11:59:51 +00002858case 205:
2859#line 1599 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002860{
vlm39e5ed72004-09-05 10:40:41 +00002861 yyval.a_ctype = ACT_CT_FROM;
vlm6a02a8a2004-09-08 00:28:11 +00002862 ;
2863 break;}
vlmc94e28f2004-09-15 11:59:51 +00002864case 206:
2865#line 1605 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002866{
vlmfa67ddc2004-06-03 03:38:44 +00002867 yyval.a_value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002868 ;
2869 break;}
vlmc94e28f2004-09-15 11:59:51 +00002870case 207:
2871#line 1608 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002872{
vlmfa67ddc2004-06-03 03:38:44 +00002873 asn1p_ref_t *ref;
2874 int ret;
2875 ref = asn1p_ref_new(yylineno);
2876 checkmem(ref);
2877 ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
2878 checkmem(ret == 0);
2879 yyval.a_value = asn1p_value_fromref(ref, 0);
2880 checkmem(yyval.a_value);
2881 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002882 ;
2883 break;}
vlmc94e28f2004-09-15 11:59:51 +00002884case 208:
2885#line 1619 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002886{
vlmfa67ddc2004-06-03 03:38:44 +00002887 yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
2888 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00002889 ;
2890 break;}
vlmc94e28f2004-09-15 11:59:51 +00002891case 209:
2892#line 1623 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002893{
vlmfa67ddc2004-06-03 03:38:44 +00002894 yyval.a_value = asn1p_value_fromint(0);
2895 checkmem(yyval.a_value);
2896 yyval.a_value->type = ATV_FALSE;
vlm6a02a8a2004-09-08 00:28:11 +00002897 ;
2898 break;}
vlmc94e28f2004-09-15 11:59:51 +00002899case 210:
2900#line 1628 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002901{
vlmfa67ddc2004-06-03 03:38:44 +00002902 yyval.a_value = asn1p_value_fromint(1);
2903 checkmem(yyval.a_value);
2904 yyval.a_value->type = ATV_TRUE;
vlm6a02a8a2004-09-08 00:28:11 +00002905 ;
2906 break;}
vlmc94e28f2004-09-15 11:59:51 +00002907case 211:
2908#line 1636 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002909{
vlmfa67ddc2004-06-03 03:38:44 +00002910 CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_WCOMPS, yyvsp[-1].a_constr, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002911 ;
2912 break;}
vlmc94e28f2004-09-15 11:59:51 +00002913case 212:
2914#line 1642 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002915{
vlmfa67ddc2004-06-03 03:38:44 +00002916 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002917 ;
2918 break;}
vlmc94e28f2004-09-15 11:59:51 +00002919case 213:
2920#line 1645 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002921{
vlmfa67ddc2004-06-03 03:38:44 +00002922 CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_WCOMPS, yyvsp[-2].a_constr, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002923 ;
2924 break;}
vlmc94e28f2004-09-15 11:59:51 +00002925case 214:
2926#line 1651 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002927{
vlmfa67ddc2004-06-03 03:38:44 +00002928 yyval.a_constr = asn1p_constraint_new(yylineno);
2929 checkmem(yyval.a_constr);
2930 yyval.a_constr->type = ACT_EL_EXT;
vlm6a02a8a2004-09-08 00:28:11 +00002931 ;
2932 break;}
vlmc94e28f2004-09-15 11:59:51 +00002933case 215:
2934#line 1656 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002935{
vlmfa67ddc2004-06-03 03:38:44 +00002936 yyval.a_constr = asn1p_constraint_new(yylineno);
2937 checkmem(yyval.a_constr);
2938 yyval.a_constr->type = ACT_EL_VALUE;
2939 yyval.a_constr->value = asn1p_value_frombuf(yyvsp[-2].tv_str, strlen(yyvsp[-2].tv_str), 0);
2940 yyval.a_constr->presence = yyvsp[0].a_pres;
vlm6a02a8a2004-09-08 00:28:11 +00002941 ;
2942 break;}
vlmc94e28f2004-09-15 11:59:51 +00002943case 216:
2944#line 1669 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002945{ yyval.a_pres = ACPRES_DEFAULT; ;
2946 break;}
vlmc94e28f2004-09-15 11:59:51 +00002947case 217:
2948#line 1670 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002949{ yyval.a_pres = yyvsp[0].a_pres; ;
2950 break;}
vlmc94e28f2004-09-15 11:59:51 +00002951case 218:
2952#line 1674 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002953{
vlmfa67ddc2004-06-03 03:38:44 +00002954 yyval.a_pres = ACPRES_PRESENT;
vlm6a02a8a2004-09-08 00:28:11 +00002955 ;
2956 break;}
vlmc94e28f2004-09-15 11:59:51 +00002957case 219:
2958#line 1677 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002959{
vlmfa67ddc2004-06-03 03:38:44 +00002960 yyval.a_pres = ACPRES_ABSENT;
vlm6a02a8a2004-09-08 00:28:11 +00002961 ;
2962 break;}
vlmc94e28f2004-09-15 11:59:51 +00002963case 220:
2964#line 1680 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002965{
vlmfa67ddc2004-06-03 03:38:44 +00002966 yyval.a_pres = ACPRES_OPTIONAL;
vlm6a02a8a2004-09-08 00:28:11 +00002967 ;
2968 break;}
vlmc94e28f2004-09-15 11:59:51 +00002969case 221:
2970#line 1686 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002971{
vlm5f0128b2004-08-20 13:25:29 +00002972 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002973 ;
2974 break;}
vlmc94e28f2004-09-15 11:59:51 +00002975case 222:
2976#line 1689 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002977{
vlm5f0128b2004-08-20 13:25:29 +00002978 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002979 ;
2980 break;}
vlmc94e28f2004-09-15 11:59:51 +00002981case 223:
2982#line 1698 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002983{
vlmfa67ddc2004-06-03 03:38:44 +00002984 asn1p_ref_t *ref = asn1p_ref_new(yylineno);
2985 asn1p_constraint_t *ct;
2986 int ret;
2987 ret = asn1p_ref_add_component(ref, yyvsp[-1].tv_str, 0);
2988 checkmem(ret == 0);
2989 ct = asn1p_constraint_new(yylineno);
2990 checkmem(yyval.a_constr);
2991 ct->type = ACT_EL_VALUE;
2992 ct->value = asn1p_value_fromref(ref, 0);
2993 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CRC, ct, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002994 ;
2995 break;}
vlmc94e28f2004-09-15 11:59:51 +00002996case 224:
2997#line 1713 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002998{
vlmfa67ddc2004-06-03 03:38:44 +00002999 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CRC, yyvsp[-3].a_constr, yyvsp[-1].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00003000 ;
3001 break;}
vlmc94e28f2004-09-15 11:59:51 +00003002case 225:
3003#line 1719 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003004{
vlmfa67ddc2004-06-03 03:38:44 +00003005 yyval.a_constr = asn1p_constraint_new(yylineno);
3006 checkmem(yyval.a_constr);
3007 yyval.a_constr->type = ACT_EL_VALUE;
3008 yyval.a_constr->value = asn1p_value_fromref(yyvsp[0].a_ref, 0);
vlm6a02a8a2004-09-08 00:28:11 +00003009 ;
3010 break;}
vlmc94e28f2004-09-15 11:59:51 +00003011case 226:
3012#line 1725 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003013{
vlmfa67ddc2004-06-03 03:38:44 +00003014 asn1p_constraint_t *ct;
3015 ct = asn1p_constraint_new(yylineno);
3016 checkmem(ct);
3017 ct->type = ACT_EL_VALUE;
3018 ct->value = asn1p_value_fromref(yyvsp[0].a_ref, 0);
3019 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-2].a_constr, ct);
vlm6a02a8a2004-09-08 00:28:11 +00003020 ;
3021 break;}
vlmc94e28f2004-09-15 11:59:51 +00003022case 227:
3023#line 1739 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003024{
vlmfa67ddc2004-06-03 03:38:44 +00003025 char *p = malloc(strlen(yyvsp[0].tv_str) + 2);
3026 int ret;
3027 *p = '@';
3028 strcpy(p + 1, yyvsp[0].tv_str);
3029 yyval.a_ref = asn1p_ref_new(yylineno);
3030 ret = asn1p_ref_add_component(yyval.a_ref, p, 0);
3031 checkmem(ret == 0);
3032 free(p);
3033 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00003034 ;
3035 break;}
vlmc94e28f2004-09-15 11:59:51 +00003036case 228:
3037#line 1750 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003038{
vlmfa67ddc2004-06-03 03:38:44 +00003039 char *p = malloc(strlen(yyvsp[0].tv_str) + 3);
3040 int ret;
3041 p[0] = '@';
3042 p[1] = '.';
3043 strcpy(p + 2, yyvsp[0].tv_str);
3044 yyval.a_ref = asn1p_ref_new(yylineno);
3045 ret = asn1p_ref_add_component(yyval.a_ref, p, 0);
3046 checkmem(ret == 0);
3047 free(p);
3048 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00003049 ;
3050 break;}
vlmc94e28f2004-09-15 11:59:51 +00003051case 229:
3052#line 1766 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003053{
vlmfa67ddc2004-06-03 03:38:44 +00003054 yyval.tv_str = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003055 ;
3056 break;}
vlmc94e28f2004-09-15 11:59:51 +00003057case 230:
3058#line 1769 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003059{
vlmfa67ddc2004-06-03 03:38:44 +00003060 int l1 = strlen(yyvsp[-2].tv_str);
3061 int l3 = strlen(yyvsp[0].tv_str);
3062 yyval.tv_str = malloc(l1 + 1 + l3 + 1);
3063 memcpy(yyval.tv_str, yyvsp[-2].tv_str, l1);
3064 yyval.tv_str[l1] = '.';
3065 memcpy(yyval.tv_str + l1 + 1, yyvsp[0].tv_str, l3);
3066 yyval.tv_str[l1 + 1 + l3] = '\0';
vlm6a02a8a2004-09-08 00:28:11 +00003067 ;
3068 break;}
vlma2374a02004-09-14 02:44:07 +00003069case 231:
vlmc94e28f2004-09-15 11:59:51 +00003070#line 1787 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003071{
vlmc94e28f2004-09-15 11:59:51 +00003072 yyval.a_marker.flags = EM_NOMARK;
3073 yyval.a_marker.default_value = 0;
vlm6a02a8a2004-09-08 00:28:11 +00003074 ;
3075 break;}
vlma2374a02004-09-14 02:44:07 +00003076case 232:
vlmc94e28f2004-09-15 11:59:51 +00003077#line 1791 "asn1p_y.y"
3078{ yyval.a_marker = yyvsp[0].a_marker; ;
vlma2374a02004-09-14 02:44:07 +00003079 break;}
3080case 233:
vlmc94e28f2004-09-15 11:59:51 +00003081#line 1795 "asn1p_y.y"
vlma2374a02004-09-14 02:44:07 +00003082{
vlmc94e28f2004-09-15 11:59:51 +00003083 yyval.a_marker.flags = EM_OPTIONAL;
3084 yyval.a_marker.default_value = 0;
vlma2374a02004-09-14 02:44:07 +00003085 ;
3086 break;}
vlm6a02a8a2004-09-08 00:28:11 +00003087case 234:
vlmc94e28f2004-09-15 11:59:51 +00003088#line 1799 "asn1p_y.y"
3089{
3090 yyval.a_marker.flags = EM_DEFAULT;
3091 yyval.a_marker.default_value = yyvsp[0].a_value;
3092 ;
3093 break;}
3094case 235:
3095#line 1822 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003096{
vlm39e5ed72004-09-05 10:40:41 +00003097 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003098 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00003099 ;
3100 break;}
vlmc94e28f2004-09-15 11:59:51 +00003101case 236:
3102#line 1826 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003103{
vlmfa67ddc2004-06-03 03:38:44 +00003104 yyval.a_expr = yyvsp[-1].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00003105 ;
3106 break;}
vlmc94e28f2004-09-15 11:59:51 +00003107case 237:
3108#line 1832 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003109{
vlm39e5ed72004-09-05 10:40:41 +00003110 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003111 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00003112 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
3113 ;
3114 break;}
vlmc94e28f2004-09-15 11:59:51 +00003115case 238:
3116#line 1837 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003117{
vlmfa67ddc2004-06-03 03:38:44 +00003118 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00003119 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
3120 ;
3121 break;}
vlmc94e28f2004-09-15 11:59:51 +00003122case 239:
3123#line 1844 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003124{
vlm39e5ed72004-09-05 10:40:41 +00003125 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003126 checkmem(yyval.a_expr);
3127 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3128 yyval.a_expr->meta_type = AMT_VALUE;
3129 yyval.a_expr->Identifier = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003130 ;
3131 break;}
vlm6a02a8a2004-09-08 00:28:11 +00003132case 240:
vlmc94e28f2004-09-15 11:59:51 +00003133#line 1851 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003134{
vlm39e5ed72004-09-05 10:40:41 +00003135 yyval.a_expr = asn1p_expr_new(yylineno);
vlm5f0128b2004-08-20 13:25:29 +00003136 checkmem(yyval.a_expr);
3137 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3138 yyval.a_expr->meta_type = AMT_VALUE;
3139 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
3140 yyval.a_expr->value = yyvsp[-1].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00003141 ;
3142 break;}
3143case 241:
vlmc94e28f2004-09-15 11:59:51 +00003144#line 1859 "asn1p_y.y"
3145{
3146 yyval.a_expr = asn1p_expr_new(yylineno);
3147 checkmem(yyval.a_expr);
3148 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3149 yyval.a_expr->meta_type = AMT_VALUE;
3150 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
3151 yyval.a_expr->value = yyvsp[-1].a_value;
3152 ;
3153 break;}
3154case 242:
3155#line 1867 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003156{
vlm39e5ed72004-09-05 10:40:41 +00003157 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003158 checkmem(yyval.a_expr);
3159 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3160 yyval.a_expr->meta_type = AMT_VALUE;
3161 yyval.a_expr->value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00003162 ;
3163 break;}
vlmc94e28f2004-09-15 11:59:51 +00003164case 243:
3165#line 1874 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003166{
vlm39e5ed72004-09-05 10:40:41 +00003167 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003168 checkmem(yyval.a_expr);
3169 yyval.a_expr->Identifier = strdup("...");
3170 checkmem(yyval.a_expr->Identifier);
3171 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
3172 yyval.a_expr->meta_type = AMT_VALUE;
vlm6a02a8a2004-09-08 00:28:11 +00003173 ;
3174 break;}
vlm6a02a8a2004-09-08 00:28:11 +00003175case 244:
vlmc94e28f2004-09-15 11:59:51 +00003176#line 1885 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003177{
vlmec8f6812004-08-22 03:19:54 +00003178 yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int);
3179 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00003180 ;
3181 break;}
3182case 245:
vlmc94e28f2004-09-15 11:59:51 +00003183#line 1889 "asn1p_y.y"
3184{
3185 yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int);
3186 checkmem(yyval.a_value);
3187 ;
vlm6a02a8a2004-09-08 00:28:11 +00003188 break;}
3189case 246:
vlmc94e28f2004-09-15 11:59:51 +00003190#line 1920 "asn1p_y.y"
3191{ memset(&yyval.a_tag, 0, sizeof(yyval.a_tag)); ;
vlm6a02a8a2004-09-08 00:28:11 +00003192 break;}
3193case 247:
vlmc94e28f2004-09-15 11:59:51 +00003194#line 1921 "asn1p_y.y"
3195{ yyval.a_tag = yyvsp[0].a_tag; ;
3196 break;}
3197case 248:
3198#line 1925 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003199{
vlmfa67ddc2004-06-03 03:38:44 +00003200 yyval.a_tag = yyvsp[0].a_tag;
3201 yyval.a_tag.tag_mode = TM_DEFAULT;
vlm6a02a8a2004-09-08 00:28:11 +00003202 ;
3203 break;}
vlmc94e28f2004-09-15 11:59:51 +00003204case 249:
3205#line 1929 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003206{
vlmfa67ddc2004-06-03 03:38:44 +00003207 yyval.a_tag = yyvsp[-1].a_tag;
3208 yyval.a_tag.tag_mode = TM_IMPLICIT;
vlm6a02a8a2004-09-08 00:28:11 +00003209 ;
3210 break;}
vlmc94e28f2004-09-15 11:59:51 +00003211case 250:
3212#line 1933 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003213{
vlmfa67ddc2004-06-03 03:38:44 +00003214 yyval.a_tag = yyvsp[-1].a_tag;
3215 yyval.a_tag.tag_mode = TM_EXPLICIT;
vlm6a02a8a2004-09-08 00:28:11 +00003216 ;
3217 break;}
vlm6a02a8a2004-09-08 00:28:11 +00003218case 251:
vlmc94e28f2004-09-15 11:59:51 +00003219#line 1940 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003220{
vlm39e5ed72004-09-05 10:40:41 +00003221 checkmem(yyvsp[0].tv_str);
3222 yyval.tv_str = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003223 ;
3224 break;}
3225case 252:
vlmc94e28f2004-09-15 11:59:51 +00003226#line 1944 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003227{
vlm39e5ed72004-09-05 10:40:41 +00003228 checkmem(yyvsp[0].tv_str);
3229 yyval.tv_str = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003230 ;
3231 break;}
3232case 253:
vlmc94e28f2004-09-15 11:59:51 +00003233#line 1952 "asn1p_y.y"
3234{
3235 checkmem(yyvsp[0].tv_str);
3236 yyval.tv_str = yyvsp[0].tv_str;
3237 ;
3238 break;}
3239case 254:
3240#line 1959 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003241{
vlm39e5ed72004-09-05 10:40:41 +00003242 checkmem(yyvsp[0].tv_str);
3243 yyval.tv_str = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003244 ;
3245 break;}
vlm6a02a8a2004-09-08 00:28:11 +00003246}
3247 /* the action file gets copied in in place of this dollarsign */
3248#line 543 "/usr/share/bison.simple"
vlmfa67ddc2004-06-03 03:38:44 +00003249
3250 yyvsp -= yylen;
3251 yyssp -= yylen;
vlm6a02a8a2004-09-08 00:28:11 +00003252#ifdef YYLSP_NEEDED
3253 yylsp -= yylen;
3254#endif
vlmfa67ddc2004-06-03 03:38:44 +00003255
vlm6a02a8a2004-09-08 00:28:11 +00003256#if YYDEBUG != 0
vlmfa67ddc2004-06-03 03:38:44 +00003257 if (yydebug)
3258 {
vlm6a02a8a2004-09-08 00:28:11 +00003259 short *ssp1 = yyss - 1;
3260 fprintf (stderr, "state stack now");
3261 while (ssp1 != yyssp)
3262 fprintf (stderr, " %d", *++ssp1);
3263 fprintf (stderr, "\n");
vlmfa67ddc2004-06-03 03:38:44 +00003264 }
3265#endif
3266
3267 *++yyvsp = yyval;
3268
vlm6a02a8a2004-09-08 00:28:11 +00003269#ifdef YYLSP_NEEDED
3270 yylsp++;
3271 if (yylen == 0)
3272 {
3273 yylsp->first_line = yylloc.first_line;
3274 yylsp->first_column = yylloc.first_column;
3275 yylsp->last_line = (yylsp-1)->last_line;
3276 yylsp->last_column = (yylsp-1)->last_column;
3277 yylsp->text = 0;
3278 }
3279 else
3280 {
3281 yylsp->last_line = (yylsp+yylen-1)->last_line;
3282 yylsp->last_column = (yylsp+yylen-1)->last_column;
3283 }
3284#endif
vlmfa67ddc2004-06-03 03:38:44 +00003285
vlm6a02a8a2004-09-08 00:28:11 +00003286 /* Now "shift" the result of the reduction.
3287 Determine what state that goes to,
3288 based on the state we popped back to
3289 and the rule number reduced by. */
vlmfa67ddc2004-06-03 03:38:44 +00003290
3291 yyn = yyr1[yyn];
3292
vlm6a02a8a2004-09-08 00:28:11 +00003293 yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
3294 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
vlmfa67ddc2004-06-03 03:38:44 +00003295 yystate = yytable[yystate];
3296 else
vlm6a02a8a2004-09-08 00:28:11 +00003297 yystate = yydefgoto[yyn - YYNTBASE];
vlmfa67ddc2004-06-03 03:38:44 +00003298
3299 goto yynewstate;
3300
vlm6a02a8a2004-09-08 00:28:11 +00003301yyerrlab: /* here on detecting error */
vlmfa67ddc2004-06-03 03:38:44 +00003302
vlm6a02a8a2004-09-08 00:28:11 +00003303 if (! yyerrstatus)
3304 /* If not already recovering from an error, report this error. */
vlmfa67ddc2004-06-03 03:38:44 +00003305 {
3306 ++yynerrs;
vlm6a02a8a2004-09-08 00:28:11 +00003307
3308#ifdef YYERROR_VERBOSE
vlmfa67ddc2004-06-03 03:38:44 +00003309 yyn = yypact[yystate];
3310
vlm6a02a8a2004-09-08 00:28:11 +00003311 if (yyn > YYFLAG && yyn < YYLAST)
vlmfa67ddc2004-06-03 03:38:44 +00003312 {
vlm6a02a8a2004-09-08 00:28:11 +00003313 int size = 0;
3314 char *msg;
3315 int x, count;
vlmfa67ddc2004-06-03 03:38:44 +00003316
vlm6a02a8a2004-09-08 00:28:11 +00003317 count = 0;
3318 /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
3319 for (x = (yyn < 0 ? -yyn : 0);
3320 x < (ssize_t)(sizeof(yytname) / sizeof(char *)); x++)
3321 if (yycheck[x + yyn] == x)
3322 size += strlen(yytname[x]) + 15, count++;
3323 msg = (char *) malloc(size + 15);
3324 if (msg != 0)
vlmfa67ddc2004-06-03 03:38:44 +00003325 {
vlm6a02a8a2004-09-08 00:28:11 +00003326 strcpy(msg, "parse error");
vlmfa67ddc2004-06-03 03:38:44 +00003327
vlm6a02a8a2004-09-08 00:28:11 +00003328 if (count < 5)
vlmfa67ddc2004-06-03 03:38:44 +00003329 {
vlm6a02a8a2004-09-08 00:28:11 +00003330 count = 0;
3331 for (x = (yyn < 0 ? -yyn : 0);
3332 x < (ssize_t)(sizeof(yytname) / sizeof(char *)); x++)
3333 if (yycheck[x + yyn] == x)
vlmfa67ddc2004-06-03 03:38:44 +00003334 {
vlm6a02a8a2004-09-08 00:28:11 +00003335 strcat(msg, count == 0 ? ", expecting `" : " or `");
3336 strcat(msg, yytname[x]);
3337 strcat(msg, "'");
3338 count++;
vlmfa67ddc2004-06-03 03:38:44 +00003339 }
3340 }
vlm6a02a8a2004-09-08 00:28:11 +00003341 yyerror(msg);
3342 free(msg);
vlmfa67ddc2004-06-03 03:38:44 +00003343 }
3344 else
vlm6a02a8a2004-09-08 00:28:11 +00003345 yyerror ("parse error; also virtual memory exceeded");
vlmfa67ddc2004-06-03 03:38:44 +00003346 }
3347 else
3348#endif /* YYERROR_VERBOSE */
vlm6a02a8a2004-09-08 00:28:11 +00003349 yyerror("parse error");
vlmfa67ddc2004-06-03 03:38:44 +00003350 }
vlm6a02a8a2004-09-08 00:28:11 +00003351
vlmfa67ddc2004-06-03 03:38:44 +00003352 goto yyerrlab1;
vlm6a02a8a2004-09-08 00:28:11 +00003353yyerrlab1: /* here on error raised explicitly by an action */
vlmfa67ddc2004-06-03 03:38:44 +00003354
3355 if (yyerrstatus == 3)
3356 {
vlm6a02a8a2004-09-08 00:28:11 +00003357 /* if just tried and failed to reuse lookahead token after an error, discard it. */
vlmfa67ddc2004-06-03 03:38:44 +00003358
vlm6a02a8a2004-09-08 00:28:11 +00003359 /* return failure if at end of input */
vlmfa67ddc2004-06-03 03:38:44 +00003360 if (yychar == YYEOF)
vlm6a02a8a2004-09-08 00:28:11 +00003361 YYABORT;
vlmfa67ddc2004-06-03 03:38:44 +00003362
vlm6a02a8a2004-09-08 00:28:11 +00003363#if YYDEBUG != 0
3364 if (yydebug)
3365 fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
3366#endif
3367
vlmfa67ddc2004-06-03 03:38:44 +00003368 yychar = YYEMPTY;
3369 }
3370
vlm6a02a8a2004-09-08 00:28:11 +00003371 /* Else will try to reuse lookahead token
3372 after shifting the error token. */
vlmfa67ddc2004-06-03 03:38:44 +00003373
vlm6a02a8a2004-09-08 00:28:11 +00003374 yyerrstatus = 3; /* Each real token shifted decrements this */
vlmfa67ddc2004-06-03 03:38:44 +00003375
vlm6a02a8a2004-09-08 00:28:11 +00003376 goto yyerrhandle;
vlm80103492004-09-07 10:39:09 +00003377
vlm6a02a8a2004-09-08 00:28:11 +00003378yyerrdefault: /* current state does not do anything special for the error token. */
vlm80103492004-09-07 10:39:09 +00003379
vlm6a02a8a2004-09-08 00:28:11 +00003380#if 0
3381 /* This is wrong; only states that explicitly want error tokens
3382 should shift them. */
3383 yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
3384 if (yyn) goto yydefault;
vlm39e5ed72004-09-05 10:40:41 +00003385#endif
vlm6a02a8a2004-09-08 00:28:11 +00003386
3387yyerrpop: /* pop the current state because it cannot handle the error token */
3388
3389 if (yyssp == yyss) YYABORT;
3390 yyvsp--;
3391 yystate = *--yyssp;
3392#ifdef YYLSP_NEEDED
3393 yylsp--;
3394#endif
3395
3396#if YYDEBUG != 0
3397 if (yydebug)
3398 {
3399 short *ssp1 = yyss - 1;
3400 fprintf (stderr, "Error: state stack now");
3401 while (ssp1 != yyssp)
3402 fprintf (stderr, " %d", *++ssp1);
3403 fprintf (stderr, "\n");
vlm39e5ed72004-09-05 10:40:41 +00003404 }
vlm6a02a8a2004-09-08 00:28:11 +00003405#endif
3406
3407yyerrhandle:
3408
3409 yyn = yypact[yystate];
3410 if (yyn == YYFLAG)
3411 goto yyerrdefault;
3412
3413 yyn += YYTERROR;
3414 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
3415 goto yyerrdefault;
3416
3417 yyn = yytable[yyn];
3418 if (yyn < 0)
3419 {
3420 if (yyn == YYFLAG)
3421 goto yyerrpop;
3422 yyn = -yyn;
3423 goto yyreduce;
3424 }
3425 else if (yyn == 0)
3426 goto yyerrpop;
vlmfa67ddc2004-06-03 03:38:44 +00003427
3428 if (yyn == YYFINAL)
3429 YYACCEPT;
3430
vlm6a02a8a2004-09-08 00:28:11 +00003431#if YYDEBUG != 0
3432 if (yydebug)
3433 fprintf(stderr, "Shifting error token, ");
3434#endif
vlmfa67ddc2004-06-03 03:38:44 +00003435
3436 *++yyvsp = yylval;
vlm6a02a8a2004-09-08 00:28:11 +00003437#ifdef YYLSP_NEEDED
3438 *++yylsp = yylloc;
3439#endif
vlmfa67ddc2004-06-03 03:38:44 +00003440
3441 yystate = yyn;
3442 goto yynewstate;
3443
vlm6a02a8a2004-09-08 00:28:11 +00003444 yyacceptlab:
3445 /* YYACCEPT comes here. */
3446 if (yyfree_stacks)
3447 {
3448 free (yyss);
3449 free (yyvs);
3450#ifdef YYLSP_NEEDED
3451 free (yyls);
vlm044f7442004-09-04 04:49:21 +00003452#endif
vlm6a02a8a2004-09-08 00:28:11 +00003453 }
3454 return 0;
vlm80103492004-09-07 10:39:09 +00003455
vlm6a02a8a2004-09-08 00:28:11 +00003456 yyabortlab:
3457 /* YYABORT comes here. */
3458 if (yyfree_stacks)
3459 {
3460 free (yyss);
3461 free (yyvs);
3462#ifdef YYLSP_NEEDED
3463 free (yyls);
vlm80103492004-09-07 10:39:09 +00003464#endif
vlm6a02a8a2004-09-08 00:28:11 +00003465 }
3466 return 1;
vlmfa67ddc2004-06-03 03:38:44 +00003467}
vlmc94e28f2004-09-15 11:59:51 +00003468#line 1965 "asn1p_y.y"
vlmfa67ddc2004-06-03 03:38:44 +00003469
3470
3471
3472/*
3473 * Convert Xstring ('0101'B or '5'H) to the binary vector.
3474 */
3475static asn1p_value_t *
3476_convert_bitstring2binary(char *str, int base) {
3477 asn1p_value_t *val;
3478 int slen;
3479 int memlen;
3480 int baselen;
3481 int bits;
3482 uint8_t *binary_vector;
3483 uint8_t *bv_ptr;
3484 uint8_t cur_val;
3485
3486 assert(str);
3487 assert(str[0] == '\'');
3488
3489 switch(base) {
3490 case 'B':
3491 baselen = 1;
3492 break;
3493 case 'H':
3494 baselen = 4;
3495 break;
3496 default:
3497 assert(base == 'B' || base == 'H');
3498 errno = EINVAL;
3499 return NULL;
3500 }
3501
3502 slen = strlen(str);
3503 assert(str[slen - 1] == base);
3504 assert(str[slen - 2] == '\'');
3505
3506 memlen = slen / (8 / baselen); /* Conservative estimate */
3507
3508 bv_ptr = binary_vector = malloc(memlen + 1);
3509 if(bv_ptr == NULL)
3510 /* ENOMEM */
3511 return NULL;
3512
3513 cur_val = 0;
3514 bits = 0;
3515 while(*(++str) != '\'') {
3516 switch(baselen) {
3517 case 1:
3518 switch(*str) {
3519 case '1':
3520 cur_val |= 1 << (7 - (bits % 8));
3521 case '0':
3522 break;
3523 default:
3524 assert(!"_y UNREACH1");
3525 case ' ': case '\r': case '\n':
3526 continue;
3527 }
3528 break;
3529 case 4:
3530 switch(*str) {
3531 case '0': case '1': case '2': case '3': case '4':
3532 case '5': case '6': case '7': case '8': case '9':
3533 cur_val |= (*str - '0') << (4 - (bits % 8));
3534 break;
3535 case 'A': case 'B': case 'C':
3536 case 'D': case 'E': case 'F':
3537 cur_val |= ((*str - 'A') + 10)
3538 << (4 - (bits % 8));
3539 break;
3540 default:
3541 assert(!"_y UNREACH2");
3542 case ' ': case '\r': case '\n':
3543 continue;
3544 }
3545 break;
3546 }
3547
3548 bits += baselen;
3549 if((bits % 8) == 0) {
3550 *bv_ptr++ = cur_val;
3551 cur_val = 0;
3552 }
3553 }
3554
3555 *bv_ptr = cur_val;
3556 assert((bv_ptr - binary_vector) <= memlen);
3557
3558 val = asn1p_value_frombits(binary_vector, bits, 0);
3559 if(val == NULL) {
3560 free(binary_vector);
3561 }
3562
3563 return val;
3564}
3565
3566extern char *asn1p_text;
3567
3568int
3569yyerror(const char *msg) {
3570 fprintf(stderr,
3571 "ASN.1 grammar parse error "
3572 "near line %d (token \"%s\"): %s\n",
vlm39e5ed72004-09-05 10:40:41 +00003573 yylineno, asn1p_text, msg);
vlmfa67ddc2004-06-03 03:38:44 +00003574 return -1;
3575}
3576
3577