blob: 7d927e976c271427763f251ac61d63a6399dc53f [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 */
185 enum asn1p_expr_marker_e a_marker; /* OPTIONAL/DEFAULT */
186 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
vlma2374a02004-09-14 02:44:07 +0000208#define YYFINAL 397
vlm6a02a8a2004-09-08 00:28:11 +0000209#define YYFLAG -32768
210#define YYNTBASE 115
vlmfa67ddc2004-06-03 03:38:44 +0000211
vlmfce48a42004-09-14 02:36:39 +0000212#define YYTRANSLATE(x) ((unsigned)(x) <= 355 ? yytranslate[x] : 213)
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,
266 333, 338, 340, 344, 346, 350, 354, 356, 360, 362,
267 366, 368, 370, 372, 374, 379, 380, 384, 386, 388,
268 390, 392, 394, 396, 400, 402, 405, 407, 409, 411,
269 413, 416, 419, 421, 423, 426, 429, 431, 433, 435,
270 437, 440, 442, 445, 447, 449, 451, 453, 455, 457,
271 459, 461, 463, 465, 467, 469, 471, 473, 475, 477,
272 479, 481, 483, 484, 486, 488, 493, 497, 502, 504,
273 508, 514, 516, 520, 524, 528, 533, 537, 539, 543,
274 547, 551, 555, 557, 559, 561, 564, 567, 571, 573,
275 575, 577, 579, 581, 583, 585, 591, 593, 597, 599,
276 603, 604, 606, 608, 610, 612, 614, 616, 620, 625,
277 627, 631, 634, 638, 640, 644, 645, 647, 649, 652,
278 654, 656, 657, 661, 664, 668, 670, 674, 676, 681,
279 686, 688, 690, 692, 694, 695, 697, 699, 702, 705,
280 707, 709, 711
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,
284 0, 117, 0, 116, 117, 0, 210, 118, 34, 122,
285 3, 21, 125, 39, 0, 0, 119, 0, 104, 120,
286 105, 0, 104, 105, 0, 121, 0, 120, 121, 0,
287 212, 0, 212, 106, 9, 107, 0, 9, 0, 0,
288 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,
294 46, 210, 118, 0, 133, 0, 132, 109, 133, 0,
295 210, 0, 212, 0, 42, 135, 108, 0, 42, 17,
296 108, 0, 42, 108, 0, 136, 0, 135, 109, 136,
297 0, 210, 0, 212, 0, 210, 138, 3, 104, 139,
298 105, 0, 163, 0, 173, 0, 0, 140, 0, 141,
299 0, 140, 109, 141, 0, 102, 0, 184, 0, 210,
vlmfce48a42004-09-14 02:36:39 +0000300 3, 208, 87, 0, 210, 3, 161, 0, 210, 3,
301 151, 0, 210, 104, 143, 105, 3, 161, 0, 144,
302 0, 143, 109, 144, 0, 210, 0, 210, 110, 212,
303 0, 173, 110, 212, 0, 146, 0, 145, 109, 146,
304 0, 161, 0, 212, 0, 148, 0, 147, 109, 148,
305 0, 212, 161, 200, 0, 30, 68, 161, 0, 160,
306 0, 150, 0, 149, 109, 150, 0, 212, 161, 0,
307 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,
312 102, 0, 102, 111, 171, 0, 102, 111, 207, 0,
313 208, 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,
vlma2374a02004-09-14 02:44:07 +0000315 147, 105, 0, 78, 180, 68, 208, 162, 0, 79,
316 180, 68, 208, 162, 0, 18, 0, 18, 35, 25,
317 212, 0, 210, 104, 145, 105, 0, 163, 0, 56,
318 68, 163, 0, 11, 0, 11, 112, 210, 0, 11,
319 112, 212, 0, 211, 0, 211, 112, 164, 0, 165,
320 0, 164, 112, 165, 0, 167, 0, 167, 0, 13,
321 0, 14, 0, 212, 138, 3, 169, 0, 0, 104,
322 170, 172, 0, 5, 0, 7, 0, 6, 0, 207,
323 0, 171, 0, 212, 0, 210, 112, 212, 0, 4,
324 0, 172, 4, 0, 24, 0, 63, 0, 76, 0,
325 174, 0, 67, 81, 0, 65, 51, 0, 77, 0,
326 44, 0, 36, 71, 0, 26, 81, 0, 91, 0,
327 47, 0, 58, 0, 40, 0, 22, 81, 0, 173,
328 0, 174, 204, 0, 23, 0, 48, 0, 49, 0,
329 50, 0, 59, 0, 64, 0, 74, 0, 83, 0,
330 85, 0, 90, 0, 92, 0, 93, 0, 94, 0,
331 66, 0, 99, 0, 100, 0, 97, 0, 98, 0,
332 96, 0, 0, 181, 0, 182, 0, 80, 106, 183,
333 107, 0, 106, 183, 107, 0, 182, 106, 183, 107,
334 0, 184, 0, 184, 109, 102, 0, 184, 109, 102,
335 109, 184, 0, 185, 0, 184, 177, 185, 0, 184,
336 178, 185, 0, 185, 179, 185, 0, 187, 106, 183,
337 107, 0, 106, 183, 107, 0, 188, 0, 188, 186,
338 188, 0, 61, 186, 188, 0, 188, 186, 60, 0,
339 61, 186, 60, 0, 194, 0, 189, 0, 101, 0,
340 101, 113, 0, 113, 101, 0, 113, 101, 113, 0,
341 80, 0, 46, 0, 207, 0, 212, 0, 6, 0,
342 45, 0, 86, 0, 95, 30, 104, 190, 105, 0,
343 191, 0, 190, 109, 191, 0, 102, 0, 212, 180,
344 192, 0, 0, 193, 0, 73, 0, 15, 0, 69,
345 0, 195, 0, 196, 0, 104, 210, 105, 0, 195,
346 104, 197, 105, 0, 198, 0, 197, 109, 198, 0,
347 114, 199, 0, 114, 112, 199, 0, 212, 0, 199,
348 112, 212, 0, 0, 201, 0, 69, 0, 33, 202,
349 0, 188, 0, 173, 0, 0, 104, 203, 172, 0,
350 104, 105, 0, 104, 205, 105, 0, 206, 0, 205,
351 109, 206, 0, 212, 0, 212, 106, 207, 107, 0,
352 212, 106, 171, 107, 0, 207, 0, 102, 0, 9,
353 0, 10, 0, 0, 209, 0, 103, 0, 103, 52,
354 0, 103, 41, 0, 11, 0, 12, 0, 12, 0,
355 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,
373 1117, 1141, 1148, 1162, 1171, 1181, 1191, 1199, 1220, 1229,
374 1238, 1239, 1241, 1248, 1260, 1270, 1272, 1277, 1281, 1285,
375 1289, 1292, 1297, 1309, 1325, 1336, 1350, 1352, 1353, 1354,
376 1355, 1356, 1357, 1358, 1359, 1360, 1361, 1362, 1368, 1370,
377 1371, 1374, 1381, 1393, 1395, 1399, 1403, 1404, 1405, 1406,
378 1407, 1411, 1412, 1413, 1414, 1418, 1419, 1426, 1426, 1427,
379 1427, 1428, 1430, 1432, 1437, 1441, 1450, 1454, 1459, 1463,
380 1469, 1479, 1483, 1486, 1489, 1494, 1503, 1511, 1517, 1524,
381 1532, 1540, 1549, 1552, 1557, 1559, 1560, 1561, 1564, 1568,
382 1573, 1577, 1588, 1593, 1598, 1605, 1611, 1615, 1620, 1626,
383 1638, 1640, 1643, 1647, 1650, 1655, 1659, 1667, 1682, 1688,
384 1695, 1708, 1720, 1735, 1739, 1756, 1758, 1761, 1765, 1771,
385 1774, 1776, 1776, 1796, 1801, 1806, 1812, 1818, 1826, 1834,
386 1842, 1849, 1859, 1864, 1894, 1896, 1899, 1904, 1908, 1914,
387 1919, 1926, 1933
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",
426"ClassFieldIdentifier","ClassFieldName","ValueDefinition","InlineOrDefinedValue",
427"@3","DefinedValue","Opaque","BasicTypeId","BasicTypeId_UniverationCompatible",
428"BasicType","BasicString","Union","Intersection","Except","optConstraints","Constraints",
429"SetOfConstraints","ElementSetSpecs","ElementSetSpec","ConstraintSubtypeElement",
430"ConstraintRangeSpec","ConstraintSpec","ConstraintValue","WithComponents","WithComponentsList",
431"WithComponentsElement","optPresenceConstraint","PresenceConstraint","TableConstraint",
432"SimpleTableConstraint","ComponentRelationConstraint","AtNotationList","AtNotationElement",
433"ComponentIdList","optMarker","Marker","DefaultValue","@4","UniverationDefinition",
434"UniverationList","UniverationElement","SignedNumber","optTag","Tag","TypeRefName",
vlmfce48a42004-09-14 02:36:39 +0000435"ObjectClassReference","Identifier", NULL
vlm6a02a8a2004-09-08 00:28:11 +0000436};
437#endif
438
439static const short yyr1[] = { 0,
440 115, 116, 116, 117, 118, 118, 119, 119, 120, 120,
441 121, 121, 121, 122, 122, 123, 123, 124, 124, 124,
442 124, 124, 125, 125, 126, 126, 127, 127, 127, 127,
443 127, 128, 127, 127, 129, 129, 130, 130, 131, 132,
444 132, 133, 133, 134, 134, 134, 135, 135, 136, 136,
445 137, 138, 138, 139, 139, 140, 140, 141, 141, 142,
446 142, 142, 142, 143, 143, 144, 144, 144, 145, 145,
447 146, 146, 147, 147, 148, 148, 148, 149, 149, 150,
448 150, 151, 152, 152, 153, 153, 154, 154, 154, 155,
449 155, 157, 156, 158, 158, 159, 159, 160, 160, 160,
450 161, 162, 162, 162, 162, 162, 162, 162, 162, 162,
451 162, 162, 162, 163, 163, 163, 163, 163, 164, 164,
452 165, 166, 167, 167, 168, 170, 169, 169, 169, 169,
453 169, 169, 171, 171, 172, 172, 173, 173, 173, 173,
454 173, 173, 173, 173, 173, 173, 173, 173, 174, 174,
455 174, 175, 175, 176, 176, 176, 176, 176, 176, 176,
456 176, 176, 176, 176, 176, 176, 176, 177, 177, 178,
457 178, 179, 180, 180, 181, 181, 182, 182, 183, 183,
458 183, 184, 184, 184, 184, 185, 185, 185, 185, 185,
459 185, 185, 185, 185, 186, 186, 186, 186, 187, 187,
460 188, 188, 188, 188, 188, 189, 190, 190, 191, 191,
461 192, 192, 193, 193, 193, 194, 194, 195, 196, 197,
462 197, 198, 198, 199, 199, 200, 200, 201, 201, 202,
463 202, 203, 202, 204, 204, 205, 205, 206, 206, 206,
464 206, 206, 207, 207, 208, 208, 209, 209, 209, 210,
vlmfce48a42004-09-14 02:36:39 +0000465 210, 211, 212
vlm6a02a8a2004-09-08 00:28:11 +0000466};
467
468static const short yyr2[] = { 0,
469 1, 1, 2, 8, 0, 1, 3, 2, 1, 2,
470 1, 4, 1, 0, 1, 1, 2, 2, 2, 2,
471 2, 2, 0, 1, 1, 2, 1, 1, 1, 1,
472 1, 0, 3, 1, 3, 2, 1, 2, 4, 1,
473 3, 1, 1, 3, 3, 2, 1, 3, 1, 1,
474 6, 1, 1, 0, 1, 1, 3, 1, 1, 4,
vlmfce48a42004-09-14 02:36:39 +0000475 3, 3, 6, 1, 3, 1, 3, 3, 1, 3,
vlm6a02a8a2004-09-08 00:28:11 +0000476 1, 1, 1, 3, 3, 3, 1, 1, 3, 2,
477 1, 5, 0, 1, 1, 3, 2, 4, 4, 0,
478 1, 0, 6, 1, 2, 1, 1, 1, 3, 3,
vlma2374a02004-09-14 02:44:07 +0000479 3, 1, 1, 4, 4, 4, 5, 5, 1, 4,
vlm6a02a8a2004-09-08 00:28:11 +0000480 4, 1, 3, 1, 3, 3, 1, 3, 1, 3,
481 1, 1, 1, 1, 4, 0, 3, 1, 1, 1,
482 1, 1, 1, 3, 1, 2, 1, 1, 1, 1,
483 2, 2, 1, 1, 2, 2, 1, 1, 1, 1,
484 2, 1, 2, 1, 1, 1, 1, 1, 1, 1,
485 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
486 1, 1, 0, 1, 1, 4, 3, 4, 1, 3,
487 5, 1, 3, 3, 3, 4, 3, 1, 3, 3,
488 3, 3, 1, 1, 1, 2, 2, 3, 1, 1,
489 1, 1, 1, 1, 1, 5, 1, 3, 1, 3,
490 0, 1, 1, 1, 1, 1, 1, 3, 4, 1,
491 3, 2, 3, 1, 3, 0, 1, 1, 2, 1,
492 1, 0, 3, 2, 3, 1, 3, 1, 4, 4,
493 1, 1, 1, 1, 0, 1, 1, 2, 2, 1,
vlmfce48a42004-09-14 02:36:39 +0000494 1, 1, 1
vlm6a02a8a2004-09-08 00:28:11 +0000495};
496
497static const short yydefact[] = { 0,
498 250, 251, 1, 2, 5, 3, 0, 0, 6, 253,
499 13, 8, 0, 9, 11, 14, 7, 10, 0, 0,
500 0, 0, 0, 0, 0, 15, 16, 0, 22, 20,
501 18, 21, 19, 0, 17, 12, 23, 154, 0, 0,
502 155, 156, 157, 0, 158, 159, 167, 160, 161, 162,
503 163, 164, 165, 166, 0, 24, 25, 27, 28, 31,
504 29, 30, 34, 0, 0, 32, 0, 46, 0, 47,
505 49, 50, 36, 0, 37, 0, 40, 42, 43, 4,
506 26, 245, 114, 252, 0, 137, 0, 0, 150, 144,
507 148, 149, 138, 0, 0, 139, 143, 147, 0, 0,
508 52, 53, 140, 117, 0, 33, 45, 44, 0, 35,
vlmfce48a42004-09-14 02:36:39 +0000509 38, 0, 0, 0, 247, 62, 61, 0, 246, 0,
510 151, 146, 145, 142, 141, 0, 64, 0, 66, 0,
511 0, 0, 48, 5, 41, 0, 249, 248, 114, 252,
512 109, 0, 0, 173, 173, 60, 173, 112, 152, 140,
vlm6a02a8a2004-09-08 00:28:11 +0000513 102, 103, 0, 115, 116, 0, 0, 0, 0, 54,
514 123, 124, 118, 119, 121, 128, 130, 129, 243, 244,
vlmfce48a42004-09-14 02:36:39 +0000515 126, 125, 132, 131, 0, 133, 39, 0, 85, 245,
vlm6a02a8a2004-09-08 00:28:11 +0000516 122, 0, 0, 0, 0, 0, 0, 0, 174, 175,
vlmfce48a42004-09-14 02:36:39 +0000517 0, 0, 101, 0, 153, 245, 245, 65, 68, 67,
vlm6a02a8a2004-09-08 00:28:11 +0000518 203, 204, 200, 0, 199, 205, 0, 58, 0, 0,
519 0, 55, 56, 59, 182, 0, 188, 194, 193, 216,
520 217, 201, 202, 0, 0, 0, 90, 0, 0, 228,
vlmfce48a42004-09-14 02:36:39 +0000521 226, 226, 87, 227, 0, 0, 98, 0, 78, 81,
522 245, 113, 0, 0, 0, 73, 77, 245, 0, 179,
vlma2374a02004-09-14 02:44:07 +0000523 245, 0, 0, 245, 242, 234, 0, 236, 241, 238,
vlm6a02a8a2004-09-08 00:28:11 +0000524 0, 69, 71, 72, 63, 195, 0, 0, 0, 0,
525 0, 51, 0, 170, 171, 168, 169, 0, 0, 172,
526 0, 0, 0, 0, 120, 135, 127, 134, 0, 82,
527 91, 86, 232, 231, 230, 229, 83, 83, 110, 0,
vlmfce48a42004-09-14 02:36:39 +0000528 104, 0, 80, 0, 245, 105, 0, 226, 177, 0,
vlma2374a02004-09-14 02:44:07 +0000529 0, 0, 106, 0, 235, 0, 0, 111, 245, 196,
vlmfce48a42004-09-14 02:36:39 +0000530 197, 192, 190, 0, 218, 187, 57, 183, 184, 185,
531 0, 191, 189, 0, 0, 220, 136, 0, 0, 84,
532 88, 89, 99, 100, 79, 176, 76, 74, 75, 180,
vlma2374a02004-09-14 02:44:07 +0000533 107, 178, 108, 237, 0, 0, 70, 198, 209, 0,
534 207, 173, 186, 0, 222, 224, 219, 0, 92, 233,
535 0, 240, 239, 206, 0, 211, 223, 0, 221, 0,
536 181, 208, 214, 215, 213, 210, 212, 225, 96, 0,
537 94, 97, 93, 95, 0, 0, 0
vlm6a02a8a2004-09-08 00:28:11 +0000538};
539
vlma2374a02004-09-14 02:44:07 +0000540static const short yydefgoto[] = { 395,
vlm6a02a8a2004-09-08 00:28:11 +0000541 3, 4, 8, 9, 13, 14, 25, 26, 27, 55,
542 56, 57, 106, 58, 74, 75, 76, 77, 59, 69,
vlmfce48a42004-09-14 02:36:39 +0000543 70, 60, 100, 211, 212, 213, 61, 126, 127, 261,
544 262, 245, 246, 238, 239, 116, 341, 178, 179, 290,
vlma2374a02004-09-14 02:44:07 +0000545 291, 380, 390, 391, 247, 263, 147, 148, 163, 164,
vlmfce48a42004-09-14 02:36:39 +0000546 180, 181, 62, 172, 225, 173, 287, 149, 103, 151,
vlm6a02a8a2004-09-08 00:28:11 +0000547 152, 278, 279, 281, 188, 189, 190, 249, 250, 215,
vlma2374a02004-09-14 02:44:07 +0000548 268, 216, 217, 218, 360, 361, 386, 387, 219, 220,
549 221, 335, 336, 365, 233, 234, 296, 339, 195, 257,
vlmfce48a42004-09-14 02:36:39 +0000550 258, 222, 235, 119, 153, 104, 223
vlm6a02a8a2004-09-08 00:28:11 +0000551};
552
vlma2374a02004-09-14 02:44:07 +0000553static const short yypact[] = { 254,
554-32768,-32768, 254,-32768, -79,-32768, 13, 7,-32768,-32768,
555-32768,-32768, 35,-32768, -51, 202,-32768,-32768, 61, 20,
556 11, 19, 57, 44, 90, 202,-32768, 23,-32768,-32768,
557-32768,-32768,-32768, 115,-32768,-32768, 351,-32768, 176, 12,
558-32768,-32768,-32768, 174,-32768,-32768,-32768,-32768,-32768,-32768,
559-32768,-32768,-32768,-32768, 151, 351,-32768,-32768,-32768,-32768,
560-32768,-32768,-32768, 220, 565,-32768, 99,-32768, 199,-32768,
561-32768,-32768,-32768, 24,-32768, -20,-32768,-32768,-32768,-32768,
562-32768, -9, 106,-32768, 140,-32768, 145, 163,-32768,-32768,
563-32768,-32768,-32768, 186, 182,-32768,-32768,-32768, 582, 249,
564-32768,-32768,-32768, 143, 278,-32768,-32768,-32768, 228,-32768,
565-32768, 254, 228, 180, 129,-32768,-32768, 428,-32768, 228,
566-32768,-32768,-32768,-32768,-32768, 101,-32768, 147, 191, 195,
567 300, 74,-32768, -79,-32768, 300,-32768,-32768, 105, 214,
568 285, 217, 255, 89, 124,-32768, -40,-32768,-32768, 218,
569-32768,-32768, 221,-32768,-32768, 328, 582, 324, 324, 51,
570-32768,-32768, 222,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
571-32768,-32768,-32768,-32768, 223,-32768,-32768, 142,-32768, 40,
572-32768, 308, 37, 304, 230, 48, 155, 269,-32768, 232,
573 48, 271,-32768, 42,-32768, 26, 237,-32768,-32768,-32768,
574-32768,-32768,-32768, -26,-32768,-32768, 311,-32768, 254, 155,
575 238, 236,-32768, 206, 251, 242, -26,-32768,-32768, 245,
576-32768,-32768,-32768, 300, 346, 324, 256, 300, 320,-32768,
577 5, 5,-32768,-32768, 505, 324, 241, 144,-32768,-32768,
578 237,-32768, 155, 286, 153,-32768,-32768, 237, 246, 171,
579 237, 155, 167, 237,-32768,-32768, 168,-32768,-32768, 252,
580 170,-32768,-32768,-32768,-32768, 248, 265, 82, 266, 250,
581 262,-32768, 51,-32768,-32768,-32768,-32768, 155, 155,-32768,
582 155, 155, 188, 258,-32768,-32768, 369,-32768, 293,-32768,
583-32768,-32768,-32768,-32768,-32768,-32768, 288, 288,-32768, 280,
584-32768, 37,-32768, 270, 237,-32768, 48, 5,-32768, 277,
585 505, 273,-32768, 505,-32768, 54, 280,-32768, 26,-32768,
586 268,-32768,-32768, 60,-32768,-32768,-32768,-32768,-32768,-32768,
587 275,-32768,-32768, 9, 177,-32768,-32768, 282, 346,-32768,
588-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 279,
589-32768,-32768,-32768,-32768, 283, 284,-32768,-32768,-32768, 189,
590-32768, -40,-32768, 324, 272,-32768,-32768, 258,-32768, 369,
591 155,-32768,-32768,-32768, 60, 85, 272, 324,-32768, 94,
592 206,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 14,
593-32768,-32768,-32768,-32768, 392, 394,-32768
vlm6a02a8a2004-09-08 00:28:11 +0000594};
595
596static const short yypgoto[] = {-32768,
vlma2374a02004-09-14 02:44:07 +0000597-32768, 395, 261,-32768,-32768, 389,-32768,-32768, 377,-32768,
598-32768, 348,-32768,-32768,-32768, 333,-32768, 295,-32768,-32768,
599 303,-32768, 344,-32768,-32768, 141,-32768,-32768, 259,-32768,
600 100, 227, 113,-32768, 111,-32768, 123,-32768, 194,-32768,
601-32768,-32768,-32768, 33, -169, -81, -173, -49,-32768, 203,
602 -177, -100,-32768,-32768,-32768, -252, 87, -52, -109,-32768,
603 67,-32768,-32768,-32768, -137,-32768,-32768, -44, -156, -107,
604 211,-32768, -56,-32768,-32768, 55,-32768,-32768,-32768,-32768,
605-32768,-32768, 63, 65, -160,-32768,-32768,-32768,-32768,-32768,
606 116, -125, -71,-32768, 2,-32768, -7
vlm6a02a8a2004-09-08 00:28:11 +0000607};
608
609
vlma2374a02004-09-14 02:44:07 +0000610#define YYLAST 673
vlm6a02a8a2004-09-08 00:28:11 +0000611
612
613static const short yytable[] = { 15,
vlma2374a02004-09-14 02:44:07 +0000614 117, 5, 232, 214, 5, 15, 174, 192, 150, 193,
615 118, 102, 102, 240, 101, 101, 10, 389, 114, 10,
616 10, 11, 1, 2, 7, 112, 161, 162, 67, 65,
617 165, 10, 72, 10, 1, 2, 79, 229, 64, 185,
618 16, 71, 10, 11, 10, 78, 128, 343, 65, 10,
619 169, 170, 161, 162, 19, 10, 201, 64, 10, 169,
620 170, 10, 169, 170, 355, 187, 79, 10, 259, 28,
621 297, 298, 229, 230, 266, 78, 29, 244, 166, 167,
622 168, 10, 169, 170, 1, 2, 267, 201, 113, 10,
623 169, 170, 34, 115, 30, 202, 203, 389, 231, 383,
624 129, 72, 31, 63, 128, 79, 161, 162, 230, 32,
625 71, 204, 155, 134, 78, 265, 214, 12, 393, 68,
626 364, 154, 63, 165, 176, 150, 202, 33, 115, 36,
627 205, 110, 240, 175, 242, 37, 206, 351, 237, 17,
628 353, 322, 115, 255, -226, 207, 256, 349, -226, 237,
629 199, 200, 208, 384, 209, 255, 210, 385, 129, 303,
630 201, 359, 10, 169, 170, 271, 308, 206, 185, 137,
631 328, 329, 295, 330, 344, 241, 294, 171, 248, 311,
632 138, 10, 314, 248, 1, 2, 260, 66, 264, 80,
633 259, 356, 186, 201, 187, 10, 169, 170, 304, 202,
634 203, 150, 392, 185, 150, 156, 107, 312, -250, 157,
635 270, 323, 392, 20, 381, 204, 120, 120, 288, 73,
636 121, 21, 82, 347, 376, 122, 333, 191, 299, 187,
637 83, 84, 202, 123, 205, 10, 124, 331, 1, 2,
638 206, 85, 22, 86, 23, 87, 227, 332, 301, 207,
639 228, 130, 302, 24, 131, 88, 158, 306, 209, 89,
640 210, 307, 125, 90, 1, 2, 91, 274, 275, 276,
641 277, 313, 315, 206, 318, 307, 316, 92, 319, 310,
642 132, 367, 93, 136, 94, 368, 95, 10, 169, 170,
643 1, 2, 176, 374, 241, 96, 97, 375, 160, 248,
644 159, 175, 274, 275, 276, 277, 108, 109, 260, 176,
645 98, 264, 161, 162, 83, 84, 362, -251, 175, 182,
646 183, 194, 184, 99, 196, 201, 366, 10, 169, 170,
647 197, 10, 236, 224, 226, 243, 251, 252, 254, 115,
648 269, 85, 272, 86, 273, 87, 280, 282, 284, 286,
649 289, 300, 309, 305, 325, 88, 366, 317, 10, 89,
650 320, 1, 2, 90, 202, 321, 91, 362, 326, 324,
651 388, 334, 337, 38, 338, 340, 346, 92, 350, 352,
652 358, 363, 93, 378, 94, 369, 95, 371, 39, 372,
653 373, 396, 40, 397, 177, 96, 97, 6, 41, 42,
654 43, 18, 35, 81, 44, 206, 111, 135, 105, 45,
655 98, 133, 345, 327, 46, 198, 47, 253, 357, 348,
656 342, 292, 394, 293, 48, 370, 285, 283, 377, 382,
657 379, 354, 0, 49, 0, 50, 0, 0, 139, 140,
658 51, 0, 52, 53, 54, 141, 0, 0, 0, 85,
659 38, 86, 0, 87, 142, 0, 0, 0, 0, 0,
660 0, 0, 0, 88, 0, 0, 0, 89, 0, 0,
661 0, 90, 0, 0, 91, 41, 42, 43, 0, 0,
662 0, 0, 0, 143, 0, 92, 45, 0, 0, 0,
663 93, 46, 94, 47, 95, 0, 0, 0, 0, 0,
664 0, 48, 0, 96, 97, 144, 145, 0, 0, 0,
665 49, 0, 50, 0, 146, 139, 140, 51, 98, 52,
666 53, 54, 141, 0, 0, 0, 85, 38, 86, 0,
667 87, 142, 0, 0, 0, 0, 0, 0, 0, 0,
668 88, 0, 0, 0, 89, 0, 0, 0, 90, 0,
669 0, 91, 41, 42, 43, 0, 0, 0, 0, 0,
670 143, 0, 92, 45, 0, 0, 0, 93, 46, 94,
671 47, 95, 0, 0, 0, 83, 84, 0, 48, 0,
672 96, 97, 144, 145, 0, 0, 85, 49, 86, 50,
673 87, 0, 1, 2, 51, 98, 52, 53, 54, 0,
674 88, 0, 0, 85, 89, 86, 0, 87, 90, 0,
675 0, 91, 0, 0, 0, 0, 0, 88, 0, 0,
676 0, 89, 92, 0, 0, 90, 0, 93, 91, 94,
677 0, 95, 0, 0, 0, 0, 0, 0, 0, 92,
678 96, 97, 0, 0, 93, 0, 94, 0, 95, 0,
679 0, 0, 0, 0, 0, 98, 0, 96, 97, 0,
vlm6a02a8a2004-09-08 00:28:11 +0000680 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
vlma2374a02004-09-14 02:44:07 +0000681 0, 0, 98
vlm6a02a8a2004-09-08 00:28:11 +0000682};
683
684static const short yycheck[] = { 7,
vlma2374a02004-09-14 02:44:07 +0000685 82, 0, 180, 160, 3, 13, 132, 145, 118, 147,
686 82, 64, 65, 183, 64, 65, 8, 4, 28, 8,
687 8, 9, 11, 12, 104, 46, 13, 14, 17, 37,
688 131, 8, 40, 8, 11, 12, 44, 33, 37, 80,
689 34, 40, 8, 9, 8, 44, 99, 300, 56, 8,
690 9, 10, 13, 14, 106, 8, 6, 56, 8, 9,
691 10, 8, 9, 10, 317, 106, 74, 8, 194, 9,
692 231, 232, 33, 69, 101, 74, 57, 30, 5, 6,
693 7, 8, 9, 10, 11, 12, 113, 6, 109, 8,
694 9, 10, 3, 103, 84, 45, 46, 4, 180, 15,
695 99, 109, 84, 37, 157, 113, 13, 14, 69, 53,
696 109, 61, 120, 112, 113, 197, 273, 105, 105, 108,
697 112, 120, 56, 224, 132, 235, 45, 84, 103, 107,
698 80, 108, 302, 132, 184, 21, 86, 311, 102, 105,
699 314, 60, 103, 102, 105, 95, 105, 308, 109, 102,
700 158, 159, 102, 69, 104, 102, 106, 73, 157, 241,
701 6, 102, 8, 9, 10, 210, 248, 86, 80, 41,
702 278, 279, 229, 281, 300, 183, 229, 104, 186, 251,
703 52, 8, 254, 191, 11, 12, 194, 12, 196, 39,
704 316, 317, 104, 6, 106, 8, 9, 10, 243, 45,
705 46, 311, 380, 80, 314, 105, 108, 252, 104, 109,
706 209, 268, 390, 12, 371, 61, 112, 112, 226, 46,
707 81, 20, 3, 305, 362, 81, 283, 104, 236, 106,
708 11, 12, 45, 71, 80, 8, 51, 282, 11, 12,
709 86, 22, 41, 24, 43, 26, 105, 60, 105, 95,
710 109, 3, 109, 52, 112, 36, 110, 105, 104, 40,
711 106, 109, 81, 44, 11, 12, 47, 97, 98, 99,
712 100, 105, 105, 86, 105, 109, 109, 58, 109, 109,
713 3, 105, 63, 104, 65, 109, 67, 8, 9, 10,
714 11, 12, 300, 105, 302, 76, 77, 109, 104, 307,
715 110, 300, 97, 98, 99, 100, 108, 109, 316, 317,
716 91, 319, 13, 14, 11, 12, 324, 104, 317, 35,
717 104, 104, 68, 104, 104, 6, 334, 8, 9, 10,
718 3, 8, 25, 112, 112, 106, 68, 106, 68, 103,
719 30, 22, 105, 24, 109, 26, 96, 106, 104, 4,
720 95, 111, 107, 68, 105, 36, 364, 106, 8, 40,
721 113, 11, 12, 44, 45, 101, 47, 375, 107, 104,
722 378, 114, 4, 23, 82, 88, 107, 58, 102, 107,
723 113, 107, 63, 112, 65, 104, 67, 109, 38, 107,
724 107, 0, 42, 0, 134, 76, 77, 3, 48, 49,
725 50, 13, 26, 56, 54, 86, 74, 113, 65, 59,
726 91, 109, 302, 273, 64, 157, 66, 191, 319, 307,
727 298, 228, 390, 104, 74, 339, 224, 217, 364, 375,
728 368, 316, -1, 83, -1, 85, -1, -1, 11, 12,
729 90, -1, 92, 93, 94, 18, -1, -1, -1, 22,
730 23, 24, -1, 26, 27, -1, -1, -1, -1, -1,
731 -1, -1, -1, 36, -1, -1, -1, 40, -1, -1,
732 -1, 44, -1, -1, 47, 48, 49, 50, -1, -1,
733 -1, -1, -1, 56, -1, 58, 59, -1, -1, -1,
734 63, 64, 65, 66, 67, -1, -1, -1, -1, -1,
735 -1, 74, -1, 76, 77, 78, 79, -1, -1, -1,
736 83, -1, 85, -1, 87, 11, 12, 90, 91, 92,
737 93, 94, 18, -1, -1, -1, 22, 23, 24, -1,
738 26, 27, -1, -1, -1, -1, -1, -1, -1, -1,
739 36, -1, -1, -1, 40, -1, -1, -1, 44, -1,
740 -1, 47, 48, 49, 50, -1, -1, -1, -1, -1,
741 56, -1, 58, 59, -1, -1, -1, 63, 64, 65,
742 66, 67, -1, -1, -1, 11, 12, -1, 74, -1,
743 76, 77, 78, 79, -1, -1, 22, 83, 24, 85,
744 26, -1, 11, 12, 90, 91, 92, 93, 94, -1,
745 36, -1, -1, 22, 40, 24, -1, 26, 44, -1,
746 -1, 47, -1, -1, -1, -1, -1, 36, -1, -1,
747 -1, 40, 58, -1, -1, 44, -1, 63, 47, 65,
748 -1, 67, -1, -1, -1, -1, -1, -1, -1, 58,
749 76, 77, -1, -1, 63, -1, 65, -1, 67, -1,
750 -1, -1, -1, -1, -1, 91, -1, 76, 77, -1,
vlm6a02a8a2004-09-08 00:28:11 +0000751 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
vlma2374a02004-09-14 02:44:07 +0000752 -1, -1, 91
vlm6a02a8a2004-09-08 00:28:11 +0000753};
754/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
755#line 3 "/usr/share/bison.simple"
756/* This file comes from bison-1.28. */
757
758/* Skeleton output parser for bison,
759 Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
760
761 This program is free software; you can redistribute it and/or modify
762 it under the terms of the GNU General Public License as published by
763 the Free Software Foundation; either version 2, or (at your option)
764 any later version.
765
766 This program is distributed in the hope that it will be useful,
767 but WITHOUT ANY WARRANTY; without even the implied warranty of
768 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
769 GNU General Public License for more details.
770
771 You should have received a copy of the GNU General Public License
772 along with this program; if not, write to the Free Software
773 Foundation, Inc., 59 Temple Place - Suite 330,
774 Boston, MA 02111-1307, USA. */
775
776/* As a special exception, when this file is copied by Bison into a
777 Bison output file, you may use that output file without restriction.
778 This special exception was added by the Free Software Foundation
779 in version 1.24 of Bison. */
780
781/* This is the parser code that is written into each bison parser
782 when the %semantic_parser declaration is not specified in the grammar.
783 It was written by Richard Stallman by simplifying the hairy parser
784 used when %semantic_parser is specified. */
785
786#ifndef YYSTACK_USE_ALLOCA
787#ifdef alloca
788#define YYSTACK_USE_ALLOCA
789#else /* alloca not defined */
790#ifdef __GNUC__
791#define YYSTACK_USE_ALLOCA
792#define alloca __builtin_alloca
793#else /* not GNU C. */
794#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
795#define YYSTACK_USE_ALLOCA
796#include <alloca.h>
797#else /* not sparc */
798/* We think this test detects Watcom and Microsoft C. */
799/* This used to test MSDOS, but that is a bad idea
800 since that symbol is in the user namespace. */
801#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
802#if 0 /* No need for malloc.h, which pollutes the namespace;
803 instead, just don't use alloca. */
804#include <malloc.h>
805#endif
806#else /* not MSDOS, or __TURBOC__ */
807#if defined(_AIX)
808/* I don't know what this was needed for, but it pollutes the namespace.
809 So I turned it off. rms, 2 May 1997. */
810/* #include <malloc.h> */
811 #pragma alloca
812#define YYSTACK_USE_ALLOCA
813#else /* not MSDOS, or __TURBOC__, or _AIX */
814#if 0
815#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
816 and on HPUX 10. Eventually we can turn this on. */
817#define YYSTACK_USE_ALLOCA
818#define alloca __builtin_alloca
819#endif /* __hpux */
820#endif
821#endif /* not _AIX */
822#endif /* not MSDOS, or __TURBOC__ */
823#endif /* not sparc */
824#endif /* not GNU C */
825#endif /* alloca not defined */
826#endif /* YYSTACK_USE_ALLOCA not defined */
827
828#ifdef YYSTACK_USE_ALLOCA
829#define YYSTACK_ALLOC alloca
vlmfa67ddc2004-06-03 03:38:44 +0000830#else
vlm6a02a8a2004-09-08 00:28:11 +0000831#define YYSTACK_ALLOC malloc
vlmfa67ddc2004-06-03 03:38:44 +0000832#endif
833
vlm6a02a8a2004-09-08 00:28:11 +0000834/* Note: there must be only one dollar sign in this file.
835 It is replaced by the list of actions, each action
836 as one case of the switch. */
vlmfa67ddc2004-06-03 03:38:44 +0000837
838#define yyerrok (yyerrstatus = 0)
839#define yyclearin (yychar = YYEMPTY)
840#define YYEMPTY -2
841#define YYEOF 0
842#define YYACCEPT goto yyacceptlab
vlm6a02a8a2004-09-08 00:28:11 +0000843#define YYABORT goto yyabortlab
vlmfa67ddc2004-06-03 03:38:44 +0000844#define YYERROR goto yyerrlab1
vlm6a02a8a2004-09-08 00:28:11 +0000845/* Like YYERROR except do call yyerror.
846 This remains here temporarily to ease the
847 transition to the new meaning of YYERROR, for GCC.
vlmfa67ddc2004-06-03 03:38:44 +0000848 Once GCC version 2 has supplanted version 1, this can go. */
849#define YYFAIL goto yyerrlab
850#define YYRECOVERING() (!!yyerrstatus)
vlm6a02a8a2004-09-08 00:28:11 +0000851#define YYBACKUP(token, value) \
vlmfa67ddc2004-06-03 03:38:44 +0000852do \
853 if (yychar == YYEMPTY && yylen == 1) \
vlm6a02a8a2004-09-08 00:28:11 +0000854 { yychar = (token), yylval = (value); \
vlmfa67ddc2004-06-03 03:38:44 +0000855 yychar1 = YYTRANSLATE (yychar); \
856 YYPOPSTACK; \
857 goto yybackup; \
858 } \
859 else \
vlm6a02a8a2004-09-08 00:28:11 +0000860 { yyerror ("syntax error: cannot back up"); YYERROR; } \
vlmfa67ddc2004-06-03 03:38:44 +0000861while (0)
862
863#define YYTERROR 1
864#define YYERRCODE 256
865
vlm6a02a8a2004-09-08 00:28:11 +0000866#ifndef YYPURE
867#define YYLEX yylex()
vlmfa67ddc2004-06-03 03:38:44 +0000868#endif
869
vlm6a02a8a2004-09-08 00:28:11 +0000870#ifdef YYPURE
871#ifdef YYLSP_NEEDED
872#ifdef YYLEX_PARAM
873#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
874#else
875#define YYLEX yylex(&yylval, &yylloc)
876#endif
877#else /* not YYLSP_NEEDED */
878#ifdef YYLEX_PARAM
879#define YYLEX yylex(&yylval, YYLEX_PARAM)
880#else
881#define YYLEX yylex(&yylval)
882#endif
883#endif /* not YYLSP_NEEDED */
884#endif
vlmfa67ddc2004-06-03 03:38:44 +0000885
vlm6a02a8a2004-09-08 00:28:11 +0000886/* If nonreentrant, generate the variables here */
vlmfa67ddc2004-06-03 03:38:44 +0000887
vlm6a02a8a2004-09-08 00:28:11 +0000888#ifndef YYPURE
vlmfa67ddc2004-06-03 03:38:44 +0000889
vlm6a02a8a2004-09-08 00:28:11 +0000890int yychar; /* the lookahead symbol */
891YYSTYPE yylval; /* the semantic value of the */
892 /* lookahead symbol */
vlmfa67ddc2004-06-03 03:38:44 +0000893
vlm6a02a8a2004-09-08 00:28:11 +0000894#ifdef YYLSP_NEEDED
895YYLTYPE yylloc; /* location data for the lookahead */
896 /* symbol */
897#endif
vlmfa67ddc2004-06-03 03:38:44 +0000898
vlm6a02a8a2004-09-08 00:28:11 +0000899int yynerrs; /* number of parse errors so far */
900#endif /* not YYPURE */
901
902#if YYDEBUG != 0
903int yydebug; /* nonzero means print parse trace */
904/* Since this is uninitialized, it does not stop multiple parsers
905 from coexisting. */
906#endif
907
908/* YYINITDEPTH indicates the initial size of the parser's stacks */
909
vlmfa67ddc2004-06-03 03:38:44 +0000910#ifndef YYINITDEPTH
vlm6a02a8a2004-09-08 00:28:11 +0000911#define YYINITDEPTH 200
vlmfa67ddc2004-06-03 03:38:44 +0000912#endif
913
vlm6a02a8a2004-09-08 00:28:11 +0000914/* YYMAXDEPTH is the maximum size the stacks can grow to
915 (effective only if the built-in stack extension method is used). */
vlmfa67ddc2004-06-03 03:38:44 +0000916
917#if YYMAXDEPTH == 0
vlm6a02a8a2004-09-08 00:28:11 +0000918#undef YYMAXDEPTH
vlmfa67ddc2004-06-03 03:38:44 +0000919#endif
920
921#ifndef YYMAXDEPTH
vlm6a02a8a2004-09-08 00:28:11 +0000922#define YYMAXDEPTH 10000
vlmfa67ddc2004-06-03 03:38:44 +0000923#endif
924
vlm6a02a8a2004-09-08 00:28:11 +0000925/* Define __yy_memcpy. Note that the size argument
926 should be passed with type unsigned int, because that is what the non-GCC
927 definitions require. With GCC, __builtin_memcpy takes an arg
928 of type size_t, but it can handle unsigned int. */
vlmfa67ddc2004-06-03 03:38:44 +0000929
vlm6a02a8a2004-09-08 00:28:11 +0000930#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
931#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
932#else /* not GNU C or C++ */
933#ifndef __cplusplus
vlmfa67ddc2004-06-03 03:38:44 +0000934
vlm6a02a8a2004-09-08 00:28:11 +0000935/* This is the most reliable way to avoid incompatibilities
936 in available built-in functions on various systems. */
vlm80103492004-09-07 10:39:09 +0000937static void
vlm6a02a8a2004-09-08 00:28:11 +0000938__yy_memcpy (to, from, count)
939 char *to;
940 char *from;
941 unsigned int count;
vlm80103492004-09-07 10:39:09 +0000942{
vlm6a02a8a2004-09-08 00:28:11 +0000943 register char *f = from;
944 register char *t = to;
945 register int i = count;
vlm80103492004-09-07 10:39:09 +0000946
vlm6a02a8a2004-09-08 00:28:11 +0000947 while (i-- > 0)
948 *t++ = *f++;
vlm80103492004-09-07 10:39:09 +0000949}
vlm80103492004-09-07 10:39:09 +0000950
vlm6a02a8a2004-09-08 00:28:11 +0000951#else /* __cplusplus */
vlm80103492004-09-07 10:39:09 +0000952
vlm6a02a8a2004-09-08 00:28:11 +0000953/* This is the most reliable way to avoid incompatibilities
954 in available built-in functions on various systems. */
vlm80103492004-09-07 10:39:09 +0000955static void
vlm6a02a8a2004-09-08 00:28:11 +0000956__yy_memcpy (char *to, char *from, unsigned int count)
vlm80103492004-09-07 10:39:09 +0000957{
vlm6a02a8a2004-09-08 00:28:11 +0000958 register char *t = to;
959 register char *f = from;
960 register int i = count;
vlm80103492004-09-07 10:39:09 +0000961
vlm6a02a8a2004-09-08 00:28:11 +0000962 while (i-- > 0)
963 *t++ = *f++;
vlm044f7442004-09-04 04:49:21 +0000964}
vlm044f7442004-09-04 04:49:21 +0000965
vlm6a02a8a2004-09-08 00:28:11 +0000966#endif
967#endif
vlmfa67ddc2004-06-03 03:38:44 +0000968
vlm6a02a8a2004-09-08 00:28:11 +0000969#line 217 "/usr/share/bison.simple"
vlmfa67ddc2004-06-03 03:38:44 +0000970
971/* The user can define YYPARSE_PARAM as the name of an argument to be passed
972 into yyparse. The argument should have type void *.
973 It should actually point to an object.
974 Grammar actions can access the variable by casting it
975 to the proper pointer type. */
976
977#ifdef YYPARSE_PARAM
vlm6a02a8a2004-09-08 00:28:11 +0000978#ifdef __cplusplus
979#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
980#define YYPARSE_PARAM_DECL
981#else /* not __cplusplus */
982#define YYPARSE_PARAM_ARG YYPARSE_PARAM
983#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
984#endif /* not __cplusplus */
985#else /* not YYPARSE_PARAM */
986#define YYPARSE_PARAM_ARG
987#define YYPARSE_PARAM_DECL
988#endif /* not YYPARSE_PARAM */
vlmfa67ddc2004-06-03 03:38:44 +0000989
990/* Prevent warning if -Wstrict-prototypes. */
991#ifdef __GNUC__
vlm6a02a8a2004-09-08 00:28:11 +0000992#ifdef YYPARSE_PARAM
vlmfa67ddc2004-06-03 03:38:44 +0000993int yyparse (void *);
vlm6a02a8a2004-09-08 00:28:11 +0000994#else
vlmfa67ddc2004-06-03 03:38:44 +0000995int yyparse (void);
vlm6a02a8a2004-09-08 00:28:11 +0000996#endif
vlm39e5ed72004-09-05 10:40:41 +0000997#endif
vlm80103492004-09-07 10:39:09 +0000998
vlmfa67ddc2004-06-03 03:38:44 +0000999int
vlm6a02a8a2004-09-08 00:28:11 +00001000yyparse(YYPARSE_PARAM_ARG)
vlmfa67ddc2004-06-03 03:38:44 +00001001 YYPARSE_PARAM_DECL
1002{
1003 register int yystate;
1004 register int yyn;
1005 register short *yyssp;
1006 register YYSTYPE *yyvsp;
vlm6a02a8a2004-09-08 00:28:11 +00001007 int yyerrstatus; /* number of tokens to shift before error messages enabled */
1008 int yychar1 = 0; /* lookahead token as an internal (translated) token number */
vlmfa67ddc2004-06-03 03:38:44 +00001009
vlm6a02a8a2004-09-08 00:28:11 +00001010 short yyssa[YYINITDEPTH]; /* the state stack */
1011 YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
vlmfa67ddc2004-06-03 03:38:44 +00001012
vlm6a02a8a2004-09-08 00:28:11 +00001013 short *yyss = yyssa; /* refer to the stacks thru separate pointers */
1014 YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
vlmfa67ddc2004-06-03 03:38:44 +00001015
vlm6a02a8a2004-09-08 00:28:11 +00001016#ifdef YYLSP_NEEDED
1017 YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
1018 YYLTYPE *yyls = yylsa;
1019 YYLTYPE *yylsp;
1020
1021#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
1022#else
vlmfa67ddc2004-06-03 03:38:44 +00001023#define YYPOPSTACK (yyvsp--, yyssp--)
vlm6a02a8a2004-09-08 00:28:11 +00001024#endif
vlmfa67ddc2004-06-03 03:38:44 +00001025
vlm6a02a8a2004-09-08 00:28:11 +00001026 int yystacksize = YYINITDEPTH;
1027 int yyfree_stacks = 0;
vlmfa67ddc2004-06-03 03:38:44 +00001028
vlm6a02a8a2004-09-08 00:28:11 +00001029#ifdef YYPURE
1030 int yychar;
1031 YYSTYPE yylval;
1032 int yynerrs;
1033#ifdef YYLSP_NEEDED
1034 YYLTYPE yylloc;
1035#endif
1036#endif
vlmfa67ddc2004-06-03 03:38:44 +00001037
vlm6a02a8a2004-09-08 00:28:11 +00001038 YYSTYPE yyval; /* the variable used to return */
1039 /* semantic values from the action */
1040 /* routines */
vlmfa67ddc2004-06-03 03:38:44 +00001041
1042 int yylen;
1043
vlm6a02a8a2004-09-08 00:28:11 +00001044#if YYDEBUG != 0
1045 if (yydebug)
1046 fprintf(stderr, "Starting parse\n");
1047#endif
vlmfa67ddc2004-06-03 03:38:44 +00001048
1049 yystate = 0;
1050 yyerrstatus = 0;
1051 yynerrs = 0;
1052 yychar = YYEMPTY; /* Cause a token to be read. */
1053
1054 /* Initialize stack pointers.
1055 Waste one element of value and location stack
1056 so that they stay on the same level as the state stack.
1057 The wasted elements are never initialized. */
1058
vlm6a02a8a2004-09-08 00:28:11 +00001059 yyssp = yyss - 1;
vlmfa67ddc2004-06-03 03:38:44 +00001060 yyvsp = yyvs;
vlm6a02a8a2004-09-08 00:28:11 +00001061#ifdef YYLSP_NEEDED
1062 yylsp = yyls;
1063#endif
vlmfa67ddc2004-06-03 03:38:44 +00001064
vlm6a02a8a2004-09-08 00:28:11 +00001065/* Push a new state, which is found in yystate . */
1066/* In all cases, when you get here, the value and location stacks
1067 have just been pushed. so pushing a state here evens the stacks. */
1068yynewstate:
vlmfa67ddc2004-06-03 03:38:44 +00001069
vlm6a02a8a2004-09-08 00:28:11 +00001070 *++yyssp = yystate;
vlmfa67ddc2004-06-03 03:38:44 +00001071
1072 if (yyssp >= yyss + yystacksize - 1)
1073 {
vlm6a02a8a2004-09-08 00:28:11 +00001074 /* Give user a chance to reallocate the stack */
1075 /* Use copies of these so that the &'s don't force the real ones into memory. */
1076 YYSTYPE *yyvs1 = yyvs;
1077 short *yyss1 = yyss;
1078#ifdef YYLSP_NEEDED
1079 YYLTYPE *yyls1 = yyls;
1080#endif
1081
vlmfa67ddc2004-06-03 03:38:44 +00001082 /* Get the current used size of the three stacks, in elements. */
vlm6a02a8a2004-09-08 00:28:11 +00001083 int size = yyssp - yyss + 1;
vlmfa67ddc2004-06-03 03:38:44 +00001084
1085#ifdef yyoverflow
vlm6a02a8a2004-09-08 00:28:11 +00001086 /* Each stack pointer address is followed by the size of
1087 the data in use in that stack, in bytes. */
1088#ifdef YYLSP_NEEDED
1089 /* This used to be a conditional around just the two extra args,
1090 but that might be undefined if yyoverflow is a macro. */
1091 yyoverflow("parser stack overflow",
1092 &yyss1, size * sizeof (*yyssp),
1093 &yyvs1, size * sizeof (*yyvsp),
1094 &yyls1, size * sizeof (*yylsp),
1095 &yystacksize);
1096#else
1097 yyoverflow("parser stack overflow",
1098 &yyss1, size * sizeof (*yyssp),
1099 &yyvs1, size * sizeof (*yyvsp),
1100 &yystacksize);
1101#endif
vlmfa67ddc2004-06-03 03:38:44 +00001102
vlm6a02a8a2004-09-08 00:28:11 +00001103 yyss = yyss1; yyvs = yyvs1;
1104#ifdef YYLSP_NEEDED
1105 yyls = yyls1;
1106#endif
vlmfa67ddc2004-06-03 03:38:44 +00001107#else /* no yyoverflow */
1108 /* Extend the stack our own way. */
1109 if (yystacksize >= YYMAXDEPTH)
vlm6a02a8a2004-09-08 00:28:11 +00001110 {
1111 yyerror("parser stack overflow");
1112 if (yyfree_stacks)
1113 {
1114 free (yyss);
1115 free (yyvs);
1116#ifdef YYLSP_NEEDED
1117 free (yyls);
1118#endif
1119 }
1120 return 2;
1121 }
vlmfa67ddc2004-06-03 03:38:44 +00001122 yystacksize *= 2;
1123 if (yystacksize > YYMAXDEPTH)
1124 yystacksize = YYMAXDEPTH;
vlm6a02a8a2004-09-08 00:28:11 +00001125#ifndef YYSTACK_USE_ALLOCA
1126 yyfree_stacks = 1;
1127#endif
1128 yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
1129 __yy_memcpy ((char *)yyss, (char *)yyss1,
1130 size * (unsigned int) sizeof (*yyssp));
1131 yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
1132 __yy_memcpy ((char *)yyvs, (char *)yyvs1,
1133 size * (unsigned int) sizeof (*yyvsp));
1134#ifdef YYLSP_NEEDED
1135 yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
1136 __yy_memcpy ((char *)yyls, (char *)yyls1,
1137 size * (unsigned int) sizeof (*yylsp));
1138#endif
vlmfa67ddc2004-06-03 03:38:44 +00001139#endif /* no yyoverflow */
1140
vlm6a02a8a2004-09-08 00:28:11 +00001141 yyssp = yyss + size - 1;
1142 yyvsp = yyvs + size - 1;
1143#ifdef YYLSP_NEEDED
1144 yylsp = yyls + size - 1;
1145#endif
vlmfa67ddc2004-06-03 03:38:44 +00001146
vlm6a02a8a2004-09-08 00:28:11 +00001147#if YYDEBUG != 0
1148 if (yydebug)
1149 fprintf(stderr, "Stack size increased to %d\n", yystacksize);
1150#endif
vlmfa67ddc2004-06-03 03:38:44 +00001151
1152 if (yyssp >= yyss + yystacksize - 1)
1153 YYABORT;
1154 }
1155
vlm6a02a8a2004-09-08 00:28:11 +00001156#if YYDEBUG != 0
1157 if (yydebug)
1158 fprintf(stderr, "Entering state %d\n", yystate);
1159#endif
vlmfa67ddc2004-06-03 03:38:44 +00001160
1161 goto yybackup;
vlm6a02a8a2004-09-08 00:28:11 +00001162 yybackup:
vlmfa67ddc2004-06-03 03:38:44 +00001163
1164/* Do appropriate processing given the current state. */
1165/* Read a lookahead token if we need one and don't already have one. */
1166/* yyresume: */
1167
1168 /* First try to decide what to do without reference to lookahead token. */
1169
1170 yyn = yypact[yystate];
vlm6a02a8a2004-09-08 00:28:11 +00001171 if (yyn == YYFLAG)
vlmfa67ddc2004-06-03 03:38:44 +00001172 goto yydefault;
1173
1174 /* Not known => get a lookahead token if don't already have one. */
1175
1176 /* yychar is either YYEMPTY or YYEOF
1177 or a valid token in external form. */
1178
1179 if (yychar == YYEMPTY)
1180 {
vlm6a02a8a2004-09-08 00:28:11 +00001181#if YYDEBUG != 0
1182 if (yydebug)
1183 fprintf(stderr, "Reading a token: ");
1184#endif
vlmfa67ddc2004-06-03 03:38:44 +00001185 yychar = YYLEX;
1186 }
1187
vlm6a02a8a2004-09-08 00:28:11 +00001188 /* Convert token to internal form (in yychar1) for indexing tables with */
vlmfa67ddc2004-06-03 03:38:44 +00001189
vlm6a02a8a2004-09-08 00:28:11 +00001190 if (yychar <= 0) /* This means end of input. */
vlmfa67ddc2004-06-03 03:38:44 +00001191 {
1192 yychar1 = 0;
vlm6a02a8a2004-09-08 00:28:11 +00001193 yychar = YYEOF; /* Don't call YYLEX any more */
vlmfa67ddc2004-06-03 03:38:44 +00001194
vlm6a02a8a2004-09-08 00:28:11 +00001195#if YYDEBUG != 0
1196 if (yydebug)
1197 fprintf(stderr, "Now at end of input.\n");
1198#endif
vlmfa67ddc2004-06-03 03:38:44 +00001199 }
1200 else
1201 {
vlm6a02a8a2004-09-08 00:28:11 +00001202 yychar1 = YYTRANSLATE(yychar);
vlmfa67ddc2004-06-03 03:38:44 +00001203
vlm6a02a8a2004-09-08 00:28:11 +00001204#if YYDEBUG != 0
1205 if (yydebug)
1206 {
1207 fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
1208 /* Give the individual parser a way to print the precise meaning
1209 of a token, for further debugging info. */
1210#ifdef YYPRINT
1211 YYPRINT (stderr, yychar, yylval);
1212#endif
1213 fprintf (stderr, ")\n");
1214 }
1215#endif
vlmfa67ddc2004-06-03 03:38:44 +00001216 }
1217
1218 yyn += yychar1;
vlm6a02a8a2004-09-08 00:28:11 +00001219 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
vlmfa67ddc2004-06-03 03:38:44 +00001220 goto yydefault;
vlm6a02a8a2004-09-08 00:28:11 +00001221
vlmfa67ddc2004-06-03 03:38:44 +00001222 yyn = yytable[yyn];
vlm6a02a8a2004-09-08 00:28:11 +00001223
1224 /* yyn is what to do for this token type in this state.
1225 Negative => reduce, -yyn is rule number.
1226 Positive => shift, yyn is new state.
1227 New state is final state => don't bother to shift,
1228 just return success.
1229 0, or most negative number => error. */
1230
1231 if (yyn < 0)
vlmfa67ddc2004-06-03 03:38:44 +00001232 {
vlm6a02a8a2004-09-08 00:28:11 +00001233 if (yyn == YYFLAG)
vlmfa67ddc2004-06-03 03:38:44 +00001234 goto yyerrlab;
1235 yyn = -yyn;
1236 goto yyreduce;
1237 }
vlm6a02a8a2004-09-08 00:28:11 +00001238 else if (yyn == 0)
1239 goto yyerrlab;
vlmfa67ddc2004-06-03 03:38:44 +00001240
1241 if (yyn == YYFINAL)
1242 YYACCEPT;
1243
1244 /* Shift the lookahead token. */
vlm6a02a8a2004-09-08 00:28:11 +00001245
1246#if YYDEBUG != 0
1247 if (yydebug)
1248 fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
1249#endif
vlmfa67ddc2004-06-03 03:38:44 +00001250
1251 /* Discard the token being shifted unless it is eof. */
1252 if (yychar != YYEOF)
1253 yychar = YYEMPTY;
1254
1255 *++yyvsp = yylval;
vlm6a02a8a2004-09-08 00:28:11 +00001256#ifdef YYLSP_NEEDED
1257 *++yylsp = yylloc;
1258#endif
vlmfa67ddc2004-06-03 03:38:44 +00001259
vlm6a02a8a2004-09-08 00:28:11 +00001260 /* count tokens shifted since error; after three, turn off error status. */
1261 if (yyerrstatus) yyerrstatus--;
vlmfa67ddc2004-06-03 03:38:44 +00001262
1263 yystate = yyn;
1264 goto yynewstate;
1265
vlm6a02a8a2004-09-08 00:28:11 +00001266/* Do the default action for the current state. */
vlm80103492004-09-07 10:39:09 +00001267yydefault:
vlm6a02a8a2004-09-08 00:28:11 +00001268
vlmfa67ddc2004-06-03 03:38:44 +00001269 yyn = yydefact[yystate];
1270 if (yyn == 0)
1271 goto yyerrlab;
1272
vlm6a02a8a2004-09-08 00:28:11 +00001273/* Do a reduction. yyn is the number of a rule to reduce with. */
vlmfa67ddc2004-06-03 03:38:44 +00001274yyreduce:
1275 yylen = yyr2[yyn];
vlm6a02a8a2004-09-08 00:28:11 +00001276 if (yylen > 0)
1277 yyval = yyvsp[1-yylen]; /* implement default value of the action */
vlmfa67ddc2004-06-03 03:38:44 +00001278
vlm6a02a8a2004-09-08 00:28:11 +00001279#if YYDEBUG != 0
vlmfa67ddc2004-06-03 03:38:44 +00001280 if (yydebug)
1281 {
vlm6a02a8a2004-09-08 00:28:11 +00001282 int i;
vlmfa67ddc2004-06-03 03:38:44 +00001283
vlm6a02a8a2004-09-08 00:28:11 +00001284 fprintf (stderr, "Reducing via rule %d (line %d), ",
1285 yyn, yyrline[yyn]);
vlmfa67ddc2004-06-03 03:38:44 +00001286
1287 /* Print the symbols being reduced, and their result. */
vlm6a02a8a2004-09-08 00:28:11 +00001288 for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
1289 fprintf (stderr, "%s ", yytname[yyrhs[i]]);
1290 fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
vlmfa67ddc2004-06-03 03:38:44 +00001291 }
1292#endif
vlm80103492004-09-07 10:39:09 +00001293
vlm6a02a8a2004-09-08 00:28:11 +00001294
1295 switch (yyn) {
1296
1297case 1:
vlmfce48a42004-09-14 02:36:39 +00001298#line 300 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001299{
1300 *(void **)param = yyvsp[0].a_grammar;
1301 ;
1302 break;}
1303case 2:
vlmfce48a42004-09-14 02:36:39 +00001304#line 306 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001305{
vlmfa67ddc2004-06-03 03:38:44 +00001306 yyval.a_grammar = asn1p_new();
1307 checkmem(yyval.a_grammar);
1308 TQ_ADD(&(yyval.a_grammar->modules), yyvsp[0].a_module, mod_next);
vlm6a02a8a2004-09-08 00:28:11 +00001309 ;
1310 break;}
1311case 3:
vlmfce48a42004-09-14 02:36:39 +00001312#line 311 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001313{
vlmfa67ddc2004-06-03 03:38:44 +00001314 yyval.a_grammar = yyvsp[-1].a_grammar;
1315 TQ_ADD(&(yyval.a_grammar->modules), yyvsp[0].a_module, mod_next);
vlm6a02a8a2004-09-08 00:28:11 +00001316 ;
1317 break;}
1318case 4:
vlmfce48a42004-09-14 02:36:39 +00001319#line 332 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001320{
vlmfa67ddc2004-06-03 03:38:44 +00001321
1322 if(yyvsp[-1].a_module) {
1323 yyval.a_module = yyvsp[-1].a_module;
1324 } else {
1325 /* There's a chance that a module is just plain empty */
1326 yyval.a_module = asn1p_module_new();
1327 }
1328 checkmem(yyval.a_module);
1329
1330 yyval.a_module->Identifier = yyvsp[-7].tv_str;
1331 yyval.a_module->module_oid = yyvsp[-6].a_oid;
1332 yyval.a_module->module_flags = yyvsp[-4].a_module_flags;
vlm6a02a8a2004-09-08 00:28:11 +00001333 ;
1334 break;}
1335case 5:
vlmfce48a42004-09-14 02:36:39 +00001336#line 353 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001337{ yyval.a_oid = 0; ;
1338 break;}
1339case 6:
vlmfce48a42004-09-14 02:36:39 +00001340#line 354 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001341{ yyval.a_oid = yyvsp[0].a_oid; ;
1342 break;}
1343case 7:
vlmfce48a42004-09-14 02:36:39 +00001344#line 358 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001345{
vlmfa67ddc2004-06-03 03:38:44 +00001346 yyval.a_oid = yyvsp[-1].a_oid;
vlm6a02a8a2004-09-08 00:28:11 +00001347 ;
1348 break;}
1349case 8:
vlmfce48a42004-09-14 02:36:39 +00001350#line 361 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001351{
vlmfa67ddc2004-06-03 03:38:44 +00001352 yyval.a_oid = 0;
vlm6a02a8a2004-09-08 00:28:11 +00001353 ;
1354 break;}
1355case 9:
vlmfce48a42004-09-14 02:36:39 +00001356#line 367 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001357{
vlmfa67ddc2004-06-03 03:38:44 +00001358 yyval.a_oid = asn1p_oid_new();
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 10:
vlmfce48a42004-09-14 02:36:39 +00001365#line 373 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001366{
vlmfa67ddc2004-06-03 03:38:44 +00001367 yyval.a_oid = yyvsp[-1].a_oid;
1368 asn1p_oid_add_arc(yyval.a_oid, &yyvsp[0].a_oid_arc);
1369 if(yyvsp[0].a_oid_arc.name)
1370 free(yyvsp[0].a_oid_arc.name);
vlm6a02a8a2004-09-08 00:28:11 +00001371 ;
1372 break;}
1373case 11:
vlmfce48a42004-09-14 02:36:39 +00001374#line 382 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001375{ /* iso */
vlmfa67ddc2004-06-03 03:38:44 +00001376 yyval.a_oid_arc.name = yyvsp[0].tv_str;
1377 yyval.a_oid_arc.number = -1;
vlm6a02a8a2004-09-08 00:28:11 +00001378 ;
1379 break;}
1380case 12:
vlmfce48a42004-09-14 02:36:39 +00001381#line 386 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001382{ /* iso(1) */
vlmfa67ddc2004-06-03 03:38:44 +00001383 yyval.a_oid_arc.name = yyvsp[-3].tv_str;
1384 yyval.a_oid_arc.number = yyvsp[-1].a_int;
vlm6a02a8a2004-09-08 00:28:11 +00001385 ;
1386 break;}
1387case 13:
vlmfce48a42004-09-14 02:36:39 +00001388#line 390 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001389{ /* 1 */
vlmfa67ddc2004-06-03 03:38:44 +00001390 yyval.a_oid_arc.name = 0;
1391 yyval.a_oid_arc.number = yyvsp[0].a_int;
vlm6a02a8a2004-09-08 00:28:11 +00001392 ;
1393 break;}
1394case 14:
vlmfce48a42004-09-14 02:36:39 +00001395#line 400 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001396{ yyval.a_module_flags = MSF_NOFLAGS; ;
1397 break;}
1398case 15:
vlmfce48a42004-09-14 02:36:39 +00001399#line 401 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001400{
vlmfa67ddc2004-06-03 03:38:44 +00001401 yyval.a_module_flags = yyvsp[0].a_module_flags;
vlm6a02a8a2004-09-08 00:28:11 +00001402 ;
1403 break;}
1404case 16:
vlmfce48a42004-09-14 02:36:39 +00001405#line 410 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001406{
vlmfa67ddc2004-06-03 03:38:44 +00001407 yyval.a_module_flags = yyvsp[0].a_module_flags;
vlm6a02a8a2004-09-08 00:28:11 +00001408 ;
1409 break;}
1410case 17:
vlmfce48a42004-09-14 02:36:39 +00001411#line 413 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001412{
vlmfa67ddc2004-06-03 03:38:44 +00001413 yyval.a_module_flags = yyvsp[-1].a_module_flags | yyvsp[0].a_module_flags;
vlm6a02a8a2004-09-08 00:28:11 +00001414 ;
1415 break;}
1416case 18:
vlmfce48a42004-09-14 02:36:39 +00001417#line 422 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001418{
vlmfa67ddc2004-06-03 03:38:44 +00001419 yyval.a_module_flags = MSF_EXPLICIT_TAGS;
vlm6a02a8a2004-09-08 00:28:11 +00001420 ;
1421 break;}
1422case 19:
vlmfce48a42004-09-14 02:36:39 +00001423#line 425 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001424{
vlmfa67ddc2004-06-03 03:38:44 +00001425 yyval.a_module_flags = MSF_IMPLICIT_TAGS;
vlm6a02a8a2004-09-08 00:28:11 +00001426 ;
1427 break;}
1428case 20:
vlmfce48a42004-09-14 02:36:39 +00001429#line 428 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001430{
vlmfa67ddc2004-06-03 03:38:44 +00001431 yyval.a_module_flags = MSF_AUTOMATIC_TAGS;
vlm6a02a8a2004-09-08 00:28:11 +00001432 ;
1433 break;}
1434case 21:
vlmfce48a42004-09-14 02:36:39 +00001435#line 431 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001436{
vlmfa67ddc2004-06-03 03:38:44 +00001437 yyval.a_module_flags = MSF_EXTENSIBILITY_IMPLIED;
vlm6a02a8a2004-09-08 00:28:11 +00001438 ;
1439 break;}
1440case 22:
vlmfce48a42004-09-14 02:36:39 +00001441#line 435 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001442{
vlm9283dbe2004-08-18 04:59:12 +00001443 /* X.680Amd1 specifies TAG and XER */
1444 if(strcmp(yyvsp[-1].tv_str, "TAG") == 0) {
1445 yyval.a_module_flags = MSF_TAG_INSTRUCTIONS;
1446 } else if(strcmp(yyvsp[-1].tv_str, "XER") == 0) {
1447 yyval.a_module_flags = MSF_XER_INSTRUCTIONS;
1448 } else {
1449 fprintf(stderr,
1450 "WARNING: %s INSTRUCTIONS at line %d: "
1451 "Unrecognized encoding reference\n",
1452 yyvsp[-1].tv_str, yylineno);
1453 yyval.a_module_flags = MSF_unk_INSTRUCTIONS;
1454 }
1455 free(yyvsp[-1].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00001456 ;
1457 break;}
1458case 23:
vlmfce48a42004-09-14 02:36:39 +00001459#line 456 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001460{ yyval.a_module = 0; ;
1461 break;}
1462case 24:
vlmfce48a42004-09-14 02:36:39 +00001463#line 457 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001464{
vlmfa67ddc2004-06-03 03:38:44 +00001465 yyval.a_module = yyvsp[0].a_module;
vlm6a02a8a2004-09-08 00:28:11 +00001466 ;
1467 break;}
1468case 25:
vlmfce48a42004-09-14 02:36:39 +00001469#line 466 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001470{
vlm9283dbe2004-08-18 04:59:12 +00001471 yyval.a_module = yyvsp[0].a_module;
vlm6a02a8a2004-09-08 00:28:11 +00001472 ;
1473 break;}
1474case 26:
vlmfce48a42004-09-14 02:36:39 +00001475#line 469 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001476{
vlmfa67ddc2004-06-03 03:38:44 +00001477 yyval.a_module = yyvsp[-1].a_module;
1478
vlm9283dbe2004-08-18 04:59:12 +00001479 /* Behave well when one of them is skipped. */
1480 if(!(yyvsp[-1].a_module)) {
1481 if(yyvsp[0].a_module) yyval.a_module = yyvsp[0].a_module;
1482 break;
1483 }
1484
vlmfa67ddc2004-06-03 03:38:44 +00001485#ifdef MY_IMPORT
1486#error MY_IMPORT DEFINED ELSEWHERE!
1487#endif
1488#define MY_IMPORT(foo,field) do { \
vlm97ed7152004-08-13 12:31:09 +00001489 while(TQ_FIRST(&(yyvsp[0].a_module->foo))) { \
vlmfa67ddc2004-06-03 03:38:44 +00001490 TQ_ADD(&(yyval.a_module->foo), \
1491 TQ_REMOVE(&(yyvsp[0].a_module->foo), field), \
1492 field); \
vlm97ed7152004-08-13 12:31:09 +00001493 } \
1494 assert(TQ_FIRST(&(yyvsp[0].a_module->foo)) == 0); \
1495 } while(0)
vlmfa67ddc2004-06-03 03:38:44 +00001496
1497 MY_IMPORT(imports, xp_next);
1498 MY_IMPORT(exports, xp_next);
1499 MY_IMPORT(members, next);
1500#undef MY_IMPORT
1501
vlm6a02a8a2004-09-08 00:28:11 +00001502 ;
1503 break;}
1504case 27:
vlmfce48a42004-09-14 02:36:39 +00001505#line 502 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001506{
vlmfa67ddc2004-06-03 03:38:44 +00001507 yyval.a_module = yyvsp[0].a_module;
vlm6a02a8a2004-09-08 00:28:11 +00001508 ;
1509 break;}
1510case 28:
vlmfce48a42004-09-14 02:36:39 +00001511#line 505 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001512{
vlmfa67ddc2004-06-03 03:38:44 +00001513 yyval.a_module = asn1p_module_new();
1514 checkmem(yyval.a_module);
1515 if(yyvsp[0].a_xports) {
1516 TQ_ADD(&(yyval.a_module->exports), yyvsp[0].a_xports, xp_next);
1517 } else {
1518 /* "EXPORTS ALL;" ? */
1519 }
vlm6a02a8a2004-09-08 00:28:11 +00001520 ;
1521 break;}
1522case 29:
vlmfce48a42004-09-14 02:36:39 +00001523#line 514 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001524{
vlmfa67ddc2004-06-03 03:38:44 +00001525 yyval.a_module = asn1p_module_new();
1526 checkmem(yyval.a_module);
1527 assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
1528 assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
1529 TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001530 ;
1531 break;}
1532case 30:
vlmfce48a42004-09-14 02:36:39 +00001533#line 521 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001534{
vlm9283dbe2004-08-18 04:59:12 +00001535 yyval.a_module = asn1p_module_new();
1536 checkmem(yyval.a_module);
1537 assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
1538 assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
1539 TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001540 ;
1541 break;}
1542case 31:
vlmfce48a42004-09-14 02:36:39 +00001543#line 534 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001544{
vlm9283dbe2004-08-18 04:59:12 +00001545 yyval.a_module = asn1p_module_new();
1546 checkmem(yyval.a_module);
1547 assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
1548 assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
1549 TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001550 ;
1551 break;}
1552case 32:
vlmfce48a42004-09-14 02:36:39 +00001553#line 542 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001554{ asn1p_lexer_hack_push_encoding_control(); ;
1555 break;}
1556case 33:
vlmfce48a42004-09-14 02:36:39 +00001557#line 543 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001558{
vlm9283dbe2004-08-18 04:59:12 +00001559 fprintf(stderr,
1560 "WARNING: ENCODING-CONTROL %s "
1561 "specification at line %d ignored\n",
1562 yyvsp[-1].tv_str, yylineno);
1563 free(yyvsp[-1].tv_str);
1564 yyval.a_module = 0;
vlm6a02a8a2004-09-08 00:28:11 +00001565 ;
1566 break;}
1567case 34:
vlmfce48a42004-09-14 02:36:39 +00001568#line 555 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001569{
vlmfa67ddc2004-06-03 03:38:44 +00001570 return yyerror(
1571 "Attempt to redefine a standard basic type, "
1572 "use -ftypesXY to switch back "
1573 "to older version of ASN.1 standard");
vlm6a02a8a2004-09-08 00:28:11 +00001574 ;
1575 break;}
1576case 35:
vlmfce48a42004-09-14 02:36:39 +00001577#line 569 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001578{
vlmfa67ddc2004-06-03 03:38:44 +00001579 yyval.a_module = yyvsp[-1].a_module;
vlm6a02a8a2004-09-08 00:28:11 +00001580 ;
1581 break;}
1582case 36:
vlmfce48a42004-09-14 02:36:39 +00001583#line 575 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001584{
vlmfa67ddc2004-06-03 03:38:44 +00001585 return yyerror("Empty IMPORTS list");
vlm6a02a8a2004-09-08 00:28:11 +00001586 ;
1587 break;}
1588case 37:
vlmfce48a42004-09-14 02:36:39 +00001589#line 581 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001590{
vlmfa67ddc2004-06-03 03:38:44 +00001591 yyval.a_module = asn1p_module_new();
1592 checkmem(yyval.a_module);
1593 TQ_ADD(&(yyval.a_module->imports), yyvsp[0].a_xports, xp_next);
vlm6a02a8a2004-09-08 00:28:11 +00001594 ;
1595 break;}
1596case 38:
vlmfce48a42004-09-14 02:36:39 +00001597#line 586 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001598{
vlmfa67ddc2004-06-03 03:38:44 +00001599 yyval.a_module = yyvsp[-1].a_module;
1600 TQ_ADD(&(yyval.a_module->imports), yyvsp[0].a_xports, xp_next);
vlm6a02a8a2004-09-08 00:28:11 +00001601 ;
1602 break;}
1603case 39:
vlmfce48a42004-09-14 02:36:39 +00001604#line 593 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001605{
vlmfa67ddc2004-06-03 03:38:44 +00001606 yyval.a_xports = yyvsp[-3].a_xports;
1607 yyval.a_xports->from = yyvsp[-1].tv_str;
1608 yyval.a_xports->from_oid = yyvsp[0].a_oid;
1609 checkmem(yyval.a_xports);
vlm6a02a8a2004-09-08 00:28:11 +00001610 ;
1611 break;}
1612case 40:
vlmfce48a42004-09-14 02:36:39 +00001613#line 602 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001614{
vlmfa67ddc2004-06-03 03:38:44 +00001615 yyval.a_xports = asn1p_xports_new();
1616 checkmem(yyval.a_xports);
1617 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001618 ;
1619 break;}
1620case 41:
vlmfce48a42004-09-14 02:36:39 +00001621#line 607 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001622{
vlmfa67ddc2004-06-03 03:38:44 +00001623 yyval.a_xports = yyvsp[-2].a_xports;
1624 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001625 ;
1626 break;}
1627case 42:
vlmfce48a42004-09-14 02:36:39 +00001628#line 614 "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 43:
vlmfce48a42004-09-14 02:36:39 +00001637#line 620 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001638{
vlmfa67ddc2004-06-03 03:38:44 +00001639 yyval.a_expr = asn1p_expr_new(yylineno);
1640 checkmem(yyval.a_expr);
1641 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1642 yyval.a_expr->expr_type = A1TC_REFERENCE;
vlm6a02a8a2004-09-08 00:28:11 +00001643 ;
1644 break;}
1645case 44:
vlmfce48a42004-09-14 02:36:39 +00001646#line 629 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001647{
vlmfa67ddc2004-06-03 03:38:44 +00001648 yyval.a_xports = yyvsp[-1].a_xports;
vlm6a02a8a2004-09-08 00:28:11 +00001649 ;
1650 break;}
1651case 45:
vlmfce48a42004-09-14 02:36:39 +00001652#line 632 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001653{
vlmfa67ddc2004-06-03 03:38:44 +00001654 yyval.a_xports = 0;
vlm6a02a8a2004-09-08 00:28:11 +00001655 ;
1656 break;}
1657case 46:
vlmfce48a42004-09-14 02:36:39 +00001658#line 635 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001659{
vlmfa67ddc2004-06-03 03:38:44 +00001660 /* Empty EXPORTS clause effectively prohibits export. */
1661 yyval.a_xports = asn1p_xports_new();
1662 checkmem(yyval.a_xports);
vlm6a02a8a2004-09-08 00:28:11 +00001663 ;
1664 break;}
1665case 47:
vlmfce48a42004-09-14 02:36:39 +00001666#line 643 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001667{
vlmfa67ddc2004-06-03 03:38:44 +00001668 yyval.a_xports = asn1p_xports_new();
1669 assert(yyval.a_xports);
1670 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001671 ;
1672 break;}
1673case 48:
vlmfce48a42004-09-14 02:36:39 +00001674#line 648 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001675{
vlmfa67ddc2004-06-03 03:38:44 +00001676 yyval.a_xports = yyvsp[-2].a_xports;
1677 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001678 ;
1679 break;}
1680case 49:
vlmfce48a42004-09-14 02:36:39 +00001681#line 655 "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 50:
vlmfce48a42004-09-14 02:36:39 +00001690#line 661 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001691{
vlmfa67ddc2004-06-03 03:38:44 +00001692 yyval.a_expr = asn1p_expr_new(yylineno);
1693 checkmem(yyval.a_expr);
1694 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1695 yyval.a_expr->expr_type = A1TC_EXPORTVAR;
vlm6a02a8a2004-09-08 00:28:11 +00001696 ;
1697 break;}
1698case 51:
vlmfce48a42004-09-14 02:36:39 +00001699#line 671 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001700{
vlmfa67ddc2004-06-03 03:38:44 +00001701 yyval.a_expr = yyvsp[-4].a_expr;
1702 assert(yyval.a_expr->Identifier == 0);
1703 yyval.a_expr->Identifier = yyvsp[-5].tv_str;
1704 yyval.a_expr->meta_type = AMT_VALUESET;
1705 // take care of optValueSetBody
vlm6a02a8a2004-09-08 00:28:11 +00001706 ;
1707 break;}
1708case 52:
vlmfce48a42004-09-14 02:36:39 +00001709#line 681 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001710{
vlmfa67ddc2004-06-03 03:38:44 +00001711 yyval.a_expr = asn1p_expr_new(yylineno);
1712 checkmem(yyval.a_expr);
1713 yyval.a_expr->reference = yyvsp[0].a_ref;
1714 yyval.a_expr->expr_type = A1TC_REFERENCE;
1715 yyval.a_expr->meta_type = AMT_TYPEREF;
vlm6a02a8a2004-09-08 00:28:11 +00001716 ;
1717 break;}
1718case 53:
vlmfce48a42004-09-14 02:36:39 +00001719#line 688 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001720{
vlmfa67ddc2004-06-03 03:38:44 +00001721 yyval.a_expr = asn1p_expr_new(yylineno);
1722 checkmem(yyval.a_expr);
1723 yyval.a_expr->expr_type = yyvsp[0].a_type;
1724 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00001725 ;
1726 break;}
1727case 54:
vlmfce48a42004-09-14 02:36:39 +00001728#line 697 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001729{ ;
1730 break;}
1731case 55:
vlmfce48a42004-09-14 02:36:39 +00001732#line 698 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001733{
1734 ;
1735 break;}
1736case 56:
vlmfce48a42004-09-14 02:36:39 +00001737#line 709 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001738{
1739 ;
1740 break;}
1741case 57:
vlmfce48a42004-09-14 02:36:39 +00001742#line 711 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001743{
1744 ;
1745 break;}
1746case 58:
vlmfce48a42004-09-14 02:36:39 +00001747#line 716 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001748{
1749 ;
1750 break;}
1751case 59:
vlmfce48a42004-09-14 02:36:39 +00001752#line 718 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001753{
1754 ;
1755 break;}
1756case 60:
vlmfce48a42004-09-14 02:36:39 +00001757#line 734 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001758{
vlmfa67ddc2004-06-03 03:38:44 +00001759 yyval.a_expr = asn1p_expr_new(yylineno);
1760 checkmem(yyval.a_expr);
1761 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
1762 yyval.a_expr->tag = yyvsp[-1].a_tag;
1763 yyval.a_expr->expr_type = A1TC_TYPEID;
1764 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00001765 ;
1766 break;}
1767case 61:
vlmfce48a42004-09-14 02:36:39 +00001768#line 742 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001769{
vlmfa67ddc2004-06-03 03:38:44 +00001770 yyval.a_expr = yyvsp[0].a_expr;
vlmfce48a42004-09-14 02:36:39 +00001771 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
vlmfa67ddc2004-06-03 03:38:44 +00001772 assert(yyval.a_expr->expr_type);
1773 assert(yyval.a_expr->meta_type);
vlm6a02a8a2004-09-08 00:28:11 +00001774 ;
1775 break;}
1776case 62:
vlmfce48a42004-09-14 02:36:39 +00001777#line 748 "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 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
1781 assert(yyval.a_expr->expr_type == A1TC_CLASSDEF);
1782 assert(yyval.a_expr->meta_type == AMT_OBJECT);
vlm6a02a8a2004-09-08 00:28:11 +00001783 ;
1784 break;}
1785case 63:
vlmfce48a42004-09-14 02:36:39 +00001786#line 764 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001787{
vlmfa67ddc2004-06-03 03:38:44 +00001788 yyval.a_expr = yyvsp[0].a_expr;
1789 assert(yyval.a_expr->Identifier == 0);
1790 yyval.a_expr->Identifier = yyvsp[-5].tv_str;
1791 yyval.a_expr->params = yyvsp[-3].a_plist;
1792 yyval.a_expr->meta_type = AMT_PARAMTYPE;
vlm6a02a8a2004-09-08 00:28:11 +00001793 ;
1794 break;}
1795case 64:
vlmfce48a42004-09-14 02:36:39 +00001796#line 774 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001797{
vlmfa67ddc2004-06-03 03:38:44 +00001798 int ret;
1799 yyval.a_plist = asn1p_paramlist_new(yylineno);
1800 checkmem(yyval.a_plist);
1801 ret = asn1p_paramlist_add_param(yyval.a_plist, yyvsp[0].a_parg.governor, yyvsp[0].a_parg.argument);
1802 checkmem(ret == 0);
1803 if(yyvsp[0].a_parg.governor) asn1p_ref_free(yyvsp[0].a_parg.governor);
1804 if(yyvsp[0].a_parg.argument) free(yyvsp[0].a_parg.argument);
vlm6a02a8a2004-09-08 00:28:11 +00001805 ;
1806 break;}
1807case 65:
vlmfce48a42004-09-14 02:36:39 +00001808#line 783 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001809{
vlmfa67ddc2004-06-03 03:38:44 +00001810 int ret;
1811 yyval.a_plist = yyvsp[-2].a_plist;
1812 ret = asn1p_paramlist_add_param(yyval.a_plist, yyvsp[0].a_parg.governor, yyvsp[0].a_parg.argument);
1813 checkmem(ret == 0);
1814 if(yyvsp[0].a_parg.governor) asn1p_ref_free(yyvsp[0].a_parg.governor);
1815 if(yyvsp[0].a_parg.argument) free(yyvsp[0].a_parg.argument);
vlm6a02a8a2004-09-08 00:28:11 +00001816 ;
1817 break;}
1818case 66:
vlmfce48a42004-09-14 02:36:39 +00001819#line 794 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001820{
vlmfa67ddc2004-06-03 03:38:44 +00001821 yyval.a_parg.governor = NULL;
1822 yyval.a_parg.argument = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00001823 ;
1824 break;}
1825case 67:
vlmfce48a42004-09-14 02:36:39 +00001826#line 798 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001827{
vlmfa67ddc2004-06-03 03:38:44 +00001828 int ret;
1829 yyval.a_parg.governor = asn1p_ref_new(yylineno);
1830 ret = asn1p_ref_add_component(yyval.a_parg.governor, yyvsp[-2].tv_str, 0);
1831 checkmem(ret == 0);
1832 yyval.a_parg.argument = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00001833 ;
1834 break;}
1835case 68:
vlmfce48a42004-09-14 02:36:39 +00001836#line 805 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001837{
vlmfa67ddc2004-06-03 03:38:44 +00001838 int ret;
1839 yyval.a_parg.governor = asn1p_ref_new(yylineno);
1840 ret = asn1p_ref_add_component(yyval.a_parg.governor,
1841 ASN_EXPR_TYPE2STR(yyvsp[-2].a_type), 1);
1842 checkmem(ret == 0);
1843 yyval.a_parg.argument = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00001844 ;
1845 break;}
1846case 69:
vlmfce48a42004-09-14 02:36:39 +00001847#line 816 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001848{
vlmfa67ddc2004-06-03 03:38:44 +00001849 yyval.a_expr = asn1p_expr_new(yylineno);
1850 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00001851 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1852 ;
1853 break;}
1854case 70:
vlmfce48a42004-09-14 02:36:39 +00001855#line 821 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001856{
vlmfa67ddc2004-06-03 03:38:44 +00001857 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001858 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1859 ;
1860 break;}
1861case 71:
vlmfce48a42004-09-14 02:36:39 +00001862#line 828 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001863{
vlmfa67ddc2004-06-03 03:38:44 +00001864 yyval.a_expr = yyvsp[0].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001865 ;
1866 break;}
1867case 72:
vlmfce48a42004-09-14 02:36:39 +00001868#line 831 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001869{
vlmfa67ddc2004-06-03 03:38:44 +00001870 yyval.a_expr = asn1p_expr_new(yylineno);
1871 checkmem(yyval.a_expr);
1872 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1873 yyval.a_expr->expr_type = A1TC_REFERENCE;
1874 yyval.a_expr->meta_type = AMT_VALUE;
vlm6a02a8a2004-09-08 00:28:11 +00001875 ;
1876 break;}
1877case 73:
vlmfce48a42004-09-14 02:36:39 +00001878#line 844 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001879{
vlmfa67ddc2004-06-03 03:38:44 +00001880 yyval.a_expr = asn1p_expr_new(yylineno);
1881 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00001882 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1883 ;
1884 break;}
1885case 74:
vlmfce48a42004-09-14 02:36:39 +00001886#line 849 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001887{
vlmfa67ddc2004-06-03 03:38:44 +00001888 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001889 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1890 ;
1891 break;}
1892case 75:
vlmfce48a42004-09-14 02:36:39 +00001893#line 856 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001894{
vlmec8f6812004-08-22 03:19:54 +00001895 yyval.a_expr = yyvsp[-1].a_expr;
1896 assert(yyval.a_expr->Identifier == 0);
vlmfce48a42004-09-14 02:36:39 +00001897 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
vlmec8f6812004-08-22 03:19:54 +00001898 yyval.a_expr->marker = yyvsp[0].a_marker;
vlm6a02a8a2004-09-08 00:28:11 +00001899 ;
1900 break;}
1901case 76:
vlmfce48a42004-09-14 02:36:39 +00001902#line 862 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001903{
vlmec8f6812004-08-22 03:19:54 +00001904 yyval.a_expr = asn1p_expr_new(yylineno);
1905 checkmem(yyval.a_expr);
1906 yyval.a_expr->meta_type = yyvsp[0].a_expr->meta_type;
1907 yyval.a_expr->expr_type = A1TC_COMPONENTS_OF;
vlm6a02a8a2004-09-08 00:28:11 +00001908 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1909 ;
1910 break;}
1911case 77:
vlmfce48a42004-09-14 02:36:39 +00001912#line 869 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001913{
vlmec8f6812004-08-22 03:19:54 +00001914 yyval.a_expr = yyvsp[0].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001915 ;
1916 break;}
1917case 78:
vlmfce48a42004-09-14 02:36:39 +00001918#line 875 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001919{
vlmec8f6812004-08-22 03:19:54 +00001920 yyval.a_expr = asn1p_expr_new(yylineno);
1921 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00001922 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1923 ;
1924 break;}
1925case 79:
vlmfce48a42004-09-14 02:36:39 +00001926#line 880 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001927{
vlmec8f6812004-08-22 03:19:54 +00001928 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001929 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1930 ;
1931 break;}
1932case 80:
vlmfce48a42004-09-14 02:36:39 +00001933#line 887 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001934{
vlmec8f6812004-08-22 03:19:54 +00001935 yyval.a_expr = yyvsp[0].a_expr;
1936 assert(yyval.a_expr->Identifier == 0);
vlmfce48a42004-09-14 02:36:39 +00001937 yyval.a_expr->Identifier = yyvsp[-1].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00001938 ;
1939 break;}
1940case 81:
vlmfce48a42004-09-14 02:36:39 +00001941#line 892 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001942{
vlmec8f6812004-08-22 03:19:54 +00001943 yyval.a_expr = yyvsp[0].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001944 ;
1945 break;}
1946case 82:
vlmfce48a42004-09-14 02:36:39 +00001947#line 898 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001948{
vlmfa67ddc2004-06-03 03:38:44 +00001949 yyval.a_expr = yyvsp[-2].a_expr;
1950 checkmem(yyval.a_expr);
1951 yyval.a_expr->with_syntax = yyvsp[0].a_wsynt;
1952 assert(yyval.a_expr->expr_type == A1TC_CLASSDEF);
1953 assert(yyval.a_expr->meta_type == AMT_OBJECT);
vlm6a02a8a2004-09-08 00:28:11 +00001954 ;
1955 break;}
1956case 83:
vlmfce48a42004-09-14 02:36:39 +00001957#line 908 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001958{ yyval.a_int = 0; ;
1959 break;}
1960case 84:
vlmfce48a42004-09-14 02:36:39 +00001961#line 909 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001962{ yyval.a_int = 1; ;
1963 break;}
1964case 85:
vlmfce48a42004-09-14 02:36:39 +00001965#line 913 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001966{
vlmfa67ddc2004-06-03 03:38:44 +00001967 yyval.a_expr = asn1p_expr_new(yylineno);
1968 checkmem(yyval.a_expr);
1969 yyval.a_expr->expr_type = A1TC_CLASSDEF;
1970 yyval.a_expr->meta_type = AMT_OBJECT;
vlm6a02a8a2004-09-08 00:28:11 +00001971 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1972 ;
1973 break;}
1974case 86:
vlmfce48a42004-09-14 02:36:39 +00001975#line 920 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001976{
vlmfa67ddc2004-06-03 03:38:44 +00001977 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001978 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1979 ;
1980 break;}
1981case 87:
vlmfce48a42004-09-14 02:36:39 +00001982#line 927 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001983{
vlmfa67ddc2004-06-03 03:38:44 +00001984 yyval.a_expr = asn1p_expr_new(yylineno);
1985 checkmem(yyval.a_expr);
1986 yyval.a_expr->Identifier = yyvsp[-1].a_refcomp.name;
1987 yyval.a_expr->expr_type = A1TC_CLASSFIELD;
1988 yyval.a_expr->meta_type = AMT_OBJECTFIELD;
1989 yyval.a_expr->marker = yyvsp[0].a_marker;
vlm6a02a8a2004-09-08 00:28:11 +00001990 ;
1991 break;}
1992case 88:
vlmfce48a42004-09-14 02:36:39 +00001993#line 935 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001994{
vlmec8f6812004-08-22 03:19:54 +00001995 yyval.a_expr = yyvsp[-2].a_expr;
1996 yyval.a_expr->Identifier = yyvsp[-3].a_refcomp.name;
1997 yyval.a_expr->marker = yyvsp[-1].a_marker;
vlmfa67ddc2004-06-03 03:38:44 +00001998 yyval.a_expr->unique = yyvsp[0].a_int;
vlm6a02a8a2004-09-08 00:28:11 +00001999 ;
2000 break;}
2001case 89:
vlmfce48a42004-09-14 02:36:39 +00002002#line 941 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002003{
vlmfa67ddc2004-06-03 03:38:44 +00002004 int ret;
2005 yyval.a_expr = asn1p_expr_new(yylineno);
2006 checkmem(yyval.a_expr);
2007 yyval.a_expr->Identifier = yyvsp[-3].a_refcomp.name;
2008 yyval.a_expr->reference = asn1p_ref_new(yylineno);
2009 checkmem(yyval.a_expr->reference);
2010 ret = asn1p_ref_add_component(yyval.a_expr->reference,
2011 yyvsp[-2].a_refcomp.name, yyvsp[-2].a_refcomp.lex_type);
2012 checkmem(ret == 0);
2013 yyval.a_expr->expr_type = A1TC_CLASSFIELD;
2014 yyval.a_expr->meta_type = AMT_OBJECTFIELD;
2015 yyval.a_expr->marker = yyvsp[-1].a_marker;
2016 yyval.a_expr->unique = yyvsp[0].a_int;
vlm6a02a8a2004-09-08 00:28:11 +00002017 ;
2018 break;}
2019case 90:
vlmfce48a42004-09-14 02:36:39 +00002020#line 959 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002021{ yyval.a_wsynt = 0; ;
2022 break;}
2023case 91:
vlmfce48a42004-09-14 02:36:39 +00002024#line 960 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002025{
vlmfa67ddc2004-06-03 03:38:44 +00002026 yyval.a_wsynt = yyvsp[0].a_wsynt;
vlm6a02a8a2004-09-08 00:28:11 +00002027 ;
2028 break;}
2029case 92:
vlmfce48a42004-09-14 02:36:39 +00002030#line 967 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002031{ asn1p_lexer_hack_enable_with_syntax(); ;
2032 break;}
2033case 93:
vlmfce48a42004-09-14 02:36:39 +00002034#line 969 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002035{
vlmfa67ddc2004-06-03 03:38:44 +00002036 yyval.a_wsynt = yyvsp[-1].a_wsynt;
vlm6a02a8a2004-09-08 00:28:11 +00002037 ;
2038 break;}
2039case 94:
vlmfce48a42004-09-14 02:36:39 +00002040#line 975 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002041{
vlmfa67ddc2004-06-03 03:38:44 +00002042 yyval.a_wsynt = asn1p_wsyntx_new();
2043 TQ_ADD(&(yyval.a_wsynt->chunks), yyvsp[0].a_wchunk, next);
vlm6a02a8a2004-09-08 00:28:11 +00002044 ;
2045 break;}
2046case 95:
vlmfce48a42004-09-14 02:36:39 +00002047#line 979 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002048{
vlmfa67ddc2004-06-03 03:38:44 +00002049 yyval.a_wsynt = yyvsp[-1].a_wsynt;
2050 TQ_ADD(&(yyval.a_wsynt->chunks), yyvsp[0].a_wchunk, next);
vlm6a02a8a2004-09-08 00:28:11 +00002051 ;
2052 break;}
2053case 96:
vlmfce48a42004-09-14 02:36:39 +00002054#line 986 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002055{
vlmfa67ddc2004-06-03 03:38:44 +00002056 yyval.a_wchunk = asn1p_wsyntx_chunk_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002057 ;
2058 break;}
2059case 97:
vlmfce48a42004-09-14 02:36:39 +00002060#line 989 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002061{
vlmfa67ddc2004-06-03 03:38:44 +00002062 asn1p_ref_t *ref;
2063 int ret;
2064 ref = asn1p_ref_new(yylineno);
2065 checkmem(ref);
2066 ret = asn1p_ref_add_component(ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
2067 checkmem(ret == 0);
2068 yyval.a_wchunk = asn1p_wsyntx_chunk_fromref(ref, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002069 ;
2070 break;}
2071case 98:
vlmfce48a42004-09-14 02:36:39 +00002072#line 1001 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002073{
vlm39e5ed72004-09-05 10:40:41 +00002074 yyval.a_expr = asn1p_expr_new(yylineno);
vlm9283dbe2004-08-18 04:59:12 +00002075 checkmem(yyval.a_expr);
2076 yyval.a_expr->Identifier = strdup("...");
2077 checkmem(yyval.a_expr->Identifier);
vlm9283dbe2004-08-18 04:59:12 +00002078 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
2079 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002080 ;
2081 break;}
2082case 99:
vlmfce48a42004-09-14 02:36:39 +00002083#line 1009 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002084{
vlm39e5ed72004-09-05 10:40:41 +00002085 yyval.a_expr = asn1p_expr_new(yylineno);
vlm9283dbe2004-08-18 04:59:12 +00002086 checkmem(yyval.a_expr);
2087 yyval.a_expr->Identifier = strdup("...");
vlm9283dbe2004-08-18 04:59:12 +00002088 checkmem(yyval.a_expr->Identifier);
vlm5f0128b2004-08-20 13:25:29 +00002089 yyval.a_expr->value = yyvsp[0].a_value;
vlm9283dbe2004-08-18 04:59:12 +00002090 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
2091 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002092 ;
2093 break;}
2094case 100:
vlmfce48a42004-09-14 02:36:39 +00002095#line 1018 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002096{
vlm39e5ed72004-09-05 10:40:41 +00002097 yyval.a_expr = asn1p_expr_new(yylineno);
vlm5f0128b2004-08-20 13:25:29 +00002098 checkmem(yyval.a_expr);
2099 yyval.a_expr->Identifier = strdup("...");
2100 yyval.a_expr->value = yyvsp[0].a_value;
2101 checkmem(yyval.a_expr->Identifier);
2102 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
2103 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002104 ;
2105 break;}
2106case 101:
vlmfce48a42004-09-14 02:36:39 +00002107#line 1030 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002108{
vlmec8f6812004-08-22 03:19:54 +00002109 yyval.a_expr = yyvsp[-1].a_expr;
vlmfce48a42004-09-14 02:36:39 +00002110 yyval.a_expr->tag = yyvsp[-2].a_tag;
vlmec8f6812004-08-22 03:19:54 +00002111 /*
2112 * Outer constraint for SEQUENCE OF and SET OF applies
2113 * to the inner type.
2114 */
2115 if(yyval.a_expr->expr_type == ASN_CONSTR_SEQUENCE_OF
2116 || yyval.a_expr->expr_type == ASN_CONSTR_SET_OF) {
2117 assert(!TQ_FIRST(&(yyval.a_expr->members))->constraints);
2118 TQ_FIRST(&(yyval.a_expr->members))->constraints = yyvsp[0].a_constr;
2119 } else {
2120 if(yyval.a_expr->constraints) {
vlmfce48a42004-09-14 02:36:39 +00002121 assert(!yyvsp[-1].a_expr);
vlmec8f6812004-08-22 03:19:54 +00002122 } else {
2123 yyval.a_expr->constraints = yyvsp[0].a_constr;
2124 }
2125 }
vlm6a02a8a2004-09-08 00:28:11 +00002126 ;
2127 break;}
2128case 102:
vlmfce48a42004-09-14 02:36:39 +00002129#line 1052 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002130{
vlm5f0128b2004-08-20 13:25:29 +00002131 yyval.a_expr = yyvsp[0].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00002132 ;
2133 break;}
2134case 103:
vlmfce48a42004-09-14 02:36:39 +00002135#line 1055 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002136{
vlmfa67ddc2004-06-03 03:38:44 +00002137 yyval.a_expr = asn1p_expr_new(yylineno);
2138 checkmem(yyval.a_expr);
2139 yyval.a_expr->expr_type = yyvsp[0].a_type;
2140 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002141 ;
2142 break;}
2143case 104:
vlmfce48a42004-09-14 02:36:39 +00002144#line 1061 "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_CHOICE;
2149 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002150 ;
2151 break;}
2152case 105:
vlmfce48a42004-09-14 02:36:39 +00002153#line 1067 "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_SEQUENCE;
2158 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002159 ;
2160 break;}
2161case 106:
vlmfce48a42004-09-14 02:36:39 +00002162#line 1073 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002163{
vlmec8f6812004-08-22 03:19:54 +00002164 yyval.a_expr = yyvsp[-1].a_expr;
2165 assert(yyval.a_expr->expr_type == A1TC_INVALID);
2166 yyval.a_expr->expr_type = ASN_CONSTR_SET;
2167 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002168 ;
2169 break;}
2170case 107:
vlmfce48a42004-09-14 02:36:39 +00002171#line 1079 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002172{
vlm39e5ed72004-09-05 10:40:41 +00002173 yyval.a_expr = asn1p_expr_new(yylineno);
vlmec8f6812004-08-22 03:19:54 +00002174 checkmem(yyval.a_expr);
vlma2374a02004-09-14 02:44:07 +00002175 yyval.a_expr->constraints = yyvsp[-3].a_constr;
vlmec8f6812004-08-22 03:19:54 +00002176 yyval.a_expr->expr_type = ASN_CONSTR_SEQUENCE_OF;
2177 yyval.a_expr->meta_type = AMT_TYPE;
vlma2374a02004-09-14 02:44:07 +00002178 yyvsp[0].a_expr->tag = yyvsp[-1].a_tag;
vlm6a02a8a2004-09-08 00:28:11 +00002179 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
2180 ;
2181 break;}
2182case 108:
vlma2374a02004-09-14 02:44:07 +00002183#line 1088 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002184{
vlm39e5ed72004-09-05 10:40:41 +00002185 yyval.a_expr = asn1p_expr_new(yylineno);
vlmec8f6812004-08-22 03:19:54 +00002186 checkmem(yyval.a_expr);
vlma2374a02004-09-14 02:44:07 +00002187 yyval.a_expr->constraints = yyvsp[-3].a_constr;
vlmec8f6812004-08-22 03:19:54 +00002188 yyval.a_expr->expr_type = ASN_CONSTR_SET_OF;
2189 yyval.a_expr->meta_type = AMT_TYPE;
vlma2374a02004-09-14 02:44:07 +00002190 yyvsp[0].a_expr->tag = yyvsp[-1].a_tag;
vlm6a02a8a2004-09-08 00:28:11 +00002191 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
2192 ;
2193 break;}
2194case 109:
vlma2374a02004-09-14 02:44:07 +00002195#line 1097 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002196{
vlm39e5ed72004-09-05 10:40:41 +00002197 yyval.a_expr = asn1p_expr_new(yylineno);
vlmec8f6812004-08-22 03:19:54 +00002198 checkmem(yyval.a_expr);
vlm044f7442004-09-04 04:49:21 +00002199 yyval.a_expr->expr_type = ASN_TYPE_ANY;
vlmec8f6812004-08-22 03:19:54 +00002200 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002201 ;
2202 break;}
2203case 110:
vlma2374a02004-09-14 02:44:07 +00002204#line 1103 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002205{
vlmec8f6812004-08-22 03:19:54 +00002206 int ret;
vlm39e5ed72004-09-05 10:40:41 +00002207 yyval.a_expr = asn1p_expr_new(yylineno);
vlmec8f6812004-08-22 03:19:54 +00002208 checkmem(yyval.a_expr);
2209 yyval.a_expr->reference = asn1p_ref_new(yylineno);
2210 ret = asn1p_ref_add_component(yyval.a_expr->reference,
2211 yyvsp[0].tv_str, RLT_lowercase);
2212 checkmem(ret == 0);
vlm044f7442004-09-04 04:49:21 +00002213 yyval.a_expr->expr_type = ASN_TYPE_ANY;
vlmec8f6812004-08-22 03:19:54 +00002214 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002215 ;
2216 break;}
2217case 111:
vlma2374a02004-09-14 02:44:07 +00002218#line 1117 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002219{
vlmfa67ddc2004-06-03 03:38:44 +00002220 int ret;
2221 yyval.a_expr = yyvsp[-1].a_expr;
2222 assert(yyval.a_expr->expr_type == 0);
2223 assert(yyval.a_expr->meta_type == 0);
2224 assert(yyval.a_expr->reference == 0);
2225 yyval.a_expr->reference = asn1p_ref_new(yylineno);
2226 checkmem(yyval.a_expr->reference);
2227 ret = asn1p_ref_add_component(yyval.a_expr->reference, yyvsp[-3].tv_str, RLT_UNKNOWN);
2228 checkmem(ret == 0);
2229 free(yyvsp[-3].tv_str);
2230 yyval.a_expr->expr_type = A1TC_PARAMETRIZED;
2231 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002232 ;
2233 break;}
2234case 112:
vlma2374a02004-09-14 02:44:07 +00002235#line 1141 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002236{
vlmfa67ddc2004-06-03 03:38:44 +00002237 yyval.a_expr = asn1p_expr_new(yylineno);
2238 checkmem(yyval.a_expr);
2239 yyval.a_expr->reference = yyvsp[0].a_ref;
2240 yyval.a_expr->expr_type = A1TC_REFERENCE;
2241 yyval.a_expr->meta_type = AMT_TYPEREF;
vlm6a02a8a2004-09-08 00:28:11 +00002242 ;
2243 break;}
2244case 113:
vlma2374a02004-09-14 02:44:07 +00002245#line 1148 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002246{
vlmfa67ddc2004-06-03 03:38:44 +00002247 yyval.a_expr = asn1p_expr_new(yylineno);
2248 checkmem(yyval.a_expr);
2249 yyval.a_expr->reference = yyvsp[0].a_ref;
2250 yyval.a_expr->expr_type = A1TC_INSTANCE;
2251 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002252 ;
2253 break;}
2254case 114:
vlma2374a02004-09-14 02:44:07 +00002255#line 1163 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002256{
vlmfa67ddc2004-06-03 03:38:44 +00002257 int ret;
2258 yyval.a_ref = asn1p_ref_new(yylineno);
2259 checkmem(yyval.a_ref);
2260 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN);
2261 checkmem(ret == 0);
2262 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002263 ;
2264 break;}
2265case 115:
vlma2374a02004-09-14 02:44:07 +00002266#line 1171 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002267{
vlmfa67ddc2004-06-03 03:38:44 +00002268 int ret;
2269 yyval.a_ref = asn1p_ref_new(yylineno);
2270 checkmem(yyval.a_ref);
2271 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2272 checkmem(ret == 0);
2273 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN);
2274 checkmem(ret == 0);
2275 free(yyvsp[-2].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002276 ;
2277 break;}
2278case 116:
vlma2374a02004-09-14 02:44:07 +00002279#line 1181 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002280{
vlmfa67ddc2004-06-03 03:38:44 +00002281 int ret;
2282 yyval.a_ref = asn1p_ref_new(yylineno);
2283 checkmem(yyval.a_ref);
2284 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2285 checkmem(ret == 0);
2286 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_lowercase);
2287 checkmem(ret == 0);
2288 free(yyvsp[-2].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002289 ;
2290 break;}
2291case 117:
vlma2374a02004-09-14 02:44:07 +00002292#line 1191 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002293{
vlmfa67ddc2004-06-03 03:38:44 +00002294 int ret;
2295 yyval.a_ref = asn1p_ref_new(yylineno);
2296 checkmem(yyval.a_ref);
2297 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_CAPITALS);
2298 free(yyvsp[0].tv_str);
2299 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002300 ;
2301 break;}
2302case 118:
vlma2374a02004-09-14 02:44:07 +00002303#line 1199 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002304{
vlmfa67ddc2004-06-03 03:38:44 +00002305 int ret;
2306 yyval.a_ref = yyvsp[0].a_ref;
2307 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_CAPITALS);
2308 free(yyvsp[-2].tv_str);
2309 checkmem(ret == 0);
2310 /*
2311 * Move the last element infront.
2312 */
2313 {
2314 struct asn1p_ref_component_s tmp_comp;
2315 tmp_comp = yyval.a_ref->components[yyval.a_ref->comp_count-1];
2316 memmove(&yyval.a_ref->components[1],
2317 &yyval.a_ref->components[0],
2318 sizeof(yyval.a_ref->components[0])
2319 * (yyval.a_ref->comp_count - 1));
2320 yyval.a_ref->components[0] = tmp_comp;
2321 }
vlm6a02a8a2004-09-08 00:28:11 +00002322 ;
2323 break;}
2324case 119:
vlma2374a02004-09-14 02:44:07 +00002325#line 1221 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002326{
vlmfa67ddc2004-06-03 03:38:44 +00002327 int ret;
2328 yyval.a_ref = asn1p_ref_new(yylineno);
2329 checkmem(yyval.a_ref);
2330 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
2331 free(yyvsp[0].a_refcomp.name);
2332 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002333 ;
2334 break;}
2335case 120:
vlma2374a02004-09-14 02:44:07 +00002336#line 1229 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002337{
vlmfa67ddc2004-06-03 03:38:44 +00002338 int ret;
2339 yyval.a_ref = yyvsp[-2].a_ref;
2340 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
2341 free(yyvsp[0].a_refcomp.name);
2342 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002343 ;
2344 break;}
2345case 123:
vlma2374a02004-09-14 02:44:07 +00002346#line 1243 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002347{
vlmfa67ddc2004-06-03 03:38:44 +00002348 yyval.a_refcomp.lex_type = RLT_AmpUppercase;
2349 yyval.a_refcomp.name = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00002350 ;
2351 break;}
2352case 124:
vlma2374a02004-09-14 02:44:07 +00002353#line 1248 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002354{
vlmfa67ddc2004-06-03 03:38:44 +00002355 yyval.a_refcomp.lex_type = RLT_Amplowercase;
2356 yyval.a_refcomp.name = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00002357 ;
2358 break;}
2359case 125:
vlma2374a02004-09-14 02:44:07 +00002360#line 1261 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002361{
vlmfa67ddc2004-06-03 03:38:44 +00002362 yyval.a_expr = yyvsp[-2].a_expr;
2363 assert(yyval.a_expr->Identifier == NULL);
2364 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
2365 yyval.a_expr->meta_type = AMT_VALUE;
2366 yyval.a_expr->value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002367 ;
2368 break;}
2369case 126:
vlma2374a02004-09-14 02:44:07 +00002370#line 1271 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002371{ asn1p_lexer_hack_push_opaque_state(); ;
2372 break;}
2373case 127:
vlma2374a02004-09-14 02:44:07 +00002374#line 1272 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002375{
vlmfa67ddc2004-06-03 03:38:44 +00002376 yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
2377 checkmem(yyval.a_value);
2378 yyval.a_value->type = ATV_UNPARSED;
vlm6a02a8a2004-09-08 00:28:11 +00002379 ;
2380 break;}
2381case 128:
vlma2374a02004-09-14 02:44:07 +00002382#line 1277 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002383{
vlmfa67ddc2004-06-03 03:38:44 +00002384 yyval.a_value = _convert_bitstring2binary(yyvsp[0].tv_str, 'B');
2385 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00002386 ;
2387 break;}
2388case 129:
vlma2374a02004-09-14 02:44:07 +00002389#line 1281 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002390{
vlmfa67ddc2004-06-03 03:38:44 +00002391 yyval.a_value = _convert_bitstring2binary(yyvsp[0].tv_str, 'H');
2392 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00002393 ;
2394 break;}
2395case 130:
vlma2374a02004-09-14 02:44:07 +00002396#line 1285 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002397{
vlmfa67ddc2004-06-03 03:38:44 +00002398 yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
2399 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00002400 ;
2401 break;}
2402case 131:
vlma2374a02004-09-14 02:44:07 +00002403#line 1289 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002404{
vlmfa67ddc2004-06-03 03:38:44 +00002405 yyval.a_value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002406 ;
2407 break;}
2408case 132:
vlma2374a02004-09-14 02:44:07 +00002409#line 1292 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002410{
vlm5f0128b2004-08-20 13:25:29 +00002411 yyval.a_value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002412 ;
2413 break;}
2414case 133:
vlma2374a02004-09-14 02:44:07 +00002415#line 1298 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002416{
vlmfa67ddc2004-06-03 03:38:44 +00002417 asn1p_ref_t *ref;
2418 int ret;
2419 ref = asn1p_ref_new(yylineno);
2420 checkmem(ref);
2421 ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
2422 checkmem(ret == 0);
2423 yyval.a_value = asn1p_value_fromref(ref, 0);
2424 checkmem(yyval.a_value);
2425 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002426 ;
2427 break;}
2428case 134:
vlma2374a02004-09-14 02:44:07 +00002429#line 1309 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002430{
vlmfa67ddc2004-06-03 03:38:44 +00002431 asn1p_ref_t *ref;
2432 int ret;
2433 ref = asn1p_ref_new(yylineno);
2434 checkmem(ref);
2435 ret = asn1p_ref_add_component(ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2436 checkmem(ret == 0);
2437 ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
2438 checkmem(ret == 0);
2439 yyval.a_value = asn1p_value_fromref(ref, 0);
2440 checkmem(yyval.a_value);
2441 free(yyvsp[-2].tv_str);
2442 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002443 ;
2444 break;}
2445case 135:
vlma2374a02004-09-14 02:44:07 +00002446#line 1326 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002447{
vlmfa67ddc2004-06-03 03:38:44 +00002448 yyval.tv_opaque.len = yyvsp[0].tv_opaque.len + 2;
2449 yyval.tv_opaque.buf = malloc(yyval.tv_opaque.len + 1);
2450 checkmem(yyval.tv_opaque.buf);
2451 yyval.tv_opaque.buf[0] = '{';
2452 yyval.tv_opaque.buf[1] = ' ';
2453 memcpy(yyval.tv_opaque.buf + 2, yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len);
2454 yyval.tv_opaque.buf[yyval.tv_opaque.len] = '\0';
2455 free(yyvsp[0].tv_opaque.buf);
vlm6a02a8a2004-09-08 00:28:11 +00002456 ;
2457 break;}
2458case 136:
vlma2374a02004-09-14 02:44:07 +00002459#line 1336 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002460{
vlmfa67ddc2004-06-03 03:38:44 +00002461 int newsize = yyvsp[-1].tv_opaque.len + yyvsp[0].tv_opaque.len;
2462 char *p = malloc(newsize + 1);
2463 checkmem(p);
2464 memcpy(p , yyvsp[-1].tv_opaque.buf, yyvsp[-1].tv_opaque.len);
2465 memcpy(p + yyvsp[-1].tv_opaque.len, yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len);
2466 p[newsize] = '\0';
2467 free(yyvsp[-1].tv_opaque.buf);
2468 free(yyvsp[0].tv_opaque.buf);
2469 yyval.tv_opaque.buf = p;
2470 yyval.tv_opaque.len = newsize;
vlm6a02a8a2004-09-08 00:28:11 +00002471 ;
2472 break;}
2473case 137:
vlma2374a02004-09-14 02:44:07 +00002474#line 1351 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002475{ yyval.a_type = ASN_BASIC_BOOLEAN; ;
2476 break;}
2477case 138:
vlma2374a02004-09-14 02:44:07 +00002478#line 1352 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002479{ yyval.a_type = ASN_BASIC_NULL; ;
2480 break;}
2481case 139:
vlma2374a02004-09-14 02:44:07 +00002482#line 1353 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002483{ yyval.a_type = ASN_BASIC_REAL; ;
2484 break;}
2485case 140:
vlma2374a02004-09-14 02:44:07 +00002486#line 1354 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002487{ yyval.a_type = yyvsp[0].a_type; ;
2488 break;}
2489case 141:
vlma2374a02004-09-14 02:44:07 +00002490#line 1355 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002491{ yyval.a_type = ASN_BASIC_OCTET_STRING; ;
2492 break;}
2493case 142:
vlma2374a02004-09-14 02:44:07 +00002494#line 1356 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002495{ yyval.a_type = ASN_BASIC_OBJECT_IDENTIFIER; ;
2496 break;}
2497case 143:
vlma2374a02004-09-14 02:44:07 +00002498#line 1357 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002499{ yyval.a_type = ASN_BASIC_RELATIVE_OID; ;
2500 break;}
2501case 144:
vlma2374a02004-09-14 02:44:07 +00002502#line 1358 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002503{ yyval.a_type = ASN_BASIC_EXTERNAL; ;
2504 break;}
2505case 145:
vlma2374a02004-09-14 02:44:07 +00002506#line 1359 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002507{ yyval.a_type = ASN_BASIC_EMBEDDED_PDV; ;
2508 break;}
2509case 146:
vlma2374a02004-09-14 02:44:07 +00002510#line 1360 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002511{ yyval.a_type = ASN_BASIC_CHARACTER_STRING; ;
2512 break;}
2513case 147:
vlma2374a02004-09-14 02:44:07 +00002514#line 1361 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002515{ yyval.a_type = ASN_BASIC_UTCTime; ;
2516 break;}
2517case 148:
vlma2374a02004-09-14 02:44:07 +00002518#line 1362 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002519{ yyval.a_type = ASN_BASIC_GeneralizedTime; ;
2520 break;}
2521case 149:
vlma2374a02004-09-14 02:44:07 +00002522#line 1369 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002523{ yyval.a_type = ASN_BASIC_INTEGER; ;
2524 break;}
2525case 150:
vlma2374a02004-09-14 02:44:07 +00002526#line 1370 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002527{ yyval.a_type = ASN_BASIC_ENUMERATED; ;
2528 break;}
2529case 151:
vlma2374a02004-09-14 02:44:07 +00002530#line 1371 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002531{ yyval.a_type = ASN_BASIC_BIT_STRING; ;
2532 break;}
2533case 152:
vlma2374a02004-09-14 02:44:07 +00002534#line 1375 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002535{
vlm39e5ed72004-09-05 10:40:41 +00002536 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00002537 checkmem(yyval.a_expr);
2538 yyval.a_expr->expr_type = yyvsp[0].a_type;
2539 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002540 ;
2541 break;}
2542case 153:
vlma2374a02004-09-14 02:44:07 +00002543#line 1381 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002544{
vlmfa67ddc2004-06-03 03:38:44 +00002545 if(yyvsp[0].a_expr) {
2546 yyval.a_expr = yyvsp[0].a_expr;
2547 } else {
vlm39e5ed72004-09-05 10:40:41 +00002548 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00002549 checkmem(yyval.a_expr);
2550 }
2551 yyval.a_expr->expr_type = yyvsp[-1].a_type;
2552 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002553 ;
2554 break;}
2555case 154:
vlma2374a02004-09-14 02:44:07 +00002556#line 1394 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002557{ yyval.a_type = ASN_STRING_BMPString; ;
2558 break;}
2559case 155:
vlma2374a02004-09-14 02:44:07 +00002560#line 1395 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002561{
vlmfa67ddc2004-06-03 03:38:44 +00002562 yyval.a_type = ASN_STRING_GeneralString;
vlm80103492004-09-07 10:39:09 +00002563 fprintf(stderr, "WARNING: GeneralString is not fully supported");
vlm6a02a8a2004-09-08 00:28:11 +00002564 ;
2565 break;}
2566case 156:
vlma2374a02004-09-14 02:44:07 +00002567#line 1399 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002568{
vlmfa67ddc2004-06-03 03:38:44 +00002569 yyval.a_type = ASN_STRING_GraphicString;
vlm80103492004-09-07 10:39:09 +00002570 fprintf(stderr, "WARNING: GraphicString is not fully supported");
vlm6a02a8a2004-09-08 00:28:11 +00002571 ;
2572 break;}
2573case 157:
vlma2374a02004-09-14 02:44:07 +00002574#line 1403 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002575{ yyval.a_type = ASN_STRING_IA5String; ;
2576 break;}
2577case 158:
vlma2374a02004-09-14 02:44:07 +00002578#line 1404 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002579{ yyval.a_type = ASN_STRING_ISO646String; ;
2580 break;}
2581case 159:
vlma2374a02004-09-14 02:44:07 +00002582#line 1405 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002583{ yyval.a_type = ASN_STRING_NumericString; ;
2584 break;}
2585case 160:
vlma2374a02004-09-14 02:44:07 +00002586#line 1406 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002587{ yyval.a_type = ASN_STRING_PrintableString; ;
2588 break;}
2589case 161:
vlma2374a02004-09-14 02:44:07 +00002590#line 1407 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002591{
vlmfa67ddc2004-06-03 03:38:44 +00002592 yyval.a_type = ASN_STRING_T61String;
vlm80103492004-09-07 10:39:09 +00002593 fprintf(stderr, "WARNING: T61String is not fully supported");
vlm6a02a8a2004-09-08 00:28:11 +00002594 ;
2595 break;}
2596case 162:
vlma2374a02004-09-14 02:44:07 +00002597#line 1411 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002598{ yyval.a_type = ASN_STRING_TeletexString; ;
2599 break;}
2600case 163:
vlma2374a02004-09-14 02:44:07 +00002601#line 1412 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002602{ yyval.a_type = ASN_STRING_UniversalString; ;
2603 break;}
2604case 164:
vlma2374a02004-09-14 02:44:07 +00002605#line 1413 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002606{ yyval.a_type = ASN_STRING_UTF8String; ;
2607 break;}
2608case 165:
vlma2374a02004-09-14 02:44:07 +00002609#line 1414 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002610{
vlmfa67ddc2004-06-03 03:38:44 +00002611 yyval.a_type = ASN_STRING_VideotexString;
vlm80103492004-09-07 10:39:09 +00002612 fprintf(stderr, "WARNING: VideotexString is not fully supported");
vlm6a02a8a2004-09-08 00:28:11 +00002613 ;
2614 break;}
2615case 166:
vlma2374a02004-09-14 02:44:07 +00002616#line 1418 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002617{ yyval.a_type = ASN_STRING_VisibleString; ;
2618 break;}
2619case 167:
vlma2374a02004-09-14 02:44:07 +00002620#line 1419 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002621{ yyval.a_type = ASN_STRING_ObjectDescriptor; ;
2622 break;}
2623case 173:
vlma2374a02004-09-14 02:44:07 +00002624#line 1431 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002625{ yyval.a_constr = 0; ;
2626 break;}
2627case 174:
vlma2374a02004-09-14 02:44:07 +00002628#line 1432 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002629{
vlm39e5ed72004-09-05 10:40:41 +00002630 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002631 ;
2632 break;}
2633case 175:
vlma2374a02004-09-14 02:44:07 +00002634#line 1438 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002635{
vlm39e5ed72004-09-05 10:40:41 +00002636 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_SET, yyvsp[0].a_constr, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002637 ;
2638 break;}
2639case 176:
vlma2374a02004-09-14 02:44:07 +00002640#line 1441 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002641{
vlmfa67ddc2004-06-03 03:38:44 +00002642 /*
2643 * This is a special case, for compatibility purposes.
vlm9283dbe2004-08-18 04:59:12 +00002644 * It goes without parentheses.
vlmfa67ddc2004-06-03 03:38:44 +00002645 */
vlm5f0128b2004-08-20 13:25:29 +00002646 CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_SIZE, yyvsp[-1].a_constr, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002647 ;
2648 break;}
2649case 177:
vlma2374a02004-09-14 02:44:07 +00002650#line 1451 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002651{
vlmfa67ddc2004-06-03 03:38:44 +00002652 yyval.a_constr = yyvsp[-1].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002653 ;
2654 break;}
2655case 178:
vlma2374a02004-09-14 02:44:07 +00002656#line 1454 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002657{
vlm9283dbe2004-08-18 04:59:12 +00002658 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_SET, yyvsp[-3].a_constr, yyvsp[-1].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002659 ;
2660 break;}
2661case 179:
vlma2374a02004-09-14 02:44:07 +00002662#line 1460 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002663{
vlmfa67ddc2004-06-03 03:38:44 +00002664 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002665 ;
2666 break;}
2667case 180:
vlma2374a02004-09-14 02:44:07 +00002668#line 1463 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002669{
vlmfa67ddc2004-06-03 03:38:44 +00002670 asn1p_constraint_t *ct;
2671 ct = asn1p_constraint_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00002672 ct->type = ACT_EL_EXT;
2673 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-2].a_constr, ct);
vlm6a02a8a2004-09-08 00:28:11 +00002674 ;
2675 break;}
2676case 181:
vlma2374a02004-09-14 02:44:07 +00002677#line 1469 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002678{
vlmfa67ddc2004-06-03 03:38:44 +00002679 asn1p_constraint_t *ct;
2680 ct = asn1p_constraint_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00002681 ct->type = ACT_EL_EXT;
2682 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-4].a_constr, ct);
vlm6f5eb0b2004-08-13 12:35:09 +00002683 ct = yyval.a_constr;
2684 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, ct, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002685 ;
2686 break;}
2687case 182:
vlma2374a02004-09-14 02:44:07 +00002688#line 1480 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002689{
vlm9283dbe2004-08-18 04:59:12 +00002690 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002691 ;
2692 break;}
2693case 183:
vlma2374a02004-09-14 02:44:07 +00002694#line 1483 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002695{
vlmfa67ddc2004-06-03 03:38:44 +00002696 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_UNI, yyvsp[-2].a_constr, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002697 ;
2698 break;}
2699case 184:
vlma2374a02004-09-14 02:44:07 +00002700#line 1486 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002701{
vlmfa67ddc2004-06-03 03:38:44 +00002702 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_INT, yyvsp[-2].a_constr, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002703 ;
2704 break;}
2705case 185:
vlma2374a02004-09-14 02:44:07 +00002706#line 1489 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002707{
vlmfa67ddc2004-06-03 03:38:44 +00002708 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_EXC, yyvsp[-2].a_constr, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002709 ;
2710 break;}
2711case 186:
vlma2374a02004-09-14 02:44:07 +00002712#line 1495 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002713{
vlmfa67ddc2004-06-03 03:38:44 +00002714 int ret;
2715 yyval.a_constr = asn1p_constraint_new(yylineno);
2716 checkmem(yyval.a_constr);
2717 yyval.a_constr->type = yyvsp[-3].a_ctype;
2718 ret = asn1p_constraint_insert(yyval.a_constr, yyvsp[-1].a_constr);
2719 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002720 ;
2721 break;}
2722case 187:
vlma2374a02004-09-14 02:44:07 +00002723#line 1503 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002724{
vlm9283dbe2004-08-18 04:59:12 +00002725 int ret;
2726 yyval.a_constr = asn1p_constraint_new(yylineno);
2727 checkmem(yyval.a_constr);
2728 yyval.a_constr->type = ACT_CA_SET;
2729 ret = asn1p_constraint_insert(yyval.a_constr, yyvsp[-1].a_constr);
2730 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002731 ;
2732 break;}
2733case 188:
vlma2374a02004-09-14 02:44:07 +00002734#line 1511 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002735{
vlm9283dbe2004-08-18 04:59:12 +00002736 yyval.a_constr = asn1p_constraint_new(yylineno);
2737 checkmem(yyval.a_constr);
2738 yyval.a_constr->type = ACT_EL_VALUE;
2739 yyval.a_constr->value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002740 ;
2741 break;}
2742case 189:
vlma2374a02004-09-14 02:44:07 +00002743#line 1517 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002744{
vlm5f0128b2004-08-20 13:25:29 +00002745 yyval.a_constr = asn1p_constraint_new(yylineno);
2746 checkmem(yyval.a_constr);
2747 yyval.a_constr->type = yyvsp[-1].a_ctype;
vlmec8f6812004-08-22 03:19:54 +00002748 yyval.a_constr->range_start = yyvsp[-2].a_value;
2749 yyval.a_constr->range_stop = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002750 ;
2751 break;}
2752case 190:
vlma2374a02004-09-14 02:44:07 +00002753#line 1524 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002754{
vlmec8f6812004-08-22 03:19:54 +00002755 yyval.a_constr = asn1p_constraint_new(yylineno);
2756 checkmem(yyval.a_constr);
2757 yyval.a_constr->type = yyvsp[-1].a_ctype;
2758 yyval.a_constr->range_start = asn1p_value_fromint(-123);
2759 yyval.a_constr->range_stop = yyvsp[0].a_value;
2760 yyval.a_constr->range_start->type = ATV_MIN;
vlm6a02a8a2004-09-08 00:28:11 +00002761 ;
2762 break;}
2763case 191:
vlma2374a02004-09-14 02:44:07 +00002764#line 1532 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002765{
vlmec8f6812004-08-22 03:19:54 +00002766 yyval.a_constr = asn1p_constraint_new(yylineno);
2767 checkmem(yyval.a_constr);
2768 yyval.a_constr->type = yyvsp[-1].a_ctype;
2769 yyval.a_constr->range_start = yyvsp[-2].a_value;
2770 yyval.a_constr->range_stop = asn1p_value_fromint(321);
2771 yyval.a_constr->range_stop->type = ATV_MAX;
vlm6a02a8a2004-09-08 00:28:11 +00002772 ;
2773 break;}
2774case 192:
vlma2374a02004-09-14 02:44:07 +00002775#line 1540 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002776{
vlmec8f6812004-08-22 03:19:54 +00002777 yyval.a_constr = asn1p_constraint_new(yylineno);
2778 checkmem(yyval.a_constr);
2779 yyval.a_constr->type = yyvsp[-1].a_ctype;
2780 yyval.a_constr->range_start = asn1p_value_fromint(-123);
2781 yyval.a_constr->range_stop = asn1p_value_fromint(321);
2782 yyval.a_constr->range_start->type = ATV_MIN;
2783 yyval.a_constr->range_stop->type = ATV_MAX;
vlm6a02a8a2004-09-08 00:28:11 +00002784 ;
2785 break;}
2786case 193:
vlma2374a02004-09-14 02:44:07 +00002787#line 1549 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002788{
vlm5f0128b2004-08-20 13:25:29 +00002789 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002790 ;
2791 break;}
2792case 194:
vlma2374a02004-09-14 02:44:07 +00002793#line 1552 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002794{
vlm39e5ed72004-09-05 10:40:41 +00002795 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002796 ;
2797 break;}
2798case 195:
vlma2374a02004-09-14 02:44:07 +00002799#line 1558 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002800{ yyval.a_ctype = ACT_EL_RANGE; ;
2801 break;}
2802case 196:
vlma2374a02004-09-14 02:44:07 +00002803#line 1559 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002804{ yyval.a_ctype = ACT_EL_RLRANGE; ;
2805 break;}
2806case 197:
vlma2374a02004-09-14 02:44:07 +00002807#line 1560 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002808{ yyval.a_ctype = ACT_EL_LLRANGE; ;
2809 break;}
2810case 198:
vlma2374a02004-09-14 02:44:07 +00002811#line 1561 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002812{ yyval.a_ctype = ACT_EL_ULRANGE; ;
2813 break;}
2814case 199:
vlma2374a02004-09-14 02:44:07 +00002815#line 1565 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002816{
vlm39e5ed72004-09-05 10:40:41 +00002817 yyval.a_ctype = ACT_CT_SIZE;
vlm6a02a8a2004-09-08 00:28:11 +00002818 ;
2819 break;}
2820case 200:
vlma2374a02004-09-14 02:44:07 +00002821#line 1568 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002822{
vlm39e5ed72004-09-05 10:40:41 +00002823 yyval.a_ctype = ACT_CT_FROM;
vlm6a02a8a2004-09-08 00:28:11 +00002824 ;
2825 break;}
2826case 201:
vlma2374a02004-09-14 02:44:07 +00002827#line 1574 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002828{
vlmfa67ddc2004-06-03 03:38:44 +00002829 yyval.a_value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002830 ;
2831 break;}
2832case 202:
vlma2374a02004-09-14 02:44:07 +00002833#line 1577 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002834{
vlmfa67ddc2004-06-03 03:38:44 +00002835 asn1p_ref_t *ref;
2836 int ret;
2837 ref = asn1p_ref_new(yylineno);
2838 checkmem(ref);
2839 ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
2840 checkmem(ret == 0);
2841 yyval.a_value = asn1p_value_fromref(ref, 0);
2842 checkmem(yyval.a_value);
2843 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002844 ;
2845 break;}
2846case 203:
vlma2374a02004-09-14 02:44:07 +00002847#line 1588 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002848{
vlmfa67ddc2004-06-03 03:38:44 +00002849 yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
2850 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00002851 ;
2852 break;}
2853case 204:
vlma2374a02004-09-14 02:44:07 +00002854#line 1593 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002855{
vlmfa67ddc2004-06-03 03:38:44 +00002856 yyval.a_value = asn1p_value_fromint(0);
2857 checkmem(yyval.a_value);
2858 yyval.a_value->type = ATV_FALSE;
vlm6a02a8a2004-09-08 00:28:11 +00002859 ;
2860 break;}
2861case 205:
vlma2374a02004-09-14 02:44:07 +00002862#line 1598 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002863{
vlmfa67ddc2004-06-03 03:38:44 +00002864 yyval.a_value = asn1p_value_fromint(1);
2865 checkmem(yyval.a_value);
2866 yyval.a_value->type = ATV_TRUE;
vlm6a02a8a2004-09-08 00:28:11 +00002867 ;
2868 break;}
2869case 206:
vlma2374a02004-09-14 02:44:07 +00002870#line 1606 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002871{
vlmfa67ddc2004-06-03 03:38:44 +00002872 CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_WCOMPS, yyvsp[-1].a_constr, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002873 ;
2874 break;}
2875case 207:
vlma2374a02004-09-14 02:44:07 +00002876#line 1612 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002877{
vlmfa67ddc2004-06-03 03:38:44 +00002878 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002879 ;
2880 break;}
2881case 208:
vlma2374a02004-09-14 02:44:07 +00002882#line 1615 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002883{
vlmfa67ddc2004-06-03 03:38:44 +00002884 CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_WCOMPS, yyvsp[-2].a_constr, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002885 ;
2886 break;}
2887case 209:
vlma2374a02004-09-14 02:44:07 +00002888#line 1621 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002889{
vlmfa67ddc2004-06-03 03:38:44 +00002890 yyval.a_constr = asn1p_constraint_new(yylineno);
2891 checkmem(yyval.a_constr);
2892 yyval.a_constr->type = ACT_EL_EXT;
vlm6a02a8a2004-09-08 00:28:11 +00002893 ;
2894 break;}
2895case 210:
vlma2374a02004-09-14 02:44:07 +00002896#line 1626 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002897{
vlmfa67ddc2004-06-03 03:38:44 +00002898 yyval.a_constr = asn1p_constraint_new(yylineno);
2899 checkmem(yyval.a_constr);
2900 yyval.a_constr->type = ACT_EL_VALUE;
2901 yyval.a_constr->value = asn1p_value_frombuf(yyvsp[-2].tv_str, strlen(yyvsp[-2].tv_str), 0);
2902 yyval.a_constr->presence = yyvsp[0].a_pres;
vlm6a02a8a2004-09-08 00:28:11 +00002903 ;
2904 break;}
2905case 211:
vlma2374a02004-09-14 02:44:07 +00002906#line 1639 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002907{ yyval.a_pres = ACPRES_DEFAULT; ;
2908 break;}
2909case 212:
vlma2374a02004-09-14 02:44:07 +00002910#line 1640 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002911{ yyval.a_pres = yyvsp[0].a_pres; ;
2912 break;}
2913case 213:
vlma2374a02004-09-14 02:44:07 +00002914#line 1644 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002915{
vlmfa67ddc2004-06-03 03:38:44 +00002916 yyval.a_pres = ACPRES_PRESENT;
vlm6a02a8a2004-09-08 00:28:11 +00002917 ;
2918 break;}
2919case 214:
vlma2374a02004-09-14 02:44:07 +00002920#line 1647 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002921{
vlmfa67ddc2004-06-03 03:38:44 +00002922 yyval.a_pres = ACPRES_ABSENT;
vlm6a02a8a2004-09-08 00:28:11 +00002923 ;
2924 break;}
2925case 215:
vlma2374a02004-09-14 02:44:07 +00002926#line 1650 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002927{
vlmfa67ddc2004-06-03 03:38:44 +00002928 yyval.a_pres = ACPRES_OPTIONAL;
vlm6a02a8a2004-09-08 00:28:11 +00002929 ;
2930 break;}
2931case 216:
vlma2374a02004-09-14 02:44:07 +00002932#line 1656 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002933{
vlm5f0128b2004-08-20 13:25:29 +00002934 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002935 ;
2936 break;}
2937case 217:
vlma2374a02004-09-14 02:44:07 +00002938#line 1659 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002939{
vlm5f0128b2004-08-20 13:25:29 +00002940 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002941 ;
2942 break;}
2943case 218:
vlma2374a02004-09-14 02:44:07 +00002944#line 1668 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002945{
vlmfa67ddc2004-06-03 03:38:44 +00002946 asn1p_ref_t *ref = asn1p_ref_new(yylineno);
2947 asn1p_constraint_t *ct;
2948 int ret;
2949 ret = asn1p_ref_add_component(ref, yyvsp[-1].tv_str, 0);
2950 checkmem(ret == 0);
2951 ct = asn1p_constraint_new(yylineno);
2952 checkmem(yyval.a_constr);
2953 ct->type = ACT_EL_VALUE;
2954 ct->value = asn1p_value_fromref(ref, 0);
2955 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CRC, ct, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002956 ;
2957 break;}
2958case 219:
vlma2374a02004-09-14 02:44:07 +00002959#line 1683 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002960{
vlmfa67ddc2004-06-03 03:38:44 +00002961 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CRC, yyvsp[-3].a_constr, yyvsp[-1].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002962 ;
2963 break;}
2964case 220:
vlma2374a02004-09-14 02:44:07 +00002965#line 1689 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002966{
vlmfa67ddc2004-06-03 03:38:44 +00002967 yyval.a_constr = asn1p_constraint_new(yylineno);
2968 checkmem(yyval.a_constr);
2969 yyval.a_constr->type = ACT_EL_VALUE;
2970 yyval.a_constr->value = asn1p_value_fromref(yyvsp[0].a_ref, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002971 ;
2972 break;}
2973case 221:
vlma2374a02004-09-14 02:44:07 +00002974#line 1695 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002975{
vlmfa67ddc2004-06-03 03:38:44 +00002976 asn1p_constraint_t *ct;
2977 ct = asn1p_constraint_new(yylineno);
2978 checkmem(ct);
2979 ct->type = ACT_EL_VALUE;
2980 ct->value = asn1p_value_fromref(yyvsp[0].a_ref, 0);
2981 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-2].a_constr, ct);
vlm6a02a8a2004-09-08 00:28:11 +00002982 ;
2983 break;}
2984case 222:
vlma2374a02004-09-14 02:44:07 +00002985#line 1709 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002986{
vlmfa67ddc2004-06-03 03:38:44 +00002987 char *p = malloc(strlen(yyvsp[0].tv_str) + 2);
2988 int ret;
2989 *p = '@';
2990 strcpy(p + 1, yyvsp[0].tv_str);
2991 yyval.a_ref = asn1p_ref_new(yylineno);
2992 ret = asn1p_ref_add_component(yyval.a_ref, p, 0);
2993 checkmem(ret == 0);
2994 free(p);
2995 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002996 ;
2997 break;}
2998case 223:
vlma2374a02004-09-14 02:44:07 +00002999#line 1720 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003000{
vlmfa67ddc2004-06-03 03:38:44 +00003001 char *p = malloc(strlen(yyvsp[0].tv_str) + 3);
3002 int ret;
3003 p[0] = '@';
3004 p[1] = '.';
3005 strcpy(p + 2, yyvsp[0].tv_str);
3006 yyval.a_ref = asn1p_ref_new(yylineno);
3007 ret = asn1p_ref_add_component(yyval.a_ref, p, 0);
3008 checkmem(ret == 0);
3009 free(p);
3010 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00003011 ;
3012 break;}
3013case 224:
vlma2374a02004-09-14 02:44:07 +00003014#line 1736 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003015{
vlmfa67ddc2004-06-03 03:38:44 +00003016 yyval.tv_str = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003017 ;
3018 break;}
3019case 225:
vlma2374a02004-09-14 02:44:07 +00003020#line 1739 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003021{
vlmfa67ddc2004-06-03 03:38:44 +00003022 int l1 = strlen(yyvsp[-2].tv_str);
3023 int l3 = strlen(yyvsp[0].tv_str);
3024 yyval.tv_str = malloc(l1 + 1 + l3 + 1);
3025 memcpy(yyval.tv_str, yyvsp[-2].tv_str, l1);
3026 yyval.tv_str[l1] = '.';
3027 memcpy(yyval.tv_str + l1 + 1, yyvsp[0].tv_str, l3);
3028 yyval.tv_str[l1 + 1 + l3] = '\0';
vlm6a02a8a2004-09-08 00:28:11 +00003029 ;
3030 break;}
3031case 226:
vlma2374a02004-09-14 02:44:07 +00003032#line 1757 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003033{ yyval.a_marker = EM_NOMARK; ;
3034 break;}
3035case 227:
vlma2374a02004-09-14 02:44:07 +00003036#line 1758 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003037{ yyval.a_marker = yyvsp[0].a_marker; ;
3038 break;}
3039case 228:
vlma2374a02004-09-14 02:44:07 +00003040#line 1762 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003041{
vlmfa67ddc2004-06-03 03:38:44 +00003042 yyval.a_marker = EM_OPTIONAL;
vlm6a02a8a2004-09-08 00:28:11 +00003043 ;
3044 break;}
3045case 229:
vlma2374a02004-09-14 02:44:07 +00003046#line 1765 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003047{
vlmfa67ddc2004-06-03 03:38:44 +00003048 yyval.a_marker = EM_DEFAULT;
3049 /* FIXME: store DefaultValue somewhere */
vlm6a02a8a2004-09-08 00:28:11 +00003050 ;
3051 break;}
3052case 230:
vlmfce48a42004-09-14 02:36:39 +00003053#line 1772 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003054{
3055 ;
3056 break;}
vlma2374a02004-09-14 02:44:07 +00003057case 231:
vlmfce48a42004-09-14 02:36:39 +00003058#line 1774 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003059{
3060 ;
3061 break;}
vlma2374a02004-09-14 02:44:07 +00003062case 232:
3063#line 1776 "asn1p_y.y"
3064{ asn1p_lexer_hack_push_opaque_state(); ;
3065 break;}
3066case 233:
3067#line 1776 "asn1p_y.y"
3068{
3069 ;
3070 break;}
vlm6a02a8a2004-09-08 00:28:11 +00003071case 234:
vlma2374a02004-09-14 02:44:07 +00003072#line 1797 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003073{
vlm39e5ed72004-09-05 10:40:41 +00003074 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003075 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00003076 ;
3077 break;}
3078case 235:
vlma2374a02004-09-14 02:44:07 +00003079#line 1801 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003080{
vlmfa67ddc2004-06-03 03:38:44 +00003081 yyval.a_expr = yyvsp[-1].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00003082 ;
3083 break;}
3084case 236:
vlma2374a02004-09-14 02:44:07 +00003085#line 1807 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003086{
vlm39e5ed72004-09-05 10:40:41 +00003087 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003088 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00003089 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
3090 ;
3091 break;}
3092case 237:
vlma2374a02004-09-14 02:44:07 +00003093#line 1812 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003094{
vlmfa67ddc2004-06-03 03:38:44 +00003095 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00003096 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
3097 ;
3098 break;}
3099case 238:
vlma2374a02004-09-14 02:44:07 +00003100#line 1819 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003101{
vlm39e5ed72004-09-05 10:40:41 +00003102 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003103 checkmem(yyval.a_expr);
3104 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3105 yyval.a_expr->meta_type = AMT_VALUE;
3106 yyval.a_expr->Identifier = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003107 ;
3108 break;}
3109case 239:
vlma2374a02004-09-14 02:44:07 +00003110#line 1826 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003111{
vlm39e5ed72004-09-05 10:40:41 +00003112 yyval.a_expr = asn1p_expr_new(yylineno);
vlm5f0128b2004-08-20 13:25:29 +00003113 checkmem(yyval.a_expr);
3114 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3115 yyval.a_expr->meta_type = AMT_VALUE;
3116 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
3117 yyval.a_expr->value = yyvsp[-1].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00003118 ;
3119 break;}
3120case 240:
vlma2374a02004-09-14 02:44:07 +00003121#line 1834 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003122{
vlm39e5ed72004-09-05 10:40:41 +00003123 yyval.a_expr = asn1p_expr_new(yylineno);
vlm5f0128b2004-08-20 13:25:29 +00003124 checkmem(yyval.a_expr);
3125 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3126 yyval.a_expr->meta_type = AMT_VALUE;
3127 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
3128 yyval.a_expr->value = yyvsp[-1].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00003129 ;
3130 break;}
3131case 241:
vlma2374a02004-09-14 02:44:07 +00003132#line 1842 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003133{
vlm39e5ed72004-09-05 10:40:41 +00003134 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003135 checkmem(yyval.a_expr);
3136 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3137 yyval.a_expr->meta_type = AMT_VALUE;
3138 yyval.a_expr->value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00003139 ;
3140 break;}
3141case 242:
vlma2374a02004-09-14 02:44:07 +00003142#line 1849 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003143{
vlm39e5ed72004-09-05 10:40:41 +00003144 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003145 checkmem(yyval.a_expr);
3146 yyval.a_expr->Identifier = strdup("...");
3147 checkmem(yyval.a_expr->Identifier);
3148 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
3149 yyval.a_expr->meta_type = AMT_VALUE;
vlm6a02a8a2004-09-08 00:28:11 +00003150 ;
3151 break;}
3152case 243:
vlma2374a02004-09-14 02:44:07 +00003153#line 1860 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003154{
vlmec8f6812004-08-22 03:19:54 +00003155 yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int);
3156 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00003157 ;
3158 break;}
3159case 244:
vlma2374a02004-09-14 02:44:07 +00003160#line 1864 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003161{
vlmec8f6812004-08-22 03:19:54 +00003162 yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int);
3163 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00003164 ;
3165 break;}
3166case 245:
vlma2374a02004-09-14 02:44:07 +00003167#line 1895 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003168{ memset(&yyval.a_tag, 0, sizeof(yyval.a_tag)); ;
3169 break;}
3170case 246:
vlma2374a02004-09-14 02:44:07 +00003171#line 1896 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003172{ yyval.a_tag = yyvsp[0].a_tag; ;
3173 break;}
3174case 247:
vlma2374a02004-09-14 02:44:07 +00003175#line 1900 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003176{
vlmfa67ddc2004-06-03 03:38:44 +00003177 yyval.a_tag = yyvsp[0].a_tag;
3178 yyval.a_tag.tag_mode = TM_DEFAULT;
vlm6a02a8a2004-09-08 00:28:11 +00003179 ;
3180 break;}
3181case 248:
vlma2374a02004-09-14 02:44:07 +00003182#line 1904 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003183{
vlmfa67ddc2004-06-03 03:38:44 +00003184 yyval.a_tag = yyvsp[-1].a_tag;
3185 yyval.a_tag.tag_mode = TM_IMPLICIT;
vlm6a02a8a2004-09-08 00:28:11 +00003186 ;
3187 break;}
3188case 249:
vlma2374a02004-09-14 02:44:07 +00003189#line 1908 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003190{
vlmfa67ddc2004-06-03 03:38:44 +00003191 yyval.a_tag = yyvsp[-1].a_tag;
3192 yyval.a_tag.tag_mode = TM_EXPLICIT;
vlm6a02a8a2004-09-08 00:28:11 +00003193 ;
3194 break;}
3195case 250:
vlma2374a02004-09-14 02:44:07 +00003196#line 1915 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003197{
vlm5f0128b2004-08-20 13:25:29 +00003198 checkmem(yyvsp[0].tv_str);
3199 yyval.tv_str = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003200 ;
3201 break;}
3202case 251:
vlma2374a02004-09-14 02:44:07 +00003203#line 1919 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003204{
vlm39e5ed72004-09-05 10:40:41 +00003205 checkmem(yyvsp[0].tv_str);
3206 yyval.tv_str = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003207 ;
3208 break;}
3209case 252:
vlma2374a02004-09-14 02:44:07 +00003210#line 1927 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003211{
vlm39e5ed72004-09-05 10:40:41 +00003212 checkmem(yyvsp[0].tv_str);
3213 yyval.tv_str = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003214 ;
3215 break;}
3216case 253:
vlma2374a02004-09-14 02:44:07 +00003217#line 1934 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003218{
vlm39e5ed72004-09-05 10:40:41 +00003219 checkmem(yyvsp[0].tv_str);
3220 yyval.tv_str = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003221 ;
3222 break;}
vlm6a02a8a2004-09-08 00:28:11 +00003223}
3224 /* the action file gets copied in in place of this dollarsign */
3225#line 543 "/usr/share/bison.simple"
vlmfa67ddc2004-06-03 03:38:44 +00003226
3227 yyvsp -= yylen;
3228 yyssp -= yylen;
vlm6a02a8a2004-09-08 00:28:11 +00003229#ifdef YYLSP_NEEDED
3230 yylsp -= yylen;
3231#endif
vlmfa67ddc2004-06-03 03:38:44 +00003232
vlm6a02a8a2004-09-08 00:28:11 +00003233#if YYDEBUG != 0
vlmfa67ddc2004-06-03 03:38:44 +00003234 if (yydebug)
3235 {
vlm6a02a8a2004-09-08 00:28:11 +00003236 short *ssp1 = yyss - 1;
3237 fprintf (stderr, "state stack now");
3238 while (ssp1 != yyssp)
3239 fprintf (stderr, " %d", *++ssp1);
3240 fprintf (stderr, "\n");
vlmfa67ddc2004-06-03 03:38:44 +00003241 }
3242#endif
3243
3244 *++yyvsp = yyval;
3245
vlm6a02a8a2004-09-08 00:28:11 +00003246#ifdef YYLSP_NEEDED
3247 yylsp++;
3248 if (yylen == 0)
3249 {
3250 yylsp->first_line = yylloc.first_line;
3251 yylsp->first_column = yylloc.first_column;
3252 yylsp->last_line = (yylsp-1)->last_line;
3253 yylsp->last_column = (yylsp-1)->last_column;
3254 yylsp->text = 0;
3255 }
3256 else
3257 {
3258 yylsp->last_line = (yylsp+yylen-1)->last_line;
3259 yylsp->last_column = (yylsp+yylen-1)->last_column;
3260 }
3261#endif
vlmfa67ddc2004-06-03 03:38:44 +00003262
vlm6a02a8a2004-09-08 00:28:11 +00003263 /* Now "shift" the result of the reduction.
3264 Determine what state that goes to,
3265 based on the state we popped back to
3266 and the rule number reduced by. */
vlmfa67ddc2004-06-03 03:38:44 +00003267
3268 yyn = yyr1[yyn];
3269
vlm6a02a8a2004-09-08 00:28:11 +00003270 yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
3271 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
vlmfa67ddc2004-06-03 03:38:44 +00003272 yystate = yytable[yystate];
3273 else
vlm6a02a8a2004-09-08 00:28:11 +00003274 yystate = yydefgoto[yyn - YYNTBASE];
vlmfa67ddc2004-06-03 03:38:44 +00003275
3276 goto yynewstate;
3277
vlm6a02a8a2004-09-08 00:28:11 +00003278yyerrlab: /* here on detecting error */
vlmfa67ddc2004-06-03 03:38:44 +00003279
vlm6a02a8a2004-09-08 00:28:11 +00003280 if (! yyerrstatus)
3281 /* If not already recovering from an error, report this error. */
vlmfa67ddc2004-06-03 03:38:44 +00003282 {
3283 ++yynerrs;
vlm6a02a8a2004-09-08 00:28:11 +00003284
3285#ifdef YYERROR_VERBOSE
vlmfa67ddc2004-06-03 03:38:44 +00003286 yyn = yypact[yystate];
3287
vlm6a02a8a2004-09-08 00:28:11 +00003288 if (yyn > YYFLAG && yyn < YYLAST)
vlmfa67ddc2004-06-03 03:38:44 +00003289 {
vlm6a02a8a2004-09-08 00:28:11 +00003290 int size = 0;
3291 char *msg;
3292 int x, count;
vlmfa67ddc2004-06-03 03:38:44 +00003293
vlm6a02a8a2004-09-08 00:28:11 +00003294 count = 0;
3295 /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
3296 for (x = (yyn < 0 ? -yyn : 0);
3297 x < (ssize_t)(sizeof(yytname) / sizeof(char *)); x++)
3298 if (yycheck[x + yyn] == x)
3299 size += strlen(yytname[x]) + 15, count++;
3300 msg = (char *) malloc(size + 15);
3301 if (msg != 0)
vlmfa67ddc2004-06-03 03:38:44 +00003302 {
vlm6a02a8a2004-09-08 00:28:11 +00003303 strcpy(msg, "parse error");
vlmfa67ddc2004-06-03 03:38:44 +00003304
vlm6a02a8a2004-09-08 00:28:11 +00003305 if (count < 5)
vlmfa67ddc2004-06-03 03:38:44 +00003306 {
vlm6a02a8a2004-09-08 00:28:11 +00003307 count = 0;
3308 for (x = (yyn < 0 ? -yyn : 0);
3309 x < (ssize_t)(sizeof(yytname) / sizeof(char *)); x++)
3310 if (yycheck[x + yyn] == x)
vlmfa67ddc2004-06-03 03:38:44 +00003311 {
vlm6a02a8a2004-09-08 00:28:11 +00003312 strcat(msg, count == 0 ? ", expecting `" : " or `");
3313 strcat(msg, yytname[x]);
3314 strcat(msg, "'");
3315 count++;
vlmfa67ddc2004-06-03 03:38:44 +00003316 }
3317 }
vlm6a02a8a2004-09-08 00:28:11 +00003318 yyerror(msg);
3319 free(msg);
vlmfa67ddc2004-06-03 03:38:44 +00003320 }
3321 else
vlm6a02a8a2004-09-08 00:28:11 +00003322 yyerror ("parse error; also virtual memory exceeded");
vlmfa67ddc2004-06-03 03:38:44 +00003323 }
3324 else
3325#endif /* YYERROR_VERBOSE */
vlm6a02a8a2004-09-08 00:28:11 +00003326 yyerror("parse error");
vlmfa67ddc2004-06-03 03:38:44 +00003327 }
vlm6a02a8a2004-09-08 00:28:11 +00003328
vlmfa67ddc2004-06-03 03:38:44 +00003329 goto yyerrlab1;
vlm6a02a8a2004-09-08 00:28:11 +00003330yyerrlab1: /* here on error raised explicitly by an action */
vlmfa67ddc2004-06-03 03:38:44 +00003331
3332 if (yyerrstatus == 3)
3333 {
vlm6a02a8a2004-09-08 00:28:11 +00003334 /* if just tried and failed to reuse lookahead token after an error, discard it. */
vlmfa67ddc2004-06-03 03:38:44 +00003335
vlm6a02a8a2004-09-08 00:28:11 +00003336 /* return failure if at end of input */
vlmfa67ddc2004-06-03 03:38:44 +00003337 if (yychar == YYEOF)
vlm6a02a8a2004-09-08 00:28:11 +00003338 YYABORT;
vlmfa67ddc2004-06-03 03:38:44 +00003339
vlm6a02a8a2004-09-08 00:28:11 +00003340#if YYDEBUG != 0
3341 if (yydebug)
3342 fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
3343#endif
3344
vlmfa67ddc2004-06-03 03:38:44 +00003345 yychar = YYEMPTY;
3346 }
3347
vlm6a02a8a2004-09-08 00:28:11 +00003348 /* Else will try to reuse lookahead token
3349 after shifting the error token. */
vlmfa67ddc2004-06-03 03:38:44 +00003350
vlm6a02a8a2004-09-08 00:28:11 +00003351 yyerrstatus = 3; /* Each real token shifted decrements this */
vlmfa67ddc2004-06-03 03:38:44 +00003352
vlm6a02a8a2004-09-08 00:28:11 +00003353 goto yyerrhandle;
vlm80103492004-09-07 10:39:09 +00003354
vlm6a02a8a2004-09-08 00:28:11 +00003355yyerrdefault: /* current state does not do anything special for the error token. */
vlm80103492004-09-07 10:39:09 +00003356
vlm6a02a8a2004-09-08 00:28:11 +00003357#if 0
3358 /* This is wrong; only states that explicitly want error tokens
3359 should shift them. */
3360 yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
3361 if (yyn) goto yydefault;
vlm39e5ed72004-09-05 10:40:41 +00003362#endif
vlm6a02a8a2004-09-08 00:28:11 +00003363
3364yyerrpop: /* pop the current state because it cannot handle the error token */
3365
3366 if (yyssp == yyss) YYABORT;
3367 yyvsp--;
3368 yystate = *--yyssp;
3369#ifdef YYLSP_NEEDED
3370 yylsp--;
3371#endif
3372
3373#if YYDEBUG != 0
3374 if (yydebug)
3375 {
3376 short *ssp1 = yyss - 1;
3377 fprintf (stderr, "Error: state stack now");
3378 while (ssp1 != yyssp)
3379 fprintf (stderr, " %d", *++ssp1);
3380 fprintf (stderr, "\n");
vlm39e5ed72004-09-05 10:40:41 +00003381 }
vlm6a02a8a2004-09-08 00:28:11 +00003382#endif
3383
3384yyerrhandle:
3385
3386 yyn = yypact[yystate];
3387 if (yyn == YYFLAG)
3388 goto yyerrdefault;
3389
3390 yyn += YYTERROR;
3391 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
3392 goto yyerrdefault;
3393
3394 yyn = yytable[yyn];
3395 if (yyn < 0)
3396 {
3397 if (yyn == YYFLAG)
3398 goto yyerrpop;
3399 yyn = -yyn;
3400 goto yyreduce;
3401 }
3402 else if (yyn == 0)
3403 goto yyerrpop;
vlmfa67ddc2004-06-03 03:38:44 +00003404
3405 if (yyn == YYFINAL)
3406 YYACCEPT;
3407
vlm6a02a8a2004-09-08 00:28:11 +00003408#if YYDEBUG != 0
3409 if (yydebug)
3410 fprintf(stderr, "Shifting error token, ");
3411#endif
vlmfa67ddc2004-06-03 03:38:44 +00003412
3413 *++yyvsp = yylval;
vlm6a02a8a2004-09-08 00:28:11 +00003414#ifdef YYLSP_NEEDED
3415 *++yylsp = yylloc;
3416#endif
vlmfa67ddc2004-06-03 03:38:44 +00003417
3418 yystate = yyn;
3419 goto yynewstate;
3420
vlm6a02a8a2004-09-08 00:28:11 +00003421 yyacceptlab:
3422 /* YYACCEPT comes here. */
3423 if (yyfree_stacks)
3424 {
3425 free (yyss);
3426 free (yyvs);
3427#ifdef YYLSP_NEEDED
3428 free (yyls);
vlm044f7442004-09-04 04:49:21 +00003429#endif
vlm6a02a8a2004-09-08 00:28:11 +00003430 }
3431 return 0;
vlm80103492004-09-07 10:39:09 +00003432
vlm6a02a8a2004-09-08 00:28:11 +00003433 yyabortlab:
3434 /* YYABORT comes here. */
3435 if (yyfree_stacks)
3436 {
3437 free (yyss);
3438 free (yyvs);
3439#ifdef YYLSP_NEEDED
3440 free (yyls);
vlm80103492004-09-07 10:39:09 +00003441#endif
vlm6a02a8a2004-09-08 00:28:11 +00003442 }
3443 return 1;
vlmfa67ddc2004-06-03 03:38:44 +00003444}
vlma2374a02004-09-14 02:44:07 +00003445#line 1940 "asn1p_y.y"
vlmfa67ddc2004-06-03 03:38:44 +00003446
3447
3448
3449/*
3450 * Convert Xstring ('0101'B or '5'H) to the binary vector.
3451 */
3452static asn1p_value_t *
3453_convert_bitstring2binary(char *str, int base) {
3454 asn1p_value_t *val;
3455 int slen;
3456 int memlen;
3457 int baselen;
3458 int bits;
3459 uint8_t *binary_vector;
3460 uint8_t *bv_ptr;
3461 uint8_t cur_val;
3462
3463 assert(str);
3464 assert(str[0] == '\'');
3465
3466 switch(base) {
3467 case 'B':
3468 baselen = 1;
3469 break;
3470 case 'H':
3471 baselen = 4;
3472 break;
3473 default:
3474 assert(base == 'B' || base == 'H');
3475 errno = EINVAL;
3476 return NULL;
3477 }
3478
3479 slen = strlen(str);
3480 assert(str[slen - 1] == base);
3481 assert(str[slen - 2] == '\'');
3482
3483 memlen = slen / (8 / baselen); /* Conservative estimate */
3484
3485 bv_ptr = binary_vector = malloc(memlen + 1);
3486 if(bv_ptr == NULL)
3487 /* ENOMEM */
3488 return NULL;
3489
3490 cur_val = 0;
3491 bits = 0;
3492 while(*(++str) != '\'') {
3493 switch(baselen) {
3494 case 1:
3495 switch(*str) {
3496 case '1':
3497 cur_val |= 1 << (7 - (bits % 8));
3498 case '0':
3499 break;
3500 default:
3501 assert(!"_y UNREACH1");
3502 case ' ': case '\r': case '\n':
3503 continue;
3504 }
3505 break;
3506 case 4:
3507 switch(*str) {
3508 case '0': case '1': case '2': case '3': case '4':
3509 case '5': case '6': case '7': case '8': case '9':
3510 cur_val |= (*str - '0') << (4 - (bits % 8));
3511 break;
3512 case 'A': case 'B': case 'C':
3513 case 'D': case 'E': case 'F':
3514 cur_val |= ((*str - 'A') + 10)
3515 << (4 - (bits % 8));
3516 break;
3517 default:
3518 assert(!"_y UNREACH2");
3519 case ' ': case '\r': case '\n':
3520 continue;
3521 }
3522 break;
3523 }
3524
3525 bits += baselen;
3526 if((bits % 8) == 0) {
3527 *bv_ptr++ = cur_val;
3528 cur_val = 0;
3529 }
3530 }
3531
3532 *bv_ptr = cur_val;
3533 assert((bv_ptr - binary_vector) <= memlen);
3534
3535 val = asn1p_value_frombits(binary_vector, bits, 0);
3536 if(val == NULL) {
3537 free(binary_vector);
3538 }
3539
3540 return val;
3541}
3542
3543extern char *asn1p_text;
3544
3545int
3546yyerror(const char *msg) {
3547 fprintf(stderr,
3548 "ASN.1 grammar parse error "
3549 "near line %d (token \"%s\"): %s\n",
vlm39e5ed72004-09-05 10:40:41 +00003550 yylineno, asn1p_text, msg);
vlmfa67ddc2004-06-03 03:38:44 +00003551 return -1;
3552}
3553
3554