blob: 84a8c555ef4945237da49cda06185758dd4579a3 [file] [log] [blame]
vlmfa67ddc2004-06-03 03:38:44 +00001
vlm6a02a8a2004-09-08 00:28:11 +00002/* A Bison parser, made from asn1p_y.y
3 by GNU Bison version 1.28 */
vlmfa67ddc2004-06-03 03:38:44 +00004
vlm6a02a8a2004-09-08 00:28:11 +00005#define YYBISON 1 /* Identify Bison output. */
vlmfa67ddc2004-06-03 03:38:44 +00006
7#define yyparse asn1p_parse
vlm6a02a8a2004-09-08 00:28:11 +00008#define yylex asn1p_lex
vlmfa67ddc2004-06-03 03:38:44 +00009#define yyerror asn1p_error
vlm6a02a8a2004-09-08 00:28:11 +000010#define yylval asn1p_lval
11#define yychar asn1p_char
vlmfa67ddc2004-06-03 03:38:44 +000012#define yydebug asn1p_debug
13#define yynerrs asn1p_nerrs
vlm6a02a8a2004-09-08 00:28:11 +000014#define TOK_PPEQ 257
15#define TOK_opaque 258
16#define TOK_bstring 259
17#define TOK_cstring 260
18#define TOK_hstring 261
19#define TOK_identifier 262
20#define TOK_number 263
21#define TOK_number_negative 264
22#define TOK_typereference 265
23#define TOK_capitalreference 266
24#define TOK_typefieldreference 267
25#define TOK_valuefieldreference 268
26#define TOK_ABSENT 269
27#define TOK_ABSTRACT_SYNTAX 270
28#define TOK_ALL 271
29#define TOK_ANY 272
30#define TOK_APPLICATION 273
31#define TOK_AUTOMATIC 274
32#define TOK_BEGIN 275
33#define TOK_BIT 276
34#define TOK_BMPString 277
35#define TOK_BOOLEAN 278
36#define TOK_BY 279
37#define TOK_CHARACTER 280
38#define TOK_CHOICE 281
39#define TOK_CLASS 282
40#define TOK_COMPONENT 283
41#define TOK_COMPONENTS 284
42#define TOK_CONSTRAINED 285
43#define TOK_CONTAINING 286
44#define TOK_DEFAULT 287
45#define TOK_DEFINITIONS 288
46#define TOK_DEFINED 289
47#define TOK_EMBEDDED 290
48#define TOK_ENCODED 291
49#define TOK_ENCODING_CONTROL 292
50#define TOK_END 293
51#define TOK_ENUMERATED 294
52#define TOK_EXPLICIT 295
53#define TOK_EXPORTS 296
54#define TOK_EXTENSIBILITY 297
55#define TOK_EXTERNAL 298
56#define TOK_FALSE 299
57#define TOK_FROM 300
58#define TOK_GeneralizedTime 301
59#define TOK_GeneralString 302
60#define TOK_GraphicString 303
61#define TOK_IA5String 304
62#define TOK_IDENTIFIER 305
63#define TOK_IMPLICIT 306
64#define TOK_IMPLIED 307
65#define TOK_IMPORTS 308
66#define TOK_INCLUDES 309
67#define TOK_INSTANCE 310
68#define TOK_INSTRUCTIONS 311
69#define TOK_INTEGER 312
70#define TOK_ISO646String 313
71#define TOK_MAX 314
72#define TOK_MIN 315
73#define TOK_MINUS_INFINITY 316
74#define TOK_NULL 317
75#define TOK_NumericString 318
76#define TOK_OBJECT 319
77#define TOK_ObjectDescriptor 320
78#define TOK_OCTET 321
79#define TOK_OF 322
80#define TOK_OPTIONAL 323
81#define TOK_PATTERN 324
82#define TOK_PDV 325
83#define TOK_PLUS_INFINITY 326
84#define TOK_PRESENT 327
85#define TOK_PrintableString 328
86#define TOK_PRIVATE 329
87#define TOK_REAL 330
88#define TOK_RELATIVE_OID 331
89#define TOK_SEQUENCE 332
90#define TOK_SET 333
91#define TOK_SIZE 334
92#define TOK_STRING 335
93#define TOK_SYNTAX 336
94#define TOK_T61String 337
95#define TOK_TAGS 338
96#define TOK_TeletexString 339
97#define TOK_TRUE 340
98#define TOK_TYPE_IDENTIFIER 341
99#define TOK_UNIQUE 342
100#define TOK_UNIVERSAL 343
101#define TOK_UniversalString 344
102#define TOK_UTCTime 345
103#define TOK_UTF8String 346
104#define TOK_VideotexString 347
105#define TOK_VisibleString 348
106#define TOK_WITH 349
107#define TOK_EXCEPT 350
108#define TOK_INTERSECTION 351
109#define TOK_UNION 352
110#define TOK_TwoDots 353
111#define TOK_ThreeDots 354
112#define TOK_tag 355
vlmfa67ddc2004-06-03 03:38:44 +0000113
114#line 1 "asn1p_y.y"
115
116
117#include <stdlib.h>
118#include <stdio.h>
119#include <string.h>
120#include <errno.h>
121#include <assert.h>
122
123#include "asn1parser.h"
124
125#define YYPARSE_PARAM param
126#define YYERROR_VERBOSE
127
128int yylex(void);
129int yyerror(const char *msg);
130void asn1p_lexer_hack_push_opaque_state(void);
131void asn1p_lexer_hack_enable_with_syntax(void);
vlm9283dbe2004-08-18 04:59:12 +0000132void asn1p_lexer_hack_push_encoding_control(void);
vlmfa67ddc2004-06-03 03:38:44 +0000133#define yylineno asn1p_lineno
134extern int asn1p_lineno;
135
136
137static asn1p_value_t *
138 _convert_bitstring2binary(char *str, int base);
139
vlm6a02a8a2004-09-08 00:28:11 +0000140#define checkmem(ptr) do { \
141 if(!(ptr)) \
142 return yyerror("Memory failure"); \
vlmfa67ddc2004-06-03 03:38:44 +0000143 } while(0)
144
145#define CONSTRAINT_INSERT(root, constr_type, arg1, arg2) do { \
146 if(arg1->type != constr_type) { \
147 int __ret; \
148 root = asn1p_constraint_new(yylineno); \
149 checkmem(root); \
150 root->type = constr_type; \
151 __ret = asn1p_constraint_insert(root, \
152 arg1); \
153 checkmem(__ret == 0); \
154 } else { \
155 root = arg1; \
156 } \
157 if(arg2) { \
158 int __ret \
159 = asn1p_constraint_insert(root, arg2); \
160 checkmem(__ret == 0); \
161 } \
162 } while(0)
163
164
vlm9283dbe2004-08-18 04:59:12 +0000165#line 58 "asn1p_y.y"
vlmfa67ddc2004-06-03 03:38:44 +0000166typedef union {
167 asn1p_t *a_grammar;
168 asn1p_module_flags_e a_module_flags;
169 asn1p_module_t *a_module;
170 asn1p_expr_type_e a_type; /* ASN.1 Type */
171 asn1p_expr_t *a_expr; /* Constructed collection */
172 asn1p_constraint_t *a_constr; /* Constraint */
173 enum asn1p_constraint_type_e a_ctype;/* Constraint type */
174 asn1p_xports_t *a_xports; /* IMports/EXports */
175 asn1p_oid_t *a_oid; /* Object Identifier */
176 asn1p_oid_arc_t a_oid_arc; /* Single OID's arc */
177 struct asn1p_type_tag_s a_tag; /* A tag */
178 asn1p_ref_t *a_ref; /* Reference to custom type */
179 asn1p_wsyntx_t *a_wsynt; /* WITH SYNTAX contents */
180 asn1p_wsyntx_chunk_t *a_wchunk; /* WITH SYNTAX chunk */
181 struct asn1p_ref_component_s a_refcomp; /* Component of a reference */
182 asn1p_value_t *a_value; /* Number, DefinedValue, etc */
183 struct asn1p_param_s a_parg; /* A parameter argument */
184 asn1p_paramlist_t *a_plist; /* A pargs list */
185 enum asn1p_expr_marker_e a_marker; /* OPTIONAL/DEFAULT */
186 enum asn1p_constr_pres_e a_pres; /* PRESENT/ABSENT/OPTIONAL */
187 asn1_integer_t a_int;
188 char *tv_str;
189 struct {
190 char *buf;
191 int len;
192 } tv_opaque;
193 struct {
194 char *name;
195 struct asn1p_type_tag_s tag;
196 } tv_nametag;
vlm6a02a8a2004-09-08 00:28:11 +0000197} YYSTYPE;
198#include <stdio.h>
199
200#ifndef __cplusplus
201#ifndef __STDC__
202#define const
203#endif
vlmfa67ddc2004-06-03 03:38:44 +0000204#endif
205
206
207
vlmfce48a42004-09-14 02:36:39 +0000208#define YYFINAL 395
vlm6a02a8a2004-09-08 00:28:11 +0000209#define YYFLAG -32768
210#define YYNTBASE 115
vlmfa67ddc2004-06-03 03:38:44 +0000211
vlmfce48a42004-09-14 02:36:39 +0000212#define YYTRANSLATE(x) ((unsigned)(x) <= 355 ? yytranslate[x] : 213)
vlmfa67ddc2004-06-03 03:38:44 +0000213
vlm6a02a8a2004-09-08 00:28:11 +0000214static const char yytranslate[] = { 0,
215 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
216 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
217 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
218 2, 2, 111, 2, 2, 2, 2, 2, 2, 106,
219 107, 2, 2, 109, 2, 112, 2, 2, 2, 2,
220 2, 2, 2, 2, 2, 2, 2, 110, 108, 113,
221 2, 2, 2, 114, 2, 2, 2, 2, 2, 2,
222 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
223 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
224 2, 2, 2, 97, 2, 2, 2, 2, 2, 2,
225 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
226 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
227 2, 2, 104, 99, 105, 2, 2, 2, 2, 2,
228 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
229 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
230 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
231 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
232 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
233 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
234 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
235 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
236 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
237 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
238 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
239 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
240 2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
241 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
242 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
243 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
244 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
245 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
246 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
247 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
248 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
249 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
250 98, 100, 101, 102, 103
251};
vlmfa67ddc2004-06-03 03:38:44 +0000252
vlm6a02a8a2004-09-08 00:28:11 +0000253#if YYDEBUG != 0
254static const short yyprhs[] = { 0,
255 0, 2, 4, 7, 16, 17, 19, 23, 26, 28,
256 31, 33, 38, 40, 41, 43, 45, 48, 51, 54,
257 57, 60, 63, 64, 66, 68, 71, 73, 75, 77,
258 79, 81, 82, 86, 88, 92, 95, 97, 100, 105,
259 107, 111, 113, 115, 119, 123, 126, 128, 132, 134,
260 136, 143, 145, 147, 148, 150, 152, 156, 158, 160,
vlmfce48a42004-09-14 02:36:39 +0000261 165, 169, 173, 180, 182, 186, 188, 192, 196, 198,
262 202, 204, 206, 208, 212, 216, 220, 222, 224, 228,
263 231, 233, 239, 240, 242, 244, 248, 251, 256, 261,
264 262, 264, 265, 272, 274, 277, 279, 281, 283, 287,
265 291, 295, 297, 299, 304, 309, 314, 319, 324, 326,
vlm6a02a8a2004-09-08 00:28:11 +0000266 331, 336, 338, 342, 344, 348, 352, 354, 358, 360,
267 364, 366, 368, 370, 372, 377, 378, 382, 384, 386,
268 388, 390, 392, 394, 398, 400, 403, 405, 407, 409,
269 411, 414, 417, 419, 421, 424, 427, 429, 431, 433,
270 435, 438, 440, 443, 445, 447, 449, 451, 453, 455,
271 457, 459, 461, 463, 465, 467, 469, 471, 473, 475,
272 477, 479, 481, 482, 484, 486, 491, 495, 500, 502,
273 506, 512, 514, 518, 522, 526, 531, 535, 537, 541,
274 545, 549, 553, 555, 557, 559, 562, 565, 569, 571,
275 573, 575, 577, 579, 581, 583, 589, 591, 595, 597,
276 601, 602, 604, 606, 608, 610, 612, 614, 618, 623,
277 625, 629, 632, 636, 638, 642, 643, 645, 647, 650,
278 652, 654, 655, 659, 662, 666, 668, 672, 674, 679,
279 684, 686, 688, 690, 692, 693, 695, 697, 700, 703,
vlmfce48a42004-09-14 02:36:39 +0000280 705, 707, 709
vlm6a02a8a2004-09-08 00:28:11 +0000281};
vlmfa67ddc2004-06-03 03:38:44 +0000282
vlm6a02a8a2004-09-08 00:28:11 +0000283static const short yyrhs[] = { 116,
284 0, 117, 0, 116, 117, 0, 210, 118, 34, 122,
285 3, 21, 125, 39, 0, 0, 119, 0, 104, 120,
286 105, 0, 104, 105, 0, 121, 0, 120, 121, 0,
287 212, 0, 212, 106, 9, 107, 0, 9, 0, 0,
288 123, 0, 124, 0, 123, 124, 0, 41, 84, 0,
289 52, 84, 0, 20, 84, 0, 43, 53, 0, 12,
290 57, 0, 0, 126, 0, 127, 0, 126, 127, 0,
291 129, 0, 134, 0, 142, 0, 168, 0, 137, 0,
292 0, 38, 12, 128, 0, 176, 0, 54, 130, 108,
293 0, 54, 46, 0, 131, 0, 130, 131, 0, 132,
294 46, 210, 118, 0, 133, 0, 132, 109, 133, 0,
295 210, 0, 212, 0, 42, 135, 108, 0, 42, 17,
296 108, 0, 42, 108, 0, 136, 0, 135, 109, 136,
297 0, 210, 0, 212, 0, 210, 138, 3, 104, 139,
298 105, 0, 163, 0, 173, 0, 0, 140, 0, 141,
299 0, 140, 109, 141, 0, 102, 0, 184, 0, 210,
vlmfce48a42004-09-14 02:36:39 +0000300 3, 208, 87, 0, 210, 3, 161, 0, 210, 3,
301 151, 0, 210, 104, 143, 105, 3, 161, 0, 144,
302 0, 143, 109, 144, 0, 210, 0, 210, 110, 212,
303 0, 173, 110, 212, 0, 146, 0, 145, 109, 146,
304 0, 161, 0, 212, 0, 148, 0, 147, 109, 148,
305 0, 212, 161, 200, 0, 30, 68, 161, 0, 160,
306 0, 150, 0, 149, 109, 150, 0, 212, 161, 0,
307 160, 0, 28, 104, 153, 105, 155, 0, 0, 88,
308 0, 154, 0, 153, 109, 154, 0, 166, 200, 0,
309 166, 161, 200, 152, 0, 166, 166, 200, 152, 0,
310 0, 156, 0, 0, 95, 82, 104, 157, 158, 105,
311 0, 159, 0, 158, 159, 0, 4, 0, 166, 0,
312 102, 0, 102, 111, 171, 0, 102, 111, 207, 0,
313 208, 162, 180, 0, 175, 0, 176, 0, 27, 104,
vlm6a02a8a2004-09-08 00:28:11 +0000314 149, 105, 0, 78, 104, 147, 105, 0, 79, 104,
315 147, 105, 0, 78, 180, 68, 162, 0, 79, 180,
316 68, 162, 0, 18, 0, 18, 35, 25, 212, 0,
317 210, 104, 145, 105, 0, 163, 0, 56, 68, 163,
318 0, 11, 0, 11, 112, 210, 0, 11, 112, 212,
319 0, 211, 0, 211, 112, 164, 0, 165, 0, 164,
320 112, 165, 0, 167, 0, 167, 0, 13, 0, 14,
321 0, 212, 138, 3, 169, 0, 0, 104, 170, 172,
322 0, 5, 0, 7, 0, 6, 0, 207, 0, 171,
323 0, 212, 0, 210, 112, 212, 0, 4, 0, 172,
324 4, 0, 24, 0, 63, 0, 76, 0, 174, 0,
325 67, 81, 0, 65, 51, 0, 77, 0, 44, 0,
326 36, 71, 0, 26, 81, 0, 91, 0, 47, 0,
327 58, 0, 40, 0, 22, 81, 0, 173, 0, 174,
328 204, 0, 23, 0, 48, 0, 49, 0, 50, 0,
329 59, 0, 64, 0, 74, 0, 83, 0, 85, 0,
330 90, 0, 92, 0, 93, 0, 94, 0, 66, 0,
331 99, 0, 100, 0, 97, 0, 98, 0, 96, 0,
332 0, 181, 0, 182, 0, 80, 106, 183, 107, 0,
333 106, 183, 107, 0, 182, 106, 183, 107, 0, 184,
334 0, 184, 109, 102, 0, 184, 109, 102, 109, 184,
335 0, 185, 0, 184, 177, 185, 0, 184, 178, 185,
336 0, 185, 179, 185, 0, 187, 106, 183, 107, 0,
337 106, 183, 107, 0, 188, 0, 188, 186, 188, 0,
338 61, 186, 188, 0, 188, 186, 60, 0, 61, 186,
339 60, 0, 194, 0, 189, 0, 101, 0, 101, 113,
340 0, 113, 101, 0, 113, 101, 113, 0, 80, 0,
341 46, 0, 207, 0, 212, 0, 6, 0, 45, 0,
342 86, 0, 95, 30, 104, 190, 105, 0, 191, 0,
343 190, 109, 191, 0, 102, 0, 212, 180, 192, 0,
344 0, 193, 0, 73, 0, 15, 0, 69, 0, 195,
345 0, 196, 0, 104, 210, 105, 0, 195, 104, 197,
346 105, 0, 198, 0, 197, 109, 198, 0, 114, 199,
347 0, 114, 112, 199, 0, 212, 0, 199, 112, 212,
348 0, 0, 201, 0, 69, 0, 33, 202, 0, 188,
349 0, 173, 0, 0, 104, 203, 172, 0, 104, 105,
350 0, 104, 205, 105, 0, 206, 0, 205, 109, 206,
351 0, 212, 0, 212, 106, 207, 107, 0, 212, 106,
352 171, 107, 0, 207, 0, 102, 0, 9, 0, 10,
353 0, 0, 209, 0, 103, 0, 103, 52, 0, 103,
vlmfce48a42004-09-14 02:36:39 +0000354 41, 0, 11, 0, 12, 0, 12, 0, 8, 0
vlm6a02a8a2004-09-08 00:28:11 +0000355};
vlmfa67ddc2004-06-03 03:38:44 +0000356
357#endif
358
vlm6a02a8a2004-09-08 00:28:11 +0000359#if YYDEBUG != 0
360static const short yyrline[] = { 0,
vlmfce48a42004-09-14 02:36:39 +0000361 299, 305, 311, 327, 352, 354, 357, 361, 366, 373,
362 381, 386, 390, 399, 401, 409, 413, 421, 425, 428,
363 431, 435, 455, 457, 465, 469, 501, 505, 514, 521,
364 534, 541, 543, 555, 568, 575, 580, 586, 592, 601,
365 607, 613, 620, 628, 632, 635, 642, 648, 654, 661,
366 670, 680, 688, 696, 698, 708, 711, 715, 718, 730,
367 742, 748, 764, 773, 783, 793, 798, 805, 815, 821,
368 827, 831, 843, 849, 855, 862, 869, 874, 880, 886,
369 892, 897, 907, 909, 912, 920, 926, 935, 941, 958,
370 960, 965, 969, 974, 979, 985, 989, 1000, 1009, 1018,
371 1029, 1051, 1055, 1061, 1067, 1073, 1079, 1087, 1095, 1101,
372 1115, 1139, 1146, 1160, 1169, 1179, 1189, 1197, 1218, 1227,
373 1236, 1237, 1239, 1246, 1258, 1268, 1270, 1275, 1279, 1283,
374 1287, 1290, 1295, 1307, 1323, 1334, 1348, 1350, 1351, 1352,
375 1353, 1354, 1355, 1356, 1357, 1358, 1359, 1360, 1366, 1368,
376 1369, 1372, 1379, 1391, 1393, 1397, 1401, 1402, 1403, 1404,
377 1405, 1409, 1410, 1411, 1412, 1416, 1417, 1424, 1424, 1425,
378 1425, 1426, 1428, 1430, 1435, 1439, 1448, 1452, 1457, 1461,
379 1467, 1477, 1481, 1484, 1487, 1492, 1501, 1509, 1515, 1522,
380 1530, 1538, 1547, 1550, 1555, 1557, 1558, 1559, 1562, 1566,
381 1571, 1575, 1586, 1591, 1596, 1603, 1609, 1613, 1618, 1624,
382 1636, 1638, 1641, 1645, 1648, 1653, 1657, 1665, 1680, 1686,
383 1693, 1706, 1718, 1733, 1737, 1754, 1756, 1759, 1763, 1769,
384 1772, 1774, 1774, 1794, 1799, 1804, 1810, 1816, 1824, 1832,
385 1840, 1847, 1857, 1862, 1892, 1894, 1897, 1902, 1906, 1912,
386 1917, 1924, 1931
vlm6a02a8a2004-09-08 00:28:11 +0000387};
388#endif
389
390
391#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
392
393static const char * const yytname[] = { "$","error","$undefined.","TOK_PPEQ",
394"TOK_opaque","TOK_bstring","TOK_cstring","TOK_hstring","TOK_identifier","TOK_number",
395"TOK_number_negative","TOK_typereference","TOK_capitalreference","TOK_typefieldreference",
396"TOK_valuefieldreference","TOK_ABSENT","TOK_ABSTRACT_SYNTAX","TOK_ALL","TOK_ANY",
397"TOK_APPLICATION","TOK_AUTOMATIC","TOK_BEGIN","TOK_BIT","TOK_BMPString","TOK_BOOLEAN",
398"TOK_BY","TOK_CHARACTER","TOK_CHOICE","TOK_CLASS","TOK_COMPONENT","TOK_COMPONENTS",
399"TOK_CONSTRAINED","TOK_CONTAINING","TOK_DEFAULT","TOK_DEFINITIONS","TOK_DEFINED",
400"TOK_EMBEDDED","TOK_ENCODED","TOK_ENCODING_CONTROL","TOK_END","TOK_ENUMERATED",
401"TOK_EXPLICIT","TOK_EXPORTS","TOK_EXTENSIBILITY","TOK_EXTERNAL","TOK_FALSE",
402"TOK_FROM","TOK_GeneralizedTime","TOK_GeneralString","TOK_GraphicString","TOK_IA5String",
403"TOK_IDENTIFIER","TOK_IMPLICIT","TOK_IMPLIED","TOK_IMPORTS","TOK_INCLUDES","TOK_INSTANCE",
404"TOK_INSTRUCTIONS","TOK_INTEGER","TOK_ISO646String","TOK_MAX","TOK_MIN","TOK_MINUS_INFINITY",
405"TOK_NULL","TOK_NumericString","TOK_OBJECT","TOK_ObjectDescriptor","TOK_OCTET",
406"TOK_OF","TOK_OPTIONAL","TOK_PATTERN","TOK_PDV","TOK_PLUS_INFINITY","TOK_PRESENT",
407"TOK_PrintableString","TOK_PRIVATE","TOK_REAL","TOK_RELATIVE_OID","TOK_SEQUENCE",
408"TOK_SET","TOK_SIZE","TOK_STRING","TOK_SYNTAX","TOK_T61String","TOK_TAGS","TOK_TeletexString",
409"TOK_TRUE","TOK_TYPE_IDENTIFIER","TOK_UNIQUE","TOK_UNIVERSAL","TOK_UniversalString",
410"TOK_UTCTime","TOK_UTF8String","TOK_VideotexString","TOK_VisibleString","TOK_WITH",
411"TOK_EXCEPT","'^'","TOK_INTERSECTION","'|'","TOK_UNION","TOK_TwoDots","TOK_ThreeDots",
412"TOK_tag","'{'","'}'","'('","')'","';'","','","':'","'!'","'.'","'<'","'@'",
413"ParsedGrammar","ModuleList","ModuleSpecification","optObjectIdentifier","ObjectIdentifier",
414"ObjectIdentifierBody","ObjectIdentifierElement","optModuleSpecificationFlags",
415"ModuleSpecificationFlags","ModuleSpecificationFlag","optModuleSpecificationBody",
416"ModuleSpecificationBody","ModuleSpecificationElement","@1","ImportsDefinition",
417"ImportsBundleSet","ImportsBundle","ImportsList","ImportsElement","ExportsDefinition",
418"ExportsBody","ExportsElement","ValueSetDefinition","DefinedTypeRef","optValueSetBody",
419"ValueSetBody","ValueSetElement","DataTypeReference","ParameterArgumentList",
420"ParameterArgumentName","ActualParameterList","ActualParameter","ComponentTypeLists",
421"ComponentType","AlternativeTypeLists","AlternativeType","ClassDeclaration",
422"optUnique","ClassFieldList","ClassField","optWithSyntax","WithSyntax","@2",
423"WithSyntaxFormat","WithSyntaxFormatToken","ExtensionAndException","Type","TypeDeclaration",
424"ComplexTypeReference","ComplexTypeReferenceAmpList","ComplexTypeReferenceElement",
425"ClassFieldIdentifier","ClassFieldName","ValueDefinition","InlineOrDefinedValue",
426"@3","DefinedValue","Opaque","BasicTypeId","BasicTypeId_UniverationCompatible",
427"BasicType","BasicString","Union","Intersection","Except","optConstraints","Constraints",
428"SetOfConstraints","ElementSetSpecs","ElementSetSpec","ConstraintSubtypeElement",
429"ConstraintRangeSpec","ConstraintSpec","ConstraintValue","WithComponents","WithComponentsList",
430"WithComponentsElement","optPresenceConstraint","PresenceConstraint","TableConstraint",
431"SimpleTableConstraint","ComponentRelationConstraint","AtNotationList","AtNotationElement",
432"ComponentIdList","optMarker","Marker","DefaultValue","@4","UniverationDefinition",
433"UniverationList","UniverationElement","SignedNumber","optTag","Tag","TypeRefName",
vlmfce48a42004-09-14 02:36:39 +0000434"ObjectClassReference","Identifier", NULL
vlm6a02a8a2004-09-08 00:28:11 +0000435};
436#endif
437
438static const short yyr1[] = { 0,
439 115, 116, 116, 117, 118, 118, 119, 119, 120, 120,
440 121, 121, 121, 122, 122, 123, 123, 124, 124, 124,
441 124, 124, 125, 125, 126, 126, 127, 127, 127, 127,
442 127, 128, 127, 127, 129, 129, 130, 130, 131, 132,
443 132, 133, 133, 134, 134, 134, 135, 135, 136, 136,
444 137, 138, 138, 139, 139, 140, 140, 141, 141, 142,
445 142, 142, 142, 143, 143, 144, 144, 144, 145, 145,
446 146, 146, 147, 147, 148, 148, 148, 149, 149, 150,
447 150, 151, 152, 152, 153, 153, 154, 154, 154, 155,
448 155, 157, 156, 158, 158, 159, 159, 160, 160, 160,
449 161, 162, 162, 162, 162, 162, 162, 162, 162, 162,
450 162, 162, 162, 163, 163, 163, 163, 163, 164, 164,
451 165, 166, 167, 167, 168, 170, 169, 169, 169, 169,
452 169, 169, 171, 171, 172, 172, 173, 173, 173, 173,
453 173, 173, 173, 173, 173, 173, 173, 173, 174, 174,
454 174, 175, 175, 176, 176, 176, 176, 176, 176, 176,
455 176, 176, 176, 176, 176, 176, 176, 177, 177, 178,
456 178, 179, 180, 180, 181, 181, 182, 182, 183, 183,
457 183, 184, 184, 184, 184, 185, 185, 185, 185, 185,
458 185, 185, 185, 185, 186, 186, 186, 186, 187, 187,
459 188, 188, 188, 188, 188, 189, 190, 190, 191, 191,
460 192, 192, 193, 193, 193, 194, 194, 195, 196, 197,
461 197, 198, 198, 199, 199, 200, 200, 201, 201, 202,
462 202, 203, 202, 204, 204, 205, 205, 206, 206, 206,
463 206, 206, 207, 207, 208, 208, 209, 209, 209, 210,
vlmfce48a42004-09-14 02:36:39 +0000464 210, 211, 212
vlm6a02a8a2004-09-08 00:28:11 +0000465};
466
467static const short yyr2[] = { 0,
468 1, 1, 2, 8, 0, 1, 3, 2, 1, 2,
469 1, 4, 1, 0, 1, 1, 2, 2, 2, 2,
470 2, 2, 0, 1, 1, 2, 1, 1, 1, 1,
471 1, 0, 3, 1, 3, 2, 1, 2, 4, 1,
472 3, 1, 1, 3, 3, 2, 1, 3, 1, 1,
473 6, 1, 1, 0, 1, 1, 3, 1, 1, 4,
vlmfce48a42004-09-14 02:36:39 +0000474 3, 3, 6, 1, 3, 1, 3, 3, 1, 3,
vlm6a02a8a2004-09-08 00:28:11 +0000475 1, 1, 1, 3, 3, 3, 1, 1, 3, 2,
476 1, 5, 0, 1, 1, 3, 2, 4, 4, 0,
477 1, 0, 6, 1, 2, 1, 1, 1, 3, 3,
vlmfce48a42004-09-14 02:36:39 +0000478 3, 1, 1, 4, 4, 4, 4, 4, 1, 4,
vlm6a02a8a2004-09-08 00:28:11 +0000479 4, 1, 3, 1, 3, 3, 1, 3, 1, 3,
480 1, 1, 1, 1, 4, 0, 3, 1, 1, 1,
481 1, 1, 1, 3, 1, 2, 1, 1, 1, 1,
482 2, 2, 1, 1, 2, 2, 1, 1, 1, 1,
483 2, 1, 2, 1, 1, 1, 1, 1, 1, 1,
484 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
485 1, 1, 0, 1, 1, 4, 3, 4, 1, 3,
486 5, 1, 3, 3, 3, 4, 3, 1, 3, 3,
487 3, 3, 1, 1, 1, 2, 2, 3, 1, 1,
488 1, 1, 1, 1, 1, 5, 1, 3, 1, 3,
489 0, 1, 1, 1, 1, 1, 1, 3, 4, 1,
490 3, 2, 3, 1, 3, 0, 1, 1, 2, 1,
491 1, 0, 3, 2, 3, 1, 3, 1, 4, 4,
492 1, 1, 1, 1, 0, 1, 1, 2, 2, 1,
vlmfce48a42004-09-14 02:36:39 +0000493 1, 1, 1
vlm6a02a8a2004-09-08 00:28:11 +0000494};
495
496static const short yydefact[] = { 0,
497 250, 251, 1, 2, 5, 3, 0, 0, 6, 253,
498 13, 8, 0, 9, 11, 14, 7, 10, 0, 0,
499 0, 0, 0, 0, 0, 15, 16, 0, 22, 20,
500 18, 21, 19, 0, 17, 12, 23, 154, 0, 0,
501 155, 156, 157, 0, 158, 159, 167, 160, 161, 162,
502 163, 164, 165, 166, 0, 24, 25, 27, 28, 31,
503 29, 30, 34, 0, 0, 32, 0, 46, 0, 47,
504 49, 50, 36, 0, 37, 0, 40, 42, 43, 4,
505 26, 245, 114, 252, 0, 137, 0, 0, 150, 144,
506 148, 149, 138, 0, 0, 139, 143, 147, 0, 0,
507 52, 53, 140, 117, 0, 33, 45, 44, 0, 35,
vlmfce48a42004-09-14 02:36:39 +0000508 38, 0, 0, 0, 247, 62, 61, 0, 246, 0,
509 151, 146, 145, 142, 141, 0, 64, 0, 66, 0,
510 0, 0, 48, 5, 41, 0, 249, 248, 114, 252,
511 109, 0, 0, 173, 173, 60, 173, 112, 152, 140,
vlm6a02a8a2004-09-08 00:28:11 +0000512 102, 103, 0, 115, 116, 0, 0, 0, 0, 54,
513 123, 124, 118, 119, 121, 128, 130, 129, 243, 244,
vlmfce48a42004-09-14 02:36:39 +0000514 126, 125, 132, 131, 0, 133, 39, 0, 85, 245,
vlm6a02a8a2004-09-08 00:28:11 +0000515 122, 0, 0, 0, 0, 0, 0, 0, 174, 175,
vlmfce48a42004-09-14 02:36:39 +0000516 0, 0, 101, 0, 153, 245, 245, 65, 68, 67,
vlm6a02a8a2004-09-08 00:28:11 +0000517 203, 204, 200, 0, 199, 205, 0, 58, 0, 0,
518 0, 55, 56, 59, 182, 0, 188, 194, 193, 216,
519 217, 201, 202, 0, 0, 0, 90, 0, 0, 228,
vlmfce48a42004-09-14 02:36:39 +0000520 226, 226, 87, 227, 0, 0, 98, 0, 78, 81,
521 245, 113, 0, 0, 0, 73, 77, 245, 0, 179,
vlm6a02a8a2004-09-08 00:28:11 +0000522 0, 0, 0, 0, 242, 234, 0, 236, 241, 238,
523 0, 69, 71, 72, 63, 195, 0, 0, 0, 0,
524 0, 51, 0, 170, 171, 168, 169, 0, 0, 172,
525 0, 0, 0, 0, 120, 135, 127, 134, 0, 82,
526 91, 86, 232, 231, 230, 229, 83, 83, 110, 0,
vlmfce48a42004-09-14 02:36:39 +0000527 104, 0, 80, 0, 245, 105, 0, 226, 177, 0,
528 107, 0, 106, 108, 235, 0, 0, 111, 245, 196,
529 197, 192, 190, 0, 218, 187, 57, 183, 184, 185,
530 0, 191, 189, 0, 0, 220, 136, 0, 0, 84,
531 88, 89, 99, 100, 79, 176, 76, 74, 75, 180,
532 178, 237, 0, 0, 70, 198, 209, 0, 207, 173,
533 186, 0, 222, 224, 219, 0, 92, 233, 0, 240,
534 239, 206, 0, 211, 223, 0, 221, 0, 181, 208,
535 214, 215, 213, 210, 212, 225, 96, 0, 94, 97,
536 93, 95, 0, 0, 0
vlm6a02a8a2004-09-08 00:28:11 +0000537};
538
vlmfce48a42004-09-14 02:36:39 +0000539static const short yydefgoto[] = { 393,
vlm6a02a8a2004-09-08 00:28:11 +0000540 3, 4, 8, 9, 13, 14, 25, 26, 27, 55,
541 56, 57, 106, 58, 74, 75, 76, 77, 59, 69,
vlmfce48a42004-09-14 02:36:39 +0000542 70, 60, 100, 211, 212, 213, 61, 126, 127, 261,
543 262, 245, 246, 238, 239, 116, 341, 178, 179, 290,
544 291, 378, 388, 389, 247, 263, 147, 148, 163, 164,
545 180, 181, 62, 172, 225, 173, 287, 149, 103, 151,
vlm6a02a8a2004-09-08 00:28:11 +0000546 152, 278, 279, 281, 188, 189, 190, 249, 250, 215,
vlmfce48a42004-09-14 02:36:39 +0000547 268, 216, 217, 218, 358, 359, 384, 385, 219, 220,
548 221, 335, 336, 363, 233, 234, 296, 339, 195, 257,
549 258, 222, 235, 119, 153, 104, 223
vlm6a02a8a2004-09-08 00:28:11 +0000550};
551
vlmfce48a42004-09-14 02:36:39 +0000552static const short yypact[] = { 29,
553-32768,-32768, 29,-32768, -79,-32768, 18, 22,-32768,-32768,
554-32768,-32768, 42,-32768, 34, 236,-32768,-32768, 99, 71,
555 115, 118, 102, 121, 190, 236,-32768, 105,-32768,-32768,
556-32768,-32768,-32768, 224,-32768,-32768, 329,-32768, 235, 11,
557-32768,-32768,-32768, 192,-32768,-32768,-32768,-32768,-32768,-32768,
558-32768,-32768,-32768,-32768, 227, 329,-32768,-32768,-32768,-32768,
559-32768,-32768,-32768, 33, 238,-32768, 173,-32768, 54,-32768,
560-32768,-32768,-32768, 23,-32768, -17,-32768,-32768,-32768,-32768,
561-32768, -10, 174,-32768, 210,-32768, 211, 223,-32768,-32768,
562-32768,-32768,-32768, 247, 216,-32768,-32768,-32768, 543, 296,
563-32768,-32768,-32768, 199, 310,-32768,-32768,-32768, 246,-32768,
564-32768, 29, 246, 212, 176,-32768,-32768, 406,-32768, 246,
565-32768,-32768,-32768,-32768,-32768, 109,-32768, 208, 213, 217,
566 155, 78,-32768, -79,-32768, 155,-32768,-32768, -9, 221,
567 291, 231, 260, 103, 128,-32768, 117,-32768,-32768, 232,
568-32768,-32768, 240,-32768,-32768, 336, 543, 342, 342, 135,
569-32768,-32768, 241,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
570-32768,-32768,-32768,-32768, 242,-32768,-32768, 150,-32768, 61,
571-32768, 326, 16, 278, 251, 40, 140, 292,-32768, 253,
572 40, 294,-32768, 52,-32768, 24, 261,-32768,-32768,-32768,
573-32768,-32768,-32768, 25,-32768,-32768, 338,-32768, 29, 140,
574 265, 263,-32768, 233, 277, 270, 25,-32768,-32768, 276,
575-32768,-32768,-32768, 155, 377, 342, 287, 155, 298,-32768,
576 35, 35,-32768,-32768, 483, 342, 274, 156,-32768,-32768,
577 261,-32768, 140, 318, 158,-32768,-32768, 261, 280, 249,
578 483, 140, 164, 483,-32768,-32768, 166,-32768,-32768, 284,
579 167,-32768,-32768,-32768,-32768, 279, 290, 165, 297, 289,
580 299,-32768, 135,-32768,-32768,-32768,-32768, 140, 140,-32768,
581 140, 140, 182, 293,-32768,-32768, 400,-32768, 323,-32768,
582-32768,-32768,-32768,-32768,-32768,-32768, 320, 320,-32768, 388,
583-32768, 16,-32768, 302, 261,-32768, 40, 35,-32768, 308,
584-32768, 304,-32768,-32768,-32768, 56, 388,-32768, 24,-32768,
585 300,-32768,-32768, 30,-32768,-32768,-32768,-32768,-32768,-32768,
586 309,-32768,-32768, 9, 175,-32768,-32768, 311, 377,-32768,
587-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 316,
588-32768,-32768, 313, 319,-32768,-32768,-32768, 178,-32768, 117,
589-32768, 342, 315,-32768,-32768, 293,-32768, 400, 140,-32768,
590-32768,-32768, 30, 92, 315, 342,-32768, 239, 233,-32768,
591-32768,-32768,-32768,-32768,-32768,-32768,-32768, 7,-32768,-32768,
592-32768,-32768, 431, 434,-32768
vlm6a02a8a2004-09-08 00:28:11 +0000593};
594
595static const short yypgoto[] = {-32768,
vlmfce48a42004-09-14 02:36:39 +0000596-32768, 432, 303,-32768,-32768, 423,-32768,-32768, 412,-32768,
597-32768, 383,-32768,-32768,-32768, 366,-32768, 328,-32768,-32768,
598 334,-32768, 379,-32768,-32768, 172,-32768,-32768, 295,-32768,
599 129, 256, 142,-32768, 149,-32768, 159,-32768, 230,-32768,
600-32768,-32768,-32768, 72, -169, -81, -18, -49,-32768, 237,
601 -172, -68,-32768,-32768,-32768, -246, 120, -52, -115,-32768,
602 116,-32768,-32768,-32768, -138,-32768,-32768, -12, -156, -200,
603 250,-32768, -186,-32768,-32768, 90,-32768,-32768,-32768,-32768,
604-32768,-32768, 100, 106, -179,-32768,-32768,-32768,-32768,-32768,
605 160, -122, 392,-32768, 2,-32768, -7
vlm6a02a8a2004-09-08 00:28:11 +0000606};
607
608
vlmfce48a42004-09-14 02:36:39 +0000609#define YYLAST 634
vlm6a02a8a2004-09-08 00:28:11 +0000610
611
612static const short yytable[] = { 15,
vlmfce48a42004-09-14 02:36:39 +0000613 117, 5, 150, 214, 5, 15, 192, 232, 193, 174,
614 387, 102, 102, 240, 101, 101, 10, 114, 10, 161,
615 162, 1, 2, 10, 7, 10, 11, 67, 112, 65,
616 10, 10, 72, 1, 2, 82, 79, 10, 64, 1,
617 2, 71, 295, 83, 84, 78, 128, 10, 65, 10,
618 11, 297, 298, 343, 85, 16, 86, 64, 87, 10,
619 169, 170, 165, 10, 169, 170, 79, 229, 88, 244,
620 353, 259, 89, 161, 162, 78, 90, 328, 329, 91,
621 330, 323, 166, 167, 168, 10, 169, 170, 1, 2,
622 92, 113, 115, 229, -250, 93, 333, 94, 231, 95,
623 129, 72, 120, 230, 128, 79, 381, 28, 96, 97,
624 71, 391, 155, 134, 78, 265, 214, 237, 68, 150,
625 362, 154, 12, 98, 176, 266, 115, 29, 349, 230,
626 110, 357, 240, 175, 242, 150, 99, 267, 150, 19,
627 201, 237, 10, 169, 170, 201, 17, 10, 169, 170,
628 199, 200, 63, 255, 32, 165, 256, 255, 129, 303,
629 382, 108, 109, 115, 383, -226, 308, 161, 162, -226,
630 201, 63, 10, 169, 170, 241, 294, 344, 248, 202,
631 203, 171, 185, 248, 202, 203, 260, 201, 264, 10,
632 169, 170, 34, 259, 354, 204, 185, 271, 30, 10,
633 204, 31, 1, 2, 33, 390, 186, 185, 187, 202,
634 270, 36, 379, 156, 205, 390, 137, 157, 288, 205,
635 206, 374, 187, 347, 322, 206, 202, 138, 299, 207,
636 304, 191, 311, 187, 207, 314, 208, 73, 209, 312,
637 210, 332, 387, 209, 37, 210, 66, 20, 83, 84,
638 206, 161, 162, 10, 227, 21, 1, 2, 228, 85,
639 301, 86, 306, 87, 302, 80, 307, 206, 313, 331,
640 315, 318, 307, 88, 316, 319, 22, 89, 23, 365,
641 107, 90, 372, 366, 91, 120, 373, 24, 83, 84,
642 121, 122, 176, 123, 241, 92, 125, 124, 130, 248,
643 93, 175, 94, 201, 95, 10, 169, 170, 260, 176,
644 131, 264, 132, 96, 97, 136, 360, 158, 175, 85,
645 160, 86, 159, 87, -251, 182, 364, 184, 98, 274,
646 275, 276, 277, 88, 183, 194, 10, 89, 197, 1,
647 2, 90, 202, 196, 91, 274, 275, 276, 277, 10,
648 236, 38, 224, 226, 364, 92, 243, 310, 252, 251,
649 93, 254, 94, 115, 95, 360, 39, 269, 386, 272,
650 40, 273, 280, 96, 97, 282, 41, 42, 43, 284,
651 286, 289, 44, 206, 300, 305, 309, 45, 98, 317,
652 321, 320, 46, 325, 47, 10, 169, 170, 1, 2,
653 324, 293, 48, 337, 338, 326, 334, 340, 346, 350,
654 351, 49, 356, 50, 367, 361, 139, 140, 51, 370,
655 52, 53, 54, 141, 369, 371, 376, 85, 38, 86,
656 394, 87, 142, 395, 6, 18, 177, 35, 81, 111,
657 135, 88, 133, 105, 327, 89, 253, 355, 348, 90,
658 345, 198, 91, 41, 42, 43, 342, 292, 368, 392,
659 285, 143, 380, 92, 45, 377, 283, 375, 93, 46,
660 94, 47, 95, 118, 0, 352, 0, 0, 0, 48,
661 0, 96, 97, 144, 145, 0, 0, 0, 49, 0,
662 50, 0, 146, 139, 140, 51, 98, 52, 53, 54,
663 141, 0, 0, 0, 85, 38, 86, 0, 87, 142,
664 0, 0, 0, 0, 0, 0, 0, 0, 88, 0,
665 0, 0, 89, 0, 0, 0, 90, 0, 0, 91,
666 41, 42, 43, 0, 0, 0, 0, 0, 143, 0,
667 92, 45, 0, 0, 0, 93, 46, 94, 47, 95,
668 0, 0, 0, 1, 2, 0, 48, 0, 96, 97,
669 144, 145, 0, 0, 85, 49, 86, 50, 87, 0,
670 0, 0, 51, 98, 52, 53, 54, 0, 88, 0,
671 0, 0, 89, 0, 0, 0, 90, 0, 0, 91,
vlm6a02a8a2004-09-08 00:28:11 +0000672 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
vlmfce48a42004-09-14 02:36:39 +0000673 92, 0, 0, 0, 0, 93, 0, 94, 0, 95,
674 0, 0, 0, 0, 0, 0, 0, 0, 96, 97,
675 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
676 0, 0, 0, 98
vlm6a02a8a2004-09-08 00:28:11 +0000677};
678
679static const short yycheck[] = { 7,
vlmfce48a42004-09-14 02:36:39 +0000680 82, 0, 118, 160, 3, 13, 145, 180, 147, 132,
681 4, 64, 65, 183, 64, 65, 8, 28, 8, 13,
682 14, 11, 12, 8, 104, 8, 9, 17, 46, 37,
683 8, 8, 40, 11, 12, 3, 44, 8, 37, 11,
684 12, 40, 229, 11, 12, 44, 99, 8, 56, 8,
685 9, 231, 232, 300, 22, 34, 24, 56, 26, 8,
686 9, 10, 131, 8, 9, 10, 74, 33, 36, 30,
687 317, 194, 40, 13, 14, 74, 44, 278, 279, 47,
688 281, 268, 5, 6, 7, 8, 9, 10, 11, 12,
689 58, 109, 103, 33, 104, 63, 283, 65, 180, 67,
690 99, 109, 112, 69, 157, 113, 15, 9, 76, 77,
691 109, 105, 120, 112, 113, 197, 273, 102, 108, 235,
692 112, 120, 105, 91, 132, 101, 103, 57, 308, 69,
693 108, 102, 302, 132, 184, 251, 104, 113, 254, 106,
694 6, 102, 8, 9, 10, 6, 105, 8, 9, 10,
695 158, 159, 37, 102, 53, 224, 105, 102, 157, 241,
696 69, 108, 109, 103, 73, 105, 248, 13, 14, 109,
697 6, 56, 8, 9, 10, 183, 229, 300, 186, 45,
698 46, 104, 80, 191, 45, 46, 194, 6, 196, 8,
699 9, 10, 3, 316, 317, 61, 80, 210, 84, 8,
700 61, 84, 11, 12, 84, 378, 104, 80, 106, 45,
701 209, 107, 369, 105, 80, 388, 41, 109, 226, 80,
702 86, 360, 106, 305, 60, 86, 45, 52, 236, 95,
703 243, 104, 251, 106, 95, 254, 102, 46, 104, 252,
704 106, 60, 4, 104, 21, 106, 12, 12, 11, 12,
705 86, 13, 14, 8, 105, 20, 11, 12, 109, 22,
706 105, 24, 105, 26, 109, 39, 109, 86, 105, 282,
707 105, 105, 109, 36, 109, 109, 41, 40, 43, 105,
708 108, 44, 105, 109, 47, 112, 109, 52, 11, 12,
709 81, 81, 300, 71, 302, 58, 81, 51, 3, 307,
710 63, 300, 65, 6, 67, 8, 9, 10, 316, 317,
711 112, 319, 3, 76, 77, 104, 324, 110, 317, 22,
712 104, 24, 110, 26, 104, 35, 334, 68, 91, 97,
713 98, 99, 100, 36, 104, 104, 8, 40, 3, 11,
714 12, 44, 45, 104, 47, 97, 98, 99, 100, 8,
715 25, 23, 112, 112, 362, 58, 106, 109, 106, 68,
716 63, 68, 65, 103, 67, 373, 38, 30, 376, 105,
717 42, 109, 96, 76, 77, 106, 48, 49, 50, 104,
718 4, 95, 54, 86, 111, 68, 107, 59, 91, 106,
719 101, 113, 64, 105, 66, 8, 9, 10, 11, 12,
720 104, 104, 74, 4, 82, 107, 114, 88, 107, 102,
721 107, 83, 113, 85, 104, 107, 11, 12, 90, 107,
722 92, 93, 94, 18, 109, 107, 112, 22, 23, 24,
723 0, 26, 27, 0, 3, 13, 134, 26, 56, 74,
724 113, 36, 109, 65, 273, 40, 191, 319, 307, 44,
725 302, 157, 47, 48, 49, 50, 298, 228, 339, 388,
726 224, 56, 373, 58, 59, 366, 217, 362, 63, 64,
727 65, 66, 67, 82, -1, 316, -1, -1, -1, 74,
728 -1, 76, 77, 78, 79, -1, -1, -1, 83, -1,
729 85, -1, 87, 11, 12, 90, 91, 92, 93, 94,
730 18, -1, -1, -1, 22, 23, 24, -1, 26, 27,
731 -1, -1, -1, -1, -1, -1, -1, -1, 36, -1,
732 -1, -1, 40, -1, -1, -1, 44, -1, -1, 47,
733 48, 49, 50, -1, -1, -1, -1, -1, 56, -1,
734 58, 59, -1, -1, -1, 63, 64, 65, 66, 67,
735 -1, -1, -1, 11, 12, -1, 74, -1, 76, 77,
736 78, 79, -1, -1, 22, 83, 24, 85, 26, -1,
737 -1, -1, 90, 91, 92, 93, 94, -1, 36, -1,
738 -1, -1, 40, -1, -1, -1, 44, -1, -1, 47,
vlm6a02a8a2004-09-08 00:28:11 +0000739 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
vlmfce48a42004-09-14 02:36:39 +0000740 58, -1, -1, -1, -1, 63, -1, 65, -1, 67,
741 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
742 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
743 -1, -1, -1, 91
vlm6a02a8a2004-09-08 00:28:11 +0000744};
745/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
746#line 3 "/usr/share/bison.simple"
747/* This file comes from bison-1.28. */
748
749/* Skeleton output parser for bison,
750 Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
751
752 This program is free software; you can redistribute it and/or modify
753 it under the terms of the GNU General Public License as published by
754 the Free Software Foundation; either version 2, or (at your option)
755 any later version.
756
757 This program is distributed in the hope that it will be useful,
758 but WITHOUT ANY WARRANTY; without even the implied warranty of
759 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
760 GNU General Public License for more details.
761
762 You should have received a copy of the GNU General Public License
763 along with this program; if not, write to the Free Software
764 Foundation, Inc., 59 Temple Place - Suite 330,
765 Boston, MA 02111-1307, USA. */
766
767/* As a special exception, when this file is copied by Bison into a
768 Bison output file, you may use that output file without restriction.
769 This special exception was added by the Free Software Foundation
770 in version 1.24 of Bison. */
771
772/* This is the parser code that is written into each bison parser
773 when the %semantic_parser declaration is not specified in the grammar.
774 It was written by Richard Stallman by simplifying the hairy parser
775 used when %semantic_parser is specified. */
776
777#ifndef YYSTACK_USE_ALLOCA
778#ifdef alloca
779#define YYSTACK_USE_ALLOCA
780#else /* alloca not defined */
781#ifdef __GNUC__
782#define YYSTACK_USE_ALLOCA
783#define alloca __builtin_alloca
784#else /* not GNU C. */
785#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
786#define YYSTACK_USE_ALLOCA
787#include <alloca.h>
788#else /* not sparc */
789/* We think this test detects Watcom and Microsoft C. */
790/* This used to test MSDOS, but that is a bad idea
791 since that symbol is in the user namespace. */
792#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
793#if 0 /* No need for malloc.h, which pollutes the namespace;
794 instead, just don't use alloca. */
795#include <malloc.h>
796#endif
797#else /* not MSDOS, or __TURBOC__ */
798#if defined(_AIX)
799/* I don't know what this was needed for, but it pollutes the namespace.
800 So I turned it off. rms, 2 May 1997. */
801/* #include <malloc.h> */
802 #pragma alloca
803#define YYSTACK_USE_ALLOCA
804#else /* not MSDOS, or __TURBOC__, or _AIX */
805#if 0
806#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
807 and on HPUX 10. Eventually we can turn this on. */
808#define YYSTACK_USE_ALLOCA
809#define alloca __builtin_alloca
810#endif /* __hpux */
811#endif
812#endif /* not _AIX */
813#endif /* not MSDOS, or __TURBOC__ */
814#endif /* not sparc */
815#endif /* not GNU C */
816#endif /* alloca not defined */
817#endif /* YYSTACK_USE_ALLOCA not defined */
818
819#ifdef YYSTACK_USE_ALLOCA
820#define YYSTACK_ALLOC alloca
vlmfa67ddc2004-06-03 03:38:44 +0000821#else
vlm6a02a8a2004-09-08 00:28:11 +0000822#define YYSTACK_ALLOC malloc
vlmfa67ddc2004-06-03 03:38:44 +0000823#endif
824
vlm6a02a8a2004-09-08 00:28:11 +0000825/* Note: there must be only one dollar sign in this file.
826 It is replaced by the list of actions, each action
827 as one case of the switch. */
vlmfa67ddc2004-06-03 03:38:44 +0000828
829#define yyerrok (yyerrstatus = 0)
830#define yyclearin (yychar = YYEMPTY)
831#define YYEMPTY -2
832#define YYEOF 0
833#define YYACCEPT goto yyacceptlab
vlm6a02a8a2004-09-08 00:28:11 +0000834#define YYABORT goto yyabortlab
vlmfa67ddc2004-06-03 03:38:44 +0000835#define YYERROR goto yyerrlab1
vlm6a02a8a2004-09-08 00:28:11 +0000836/* Like YYERROR except do call yyerror.
837 This remains here temporarily to ease the
838 transition to the new meaning of YYERROR, for GCC.
vlmfa67ddc2004-06-03 03:38:44 +0000839 Once GCC version 2 has supplanted version 1, this can go. */
840#define YYFAIL goto yyerrlab
841#define YYRECOVERING() (!!yyerrstatus)
vlm6a02a8a2004-09-08 00:28:11 +0000842#define YYBACKUP(token, value) \
vlmfa67ddc2004-06-03 03:38:44 +0000843do \
844 if (yychar == YYEMPTY && yylen == 1) \
vlm6a02a8a2004-09-08 00:28:11 +0000845 { yychar = (token), yylval = (value); \
vlmfa67ddc2004-06-03 03:38:44 +0000846 yychar1 = YYTRANSLATE (yychar); \
847 YYPOPSTACK; \
848 goto yybackup; \
849 } \
850 else \
vlm6a02a8a2004-09-08 00:28:11 +0000851 { yyerror ("syntax error: cannot back up"); YYERROR; } \
vlmfa67ddc2004-06-03 03:38:44 +0000852while (0)
853
854#define YYTERROR 1
855#define YYERRCODE 256
856
vlm6a02a8a2004-09-08 00:28:11 +0000857#ifndef YYPURE
858#define YYLEX yylex()
vlmfa67ddc2004-06-03 03:38:44 +0000859#endif
860
vlm6a02a8a2004-09-08 00:28:11 +0000861#ifdef YYPURE
862#ifdef YYLSP_NEEDED
863#ifdef YYLEX_PARAM
864#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
865#else
866#define YYLEX yylex(&yylval, &yylloc)
867#endif
868#else /* not YYLSP_NEEDED */
869#ifdef YYLEX_PARAM
870#define YYLEX yylex(&yylval, YYLEX_PARAM)
871#else
872#define YYLEX yylex(&yylval)
873#endif
874#endif /* not YYLSP_NEEDED */
875#endif
vlmfa67ddc2004-06-03 03:38:44 +0000876
vlm6a02a8a2004-09-08 00:28:11 +0000877/* If nonreentrant, generate the variables here */
vlmfa67ddc2004-06-03 03:38:44 +0000878
vlm6a02a8a2004-09-08 00:28:11 +0000879#ifndef YYPURE
vlmfa67ddc2004-06-03 03:38:44 +0000880
vlm6a02a8a2004-09-08 00:28:11 +0000881int yychar; /* the lookahead symbol */
882YYSTYPE yylval; /* the semantic value of the */
883 /* lookahead symbol */
vlmfa67ddc2004-06-03 03:38:44 +0000884
vlm6a02a8a2004-09-08 00:28:11 +0000885#ifdef YYLSP_NEEDED
886YYLTYPE yylloc; /* location data for the lookahead */
887 /* symbol */
888#endif
vlmfa67ddc2004-06-03 03:38:44 +0000889
vlm6a02a8a2004-09-08 00:28:11 +0000890int yynerrs; /* number of parse errors so far */
891#endif /* not YYPURE */
892
893#if YYDEBUG != 0
894int yydebug; /* nonzero means print parse trace */
895/* Since this is uninitialized, it does not stop multiple parsers
896 from coexisting. */
897#endif
898
899/* YYINITDEPTH indicates the initial size of the parser's stacks */
900
vlmfa67ddc2004-06-03 03:38:44 +0000901#ifndef YYINITDEPTH
vlm6a02a8a2004-09-08 00:28:11 +0000902#define YYINITDEPTH 200
vlmfa67ddc2004-06-03 03:38:44 +0000903#endif
904
vlm6a02a8a2004-09-08 00:28:11 +0000905/* YYMAXDEPTH is the maximum size the stacks can grow to
906 (effective only if the built-in stack extension method is used). */
vlmfa67ddc2004-06-03 03:38:44 +0000907
908#if YYMAXDEPTH == 0
vlm6a02a8a2004-09-08 00:28:11 +0000909#undef YYMAXDEPTH
vlmfa67ddc2004-06-03 03:38:44 +0000910#endif
911
912#ifndef YYMAXDEPTH
vlm6a02a8a2004-09-08 00:28:11 +0000913#define YYMAXDEPTH 10000
vlmfa67ddc2004-06-03 03:38:44 +0000914#endif
915
vlm6a02a8a2004-09-08 00:28:11 +0000916/* Define __yy_memcpy. Note that the size argument
917 should be passed with type unsigned int, because that is what the non-GCC
918 definitions require. With GCC, __builtin_memcpy takes an arg
919 of type size_t, but it can handle unsigned int. */
vlmfa67ddc2004-06-03 03:38:44 +0000920
vlm6a02a8a2004-09-08 00:28:11 +0000921#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
922#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
923#else /* not GNU C or C++ */
924#ifndef __cplusplus
vlmfa67ddc2004-06-03 03:38:44 +0000925
vlm6a02a8a2004-09-08 00:28:11 +0000926/* This is the most reliable way to avoid incompatibilities
927 in available built-in functions on various systems. */
vlm80103492004-09-07 10:39:09 +0000928static void
vlm6a02a8a2004-09-08 00:28:11 +0000929__yy_memcpy (to, from, count)
930 char *to;
931 char *from;
932 unsigned int count;
vlm80103492004-09-07 10:39:09 +0000933{
vlm6a02a8a2004-09-08 00:28:11 +0000934 register char *f = from;
935 register char *t = to;
936 register int i = count;
vlm80103492004-09-07 10:39:09 +0000937
vlm6a02a8a2004-09-08 00:28:11 +0000938 while (i-- > 0)
939 *t++ = *f++;
vlm80103492004-09-07 10:39:09 +0000940}
vlm80103492004-09-07 10:39:09 +0000941
vlm6a02a8a2004-09-08 00:28:11 +0000942#else /* __cplusplus */
vlm80103492004-09-07 10:39:09 +0000943
vlm6a02a8a2004-09-08 00:28:11 +0000944/* This is the most reliable way to avoid incompatibilities
945 in available built-in functions on various systems. */
vlm80103492004-09-07 10:39:09 +0000946static void
vlm6a02a8a2004-09-08 00:28:11 +0000947__yy_memcpy (char *to, char *from, unsigned int count)
vlm80103492004-09-07 10:39:09 +0000948{
vlm6a02a8a2004-09-08 00:28:11 +0000949 register char *t = to;
950 register char *f = from;
951 register int i = count;
vlm80103492004-09-07 10:39:09 +0000952
vlm6a02a8a2004-09-08 00:28:11 +0000953 while (i-- > 0)
954 *t++ = *f++;
vlm044f7442004-09-04 04:49:21 +0000955}
vlm044f7442004-09-04 04:49:21 +0000956
vlm6a02a8a2004-09-08 00:28:11 +0000957#endif
958#endif
vlmfa67ddc2004-06-03 03:38:44 +0000959
vlm6a02a8a2004-09-08 00:28:11 +0000960#line 217 "/usr/share/bison.simple"
vlmfa67ddc2004-06-03 03:38:44 +0000961
962/* The user can define YYPARSE_PARAM as the name of an argument to be passed
963 into yyparse. The argument should have type void *.
964 It should actually point to an object.
965 Grammar actions can access the variable by casting it
966 to the proper pointer type. */
967
968#ifdef YYPARSE_PARAM
vlm6a02a8a2004-09-08 00:28:11 +0000969#ifdef __cplusplus
970#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
971#define YYPARSE_PARAM_DECL
972#else /* not __cplusplus */
973#define YYPARSE_PARAM_ARG YYPARSE_PARAM
974#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
975#endif /* not __cplusplus */
976#else /* not YYPARSE_PARAM */
977#define YYPARSE_PARAM_ARG
978#define YYPARSE_PARAM_DECL
979#endif /* not YYPARSE_PARAM */
vlmfa67ddc2004-06-03 03:38:44 +0000980
981/* Prevent warning if -Wstrict-prototypes. */
982#ifdef __GNUC__
vlm6a02a8a2004-09-08 00:28:11 +0000983#ifdef YYPARSE_PARAM
vlmfa67ddc2004-06-03 03:38:44 +0000984int yyparse (void *);
vlm6a02a8a2004-09-08 00:28:11 +0000985#else
vlmfa67ddc2004-06-03 03:38:44 +0000986int yyparse (void);
vlm6a02a8a2004-09-08 00:28:11 +0000987#endif
vlm39e5ed72004-09-05 10:40:41 +0000988#endif
vlm80103492004-09-07 10:39:09 +0000989
vlmfa67ddc2004-06-03 03:38:44 +0000990int
vlm6a02a8a2004-09-08 00:28:11 +0000991yyparse(YYPARSE_PARAM_ARG)
vlmfa67ddc2004-06-03 03:38:44 +0000992 YYPARSE_PARAM_DECL
993{
994 register int yystate;
995 register int yyn;
996 register short *yyssp;
997 register YYSTYPE *yyvsp;
vlm6a02a8a2004-09-08 00:28:11 +0000998 int yyerrstatus; /* number of tokens to shift before error messages enabled */
999 int yychar1 = 0; /* lookahead token as an internal (translated) token number */
vlmfa67ddc2004-06-03 03:38:44 +00001000
vlm6a02a8a2004-09-08 00:28:11 +00001001 short yyssa[YYINITDEPTH]; /* the state stack */
1002 YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
vlmfa67ddc2004-06-03 03:38:44 +00001003
vlm6a02a8a2004-09-08 00:28:11 +00001004 short *yyss = yyssa; /* refer to the stacks thru separate pointers */
1005 YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
vlmfa67ddc2004-06-03 03:38:44 +00001006
vlm6a02a8a2004-09-08 00:28:11 +00001007#ifdef YYLSP_NEEDED
1008 YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
1009 YYLTYPE *yyls = yylsa;
1010 YYLTYPE *yylsp;
1011
1012#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
1013#else
vlmfa67ddc2004-06-03 03:38:44 +00001014#define YYPOPSTACK (yyvsp--, yyssp--)
vlm6a02a8a2004-09-08 00:28:11 +00001015#endif
vlmfa67ddc2004-06-03 03:38:44 +00001016
vlm6a02a8a2004-09-08 00:28:11 +00001017 int yystacksize = YYINITDEPTH;
1018 int yyfree_stacks = 0;
vlmfa67ddc2004-06-03 03:38:44 +00001019
vlm6a02a8a2004-09-08 00:28:11 +00001020#ifdef YYPURE
1021 int yychar;
1022 YYSTYPE yylval;
1023 int yynerrs;
1024#ifdef YYLSP_NEEDED
1025 YYLTYPE yylloc;
1026#endif
1027#endif
vlmfa67ddc2004-06-03 03:38:44 +00001028
vlm6a02a8a2004-09-08 00:28:11 +00001029 YYSTYPE yyval; /* the variable used to return */
1030 /* semantic values from the action */
1031 /* routines */
vlmfa67ddc2004-06-03 03:38:44 +00001032
1033 int yylen;
1034
vlm6a02a8a2004-09-08 00:28:11 +00001035#if YYDEBUG != 0
1036 if (yydebug)
1037 fprintf(stderr, "Starting parse\n");
1038#endif
vlmfa67ddc2004-06-03 03:38:44 +00001039
1040 yystate = 0;
1041 yyerrstatus = 0;
1042 yynerrs = 0;
1043 yychar = YYEMPTY; /* Cause a token to be read. */
1044
1045 /* Initialize stack pointers.
1046 Waste one element of value and location stack
1047 so that they stay on the same level as the state stack.
1048 The wasted elements are never initialized. */
1049
vlm6a02a8a2004-09-08 00:28:11 +00001050 yyssp = yyss - 1;
vlmfa67ddc2004-06-03 03:38:44 +00001051 yyvsp = yyvs;
vlm6a02a8a2004-09-08 00:28:11 +00001052#ifdef YYLSP_NEEDED
1053 yylsp = yyls;
1054#endif
vlmfa67ddc2004-06-03 03:38:44 +00001055
vlm6a02a8a2004-09-08 00:28:11 +00001056/* Push a new state, which is found in yystate . */
1057/* In all cases, when you get here, the value and location stacks
1058 have just been pushed. so pushing a state here evens the stacks. */
1059yynewstate:
vlmfa67ddc2004-06-03 03:38:44 +00001060
vlm6a02a8a2004-09-08 00:28:11 +00001061 *++yyssp = yystate;
vlmfa67ddc2004-06-03 03:38:44 +00001062
1063 if (yyssp >= yyss + yystacksize - 1)
1064 {
vlm6a02a8a2004-09-08 00:28:11 +00001065 /* Give user a chance to reallocate the stack */
1066 /* Use copies of these so that the &'s don't force the real ones into memory. */
1067 YYSTYPE *yyvs1 = yyvs;
1068 short *yyss1 = yyss;
1069#ifdef YYLSP_NEEDED
1070 YYLTYPE *yyls1 = yyls;
1071#endif
1072
vlmfa67ddc2004-06-03 03:38:44 +00001073 /* Get the current used size of the three stacks, in elements. */
vlm6a02a8a2004-09-08 00:28:11 +00001074 int size = yyssp - yyss + 1;
vlmfa67ddc2004-06-03 03:38:44 +00001075
1076#ifdef yyoverflow
vlm6a02a8a2004-09-08 00:28:11 +00001077 /* Each stack pointer address is followed by the size of
1078 the data in use in that stack, in bytes. */
1079#ifdef YYLSP_NEEDED
1080 /* This used to be a conditional around just the two extra args,
1081 but that might be undefined if yyoverflow is a macro. */
1082 yyoverflow("parser stack overflow",
1083 &yyss1, size * sizeof (*yyssp),
1084 &yyvs1, size * sizeof (*yyvsp),
1085 &yyls1, size * sizeof (*yylsp),
1086 &yystacksize);
1087#else
1088 yyoverflow("parser stack overflow",
1089 &yyss1, size * sizeof (*yyssp),
1090 &yyvs1, size * sizeof (*yyvsp),
1091 &yystacksize);
1092#endif
vlmfa67ddc2004-06-03 03:38:44 +00001093
vlm6a02a8a2004-09-08 00:28:11 +00001094 yyss = yyss1; yyvs = yyvs1;
1095#ifdef YYLSP_NEEDED
1096 yyls = yyls1;
1097#endif
vlmfa67ddc2004-06-03 03:38:44 +00001098#else /* no yyoverflow */
1099 /* Extend the stack our own way. */
1100 if (yystacksize >= YYMAXDEPTH)
vlm6a02a8a2004-09-08 00:28:11 +00001101 {
1102 yyerror("parser stack overflow");
1103 if (yyfree_stacks)
1104 {
1105 free (yyss);
1106 free (yyvs);
1107#ifdef YYLSP_NEEDED
1108 free (yyls);
1109#endif
1110 }
1111 return 2;
1112 }
vlmfa67ddc2004-06-03 03:38:44 +00001113 yystacksize *= 2;
1114 if (yystacksize > YYMAXDEPTH)
1115 yystacksize = YYMAXDEPTH;
vlm6a02a8a2004-09-08 00:28:11 +00001116#ifndef YYSTACK_USE_ALLOCA
1117 yyfree_stacks = 1;
1118#endif
1119 yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
1120 __yy_memcpy ((char *)yyss, (char *)yyss1,
1121 size * (unsigned int) sizeof (*yyssp));
1122 yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
1123 __yy_memcpy ((char *)yyvs, (char *)yyvs1,
1124 size * (unsigned int) sizeof (*yyvsp));
1125#ifdef YYLSP_NEEDED
1126 yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
1127 __yy_memcpy ((char *)yyls, (char *)yyls1,
1128 size * (unsigned int) sizeof (*yylsp));
1129#endif
vlmfa67ddc2004-06-03 03:38:44 +00001130#endif /* no yyoverflow */
1131
vlm6a02a8a2004-09-08 00:28:11 +00001132 yyssp = yyss + size - 1;
1133 yyvsp = yyvs + size - 1;
1134#ifdef YYLSP_NEEDED
1135 yylsp = yyls + size - 1;
1136#endif
vlmfa67ddc2004-06-03 03:38:44 +00001137
vlm6a02a8a2004-09-08 00:28:11 +00001138#if YYDEBUG != 0
1139 if (yydebug)
1140 fprintf(stderr, "Stack size increased to %d\n", yystacksize);
1141#endif
vlmfa67ddc2004-06-03 03:38:44 +00001142
1143 if (yyssp >= yyss + yystacksize - 1)
1144 YYABORT;
1145 }
1146
vlm6a02a8a2004-09-08 00:28:11 +00001147#if YYDEBUG != 0
1148 if (yydebug)
1149 fprintf(stderr, "Entering state %d\n", yystate);
1150#endif
vlmfa67ddc2004-06-03 03:38:44 +00001151
1152 goto yybackup;
vlm6a02a8a2004-09-08 00:28:11 +00001153 yybackup:
vlmfa67ddc2004-06-03 03:38:44 +00001154
1155/* Do appropriate processing given the current state. */
1156/* Read a lookahead token if we need one and don't already have one. */
1157/* yyresume: */
1158
1159 /* First try to decide what to do without reference to lookahead token. */
1160
1161 yyn = yypact[yystate];
vlm6a02a8a2004-09-08 00:28:11 +00001162 if (yyn == YYFLAG)
vlmfa67ddc2004-06-03 03:38:44 +00001163 goto yydefault;
1164
1165 /* Not known => get a lookahead token if don't already have one. */
1166
1167 /* yychar is either YYEMPTY or YYEOF
1168 or a valid token in external form. */
1169
1170 if (yychar == YYEMPTY)
1171 {
vlm6a02a8a2004-09-08 00:28:11 +00001172#if YYDEBUG != 0
1173 if (yydebug)
1174 fprintf(stderr, "Reading a token: ");
1175#endif
vlmfa67ddc2004-06-03 03:38:44 +00001176 yychar = YYLEX;
1177 }
1178
vlm6a02a8a2004-09-08 00:28:11 +00001179 /* Convert token to internal form (in yychar1) for indexing tables with */
vlmfa67ddc2004-06-03 03:38:44 +00001180
vlm6a02a8a2004-09-08 00:28:11 +00001181 if (yychar <= 0) /* This means end of input. */
vlmfa67ddc2004-06-03 03:38:44 +00001182 {
1183 yychar1 = 0;
vlm6a02a8a2004-09-08 00:28:11 +00001184 yychar = YYEOF; /* Don't call YYLEX any more */
vlmfa67ddc2004-06-03 03:38:44 +00001185
vlm6a02a8a2004-09-08 00:28:11 +00001186#if YYDEBUG != 0
1187 if (yydebug)
1188 fprintf(stderr, "Now at end of input.\n");
1189#endif
vlmfa67ddc2004-06-03 03:38:44 +00001190 }
1191 else
1192 {
vlm6a02a8a2004-09-08 00:28:11 +00001193 yychar1 = YYTRANSLATE(yychar);
vlmfa67ddc2004-06-03 03:38:44 +00001194
vlm6a02a8a2004-09-08 00:28:11 +00001195#if YYDEBUG != 0
1196 if (yydebug)
1197 {
1198 fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
1199 /* Give the individual parser a way to print the precise meaning
1200 of a token, for further debugging info. */
1201#ifdef YYPRINT
1202 YYPRINT (stderr, yychar, yylval);
1203#endif
1204 fprintf (stderr, ")\n");
1205 }
1206#endif
vlmfa67ddc2004-06-03 03:38:44 +00001207 }
1208
1209 yyn += yychar1;
vlm6a02a8a2004-09-08 00:28:11 +00001210 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
vlmfa67ddc2004-06-03 03:38:44 +00001211 goto yydefault;
vlm6a02a8a2004-09-08 00:28:11 +00001212
vlmfa67ddc2004-06-03 03:38:44 +00001213 yyn = yytable[yyn];
vlm6a02a8a2004-09-08 00:28:11 +00001214
1215 /* yyn is what to do for this token type in this state.
1216 Negative => reduce, -yyn is rule number.
1217 Positive => shift, yyn is new state.
1218 New state is final state => don't bother to shift,
1219 just return success.
1220 0, or most negative number => error. */
1221
1222 if (yyn < 0)
vlmfa67ddc2004-06-03 03:38:44 +00001223 {
vlm6a02a8a2004-09-08 00:28:11 +00001224 if (yyn == YYFLAG)
vlmfa67ddc2004-06-03 03:38:44 +00001225 goto yyerrlab;
1226 yyn = -yyn;
1227 goto yyreduce;
1228 }
vlm6a02a8a2004-09-08 00:28:11 +00001229 else if (yyn == 0)
1230 goto yyerrlab;
vlmfa67ddc2004-06-03 03:38:44 +00001231
1232 if (yyn == YYFINAL)
1233 YYACCEPT;
1234
1235 /* Shift the lookahead token. */
vlm6a02a8a2004-09-08 00:28:11 +00001236
1237#if YYDEBUG != 0
1238 if (yydebug)
1239 fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
1240#endif
vlmfa67ddc2004-06-03 03:38:44 +00001241
1242 /* Discard the token being shifted unless it is eof. */
1243 if (yychar != YYEOF)
1244 yychar = YYEMPTY;
1245
1246 *++yyvsp = yylval;
vlm6a02a8a2004-09-08 00:28:11 +00001247#ifdef YYLSP_NEEDED
1248 *++yylsp = yylloc;
1249#endif
vlmfa67ddc2004-06-03 03:38:44 +00001250
vlm6a02a8a2004-09-08 00:28:11 +00001251 /* count tokens shifted since error; after three, turn off error status. */
1252 if (yyerrstatus) yyerrstatus--;
vlmfa67ddc2004-06-03 03:38:44 +00001253
1254 yystate = yyn;
1255 goto yynewstate;
1256
vlm6a02a8a2004-09-08 00:28:11 +00001257/* Do the default action for the current state. */
vlm80103492004-09-07 10:39:09 +00001258yydefault:
vlm6a02a8a2004-09-08 00:28:11 +00001259
vlmfa67ddc2004-06-03 03:38:44 +00001260 yyn = yydefact[yystate];
1261 if (yyn == 0)
1262 goto yyerrlab;
1263
vlm6a02a8a2004-09-08 00:28:11 +00001264/* Do a reduction. yyn is the number of a rule to reduce with. */
vlmfa67ddc2004-06-03 03:38:44 +00001265yyreduce:
1266 yylen = yyr2[yyn];
vlm6a02a8a2004-09-08 00:28:11 +00001267 if (yylen > 0)
1268 yyval = yyvsp[1-yylen]; /* implement default value of the action */
vlmfa67ddc2004-06-03 03:38:44 +00001269
vlm6a02a8a2004-09-08 00:28:11 +00001270#if YYDEBUG != 0
vlmfa67ddc2004-06-03 03:38:44 +00001271 if (yydebug)
1272 {
vlm6a02a8a2004-09-08 00:28:11 +00001273 int i;
vlmfa67ddc2004-06-03 03:38:44 +00001274
vlm6a02a8a2004-09-08 00:28:11 +00001275 fprintf (stderr, "Reducing via rule %d (line %d), ",
1276 yyn, yyrline[yyn]);
vlmfa67ddc2004-06-03 03:38:44 +00001277
1278 /* Print the symbols being reduced, and their result. */
vlm6a02a8a2004-09-08 00:28:11 +00001279 for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
1280 fprintf (stderr, "%s ", yytname[yyrhs[i]]);
1281 fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
vlmfa67ddc2004-06-03 03:38:44 +00001282 }
1283#endif
vlm80103492004-09-07 10:39:09 +00001284
vlm6a02a8a2004-09-08 00:28:11 +00001285
1286 switch (yyn) {
1287
1288case 1:
vlmfce48a42004-09-14 02:36:39 +00001289#line 300 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001290{
1291 *(void **)param = yyvsp[0].a_grammar;
1292 ;
1293 break;}
1294case 2:
vlmfce48a42004-09-14 02:36:39 +00001295#line 306 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001296{
vlmfa67ddc2004-06-03 03:38:44 +00001297 yyval.a_grammar = asn1p_new();
1298 checkmem(yyval.a_grammar);
1299 TQ_ADD(&(yyval.a_grammar->modules), yyvsp[0].a_module, mod_next);
vlm6a02a8a2004-09-08 00:28:11 +00001300 ;
1301 break;}
1302case 3:
vlmfce48a42004-09-14 02:36:39 +00001303#line 311 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001304{
vlmfa67ddc2004-06-03 03:38:44 +00001305 yyval.a_grammar = yyvsp[-1].a_grammar;
1306 TQ_ADD(&(yyval.a_grammar->modules), yyvsp[0].a_module, mod_next);
vlm6a02a8a2004-09-08 00:28:11 +00001307 ;
1308 break;}
1309case 4:
vlmfce48a42004-09-14 02:36:39 +00001310#line 332 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001311{
vlmfa67ddc2004-06-03 03:38:44 +00001312
1313 if(yyvsp[-1].a_module) {
1314 yyval.a_module = yyvsp[-1].a_module;
1315 } else {
1316 /* There's a chance that a module is just plain empty */
1317 yyval.a_module = asn1p_module_new();
1318 }
1319 checkmem(yyval.a_module);
1320
1321 yyval.a_module->Identifier = yyvsp[-7].tv_str;
1322 yyval.a_module->module_oid = yyvsp[-6].a_oid;
1323 yyval.a_module->module_flags = yyvsp[-4].a_module_flags;
vlm6a02a8a2004-09-08 00:28:11 +00001324 ;
1325 break;}
1326case 5:
vlmfce48a42004-09-14 02:36:39 +00001327#line 353 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001328{ yyval.a_oid = 0; ;
1329 break;}
1330case 6:
vlmfce48a42004-09-14 02:36:39 +00001331#line 354 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001332{ yyval.a_oid = yyvsp[0].a_oid; ;
1333 break;}
1334case 7:
vlmfce48a42004-09-14 02:36:39 +00001335#line 358 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001336{
vlmfa67ddc2004-06-03 03:38:44 +00001337 yyval.a_oid = yyvsp[-1].a_oid;
vlm6a02a8a2004-09-08 00:28:11 +00001338 ;
1339 break;}
1340case 8:
vlmfce48a42004-09-14 02:36:39 +00001341#line 361 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001342{
vlmfa67ddc2004-06-03 03:38:44 +00001343 yyval.a_oid = 0;
vlm6a02a8a2004-09-08 00:28:11 +00001344 ;
1345 break;}
1346case 9:
vlmfce48a42004-09-14 02:36:39 +00001347#line 367 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001348{
vlmfa67ddc2004-06-03 03:38:44 +00001349 yyval.a_oid = asn1p_oid_new();
1350 asn1p_oid_add_arc(yyval.a_oid, &yyvsp[0].a_oid_arc);
1351 if(yyvsp[0].a_oid_arc.name)
1352 free(yyvsp[0].a_oid_arc.name);
vlm6a02a8a2004-09-08 00:28:11 +00001353 ;
1354 break;}
1355case 10:
vlmfce48a42004-09-14 02:36:39 +00001356#line 373 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001357{
vlmfa67ddc2004-06-03 03:38:44 +00001358 yyval.a_oid = yyvsp[-1].a_oid;
1359 asn1p_oid_add_arc(yyval.a_oid, &yyvsp[0].a_oid_arc);
1360 if(yyvsp[0].a_oid_arc.name)
1361 free(yyvsp[0].a_oid_arc.name);
vlm6a02a8a2004-09-08 00:28:11 +00001362 ;
1363 break;}
1364case 11:
vlmfce48a42004-09-14 02:36:39 +00001365#line 382 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001366{ /* iso */
vlmfa67ddc2004-06-03 03:38:44 +00001367 yyval.a_oid_arc.name = yyvsp[0].tv_str;
1368 yyval.a_oid_arc.number = -1;
vlm6a02a8a2004-09-08 00:28:11 +00001369 ;
1370 break;}
1371case 12:
vlmfce48a42004-09-14 02:36:39 +00001372#line 386 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001373{ /* iso(1) */
vlmfa67ddc2004-06-03 03:38:44 +00001374 yyval.a_oid_arc.name = yyvsp[-3].tv_str;
1375 yyval.a_oid_arc.number = yyvsp[-1].a_int;
vlm6a02a8a2004-09-08 00:28:11 +00001376 ;
1377 break;}
1378case 13:
vlmfce48a42004-09-14 02:36:39 +00001379#line 390 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001380{ /* 1 */
vlmfa67ddc2004-06-03 03:38:44 +00001381 yyval.a_oid_arc.name = 0;
1382 yyval.a_oid_arc.number = yyvsp[0].a_int;
vlm6a02a8a2004-09-08 00:28:11 +00001383 ;
1384 break;}
1385case 14:
vlmfce48a42004-09-14 02:36:39 +00001386#line 400 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001387{ yyval.a_module_flags = MSF_NOFLAGS; ;
1388 break;}
1389case 15:
vlmfce48a42004-09-14 02:36:39 +00001390#line 401 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001391{
vlmfa67ddc2004-06-03 03:38:44 +00001392 yyval.a_module_flags = yyvsp[0].a_module_flags;
vlm6a02a8a2004-09-08 00:28:11 +00001393 ;
1394 break;}
1395case 16:
vlmfce48a42004-09-14 02:36:39 +00001396#line 410 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001397{
vlmfa67ddc2004-06-03 03:38:44 +00001398 yyval.a_module_flags = yyvsp[0].a_module_flags;
vlm6a02a8a2004-09-08 00:28:11 +00001399 ;
1400 break;}
1401case 17:
vlmfce48a42004-09-14 02:36:39 +00001402#line 413 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001403{
vlmfa67ddc2004-06-03 03:38:44 +00001404 yyval.a_module_flags = yyvsp[-1].a_module_flags | yyvsp[0].a_module_flags;
vlm6a02a8a2004-09-08 00:28:11 +00001405 ;
1406 break;}
1407case 18:
vlmfce48a42004-09-14 02:36:39 +00001408#line 422 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001409{
vlmfa67ddc2004-06-03 03:38:44 +00001410 yyval.a_module_flags = MSF_EXPLICIT_TAGS;
vlm6a02a8a2004-09-08 00:28:11 +00001411 ;
1412 break;}
1413case 19:
vlmfce48a42004-09-14 02:36:39 +00001414#line 425 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001415{
vlmfa67ddc2004-06-03 03:38:44 +00001416 yyval.a_module_flags = MSF_IMPLICIT_TAGS;
vlm6a02a8a2004-09-08 00:28:11 +00001417 ;
1418 break;}
1419case 20:
vlmfce48a42004-09-14 02:36:39 +00001420#line 428 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001421{
vlmfa67ddc2004-06-03 03:38:44 +00001422 yyval.a_module_flags = MSF_AUTOMATIC_TAGS;
vlm6a02a8a2004-09-08 00:28:11 +00001423 ;
1424 break;}
1425case 21:
vlmfce48a42004-09-14 02:36:39 +00001426#line 431 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001427{
vlmfa67ddc2004-06-03 03:38:44 +00001428 yyval.a_module_flags = MSF_EXTENSIBILITY_IMPLIED;
vlm6a02a8a2004-09-08 00:28:11 +00001429 ;
1430 break;}
1431case 22:
vlmfce48a42004-09-14 02:36:39 +00001432#line 435 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001433{
vlm9283dbe2004-08-18 04:59:12 +00001434 /* X.680Amd1 specifies TAG and XER */
1435 if(strcmp(yyvsp[-1].tv_str, "TAG") == 0) {
1436 yyval.a_module_flags = MSF_TAG_INSTRUCTIONS;
1437 } else if(strcmp(yyvsp[-1].tv_str, "XER") == 0) {
1438 yyval.a_module_flags = MSF_XER_INSTRUCTIONS;
1439 } else {
1440 fprintf(stderr,
1441 "WARNING: %s INSTRUCTIONS at line %d: "
1442 "Unrecognized encoding reference\n",
1443 yyvsp[-1].tv_str, yylineno);
1444 yyval.a_module_flags = MSF_unk_INSTRUCTIONS;
1445 }
1446 free(yyvsp[-1].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00001447 ;
1448 break;}
1449case 23:
vlmfce48a42004-09-14 02:36:39 +00001450#line 456 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001451{ yyval.a_module = 0; ;
1452 break;}
1453case 24:
vlmfce48a42004-09-14 02:36:39 +00001454#line 457 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001455{
vlmfa67ddc2004-06-03 03:38:44 +00001456 yyval.a_module = yyvsp[0].a_module;
vlm6a02a8a2004-09-08 00:28:11 +00001457 ;
1458 break;}
1459case 25:
vlmfce48a42004-09-14 02:36:39 +00001460#line 466 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001461{
vlm9283dbe2004-08-18 04:59:12 +00001462 yyval.a_module = yyvsp[0].a_module;
vlm6a02a8a2004-09-08 00:28:11 +00001463 ;
1464 break;}
1465case 26:
vlmfce48a42004-09-14 02:36:39 +00001466#line 469 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001467{
vlmfa67ddc2004-06-03 03:38:44 +00001468 yyval.a_module = yyvsp[-1].a_module;
1469
vlm9283dbe2004-08-18 04:59:12 +00001470 /* Behave well when one of them is skipped. */
1471 if(!(yyvsp[-1].a_module)) {
1472 if(yyvsp[0].a_module) yyval.a_module = yyvsp[0].a_module;
1473 break;
1474 }
1475
vlmfa67ddc2004-06-03 03:38:44 +00001476#ifdef MY_IMPORT
1477#error MY_IMPORT DEFINED ELSEWHERE!
1478#endif
1479#define MY_IMPORT(foo,field) do { \
vlm97ed7152004-08-13 12:31:09 +00001480 while(TQ_FIRST(&(yyvsp[0].a_module->foo))) { \
vlmfa67ddc2004-06-03 03:38:44 +00001481 TQ_ADD(&(yyval.a_module->foo), \
1482 TQ_REMOVE(&(yyvsp[0].a_module->foo), field), \
1483 field); \
vlm97ed7152004-08-13 12:31:09 +00001484 } \
1485 assert(TQ_FIRST(&(yyvsp[0].a_module->foo)) == 0); \
1486 } while(0)
vlmfa67ddc2004-06-03 03:38:44 +00001487
1488 MY_IMPORT(imports, xp_next);
1489 MY_IMPORT(exports, xp_next);
1490 MY_IMPORT(members, next);
1491#undef MY_IMPORT
1492
vlm6a02a8a2004-09-08 00:28:11 +00001493 ;
1494 break;}
1495case 27:
vlmfce48a42004-09-14 02:36:39 +00001496#line 502 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001497{
vlmfa67ddc2004-06-03 03:38:44 +00001498 yyval.a_module = yyvsp[0].a_module;
vlm6a02a8a2004-09-08 00:28:11 +00001499 ;
1500 break;}
1501case 28:
vlmfce48a42004-09-14 02:36:39 +00001502#line 505 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001503{
vlmfa67ddc2004-06-03 03:38:44 +00001504 yyval.a_module = asn1p_module_new();
1505 checkmem(yyval.a_module);
1506 if(yyvsp[0].a_xports) {
1507 TQ_ADD(&(yyval.a_module->exports), yyvsp[0].a_xports, xp_next);
1508 } else {
1509 /* "EXPORTS ALL;" ? */
1510 }
vlm6a02a8a2004-09-08 00:28:11 +00001511 ;
1512 break;}
1513case 29:
vlmfce48a42004-09-14 02:36:39 +00001514#line 514 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001515{
vlmfa67ddc2004-06-03 03:38:44 +00001516 yyval.a_module = asn1p_module_new();
1517 checkmem(yyval.a_module);
1518 assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
1519 assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
1520 TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001521 ;
1522 break;}
1523case 30:
vlmfce48a42004-09-14 02:36:39 +00001524#line 521 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001525{
vlm9283dbe2004-08-18 04:59:12 +00001526 yyval.a_module = asn1p_module_new();
1527 checkmem(yyval.a_module);
1528 assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
1529 assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
1530 TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001531 ;
1532 break;}
1533case 31:
vlmfce48a42004-09-14 02:36:39 +00001534#line 534 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001535{
vlm9283dbe2004-08-18 04:59:12 +00001536 yyval.a_module = asn1p_module_new();
1537 checkmem(yyval.a_module);
1538 assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
1539 assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
1540 TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001541 ;
1542 break;}
1543case 32:
vlmfce48a42004-09-14 02:36:39 +00001544#line 542 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001545{ asn1p_lexer_hack_push_encoding_control(); ;
1546 break;}
1547case 33:
vlmfce48a42004-09-14 02:36:39 +00001548#line 543 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001549{
vlm9283dbe2004-08-18 04:59:12 +00001550 fprintf(stderr,
1551 "WARNING: ENCODING-CONTROL %s "
1552 "specification at line %d ignored\n",
1553 yyvsp[-1].tv_str, yylineno);
1554 free(yyvsp[-1].tv_str);
1555 yyval.a_module = 0;
vlm6a02a8a2004-09-08 00:28:11 +00001556 ;
1557 break;}
1558case 34:
vlmfce48a42004-09-14 02:36:39 +00001559#line 555 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001560{
vlmfa67ddc2004-06-03 03:38:44 +00001561 return yyerror(
1562 "Attempt to redefine a standard basic type, "
1563 "use -ftypesXY to switch back "
1564 "to older version of ASN.1 standard");
vlm6a02a8a2004-09-08 00:28:11 +00001565 ;
1566 break;}
1567case 35:
vlmfce48a42004-09-14 02:36:39 +00001568#line 569 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001569{
vlmfa67ddc2004-06-03 03:38:44 +00001570 yyval.a_module = yyvsp[-1].a_module;
vlm6a02a8a2004-09-08 00:28:11 +00001571 ;
1572 break;}
1573case 36:
vlmfce48a42004-09-14 02:36:39 +00001574#line 575 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001575{
vlmfa67ddc2004-06-03 03:38:44 +00001576 return yyerror("Empty IMPORTS list");
vlm6a02a8a2004-09-08 00:28:11 +00001577 ;
1578 break;}
1579case 37:
vlmfce48a42004-09-14 02:36:39 +00001580#line 581 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001581{
vlmfa67ddc2004-06-03 03:38:44 +00001582 yyval.a_module = asn1p_module_new();
1583 checkmem(yyval.a_module);
1584 TQ_ADD(&(yyval.a_module->imports), yyvsp[0].a_xports, xp_next);
vlm6a02a8a2004-09-08 00:28:11 +00001585 ;
1586 break;}
1587case 38:
vlmfce48a42004-09-14 02:36:39 +00001588#line 586 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001589{
vlmfa67ddc2004-06-03 03:38:44 +00001590 yyval.a_module = yyvsp[-1].a_module;
1591 TQ_ADD(&(yyval.a_module->imports), yyvsp[0].a_xports, xp_next);
vlm6a02a8a2004-09-08 00:28:11 +00001592 ;
1593 break;}
1594case 39:
vlmfce48a42004-09-14 02:36:39 +00001595#line 593 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001596{
vlmfa67ddc2004-06-03 03:38:44 +00001597 yyval.a_xports = yyvsp[-3].a_xports;
1598 yyval.a_xports->from = yyvsp[-1].tv_str;
1599 yyval.a_xports->from_oid = yyvsp[0].a_oid;
1600 checkmem(yyval.a_xports);
vlm6a02a8a2004-09-08 00:28:11 +00001601 ;
1602 break;}
1603case 40:
vlmfce48a42004-09-14 02:36:39 +00001604#line 602 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001605{
vlmfa67ddc2004-06-03 03:38:44 +00001606 yyval.a_xports = asn1p_xports_new();
1607 checkmem(yyval.a_xports);
1608 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001609 ;
1610 break;}
1611case 41:
vlmfce48a42004-09-14 02:36:39 +00001612#line 607 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001613{
vlmfa67ddc2004-06-03 03:38:44 +00001614 yyval.a_xports = yyvsp[-2].a_xports;
1615 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001616 ;
1617 break;}
1618case 42:
vlmfce48a42004-09-14 02:36:39 +00001619#line 614 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001620{
vlmfa67ddc2004-06-03 03:38:44 +00001621 yyval.a_expr = asn1p_expr_new(yylineno);
1622 checkmem(yyval.a_expr);
1623 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1624 yyval.a_expr->expr_type = A1TC_REFERENCE;
vlm6a02a8a2004-09-08 00:28:11 +00001625 ;
1626 break;}
1627case 43:
vlmfce48a42004-09-14 02:36:39 +00001628#line 620 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001629{
vlmfa67ddc2004-06-03 03:38:44 +00001630 yyval.a_expr = asn1p_expr_new(yylineno);
1631 checkmem(yyval.a_expr);
1632 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1633 yyval.a_expr->expr_type = A1TC_REFERENCE;
vlm6a02a8a2004-09-08 00:28:11 +00001634 ;
1635 break;}
1636case 44:
vlmfce48a42004-09-14 02:36:39 +00001637#line 629 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001638{
vlmfa67ddc2004-06-03 03:38:44 +00001639 yyval.a_xports = yyvsp[-1].a_xports;
vlm6a02a8a2004-09-08 00:28:11 +00001640 ;
1641 break;}
1642case 45:
vlmfce48a42004-09-14 02:36:39 +00001643#line 632 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001644{
vlmfa67ddc2004-06-03 03:38:44 +00001645 yyval.a_xports = 0;
vlm6a02a8a2004-09-08 00:28:11 +00001646 ;
1647 break;}
1648case 46:
vlmfce48a42004-09-14 02:36:39 +00001649#line 635 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001650{
vlmfa67ddc2004-06-03 03:38:44 +00001651 /* Empty EXPORTS clause effectively prohibits export. */
1652 yyval.a_xports = asn1p_xports_new();
1653 checkmem(yyval.a_xports);
vlm6a02a8a2004-09-08 00:28:11 +00001654 ;
1655 break;}
1656case 47:
vlmfce48a42004-09-14 02:36:39 +00001657#line 643 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001658{
vlmfa67ddc2004-06-03 03:38:44 +00001659 yyval.a_xports = asn1p_xports_new();
1660 assert(yyval.a_xports);
1661 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001662 ;
1663 break;}
1664case 48:
vlmfce48a42004-09-14 02:36:39 +00001665#line 648 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001666{
vlmfa67ddc2004-06-03 03:38:44 +00001667 yyval.a_xports = yyvsp[-2].a_xports;
1668 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001669 ;
1670 break;}
1671case 49:
vlmfce48a42004-09-14 02:36:39 +00001672#line 655 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001673{
vlmfa67ddc2004-06-03 03:38:44 +00001674 yyval.a_expr = asn1p_expr_new(yylineno);
1675 checkmem(yyval.a_expr);
1676 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1677 yyval.a_expr->expr_type = A1TC_EXPORTVAR;
vlm6a02a8a2004-09-08 00:28:11 +00001678 ;
1679 break;}
1680case 50:
vlmfce48a42004-09-14 02:36:39 +00001681#line 661 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001682{
vlmfa67ddc2004-06-03 03:38:44 +00001683 yyval.a_expr = asn1p_expr_new(yylineno);
1684 checkmem(yyval.a_expr);
1685 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1686 yyval.a_expr->expr_type = A1TC_EXPORTVAR;
vlm6a02a8a2004-09-08 00:28:11 +00001687 ;
1688 break;}
1689case 51:
vlmfce48a42004-09-14 02:36:39 +00001690#line 671 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001691{
vlmfa67ddc2004-06-03 03:38:44 +00001692 yyval.a_expr = yyvsp[-4].a_expr;
1693 assert(yyval.a_expr->Identifier == 0);
1694 yyval.a_expr->Identifier = yyvsp[-5].tv_str;
1695 yyval.a_expr->meta_type = AMT_VALUESET;
1696 // take care of optValueSetBody
vlm6a02a8a2004-09-08 00:28:11 +00001697 ;
1698 break;}
1699case 52:
vlmfce48a42004-09-14 02:36:39 +00001700#line 681 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001701{
vlmfa67ddc2004-06-03 03:38:44 +00001702 yyval.a_expr = asn1p_expr_new(yylineno);
1703 checkmem(yyval.a_expr);
1704 yyval.a_expr->reference = yyvsp[0].a_ref;
1705 yyval.a_expr->expr_type = A1TC_REFERENCE;
1706 yyval.a_expr->meta_type = AMT_TYPEREF;
vlm6a02a8a2004-09-08 00:28:11 +00001707 ;
1708 break;}
1709case 53:
vlmfce48a42004-09-14 02:36:39 +00001710#line 688 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001711{
vlmfa67ddc2004-06-03 03:38:44 +00001712 yyval.a_expr = asn1p_expr_new(yylineno);
1713 checkmem(yyval.a_expr);
1714 yyval.a_expr->expr_type = yyvsp[0].a_type;
1715 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00001716 ;
1717 break;}
1718case 54:
vlmfce48a42004-09-14 02:36:39 +00001719#line 697 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001720{ ;
1721 break;}
1722case 55:
vlmfce48a42004-09-14 02:36:39 +00001723#line 698 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001724{
1725 ;
1726 break;}
1727case 56:
vlmfce48a42004-09-14 02:36:39 +00001728#line 709 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001729{
1730 ;
1731 break;}
1732case 57:
vlmfce48a42004-09-14 02:36:39 +00001733#line 711 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001734{
1735 ;
1736 break;}
1737case 58:
vlmfce48a42004-09-14 02:36:39 +00001738#line 716 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001739{
1740 ;
1741 break;}
1742case 59:
vlmfce48a42004-09-14 02:36:39 +00001743#line 718 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001744{
1745 ;
1746 break;}
1747case 60:
vlmfce48a42004-09-14 02:36:39 +00001748#line 734 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001749{
vlmfa67ddc2004-06-03 03:38:44 +00001750 yyval.a_expr = asn1p_expr_new(yylineno);
1751 checkmem(yyval.a_expr);
1752 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
1753 yyval.a_expr->tag = yyvsp[-1].a_tag;
1754 yyval.a_expr->expr_type = A1TC_TYPEID;
1755 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00001756 ;
1757 break;}
1758case 61:
vlmfce48a42004-09-14 02:36:39 +00001759#line 742 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001760{
vlmfa67ddc2004-06-03 03:38:44 +00001761 yyval.a_expr = yyvsp[0].a_expr;
vlmfce48a42004-09-14 02:36:39 +00001762 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
vlmfa67ddc2004-06-03 03:38:44 +00001763 assert(yyval.a_expr->expr_type);
1764 assert(yyval.a_expr->meta_type);
vlm6a02a8a2004-09-08 00:28:11 +00001765 ;
1766 break;}
1767case 62:
vlmfce48a42004-09-14 02:36:39 +00001768#line 748 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001769{
vlmfa67ddc2004-06-03 03:38:44 +00001770 yyval.a_expr = yyvsp[0].a_expr;
1771 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
1772 assert(yyval.a_expr->expr_type == A1TC_CLASSDEF);
1773 assert(yyval.a_expr->meta_type == AMT_OBJECT);
vlm6a02a8a2004-09-08 00:28:11 +00001774 ;
1775 break;}
1776case 63:
vlmfce48a42004-09-14 02:36:39 +00001777#line 764 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001778{
vlmfa67ddc2004-06-03 03:38:44 +00001779 yyval.a_expr = yyvsp[0].a_expr;
1780 assert(yyval.a_expr->Identifier == 0);
1781 yyval.a_expr->Identifier = yyvsp[-5].tv_str;
1782 yyval.a_expr->params = yyvsp[-3].a_plist;
1783 yyval.a_expr->meta_type = AMT_PARAMTYPE;
vlm6a02a8a2004-09-08 00:28:11 +00001784 ;
1785 break;}
1786case 64:
vlmfce48a42004-09-14 02:36:39 +00001787#line 774 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001788{
vlmfa67ddc2004-06-03 03:38:44 +00001789 int ret;
1790 yyval.a_plist = asn1p_paramlist_new(yylineno);
1791 checkmem(yyval.a_plist);
1792 ret = asn1p_paramlist_add_param(yyval.a_plist, yyvsp[0].a_parg.governor, yyvsp[0].a_parg.argument);
1793 checkmem(ret == 0);
1794 if(yyvsp[0].a_parg.governor) asn1p_ref_free(yyvsp[0].a_parg.governor);
1795 if(yyvsp[0].a_parg.argument) free(yyvsp[0].a_parg.argument);
vlm6a02a8a2004-09-08 00:28:11 +00001796 ;
1797 break;}
1798case 65:
vlmfce48a42004-09-14 02:36:39 +00001799#line 783 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001800{
vlmfa67ddc2004-06-03 03:38:44 +00001801 int ret;
1802 yyval.a_plist = yyvsp[-2].a_plist;
1803 ret = asn1p_paramlist_add_param(yyval.a_plist, yyvsp[0].a_parg.governor, yyvsp[0].a_parg.argument);
1804 checkmem(ret == 0);
1805 if(yyvsp[0].a_parg.governor) asn1p_ref_free(yyvsp[0].a_parg.governor);
1806 if(yyvsp[0].a_parg.argument) free(yyvsp[0].a_parg.argument);
vlm6a02a8a2004-09-08 00:28:11 +00001807 ;
1808 break;}
1809case 66:
vlmfce48a42004-09-14 02:36:39 +00001810#line 794 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001811{
vlmfa67ddc2004-06-03 03:38:44 +00001812 yyval.a_parg.governor = NULL;
1813 yyval.a_parg.argument = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00001814 ;
1815 break;}
1816case 67:
vlmfce48a42004-09-14 02:36:39 +00001817#line 798 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001818{
vlmfa67ddc2004-06-03 03:38:44 +00001819 int ret;
1820 yyval.a_parg.governor = asn1p_ref_new(yylineno);
1821 ret = asn1p_ref_add_component(yyval.a_parg.governor, yyvsp[-2].tv_str, 0);
1822 checkmem(ret == 0);
1823 yyval.a_parg.argument = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00001824 ;
1825 break;}
1826case 68:
vlmfce48a42004-09-14 02:36:39 +00001827#line 805 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001828{
vlmfa67ddc2004-06-03 03:38:44 +00001829 int ret;
1830 yyval.a_parg.governor = asn1p_ref_new(yylineno);
1831 ret = asn1p_ref_add_component(yyval.a_parg.governor,
1832 ASN_EXPR_TYPE2STR(yyvsp[-2].a_type), 1);
1833 checkmem(ret == 0);
1834 yyval.a_parg.argument = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00001835 ;
1836 break;}
1837case 69:
vlmfce48a42004-09-14 02:36:39 +00001838#line 816 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001839{
vlmfa67ddc2004-06-03 03:38:44 +00001840 yyval.a_expr = asn1p_expr_new(yylineno);
1841 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00001842 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1843 ;
1844 break;}
1845case 70:
vlmfce48a42004-09-14 02:36:39 +00001846#line 821 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001847{
vlmfa67ddc2004-06-03 03:38:44 +00001848 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001849 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1850 ;
1851 break;}
1852case 71:
vlmfce48a42004-09-14 02:36:39 +00001853#line 828 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001854{
vlmfa67ddc2004-06-03 03:38:44 +00001855 yyval.a_expr = yyvsp[0].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001856 ;
1857 break;}
1858case 72:
vlmfce48a42004-09-14 02:36:39 +00001859#line 831 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001860{
vlmfa67ddc2004-06-03 03:38:44 +00001861 yyval.a_expr = asn1p_expr_new(yylineno);
1862 checkmem(yyval.a_expr);
1863 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1864 yyval.a_expr->expr_type = A1TC_REFERENCE;
1865 yyval.a_expr->meta_type = AMT_VALUE;
vlm6a02a8a2004-09-08 00:28:11 +00001866 ;
1867 break;}
1868case 73:
vlmfce48a42004-09-14 02:36:39 +00001869#line 844 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001870{
vlmfa67ddc2004-06-03 03:38:44 +00001871 yyval.a_expr = asn1p_expr_new(yylineno);
1872 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00001873 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1874 ;
1875 break;}
1876case 74:
vlmfce48a42004-09-14 02:36:39 +00001877#line 849 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001878{
vlmfa67ddc2004-06-03 03:38:44 +00001879 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001880 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1881 ;
1882 break;}
1883case 75:
vlmfce48a42004-09-14 02:36:39 +00001884#line 856 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001885{
vlmec8f6812004-08-22 03:19:54 +00001886 yyval.a_expr = yyvsp[-1].a_expr;
1887 assert(yyval.a_expr->Identifier == 0);
vlmfce48a42004-09-14 02:36:39 +00001888 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
vlmec8f6812004-08-22 03:19:54 +00001889 yyval.a_expr->marker = yyvsp[0].a_marker;
vlm6a02a8a2004-09-08 00:28:11 +00001890 ;
1891 break;}
1892case 76:
vlmfce48a42004-09-14 02:36:39 +00001893#line 862 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001894{
vlmec8f6812004-08-22 03:19:54 +00001895 yyval.a_expr = asn1p_expr_new(yylineno);
1896 checkmem(yyval.a_expr);
1897 yyval.a_expr->meta_type = yyvsp[0].a_expr->meta_type;
1898 yyval.a_expr->expr_type = A1TC_COMPONENTS_OF;
vlm6a02a8a2004-09-08 00:28:11 +00001899 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1900 ;
1901 break;}
1902case 77:
vlmfce48a42004-09-14 02:36:39 +00001903#line 869 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001904{
vlmec8f6812004-08-22 03:19:54 +00001905 yyval.a_expr = yyvsp[0].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001906 ;
1907 break;}
1908case 78:
vlmfce48a42004-09-14 02:36:39 +00001909#line 875 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001910{
vlmec8f6812004-08-22 03:19:54 +00001911 yyval.a_expr = asn1p_expr_new(yylineno);
1912 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00001913 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1914 ;
1915 break;}
1916case 79:
vlmfce48a42004-09-14 02:36:39 +00001917#line 880 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001918{
vlmec8f6812004-08-22 03:19:54 +00001919 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001920 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1921 ;
1922 break;}
1923case 80:
vlmfce48a42004-09-14 02:36:39 +00001924#line 887 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001925{
vlmec8f6812004-08-22 03:19:54 +00001926 yyval.a_expr = yyvsp[0].a_expr;
1927 assert(yyval.a_expr->Identifier == 0);
vlmfce48a42004-09-14 02:36:39 +00001928 yyval.a_expr->Identifier = yyvsp[-1].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00001929 ;
1930 break;}
1931case 81:
vlmfce48a42004-09-14 02:36:39 +00001932#line 892 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001933{
vlmec8f6812004-08-22 03:19:54 +00001934 yyval.a_expr = yyvsp[0].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001935 ;
1936 break;}
1937case 82:
vlmfce48a42004-09-14 02:36:39 +00001938#line 898 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001939{
vlmfa67ddc2004-06-03 03:38:44 +00001940 yyval.a_expr = yyvsp[-2].a_expr;
1941 checkmem(yyval.a_expr);
1942 yyval.a_expr->with_syntax = yyvsp[0].a_wsynt;
1943 assert(yyval.a_expr->expr_type == A1TC_CLASSDEF);
1944 assert(yyval.a_expr->meta_type == AMT_OBJECT);
vlm6a02a8a2004-09-08 00:28:11 +00001945 ;
1946 break;}
1947case 83:
vlmfce48a42004-09-14 02:36:39 +00001948#line 908 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001949{ yyval.a_int = 0; ;
1950 break;}
1951case 84:
vlmfce48a42004-09-14 02:36:39 +00001952#line 909 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001953{ yyval.a_int = 1; ;
1954 break;}
1955case 85:
vlmfce48a42004-09-14 02:36:39 +00001956#line 913 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001957{
vlmfa67ddc2004-06-03 03:38:44 +00001958 yyval.a_expr = asn1p_expr_new(yylineno);
1959 checkmem(yyval.a_expr);
1960 yyval.a_expr->expr_type = A1TC_CLASSDEF;
1961 yyval.a_expr->meta_type = AMT_OBJECT;
vlm6a02a8a2004-09-08 00:28:11 +00001962 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1963 ;
1964 break;}
1965case 86:
vlmfce48a42004-09-14 02:36:39 +00001966#line 920 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001967{
vlmfa67ddc2004-06-03 03:38:44 +00001968 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001969 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1970 ;
1971 break;}
1972case 87:
vlmfce48a42004-09-14 02:36:39 +00001973#line 927 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001974{
vlmfa67ddc2004-06-03 03:38:44 +00001975 yyval.a_expr = asn1p_expr_new(yylineno);
1976 checkmem(yyval.a_expr);
1977 yyval.a_expr->Identifier = yyvsp[-1].a_refcomp.name;
1978 yyval.a_expr->expr_type = A1TC_CLASSFIELD;
1979 yyval.a_expr->meta_type = AMT_OBJECTFIELD;
1980 yyval.a_expr->marker = yyvsp[0].a_marker;
vlm6a02a8a2004-09-08 00:28:11 +00001981 ;
1982 break;}
1983case 88:
vlmfce48a42004-09-14 02:36:39 +00001984#line 935 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001985{
vlmec8f6812004-08-22 03:19:54 +00001986 yyval.a_expr = yyvsp[-2].a_expr;
1987 yyval.a_expr->Identifier = yyvsp[-3].a_refcomp.name;
1988 yyval.a_expr->marker = yyvsp[-1].a_marker;
vlmfa67ddc2004-06-03 03:38:44 +00001989 yyval.a_expr->unique = yyvsp[0].a_int;
vlm6a02a8a2004-09-08 00:28:11 +00001990 ;
1991 break;}
1992case 89:
vlmfce48a42004-09-14 02:36:39 +00001993#line 941 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001994{
vlmfa67ddc2004-06-03 03:38:44 +00001995 int ret;
1996 yyval.a_expr = asn1p_expr_new(yylineno);
1997 checkmem(yyval.a_expr);
1998 yyval.a_expr->Identifier = yyvsp[-3].a_refcomp.name;
1999 yyval.a_expr->reference = asn1p_ref_new(yylineno);
2000 checkmem(yyval.a_expr->reference);
2001 ret = asn1p_ref_add_component(yyval.a_expr->reference,
2002 yyvsp[-2].a_refcomp.name, yyvsp[-2].a_refcomp.lex_type);
2003 checkmem(ret == 0);
2004 yyval.a_expr->expr_type = A1TC_CLASSFIELD;
2005 yyval.a_expr->meta_type = AMT_OBJECTFIELD;
2006 yyval.a_expr->marker = yyvsp[-1].a_marker;
2007 yyval.a_expr->unique = yyvsp[0].a_int;
vlm6a02a8a2004-09-08 00:28:11 +00002008 ;
2009 break;}
2010case 90:
vlmfce48a42004-09-14 02:36:39 +00002011#line 959 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002012{ yyval.a_wsynt = 0; ;
2013 break;}
2014case 91:
vlmfce48a42004-09-14 02:36:39 +00002015#line 960 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002016{
vlmfa67ddc2004-06-03 03:38:44 +00002017 yyval.a_wsynt = yyvsp[0].a_wsynt;
vlm6a02a8a2004-09-08 00:28:11 +00002018 ;
2019 break;}
2020case 92:
vlmfce48a42004-09-14 02:36:39 +00002021#line 967 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002022{ asn1p_lexer_hack_enable_with_syntax(); ;
2023 break;}
2024case 93:
vlmfce48a42004-09-14 02:36:39 +00002025#line 969 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002026{
vlmfa67ddc2004-06-03 03:38:44 +00002027 yyval.a_wsynt = yyvsp[-1].a_wsynt;
vlm6a02a8a2004-09-08 00:28:11 +00002028 ;
2029 break;}
2030case 94:
vlmfce48a42004-09-14 02:36:39 +00002031#line 975 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002032{
vlmfa67ddc2004-06-03 03:38:44 +00002033 yyval.a_wsynt = asn1p_wsyntx_new();
2034 TQ_ADD(&(yyval.a_wsynt->chunks), yyvsp[0].a_wchunk, next);
vlm6a02a8a2004-09-08 00:28:11 +00002035 ;
2036 break;}
2037case 95:
vlmfce48a42004-09-14 02:36:39 +00002038#line 979 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002039{
vlmfa67ddc2004-06-03 03:38:44 +00002040 yyval.a_wsynt = yyvsp[-1].a_wsynt;
2041 TQ_ADD(&(yyval.a_wsynt->chunks), yyvsp[0].a_wchunk, next);
vlm6a02a8a2004-09-08 00:28:11 +00002042 ;
2043 break;}
2044case 96:
vlmfce48a42004-09-14 02:36:39 +00002045#line 986 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002046{
vlmfa67ddc2004-06-03 03:38:44 +00002047 yyval.a_wchunk = asn1p_wsyntx_chunk_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002048 ;
2049 break;}
2050case 97:
vlmfce48a42004-09-14 02:36:39 +00002051#line 989 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002052{
vlmfa67ddc2004-06-03 03:38:44 +00002053 asn1p_ref_t *ref;
2054 int ret;
2055 ref = asn1p_ref_new(yylineno);
2056 checkmem(ref);
2057 ret = asn1p_ref_add_component(ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
2058 checkmem(ret == 0);
2059 yyval.a_wchunk = asn1p_wsyntx_chunk_fromref(ref, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002060 ;
2061 break;}
2062case 98:
vlmfce48a42004-09-14 02:36:39 +00002063#line 1001 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002064{
vlm39e5ed72004-09-05 10:40:41 +00002065 yyval.a_expr = asn1p_expr_new(yylineno);
vlm9283dbe2004-08-18 04:59:12 +00002066 checkmem(yyval.a_expr);
2067 yyval.a_expr->Identifier = strdup("...");
2068 checkmem(yyval.a_expr->Identifier);
vlm9283dbe2004-08-18 04:59:12 +00002069 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
2070 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002071 ;
2072 break;}
2073case 99:
vlmfce48a42004-09-14 02:36:39 +00002074#line 1009 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002075{
vlm39e5ed72004-09-05 10:40:41 +00002076 yyval.a_expr = asn1p_expr_new(yylineno);
vlm9283dbe2004-08-18 04:59:12 +00002077 checkmem(yyval.a_expr);
2078 yyval.a_expr->Identifier = strdup("...");
vlm9283dbe2004-08-18 04:59:12 +00002079 checkmem(yyval.a_expr->Identifier);
vlm5f0128b2004-08-20 13:25:29 +00002080 yyval.a_expr->value = yyvsp[0].a_value;
vlm9283dbe2004-08-18 04:59:12 +00002081 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
2082 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002083 ;
2084 break;}
2085case 100:
vlmfce48a42004-09-14 02:36:39 +00002086#line 1018 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002087{
vlm39e5ed72004-09-05 10:40:41 +00002088 yyval.a_expr = asn1p_expr_new(yylineno);
vlm5f0128b2004-08-20 13:25:29 +00002089 checkmem(yyval.a_expr);
2090 yyval.a_expr->Identifier = strdup("...");
2091 yyval.a_expr->value = yyvsp[0].a_value;
2092 checkmem(yyval.a_expr->Identifier);
2093 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
2094 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002095 ;
2096 break;}
2097case 101:
vlmfce48a42004-09-14 02:36:39 +00002098#line 1030 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002099{
vlmec8f6812004-08-22 03:19:54 +00002100 yyval.a_expr = yyvsp[-1].a_expr;
vlmfce48a42004-09-14 02:36:39 +00002101 yyval.a_expr->tag = yyvsp[-2].a_tag;
vlmec8f6812004-08-22 03:19:54 +00002102 /*
2103 * Outer constraint for SEQUENCE OF and SET OF applies
2104 * to the inner type.
2105 */
2106 if(yyval.a_expr->expr_type == ASN_CONSTR_SEQUENCE_OF
2107 || yyval.a_expr->expr_type == ASN_CONSTR_SET_OF) {
2108 assert(!TQ_FIRST(&(yyval.a_expr->members))->constraints);
2109 TQ_FIRST(&(yyval.a_expr->members))->constraints = yyvsp[0].a_constr;
2110 } else {
2111 if(yyval.a_expr->constraints) {
vlmfce48a42004-09-14 02:36:39 +00002112 assert(!yyvsp[-1].a_expr);
vlmec8f6812004-08-22 03:19:54 +00002113 } else {
2114 yyval.a_expr->constraints = yyvsp[0].a_constr;
2115 }
2116 }
vlm6a02a8a2004-09-08 00:28:11 +00002117 ;
2118 break;}
2119case 102:
vlmfce48a42004-09-14 02:36:39 +00002120#line 1052 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002121{
vlm5f0128b2004-08-20 13:25:29 +00002122 yyval.a_expr = yyvsp[0].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00002123 ;
2124 break;}
2125case 103:
vlmfce48a42004-09-14 02:36:39 +00002126#line 1055 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002127{
vlmfa67ddc2004-06-03 03:38:44 +00002128 yyval.a_expr = asn1p_expr_new(yylineno);
2129 checkmem(yyval.a_expr);
2130 yyval.a_expr->expr_type = yyvsp[0].a_type;
2131 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002132 ;
2133 break;}
2134case 104:
vlmfce48a42004-09-14 02:36:39 +00002135#line 1061 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002136{
vlmec8f6812004-08-22 03:19:54 +00002137 yyval.a_expr = yyvsp[-1].a_expr;
2138 assert(yyval.a_expr->expr_type == A1TC_INVALID);
2139 yyval.a_expr->expr_type = ASN_CONSTR_CHOICE;
2140 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002141 ;
2142 break;}
2143case 105:
vlmfce48a42004-09-14 02:36:39 +00002144#line 1067 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002145{
vlmec8f6812004-08-22 03:19:54 +00002146 yyval.a_expr = yyvsp[-1].a_expr;
2147 assert(yyval.a_expr->expr_type == A1TC_INVALID);
2148 yyval.a_expr->expr_type = ASN_CONSTR_SEQUENCE;
2149 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002150 ;
2151 break;}
2152case 106:
vlmfce48a42004-09-14 02:36:39 +00002153#line 1073 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002154{
vlmec8f6812004-08-22 03:19:54 +00002155 yyval.a_expr = yyvsp[-1].a_expr;
2156 assert(yyval.a_expr->expr_type == A1TC_INVALID);
2157 yyval.a_expr->expr_type = ASN_CONSTR_SET;
2158 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002159 ;
2160 break;}
2161case 107:
vlmfce48a42004-09-14 02:36:39 +00002162#line 1079 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002163{
vlm39e5ed72004-09-05 10:40:41 +00002164 yyval.a_expr = asn1p_expr_new(yylineno);
vlmec8f6812004-08-22 03:19:54 +00002165 checkmem(yyval.a_expr);
2166 yyval.a_expr->constraints = yyvsp[-2].a_constr;
2167 yyval.a_expr->expr_type = ASN_CONSTR_SEQUENCE_OF;
2168 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002169 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
2170 ;
2171 break;}
2172case 108:
vlmfce48a42004-09-14 02:36:39 +00002173#line 1087 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002174{
vlm39e5ed72004-09-05 10:40:41 +00002175 yyval.a_expr = asn1p_expr_new(yylineno);
vlmec8f6812004-08-22 03:19:54 +00002176 checkmem(yyval.a_expr);
2177 yyval.a_expr->constraints = yyvsp[-2].a_constr;
2178 yyval.a_expr->expr_type = ASN_CONSTR_SET_OF;
2179 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002180 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
2181 ;
2182 break;}
2183case 109:
vlmfce48a42004-09-14 02:36:39 +00002184#line 1095 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002185{
vlm39e5ed72004-09-05 10:40:41 +00002186 yyval.a_expr = asn1p_expr_new(yylineno);
vlmec8f6812004-08-22 03:19:54 +00002187 checkmem(yyval.a_expr);
vlm044f7442004-09-04 04:49:21 +00002188 yyval.a_expr->expr_type = ASN_TYPE_ANY;
vlmec8f6812004-08-22 03:19:54 +00002189 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002190 ;
2191 break;}
2192case 110:
vlmfce48a42004-09-14 02:36:39 +00002193#line 1101 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002194{
vlmec8f6812004-08-22 03:19:54 +00002195 int ret;
vlm39e5ed72004-09-05 10:40:41 +00002196 yyval.a_expr = asn1p_expr_new(yylineno);
vlmec8f6812004-08-22 03:19:54 +00002197 checkmem(yyval.a_expr);
2198 yyval.a_expr->reference = asn1p_ref_new(yylineno);
2199 ret = asn1p_ref_add_component(yyval.a_expr->reference,
2200 yyvsp[0].tv_str, RLT_lowercase);
2201 checkmem(ret == 0);
vlm044f7442004-09-04 04:49:21 +00002202 yyval.a_expr->expr_type = ASN_TYPE_ANY;
vlmec8f6812004-08-22 03:19:54 +00002203 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002204 ;
2205 break;}
2206case 111:
vlmfce48a42004-09-14 02:36:39 +00002207#line 1115 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002208{
vlmfa67ddc2004-06-03 03:38:44 +00002209 int ret;
2210 yyval.a_expr = yyvsp[-1].a_expr;
2211 assert(yyval.a_expr->expr_type == 0);
2212 assert(yyval.a_expr->meta_type == 0);
2213 assert(yyval.a_expr->reference == 0);
2214 yyval.a_expr->reference = asn1p_ref_new(yylineno);
2215 checkmem(yyval.a_expr->reference);
2216 ret = asn1p_ref_add_component(yyval.a_expr->reference, yyvsp[-3].tv_str, RLT_UNKNOWN);
2217 checkmem(ret == 0);
2218 free(yyvsp[-3].tv_str);
2219 yyval.a_expr->expr_type = A1TC_PARAMETRIZED;
2220 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002221 ;
2222 break;}
2223case 112:
vlmfce48a42004-09-14 02:36:39 +00002224#line 1139 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002225{
vlmfa67ddc2004-06-03 03:38:44 +00002226 yyval.a_expr = asn1p_expr_new(yylineno);
2227 checkmem(yyval.a_expr);
2228 yyval.a_expr->reference = yyvsp[0].a_ref;
2229 yyval.a_expr->expr_type = A1TC_REFERENCE;
2230 yyval.a_expr->meta_type = AMT_TYPEREF;
vlm6a02a8a2004-09-08 00:28:11 +00002231 ;
2232 break;}
2233case 113:
vlmfce48a42004-09-14 02:36:39 +00002234#line 1146 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002235{
vlmfa67ddc2004-06-03 03:38:44 +00002236 yyval.a_expr = asn1p_expr_new(yylineno);
2237 checkmem(yyval.a_expr);
2238 yyval.a_expr->reference = yyvsp[0].a_ref;
2239 yyval.a_expr->expr_type = A1TC_INSTANCE;
2240 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002241 ;
2242 break;}
2243case 114:
vlmfce48a42004-09-14 02:36:39 +00002244#line 1161 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002245{
vlmfa67ddc2004-06-03 03:38:44 +00002246 int ret;
2247 yyval.a_ref = asn1p_ref_new(yylineno);
2248 checkmem(yyval.a_ref);
2249 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN);
2250 checkmem(ret == 0);
2251 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002252 ;
2253 break;}
2254case 115:
vlmfce48a42004-09-14 02:36:39 +00002255#line 1169 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002256{
vlmfa67ddc2004-06-03 03:38:44 +00002257 int ret;
2258 yyval.a_ref = asn1p_ref_new(yylineno);
2259 checkmem(yyval.a_ref);
2260 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2261 checkmem(ret == 0);
2262 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN);
2263 checkmem(ret == 0);
2264 free(yyvsp[-2].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002265 ;
2266 break;}
2267case 116:
vlmfce48a42004-09-14 02:36:39 +00002268#line 1179 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002269{
vlmfa67ddc2004-06-03 03:38:44 +00002270 int ret;
2271 yyval.a_ref = asn1p_ref_new(yylineno);
2272 checkmem(yyval.a_ref);
2273 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2274 checkmem(ret == 0);
2275 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_lowercase);
2276 checkmem(ret == 0);
2277 free(yyvsp[-2].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002278 ;
2279 break;}
2280case 117:
vlmfce48a42004-09-14 02:36:39 +00002281#line 1189 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002282{
vlmfa67ddc2004-06-03 03:38:44 +00002283 int ret;
2284 yyval.a_ref = asn1p_ref_new(yylineno);
2285 checkmem(yyval.a_ref);
2286 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_CAPITALS);
2287 free(yyvsp[0].tv_str);
2288 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002289 ;
2290 break;}
2291case 118:
vlmfce48a42004-09-14 02:36:39 +00002292#line 1197 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002293{
vlmfa67ddc2004-06-03 03:38:44 +00002294 int ret;
2295 yyval.a_ref = yyvsp[0].a_ref;
2296 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_CAPITALS);
2297 free(yyvsp[-2].tv_str);
2298 checkmem(ret == 0);
2299 /*
2300 * Move the last element infront.
2301 */
2302 {
2303 struct asn1p_ref_component_s tmp_comp;
2304 tmp_comp = yyval.a_ref->components[yyval.a_ref->comp_count-1];
2305 memmove(&yyval.a_ref->components[1],
2306 &yyval.a_ref->components[0],
2307 sizeof(yyval.a_ref->components[0])
2308 * (yyval.a_ref->comp_count - 1));
2309 yyval.a_ref->components[0] = tmp_comp;
2310 }
vlm6a02a8a2004-09-08 00:28:11 +00002311 ;
2312 break;}
2313case 119:
vlmfce48a42004-09-14 02:36:39 +00002314#line 1219 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002315{
vlmfa67ddc2004-06-03 03:38:44 +00002316 int ret;
2317 yyval.a_ref = asn1p_ref_new(yylineno);
2318 checkmem(yyval.a_ref);
2319 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
2320 free(yyvsp[0].a_refcomp.name);
2321 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002322 ;
2323 break;}
2324case 120:
vlmfce48a42004-09-14 02:36:39 +00002325#line 1227 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002326{
vlmfa67ddc2004-06-03 03:38:44 +00002327 int ret;
2328 yyval.a_ref = yyvsp[-2].a_ref;
2329 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
2330 free(yyvsp[0].a_refcomp.name);
2331 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002332 ;
2333 break;}
2334case 123:
vlmfce48a42004-09-14 02:36:39 +00002335#line 1241 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002336{
vlmfa67ddc2004-06-03 03:38:44 +00002337 yyval.a_refcomp.lex_type = RLT_AmpUppercase;
2338 yyval.a_refcomp.name = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00002339 ;
2340 break;}
2341case 124:
vlmfce48a42004-09-14 02:36:39 +00002342#line 1246 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002343{
vlmfa67ddc2004-06-03 03:38:44 +00002344 yyval.a_refcomp.lex_type = RLT_Amplowercase;
2345 yyval.a_refcomp.name = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00002346 ;
2347 break;}
2348case 125:
vlmfce48a42004-09-14 02:36:39 +00002349#line 1259 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002350{
vlmfa67ddc2004-06-03 03:38:44 +00002351 yyval.a_expr = yyvsp[-2].a_expr;
2352 assert(yyval.a_expr->Identifier == NULL);
2353 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
2354 yyval.a_expr->meta_type = AMT_VALUE;
2355 yyval.a_expr->value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002356 ;
2357 break;}
2358case 126:
vlmfce48a42004-09-14 02:36:39 +00002359#line 1269 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002360{ asn1p_lexer_hack_push_opaque_state(); ;
2361 break;}
2362case 127:
vlmfce48a42004-09-14 02:36:39 +00002363#line 1270 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002364{
vlmfa67ddc2004-06-03 03:38:44 +00002365 yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
2366 checkmem(yyval.a_value);
2367 yyval.a_value->type = ATV_UNPARSED;
vlm6a02a8a2004-09-08 00:28:11 +00002368 ;
2369 break;}
2370case 128:
vlmfce48a42004-09-14 02:36:39 +00002371#line 1275 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002372{
vlmfa67ddc2004-06-03 03:38:44 +00002373 yyval.a_value = _convert_bitstring2binary(yyvsp[0].tv_str, 'B');
2374 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00002375 ;
2376 break;}
2377case 129:
vlmfce48a42004-09-14 02:36:39 +00002378#line 1279 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002379{
vlmfa67ddc2004-06-03 03:38:44 +00002380 yyval.a_value = _convert_bitstring2binary(yyvsp[0].tv_str, 'H');
2381 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00002382 ;
2383 break;}
2384case 130:
vlmfce48a42004-09-14 02:36:39 +00002385#line 1283 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002386{
vlmfa67ddc2004-06-03 03:38:44 +00002387 yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
2388 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00002389 ;
2390 break;}
2391case 131:
vlmfce48a42004-09-14 02:36:39 +00002392#line 1287 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002393{
vlmfa67ddc2004-06-03 03:38:44 +00002394 yyval.a_value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002395 ;
2396 break;}
2397case 132:
vlmfce48a42004-09-14 02:36:39 +00002398#line 1290 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002399{
vlm5f0128b2004-08-20 13:25:29 +00002400 yyval.a_value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002401 ;
2402 break;}
2403case 133:
vlmfce48a42004-09-14 02:36:39 +00002404#line 1296 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002405{
vlmfa67ddc2004-06-03 03:38:44 +00002406 asn1p_ref_t *ref;
2407 int ret;
2408 ref = asn1p_ref_new(yylineno);
2409 checkmem(ref);
2410 ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
2411 checkmem(ret == 0);
2412 yyval.a_value = asn1p_value_fromref(ref, 0);
2413 checkmem(yyval.a_value);
2414 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002415 ;
2416 break;}
2417case 134:
vlmfce48a42004-09-14 02:36:39 +00002418#line 1307 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002419{
vlmfa67ddc2004-06-03 03:38:44 +00002420 asn1p_ref_t *ref;
2421 int ret;
2422 ref = asn1p_ref_new(yylineno);
2423 checkmem(ref);
2424 ret = asn1p_ref_add_component(ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2425 checkmem(ret == 0);
2426 ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
2427 checkmem(ret == 0);
2428 yyval.a_value = asn1p_value_fromref(ref, 0);
2429 checkmem(yyval.a_value);
2430 free(yyvsp[-2].tv_str);
2431 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002432 ;
2433 break;}
2434case 135:
vlmfce48a42004-09-14 02:36:39 +00002435#line 1324 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002436{
vlmfa67ddc2004-06-03 03:38:44 +00002437 yyval.tv_opaque.len = yyvsp[0].tv_opaque.len + 2;
2438 yyval.tv_opaque.buf = malloc(yyval.tv_opaque.len + 1);
2439 checkmem(yyval.tv_opaque.buf);
2440 yyval.tv_opaque.buf[0] = '{';
2441 yyval.tv_opaque.buf[1] = ' ';
2442 memcpy(yyval.tv_opaque.buf + 2, yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len);
2443 yyval.tv_opaque.buf[yyval.tv_opaque.len] = '\0';
2444 free(yyvsp[0].tv_opaque.buf);
vlm6a02a8a2004-09-08 00:28:11 +00002445 ;
2446 break;}
2447case 136:
vlmfce48a42004-09-14 02:36:39 +00002448#line 1334 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002449{
vlmfa67ddc2004-06-03 03:38:44 +00002450 int newsize = yyvsp[-1].tv_opaque.len + yyvsp[0].tv_opaque.len;
2451 char *p = malloc(newsize + 1);
2452 checkmem(p);
2453 memcpy(p , yyvsp[-1].tv_opaque.buf, yyvsp[-1].tv_opaque.len);
2454 memcpy(p + yyvsp[-1].tv_opaque.len, yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len);
2455 p[newsize] = '\0';
2456 free(yyvsp[-1].tv_opaque.buf);
2457 free(yyvsp[0].tv_opaque.buf);
2458 yyval.tv_opaque.buf = p;
2459 yyval.tv_opaque.len = newsize;
vlm6a02a8a2004-09-08 00:28:11 +00002460 ;
2461 break;}
2462case 137:
vlmfce48a42004-09-14 02:36:39 +00002463#line 1349 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002464{ yyval.a_type = ASN_BASIC_BOOLEAN; ;
2465 break;}
2466case 138:
vlmfce48a42004-09-14 02:36:39 +00002467#line 1350 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002468{ yyval.a_type = ASN_BASIC_NULL; ;
2469 break;}
2470case 139:
vlmfce48a42004-09-14 02:36:39 +00002471#line 1351 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002472{ yyval.a_type = ASN_BASIC_REAL; ;
2473 break;}
2474case 140:
vlmfce48a42004-09-14 02:36:39 +00002475#line 1352 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002476{ yyval.a_type = yyvsp[0].a_type; ;
2477 break;}
2478case 141:
vlmfce48a42004-09-14 02:36:39 +00002479#line 1353 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002480{ yyval.a_type = ASN_BASIC_OCTET_STRING; ;
2481 break;}
2482case 142:
vlmfce48a42004-09-14 02:36:39 +00002483#line 1354 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002484{ yyval.a_type = ASN_BASIC_OBJECT_IDENTIFIER; ;
2485 break;}
2486case 143:
vlmfce48a42004-09-14 02:36:39 +00002487#line 1355 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002488{ yyval.a_type = ASN_BASIC_RELATIVE_OID; ;
2489 break;}
2490case 144:
vlmfce48a42004-09-14 02:36:39 +00002491#line 1356 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002492{ yyval.a_type = ASN_BASIC_EXTERNAL; ;
2493 break;}
2494case 145:
vlmfce48a42004-09-14 02:36:39 +00002495#line 1357 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002496{ yyval.a_type = ASN_BASIC_EMBEDDED_PDV; ;
2497 break;}
2498case 146:
vlmfce48a42004-09-14 02:36:39 +00002499#line 1358 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002500{ yyval.a_type = ASN_BASIC_CHARACTER_STRING; ;
2501 break;}
2502case 147:
vlmfce48a42004-09-14 02:36:39 +00002503#line 1359 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002504{ yyval.a_type = ASN_BASIC_UTCTime; ;
2505 break;}
2506case 148:
vlmfce48a42004-09-14 02:36:39 +00002507#line 1360 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002508{ yyval.a_type = ASN_BASIC_GeneralizedTime; ;
2509 break;}
2510case 149:
vlmfce48a42004-09-14 02:36:39 +00002511#line 1367 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002512{ yyval.a_type = ASN_BASIC_INTEGER; ;
2513 break;}
2514case 150:
vlmfce48a42004-09-14 02:36:39 +00002515#line 1368 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002516{ yyval.a_type = ASN_BASIC_ENUMERATED; ;
2517 break;}
2518case 151:
vlmfce48a42004-09-14 02:36:39 +00002519#line 1369 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002520{ yyval.a_type = ASN_BASIC_BIT_STRING; ;
2521 break;}
2522case 152:
vlmfce48a42004-09-14 02:36:39 +00002523#line 1373 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002524{
vlm39e5ed72004-09-05 10:40:41 +00002525 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00002526 checkmem(yyval.a_expr);
2527 yyval.a_expr->expr_type = yyvsp[0].a_type;
2528 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002529 ;
2530 break;}
2531case 153:
vlmfce48a42004-09-14 02:36:39 +00002532#line 1379 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002533{
vlmfa67ddc2004-06-03 03:38:44 +00002534 if(yyvsp[0].a_expr) {
2535 yyval.a_expr = yyvsp[0].a_expr;
2536 } else {
vlm39e5ed72004-09-05 10:40:41 +00002537 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00002538 checkmem(yyval.a_expr);
2539 }
2540 yyval.a_expr->expr_type = yyvsp[-1].a_type;
2541 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002542 ;
2543 break;}
2544case 154:
vlmfce48a42004-09-14 02:36:39 +00002545#line 1392 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002546{ yyval.a_type = ASN_STRING_BMPString; ;
2547 break;}
2548case 155:
vlmfce48a42004-09-14 02:36:39 +00002549#line 1393 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002550{
vlmfa67ddc2004-06-03 03:38:44 +00002551 yyval.a_type = ASN_STRING_GeneralString;
vlm80103492004-09-07 10:39:09 +00002552 fprintf(stderr, "WARNING: GeneralString is not fully supported");
vlm6a02a8a2004-09-08 00:28:11 +00002553 ;
2554 break;}
2555case 156:
vlmfce48a42004-09-14 02:36:39 +00002556#line 1397 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002557{
vlmfa67ddc2004-06-03 03:38:44 +00002558 yyval.a_type = ASN_STRING_GraphicString;
vlm80103492004-09-07 10:39:09 +00002559 fprintf(stderr, "WARNING: GraphicString is not fully supported");
vlm6a02a8a2004-09-08 00:28:11 +00002560 ;
2561 break;}
2562case 157:
vlmfce48a42004-09-14 02:36:39 +00002563#line 1401 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002564{ yyval.a_type = ASN_STRING_IA5String; ;
2565 break;}
2566case 158:
vlmfce48a42004-09-14 02:36:39 +00002567#line 1402 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002568{ yyval.a_type = ASN_STRING_ISO646String; ;
2569 break;}
2570case 159:
vlmfce48a42004-09-14 02:36:39 +00002571#line 1403 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002572{ yyval.a_type = ASN_STRING_NumericString; ;
2573 break;}
2574case 160:
vlmfce48a42004-09-14 02:36:39 +00002575#line 1404 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002576{ yyval.a_type = ASN_STRING_PrintableString; ;
2577 break;}
2578case 161:
vlmfce48a42004-09-14 02:36:39 +00002579#line 1405 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002580{
vlmfa67ddc2004-06-03 03:38:44 +00002581 yyval.a_type = ASN_STRING_T61String;
vlm80103492004-09-07 10:39:09 +00002582 fprintf(stderr, "WARNING: T61String is not fully supported");
vlm6a02a8a2004-09-08 00:28:11 +00002583 ;
2584 break;}
2585case 162:
vlmfce48a42004-09-14 02:36:39 +00002586#line 1409 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002587{ yyval.a_type = ASN_STRING_TeletexString; ;
2588 break;}
2589case 163:
vlmfce48a42004-09-14 02:36:39 +00002590#line 1410 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002591{ yyval.a_type = ASN_STRING_UniversalString; ;
2592 break;}
2593case 164:
vlmfce48a42004-09-14 02:36:39 +00002594#line 1411 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002595{ yyval.a_type = ASN_STRING_UTF8String; ;
2596 break;}
2597case 165:
vlmfce48a42004-09-14 02:36:39 +00002598#line 1412 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002599{
vlmfa67ddc2004-06-03 03:38:44 +00002600 yyval.a_type = ASN_STRING_VideotexString;
vlm80103492004-09-07 10:39:09 +00002601 fprintf(stderr, "WARNING: VideotexString is not fully supported");
vlm6a02a8a2004-09-08 00:28:11 +00002602 ;
2603 break;}
2604case 166:
vlmfce48a42004-09-14 02:36:39 +00002605#line 1416 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002606{ yyval.a_type = ASN_STRING_VisibleString; ;
2607 break;}
2608case 167:
vlmfce48a42004-09-14 02:36:39 +00002609#line 1417 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002610{ yyval.a_type = ASN_STRING_ObjectDescriptor; ;
2611 break;}
2612case 173:
vlmfce48a42004-09-14 02:36:39 +00002613#line 1429 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002614{ yyval.a_constr = 0; ;
2615 break;}
2616case 174:
vlmfce48a42004-09-14 02:36:39 +00002617#line 1430 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002618{
vlm39e5ed72004-09-05 10:40:41 +00002619 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002620 ;
2621 break;}
2622case 175:
vlmfce48a42004-09-14 02:36:39 +00002623#line 1436 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002624{
vlm39e5ed72004-09-05 10:40:41 +00002625 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_SET, yyvsp[0].a_constr, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002626 ;
2627 break;}
2628case 176:
vlmfce48a42004-09-14 02:36:39 +00002629#line 1439 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002630{
vlmfa67ddc2004-06-03 03:38:44 +00002631 /*
2632 * This is a special case, for compatibility purposes.
vlm9283dbe2004-08-18 04:59:12 +00002633 * It goes without parentheses.
vlmfa67ddc2004-06-03 03:38:44 +00002634 */
vlm5f0128b2004-08-20 13:25:29 +00002635 CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_SIZE, yyvsp[-1].a_constr, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002636 ;
2637 break;}
2638case 177:
vlmfce48a42004-09-14 02:36:39 +00002639#line 1449 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002640{
vlmfa67ddc2004-06-03 03:38:44 +00002641 yyval.a_constr = yyvsp[-1].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002642 ;
2643 break;}
2644case 178:
vlmfce48a42004-09-14 02:36:39 +00002645#line 1452 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002646{
vlm9283dbe2004-08-18 04:59:12 +00002647 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_SET, yyvsp[-3].a_constr, yyvsp[-1].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002648 ;
2649 break;}
2650case 179:
vlmfce48a42004-09-14 02:36:39 +00002651#line 1458 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002652{
vlmfa67ddc2004-06-03 03:38:44 +00002653 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002654 ;
2655 break;}
2656case 180:
vlmfce48a42004-09-14 02:36:39 +00002657#line 1461 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002658{
vlmfa67ddc2004-06-03 03:38:44 +00002659 asn1p_constraint_t *ct;
2660 ct = asn1p_constraint_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00002661 ct->type = ACT_EL_EXT;
2662 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-2].a_constr, ct);
vlm6a02a8a2004-09-08 00:28:11 +00002663 ;
2664 break;}
2665case 181:
vlmfce48a42004-09-14 02:36:39 +00002666#line 1467 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002667{
vlmfa67ddc2004-06-03 03:38:44 +00002668 asn1p_constraint_t *ct;
2669 ct = asn1p_constraint_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00002670 ct->type = ACT_EL_EXT;
2671 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-4].a_constr, ct);
vlm6f5eb0b2004-08-13 12:35:09 +00002672 ct = yyval.a_constr;
2673 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, ct, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002674 ;
2675 break;}
2676case 182:
vlmfce48a42004-09-14 02:36:39 +00002677#line 1478 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002678{
vlm9283dbe2004-08-18 04:59:12 +00002679 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002680 ;
2681 break;}
2682case 183:
vlmfce48a42004-09-14 02:36:39 +00002683#line 1481 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002684{
vlmfa67ddc2004-06-03 03:38:44 +00002685 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_UNI, yyvsp[-2].a_constr, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002686 ;
2687 break;}
2688case 184:
vlmfce48a42004-09-14 02:36:39 +00002689#line 1484 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002690{
vlmfa67ddc2004-06-03 03:38:44 +00002691 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_INT, yyvsp[-2].a_constr, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002692 ;
2693 break;}
2694case 185:
vlmfce48a42004-09-14 02:36:39 +00002695#line 1487 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002696{
vlmfa67ddc2004-06-03 03:38:44 +00002697 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_EXC, yyvsp[-2].a_constr, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002698 ;
2699 break;}
2700case 186:
vlmfce48a42004-09-14 02:36:39 +00002701#line 1493 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002702{
vlmfa67ddc2004-06-03 03:38:44 +00002703 int ret;
2704 yyval.a_constr = asn1p_constraint_new(yylineno);
2705 checkmem(yyval.a_constr);
2706 yyval.a_constr->type = yyvsp[-3].a_ctype;
2707 ret = asn1p_constraint_insert(yyval.a_constr, yyvsp[-1].a_constr);
2708 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002709 ;
2710 break;}
2711case 187:
vlmfce48a42004-09-14 02:36:39 +00002712#line 1501 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002713{
vlm9283dbe2004-08-18 04:59:12 +00002714 int ret;
2715 yyval.a_constr = asn1p_constraint_new(yylineno);
2716 checkmem(yyval.a_constr);
2717 yyval.a_constr->type = ACT_CA_SET;
2718 ret = asn1p_constraint_insert(yyval.a_constr, yyvsp[-1].a_constr);
2719 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002720 ;
2721 break;}
2722case 188:
vlmfce48a42004-09-14 02:36:39 +00002723#line 1509 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002724{
vlm9283dbe2004-08-18 04:59:12 +00002725 yyval.a_constr = asn1p_constraint_new(yylineno);
2726 checkmem(yyval.a_constr);
2727 yyval.a_constr->type = ACT_EL_VALUE;
2728 yyval.a_constr->value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002729 ;
2730 break;}
2731case 189:
vlmfce48a42004-09-14 02:36:39 +00002732#line 1515 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002733{
vlm5f0128b2004-08-20 13:25:29 +00002734 yyval.a_constr = asn1p_constraint_new(yylineno);
2735 checkmem(yyval.a_constr);
2736 yyval.a_constr->type = yyvsp[-1].a_ctype;
vlmec8f6812004-08-22 03:19:54 +00002737 yyval.a_constr->range_start = yyvsp[-2].a_value;
2738 yyval.a_constr->range_stop = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002739 ;
2740 break;}
2741case 190:
vlmfce48a42004-09-14 02:36:39 +00002742#line 1522 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002743{
vlmec8f6812004-08-22 03:19:54 +00002744 yyval.a_constr = asn1p_constraint_new(yylineno);
2745 checkmem(yyval.a_constr);
2746 yyval.a_constr->type = yyvsp[-1].a_ctype;
2747 yyval.a_constr->range_start = asn1p_value_fromint(-123);
2748 yyval.a_constr->range_stop = yyvsp[0].a_value;
2749 yyval.a_constr->range_start->type = ATV_MIN;
vlm6a02a8a2004-09-08 00:28:11 +00002750 ;
2751 break;}
2752case 191:
vlmfce48a42004-09-14 02:36:39 +00002753#line 1530 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002754{
vlmec8f6812004-08-22 03:19:54 +00002755 yyval.a_constr = asn1p_constraint_new(yylineno);
2756 checkmem(yyval.a_constr);
2757 yyval.a_constr->type = yyvsp[-1].a_ctype;
2758 yyval.a_constr->range_start = yyvsp[-2].a_value;
2759 yyval.a_constr->range_stop = asn1p_value_fromint(321);
2760 yyval.a_constr->range_stop->type = ATV_MAX;
vlm6a02a8a2004-09-08 00:28:11 +00002761 ;
2762 break;}
2763case 192:
vlmfce48a42004-09-14 02:36:39 +00002764#line 1538 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002765{
vlmec8f6812004-08-22 03:19:54 +00002766 yyval.a_constr = asn1p_constraint_new(yylineno);
2767 checkmem(yyval.a_constr);
2768 yyval.a_constr->type = yyvsp[-1].a_ctype;
2769 yyval.a_constr->range_start = asn1p_value_fromint(-123);
2770 yyval.a_constr->range_stop = asn1p_value_fromint(321);
2771 yyval.a_constr->range_start->type = ATV_MIN;
2772 yyval.a_constr->range_stop->type = ATV_MAX;
vlm6a02a8a2004-09-08 00:28:11 +00002773 ;
2774 break;}
2775case 193:
vlmfce48a42004-09-14 02:36:39 +00002776#line 1547 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002777{
vlm5f0128b2004-08-20 13:25:29 +00002778 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002779 ;
2780 break;}
2781case 194:
vlmfce48a42004-09-14 02:36:39 +00002782#line 1550 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002783{
vlm39e5ed72004-09-05 10:40:41 +00002784 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002785 ;
2786 break;}
2787case 195:
vlmfce48a42004-09-14 02:36:39 +00002788#line 1556 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002789{ yyval.a_ctype = ACT_EL_RANGE; ;
2790 break;}
2791case 196:
vlmfce48a42004-09-14 02:36:39 +00002792#line 1557 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002793{ yyval.a_ctype = ACT_EL_RLRANGE; ;
2794 break;}
2795case 197:
vlmfce48a42004-09-14 02:36:39 +00002796#line 1558 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002797{ yyval.a_ctype = ACT_EL_LLRANGE; ;
2798 break;}
2799case 198:
vlmfce48a42004-09-14 02:36:39 +00002800#line 1559 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002801{ yyval.a_ctype = ACT_EL_ULRANGE; ;
2802 break;}
2803case 199:
vlmfce48a42004-09-14 02:36:39 +00002804#line 1563 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002805{
vlm39e5ed72004-09-05 10:40:41 +00002806 yyval.a_ctype = ACT_CT_SIZE;
vlm6a02a8a2004-09-08 00:28:11 +00002807 ;
2808 break;}
2809case 200:
vlmfce48a42004-09-14 02:36:39 +00002810#line 1566 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002811{
vlm39e5ed72004-09-05 10:40:41 +00002812 yyval.a_ctype = ACT_CT_FROM;
vlm6a02a8a2004-09-08 00:28:11 +00002813 ;
2814 break;}
2815case 201:
vlmfce48a42004-09-14 02:36:39 +00002816#line 1572 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002817{
vlmfa67ddc2004-06-03 03:38:44 +00002818 yyval.a_value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002819 ;
2820 break;}
2821case 202:
vlmfce48a42004-09-14 02:36:39 +00002822#line 1575 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002823{
vlmfa67ddc2004-06-03 03:38:44 +00002824 asn1p_ref_t *ref;
2825 int ret;
2826 ref = asn1p_ref_new(yylineno);
2827 checkmem(ref);
2828 ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
2829 checkmem(ret == 0);
2830 yyval.a_value = asn1p_value_fromref(ref, 0);
2831 checkmem(yyval.a_value);
2832 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002833 ;
2834 break;}
2835case 203:
vlmfce48a42004-09-14 02:36:39 +00002836#line 1586 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002837{
vlmfa67ddc2004-06-03 03:38:44 +00002838 yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
2839 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00002840 ;
2841 break;}
2842case 204:
vlmfce48a42004-09-14 02:36:39 +00002843#line 1591 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002844{
vlmfa67ddc2004-06-03 03:38:44 +00002845 yyval.a_value = asn1p_value_fromint(0);
2846 checkmem(yyval.a_value);
2847 yyval.a_value->type = ATV_FALSE;
vlm6a02a8a2004-09-08 00:28:11 +00002848 ;
2849 break;}
2850case 205:
vlmfce48a42004-09-14 02:36:39 +00002851#line 1596 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002852{
vlmfa67ddc2004-06-03 03:38:44 +00002853 yyval.a_value = asn1p_value_fromint(1);
2854 checkmem(yyval.a_value);
2855 yyval.a_value->type = ATV_TRUE;
vlm6a02a8a2004-09-08 00:28:11 +00002856 ;
2857 break;}
2858case 206:
vlmfce48a42004-09-14 02:36:39 +00002859#line 1604 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002860{
vlmfa67ddc2004-06-03 03:38:44 +00002861 CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_WCOMPS, yyvsp[-1].a_constr, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002862 ;
2863 break;}
2864case 207:
vlmfce48a42004-09-14 02:36:39 +00002865#line 1610 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002866{
vlmfa67ddc2004-06-03 03:38:44 +00002867 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002868 ;
2869 break;}
2870case 208:
vlmfce48a42004-09-14 02:36:39 +00002871#line 1613 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002872{
vlmfa67ddc2004-06-03 03:38:44 +00002873 CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_WCOMPS, yyvsp[-2].a_constr, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002874 ;
2875 break;}
2876case 209:
vlmfce48a42004-09-14 02:36:39 +00002877#line 1619 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002878{
vlmfa67ddc2004-06-03 03:38:44 +00002879 yyval.a_constr = asn1p_constraint_new(yylineno);
2880 checkmem(yyval.a_constr);
2881 yyval.a_constr->type = ACT_EL_EXT;
vlm6a02a8a2004-09-08 00:28:11 +00002882 ;
2883 break;}
2884case 210:
vlmfce48a42004-09-14 02:36:39 +00002885#line 1624 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002886{
vlmfa67ddc2004-06-03 03:38:44 +00002887 yyval.a_constr = asn1p_constraint_new(yylineno);
2888 checkmem(yyval.a_constr);
2889 yyval.a_constr->type = ACT_EL_VALUE;
2890 yyval.a_constr->value = asn1p_value_frombuf(yyvsp[-2].tv_str, strlen(yyvsp[-2].tv_str), 0);
2891 yyval.a_constr->presence = yyvsp[0].a_pres;
vlm6a02a8a2004-09-08 00:28:11 +00002892 ;
2893 break;}
2894case 211:
vlmfce48a42004-09-14 02:36:39 +00002895#line 1637 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002896{ yyval.a_pres = ACPRES_DEFAULT; ;
2897 break;}
2898case 212:
vlmfce48a42004-09-14 02:36:39 +00002899#line 1638 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002900{ yyval.a_pres = yyvsp[0].a_pres; ;
2901 break;}
2902case 213:
vlmfce48a42004-09-14 02:36:39 +00002903#line 1642 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002904{
vlmfa67ddc2004-06-03 03:38:44 +00002905 yyval.a_pres = ACPRES_PRESENT;
vlm6a02a8a2004-09-08 00:28:11 +00002906 ;
2907 break;}
2908case 214:
vlmfce48a42004-09-14 02:36:39 +00002909#line 1645 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002910{
vlmfa67ddc2004-06-03 03:38:44 +00002911 yyval.a_pres = ACPRES_ABSENT;
vlm6a02a8a2004-09-08 00:28:11 +00002912 ;
2913 break;}
2914case 215:
vlmfce48a42004-09-14 02:36:39 +00002915#line 1648 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002916{
vlmfa67ddc2004-06-03 03:38:44 +00002917 yyval.a_pres = ACPRES_OPTIONAL;
vlm6a02a8a2004-09-08 00:28:11 +00002918 ;
2919 break;}
2920case 216:
vlmfce48a42004-09-14 02:36:39 +00002921#line 1654 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002922{
vlm5f0128b2004-08-20 13:25:29 +00002923 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002924 ;
2925 break;}
2926case 217:
vlmfce48a42004-09-14 02:36:39 +00002927#line 1657 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002928{
vlm5f0128b2004-08-20 13:25:29 +00002929 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002930 ;
2931 break;}
2932case 218:
vlmfce48a42004-09-14 02:36:39 +00002933#line 1666 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002934{
vlmfa67ddc2004-06-03 03:38:44 +00002935 asn1p_ref_t *ref = asn1p_ref_new(yylineno);
2936 asn1p_constraint_t *ct;
2937 int ret;
2938 ret = asn1p_ref_add_component(ref, yyvsp[-1].tv_str, 0);
2939 checkmem(ret == 0);
2940 ct = asn1p_constraint_new(yylineno);
2941 checkmem(yyval.a_constr);
2942 ct->type = ACT_EL_VALUE;
2943 ct->value = asn1p_value_fromref(ref, 0);
2944 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CRC, ct, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002945 ;
2946 break;}
2947case 219:
vlmfce48a42004-09-14 02:36:39 +00002948#line 1681 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002949{
vlmfa67ddc2004-06-03 03:38:44 +00002950 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CRC, yyvsp[-3].a_constr, yyvsp[-1].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002951 ;
2952 break;}
2953case 220:
vlmfce48a42004-09-14 02:36:39 +00002954#line 1687 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002955{
vlmfa67ddc2004-06-03 03:38:44 +00002956 yyval.a_constr = asn1p_constraint_new(yylineno);
2957 checkmem(yyval.a_constr);
2958 yyval.a_constr->type = ACT_EL_VALUE;
2959 yyval.a_constr->value = asn1p_value_fromref(yyvsp[0].a_ref, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002960 ;
2961 break;}
2962case 221:
vlmfce48a42004-09-14 02:36:39 +00002963#line 1693 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002964{
vlmfa67ddc2004-06-03 03:38:44 +00002965 asn1p_constraint_t *ct;
2966 ct = asn1p_constraint_new(yylineno);
2967 checkmem(ct);
2968 ct->type = ACT_EL_VALUE;
2969 ct->value = asn1p_value_fromref(yyvsp[0].a_ref, 0);
2970 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-2].a_constr, ct);
vlm6a02a8a2004-09-08 00:28:11 +00002971 ;
2972 break;}
2973case 222:
vlmfce48a42004-09-14 02:36:39 +00002974#line 1707 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002975{
vlmfa67ddc2004-06-03 03:38:44 +00002976 char *p = malloc(strlen(yyvsp[0].tv_str) + 2);
2977 int ret;
2978 *p = '@';
2979 strcpy(p + 1, yyvsp[0].tv_str);
2980 yyval.a_ref = asn1p_ref_new(yylineno);
2981 ret = asn1p_ref_add_component(yyval.a_ref, p, 0);
2982 checkmem(ret == 0);
2983 free(p);
2984 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002985 ;
2986 break;}
2987case 223:
vlmfce48a42004-09-14 02:36:39 +00002988#line 1718 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002989{
vlmfa67ddc2004-06-03 03:38:44 +00002990 char *p = malloc(strlen(yyvsp[0].tv_str) + 3);
2991 int ret;
2992 p[0] = '@';
2993 p[1] = '.';
2994 strcpy(p + 2, yyvsp[0].tv_str);
2995 yyval.a_ref = asn1p_ref_new(yylineno);
2996 ret = asn1p_ref_add_component(yyval.a_ref, p, 0);
2997 checkmem(ret == 0);
2998 free(p);
2999 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00003000 ;
3001 break;}
3002case 224:
vlmfce48a42004-09-14 02:36:39 +00003003#line 1734 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003004{
vlmfa67ddc2004-06-03 03:38:44 +00003005 yyval.tv_str = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003006 ;
3007 break;}
3008case 225:
vlmfce48a42004-09-14 02:36:39 +00003009#line 1737 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003010{
vlmfa67ddc2004-06-03 03:38:44 +00003011 int l1 = strlen(yyvsp[-2].tv_str);
3012 int l3 = strlen(yyvsp[0].tv_str);
3013 yyval.tv_str = malloc(l1 + 1 + l3 + 1);
3014 memcpy(yyval.tv_str, yyvsp[-2].tv_str, l1);
3015 yyval.tv_str[l1] = '.';
3016 memcpy(yyval.tv_str + l1 + 1, yyvsp[0].tv_str, l3);
3017 yyval.tv_str[l1 + 1 + l3] = '\0';
vlm6a02a8a2004-09-08 00:28:11 +00003018 ;
3019 break;}
3020case 226:
vlmfce48a42004-09-14 02:36:39 +00003021#line 1755 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003022{ yyval.a_marker = EM_NOMARK; ;
3023 break;}
3024case 227:
vlmfce48a42004-09-14 02:36:39 +00003025#line 1756 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003026{ yyval.a_marker = yyvsp[0].a_marker; ;
3027 break;}
3028case 228:
vlmfce48a42004-09-14 02:36:39 +00003029#line 1760 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003030{
vlmfa67ddc2004-06-03 03:38:44 +00003031 yyval.a_marker = EM_OPTIONAL;
vlm6a02a8a2004-09-08 00:28:11 +00003032 ;
3033 break;}
3034case 229:
vlmfce48a42004-09-14 02:36:39 +00003035#line 1763 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003036{
vlmfa67ddc2004-06-03 03:38:44 +00003037 yyval.a_marker = EM_DEFAULT;
3038 /* FIXME: store DefaultValue somewhere */
vlm6a02a8a2004-09-08 00:28:11 +00003039 ;
3040 break;}
3041case 230:
vlmfce48a42004-09-14 02:36:39 +00003042#line 1770 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003043{
3044 ;
3045 break;}
3046case 231:
vlmfce48a42004-09-14 02:36:39 +00003047#line 1772 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003048{
3049 ;
3050 break;}
3051case 232:
vlmfce48a42004-09-14 02:36:39 +00003052#line 1774 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003053{ asn1p_lexer_hack_push_opaque_state(); ;
3054 break;}
3055case 233:
vlmfce48a42004-09-14 02:36:39 +00003056#line 1774 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003057{
3058 ;
3059 break;}
3060case 234:
vlmfce48a42004-09-14 02:36:39 +00003061#line 1795 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003062{
vlm39e5ed72004-09-05 10:40:41 +00003063 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003064 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00003065 ;
3066 break;}
3067case 235:
vlmfce48a42004-09-14 02:36:39 +00003068#line 1799 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003069{
vlmfa67ddc2004-06-03 03:38:44 +00003070 yyval.a_expr = yyvsp[-1].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00003071 ;
3072 break;}
3073case 236:
vlmfce48a42004-09-14 02:36:39 +00003074#line 1805 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003075{
vlm39e5ed72004-09-05 10:40:41 +00003076 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003077 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00003078 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
3079 ;
3080 break;}
3081case 237:
vlmfce48a42004-09-14 02:36:39 +00003082#line 1810 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003083{
vlmfa67ddc2004-06-03 03:38:44 +00003084 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00003085 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
3086 ;
3087 break;}
3088case 238:
vlmfce48a42004-09-14 02:36:39 +00003089#line 1817 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003090{
vlm39e5ed72004-09-05 10:40:41 +00003091 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003092 checkmem(yyval.a_expr);
3093 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3094 yyval.a_expr->meta_type = AMT_VALUE;
3095 yyval.a_expr->Identifier = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003096 ;
3097 break;}
3098case 239:
vlmfce48a42004-09-14 02:36:39 +00003099#line 1824 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003100{
vlm39e5ed72004-09-05 10:40:41 +00003101 yyval.a_expr = asn1p_expr_new(yylineno);
vlm5f0128b2004-08-20 13:25:29 +00003102 checkmem(yyval.a_expr);
3103 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3104 yyval.a_expr->meta_type = AMT_VALUE;
3105 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
3106 yyval.a_expr->value = yyvsp[-1].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00003107 ;
3108 break;}
3109case 240:
vlmfce48a42004-09-14 02:36:39 +00003110#line 1832 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003111{
vlm39e5ed72004-09-05 10:40:41 +00003112 yyval.a_expr = asn1p_expr_new(yylineno);
vlm5f0128b2004-08-20 13:25:29 +00003113 checkmem(yyval.a_expr);
3114 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3115 yyval.a_expr->meta_type = AMT_VALUE;
3116 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
3117 yyval.a_expr->value = yyvsp[-1].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00003118 ;
3119 break;}
3120case 241:
vlmfce48a42004-09-14 02:36:39 +00003121#line 1840 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003122{
vlm39e5ed72004-09-05 10:40:41 +00003123 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003124 checkmem(yyval.a_expr);
3125 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3126 yyval.a_expr->meta_type = AMT_VALUE;
3127 yyval.a_expr->value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00003128 ;
3129 break;}
3130case 242:
vlmfce48a42004-09-14 02:36:39 +00003131#line 1847 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003132{
vlm39e5ed72004-09-05 10:40:41 +00003133 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003134 checkmem(yyval.a_expr);
3135 yyval.a_expr->Identifier = strdup("...");
3136 checkmem(yyval.a_expr->Identifier);
3137 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
3138 yyval.a_expr->meta_type = AMT_VALUE;
vlm6a02a8a2004-09-08 00:28:11 +00003139 ;
3140 break;}
3141case 243:
vlmfce48a42004-09-14 02:36:39 +00003142#line 1858 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003143{
vlmec8f6812004-08-22 03:19:54 +00003144 yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int);
3145 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00003146 ;
3147 break;}
3148case 244:
vlmfce48a42004-09-14 02:36:39 +00003149#line 1862 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003150{
vlmec8f6812004-08-22 03:19:54 +00003151 yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int);
3152 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00003153 ;
3154 break;}
3155case 245:
vlmfce48a42004-09-14 02:36:39 +00003156#line 1893 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003157{ memset(&yyval.a_tag, 0, sizeof(yyval.a_tag)); ;
3158 break;}
3159case 246:
vlmfce48a42004-09-14 02:36:39 +00003160#line 1894 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003161{ yyval.a_tag = yyvsp[0].a_tag; ;
3162 break;}
3163case 247:
vlmfce48a42004-09-14 02:36:39 +00003164#line 1898 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003165{
vlmfa67ddc2004-06-03 03:38:44 +00003166 yyval.a_tag = yyvsp[0].a_tag;
3167 yyval.a_tag.tag_mode = TM_DEFAULT;
vlm6a02a8a2004-09-08 00:28:11 +00003168 ;
3169 break;}
3170case 248:
vlmfce48a42004-09-14 02:36:39 +00003171#line 1902 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003172{
vlmfa67ddc2004-06-03 03:38:44 +00003173 yyval.a_tag = yyvsp[-1].a_tag;
3174 yyval.a_tag.tag_mode = TM_IMPLICIT;
vlm6a02a8a2004-09-08 00:28:11 +00003175 ;
3176 break;}
3177case 249:
vlmfce48a42004-09-14 02:36:39 +00003178#line 1906 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003179{
vlmfa67ddc2004-06-03 03:38:44 +00003180 yyval.a_tag = yyvsp[-1].a_tag;
3181 yyval.a_tag.tag_mode = TM_EXPLICIT;
vlm6a02a8a2004-09-08 00:28:11 +00003182 ;
3183 break;}
3184case 250:
vlmfce48a42004-09-14 02:36:39 +00003185#line 1913 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003186{
vlm5f0128b2004-08-20 13:25:29 +00003187 checkmem(yyvsp[0].tv_str);
3188 yyval.tv_str = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003189 ;
3190 break;}
3191case 251:
vlmfce48a42004-09-14 02:36:39 +00003192#line 1917 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003193{
vlm39e5ed72004-09-05 10:40:41 +00003194 checkmem(yyvsp[0].tv_str);
3195 yyval.tv_str = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003196 ;
3197 break;}
3198case 252:
vlmfce48a42004-09-14 02:36:39 +00003199#line 1925 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003200{
vlm39e5ed72004-09-05 10:40:41 +00003201 checkmem(yyvsp[0].tv_str);
3202 yyval.tv_str = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003203 ;
3204 break;}
3205case 253:
vlmfce48a42004-09-14 02:36:39 +00003206#line 1932 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003207{
vlm39e5ed72004-09-05 10:40:41 +00003208 checkmem(yyvsp[0].tv_str);
3209 yyval.tv_str = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003210 ;
3211 break;}
vlm6a02a8a2004-09-08 00:28:11 +00003212}
3213 /* the action file gets copied in in place of this dollarsign */
3214#line 543 "/usr/share/bison.simple"
vlmfa67ddc2004-06-03 03:38:44 +00003215
3216 yyvsp -= yylen;
3217 yyssp -= yylen;
vlm6a02a8a2004-09-08 00:28:11 +00003218#ifdef YYLSP_NEEDED
3219 yylsp -= yylen;
3220#endif
vlmfa67ddc2004-06-03 03:38:44 +00003221
vlm6a02a8a2004-09-08 00:28:11 +00003222#if YYDEBUG != 0
vlmfa67ddc2004-06-03 03:38:44 +00003223 if (yydebug)
3224 {
vlm6a02a8a2004-09-08 00:28:11 +00003225 short *ssp1 = yyss - 1;
3226 fprintf (stderr, "state stack now");
3227 while (ssp1 != yyssp)
3228 fprintf (stderr, " %d", *++ssp1);
3229 fprintf (stderr, "\n");
vlmfa67ddc2004-06-03 03:38:44 +00003230 }
3231#endif
3232
3233 *++yyvsp = yyval;
3234
vlm6a02a8a2004-09-08 00:28:11 +00003235#ifdef YYLSP_NEEDED
3236 yylsp++;
3237 if (yylen == 0)
3238 {
3239 yylsp->first_line = yylloc.first_line;
3240 yylsp->first_column = yylloc.first_column;
3241 yylsp->last_line = (yylsp-1)->last_line;
3242 yylsp->last_column = (yylsp-1)->last_column;
3243 yylsp->text = 0;
3244 }
3245 else
3246 {
3247 yylsp->last_line = (yylsp+yylen-1)->last_line;
3248 yylsp->last_column = (yylsp+yylen-1)->last_column;
3249 }
3250#endif
vlmfa67ddc2004-06-03 03:38:44 +00003251
vlm6a02a8a2004-09-08 00:28:11 +00003252 /* Now "shift" the result of the reduction.
3253 Determine what state that goes to,
3254 based on the state we popped back to
3255 and the rule number reduced by. */
vlmfa67ddc2004-06-03 03:38:44 +00003256
3257 yyn = yyr1[yyn];
3258
vlm6a02a8a2004-09-08 00:28:11 +00003259 yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
3260 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
vlmfa67ddc2004-06-03 03:38:44 +00003261 yystate = yytable[yystate];
3262 else
vlm6a02a8a2004-09-08 00:28:11 +00003263 yystate = yydefgoto[yyn - YYNTBASE];
vlmfa67ddc2004-06-03 03:38:44 +00003264
3265 goto yynewstate;
3266
vlm6a02a8a2004-09-08 00:28:11 +00003267yyerrlab: /* here on detecting error */
vlmfa67ddc2004-06-03 03:38:44 +00003268
vlm6a02a8a2004-09-08 00:28:11 +00003269 if (! yyerrstatus)
3270 /* If not already recovering from an error, report this error. */
vlmfa67ddc2004-06-03 03:38:44 +00003271 {
3272 ++yynerrs;
vlm6a02a8a2004-09-08 00:28:11 +00003273
3274#ifdef YYERROR_VERBOSE
vlmfa67ddc2004-06-03 03:38:44 +00003275 yyn = yypact[yystate];
3276
vlm6a02a8a2004-09-08 00:28:11 +00003277 if (yyn > YYFLAG && yyn < YYLAST)
vlmfa67ddc2004-06-03 03:38:44 +00003278 {
vlm6a02a8a2004-09-08 00:28:11 +00003279 int size = 0;
3280 char *msg;
3281 int x, count;
vlmfa67ddc2004-06-03 03:38:44 +00003282
vlm6a02a8a2004-09-08 00:28:11 +00003283 count = 0;
3284 /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
3285 for (x = (yyn < 0 ? -yyn : 0);
3286 x < (ssize_t)(sizeof(yytname) / sizeof(char *)); x++)
3287 if (yycheck[x + yyn] == x)
3288 size += strlen(yytname[x]) + 15, count++;
3289 msg = (char *) malloc(size + 15);
3290 if (msg != 0)
vlmfa67ddc2004-06-03 03:38:44 +00003291 {
vlm6a02a8a2004-09-08 00:28:11 +00003292 strcpy(msg, "parse error");
vlmfa67ddc2004-06-03 03:38:44 +00003293
vlm6a02a8a2004-09-08 00:28:11 +00003294 if (count < 5)
vlmfa67ddc2004-06-03 03:38:44 +00003295 {
vlm6a02a8a2004-09-08 00:28:11 +00003296 count = 0;
3297 for (x = (yyn < 0 ? -yyn : 0);
3298 x < (ssize_t)(sizeof(yytname) / sizeof(char *)); x++)
3299 if (yycheck[x + yyn] == x)
vlmfa67ddc2004-06-03 03:38:44 +00003300 {
vlm6a02a8a2004-09-08 00:28:11 +00003301 strcat(msg, count == 0 ? ", expecting `" : " or `");
3302 strcat(msg, yytname[x]);
3303 strcat(msg, "'");
3304 count++;
vlmfa67ddc2004-06-03 03:38:44 +00003305 }
3306 }
vlm6a02a8a2004-09-08 00:28:11 +00003307 yyerror(msg);
3308 free(msg);
vlmfa67ddc2004-06-03 03:38:44 +00003309 }
3310 else
vlm6a02a8a2004-09-08 00:28:11 +00003311 yyerror ("parse error; also virtual memory exceeded");
vlmfa67ddc2004-06-03 03:38:44 +00003312 }
3313 else
3314#endif /* YYERROR_VERBOSE */
vlm6a02a8a2004-09-08 00:28:11 +00003315 yyerror("parse error");
vlmfa67ddc2004-06-03 03:38:44 +00003316 }
vlm6a02a8a2004-09-08 00:28:11 +00003317
vlmfa67ddc2004-06-03 03:38:44 +00003318 goto yyerrlab1;
vlm6a02a8a2004-09-08 00:28:11 +00003319yyerrlab1: /* here on error raised explicitly by an action */
vlmfa67ddc2004-06-03 03:38:44 +00003320
3321 if (yyerrstatus == 3)
3322 {
vlm6a02a8a2004-09-08 00:28:11 +00003323 /* if just tried and failed to reuse lookahead token after an error, discard it. */
vlmfa67ddc2004-06-03 03:38:44 +00003324
vlm6a02a8a2004-09-08 00:28:11 +00003325 /* return failure if at end of input */
vlmfa67ddc2004-06-03 03:38:44 +00003326 if (yychar == YYEOF)
vlm6a02a8a2004-09-08 00:28:11 +00003327 YYABORT;
vlmfa67ddc2004-06-03 03:38:44 +00003328
vlm6a02a8a2004-09-08 00:28:11 +00003329#if YYDEBUG != 0
3330 if (yydebug)
3331 fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
3332#endif
3333
vlmfa67ddc2004-06-03 03:38:44 +00003334 yychar = YYEMPTY;
3335 }
3336
vlm6a02a8a2004-09-08 00:28:11 +00003337 /* Else will try to reuse lookahead token
3338 after shifting the error token. */
vlmfa67ddc2004-06-03 03:38:44 +00003339
vlm6a02a8a2004-09-08 00:28:11 +00003340 yyerrstatus = 3; /* Each real token shifted decrements this */
vlmfa67ddc2004-06-03 03:38:44 +00003341
vlm6a02a8a2004-09-08 00:28:11 +00003342 goto yyerrhandle;
vlm80103492004-09-07 10:39:09 +00003343
vlm6a02a8a2004-09-08 00:28:11 +00003344yyerrdefault: /* current state does not do anything special for the error token. */
vlm80103492004-09-07 10:39:09 +00003345
vlm6a02a8a2004-09-08 00:28:11 +00003346#if 0
3347 /* This is wrong; only states that explicitly want error tokens
3348 should shift them. */
3349 yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
3350 if (yyn) goto yydefault;
vlm39e5ed72004-09-05 10:40:41 +00003351#endif
vlm6a02a8a2004-09-08 00:28:11 +00003352
3353yyerrpop: /* pop the current state because it cannot handle the error token */
3354
3355 if (yyssp == yyss) YYABORT;
3356 yyvsp--;
3357 yystate = *--yyssp;
3358#ifdef YYLSP_NEEDED
3359 yylsp--;
3360#endif
3361
3362#if YYDEBUG != 0
3363 if (yydebug)
3364 {
3365 short *ssp1 = yyss - 1;
3366 fprintf (stderr, "Error: state stack now");
3367 while (ssp1 != yyssp)
3368 fprintf (stderr, " %d", *++ssp1);
3369 fprintf (stderr, "\n");
vlm39e5ed72004-09-05 10:40:41 +00003370 }
vlm6a02a8a2004-09-08 00:28:11 +00003371#endif
3372
3373yyerrhandle:
3374
3375 yyn = yypact[yystate];
3376 if (yyn == YYFLAG)
3377 goto yyerrdefault;
3378
3379 yyn += YYTERROR;
3380 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
3381 goto yyerrdefault;
3382
3383 yyn = yytable[yyn];
3384 if (yyn < 0)
3385 {
3386 if (yyn == YYFLAG)
3387 goto yyerrpop;
3388 yyn = -yyn;
3389 goto yyreduce;
3390 }
3391 else if (yyn == 0)
3392 goto yyerrpop;
vlmfa67ddc2004-06-03 03:38:44 +00003393
3394 if (yyn == YYFINAL)
3395 YYACCEPT;
3396
vlm6a02a8a2004-09-08 00:28:11 +00003397#if YYDEBUG != 0
3398 if (yydebug)
3399 fprintf(stderr, "Shifting error token, ");
3400#endif
vlmfa67ddc2004-06-03 03:38:44 +00003401
3402 *++yyvsp = yylval;
vlm6a02a8a2004-09-08 00:28:11 +00003403#ifdef YYLSP_NEEDED
3404 *++yylsp = yylloc;
3405#endif
vlmfa67ddc2004-06-03 03:38:44 +00003406
3407 yystate = yyn;
3408 goto yynewstate;
3409
vlm6a02a8a2004-09-08 00:28:11 +00003410 yyacceptlab:
3411 /* YYACCEPT comes here. */
3412 if (yyfree_stacks)
3413 {
3414 free (yyss);
3415 free (yyvs);
3416#ifdef YYLSP_NEEDED
3417 free (yyls);
vlm044f7442004-09-04 04:49:21 +00003418#endif
vlm6a02a8a2004-09-08 00:28:11 +00003419 }
3420 return 0;
vlm80103492004-09-07 10:39:09 +00003421
vlm6a02a8a2004-09-08 00:28:11 +00003422 yyabortlab:
3423 /* YYABORT comes here. */
3424 if (yyfree_stacks)
3425 {
3426 free (yyss);
3427 free (yyvs);
3428#ifdef YYLSP_NEEDED
3429 free (yyls);
vlm80103492004-09-07 10:39:09 +00003430#endif
vlm6a02a8a2004-09-08 00:28:11 +00003431 }
3432 return 1;
vlmfa67ddc2004-06-03 03:38:44 +00003433}
vlmfce48a42004-09-14 02:36:39 +00003434#line 1938 "asn1p_y.y"
vlmfa67ddc2004-06-03 03:38:44 +00003435
3436
3437
3438/*
3439 * Convert Xstring ('0101'B or '5'H) to the binary vector.
3440 */
3441static asn1p_value_t *
3442_convert_bitstring2binary(char *str, int base) {
3443 asn1p_value_t *val;
3444 int slen;
3445 int memlen;
3446 int baselen;
3447 int bits;
3448 uint8_t *binary_vector;
3449 uint8_t *bv_ptr;
3450 uint8_t cur_val;
3451
3452 assert(str);
3453 assert(str[0] == '\'');
3454
3455 switch(base) {
3456 case 'B':
3457 baselen = 1;
3458 break;
3459 case 'H':
3460 baselen = 4;
3461 break;
3462 default:
3463 assert(base == 'B' || base == 'H');
3464 errno = EINVAL;
3465 return NULL;
3466 }
3467
3468 slen = strlen(str);
3469 assert(str[slen - 1] == base);
3470 assert(str[slen - 2] == '\'');
3471
3472 memlen = slen / (8 / baselen); /* Conservative estimate */
3473
3474 bv_ptr = binary_vector = malloc(memlen + 1);
3475 if(bv_ptr == NULL)
3476 /* ENOMEM */
3477 return NULL;
3478
3479 cur_val = 0;
3480 bits = 0;
3481 while(*(++str) != '\'') {
3482 switch(baselen) {
3483 case 1:
3484 switch(*str) {
3485 case '1':
3486 cur_val |= 1 << (7 - (bits % 8));
3487 case '0':
3488 break;
3489 default:
3490 assert(!"_y UNREACH1");
3491 case ' ': case '\r': case '\n':
3492 continue;
3493 }
3494 break;
3495 case 4:
3496 switch(*str) {
3497 case '0': case '1': case '2': case '3': case '4':
3498 case '5': case '6': case '7': case '8': case '9':
3499 cur_val |= (*str - '0') << (4 - (bits % 8));
3500 break;
3501 case 'A': case 'B': case 'C':
3502 case 'D': case 'E': case 'F':
3503 cur_val |= ((*str - 'A') + 10)
3504 << (4 - (bits % 8));
3505 break;
3506 default:
3507 assert(!"_y UNREACH2");
3508 case ' ': case '\r': case '\n':
3509 continue;
3510 }
3511 break;
3512 }
3513
3514 bits += baselen;
3515 if((bits % 8) == 0) {
3516 *bv_ptr++ = cur_val;
3517 cur_val = 0;
3518 }
3519 }
3520
3521 *bv_ptr = cur_val;
3522 assert((bv_ptr - binary_vector) <= memlen);
3523
3524 val = asn1p_value_frombits(binary_vector, bits, 0);
3525 if(val == NULL) {
3526 free(binary_vector);
3527 }
3528
3529 return val;
3530}
3531
3532extern char *asn1p_text;
3533
3534int
3535yyerror(const char *msg) {
3536 fprintf(stderr,
3537 "ASN.1 grammar parse error "
3538 "near line %d (token \"%s\"): %s\n",
vlm39e5ed72004-09-05 10:40:41 +00003539 yylineno, asn1p_text, msg);
vlmfa67ddc2004-06-03 03:38:44 +00003540 return -1;
3541}
3542
3543