blob: 02d6181081e233bb4f1534cd55d2efbf03ef8f19 [file] [log] [blame]
vlmfa67ddc2004-06-03 03:38:44 +00001
vlm6a02a8a2004-09-08 00:28:11 +00002/* A Bison parser, made from asn1p_y.y
3 by GNU Bison version 1.28 */
vlmfa67ddc2004-06-03 03:38:44 +00004
vlm6a02a8a2004-09-08 00:28:11 +00005#define YYBISON 1 /* Identify Bison output. */
vlmfa67ddc2004-06-03 03:38:44 +00006
7#define yyparse asn1p_parse
vlm6a02a8a2004-09-08 00:28:11 +00008#define yylex asn1p_lex
vlmfa67ddc2004-06-03 03:38:44 +00009#define yyerror asn1p_error
vlm6a02a8a2004-09-08 00:28:11 +000010#define yylval asn1p_lval
11#define yychar asn1p_char
vlmfa67ddc2004-06-03 03:38:44 +000012#define yydebug asn1p_debug
13#define yynerrs asn1p_nerrs
vlm6a02a8a2004-09-08 00:28:11 +000014#define TOK_PPEQ 257
15#define TOK_opaque 258
16#define TOK_bstring 259
17#define TOK_cstring 260
18#define TOK_hstring 261
19#define TOK_identifier 262
20#define TOK_number 263
21#define TOK_number_negative 264
22#define TOK_typereference 265
23#define TOK_capitalreference 266
24#define TOK_typefieldreference 267
25#define TOK_valuefieldreference 268
26#define TOK_ABSENT 269
27#define TOK_ABSTRACT_SYNTAX 270
28#define TOK_ALL 271
29#define TOK_ANY 272
30#define TOK_APPLICATION 273
31#define TOK_AUTOMATIC 274
32#define TOK_BEGIN 275
33#define TOK_BIT 276
34#define TOK_BMPString 277
35#define TOK_BOOLEAN 278
36#define TOK_BY 279
37#define TOK_CHARACTER 280
38#define TOK_CHOICE 281
39#define TOK_CLASS 282
40#define TOK_COMPONENT 283
41#define TOK_COMPONENTS 284
42#define TOK_CONSTRAINED 285
43#define TOK_CONTAINING 286
44#define TOK_DEFAULT 287
45#define TOK_DEFINITIONS 288
46#define TOK_DEFINED 289
47#define TOK_EMBEDDED 290
48#define TOK_ENCODED 291
49#define TOK_ENCODING_CONTROL 292
50#define TOK_END 293
51#define TOK_ENUMERATED 294
52#define TOK_EXPLICIT 295
53#define TOK_EXPORTS 296
54#define TOK_EXTENSIBILITY 297
55#define TOK_EXTERNAL 298
56#define TOK_FALSE 299
57#define TOK_FROM 300
58#define TOK_GeneralizedTime 301
59#define TOK_GeneralString 302
60#define TOK_GraphicString 303
61#define TOK_IA5String 304
62#define TOK_IDENTIFIER 305
63#define TOK_IMPLICIT 306
64#define TOK_IMPLIED 307
65#define TOK_IMPORTS 308
66#define TOK_INCLUDES 309
67#define TOK_INSTANCE 310
68#define TOK_INSTRUCTIONS 311
69#define TOK_INTEGER 312
70#define TOK_ISO646String 313
71#define TOK_MAX 314
72#define TOK_MIN 315
73#define TOK_MINUS_INFINITY 316
74#define TOK_NULL 317
75#define TOK_NumericString 318
76#define TOK_OBJECT 319
77#define TOK_ObjectDescriptor 320
78#define TOK_OCTET 321
79#define TOK_OF 322
80#define TOK_OPTIONAL 323
81#define TOK_PATTERN 324
82#define TOK_PDV 325
83#define TOK_PLUS_INFINITY 326
84#define TOK_PRESENT 327
85#define TOK_PrintableString 328
86#define TOK_PRIVATE 329
87#define TOK_REAL 330
88#define TOK_RELATIVE_OID 331
89#define TOK_SEQUENCE 332
90#define TOK_SET 333
91#define TOK_SIZE 334
92#define TOK_STRING 335
93#define TOK_SYNTAX 336
94#define TOK_T61String 337
95#define TOK_TAGS 338
96#define TOK_TeletexString 339
97#define TOK_TRUE 340
98#define TOK_TYPE_IDENTIFIER 341
99#define TOK_UNIQUE 342
100#define TOK_UNIVERSAL 343
101#define TOK_UniversalString 344
102#define TOK_UTCTime 345
103#define TOK_UTF8String 346
104#define TOK_VideotexString 347
105#define TOK_VisibleString 348
106#define TOK_WITH 349
107#define TOK_EXCEPT 350
108#define TOK_INTERSECTION 351
109#define TOK_UNION 352
110#define TOK_TwoDots 353
111#define TOK_ThreeDots 354
112#define TOK_tag 355
vlmfa67ddc2004-06-03 03:38:44 +0000113
114#line 1 "asn1p_y.y"
115
116
117#include <stdlib.h>
118#include <stdio.h>
119#include <string.h>
120#include <errno.h>
121#include <assert.h>
122
123#include "asn1parser.h"
124
125#define YYPARSE_PARAM param
126#define YYERROR_VERBOSE
127
128int yylex(void);
129int yyerror(const char *msg);
130void asn1p_lexer_hack_push_opaque_state(void);
131void asn1p_lexer_hack_enable_with_syntax(void);
vlm9283dbe2004-08-18 04:59:12 +0000132void asn1p_lexer_hack_push_encoding_control(void);
vlmfa67ddc2004-06-03 03:38:44 +0000133#define yylineno asn1p_lineno
134extern int asn1p_lineno;
135
136
137static asn1p_value_t *
138 _convert_bitstring2binary(char *str, int base);
139
vlm6a02a8a2004-09-08 00:28:11 +0000140#define checkmem(ptr) do { \
141 if(!(ptr)) \
142 return yyerror("Memory failure"); \
vlmfa67ddc2004-06-03 03:38:44 +0000143 } while(0)
144
145#define CONSTRAINT_INSERT(root, constr_type, arg1, arg2) do { \
146 if(arg1->type != constr_type) { \
147 int __ret; \
148 root = asn1p_constraint_new(yylineno); \
149 checkmem(root); \
150 root->type = constr_type; \
151 __ret = asn1p_constraint_insert(root, \
152 arg1); \
153 checkmem(__ret == 0); \
154 } else { \
155 root = arg1; \
156 } \
157 if(arg2) { \
158 int __ret \
159 = asn1p_constraint_insert(root, arg2); \
160 checkmem(__ret == 0); \
161 } \
162 } while(0)
163
164
vlm9283dbe2004-08-18 04:59:12 +0000165#line 58 "asn1p_y.y"
vlmfa67ddc2004-06-03 03:38:44 +0000166typedef union {
167 asn1p_t *a_grammar;
168 asn1p_module_flags_e a_module_flags;
169 asn1p_module_t *a_module;
170 asn1p_expr_type_e a_type; /* ASN.1 Type */
171 asn1p_expr_t *a_expr; /* Constructed collection */
172 asn1p_constraint_t *a_constr; /* Constraint */
173 enum asn1p_constraint_type_e a_ctype;/* Constraint type */
174 asn1p_xports_t *a_xports; /* IMports/EXports */
175 asn1p_oid_t *a_oid; /* Object Identifier */
176 asn1p_oid_arc_t a_oid_arc; /* Single OID's arc */
177 struct asn1p_type_tag_s a_tag; /* A tag */
178 asn1p_ref_t *a_ref; /* Reference to custom type */
179 asn1p_wsyntx_t *a_wsynt; /* WITH SYNTAX contents */
180 asn1p_wsyntx_chunk_t *a_wchunk; /* WITH SYNTAX chunk */
181 struct asn1p_ref_component_s a_refcomp; /* Component of a reference */
182 asn1p_value_t *a_value; /* Number, DefinedValue, etc */
183 struct asn1p_param_s a_parg; /* A parameter argument */
184 asn1p_paramlist_t *a_plist; /* A pargs list */
vlmc94e28f2004-09-15 11:59:51 +0000185 struct asn1p_expr_marker_s a_marker; /* OPTIONAL/DEFAULT */
vlmfa67ddc2004-06-03 03:38:44 +0000186 enum asn1p_constr_pres_e a_pres; /* PRESENT/ABSENT/OPTIONAL */
vlmec6acd42004-09-29 13:18:09 +0000187 asn1c_integer_t a_int;
vlmfa67ddc2004-06-03 03:38:44 +0000188 char *tv_str;
189 struct {
190 char *buf;
191 int len;
192 } tv_opaque;
193 struct {
194 char *name;
195 struct asn1p_type_tag_s tag;
196 } tv_nametag;
vlm6a02a8a2004-09-08 00:28:11 +0000197} YYSTYPE;
198#include <stdio.h>
199
200#ifndef __cplusplus
201#ifndef __STDC__
202#define const
203#endif
vlmfa67ddc2004-06-03 03:38:44 +0000204#endif
205
206
207
vlm151c0b22004-09-22 16:03:36 +0000208#define YYFINAL 402
vlm6a02a8a2004-09-08 00:28:11 +0000209#define YYFLAG -32768
210#define YYNTBASE 115
vlmfa67ddc2004-06-03 03:38:44 +0000211
vlm151c0b22004-09-22 16:03:36 +0000212#define YYTRANSLATE(x) ((unsigned)(x) <= 355 ? yytranslate[x] : 212)
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,
vlm151c0b22004-09-22 16:03:36 +0000265 291, 295, 297, 299, 304, 309, 314, 321, 328, 330,
266 335, 340, 342, 346, 348, 352, 356, 360, 362, 366,
267 368, 372, 374, 376, 378, 380, 385, 389, 390, 394,
268 396, 398, 400, 402, 404, 406, 408, 410, 412, 416,
269 418, 421, 423, 425, 427, 429, 432, 435, 437, 439,
270 442, 445, 447, 449, 451, 453, 456, 458, 461, 463,
271 465, 467, 469, 471, 473, 475, 477, 479, 481, 483,
272 485, 487, 489, 491, 493, 495, 497, 499, 500, 502,
273 504, 509, 513, 518, 520, 524, 530, 532, 536, 540,
274 544, 549, 553, 555, 559, 563, 567, 571, 573, 575,
275 577, 580, 583, 587, 589, 591, 593, 595, 597, 599,
276 601, 607, 609, 613, 615, 619, 620, 622, 624, 626,
277 628, 630, 632, 636, 641, 643, 647, 650, 654, 656,
278 660, 661, 663, 665, 668, 671, 675, 677, 681, 683,
279 688, 693, 695, 697, 699, 701, 702, 704, 706, 709,
280 712, 714, 716, 718, 719, 721
vlm6a02a8a2004-09-08 00:28:11 +0000281};
vlmfa67ddc2004-06-03 03:38:44 +0000282
vlm6a02a8a2004-09-08 00:28:11 +0000283static const short yyrhs[] = { 116,
vlmc94e28f2004-09-15 11:59:51 +0000284 0, 117, 0, 116, 117, 0, 208, 118, 34, 122,
vlm6a02a8a2004-09-08 00:28:11 +0000285 3, 21, 125, 39, 0, 0, 119, 0, 104, 120,
286 105, 0, 104, 105, 0, 121, 0, 120, 121, 0,
vlm151c0b22004-09-22 16:03:36 +0000287 211, 0, 211, 106, 9, 107, 0, 9, 0, 0,
vlm6a02a8a2004-09-08 00:28:11 +0000288 123, 0, 124, 0, 123, 124, 0, 41, 84, 0,
289 52, 84, 0, 20, 84, 0, 43, 53, 0, 12,
290 57, 0, 0, 126, 0, 127, 0, 126, 127, 0,
291 129, 0, 134, 0, 142, 0, 168, 0, 137, 0,
292 0, 38, 12, 128, 0, 176, 0, 54, 130, 108,
293 0, 54, 46, 0, 131, 0, 130, 131, 0, 132,
vlmc94e28f2004-09-15 11:59:51 +0000294 46, 208, 118, 0, 133, 0, 132, 109, 133, 0,
vlm151c0b22004-09-22 16:03:36 +0000295 208, 0, 211, 0, 42, 135, 108, 0, 42, 17,
vlm6a02a8a2004-09-08 00:28:11 +0000296 108, 0, 42, 108, 0, 136, 0, 135, 109, 136,
vlm151c0b22004-09-22 16:03:36 +0000297 0, 208, 0, 211, 0, 208, 138, 3, 104, 139,
vlm6a02a8a2004-09-08 00:28:11 +0000298 105, 0, 163, 0, 173, 0, 0, 140, 0, 141,
vlmc94e28f2004-09-15 11:59:51 +0000299 0, 140, 109, 141, 0, 102, 0, 184, 0, 208,
300 3, 206, 87, 0, 208, 3, 161, 0, 208, 3,
301 151, 0, 208, 104, 143, 105, 3, 161, 0, 144,
vlm151c0b22004-09-22 16:03:36 +0000302 0, 143, 109, 144, 0, 208, 0, 208, 110, 211,
303 0, 173, 110, 211, 0, 146, 0, 145, 109, 146,
304 0, 161, 0, 211, 0, 148, 0, 147, 109, 148,
305 0, 211, 161, 200, 0, 30, 68, 161, 0, 160,
306 0, 150, 0, 149, 109, 150, 0, 211, 161, 0,
vlmfce48a42004-09-14 02:36:39 +0000307 160, 0, 28, 104, 153, 105, 155, 0, 0, 88,
308 0, 154, 0, 153, 109, 154, 0, 166, 200, 0,
309 166, 161, 200, 152, 0, 166, 166, 200, 152, 0,
310 0, 156, 0, 0, 95, 82, 104, 157, 158, 105,
311 0, 159, 0, 158, 159, 0, 4, 0, 166, 0,
vlmc94e28f2004-09-15 11:59:51 +0000312 102, 0, 102, 111, 171, 0, 102, 111, 205, 0,
313 206, 162, 180, 0, 175, 0, 176, 0, 27, 104,
vlm6a02a8a2004-09-08 00:28:11 +0000314 149, 105, 0, 78, 104, 147, 105, 0, 79, 104,
vlm151c0b22004-09-22 16:03:36 +0000315 147, 105, 0, 78, 180, 68, 210, 206, 162, 0,
316 79, 180, 68, 210, 206, 162, 0, 18, 0, 18,
317 35, 25, 211, 0, 208, 104, 145, 105, 0, 163,
318 0, 56, 68, 163, 0, 11, 0, 11, 112, 208,
319 0, 209, 112, 208, 0, 11, 112, 211, 0, 209,
320 0, 209, 112, 164, 0, 165, 0, 164, 112, 165,
321 0, 167, 0, 167, 0, 13, 0, 14, 0, 211,
322 138, 3, 169, 0, 211, 110, 169, 0, 0, 104,
323 170, 172, 0, 63, 0, 45, 0, 86, 0, 5,
324 0, 7, 0, 6, 0, 205, 0, 171, 0, 211,
325 0, 208, 112, 211, 0, 4, 0, 172, 4, 0,
326 24, 0, 63, 0, 76, 0, 174, 0, 67, 81,
327 0, 65, 51, 0, 77, 0, 44, 0, 36, 71,
328 0, 26, 81, 0, 91, 0, 47, 0, 58, 0,
329 40, 0, 22, 81, 0, 173, 0, 174, 202, 0,
330 23, 0, 48, 0, 49, 0, 50, 0, 59, 0,
331 64, 0, 74, 0, 83, 0, 85, 0, 90, 0,
332 92, 0, 93, 0, 94, 0, 66, 0, 99, 0,
333 100, 0, 97, 0, 98, 0, 96, 0, 0, 181,
334 0, 182, 0, 80, 106, 183, 107, 0, 106, 183,
335 107, 0, 182, 106, 183, 107, 0, 184, 0, 184,
336 109, 102, 0, 184, 109, 102, 109, 184, 0, 185,
337 0, 184, 177, 185, 0, 184, 178, 185, 0, 185,
338 179, 185, 0, 187, 106, 183, 107, 0, 106, 183,
339 107, 0, 188, 0, 188, 186, 188, 0, 61, 186,
340 188, 0, 188, 186, 60, 0, 61, 186, 60, 0,
341 194, 0, 189, 0, 101, 0, 101, 113, 0, 113,
342 101, 0, 113, 101, 113, 0, 80, 0, 46, 0,
343 205, 0, 211, 0, 6, 0, 45, 0, 86, 0,
344 95, 30, 104, 190, 105, 0, 191, 0, 190, 109,
345 191, 0, 102, 0, 211, 180, 192, 0, 0, 193,
346 0, 73, 0, 15, 0, 69, 0, 195, 0, 196,
347 0, 104, 208, 105, 0, 195, 104, 197, 105, 0,
348 198, 0, 197, 109, 198, 0, 114, 199, 0, 114,
349 112, 199, 0, 211, 0, 199, 112, 211, 0, 0,
350 201, 0, 69, 0, 33, 169, 0, 104, 105, 0,
351 104, 203, 105, 0, 204, 0, 203, 109, 204, 0,
352 211, 0, 211, 106, 205, 107, 0, 211, 106, 171,
353 107, 0, 205, 0, 102, 0, 9, 0, 10, 0,
354 0, 207, 0, 103, 0, 103, 52, 0, 103, 41,
355 0, 11, 0, 12, 0, 12, 0, 0, 211, 0,
356 8, 0
vlm6a02a8a2004-09-08 00:28:11 +0000357};
vlmfa67ddc2004-06-03 03:38:44 +0000358
359#endif
360
vlm6a02a8a2004-09-08 00:28:11 +0000361#if YYDEBUG != 0
362static const short yyrline[] = { 0,
vlm151c0b22004-09-22 16:03:36 +0000363 300, 306, 312, 328, 353, 355, 358, 362, 367, 374,
364 382, 387, 391, 400, 402, 410, 414, 422, 426, 429,
365 432, 436, 456, 458, 466, 470, 502, 506, 515, 522,
366 535, 542, 544, 556, 569, 576, 581, 587, 593, 602,
367 608, 614, 621, 629, 633, 636, 643, 649, 655, 662,
368 671, 681, 689, 697, 699, 709, 712, 716, 719, 731,
369 743, 749, 765, 774, 784, 794, 799, 806, 816, 822,
370 828, 832, 844, 850, 856, 863, 870, 875, 881, 887,
371 893, 898, 908, 910, 913, 921, 927, 936, 942, 959,
372 961, 966, 970, 975, 980, 986, 990, 1001, 1010, 1019,
373 1030, 1052, 1056, 1062, 1068, 1074, 1080, 1090, 1100, 1106,
374 1120, 1144, 1151, 1165, 1174, 1184, 1194, 1204, 1212, 1233,
375 1242, 1251, 1252, 1254, 1261, 1273, 1283, 1291, 1291, 1296,
376 1301, 1306, 1311, 1315, 1319, 1323, 1326, 1331, 1343, 1359,
377 1370, 1384, 1386, 1387, 1388, 1389, 1390, 1391, 1392, 1393,
378 1394, 1395, 1396, 1402, 1404, 1405, 1408, 1415, 1427, 1429,
379 1433, 1437, 1438, 1439, 1440, 1441, 1445, 1446, 1447, 1448,
380 1452, 1453, 1460, 1460, 1461, 1461, 1462, 1464, 1466, 1471,
381 1475, 1484, 1488, 1493, 1497, 1503, 1513, 1517, 1520, 1523,
382 1528, 1537, 1545, 1551, 1558, 1566, 1574, 1583, 1586, 1591,
383 1593, 1594, 1595, 1598, 1602, 1607, 1611, 1622, 1626, 1631,
384 1638, 1644, 1648, 1653, 1659, 1671, 1673, 1676, 1680, 1683,
385 1688, 1692, 1700, 1715, 1721, 1728, 1741, 1753, 1768, 1772,
386 1789, 1794, 1797, 1802, 1824, 1829, 1834, 1840, 1846, 1854,
387 1862, 1870, 1877, 1887, 1892, 1922, 1924, 1927, 1932, 1936,
388 1942, 1947, 1954, 1961, 1963, 1967
vlm6a02a8a2004-09-08 00:28:11 +0000389};
390#endif
391
392
393#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
394
395static const char * const yytname[] = { "$","error","$undefined.","TOK_PPEQ",
396"TOK_opaque","TOK_bstring","TOK_cstring","TOK_hstring","TOK_identifier","TOK_number",
397"TOK_number_negative","TOK_typereference","TOK_capitalreference","TOK_typefieldreference",
398"TOK_valuefieldreference","TOK_ABSENT","TOK_ABSTRACT_SYNTAX","TOK_ALL","TOK_ANY",
399"TOK_APPLICATION","TOK_AUTOMATIC","TOK_BEGIN","TOK_BIT","TOK_BMPString","TOK_BOOLEAN",
400"TOK_BY","TOK_CHARACTER","TOK_CHOICE","TOK_CLASS","TOK_COMPONENT","TOK_COMPONENTS",
401"TOK_CONSTRAINED","TOK_CONTAINING","TOK_DEFAULT","TOK_DEFINITIONS","TOK_DEFINED",
402"TOK_EMBEDDED","TOK_ENCODED","TOK_ENCODING_CONTROL","TOK_END","TOK_ENUMERATED",
403"TOK_EXPLICIT","TOK_EXPORTS","TOK_EXTENSIBILITY","TOK_EXTERNAL","TOK_FALSE",
404"TOK_FROM","TOK_GeneralizedTime","TOK_GeneralString","TOK_GraphicString","TOK_IA5String",
405"TOK_IDENTIFIER","TOK_IMPLICIT","TOK_IMPLIED","TOK_IMPORTS","TOK_INCLUDES","TOK_INSTANCE",
406"TOK_INSTRUCTIONS","TOK_INTEGER","TOK_ISO646String","TOK_MAX","TOK_MIN","TOK_MINUS_INFINITY",
407"TOK_NULL","TOK_NumericString","TOK_OBJECT","TOK_ObjectDescriptor","TOK_OCTET",
408"TOK_OF","TOK_OPTIONAL","TOK_PATTERN","TOK_PDV","TOK_PLUS_INFINITY","TOK_PRESENT",
409"TOK_PrintableString","TOK_PRIVATE","TOK_REAL","TOK_RELATIVE_OID","TOK_SEQUENCE",
410"TOK_SET","TOK_SIZE","TOK_STRING","TOK_SYNTAX","TOK_T61String","TOK_TAGS","TOK_TeletexString",
411"TOK_TRUE","TOK_TYPE_IDENTIFIER","TOK_UNIQUE","TOK_UNIVERSAL","TOK_UniversalString",
412"TOK_UTCTime","TOK_UTF8String","TOK_VideotexString","TOK_VisibleString","TOK_WITH",
413"TOK_EXCEPT","'^'","TOK_INTERSECTION","'|'","TOK_UNION","TOK_TwoDots","TOK_ThreeDots",
414"TOK_tag","'{'","'}'","'('","')'","';'","','","':'","'!'","'.'","'<'","'@'",
415"ParsedGrammar","ModuleList","ModuleSpecification","optObjectIdentifier","ObjectIdentifier",
416"ObjectIdentifierBody","ObjectIdentifierElement","optModuleSpecificationFlags",
417"ModuleSpecificationFlags","ModuleSpecificationFlag","optModuleSpecificationBody",
418"ModuleSpecificationBody","ModuleSpecificationElement","@1","ImportsDefinition",
419"ImportsBundleSet","ImportsBundle","ImportsList","ImportsElement","ExportsDefinition",
420"ExportsBody","ExportsElement","ValueSetDefinition","DefinedTypeRef","optValueSetBody",
421"ValueSetBody","ValueSetElement","DataTypeReference","ParameterArgumentList",
422"ParameterArgumentName","ActualParameterList","ActualParameter","ComponentTypeLists",
423"ComponentType","AlternativeTypeLists","AlternativeType","ClassDeclaration",
424"optUnique","ClassFieldList","ClassField","optWithSyntax","WithSyntax","@2",
425"WithSyntaxFormat","WithSyntaxFormatToken","ExtensionAndException","Type","TypeDeclaration",
426"ComplexTypeReference","ComplexTypeReferenceAmpList","ComplexTypeReferenceElement",
vlmc94e28f2004-09-15 11:59:51 +0000427"ClassFieldIdentifier","ClassFieldName","ValueDefinition","Value","@3","DefinedValue",
428"Opaque","BasicTypeId","BasicTypeId_UniverationCompatible","BasicType","BasicString",
429"Union","Intersection","Except","optConstraints","Constraints","SetOfConstraints",
430"ElementSetSpecs","ElementSetSpec","ConstraintSubtypeElement","ConstraintRangeSpec",
431"ConstraintSpec","ConstraintValue","WithComponents","WithComponentsList","WithComponentsElement",
432"optPresenceConstraint","PresenceConstraint","TableConstraint","SimpleTableConstraint",
433"ComponentRelationConstraint","AtNotationList","AtNotationElement","ComponentIdList",
434"optMarker","Marker","UniverationDefinition","UniverationList","UniverationElement",
vlm151c0b22004-09-22 16:03:36 +0000435"SignedNumber","optTag","Tag","TypeRefName","ObjectClassReference","optIdentifier",
436"Identifier", NULL
vlm6a02a8a2004-09-08 00:28:11 +0000437};
438#endif
439
440static const short yyr1[] = { 0,
441 115, 116, 116, 117, 118, 118, 119, 119, 120, 120,
442 121, 121, 121, 122, 122, 123, 123, 124, 124, 124,
443 124, 124, 125, 125, 126, 126, 127, 127, 127, 127,
444 127, 128, 127, 127, 129, 129, 130, 130, 131, 132,
445 132, 133, 133, 134, 134, 134, 135, 135, 136, 136,
446 137, 138, 138, 139, 139, 140, 140, 141, 141, 142,
447 142, 142, 142, 143, 143, 144, 144, 144, 145, 145,
448 146, 146, 147, 147, 148, 148, 148, 149, 149, 150,
449 150, 151, 152, 152, 153, 153, 154, 154, 154, 155,
450 155, 157, 156, 158, 158, 159, 159, 160, 160, 160,
451 161, 162, 162, 162, 162, 162, 162, 162, 162, 162,
vlmc94e28f2004-09-15 11:59:51 +0000452 162, 162, 162, 163, 163, 163, 163, 163, 163, 164,
453 164, 165, 166, 167, 167, 168, 169, 170, 169, 169,
454 169, 169, 169, 169, 169, 169, 169, 171, 171, 172,
455 172, 173, 173, 173, 173, 173, 173, 173, 173, 173,
456 173, 173, 173, 174, 174, 174, 175, 175, 176, 176,
457 176, 176, 176, 176, 176, 176, 176, 176, 176, 176,
458 176, 176, 177, 177, 178, 178, 179, 180, 180, 181,
459 181, 182, 182, 183, 183, 183, 184, 184, 184, 184,
460 185, 185, 185, 185, 185, 185, 185, 185, 185, 186,
461 186, 186, 186, 187, 187, 188, 188, 188, 188, 188,
462 189, 190, 190, 191, 191, 192, 192, 193, 193, 193,
463 194, 194, 195, 196, 197, 197, 198, 198, 199, 199,
464 200, 200, 201, 201, 202, 202, 203, 203, 204, 204,
465 204, 204, 204, 205, 205, 206, 206, 207, 207, 207,
vlm151c0b22004-09-22 16:03:36 +0000466 208, 208, 209, 210, 210, 211
vlm6a02a8a2004-09-08 00:28:11 +0000467};
468
469static const short yyr2[] = { 0,
470 1, 1, 2, 8, 0, 1, 3, 2, 1, 2,
471 1, 4, 1, 0, 1, 1, 2, 2, 2, 2,
472 2, 2, 0, 1, 1, 2, 1, 1, 1, 1,
473 1, 0, 3, 1, 3, 2, 1, 2, 4, 1,
474 3, 1, 1, 3, 3, 2, 1, 3, 1, 1,
475 6, 1, 1, 0, 1, 1, 3, 1, 1, 4,
vlmfce48a42004-09-14 02:36:39 +0000476 3, 3, 6, 1, 3, 1, 3, 3, 1, 3,
vlm6a02a8a2004-09-08 00:28:11 +0000477 1, 1, 1, 3, 3, 3, 1, 1, 3, 2,
478 1, 5, 0, 1, 1, 3, 2, 4, 4, 0,
479 1, 0, 6, 1, 2, 1, 1, 1, 3, 3,
vlm151c0b22004-09-22 16:03:36 +0000480 3, 1, 1, 4, 4, 4, 6, 6, 1, 4,
vlmc94e28f2004-09-15 11:59:51 +0000481 4, 1, 3, 1, 3, 3, 3, 1, 3, 1,
482 3, 1, 1, 1, 1, 4, 3, 0, 3, 1,
483 1, 1, 1, 1, 1, 1, 1, 1, 3, 1,
484 2, 1, 1, 1, 1, 2, 2, 1, 1, 2,
485 2, 1, 1, 1, 1, 2, 1, 2, 1, 1,
vlm6a02a8a2004-09-08 00:28:11 +0000486 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
vlmc94e28f2004-09-15 11:59:51 +0000487 1, 1, 1, 1, 1, 1, 1, 0, 1, 1,
488 4, 3, 4, 1, 3, 5, 1, 3, 3, 3,
489 4, 3, 1, 3, 3, 3, 3, 1, 1, 1,
490 2, 2, 3, 1, 1, 1, 1, 1, 1, 1,
491 5, 1, 3, 1, 3, 0, 1, 1, 1, 1,
492 1, 1, 3, 4, 1, 3, 2, 3, 1, 3,
493 0, 1, 1, 2, 2, 3, 1, 3, 1, 4,
494 4, 1, 1, 1, 1, 0, 1, 1, 2, 2,
vlm151c0b22004-09-22 16:03:36 +0000495 1, 1, 1, 0, 1, 1
vlm6a02a8a2004-09-08 00:28:11 +0000496};
497
498static const short yydefact[] = { 0,
vlm151c0b22004-09-22 16:03:36 +0000499 251, 252, 1, 2, 5, 3, 0, 0, 6, 256,
vlm6a02a8a2004-09-08 00:28:11 +0000500 13, 8, 0, 9, 11, 14, 7, 10, 0, 0,
501 0, 0, 0, 0, 0, 15, 16, 0, 22, 20,
vlmc94e28f2004-09-15 11:59:51 +0000502 18, 21, 19, 0, 17, 12, 23, 159, 0, 0,
503 160, 161, 162, 0, 163, 164, 172, 165, 166, 167,
504 168, 169, 170, 171, 0, 24, 25, 27, 28, 31,
vlm6a02a8a2004-09-08 00:28:11 +0000505 29, 30, 34, 0, 0, 32, 0, 46, 0, 47,
506 49, 50, 36, 0, 37, 0, 40, 42, 43, 4,
vlmc94e28f2004-09-15 11:59:51 +0000507 26, 246, 114, 253, 0, 142, 0, 0, 155, 149,
508 153, 154, 143, 0, 0, 144, 148, 152, 0, 0,
509 52, 53, 145, 118, 0, 33, 45, 44, 0, 35,
510 38, 0, 0, 0, 248, 62, 61, 0, 247, 0,
511 156, 151, 150, 147, 146, 0, 64, 0, 66, 0,
512 0, 0, 48, 5, 41, 0, 250, 249, 114, 253,
513 109, 0, 0, 178, 178, 60, 178, 112, 157, 145,
514 102, 103, 0, 115, 117, 0, 0, 0, 0, 54,
515 124, 125, 119, 120, 122, 116, 133, 135, 134, 244,
516 245, 131, 130, 132, 128, 126, 137, 136, 0, 138,
517 39, 0, 85, 246, 123, 0, 0, 0, 0, 0,
518 0, 0, 179, 180, 0, 0, 101, 0, 158, 246,
519 246, 65, 68, 67, 208, 209, 205, 0, 204, 210,
520 0, 58, 0, 0, 0, 55, 56, 59, 187, 0,
521 193, 199, 198, 221, 222, 206, 207, 0, 0, 0,
522 0, 90, 0, 0, 233, 231, 231, 87, 232, 0,
523 0, 98, 0, 78, 81, 246, 113, 0, 0, 0,
vlm151c0b22004-09-22 16:03:36 +0000524 73, 77, 246, 0, 184, 254, 0, 0, 254, 243,
vlmc94e28f2004-09-15 11:59:51 +0000525 235, 0, 237, 242, 239, 0, 69, 71, 72, 63,
526 200, 0, 0, 0, 0, 0, 51, 0, 175, 176,
527 173, 174, 0, 0, 177, 0, 0, 0, 0, 121,
528 140, 129, 139, 127, 0, 82, 91, 86, 234, 83,
529 83, 110, 0, 104, 0, 80, 0, 246, 105, 0,
vlm151c0b22004-09-22 16:03:36 +0000530 231, 182, 0, 246, 255, 0, 106, 246, 236, 0,
531 0, 111, 246, 201, 202, 197, 195, 0, 223, 192,
532 57, 188, 189, 190, 0, 196, 194, 0, 0, 225,
533 141, 0, 84, 88, 89, 99, 100, 138, 79, 181,
534 76, 74, 75, 185, 0, 183, 0, 238, 0, 0,
535 70, 203, 214, 0, 212, 178, 191, 0, 227, 229,
536 224, 0, 92, 0, 107, 108, 241, 240, 211, 0,
537 216, 228, 0, 226, 0, 186, 213, 219, 220, 218,
538 215, 217, 230, 96, 0, 94, 97, 93, 95, 0,
539 0, 0
vlm6a02a8a2004-09-08 00:28:11 +0000540};
541
vlm151c0b22004-09-22 16:03:36 +0000542static const short yydefgoto[] = { 400,
vlm6a02a8a2004-09-08 00:28:11 +0000543 3, 4, 8, 9, 13, 14, 25, 26, 27, 55,
544 56, 57, 106, 58, 74, 75, 76, 77, 59, 69,
vlmc94e28f2004-09-15 11:59:51 +0000545 70, 60, 100, 215, 216, 217, 61, 126, 127, 266,
vlm151c0b22004-09-22 16:03:36 +0000546 267, 250, 251, 243, 244, 116, 344, 182, 183, 296,
547 297, 385, 395, 396, 252, 268, 147, 148, 163, 164,
vlmc94e28f2004-09-15 11:59:51 +0000548 184, 185, 62, 176, 229, 177, 292, 149, 103, 151,
549 152, 283, 284, 286, 192, 193, 194, 254, 255, 219,
vlm151c0b22004-09-22 16:03:36 +0000550 273, 220, 221, 222, 364, 365, 391, 392, 223, 224,
551 225, 339, 340, 369, 238, 239, 199, 262, 263, 226,
552 240, 119, 179, 104, 314, 227
vlm6a02a8a2004-09-08 00:28:11 +0000553};
554
vlm151c0b22004-09-22 16:03:36 +0000555static const short yypact[] = { 93,
556-32768,-32768, 93,-32768, 65,-32768, 23, 78,-32768,-32768,
557-32768,-32768, 52,-32768, 68, 224,-32768,-32768, 118, 122,
558 51, 59, 139, 113, 203, 224,-32768, 109,-32768,-32768,
559-32768,-32768,-32768, 201,-32768,-32768, 318,-32768, 220, 9,
560-32768,-32768,-32768, 173,-32768,-32768,-32768,-32768,-32768,-32768,
561-32768,-32768,-32768,-32768, 198, 318,-32768,-32768,-32768,-32768,
562-32768,-32768,-32768, 12, 532,-32768, 135,-32768, 46,-32768,
563-32768,-32768,-32768, 32,-32768, -11,-32768,-32768,-32768,-32768,
564-32768, -6, 149,-32768, 196,-32768, 207, 226,-32768,-32768,
565-32768,-32768,-32768, 223, 214,-32768,-32768,-32768, 549, 305,
566-32768,-32768,-32768, 200, 307,-32768,-32768,-32768, 252,-32768,
567-32768, 93, 252, 211, 30,-32768,-32768, 395,-32768, 252,
568-32768,-32768,-32768,-32768,-32768, -25,-32768, 208, 209, 216,
569 293, 155,-32768, 65,-32768, 217,-32768,-32768, -5, 229,
570 292, 231, 268, -23, 64,-32768, -55,-32768,-32768, 233,
571-32768,-32768, 234,-32768,-32768, 336, 549, 332, 332, 167,
572-32768,-32768, 230,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
573-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 232, 235,
574-32768, 77,-32768, 181,-32768, 321, 8, 280, 241, 39,
575 248, 281,-32768, 242, 39, 282,-32768, 45,-32768, 21,
576 250,-32768,-32768,-32768,-32768,-32768,-32768, 29,-32768,-32768,
577 325,-32768, 93, 248, 246, 253,-32768, 225, 267, 258,
578 29,-32768,-32768, 261,-32768,-32768,-32768, 217, 365, 332,
579 155, 275, 217, 155,-32768, 17, 17,-32768,-32768, 472,
580 332, 260, 112,-32768,-32768, 250,-32768, 248, 306, 146,
581-32768,-32768, 250, 271, 202, 332, 248, 161, 332,-32768,
582-32768, 163,-32768,-32768, 269, 170,-32768,-32768,-32768,-32768,
583 266, 279, 86, 277, 278, 283,-32768, 167,-32768,-32768,
584-32768,-32768, 248, 248,-32768, 248, 248, 272, 273,-32768,
585-32768, 381,-32768,-32768, 304,-32768,-32768,-32768,-32768, 300,
586 300,-32768, 193,-32768, 8,-32768, 284, 250,-32768, 39,
587 17,-32768, 287, 250,-32768, 286,-32768, 250,-32768, 54,
588 193,-32768, 21,-32768, 285,-32768,-32768, 37,-32768,-32768,
589-32768,-32768,-32768,-32768, 288,-32768,-32768, -4, 178,-32768,
590-32768, 290,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
591-32768,-32768,-32768, 291, 472,-32768, 472,-32768, 289, 295,
592-32768,-32768,-32768, 180,-32768, -55,-32768, 332, 297,-32768,
593-32768, 273,-32768, 248,-32768,-32768,-32768,-32768,-32768, 37,
594 76, 297, 332,-32768, 185, 225,-32768,-32768,-32768,-32768,
595-32768,-32768,-32768,-32768, 14,-32768,-32768,-32768,-32768, 397,
596 399,-32768
vlm6a02a8a2004-09-08 00:28:11 +0000597};
598
599static const short yypgoto[] = {-32768,
vlm151c0b22004-09-22 16:03:36 +0000600-32768, 401, 294,-32768,-32768, 392,-32768,-32768, 388,-32768,
601-32768, 359,-32768,-32768,-32768, 342,-32768, 310,-32768,-32768,
602 311,-32768, 360,-32768,-32768, 148,-32768,-32768, 270,-32768,
603 101, 237, 119,-32768, 125,-32768, 132,-32768, 204,-32768,
604-32768,-32768,-32768, 41, -173, -75, -146, -52,-32768, 206,
605 -175, -90,-32768, -97,-32768, -231,-32768, 1, -117,-32768,
606 31,-32768,-32768,-32768, -137,-32768,-32768, -61, -149, -38,
607 219,-32768, -195,-32768,-32768, 58,-32768,-32768,-32768,-32768,
608-32768,-32768, 69, 79, -163,-32768,-32768,-32768, 126, -113,
609 -79,-32768, 2,-32768, 189, -7
vlm6a02a8a2004-09-08 00:28:11 +0000610};
611
612
vlm151c0b22004-09-22 16:03:36 +0000613#define YYLAST 640
vlm6a02a8a2004-09-08 00:28:11 +0000614
615
616static const short yytable[] = { 15,
vlm151c0b22004-09-22 16:03:36 +0000617 150, 5, 118, 10, 5, 15, 117, 196, 237, 197,
618 218, 101, 101, 245, 82, 10, 10, 394, 178, 1,
619 2, 114, 83, 84, 189, 67, 161, 162, 10, 65,
620 10, 11, 72, 85, 112, 86, 79, 87, 64, 10,
621 165, 71, 1, 2, 10, 78, 10, 88, 65, 234,
622 191, 89, 10, 170, 171, 90, 189, 64, 91, 10,
623 11, 10, 170, 171, 102, 102, 79, 63, 249, 92,
624 137, 346, 300, 301, 93, 78, 94, 327, 95, 156,
625 190, 138, 191, 157, 264, 235, 63, 96, 97, 359,
626 388, 205, 337, 10, 170, 171, 115, 113, -251, 128,
627 129, 72, 98, 1, 2, 79, 120, 368, 236, 242,
628 71, 16, 155, 134, 78, 99, 68, 178, 398, 153,
629 178, 154, 150, 115, 180, 270, 28, 12, 218, 271,
630 206, 245, 166, 294, 30, 247, 299, 165, 363, 110,
631 242, 272, 31, 189, 389, 326, 260, 353, 390, 261,
632 203, 204, 276, 108, 109, 260, 17, 128, 129, 167,
633 168, 169, 10, 170, 171, 1, 2, 195, 7, 191,
634 306, 210, 205, 19, 10, 170, 171, 311, 29, 246,
635 10, 232, 253, 1, 2, 233, 307, 253, 394, 347,
636 265, 32, 269, 161, 162, 316, 33, 161, 162, 172,
637 10, 170, 171, 1, 2, 34, 264, 360, 375, 397,
638 376, 206, 207, 234, 275, 36, 304, 173, 73, 397,
639 305, 37, 293, 180, 386, 335, 180, 208, 381, 161,
640 162, 66, 351, 302, 355, 20, 80, 150, 357, 150,
641 174, 153, 107, 21, 332, 333, 209, 334, 315, 235,
642 309, 315, 210, 205, 310, 10, 170, 171, 175, 10,
643 120, 211, 1, 2, 22, 317, 23, 319, 212, 310,
644 213, 320, 214, 124, 322, 24, 121, 205, 323, 10,
645 170, 171, 371, 115, 379, -231, 372, 122, 380, -231,
646 83, 84, 206, 207, 125, 348, 123, 246, 279, 280,
647 281, 282, 253, 1, 2, 161, 162, 130, 208, 132,
648 313, 131, 265, 348, 136, 269, 206, 158, 159, 160,
649 366, 279, 280, 281, 282, 10, 186, 209, 1, 2,
650 370, 336, -252, 210, 187, 188, 198, 200, 201, 10,
651 38, 228, 211, 230, 231, 241, 248, 257, 256, 259,
652 277, 213, 115, 214, 274, 39, 153, 210, 153, 40,
653 370, 278, 285, 287, 289, 41, 42, 43, 291, 295,
654 303, 44, 366, 308, 321, 393, 45, 312, 324, 325,
655 328, 46, 329, 47, 341, 342, 338, 343, 354, 330,
656 350, 48, 356, 373, 367, 377, 401, 362, 402, 374,
657 49, 378, 50, 6, 18, 139, 140, 51, 383, 52,
658 53, 54, 141, 35, 81, 111, 85, 38, 86, 133,
659 87, 142, 135, 361, 105, 331, 202, 181, 352, 349,
660 88, 258, 345, 290, 89, 399, 298, 387, 90, 288,
661 384, 91, 41, 42, 43, 358, 382, 318, 0, 0,
662 143, 0, 92, 45, 0, 0, 0, 93, 46, 94,
663 47, 95, 0, 0, 0, 0, 0, 0, 48, 0,
664 96, 97, 144, 145, 0, 0, 0, 49, 0, 50,
665 0, 146, 139, 140, 51, 98, 52, 53, 54, 141,
666 0, 0, 0, 85, 38, 86, 0, 87, 142, 0,
667 0, 0, 0, 0, 0, 0, 0, 88, 0, 0,
668 0, 89, 0, 0, 0, 90, 0, 0, 91, 41,
669 42, 43, 0, 0, 0, 0, 0, 143, 0, 92,
670 45, 0, 0, 0, 93, 46, 94, 47, 95, 0,
671 0, 0, 83, 84, 0, 48, 0, 96, 97, 144,
672 145, 0, 0, 85, 49, 86, 50, 87, 0, 1,
673 2, 51, 98, 52, 53, 54, 0, 88, 0, 0,
674 85, 89, 86, 0, 87, 90, 0, 0, 91, 0,
675 0, 0, 0, 0, 88, 0, 0, 0, 89, 92,
676 0, 0, 90, 0, 93, 91, 94, 0, 95, 0,
677 0, 0, 0, 0, 0, 0, 92, 96, 97, 0,
678 0, 93, 0, 94, 0, 95, 0, 0, 0, 0,
679 0, 0, 98, 0, 96, 97, 0, 0, 0, 0,
680 0, 0, 0, 0, 0, 0, 0, 0, 0, 98
vlm6a02a8a2004-09-08 00:28:11 +0000681};
682
683static const short yycheck[] = { 7,
vlm151c0b22004-09-22 16:03:36 +0000684 118, 0, 82, 8, 3, 13, 82, 145, 184, 147,
685 160, 64, 65, 187, 3, 8, 8, 4, 132, 11,
686 12, 28, 11, 12, 80, 17, 13, 14, 8, 37,
687 8, 9, 40, 22, 46, 24, 44, 26, 37, 8,
688 131, 40, 11, 12, 8, 44, 8, 36, 56, 33,
689 106, 40, 8, 9, 10, 44, 80, 56, 47, 8,
690 9, 8, 9, 10, 64, 65, 74, 37, 30, 58,
691 41, 303, 236, 237, 63, 74, 65, 273, 67, 105,
692 104, 52, 106, 109, 198, 69, 56, 76, 77, 321,
693 15, 6, 288, 8, 9, 10, 103, 109, 104, 99,
694 99, 109, 91, 11, 12, 113, 112, 112, 184, 102,
695 109, 34, 120, 112, 113, 104, 108, 231, 105, 118,
696 234, 120, 240, 103, 132, 201, 9, 105, 278, 101,
697 45, 305, 131, 231, 84, 188, 234, 228, 102, 108,
698 102, 113, 84, 80, 69, 60, 102, 311, 73, 105,
699 158, 159, 214, 108, 109, 102, 105, 157, 157, 5,
700 6, 7, 8, 9, 10, 11, 12, 104, 104, 106,
701 246, 86, 6, 106, 8, 9, 10, 253, 57, 187,
702 8, 105, 190, 11, 12, 109, 248, 195, 4, 303,
703 198, 53, 200, 13, 14, 257, 84, 13, 14, 45,
704 8, 9, 10, 11, 12, 3, 320, 321, 355, 385,
705 357, 45, 46, 33, 213, 107, 105, 63, 46, 395,
706 109, 21, 230, 231, 374, 287, 234, 61, 366, 13,
707 14, 12, 308, 241, 314, 12, 39, 355, 318, 357,
708 86, 240, 108, 20, 283, 284, 80, 286, 256, 69,
709 105, 259, 86, 6, 109, 8, 9, 10, 104, 8,
710 112, 95, 11, 12, 41, 105, 43, 105, 102, 109,
711 104, 109, 106, 51, 105, 52, 81, 6, 109, 8,
712 9, 10, 105, 103, 105, 105, 109, 81, 109, 109,
713 11, 12, 45, 46, 81, 303, 71, 305, 97, 98,
714 99, 100, 310, 11, 12, 13, 14, 3, 61, 3,
715 109, 112, 320, 321, 104, 323, 45, 110, 110, 104,
716 328, 97, 98, 99, 100, 8, 35, 80, 11, 12,
717 338, 60, 104, 86, 104, 68, 104, 104, 3, 8,
718 23, 112, 95, 112, 110, 25, 106, 106, 68, 68,
719 105, 104, 103, 106, 30, 38, 355, 86, 357, 42,
720 368, 109, 96, 106, 104, 48, 49, 50, 4, 95,
721 111, 54, 380, 68, 106, 383, 59, 107, 113, 101,
722 104, 64, 105, 66, 4, 82, 114, 88, 102, 107,
723 107, 74, 107, 104, 107, 107, 0, 113, 0, 109,
724 83, 107, 85, 3, 13, 11, 12, 90, 112, 92,
725 93, 94, 18, 26, 56, 74, 22, 23, 24, 109,
726 26, 27, 113, 323, 65, 278, 157, 134, 310, 305,
727 36, 195, 301, 228, 40, 395, 233, 380, 44, 221,
728 372, 47, 48, 49, 50, 320, 368, 259, -1, -1,
729 56, -1, 58, 59, -1, -1, -1, 63, 64, 65,
730 66, 67, -1, -1, -1, -1, -1, -1, 74, -1,
731 76, 77, 78, 79, -1, -1, -1, 83, -1, 85,
732 -1, 87, 11, 12, 90, 91, 92, 93, 94, 18,
733 -1, -1, -1, 22, 23, 24, -1, 26, 27, -1,
734 -1, -1, -1, -1, -1, -1, -1, 36, -1, -1,
735 -1, 40, -1, -1, -1, 44, -1, -1, 47, 48,
736 49, 50, -1, -1, -1, -1, -1, 56, -1, 58,
737 59, -1, -1, -1, 63, 64, 65, 66, 67, -1,
738 -1, -1, 11, 12, -1, 74, -1, 76, 77, 78,
739 79, -1, -1, 22, 83, 24, 85, 26, -1, 11,
740 12, 90, 91, 92, 93, 94, -1, 36, -1, -1,
741 22, 40, 24, -1, 26, 44, -1, -1, 47, -1,
742 -1, -1, -1, -1, 36, -1, -1, -1, 40, 58,
743 -1, -1, 44, -1, 63, 47, 65, -1, 67, -1,
744 -1, -1, -1, -1, -1, -1, 58, 76, 77, -1,
745 -1, 63, -1, 65, -1, 67, -1, -1, -1, -1,
746 -1, -1, 91, -1, 76, 77, -1, -1, -1, -1,
747 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91
vlm6a02a8a2004-09-08 00:28:11 +0000748};
749/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
750#line 3 "/usr/share/bison.simple"
751/* This file comes from bison-1.28. */
752
753/* Skeleton output parser for bison,
754 Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
755
756 This program is free software; you can redistribute it and/or modify
757 it under the terms of the GNU General Public License as published by
758 the Free Software Foundation; either version 2, or (at your option)
759 any later version.
760
761 This program is distributed in the hope that it will be useful,
762 but WITHOUT ANY WARRANTY; without even the implied warranty of
763 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
764 GNU General Public License for more details.
765
766 You should have received a copy of the GNU General Public License
767 along with this program; if not, write to the Free Software
768 Foundation, Inc., 59 Temple Place - Suite 330,
769 Boston, MA 02111-1307, USA. */
770
771/* As a special exception, when this file is copied by Bison into a
772 Bison output file, you may use that output file without restriction.
773 This special exception was added by the Free Software Foundation
774 in version 1.24 of Bison. */
775
776/* This is the parser code that is written into each bison parser
777 when the %semantic_parser declaration is not specified in the grammar.
778 It was written by Richard Stallman by simplifying the hairy parser
779 used when %semantic_parser is specified. */
780
781#ifndef YYSTACK_USE_ALLOCA
782#ifdef alloca
783#define YYSTACK_USE_ALLOCA
784#else /* alloca not defined */
785#ifdef __GNUC__
786#define YYSTACK_USE_ALLOCA
787#define alloca __builtin_alloca
788#else /* not GNU C. */
789#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
790#define YYSTACK_USE_ALLOCA
791#include <alloca.h>
792#else /* not sparc */
793/* We think this test detects Watcom and Microsoft C. */
794/* This used to test MSDOS, but that is a bad idea
795 since that symbol is in the user namespace. */
796#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
797#if 0 /* No need for malloc.h, which pollutes the namespace;
798 instead, just don't use alloca. */
799#include <malloc.h>
800#endif
801#else /* not MSDOS, or __TURBOC__ */
802#if defined(_AIX)
803/* I don't know what this was needed for, but it pollutes the namespace.
804 So I turned it off. rms, 2 May 1997. */
805/* #include <malloc.h> */
806 #pragma alloca
807#define YYSTACK_USE_ALLOCA
808#else /* not MSDOS, or __TURBOC__, or _AIX */
809#if 0
810#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
811 and on HPUX 10. Eventually we can turn this on. */
812#define YYSTACK_USE_ALLOCA
813#define alloca __builtin_alloca
814#endif /* __hpux */
815#endif
816#endif /* not _AIX */
817#endif /* not MSDOS, or __TURBOC__ */
818#endif /* not sparc */
819#endif /* not GNU C */
820#endif /* alloca not defined */
821#endif /* YYSTACK_USE_ALLOCA not defined */
822
823#ifdef YYSTACK_USE_ALLOCA
824#define YYSTACK_ALLOC alloca
vlmfa67ddc2004-06-03 03:38:44 +0000825#else
vlm6a02a8a2004-09-08 00:28:11 +0000826#define YYSTACK_ALLOC malloc
vlmfa67ddc2004-06-03 03:38:44 +0000827#endif
828
vlm6a02a8a2004-09-08 00:28:11 +0000829/* Note: there must be only one dollar sign in this file.
830 It is replaced by the list of actions, each action
831 as one case of the switch. */
vlmfa67ddc2004-06-03 03:38:44 +0000832
833#define yyerrok (yyerrstatus = 0)
834#define yyclearin (yychar = YYEMPTY)
835#define YYEMPTY -2
836#define YYEOF 0
837#define YYACCEPT goto yyacceptlab
vlm6a02a8a2004-09-08 00:28:11 +0000838#define YYABORT goto yyabortlab
vlmfa67ddc2004-06-03 03:38:44 +0000839#define YYERROR goto yyerrlab1
vlm6a02a8a2004-09-08 00:28:11 +0000840/* Like YYERROR except do call yyerror.
841 This remains here temporarily to ease the
842 transition to the new meaning of YYERROR, for GCC.
vlmfa67ddc2004-06-03 03:38:44 +0000843 Once GCC version 2 has supplanted version 1, this can go. */
844#define YYFAIL goto yyerrlab
845#define YYRECOVERING() (!!yyerrstatus)
vlm6a02a8a2004-09-08 00:28:11 +0000846#define YYBACKUP(token, value) \
vlmfa67ddc2004-06-03 03:38:44 +0000847do \
848 if (yychar == YYEMPTY && yylen == 1) \
vlm6a02a8a2004-09-08 00:28:11 +0000849 { yychar = (token), yylval = (value); \
vlmfa67ddc2004-06-03 03:38:44 +0000850 yychar1 = YYTRANSLATE (yychar); \
851 YYPOPSTACK; \
852 goto yybackup; \
853 } \
854 else \
vlm6a02a8a2004-09-08 00:28:11 +0000855 { yyerror ("syntax error: cannot back up"); YYERROR; } \
vlmfa67ddc2004-06-03 03:38:44 +0000856while (0)
857
858#define YYTERROR 1
859#define YYERRCODE 256
860
vlm6a02a8a2004-09-08 00:28:11 +0000861#ifndef YYPURE
862#define YYLEX yylex()
vlmfa67ddc2004-06-03 03:38:44 +0000863#endif
864
vlm6a02a8a2004-09-08 00:28:11 +0000865#ifdef YYPURE
866#ifdef YYLSP_NEEDED
867#ifdef YYLEX_PARAM
868#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
869#else
870#define YYLEX yylex(&yylval, &yylloc)
871#endif
872#else /* not YYLSP_NEEDED */
873#ifdef YYLEX_PARAM
874#define YYLEX yylex(&yylval, YYLEX_PARAM)
875#else
876#define YYLEX yylex(&yylval)
877#endif
878#endif /* not YYLSP_NEEDED */
879#endif
vlmfa67ddc2004-06-03 03:38:44 +0000880
vlm6a02a8a2004-09-08 00:28:11 +0000881/* If nonreentrant, generate the variables here */
vlmfa67ddc2004-06-03 03:38:44 +0000882
vlm6a02a8a2004-09-08 00:28:11 +0000883#ifndef YYPURE
vlmfa67ddc2004-06-03 03:38:44 +0000884
vlm6a02a8a2004-09-08 00:28:11 +0000885int yychar; /* the lookahead symbol */
886YYSTYPE yylval; /* the semantic value of the */
887 /* lookahead symbol */
vlmfa67ddc2004-06-03 03:38:44 +0000888
vlm6a02a8a2004-09-08 00:28:11 +0000889#ifdef YYLSP_NEEDED
890YYLTYPE yylloc; /* location data for the lookahead */
891 /* symbol */
892#endif
vlmfa67ddc2004-06-03 03:38:44 +0000893
vlm6a02a8a2004-09-08 00:28:11 +0000894int yynerrs; /* number of parse errors so far */
895#endif /* not YYPURE */
896
897#if YYDEBUG != 0
898int yydebug; /* nonzero means print parse trace */
899/* Since this is uninitialized, it does not stop multiple parsers
900 from coexisting. */
901#endif
902
903/* YYINITDEPTH indicates the initial size of the parser's stacks */
904
vlmfa67ddc2004-06-03 03:38:44 +0000905#ifndef YYINITDEPTH
vlm6a02a8a2004-09-08 00:28:11 +0000906#define YYINITDEPTH 200
vlmfa67ddc2004-06-03 03:38:44 +0000907#endif
908
vlm6a02a8a2004-09-08 00:28:11 +0000909/* YYMAXDEPTH is the maximum size the stacks can grow to
910 (effective only if the built-in stack extension method is used). */
vlmfa67ddc2004-06-03 03:38:44 +0000911
912#if YYMAXDEPTH == 0
vlm6a02a8a2004-09-08 00:28:11 +0000913#undef YYMAXDEPTH
vlmfa67ddc2004-06-03 03:38:44 +0000914#endif
915
916#ifndef YYMAXDEPTH
vlm6a02a8a2004-09-08 00:28:11 +0000917#define YYMAXDEPTH 10000
vlmfa67ddc2004-06-03 03:38:44 +0000918#endif
919
vlm6a02a8a2004-09-08 00:28:11 +0000920/* Define __yy_memcpy. Note that the size argument
921 should be passed with type unsigned int, because that is what the non-GCC
922 definitions require. With GCC, __builtin_memcpy takes an arg
923 of type size_t, but it can handle unsigned int. */
vlmfa67ddc2004-06-03 03:38:44 +0000924
vlm6a02a8a2004-09-08 00:28:11 +0000925#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
926#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
927#else /* not GNU C or C++ */
928#ifndef __cplusplus
vlmfa67ddc2004-06-03 03:38:44 +0000929
vlm6a02a8a2004-09-08 00:28:11 +0000930/* This is the most reliable way to avoid incompatibilities
931 in available built-in functions on various systems. */
vlm80103492004-09-07 10:39:09 +0000932static void
vlm6a02a8a2004-09-08 00:28:11 +0000933__yy_memcpy (to, from, count)
934 char *to;
935 char *from;
936 unsigned int count;
vlm80103492004-09-07 10:39:09 +0000937{
vlm6a02a8a2004-09-08 00:28:11 +0000938 register char *f = from;
939 register char *t = to;
940 register int i = count;
vlm80103492004-09-07 10:39:09 +0000941
vlm6a02a8a2004-09-08 00:28:11 +0000942 while (i-- > 0)
943 *t++ = *f++;
vlm80103492004-09-07 10:39:09 +0000944}
vlm80103492004-09-07 10:39:09 +0000945
vlm6a02a8a2004-09-08 00:28:11 +0000946#else /* __cplusplus */
vlm80103492004-09-07 10:39:09 +0000947
vlm6a02a8a2004-09-08 00:28:11 +0000948/* This is the most reliable way to avoid incompatibilities
949 in available built-in functions on various systems. */
vlm80103492004-09-07 10:39:09 +0000950static void
vlm6a02a8a2004-09-08 00:28:11 +0000951__yy_memcpy (char *to, char *from, unsigned int count)
vlm80103492004-09-07 10:39:09 +0000952{
vlm6a02a8a2004-09-08 00:28:11 +0000953 register char *t = to;
954 register char *f = from;
955 register int i = count;
vlm80103492004-09-07 10:39:09 +0000956
vlm6a02a8a2004-09-08 00:28:11 +0000957 while (i-- > 0)
958 *t++ = *f++;
vlm044f7442004-09-04 04:49:21 +0000959}
vlm044f7442004-09-04 04:49:21 +0000960
vlm6a02a8a2004-09-08 00:28:11 +0000961#endif
962#endif
vlmfa67ddc2004-06-03 03:38:44 +0000963
vlm6a02a8a2004-09-08 00:28:11 +0000964#line 217 "/usr/share/bison.simple"
vlmfa67ddc2004-06-03 03:38:44 +0000965
966/* The user can define YYPARSE_PARAM as the name of an argument to be passed
967 into yyparse. The argument should have type void *.
968 It should actually point to an object.
969 Grammar actions can access the variable by casting it
970 to the proper pointer type. */
971
972#ifdef YYPARSE_PARAM
vlm6a02a8a2004-09-08 00:28:11 +0000973#ifdef __cplusplus
974#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
975#define YYPARSE_PARAM_DECL
976#else /* not __cplusplus */
977#define YYPARSE_PARAM_ARG YYPARSE_PARAM
978#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
979#endif /* not __cplusplus */
980#else /* not YYPARSE_PARAM */
981#define YYPARSE_PARAM_ARG
982#define YYPARSE_PARAM_DECL
983#endif /* not YYPARSE_PARAM */
vlmfa67ddc2004-06-03 03:38:44 +0000984
985/* Prevent warning if -Wstrict-prototypes. */
986#ifdef __GNUC__
vlm6a02a8a2004-09-08 00:28:11 +0000987#ifdef YYPARSE_PARAM
vlmfa67ddc2004-06-03 03:38:44 +0000988int yyparse (void *);
vlm6a02a8a2004-09-08 00:28:11 +0000989#else
vlmfa67ddc2004-06-03 03:38:44 +0000990int yyparse (void);
vlm6a02a8a2004-09-08 00:28:11 +0000991#endif
vlm39e5ed72004-09-05 10:40:41 +0000992#endif
vlm80103492004-09-07 10:39:09 +0000993
vlmfa67ddc2004-06-03 03:38:44 +0000994int
vlm6a02a8a2004-09-08 00:28:11 +0000995yyparse(YYPARSE_PARAM_ARG)
vlmfa67ddc2004-06-03 03:38:44 +0000996 YYPARSE_PARAM_DECL
997{
998 register int yystate;
999 register int yyn;
1000 register short *yyssp;
1001 register YYSTYPE *yyvsp;
vlm6a02a8a2004-09-08 00:28:11 +00001002 int yyerrstatus; /* number of tokens to shift before error messages enabled */
1003 int yychar1 = 0; /* lookahead token as an internal (translated) token number */
vlmfa67ddc2004-06-03 03:38:44 +00001004
vlm6a02a8a2004-09-08 00:28:11 +00001005 short yyssa[YYINITDEPTH]; /* the state stack */
1006 YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
vlmfa67ddc2004-06-03 03:38:44 +00001007
vlm6a02a8a2004-09-08 00:28:11 +00001008 short *yyss = yyssa; /* refer to the stacks thru separate pointers */
1009 YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
vlmfa67ddc2004-06-03 03:38:44 +00001010
vlm6a02a8a2004-09-08 00:28:11 +00001011#ifdef YYLSP_NEEDED
1012 YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
1013 YYLTYPE *yyls = yylsa;
1014 YYLTYPE *yylsp;
1015
1016#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
1017#else
vlmfa67ddc2004-06-03 03:38:44 +00001018#define YYPOPSTACK (yyvsp--, yyssp--)
vlm6a02a8a2004-09-08 00:28:11 +00001019#endif
vlmfa67ddc2004-06-03 03:38:44 +00001020
vlm6a02a8a2004-09-08 00:28:11 +00001021 int yystacksize = YYINITDEPTH;
1022 int yyfree_stacks = 0;
vlmfa67ddc2004-06-03 03:38:44 +00001023
vlm6a02a8a2004-09-08 00:28:11 +00001024#ifdef YYPURE
1025 int yychar;
1026 YYSTYPE yylval;
1027 int yynerrs;
1028#ifdef YYLSP_NEEDED
1029 YYLTYPE yylloc;
1030#endif
1031#endif
vlmfa67ddc2004-06-03 03:38:44 +00001032
vlm6a02a8a2004-09-08 00:28:11 +00001033 YYSTYPE yyval; /* the variable used to return */
1034 /* semantic values from the action */
1035 /* routines */
vlmfa67ddc2004-06-03 03:38:44 +00001036
1037 int yylen;
1038
vlm6a02a8a2004-09-08 00:28:11 +00001039#if YYDEBUG != 0
1040 if (yydebug)
1041 fprintf(stderr, "Starting parse\n");
1042#endif
vlmfa67ddc2004-06-03 03:38:44 +00001043
1044 yystate = 0;
1045 yyerrstatus = 0;
1046 yynerrs = 0;
1047 yychar = YYEMPTY; /* Cause a token to be read. */
1048
1049 /* Initialize stack pointers.
1050 Waste one element of value and location stack
1051 so that they stay on the same level as the state stack.
1052 The wasted elements are never initialized. */
1053
vlm6a02a8a2004-09-08 00:28:11 +00001054 yyssp = yyss - 1;
vlmfa67ddc2004-06-03 03:38:44 +00001055 yyvsp = yyvs;
vlm6a02a8a2004-09-08 00:28:11 +00001056#ifdef YYLSP_NEEDED
1057 yylsp = yyls;
1058#endif
vlmfa67ddc2004-06-03 03:38:44 +00001059
vlm6a02a8a2004-09-08 00:28:11 +00001060/* Push a new state, which is found in yystate . */
1061/* In all cases, when you get here, the value and location stacks
1062 have just been pushed. so pushing a state here evens the stacks. */
1063yynewstate:
vlmfa67ddc2004-06-03 03:38:44 +00001064
vlm6a02a8a2004-09-08 00:28:11 +00001065 *++yyssp = yystate;
vlmfa67ddc2004-06-03 03:38:44 +00001066
1067 if (yyssp >= yyss + yystacksize - 1)
1068 {
vlm6a02a8a2004-09-08 00:28:11 +00001069 /* Give user a chance to reallocate the stack */
1070 /* Use copies of these so that the &'s don't force the real ones into memory. */
1071 YYSTYPE *yyvs1 = yyvs;
1072 short *yyss1 = yyss;
1073#ifdef YYLSP_NEEDED
1074 YYLTYPE *yyls1 = yyls;
1075#endif
1076
vlmfa67ddc2004-06-03 03:38:44 +00001077 /* Get the current used size of the three stacks, in elements. */
vlm6a02a8a2004-09-08 00:28:11 +00001078 int size = yyssp - yyss + 1;
vlmfa67ddc2004-06-03 03:38:44 +00001079
1080#ifdef yyoverflow
vlm6a02a8a2004-09-08 00:28:11 +00001081 /* Each stack pointer address is followed by the size of
1082 the data in use in that stack, in bytes. */
1083#ifdef YYLSP_NEEDED
1084 /* This used to be a conditional around just the two extra args,
1085 but that might be undefined if yyoverflow is a macro. */
1086 yyoverflow("parser stack overflow",
1087 &yyss1, size * sizeof (*yyssp),
1088 &yyvs1, size * sizeof (*yyvsp),
1089 &yyls1, size * sizeof (*yylsp),
1090 &yystacksize);
1091#else
1092 yyoverflow("parser stack overflow",
1093 &yyss1, size * sizeof (*yyssp),
1094 &yyvs1, size * sizeof (*yyvsp),
1095 &yystacksize);
1096#endif
vlmfa67ddc2004-06-03 03:38:44 +00001097
vlm6a02a8a2004-09-08 00:28:11 +00001098 yyss = yyss1; yyvs = yyvs1;
1099#ifdef YYLSP_NEEDED
1100 yyls = yyls1;
1101#endif
vlmfa67ddc2004-06-03 03:38:44 +00001102#else /* no yyoverflow */
1103 /* Extend the stack our own way. */
1104 if (yystacksize >= YYMAXDEPTH)
vlm6a02a8a2004-09-08 00:28:11 +00001105 {
1106 yyerror("parser stack overflow");
1107 if (yyfree_stacks)
1108 {
1109 free (yyss);
1110 free (yyvs);
1111#ifdef YYLSP_NEEDED
1112 free (yyls);
1113#endif
1114 }
1115 return 2;
1116 }
vlmfa67ddc2004-06-03 03:38:44 +00001117 yystacksize *= 2;
1118 if (yystacksize > YYMAXDEPTH)
1119 yystacksize = YYMAXDEPTH;
vlm6a02a8a2004-09-08 00:28:11 +00001120#ifndef YYSTACK_USE_ALLOCA
1121 yyfree_stacks = 1;
1122#endif
1123 yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
1124 __yy_memcpy ((char *)yyss, (char *)yyss1,
1125 size * (unsigned int) sizeof (*yyssp));
1126 yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
1127 __yy_memcpy ((char *)yyvs, (char *)yyvs1,
1128 size * (unsigned int) sizeof (*yyvsp));
1129#ifdef YYLSP_NEEDED
1130 yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
1131 __yy_memcpy ((char *)yyls, (char *)yyls1,
1132 size * (unsigned int) sizeof (*yylsp));
1133#endif
vlmfa67ddc2004-06-03 03:38:44 +00001134#endif /* no yyoverflow */
1135
vlm6a02a8a2004-09-08 00:28:11 +00001136 yyssp = yyss + size - 1;
1137 yyvsp = yyvs + size - 1;
1138#ifdef YYLSP_NEEDED
1139 yylsp = yyls + size - 1;
1140#endif
vlmfa67ddc2004-06-03 03:38:44 +00001141
vlm6a02a8a2004-09-08 00:28:11 +00001142#if YYDEBUG != 0
1143 if (yydebug)
1144 fprintf(stderr, "Stack size increased to %d\n", yystacksize);
1145#endif
vlmfa67ddc2004-06-03 03:38:44 +00001146
1147 if (yyssp >= yyss + yystacksize - 1)
1148 YYABORT;
1149 }
1150
vlm6a02a8a2004-09-08 00:28:11 +00001151#if YYDEBUG != 0
1152 if (yydebug)
1153 fprintf(stderr, "Entering state %d\n", yystate);
1154#endif
vlmfa67ddc2004-06-03 03:38:44 +00001155
1156 goto yybackup;
vlm6a02a8a2004-09-08 00:28:11 +00001157 yybackup:
vlmfa67ddc2004-06-03 03:38:44 +00001158
1159/* Do appropriate processing given the current state. */
1160/* Read a lookahead token if we need one and don't already have one. */
1161/* yyresume: */
1162
1163 /* First try to decide what to do without reference to lookahead token. */
1164
1165 yyn = yypact[yystate];
vlm6a02a8a2004-09-08 00:28:11 +00001166 if (yyn == YYFLAG)
vlmfa67ddc2004-06-03 03:38:44 +00001167 goto yydefault;
1168
1169 /* Not known => get a lookahead token if don't already have one. */
1170
1171 /* yychar is either YYEMPTY or YYEOF
1172 or a valid token in external form. */
1173
1174 if (yychar == YYEMPTY)
1175 {
vlm6a02a8a2004-09-08 00:28:11 +00001176#if YYDEBUG != 0
1177 if (yydebug)
1178 fprintf(stderr, "Reading a token: ");
1179#endif
vlmfa67ddc2004-06-03 03:38:44 +00001180 yychar = YYLEX;
1181 }
1182
vlm6a02a8a2004-09-08 00:28:11 +00001183 /* Convert token to internal form (in yychar1) for indexing tables with */
vlmfa67ddc2004-06-03 03:38:44 +00001184
vlm6a02a8a2004-09-08 00:28:11 +00001185 if (yychar <= 0) /* This means end of input. */
vlmfa67ddc2004-06-03 03:38:44 +00001186 {
1187 yychar1 = 0;
vlm6a02a8a2004-09-08 00:28:11 +00001188 yychar = YYEOF; /* Don't call YYLEX any more */
vlmfa67ddc2004-06-03 03:38:44 +00001189
vlm6a02a8a2004-09-08 00:28:11 +00001190#if YYDEBUG != 0
1191 if (yydebug)
1192 fprintf(stderr, "Now at end of input.\n");
1193#endif
vlmfa67ddc2004-06-03 03:38:44 +00001194 }
1195 else
1196 {
vlm6a02a8a2004-09-08 00:28:11 +00001197 yychar1 = YYTRANSLATE(yychar);
vlmfa67ddc2004-06-03 03:38:44 +00001198
vlm6a02a8a2004-09-08 00:28:11 +00001199#if YYDEBUG != 0
1200 if (yydebug)
1201 {
1202 fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
1203 /* Give the individual parser a way to print the precise meaning
1204 of a token, for further debugging info. */
1205#ifdef YYPRINT
1206 YYPRINT (stderr, yychar, yylval);
1207#endif
1208 fprintf (stderr, ")\n");
1209 }
1210#endif
vlmfa67ddc2004-06-03 03:38:44 +00001211 }
1212
1213 yyn += yychar1;
vlm6a02a8a2004-09-08 00:28:11 +00001214 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
vlmfa67ddc2004-06-03 03:38:44 +00001215 goto yydefault;
vlm6a02a8a2004-09-08 00:28:11 +00001216
vlmfa67ddc2004-06-03 03:38:44 +00001217 yyn = yytable[yyn];
vlm6a02a8a2004-09-08 00:28:11 +00001218
1219 /* yyn is what to do for this token type in this state.
1220 Negative => reduce, -yyn is rule number.
1221 Positive => shift, yyn is new state.
1222 New state is final state => don't bother to shift,
1223 just return success.
1224 0, or most negative number => error. */
1225
1226 if (yyn < 0)
vlmfa67ddc2004-06-03 03:38:44 +00001227 {
vlm6a02a8a2004-09-08 00:28:11 +00001228 if (yyn == YYFLAG)
vlmfa67ddc2004-06-03 03:38:44 +00001229 goto yyerrlab;
1230 yyn = -yyn;
1231 goto yyreduce;
1232 }
vlm6a02a8a2004-09-08 00:28:11 +00001233 else if (yyn == 0)
1234 goto yyerrlab;
vlmfa67ddc2004-06-03 03:38:44 +00001235
1236 if (yyn == YYFINAL)
1237 YYACCEPT;
1238
1239 /* Shift the lookahead token. */
vlm6a02a8a2004-09-08 00:28:11 +00001240
1241#if YYDEBUG != 0
1242 if (yydebug)
1243 fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
1244#endif
vlmfa67ddc2004-06-03 03:38:44 +00001245
1246 /* Discard the token being shifted unless it is eof. */
1247 if (yychar != YYEOF)
1248 yychar = YYEMPTY;
1249
1250 *++yyvsp = yylval;
vlm6a02a8a2004-09-08 00:28:11 +00001251#ifdef YYLSP_NEEDED
1252 *++yylsp = yylloc;
1253#endif
vlmfa67ddc2004-06-03 03:38:44 +00001254
vlm6a02a8a2004-09-08 00:28:11 +00001255 /* count tokens shifted since error; after three, turn off error status. */
1256 if (yyerrstatus) yyerrstatus--;
vlmfa67ddc2004-06-03 03:38:44 +00001257
1258 yystate = yyn;
1259 goto yynewstate;
1260
vlm6a02a8a2004-09-08 00:28:11 +00001261/* Do the default action for the current state. */
vlm80103492004-09-07 10:39:09 +00001262yydefault:
vlm6a02a8a2004-09-08 00:28:11 +00001263
vlmfa67ddc2004-06-03 03:38:44 +00001264 yyn = yydefact[yystate];
1265 if (yyn == 0)
1266 goto yyerrlab;
1267
vlm6a02a8a2004-09-08 00:28:11 +00001268/* Do a reduction. yyn is the number of a rule to reduce with. */
vlmfa67ddc2004-06-03 03:38:44 +00001269yyreduce:
1270 yylen = yyr2[yyn];
vlm6a02a8a2004-09-08 00:28:11 +00001271 if (yylen > 0)
1272 yyval = yyvsp[1-yylen]; /* implement default value of the action */
vlmfa67ddc2004-06-03 03:38:44 +00001273
vlm6a02a8a2004-09-08 00:28:11 +00001274#if YYDEBUG != 0
vlmfa67ddc2004-06-03 03:38:44 +00001275 if (yydebug)
1276 {
vlm6a02a8a2004-09-08 00:28:11 +00001277 int i;
vlmfa67ddc2004-06-03 03:38:44 +00001278
vlm6a02a8a2004-09-08 00:28:11 +00001279 fprintf (stderr, "Reducing via rule %d (line %d), ",
1280 yyn, yyrline[yyn]);
vlmfa67ddc2004-06-03 03:38:44 +00001281
1282 /* Print the symbols being reduced, and their result. */
vlm6a02a8a2004-09-08 00:28:11 +00001283 for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
1284 fprintf (stderr, "%s ", yytname[yyrhs[i]]);
1285 fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
vlmfa67ddc2004-06-03 03:38:44 +00001286 }
1287#endif
vlm80103492004-09-07 10:39:09 +00001288
vlm6a02a8a2004-09-08 00:28:11 +00001289
1290 switch (yyn) {
1291
1292case 1:
vlm151c0b22004-09-22 16:03:36 +00001293#line 301 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001294{
1295 *(void **)param = yyvsp[0].a_grammar;
1296 ;
1297 break;}
1298case 2:
vlm151c0b22004-09-22 16:03:36 +00001299#line 307 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001300{
vlmfa67ddc2004-06-03 03:38:44 +00001301 yyval.a_grammar = asn1p_new();
1302 checkmem(yyval.a_grammar);
1303 TQ_ADD(&(yyval.a_grammar->modules), yyvsp[0].a_module, mod_next);
vlm6a02a8a2004-09-08 00:28:11 +00001304 ;
1305 break;}
1306case 3:
vlm151c0b22004-09-22 16:03:36 +00001307#line 312 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001308{
vlmfa67ddc2004-06-03 03:38:44 +00001309 yyval.a_grammar = yyvsp[-1].a_grammar;
1310 TQ_ADD(&(yyval.a_grammar->modules), yyvsp[0].a_module, mod_next);
vlm6a02a8a2004-09-08 00:28:11 +00001311 ;
1312 break;}
1313case 4:
vlm151c0b22004-09-22 16:03:36 +00001314#line 333 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001315{
vlmfa67ddc2004-06-03 03:38:44 +00001316
1317 if(yyvsp[-1].a_module) {
1318 yyval.a_module = yyvsp[-1].a_module;
1319 } else {
1320 /* There's a chance that a module is just plain empty */
1321 yyval.a_module = asn1p_module_new();
1322 }
1323 checkmem(yyval.a_module);
1324
1325 yyval.a_module->Identifier = yyvsp[-7].tv_str;
1326 yyval.a_module->module_oid = yyvsp[-6].a_oid;
1327 yyval.a_module->module_flags = yyvsp[-4].a_module_flags;
vlm6a02a8a2004-09-08 00:28:11 +00001328 ;
1329 break;}
1330case 5:
vlm151c0b22004-09-22 16:03:36 +00001331#line 354 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001332{ yyval.a_oid = 0; ;
1333 break;}
1334case 6:
vlm151c0b22004-09-22 16:03:36 +00001335#line 355 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001336{ yyval.a_oid = yyvsp[0].a_oid; ;
1337 break;}
1338case 7:
vlm151c0b22004-09-22 16:03:36 +00001339#line 359 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001340{
vlmfa67ddc2004-06-03 03:38:44 +00001341 yyval.a_oid = yyvsp[-1].a_oid;
vlm6a02a8a2004-09-08 00:28:11 +00001342 ;
1343 break;}
1344case 8:
vlm151c0b22004-09-22 16:03:36 +00001345#line 362 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001346{
vlmfa67ddc2004-06-03 03:38:44 +00001347 yyval.a_oid = 0;
vlm6a02a8a2004-09-08 00:28:11 +00001348 ;
1349 break;}
1350case 9:
vlm151c0b22004-09-22 16:03:36 +00001351#line 368 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001352{
vlmfa67ddc2004-06-03 03:38:44 +00001353 yyval.a_oid = asn1p_oid_new();
1354 asn1p_oid_add_arc(yyval.a_oid, &yyvsp[0].a_oid_arc);
1355 if(yyvsp[0].a_oid_arc.name)
1356 free(yyvsp[0].a_oid_arc.name);
vlm6a02a8a2004-09-08 00:28:11 +00001357 ;
1358 break;}
1359case 10:
vlm151c0b22004-09-22 16:03:36 +00001360#line 374 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001361{
vlmfa67ddc2004-06-03 03:38:44 +00001362 yyval.a_oid = yyvsp[-1].a_oid;
1363 asn1p_oid_add_arc(yyval.a_oid, &yyvsp[0].a_oid_arc);
1364 if(yyvsp[0].a_oid_arc.name)
1365 free(yyvsp[0].a_oid_arc.name);
vlm6a02a8a2004-09-08 00:28:11 +00001366 ;
1367 break;}
1368case 11:
vlm151c0b22004-09-22 16:03:36 +00001369#line 383 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001370{ /* iso */
vlmfa67ddc2004-06-03 03:38:44 +00001371 yyval.a_oid_arc.name = yyvsp[0].tv_str;
1372 yyval.a_oid_arc.number = -1;
vlm6a02a8a2004-09-08 00:28:11 +00001373 ;
1374 break;}
1375case 12:
vlm151c0b22004-09-22 16:03:36 +00001376#line 387 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001377{ /* iso(1) */
vlmfa67ddc2004-06-03 03:38:44 +00001378 yyval.a_oid_arc.name = yyvsp[-3].tv_str;
1379 yyval.a_oid_arc.number = yyvsp[-1].a_int;
vlm6a02a8a2004-09-08 00:28:11 +00001380 ;
1381 break;}
1382case 13:
vlm151c0b22004-09-22 16:03:36 +00001383#line 391 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001384{ /* 1 */
vlmfa67ddc2004-06-03 03:38:44 +00001385 yyval.a_oid_arc.name = 0;
1386 yyval.a_oid_arc.number = yyvsp[0].a_int;
vlm6a02a8a2004-09-08 00:28:11 +00001387 ;
1388 break;}
1389case 14:
vlm151c0b22004-09-22 16:03:36 +00001390#line 401 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001391{ yyval.a_module_flags = MSF_NOFLAGS; ;
1392 break;}
1393case 15:
vlm151c0b22004-09-22 16:03:36 +00001394#line 402 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001395{
vlmfa67ddc2004-06-03 03:38:44 +00001396 yyval.a_module_flags = yyvsp[0].a_module_flags;
vlm6a02a8a2004-09-08 00:28:11 +00001397 ;
1398 break;}
1399case 16:
vlm151c0b22004-09-22 16:03:36 +00001400#line 411 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001401{
vlmfa67ddc2004-06-03 03:38:44 +00001402 yyval.a_module_flags = yyvsp[0].a_module_flags;
vlm6a02a8a2004-09-08 00:28:11 +00001403 ;
1404 break;}
1405case 17:
vlm151c0b22004-09-22 16:03:36 +00001406#line 414 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001407{
vlmfa67ddc2004-06-03 03:38:44 +00001408 yyval.a_module_flags = yyvsp[-1].a_module_flags | yyvsp[0].a_module_flags;
vlm6a02a8a2004-09-08 00:28:11 +00001409 ;
1410 break;}
1411case 18:
vlm151c0b22004-09-22 16:03:36 +00001412#line 423 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001413{
vlmfa67ddc2004-06-03 03:38:44 +00001414 yyval.a_module_flags = MSF_EXPLICIT_TAGS;
vlm6a02a8a2004-09-08 00:28:11 +00001415 ;
1416 break;}
1417case 19:
vlm151c0b22004-09-22 16:03:36 +00001418#line 426 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001419{
vlmfa67ddc2004-06-03 03:38:44 +00001420 yyval.a_module_flags = MSF_IMPLICIT_TAGS;
vlm6a02a8a2004-09-08 00:28:11 +00001421 ;
1422 break;}
1423case 20:
vlm151c0b22004-09-22 16:03:36 +00001424#line 429 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001425{
vlmfa67ddc2004-06-03 03:38:44 +00001426 yyval.a_module_flags = MSF_AUTOMATIC_TAGS;
vlm6a02a8a2004-09-08 00:28:11 +00001427 ;
1428 break;}
1429case 21:
vlm151c0b22004-09-22 16:03:36 +00001430#line 432 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001431{
vlmfa67ddc2004-06-03 03:38:44 +00001432 yyval.a_module_flags = MSF_EXTENSIBILITY_IMPLIED;
vlm6a02a8a2004-09-08 00:28:11 +00001433 ;
1434 break;}
1435case 22:
vlm151c0b22004-09-22 16:03:36 +00001436#line 436 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001437{
vlm9283dbe2004-08-18 04:59:12 +00001438 /* X.680Amd1 specifies TAG and XER */
1439 if(strcmp(yyvsp[-1].tv_str, "TAG") == 0) {
1440 yyval.a_module_flags = MSF_TAG_INSTRUCTIONS;
1441 } else if(strcmp(yyvsp[-1].tv_str, "XER") == 0) {
1442 yyval.a_module_flags = MSF_XER_INSTRUCTIONS;
1443 } else {
1444 fprintf(stderr,
1445 "WARNING: %s INSTRUCTIONS at line %d: "
1446 "Unrecognized encoding reference\n",
1447 yyvsp[-1].tv_str, yylineno);
1448 yyval.a_module_flags = MSF_unk_INSTRUCTIONS;
1449 }
1450 free(yyvsp[-1].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00001451 ;
1452 break;}
1453case 23:
vlm151c0b22004-09-22 16:03:36 +00001454#line 457 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001455{ yyval.a_module = 0; ;
1456 break;}
1457case 24:
vlm151c0b22004-09-22 16:03:36 +00001458#line 458 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001459{
vlmfa67ddc2004-06-03 03:38:44 +00001460 yyval.a_module = yyvsp[0].a_module;
vlm6a02a8a2004-09-08 00:28:11 +00001461 ;
1462 break;}
1463case 25:
vlm151c0b22004-09-22 16:03:36 +00001464#line 467 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001465{
vlm9283dbe2004-08-18 04:59:12 +00001466 yyval.a_module = yyvsp[0].a_module;
vlm6a02a8a2004-09-08 00:28:11 +00001467 ;
1468 break;}
1469case 26:
vlm151c0b22004-09-22 16:03:36 +00001470#line 470 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001471{
vlmfa67ddc2004-06-03 03:38:44 +00001472 yyval.a_module = yyvsp[-1].a_module;
1473
vlm9283dbe2004-08-18 04:59:12 +00001474 /* Behave well when one of them is skipped. */
1475 if(!(yyvsp[-1].a_module)) {
1476 if(yyvsp[0].a_module) yyval.a_module = yyvsp[0].a_module;
1477 break;
1478 }
1479
vlmfa67ddc2004-06-03 03:38:44 +00001480#ifdef MY_IMPORT
1481#error MY_IMPORT DEFINED ELSEWHERE!
1482#endif
1483#define MY_IMPORT(foo,field) do { \
vlm97ed7152004-08-13 12:31:09 +00001484 while(TQ_FIRST(&(yyvsp[0].a_module->foo))) { \
vlmfa67ddc2004-06-03 03:38:44 +00001485 TQ_ADD(&(yyval.a_module->foo), \
1486 TQ_REMOVE(&(yyvsp[0].a_module->foo), field), \
1487 field); \
vlm97ed7152004-08-13 12:31:09 +00001488 } \
1489 assert(TQ_FIRST(&(yyvsp[0].a_module->foo)) == 0); \
1490 } while(0)
vlmfa67ddc2004-06-03 03:38:44 +00001491
1492 MY_IMPORT(imports, xp_next);
1493 MY_IMPORT(exports, xp_next);
1494 MY_IMPORT(members, next);
1495#undef MY_IMPORT
1496
vlm6a02a8a2004-09-08 00:28:11 +00001497 ;
1498 break;}
1499case 27:
vlm151c0b22004-09-22 16:03:36 +00001500#line 503 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001501{
vlmfa67ddc2004-06-03 03:38:44 +00001502 yyval.a_module = yyvsp[0].a_module;
vlm6a02a8a2004-09-08 00:28:11 +00001503 ;
1504 break;}
1505case 28:
vlm151c0b22004-09-22 16:03:36 +00001506#line 506 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001507{
vlmfa67ddc2004-06-03 03:38:44 +00001508 yyval.a_module = asn1p_module_new();
1509 checkmem(yyval.a_module);
1510 if(yyvsp[0].a_xports) {
1511 TQ_ADD(&(yyval.a_module->exports), yyvsp[0].a_xports, xp_next);
1512 } else {
1513 /* "EXPORTS ALL;" ? */
1514 }
vlm6a02a8a2004-09-08 00:28:11 +00001515 ;
1516 break;}
1517case 29:
vlm151c0b22004-09-22 16:03:36 +00001518#line 515 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001519{
vlmfa67ddc2004-06-03 03:38:44 +00001520 yyval.a_module = asn1p_module_new();
1521 checkmem(yyval.a_module);
1522 assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
1523 assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
1524 TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001525 ;
1526 break;}
1527case 30:
vlm151c0b22004-09-22 16:03:36 +00001528#line 522 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001529{
vlm9283dbe2004-08-18 04:59:12 +00001530 yyval.a_module = asn1p_module_new();
1531 checkmem(yyval.a_module);
1532 assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
1533 assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
1534 TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001535 ;
1536 break;}
1537case 31:
vlm151c0b22004-09-22 16:03:36 +00001538#line 535 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001539{
vlm9283dbe2004-08-18 04:59:12 +00001540 yyval.a_module = asn1p_module_new();
1541 checkmem(yyval.a_module);
1542 assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
1543 assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
1544 TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001545 ;
1546 break;}
1547case 32:
vlm151c0b22004-09-22 16:03:36 +00001548#line 543 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001549{ asn1p_lexer_hack_push_encoding_control(); ;
1550 break;}
1551case 33:
vlm151c0b22004-09-22 16:03:36 +00001552#line 544 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001553{
vlm9283dbe2004-08-18 04:59:12 +00001554 fprintf(stderr,
1555 "WARNING: ENCODING-CONTROL %s "
1556 "specification at line %d ignored\n",
1557 yyvsp[-1].tv_str, yylineno);
1558 free(yyvsp[-1].tv_str);
1559 yyval.a_module = 0;
vlm6a02a8a2004-09-08 00:28:11 +00001560 ;
1561 break;}
1562case 34:
vlm151c0b22004-09-22 16:03:36 +00001563#line 556 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001564{
vlmfa67ddc2004-06-03 03:38:44 +00001565 return yyerror(
1566 "Attempt to redefine a standard basic type, "
1567 "use -ftypesXY to switch back "
1568 "to older version of ASN.1 standard");
vlm6a02a8a2004-09-08 00:28:11 +00001569 ;
1570 break;}
1571case 35:
vlm151c0b22004-09-22 16:03:36 +00001572#line 570 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001573{
vlmfa67ddc2004-06-03 03:38:44 +00001574 yyval.a_module = yyvsp[-1].a_module;
vlm6a02a8a2004-09-08 00:28:11 +00001575 ;
1576 break;}
1577case 36:
vlm151c0b22004-09-22 16:03:36 +00001578#line 576 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001579{
vlmfa67ddc2004-06-03 03:38:44 +00001580 return yyerror("Empty IMPORTS list");
vlm6a02a8a2004-09-08 00:28:11 +00001581 ;
1582 break;}
1583case 37:
vlm151c0b22004-09-22 16:03:36 +00001584#line 582 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001585{
vlmfa67ddc2004-06-03 03:38:44 +00001586 yyval.a_module = asn1p_module_new();
1587 checkmem(yyval.a_module);
1588 TQ_ADD(&(yyval.a_module->imports), yyvsp[0].a_xports, xp_next);
vlm6a02a8a2004-09-08 00:28:11 +00001589 ;
1590 break;}
1591case 38:
vlm151c0b22004-09-22 16:03:36 +00001592#line 587 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001593{
vlmfa67ddc2004-06-03 03:38:44 +00001594 yyval.a_module = yyvsp[-1].a_module;
1595 TQ_ADD(&(yyval.a_module->imports), yyvsp[0].a_xports, xp_next);
vlm6a02a8a2004-09-08 00:28:11 +00001596 ;
1597 break;}
1598case 39:
vlm151c0b22004-09-22 16:03:36 +00001599#line 594 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001600{
vlmfa67ddc2004-06-03 03:38:44 +00001601 yyval.a_xports = yyvsp[-3].a_xports;
1602 yyval.a_xports->from = yyvsp[-1].tv_str;
1603 yyval.a_xports->from_oid = yyvsp[0].a_oid;
1604 checkmem(yyval.a_xports);
vlm6a02a8a2004-09-08 00:28:11 +00001605 ;
1606 break;}
1607case 40:
vlm151c0b22004-09-22 16:03:36 +00001608#line 603 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001609{
vlmfa67ddc2004-06-03 03:38:44 +00001610 yyval.a_xports = asn1p_xports_new();
1611 checkmem(yyval.a_xports);
1612 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001613 ;
1614 break;}
1615case 41:
vlm151c0b22004-09-22 16:03:36 +00001616#line 608 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001617{
vlmfa67ddc2004-06-03 03:38:44 +00001618 yyval.a_xports = yyvsp[-2].a_xports;
1619 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001620 ;
1621 break;}
1622case 42:
vlm151c0b22004-09-22 16:03:36 +00001623#line 615 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001624{
vlmfa67ddc2004-06-03 03:38:44 +00001625 yyval.a_expr = asn1p_expr_new(yylineno);
1626 checkmem(yyval.a_expr);
1627 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1628 yyval.a_expr->expr_type = A1TC_REFERENCE;
vlm6a02a8a2004-09-08 00:28:11 +00001629 ;
1630 break;}
1631case 43:
vlm151c0b22004-09-22 16:03:36 +00001632#line 621 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001633{
vlmfa67ddc2004-06-03 03:38:44 +00001634 yyval.a_expr = asn1p_expr_new(yylineno);
1635 checkmem(yyval.a_expr);
1636 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1637 yyval.a_expr->expr_type = A1TC_REFERENCE;
vlm6a02a8a2004-09-08 00:28:11 +00001638 ;
1639 break;}
1640case 44:
vlm151c0b22004-09-22 16:03:36 +00001641#line 630 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001642{
vlmfa67ddc2004-06-03 03:38:44 +00001643 yyval.a_xports = yyvsp[-1].a_xports;
vlm6a02a8a2004-09-08 00:28:11 +00001644 ;
1645 break;}
1646case 45:
vlm151c0b22004-09-22 16:03:36 +00001647#line 633 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001648{
vlmfa67ddc2004-06-03 03:38:44 +00001649 yyval.a_xports = 0;
vlm6a02a8a2004-09-08 00:28:11 +00001650 ;
1651 break;}
1652case 46:
vlm151c0b22004-09-22 16:03:36 +00001653#line 636 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001654{
vlmfa67ddc2004-06-03 03:38:44 +00001655 /* Empty EXPORTS clause effectively prohibits export. */
1656 yyval.a_xports = asn1p_xports_new();
1657 checkmem(yyval.a_xports);
vlm6a02a8a2004-09-08 00:28:11 +00001658 ;
1659 break;}
1660case 47:
vlm151c0b22004-09-22 16:03:36 +00001661#line 644 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001662{
vlmfa67ddc2004-06-03 03:38:44 +00001663 yyval.a_xports = asn1p_xports_new();
1664 assert(yyval.a_xports);
1665 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001666 ;
1667 break;}
1668case 48:
vlm151c0b22004-09-22 16:03:36 +00001669#line 649 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001670{
vlmfa67ddc2004-06-03 03:38:44 +00001671 yyval.a_xports = yyvsp[-2].a_xports;
1672 TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
vlm6a02a8a2004-09-08 00:28:11 +00001673 ;
1674 break;}
1675case 49:
vlm151c0b22004-09-22 16:03:36 +00001676#line 656 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001677{
vlmfa67ddc2004-06-03 03:38:44 +00001678 yyval.a_expr = asn1p_expr_new(yylineno);
1679 checkmem(yyval.a_expr);
1680 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1681 yyval.a_expr->expr_type = A1TC_EXPORTVAR;
vlm6a02a8a2004-09-08 00:28:11 +00001682 ;
1683 break;}
1684case 50:
vlm151c0b22004-09-22 16:03:36 +00001685#line 662 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001686{
vlmfa67ddc2004-06-03 03:38:44 +00001687 yyval.a_expr = asn1p_expr_new(yylineno);
1688 checkmem(yyval.a_expr);
1689 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1690 yyval.a_expr->expr_type = A1TC_EXPORTVAR;
vlm6a02a8a2004-09-08 00:28:11 +00001691 ;
1692 break;}
1693case 51:
vlm151c0b22004-09-22 16:03:36 +00001694#line 672 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001695{
vlmfa67ddc2004-06-03 03:38:44 +00001696 yyval.a_expr = yyvsp[-4].a_expr;
1697 assert(yyval.a_expr->Identifier == 0);
1698 yyval.a_expr->Identifier = yyvsp[-5].tv_str;
1699 yyval.a_expr->meta_type = AMT_VALUESET;
1700 // take care of optValueSetBody
vlm6a02a8a2004-09-08 00:28:11 +00001701 ;
1702 break;}
1703case 52:
vlm151c0b22004-09-22 16:03:36 +00001704#line 682 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001705{
vlmfa67ddc2004-06-03 03:38:44 +00001706 yyval.a_expr = asn1p_expr_new(yylineno);
1707 checkmem(yyval.a_expr);
1708 yyval.a_expr->reference = yyvsp[0].a_ref;
1709 yyval.a_expr->expr_type = A1TC_REFERENCE;
1710 yyval.a_expr->meta_type = AMT_TYPEREF;
vlm6a02a8a2004-09-08 00:28:11 +00001711 ;
1712 break;}
1713case 53:
vlm151c0b22004-09-22 16:03:36 +00001714#line 689 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001715{
vlmfa67ddc2004-06-03 03:38:44 +00001716 yyval.a_expr = asn1p_expr_new(yylineno);
1717 checkmem(yyval.a_expr);
1718 yyval.a_expr->expr_type = yyvsp[0].a_type;
1719 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00001720 ;
1721 break;}
1722case 54:
vlm151c0b22004-09-22 16:03:36 +00001723#line 698 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001724{ ;
1725 break;}
1726case 55:
vlm151c0b22004-09-22 16:03:36 +00001727#line 699 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001728{
1729 ;
1730 break;}
1731case 56:
vlm151c0b22004-09-22 16:03:36 +00001732#line 710 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001733{
1734 ;
1735 break;}
1736case 57:
vlm151c0b22004-09-22 16:03:36 +00001737#line 712 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001738{
1739 ;
1740 break;}
1741case 58:
vlm151c0b22004-09-22 16:03:36 +00001742#line 717 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001743{
1744 ;
1745 break;}
1746case 59:
vlm151c0b22004-09-22 16:03:36 +00001747#line 719 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001748{
1749 ;
1750 break;}
1751case 60:
vlm151c0b22004-09-22 16:03:36 +00001752#line 735 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001753{
vlmfa67ddc2004-06-03 03:38:44 +00001754 yyval.a_expr = asn1p_expr_new(yylineno);
1755 checkmem(yyval.a_expr);
1756 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
1757 yyval.a_expr->tag = yyvsp[-1].a_tag;
1758 yyval.a_expr->expr_type = A1TC_TYPEID;
1759 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00001760 ;
1761 break;}
1762case 61:
vlm151c0b22004-09-22 16:03:36 +00001763#line 743 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001764{
vlmfa67ddc2004-06-03 03:38:44 +00001765 yyval.a_expr = yyvsp[0].a_expr;
vlmfce48a42004-09-14 02:36:39 +00001766 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
vlmfa67ddc2004-06-03 03:38:44 +00001767 assert(yyval.a_expr->expr_type);
1768 assert(yyval.a_expr->meta_type);
vlm6a02a8a2004-09-08 00:28:11 +00001769 ;
1770 break;}
1771case 62:
vlm151c0b22004-09-22 16:03:36 +00001772#line 749 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001773{
vlmfa67ddc2004-06-03 03:38:44 +00001774 yyval.a_expr = yyvsp[0].a_expr;
1775 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
1776 assert(yyval.a_expr->expr_type == A1TC_CLASSDEF);
1777 assert(yyval.a_expr->meta_type == AMT_OBJECT);
vlm6a02a8a2004-09-08 00:28:11 +00001778 ;
1779 break;}
1780case 63:
vlm151c0b22004-09-22 16:03:36 +00001781#line 765 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001782{
vlmfa67ddc2004-06-03 03:38:44 +00001783 yyval.a_expr = yyvsp[0].a_expr;
1784 assert(yyval.a_expr->Identifier == 0);
1785 yyval.a_expr->Identifier = yyvsp[-5].tv_str;
1786 yyval.a_expr->params = yyvsp[-3].a_plist;
1787 yyval.a_expr->meta_type = AMT_PARAMTYPE;
vlm6a02a8a2004-09-08 00:28:11 +00001788 ;
1789 break;}
1790case 64:
vlm151c0b22004-09-22 16:03:36 +00001791#line 775 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001792{
vlmfa67ddc2004-06-03 03:38:44 +00001793 int ret;
1794 yyval.a_plist = asn1p_paramlist_new(yylineno);
1795 checkmem(yyval.a_plist);
1796 ret = asn1p_paramlist_add_param(yyval.a_plist, yyvsp[0].a_parg.governor, yyvsp[0].a_parg.argument);
1797 checkmem(ret == 0);
1798 if(yyvsp[0].a_parg.governor) asn1p_ref_free(yyvsp[0].a_parg.governor);
1799 if(yyvsp[0].a_parg.argument) free(yyvsp[0].a_parg.argument);
vlm6a02a8a2004-09-08 00:28:11 +00001800 ;
1801 break;}
1802case 65:
vlm151c0b22004-09-22 16:03:36 +00001803#line 784 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001804{
vlmfa67ddc2004-06-03 03:38:44 +00001805 int ret;
1806 yyval.a_plist = yyvsp[-2].a_plist;
1807 ret = asn1p_paramlist_add_param(yyval.a_plist, yyvsp[0].a_parg.governor, yyvsp[0].a_parg.argument);
1808 checkmem(ret == 0);
1809 if(yyvsp[0].a_parg.governor) asn1p_ref_free(yyvsp[0].a_parg.governor);
1810 if(yyvsp[0].a_parg.argument) free(yyvsp[0].a_parg.argument);
vlm6a02a8a2004-09-08 00:28:11 +00001811 ;
1812 break;}
1813case 66:
vlm151c0b22004-09-22 16:03:36 +00001814#line 795 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001815{
vlmfa67ddc2004-06-03 03:38:44 +00001816 yyval.a_parg.governor = NULL;
1817 yyval.a_parg.argument = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00001818 ;
1819 break;}
1820case 67:
vlm151c0b22004-09-22 16:03:36 +00001821#line 799 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001822{
vlmfa67ddc2004-06-03 03:38:44 +00001823 int ret;
1824 yyval.a_parg.governor = asn1p_ref_new(yylineno);
1825 ret = asn1p_ref_add_component(yyval.a_parg.governor, yyvsp[-2].tv_str, 0);
1826 checkmem(ret == 0);
1827 yyval.a_parg.argument = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00001828 ;
1829 break;}
1830case 68:
vlm151c0b22004-09-22 16:03:36 +00001831#line 806 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001832{
vlmfa67ddc2004-06-03 03:38:44 +00001833 int ret;
1834 yyval.a_parg.governor = asn1p_ref_new(yylineno);
1835 ret = asn1p_ref_add_component(yyval.a_parg.governor,
1836 ASN_EXPR_TYPE2STR(yyvsp[-2].a_type), 1);
1837 checkmem(ret == 0);
1838 yyval.a_parg.argument = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00001839 ;
1840 break;}
1841case 69:
vlm151c0b22004-09-22 16:03:36 +00001842#line 817 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001843{
vlmfa67ddc2004-06-03 03:38:44 +00001844 yyval.a_expr = asn1p_expr_new(yylineno);
1845 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00001846 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1847 ;
1848 break;}
1849case 70:
vlm151c0b22004-09-22 16:03:36 +00001850#line 822 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001851{
vlmfa67ddc2004-06-03 03:38:44 +00001852 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001853 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1854 ;
1855 break;}
1856case 71:
vlm151c0b22004-09-22 16:03:36 +00001857#line 829 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001858{
vlmfa67ddc2004-06-03 03:38:44 +00001859 yyval.a_expr = yyvsp[0].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001860 ;
1861 break;}
1862case 72:
vlm151c0b22004-09-22 16:03:36 +00001863#line 832 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001864{
vlmfa67ddc2004-06-03 03:38:44 +00001865 yyval.a_expr = asn1p_expr_new(yylineno);
1866 checkmem(yyval.a_expr);
1867 yyval.a_expr->Identifier = yyvsp[0].tv_str;
1868 yyval.a_expr->expr_type = A1TC_REFERENCE;
1869 yyval.a_expr->meta_type = AMT_VALUE;
vlm6a02a8a2004-09-08 00:28:11 +00001870 ;
1871 break;}
1872case 73:
vlm151c0b22004-09-22 16:03:36 +00001873#line 845 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001874{
vlmfa67ddc2004-06-03 03:38:44 +00001875 yyval.a_expr = asn1p_expr_new(yylineno);
1876 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00001877 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1878 ;
1879 break;}
1880case 74:
vlm151c0b22004-09-22 16:03:36 +00001881#line 850 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001882{
vlmfa67ddc2004-06-03 03:38:44 +00001883 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001884 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1885 ;
1886 break;}
1887case 75:
vlm151c0b22004-09-22 16:03:36 +00001888#line 857 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001889{
vlmec8f6812004-08-22 03:19:54 +00001890 yyval.a_expr = yyvsp[-1].a_expr;
1891 assert(yyval.a_expr->Identifier == 0);
vlmfce48a42004-09-14 02:36:39 +00001892 yyval.a_expr->Identifier = yyvsp[-2].tv_str;
vlmec8f6812004-08-22 03:19:54 +00001893 yyval.a_expr->marker = yyvsp[0].a_marker;
vlm6a02a8a2004-09-08 00:28:11 +00001894 ;
1895 break;}
1896case 76:
vlm151c0b22004-09-22 16:03:36 +00001897#line 863 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001898{
vlmec8f6812004-08-22 03:19:54 +00001899 yyval.a_expr = asn1p_expr_new(yylineno);
1900 checkmem(yyval.a_expr);
1901 yyval.a_expr->meta_type = yyvsp[0].a_expr->meta_type;
1902 yyval.a_expr->expr_type = A1TC_COMPONENTS_OF;
vlm6a02a8a2004-09-08 00:28:11 +00001903 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1904 ;
1905 break;}
1906case 77:
vlm151c0b22004-09-22 16:03:36 +00001907#line 870 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001908{
vlmec8f6812004-08-22 03:19:54 +00001909 yyval.a_expr = yyvsp[0].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001910 ;
1911 break;}
1912case 78:
vlm151c0b22004-09-22 16:03:36 +00001913#line 876 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001914{
vlmec8f6812004-08-22 03:19:54 +00001915 yyval.a_expr = asn1p_expr_new(yylineno);
1916 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00001917 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1918 ;
1919 break;}
1920case 79:
vlm151c0b22004-09-22 16:03:36 +00001921#line 881 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001922{
vlmec8f6812004-08-22 03:19:54 +00001923 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001924 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1925 ;
1926 break;}
1927case 80:
vlm151c0b22004-09-22 16:03:36 +00001928#line 888 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001929{
vlmec8f6812004-08-22 03:19:54 +00001930 yyval.a_expr = yyvsp[0].a_expr;
1931 assert(yyval.a_expr->Identifier == 0);
vlmfce48a42004-09-14 02:36:39 +00001932 yyval.a_expr->Identifier = yyvsp[-1].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00001933 ;
1934 break;}
1935case 81:
vlm151c0b22004-09-22 16:03:36 +00001936#line 893 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001937{
vlmec8f6812004-08-22 03:19:54 +00001938 yyval.a_expr = yyvsp[0].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001939 ;
1940 break;}
1941case 82:
vlm151c0b22004-09-22 16:03:36 +00001942#line 899 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001943{
vlmfa67ddc2004-06-03 03:38:44 +00001944 yyval.a_expr = yyvsp[-2].a_expr;
1945 checkmem(yyval.a_expr);
1946 yyval.a_expr->with_syntax = yyvsp[0].a_wsynt;
1947 assert(yyval.a_expr->expr_type == A1TC_CLASSDEF);
1948 assert(yyval.a_expr->meta_type == AMT_OBJECT);
vlm6a02a8a2004-09-08 00:28:11 +00001949 ;
1950 break;}
1951case 83:
vlm151c0b22004-09-22 16:03:36 +00001952#line 909 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001953{ yyval.a_int = 0; ;
1954 break;}
1955case 84:
vlm151c0b22004-09-22 16:03:36 +00001956#line 910 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001957{ yyval.a_int = 1; ;
1958 break;}
1959case 85:
vlm151c0b22004-09-22 16:03:36 +00001960#line 914 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001961{
vlmfa67ddc2004-06-03 03:38:44 +00001962 yyval.a_expr = asn1p_expr_new(yylineno);
1963 checkmem(yyval.a_expr);
1964 yyval.a_expr->expr_type = A1TC_CLASSDEF;
1965 yyval.a_expr->meta_type = AMT_OBJECT;
vlm6a02a8a2004-09-08 00:28:11 +00001966 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1967 ;
1968 break;}
1969case 86:
vlm151c0b22004-09-22 16:03:36 +00001970#line 921 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001971{
vlmfa67ddc2004-06-03 03:38:44 +00001972 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00001973 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
1974 ;
1975 break;}
1976case 87:
vlm151c0b22004-09-22 16:03:36 +00001977#line 928 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001978{
vlmfa67ddc2004-06-03 03:38:44 +00001979 yyval.a_expr = asn1p_expr_new(yylineno);
1980 checkmem(yyval.a_expr);
1981 yyval.a_expr->Identifier = yyvsp[-1].a_refcomp.name;
1982 yyval.a_expr->expr_type = A1TC_CLASSFIELD;
1983 yyval.a_expr->meta_type = AMT_OBJECTFIELD;
1984 yyval.a_expr->marker = yyvsp[0].a_marker;
vlm6a02a8a2004-09-08 00:28:11 +00001985 ;
1986 break;}
1987case 88:
vlm151c0b22004-09-22 16:03:36 +00001988#line 936 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001989{
vlmec8f6812004-08-22 03:19:54 +00001990 yyval.a_expr = yyvsp[-2].a_expr;
1991 yyval.a_expr->Identifier = yyvsp[-3].a_refcomp.name;
1992 yyval.a_expr->marker = yyvsp[-1].a_marker;
vlmfa67ddc2004-06-03 03:38:44 +00001993 yyval.a_expr->unique = yyvsp[0].a_int;
vlm6a02a8a2004-09-08 00:28:11 +00001994 ;
1995 break;}
1996case 89:
vlm151c0b22004-09-22 16:03:36 +00001997#line 942 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00001998{
vlmfa67ddc2004-06-03 03:38:44 +00001999 int ret;
2000 yyval.a_expr = asn1p_expr_new(yylineno);
2001 checkmem(yyval.a_expr);
2002 yyval.a_expr->Identifier = yyvsp[-3].a_refcomp.name;
2003 yyval.a_expr->reference = asn1p_ref_new(yylineno);
2004 checkmem(yyval.a_expr->reference);
2005 ret = asn1p_ref_add_component(yyval.a_expr->reference,
2006 yyvsp[-2].a_refcomp.name, yyvsp[-2].a_refcomp.lex_type);
2007 checkmem(ret == 0);
2008 yyval.a_expr->expr_type = A1TC_CLASSFIELD;
2009 yyval.a_expr->meta_type = AMT_OBJECTFIELD;
2010 yyval.a_expr->marker = yyvsp[-1].a_marker;
2011 yyval.a_expr->unique = yyvsp[0].a_int;
vlm6a02a8a2004-09-08 00:28:11 +00002012 ;
2013 break;}
2014case 90:
vlm151c0b22004-09-22 16:03:36 +00002015#line 960 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002016{ yyval.a_wsynt = 0; ;
2017 break;}
2018case 91:
vlm151c0b22004-09-22 16:03:36 +00002019#line 961 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002020{
vlmfa67ddc2004-06-03 03:38:44 +00002021 yyval.a_wsynt = yyvsp[0].a_wsynt;
vlm6a02a8a2004-09-08 00:28:11 +00002022 ;
2023 break;}
2024case 92:
vlm151c0b22004-09-22 16:03:36 +00002025#line 968 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002026{ asn1p_lexer_hack_enable_with_syntax(); ;
2027 break;}
2028case 93:
vlm151c0b22004-09-22 16:03:36 +00002029#line 970 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002030{
vlmfa67ddc2004-06-03 03:38:44 +00002031 yyval.a_wsynt = yyvsp[-1].a_wsynt;
vlm6a02a8a2004-09-08 00:28:11 +00002032 ;
2033 break;}
2034case 94:
vlm151c0b22004-09-22 16:03:36 +00002035#line 976 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002036{
vlmfa67ddc2004-06-03 03:38:44 +00002037 yyval.a_wsynt = asn1p_wsyntx_new();
2038 TQ_ADD(&(yyval.a_wsynt->chunks), yyvsp[0].a_wchunk, next);
vlm6a02a8a2004-09-08 00:28:11 +00002039 ;
2040 break;}
2041case 95:
vlm151c0b22004-09-22 16:03:36 +00002042#line 980 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002043{
vlmfa67ddc2004-06-03 03:38:44 +00002044 yyval.a_wsynt = yyvsp[-1].a_wsynt;
2045 TQ_ADD(&(yyval.a_wsynt->chunks), yyvsp[0].a_wchunk, next);
vlm6a02a8a2004-09-08 00:28:11 +00002046 ;
2047 break;}
2048case 96:
vlm151c0b22004-09-22 16:03:36 +00002049#line 987 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002050{
vlmfa67ddc2004-06-03 03:38:44 +00002051 yyval.a_wchunk = asn1p_wsyntx_chunk_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002052 ;
2053 break;}
2054case 97:
vlm151c0b22004-09-22 16:03:36 +00002055#line 990 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002056{
vlmfa67ddc2004-06-03 03:38:44 +00002057 asn1p_ref_t *ref;
2058 int ret;
2059 ref = asn1p_ref_new(yylineno);
2060 checkmem(ref);
2061 ret = asn1p_ref_add_component(ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
2062 checkmem(ret == 0);
2063 yyval.a_wchunk = asn1p_wsyntx_chunk_fromref(ref, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002064 ;
2065 break;}
2066case 98:
vlm151c0b22004-09-22 16:03:36 +00002067#line 1002 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002068{
vlm39e5ed72004-09-05 10:40:41 +00002069 yyval.a_expr = asn1p_expr_new(yylineno);
vlm9283dbe2004-08-18 04:59:12 +00002070 checkmem(yyval.a_expr);
2071 yyval.a_expr->Identifier = strdup("...");
2072 checkmem(yyval.a_expr->Identifier);
vlm9283dbe2004-08-18 04:59:12 +00002073 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
2074 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002075 ;
2076 break;}
2077case 99:
vlm151c0b22004-09-22 16:03:36 +00002078#line 1010 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002079{
vlm39e5ed72004-09-05 10:40:41 +00002080 yyval.a_expr = asn1p_expr_new(yylineno);
vlm9283dbe2004-08-18 04:59:12 +00002081 checkmem(yyval.a_expr);
2082 yyval.a_expr->Identifier = strdup("...");
vlm9283dbe2004-08-18 04:59:12 +00002083 checkmem(yyval.a_expr->Identifier);
vlm5f0128b2004-08-20 13:25:29 +00002084 yyval.a_expr->value = yyvsp[0].a_value;
vlm9283dbe2004-08-18 04:59:12 +00002085 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
2086 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002087 ;
2088 break;}
2089case 100:
vlm151c0b22004-09-22 16:03:36 +00002090#line 1019 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002091{
vlm39e5ed72004-09-05 10:40:41 +00002092 yyval.a_expr = asn1p_expr_new(yylineno);
vlm5f0128b2004-08-20 13:25:29 +00002093 checkmem(yyval.a_expr);
2094 yyval.a_expr->Identifier = strdup("...");
2095 yyval.a_expr->value = yyvsp[0].a_value;
2096 checkmem(yyval.a_expr->Identifier);
2097 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
2098 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002099 ;
2100 break;}
2101case 101:
vlm151c0b22004-09-22 16:03:36 +00002102#line 1031 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002103{
vlmec8f6812004-08-22 03:19:54 +00002104 yyval.a_expr = yyvsp[-1].a_expr;
vlmfce48a42004-09-14 02:36:39 +00002105 yyval.a_expr->tag = yyvsp[-2].a_tag;
vlmec8f6812004-08-22 03:19:54 +00002106 /*
2107 * Outer constraint for SEQUENCE OF and SET OF applies
2108 * to the inner type.
2109 */
2110 if(yyval.a_expr->expr_type == ASN_CONSTR_SEQUENCE_OF
2111 || yyval.a_expr->expr_type == ASN_CONSTR_SET_OF) {
2112 assert(!TQ_FIRST(&(yyval.a_expr->members))->constraints);
2113 TQ_FIRST(&(yyval.a_expr->members))->constraints = yyvsp[0].a_constr;
2114 } else {
2115 if(yyval.a_expr->constraints) {
vlmfce48a42004-09-14 02:36:39 +00002116 assert(!yyvsp[-1].a_expr);
vlmec8f6812004-08-22 03:19:54 +00002117 } else {
2118 yyval.a_expr->constraints = yyvsp[0].a_constr;
2119 }
2120 }
vlm6a02a8a2004-09-08 00:28:11 +00002121 ;
2122 break;}
2123case 102:
vlm151c0b22004-09-22 16:03:36 +00002124#line 1053 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002125{
vlm5f0128b2004-08-20 13:25:29 +00002126 yyval.a_expr = yyvsp[0].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00002127 ;
2128 break;}
2129case 103:
vlm151c0b22004-09-22 16:03:36 +00002130#line 1056 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002131{
vlmfa67ddc2004-06-03 03:38:44 +00002132 yyval.a_expr = asn1p_expr_new(yylineno);
2133 checkmem(yyval.a_expr);
2134 yyval.a_expr->expr_type = yyvsp[0].a_type;
2135 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002136 ;
2137 break;}
2138case 104:
vlm151c0b22004-09-22 16:03:36 +00002139#line 1062 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002140{
vlmec8f6812004-08-22 03:19:54 +00002141 yyval.a_expr = yyvsp[-1].a_expr;
2142 assert(yyval.a_expr->expr_type == A1TC_INVALID);
2143 yyval.a_expr->expr_type = ASN_CONSTR_CHOICE;
2144 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002145 ;
2146 break;}
2147case 105:
vlm151c0b22004-09-22 16:03:36 +00002148#line 1068 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002149{
vlmec8f6812004-08-22 03:19:54 +00002150 yyval.a_expr = yyvsp[-1].a_expr;
2151 assert(yyval.a_expr->expr_type == A1TC_INVALID);
2152 yyval.a_expr->expr_type = ASN_CONSTR_SEQUENCE;
2153 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002154 ;
2155 break;}
2156case 106:
vlm151c0b22004-09-22 16:03:36 +00002157#line 1074 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002158{
vlmec8f6812004-08-22 03:19:54 +00002159 yyval.a_expr = yyvsp[-1].a_expr;
2160 assert(yyval.a_expr->expr_type == A1TC_INVALID);
2161 yyval.a_expr->expr_type = ASN_CONSTR_SET;
2162 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002163 ;
2164 break;}
2165case 107:
vlm151c0b22004-09-22 16:03:36 +00002166#line 1080 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002167{
vlm39e5ed72004-09-05 10:40:41 +00002168 yyval.a_expr = asn1p_expr_new(yylineno);
vlmec8f6812004-08-22 03:19:54 +00002169 checkmem(yyval.a_expr);
vlm151c0b22004-09-22 16:03:36 +00002170 yyval.a_expr->constraints = yyvsp[-4].a_constr;
vlmec8f6812004-08-22 03:19:54 +00002171 yyval.a_expr->expr_type = ASN_CONSTR_SEQUENCE_OF;
2172 yyval.a_expr->meta_type = AMT_TYPE;
vlm151c0b22004-09-22 16:03:36 +00002173 yyvsp[0].a_expr->Identifier = yyvsp[-2].tv_str;
vlma2374a02004-09-14 02:44:07 +00002174 yyvsp[0].a_expr->tag = yyvsp[-1].a_tag;
vlm6a02a8a2004-09-08 00:28:11 +00002175 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
2176 ;
2177 break;}
2178case 108:
vlm151c0b22004-09-22 16:03:36 +00002179#line 1090 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002180{
vlm39e5ed72004-09-05 10:40:41 +00002181 yyval.a_expr = asn1p_expr_new(yylineno);
vlmec8f6812004-08-22 03:19:54 +00002182 checkmem(yyval.a_expr);
vlm151c0b22004-09-22 16:03:36 +00002183 yyval.a_expr->constraints = yyvsp[-4].a_constr;
vlmec8f6812004-08-22 03:19:54 +00002184 yyval.a_expr->expr_type = ASN_CONSTR_SET_OF;
2185 yyval.a_expr->meta_type = AMT_TYPE;
vlm151c0b22004-09-22 16:03:36 +00002186 yyvsp[0].a_expr->Identifier = yyvsp[-2].tv_str;
vlma2374a02004-09-14 02:44:07 +00002187 yyvsp[0].a_expr->tag = yyvsp[-1].a_tag;
vlm6a02a8a2004-09-08 00:28:11 +00002188 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
2189 ;
2190 break;}
2191case 109:
vlm151c0b22004-09-22 16:03:36 +00002192#line 1100 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002193{
vlm39e5ed72004-09-05 10:40:41 +00002194 yyval.a_expr = asn1p_expr_new(yylineno);
vlmec8f6812004-08-22 03:19:54 +00002195 checkmem(yyval.a_expr);
vlm044f7442004-09-04 04:49:21 +00002196 yyval.a_expr->expr_type = ASN_TYPE_ANY;
vlmec8f6812004-08-22 03:19:54 +00002197 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002198 ;
2199 break;}
2200case 110:
vlm151c0b22004-09-22 16:03:36 +00002201#line 1106 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002202{
vlmec8f6812004-08-22 03:19:54 +00002203 int ret;
vlm39e5ed72004-09-05 10:40:41 +00002204 yyval.a_expr = asn1p_expr_new(yylineno);
vlmec8f6812004-08-22 03:19:54 +00002205 checkmem(yyval.a_expr);
2206 yyval.a_expr->reference = asn1p_ref_new(yylineno);
2207 ret = asn1p_ref_add_component(yyval.a_expr->reference,
2208 yyvsp[0].tv_str, RLT_lowercase);
2209 checkmem(ret == 0);
vlm044f7442004-09-04 04:49:21 +00002210 yyval.a_expr->expr_type = ASN_TYPE_ANY;
vlmec8f6812004-08-22 03:19:54 +00002211 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002212 ;
2213 break;}
2214case 111:
vlm151c0b22004-09-22 16:03:36 +00002215#line 1120 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002216{
vlmfa67ddc2004-06-03 03:38:44 +00002217 int ret;
2218 yyval.a_expr = yyvsp[-1].a_expr;
2219 assert(yyval.a_expr->expr_type == 0);
2220 assert(yyval.a_expr->meta_type == 0);
2221 assert(yyval.a_expr->reference == 0);
2222 yyval.a_expr->reference = asn1p_ref_new(yylineno);
2223 checkmem(yyval.a_expr->reference);
2224 ret = asn1p_ref_add_component(yyval.a_expr->reference, yyvsp[-3].tv_str, RLT_UNKNOWN);
2225 checkmem(ret == 0);
2226 free(yyvsp[-3].tv_str);
2227 yyval.a_expr->expr_type = A1TC_PARAMETRIZED;
2228 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002229 ;
2230 break;}
2231case 112:
vlm151c0b22004-09-22 16:03:36 +00002232#line 1144 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002233{
vlmfa67ddc2004-06-03 03:38:44 +00002234 yyval.a_expr = asn1p_expr_new(yylineno);
2235 checkmem(yyval.a_expr);
2236 yyval.a_expr->reference = yyvsp[0].a_ref;
2237 yyval.a_expr->expr_type = A1TC_REFERENCE;
2238 yyval.a_expr->meta_type = AMT_TYPEREF;
vlm6a02a8a2004-09-08 00:28:11 +00002239 ;
2240 break;}
2241case 113:
vlm151c0b22004-09-22 16:03:36 +00002242#line 1151 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002243{
vlmfa67ddc2004-06-03 03:38:44 +00002244 yyval.a_expr = asn1p_expr_new(yylineno);
2245 checkmem(yyval.a_expr);
2246 yyval.a_expr->reference = yyvsp[0].a_ref;
2247 yyval.a_expr->expr_type = A1TC_INSTANCE;
2248 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002249 ;
2250 break;}
2251case 114:
vlm151c0b22004-09-22 16:03:36 +00002252#line 1166 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002253{
vlmfa67ddc2004-06-03 03:38:44 +00002254 int ret;
2255 yyval.a_ref = asn1p_ref_new(yylineno);
2256 checkmem(yyval.a_ref);
2257 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN);
2258 checkmem(ret == 0);
2259 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002260 ;
2261 break;}
2262case 115:
vlm151c0b22004-09-22 16:03:36 +00002263#line 1174 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002264{
vlmfa67ddc2004-06-03 03:38:44 +00002265 int ret;
2266 yyval.a_ref = asn1p_ref_new(yylineno);
2267 checkmem(yyval.a_ref);
2268 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2269 checkmem(ret == 0);
2270 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN);
2271 checkmem(ret == 0);
2272 free(yyvsp[-2].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002273 ;
2274 break;}
2275case 116:
vlm151c0b22004-09-22 16:03:36 +00002276#line 1184 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002277{
vlmfa67ddc2004-06-03 03:38:44 +00002278 int ret;
2279 yyval.a_ref = asn1p_ref_new(yylineno);
2280 checkmem(yyval.a_ref);
2281 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2282 checkmem(ret == 0);
vlmc94e28f2004-09-15 11:59:51 +00002283 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN);
vlmfa67ddc2004-06-03 03:38:44 +00002284 checkmem(ret == 0);
2285 free(yyvsp[-2].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002286 ;
2287 break;}
2288case 117:
vlm151c0b22004-09-22 16:03:36 +00002289#line 1194 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002290{
vlmfa67ddc2004-06-03 03:38:44 +00002291 int ret;
2292 yyval.a_ref = asn1p_ref_new(yylineno);
2293 checkmem(yyval.a_ref);
vlmc94e28f2004-09-15 11:59:51 +00002294 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2295 checkmem(ret == 0);
2296 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_lowercase);
2297 checkmem(ret == 0);
2298 free(yyvsp[-2].tv_str);
2299 ;
2300 break;}
2301case 118:
vlm151c0b22004-09-22 16:03:36 +00002302#line 1204 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002303{
2304 int ret;
2305 yyval.a_ref = asn1p_ref_new(yylineno);
2306 checkmem(yyval.a_ref);
vlmfa67ddc2004-06-03 03:38:44 +00002307 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_CAPITALS);
2308 free(yyvsp[0].tv_str);
2309 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002310 ;
2311 break;}
vlmc94e28f2004-09-15 11:59:51 +00002312case 119:
vlm151c0b22004-09-22 16:03:36 +00002313#line 1212 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002314{
vlmfa67ddc2004-06-03 03:38:44 +00002315 int ret;
2316 yyval.a_ref = yyvsp[0].a_ref;
2317 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_CAPITALS);
2318 free(yyvsp[-2].tv_str);
2319 checkmem(ret == 0);
2320 /*
2321 * Move the last element infront.
2322 */
2323 {
2324 struct asn1p_ref_component_s tmp_comp;
2325 tmp_comp = yyval.a_ref->components[yyval.a_ref->comp_count-1];
2326 memmove(&yyval.a_ref->components[1],
2327 &yyval.a_ref->components[0],
2328 sizeof(yyval.a_ref->components[0])
2329 * (yyval.a_ref->comp_count - 1));
2330 yyval.a_ref->components[0] = tmp_comp;
2331 }
vlm6a02a8a2004-09-08 00:28:11 +00002332 ;
2333 break;}
vlmc94e28f2004-09-15 11:59:51 +00002334case 120:
vlm151c0b22004-09-22 16:03:36 +00002335#line 1234 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002336{
vlmfa67ddc2004-06-03 03:38:44 +00002337 int ret;
2338 yyval.a_ref = asn1p_ref_new(yylineno);
2339 checkmem(yyval.a_ref);
2340 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
2341 free(yyvsp[0].a_refcomp.name);
2342 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002343 ;
2344 break;}
vlmc94e28f2004-09-15 11:59:51 +00002345case 121:
vlm151c0b22004-09-22 16:03:36 +00002346#line 1242 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002347{
vlmfa67ddc2004-06-03 03:38:44 +00002348 int ret;
2349 yyval.a_ref = yyvsp[-2].a_ref;
2350 ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
2351 free(yyvsp[0].a_refcomp.name);
2352 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002353 ;
2354 break;}
vlmc94e28f2004-09-15 11:59:51 +00002355case 124:
vlm151c0b22004-09-22 16:03:36 +00002356#line 1256 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002357{
vlmfa67ddc2004-06-03 03:38:44 +00002358 yyval.a_refcomp.lex_type = RLT_AmpUppercase;
2359 yyval.a_refcomp.name = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00002360 ;
2361 break;}
vlmc94e28f2004-09-15 11:59:51 +00002362case 125:
vlm151c0b22004-09-22 16:03:36 +00002363#line 1261 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002364{
vlmfa67ddc2004-06-03 03:38:44 +00002365 yyval.a_refcomp.lex_type = RLT_Amplowercase;
2366 yyval.a_refcomp.name = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00002367 ;
2368 break;}
vlmc94e28f2004-09-15 11:59:51 +00002369case 126:
vlm151c0b22004-09-22 16:03:36 +00002370#line 1274 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002371{
vlmfa67ddc2004-06-03 03:38:44 +00002372 yyval.a_expr = yyvsp[-2].a_expr;
2373 assert(yyval.a_expr->Identifier == NULL);
2374 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
2375 yyval.a_expr->meta_type = AMT_VALUE;
2376 yyval.a_expr->value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002377 ;
2378 break;}
vlmc94e28f2004-09-15 11:59:51 +00002379case 127:
vlm151c0b22004-09-22 16:03:36 +00002380#line 1284 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002381{
2382 yyval.a_value = asn1p_value_fromint(0);
2383 checkmem(yyval.a_value);
2384 yyval.a_value->type = ATV_CHOICE_IDENTIFIER;
2385 yyval.a_value->value.choice_identifier.identifier = yyvsp[-2].tv_str;
2386 yyval.a_value->value.choice_identifier.value = yyvsp[0].a_value;
2387 ;
2388 break;}
2389case 128:
vlm151c0b22004-09-22 16:03:36 +00002390#line 1291 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002391{ asn1p_lexer_hack_push_opaque_state(); ;
2392 break;}
vlmc94e28f2004-09-15 11:59:51 +00002393case 129:
vlm151c0b22004-09-22 16:03:36 +00002394#line 1291 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002395{
vlmfa67ddc2004-06-03 03:38:44 +00002396 yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
2397 checkmem(yyval.a_value);
2398 yyval.a_value->type = ATV_UNPARSED;
vlm6a02a8a2004-09-08 00:28:11 +00002399 ;
2400 break;}
vlmc94e28f2004-09-15 11:59:51 +00002401case 130:
vlm151c0b22004-09-22 16:03:36 +00002402#line 1296 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002403{
2404 yyval.a_value = asn1p_value_fromint(0);
2405 checkmem(yyval.a_value);
2406 yyval.a_value->type = ATV_NULL;
2407 ;
2408 break;}
2409case 131:
vlm151c0b22004-09-22 16:03:36 +00002410#line 1301 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002411{
2412 yyval.a_value = asn1p_value_fromint(0);
2413 checkmem(yyval.a_value);
2414 yyval.a_value->type = ATV_FALSE;
2415 ;
2416 break;}
2417case 132:
vlm151c0b22004-09-22 16:03:36 +00002418#line 1306 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002419{
2420 yyval.a_value = asn1p_value_fromint(0);
2421 checkmem(yyval.a_value);
2422 yyval.a_value->type = ATV_TRUE;
2423 ;
2424 break;}
2425case 133:
vlm151c0b22004-09-22 16:03:36 +00002426#line 1311 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002427{
vlmfa67ddc2004-06-03 03:38:44 +00002428 yyval.a_value = _convert_bitstring2binary(yyvsp[0].tv_str, 'B');
2429 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00002430 ;
2431 break;}
vlmc94e28f2004-09-15 11:59:51 +00002432case 134:
vlm151c0b22004-09-22 16:03:36 +00002433#line 1315 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002434{
vlmfa67ddc2004-06-03 03:38:44 +00002435 yyval.a_value = _convert_bitstring2binary(yyvsp[0].tv_str, 'H');
2436 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00002437 ;
2438 break;}
vlmc94e28f2004-09-15 11:59:51 +00002439case 135:
vlm151c0b22004-09-22 16:03:36 +00002440#line 1319 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002441{
vlmfa67ddc2004-06-03 03:38:44 +00002442 yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
2443 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00002444 ;
2445 break;}
vlmc94e28f2004-09-15 11:59:51 +00002446case 136:
vlmc94e28f2004-09-15 11:59:51 +00002447#line 1323 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002448{
vlm5f0128b2004-08-20 13:25:29 +00002449 yyval.a_value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002450 ;
2451 break;}
vlm151c0b22004-09-22 16:03:36 +00002452case 137:
2453#line 1326 "asn1p_y.y"
2454{
2455 yyval.a_value = yyvsp[0].a_value;
2456 ;
2457 break;}
vlmc94e28f2004-09-15 11:59:51 +00002458case 138:
vlm151c0b22004-09-22 16:03:36 +00002459#line 1332 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002460{
vlmfa67ddc2004-06-03 03:38:44 +00002461 asn1p_ref_t *ref;
2462 int ret;
2463 ref = asn1p_ref_new(yylineno);
2464 checkmem(ref);
2465 ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
2466 checkmem(ret == 0);
2467 yyval.a_value = asn1p_value_fromref(ref, 0);
2468 checkmem(yyval.a_value);
2469 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002470 ;
2471 break;}
vlmc94e28f2004-09-15 11:59:51 +00002472case 139:
vlm151c0b22004-09-22 16:03:36 +00002473#line 1343 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002474{
vlmfa67ddc2004-06-03 03:38:44 +00002475 asn1p_ref_t *ref;
2476 int ret;
2477 ref = asn1p_ref_new(yylineno);
2478 checkmem(ref);
2479 ret = asn1p_ref_add_component(ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
2480 checkmem(ret == 0);
2481 ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
2482 checkmem(ret == 0);
2483 yyval.a_value = asn1p_value_fromref(ref, 0);
2484 checkmem(yyval.a_value);
2485 free(yyvsp[-2].tv_str);
2486 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002487 ;
2488 break;}
vlmc94e28f2004-09-15 11:59:51 +00002489case 140:
vlm151c0b22004-09-22 16:03:36 +00002490#line 1360 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002491{
vlmfa67ddc2004-06-03 03:38:44 +00002492 yyval.tv_opaque.len = yyvsp[0].tv_opaque.len + 2;
2493 yyval.tv_opaque.buf = malloc(yyval.tv_opaque.len + 1);
2494 checkmem(yyval.tv_opaque.buf);
2495 yyval.tv_opaque.buf[0] = '{';
2496 yyval.tv_opaque.buf[1] = ' ';
2497 memcpy(yyval.tv_opaque.buf + 2, yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len);
2498 yyval.tv_opaque.buf[yyval.tv_opaque.len] = '\0';
2499 free(yyvsp[0].tv_opaque.buf);
vlm6a02a8a2004-09-08 00:28:11 +00002500 ;
2501 break;}
vlmc94e28f2004-09-15 11:59:51 +00002502case 141:
vlm151c0b22004-09-22 16:03:36 +00002503#line 1370 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002504{
vlmfa67ddc2004-06-03 03:38:44 +00002505 int newsize = yyvsp[-1].tv_opaque.len + yyvsp[0].tv_opaque.len;
2506 char *p = malloc(newsize + 1);
2507 checkmem(p);
2508 memcpy(p , yyvsp[-1].tv_opaque.buf, yyvsp[-1].tv_opaque.len);
2509 memcpy(p + yyvsp[-1].tv_opaque.len, yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len);
2510 p[newsize] = '\0';
2511 free(yyvsp[-1].tv_opaque.buf);
2512 free(yyvsp[0].tv_opaque.buf);
2513 yyval.tv_opaque.buf = p;
2514 yyval.tv_opaque.len = newsize;
vlm6a02a8a2004-09-08 00:28:11 +00002515 ;
2516 break;}
vlmc94e28f2004-09-15 11:59:51 +00002517case 142:
vlm151c0b22004-09-22 16:03:36 +00002518#line 1385 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002519{ yyval.a_type = ASN_BASIC_BOOLEAN; ;
2520 break;}
vlmc94e28f2004-09-15 11:59:51 +00002521case 143:
vlm151c0b22004-09-22 16:03:36 +00002522#line 1386 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002523{ yyval.a_type = ASN_BASIC_NULL; ;
2524 break;}
vlmc94e28f2004-09-15 11:59:51 +00002525case 144:
vlm151c0b22004-09-22 16:03:36 +00002526#line 1387 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002527{ yyval.a_type = ASN_BASIC_REAL; ;
2528 break;}
vlmc94e28f2004-09-15 11:59:51 +00002529case 145:
vlm151c0b22004-09-22 16:03:36 +00002530#line 1388 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002531{ yyval.a_type = yyvsp[0].a_type; ;
2532 break;}
vlmc94e28f2004-09-15 11:59:51 +00002533case 146:
vlm151c0b22004-09-22 16:03:36 +00002534#line 1389 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002535{ yyval.a_type = ASN_BASIC_OCTET_STRING; ;
2536 break;}
vlmc94e28f2004-09-15 11:59:51 +00002537case 147:
vlm151c0b22004-09-22 16:03:36 +00002538#line 1390 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002539{ yyval.a_type = ASN_BASIC_OBJECT_IDENTIFIER; ;
2540 break;}
vlmc94e28f2004-09-15 11:59:51 +00002541case 148:
vlm151c0b22004-09-22 16:03:36 +00002542#line 1391 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002543{ yyval.a_type = ASN_BASIC_RELATIVE_OID; ;
2544 break;}
vlmc94e28f2004-09-15 11:59:51 +00002545case 149:
vlm151c0b22004-09-22 16:03:36 +00002546#line 1392 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002547{ yyval.a_type = ASN_BASIC_EXTERNAL; ;
2548 break;}
vlmc94e28f2004-09-15 11:59:51 +00002549case 150:
vlm151c0b22004-09-22 16:03:36 +00002550#line 1393 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002551{ yyval.a_type = ASN_BASIC_EMBEDDED_PDV; ;
2552 break;}
vlmc94e28f2004-09-15 11:59:51 +00002553case 151:
vlm151c0b22004-09-22 16:03:36 +00002554#line 1394 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002555{ yyval.a_type = ASN_BASIC_CHARACTER_STRING; ;
2556 break;}
vlmc94e28f2004-09-15 11:59:51 +00002557case 152:
vlm151c0b22004-09-22 16:03:36 +00002558#line 1395 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002559{ yyval.a_type = ASN_BASIC_UTCTime; ;
2560 break;}
vlmc94e28f2004-09-15 11:59:51 +00002561case 153:
vlm151c0b22004-09-22 16:03:36 +00002562#line 1396 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002563{ yyval.a_type = ASN_BASIC_GeneralizedTime; ;
2564 break;}
vlmc94e28f2004-09-15 11:59:51 +00002565case 154:
vlm151c0b22004-09-22 16:03:36 +00002566#line 1403 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002567{ yyval.a_type = ASN_BASIC_INTEGER; ;
2568 break;}
vlmc94e28f2004-09-15 11:59:51 +00002569case 155:
vlm151c0b22004-09-22 16:03:36 +00002570#line 1404 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002571{ yyval.a_type = ASN_BASIC_ENUMERATED; ;
2572 break;}
vlmc94e28f2004-09-15 11:59:51 +00002573case 156:
vlm151c0b22004-09-22 16:03:36 +00002574#line 1405 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002575{ yyval.a_type = ASN_BASIC_BIT_STRING; ;
2576 break;}
vlmc94e28f2004-09-15 11:59:51 +00002577case 157:
vlm151c0b22004-09-22 16:03:36 +00002578#line 1409 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002579{
vlm39e5ed72004-09-05 10:40:41 +00002580 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00002581 checkmem(yyval.a_expr);
2582 yyval.a_expr->expr_type = yyvsp[0].a_type;
2583 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002584 ;
2585 break;}
vlmc94e28f2004-09-15 11:59:51 +00002586case 158:
vlm151c0b22004-09-22 16:03:36 +00002587#line 1415 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002588{
vlmfa67ddc2004-06-03 03:38:44 +00002589 if(yyvsp[0].a_expr) {
2590 yyval.a_expr = yyvsp[0].a_expr;
2591 } else {
vlm39e5ed72004-09-05 10:40:41 +00002592 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00002593 checkmem(yyval.a_expr);
2594 }
2595 yyval.a_expr->expr_type = yyvsp[-1].a_type;
2596 yyval.a_expr->meta_type = AMT_TYPE;
vlm6a02a8a2004-09-08 00:28:11 +00002597 ;
2598 break;}
vlmc94e28f2004-09-15 11:59:51 +00002599case 159:
vlm151c0b22004-09-22 16:03:36 +00002600#line 1428 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002601{ yyval.a_type = ASN_STRING_BMPString; ;
2602 break;}
vlmc94e28f2004-09-15 11:59:51 +00002603case 160:
vlm151c0b22004-09-22 16:03:36 +00002604#line 1429 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002605{
vlmfa67ddc2004-06-03 03:38:44 +00002606 yyval.a_type = ASN_STRING_GeneralString;
vlmc94e28f2004-09-15 11:59:51 +00002607 fprintf(stderr, "WARNING: GeneralString is not fully supported\n");
vlm6a02a8a2004-09-08 00:28:11 +00002608 ;
2609 break;}
vlm6a02a8a2004-09-08 00:28:11 +00002610case 161:
vlm151c0b22004-09-22 16:03:36 +00002611#line 1433 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002612{
vlmc94e28f2004-09-15 11:59:51 +00002613 yyval.a_type = ASN_STRING_GraphicString;
2614 fprintf(stderr, "WARNING: GraphicString is not fully supported\n");
vlm6a02a8a2004-09-08 00:28:11 +00002615 ;
2616 break;}
2617case 162:
vlm151c0b22004-09-22 16:03:36 +00002618#line 1437 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002619{ yyval.a_type = ASN_STRING_IA5String; ;
vlm6a02a8a2004-09-08 00:28:11 +00002620 break;}
2621case 163:
vlm151c0b22004-09-22 16:03:36 +00002622#line 1438 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002623{ yyval.a_type = ASN_STRING_ISO646String; ;
vlm6a02a8a2004-09-08 00:28:11 +00002624 break;}
2625case 164:
vlm151c0b22004-09-22 16:03:36 +00002626#line 1439 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002627{ yyval.a_type = ASN_STRING_NumericString; ;
vlm6a02a8a2004-09-08 00:28:11 +00002628 break;}
2629case 165:
vlm151c0b22004-09-22 16:03:36 +00002630#line 1440 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002631{ yyval.a_type = ASN_STRING_PrintableString; ;
vlm6a02a8a2004-09-08 00:28:11 +00002632 break;}
2633case 166:
vlm151c0b22004-09-22 16:03:36 +00002634#line 1441 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002635{
2636 yyval.a_type = ASN_STRING_T61String;
2637 fprintf(stderr, "WARNING: T61String is not fully supported\n");
2638 ;
vlm6a02a8a2004-09-08 00:28:11 +00002639 break;}
2640case 167:
vlm151c0b22004-09-22 16:03:36 +00002641#line 1445 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002642{ yyval.a_type = ASN_STRING_TeletexString; ;
2643 break;}
2644case 168:
vlm151c0b22004-09-22 16:03:36 +00002645#line 1446 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002646{ yyval.a_type = ASN_STRING_UniversalString; ;
2647 break;}
2648case 169:
vlm151c0b22004-09-22 16:03:36 +00002649#line 1447 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002650{ yyval.a_type = ASN_STRING_UTF8String; ;
2651 break;}
2652case 170:
vlm151c0b22004-09-22 16:03:36 +00002653#line 1448 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002654{
2655 yyval.a_type = ASN_STRING_VideotexString;
2656 fprintf(stderr, "WARNING: VideotexString is not fully supported\n");
2657 ;
2658 break;}
2659case 171:
vlm151c0b22004-09-22 16:03:36 +00002660#line 1452 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002661{ yyval.a_type = ASN_STRING_VisibleString; ;
2662 break;}
2663case 172:
vlm151c0b22004-09-22 16:03:36 +00002664#line 1453 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002665{ yyval.a_type = ASN_STRING_ObjectDescriptor; ;
2666 break;}
vlmc94e28f2004-09-15 11:59:51 +00002667case 178:
vlm151c0b22004-09-22 16:03:36 +00002668#line 1465 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002669{ yyval.a_constr = 0; ;
2670 break;}
vlmc94e28f2004-09-15 11:59:51 +00002671case 179:
vlm151c0b22004-09-22 16:03:36 +00002672#line 1466 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002673{
vlm39e5ed72004-09-05 10:40:41 +00002674 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002675 ;
2676 break;}
vlmc94e28f2004-09-15 11:59:51 +00002677case 180:
vlm151c0b22004-09-22 16:03:36 +00002678#line 1472 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002679{
vlm39e5ed72004-09-05 10:40:41 +00002680 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_SET, yyvsp[0].a_constr, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002681 ;
2682 break;}
vlmc94e28f2004-09-15 11:59:51 +00002683case 181:
vlm151c0b22004-09-22 16:03:36 +00002684#line 1475 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002685{
vlmfa67ddc2004-06-03 03:38:44 +00002686 /*
2687 * This is a special case, for compatibility purposes.
vlm9283dbe2004-08-18 04:59:12 +00002688 * It goes without parentheses.
vlmfa67ddc2004-06-03 03:38:44 +00002689 */
vlm5f0128b2004-08-20 13:25:29 +00002690 CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_SIZE, yyvsp[-1].a_constr, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002691 ;
2692 break;}
vlmc94e28f2004-09-15 11:59:51 +00002693case 182:
vlm151c0b22004-09-22 16:03:36 +00002694#line 1485 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002695{
vlmfa67ddc2004-06-03 03:38:44 +00002696 yyval.a_constr = yyvsp[-1].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002697 ;
2698 break;}
vlmc94e28f2004-09-15 11:59:51 +00002699case 183:
vlm151c0b22004-09-22 16:03:36 +00002700#line 1488 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002701{
vlm9283dbe2004-08-18 04:59:12 +00002702 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_SET, yyvsp[-3].a_constr, yyvsp[-1].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002703 ;
2704 break;}
vlmc94e28f2004-09-15 11:59:51 +00002705case 184:
vlm151c0b22004-09-22 16:03:36 +00002706#line 1494 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002707{
vlmfa67ddc2004-06-03 03:38:44 +00002708 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002709 ;
2710 break;}
vlmc94e28f2004-09-15 11:59:51 +00002711case 185:
vlm151c0b22004-09-22 16:03:36 +00002712#line 1497 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002713{
vlmfa67ddc2004-06-03 03:38:44 +00002714 asn1p_constraint_t *ct;
2715 ct = asn1p_constraint_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00002716 ct->type = ACT_EL_EXT;
2717 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-2].a_constr, ct);
vlm6a02a8a2004-09-08 00:28:11 +00002718 ;
2719 break;}
vlmc94e28f2004-09-15 11:59:51 +00002720case 186:
vlm151c0b22004-09-22 16:03:36 +00002721#line 1503 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002722{
vlmfa67ddc2004-06-03 03:38:44 +00002723 asn1p_constraint_t *ct;
2724 ct = asn1p_constraint_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00002725 ct->type = ACT_EL_EXT;
2726 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-4].a_constr, ct);
vlm6f5eb0b2004-08-13 12:35:09 +00002727 ct = yyval.a_constr;
2728 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, ct, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002729 ;
2730 break;}
vlmc94e28f2004-09-15 11:59:51 +00002731case 187:
vlm151c0b22004-09-22 16:03:36 +00002732#line 1514 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002733{
vlm9283dbe2004-08-18 04:59:12 +00002734 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002735 ;
2736 break;}
vlmc94e28f2004-09-15 11:59:51 +00002737case 188:
vlm151c0b22004-09-22 16:03:36 +00002738#line 1517 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002739{
vlmfa67ddc2004-06-03 03:38:44 +00002740 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_UNI, yyvsp[-2].a_constr, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002741 ;
2742 break;}
vlmc94e28f2004-09-15 11:59:51 +00002743case 189:
vlm151c0b22004-09-22 16:03:36 +00002744#line 1520 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002745{
vlmfa67ddc2004-06-03 03:38:44 +00002746 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_INT, yyvsp[-2].a_constr, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002747 ;
2748 break;}
vlmc94e28f2004-09-15 11:59:51 +00002749case 190:
vlm151c0b22004-09-22 16:03:36 +00002750#line 1523 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002751{
vlmfa67ddc2004-06-03 03:38:44 +00002752 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_EXC, yyvsp[-2].a_constr, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002753 ;
2754 break;}
vlmc94e28f2004-09-15 11:59:51 +00002755case 191:
vlm151c0b22004-09-22 16:03:36 +00002756#line 1529 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002757{
vlmfa67ddc2004-06-03 03:38:44 +00002758 int ret;
2759 yyval.a_constr = asn1p_constraint_new(yylineno);
2760 checkmem(yyval.a_constr);
2761 yyval.a_constr->type = yyvsp[-3].a_ctype;
2762 ret = asn1p_constraint_insert(yyval.a_constr, yyvsp[-1].a_constr);
2763 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002764 ;
2765 break;}
vlmc94e28f2004-09-15 11:59:51 +00002766case 192:
vlm151c0b22004-09-22 16:03:36 +00002767#line 1537 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002768{
vlm9283dbe2004-08-18 04:59:12 +00002769 int ret;
2770 yyval.a_constr = asn1p_constraint_new(yylineno);
2771 checkmem(yyval.a_constr);
2772 yyval.a_constr->type = ACT_CA_SET;
2773 ret = asn1p_constraint_insert(yyval.a_constr, yyvsp[-1].a_constr);
2774 checkmem(ret == 0);
vlm6a02a8a2004-09-08 00:28:11 +00002775 ;
2776 break;}
vlmc94e28f2004-09-15 11:59:51 +00002777case 193:
vlm151c0b22004-09-22 16:03:36 +00002778#line 1545 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002779{
vlm9283dbe2004-08-18 04:59:12 +00002780 yyval.a_constr = asn1p_constraint_new(yylineno);
2781 checkmem(yyval.a_constr);
2782 yyval.a_constr->type = ACT_EL_VALUE;
2783 yyval.a_constr->value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002784 ;
2785 break;}
vlm6a02a8a2004-09-08 00:28:11 +00002786case 194:
vlm151c0b22004-09-22 16:03:36 +00002787#line 1551 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002788{
vlmc94e28f2004-09-15 11:59:51 +00002789 yyval.a_constr = asn1p_constraint_new(yylineno);
2790 checkmem(yyval.a_constr);
2791 yyval.a_constr->type = yyvsp[-1].a_ctype;
2792 yyval.a_constr->range_start = yyvsp[-2].a_value;
2793 yyval.a_constr->range_stop = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002794 ;
2795 break;}
2796case 195:
vlm151c0b22004-09-22 16:03:36 +00002797#line 1558 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002798{
2799 yyval.a_constr = asn1p_constraint_new(yylineno);
2800 checkmem(yyval.a_constr);
2801 yyval.a_constr->type = yyvsp[-1].a_ctype;
2802 yyval.a_constr->range_start = asn1p_value_fromint(-123);
2803 yyval.a_constr->range_stop = yyvsp[0].a_value;
2804 yyval.a_constr->range_start->type = ATV_MIN;
2805 ;
vlm6a02a8a2004-09-08 00:28:11 +00002806 break;}
2807case 196:
vlm151c0b22004-09-22 16:03:36 +00002808#line 1566 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002809{
2810 yyval.a_constr = asn1p_constraint_new(yylineno);
2811 checkmem(yyval.a_constr);
2812 yyval.a_constr->type = yyvsp[-1].a_ctype;
2813 yyval.a_constr->range_start = yyvsp[-2].a_value;
2814 yyval.a_constr->range_stop = asn1p_value_fromint(321);
2815 yyval.a_constr->range_stop->type = ATV_MAX;
2816 ;
vlm6a02a8a2004-09-08 00:28:11 +00002817 break;}
2818case 197:
vlm151c0b22004-09-22 16:03:36 +00002819#line 1574 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002820{
2821 yyval.a_constr = asn1p_constraint_new(yylineno);
2822 checkmem(yyval.a_constr);
2823 yyval.a_constr->type = yyvsp[-1].a_ctype;
2824 yyval.a_constr->range_start = asn1p_value_fromint(-123);
2825 yyval.a_constr->range_stop = asn1p_value_fromint(321);
2826 yyval.a_constr->range_start->type = ATV_MIN;
2827 yyval.a_constr->range_stop->type = ATV_MAX;
2828 ;
vlm6a02a8a2004-09-08 00:28:11 +00002829 break;}
2830case 198:
vlmc94e28f2004-09-15 11:59:51 +00002831#line 1583 "asn1p_y.y"
2832{
2833 yyval.a_constr = yyvsp[0].a_constr;
2834 ;
2835 break;}
vlm151c0b22004-09-22 16:03:36 +00002836case 199:
2837#line 1586 "asn1p_y.y"
2838{
2839 yyval.a_constr = yyvsp[0].a_constr;
2840 ;
2841 break;}
vlmc94e28f2004-09-15 11:59:51 +00002842case 200:
vlm151c0b22004-09-22 16:03:36 +00002843#line 1592 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002844{ yyval.a_ctype = ACT_EL_RANGE; ;
2845 break;}
2846case 201:
vlm151c0b22004-09-22 16:03:36 +00002847#line 1593 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002848{ yyval.a_ctype = ACT_EL_RLRANGE; ;
2849 break;}
2850case 202:
vlm151c0b22004-09-22 16:03:36 +00002851#line 1594 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002852{ yyval.a_ctype = ACT_EL_LLRANGE; ;
2853 break;}
2854case 203:
vlm151c0b22004-09-22 16:03:36 +00002855#line 1595 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00002856{ yyval.a_ctype = ACT_EL_ULRANGE; ;
2857 break;}
2858case 204:
vlm151c0b22004-09-22 16:03:36 +00002859#line 1599 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002860{
vlm39e5ed72004-09-05 10:40:41 +00002861 yyval.a_ctype = ACT_CT_SIZE;
vlm6a02a8a2004-09-08 00:28:11 +00002862 ;
2863 break;}
vlmc94e28f2004-09-15 11:59:51 +00002864case 205:
vlm151c0b22004-09-22 16:03:36 +00002865#line 1602 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002866{
vlm39e5ed72004-09-05 10:40:41 +00002867 yyval.a_ctype = ACT_CT_FROM;
vlm6a02a8a2004-09-08 00:28:11 +00002868 ;
2869 break;}
vlmc94e28f2004-09-15 11:59:51 +00002870case 206:
vlm151c0b22004-09-22 16:03:36 +00002871#line 1608 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002872{
vlmfa67ddc2004-06-03 03:38:44 +00002873 yyval.a_value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00002874 ;
2875 break;}
vlmc94e28f2004-09-15 11:59:51 +00002876case 207:
vlm151c0b22004-09-22 16:03:36 +00002877#line 1611 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002878{
vlmfa67ddc2004-06-03 03:38:44 +00002879 asn1p_ref_t *ref;
2880 int ret;
2881 ref = asn1p_ref_new(yylineno);
2882 checkmem(ref);
2883 ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
2884 checkmem(ret == 0);
2885 yyval.a_value = asn1p_value_fromref(ref, 0);
2886 checkmem(yyval.a_value);
2887 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00002888 ;
2889 break;}
vlmc94e28f2004-09-15 11:59:51 +00002890case 208:
vlm151c0b22004-09-22 16:03:36 +00002891#line 1622 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002892{
vlmfa67ddc2004-06-03 03:38:44 +00002893 yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
2894 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00002895 ;
2896 break;}
vlmc94e28f2004-09-15 11:59:51 +00002897case 209:
vlm151c0b22004-09-22 16:03:36 +00002898#line 1626 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002899{
vlmfa67ddc2004-06-03 03:38:44 +00002900 yyval.a_value = asn1p_value_fromint(0);
2901 checkmem(yyval.a_value);
2902 yyval.a_value->type = ATV_FALSE;
vlm6a02a8a2004-09-08 00:28:11 +00002903 ;
2904 break;}
vlmc94e28f2004-09-15 11:59:51 +00002905case 210:
vlm151c0b22004-09-22 16:03:36 +00002906#line 1631 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002907{
vlmfa67ddc2004-06-03 03:38:44 +00002908 yyval.a_value = asn1p_value_fromint(1);
2909 checkmem(yyval.a_value);
2910 yyval.a_value->type = ATV_TRUE;
vlm6a02a8a2004-09-08 00:28:11 +00002911 ;
2912 break;}
vlmc94e28f2004-09-15 11:59:51 +00002913case 211:
vlm151c0b22004-09-22 16:03:36 +00002914#line 1639 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002915{
vlmfa67ddc2004-06-03 03:38:44 +00002916 CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_WCOMPS, yyvsp[-1].a_constr, 0);
vlm6a02a8a2004-09-08 00:28:11 +00002917 ;
2918 break;}
vlmc94e28f2004-09-15 11:59:51 +00002919case 212:
vlm151c0b22004-09-22 16:03:36 +00002920#line 1645 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002921{
vlmfa67ddc2004-06-03 03:38:44 +00002922 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002923 ;
2924 break;}
vlmc94e28f2004-09-15 11:59:51 +00002925case 213:
vlm151c0b22004-09-22 16:03:36 +00002926#line 1648 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002927{
vlmfa67ddc2004-06-03 03:38:44 +00002928 CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_WCOMPS, yyvsp[-2].a_constr, yyvsp[0].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00002929 ;
2930 break;}
vlmc94e28f2004-09-15 11:59:51 +00002931case 214:
vlm151c0b22004-09-22 16:03:36 +00002932#line 1654 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002933{
vlmfa67ddc2004-06-03 03:38:44 +00002934 yyval.a_constr = asn1p_constraint_new(yylineno);
2935 checkmem(yyval.a_constr);
2936 yyval.a_constr->type = ACT_EL_EXT;
vlm6a02a8a2004-09-08 00:28:11 +00002937 ;
2938 break;}
vlmc94e28f2004-09-15 11:59:51 +00002939case 215:
vlm151c0b22004-09-22 16:03:36 +00002940#line 1659 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002941{
vlmfa67ddc2004-06-03 03:38:44 +00002942 yyval.a_constr = asn1p_constraint_new(yylineno);
2943 checkmem(yyval.a_constr);
2944 yyval.a_constr->type = ACT_EL_VALUE;
2945 yyval.a_constr->value = asn1p_value_frombuf(yyvsp[-2].tv_str, strlen(yyvsp[-2].tv_str), 0);
2946 yyval.a_constr->presence = yyvsp[0].a_pres;
vlm6a02a8a2004-09-08 00:28:11 +00002947 ;
2948 break;}
vlmc94e28f2004-09-15 11:59:51 +00002949case 216:
vlm151c0b22004-09-22 16:03:36 +00002950#line 1672 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002951{ yyval.a_pres = ACPRES_DEFAULT; ;
2952 break;}
vlmc94e28f2004-09-15 11:59:51 +00002953case 217:
vlm151c0b22004-09-22 16:03:36 +00002954#line 1673 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002955{ yyval.a_pres = yyvsp[0].a_pres; ;
2956 break;}
vlmc94e28f2004-09-15 11:59:51 +00002957case 218:
vlm151c0b22004-09-22 16:03:36 +00002958#line 1677 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002959{
vlmfa67ddc2004-06-03 03:38:44 +00002960 yyval.a_pres = ACPRES_PRESENT;
vlm6a02a8a2004-09-08 00:28:11 +00002961 ;
2962 break;}
vlmc94e28f2004-09-15 11:59:51 +00002963case 219:
vlm151c0b22004-09-22 16:03:36 +00002964#line 1680 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002965{
vlmfa67ddc2004-06-03 03:38:44 +00002966 yyval.a_pres = ACPRES_ABSENT;
vlm6a02a8a2004-09-08 00:28:11 +00002967 ;
2968 break;}
vlmc94e28f2004-09-15 11:59:51 +00002969case 220:
vlm151c0b22004-09-22 16:03:36 +00002970#line 1683 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002971{
vlmfa67ddc2004-06-03 03:38:44 +00002972 yyval.a_pres = ACPRES_OPTIONAL;
vlm6a02a8a2004-09-08 00:28:11 +00002973 ;
2974 break;}
vlmc94e28f2004-09-15 11:59:51 +00002975case 221:
vlmc94e28f2004-09-15 11:59:51 +00002976#line 1689 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002977{
vlm5f0128b2004-08-20 13:25:29 +00002978 yyval.a_constr = yyvsp[0].a_constr;
vlm6a02a8a2004-09-08 00:28:11 +00002979 ;
2980 break;}
vlm151c0b22004-09-22 16:03:36 +00002981case 222:
2982#line 1692 "asn1p_y.y"
2983{
2984 yyval.a_constr = yyvsp[0].a_constr;
2985 ;
2986 break;}
vlmc94e28f2004-09-15 11:59:51 +00002987case 223:
vlm151c0b22004-09-22 16:03:36 +00002988#line 1701 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00002989{
vlmfa67ddc2004-06-03 03:38:44 +00002990 asn1p_ref_t *ref = asn1p_ref_new(yylineno);
2991 asn1p_constraint_t *ct;
2992 int ret;
2993 ret = asn1p_ref_add_component(ref, yyvsp[-1].tv_str, 0);
2994 checkmem(ret == 0);
2995 ct = asn1p_constraint_new(yylineno);
2996 checkmem(yyval.a_constr);
2997 ct->type = ACT_EL_VALUE;
2998 ct->value = asn1p_value_fromref(ref, 0);
2999 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CRC, ct, 0);
vlm6a02a8a2004-09-08 00:28:11 +00003000 ;
3001 break;}
vlmc94e28f2004-09-15 11:59:51 +00003002case 224:
vlm151c0b22004-09-22 16:03:36 +00003003#line 1716 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003004{
vlmfa67ddc2004-06-03 03:38:44 +00003005 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CRC, yyvsp[-3].a_constr, yyvsp[-1].a_constr);
vlm6a02a8a2004-09-08 00:28:11 +00003006 ;
3007 break;}
vlmc94e28f2004-09-15 11:59:51 +00003008case 225:
vlm151c0b22004-09-22 16:03:36 +00003009#line 1722 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003010{
vlmfa67ddc2004-06-03 03:38:44 +00003011 yyval.a_constr = asn1p_constraint_new(yylineno);
3012 checkmem(yyval.a_constr);
3013 yyval.a_constr->type = ACT_EL_VALUE;
3014 yyval.a_constr->value = asn1p_value_fromref(yyvsp[0].a_ref, 0);
vlm6a02a8a2004-09-08 00:28:11 +00003015 ;
3016 break;}
vlmc94e28f2004-09-15 11:59:51 +00003017case 226:
vlm151c0b22004-09-22 16:03:36 +00003018#line 1728 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003019{
vlmfa67ddc2004-06-03 03:38:44 +00003020 asn1p_constraint_t *ct;
3021 ct = asn1p_constraint_new(yylineno);
3022 checkmem(ct);
3023 ct->type = ACT_EL_VALUE;
3024 ct->value = asn1p_value_fromref(yyvsp[0].a_ref, 0);
3025 CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-2].a_constr, ct);
vlm6a02a8a2004-09-08 00:28:11 +00003026 ;
3027 break;}
vlmc94e28f2004-09-15 11:59:51 +00003028case 227:
vlm151c0b22004-09-22 16:03:36 +00003029#line 1742 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003030{
vlmfa67ddc2004-06-03 03:38:44 +00003031 char *p = malloc(strlen(yyvsp[0].tv_str) + 2);
3032 int ret;
3033 *p = '@';
3034 strcpy(p + 1, yyvsp[0].tv_str);
3035 yyval.a_ref = asn1p_ref_new(yylineno);
3036 ret = asn1p_ref_add_component(yyval.a_ref, p, 0);
3037 checkmem(ret == 0);
3038 free(p);
3039 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00003040 ;
3041 break;}
vlmc94e28f2004-09-15 11:59:51 +00003042case 228:
vlm151c0b22004-09-22 16:03:36 +00003043#line 1753 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003044{
vlmfa67ddc2004-06-03 03:38:44 +00003045 char *p = malloc(strlen(yyvsp[0].tv_str) + 3);
3046 int ret;
3047 p[0] = '@';
3048 p[1] = '.';
3049 strcpy(p + 2, yyvsp[0].tv_str);
3050 yyval.a_ref = asn1p_ref_new(yylineno);
3051 ret = asn1p_ref_add_component(yyval.a_ref, p, 0);
3052 checkmem(ret == 0);
3053 free(p);
3054 free(yyvsp[0].tv_str);
vlm6a02a8a2004-09-08 00:28:11 +00003055 ;
3056 break;}
vlmc94e28f2004-09-15 11:59:51 +00003057case 229:
vlm151c0b22004-09-22 16:03:36 +00003058#line 1769 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003059{
vlmfa67ddc2004-06-03 03:38:44 +00003060 yyval.tv_str = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003061 ;
3062 break;}
vlmc94e28f2004-09-15 11:59:51 +00003063case 230:
vlm151c0b22004-09-22 16:03:36 +00003064#line 1772 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003065{
vlmfa67ddc2004-06-03 03:38:44 +00003066 int l1 = strlen(yyvsp[-2].tv_str);
3067 int l3 = strlen(yyvsp[0].tv_str);
3068 yyval.tv_str = malloc(l1 + 1 + l3 + 1);
3069 memcpy(yyval.tv_str, yyvsp[-2].tv_str, l1);
3070 yyval.tv_str[l1] = '.';
3071 memcpy(yyval.tv_str + l1 + 1, yyvsp[0].tv_str, l3);
3072 yyval.tv_str[l1 + 1 + l3] = '\0';
vlm6a02a8a2004-09-08 00:28:11 +00003073 ;
3074 break;}
vlma2374a02004-09-14 02:44:07 +00003075case 231:
vlm151c0b22004-09-22 16:03:36 +00003076#line 1790 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003077{
vlmc94e28f2004-09-15 11:59:51 +00003078 yyval.a_marker.flags = EM_NOMARK;
3079 yyval.a_marker.default_value = 0;
vlm6a02a8a2004-09-08 00:28:11 +00003080 ;
3081 break;}
vlma2374a02004-09-14 02:44:07 +00003082case 232:
vlm151c0b22004-09-22 16:03:36 +00003083#line 1794 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00003084{ yyval.a_marker = yyvsp[0].a_marker; ;
vlma2374a02004-09-14 02:44:07 +00003085 break;}
3086case 233:
vlm151c0b22004-09-22 16:03:36 +00003087#line 1798 "asn1p_y.y"
vlma2374a02004-09-14 02:44:07 +00003088{
vlmc94e28f2004-09-15 11:59:51 +00003089 yyval.a_marker.flags = EM_OPTIONAL;
3090 yyval.a_marker.default_value = 0;
vlma2374a02004-09-14 02:44:07 +00003091 ;
3092 break;}
vlm6a02a8a2004-09-08 00:28:11 +00003093case 234:
vlm151c0b22004-09-22 16:03:36 +00003094#line 1802 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00003095{
3096 yyval.a_marker.flags = EM_DEFAULT;
3097 yyval.a_marker.default_value = yyvsp[0].a_value;
3098 ;
3099 break;}
3100case 235:
vlm151c0b22004-09-22 16:03:36 +00003101#line 1825 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003102{
vlm39e5ed72004-09-05 10:40:41 +00003103 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003104 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00003105 ;
3106 break;}
vlmc94e28f2004-09-15 11:59:51 +00003107case 236:
vlm151c0b22004-09-22 16:03:36 +00003108#line 1829 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003109{
vlmfa67ddc2004-06-03 03:38:44 +00003110 yyval.a_expr = yyvsp[-1].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00003111 ;
3112 break;}
vlmc94e28f2004-09-15 11:59:51 +00003113case 237:
vlm151c0b22004-09-22 16:03:36 +00003114#line 1835 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003115{
vlm39e5ed72004-09-05 10:40:41 +00003116 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003117 checkmem(yyval.a_expr);
vlm6a02a8a2004-09-08 00:28:11 +00003118 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
3119 ;
3120 break;}
vlmc94e28f2004-09-15 11:59:51 +00003121case 238:
vlm151c0b22004-09-22 16:03:36 +00003122#line 1840 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003123{
vlmfa67ddc2004-06-03 03:38:44 +00003124 yyval.a_expr = yyvsp[-2].a_expr;
vlm6a02a8a2004-09-08 00:28:11 +00003125 asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
3126 ;
3127 break;}
vlmc94e28f2004-09-15 11:59:51 +00003128case 239:
vlm151c0b22004-09-22 16:03:36 +00003129#line 1847 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003130{
vlm39e5ed72004-09-05 10:40:41 +00003131 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003132 checkmem(yyval.a_expr);
3133 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3134 yyval.a_expr->meta_type = AMT_VALUE;
3135 yyval.a_expr->Identifier = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003136 ;
3137 break;}
vlm6a02a8a2004-09-08 00:28:11 +00003138case 240:
vlm151c0b22004-09-22 16:03:36 +00003139#line 1854 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003140{
vlm39e5ed72004-09-05 10:40:41 +00003141 yyval.a_expr = asn1p_expr_new(yylineno);
vlm5f0128b2004-08-20 13:25:29 +00003142 checkmem(yyval.a_expr);
3143 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3144 yyval.a_expr->meta_type = AMT_VALUE;
3145 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
3146 yyval.a_expr->value = yyvsp[-1].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00003147 ;
3148 break;}
3149case 241:
vlm151c0b22004-09-22 16:03:36 +00003150#line 1862 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00003151{
3152 yyval.a_expr = asn1p_expr_new(yylineno);
3153 checkmem(yyval.a_expr);
3154 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3155 yyval.a_expr->meta_type = AMT_VALUE;
3156 yyval.a_expr->Identifier = yyvsp[-3].tv_str;
3157 yyval.a_expr->value = yyvsp[-1].a_value;
3158 ;
3159 break;}
3160case 242:
vlm151c0b22004-09-22 16:03:36 +00003161#line 1870 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003162{
vlm39e5ed72004-09-05 10:40:41 +00003163 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003164 checkmem(yyval.a_expr);
3165 yyval.a_expr->expr_type = A1TC_UNIVERVAL;
3166 yyval.a_expr->meta_type = AMT_VALUE;
3167 yyval.a_expr->value = yyvsp[0].a_value;
vlm6a02a8a2004-09-08 00:28:11 +00003168 ;
3169 break;}
vlmc94e28f2004-09-15 11:59:51 +00003170case 243:
vlm151c0b22004-09-22 16:03:36 +00003171#line 1877 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003172{
vlm39e5ed72004-09-05 10:40:41 +00003173 yyval.a_expr = asn1p_expr_new(yylineno);
vlmfa67ddc2004-06-03 03:38:44 +00003174 checkmem(yyval.a_expr);
3175 yyval.a_expr->Identifier = strdup("...");
3176 checkmem(yyval.a_expr->Identifier);
3177 yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
3178 yyval.a_expr->meta_type = AMT_VALUE;
vlm6a02a8a2004-09-08 00:28:11 +00003179 ;
3180 break;}
vlm6a02a8a2004-09-08 00:28:11 +00003181case 244:
vlm151c0b22004-09-22 16:03:36 +00003182#line 1888 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003183{
vlmec8f6812004-08-22 03:19:54 +00003184 yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int);
3185 checkmem(yyval.a_value);
vlm6a02a8a2004-09-08 00:28:11 +00003186 ;
3187 break;}
3188case 245:
vlm151c0b22004-09-22 16:03:36 +00003189#line 1892 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00003190{
3191 yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int);
3192 checkmem(yyval.a_value);
3193 ;
vlm6a02a8a2004-09-08 00:28:11 +00003194 break;}
3195case 246:
vlm151c0b22004-09-22 16:03:36 +00003196#line 1923 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00003197{ memset(&yyval.a_tag, 0, sizeof(yyval.a_tag)); ;
vlm6a02a8a2004-09-08 00:28:11 +00003198 break;}
3199case 247:
vlm151c0b22004-09-22 16:03:36 +00003200#line 1924 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00003201{ yyval.a_tag = yyvsp[0].a_tag; ;
3202 break;}
3203case 248:
vlm151c0b22004-09-22 16:03:36 +00003204#line 1928 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003205{
vlmfa67ddc2004-06-03 03:38:44 +00003206 yyval.a_tag = yyvsp[0].a_tag;
3207 yyval.a_tag.tag_mode = TM_DEFAULT;
vlm6a02a8a2004-09-08 00:28:11 +00003208 ;
3209 break;}
vlmc94e28f2004-09-15 11:59:51 +00003210case 249:
vlm151c0b22004-09-22 16:03:36 +00003211#line 1932 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003212{
vlmfa67ddc2004-06-03 03:38:44 +00003213 yyval.a_tag = yyvsp[-1].a_tag;
3214 yyval.a_tag.tag_mode = TM_IMPLICIT;
vlm6a02a8a2004-09-08 00:28:11 +00003215 ;
3216 break;}
vlmc94e28f2004-09-15 11:59:51 +00003217case 250:
vlm151c0b22004-09-22 16:03:36 +00003218#line 1936 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003219{
vlmfa67ddc2004-06-03 03:38:44 +00003220 yyval.a_tag = yyvsp[-1].a_tag;
3221 yyval.a_tag.tag_mode = TM_EXPLICIT;
vlm6a02a8a2004-09-08 00:28:11 +00003222 ;
3223 break;}
vlm6a02a8a2004-09-08 00:28:11 +00003224case 251:
vlm151c0b22004-09-22 16:03:36 +00003225#line 1943 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003226{
vlm39e5ed72004-09-05 10:40:41 +00003227 checkmem(yyvsp[0].tv_str);
3228 yyval.tv_str = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003229 ;
3230 break;}
3231case 252:
vlm151c0b22004-09-22 16:03:36 +00003232#line 1947 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003233{
vlm39e5ed72004-09-05 10:40:41 +00003234 checkmem(yyvsp[0].tv_str);
3235 yyval.tv_str = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003236 ;
3237 break;}
3238case 253:
vlm151c0b22004-09-22 16:03:36 +00003239#line 1955 "asn1p_y.y"
vlmc94e28f2004-09-15 11:59:51 +00003240{
3241 checkmem(yyvsp[0].tv_str);
3242 yyval.tv_str = yyvsp[0].tv_str;
3243 ;
3244 break;}
3245case 254:
vlm151c0b22004-09-22 16:03:36 +00003246#line 1962 "asn1p_y.y"
3247{ yyval.tv_str = 0; ;
3248 break;}
3249case 255:
3250#line 1963 "asn1p_y.y"
3251{
3252 yyval.tv_str = yyvsp[0].tv_str;
3253 ;
3254 break;}
3255case 256:
3256#line 1968 "asn1p_y.y"
vlm6a02a8a2004-09-08 00:28:11 +00003257{
vlm39e5ed72004-09-05 10:40:41 +00003258 checkmem(yyvsp[0].tv_str);
3259 yyval.tv_str = yyvsp[0].tv_str;
vlm6a02a8a2004-09-08 00:28:11 +00003260 ;
3261 break;}
vlm6a02a8a2004-09-08 00:28:11 +00003262}
3263 /* the action file gets copied in in place of this dollarsign */
3264#line 543 "/usr/share/bison.simple"
vlmfa67ddc2004-06-03 03:38:44 +00003265
3266 yyvsp -= yylen;
3267 yyssp -= yylen;
vlm6a02a8a2004-09-08 00:28:11 +00003268#ifdef YYLSP_NEEDED
3269 yylsp -= yylen;
3270#endif
vlmfa67ddc2004-06-03 03:38:44 +00003271
vlm6a02a8a2004-09-08 00:28:11 +00003272#if YYDEBUG != 0
vlmfa67ddc2004-06-03 03:38:44 +00003273 if (yydebug)
3274 {
vlm6a02a8a2004-09-08 00:28:11 +00003275 short *ssp1 = yyss - 1;
3276 fprintf (stderr, "state stack now");
3277 while (ssp1 != yyssp)
3278 fprintf (stderr, " %d", *++ssp1);
3279 fprintf (stderr, "\n");
vlmfa67ddc2004-06-03 03:38:44 +00003280 }
3281#endif
3282
3283 *++yyvsp = yyval;
3284
vlm6a02a8a2004-09-08 00:28:11 +00003285#ifdef YYLSP_NEEDED
3286 yylsp++;
3287 if (yylen == 0)
3288 {
3289 yylsp->first_line = yylloc.first_line;
3290 yylsp->first_column = yylloc.first_column;
3291 yylsp->last_line = (yylsp-1)->last_line;
3292 yylsp->last_column = (yylsp-1)->last_column;
3293 yylsp->text = 0;
3294 }
3295 else
3296 {
3297 yylsp->last_line = (yylsp+yylen-1)->last_line;
3298 yylsp->last_column = (yylsp+yylen-1)->last_column;
3299 }
3300#endif
vlmfa67ddc2004-06-03 03:38:44 +00003301
vlm6a02a8a2004-09-08 00:28:11 +00003302 /* Now "shift" the result of the reduction.
3303 Determine what state that goes to,
3304 based on the state we popped back to
3305 and the rule number reduced by. */
vlmfa67ddc2004-06-03 03:38:44 +00003306
3307 yyn = yyr1[yyn];
3308
vlm6a02a8a2004-09-08 00:28:11 +00003309 yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
3310 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
vlmfa67ddc2004-06-03 03:38:44 +00003311 yystate = yytable[yystate];
3312 else
vlm6a02a8a2004-09-08 00:28:11 +00003313 yystate = yydefgoto[yyn - YYNTBASE];
vlmfa67ddc2004-06-03 03:38:44 +00003314
3315 goto yynewstate;
3316
vlm6a02a8a2004-09-08 00:28:11 +00003317yyerrlab: /* here on detecting error */
vlmfa67ddc2004-06-03 03:38:44 +00003318
vlm6a02a8a2004-09-08 00:28:11 +00003319 if (! yyerrstatus)
3320 /* If not already recovering from an error, report this error. */
vlmfa67ddc2004-06-03 03:38:44 +00003321 {
3322 ++yynerrs;
vlm6a02a8a2004-09-08 00:28:11 +00003323
3324#ifdef YYERROR_VERBOSE
vlmfa67ddc2004-06-03 03:38:44 +00003325 yyn = yypact[yystate];
3326
vlm6a02a8a2004-09-08 00:28:11 +00003327 if (yyn > YYFLAG && yyn < YYLAST)
vlmfa67ddc2004-06-03 03:38:44 +00003328 {
vlm6a02a8a2004-09-08 00:28:11 +00003329 int size = 0;
3330 char *msg;
3331 int x, count;
vlmfa67ddc2004-06-03 03:38:44 +00003332
vlm6a02a8a2004-09-08 00:28:11 +00003333 count = 0;
3334 /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
3335 for (x = (yyn < 0 ? -yyn : 0);
3336 x < (ssize_t)(sizeof(yytname) / sizeof(char *)); x++)
3337 if (yycheck[x + yyn] == x)
3338 size += strlen(yytname[x]) + 15, count++;
3339 msg = (char *) malloc(size + 15);
3340 if (msg != 0)
vlmfa67ddc2004-06-03 03:38:44 +00003341 {
vlm6a02a8a2004-09-08 00:28:11 +00003342 strcpy(msg, "parse error");
vlmfa67ddc2004-06-03 03:38:44 +00003343
vlm6a02a8a2004-09-08 00:28:11 +00003344 if (count < 5)
vlmfa67ddc2004-06-03 03:38:44 +00003345 {
vlm6a02a8a2004-09-08 00:28:11 +00003346 count = 0;
3347 for (x = (yyn < 0 ? -yyn : 0);
3348 x < (ssize_t)(sizeof(yytname) / sizeof(char *)); x++)
3349 if (yycheck[x + yyn] == x)
vlmfa67ddc2004-06-03 03:38:44 +00003350 {
vlm6a02a8a2004-09-08 00:28:11 +00003351 strcat(msg, count == 0 ? ", expecting `" : " or `");
3352 strcat(msg, yytname[x]);
3353 strcat(msg, "'");
3354 count++;
vlmfa67ddc2004-06-03 03:38:44 +00003355 }
3356 }
vlm6a02a8a2004-09-08 00:28:11 +00003357 yyerror(msg);
3358 free(msg);
vlmfa67ddc2004-06-03 03:38:44 +00003359 }
3360 else
vlm6a02a8a2004-09-08 00:28:11 +00003361 yyerror ("parse error; also virtual memory exceeded");
vlmfa67ddc2004-06-03 03:38:44 +00003362 }
3363 else
3364#endif /* YYERROR_VERBOSE */
vlm6a02a8a2004-09-08 00:28:11 +00003365 yyerror("parse error");
vlmfa67ddc2004-06-03 03:38:44 +00003366 }
vlm6a02a8a2004-09-08 00:28:11 +00003367
vlmfa67ddc2004-06-03 03:38:44 +00003368 goto yyerrlab1;
vlm6a02a8a2004-09-08 00:28:11 +00003369yyerrlab1: /* here on error raised explicitly by an action */
vlmfa67ddc2004-06-03 03:38:44 +00003370
3371 if (yyerrstatus == 3)
3372 {
vlm6a02a8a2004-09-08 00:28:11 +00003373 /* if just tried and failed to reuse lookahead token after an error, discard it. */
vlmfa67ddc2004-06-03 03:38:44 +00003374
vlm6a02a8a2004-09-08 00:28:11 +00003375 /* return failure if at end of input */
vlmfa67ddc2004-06-03 03:38:44 +00003376 if (yychar == YYEOF)
vlm6a02a8a2004-09-08 00:28:11 +00003377 YYABORT;
vlmfa67ddc2004-06-03 03:38:44 +00003378
vlm6a02a8a2004-09-08 00:28:11 +00003379#if YYDEBUG != 0
3380 if (yydebug)
3381 fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
3382#endif
3383
vlmfa67ddc2004-06-03 03:38:44 +00003384 yychar = YYEMPTY;
3385 }
3386
vlm6a02a8a2004-09-08 00:28:11 +00003387 /* Else will try to reuse lookahead token
3388 after shifting the error token. */
vlmfa67ddc2004-06-03 03:38:44 +00003389
vlm6a02a8a2004-09-08 00:28:11 +00003390 yyerrstatus = 3; /* Each real token shifted decrements this */
vlmfa67ddc2004-06-03 03:38:44 +00003391
vlm6a02a8a2004-09-08 00:28:11 +00003392 goto yyerrhandle;
vlm80103492004-09-07 10:39:09 +00003393
vlm6a02a8a2004-09-08 00:28:11 +00003394yyerrdefault: /* current state does not do anything special for the error token. */
vlm80103492004-09-07 10:39:09 +00003395
vlm6a02a8a2004-09-08 00:28:11 +00003396#if 0
3397 /* This is wrong; only states that explicitly want error tokens
3398 should shift them. */
3399 yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
3400 if (yyn) goto yydefault;
vlm39e5ed72004-09-05 10:40:41 +00003401#endif
vlm6a02a8a2004-09-08 00:28:11 +00003402
3403yyerrpop: /* pop the current state because it cannot handle the error token */
3404
3405 if (yyssp == yyss) YYABORT;
3406 yyvsp--;
3407 yystate = *--yyssp;
3408#ifdef YYLSP_NEEDED
3409 yylsp--;
3410#endif
3411
3412#if YYDEBUG != 0
3413 if (yydebug)
3414 {
3415 short *ssp1 = yyss - 1;
3416 fprintf (stderr, "Error: state stack now");
3417 while (ssp1 != yyssp)
3418 fprintf (stderr, " %d", *++ssp1);
3419 fprintf (stderr, "\n");
vlm39e5ed72004-09-05 10:40:41 +00003420 }
vlm6a02a8a2004-09-08 00:28:11 +00003421#endif
3422
3423yyerrhandle:
3424
3425 yyn = yypact[yystate];
3426 if (yyn == YYFLAG)
3427 goto yyerrdefault;
3428
3429 yyn += YYTERROR;
3430 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
3431 goto yyerrdefault;
3432
3433 yyn = yytable[yyn];
3434 if (yyn < 0)
3435 {
3436 if (yyn == YYFLAG)
3437 goto yyerrpop;
3438 yyn = -yyn;
3439 goto yyreduce;
3440 }
3441 else if (yyn == 0)
3442 goto yyerrpop;
vlmfa67ddc2004-06-03 03:38:44 +00003443
3444 if (yyn == YYFINAL)
3445 YYACCEPT;
3446
vlm6a02a8a2004-09-08 00:28:11 +00003447#if YYDEBUG != 0
3448 if (yydebug)
3449 fprintf(stderr, "Shifting error token, ");
3450#endif
vlmfa67ddc2004-06-03 03:38:44 +00003451
3452 *++yyvsp = yylval;
vlm6a02a8a2004-09-08 00:28:11 +00003453#ifdef YYLSP_NEEDED
3454 *++yylsp = yylloc;
3455#endif
vlmfa67ddc2004-06-03 03:38:44 +00003456
3457 yystate = yyn;
3458 goto yynewstate;
3459
vlm6a02a8a2004-09-08 00:28:11 +00003460 yyacceptlab:
3461 /* YYACCEPT comes here. */
3462 if (yyfree_stacks)
3463 {
3464 free (yyss);
3465 free (yyvs);
3466#ifdef YYLSP_NEEDED
3467 free (yyls);
vlm044f7442004-09-04 04:49:21 +00003468#endif
vlm6a02a8a2004-09-08 00:28:11 +00003469 }
3470 return 0;
vlm80103492004-09-07 10:39:09 +00003471
vlm6a02a8a2004-09-08 00:28:11 +00003472 yyabortlab:
3473 /* YYABORT comes here. */
3474 if (yyfree_stacks)
3475 {
3476 free (yyss);
3477 free (yyvs);
3478#ifdef YYLSP_NEEDED
3479 free (yyls);
vlm80103492004-09-07 10:39:09 +00003480#endif
vlm6a02a8a2004-09-08 00:28:11 +00003481 }
3482 return 1;
vlmfa67ddc2004-06-03 03:38:44 +00003483}
vlm151c0b22004-09-22 16:03:36 +00003484#line 1974 "asn1p_y.y"
vlmfa67ddc2004-06-03 03:38:44 +00003485
3486
3487
3488/*
3489 * Convert Xstring ('0101'B or '5'H) to the binary vector.
3490 */
3491static asn1p_value_t *
3492_convert_bitstring2binary(char *str, int base) {
3493 asn1p_value_t *val;
3494 int slen;
3495 int memlen;
3496 int baselen;
3497 int bits;
3498 uint8_t *binary_vector;
3499 uint8_t *bv_ptr;
3500 uint8_t cur_val;
3501
3502 assert(str);
3503 assert(str[0] == '\'');
3504
3505 switch(base) {
3506 case 'B':
3507 baselen = 1;
3508 break;
3509 case 'H':
3510 baselen = 4;
3511 break;
3512 default:
3513 assert(base == 'B' || base == 'H');
3514 errno = EINVAL;
3515 return NULL;
3516 }
3517
3518 slen = strlen(str);
3519 assert(str[slen - 1] == base);
3520 assert(str[slen - 2] == '\'');
3521
3522 memlen = slen / (8 / baselen); /* Conservative estimate */
3523
3524 bv_ptr = binary_vector = malloc(memlen + 1);
3525 if(bv_ptr == NULL)
3526 /* ENOMEM */
3527 return NULL;
3528
3529 cur_val = 0;
3530 bits = 0;
3531 while(*(++str) != '\'') {
3532 switch(baselen) {
3533 case 1:
3534 switch(*str) {
3535 case '1':
3536 cur_val |= 1 << (7 - (bits % 8));
3537 case '0':
3538 break;
3539 default:
3540 assert(!"_y UNREACH1");
3541 case ' ': case '\r': case '\n':
3542 continue;
3543 }
3544 break;
3545 case 4:
3546 switch(*str) {
3547 case '0': case '1': case '2': case '3': case '4':
3548 case '5': case '6': case '7': case '8': case '9':
3549 cur_val |= (*str - '0') << (4 - (bits % 8));
3550 break;
3551 case 'A': case 'B': case 'C':
3552 case 'D': case 'E': case 'F':
3553 cur_val |= ((*str - 'A') + 10)
3554 << (4 - (bits % 8));
3555 break;
3556 default:
3557 assert(!"_y UNREACH2");
3558 case ' ': case '\r': case '\n':
3559 continue;
3560 }
3561 break;
3562 }
3563
3564 bits += baselen;
3565 if((bits % 8) == 0) {
3566 *bv_ptr++ = cur_val;
3567 cur_val = 0;
3568 }
3569 }
3570
3571 *bv_ptr = cur_val;
3572 assert((bv_ptr - binary_vector) <= memlen);
3573
3574 val = asn1p_value_frombits(binary_vector, bits, 0);
3575 if(val == NULL) {
3576 free(binary_vector);
3577 }
3578
3579 return val;
3580}
3581
3582extern char *asn1p_text;
3583
3584int
3585yyerror(const char *msg) {
3586 fprintf(stderr,
3587 "ASN.1 grammar parse error "
3588 "near line %d (token \"%s\"): %s\n",
vlm39e5ed72004-09-05 10:40:41 +00003589 yylineno, asn1p_text, msg);
vlmfa67ddc2004-06-03 03:38:44 +00003590 return -1;
3591}
3592
3593