blob: 2c520f8849eaaaf5a8936a9bac32c86fcd67a491 [file] [log] [blame]
vlmfa67ddc2004-06-03 03:38:44 +00001
vlm6a02a8a2004-09-08 00:28:11 +00002/* A Bison parser, made from asn1p_y.y
3 by GNU Bison version 1.28 */
vlmfa67ddc2004-06-03 03:38:44 +00004
vlm6a02a8a2004-09-08 00:28:11 +00005#define YYBISON 1 /* Identify Bison output. */
vlmfa67ddc2004-06-03 03:38:44 +00006
7#define yyparse asn1p_parse
vlm6a02a8a2004-09-08 00:28:11 +00008#define yylex asn1p_lex
vlmfa67ddc2004-06-03 03:38:44 +00009#define yyerror asn1p_error
vlm6a02a8a2004-09-08 00:28:11 +000010#define yylval asn1p_lval
11#define yychar asn1p_char
vlmfa67ddc2004-06-03 03:38:44 +000012#define yydebug asn1p_debug
13#define yynerrs asn1p_nerrs
vlm6a02a8a2004-09-08 00:28:11 +000014#define TOK_PPEQ 257
15#define TOK_opaque 258
16#define TOK_bstring 259
17#define TOK_cstring 260
18#define TOK_hstring 261
19#define TOK_identifier 262
20#define TOK_number 263
21#define TOK_number_negative 264
22#define TOK_typereference 265
23#define TOK_capitalreference 266
24#define TOK_typefieldreference 267
25#define TOK_valuefieldreference 268
26#define TOK_ABSENT 269
27#define TOK_ABSTRACT_SYNTAX 270
28#define TOK_ALL 271
29#define TOK_ANY 272
30#define TOK_APPLICATION 273
31#define TOK_AUTOMATIC 274
32#define TOK_BEGIN 275
33#define TOK_BIT 276
34#define TOK_BMPString 277
35#define TOK_BOOLEAN 278
36#define TOK_BY 279
37#define TOK_CHARACTER 280
38#define TOK_CHOICE 281
39#define TOK_CLASS 282
40#define TOK_COMPONENT 283
41#define TOK_COMPONENTS 284
42#define TOK_CONSTRAINED 285
43#define TOK_CONTAINING 286
44#define TOK_DEFAULT 287
45#define TOK_DEFINITIONS 288
46#define TOK_DEFINED 289
47#define TOK_EMBEDDED 290
48#define TOK_ENCODED 291
49#define TOK_ENCODING_CONTROL 292
50#define TOK_END 293
51#define TOK_ENUMERATED 294
52#define TOK_EXPLICIT 295
53#define TOK_EXPORTS 296
54#define TOK_EXTENSIBILITY 297
55#define TOK_EXTERNAL 298
56#define TOK_FALSE 299
57#define TOK_FROM 300
58#define TOK_GeneralizedTime 301
59#define TOK_GeneralString 302
60#define TOK_GraphicString 303
61#define TOK_IA5String 304
62#define TOK_IDENTIFIER 305
63#define TOK_IMPLICIT 306
64#define TOK_IMPLIED 307
65#define TOK_IMPORTS 308
66#define TOK_INCLUDES 309
67#define TOK_INSTANCE 310
68#define TOK_INSTRUCTIONS 311
69#define TOK_INTEGER 312
70#define TOK_ISO646String 313
71#define TOK_MAX 314
72#define TOK_MIN 315
73#define TOK_MINUS_INFINITY 316
74#define TOK_NULL 317
75#define TOK_NumericString 318
76#define TOK_OBJECT 319
77#define TOK_ObjectDescriptor 320
78#define TOK_OCTET 321
79#define TOK_OF 322
80#define TOK_OPTIONAL 323
81#define TOK_PATTERN 324
82#define TOK_PDV 325
83#define TOK_PLUS_INFINITY 326
84#define TOK_PRESENT 327
85#define TOK_PrintableString 328
86#define TOK_PRIVATE 329
87#define TOK_REAL 330
88#define TOK_RELATIVE_OID 331
89#define TOK_SEQUENCE 332
90#define TOK_SET 333
91#define TOK_SIZE 334
92#define TOK_STRING 335
93#define TOK_SYNTAX 336
94#define TOK_T61String 337
95#define TOK_TAGS 338
96#define TOK_TeletexString 339
97#define TOK_TRUE 340
98#define TOK_TYPE_IDENTIFIER 341
99#define TOK_UNIQUE 342
100#define TOK_UNIVERSAL 343
101#define TOK_UniversalString 344
102#define TOK_UTCTime 345
103#define TOK_UTF8String 346
104#define TOK_VideotexString 347
105#define TOK_VisibleString 348
106#define TOK_WITH 349
107#define TOK_EXCEPT 350
108#define TOK_INTERSECTION 351
109#define TOK_UNION 352
110#define TOK_TwoDots 353
111#define TOK_ThreeDots 354
112#define TOK_tag 355
vlmfa67ddc2004-06-03 03:38:44 +0000113
114#line 1 "asn1p_y.y"
115
116
117#include <stdlib.h>
118#include <stdio.h>
119#include <string.h>
120#include <errno.h>
121#include <assert.h>
122
123#include "asn1parser.h"
124
125#define YYPARSE_PARAM param
126#define YYERROR_VERBOSE
127
128int yylex(void);
129int yyerror(const char *msg);
130void asn1p_lexer_hack_push_opaque_state(void);
131void asn1p_lexer_hack_enable_with_syntax(void);
vlm9283dbe2004-08-18 04:59:12 +0000132void asn1p_lexer_hack_push_encoding_control(void);
vlmfa67ddc2004-06-03 03:38:44 +0000133#define yylineno asn1p_lineno
134extern int asn1p_lineno;
135
136
137static asn1p_value_t *
138 _convert_bitstring2binary(char *str, int base);
139
vlm6a02a8a2004-09-08 00:28:11 +0000140#define checkmem(ptr) do { \
141 if(!(ptr)) \
142 return yyerror("Memory failure"); \
vlmfa67ddc2004-06-03 03:38:44 +0000143 } while(0)
144
145#define CONSTRAINT_INSERT(root, constr_type, arg1, arg2) do { \
146 if(arg1->type != constr_type) { \
147 int __ret; \
148 root = asn1p_constraint_new(yylineno); \
149 checkmem(root); \
150 root->type = constr_type; \
151 __ret = asn1p_constraint_insert(root, \
152 arg1); \
153 checkmem(__ret == 0); \
154 } else { \
155 root = arg1; \
156 } \
157 if(arg2) { \
158 int __ret \
159 = asn1p_constraint_insert(root, arg2); \
160 checkmem(__ret == 0); \
161 } \
162 } while(0)
163
164
vlm9283dbe2004-08-18 04:59:12 +0000165#line 58 "asn1p_y.y"
vlmfa67ddc2004-06-03 03:38:44 +0000166typedef union {
167 asn1p_t *a_grammar;
168 asn1p_module_flags_e a_module_flags;
169 asn1p_module_t *a_module;
170 asn1p_expr_type_e a_type; /* ASN.1 Type */
171 asn1p_expr_t *a_expr; /* Constructed collection */
172 asn1p_constraint_t *a_constr; /* Constraint */
173 enum asn1p_constraint_type_e a_ctype;/* Constraint type */
174 asn1p_xports_t *a_xports; /* IMports/EXports */
175 asn1p_oid_t *a_oid; /* Object Identifier */
176 asn1p_oid_arc_t a_oid_arc; /* Single OID's arc */
177 struct asn1p_type_tag_s a_tag; /* A tag */
178 asn1p_ref_t *a_ref; /* Reference to custom type */
179 asn1p_wsyntx_t *a_wsynt; /* WITH SYNTAX contents */
180 asn1p_wsyntx_chunk_t *a_wchunk; /* WITH SYNTAX chunk */
181 struct asn1p_ref_component_s a_refcomp; /* Component of a reference */
182 asn1p_value_t *a_value; /* Number, DefinedValue, etc */
183 struct asn1p_param_s a_parg; /* A parameter argument */
184 asn1p_paramlist_t *a_plist; /* A pargs list */
vlmc94e28f2004-09-15 11:59:51 +0000185 struct asn1p_expr_marker_s a_marker; /* OPTIONAL/DEFAULT */
vlmfa67ddc2004-06-03 03:38:44 +0000186 enum asn1p_constr_pres_e a_pres; /* PRESENT/ABSENT/OPTIONAL */
vlmec6acd42004-09-29 13:18:09 +0000187 asn1c_integer_t a_int;
vlmfa67ddc2004-06-03 03:38:44 +0000188 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
vlm0aa86902004-10-12 23:26:53 +0000208#define YYFINAL 407
vlm6a02a8a2004-09-08 00:28:11 +0000209#define YYFLAG -32768
210#define YYNTBASE 115
vlmfa67ddc2004-06-03 03:38:44 +0000211
vlm0aa86902004-10-12 23:26:53 +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,
vlm0aa86902004-10-12 23:26:53 +0000259 107, 111, 113, 117, 119, 123, 127, 130, 132, 136,
260 138, 142, 144, 151, 153, 155, 156, 158, 160, 164,
261 166, 168, 173, 177, 181, 188, 190, 194, 196, 200,
262 204, 206, 210, 212, 214, 215, 217, 219, 223, 227,
263 231, 233, 235, 239, 242, 244, 250, 251, 253, 255,
264 259, 262, 267, 272, 273, 275, 276, 283, 285, 288,
265 290, 292, 294, 298, 302, 306, 308, 310, 315, 320,
266 325, 332, 339, 341, 346, 351, 353, 357, 359, 363,
267 367, 371, 373, 377, 379, 383, 385, 387, 389, 391,
268 396, 400, 401, 405, 407, 409, 411, 413, 415, 417,
269 419, 421, 423, 427, 429, 432, 434, 436, 438, 440,
270 443, 446, 448, 450, 453, 456, 458, 460, 462, 464,
271 467, 469, 472, 474, 476, 478, 480, 482, 484, 486,
272 488, 490, 492, 494, 496, 498, 500, 502, 504, 506,
273 508, 510, 511, 513, 515, 520, 524, 529, 531, 535,
274 541, 543, 547, 551, 555, 560, 564, 566, 570, 574,
275 578, 582, 584, 586, 588, 591, 594, 598, 600, 602,
276 604, 606, 608, 610, 612, 618, 620, 624, 626, 630,
277 631, 633, 635, 637, 639, 641, 643, 647, 652, 654,
278 658, 661, 665, 667, 671, 672, 674, 676, 679, 682,
279 686, 688, 692, 694, 699, 704, 706, 708, 710, 712,
280 713, 715, 717, 720, 723, 725, 727, 729, 730, 732
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,
vlm0aa86902004-10-12 23:26:53 +0000284 0, 117, 0, 116, 117, 0, 209, 118, 34, 122,
vlm6a02a8a2004-09-08 00:28:11 +0000285 3, 21, 125, 39, 0, 0, 119, 0, 104, 120,
286 105, 0, 104, 105, 0, 121, 0, 120, 121, 0,
vlm0aa86902004-10-12 23:26:53 +0000287 212, 0, 212, 106, 9, 107, 0, 9, 0, 0,
vlm6a02a8a2004-09-08 00:28:11 +0000288 123, 0, 124, 0, 123, 124, 0, 41, 84, 0,
289 52, 84, 0, 20, 84, 0, 43, 53, 0, 12,
290 57, 0, 0, 126, 0, 127, 0, 126, 127, 0,
vlm0aa86902004-10-12 23:26:53 +0000291 129, 0, 134, 0, 142, 0, 169, 0, 137, 0,
292 0, 38, 12, 128, 0, 177, 0, 54, 130, 108,
vlm6a02a8a2004-09-08 00:28:11 +0000293 0, 54, 46, 0, 131, 0, 130, 131, 0, 132,
vlm0aa86902004-10-12 23:26:53 +0000294 46, 209, 118, 0, 133, 0, 132, 109, 133, 0,
295 209, 0, 209, 104, 105, 0, 212, 0, 42, 135,
296 108, 0, 42, 17, 108, 0, 42, 108, 0, 136,
297 0, 135, 109, 136, 0, 209, 0, 209, 104, 105,
298 0, 212, 0, 209, 138, 3, 104, 139, 105, 0,
299 164, 0, 174, 0, 0, 140, 0, 141, 0, 140,
300 109, 141, 0, 102, 0, 185, 0, 209, 3, 207,
301 87, 0, 209, 3, 162, 0, 209, 3, 152, 0,
302 209, 104, 143, 105, 3, 162, 0, 144, 0, 143,
303 109, 144, 0, 209, 0, 209, 110, 212, 0, 174,
304 110, 212, 0, 146, 0, 145, 109, 146, 0, 162,
305 0, 212, 0, 0, 148, 0, 149, 0, 148, 109,
306 149, 0, 212, 162, 201, 0, 30, 68, 162, 0,
307 161, 0, 151, 0, 150, 109, 151, 0, 212, 162,
308 0, 161, 0, 28, 104, 154, 105, 156, 0, 0,
309 88, 0, 155, 0, 154, 109, 155, 0, 167, 201,
310 0, 167, 162, 201, 153, 0, 167, 167, 201, 153,
311 0, 0, 157, 0, 0, 95, 82, 104, 158, 159,
312 105, 0, 160, 0, 159, 160, 0, 4, 0, 167,
313 0, 102, 0, 102, 111, 172, 0, 102, 111, 206,
314 0, 207, 163, 181, 0, 176, 0, 177, 0, 27,
315 104, 150, 105, 0, 78, 104, 147, 105, 0, 79,
316 104, 147, 105, 0, 78, 181, 68, 211, 207, 163,
317 0, 79, 181, 68, 211, 207, 163, 0, 18, 0,
318 18, 35, 25, 212, 0, 209, 104, 145, 105, 0,
319 164, 0, 56, 68, 164, 0, 11, 0, 11, 112,
320 209, 0, 210, 112, 209, 0, 11, 112, 212, 0,
321 210, 0, 210, 112, 165, 0, 166, 0, 165, 112,
322 166, 0, 168, 0, 168, 0, 13, 0, 14, 0,
323 212, 138, 3, 170, 0, 212, 110, 170, 0, 0,
324 104, 171, 173, 0, 63, 0, 45, 0, 86, 0,
325 5, 0, 7, 0, 6, 0, 206, 0, 172, 0,
326 212, 0, 209, 112, 212, 0, 4, 0, 173, 4,
327 0, 24, 0, 63, 0, 76, 0, 175, 0, 67,
328 81, 0, 65, 51, 0, 77, 0, 44, 0, 36,
329 71, 0, 26, 81, 0, 91, 0, 47, 0, 58,
330 0, 40, 0, 22, 81, 0, 174, 0, 175, 203,
331 0, 23, 0, 48, 0, 49, 0, 50, 0, 59,
332 0, 64, 0, 74, 0, 83, 0, 85, 0, 90,
333 0, 92, 0, 93, 0, 94, 0, 66, 0, 99,
334 0, 100, 0, 97, 0, 98, 0, 96, 0, 0,
335 182, 0, 183, 0, 80, 106, 184, 107, 0, 106,
336 184, 107, 0, 183, 106, 184, 107, 0, 185, 0,
337 185, 109, 102, 0, 185, 109, 102, 109, 185, 0,
338 186, 0, 185, 178, 186, 0, 185, 179, 186, 0,
339 186, 180, 186, 0, 188, 106, 184, 107, 0, 106,
340 184, 107, 0, 189, 0, 189, 187, 189, 0, 61,
341 187, 189, 0, 189, 187, 60, 0, 61, 187, 60,
342 0, 195, 0, 190, 0, 101, 0, 101, 113, 0,
343 113, 101, 0, 113, 101, 113, 0, 80, 0, 46,
344 0, 206, 0, 212, 0, 6, 0, 45, 0, 86,
345 0, 95, 30, 104, 191, 105, 0, 192, 0, 191,
346 109, 192, 0, 102, 0, 212, 181, 193, 0, 0,
347 194, 0, 73, 0, 15, 0, 69, 0, 196, 0,
348 197, 0, 104, 209, 105, 0, 196, 104, 198, 105,
349 0, 199, 0, 198, 109, 199, 0, 114, 200, 0,
350 114, 112, 200, 0, 212, 0, 200, 112, 212, 0,
351 0, 202, 0, 69, 0, 33, 170, 0, 104, 105,
352 0, 104, 204, 105, 0, 205, 0, 204, 109, 205,
353 0, 212, 0, 212, 106, 206, 107, 0, 212, 106,
354 172, 107, 0, 206, 0, 102, 0, 9, 0, 10,
355 0, 0, 208, 0, 103, 0, 103, 52, 0, 103,
356 41, 0, 11, 0, 12, 0, 12, 0, 0, 212,
357 0, 8, 0
vlm6a02a8a2004-09-08 00:28:11 +0000358};
vlmfa67ddc2004-06-03 03:38:44 +0000359
360#endif
361
vlm6a02a8a2004-09-08 00:28:11 +0000362#if YYDEBUG != 0
363static const short yyrline[] = { 0,
vlm0aa86902004-10-12 23:26:53 +0000364 301, 307, 313, 329, 354, 356, 359, 363, 368, 375,
365 383, 388, 392, 401, 403, 411, 415, 423, 427, 430,
366 433, 437, 457, 459, 467, 471, 503, 507, 516, 523,
367 536, 543, 545, 557, 570, 577, 582, 588, 594, 603,
368 609, 615, 622, 628, 636, 640, 643, 650, 656, 662,
369 669, 675, 684, 694, 702, 710, 712, 722, 725, 729,
370 732, 744, 756, 762, 778, 787, 797, 807, 812, 819,
371 829, 835, 841, 845, 857, 859, 861, 867, 873, 880,
372 887, 892, 898, 904, 910, 915, 925, 927, 930, 938,
373 944, 953, 959, 976, 978, 983, 987, 992, 997, 1003,
374 1007, 1018, 1027, 1036, 1047, 1069, 1073, 1079, 1085, 1091,
375 1097, 1107, 1117, 1123, 1137, 1161, 1168, 1182, 1191, 1201,
376 1211, 1221, 1229, 1250, 1259, 1268, 1269, 1271, 1278, 1290,
377 1300, 1308, 1308, 1313, 1318, 1323, 1328, 1332, 1336, 1340,
378 1343, 1348, 1360, 1376, 1387, 1401, 1403, 1404, 1405, 1406,
379 1407, 1408, 1409, 1410, 1411, 1412, 1413, 1419, 1421, 1422,
380 1425, 1432, 1444, 1446, 1450, 1454, 1455, 1456, 1457, 1458,
381 1462, 1463, 1464, 1465, 1469, 1470, 1477, 1477, 1478, 1478,
382 1479, 1481, 1483, 1488, 1492, 1501, 1505, 1510, 1514, 1520,
383 1530, 1534, 1537, 1540, 1545, 1554, 1562, 1568, 1575, 1583,
384 1591, 1600, 1603, 1608, 1610, 1611, 1612, 1615, 1619, 1624,
385 1628, 1639, 1643, 1648, 1655, 1661, 1665, 1670, 1676, 1688,
386 1690, 1693, 1697, 1700, 1705, 1709, 1717, 1732, 1738, 1745,
387 1758, 1770, 1785, 1789, 1806, 1811, 1814, 1819, 1841, 1846,
388 1851, 1857, 1863, 1871, 1879, 1887, 1894, 1904, 1909, 1939,
389 1941, 1944, 1949, 1953, 1959, 1964, 1971, 1978, 1980, 1984
vlm6a02a8a2004-09-08 00:28:11 +0000390};
391#endif
392
393
394#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
395
396static const char * const yytname[] = { "$","error","$undefined.","TOK_PPEQ",
397"TOK_opaque","TOK_bstring","TOK_cstring","TOK_hstring","TOK_identifier","TOK_number",
398"TOK_number_negative","TOK_typereference","TOK_capitalreference","TOK_typefieldreference",
399"TOK_valuefieldreference","TOK_ABSENT","TOK_ABSTRACT_SYNTAX","TOK_ALL","TOK_ANY",
400"TOK_APPLICATION","TOK_AUTOMATIC","TOK_BEGIN","TOK_BIT","TOK_BMPString","TOK_BOOLEAN",
401"TOK_BY","TOK_CHARACTER","TOK_CHOICE","TOK_CLASS","TOK_COMPONENT","TOK_COMPONENTS",
402"TOK_CONSTRAINED","TOK_CONTAINING","TOK_DEFAULT","TOK_DEFINITIONS","TOK_DEFINED",
403"TOK_EMBEDDED","TOK_ENCODED","TOK_ENCODING_CONTROL","TOK_END","TOK_ENUMERATED",
404"TOK_EXPLICIT","TOK_EXPORTS","TOK_EXTENSIBILITY","TOK_EXTERNAL","TOK_FALSE",
405"TOK_FROM","TOK_GeneralizedTime","TOK_GeneralString","TOK_GraphicString","TOK_IA5String",
406"TOK_IDENTIFIER","TOK_IMPLICIT","TOK_IMPLIED","TOK_IMPORTS","TOK_INCLUDES","TOK_INSTANCE",
407"TOK_INSTRUCTIONS","TOK_INTEGER","TOK_ISO646String","TOK_MAX","TOK_MIN","TOK_MINUS_INFINITY",
408"TOK_NULL","TOK_NumericString","TOK_OBJECT","TOK_ObjectDescriptor","TOK_OCTET",
409"TOK_OF","TOK_OPTIONAL","TOK_PATTERN","TOK_PDV","TOK_PLUS_INFINITY","TOK_PRESENT",
410"TOK_PrintableString","TOK_PRIVATE","TOK_REAL","TOK_RELATIVE_OID","TOK_SEQUENCE",
411"TOK_SET","TOK_SIZE","TOK_STRING","TOK_SYNTAX","TOK_T61String","TOK_TAGS","TOK_TeletexString",
412"TOK_TRUE","TOK_TYPE_IDENTIFIER","TOK_UNIQUE","TOK_UNIVERSAL","TOK_UniversalString",
413"TOK_UTCTime","TOK_UTF8String","TOK_VideotexString","TOK_VisibleString","TOK_WITH",
414"TOK_EXCEPT","'^'","TOK_INTERSECTION","'|'","TOK_UNION","TOK_TwoDots","TOK_ThreeDots",
415"TOK_tag","'{'","'}'","'('","')'","';'","','","':'","'!'","'.'","'<'","'@'",
416"ParsedGrammar","ModuleList","ModuleSpecification","optObjectIdentifier","ObjectIdentifier",
417"ObjectIdentifierBody","ObjectIdentifierElement","optModuleSpecificationFlags",
418"ModuleSpecificationFlags","ModuleSpecificationFlag","optModuleSpecificationBody",
419"ModuleSpecificationBody","ModuleSpecificationElement","@1","ImportsDefinition",
420"ImportsBundleSet","ImportsBundle","ImportsList","ImportsElement","ExportsDefinition",
421"ExportsBody","ExportsElement","ValueSetDefinition","DefinedTypeRef","optValueSetBody",
422"ValueSetBody","ValueSetElement","DataTypeReference","ParameterArgumentList",
vlm0aa86902004-10-12 23:26:53 +0000423"ParameterArgumentName","ActualParameterList","ActualParameter","optComponentTypeLists",
424"ComponentTypeLists","ComponentType","AlternativeTypeLists","AlternativeType",
425"ClassDeclaration","optUnique","ClassFieldList","ClassField","optWithSyntax",
426"WithSyntax","@2","WithSyntaxFormat","WithSyntaxFormatToken","ExtensionAndException",
427"Type","TypeDeclaration","ComplexTypeReference","ComplexTypeReferenceAmpList",
428"ComplexTypeReferenceElement","ClassFieldIdentifier","ClassFieldName","ValueDefinition",
429"Value","@3","DefinedValue","Opaque","BasicTypeId","BasicTypeId_UniverationCompatible",
430"BasicType","BasicString","Union","Intersection","Except","optConstraints","Constraints",
431"SetOfConstraints","ElementSetSpecs","ElementSetSpec","ConstraintSubtypeElement",
432"ConstraintRangeSpec","ConstraintSpec","ConstraintValue","WithComponents","WithComponentsList",
433"WithComponentsElement","optPresenceConstraint","PresenceConstraint","TableConstraint",
434"SimpleTableConstraint","ComponentRelationConstraint","AtNotationList","AtNotationElement",
435"ComponentIdList","optMarker","Marker","UniverationDefinition","UniverationList",
436"UniverationElement","SignedNumber","optTag","Tag","TypeRefName","ObjectClassReference",
437"optIdentifier","Identifier", NULL
vlm6a02a8a2004-09-08 00:28:11 +0000438};
439#endif
440
441static const short yyr1[] = { 0,
442 115, 116, 116, 117, 118, 118, 119, 119, 120, 120,
443 121, 121, 121, 122, 122, 123, 123, 124, 124, 124,
444 124, 124, 125, 125, 126, 126, 127, 127, 127, 127,
445 127, 128, 127, 127, 129, 129, 130, 130, 131, 132,
vlm0aa86902004-10-12 23:26:53 +0000446 132, 133, 133, 133, 134, 134, 134, 135, 135, 136,
447 136, 136, 137, 138, 138, 139, 139, 140, 140, 141,
448 141, 142, 142, 142, 142, 143, 143, 144, 144, 144,
449 145, 145, 146, 146, 147, 147, 148, 148, 149, 149,
450 149, 150, 150, 151, 151, 152, 153, 153, 154, 154,
451 155, 155, 155, 156, 156, 158, 157, 159, 159, 160,
452 160, 161, 161, 161, 162, 163, 163, 163, 163, 163,
453 163, 163, 163, 163, 163, 163, 163, 164, 164, 164,
454 164, 164, 164, 165, 165, 166, 167, 168, 168, 169,
455 170, 171, 170, 170, 170, 170, 170, 170, 170, 170,
456 170, 172, 172, 173, 173, 174, 174, 174, 174, 174,
457 174, 174, 174, 174, 174, 174, 174, 175, 175, 175,
458 176, 176, 177, 177, 177, 177, 177, 177, 177, 177,
459 177, 177, 177, 177, 177, 177, 178, 178, 179, 179,
460 180, 181, 181, 182, 182, 183, 183, 184, 184, 184,
461 185, 185, 185, 185, 186, 186, 186, 186, 186, 186,
462 186, 186, 186, 187, 187, 187, 187, 188, 188, 189,
463 189, 189, 189, 189, 190, 191, 191, 192, 192, 193,
464 193, 194, 194, 194, 195, 195, 196, 197, 198, 198,
465 199, 199, 200, 200, 201, 201, 202, 202, 203, 203,
466 204, 204, 205, 205, 205, 205, 205, 206, 206, 207,
467 207, 208, 208, 208, 209, 209, 210, 211, 211, 212
vlm6a02a8a2004-09-08 00:28:11 +0000468};
469
470static const short yyr2[] = { 0,
471 1, 1, 2, 8, 0, 1, 3, 2, 1, 2,
472 1, 4, 1, 0, 1, 1, 2, 2, 2, 2,
473 2, 2, 0, 1, 1, 2, 1, 1, 1, 1,
474 1, 0, 3, 1, 3, 2, 1, 2, 4, 1,
vlm0aa86902004-10-12 23:26:53 +0000475 3, 1, 3, 1, 3, 3, 2, 1, 3, 1,
476 3, 1, 6, 1, 1, 0, 1, 1, 3, 1,
477 1, 4, 3, 3, 6, 1, 3, 1, 3, 3,
478 1, 3, 1, 1, 0, 1, 1, 3, 3, 3,
479 1, 1, 3, 2, 1, 5, 0, 1, 1, 3,
480 2, 4, 4, 0, 1, 0, 6, 1, 2, 1,
481 1, 1, 3, 3, 3, 1, 1, 4, 4, 4,
482 6, 6, 1, 4, 4, 1, 3, 1, 3, 3,
483 3, 1, 3, 1, 3, 1, 1, 1, 1, 4,
484 3, 0, 3, 1, 1, 1, 1, 1, 1, 1,
485 1, 1, 3, 1, 2, 1, 1, 1, 1, 2,
486 2, 1, 1, 2, 2, 1, 1, 1, 1, 2,
487 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
vlm6a02a8a2004-09-08 00:28:11 +0000488 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
vlm0aa86902004-10-12 23:26:53 +0000489 1, 0, 1, 1, 4, 3, 4, 1, 3, 5,
490 1, 3, 3, 3, 4, 3, 1, 3, 3, 3,
491 3, 1, 1, 1, 2, 2, 3, 1, 1, 1,
492 1, 1, 1, 1, 5, 1, 3, 1, 3, 0,
493 1, 1, 1, 1, 1, 1, 3, 4, 1, 3,
494 2, 3, 1, 3, 0, 1, 1, 2, 2, 3,
495 1, 3, 1, 4, 4, 1, 1, 1, 1, 0,
496 1, 1, 2, 2, 1, 1, 1, 0, 1, 1
vlm6a02a8a2004-09-08 00:28:11 +0000497};
498
499static const short yydefact[] = { 0,
vlm0aa86902004-10-12 23:26:53 +0000500 255, 256, 1, 2, 5, 3, 0, 0, 6, 260,
vlm6a02a8a2004-09-08 00:28:11 +0000501 13, 8, 0, 9, 11, 14, 7, 10, 0, 0,
502 0, 0, 0, 0, 0, 15, 16, 0, 22, 20,
vlm0aa86902004-10-12 23:26:53 +0000503 18, 21, 19, 0, 17, 12, 23, 163, 0, 0,
504 164, 165, 166, 0, 167, 168, 176, 169, 170, 171,
505 172, 173, 174, 175, 0, 24, 25, 27, 28, 31,
506 29, 30, 34, 0, 0, 32, 0, 47, 0, 48,
507 50, 52, 36, 0, 37, 0, 40, 42, 44, 4,
508 26, 250, 118, 257, 0, 146, 0, 0, 159, 153,
509 157, 158, 147, 0, 0, 148, 152, 156, 0, 0,
510 54, 55, 149, 122, 0, 33, 46, 45, 0, 0,
511 35, 38, 0, 0, 0, 0, 252, 64, 63, 0,
512 251, 0, 160, 155, 154, 151, 150, 0, 66, 0,
513 68, 0, 0, 0, 49, 51, 5, 41, 43, 0,
514 254, 253, 118, 257, 113, 0, 0, 182, 182, 62,
515 182, 116, 161, 149, 106, 107, 0, 119, 121, 0,
516 0, 0, 0, 56, 128, 129, 123, 124, 126, 120,
517 137, 139, 138, 248, 249, 135, 134, 136, 132, 130,
518 141, 140, 0, 142, 39, 0, 89, 250, 127, 0,
519 0, 0, 0, 75, 0, 0, 183, 184, 75, 0,
520 105, 0, 162, 250, 250, 67, 70, 69, 212, 213,
521 209, 0, 208, 214, 0, 60, 0, 0, 0, 57,
522 58, 61, 191, 0, 197, 203, 202, 225, 226, 210,
523 211, 0, 0, 0, 0, 94, 0, 0, 237, 235,
524 235, 91, 236, 0, 0, 102, 0, 82, 85, 250,
525 117, 0, 0, 0, 76, 77, 81, 250, 0, 188,
526 258, 0, 0, 258, 247, 239, 0, 241, 246, 243,
527 0, 71, 73, 74, 65, 204, 0, 0, 0, 0,
528 0, 53, 0, 179, 180, 177, 178, 0, 0, 181,
529 0, 0, 0, 0, 125, 144, 133, 143, 131, 0,
530 86, 95, 90, 238, 87, 87, 114, 0, 108, 0,
531 84, 0, 250, 109, 0, 235, 186, 0, 250, 259,
532 0, 110, 250, 240, 0, 0, 115, 250, 205, 206,
533 201, 199, 0, 227, 196, 59, 192, 193, 194, 0,
534 200, 198, 0, 0, 229, 145, 0, 88, 92, 93,
535 103, 104, 142, 83, 185, 80, 78, 79, 189, 0,
536 187, 0, 242, 0, 0, 72, 207, 218, 0, 216,
537 182, 195, 0, 231, 233, 228, 0, 96, 0, 111,
538 112, 245, 244, 215, 0, 220, 232, 0, 230, 0,
539 190, 217, 223, 224, 222, 219, 221, 234, 100, 0,
540 98, 101, 97, 99, 0, 0, 0
vlm6a02a8a2004-09-08 00:28:11 +0000541};
542
vlm0aa86902004-10-12 23:26:53 +0000543static const short yydefgoto[] = { 405,
vlm6a02a8a2004-09-08 00:28:11 +0000544 3, 4, 8, 9, 13, 14, 25, 26, 27, 55,
545 56, 57, 106, 58, 74, 75, 76, 77, 59, 69,
vlm0aa86902004-10-12 23:26:53 +0000546 70, 60, 100, 219, 220, 221, 61, 128, 129, 271,
547 272, 254, 255, 256, 247, 248, 118, 349, 186, 187,
548 301, 302, 390, 400, 401, 257, 273, 151, 152, 167,
549 168, 188, 189, 62, 180, 233, 181, 297, 153, 103,
550 155, 156, 288, 289, 291, 196, 197, 198, 259, 260,
551 223, 278, 224, 225, 226, 369, 370, 396, 397, 227,
552 228, 229, 344, 345, 374, 242, 243, 203, 267, 268,
553 230, 244, 121, 183, 104, 319, 231
vlm6a02a8a2004-09-08 00:28:11 +0000554};
555
vlm0aa86902004-10-12 23:26:53 +0000556static const short yypact[] = { 203,
557-32768,-32768, 203,-32768, -50,-32768, 27, 63,-32768,-32768,
558-32768,-32768, 54,-32768, -40, 38,-32768,-32768, 79, 47,
559 49, 73, 91, 80, 113, 38,-32768, 71,-32768,-32768,
560-32768,-32768,-32768, 149,-32768,-32768, 334,-32768, 174, 34,
561-32768,-32768,-32768, 135,-32768,-32768,-32768,-32768,-32768,-32768,
562-32768,-32768,-32768,-32768, 150, 334,-32768,-32768,-32768,-32768,
563-32768,-32768,-32768, 17, 327,-32768, 83,-32768, 190,-32768,
564 102,-32768,-32768, 11,-32768, -22,-32768, 108,-32768,-32768,
565-32768, 3, 117,-32768, 142,-32768, 158, 176,-32768,-32768,
566-32768,-32768,-32768, 199, 185,-32768,-32768,-32768, 548, 265,
567-32768,-32768,-32768, 175, 290,-32768,-32768,-32768, 197, 201,
568-32768,-32768, 203, 197, 215, 198, 111,-32768,-32768, 411,
569-32768, 197,-32768,-32768,-32768,-32768,-32768, -14,-32768, 213,
570 214, 221, 278, 269,-32768,-32768, -50,-32768,-32768, 291,
571-32768,-32768, 65, 223, 293, 225, 262, -3, 92,-32768,
572 -46,-32768,-32768, 230,-32768,-32768, 231,-32768,-32768, 337,
573 548, 329, 329, 165,-32768,-32768, 232,-32768,-32768,-32768,
574-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
575-32768,-32768, 235, 233,-32768, 116,-32768, 85,-32768, 323,
576 32, 305, 244, 48, 227, 284,-32768, 248, 48, 288,
577-32768, 60,-32768, 19, 256,-32768,-32768,-32768,-32768,-32768,
578-32768, -69,-32768,-32768, 328,-32768, 203, 227, 257, 251,
579-32768, 212, 268, 259, -69,-32768,-32768, 264,-32768,-32768,
580-32768, 291, 357, 329, 269, 275, 291, 269,-32768, 67,
581 67,-32768,-32768, 488, 329, 258, 125,-32768,-32768, 256,
582-32768, 227, 311, 281, 271,-32768,-32768, 256, 280, 104,
583 329, 227, 286, 329,-32768,-32768, 137,-32768,-32768, 283,
584 144,-32768,-32768,-32768,-32768, 282, 295, 210, 297, 292,
585 298,-32768, 165,-32768,-32768,-32768,-32768, 227, 227,-32768,
586 227, 227, 255, 285,-32768,-32768, 398,-32768,-32768, 324,
587-32768,-32768,-32768,-32768, 319, 319,-32768, 274,-32768, 32,
588-32768, 302, 256,-32768, 48, 67,-32768, 308, 256,-32768,
589 304,-32768, 256,-32768, 64, 274,-32768, 19,-32768, 299,
590-32768,-32768, 39,-32768,-32768,-32768,-32768,-32768,-32768, 306,
591-32768,-32768, 1, 147,-32768,-32768, 310,-32768,-32768,-32768,
592-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 307, 488,
593-32768, 488,-32768, 313, 314,-32768,-32768,-32768, 153,-32768,
594 -46,-32768, 329, 303,-32768,-32768, 285,-32768, 227,-32768,
595-32768,-32768,-32768,-32768, 39, 23, 303, 329,-32768, 154,
596 212,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 12,
597-32768,-32768,-32768,-32768, 425, 430,-32768
vlm6a02a8a2004-09-08 00:28:11 +0000598};
599
600static const short yypgoto[] = {-32768,
vlm0aa86902004-10-12 23:26:53 +0000601-32768, 428, 309,-32768,-32768, 419,-32768,-32768, 410,-32768,
602-32768, 383,-32768,-32768,-32768, 366,-32768, 330,-32768,-32768,
603 332,-32768, 377,-32768,-32768, 160,-32768,-32768, 287,-32768,
604 121, 246,-32768, 138,-32768, 140,-32768, 146,-32768, 217,
605-32768,-32768,-32768,-32768, 56, -179, -65, -209, -54,-32768,
606 234, -183, -112,-32768, -55,-32768, -243,-32768, -51, -119,
607-32768, 74,-32768,-32768,-32768, -147,-32768,-32768, -113, -157,
608 6, 237,-32768, -133,-32768,-32768, 72,-32768,-32768,-32768,
609-32768,-32768,-32768, 86, 95, -155,-32768,-32768,-32768, 139,
610 -126, -79,-32768, 15,-32768, 207, -7
vlm6a02a8a2004-09-08 00:28:11 +0000611};
612
613
vlm0aa86902004-10-12 23:26:53 +0000614#define YYLAST 639
vlm6a02a8a2004-09-08 00:28:11 +0000615
616
617static const short yytable[] = { 15,
vlm0aa86902004-10-12 23:26:53 +0000618 154, 200, 120, 201, 241, 15, 222, 182, 10, 101,
619 101, 249, 102, 102, 5, 399, 119, 5, 10, 82,
620 169, 1, 2, 113, 165, 166, 10, 83, 84, 65,
621 116, 276, 72, 193, 10, 11, 79, 393, 85, 10,
622 86, 10, 87, 277, 1, 2, 10, 130, 65, 20,
623 67, 64, 88, 7, 71, 10, 89, 21, 78, 195,
624 90, 10, 11, 91, 351, 19, 79, 10, 174, 175,
625 64, 10, 174, 175, 92, 269, 193, 253, 22, 93,
626 23, 94, 364, 95, 305, 306, 114, 28, 78, 24,
627 160, 394, 96, 97, 161, 395, 16, 165, 166, 238,
628 194, 72, 195, 29, 281, 117, 79, 98, 182, 130,
629 63, 182, 373, 131, 159, 34, 403, 238, 111, 169,
630 99, 117, 240, 71, 154, 222, 184, 137, 78, 63,
631 249, 12, 30, 246, 157, 239, 158, 251, 312, 275,
632 368, 68, 10, 32, 332, 1, 2, 170, 321, 246,
633 380, 141, 381, 239, 207, 208, 31, 399, 17, 342,
634 358, 265, 142, 33, 266, 265, 165, 166, -255, 37,
635 209, 193, 10, 174, 175, 131, 122, 36, 340, 299,
636 73, 352, 304, 250, 311, 66, 258, 117, 80, -235,
637 107, 258, 316, -235, 270, 199, 274, 195, 269, 365,
638 284, 285, 286, 287, 10, 110, 402, 1, 2, 210,
639 211, 115, 318, 1, 2, 209, 402, 10, 174, 175,
640 236, 391, 123, 386, 237, 212, 298, 184, 122, 309,
641 184, 280, 209, 310, 10, 174, 175, 307, 124, 360,
642 154, 324, 154, 362, 213, 325, 125, 356, 327, 126,
643 214, 376, 328, 320, 210, 377, 320, 384, 157, 215,
644 209, 385, 10, 174, 175, 127, 216, 132, 217, 331,
645 218, 210, 211, 171, 172, 173, 10, 174, 175, 1,
646 2, 10, 174, 175, 1, 2, 133, 212, 1, 2,
647 165, 166, 134, 337, 338, 214, 339, 108, 109, 210,
648 353, 140, 250, 165, 166, 136, 213, 258, 284, 285,
649 286, 287, 214, 176, 341, 83, 84, 270, 353, 139,
650 274, 215, 162, 163, 164, 371, -256, 190, 191, 192,
651 217, 177, 218, 202, 204, 375, 10, 83, 84, 205,
652 214, 10, 235, 232, 1, 2, 234, 245, 85, 252,
653 86, 261, 87, 262, 178, 264, 38, 279, 117, 283,
654 296, 282, 88, 290, 292, 375, 89, 294, 308, 300,
655 90, 39, 179, 91, 157, 40, 157, 371, 313, 315,
656 398, 41, 42, 43, 92, 314, 317, 44, 326, 93,
657 322, 94, 45, 95, 329, 330, 334, 46, 343, 47,
658 333, 346, 96, 97, 335, 347, 348, 48, 355, 359,
659 361, 367, 372, 378, 388, 379, 49, 98, 50, 382,
660 383, 143, 144, 51, 406, 52, 53, 54, 145, 407,
661 6, 18, 85, 38, 86, 35, 87, 146, 81, 112,
662 135, 105, 336, 138, 263, 185, 88, 206, 366, 354,
663 89, 350, 357, 303, 90, 404, 392, 91, 41, 42,
664 43, 293, 389, 363, 0, 295, 147, 387, 92, 45,
665 323, 0, 0, 93, 46, 94, 47, 95, 0, 0,
666 0, 0, 0, 0, 48, 0, 96, 97, 148, 149,
667 0, 0, 0, 49, 0, 50, 0, 150, 143, 144,
668 51, 98, 52, 53, 54, 145, 0, 0, 0, 85,
669 38, 86, 0, 87, 146, 0, 0, 0, 0, 0,
670 0, 0, 0, 88, 0, 0, 0, 89, 0, 0,
671 0, 90, 0, 0, 91, 41, 42, 43, 0, 0,
672 0, 0, 0, 147, 0, 92, 45, 0, 0, 0,
673 93, 46, 94, 47, 95, 0, 0, 0, 1, 2,
674 0, 48, 0, 96, 97, 148, 149, 0, 0, 85,
675 49, 86, 50, 87, 0, 0, 0, 51, 98, 52,
676 53, 54, 0, 88, 0, 0, 0, 89, 0, 0,
677 0, 90, 0, 0, 91, 0, 0, 0, 0, 0,
678 0, 0, 0, 0, 0, 92, 0, 0, 0, 0,
679 93, 0, 94, 0, 95, 0, 0, 0, 0, 0,
680 0, 0, 0, 96, 97, 0, 0, 0, 0, 0,
681 0, 0, 0, 0, 0, 0, 0, 0, 98
vlm6a02a8a2004-09-08 00:28:11 +0000682};
683
684static const short yycheck[] = { 7,
vlm0aa86902004-10-12 23:26:53 +0000685 120, 149, 82, 151, 188, 13, 164, 134, 8, 64,
686 65, 191, 64, 65, 0, 4, 82, 3, 8, 3,
687 133, 11, 12, 46, 13, 14, 8, 11, 12, 37,
688 28, 101, 40, 80, 8, 9, 44, 15, 22, 8,
689 24, 8, 26, 113, 11, 12, 8, 99, 56, 12,
690 17, 37, 36, 104, 40, 8, 40, 20, 44, 106,
691 44, 8, 9, 47, 308, 106, 74, 8, 9, 10,
692 56, 8, 9, 10, 58, 202, 80, 30, 41, 63,
693 43, 65, 326, 67, 240, 241, 109, 9, 74, 52,
694 105, 69, 76, 77, 109, 73, 34, 13, 14, 33,
695 104, 109, 106, 57, 218, 103, 114, 91, 235, 161,
696 37, 238, 112, 99, 122, 3, 105, 33, 108, 232,
697 104, 103, 188, 109, 244, 283, 134, 113, 114, 56,
698 310, 105, 84, 102, 120, 69, 122, 192, 252, 205,
699 102, 108, 8, 53, 278, 11, 12, 133, 262, 102,
700 360, 41, 362, 69, 162, 163, 84, 4, 105, 293,
701 316, 102, 52, 84, 105, 102, 13, 14, 104, 21,
702 6, 80, 8, 9, 10, 161, 112, 107, 292, 235,
703 46, 308, 238, 191, 250, 12, 194, 103, 39, 105,
704 108, 199, 258, 109, 202, 104, 204, 106, 325, 326,
705 97, 98, 99, 100, 8, 104, 390, 11, 12, 45,
706 46, 104, 109, 11, 12, 6, 400, 8, 9, 10,
707 105, 379, 81, 371, 109, 61, 234, 235, 112, 105,
708 238, 217, 6, 109, 8, 9, 10, 245, 81, 319,
709 360, 105, 362, 323, 80, 109, 71, 313, 105, 51,
710 86, 105, 109, 261, 45, 109, 264, 105, 244, 95,
711 6, 109, 8, 9, 10, 81, 102, 3, 104, 60,
712 106, 45, 46, 5, 6, 7, 8, 9, 10, 11,
713 12, 8, 9, 10, 11, 12, 112, 61, 11, 12,
714 13, 14, 3, 288, 289, 86, 291, 108, 109, 45,
715 308, 104, 310, 13, 14, 105, 80, 315, 97, 98,
716 99, 100, 86, 45, 60, 11, 12, 325, 326, 105,
717 328, 95, 110, 110, 104, 333, 104, 35, 104, 68,
718 104, 63, 106, 104, 104, 343, 8, 11, 12, 3,
719 86, 8, 110, 112, 11, 12, 112, 25, 22, 106,
720 24, 68, 26, 106, 86, 68, 23, 30, 103, 109,
721 4, 105, 36, 96, 106, 373, 40, 104, 111, 95,
722 44, 38, 104, 47, 360, 42, 362, 385, 68, 109,
723 388, 48, 49, 50, 58, 105, 107, 54, 106, 63,
724 105, 65, 59, 67, 113, 101, 105, 64, 114, 66,
725 104, 4, 76, 77, 107, 82, 88, 74, 107, 102,
726 107, 113, 107, 104, 112, 109, 83, 91, 85, 107,
727 107, 11, 12, 90, 0, 92, 93, 94, 18, 0,
728 3, 13, 22, 23, 24, 26, 26, 27, 56, 74,
729 109, 65, 283, 114, 199, 137, 36, 161, 328, 310,
730 40, 306, 315, 237, 44, 400, 385, 47, 48, 49,
731 50, 225, 377, 325, -1, 232, 56, 373, 58, 59,
732 264, -1, -1, 63, 64, 65, 66, 67, -1, -1,
733 -1, -1, -1, -1, 74, -1, 76, 77, 78, 79,
734 -1, -1, -1, 83, -1, 85, -1, 87, 11, 12,
735 90, 91, 92, 93, 94, 18, -1, -1, -1, 22,
736 23, 24, -1, 26, 27, -1, -1, -1, -1, -1,
737 -1, -1, -1, 36, -1, -1, -1, 40, -1, -1,
738 -1, 44, -1, -1, 47, 48, 49, 50, -1, -1,
739 -1, -1, -1, 56, -1, 58, 59, -1, -1, -1,
740 63, 64, 65, 66, 67, -1, -1, -1, 11, 12,
741 -1, 74, -1, 76, 77, 78, 79, -1, -1, 22,
742 83, 24, 85, 26, -1, -1, -1, 90, 91, 92,
743 93, 94, -1, 36, -1, -1, -1, 40, -1, -1,
744 -1, 44, -1, -1, 47, -1, -1, -1, -1, -1,
745 -1, -1, -1, -1, -1, 58, -1, -1, -1, -1,
746 63, -1, 65, -1, 67, -1, -1, -1, -1, -1,
747 -1, -1, -1, 76, 77, -1, -1, -1, -1, -1,
748 -1, -1, -1, -1, -1, -1, -1, -1, 91
vlm6a02a8a2004-09-08 00:28:11 +0000749};
750/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
751#line 3 "/usr/share/bison.simple"
752/* This file comes from bison-1.28. */
753
754/* Skeleton output parser for bison,
755 Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
756
757 This program is free software; you can redistribute it and/or modify
758 it under the terms of the GNU General Public License as published by
759 the Free Software Foundation; either version 2, or (at your option)
760 any later version.
761
762 This program is distributed in the hope that it will be useful,
763 but WITHOUT ANY WARRANTY; without even the implied warranty of
764 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
765 GNU General Public License for more details.
766
767 You should have received a copy of the GNU General Public License
768 along with this program; if not, write to the Free Software
769 Foundation, Inc., 59 Temple Place - Suite 330,
770 Boston, MA 02111-1307, USA. */
771
772/* As a special exception, when this file is copied by Bison into a
773 Bison output file, you may use that output file without restriction.
774 This special exception was added by the Free Software Foundation
775 in version 1.24 of Bison. */
776
777/* This is the parser code that is written into each bison parser
778 when the %semantic_parser declaration is not specified in the grammar.
779 It was written by Richard Stallman by simplifying the hairy parser
780 used when %semantic_parser is specified. */
781
782#ifndef YYSTACK_USE_ALLOCA
783#ifdef alloca
784#define YYSTACK_USE_ALLOCA
785#else /* alloca not defined */
786#ifdef __GNUC__
787#define YYSTACK_USE_ALLOCA
788#define alloca __builtin_alloca
789#else /* not GNU C. */
790#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
791#define YYSTACK_USE_ALLOCA
792#include <alloca.h>
793#else /* not sparc */
794/* We think this test detects Watcom and Microsoft C. */
795/* This used to test MSDOS, but that is a bad idea
796 since that symbol is in the user namespace. */
797#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
798#if 0 /* No need for malloc.h, which pollutes the namespace;
799 instead, just don't use alloca. */
800#include <malloc.h>
801#endif
802#else /* not MSDOS, or __TURBOC__ */
803#if defined(_AIX)
804/* I don't know what this was needed for, but it pollutes the namespace.
805 So I turned it off. rms, 2 May 1997. */
806/* #include <malloc.h> */
807 #pragma alloca
808#define YYSTACK_USE_ALLOCA
809#else /* not MSDOS, or __TURBOC__, or _AIX */
810#if 0
811#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
812 and on HPUX 10. Eventually we can turn this on. */
813#define YYSTACK_USE_ALLOCA
814#define alloca __builtin_alloca
815#endif /* __hpux */
816#endif
817#endif /* not _AIX */
818#endif /* not MSDOS, or __TURBOC__ */
819#endif /* not sparc */
820#endif /* not GNU C */
821#endif /* alloca not defined */
822#endif /* YYSTACK_USE_ALLOCA not defined */
823
824#ifdef YYSTACK_USE_ALLOCA
825#define YYSTACK_ALLOC alloca
vlmfa67ddc2004-06-03 03:38:44 +0000826#else
vlm6a02a8a2004-09-08 00:28:11 +0000827#define YYSTACK_ALLOC malloc
vlmfa67ddc2004-06-03 03:38:44 +0000828#endif
829
vlm6a02a8a2004-09-08 00:28:11 +0000830/* Note: there must be only one dollar sign in this file.
831 It is replaced by the list of actions, each action
832 as one case of the switch. */
vlmfa67ddc2004-06-03 03:38:44 +0000833
834#define yyerrok (yyerrstatus = 0)
835#define yyclearin (yychar = YYEMPTY)
836#define YYEMPTY -2
837#define YYEOF 0
838#define YYACCEPT goto yyacceptlab
vlm6a02a8a2004-09-08 00:28:11 +0000839#define YYABORT goto yyabortlab
vlmfa67ddc2004-06-03 03:38:44 +0000840#define YYERROR goto yyerrlab1
vlm6a02a8a2004-09-08 00:28:11 +0000841/* Like YYERROR except do call yyerror.
842 This remains here temporarily to ease the
843 transition to the new meaning of YYERROR, for GCC.
vlmfa67ddc2004-06-03 03:38:44 +0000844 Once GCC version 2 has supplanted version 1, this can go. */
845#define YYFAIL goto yyerrlab
846#define YYRECOVERING() (!!yyerrstatus)
vlm6a02a8a2004-09-08 00:28:11 +0000847#define YYBACKUP(token, value) \
vlmfa67ddc2004-06-03 03:38:44 +0000848do \
849 if (yychar == YYEMPTY && yylen == 1) \
vlm6a02a8a2004-09-08 00:28:11 +0000850 { yychar = (token), yylval = (value); \
vlmfa67ddc2004-06-03 03:38:44 +0000851 yychar1 = YYTRANSLATE (yychar); \
852 YYPOPSTACK; \
853 goto yybackup; \
854 } \
855 else \
vlm6a02a8a2004-09-08 00:28:11 +0000856 { yyerror ("syntax error: cannot back up"); YYERROR; } \
vlmfa67ddc2004-06-03 03:38:44 +0000857while (0)
858
859#define YYTERROR 1
860#define YYERRCODE 256
861
vlm6a02a8a2004-09-08 00:28:11 +0000862#ifndef YYPURE
863#define YYLEX yylex()
vlmfa67ddc2004-06-03 03:38:44 +0000864#endif
865
vlm6a02a8a2004-09-08 00:28:11 +0000866#ifdef YYPURE
867#ifdef YYLSP_NEEDED
868#ifdef YYLEX_PARAM
869#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
870#else
871#define YYLEX yylex(&yylval, &yylloc)
872#endif
873#else /* not YYLSP_NEEDED */
874#ifdef YYLEX_PARAM
875#define YYLEX yylex(&yylval, YYLEX_PARAM)
876#else
877#define YYLEX yylex(&yylval)
878#endif
879#endif /* not YYLSP_NEEDED */
880#endif
vlmfa67ddc2004-06-03 03:38:44 +0000881
vlm6a02a8a2004-09-08 00:28:11 +0000882/* If nonreentrant, generate the variables here */
vlmfa67ddc2004-06-03 03:38:44 +0000883
vlm6a02a8a2004-09-08 00:28:11 +0000884#ifndef YYPURE
vlmfa67ddc2004-06-03 03:38:44 +0000885
vlm6a02a8a2004-09-08 00:28:11 +0000886int yychar; /* the lookahead symbol */
887YYSTYPE yylval; /* the semantic value of the */
888 /* lookahead symbol */
vlmfa67ddc2004-06-03 03:38:44 +0000889
vlm6a02a8a2004-09-08 00:28:11 +0000890#ifdef YYLSP_NEEDED
891YYLTYPE yylloc; /* location data for the lookahead */
892 /* symbol */
893#endif
vlmfa67ddc2004-06-03 03:38:44 +0000894
vlm6a02a8a2004-09-08 00:28:11 +0000895int yynerrs; /* number of parse errors so far */
896#endif /* not YYPURE */
897
898#if YYDEBUG != 0
899int yydebug; /* nonzero means print parse trace */
900/* Since this is uninitialized, it does not stop multiple parsers
901 from coexisting. */
902#endif
903
904/* YYINITDEPTH indicates the initial size of the parser's stacks */
905
vlmfa67ddc2004-06-03 03:38:44 +0000906#ifndef YYINITDEPTH
vlm6a02a8a2004-09-08 00:28:11 +0000907#define YYINITDEPTH 200
vlmfa67ddc2004-06-03 03:38:44 +0000908#endif
909
vlm6a02a8a2004-09-08 00:28:11 +0000910/* YYMAXDEPTH is the maximum size the stacks can grow to
911 (effective only if the built-in stack extension method is used). */
vlmfa67ddc2004-06-03 03:38:44 +0000912
913#if YYMAXDEPTH == 0
vlm6a02a8a2004-09-08 00:28:11 +0000914#undef YYMAXDEPTH
vlmfa67ddc2004-06-03 03:38:44 +0000915#endif
916
917#ifndef YYMAXDEPTH
vlm6a02a8a2004-09-08 00:28:11 +0000918#define YYMAXDEPTH 10000
vlmfa67ddc2004-06-03 03:38:44 +0000919#endif
920
vlm6a02a8a2004-09-08 00:28:11 +0000921/* Define __yy_memcpy. Note that the size argument
922 should be passed with type unsigned int, because that is what the non-GCC
923 definitions require. With GCC, __builtin_memcpy takes an arg
924 of type size_t, but it can handle unsigned int. */
vlmfa67ddc2004-06-03 03:38:44 +0000925
vlm6a02a8a2004-09-08 00:28:11 +0000926#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
927#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
928#else /* not GNU C or C++ */
929#ifndef __cplusplus
vlmfa67ddc2004-06-03 03:38:44 +0000930
vlm6a02a8a2004-09-08 00:28:11 +0000931/* This is the most reliable way to avoid incompatibilities
932 in available built-in functions on various systems. */
vlm80103492004-09-07 10:39:09 +0000933static void
vlm6a02a8a2004-09-08 00:28:11 +0000934__yy_memcpy (to, from, count)
935 char *to;
936 char *from;
937 unsigned int count;
vlm80103492004-09-07 10:39:09 +0000938{
vlm6a02a8a2004-09-08 00:28:11 +0000939 register char *f = from;
940 register char *t = to;
941 register int i = count;
vlm80103492004-09-07 10:39:09 +0000942
vlm6a02a8a2004-09-08 00:28:11 +0000943 while (i-- > 0)
944 *t++ = *f++;
vlm80103492004-09-07 10:39:09 +0000945}
vlm80103492004-09-07 10:39:09 +0000946
vlm6a02a8a2004-09-08 00:28:11 +0000947#else /* __cplusplus */
vlm80103492004-09-07 10:39:09 +0000948
vlm6a02a8a2004-09-08 00:28:11 +0000949/* This is the most reliable way to avoid incompatibilities
950 in available built-in functions on various systems. */
vlm80103492004-09-07 10:39:09 +0000951static void
vlm6a02a8a2004-09-08 00:28:11 +0000952__yy_memcpy (char *to, char *from, unsigned int count)
vlm80103492004-09-07 10:39:09 +0000953{
vlm6a02a8a2004-09-08 00:28:11 +0000954 register char *t = to;
955 register char *f = from;
956 register int i = count;
vlm80103492004-09-07 10:39:09 +0000957
vlm6a02a8a2004-09-08 00:28:11 +0000958 while (i-- > 0)
959 *t++ = *f++;
vlm044f7442004-09-04 04:49:21 +0000960}
vlm044f7442004-09-04 04:49:21 +0000961
vlm6a02a8a2004-09-08 00:28:11 +0000962#endif
963#endif
vlmfa67ddc2004-06-03 03:38:44 +0000964
vlm6a02a8a2004-09-08 00:28:11 +0000965#line 217 "/usr/share/bison.simple"
vlmfa67ddc2004-06-03 03:38:44 +0000966
967/* The user can define YYPARSE_PARAM as the name of an argument to be passed
968 into yyparse. The argument should have type void *.
969 It should actually point to an object.
970 Grammar actions can access the variable by casting it
971 to the proper pointer type. */
972
973#ifdef YYPARSE_PARAM
vlm6a02a8a2004-09-08 00:28:11 +0000974#ifdef __cplusplus
975#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
976#define YYPARSE_PARAM_DECL
977#else /* not __cplusplus */
978#define YYPARSE_PARAM_ARG YYPARSE_PARAM
979#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
980#endif /* not __cplusplus */
981#else /* not YYPARSE_PARAM */
982#define YYPARSE_PARAM_ARG
983#define YYPARSE_PARAM_DECL
984#endif /* not YYPARSE_PARAM */
vlmfa67ddc2004-06-03 03:38:44 +0000985
986/* Prevent warning if -Wstrict-prototypes. */
987#ifdef __GNUC__
vlm6a02a8a2004-09-08 00:28:11 +0000988#ifdef YYPARSE_PARAM
vlmfa67ddc2004-06-03 03:38:44 +0000989int yyparse (void *);
vlm6a02a8a2004-09-08 00:28:11 +0000990#else
vlmfa67ddc2004-06-03 03:38:44 +0000991int yyparse (void);
vlm6a02a8a2004-09-08 00:28:11 +0000992#endif
vlm39e5ed72004-09-05 10:40:41 +0000993#endif
vlm80103492004-09-07 10:39:09 +0000994
vlmfa67ddc2004-06-03 03:38:44 +0000995int
vlm6a02a8a2004-09-08 00:28:11 +0000996yyparse(YYPARSE_PARAM_ARG)
vlmfa67ddc2004-06-03 03:38:44 +0000997 YYPARSE_PARAM_DECL
998{
999 register int yystate;
1000 register int yyn;
1001 register short *yyssp;
1002 register YYSTYPE *yyvsp;
vlm6a02a8a2004-09-08 00:28:11 +00001003 int yyerrstatus; /* number of tokens to shift before error messages enabled */
1004 int yychar1 = 0; /* lookahead token as an internal (translated) token number */
vlmfa67ddc2004-06-03 03:38:44 +00001005
vlm6a02a8a2004-09-08 00:28:11 +00001006 short yyssa[YYINITDEPTH]; /* the state stack */
1007 YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
vlmfa67ddc2004-06-03 03:38:44 +00001008
vlm6a02a8a2004-09-08 00:28:11 +00001009 short *yyss = yyssa; /* refer to the stacks thru separate pointers */
1010 YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
vlmfa67ddc2004-06-03 03:38:44 +00001011
vlm6a02a8a2004-09-08 00:28:11 +00001012#ifdef YYLSP_NEEDED
1013 YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
1014 YYLTYPE *yyls = yylsa;
1015 YYLTYPE *yylsp;
1016
1017#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
1018#else
vlmfa67ddc2004-06-03 03:38:44 +00001019#define YYPOPSTACK (yyvsp--, yyssp--)
vlm6a02a8a2004-09-08 00:28:11 +00001020#endif
vlmfa67ddc2004-06-03 03:38:44 +00001021
vlm6a02a8a2004-09-08 00:28:11 +00001022 int yystacksize = YYINITDEPTH;
1023 int yyfree_stacks = 0;
vlmfa67ddc2004-06-03 03:38:44 +00001024
vlm6a02a8a2004-09-08 00:28:11 +00001025#ifdef YYPURE
1026 int yychar;
1027 YYSTYPE yylval;
1028 int yynerrs;
1029#ifdef YYLSP_NEEDED
1030 YYLTYPE yylloc;
1031#endif
1032#endif
vlmfa67ddc2004-06-03 03:38:44 +00001033
vlm6a02a8a2004-09-08 00:28:11 +00001034 YYSTYPE yyval; /* the variable used to return */
1035 /* semantic values from the action */
1036 /* routines */
vlmfa67ddc2004-06-03 03:38:44 +00001037
1038 int yylen;
1039
vlm6a02a8a2004-09-08 00:28:11 +00001040#if YYDEBUG != 0
1041 if (yydebug)
1042 fprintf(stderr, "Starting parse\n");
1043#endif
vlmfa67ddc2004-06-03 03:38:44 +00001044
1045 yystate = 0;
1046 yyerrstatus = 0;
1047 yynerrs = 0;
1048 yychar = YYEMPTY; /* Cause a token to be read. */
1049
1050 /* Initialize stack pointers.
1051 Waste one element of value and location stack
1052 so that they stay on the same level as the state stack.
1053 The wasted elements are never initialized. */
1054
vlm6a02a8a2004-09-08 00:28:11 +00001055 yyssp = yyss - 1;
vlmfa67ddc2004-06-03 03:38:44 +00001056 yyvsp = yyvs;
vlm6a02a8a2004-09-08 00:28:11 +00001057#ifdef YYLSP_NEEDED
1058 yylsp = yyls;
1059#endif
vlmfa67ddc2004-06-03 03:38:44 +00001060
vlm6a02a8a2004-09-08 00:28:11 +00001061/* Push a new state, which is found in yystate . */
1062/* In all cases, when you get here, the value and location stacks
1063 have just been pushed. so pushing a state here evens the stacks. */
1064yynewstate:
vlmfa67ddc2004-06-03 03:38:44 +00001065
vlm6a02a8a2004-09-08 00:28:11 +00001066 *++yyssp = yystate;
vlmfa67ddc2004-06-03 03:38:44 +00001067
1068 if (yyssp >= yyss + yystacksize - 1)
1069 {
vlm6a02a8a2004-09-08 00:28:11 +00001070 /* Give user a chance to reallocate the stack */
1071 /* Use copies of these so that the &'s don't force the real ones into memory. */
1072 YYSTYPE *yyvs1 = yyvs;
1073 short *yyss1 = yyss;
1074#ifdef YYLSP_NEEDED
1075 YYLTYPE *yyls1 = yyls;
1076#endif
1077
vlmfa67ddc2004-06-03 03:38:44 +00001078 /* Get the current used size of the three stacks, in elements. */
vlm6a02a8a2004-09-08 00:28:11 +00001079 int size = yyssp - yyss + 1;
vlmfa67ddc2004-06-03 03:38:44 +00001080
1081#ifdef yyoverflow
vlm6a02a8a2004-09-08 00:28:11 +00001082 /* Each stack pointer address is followed by the size of
1083 the data in use in that stack, in bytes. */
1084#ifdef YYLSP_NEEDED
1085 /* This used to be a conditional around just the two extra args,
1086 but that might be undefined if yyoverflow is a macro. */
1087 yyoverflow("parser stack overflow",
1088 &yyss1, size * sizeof (*yyssp),
1089 &yyvs1, size * sizeof (*yyvsp),
1090 &yyls1, size * sizeof (*yylsp),
1091 &yystacksize);
1092#else
1093 yyoverflow("parser stack overflow",
1094 &yyss1, size * sizeof (*yyssp),
1095 &yyvs1, size * sizeof (*yyvsp),
1096 &yystacksize);
1097#endif
vlmfa67ddc2004-06-03 03:38:44 +00001098
vlm6a02a8a2004-09-08 00:28:11 +00001099 yyss = yyss1; yyvs = yyvs1;
1100#ifdef YYLSP_NEEDED
1101 yyls = yyls1;
1102#endif
vlmfa67ddc2004-06-03 03:38:44 +00001103#else /* no yyoverflow */
1104 /* Extend the stack our own way. */
1105 if (yystacksize >= YYMAXDEPTH)
vlm6a02a8a2004-09-08 00:28:11 +00001106 {
1107 yyerror("parser stack overflow");
1108 if (yyfree_stacks)
1109 {
1110 free (yyss);
1111 free (yyvs);
1112#ifdef YYLSP_NEEDED
1113 free (yyls);
1114#endif
1115 }
1116 return 2;
1117 }
vlmfa67ddc2004-06-03 03:38:44 +00001118 yystacksize *= 2;
1119 if (yystacksize > YYMAXDEPTH)
1120 yystacksize = YYMAXDEPTH;
vlm6a02a8a2004-09-08 00:28:11 +00001121#ifndef YYSTACK_USE_ALLOCA
1122 yyfree_stacks = 1;
1123#endif
1124 yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
1125 __yy_memcpy ((char *)yyss, (char *)yyss1,
1126 size * (unsigned int) sizeof (*yyssp));
1127 yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
1128 __yy_memcpy ((char *)yyvs, (char *)yyvs1,
1129 size * (unsigned int) sizeof (*yyvsp));
1130#ifdef YYLSP_NEEDED
1131 yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
1132 __yy_memcpy ((char *)yyls, (char *)yyls1,
1133 size * (unsigned int) sizeof (*yylsp));
1134#endif
vlmfa67ddc2004-06-03 03:38:44 +00001135#endif /* no yyoverflow */
1136
vlm6a02a8a2004-09-08 00:28:11 +00001137 yyssp = yyss + size - 1;
1138 yyvsp = yyvs + size - 1;
1139#ifdef YYLSP_NEEDED
1140 yylsp = yyls + size - 1;
1141#endif
vlmfa67ddc2004-06-03 03:38:44 +00001142
vlm6a02a8a2004-09-08 00:28:11 +00001143#if YYDEBUG != 0
1144 if (yydebug)
1145 fprintf(stderr, "Stack size increased to %d\n", yystacksize);
1146#endif
vlmfa67ddc2004-06-03 03:38:44 +00001147
1148 if (yyssp >= yyss + yystacksize - 1)
1149 YYABORT;
1150 }
1151
vlm6a02a8a2004-09-08 00:28:11 +00001152#if YYDEBUG != 0
1153 if (yydebug)
1154 fprintf(stderr, "Entering state %d\n", yystate);
1155#endif
vlmfa67ddc2004-06-03 03:38:44 +00001156
1157 goto yybackup;
vlm6a02a8a2004-09-08 00:28:11 +00001158 yybackup:
vlmfa67ddc2004-06-03 03:38:44 +00001159
1160/* Do appropriate processing given the current state. */
1161/* Read a lookahead token if we need one and don't already have one. */
1162/* yyresume: */
1163
1164 /* First try to decide what to do without reference to lookahead token. */
1165
1166 yyn = yypact[yystate];
vlm6a02a8a2004-09-08 00:28:11 +00001167 if (yyn == YYFLAG)
vlmfa67ddc2004-06-03 03:38:44 +00001168 goto yydefault;
1169
1170 /* Not known => get a lookahead token if don't already have one. */
1171
1172 /* yychar is either YYEMPTY or YYEOF
1173 or a valid token in external form. */
1174
1175 if (yychar == YYEMPTY)
1176 {
vlm6a02a8a2004-09-08 00:28:11 +00001177#if YYDEBUG != 0
1178 if (yydebug)
1179 fprintf(stderr, "Reading a token: ");
1180#endif
vlmfa67ddc2004-06-03 03:38:44 +00001181 yychar = YYLEX;
1182 }
1183
vlm6a02a8a2004-09-08 00:28:11 +00001184 /* Convert token to internal form (in yychar1) for indexing tables with */
vlmfa67ddc2004-06-03 03:38:44 +00001185
vlm6a02a8a2004-09-08 00:28:11 +00001186 if (yychar <= 0) /* This means end of input. */
vlmfa67ddc2004-06-03 03:38:44 +00001187 {
1188 yychar1 = 0;
vlm6a02a8a2004-09-08 00:28:11 +00001189 yychar = YYEOF; /* Don't call YYLEX any more */
vlmfa67ddc2004-06-03 03:38:44 +00001190
vlm6a02a8a2004-09-08 00:28:11 +00001191#if YYDEBUG != 0
1192 if (yydebug)
1193 fprintf(stderr, "Now at end of input.\n");
1194#endif
vlmfa67ddc2004-06-03 03:38:44 +00001195 }
1196 else
1197 {
vlm6a02a8a2004-09-08 00:28:11 +00001198 yychar1 = YYTRANSLATE(yychar);
vlmfa67ddc2004-06-03 03:38:44 +00001199
vlm6a02a8a2004-09-08 00:28:11 +00001200#if YYDEBUG != 0
1201 if (yydebug)
1202 {
1203 fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
1204 /* Give the individual parser a way to print the precise meaning
1205 of a token, for further debugging info. */
1206#ifdef YYPRINT
1207 YYPRINT (stderr, yychar, yylval);
1208#endif
1209 fprintf (stderr, ")\n");
1210 }
1211#endif
vlmfa67ddc2004-06-03 03:38:44 +00001212 }
1213
1214 yyn += yychar1;
vlm6a02a8a2004-09-08 00:28:11 +00001215 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
vlmfa67ddc2004-06-03 03:38:44 +00001216 goto yydefault;
vlm6a02a8a2004-09-08 00:28:11 +00001217
vlmfa67ddc2004-06-03 03:38:44 +00001218 yyn = yytable[yyn];
vlm6a02a8a2004-09-08 00:28:11 +00001219
1220 /* yyn is what to do for this token type in this state.
1221 Negative => reduce, -yyn is rule number.
1222 Positive => shift, yyn is new state.
1223 New state is final state => don't bother to shift,
1224 just return success.
1225 0, or most negative number => error. */
1226
1227 if (yyn < 0)
vlmfa67ddc2004-06-03 03:38:44 +00001228 {
vlm6a02a8a2004-09-08 00:28:11 +00001229 if (yyn == YYFLAG)
vlmfa67ddc2004-06-03 03:38:44 +00001230 goto yyerrlab;
1231 yyn = -yyn;
1232 goto yyreduce;
1233 }
vlm6a02a8a2004-09-08 00:28:11 +00001234 else if (yyn == 0)
1235 goto yyerrlab;
vlmfa67ddc2004-06-03 03:38:44 +00001236
1237 if (yyn == YYFINAL)
1238 YYACCEPT;
1239
1240 /* Shift the lookahead token. */
vlm6a02a8a2004-09-08 00:28:11 +00001241
1242#if YYDEBUG != 0
1243 if (yydebug)
1244 fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
1245#endif
vlmfa67ddc2004-06-03 03:38:44 +00001246
1247 /* Discard the token being shifted unless it is eof. */
1248 if (yychar != YYEOF)
1249 yychar = YYEMPTY;
1250
1251 *++yyvsp = yylval;
vlm6a02a8a2004-09-08 00:28:11 +00001252#ifdef YYLSP_NEEDED
1253 *++yylsp = yylloc;
1254#endif
vlmfa67ddc2004-06-03 03:38:44 +00001255
vlm6a02a8a2004-09-08 00:28:11 +00001256 /* count tokens shifted since error; after three, turn off error status. */
1257 if (yyerrstatus) yyerrstatus--;
vlmfa67ddc2004-06-03 03:38:44 +00001258
1259 yystate = yyn;
1260 goto yynewstate;
1261
vlm6a02a8a2004-09-08 00:28:11 +00001262/* Do the default action for the current state. */
vlm80103492004-09-07 10:39:09 +00001263yydefault:
vlm6a02a8a2004-09-08 00:28:11 +00001264
vlmfa67ddc2004-06-03 03:38:44 +00001265 yyn = yydefact[yystate];
1266 if (yyn == 0)
1267 goto yyerrlab;
1268
vlm6a02a8a2004-09-08 00:28:11 +00001269/* Do a reduction. yyn is the number of a rule to reduce with. */
vlmfa67ddc2004-06-03 03:38:44 +00001270yyreduce:
1271 yylen = yyr2[yyn];
vlm6a02a8a2004-09-08 00:28:11 +00001272 if (yylen > 0)
1273 yyval = yyvsp[1-yylen]; /* implement default value of the action */
vlmfa67ddc2004-06-03 03:38:44 +00001274
vlm6a02a8a2004-09-08 00:28:11 +00001275#if YYDEBUG != 0
vlmfa67ddc2004-06-03 03:38:44 +00001276 if (yydebug)
1277 {
vlm6a02a8a2004-09-08 00:28:11 +00001278 int i;
vlmfa67ddc2004-06-03 03:38:44 +00001279
vlm6a02a8a2004-09-08 00:28:11 +00001280 fprintf (stderr, "Reducing via rule %d (line %d), ",
1281 yyn, yyrline[yyn]);
vlmfa67ddc2004-06-03 03:38:44 +00001282
1283 /* Print the symbols being reduced, and their result. */
vlm6a02a8a2004-09-08 00:28:11 +00001284 for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
1285 fprintf (stderr, "%s ", yytname[yyrhs[i]]);
1286 fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
vlmfa67ddc2004-06-03 03:38:44 +00001287 }
1288#endif
vlm80103492004-09-07 10:39:09 +00001289
vlm6a02a8a2004-09-08 00:28:11 +00001290
1291 switch (yyn) {
1292
1293case 1:
vlm0aa86902004-10-12 23:26:53 +00001294#line 302 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001295{
1296 *(void **)param = yyvsp[0].a_grammar;
1297 ;
1298 break;}
1299case 2:
vlm0aa86902004-10-12 23:26:53 +00001300#line 308 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001301{
vlmfa67ddc2004-06-03 03:38:44 +00001302 yyval.a_grammar = asn1p_new();
1303 checkmem(yyval.a_grammar);
1304 TQ_ADD(&(yyval.a_grammar->modules), yyvsp[0].a_module, mod_next);
vlm6a02a8a2004-09-08 00:28:11 +00001305 ;
1306 break;}
1307case 3:
vlm0aa86902004-10-12 23:26:53 +00001308#line 313 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001309{
vlmfa67ddc2004-06-03 03:38:44 +00001310 yyval.a_grammar = yyvsp[-1].a_grammar;
1311 TQ_ADD(&(yyval.a_grammar->modules), yyvsp[0].a_module, mod_next);
vlm6a02a8a2004-09-08 00:28:11 +00001312 ;
1313 break;}
1314case 4:
vlm0aa86902004-10-12 23:26:53 +00001315#line 334 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001316{
vlmfa67ddc2004-06-03 03:38:44 +00001317
1318 if(yyvsp[-1].a_module) {
1319 yyval.a_module = yyvsp[-1].a_module;
1320 } else {
1321 /* There's a chance that a module is just plain empty */
1322 yyval.a_module = asn1p_module_new();
1323 }
1324 checkmem(yyval.a_module);
1325
1326 yyval.a_module->Identifier = yyvsp[-7].tv_str;
1327 yyval.a_module->module_oid = yyvsp[-6].a_oid;
1328 yyval.a_module->module_flags = yyvsp[-4].a_module_flags;
vlm6a02a8a2004-09-08 00:28:11 +00001329 ;
1330 break;}
1331case 5:
vlm0aa86902004-10-12 23:26:53 +00001332#line 355 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001333{ yyval.a_oid = 0; ;
1334 break;}
1335case 6:
vlm0aa86902004-10-12 23:26:53 +00001336#line 356 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001337{ yyval.a_oid = yyvsp[0].a_oid; ;
1338 break;}
1339case 7:
vlm0aa86902004-10-12 23:26:53 +00001340#line 360 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001341{
vlmfa67ddc2004-06-03 03:38:44 +00001342 yyval.a_oid = yyvsp[-1].a_oid;
vlm6a02a8a2004-09-08 00:28:11 +00001343 ;
1344 break;}
1345case 8:
vlm0aa86902004-10-12 23:26:53 +00001346#line 363 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001347{
vlmfa67ddc2004-06-03 03:38:44 +00001348 yyval.a_oid = 0;
vlm6a02a8a2004-09-08 00:28:11 +00001349 ;
1350 break;}
1351case 9:
vlm0aa86902004-10-12 23:26:53 +00001352#line 369 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001353{
vlmfa67ddc2004-06-03 03:38:44 +00001354 yyval.a_oid = asn1p_oid_new();
1355 asn1p_oid_add_arc(yyval.a_oid, &yyvsp[0].a_oid_arc);
1356 if(yyvsp[0].a_oid_arc.name)
1357 free(yyvsp[0].a_oid_arc.name);
vlm6a02a8a2004-09-08 00:28:11 +00001358 ;
1359 break;}
1360case 10:
vlm0aa86902004-10-12 23:26:53 +00001361#line 375 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001362{
vlmfa67ddc2004-06-03 03:38:44 +00001363 yyval.a_oid = yyvsp[-1].a_oid;
1364 asn1p_oid_add_arc(yyval.a_oid, &yyvsp[0].a_oid_arc);
1365 if(yyvsp[0].a_oid_arc.name)
1366 free(yyvsp[0].a_oid_arc.name);
vlm6a02a8a2004-09-08 00:28:11 +00001367 ;
1368 break;}
1369case 11:
vlm0aa86902004-10-12 23:26:53 +00001370#line 384 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001371{ /* iso */
vlmfa67ddc2004-06-03 03:38:44 +00001372 yyval.a_oid_arc.name = yyvsp[0].tv_str;
1373 yyval.a_oid_arc.number = -1;
vlm6a02a8a2004-09-08 00:28:11 +00001374 ;
1375 break;}
1376case 12:
vlm0aa86902004-10-12 23:26:53 +00001377#line 388 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001378{ /* iso(1) */
vlmfa67ddc2004-06-03 03:38:44 +00001379 yyval.a_oid_arc.name = yyvsp[-3].tv_str;
1380 yyval.a_oid_arc.number = yyvsp[-1].a_int;
vlm6a02a8a2004-09-08 00:28:11 +00001381 ;
1382 break;}
1383case 13:
vlm0aa86902004-10-12 23:26:53 +00001384#line 392 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001385{ /* 1 */
vlmfa67ddc2004-06-03 03:38:44 +00001386 yyval.a_oid_arc.name = 0;
1387 yyval.a_oid_arc.number = yyvsp[0].a_int;
vlm6a02a8a2004-09-08 00:28:11 +00001388 ;
1389 break;}
1390case 14:
vlm0aa86902004-10-12 23:26:53 +00001391#line 402 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001392{ yyval.a_module_flags = MSF_NOFLAGS; ;
1393 break;}
1394case 15:
vlm0aa86902004-10-12 23:26:53 +00001395#line 403 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001396{
vlmfa67ddc2004-06-03 03:38:44 +00001397 yyval.a_module_flags = yyvsp[0].a_module_flags;
vlm6a02a8a2004-09-08 00:28:11 +00001398 ;
1399 break;}
1400case 16:
vlm0aa86902004-10-12 23:26:53 +00001401#line 412 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001402{
vlmfa67ddc2004-06-03 03:38:44 +00001403 yyval.a_module_flags = yyvsp[0].a_module_flags;
vlm6a02a8a2004-09-08 00:28:11 +00001404 ;
1405 break;}
1406case 17:
vlm0aa86902004-10-12 23:26:53 +00001407#line 415 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001408{
vlmfa67ddc2004-06-03 03:38:44 +00001409 yyval.a_module_flags = yyvsp[-1].a_module_flags | yyvsp[0].a_module_flags;
vlm6a02a8a2004-09-08 00:28:11 +00001410 ;
1411 break;}
1412case 18:
vlm0aa86902004-10-12 23:26:53 +00001413#line 424 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001414{
vlmfa67ddc2004-06-03 03:38:44 +00001415 yyval.a_module_flags = MSF_EXPLICIT_TAGS;
vlm6a02a8a2004-09-08 00:28:11 +00001416 ;
1417 break;}
1418case 19:
vlm0aa86902004-10-12 23:26:53 +00001419#line 427 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001420{
vlmfa67ddc2004-06-03 03:38:44 +00001421 yyval.a_module_flags = MSF_IMPLICIT_TAGS;
vlm6a02a8a2004-09-08 00:28:11 +00001422 ;
1423 break;}
1424case 20:
vlm0aa86902004-10-12 23:26:53 +00001425#line 430 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001426{
vlmfa67ddc2004-06-03 03:38:44 +00001427 yyval.a_module_flags = MSF_AUTOMATIC_TAGS;
vlm6a02a8a2004-09-08 00:28:11 +00001428 ;
1429 break;}
1430case 21:
vlm0aa86902004-10-12 23:26:53 +00001431#line 433 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001432{
vlmfa67ddc2004-06-03 03:38:44 +00001433 yyval.a_module_flags = MSF_EXTENSIBILITY_IMPLIED;
vlm6a02a8a2004-09-08 00:28:11 +00001434 ;
1435 break;}
1436case 22:
vlm0aa86902004-10-12 23:26:53 +00001437#line 437 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001438{
vlm9283dbe2004-08-18 04:59:12 +00001439 /* X.680Amd1 specifies TAG and XER */
1440 if(strcmp(yyvsp[-1].tv_str, "TAG") == 0) {
1441 yyval.a_module_flags = MSF_TAG_INSTRUCTIONS;
1442 } else if(strcmp(yyvsp[-1].tv_str, "XER") == 0) {
1443 yyval.a_module_flags = MSF_XER_INSTRUCTIONS;
1444 } else {
1445 fprintf(stderr,
1446 "WARNING: %s INSTRUCTIONS at line %d: "
1447 "Unrecognized encoding reference\n",
1448 yyvsp[-1].tv_str, yylineno);
1449 yyval.a_module_flags = MSF_unk_INSTRUCTIONS;
1450 }
1451 free(yyvsp[-1].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00001452 ;
1453 break;}
1454case 23:
vlm0aa86902004-10-12 23:26:53 +00001455#line 458 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001456{ yyval.a_module = 0; ;
1457 break;}
1458case 24:
vlm0aa86902004-10-12 23:26:53 +00001459#line 459 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001460{
vlmfa67ddc2004-06-03 03:38:44 +00001461 yyval.a_module = yyvsp[0].a_module;
vlm6a02a8a2004-09-08 00:28:11 +00001462 ;
1463 break;}
1464case 25:
vlm0aa86902004-10-12 23:26:53 +00001465#line 468 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001466{
vlm9283dbe2004-08-18 04:59:12 +00001467 yyval.a_module = yyvsp[0].a_module;
vlm6a02a8a2004-09-08 00:28:11 +00001468 ;
1469 break;}
1470case 26:
vlm0aa86902004-10-12 23:26:53 +00001471#line 471 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001472{
vlmfa67ddc2004-06-03 03:38:44 +00001473 yyval.a_module = yyvsp[-1].a_module;
1474
vlm9283dbe2004-08-18 04:59:12 +00001475 /* Behave well when one of them is skipped. */
1476 if(!(yyvsp[-1].a_module)) {
1477 if(yyvsp[0].a_module) yyval.a_module = yyvsp[0].a_module;
1478 break;
1479 }
1480
vlmfa67ddc2004-06-03 03:38:44 +00001481#ifdef MY_IMPORT
1482#error MY_IMPORT DEFINED ELSEWHERE!
1483#endif
1484#define MY_IMPORT(foo,field) do { \
vlm97ed7152004-08-13 12:31:09 +00001485 while(TQ_FIRST(&(yyvsp[0].a_module->foo))) { \
vlmfa67ddc2004-06-03 03:38:44 +00001486 TQ_ADD(&(yyval.a_module->foo), \
1487 TQ_REMOVE(&(yyvsp[0].a_module->foo), field), \
1488 field); \
vlm97ed7152004-08-13 12:31:09 +00001489 } \
1490 assert(TQ_FIRST(&(yyvsp[0].a_module->foo)) == 0); \
1491 } while(0)
vlmfa67ddc2004-06-03 03:38:44 +00001492
1493 MY_IMPORT(imports, xp_next);
1494 MY_IMPORT(exports, xp_next);
1495 MY_IMPORT(members, next);
1496#undef MY_IMPORT
1497
vlm6a02a8a2004-09-08 00:28:11 +00001498 ;
1499 break;}
1500case 27:
vlm0aa86902004-10-12 23:26:53 +00001501#line 504 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001502{
vlmfa67ddc2004-06-03 03:38:44 +00001503 yyval.a_module = yyvsp[0].a_module;
vlm6a02a8a2004-09-08 00:28:11 +00001504 ;
1505 break;}
1506case 28:
vlm0aa86902004-10-12 23:26:53 +00001507#line 507 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001508{
vlmfa67ddc2004-06-03 03:38:44 +00001509 yyval.a_module = asn1p_module_new();
1510 checkmem(yyval.a_module);
1511 if(yyvsp[0].a_xports) {
1512 TQ_ADD(&(yyval.a_module->exports), yyvsp[0].a_xports, xp_next);
1513 } else {
1514 /* "EXPORTS ALL;" ? */
1515 }
vlm6a02a8a2004-09-08 00:28:11 +00001516 ;
1517 break;}
1518case 29:
vlm0aa86902004-10-12 23:26:53 +00001519#line 516 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001520{
vlmfa67ddc2004-06-03 03:38:44 +00001521 yyval.a_module = asn1p_module_new();
1522 checkmem(yyval.a_module);
1523 assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
1524 assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
1525 TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001526 ;
1527 break;}
1528case 30:
vlm0aa86902004-10-12 23:26:53 +00001529#line 523 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001530{
vlm9283dbe2004-08-18 04:59:12 +00001531 yyval.a_module = asn1p_module_new();
1532 checkmem(yyval.a_module);
1533 assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
1534 assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
1535 TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001536 ;
1537 break;}
1538case 31:
vlm0aa86902004-10-12 23:26:53 +00001539#line 536 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001540{
vlm9283dbe2004-08-18 04:59:12 +00001541 yyval.a_module = asn1p_module_new();
1542 checkmem(yyval.a_module);
1543 assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
1544 assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
1545 TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001546 ;
1547 break;}
1548case 32:
vlm0aa86902004-10-12 23:26:53 +00001549#line 544 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001550{ asn1p_lexer_hack_push_encoding_control(); ;
1551 break;}
1552case 33:
vlm0aa86902004-10-12 23:26:53 +00001553#line 545 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001554{
vlm9283dbe2004-08-18 04:59:12 +00001555 fprintf(stderr,
1556 "WARNING: ENCODING-CONTROL %s "
1557 "specification at line %d ignored\n",
1558 yyvsp[-1].tv_str, yylineno);
1559 free(yyvsp[-1].tv_str);
1560 yyval.a_module = 0;
vlm6a02a8a2004-09-08 00:28:11 +00001561 ;
1562 break;}
1563case 34:
vlm0aa86902004-10-12 23:26:53 +00001564#line 557 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001565{
vlmfa67ddc2004-06-03 03:38:44 +00001566 return yyerror(
1567 "Attempt to redefine a standard basic type, "
1568 "use -ftypesXY to switch back "
1569 "to older version of ASN.1 standard");
vlm6a02a8a2004-09-08 00:28:11 +00001570 ;
1571 break;}
1572case 35:
vlm0aa86902004-10-12 23:26:53 +00001573#line 571 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001574{
vlmfa67ddc2004-06-03 03:38:44 +00001575 yyval.a_module = yyvsp[-1].a_module;
vlm6a02a8a2004-09-08 00:28:11 +00001576 ;
1577 break;}
1578case 36:
vlm0aa86902004-10-12 23:26:53 +00001579#line 577 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001580{
vlmfa67ddc2004-06-03 03:38:44 +00001581 return yyerror("Empty IMPORTS list");
vlm6a02a8a2004-09-08 00:28:11 +00001582 ;
1583 break;}
1584case 37:
vlm0aa86902004-10-12 23:26:53 +00001585#line 583 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001586{
vlmfa67ddc2004-06-03 03:38:44 +00001587 yyval.a_module = asn1p_module_new();
1588 checkmem(yyval.a_module);
1589 TQ_ADD(&(yyval.a_module->imports), yyvsp[0].a_xports, xp_next);
vlm6a02a8a2004-09-08 00:28:11 +00001590 ;
1591 break;}
1592case 38:
vlm0aa86902004-10-12 23:26:53 +00001593#line 588 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001594{
vlmfa67ddc2004-06-03 03:38:44 +00001595 yyval.a_module = yyvsp[-1].a_module;
1596 TQ_ADD(&(yyval.a_module->imports), yyvsp[0].a_xports, xp_next);
vlm6a02a8a2004-09-08 00:28:11 +00001597 ;
1598 break;}
1599case 39:
vlm0aa86902004-10-12 23:26:53 +00001600#line 595 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001601{
vlmfa67ddc2004-06-03 03:38:44 +00001602 yyval.a_xports = yyvsp[-3].a_xports;
1603 yyval.a_xports->from = yyvsp[-1].tv_str;
1604 yyval.a_xports->from_oid = yyvsp[0].a_oid;
1605 checkmem(yyval.a_xports);
vlm6a02a8a2004-09-08 00:28:11 +00001606 ;
1607 break;}
1608case 40:
vlm0aa86902004-10-12 23:26:53 +00001609#line 604 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001610{
vlmfa67ddc2004-06-03 03:38:44 +00001611 yyval.a_xports = asn1p_xports_new();
1612 checkmem(yyval.a_xports);
1613 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001614 ;
1615 break;}
1616case 41:
vlm0aa86902004-10-12 23:26:53 +00001617#line 609 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001618{
vlmfa67ddc2004-06-03 03:38:44 +00001619 yyval.a_xports = yyvsp[-2].a_xports;
1620 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001621 ;
1622 break;}
1623case 42:
vlm0aa86902004-10-12 23:26:53 +00001624#line 616 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001625{
vlmfa67ddc2004-06-03 03:38:44 +00001626 yyval.a_expr = asn1p_expr_new(yylineno);
1627 checkmem(yyval.a_expr);
1628 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1629 yyval.a_expr->expr_type = A1TC_REFERENCE;
vlm6a02a8a2004-09-08 00:28:11 +00001630 ;
1631 break;}
1632case 43:
vlm0aa86902004-10-12 23:26:53 +00001633#line 622 "asn1p_y.y"
1634{ /* Completely equivalent to above */
1635 yyval.a_expr = asn1p_expr_new(yylineno);
1636 checkmem(yyval.a_expr);
1637 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
1638 yyval.a_expr->expr_type = A1TC_REFERENCE;
1639 ;
1640 break;}
1641case 44:
1642#line 628 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001643{
vlmfa67ddc2004-06-03 03:38:44 +00001644 yyval.a_expr = asn1p_expr_new(yylineno);
1645 checkmem(yyval.a_expr);
1646 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1647 yyval.a_expr->expr_type = A1TC_REFERENCE;
vlm6a02a8a2004-09-08 00:28:11 +00001648 ;
1649 break;}
vlm0aa86902004-10-12 23:26:53 +00001650case 45:
1651#line 637 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001652{
vlmfa67ddc2004-06-03 03:38:44 +00001653 yyval.a_xports = yyvsp[-1].a_xports;
vlm6a02a8a2004-09-08 00:28:11 +00001654 ;
1655 break;}
vlm0aa86902004-10-12 23:26:53 +00001656case 46:
1657#line 640 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001658{
vlmfa67ddc2004-06-03 03:38:44 +00001659 yyval.a_xports = 0;
vlm6a02a8a2004-09-08 00:28:11 +00001660 ;
1661 break;}
vlm0aa86902004-10-12 23:26:53 +00001662case 47:
1663#line 643 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001664{
vlmfa67ddc2004-06-03 03:38:44 +00001665 /* Empty EXPORTS clause effectively prohibits export. */
1666 yyval.a_xports = asn1p_xports_new();
1667 checkmem(yyval.a_xports);
vlm6a02a8a2004-09-08 00:28:11 +00001668 ;
1669 break;}
vlm0aa86902004-10-12 23:26:53 +00001670case 48:
1671#line 651 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001672{
vlmfa67ddc2004-06-03 03:38:44 +00001673 yyval.a_xports = asn1p_xports_new();
1674 assert(yyval.a_xports);
1675 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001676 ;
1677 break;}
vlm0aa86902004-10-12 23:26:53 +00001678case 49:
1679#line 656 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001680{
vlmfa67ddc2004-06-03 03:38:44 +00001681 yyval.a_xports = yyvsp[-2].a_xports;
1682 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001683 ;
1684 break;}
vlm6a02a8a2004-09-08 00:28:11 +00001685case 50:
vlm0aa86902004-10-12 23:26:53 +00001686#line 663 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001687{
vlmfa67ddc2004-06-03 03:38:44 +00001688 yyval.a_expr = asn1p_expr_new(yylineno);
1689 checkmem(yyval.a_expr);
1690 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1691 yyval.a_expr->expr_type = A1TC_EXPORTVAR;
vlm6a02a8a2004-09-08 00:28:11 +00001692 ;
1693 break;}
1694case 51:
vlm0aa86902004-10-12 23:26:53 +00001695#line 669 "asn1p_y.y"
1696{
1697 yyval.a_expr = asn1p_expr_new(yylineno);
1698 checkmem(yyval.a_expr);
1699 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
1700 yyval.a_expr->expr_type = A1TC_EXPORTVAR;
1701 ;
1702 break;}
1703case 52:
1704#line 675 "asn1p_y.y"
1705{
1706 yyval.a_expr = asn1p_expr_new(yylineno);
1707 checkmem(yyval.a_expr);
1708 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1709 yyval.a_expr->expr_type = A1TC_EXPORTVAR;
1710 ;
1711 break;}
1712case 53:
1713#line 685 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001714{
vlmfa67ddc2004-06-03 03:38:44 +00001715 yyval.a_expr = yyvsp[-4].a_expr;
1716 assert(yyval.a_expr->Identifier == 0);
1717 yyval.a_expr->Identifier = yyvsp[-5].tv_str;
1718 yyval.a_expr->meta_type = AMT_VALUESET;
1719 // take care of optValueSetBody
vlm6a02a8a2004-09-08 00:28:11 +00001720 ;
1721 break;}
vlm0aa86902004-10-12 23:26:53 +00001722case 54:
1723#line 695 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001724{
vlmfa67ddc2004-06-03 03:38:44 +00001725 yyval.a_expr = asn1p_expr_new(yylineno);
1726 checkmem(yyval.a_expr);
1727 yyval.a_expr->reference = yyvsp[0].a_ref;
1728 yyval.a_expr->expr_type = A1TC_REFERENCE;
1729 yyval.a_expr->meta_type = AMT_TYPEREF;
vlm6a02a8a2004-09-08 00:28:11 +00001730 ;
1731 break;}
vlm0aa86902004-10-12 23:26:53 +00001732case 55:
1733#line 702 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001734{
vlmfa67ddc2004-06-03 03:38:44 +00001735 yyval.a_expr = asn1p_expr_new(yylineno);
1736 checkmem(yyval.a_expr);
1737 yyval.a_expr->expr_type = yyvsp[0].a_type;
1738 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00001739 ;
1740 break;}
vlm6a02a8a2004-09-08 00:28:11 +00001741case 56:
vlm0aa86902004-10-12 23:26:53 +00001742#line 711 "asn1p_y.y"
1743{ ;
vlm6a02a8a2004-09-08 00:28:11 +00001744 break;}
1745case 57:
vlm151c0b22004-09-22 16:03:36 +00001746#line 712 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001747{
1748 ;
1749 break;}
1750case 58:
vlm0aa86902004-10-12 23:26:53 +00001751#line 723 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001752{
1753 ;
1754 break;}
1755case 59:
vlm0aa86902004-10-12 23:26:53 +00001756#line 725 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001757{
1758 ;
1759 break;}
1760case 60:
vlm0aa86902004-10-12 23:26:53 +00001761#line 730 "asn1p_y.y"
1762{
1763 ;
1764 break;}
1765case 61:
1766#line 732 "asn1p_y.y"
1767{
1768 ;
1769 break;}
1770case 62:
1771#line 748 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001772{
vlmfa67ddc2004-06-03 03:38:44 +00001773 yyval.a_expr = asn1p_expr_new(yylineno);
1774 checkmem(yyval.a_expr);
1775 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
1776 yyval.a_expr->tag = yyvsp[-1].a_tag;
1777 yyval.a_expr->expr_type = A1TC_TYPEID;
1778 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00001779 ;
1780 break;}
vlm0aa86902004-10-12 23:26:53 +00001781case 63:
1782#line 756 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001783{
vlmfa67ddc2004-06-03 03:38:44 +00001784 yyval.a_expr = yyvsp[0].a_expr;
vlmfce48a42004-09-14 02:36:39 +00001785 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
vlmfa67ddc2004-06-03 03:38:44 +00001786 assert(yyval.a_expr->expr_type);
1787 assert(yyval.a_expr->meta_type);
vlm6a02a8a2004-09-08 00:28:11 +00001788 ;
1789 break;}
vlm0aa86902004-10-12 23:26:53 +00001790case 64:
1791#line 762 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001792{
vlmfa67ddc2004-06-03 03:38:44 +00001793 yyval.a_expr = yyvsp[0].a_expr;
1794 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
1795 assert(yyval.a_expr->expr_type == A1TC_CLASSDEF);
1796 assert(yyval.a_expr->meta_type == AMT_OBJECT);
vlm6a02a8a2004-09-08 00:28:11 +00001797 ;
1798 break;}
vlm0aa86902004-10-12 23:26:53 +00001799case 65:
1800#line 778 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001801{
vlmfa67ddc2004-06-03 03:38:44 +00001802 yyval.a_expr = yyvsp[0].a_expr;
1803 assert(yyval.a_expr->Identifier == 0);
1804 yyval.a_expr->Identifier = yyvsp[-5].tv_str;
1805 yyval.a_expr->params = yyvsp[-3].a_plist;
1806 yyval.a_expr->meta_type = AMT_PARAMTYPE;
vlm6a02a8a2004-09-08 00:28:11 +00001807 ;
1808 break;}
vlm0aa86902004-10-12 23:26:53 +00001809case 66:
1810#line 788 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001811{
vlmfa67ddc2004-06-03 03:38:44 +00001812 int ret;
1813 yyval.a_plist = asn1p_paramlist_new(yylineno);
1814 checkmem(yyval.a_plist);
1815 ret = asn1p_paramlist_add_param(yyval.a_plist, yyvsp[0].a_parg.governor, yyvsp[0].a_parg.argument);
1816 checkmem(ret == 0);
1817 if(yyvsp[0].a_parg.governor) asn1p_ref_free(yyvsp[0].a_parg.governor);
1818 if(yyvsp[0].a_parg.argument) free(yyvsp[0].a_parg.argument);
vlm6a02a8a2004-09-08 00:28:11 +00001819 ;
1820 break;}
vlm0aa86902004-10-12 23:26:53 +00001821case 67:
1822#line 797 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001823{
vlmfa67ddc2004-06-03 03:38:44 +00001824 int ret;
1825 yyval.a_plist = yyvsp[-2].a_plist;
1826 ret = asn1p_paramlist_add_param(yyval.a_plist, yyvsp[0].a_parg.governor, yyvsp[0].a_parg.argument);
1827 checkmem(ret == 0);
1828 if(yyvsp[0].a_parg.governor) asn1p_ref_free(yyvsp[0].a_parg.governor);
1829 if(yyvsp[0].a_parg.argument) free(yyvsp[0].a_parg.argument);
vlm6a02a8a2004-09-08 00:28:11 +00001830 ;
1831 break;}
vlm0aa86902004-10-12 23:26:53 +00001832case 68:
1833#line 808 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001834{
vlmfa67ddc2004-06-03 03:38:44 +00001835 yyval.a_parg.governor = NULL;
1836 yyval.a_parg.argument = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00001837 ;
1838 break;}
vlm0aa86902004-10-12 23:26:53 +00001839case 69:
1840#line 812 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001841{
vlmfa67ddc2004-06-03 03:38:44 +00001842 int ret;
1843 yyval.a_parg.governor = asn1p_ref_new(yylineno);
1844 ret = asn1p_ref_add_component(yyval.a_parg.governor, yyvsp[-2].tv_str, 0);
1845 checkmem(ret == 0);
1846 yyval.a_parg.argument = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00001847 ;
1848 break;}
vlm0aa86902004-10-12 23:26:53 +00001849case 70:
1850#line 819 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001851{
vlmfa67ddc2004-06-03 03:38:44 +00001852 int ret;
1853 yyval.a_parg.governor = asn1p_ref_new(yylineno);
1854 ret = asn1p_ref_add_component(yyval.a_parg.governor,
1855 ASN_EXPR_TYPE2STR(yyvsp[-2].a_type), 1);
1856 checkmem(ret == 0);
1857 yyval.a_parg.argument = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00001858 ;
1859 break;}
vlm0aa86902004-10-12 23:26:53 +00001860case 71:
1861#line 830 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001862{
vlmfa67ddc2004-06-03 03:38:44 +00001863 yyval.a_expr = asn1p_expr_new(yylineno);
1864 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00001865 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1866 ;
1867 break;}
vlm0aa86902004-10-12 23:26:53 +00001868case 72:
1869#line 835 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001870{
vlmfa67ddc2004-06-03 03:38:44 +00001871 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001872 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1873 ;
1874 break;}
vlm0aa86902004-10-12 23:26:53 +00001875case 73:
1876#line 842 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001877{
vlmfa67ddc2004-06-03 03:38:44 +00001878 yyval.a_expr = yyvsp[0].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001879 ;
1880 break;}
vlm0aa86902004-10-12 23:26:53 +00001881case 74:
1882#line 845 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001883{
vlmfa67ddc2004-06-03 03:38:44 +00001884 yyval.a_expr = asn1p_expr_new(yylineno);
1885 checkmem(yyval.a_expr);
1886 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1887 yyval.a_expr->expr_type = A1TC_REFERENCE;
1888 yyval.a_expr->meta_type = AMT_VALUE;
vlm6a02a8a2004-09-08 00:28:11 +00001889 ;
1890 break;}
vlm0aa86902004-10-12 23:26:53 +00001891case 75:
1892#line 858 "asn1p_y.y"
1893{ yyval.a_expr = asn1p_expr_new(yylineno); ;
1894 break;}
1895case 76:
1896#line 859 "asn1p_y.y"
1897{ yyval.a_expr = yyvsp[0].a_expr; ;
1898 break;}
1899case 77:
1900#line 862 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001901{
vlmfa67ddc2004-06-03 03:38:44 +00001902 yyval.a_expr = asn1p_expr_new(yylineno);
1903 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00001904 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1905 ;
1906 break;}
vlm0aa86902004-10-12 23:26:53 +00001907case 78:
1908#line 867 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001909{
vlmfa67ddc2004-06-03 03:38:44 +00001910 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001911 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1912 ;
1913 break;}
vlm0aa86902004-10-12 23:26:53 +00001914case 79:
1915#line 874 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001916{
vlmec8f6812004-08-22 03:19:54 +00001917 yyval.a_expr = yyvsp[-1].a_expr;
1918 assert(yyval.a_expr->Identifier == 0);
vlmfce48a42004-09-14 02:36:39 +00001919 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
vlmec8f6812004-08-22 03:19:54 +00001920 yyval.a_expr->marker = yyvsp[0].a_marker;
vlm6a02a8a2004-09-08 00:28:11 +00001921 ;
1922 break;}
vlm0aa86902004-10-12 23:26:53 +00001923case 80:
1924#line 880 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001925{
vlmec8f6812004-08-22 03:19:54 +00001926 yyval.a_expr = asn1p_expr_new(yylineno);
1927 checkmem(yyval.a_expr);
1928 yyval.a_expr->meta_type = yyvsp[0].a_expr->meta_type;
1929 yyval.a_expr->expr_type = A1TC_COMPONENTS_OF;
vlm6a02a8a2004-09-08 00:28:11 +00001930 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1931 ;
1932 break;}
vlm0aa86902004-10-12 23:26:53 +00001933case 81:
1934#line 887 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001935{
vlmec8f6812004-08-22 03:19:54 +00001936 yyval.a_expr = yyvsp[0].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001937 ;
1938 break;}
vlm0aa86902004-10-12 23:26:53 +00001939case 82:
1940#line 893 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001941{
vlmec8f6812004-08-22 03:19:54 +00001942 yyval.a_expr = asn1p_expr_new(yylineno);
1943 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00001944 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1945 ;
1946 break;}
vlm0aa86902004-10-12 23:26:53 +00001947case 83:
1948#line 898 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001949{
vlmec8f6812004-08-22 03:19:54 +00001950 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001951 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1952 ;
1953 break;}
vlm0aa86902004-10-12 23:26:53 +00001954case 84:
1955#line 905 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001956{
vlmec8f6812004-08-22 03:19:54 +00001957 yyval.a_expr = yyvsp[0].a_expr;
1958 assert(yyval.a_expr->Identifier == 0);
vlmfce48a42004-09-14 02:36:39 +00001959 yyval.a_expr->Identifier = yyvsp[-1].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00001960 ;
1961 break;}
vlm0aa86902004-10-12 23:26:53 +00001962case 85:
1963#line 910 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001964{
vlmec8f6812004-08-22 03:19:54 +00001965 yyval.a_expr = yyvsp[0].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001966 ;
1967 break;}
vlm0aa86902004-10-12 23:26:53 +00001968case 86:
1969#line 916 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001970{
vlmfa67ddc2004-06-03 03:38:44 +00001971 yyval.a_expr = yyvsp[-2].a_expr;
1972 checkmem(yyval.a_expr);
1973 yyval.a_expr->with_syntax = yyvsp[0].a_wsynt;
1974 assert(yyval.a_expr->expr_type == A1TC_CLASSDEF);
1975 assert(yyval.a_expr->meta_type == AMT_OBJECT);
vlm6a02a8a2004-09-08 00:28:11 +00001976 ;
1977 break;}
vlm0aa86902004-10-12 23:26:53 +00001978case 87:
1979#line 926 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001980{ yyval.a_int = 0; ;
1981 break;}
vlm0aa86902004-10-12 23:26:53 +00001982case 88:
1983#line 927 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001984{ yyval.a_int = 1; ;
1985 break;}
vlm0aa86902004-10-12 23:26:53 +00001986case 89:
1987#line 931 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001988{
vlmfa67ddc2004-06-03 03:38:44 +00001989 yyval.a_expr = asn1p_expr_new(yylineno);
1990 checkmem(yyval.a_expr);
1991 yyval.a_expr->expr_type = A1TC_CLASSDEF;
1992 yyval.a_expr->meta_type = AMT_OBJECT;
vlm6a02a8a2004-09-08 00:28:11 +00001993 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1994 ;
1995 break;}
vlm0aa86902004-10-12 23:26:53 +00001996case 90:
1997#line 938 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001998{
vlmfa67ddc2004-06-03 03:38:44 +00001999 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00002000 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
2001 ;
2002 break;}
vlm0aa86902004-10-12 23:26:53 +00002003case 91:
2004#line 945 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002005{
vlmfa67ddc2004-06-03 03:38:44 +00002006 yyval.a_expr = asn1p_expr_new(yylineno);
2007 checkmem(yyval.a_expr);
2008 yyval.a_expr->Identifier = yyvsp[-1].a_refcomp.name;
2009 yyval.a_expr->expr_type = A1TC_CLASSFIELD;
2010 yyval.a_expr->meta_type = AMT_OBJECTFIELD;
2011 yyval.a_expr->marker = yyvsp[0].a_marker;
vlm6a02a8a2004-09-08 00:28:11 +00002012 ;
2013 break;}
vlm0aa86902004-10-12 23:26:53 +00002014case 92:
2015#line 953 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002016{
vlmec8f6812004-08-22 03:19:54 +00002017 yyval.a_expr = yyvsp[-2].a_expr;
2018 yyval.a_expr->Identifier = yyvsp[-3].a_refcomp.name;
2019 yyval.a_expr->marker = yyvsp[-1].a_marker;
vlmfa67ddc2004-06-03 03:38:44 +00002020 yyval.a_expr->unique = yyvsp[0].a_int;
vlm6a02a8a2004-09-08 00:28:11 +00002021 ;
2022 break;}
vlm0aa86902004-10-12 23:26:53 +00002023case 93:
2024#line 959 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002025{
vlmfa67ddc2004-06-03 03:38:44 +00002026 int ret;
2027 yyval.a_expr = asn1p_expr_new(yylineno);
2028 checkmem(yyval.a_expr);
2029 yyval.a_expr->Identifier = yyvsp[-3].a_refcomp.name;
2030 yyval.a_expr->reference = asn1p_ref_new(yylineno);
2031 checkmem(yyval.a_expr->reference);
2032 ret = asn1p_ref_add_component(yyval.a_expr->reference,
2033 yyvsp[-2].a_refcomp.name, yyvsp[-2].a_refcomp.lex_type);
2034 checkmem(ret == 0);
2035 yyval.a_expr->expr_type = A1TC_CLASSFIELD;
2036 yyval.a_expr->meta_type = AMT_OBJECTFIELD;
2037 yyval.a_expr->marker = yyvsp[-1].a_marker;
2038 yyval.a_expr->unique = yyvsp[0].a_int;
vlm6a02a8a2004-09-08 00:28:11 +00002039 ;
2040 break;}
vlm0aa86902004-10-12 23:26:53 +00002041case 94:
2042#line 977 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002043{ yyval.a_wsynt = 0; ;
2044 break;}
vlm0aa86902004-10-12 23:26:53 +00002045case 95:
2046#line 978 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002047{
vlmfa67ddc2004-06-03 03:38:44 +00002048 yyval.a_wsynt = yyvsp[0].a_wsynt;
vlm6a02a8a2004-09-08 00:28:11 +00002049 ;
2050 break;}
vlm0aa86902004-10-12 23:26:53 +00002051case 96:
2052#line 985 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002053{ asn1p_lexer_hack_enable_with_syntax(); ;
2054 break;}
vlm0aa86902004-10-12 23:26:53 +00002055case 97:
2056#line 987 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002057{
vlmfa67ddc2004-06-03 03:38:44 +00002058 yyval.a_wsynt = yyvsp[-1].a_wsynt;
vlm6a02a8a2004-09-08 00:28:11 +00002059 ;
2060 break;}
vlm0aa86902004-10-12 23:26:53 +00002061case 98:
2062#line 993 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002063{
vlmfa67ddc2004-06-03 03:38:44 +00002064 yyval.a_wsynt = asn1p_wsyntx_new();
2065 TQ_ADD(&(yyval.a_wsynt->chunks), yyvsp[0].a_wchunk, next);
vlm6a02a8a2004-09-08 00:28:11 +00002066 ;
2067 break;}
vlm0aa86902004-10-12 23:26:53 +00002068case 99:
2069#line 997 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002070{
vlmfa67ddc2004-06-03 03:38:44 +00002071 yyval.a_wsynt = yyvsp[-1].a_wsynt;
2072 TQ_ADD(&(yyval.a_wsynt->chunks), yyvsp[0].a_wchunk, next);
vlm6a02a8a2004-09-08 00:28:11 +00002073 ;
2074 break;}
vlm0aa86902004-10-12 23:26:53 +00002075case 100:
2076#line 1004 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002077{
vlmfa67ddc2004-06-03 03:38:44 +00002078 yyval.a_wchunk = asn1p_wsyntx_chunk_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002079 ;
2080 break;}
vlm0aa86902004-10-12 23:26:53 +00002081case 101:
2082#line 1007 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002083{
vlmfa67ddc2004-06-03 03:38:44 +00002084 asn1p_ref_t *ref;
2085 int ret;
2086 ref = asn1p_ref_new(yylineno);
2087 checkmem(ref);
2088 ret = asn1p_ref_add_component(ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
2089 checkmem(ret == 0);
2090 yyval.a_wchunk = asn1p_wsyntx_chunk_fromref(ref, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002091 ;
2092 break;}
vlm0aa86902004-10-12 23:26:53 +00002093case 102:
vlm151c0b22004-09-22 16:03:36 +00002094#line 1019 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002095{
vlm39e5ed72004-09-05 10:40:41 +00002096 yyval.a_expr = asn1p_expr_new(yylineno);
vlm5f0128b2004-08-20 13:25:29 +00002097 checkmem(yyval.a_expr);
2098 yyval.a_expr->Identifier = strdup("...");
vlm0aa86902004-10-12 23:26:53 +00002099 checkmem(yyval.a_expr->Identifier);
2100 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
2101 yyval.a_expr->meta_type = AMT_TYPE;
2102 ;
2103 break;}
2104case 103:
2105#line 1027 "asn1p_y.y"
2106{
2107 yyval.a_expr = asn1p_expr_new(yylineno);
2108 checkmem(yyval.a_expr);
2109 yyval.a_expr->Identifier = strdup("...");
2110 checkmem(yyval.a_expr->Identifier);
2111 yyval.a_expr->value = yyvsp[0].a_value;
2112 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
2113 yyval.a_expr->meta_type = AMT_TYPE;
2114 ;
2115 break;}
2116case 104:
2117#line 1036 "asn1p_y.y"
2118{
2119 yyval.a_expr = asn1p_expr_new(yylineno);
2120 checkmem(yyval.a_expr);
2121 yyval.a_expr->Identifier = strdup("...");
vlm5f0128b2004-08-20 13:25:29 +00002122 yyval.a_expr->value = yyvsp[0].a_value;
2123 checkmem(yyval.a_expr->Identifier);
2124 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
2125 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002126 ;
2127 break;}
vlm0aa86902004-10-12 23:26:53 +00002128case 105:
2129#line 1048 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002130{
vlmec8f6812004-08-22 03:19:54 +00002131 yyval.a_expr = yyvsp[-1].a_expr;
vlmfce48a42004-09-14 02:36:39 +00002132 yyval.a_expr->tag = yyvsp[-2].a_tag;
vlmec8f6812004-08-22 03:19:54 +00002133 /*
2134 * Outer constraint for SEQUENCE OF and SET OF applies
2135 * to the inner type.
2136 */
2137 if(yyval.a_expr->expr_type == ASN_CONSTR_SEQUENCE_OF
2138 || yyval.a_expr->expr_type == ASN_CONSTR_SET_OF) {
2139 assert(!TQ_FIRST(&(yyval.a_expr->members))->constraints);
2140 TQ_FIRST(&(yyval.a_expr->members))->constraints = yyvsp[0].a_constr;
2141 } else {
2142 if(yyval.a_expr->constraints) {
vlmfce48a42004-09-14 02:36:39 +00002143 assert(!yyvsp[-1].a_expr);
vlmec8f6812004-08-22 03:19:54 +00002144 } else {
2145 yyval.a_expr->constraints = yyvsp[0].a_constr;
2146 }
2147 }
vlm6a02a8a2004-09-08 00:28:11 +00002148 ;
2149 break;}
vlm0aa86902004-10-12 23:26:53 +00002150case 106:
2151#line 1070 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002152{
vlm5f0128b2004-08-20 13:25:29 +00002153 yyval.a_expr = yyvsp[0].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00002154 ;
2155 break;}
vlm0aa86902004-10-12 23:26:53 +00002156case 107:
2157#line 1073 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002158{
vlmfa67ddc2004-06-03 03:38:44 +00002159 yyval.a_expr = asn1p_expr_new(yylineno);
2160 checkmem(yyval.a_expr);
2161 yyval.a_expr->expr_type = yyvsp[0].a_type;
2162 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002163 ;
2164 break;}
vlm0aa86902004-10-12 23:26:53 +00002165case 108:
2166#line 1079 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002167{
vlmec8f6812004-08-22 03:19:54 +00002168 yyval.a_expr = yyvsp[-1].a_expr;
2169 assert(yyval.a_expr->expr_type == A1TC_INVALID);
2170 yyval.a_expr->expr_type = ASN_CONSTR_CHOICE;
2171 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002172 ;
2173 break;}
vlm0aa86902004-10-12 23:26:53 +00002174case 109:
2175#line 1085 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002176{
vlmec8f6812004-08-22 03:19:54 +00002177 yyval.a_expr = yyvsp[-1].a_expr;
2178 assert(yyval.a_expr->expr_type == A1TC_INVALID);
2179 yyval.a_expr->expr_type = ASN_CONSTR_SEQUENCE;
2180 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002181 ;
2182 break;}
vlm0aa86902004-10-12 23:26:53 +00002183case 110:
2184#line 1091 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002185{
vlmec8f6812004-08-22 03:19:54 +00002186 yyval.a_expr = yyvsp[-1].a_expr;
2187 assert(yyval.a_expr->expr_type == A1TC_INVALID);
2188 yyval.a_expr->expr_type = ASN_CONSTR_SET;
2189 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002190 ;
2191 break;}
vlm0aa86902004-10-12 23:26:53 +00002192case 111:
2193#line 1097 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002194{
vlm39e5ed72004-09-05 10:40:41 +00002195 yyval.a_expr = asn1p_expr_new(yylineno);
vlmec8f6812004-08-22 03:19:54 +00002196 checkmem(yyval.a_expr);
vlm151c0b22004-09-22 16:03:36 +00002197 yyval.a_expr->constraints = yyvsp[-4].a_constr;
vlmec8f6812004-08-22 03:19:54 +00002198 yyval.a_expr->expr_type = ASN_CONSTR_SEQUENCE_OF;
2199 yyval.a_expr->meta_type = AMT_TYPE;
vlm151c0b22004-09-22 16:03:36 +00002200 yyvsp[0].a_expr->Identifier = yyvsp[-2].tv_str;
vlma2374a02004-09-14 02:44:07 +00002201 yyvsp[0].a_expr->tag = yyvsp[-1].a_tag;
vlm6a02a8a2004-09-08 00:28:11 +00002202 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
2203 ;
2204 break;}
vlm0aa86902004-10-12 23:26:53 +00002205case 112:
2206#line 1107 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002207{
vlm39e5ed72004-09-05 10:40:41 +00002208 yyval.a_expr = asn1p_expr_new(yylineno);
vlmec8f6812004-08-22 03:19:54 +00002209 checkmem(yyval.a_expr);
vlm151c0b22004-09-22 16:03:36 +00002210 yyval.a_expr->constraints = yyvsp[-4].a_constr;
vlmec8f6812004-08-22 03:19:54 +00002211 yyval.a_expr->expr_type = ASN_CONSTR_SET_OF;
2212 yyval.a_expr->meta_type = AMT_TYPE;
vlm151c0b22004-09-22 16:03:36 +00002213 yyvsp[0].a_expr->Identifier = yyvsp[-2].tv_str;
vlma2374a02004-09-14 02:44:07 +00002214 yyvsp[0].a_expr->tag = yyvsp[-1].a_tag;
vlm6a02a8a2004-09-08 00:28:11 +00002215 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
2216 ;
2217 break;}
vlm0aa86902004-10-12 23:26:53 +00002218case 113:
2219#line 1117 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002220{
vlm39e5ed72004-09-05 10:40:41 +00002221 yyval.a_expr = asn1p_expr_new(yylineno);
vlmec8f6812004-08-22 03:19:54 +00002222 checkmem(yyval.a_expr);
vlm044f7442004-09-04 04:49:21 +00002223 yyval.a_expr->expr_type = ASN_TYPE_ANY;
vlmec8f6812004-08-22 03:19:54 +00002224 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002225 ;
2226 break;}
vlm0aa86902004-10-12 23:26:53 +00002227case 114:
2228#line 1123 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002229{
vlmec8f6812004-08-22 03:19:54 +00002230 int ret;
vlm39e5ed72004-09-05 10:40:41 +00002231 yyval.a_expr = asn1p_expr_new(yylineno);
vlmec8f6812004-08-22 03:19:54 +00002232 checkmem(yyval.a_expr);
2233 yyval.a_expr->reference = asn1p_ref_new(yylineno);
2234 ret = asn1p_ref_add_component(yyval.a_expr->reference,
2235 yyvsp[0].tv_str, RLT_lowercase);
2236 checkmem(ret == 0);
vlm044f7442004-09-04 04:49:21 +00002237 yyval.a_expr->expr_type = ASN_TYPE_ANY;
vlmec8f6812004-08-22 03:19:54 +00002238 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002239 ;
2240 break;}
vlm0aa86902004-10-12 23:26:53 +00002241case 115:
2242#line 1137 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002243{
vlmfa67ddc2004-06-03 03:38:44 +00002244 int ret;
2245 yyval.a_expr = yyvsp[-1].a_expr;
2246 assert(yyval.a_expr->expr_type == 0);
2247 assert(yyval.a_expr->meta_type == 0);
2248 assert(yyval.a_expr->reference == 0);
2249 yyval.a_expr->reference = asn1p_ref_new(yylineno);
2250 checkmem(yyval.a_expr->reference);
2251 ret = asn1p_ref_add_component(yyval.a_expr->reference, yyvsp[-3].tv_str, RLT_UNKNOWN);
2252 checkmem(ret == 0);
2253 free(yyvsp[-3].tv_str);
2254 yyval.a_expr->expr_type = A1TC_PARAMETRIZED;
2255 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002256 ;
2257 break;}
vlm0aa86902004-10-12 23:26:53 +00002258case 116:
2259#line 1161 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002260{
vlmfa67ddc2004-06-03 03:38:44 +00002261 yyval.a_expr = asn1p_expr_new(yylineno);
2262 checkmem(yyval.a_expr);
2263 yyval.a_expr->reference = yyvsp[0].a_ref;
2264 yyval.a_expr->expr_type = A1TC_REFERENCE;
2265 yyval.a_expr->meta_type = AMT_TYPEREF;
vlm6a02a8a2004-09-08 00:28:11 +00002266 ;
2267 break;}
vlm0aa86902004-10-12 23:26:53 +00002268case 117:
2269#line 1168 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002270{
vlmfa67ddc2004-06-03 03:38:44 +00002271 yyval.a_expr = asn1p_expr_new(yylineno);
2272 checkmem(yyval.a_expr);
2273 yyval.a_expr->reference = yyvsp[0].a_ref;
2274 yyval.a_expr->expr_type = A1TC_INSTANCE;
2275 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002276 ;
2277 break;}
vlm0aa86902004-10-12 23:26:53 +00002278case 118:
2279#line 1183 "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[0].tv_str, RLT_UNKNOWN);
2285 checkmem(ret == 0);
2286 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002287 ;
2288 break;}
vlm0aa86902004-10-12 23:26:53 +00002289case 119:
2290#line 1191 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002291{
vlmfa67ddc2004-06-03 03:38:44 +00002292 int ret;
2293 yyval.a_ref = asn1p_ref_new(yylineno);
2294 checkmem(yyval.a_ref);
2295 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2296 checkmem(ret == 0);
2297 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN);
2298 checkmem(ret == 0);
2299 free(yyvsp[-2].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002300 ;
2301 break;}
vlm0aa86902004-10-12 23:26:53 +00002302case 120:
2303#line 1201 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002304{
vlmfa67ddc2004-06-03 03:38:44 +00002305 int ret;
2306 yyval.a_ref = asn1p_ref_new(yylineno);
2307 checkmem(yyval.a_ref);
2308 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2309 checkmem(ret == 0);
vlmc94e28f2004-09-15 11:59:51 +00002310 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN);
vlmfa67ddc2004-06-03 03:38:44 +00002311 checkmem(ret == 0);
2312 free(yyvsp[-2].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002313 ;
2314 break;}
vlm0aa86902004-10-12 23:26:53 +00002315case 121:
2316#line 1211 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002317{
vlmfa67ddc2004-06-03 03:38:44 +00002318 int ret;
2319 yyval.a_ref = asn1p_ref_new(yylineno);
2320 checkmem(yyval.a_ref);
vlmc94e28f2004-09-15 11:59:51 +00002321 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2322 checkmem(ret == 0);
2323 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_lowercase);
2324 checkmem(ret == 0);
2325 free(yyvsp[-2].tv_str);
2326 ;
2327 break;}
vlm0aa86902004-10-12 23:26:53 +00002328case 122:
2329#line 1221 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002330{
2331 int ret;
2332 yyval.a_ref = asn1p_ref_new(yylineno);
2333 checkmem(yyval.a_ref);
vlmfa67ddc2004-06-03 03:38:44 +00002334 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_CAPITALS);
2335 free(yyvsp[0].tv_str);
2336 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002337 ;
2338 break;}
vlm0aa86902004-10-12 23:26:53 +00002339case 123:
2340#line 1229 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002341{
vlmfa67ddc2004-06-03 03:38:44 +00002342 int ret;
2343 yyval.a_ref = yyvsp[0].a_ref;
2344 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_CAPITALS);
2345 free(yyvsp[-2].tv_str);
2346 checkmem(ret == 0);
2347 /*
2348 * Move the last element infront.
2349 */
2350 {
2351 struct asn1p_ref_component_s tmp_comp;
2352 tmp_comp = yyval.a_ref->components[yyval.a_ref->comp_count-1];
2353 memmove(&yyval.a_ref->components[1],
2354 &yyval.a_ref->components[0],
2355 sizeof(yyval.a_ref->components[0])
2356 * (yyval.a_ref->comp_count - 1));
2357 yyval.a_ref->components[0] = tmp_comp;
2358 }
vlm6a02a8a2004-09-08 00:28:11 +00002359 ;
2360 break;}
vlm0aa86902004-10-12 23:26:53 +00002361case 124:
2362#line 1251 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002363{
vlmfa67ddc2004-06-03 03:38:44 +00002364 int ret;
2365 yyval.a_ref = asn1p_ref_new(yylineno);
2366 checkmem(yyval.a_ref);
2367 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
2368 free(yyvsp[0].a_refcomp.name);
2369 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002370 ;
2371 break;}
vlm0aa86902004-10-12 23:26:53 +00002372case 125:
2373#line 1259 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002374{
vlmfa67ddc2004-06-03 03:38:44 +00002375 int ret;
2376 yyval.a_ref = yyvsp[-2].a_ref;
2377 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
2378 free(yyvsp[0].a_refcomp.name);
2379 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002380 ;
2381 break;}
vlm0aa86902004-10-12 23:26:53 +00002382case 128:
2383#line 1273 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002384{
vlmfa67ddc2004-06-03 03:38:44 +00002385 yyval.a_refcomp.lex_type = RLT_AmpUppercase;
2386 yyval.a_refcomp.name = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00002387 ;
2388 break;}
vlm0aa86902004-10-12 23:26:53 +00002389case 129:
2390#line 1278 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002391{
vlmfa67ddc2004-06-03 03:38:44 +00002392 yyval.a_refcomp.lex_type = RLT_Amplowercase;
2393 yyval.a_refcomp.name = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00002394 ;
2395 break;}
vlm0aa86902004-10-12 23:26:53 +00002396case 130:
2397#line 1291 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002398{
vlmfa67ddc2004-06-03 03:38:44 +00002399 yyval.a_expr = yyvsp[-2].a_expr;
2400 assert(yyval.a_expr->Identifier == NULL);
2401 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
2402 yyval.a_expr->meta_type = AMT_VALUE;
2403 yyval.a_expr->value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002404 ;
2405 break;}
vlm0aa86902004-10-12 23:26:53 +00002406case 131:
2407#line 1301 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002408{
2409 yyval.a_value = asn1p_value_fromint(0);
2410 checkmem(yyval.a_value);
2411 yyval.a_value->type = ATV_CHOICE_IDENTIFIER;
2412 yyval.a_value->value.choice_identifier.identifier = yyvsp[-2].tv_str;
2413 yyval.a_value->value.choice_identifier.value = yyvsp[0].a_value;
2414 ;
2415 break;}
vlm0aa86902004-10-12 23:26:53 +00002416case 132:
2417#line 1308 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002418{ asn1p_lexer_hack_push_opaque_state(); ;
2419 break;}
vlm0aa86902004-10-12 23:26:53 +00002420case 133:
2421#line 1308 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002422{
vlmfa67ddc2004-06-03 03:38:44 +00002423 yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
2424 checkmem(yyval.a_value);
2425 yyval.a_value->type = ATV_UNPARSED;
vlm6a02a8a2004-09-08 00:28:11 +00002426 ;
2427 break;}
vlm0aa86902004-10-12 23:26:53 +00002428case 134:
2429#line 1313 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002430{
2431 yyval.a_value = asn1p_value_fromint(0);
2432 checkmem(yyval.a_value);
2433 yyval.a_value->type = ATV_NULL;
2434 ;
2435 break;}
vlm0aa86902004-10-12 23:26:53 +00002436case 135:
2437#line 1318 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002438{
2439 yyval.a_value = asn1p_value_fromint(0);
2440 checkmem(yyval.a_value);
2441 yyval.a_value->type = ATV_FALSE;
2442 ;
2443 break;}
vlm0aa86902004-10-12 23:26:53 +00002444case 136:
2445#line 1323 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002446{
2447 yyval.a_value = asn1p_value_fromint(0);
2448 checkmem(yyval.a_value);
2449 yyval.a_value->type = ATV_TRUE;
2450 ;
2451 break;}
vlm0aa86902004-10-12 23:26:53 +00002452case 137:
2453#line 1328 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002454{
vlmfa67ddc2004-06-03 03:38:44 +00002455 yyval.a_value = _convert_bitstring2binary(yyvsp[0].tv_str, 'B');
2456 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00002457 ;
2458 break;}
vlm0aa86902004-10-12 23:26:53 +00002459case 138:
2460#line 1332 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002461{
vlmfa67ddc2004-06-03 03:38:44 +00002462 yyval.a_value = _convert_bitstring2binary(yyvsp[0].tv_str, 'H');
2463 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00002464 ;
2465 break;}
vlm0aa86902004-10-12 23:26:53 +00002466case 139:
2467#line 1336 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002468{
vlmfa67ddc2004-06-03 03:38:44 +00002469 yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
2470 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00002471 ;
2472 break;}
vlm0aa86902004-10-12 23:26:53 +00002473case 140:
2474#line 1340 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002475{
vlm5f0128b2004-08-20 13:25:29 +00002476 yyval.a_value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002477 ;
2478 break;}
vlm0aa86902004-10-12 23:26:53 +00002479case 141:
2480#line 1343 "asn1p_y.y"
vlm151c0b22004-09-22 16:03:36 +00002481{
2482 yyval.a_value = yyvsp[0].a_value;
2483 ;
2484 break;}
vlm0aa86902004-10-12 23:26:53 +00002485case 142:
2486#line 1349 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002487{
vlmfa67ddc2004-06-03 03:38:44 +00002488 asn1p_ref_t *ref;
2489 int ret;
2490 ref = asn1p_ref_new(yylineno);
2491 checkmem(ref);
2492 ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
2493 checkmem(ret == 0);
2494 yyval.a_value = asn1p_value_fromref(ref, 0);
2495 checkmem(yyval.a_value);
2496 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002497 ;
2498 break;}
vlm0aa86902004-10-12 23:26:53 +00002499case 143:
2500#line 1360 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002501{
vlmfa67ddc2004-06-03 03:38:44 +00002502 asn1p_ref_t *ref;
2503 int ret;
2504 ref = asn1p_ref_new(yylineno);
2505 checkmem(ref);
2506 ret = asn1p_ref_add_component(ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2507 checkmem(ret == 0);
2508 ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
2509 checkmem(ret == 0);
2510 yyval.a_value = asn1p_value_fromref(ref, 0);
2511 checkmem(yyval.a_value);
2512 free(yyvsp[-2].tv_str);
2513 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002514 ;
2515 break;}
vlm0aa86902004-10-12 23:26:53 +00002516case 144:
2517#line 1377 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002518{
vlmfa67ddc2004-06-03 03:38:44 +00002519 yyval.tv_opaque.len = yyvsp[0].tv_opaque.len + 2;
2520 yyval.tv_opaque.buf = malloc(yyval.tv_opaque.len + 1);
2521 checkmem(yyval.tv_opaque.buf);
2522 yyval.tv_opaque.buf[0] = '{';
2523 yyval.tv_opaque.buf[1] = ' ';
2524 memcpy(yyval.tv_opaque.buf + 2, yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len);
2525 yyval.tv_opaque.buf[yyval.tv_opaque.len] = '\0';
2526 free(yyvsp[0].tv_opaque.buf);
vlm6a02a8a2004-09-08 00:28:11 +00002527 ;
2528 break;}
vlm0aa86902004-10-12 23:26:53 +00002529case 145:
2530#line 1387 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002531{
vlmfa67ddc2004-06-03 03:38:44 +00002532 int newsize = yyvsp[-1].tv_opaque.len + yyvsp[0].tv_opaque.len;
2533 char *p = malloc(newsize + 1);
2534 checkmem(p);
2535 memcpy(p , yyvsp[-1].tv_opaque.buf, yyvsp[-1].tv_opaque.len);
2536 memcpy(p + yyvsp[-1].tv_opaque.len, yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len);
2537 p[newsize] = '\0';
2538 free(yyvsp[-1].tv_opaque.buf);
2539 free(yyvsp[0].tv_opaque.buf);
2540 yyval.tv_opaque.buf = p;
2541 yyval.tv_opaque.len = newsize;
vlm6a02a8a2004-09-08 00:28:11 +00002542 ;
2543 break;}
vlm0aa86902004-10-12 23:26:53 +00002544case 146:
2545#line 1402 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002546{ yyval.a_type = ASN_BASIC_BOOLEAN; ;
2547 break;}
vlm0aa86902004-10-12 23:26:53 +00002548case 147:
2549#line 1403 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002550{ yyval.a_type = ASN_BASIC_NULL; ;
2551 break;}
vlm0aa86902004-10-12 23:26:53 +00002552case 148:
2553#line 1404 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002554{ yyval.a_type = ASN_BASIC_REAL; ;
2555 break;}
vlm0aa86902004-10-12 23:26:53 +00002556case 149:
2557#line 1405 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002558{ yyval.a_type = yyvsp[0].a_type; ;
2559 break;}
vlm0aa86902004-10-12 23:26:53 +00002560case 150:
2561#line 1406 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002562{ yyval.a_type = ASN_BASIC_OCTET_STRING; ;
2563 break;}
vlm0aa86902004-10-12 23:26:53 +00002564case 151:
2565#line 1407 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002566{ yyval.a_type = ASN_BASIC_OBJECT_IDENTIFIER; ;
2567 break;}
vlm0aa86902004-10-12 23:26:53 +00002568case 152:
2569#line 1408 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002570{ yyval.a_type = ASN_BASIC_RELATIVE_OID; ;
2571 break;}
vlm0aa86902004-10-12 23:26:53 +00002572case 153:
2573#line 1409 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002574{ yyval.a_type = ASN_BASIC_EXTERNAL; ;
2575 break;}
vlm0aa86902004-10-12 23:26:53 +00002576case 154:
2577#line 1410 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002578{ yyval.a_type = ASN_BASIC_EMBEDDED_PDV; ;
2579 break;}
vlm0aa86902004-10-12 23:26:53 +00002580case 155:
2581#line 1411 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002582{ yyval.a_type = ASN_BASIC_CHARACTER_STRING; ;
2583 break;}
vlm0aa86902004-10-12 23:26:53 +00002584case 156:
2585#line 1412 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002586{ yyval.a_type = ASN_BASIC_UTCTime; ;
2587 break;}
vlm0aa86902004-10-12 23:26:53 +00002588case 157:
2589#line 1413 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002590{ yyval.a_type = ASN_BASIC_GeneralizedTime; ;
2591 break;}
vlm0aa86902004-10-12 23:26:53 +00002592case 158:
2593#line 1420 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002594{ yyval.a_type = ASN_BASIC_INTEGER; ;
2595 break;}
vlm0aa86902004-10-12 23:26:53 +00002596case 159:
2597#line 1421 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002598{ yyval.a_type = ASN_BASIC_ENUMERATED; ;
2599 break;}
vlm0aa86902004-10-12 23:26:53 +00002600case 160:
2601#line 1422 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002602{ yyval.a_type = ASN_BASIC_BIT_STRING; ;
2603 break;}
vlm0aa86902004-10-12 23:26:53 +00002604case 161:
2605#line 1426 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002606{
vlm39e5ed72004-09-05 10:40:41 +00002607 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00002608 checkmem(yyval.a_expr);
2609 yyval.a_expr->expr_type = yyvsp[0].a_type;
2610 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002611 ;
2612 break;}
vlm0aa86902004-10-12 23:26:53 +00002613case 162:
2614#line 1432 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002615{
vlmfa67ddc2004-06-03 03:38:44 +00002616 if(yyvsp[0].a_expr) {
2617 yyval.a_expr = yyvsp[0].a_expr;
2618 } else {
vlm39e5ed72004-09-05 10:40:41 +00002619 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00002620 checkmem(yyval.a_expr);
2621 }
2622 yyval.a_expr->expr_type = yyvsp[-1].a_type;
2623 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002624 ;
2625 break;}
vlm0aa86902004-10-12 23:26:53 +00002626case 163:
2627#line 1445 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002628{ yyval.a_type = ASN_STRING_BMPString; ;
2629 break;}
vlm0aa86902004-10-12 23:26:53 +00002630case 164:
2631#line 1446 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002632{
vlmfa67ddc2004-06-03 03:38:44 +00002633 yyval.a_type = ASN_STRING_GeneralString;
vlmc94e28f2004-09-15 11:59:51 +00002634 fprintf(stderr, "WARNING: GeneralString is not fully supported\n");
vlm6a02a8a2004-09-08 00:28:11 +00002635 ;
2636 break;}
vlm0aa86902004-10-12 23:26:53 +00002637case 165:
2638#line 1450 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002639{
vlmc94e28f2004-09-15 11:59:51 +00002640 yyval.a_type = ASN_STRING_GraphicString;
2641 fprintf(stderr, "WARNING: GraphicString is not fully supported\n");
vlm6a02a8a2004-09-08 00:28:11 +00002642 ;
2643 break;}
vlm0aa86902004-10-12 23:26:53 +00002644case 166:
2645#line 1454 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002646{ yyval.a_type = ASN_STRING_IA5String; ;
vlm6a02a8a2004-09-08 00:28:11 +00002647 break;}
vlm0aa86902004-10-12 23:26:53 +00002648case 167:
2649#line 1455 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002650{ yyval.a_type = ASN_STRING_ISO646String; ;
vlm6a02a8a2004-09-08 00:28:11 +00002651 break;}
vlm0aa86902004-10-12 23:26:53 +00002652case 168:
2653#line 1456 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002654{ yyval.a_type = ASN_STRING_NumericString; ;
vlm6a02a8a2004-09-08 00:28:11 +00002655 break;}
vlm0aa86902004-10-12 23:26:53 +00002656case 169:
2657#line 1457 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002658{ yyval.a_type = ASN_STRING_PrintableString; ;
vlm6a02a8a2004-09-08 00:28:11 +00002659 break;}
vlm0aa86902004-10-12 23:26:53 +00002660case 170:
2661#line 1458 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002662{
2663 yyval.a_type = ASN_STRING_T61String;
2664 fprintf(stderr, "WARNING: T61String is not fully supported\n");
2665 ;
vlm6a02a8a2004-09-08 00:28:11 +00002666 break;}
vlm0aa86902004-10-12 23:26:53 +00002667case 171:
2668#line 1462 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002669{ yyval.a_type = ASN_STRING_TeletexString; ;
2670 break;}
vlm0aa86902004-10-12 23:26:53 +00002671case 172:
2672#line 1463 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002673{ yyval.a_type = ASN_STRING_UniversalString; ;
2674 break;}
vlm0aa86902004-10-12 23:26:53 +00002675case 173:
2676#line 1464 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002677{ yyval.a_type = ASN_STRING_UTF8String; ;
2678 break;}
vlm0aa86902004-10-12 23:26:53 +00002679case 174:
2680#line 1465 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002681{
2682 yyval.a_type = ASN_STRING_VideotexString;
2683 fprintf(stderr, "WARNING: VideotexString is not fully supported\n");
2684 ;
2685 break;}
vlm0aa86902004-10-12 23:26:53 +00002686case 175:
2687#line 1469 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002688{ yyval.a_type = ASN_STRING_VisibleString; ;
2689 break;}
vlm0aa86902004-10-12 23:26:53 +00002690case 176:
2691#line 1470 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002692{ yyval.a_type = ASN_STRING_ObjectDescriptor; ;
2693 break;}
vlm0aa86902004-10-12 23:26:53 +00002694case 182:
2695#line 1482 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002696{ yyval.a_constr = 0; ;
2697 break;}
vlm0aa86902004-10-12 23:26:53 +00002698case 183:
2699#line 1483 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002700{
vlm39e5ed72004-09-05 10:40:41 +00002701 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002702 ;
2703 break;}
vlm0aa86902004-10-12 23:26:53 +00002704case 184:
2705#line 1489 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002706{
vlm39e5ed72004-09-05 10:40:41 +00002707 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_SET, yyvsp[0].a_constr, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002708 ;
2709 break;}
vlm0aa86902004-10-12 23:26:53 +00002710case 185:
2711#line 1492 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002712{
vlmfa67ddc2004-06-03 03:38:44 +00002713 /*
2714 * This is a special case, for compatibility purposes.
vlm9283dbe2004-08-18 04:59:12 +00002715 * It goes without parentheses.
vlmfa67ddc2004-06-03 03:38:44 +00002716 */
vlm5f0128b2004-08-20 13:25:29 +00002717 CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_SIZE, yyvsp[-1].a_constr, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002718 ;
2719 break;}
vlm0aa86902004-10-12 23:26:53 +00002720case 186:
2721#line 1502 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002722{
vlmfa67ddc2004-06-03 03:38:44 +00002723 yyval.a_constr = yyvsp[-1].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002724 ;
2725 break;}
vlm0aa86902004-10-12 23:26:53 +00002726case 187:
2727#line 1505 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002728{
vlm9283dbe2004-08-18 04:59:12 +00002729 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_SET, yyvsp[-3].a_constr, yyvsp[-1].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002730 ;
2731 break;}
vlm0aa86902004-10-12 23:26:53 +00002732case 188:
2733#line 1511 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002734{
vlmfa67ddc2004-06-03 03:38:44 +00002735 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002736 ;
2737 break;}
vlm0aa86902004-10-12 23:26:53 +00002738case 189:
2739#line 1514 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002740{
vlmfa67ddc2004-06-03 03:38:44 +00002741 asn1p_constraint_t *ct;
2742 ct = asn1p_constraint_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00002743 ct->type = ACT_EL_EXT;
2744 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-2].a_constr, ct);
vlm6a02a8a2004-09-08 00:28:11 +00002745 ;
2746 break;}
vlm0aa86902004-10-12 23:26:53 +00002747case 190:
2748#line 1520 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002749{
vlmfa67ddc2004-06-03 03:38:44 +00002750 asn1p_constraint_t *ct;
2751 ct = asn1p_constraint_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00002752 ct->type = ACT_EL_EXT;
2753 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-4].a_constr, ct);
vlm6f5eb0b2004-08-13 12:35:09 +00002754 ct = yyval.a_constr;
2755 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, ct, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002756 ;
2757 break;}
vlm0aa86902004-10-12 23:26:53 +00002758case 191:
2759#line 1531 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002760{
vlm9283dbe2004-08-18 04:59:12 +00002761 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002762 ;
2763 break;}
vlm0aa86902004-10-12 23:26:53 +00002764case 192:
2765#line 1534 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002766{
vlmfa67ddc2004-06-03 03:38:44 +00002767 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_UNI, yyvsp[-2].a_constr, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002768 ;
2769 break;}
vlm0aa86902004-10-12 23:26:53 +00002770case 193:
2771#line 1537 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002772{
vlmfa67ddc2004-06-03 03:38:44 +00002773 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_INT, yyvsp[-2].a_constr, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002774 ;
2775 break;}
vlm0aa86902004-10-12 23:26:53 +00002776case 194:
2777#line 1540 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002778{
vlmfa67ddc2004-06-03 03:38:44 +00002779 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_EXC, yyvsp[-2].a_constr, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002780 ;
2781 break;}
vlm0aa86902004-10-12 23:26:53 +00002782case 195:
2783#line 1546 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002784{
vlmfa67ddc2004-06-03 03:38:44 +00002785 int ret;
2786 yyval.a_constr = asn1p_constraint_new(yylineno);
2787 checkmem(yyval.a_constr);
2788 yyval.a_constr->type = yyvsp[-3].a_ctype;
2789 ret = asn1p_constraint_insert(yyval.a_constr, yyvsp[-1].a_constr);
2790 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002791 ;
2792 break;}
vlm0aa86902004-10-12 23:26:53 +00002793case 196:
2794#line 1554 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002795{
vlm9283dbe2004-08-18 04:59:12 +00002796 int ret;
2797 yyval.a_constr = asn1p_constraint_new(yylineno);
2798 checkmem(yyval.a_constr);
2799 yyval.a_constr->type = ACT_CA_SET;
2800 ret = asn1p_constraint_insert(yyval.a_constr, yyvsp[-1].a_constr);
2801 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002802 ;
2803 break;}
vlm0aa86902004-10-12 23:26:53 +00002804case 197:
2805#line 1562 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002806{
vlm9283dbe2004-08-18 04:59:12 +00002807 yyval.a_constr = asn1p_constraint_new(yylineno);
2808 checkmem(yyval.a_constr);
2809 yyval.a_constr->type = ACT_EL_VALUE;
2810 yyval.a_constr->value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002811 ;
2812 break;}
vlm6a02a8a2004-09-08 00:28:11 +00002813case 198:
vlm0aa86902004-10-12 23:26:53 +00002814#line 1568 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002815{
vlm0aa86902004-10-12 23:26:53 +00002816 yyval.a_constr = asn1p_constraint_new(yylineno);
2817 checkmem(yyval.a_constr);
2818 yyval.a_constr->type = yyvsp[-1].a_ctype;
2819 yyval.a_constr->range_start = yyvsp[-2].a_value;
2820 yyval.a_constr->range_stop = yyvsp[0].a_value;
vlmc94e28f2004-09-15 11:59:51 +00002821 ;
2822 break;}
vlm151c0b22004-09-22 16:03:36 +00002823case 199:
vlm0aa86902004-10-12 23:26:53 +00002824#line 1575 "asn1p_y.y"
2825{
2826 yyval.a_constr = asn1p_constraint_new(yylineno);
2827 checkmem(yyval.a_constr);
2828 yyval.a_constr->type = yyvsp[-1].a_ctype;
2829 yyval.a_constr->range_start = asn1p_value_fromint(-123);
2830 yyval.a_constr->range_stop = yyvsp[0].a_value;
2831 yyval.a_constr->range_start->type = ATV_MIN;
2832 ;
2833 break;}
2834case 200:
2835#line 1583 "asn1p_y.y"
2836{
2837 yyval.a_constr = asn1p_constraint_new(yylineno);
2838 checkmem(yyval.a_constr);
2839 yyval.a_constr->type = yyvsp[-1].a_ctype;
2840 yyval.a_constr->range_start = yyvsp[-2].a_value;
2841 yyval.a_constr->range_stop = asn1p_value_fromint(321);
2842 yyval.a_constr->range_stop->type = ATV_MAX;
2843 ;
2844 break;}
2845case 201:
2846#line 1591 "asn1p_y.y"
2847{
2848 yyval.a_constr = asn1p_constraint_new(yylineno);
2849 checkmem(yyval.a_constr);
2850 yyval.a_constr->type = yyvsp[-1].a_ctype;
2851 yyval.a_constr->range_start = asn1p_value_fromint(-123);
2852 yyval.a_constr->range_stop = asn1p_value_fromint(321);
2853 yyval.a_constr->range_start->type = ATV_MIN;
2854 yyval.a_constr->range_stop->type = ATV_MAX;
2855 ;
2856 break;}
2857case 202:
2858#line 1600 "asn1p_y.y"
vlm151c0b22004-09-22 16:03:36 +00002859{
2860 yyval.a_constr = yyvsp[0].a_constr;
2861 ;
2862 break;}
vlmc94e28f2004-09-15 11:59:51 +00002863case 203:
vlm0aa86902004-10-12 23:26:53 +00002864#line 1603 "asn1p_y.y"
2865{
2866 yyval.a_constr = yyvsp[0].a_constr;
2867 ;
vlmc94e28f2004-09-15 11:59:51 +00002868 break;}
2869case 204:
vlm0aa86902004-10-12 23:26:53 +00002870#line 1609 "asn1p_y.y"
2871{ yyval.a_ctype = ACT_EL_RANGE; ;
2872 break;}
2873case 205:
2874#line 1610 "asn1p_y.y"
2875{ yyval.a_ctype = ACT_EL_RLRANGE; ;
2876 break;}
2877case 206:
2878#line 1611 "asn1p_y.y"
2879{ yyval.a_ctype = ACT_EL_LLRANGE; ;
2880 break;}
2881case 207:
2882#line 1612 "asn1p_y.y"
2883{ yyval.a_ctype = ACT_EL_ULRANGE; ;
2884 break;}
2885case 208:
2886#line 1616 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002887{
vlm39e5ed72004-09-05 10:40:41 +00002888 yyval.a_ctype = ACT_CT_SIZE;
vlm6a02a8a2004-09-08 00:28:11 +00002889 ;
2890 break;}
vlm0aa86902004-10-12 23:26:53 +00002891case 209:
2892#line 1619 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002893{
vlm39e5ed72004-09-05 10:40:41 +00002894 yyval.a_ctype = ACT_CT_FROM;
vlm6a02a8a2004-09-08 00:28:11 +00002895 ;
2896 break;}
vlm0aa86902004-10-12 23:26:53 +00002897case 210:
2898#line 1625 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002899{
vlmfa67ddc2004-06-03 03:38:44 +00002900 yyval.a_value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002901 ;
2902 break;}
vlm0aa86902004-10-12 23:26:53 +00002903case 211:
2904#line 1628 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002905{
vlmfa67ddc2004-06-03 03:38:44 +00002906 asn1p_ref_t *ref;
2907 int ret;
2908 ref = asn1p_ref_new(yylineno);
2909 checkmem(ref);
2910 ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
2911 checkmem(ret == 0);
2912 yyval.a_value = asn1p_value_fromref(ref, 0);
2913 checkmem(yyval.a_value);
2914 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002915 ;
2916 break;}
vlm0aa86902004-10-12 23:26:53 +00002917case 212:
2918#line 1639 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002919{
vlmfa67ddc2004-06-03 03:38:44 +00002920 yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
2921 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00002922 ;
2923 break;}
vlm0aa86902004-10-12 23:26:53 +00002924case 213:
2925#line 1643 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002926{
vlmfa67ddc2004-06-03 03:38:44 +00002927 yyval.a_value = asn1p_value_fromint(0);
2928 checkmem(yyval.a_value);
2929 yyval.a_value->type = ATV_FALSE;
vlm6a02a8a2004-09-08 00:28:11 +00002930 ;
2931 break;}
vlm0aa86902004-10-12 23:26:53 +00002932case 214:
2933#line 1648 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002934{
vlmfa67ddc2004-06-03 03:38:44 +00002935 yyval.a_value = asn1p_value_fromint(1);
2936 checkmem(yyval.a_value);
2937 yyval.a_value->type = ATV_TRUE;
vlm6a02a8a2004-09-08 00:28:11 +00002938 ;
2939 break;}
vlm0aa86902004-10-12 23:26:53 +00002940case 215:
2941#line 1656 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002942{
vlmfa67ddc2004-06-03 03:38:44 +00002943 CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_WCOMPS, yyvsp[-1].a_constr, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002944 ;
2945 break;}
vlm0aa86902004-10-12 23:26:53 +00002946case 216:
2947#line 1662 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002948{
vlmfa67ddc2004-06-03 03:38:44 +00002949 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002950 ;
2951 break;}
vlm0aa86902004-10-12 23:26:53 +00002952case 217:
2953#line 1665 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002954{
vlmfa67ddc2004-06-03 03:38:44 +00002955 CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_WCOMPS, yyvsp[-2].a_constr, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002956 ;
2957 break;}
vlm0aa86902004-10-12 23:26:53 +00002958case 218:
2959#line 1671 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002960{
vlmfa67ddc2004-06-03 03:38:44 +00002961 yyval.a_constr = asn1p_constraint_new(yylineno);
2962 checkmem(yyval.a_constr);
2963 yyval.a_constr->type = ACT_EL_EXT;
vlm6a02a8a2004-09-08 00:28:11 +00002964 ;
2965 break;}
vlm0aa86902004-10-12 23:26:53 +00002966case 219:
2967#line 1676 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002968{
vlmfa67ddc2004-06-03 03:38:44 +00002969 yyval.a_constr = asn1p_constraint_new(yylineno);
2970 checkmem(yyval.a_constr);
2971 yyval.a_constr->type = ACT_EL_VALUE;
2972 yyval.a_constr->value = asn1p_value_frombuf(yyvsp[-2].tv_str, strlen(yyvsp[-2].tv_str), 0);
2973 yyval.a_constr->presence = yyvsp[0].a_pres;
vlm6a02a8a2004-09-08 00:28:11 +00002974 ;
2975 break;}
vlm0aa86902004-10-12 23:26:53 +00002976case 220:
2977#line 1689 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002978{ yyval.a_pres = ACPRES_DEFAULT; ;
2979 break;}
vlm0aa86902004-10-12 23:26:53 +00002980case 221:
2981#line 1690 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002982{ yyval.a_pres = yyvsp[0].a_pres; ;
2983 break;}
vlm0aa86902004-10-12 23:26:53 +00002984case 222:
2985#line 1694 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002986{
vlmfa67ddc2004-06-03 03:38:44 +00002987 yyval.a_pres = ACPRES_PRESENT;
vlm6a02a8a2004-09-08 00:28:11 +00002988 ;
2989 break;}
vlm0aa86902004-10-12 23:26:53 +00002990case 223:
2991#line 1697 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002992{
vlmfa67ddc2004-06-03 03:38:44 +00002993 yyval.a_pres = ACPRES_ABSENT;
vlm6a02a8a2004-09-08 00:28:11 +00002994 ;
2995 break;}
vlm0aa86902004-10-12 23:26:53 +00002996case 224:
2997#line 1700 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002998{
vlmfa67ddc2004-06-03 03:38:44 +00002999 yyval.a_pres = ACPRES_OPTIONAL;
vlm6a02a8a2004-09-08 00:28:11 +00003000 ;
3001 break;}
vlm0aa86902004-10-12 23:26:53 +00003002case 225:
3003#line 1706 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003004{
vlm5f0128b2004-08-20 13:25:29 +00003005 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00003006 ;
3007 break;}
vlm0aa86902004-10-12 23:26:53 +00003008case 226:
3009#line 1709 "asn1p_y.y"
vlm151c0b22004-09-22 16:03:36 +00003010{
3011 yyval.a_constr = yyvsp[0].a_constr;
3012 ;
3013 break;}
vlm0aa86902004-10-12 23:26:53 +00003014case 227:
3015#line 1718 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003016{
vlmfa67ddc2004-06-03 03:38:44 +00003017 asn1p_ref_t *ref = asn1p_ref_new(yylineno);
3018 asn1p_constraint_t *ct;
3019 int ret;
3020 ret = asn1p_ref_add_component(ref, yyvsp[-1].tv_str, 0);
3021 checkmem(ret == 0);
3022 ct = asn1p_constraint_new(yylineno);
3023 checkmem(yyval.a_constr);
3024 ct->type = ACT_EL_VALUE;
3025 ct->value = asn1p_value_fromref(ref, 0);
3026 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CRC, ct, 0);
vlm6a02a8a2004-09-08 00:28:11 +00003027 ;
3028 break;}
vlm0aa86902004-10-12 23:26:53 +00003029case 228:
3030#line 1733 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003031{
vlmfa67ddc2004-06-03 03:38:44 +00003032 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CRC, yyvsp[-3].a_constr, yyvsp[-1].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00003033 ;
3034 break;}
vlm0aa86902004-10-12 23:26:53 +00003035case 229:
3036#line 1739 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003037{
vlmfa67ddc2004-06-03 03:38:44 +00003038 yyval.a_constr = asn1p_constraint_new(yylineno);
3039 checkmem(yyval.a_constr);
3040 yyval.a_constr->type = ACT_EL_VALUE;
3041 yyval.a_constr->value = asn1p_value_fromref(yyvsp[0].a_ref, 0);
vlm6a02a8a2004-09-08 00:28:11 +00003042 ;
3043 break;}
vlm0aa86902004-10-12 23:26:53 +00003044case 230:
3045#line 1745 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003046{
vlmfa67ddc2004-06-03 03:38:44 +00003047 asn1p_constraint_t *ct;
3048 ct = asn1p_constraint_new(yylineno);
3049 checkmem(ct);
3050 ct->type = ACT_EL_VALUE;
3051 ct->value = asn1p_value_fromref(yyvsp[0].a_ref, 0);
3052 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-2].a_constr, ct);
vlm6a02a8a2004-09-08 00:28:11 +00003053 ;
3054 break;}
vlm0aa86902004-10-12 23:26:53 +00003055case 231:
3056#line 1759 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003057{
vlmfa67ddc2004-06-03 03:38:44 +00003058 char *p = malloc(strlen(yyvsp[0].tv_str) + 2);
3059 int ret;
3060 *p = '@';
3061 strcpy(p + 1, yyvsp[0].tv_str);
3062 yyval.a_ref = asn1p_ref_new(yylineno);
3063 ret = asn1p_ref_add_component(yyval.a_ref, p, 0);
3064 checkmem(ret == 0);
3065 free(p);
3066 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00003067 ;
3068 break;}
vlm0aa86902004-10-12 23:26:53 +00003069case 232:
3070#line 1770 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003071{
vlmfa67ddc2004-06-03 03:38:44 +00003072 char *p = malloc(strlen(yyvsp[0].tv_str) + 3);
3073 int ret;
3074 p[0] = '@';
3075 p[1] = '.';
3076 strcpy(p + 2, yyvsp[0].tv_str);
3077 yyval.a_ref = asn1p_ref_new(yylineno);
3078 ret = asn1p_ref_add_component(yyval.a_ref, p, 0);
3079 checkmem(ret == 0);
3080 free(p);
3081 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00003082 ;
3083 break;}
vlm0aa86902004-10-12 23:26:53 +00003084case 233:
3085#line 1786 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003086{
vlmfa67ddc2004-06-03 03:38:44 +00003087 yyval.tv_str = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003088 ;
3089 break;}
vlm0aa86902004-10-12 23:26:53 +00003090case 234:
3091#line 1789 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003092{
vlmfa67ddc2004-06-03 03:38:44 +00003093 int l1 = strlen(yyvsp[-2].tv_str);
3094 int l3 = strlen(yyvsp[0].tv_str);
3095 yyval.tv_str = malloc(l1 + 1 + l3 + 1);
3096 memcpy(yyval.tv_str, yyvsp[-2].tv_str, l1);
3097 yyval.tv_str[l1] = '.';
3098 memcpy(yyval.tv_str + l1 + 1, yyvsp[0].tv_str, l3);
3099 yyval.tv_str[l1 + 1 + l3] = '\0';
vlm6a02a8a2004-09-08 00:28:11 +00003100 ;
3101 break;}
vlm0aa86902004-10-12 23:26:53 +00003102case 235:
3103#line 1807 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003104{
vlmc94e28f2004-09-15 11:59:51 +00003105 yyval.a_marker.flags = EM_NOMARK;
3106 yyval.a_marker.default_value = 0;
vlm6a02a8a2004-09-08 00:28:11 +00003107 ;
3108 break;}
vlm0aa86902004-10-12 23:26:53 +00003109case 236:
3110#line 1811 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00003111{ yyval.a_marker = yyvsp[0].a_marker; ;
vlma2374a02004-09-14 02:44:07 +00003112 break;}
vlm0aa86902004-10-12 23:26:53 +00003113case 237:
3114#line 1815 "asn1p_y.y"
vlma2374a02004-09-14 02:44:07 +00003115{
vlmc94e28f2004-09-15 11:59:51 +00003116 yyval.a_marker.flags = EM_OPTIONAL;
3117 yyval.a_marker.default_value = 0;
vlma2374a02004-09-14 02:44:07 +00003118 ;
3119 break;}
vlm0aa86902004-10-12 23:26:53 +00003120case 238:
3121#line 1819 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00003122{
3123 yyval.a_marker.flags = EM_DEFAULT;
3124 yyval.a_marker.default_value = yyvsp[0].a_value;
3125 ;
3126 break;}
vlm0aa86902004-10-12 23:26:53 +00003127case 239:
3128#line 1842 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003129{
vlm39e5ed72004-09-05 10:40:41 +00003130 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003131 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00003132 ;
3133 break;}
vlm0aa86902004-10-12 23:26:53 +00003134case 240:
3135#line 1846 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003136{
vlmfa67ddc2004-06-03 03:38:44 +00003137 yyval.a_expr = yyvsp[-1].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00003138 ;
3139 break;}
vlm0aa86902004-10-12 23:26:53 +00003140case 241:
3141#line 1852 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003142{
vlm39e5ed72004-09-05 10:40:41 +00003143 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003144 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00003145 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
3146 ;
3147 break;}
vlm0aa86902004-10-12 23:26:53 +00003148case 242:
3149#line 1857 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003150{
vlmfa67ddc2004-06-03 03:38:44 +00003151 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00003152 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
3153 ;
3154 break;}
vlm0aa86902004-10-12 23:26:53 +00003155case 243:
3156#line 1864 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003157{
vlm39e5ed72004-09-05 10:40:41 +00003158 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003159 checkmem(yyval.a_expr);
3160 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3161 yyval.a_expr->meta_type = AMT_VALUE;
3162 yyval.a_expr->Identifier = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003163 ;
3164 break;}
vlm0aa86902004-10-12 23:26:53 +00003165case 244:
3166#line 1871 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003167{
vlm39e5ed72004-09-05 10:40:41 +00003168 yyval.a_expr = asn1p_expr_new(yylineno);
vlm5f0128b2004-08-20 13:25:29 +00003169 checkmem(yyval.a_expr);
3170 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3171 yyval.a_expr->meta_type = AMT_VALUE;
3172 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
3173 yyval.a_expr->value = yyvsp[-1].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00003174 ;
3175 break;}
vlm0aa86902004-10-12 23:26:53 +00003176case 245:
3177#line 1879 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00003178{
3179 yyval.a_expr = asn1p_expr_new(yylineno);
3180 checkmem(yyval.a_expr);
3181 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3182 yyval.a_expr->meta_type = AMT_VALUE;
3183 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
3184 yyval.a_expr->value = yyvsp[-1].a_value;
3185 ;
3186 break;}
vlm0aa86902004-10-12 23:26:53 +00003187case 246:
3188#line 1887 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003189{
vlm39e5ed72004-09-05 10:40:41 +00003190 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003191 checkmem(yyval.a_expr);
3192 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3193 yyval.a_expr->meta_type = AMT_VALUE;
3194 yyval.a_expr->value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00003195 ;
3196 break;}
vlm0aa86902004-10-12 23:26:53 +00003197case 247:
3198#line 1894 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003199{
vlm39e5ed72004-09-05 10:40:41 +00003200 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003201 checkmem(yyval.a_expr);
3202 yyval.a_expr->Identifier = strdup("...");
3203 checkmem(yyval.a_expr->Identifier);
3204 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
3205 yyval.a_expr->meta_type = AMT_VALUE;
vlm6a02a8a2004-09-08 00:28:11 +00003206 ;
3207 break;}
vlm0aa86902004-10-12 23:26:53 +00003208case 248:
3209#line 1905 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003210{
vlmec8f6812004-08-22 03:19:54 +00003211 yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int);
3212 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00003213 ;
3214 break;}
vlm0aa86902004-10-12 23:26:53 +00003215case 249:
3216#line 1909 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00003217{
3218 yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int);
3219 checkmem(yyval.a_value);
3220 ;
vlm6a02a8a2004-09-08 00:28:11 +00003221 break;}
vlm0aa86902004-10-12 23:26:53 +00003222case 250:
3223#line 1940 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00003224{ memset(&yyval.a_tag, 0, sizeof(yyval.a_tag)); ;
vlm6a02a8a2004-09-08 00:28:11 +00003225 break;}
vlm0aa86902004-10-12 23:26:53 +00003226case 251:
3227#line 1941 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00003228{ yyval.a_tag = yyvsp[0].a_tag; ;
3229 break;}
vlm0aa86902004-10-12 23:26:53 +00003230case 252:
3231#line 1945 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003232{
vlmfa67ddc2004-06-03 03:38:44 +00003233 yyval.a_tag = yyvsp[0].a_tag;
3234 yyval.a_tag.tag_mode = TM_DEFAULT;
vlm6a02a8a2004-09-08 00:28:11 +00003235 ;
3236 break;}
vlm0aa86902004-10-12 23:26:53 +00003237case 253:
3238#line 1949 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003239{
vlmfa67ddc2004-06-03 03:38:44 +00003240 yyval.a_tag = yyvsp[-1].a_tag;
3241 yyval.a_tag.tag_mode = TM_IMPLICIT;
vlm6a02a8a2004-09-08 00:28:11 +00003242 ;
3243 break;}
vlm0aa86902004-10-12 23:26:53 +00003244case 254:
3245#line 1953 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003246{
vlmfa67ddc2004-06-03 03:38:44 +00003247 yyval.a_tag = yyvsp[-1].a_tag;
3248 yyval.a_tag.tag_mode = TM_EXPLICIT;
vlm6a02a8a2004-09-08 00:28:11 +00003249 ;
3250 break;}
vlm151c0b22004-09-22 16:03:36 +00003251case 255:
vlm0aa86902004-10-12 23:26:53 +00003252#line 1960 "asn1p_y.y"
vlm151c0b22004-09-22 16:03:36 +00003253{
vlm0aa86902004-10-12 23:26:53 +00003254 checkmem(yyvsp[0].tv_str);
vlm151c0b22004-09-22 16:03:36 +00003255 yyval.tv_str = yyvsp[0].tv_str;
3256 ;
3257 break;}
3258case 256:
vlm0aa86902004-10-12 23:26:53 +00003259#line 1964 "asn1p_y.y"
3260{
3261 checkmem(yyvsp[0].tv_str);
3262 yyval.tv_str = yyvsp[0].tv_str;
3263 ;
3264 break;}
3265case 257:
3266#line 1972 "asn1p_y.y"
3267{
3268 checkmem(yyvsp[0].tv_str);
3269 yyval.tv_str = yyvsp[0].tv_str;
3270 ;
3271 break;}
3272case 258:
3273#line 1979 "asn1p_y.y"
3274{ yyval.tv_str = 0; ;
3275 break;}
3276case 259:
3277#line 1980 "asn1p_y.y"
3278{
3279 yyval.tv_str = yyvsp[0].tv_str;
3280 ;
3281 break;}
3282case 260:
3283#line 1985 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003284{
vlm39e5ed72004-09-05 10:40:41 +00003285 checkmem(yyvsp[0].tv_str);
3286 yyval.tv_str = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003287 ;
3288 break;}
vlm6a02a8a2004-09-08 00:28:11 +00003289}
3290 /* the action file gets copied in in place of this dollarsign */
3291#line 543 "/usr/share/bison.simple"
vlmfa67ddc2004-06-03 03:38:44 +00003292
3293 yyvsp -= yylen;
3294 yyssp -= yylen;
vlm6a02a8a2004-09-08 00:28:11 +00003295#ifdef YYLSP_NEEDED
3296 yylsp -= yylen;
3297#endif
vlmfa67ddc2004-06-03 03:38:44 +00003298
vlm6a02a8a2004-09-08 00:28:11 +00003299#if YYDEBUG != 0
vlmfa67ddc2004-06-03 03:38:44 +00003300 if (yydebug)
3301 {
vlm6a02a8a2004-09-08 00:28:11 +00003302 short *ssp1 = yyss - 1;
3303 fprintf (stderr, "state stack now");
3304 while (ssp1 != yyssp)
3305 fprintf (stderr, " %d", *++ssp1);
3306 fprintf (stderr, "\n");
vlmfa67ddc2004-06-03 03:38:44 +00003307 }
3308#endif
3309
3310 *++yyvsp = yyval;
3311
vlm6a02a8a2004-09-08 00:28:11 +00003312#ifdef YYLSP_NEEDED
3313 yylsp++;
3314 if (yylen == 0)
3315 {
3316 yylsp->first_line = yylloc.first_line;
3317 yylsp->first_column = yylloc.first_column;
3318 yylsp->last_line = (yylsp-1)->last_line;
3319 yylsp->last_column = (yylsp-1)->last_column;
3320 yylsp->text = 0;
3321 }
3322 else
3323 {
3324 yylsp->last_line = (yylsp+yylen-1)->last_line;
3325 yylsp->last_column = (yylsp+yylen-1)->last_column;
3326 }
3327#endif
vlmfa67ddc2004-06-03 03:38:44 +00003328
vlm6a02a8a2004-09-08 00:28:11 +00003329 /* Now "shift" the result of the reduction.
3330 Determine what state that goes to,
3331 based on the state we popped back to
3332 and the rule number reduced by. */
vlmfa67ddc2004-06-03 03:38:44 +00003333
3334 yyn = yyr1[yyn];
3335
vlm6a02a8a2004-09-08 00:28:11 +00003336 yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
3337 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
vlmfa67ddc2004-06-03 03:38:44 +00003338 yystate = yytable[yystate];
3339 else
vlm6a02a8a2004-09-08 00:28:11 +00003340 yystate = yydefgoto[yyn - YYNTBASE];
vlmfa67ddc2004-06-03 03:38:44 +00003341
3342 goto yynewstate;
3343
vlm6a02a8a2004-09-08 00:28:11 +00003344yyerrlab: /* here on detecting error */
vlmfa67ddc2004-06-03 03:38:44 +00003345
vlm6a02a8a2004-09-08 00:28:11 +00003346 if (! yyerrstatus)
3347 /* If not already recovering from an error, report this error. */
vlmfa67ddc2004-06-03 03:38:44 +00003348 {
3349 ++yynerrs;
vlm6a02a8a2004-09-08 00:28:11 +00003350
3351#ifdef YYERROR_VERBOSE
vlmfa67ddc2004-06-03 03:38:44 +00003352 yyn = yypact[yystate];
3353
vlm6a02a8a2004-09-08 00:28:11 +00003354 if (yyn > YYFLAG && yyn < YYLAST)
vlmfa67ddc2004-06-03 03:38:44 +00003355 {
vlm6a02a8a2004-09-08 00:28:11 +00003356 int size = 0;
3357 char *msg;
3358 int x, count;
vlmfa67ddc2004-06-03 03:38:44 +00003359
vlm6a02a8a2004-09-08 00:28:11 +00003360 count = 0;
3361 /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
3362 for (x = (yyn < 0 ? -yyn : 0);
3363 x < (ssize_t)(sizeof(yytname) / sizeof(char *)); x++)
3364 if (yycheck[x + yyn] == x)
3365 size += strlen(yytname[x]) + 15, count++;
3366 msg = (char *) malloc(size + 15);
3367 if (msg != 0)
vlmfa67ddc2004-06-03 03:38:44 +00003368 {
vlm6a02a8a2004-09-08 00:28:11 +00003369 strcpy(msg, "parse error");
vlmfa67ddc2004-06-03 03:38:44 +00003370
vlm6a02a8a2004-09-08 00:28:11 +00003371 if (count < 5)
vlmfa67ddc2004-06-03 03:38:44 +00003372 {
vlm6a02a8a2004-09-08 00:28:11 +00003373 count = 0;
3374 for (x = (yyn < 0 ? -yyn : 0);
3375 x < (ssize_t)(sizeof(yytname) / sizeof(char *)); x++)
3376 if (yycheck[x + yyn] == x)
vlmfa67ddc2004-06-03 03:38:44 +00003377 {
vlm6a02a8a2004-09-08 00:28:11 +00003378 strcat(msg, count == 0 ? ", expecting `" : " or `");
3379 strcat(msg, yytname[x]);
3380 strcat(msg, "'");
3381 count++;
vlmfa67ddc2004-06-03 03:38:44 +00003382 }
3383 }
vlm6a02a8a2004-09-08 00:28:11 +00003384 yyerror(msg);
3385 free(msg);
vlmfa67ddc2004-06-03 03:38:44 +00003386 }
3387 else
vlm6a02a8a2004-09-08 00:28:11 +00003388 yyerror ("parse error; also virtual memory exceeded");
vlmfa67ddc2004-06-03 03:38:44 +00003389 }
3390 else
3391#endif /* YYERROR_VERBOSE */
vlm6a02a8a2004-09-08 00:28:11 +00003392 yyerror("parse error");
vlmfa67ddc2004-06-03 03:38:44 +00003393 }
vlm6a02a8a2004-09-08 00:28:11 +00003394
vlmfa67ddc2004-06-03 03:38:44 +00003395 goto yyerrlab1;
vlm6a02a8a2004-09-08 00:28:11 +00003396yyerrlab1: /* here on error raised explicitly by an action */
vlmfa67ddc2004-06-03 03:38:44 +00003397
3398 if (yyerrstatus == 3)
3399 {
vlm6a02a8a2004-09-08 00:28:11 +00003400 /* if just tried and failed to reuse lookahead token after an error, discard it. */
vlmfa67ddc2004-06-03 03:38:44 +00003401
vlm6a02a8a2004-09-08 00:28:11 +00003402 /* return failure if at end of input */
vlmfa67ddc2004-06-03 03:38:44 +00003403 if (yychar == YYEOF)
vlm6a02a8a2004-09-08 00:28:11 +00003404 YYABORT;
vlmfa67ddc2004-06-03 03:38:44 +00003405
vlm6a02a8a2004-09-08 00:28:11 +00003406#if YYDEBUG != 0
3407 if (yydebug)
3408 fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
3409#endif
3410
vlmfa67ddc2004-06-03 03:38:44 +00003411 yychar = YYEMPTY;
3412 }
3413
vlm6a02a8a2004-09-08 00:28:11 +00003414 /* Else will try to reuse lookahead token
3415 after shifting the error token. */
vlmfa67ddc2004-06-03 03:38:44 +00003416
vlm6a02a8a2004-09-08 00:28:11 +00003417 yyerrstatus = 3; /* Each real token shifted decrements this */
vlmfa67ddc2004-06-03 03:38:44 +00003418
vlm6a02a8a2004-09-08 00:28:11 +00003419 goto yyerrhandle;
vlm80103492004-09-07 10:39:09 +00003420
vlm6a02a8a2004-09-08 00:28:11 +00003421yyerrdefault: /* current state does not do anything special for the error token. */
vlm80103492004-09-07 10:39:09 +00003422
vlm6a02a8a2004-09-08 00:28:11 +00003423#if 0
3424 /* This is wrong; only states that explicitly want error tokens
3425 should shift them. */
3426 yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
3427 if (yyn) goto yydefault;
vlm39e5ed72004-09-05 10:40:41 +00003428#endif
vlm6a02a8a2004-09-08 00:28:11 +00003429
3430yyerrpop: /* pop the current state because it cannot handle the error token */
3431
3432 if (yyssp == yyss) YYABORT;
3433 yyvsp--;
3434 yystate = *--yyssp;
3435#ifdef YYLSP_NEEDED
3436 yylsp--;
3437#endif
3438
3439#if YYDEBUG != 0
3440 if (yydebug)
3441 {
3442 short *ssp1 = yyss - 1;
3443 fprintf (stderr, "Error: state stack now");
3444 while (ssp1 != yyssp)
3445 fprintf (stderr, " %d", *++ssp1);
3446 fprintf (stderr, "\n");
vlm39e5ed72004-09-05 10:40:41 +00003447 }
vlm6a02a8a2004-09-08 00:28:11 +00003448#endif
3449
3450yyerrhandle:
3451
3452 yyn = yypact[yystate];
3453 if (yyn == YYFLAG)
3454 goto yyerrdefault;
3455
3456 yyn += YYTERROR;
3457 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
3458 goto yyerrdefault;
3459
3460 yyn = yytable[yyn];
3461 if (yyn < 0)
3462 {
3463 if (yyn == YYFLAG)
3464 goto yyerrpop;
3465 yyn = -yyn;
3466 goto yyreduce;
3467 }
3468 else if (yyn == 0)
3469 goto yyerrpop;
vlmfa67ddc2004-06-03 03:38:44 +00003470
3471 if (yyn == YYFINAL)
3472 YYACCEPT;
3473
vlm6a02a8a2004-09-08 00:28:11 +00003474#if YYDEBUG != 0
3475 if (yydebug)
3476 fprintf(stderr, "Shifting error token, ");
3477#endif
vlmfa67ddc2004-06-03 03:38:44 +00003478
3479 *++yyvsp = yylval;
vlm6a02a8a2004-09-08 00:28:11 +00003480#ifdef YYLSP_NEEDED
3481 *++yylsp = yylloc;
3482#endif
vlmfa67ddc2004-06-03 03:38:44 +00003483
3484 yystate = yyn;
3485 goto yynewstate;
3486
vlm6a02a8a2004-09-08 00:28:11 +00003487 yyacceptlab:
3488 /* YYACCEPT comes here. */
3489 if (yyfree_stacks)
3490 {
3491 free (yyss);
3492 free (yyvs);
3493#ifdef YYLSP_NEEDED
3494 free (yyls);
vlm044f7442004-09-04 04:49:21 +00003495#endif
vlm6a02a8a2004-09-08 00:28:11 +00003496 }
3497 return 0;
vlm80103492004-09-07 10:39:09 +00003498
vlm6a02a8a2004-09-08 00:28:11 +00003499 yyabortlab:
3500 /* YYABORT comes here. */
3501 if (yyfree_stacks)
3502 {
3503 free (yyss);
3504 free (yyvs);
3505#ifdef YYLSP_NEEDED
3506 free (yyls);
vlm80103492004-09-07 10:39:09 +00003507#endif
vlm6a02a8a2004-09-08 00:28:11 +00003508 }
3509 return 1;
vlmfa67ddc2004-06-03 03:38:44 +00003510}
vlm0aa86902004-10-12 23:26:53 +00003511#line 1991 "asn1p_y.y"
vlmfa67ddc2004-06-03 03:38:44 +00003512
3513
3514
3515/*
3516 * Convert Xstring ('0101'B or '5'H) to the binary vector.
3517 */
3518static asn1p_value_t *
3519_convert_bitstring2binary(char *str, int base) {
3520 asn1p_value_t *val;
3521 int slen;
3522 int memlen;
3523 int baselen;
3524 int bits;
3525 uint8_t *binary_vector;
3526 uint8_t *bv_ptr;
3527 uint8_t cur_val;
3528
3529 assert(str);
3530 assert(str[0] == '\'');
3531
3532 switch(base) {
3533 case 'B':
3534 baselen = 1;
3535 break;
3536 case 'H':
3537 baselen = 4;
3538 break;
3539 default:
3540 assert(base == 'B' || base == 'H');
3541 errno = EINVAL;
3542 return NULL;
3543 }
3544
3545 slen = strlen(str);
3546 assert(str[slen - 1] == base);
3547 assert(str[slen - 2] == '\'');
3548
3549 memlen = slen / (8 / baselen); /* Conservative estimate */
3550
3551 bv_ptr = binary_vector = malloc(memlen + 1);
3552 if(bv_ptr == NULL)
3553 /* ENOMEM */
3554 return NULL;
3555
3556 cur_val = 0;
3557 bits = 0;
3558 while(*(++str) != '\'') {
3559 switch(baselen) {
3560 case 1:
3561 switch(*str) {
3562 case '1':
3563 cur_val |= 1 << (7 - (bits % 8));
3564 case '0':
3565 break;
3566 default:
3567 assert(!"_y UNREACH1");
3568 case ' ': case '\r': case '\n':
3569 continue;
3570 }
3571 break;
3572 case 4:
3573 switch(*str) {
3574 case '0': case '1': case '2': case '3': case '4':
3575 case '5': case '6': case '7': case '8': case '9':
3576 cur_val |= (*str - '0') << (4 - (bits % 8));
3577 break;
3578 case 'A': case 'B': case 'C':
3579 case 'D': case 'E': case 'F':
3580 cur_val |= ((*str - 'A') + 10)
3581 << (4 - (bits % 8));
3582 break;
3583 default:
3584 assert(!"_y UNREACH2");
3585 case ' ': case '\r': case '\n':
3586 continue;
3587 }
3588 break;
3589 }
3590
3591 bits += baselen;
3592 if((bits % 8) == 0) {
3593 *bv_ptr++ = cur_val;
3594 cur_val = 0;
3595 }
3596 }
3597
3598 *bv_ptr = cur_val;
3599 assert((bv_ptr - binary_vector) <= memlen);
3600
3601 val = asn1p_value_frombits(binary_vector, bits, 0);
3602 if(val == NULL) {
3603 free(binary_vector);
3604 }
3605
3606 return val;
3607}
3608
3609extern char *asn1p_text;
3610
3611int
3612yyerror(const char *msg) {
3613 fprintf(stderr,
3614 "ASN.1 grammar parse error "
3615 "near line %d (token \"%s\"): %s\n",
vlm39e5ed72004-09-05 10:40:41 +00003616 yylineno, asn1p_text, msg);
vlmfa67ddc2004-06-03 03:38:44 +00003617 return -1;
3618}
3619
3620