]> git.saurik.com Git - apple/security.git/blob - SecuritySNACCRuntime/compiler/core/parse-asn1.c
Security-54.tar.gz
[apple/security.git] / SecuritySNACCRuntime / compiler / core / parse-asn1.c
1
2 /* A Bison parser, made from core/parse-asn1.y
3 by GNU Bison version 1.25
4 */
5
6 #define YYBISON 1 /* Identify Bison output. */
7
8 #define BSTRING_SYM 258
9 #define HSTRING_SYM 259
10 #define CSTRING_SYM 260
11 #define UCASEFIRST_IDENT_SYM 261
12 #define LCASEFIRST_IDENT_SYM 262
13 #define NAMEDMACRO_SYM 263
14 #define MACRODEFBODY_SYM 264
15 #define BRACEBAL_SYM 265
16 #define NUMBER_ERANGE 266
17 #define NUMBER_SYM 267
18 #define SNACC_ATTRIBUTES 268
19 #define DOT_SYM 269
20 #define COMMA_SYM 270
21 #define LEFTBRACE_SYM 271
22 #define RIGHTBRACE_SYM 272
23 #define LEFTPAREN_SYM 273
24 #define RIGHTPAREN_SYM 274
25 #define LEFTBRACKET_SYM 275
26 #define RIGHTBRACKET_SYM 276
27 #define LESSTHAN_SYM 277
28 #define MINUS_SYM 278
29 #define GETS_SYM 279
30 #define BAR_SYM 280
31 #define TAGS_SYM 281
32 #define BOOLEAN_SYM 282
33 #define INTEGER_SYM 283
34 #define BIT_SYM 284
35 #define STRING_SYM 285
36 #define OCTET_SYM 286
37 #define NULL_SYM 287
38 #define SEQUENCE_SYM 288
39 #define OF_SYM 289
40 #define SET_SYM 290
41 #define IMPLICIT_SYM 291
42 #define CHOICE_SYM 292
43 #define ANY_SYM 293
44 #define OBJECT_IDENTIFIER_SYM 294
45 #define OPTIONAL_SYM 295
46 #define DEFAULT_SYM 296
47 #define COMPONENTS_SYM 297
48 #define UNIVERSAL_SYM 298
49 #define APPLICATION_SYM 299
50 #define PRIVATE_SYM 300
51 #define TRUE_SYM 301
52 #define FALSE_SYM 302
53 #define BEGIN_SYM 303
54 #define END_SYM 304
55 #define DEFINITIONS_SYM 305
56 #define EXPLICIT_SYM 306
57 #define ENUMERATED_SYM 307
58 #define EXPORTS_SYM 308
59 #define IMPORTS_SYM 309
60 #define REAL_SYM 310
61 #define INCLUDES_SYM 311
62 #define MIN_SYM 312
63 #define MAX_SYM 313
64 #define SIZE_SYM 314
65 #define FROM_SYM 315
66 #define WITH_SYM 316
67 #define COMPONENT_SYM 317
68 #define PRESENT_SYM 318
69 #define ABSENT_SYM 319
70 #define DEFINED_SYM 320
71 #define BY_SYM 321
72 #define PLUS_INFINITY_SYM 322
73 #define MINUS_INFINITY_SYM 323
74 #define SEMI_COLON_SYM 324
75 #define IA5STRING_SYM 325
76 #define PRINTABLESTRING_SYM 326
77 #define NUMERICSTRING_SYM 327
78 #define TELETEXSTRING_SYM 328
79 #define T61STRING_SYM 329
80 #define VIDEOTEXSTRING_SYM 330
81 #define VISIBLESTRING_SYM 331
82 #define ISO646STRING_SYM 332
83 #define GRAPHICSTRING_SYM 333
84 #define GENERALSTRING_SYM 334
85 #define GENERALIZEDTIME_SYM 335
86 #define UTCTIME_SYM 336
87 #define EXTERNAL_SYM 337
88 #define OBJECTDESCRIPTOR_SYM 338
89 #define OPERATION_SYM 339
90 #define ARGUMENT_SYM 340
91 #define RESULT_SYM 341
92 #define ERRORS_SYM 342
93 #define LINKED_SYM 343
94 #define ERROR_SYM 344
95 #define PARAMETER_SYM 345
96 #define BIND_SYM 346
97 #define BINDERROR_SYM 347
98 #define UNBIND_SYM 348
99 #define UNBINDERROR_SYM 349
100 #define ASE_SYM 350
101 #define OPERATIONS_SYM 351
102 #define CONSUMERINVOKES_SYM 352
103 #define SUPPLIERINVOKES_SYM 353
104 #define AC_SYM 354
105 #define ASES_SYM 355
106 #define REMOTE_SYM 356
107 #define INITIATOR_SYM 357
108 #define RESPONDER_SYM 358
109 #define ABSTRACTSYNTAXES_SYM 359
110 #define CONSUMER_SYM 360
111 #define EXTENSIONS_SYM 361
112 #define CHOSEN_SYM 362
113 #define EXTENSION_SYM 363
114 #define CRITICAL_SYM 364
115 #define FOR_SYM 365
116 #define DELIVERY_SYM 366
117 #define SUBMISSION_SYM 367
118 #define TRANSFER_SYM 368
119 #define EXTENSIONATTRIBUTE_SYM 369
120 #define TOKEN_SYM 370
121 #define TOKENDATA_SYM 371
122 #define SECURITYCATEGORY_SYM 372
123 #define OBJECT_SYM 373
124 #define PORTS_SYM 374
125 #define BOXC_SYM 375
126 #define BOXS_SYM 376
127 #define PORT_SYM 377
128 #define ABSTRACTOPS_SYM 378
129 #define REFINE_SYM 379
130 #define AS_SYM 380
131 #define RECURRING_SYM 381
132 #define VISIBLE_SYM 382
133 #define PAIRED_SYM 383
134 #define ABSTRACTBIND_SYM 384
135 #define ABSTRACTUNBIND_SYM 385
136 #define TO_SYM 386
137 #define ABSTRACTERROR_SYM 387
138 #define ABSTRACTOPERATION_SYM 388
139 #define ALGORITHM_SYM 389
140 #define ENCRYPTED_SYM 390
141 #define SIGNED_SYM 391
142 #define SIGNATURE_SYM 392
143 #define PROTECTED_SYM 393
144 #define OBJECTTYPE_SYM 394
145 #define SYNTAX_SYM 395
146 #define ACCESS_SYM 396
147 #define STATUS_SYM 397
148 #define DESCRIPTION_SYM 398
149 #define REFERENCE_SYM 399
150 #define INDEX_SYM 400
151 #define DEFVAL_SYM 401
152
153 #line 66 "core/parse-asn1.y"
154
155
156 #include "snacc.h"
157
158 #if STDC_HEADERS || HAVE_STRING_H
159 #include <string.h>
160 #else
161 #include <strings.h>
162 #endif
163 #include <stdio.h>
164
165 #include "asn-incl.h"
166 #include "mem.h"
167 #include "asn1module.h"
168 #include "lib-types.h"
169 #include "snacc-util.h"
170 #include "exports.h"
171 #include "parser.h"
172 #include "lex-stuff.h"
173
174 /*
175 * smallErrG
176 * used for small errors that should prevent code generation but not
177 * prevent the later error checking passes
178 */
179 int smallErrG = FALSE;
180
181 /*
182 * firstTimeThroughG
183 * used incase the asn1.lex was compiled with flex in which
184 * case the lexical analyzer must be reset for every ASN.1 file
185 * parsed, except the first
186 */
187 static int firstTimeThroughG = TRUE;
188
189 /*
190 * modulePtrG
191 * used to hold the parsed value. The root of the parse tree.
192 */
193 Module *modulePtrG;
194
195
196 /*
197 * oidElmtValDefsG
198 * used to hold integer values that are defined as arc numbers
199 * the modules object identifiers.
200 * eg. FOO-MODULE { joint-iso-ccitt dod (2) foo (2) 3 2 } DEFINITIONS ::=
201 * would put dod/2 and foo/2 in the oidElmtValDefsG list
202 * Note: only some oid's (modules name/import list module names)
203 * are parsed by the yacc code. The rest are parsed later
204 * due to ambiguities that arise without type info.
205 */
206 ValueDefList *oidElmtValDefsG = NULL;
207
208
209 /*
210 * ApplTag
211 * used to hold APPLICATION tags that have been defined in
212 * a module. This permits checking for the the error of
213 * using the same APPLICATION tag in 1 module. The
214 * ApplTags list (appTagsG) is emptied for each module.
215 */
216 typedef struct ApplTag
217 {
218 unsigned long int lineNo;
219 unsigned long int tagCode;
220 struct ApplTag *next;
221 } ApplTag;
222
223 ApplTag *applTagsG = NULL;
224
225 /*
226 * Protos for ApplTag related stuff. These are defined at the
227 * end of this file
228 */
229 void PushApplTag PROTO ((unsigned long int tagCode, unsigned long int lineNo));
230 void FreeApplTags();
231
232
233
234 /*
235 * the following are globals to simplify disparity between
236 * productions and produced data structure
237 */
238
239 /*
240 * these are used in the ValueRange subtype production
241 */
242 static int valueRangeUpperEndInclusiveG;
243 static int valueRangeLowerEndInclusiveG;
244
245 /*
246 * used to set exports flag in Type/value defs
247 * exportListG holds the explicitly exported elements.
248 * see SetExports routine in export.c
249 */
250 ExportElmt *exportListG = NULL;
251 int exportsParsedG;
252
253
254 /*
255 * globals for the APPLICATION-CONTEXT macro productions
256 */
257 static ValueList *rosAcSymmetricAsesG;
258 static ValueList *rosAcResponderConsumerOfG;
259 static ValueList *rosAcInitiatorConsumerOfG;
260
261 /*
262 * used with MTSAS Extension macro
263 * set to NULL for the initial parse.
264 */
265 static AsnBool *mtsasCriticalForSubmissionG = NULL;
266 static AsnBool *mtsasCriticalForTransferG = NULL;
267 static AsnBool *mtsasCriticalForDeliveryG = NULL;
268
269 /*
270 * Asn PORT macro globals
271 */
272 static TypeOrValueList *asnConsumerG;
273 static TypeOrValueList *asnSupplierG;
274
275
276 /*
277 * parseErrCountG
278 * used to prevent too many cascade errors
279 */
280 int parseErrCountG = 0;
281 #define MAX_ERR 50
282 #define PARSE_ERROR()\
283 parseErrCountG++;\
284 modulePtrG->status = MOD_ERROR;\
285 if (parseErrCountG > MAX_ERR)\
286 {\
287 fprintf (stderr, "Ackkkkk! too many errors - bye!\n");\
288 exit (1);\
289 }
290
291
292
293 #line 212 "core/parse-asn1.y"
294 typedef union
295 {
296 int intVal;
297 unsigned int uintVal;
298 char *charPtr;
299 Type *typePtr;
300 NamedType *namedTypePtr;
301 NamedTypeList *namedTypeListPtr;
302 Value *valuePtr;
303 NamedValue *namedValuePtr;
304 SubtypeValue *subtypeValuePtr;
305 Subtype *subtypePtr;
306 ModuleId *moduleId;
307 OID *oidPtr;
308 OidList *oidListPtr;
309 TypeDef *typeDefPtr;
310 TypeDefList *typeDefListPtr;
311 ValueDef *valueDefPtr;
312 ValueDefList *valueDefListPtr;
313 ExportElmt *exportList;
314 ImportModule *importModulePtr;
315 ImportModuleList *importModuleListPtr;
316 ImportElmt *importElmtPtr;
317 ImportElmtList *importElmtListPtr;
318 Tag *tagPtr;
319 TagList *tagListPtr;
320 Constraint *constraintPtr;
321 ConstraintList *constraintListPtr;
322 InnerSubtype *innerSubtypePtr;
323 ValueList *valueListPtr;
324 TypeOrValueList *typeOrValueListPtr;
325 TypeOrValue *typeOrValuePtr;
326 AsnPort *asnPortPtr;
327 AsnPortList *asnPortListPtr;
328 AttributeList *attrList;
329 } YYSTYPE;
330 #include <stdio.h>
331
332 #ifndef __cplusplus
333 #ifndef __STDC__
334 #define const
335 #endif
336 #endif
337
338
339
340 #define YYFINAL 671
341 #define YYFLAG -32768
342 #define YYNTBASE 147
343
344 #define YYTRANSLATE(x) ((unsigned)(x) <= 401 ? yytranslate[x] : 334)
345
346 static const short yytranslate[] = { 0,
347 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
348 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
349 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
350 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
351 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
352 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
353 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
354 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
355 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
356 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
357 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
358 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
359 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
360 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
361 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
362 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
363 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
364 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
365 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
366 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
367 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
368 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
369 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
370 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
371 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
372 2, 2, 2, 2, 2, 1, 2, 3, 4, 5,
373 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
374 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
375 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
376 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
377 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
378 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
379 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
380 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
381 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
382 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
383 106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
384 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
385 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
386 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
387 146
388 };
389
390 #if YYDEBUG != 0
391 static const short yyprhs[] = { 0,
392 0, 1, 2, 11, 14, 17, 19, 22, 24, 26,
393 30, 32, 36, 40, 42, 44, 46, 48, 53, 57,
394 61, 63, 65, 67, 70, 72, 77, 81, 83, 85,
395 87, 89, 92, 94, 96, 99, 102, 104, 106, 107,
396 114, 118, 124, 126, 128, 135, 140, 142, 144, 146,
397 148, 150, 152, 154, 156, 158, 160, 162, 164, 166,
398 168, 170, 172, 174, 176, 178, 180, 182, 185, 188,
399 190, 192, 194, 199, 201, 205, 210, 215, 217, 219,
400 222, 225, 230, 232, 235, 241, 243, 245, 249, 253,
401 256, 259, 261, 267, 269, 272, 276, 280, 285, 289,
402 293, 297, 300, 304, 310, 313, 315, 320, 324, 327,
403 331, 335, 340, 342, 344, 346, 348, 350, 352, 354,
404 359, 361, 364, 369, 374, 378, 380, 384, 386, 388,
405 390, 392, 394, 396, 398, 401, 406, 408, 411, 413,
406 416, 418, 420, 422, 424, 427, 430, 434, 438, 440,
407 442, 444, 448, 456, 458, 462, 465, 467, 470, 472,
408 474, 476, 478, 480, 482, 488, 490, 492, 494, 496,
409 501, 503, 505, 507, 509, 511, 513, 515, 516, 520,
410 522, 524, 526, 528, 530, 532, 535, 539, 542, 544,
411 546, 548, 550, 552, 554, 559, 564, 566, 568, 570,
412 572, 574, 576, 578, 580, 581, 583, 585, 587, 590,
413 592, 594, 596, 598, 600, 602, 604, 606, 608, 610,
414 612, 614, 616, 618, 620, 622, 624, 626, 628, 630,
415 632, 634, 636, 638, 640, 642, 644, 646, 648, 650,
416 652, 654, 656, 658, 660, 662, 664, 666, 668, 670,
417 672, 674, 676, 678, 680, 682, 684, 686, 688, 690,
418 693, 698, 701, 703, 706, 708, 710, 712, 717, 719,
419 724, 726, 729, 732, 734, 739, 742, 744, 747, 749,
420 752, 754, 759, 762, 764, 767, 771, 776, 781, 783,
421 788, 790, 792, 801, 806, 814, 816, 822, 824, 827,
422 834, 836, 843, 845, 850, 852, 854, 858, 865, 867,
423 869, 871, 875, 877, 879, 881, 885, 887, 889, 894,
424 896, 899, 901, 905, 907, 909, 913, 915, 917, 919,
425 921, 924, 926, 929, 931, 934, 936, 939, 942, 947,
426 949, 951, 955, 958, 960, 962, 964, 967, 969, 974,
427 976, 978, 981, 984, 989, 994, 999, 1001, 1005, 1008,
428 1010, 1013, 1015, 1019, 1023, 1025, 1029, 1031, 1035, 1037,
429 1040, 1044, 1049, 1051, 1054, 1058, 1063, 1065, 1068, 1071,
430 1075, 1078, 1081, 1084, 1087, 1099, 1101, 1103, 1106, 1107,
431 1110, 1111, 1116, 1117, 1122
432 };
433
434 static const short yyrhs[] = { -1,
435 0, 151, 50, 150, 149, 24, 48, 153, 49, 0,
436 51, 26, 0, 36, 26, 0, 249, 0, 247, 152,
437 0, 236, 0, 249, 0, 154, 157, 163, 0, 249,
438 0, 53, 155, 69, 0, 53, 1, 69, 0, 249,
439 0, 156, 0, 249, 0, 162, 0, 156, 15, 147,
440 162, 0, 54, 158, 69, 0, 54, 1, 69, 0,
441 249, 0, 159, 0, 249, 0, 159, 160, 0, 160,
442 0, 161, 60, 147, 151, 0, 161, 15, 162, 0,
443 162, 0, 248, 0, 246, 0, 253, 0, 163, 164,
444 0, 164, 0, 165, 0, 165, 69, 0, 1, 69,
445 0, 168, 0, 226, 0, 0, 8, 24, 48, 147,
446 166, 9, 0, 8, 24, 167, 0, 8, 24, 247,
447 14, 167, 0, 248, 0, 253, 0, 248, 24, 250,
448 147, 171, 250, 0, 247, 14, 147, 248, 0, 169,
449 0, 248, 0, 252, 0, 172, 0, 170, 0, 203,
450 0, 174, 0, 175, 0, 181, 0, 183, 0, 185,
451 0, 189, 0, 191, 0, 192, 0, 193, 0, 196,
452 0, 197, 0, 201, 0, 202, 0, 179, 0, 180,
453 0, 31, 30, 0, 246, 171, 0, 171, 0, 27,
454 0, 28, 0, 28, 16, 176, 17, 0, 177, 0,
455 176, 15, 177, 0, 246, 18, 178, 19, 0, 246,
456 18, 228, 19, 0, 12, 0, 11, 0, 23, 12,
457 0, 23, 11, 0, 52, 16, 176, 17, 0, 55,
458 0, 29, 30, 0, 29, 30, 16, 182, 17, 0,
459 176, 0, 32, 0, 33, 147, 16, 0, 184, 186,
460 17, 0, 184, 17, 0, 187, 250, 0, 188, 0,
461 187, 15, 250, 147, 188, 0, 173, 0, 173, 40,
462 0, 173, 41, 235, 0, 42, 34, 171, 0, 246,
463 42, 34, 171, 0, 33, 34, 171, 0, 35, 147,
464 16, 0, 190, 186, 17, 0, 190, 17, 0, 35,
465 34, 171, 0, 37, 147, 16, 194, 17, 0, 195,
466 250, 0, 173, 0, 195, 15, 250, 173, 0, 246,
467 22, 171, 0, 198, 171, 0, 198, 36, 171, 0,
468 198, 51, 171, 0, 20, 200, 199, 21, 0, 245,
469 0, 228, 0, 43, 0, 44, 0, 45, 0, 249,
470 0, 38, 0, 38, 65, 66, 246, 0, 39, 0,
471 171, 204, 0, 35, 214, 34, 171, 0, 33, 214,
472 34, 171, 0, 18, 205, 19, 0, 206, 0, 205,
473 25, 206, 0, 207, 0, 208, 0, 209, 0, 215,
474 0, 214, 0, 216, 0, 227, 0, 56, 171, 0,
475 210, 14, 14, 211, 0, 212, 0, 212, 22, 0,
476 213, 0, 22, 213, 0, 227, 0, 57, 0, 227,
477 0, 58, 0, 59, 204, 0, 60, 204, 0, 61,
478 62, 217, 0, 61, 42, 218, 0, 204, 0, 219,
479 0, 220, 0, 16, 221, 17, 0, 16, 14, 14,
480 14, 15, 221, 17, 0, 222, 0, 221, 15, 222,
481 0, 246, 223, 0, 223, 0, 224, 225, 0, 204,
482 0, 249, 0, 63, 0, 64, 0, 249, 0, 40,
483 0, 246, 171, 24, 147, 227, 0, 230, 0, 228,
484 0, 229, 0, 246, 0, 247, 14, 147, 246, 0,
485 232, 0, 234, 0, 233, 0, 178, 0, 243, 0,
486 242, 0, 244, 0, 0, 16, 231, 10, 0, 46,
487 0, 47, 0, 67, 0, 68, 0, 32, 0, 227,
488 0, 246, 227, 0, 16, 237, 17, 0, 237, 238,
489 0, 238, 0, 239, 0, 240, 0, 241, 0, 245,
490 0, 246, 0, 246, 18, 239, 19, 0, 246, 18,
491 228, 19, 0, 3, 0, 4, 0, 5, 0, 12,
492 0, 11, 0, 7, 0, 6, 0, 6, 0, 0,
493 251, 0, 249, 0, 13, 0, 251, 13, 0, 254,
494 0, 261, 0, 263, 0, 267, 0, 269, 0, 274,
495 0, 289, 0, 283, 0, 294, 0, 295, 0, 296,
496 0, 297, 0, 298, 0, 303, 0, 307, 0, 316,
497 0, 318, 0, 320, 0, 321, 0, 322, 0, 323,
498 0, 326, 0, 325, 0, 324, 0, 327, 0, 84,
499 0, 89, 0, 91, 0, 93, 0, 95, 0, 99,
500 0, 108, 0, 106, 0, 114, 0, 115, 0, 116,
501 0, 117, 0, 118, 0, 122, 0, 124, 0, 129,
502 0, 130, 0, 133, 0, 132, 0, 134, 0, 135,
503 0, 136, 0, 137, 0, 138, 0, 139, 0, 84,
504 255, 0, 256, 257, 259, 260, 0, 85, 173, 0,
505 249, 0, 86, 258, 0, 249, 0, 173, 0, 249,
506 0, 87, 16, 286, 17, 0, 249, 0, 88, 16,
507 286, 17, 0, 249, 0, 89, 262, 0, 90, 173,
508 0, 249, 0, 91, 264, 265, 266, 0, 85, 173,
509 0, 249, 0, 86, 173, 0, 249, 0, 92, 173,
510 0, 249, 0, 93, 264, 265, 268, 0, 94, 173,
511 0, 249, 0, 95, 270, 0, 95, 271, 272, 0,
512 96, 16, 273, 17, 0, 97, 16, 273, 17, 0,
513 249, 0, 98, 16, 273, 17, 0, 249, 0, 285,
514 0, 99, 275, 91, 171, 93, 171, 276, 281, 0,
515 100, 16, 285, 17, 0, 101, 96, 16, 227, 17,
516 277, 278, 0, 249, 0, 96, 34, 16, 285, 17,
517 0, 249, 0, 279, 280, 0, 102, 105, 34, 16,
518 285, 17, 0, 249, 0, 103, 105, 34, 16, 285,
519 17, 0, 249, 0, 104, 16, 282, 17, 0, 249,
520 0, 236, 0, 282, 15, 236, 0, 106, 107, 60,
521 16, 284, 17, 0, 285, 0, 249, 0, 227, 0,
522 285, 15, 227, 0, 287, 0, 249, 0, 288, 0,
523 287, 15, 288, 0, 171, 0, 227, 0, 108, 173,
524 290, 291, 0, 108, 0, 41, 227, 0, 249, 0,
525 109, 110, 292, 0, 249, 0, 293, 0, 292, 15,
526 293, 0, 112, 0, 113, 0, 111, 0, 114, 0,
527 114, 171, 0, 115, 0, 115, 171, 0, 116, 0,
528 116, 171, 0, 117, 0, 117, 171, 0, 118, 299,
529 0, 119, 16, 300, 17, 0, 249, 0, 301, 0,
530 300, 15, 301, 0, 227, 302, 0, 120, 0, 121,
531 0, 249, 0, 122, 304, 0, 122, 0, 123, 16,
532 287, 17, 0, 305, 0, 306, 0, 305, 306, 0,
533 306, 305, 0, 97, 16, 287, 17, 0, 98, 16,
534 287, 17, 0, 124, 315, 125, 308, 0, 309, 0,
535 308, 15, 309, 0, 310, 311, 0, 315, 0, 315,
536 126, 0, 312, 0, 311, 15, 312, 0, 227, 302,
537 313, 0, 127, 0, 128, 61, 314, 0, 315, 0,
538 314, 15, 315, 0, 227, 0, 129, 317, 0, 129,
539 317, 171, 0, 131, 16, 300, 17, 0, 249, 0,
540 130, 319, 0, 130, 319, 171, 0, 60, 16, 300,
541 17, 0, 249, 0, 133, 255, 0, 132, 262, 0,
542 134, 90, 171, 0, 135, 171, 0, 136, 171, 0,
543 137, 171, 0, 138, 171, 0, 139, 140, 171, 141,
544 328, 142, 329, 330, 331, 332, 333, 0, 246, 0,
545 246, 0, 143, 227, 0, 0, 144, 227, 0, 0,
546 145, 16, 287, 17, 0, 0, 146, 16, 227, 17,
547 0, 0
548 };
549
550 #endif
551
552 #if YYDEBUG != 0
553 static const short yyrline[] = { 0,
554 461, 463, 468, 500, 502, 503, 510, 519, 521, 524,
555 526, 529, 540, 547, 550, 552, 555, 563, 572, 574,
556 579, 582, 584, 587, 592, 599, 610, 621, 634, 636,
557 637, 650, 652, 655, 657, 658, 665, 680, 693, 695,
558 734, 750, 775, 777, 784, 805, 820, 822, 832, 834,
559 835, 836, 839, 841, 842, 843, 844, 845, 846, 847,
560 848, 849, 850, 851, 852, 853, 854, 855, 861, 868,
561 875, 882, 888, 896, 902, 909, 917, 925, 933, 939,
562 950, 958, 967, 974, 980, 987, 993, 1000, 1005, 1021,
563 1035, 1049, 1055, 1072, 1074, 1079, 1093, 1099, 1110, 1126,
564 1130, 1145, 1160, 1174, 1191, 1204, 1210, 1225, 1240, 1266,
565 1307, 1316, 1334, 1340, 1348, 1350, 1351, 1352, 1356, 1361,
566 1370, 1378, 1388, 1401, 1417, 1424, 1440, 1452, 1454, 1455,
567 1456, 1457, 1458, 1461, 1469, 1478, 1493, 1499, 1506, 1512,
568 1519, 1521, 1528, 1530, 1537, 1547, 1556, 1563, 1571, 1586,
569 1588, 1591, 1600, 1610, 1616, 1623, 1629, 1633, 1642, 1644,
570 1647, 1649, 1650, 1651, 1663, 1675, 1677, 1680, 1682, 1695,
571 1710, 1712, 1713, 1714, 1720, 1728, 1736, 1744, 1745, 1761,
572 1768, 1777, 1784, 1794, 1804, 1810, 1819, 1846, 1856, 1861,
573 1863, 1884, 1888, 1896, 1901, 1920, 1941, 1945, 1949, 1953,
574 1961, 1969, 1973, 1977, 1981, 1988, 1990, 1993, 1999, 2010,
575 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021,
576 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031,
577 2032, 2033, 2034, 2035, 2038, 2040, 2041, 2042, 2043, 2044,
578 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054,
579 2055, 2056, 2057, 2058, 2059, 2060, 2061, 2062, 2063, 2071,
580 2075, 2091, 2093, 2096, 2098, 2102, 2104, 2108, 2113, 2118,
581 2123, 2134, 2148, 2150, 2158, 2172, 2174, 2178, 2180, 2184,
582 2186, 2194, 2209, 2211, 2219, 2228, 2240, 2248, 2253, 2257,
583 2262, 2266, 2275, 2299, 2307, 2313, 2322, 2327, 2330, 2334,
584 2339, 2342, 2347, 2350, 2355, 2359, 2365, 2377, 2391, 2393,
585 2396, 2402, 2409, 2411, 2414, 2420, 2427, 2434, 2446, 2464,
586 2476, 2478, 2481, 2483, 2487, 2489, 2492, 2498, 2503, 2516,
587 2526, 2541, 2550, 2564, 2574, 2589, 2599, 2620, 2630, 2635,
588 2638, 2644, 2651, 2660, 2666, 2671, 2683, 2694, 2702, 2707,
589 2713, 2719, 2725, 2733, 2740, 2756, 2763, 2765, 2768, 2772,
590 2774, 2777, 2779, 2782, 2789, 2791, 2795, 2797, 2800, 2813,
591 2823, 2835, 2840, 2849, 2860, 2873, 2878, 2886, 2898, 2911,
592 2922, 2934, 2945, 2959, 2969, 2995, 3017, 3038, 3040, 3043,
593 3045, 3048, 3053, 3056, 3061
594 };
595 #endif
596
597
598 #if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
599
600 static const char * const yytname[] = { "$","error","$undefined.","BSTRING_SYM",
601 "HSTRING_SYM","CSTRING_SYM","UCASEFIRST_IDENT_SYM","LCASEFIRST_IDENT_SYM","NAMEDMACRO_SYM",
602 "MACRODEFBODY_SYM","BRACEBAL_SYM","NUMBER_ERANGE","NUMBER_SYM","SNACC_ATTRIBUTES",
603 "DOT_SYM","COMMA_SYM","LEFTBRACE_SYM","RIGHTBRACE_SYM","LEFTPAREN_SYM","RIGHTPAREN_SYM",
604 "LEFTBRACKET_SYM","RIGHTBRACKET_SYM","LESSTHAN_SYM","MINUS_SYM","GETS_SYM","BAR_SYM",
605 "TAGS_SYM","BOOLEAN_SYM","INTEGER_SYM","BIT_SYM","STRING_SYM","OCTET_SYM","NULL_SYM",
606 "SEQUENCE_SYM","OF_SYM","SET_SYM","IMPLICIT_SYM","CHOICE_SYM","ANY_SYM","OBJECT_IDENTIFIER_SYM",
607 "OPTIONAL_SYM","DEFAULT_SYM","COMPONENTS_SYM","UNIVERSAL_SYM","APPLICATION_SYM",
608 "PRIVATE_SYM","TRUE_SYM","FALSE_SYM","BEGIN_SYM","END_SYM","DEFINITIONS_SYM",
609 "EXPLICIT_SYM","ENUMERATED_SYM","EXPORTS_SYM","IMPORTS_SYM","REAL_SYM","INCLUDES_SYM",
610 "MIN_SYM","MAX_SYM","SIZE_SYM","FROM_SYM","WITH_SYM","COMPONENT_SYM","PRESENT_SYM",
611 "ABSENT_SYM","DEFINED_SYM","BY_SYM","PLUS_INFINITY_SYM","MINUS_INFINITY_SYM",
612 "SEMI_COLON_SYM","IA5STRING_SYM","PRINTABLESTRING_SYM","NUMERICSTRING_SYM","TELETEXSTRING_SYM",
613 "T61STRING_SYM","VIDEOTEXSTRING_SYM","VISIBLESTRING_SYM","ISO646STRING_SYM",
614 "GRAPHICSTRING_SYM","GENERALSTRING_SYM","GENERALIZEDTIME_SYM","UTCTIME_SYM",
615 "EXTERNAL_SYM","OBJECTDESCRIPTOR_SYM","OPERATION_SYM","ARGUMENT_SYM","RESULT_SYM",
616 "ERRORS_SYM","LINKED_SYM","ERROR_SYM","PARAMETER_SYM","BIND_SYM","BINDERROR_SYM",
617 "UNBIND_SYM","UNBINDERROR_SYM","ASE_SYM","OPERATIONS_SYM","CONSUMERINVOKES_SYM",
618 "SUPPLIERINVOKES_SYM","AC_SYM","ASES_SYM","REMOTE_SYM","INITIATOR_SYM","RESPONDER_SYM",
619 "ABSTRACTSYNTAXES_SYM","CONSUMER_SYM","EXTENSIONS_SYM","CHOSEN_SYM","EXTENSION_SYM",
620 "CRITICAL_SYM","FOR_SYM","DELIVERY_SYM","SUBMISSION_SYM","TRANSFER_SYM","EXTENSIONATTRIBUTE_SYM",
621 "TOKEN_SYM","TOKENDATA_SYM","SECURITYCATEGORY_SYM","OBJECT_SYM","PORTS_SYM",
622 "BOXC_SYM","BOXS_SYM","PORT_SYM","ABSTRACTOPS_SYM","REFINE_SYM","AS_SYM","RECURRING_SYM",
623 "VISIBLE_SYM","PAIRED_SYM","ABSTRACTBIND_SYM","ABSTRACTUNBIND_SYM","TO_SYM",
624 "ABSTRACTERROR_SYM","ABSTRACTOPERATION_SYM","ALGORITHM_SYM","ENCRYPTED_SYM",
625 "SIGNED_SYM","SIGNATURE_SYM","PROTECTED_SYM","OBJECTTYPE_SYM","SYNTAX_SYM","ACCESS_SYM",
626 "STATUS_SYM","DESCRIPTION_SYM","REFERENCE_SYM","INDEX_SYM","DEFVAL_SYM","LineNo",
627 "ModuleDefinition","@1","TagDefault","ModuleIdentifier","AssignedIdentifier",
628 "ModuleBody","Exports","SymbolsExported","ExportSymbolList","Imports","SymbolsImported",
629 "SymbolsFromModuleList","SymbolsFromModule","SymbolList","Symbol","AssignmentList",
630 "AssignmentOrError","Assignment","@2","MacroReference","TypeAssignment","ExternalTypeReference",
631 "DefinedType","Type","BuiltinType","NamedType","BooleanType","IntegerType","NamedNumberList",
632 "NamedNumber","SignedNumber","EnumeratedType","RealType","BitStringType","NamedBitList",
633 "NullType","SequenceOpening","SequenceType","ElementTypes","ElementTypeList",
634 "ElementType","SequenceOfType","SetOpening","SetType","SetOfType","ChoiceType",
635 "AlternativeTypes","AlternativeTypeList","SelectionType","TaggedType","Tag",
636 "ClassNumber","Class","AnyType","ObjectIdentifierType","Subtype","SubtypeSpec",
637 "SubtypeValueSetList","SubtypeValueSet","SingleValue","ContainedSubtype","ValueRange",
638 "LowerEndPoint","UpperEndPoint","LowerEndValue","UpperEndValue","SizeConstraint",
639 "PermittedAlphabet","InnerTypeConstraints","SingleTypeConstraint","MultipleTypeConstraints",
640 "FullSpecification","PartialSpecification","TypeConstraints","NamedConstraint",
641 "Constraint","ValueConstraint","PresenceConstraint","ValueAssignment","Value",
642 "DefinedValue","ExternalValueReference","BuiltinValue","@3","BooleanValue","SpecialRealValue",
643 "NullValue","NamedValue","ObjectIdentifierValue","ObjIdComponentList","ObjIdComponent",
644 "NumberForm","NameForm","NameAndNumberForm","BinaryString","HexString","CharString",
645 "number","identifier","modulereference","typereference","empty","SnaccAttributes",
646 "SnaccAttributeCommentList","DefinedMacroType","DefinedMacroName","RosOperationMacroType",
647 "RosOperationMacroBody","RosOpArgument","RosOpResult","RosOpResultType","RosOpErrors",
648 "RosOpLinkedOps","RosErrorMacroType","RosErrParameter","RosBindMacroType","RosBindArgument",
649 "RosBindResult","RosBindError","RosUnbindMacroType","RosUnbindError","RosAseMacroType",
650 "RosAseSymmetricAse","RosAseConsumerInvokes","RosAseSupplierInvokes","RosAseOperationList",
651 "RosAcMacroType","RosAcNonRoElements","RosAcRoElements","RosAcSymmetricAses",
652 "RosAcAsymmetricAses","RosAcInitiatorConsumerOf","RosAcResponderConsumerOf",
653 "RosAcAbstractSyntaxes","OidList","MtsasExtensionsMacroType","PossiblyEmptyValueList",
654 "ValueList","PossiblyEmptyTypeOrValueList","TypeOrValueList","TypeOrValue","MtsasExtensionMacroType",
655 "MtsasExtDefaultVal","MtsasExtCritical","MtsasExtCriticalityList","MtsasExtCriticality",
656 "MtsasExtensionAttributeMacroType","MtsasTokenMacroType","MtsasTokenDataMacroType",
657 "MtsasSecurityCategoryMacroType","AsnObjectMacroType","AsnPorts","AsnPortList",
658 "AsnPort","AsnPortType","AsnPortMacroType","AsnOperations","AsnConsumer","AsnSupplier",
659 "AsnRefineMacroType","AsnComponentList","AsnComponent","AsnObjectSpec","AsnPortSpecList",
660 "AsnPortSpec","AsnPortStatus","AsnObjectList","AsnObject","AsnAbstractBindMacroType",
661 "AsnAbstractBindPorts","AsnAbstractUnbindMacroType","AsnAbstractUnbindPorts",
662 "AsnAbstractOperationMacroType","AsnAbstractErrorMacroType","AfAlgorithmMacroType",
663 "AfEncryptedMacroType","AfSignedMacroType","AfSignatureMacroType","AfProtectedMacroType",
664 "SnmpObjectTypeMacroType","SnmpAccess","SnmpStatus","SnmpDescrPart","SnmpReferPart",
665 "SnmpIndexPart","SnmpDefValPart", NULL
666 };
667 #endif
668
669 static const short yyr1[] = { 0,
670 147, 149, 148, 150, 150, 150, 151, 152, 152, 153,
671 153, 154, 154, 154, 155, 155, 156, 156, 157, 157,
672 157, 158, 158, 159, 159, 160, 161, 161, 162, 162,
673 162, 163, 163, 164, 164, 164, 165, 165, 166, 165,
674 165, 165, 167, 167, 168, 169, 170, 170, 171, 171,
675 171, 171, 172, 172, 172, 172, 172, 172, 172, 172,
676 172, 172, 172, 172, 172, 172, 172, 172, 173, 173,
677 174, 175, 175, 176, 176, 177, 177, 178, 178, 178,
678 178, 179, 180, 181, 181, 182, 183, 184, 185, 185,
679 186, 187, 187, 188, 188, 188, 188, 188, 189, 190,
680 191, 191, 192, 193, 194, 195, 195, 196, 197, 197,
681 197, 198, 199, 199, 200, 200, 200, 200, 201, 201,
682 202, 203, 203, 203, 204, 205, 205, 206, 206, 206,
683 206, 206, 206, 207, 208, 209, 210, 210, 211, 211,
684 212, 212, 213, 213, 214, 215, 216, 216, 217, 218,
685 218, 219, 220, 221, 221, 222, 222, 223, 224, 224,
686 225, 225, 225, 225, 226, 227, 227, 228, 228, 229,
687 230, 230, 230, 230, 230, 230, 230, 231, 230, 232,
688 232, 233, 233, 234, 235, 235, 236, 237, 237, 238,
689 238, 238, 239, 240, 241, 241, 242, 243, 244, 245,
690 245, 246, 247, 248, 249, 250, 250, 251, 251, 252,
691 252, 252, 252, 252, 252, 252, 252, 252, 252, 252,
692 252, 252, 252, 252, 252, 252, 252, 252, 252, 252,
693 252, 252, 252, 252, 253, 253, 253, 253, 253, 253,
694 253, 253, 253, 253, 253, 253, 253, 253, 253, 253,
695 253, 253, 253, 253, 253, 253, 253, 253, 253, 254,
696 255, 256, 256, 257, 257, 258, 258, 259, 259, 260,
697 260, 261, 262, 262, 263, 264, 264, 265, 265, 266,
698 266, 267, 268, 268, 269, 269, 270, 271, 271, 272,
699 272, 273, 274, 275, 276, 276, 277, 277, 278, 279,
700 279, 280, 280, 281, 281, 282, 282, 283, 284, 284,
701 285, 285, 286, 286, 287, 287, 288, 288, 289, 289,
702 290, 290, 291, 291, 292, 292, 293, 293, 293, 294,
703 294, 295, 295, 296, 296, 297, 297, 298, 299, 299,
704 300, 300, 301, 302, 302, 302, 303, 303, 304, 304,
705 304, 304, 304, 305, 306, 307, 308, 308, 309, 310,
706 310, 311, 311, 312, 313, 313, 314, 314, 315, 316,
707 316, 317, 317, 318, 318, 319, 319, 320, 321, 322,
708 323, 324, 325, 326, 327, 328, 329, 330, 330, 331,
709 331, 332, 332, 333, 333
710 };
711
712 static const short yyr2[] = { 0,
713 0, 0, 8, 2, 2, 1, 2, 1, 1, 3,
714 1, 3, 3, 1, 1, 1, 1, 4, 3, 3,
715 1, 1, 1, 2, 1, 4, 3, 1, 1, 1,
716 1, 2, 1, 1, 2, 2, 1, 1, 0, 6,
717 3, 5, 1, 1, 6, 4, 1, 1, 1, 1,
718 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
719 1, 1, 1, 1, 1, 1, 1, 2, 2, 1,
720 1, 1, 4, 1, 3, 4, 4, 1, 1, 2,
721 2, 4, 1, 2, 5, 1, 1, 3, 3, 2,
722 2, 1, 5, 1, 2, 3, 3, 4, 3, 3,
723 3, 2, 3, 5, 2, 1, 4, 3, 2, 3,
724 3, 4, 1, 1, 1, 1, 1, 1, 1, 4,
725 1, 2, 4, 4, 3, 1, 3, 1, 1, 1,
726 1, 1, 1, 1, 2, 4, 1, 2, 1, 2,
727 1, 1, 1, 1, 2, 2, 3, 3, 1, 1,
728 1, 3, 7, 1, 3, 2, 1, 2, 1, 1,
729 1, 1, 1, 1, 5, 1, 1, 1, 1, 4,
730 1, 1, 1, 1, 1, 1, 1, 0, 3, 1,
731 1, 1, 1, 1, 1, 2, 3, 2, 1, 1,
732 1, 1, 1, 1, 4, 4, 1, 1, 1, 1,
733 1, 1, 1, 1, 0, 1, 1, 1, 2, 1,
734 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
735 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
736 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
737 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
738 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
739 4, 2, 1, 2, 1, 1, 1, 4, 1, 4,
740 1, 2, 2, 1, 4, 2, 1, 2, 1, 2,
741 1, 4, 2, 1, 2, 3, 4, 4, 1, 4,
742 1, 1, 8, 4, 7, 1, 5, 1, 2, 6,
743 1, 6, 1, 4, 1, 1, 3, 6, 1, 1,
744 1, 3, 1, 1, 1, 3, 1, 1, 4, 1,
745 2, 1, 3, 1, 1, 3, 1, 1, 1, 1,
746 2, 1, 2, 1, 2, 1, 2, 2, 4, 1,
747 1, 3, 2, 1, 1, 1, 2, 1, 4, 1,
748 1, 2, 2, 4, 4, 4, 1, 3, 2, 1,
749 2, 1, 3, 3, 1, 3, 1, 3, 1, 2,
750 3, 4, 1, 2, 3, 4, 1, 2, 2, 3,
751 2, 2, 2, 2, 11, 1, 1, 2, 0, 2,
752 0, 4, 0, 4, 0
753 };
754
755 static const short yydefact[] = { 0,
756 203, 0, 205, 205, 0, 7, 8, 9, 0, 0,
757 2, 6, 202, 201, 200, 0, 189, 190, 191, 192,
758 193, 194, 5, 4, 0, 187, 188, 0, 0, 0,
759 168, 0, 169, 0, 205, 196, 195, 1, 0, 0,
760 205, 14, 0, 0, 204, 235, 236, 237, 238, 239,
761 240, 242, 241, 243, 244, 245, 246, 247, 248, 249,
762 250, 251, 253, 252, 254, 255, 256, 257, 258, 259,
763 0, 15, 17, 30, 29, 16, 31, 3, 0, 0,
764 21, 170, 13, 12, 1, 0, 0, 22, 25, 0,
765 28, 23, 0, 0, 0, 33, 34, 37, 38, 0,
766 0, 0, 20, 19, 24, 0, 1, 36, 0, 32,
767 35, 204, 205, 71, 72, 0, 0, 87, 1, 1,
768 1, 119, 121, 0, 83, 205, 205, 205, 205, 205,
769 0, 0, 320, 330, 332, 334, 336, 205, 348, 0,
770 205, 205, 205, 205, 0, 0, 0, 0, 0, 0,
771 47, 51, 0, 50, 53, 54, 66, 67, 55, 56,
772 0, 57, 58, 0, 59, 60, 61, 62, 63, 0,
773 64, 65, 52, 0, 0, 48, 49, 210, 211, 212,
774 213, 214, 215, 217, 216, 218, 219, 220, 221, 222,
775 223, 224, 225, 226, 227, 228, 229, 230, 233, 232,
776 231, 234, 205, 18, 27, 0, 1, 41, 0, 43,
777 44, 115, 116, 117, 0, 118, 0, 84, 68, 0,
778 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
779 263, 260, 205, 0, 274, 272, 0, 277, 205, 205,
780 0, 0, 289, 285, 205, 0, 0, 0, 70, 205,
781 0, 331, 333, 335, 337, 0, 340, 338, 0, 0,
782 0, 347, 350, 351, 197, 198, 199, 79, 78, 178,
783 0, 184, 180, 181, 182, 183, 174, 369, 167, 166,
784 171, 173, 172, 176, 175, 177, 0, 0, 373, 370,
785 0, 377, 374, 379, 378, 0, 381, 382, 383, 384,
786 0, 0, 1, 122, 90, 0, 94, 0, 205, 92,
787 0, 102, 0, 0, 0, 109, 0, 1, 208, 207,
788 1, 206, 26, 39, 0, 0, 114, 113, 0, 74,
789 0, 0, 99, 145, 88, 0, 103, 100, 0, 0,
790 0, 0, 262, 205, 265, 205, 273, 276, 0, 279,
791 205, 205, 0, 0, 0, 291, 286, 0, 0, 0,
792 0, 322, 205, 69, 0, 0, 0, 0, 352, 353,
793 0, 81, 80, 0, 0, 371, 0, 375, 380, 0,
794 0, 142, 0, 0, 0, 126, 128, 129, 130, 0,
795 137, 132, 131, 133, 134, 0, 0, 95, 0, 89,
796 205, 91, 0, 101, 110, 111, 108, 0, 0, 209,
797 0, 42, 112, 0, 73, 0, 86, 0, 124, 123,
798 106, 0, 205, 120, 82, 266, 267, 264, 0, 269,
799 205, 278, 0, 281, 275, 0, 284, 282, 311, 0,
800 292, 0, 0, 0, 0, 205, 321, 0, 324, 319,
801 205, 0, 341, 87, 317, 318, 169, 0, 0, 315,
802 0, 0, 179, 356, 357, 0, 360, 0, 0, 0,
803 135, 146, 0, 0, 125, 0, 0, 138, 165, 97,
804 185, 96, 169, 1, 0, 46, 205, 40, 75, 0,
805 0, 85, 104, 205, 105, 205, 0, 271, 261, 280,
806 283, 287, 0, 288, 0, 294, 0, 310, 0, 309,
807 0, 344, 345, 346, 343, 0, 339, 1, 0, 354,
808 355, 349, 0, 205, 359, 362, 361, 372, 376, 386,
809 0, 205, 148, 150, 151, 149, 147, 127, 0, 186,
810 0, 98, 45, 76, 77, 0, 314, 0, 313, 205,
811 312, 290, 205, 308, 329, 327, 328, 323, 325, 342,
812 0, 316, 358, 0, 0, 0, 0, 159, 0, 154,
813 157, 205, 205, 160, 0, 144, 136, 139, 143, 93,
814 107, 268, 0, 0, 296, 205, 0, 365, 0, 364,
815 363, 387, 389, 0, 205, 152, 164, 161, 162, 158,
816 163, 156, 140, 270, 0, 0, 305, 293, 326, 0,
817 0, 391, 0, 155, 0, 0, 366, 367, 388, 0,
818 393, 205, 0, 306, 0, 0, 390, 0, 395, 0,
819 205, 0, 304, 368, 0, 0, 385, 153, 0, 298,
820 205, 307, 0, 0, 0, 0, 301, 295, 205, 392,
821 0, 0, 0, 0, 303, 299, 394, 0, 0, 0,
822 297, 0, 0, 0, 0, 300, 0, 302, 0, 0,
823 0
824 };
825
826 static const short yydefgoto[] = { 43,
827 669, 25, 11, 2, 6, 40, 41, 71, 72, 80,
828 87, 88, 89, 90, 91, 95, 96, 97, 411, 208,
829 98, 151, 152, 249, 154, 307, 155, 156, 329, 330,
830 277, 157, 158, 159, 418, 160, 161, 162, 308, 309,
831 310, 163, 164, 165, 166, 167, 422, 423, 168, 169,
832 170, 326, 215, 171, 172, 173, 304, 385, 386, 387,
833 388, 389, 390, 577, 391, 578, 392, 393, 394, 537,
834 533, 534, 535, 569, 570, 571, 572, 600, 99, 439,
835 279, 31, 280, 371, 281, 282, 283, 482, 7, 16,
836 17, 18, 19, 20, 284, 285, 286, 21, 33, 175,
837 176, 320, 321, 322, 177, 77, 178, 232, 233, 346,
838 428, 431, 499, 179, 236, 180, 239, 351, 435, 181,
839 438, 182, 244, 245, 357, 440, 183, 247, 586, 641,
840 648, 649, 656, 608, 625, 184, 509, 441, 548, 549,
841 460, 185, 363, 450, 558, 559, 186, 187, 188, 189,
842 190, 258, 452, 453, 515, 191, 262, 263, 264, 192,
843 464, 465, 466, 525, 526, 590, 617, 467, 193, 290,
844 194, 293, 195, 196, 197, 198, 199, 200, 201, 202,
845 531, 593, 612, 621, 629, 637
846 };
847
848 static const short yypact[] = { 66,
849 -32768, 25, 20, -12, 117,-32768,-32768,-32768, 53, 63,
850 -32768,-32768,-32768,-32768,-32768, 71,-32768,-32768,-32768,-32768,
851 -32768, 77,-32768,-32768, 86,-32768,-32768, 92, 68, 82,
852 -32768, 108,-32768, 121, 78,-32768,-32768,-32768, 630, 152,
853 85, 156, 175, 147,-32768,-32768,-32768,-32768,-32768,-32768,
854 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
855 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
856 161, 188,-32768,-32768,-32768,-32768,-32768,-32768, 893, 113,
857 -32768,-32768,-32768,-32768,-32768, 164, 165, 701,-32768, 5,
858 -32768,-32768, 167, 190, 15,-32768, 169,-32768,-32768, 1989,
859 195, 701,-32768,-32768,-32768, 701,-32768,-32768, 2045,-32768,
860 -32768, 217, 93,-32768, 216, 205, 207,-32768, -2, -1,
861 -32768, 174,-32768, 224,-32768, 158, 151, 159, 159, 89,
862 148, 139, 1989, 1989, 1989, 1989, 1989, 128, -72, 557,
863 118, 191, 151, 158, 160, 1989, 1989, 1989, 1989, 112,
864 -32768,-32768, 42,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
865 1255,-32768,-32768, 1389,-32768,-32768,-32768,-32768,-32768, 1509,
866 -32768,-32768,-32768, 231, 240,-32768,-32768,-32768,-32768,-32768,
867 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
868 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
869 -32768,-32768, 242,-32768,-32768, 66,-32768,-32768, 243,-32768,
870 -32768,-32768,-32768,-32768, 92,-32768, 175, 244,-32768, 1989,
871 238, 245, 225, 1989, 246, 229, 248, 200, 175, 1989,
872 -32768,-32768, 181, 1989,-32768,-32768, 1989,-32768, 182, 182,
873 253, 254,-32768,-32768, 177, 260, 186, 218, 238, 239,
874 1749, 238, 238, 238, 238, 265,-32768,-32768, 267, 268,
875 272,-32768, 192, 197,-32768,-32768,-32768,-32768,-32768,-32768,
876 183,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
877 -32768,-32768,-32768,-32768,-32768,-32768, 170, 276,-32768, 1989,
878 281,-32768, 1989,-32768,-32768, 1989, 238, 238, 238, 238,
879 1989, 1037,-32768,-32768,-32768, 264, 168, 282, 79,-32768,
880 1629,-32768, 283, 1989, 1989, 238, 1989,-32768,-32768,-32768,
881 -32768, 288,-32768,-32768, 2102, 284,-32768,-32768, 44,-32768,
882 290, 175, 238,-32768,-32768, 1989, 238,-32768, 1989, 1989,
883 175, 129,-32768, 1989,-32768, 222,-32768,-32768, 1989,-32768,
884 220, 219, 557, 557, 294,-32768,-32768, 557, 1989, 302,
885 557,-32768, 211, 238, 557, 1121, 1121, 1121,-32768,-32768,
886 315,-32768,-32768, 557, 557, 238, 557, 238, 238, -9,
887 1989,-32768, 238, -24, 12,-32768,-32768,-32768,-32768, 312,
888 305,-32768,-32768,-32768, 13, 557, 1989,-32768, 557,-32768,
889 242,-32768, 295,-32768, 238, 238, 238, 322, 1989,-32768,
890 323,-32768,-32768, 175,-32768, 111, 319, 318, 238, 238,
891 -32768, 320, 132,-32768,-32768,-32768,-32768,-32768, 325,-32768,
892 250,-32768, 1989,-32768,-32768, 1989,-32768,-32768,-32768, 326,
893 321, 327, 557, 133, -3, 557,-32768, 232,-32768,-32768,
894 90, 134,-32768,-32768, 238,-32768, 231, 331, 137,-32768,
895 138, 141,-32768, 324,-32768, 557, 221, 145, 146, 175,
896 238,-32768, 330, 238,-32768, 1037, 334,-32768,-32768, 238,
897 -32768,-32768, 557,-32768, 1989,-32768, 73,-32768,-32768, 332,
898 337,-32768,-32768, 242,-32768, 1121, 333,-32768,-32768,-32768,
899 -32768,-32768, 557,-32768, 340,-32768, 1989,-32768, 342, 321,
900 30,-32768,-32768,-32768,-32768, 557,-32768,-32768, 1121,-32768,
901 -32768,-32768, 557, 90, 335,-32768,-32768,-32768,-32768,-32768,
902 227, 55,-32768,-32768,-32768,-32768,-32768,-32768, 844,-32768,
903 1869, 238,-32768,-32768,-32768, 1989,-32768, 343, 347, 1121,
904 -32768,-32768, -4,-32768,-32768,-32768,-32768, 348,-32768,-32768,
905 206,-32768,-32768, 98, 557, 175, 350,-32768, 149,-32768,
906 -32768, 4, 238,-32768, 2239,-32768,-32768,-32768,-32768,-32768,
907 -32768,-32768, 353, 275,-32768, 269, 30,-32768, 311,-32768,
908 -32768,-32768, 235, 365, 27,-32768,-32768,-32768,-32768,-32768,
909 -32768,-32768,-32768,-32768, 364, 366,-32768,-32768,-32768, 557,
910 557, 241, 368,-32768, 557, 20, 369,-32768,-32768, 557,
911 249, 27, 370,-32768, 150, 557,-32768, 372, 255, 153,
912 293, 20,-32768,-32768, 1121, 379,-32768,-32768, 352,-32768,
913 298,-32768, 154, 557, 388, 300,-32768,-32768, 303,-32768,
914 390, 557, 374, 306,-32768,-32768,-32768, 162, 394, 378,
915 -32768, 557, 398, 163, 557,-32768, 166,-32768, 415, 417,
916 -32768
917 };
918
919 static const short yypgoto[] = { -14,
920 -32768,-32768,-32768, 212,-32768,-32768,-32768,-32768,-32768,-32768,
921 -32768,-32768, 338,-32768, -22,-32768, 328,-32768,-32768, 94,
922 -32768,-32768,-32768, -94,-32768, -122,-32768,-32768, -219, 6,
923 11,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 257,-32768,
924 -113,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
925 -32768,-32768,-32768,-32768,-32768,-32768, -192,-32768, -47,-32768,
926 -32768,-32768,-32768,-32768,-32768, -144, 109,-32768,-32768,-32768,
927 -32768,-32768,-32768, -189, -161, -138,-32768,-32768,-32768, -44,
928 -23,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -586,-32768,
929 420, 409,-32768,-32768,-32768,-32768,-32768, 223, 569, 0,
930 -32, 46, -290,-32768,-32768, -101,-32768, 296,-32768,-32768,
931 -32768,-32768,-32768,-32768, 299,-32768, 316, 201,-32768,-32768,
932 -32768,-32768,-32768,-32768,-32768, -341,-32768,-32768,-32768,-32768,
933 -32768,-32768,-32768,-32768,-32768,-32768,-32768, -346, -106, -364,
934 -71,-32768,-32768,-32768,-32768, -140,-32768,-32768,-32768,-32768,
935 -32768,-32768, -177, -67, -74,-32768,-32768, 187, 194,-32768,
936 -32768, -70,-32768,-32768, -111,-32768,-32768, -139,-32768,-32768,
937 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
938 -32768,-32768,-32768,-32768,-32768,-32768
939 };
940
941
942 #define YYLAST 2307
943
944
945 static const short yytable[] = { 3,
946 287, 459, 461, 462, 30, 153, 75, 211, 302, 342,
947 250, 444, 442, 302, 302, 93, 73, 473, 402, 106,
948 45, 13, 94, 9, 259, 260, -141, 34, 334, 624,
949 475, 220, 224, 13, -141, 5, 476, 474, 10, 252,
950 253, 254, 255, 597, 302, 642, 75, 101, 8, 12,
951 261, 297, 298, 299, 300, 75, 221, 221, 414, 302,
952 415, 13, 101, -10, 107, 303, 598, 599, 567, 75,
953 102, 1, 302, 75, 4, 316, 210, 13, 23, 204,
954 42, 14, 15, 205, 76, 319, 81, 26, 24, 507,
955 302, 319, 206, 401, 28, 278, 584, 1, 13, 510,
956 36, 505, 14, 15, 222, 225, 227, 343, 209, 29,
957 484, 347, 417, 93, 348, 35, 1, 13, 45, 13,
958 94, 268, 269, 13, 92, 333, 37, 14, 15, 337,
959 39, 470, 495, 271, 38, 212, 213, 214, 79, 34,
960 555, 556, 557, 414, 319, 425, 494, 503, 516, 506,
961 517, 519, 519, 520, 521, 519, 364, 522, 216, 516,
962 516, 528, 529, 595, 632, 596, 633, 595, 519, 638,
963 650, 231, 235, 238, 238, 243, 503, 503, 661, 666,
964 503, 13, 668, 257, 241, 242, 289, 292, 235, 231,
965 472, 327, 324, 372, 373, 376, 543, 468, 378, 469,
966 78, 379, 85, 546, -11, 3, 380, 398, 399, 512,
967 513, 45, 13, 109, 34, 83, 364, 421, 203, 405,
968 406, 426, 407, 211, 588, 589, 432, 223, 226, 84,
969 -203, 217, 103, 104, 218, 108, 219, 111, 228, 229,
970 234, 419, 230, 237, 420, 248, 256, 246, 288, 296,
971 291, 301, 317, 318, 319, 302, 325, 395, 336, 332,
972 335, 338, 339, 340, 445, 341, 344, 349, 353, 354,
973 643, 455, 455, 455, 355, 358, 359, 360, 345, 361,
974 365, 536, 366, 367, 350, 350, 471, 368, 396, 260,
975 356, 375, 210, 259, 374, 362, 377, 397, 400, 404,
976 410, 34, 480, 408, 413, 658, 409, 416, 429, 443,
977 500, 433, 436, 501, 487, 664, 447, 446, 667, 448,
978 451, 456, 456, 456, 463, 477, 478, 45, 485, 278,
979 451, 488, 451, 414, 492, 503, 493, 497, 523, 568,
980 496, 511, 502, 504, 518, 532, 527, 539, 550, 565,
981 544, 479, 34, 34, 481, 545, 552, 34, 554, 582,
982 34, 519, 587, 594, 34, 458, 458, 458, 566, 604,
983 605, 610, 606, 34, 34, 486, 34, 611, 613, 615,
984 568, 616, 622, 626, 620, 645, 631, 635, 639, 427,
985 542, 430, 491, 628, 644, 34, 434, 437, 34, 646,
986 636, 455, 568, 652, 653, 654, 657, 659, 449, 662,
987 660, 663, 553, 665, 670, 34, 671, 323, 412, 489,
988 313, 524, 110, 581, 455, 105, 490, 580, 538, 568,
989 603, 395, 630, 614, 602, 27, 32, 328, 540, 295,
990 352, 294, 34, 583, 240, 34, 609, 562, 560, 564,
991 370, 456, 563, 591, 0, 455, 369, 0, 551, 0,
992 0, 0, 0, 0, 0, 34, 0, 0, 0, 541,
993 618, 451, 0, 0, 456, 34, 498, 0, 278, 0,
994 0, 0, 34, 0, 0, 0, 634, 0, 0, 0,
995 0, 508, 0, 0, 579, 458, 514, 0, 0, 0,
996 0, 0, 34, 561, 0, 456, 0, 0, 0, 0,
997 0, 0, 0, 0, 0, 34, 0, 0, 458, 0,
998 524, 0, 34, 0, 0, 0, 0, 0, 486, 0,
999 579, 0, 0, 0, 0, 0, 0, 0, 34, 0,
1000 455, 547, 0, 0, 0, 0, 0, 0, 0, 458,
1001 0, 0, 0, 0, 0, 0, 0, 0, 0, 265,
1002 266, 267, 1, 13, 34, 278, 619, 268, 269, 514,
1003 623, 0, 270, 22, 34, 627, 0, 574, 0, 271,
1004 0, 278, 0, 0, 22, 0, 0, 0, 272, 0,
1005 456, 0, 0, 0, 0, 547, 0, 0, 585, 651,
1006 0, 0, 273, 274, 0, 0, 0, 74, 0, 34,
1007 34, 82, 0, 0, 34, 0, 0, 601, 574, 34,
1008 0, 0, 0, 275, 276, 34, 0, 0, 0, 0,
1009 44, 607, 0, 0, 458, 45, 13, 0, 0, 0,
1010 574, 0, 0, 34, 0, 0, 0, 74, 100, 0,
1011 0, 34, 0, 0, 0, 0, 74, 0, 0, 0,
1012 0, 34, 0, 100, 34, 0, 0, 574, 174, 0,
1013 74, 0, 0, 0, 74, 0, 640, 0, 0, 0,
1014 0, 0, 0, 0, 0, 0, 647, 0, 0, 0,
1015 0, 0, 0, 0, 655, 0, 0, 0, -205, 0,
1016 0, 251, 174, 174, 174, 174, 45, 13, 0, 0,
1017 0, 0, 0, 46, 174, 174, 174, 174, 47, 0,
1018 48, 0, 49, 0, 50, 0, 0, 0, 51, 311,
1019 0, 0, 311, 0, 0, 52, 0, 53, 174, 0,
1020 0, 0, 0, 54, 55, 56, 57, 58, 0, 0,
1021 0, 59, 0, 60, 0, 0, 0, 0, 61, 62,
1022 0, 63, 64, 65, 66, 67, 68, 69, 70, 0,
1023 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1024 0, 0, 0, 0, 46, 331, 0, 0, 174, 47,
1025 0, 48, 174, 49, 0, 50, 0, 331, 251, 51,
1026 0, 0, 251, 0, 0, 251, 52, 0, 53, 0,
1027 0, 0, 0, 0, 54, 55, 56, 57, 58, 174,
1028 0, 0, 59, 0, 60, 0, 0, 0, 0, 61,
1029 62, 0, 63, 64, 65, 66, 67, 68, 69, 70,
1030 0, 0, 0, 0, 0, 0, 265, 266, 267, 1,
1031 13, 0, 0, 0, 268, 269, 0, 0, 174, 270,
1032 0, 174, 0, 0, 174, 575, 271, 0, 0, 174,
1033 0, 0, 0, 0, 0, 272, 0, 0, 0, 174,
1034 0, 0, 174, 174, 0, 174, 0, 0, 0, 273,
1035 274, 0, 0, 86, 0, 0, 0, 0, 45, 13,
1036 331, 576, 0, 0, 174, 0, 0, 174, 251, 424,
1037 275, 276, 251, 0, 0, 0, 0, 251, 0, 0,
1038 0, 0, 0, 0, 0, 0, 0, 174, 0, 0,
1039 0, 0, 0, 0, 457, 457, 457, 0, 0, 0,
1040 0, 0, 0, 0, 0, 0, 0, 0, 0, 174,
1041 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1042 0, -205, 0, 0, 0, 174, 0, 483, 0, 0,
1043 0, 0, 0, 0, 0, 0, 46, 174, 0, 0,
1044 0, 47, 331, 48, 0, 49, 0, 50, 0, 0,
1045 0, 51, 0, 0, 0, 0, 0, 0, 52, 0,
1046 53, 251, 0, 0, 251, 0, 54, 55, 56, 57,
1047 58, 0, 0, 0, 59, 0, 60, 0, 0, 0,
1048 0, 61, 62, 0, 63, 64, 65, 66, 67, 68,
1049 69, 70, 0, 0, 0, 0, 0, 0, 530, 265,
1050 266, 267, 1, 13, 0, 0, 0, 268, 269, 0,
1051 0, 0, 270, 174, 0, 0, 0, 0, 0, 271,
1052 0, 0, 0, 0, 457, 0, 0, 0, 272, 0,
1053 0, 0, 0, 0, 0, 174, 0, 0, 0, 0,
1054 0, 0, 273, 274, 0, 0, 0, 457, 0, 0,
1055 0, 0, 381, 382, 0, 221, 383, 384, 0, 0,
1056 573, 0, 0, 275, 276, 0, 0, 0, 0, 311,
1057 0, 0, 0, 0, 251, 0, 0, 0, 457, 0,
1058 0, 0, 0, 265, 266, 267, 112, 13, 0, 82,
1059 0, 268, 269, 0, 592, 0, 270, 0, 0, 0,
1060 113, 0, 0, 271, 0, 0, 0, 114, 115, 116,
1061 0, 117, 454, 119, 0, 120, 0, 121, 122, 123,
1062 0, 0, 0, 573, 0, 0, 273, 274, 0, 0,
1063 0, 0, 124, 0, 0, 125, 0, 0, 0, 0,
1064 0, 0, 0, 0, 0, 0, 0, 275, 276, 0,
1065 573, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1066 0, 0, 0, 457, 126, 0, 0, 0, 0, 127,
1067 0, 128, 0, 129, 0, 130, 0, 0, 0, 131,
1068 0, 0, 0, 0, 0, 0, 132, 0, 133, 0,
1069 0, 0, 0, 0, 134, 135, 136, 137, 138, 0,
1070 0, 0, 139, 0, 140, 0, 0, 0, 0, 141,
1071 142, 0, 143, 144, 145, 146, 147, 148, 149, 150,
1072 112, 13, 0, 0, 0, 0, 0, 0, 0, 0,
1073 0, 305, 0, 0, 113, 0, 0, 0, 0, 0,
1074 0, 114, 115, 116, 0, 117, 118, 119, 0, 120,
1075 0, 121, 122, 123, 0, 0, 306, 0, 0, 0,
1076 0, 0, 0, 0, 0, 0, 124, 0, 0, 125,
1077 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1078 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1079 0, 0, 0, 0, 0, 0, 0, 0, 126, 0,
1080 0, 0, 0, 127, 0, 128, 0, 129, 0, 130,
1081 0, 0, 0, 131, 0, 0, 0, 0, 0, 0,
1082 132, 0, 133, 0, 0, 0, 0, 0, 134, 135,
1083 136, 137, 138, 0, 0, 0, 139, 0, 140, 0,
1084 0, 0, 0, 141, 142, 0, 143, 144, 145, 146,
1085 147, 148, 149, 150, 112, 13, 0, 0, 0, 0,
1086 0, 0, 0, 0, 0, 312, 0, 0, 113, 0,
1087 0, 0, 0, 0, 0, 114, 115, 116, 0, 117,
1088 118, 119, 0, 120, 0, 121, 122, 123, 0, 0,
1089 306, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1090 124, 0, 0, 125, 0, 0, 0, 0, 0, 0,
1091 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1092 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1093 0, 0, 126, 0, 0, 0, 0, 127, 0, 128,
1094 0, 129, 0, 130, 0, 0, 0, 131, 0, 0,
1095 0, 0, 0, 0, 132, 0, 133, 0, 0, 0,
1096 0, 0, 134, 135, 136, 137, 138, 0, 0, 0,
1097 139, 0, 140, 0, 112, 13, 0, 141, 142, 0,
1098 143, 144, 145, 146, 147, 148, 149, 150, 113, 0,
1099 0, 0, 0, 0, 0, 114, 115, 116, 0, 117,
1100 118, 119, 0, 120, 314, 121, 122, 123, 0, 0,
1101 0, 0, 0, 0, 0, 0, 0, 0, 0, 315,
1102 124, 0, 0, 125, 0, 0, 0, 0, 0, 0,
1103 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1104 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1105 0, 0, 126, 0, 0, 0, 0, 127, 0, 128,
1106 0, 129, 0, 130, 0, 0, 0, 131, 0, 0,
1107 0, 0, 0, 0, 132, 0, 133, 0, 0, 0,
1108 0, 0, 134, 135, 136, 137, 138, 0, 0, 0,
1109 139, 0, 140, 0, 112, 13, 0, 141, 142, 0,
1110 143, 144, 145, 146, 147, 148, 149, 150, 113, 0,
1111 317, 0, 0, 0, 0, 114, 115, 116, 0, 117,
1112 118, 119, 0, 120, 0, 121, 122, 123, 0, 0,
1113 403, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1114 124, 0, 0, 125, 0, 0, 0, 0, 0, 0,
1115 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1116 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1117 0, 0, 126, 0, 0, 0, 0, 127, 0, 128,
1118 0, 129, 0, 130, 0, 0, 0, 131, 0, 0,
1119 0, 0, 0, 0, 132, 0, 133, 0, 0, 0,
1120 0, 0, 134, 135, 136, 137, 138, 0, 0, 0,
1121 139, 0, 140, 0, 112, 13, 0, 141, 142, 0,
1122 143, 144, 145, 146, 147, 148, 149, 150, 113, 0,
1123 317, 0, 0, 0, 0, 114, 115, 116, 0, 117,
1124 118, 119, 0, 120, 0, 121, 122, 123, 0, 0,
1125 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1126 124, 0, 0, 125, 0, 0, 0, 0, 0, 0,
1127 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1128 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1129 0, 0, 126, 0, 0, 0, 0, 127, 0, 128,
1130 0, 129, 0, 130, 0, 0, 0, 131, 0, 0,
1131 0, 0, 0, 0, 132, 0, 133, 0, 0, 0,
1132 0, 0, 134, 135, 136, 137, 138, 0, 0, 0,
1133 139, 0, 140, 0, 112, 13, 0, 141, 142, 0,
1134 143, 144, 145, 146, 147, 148, 149, 150, 113, 0,
1135 0, 0, 0, 0, 0, 114, 115, 116, 0, 117,
1136 118, 119, 0, 120, 0, 121, 122, 123, 0, 0,
1137 306, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1138 124, 0, 0, 125, 0, 0, 0, 0, 0, 0,
1139 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1140 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1141 0, 0, 126, 0, 0, 0, 0, 127, 0, 128,
1142 0, 129, 0, 130, 0, 0, 0, 131, 0, 0,
1143 0, 0, 0, 0, 132, 0, 133, 0, 0, 0,
1144 0, 0, 134, 135, 136, 137, 138, 0, 0, 0,
1145 139, 0, 140, 0, 112, 13, 0, 141, 142, 0,
1146 143, 144, 145, 146, 147, 148, 149, 150, 113, 0,
1147 0, 0, 0, 0, 0, 114, 115, 116, 0, 117,
1148 118, 119, 0, 120, 0, 121, 122, 123, 0, 0,
1149 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1150 124, 0, 0, 125, 0, 0, 0, 0, 0, 0,
1151 112, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1152 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1153 0, 0, 126, 0, 0, 0, 0, 127, 0, 128,
1154 0, 129, 0, 130, 0, 0, 0, 131, 0, 0,
1155 0, 0, 207, 0, 132, 0, 133, 0, 0, 0,
1156 0, 0, 134, 135, 136, 137, 138, 45, 0, 0,
1157 139, 0, 140, 0, 0, 0, 0, 141, 142, 0,
1158 143, 144, 145, 146, 147, 148, 149, 150, 46, 0,
1159 0, 0, 0, 47, 0, 48, 0, 49, 0, 50,
1160 0, 0, 0, 51, 0, 0, 0, 0, 0, 0,
1161 52, 0, 53, 0, 0, 0, 0, 0, 54, 55,
1162 56, 57, 58, 0, 0, 0, 59, 0, 60, 0,
1163 0, 0, 0, 61, 62, 0, 63, 64, 65, 66,
1164 67, 68, 69, 70, 0, 46, 0, 0, 0, 0,
1165 47, 0, 48, 0, 49, 0, 50, 0, 0, 0,
1166 51, 0, 0, 0, 0, 0, 0, 52, 0, 53,
1167 0, 0, 0, 0, 0, 54, 55, 56, 57, 58,
1168 0, 0, 0, 59, 0, 60, 0, 0, 0, 0,
1169 61, 62, 0, 63, 64, 65, 66, 67, 68, 69,
1170 70, 265, 266, 267, 1, 13, 0, 0, 0, 268,
1171 269, 0, 0, 0, 270, 0, 0, 0, 0, 0,
1172 0, 271, 0, 0, 0, 0, 0, 0, 0, 0,
1173 272, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1174 0, 0, 0, 0, 273, 274, 0, 0, 0, 0,
1175 0, 0, 0, 0, 0, 0, 576, 0, 0, 0,
1176 0, 0, 0, 0, 0, 275, 276
1177 };
1178
1179 static const short yycheck[] = { 0,
1180 140, 366, 367, 368, 28, 100, 39, 109, 18, 229,
1181 133, 358, 354, 18, 18, 1, 39, 42, 309, 15,
1182 6, 7, 8, 36, 97, 98, 14, 28, 221, 616,
1183 19, 34, 34, 7, 22, 16, 25, 62, 51, 134,
1184 135, 136, 137, 40, 18, 632, 79, 80, 3, 4,
1185 123, 146, 147, 148, 149, 88, 59, 59, 15, 18,
1186 17, 7, 95, 49, 60, 24, 63, 64, 14, 102,
1187 85, 6, 18, 106, 50, 170, 109, 7, 26, 102,
1188 35, 11, 12, 106, 39, 13, 41, 17, 26, 93,
1189 18, 13, 107, 15, 18, 140, 101, 6, 7, 446,
1190 19, 443, 11, 12, 119, 120, 121, 230, 109, 24,
1191 401, 234, 332, 1, 237, 48, 6, 7, 6, 7,
1192 8, 11, 12, 7, 79, 220, 19, 11, 12, 224,
1193 53, 141, 423, 23, 14, 43, 44, 45, 54, 140,
1194 111, 112, 113, 15, 13, 17, 15, 15, 15, 17,
1195 17, 15, 15, 17, 17, 15, 251, 17, 113, 15,
1196 15, 17, 17, 15, 15, 17, 17, 15, 15, 17,
1197 17, 126, 127, 128, 129, 130, 15, 15, 17, 17,
1198 15, 7, 17, 138, 96, 97, 141, 142, 143, 144,
1199 383, 215, 207, 11, 12, 290, 487, 375, 293, 377,
1200 49, 296, 15, 494, 49, 206, 301, 40, 41, 120,
1201 121, 6, 7, 24, 215, 69, 311, 340, 24, 314,
1202 315, 344, 317, 325, 127, 128, 349, 119, 120, 69,
1203 14, 16, 69, 69, 30, 69, 30, 69, 65, 16,
1204 90, 336, 85, 85, 339, 107, 119, 100, 131, 90,
1205 60, 140, 22, 14, 13, 18, 14, 302, 34, 16,
1206 16, 16, 34, 16, 359, 66, 86, 86, 16, 16,
1207 635, 366, 367, 368, 98, 16, 91, 60, 233, 41,
1208 16, 474, 16, 16, 239, 240, 381, 16, 303, 98,
1209 245, 16, 325, 97, 125, 250, 16, 34, 17, 17,
1210 13, 302, 397, 318, 21, 652, 321, 18, 87, 16,
1211 433, 92, 94, 436, 409, 662, 361, 16, 665, 109,
1212 365, 366, 367, 368, 10, 14, 22, 6, 34, 374,
1213 375, 9, 377, 15, 17, 15, 17, 88, 15, 532,
1214 16, 110, 17, 17, 14, 16, 126, 14, 16, 15,
1215 19, 396, 353, 354, 399, 19, 17, 358, 17, 17,
1216 361, 15, 15, 14, 365, 366, 367, 368, 142, 17,
1217 96, 61, 104, 374, 375, 408, 377, 143, 14, 16,
1218 573, 16, 15, 15, 144, 34, 17, 16, 96, 344,
1219 485, 346, 416, 145, 16, 396, 351, 352, 399, 102,
1220 146, 496, 595, 16, 105, 103, 17, 34, 363, 16,
1221 105, 34, 507, 16, 0, 416, 0, 206, 325, 414,
1222 164, 466, 95, 546, 519, 88, 416, 541, 476, 622,
1223 575, 476, 622, 595, 573, 16, 28, 215, 483, 144,
1224 240, 143, 443, 550, 129, 446, 587, 519, 516, 524,
1225 264, 496, 523, 565, -1, 550, 263, -1, 503, -1,
1226 -1, -1, -1, -1, -1, 466, -1, -1, -1, 484,
1227 610, 516, -1, -1, 519, 476, 431, -1, 523, -1,
1228 -1, -1, 483, -1, -1, -1, 626, -1, -1, -1,
1229 -1, 446, -1, -1, 539, 496, 451, -1, -1, -1,
1230 -1, -1, 503, 518, -1, 550, -1, -1, -1, -1,
1231 -1, -1, -1, -1, -1, 516, -1, -1, 519, -1,
1232 565, -1, 523, -1, -1, -1, -1, -1, 561, -1,
1233 575, -1, -1, -1, -1, -1, -1, -1, 539, -1,
1234 635, 496, -1, -1, -1, -1, -1, -1, -1, 550,
1235 -1, -1, -1, -1, -1, -1, -1, -1, -1, 3,
1236 4, 5, 6, 7, 565, 610, 611, 11, 12, 524,
1237 615, -1, 16, 5, 575, 620, -1, 532, -1, 23,
1238 -1, 626, -1, -1, 16, -1, -1, -1, 32, -1,
1239 635, -1, -1, -1, -1, 550, -1, -1, 553, 644,
1240 -1, -1, 46, 47, -1, -1, -1, 39, -1, 610,
1241 611, 43, -1, -1, 615, -1, -1, 572, 573, 620,
1242 -1, -1, -1, 67, 68, 626, -1, -1, -1, -1,
1243 1, 586, -1, -1, 635, 6, 7, -1, -1, -1,
1244 595, -1, -1, 644, -1, -1, -1, 79, 80, -1,
1245 -1, 652, -1, -1, -1, -1, 88, -1, -1, -1,
1246 -1, 662, -1, 95, 665, -1, -1, 622, 100, -1,
1247 102, -1, -1, -1, 106, -1, 631, -1, -1, -1,
1248 -1, -1, -1, -1, -1, -1, 641, -1, -1, -1,
1249 -1, -1, -1, -1, 649, -1, -1, -1, 69, -1,
1250 -1, 133, 134, 135, 136, 137, 6, 7, -1, -1,
1251 -1, -1, -1, 84, 146, 147, 148, 149, 89, -1,
1252 91, -1, 93, -1, 95, -1, -1, -1, 99, 161,
1253 -1, -1, 164, -1, -1, 106, -1, 108, 170, -1,
1254 -1, -1, -1, 114, 115, 116, 117, 118, -1, -1,
1255 -1, 122, -1, 124, -1, -1, -1, -1, 129, 130,
1256 -1, 132, 133, 134, 135, 136, 137, 138, 139, -1,
1257 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1258 -1, -1, -1, -1, 84, 217, -1, -1, 220, 89,
1259 -1, 91, 224, 93, -1, 95, -1, 229, 230, 99,
1260 -1, -1, 234, -1, -1, 237, 106, -1, 108, -1,
1261 -1, -1, -1, -1, 114, 115, 116, 117, 118, 251,
1262 -1, -1, 122, -1, 124, -1, -1, -1, -1, 129,
1263 130, -1, 132, 133, 134, 135, 136, 137, 138, 139,
1264 -1, -1, -1, -1, -1, -1, 3, 4, 5, 6,
1265 7, -1, -1, -1, 11, 12, -1, -1, 290, 16,
1266 -1, 293, -1, -1, 296, 22, 23, -1, -1, 301,
1267 -1, -1, -1, -1, -1, 32, -1, -1, -1, 311,
1268 -1, -1, 314, 315, -1, 317, -1, -1, -1, 46,
1269 47, -1, -1, 1, -1, -1, -1, -1, 6, 7,
1270 332, 58, -1, -1, 336, -1, -1, 339, 340, 341,
1271 67, 68, 344, -1, -1, -1, -1, 349, -1, -1,
1272 -1, -1, -1, -1, -1, -1, -1, 359, -1, -1,
1273 -1, -1, -1, -1, 366, 367, 368, -1, -1, -1,
1274 -1, -1, -1, -1, -1, -1, -1, -1, -1, 381,
1275 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1276 -1, 69, -1, -1, -1, 397, -1, 399, -1, -1,
1277 -1, -1, -1, -1, -1, -1, 84, 409, -1, -1,
1278 -1, 89, 414, 91, -1, 93, -1, 95, -1, -1,
1279 -1, 99, -1, -1, -1, -1, -1, -1, 106, -1,
1280 108, 433, -1, -1, 436, -1, 114, 115, 116, 117,
1281 118, -1, -1, -1, 122, -1, 124, -1, -1, -1,
1282 -1, 129, 130, -1, 132, 133, 134, 135, 136, 137,
1283 138, 139, -1, -1, -1, -1, -1, -1, 470, 3,
1284 4, 5, 6, 7, -1, -1, -1, 11, 12, -1,
1285 -1, -1, 16, 485, -1, -1, -1, -1, -1, 23,
1286 -1, -1, -1, -1, 496, -1, -1, -1, 32, -1,
1287 -1, -1, -1, -1, -1, 507, -1, -1, -1, -1,
1288 -1, -1, 46, 47, -1, -1, -1, 519, -1, -1,
1289 -1, -1, 56, 57, -1, 59, 60, 61, -1, -1,
1290 532, -1, -1, 67, 68, -1, -1, -1, -1, 541,
1291 -1, -1, -1, -1, 546, -1, -1, -1, 550, -1,
1292 -1, -1, -1, 3, 4, 5, 6, 7, -1, 561,
1293 -1, 11, 12, -1, 566, -1, 16, -1, -1, -1,
1294 20, -1, -1, 23, -1, -1, -1, 27, 28, 29,
1295 -1, 31, 32, 33, -1, 35, -1, 37, 38, 39,
1296 -1, -1, -1, 595, -1, -1, 46, 47, -1, -1,
1297 -1, -1, 52, -1, -1, 55, -1, -1, -1, -1,
1298 -1, -1, -1, -1, -1, -1, -1, 67, 68, -1,
1299 622, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1300 -1, -1, -1, 635, 84, -1, -1, -1, -1, 89,
1301 -1, 91, -1, 93, -1, 95, -1, -1, -1, 99,
1302 -1, -1, -1, -1, -1, -1, 106, -1, 108, -1,
1303 -1, -1, -1, -1, 114, 115, 116, 117, 118, -1,
1304 -1, -1, 122, -1, 124, -1, -1, -1, -1, 129,
1305 130, -1, 132, 133, 134, 135, 136, 137, 138, 139,
1306 6, 7, -1, -1, -1, -1, -1, -1, -1, -1,
1307 -1, 17, -1, -1, 20, -1, -1, -1, -1, -1,
1308 -1, 27, 28, 29, -1, 31, 32, 33, -1, 35,
1309 -1, 37, 38, 39, -1, -1, 42, -1, -1, -1,
1310 -1, -1, -1, -1, -1, -1, 52, -1, -1, 55,
1311 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1312 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1313 -1, -1, -1, -1, -1, -1, -1, -1, 84, -1,
1314 -1, -1, -1, 89, -1, 91, -1, 93, -1, 95,
1315 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
1316 106, -1, 108, -1, -1, -1, -1, -1, 114, 115,
1317 116, 117, 118, -1, -1, -1, 122, -1, 124, -1,
1318 -1, -1, -1, 129, 130, -1, 132, 133, 134, 135,
1319 136, 137, 138, 139, 6, 7, -1, -1, -1, -1,
1320 -1, -1, -1, -1, -1, 17, -1, -1, 20, -1,
1321 -1, -1, -1, -1, -1, 27, 28, 29, -1, 31,
1322 32, 33, -1, 35, -1, 37, 38, 39, -1, -1,
1323 42, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1324 52, -1, -1, 55, -1, -1, -1, -1, -1, -1,
1325 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1326 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1327 -1, -1, 84, -1, -1, -1, -1, 89, -1, 91,
1328 -1, 93, -1, 95, -1, -1, -1, 99, -1, -1,
1329 -1, -1, -1, -1, 106, -1, 108, -1, -1, -1,
1330 -1, -1, 114, 115, 116, 117, 118, -1, -1, -1,
1331 122, -1, 124, -1, 6, 7, -1, 129, 130, -1,
1332 132, 133, 134, 135, 136, 137, 138, 139, 20, -1,
1333 -1, -1, -1, -1, -1, 27, 28, 29, -1, 31,
1334 32, 33, -1, 35, 36, 37, 38, 39, -1, -1,
1335 -1, -1, -1, -1, -1, -1, -1, -1, -1, 51,
1336 52, -1, -1, 55, -1, -1, -1, -1, -1, -1,
1337 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1338 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1339 -1, -1, 84, -1, -1, -1, -1, 89, -1, 91,
1340 -1, 93, -1, 95, -1, -1, -1, 99, -1, -1,
1341 -1, -1, -1, -1, 106, -1, 108, -1, -1, -1,
1342 -1, -1, 114, 115, 116, 117, 118, -1, -1, -1,
1343 122, -1, 124, -1, 6, 7, -1, 129, 130, -1,
1344 132, 133, 134, 135, 136, 137, 138, 139, 20, -1,
1345 22, -1, -1, -1, -1, 27, 28, 29, -1, 31,
1346 32, 33, -1, 35, -1, 37, 38, 39, -1, -1,
1347 42, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1348 52, -1, -1, 55, -1, -1, -1, -1, -1, -1,
1349 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1350 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1351 -1, -1, 84, -1, -1, -1, -1, 89, -1, 91,
1352 -1, 93, -1, 95, -1, -1, -1, 99, -1, -1,
1353 -1, -1, -1, -1, 106, -1, 108, -1, -1, -1,
1354 -1, -1, 114, 115, 116, 117, 118, -1, -1, -1,
1355 122, -1, 124, -1, 6, 7, -1, 129, 130, -1,
1356 132, 133, 134, 135, 136, 137, 138, 139, 20, -1,
1357 22, -1, -1, -1, -1, 27, 28, 29, -1, 31,
1358 32, 33, -1, 35, -1, 37, 38, 39, -1, -1,
1359 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1360 52, -1, -1, 55, -1, -1, -1, -1, -1, -1,
1361 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1362 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1363 -1, -1, 84, -1, -1, -1, -1, 89, -1, 91,
1364 -1, 93, -1, 95, -1, -1, -1, 99, -1, -1,
1365 -1, -1, -1, -1, 106, -1, 108, -1, -1, -1,
1366 -1, -1, 114, 115, 116, 117, 118, -1, -1, -1,
1367 122, -1, 124, -1, 6, 7, -1, 129, 130, -1,
1368 132, 133, 134, 135, 136, 137, 138, 139, 20, -1,
1369 -1, -1, -1, -1, -1, 27, 28, 29, -1, 31,
1370 32, 33, -1, 35, -1, 37, 38, 39, -1, -1,
1371 42, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1372 52, -1, -1, 55, -1, -1, -1, -1, -1, -1,
1373 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1374 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1375 -1, -1, 84, -1, -1, -1, -1, 89, -1, 91,
1376 -1, 93, -1, 95, -1, -1, -1, 99, -1, -1,
1377 -1, -1, -1, -1, 106, -1, 108, -1, -1, -1,
1378 -1, -1, 114, 115, 116, 117, 118, -1, -1, -1,
1379 122, -1, 124, -1, 6, 7, -1, 129, 130, -1,
1380 132, 133, 134, 135, 136, 137, 138, 139, 20, -1,
1381 -1, -1, -1, -1, -1, 27, 28, 29, -1, 31,
1382 32, 33, -1, 35, -1, 37, 38, 39, -1, -1,
1383 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1384 52, -1, -1, 55, -1, -1, -1, -1, -1, -1,
1385 6, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1386 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1387 -1, -1, 84, -1, -1, -1, -1, 89, -1, 91,
1388 -1, 93, -1, 95, -1, -1, -1, 99, -1, -1,
1389 -1, -1, 48, -1, 106, -1, 108, -1, -1, -1,
1390 -1, -1, 114, 115, 116, 117, 118, 6, -1, -1,
1391 122, -1, 124, -1, -1, -1, -1, 129, 130, -1,
1392 132, 133, 134, 135, 136, 137, 138, 139, 84, -1,
1393 -1, -1, -1, 89, -1, 91, -1, 93, -1, 95,
1394 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
1395 106, -1, 108, -1, -1, -1, -1, -1, 114, 115,
1396 116, 117, 118, -1, -1, -1, 122, -1, 124, -1,
1397 -1, -1, -1, 129, 130, -1, 132, 133, 134, 135,
1398 136, 137, 138, 139, -1, 84, -1, -1, -1, -1,
1399 89, -1, 91, -1, 93, -1, 95, -1, -1, -1,
1400 99, -1, -1, -1, -1, -1, -1, 106, -1, 108,
1401 -1, -1, -1, -1, -1, 114, 115, 116, 117, 118,
1402 -1, -1, -1, 122, -1, 124, -1, -1, -1, -1,
1403 129, 130, -1, 132, 133, 134, 135, 136, 137, 138,
1404 139, 3, 4, 5, 6, 7, -1, -1, -1, 11,
1405 12, -1, -1, -1, 16, -1, -1, -1, -1, -1,
1406 -1, 23, -1, -1, -1, -1, -1, -1, -1, -1,
1407 32, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1408 -1, -1, -1, -1, 46, 47, -1, -1, -1, -1,
1409 -1, -1, -1, -1, -1, -1, 58, -1, -1, -1,
1410 -1, -1, -1, -1, -1, 67, 68
1411 };
1412 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
1413 #line 3 "/usr/local/lib/bison.simple"
1414
1415 /* Skeleton output parser for bison,
1416 Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
1417
1418 This program is free software; you can redistribute it and/or modify
1419 it under the terms of the GNU General Public License as published by
1420 the Free Software Foundation; either version 2, or (at your option)
1421 any later version.
1422
1423 This program is distributed in the hope that it will be useful,
1424 but WITHOUT ANY WARRANTY; without even the implied warranty of
1425 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1426 GNU General Public License for more details.
1427
1428 You should have received a copy of the GNU General Public License
1429 along with this program; if not, write to the Free Software
1430 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
1431
1432 /* As a special exception, when this file is copied by Bison into a
1433 Bison output file, you may use that output file without restriction.
1434 This special exception was added by the Free Software Foundation
1435 in version 1.24 of Bison. */
1436
1437 #ifndef alloca
1438 #ifdef __GNUC__
1439 #define alloca __builtin_alloca
1440 #else /* not GNU C. */
1441 #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
1442 #include <alloca.h>
1443 #else /* not sparc */
1444 #if defined (MSDOS) && !defined (__TURBOC__)
1445 #include <malloc.h>
1446 #else /* not MSDOS, or __TURBOC__ */
1447 #if defined(_AIX)
1448 #include <malloc.h>
1449 #pragma alloca
1450 #else /* not MSDOS, __TURBOC__, or _AIX */
1451 #ifdef __hpux
1452 #ifdef __cplusplus
1453 extern "C" {
1454 void *alloca (unsigned int);
1455 };
1456 #else /* not __cplusplus */
1457 void *alloca ();
1458 #endif /* not __cplusplus */
1459 #endif /* __hpux */
1460 #endif /* not _AIX */
1461 #endif /* not MSDOS, or __TURBOC__ */
1462 #endif /* not sparc. */
1463 #endif /* not GNU C. */
1464 #endif /* alloca not defined. */
1465
1466 /* This is the parser code that is written into each bison parser
1467 when the %semantic_parser declaration is not specified in the grammar.
1468 It was written by Richard Stallman by simplifying the hairy parser
1469 used when %semantic_parser is specified. */
1470
1471 /* Note: there must be only one dollar sign in this file.
1472 It is replaced by the list of actions, each action
1473 as one case of the switch. */
1474
1475 #define yyerrok (yyerrstatus = 0)
1476 #define yyclearin (yychar = YYEMPTY)
1477 #define YYEMPTY -2
1478 #define YYEOF 0
1479 #define YYACCEPT return(0)
1480 #define YYABORT return(1)
1481 #define YYERROR goto yyerrlab1
1482 /* Like YYERROR except do call yyerror.
1483 This remains here temporarily to ease the
1484 transition to the new meaning of YYERROR, for GCC.
1485 Once GCC version 2 has supplanted version 1, this can go. */
1486 #define YYFAIL goto yyerrlab
1487 #define YYRECOVERING() (!!yyerrstatus)
1488 #define YYBACKUP(token, value) \
1489 do \
1490 if (yychar == YYEMPTY && yylen == 1) \
1491 { yychar = (token), yylval = (value); \
1492 yychar1 = YYTRANSLATE (yychar); \
1493 YYPOPSTACK; \
1494 goto yybackup; \
1495 } \
1496 else \
1497 { yyerror ("syntax error: cannot back up"); YYERROR; } \
1498 while (0)
1499
1500 #define YYTERROR 1
1501 #define YYERRCODE 256
1502
1503 #ifndef YYPURE
1504 #define YYLEX yylex()
1505 #endif
1506
1507 #ifdef YYPURE
1508 #ifdef YYLSP_NEEDED
1509 #ifdef YYLEX_PARAM
1510 #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
1511 #else
1512 #define YYLEX yylex(&yylval, &yylloc)
1513 #endif
1514 #else /* not YYLSP_NEEDED */
1515 #ifdef YYLEX_PARAM
1516 #define YYLEX yylex(&yylval, YYLEX_PARAM)
1517 #else
1518 #define YYLEX yylex(&yylval)
1519 #endif
1520 #endif /* not YYLSP_NEEDED */
1521 #endif
1522
1523 /* If nonreentrant, generate the variables here */
1524
1525 #ifndef YYPURE
1526
1527 int yychar; /* the lookahead symbol */
1528 YYSTYPE yylval; /* the semantic value of the */
1529 /* lookahead symbol */
1530
1531 #ifdef YYLSP_NEEDED
1532 YYLTYPE yylloc; /* location data for the lookahead */
1533 /* symbol */
1534 #endif
1535
1536 int yynerrs; /* number of parse errors so far */
1537 #endif /* not YYPURE */
1538
1539 #if YYDEBUG != 0
1540 int yydebug; /* nonzero means print parse trace */
1541 /* Since this is uninitialized, it does not stop multiple parsers
1542 from coexisting. */
1543 #endif
1544
1545 /* YYINITDEPTH indicates the initial size of the parser's stacks */
1546
1547 #ifndef YYINITDEPTH
1548 #define YYINITDEPTH 200
1549 #endif
1550
1551 /* YYMAXDEPTH is the maximum size the stacks can grow to
1552 (effective only if the built-in stack extension method is used). */
1553
1554 #if YYMAXDEPTH == 0
1555 #undef YYMAXDEPTH
1556 #endif
1557
1558 #ifndef YYMAXDEPTH
1559 #define YYMAXDEPTH 10000
1560 #endif
1561
1562 /* Prevent warning if -Wstrict-prototypes. */
1563 #ifdef __GNUC__
1564 int yyparse (void);
1565 #endif
1566 \f
1567 #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
1568 #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
1569 #else /* not GNU C or C++ */
1570 #ifndef __cplusplus
1571
1572 /* This is the most reliable way to avoid incompatibilities
1573 in available built-in functions on various systems. */
1574 static void
1575 __yy_memcpy (to, from, count)
1576 char *to;
1577 char *from;
1578 int count;
1579 {
1580 register char *f = from;
1581 register char *t = to;
1582 register int i = count;
1583
1584 while (i-- > 0)
1585 *t++ = *f++;
1586 }
1587
1588 #else /* __cplusplus */
1589
1590 /* This is the most reliable way to avoid incompatibilities
1591 in available built-in functions on various systems. */
1592 static void
1593 __yy_memcpy (char *to, char *from, int count)
1594 {
1595 register char *f = from;
1596 register char *t = to;
1597 register int i = count;
1598
1599 while (i-- > 0)
1600 *t++ = *f++;
1601 }
1602
1603 #endif
1604 #endif
1605 \f
1606 #line 196 "/usr/local/lib/bison.simple"
1607
1608 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
1609 into yyparse. The argument should have type void *.
1610 It should actually point to an object.
1611 Grammar actions can access the variable by casting it
1612 to the proper pointer type. */
1613
1614 #ifdef YYPARSE_PARAM
1615 #ifdef __cplusplus
1616 #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
1617 #define YYPARSE_PARAM_DECL
1618 #else /* not __cplusplus */
1619 #define YYPARSE_PARAM_ARG YYPARSE_PARAM
1620 #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
1621 #endif /* not __cplusplus */
1622 #else /* not YYPARSE_PARAM */
1623 #define YYPARSE_PARAM_ARG
1624 #define YYPARSE_PARAM_DECL
1625 #endif /* not YYPARSE_PARAM */
1626
1627 int
1628 yyparse(YYPARSE_PARAM_ARG)
1629 YYPARSE_PARAM_DECL
1630 {
1631 register int yystate;
1632 register int yyn;
1633 register short *yyssp;
1634 register YYSTYPE *yyvsp;
1635 int yyerrstatus; /* number of tokens to shift before error messages enabled */
1636 int yychar1 = 0; /* lookahead token as an internal (translated) token number */
1637
1638 short yyssa[YYINITDEPTH]; /* the state stack */
1639 YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
1640
1641 short *yyss = yyssa; /* refer to the stacks thru separate pointers */
1642 YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
1643
1644 #ifdef YYLSP_NEEDED
1645 YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
1646 YYLTYPE *yyls = yylsa;
1647 YYLTYPE *yylsp;
1648
1649 #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
1650 #else
1651 #define YYPOPSTACK (yyvsp--, yyssp--)
1652 #endif
1653
1654 int yystacksize = YYINITDEPTH;
1655
1656 #ifdef YYPURE
1657 int yychar;
1658 YYSTYPE yylval;
1659 int yynerrs;
1660 #ifdef YYLSP_NEEDED
1661 YYLTYPE yylloc;
1662 #endif
1663 #endif
1664
1665 YYSTYPE yyval; /* the variable used to return */
1666 /* semantic values from the action */
1667 /* routines */
1668
1669 int yylen;
1670
1671 #if YYDEBUG != 0
1672 if (yydebug)
1673 fprintf(stderr, "Starting parse\n");
1674 #endif
1675
1676 yystate = 0;
1677 yyerrstatus = 0;
1678 yynerrs = 0;
1679 yychar = YYEMPTY; /* Cause a token to be read. */
1680
1681 /* Initialize stack pointers.
1682 Waste one element of value and location stack
1683 so that they stay on the same level as the state stack.
1684 The wasted elements are never initialized. */
1685
1686 yyssp = yyss - 1;
1687 yyvsp = yyvs;
1688 #ifdef YYLSP_NEEDED
1689 yylsp = yyls;
1690 #endif
1691
1692 /* Push a new state, which is found in yystate . */
1693 /* In all cases, when you get here, the value and location stacks
1694 have just been pushed. so pushing a state here evens the stacks. */
1695 yynewstate:
1696
1697 *++yyssp = yystate;
1698
1699 if (yyssp >= yyss + yystacksize - 1)
1700 {
1701 /* Give user a chance to reallocate the stack */
1702 /* Use copies of these so that the &'s don't force the real ones into memory. */
1703 YYSTYPE *yyvs1 = yyvs;
1704 short *yyss1 = yyss;
1705 #ifdef YYLSP_NEEDED
1706 YYLTYPE *yyls1 = yyls;
1707 #endif
1708
1709 /* Get the current used size of the three stacks, in elements. */
1710 int size = yyssp - yyss + 1;
1711
1712 #ifdef yyoverflow
1713 /* Each stack pointer address is followed by the size of
1714 the data in use in that stack, in bytes. */
1715 #ifdef YYLSP_NEEDED
1716 /* This used to be a conditional around just the two extra args,
1717 but that might be undefined if yyoverflow is a macro. */
1718 yyoverflow("parser stack overflow",
1719 &yyss1, size * sizeof (*yyssp),
1720 &yyvs1, size * sizeof (*yyvsp),
1721 &yyls1, size * sizeof (*yylsp),
1722 &yystacksize);
1723 #else
1724 yyoverflow("parser stack overflow",
1725 &yyss1, size * sizeof (*yyssp),
1726 &yyvs1, size * sizeof (*yyvsp),
1727 &yystacksize);
1728 #endif
1729
1730 yyss = yyss1; yyvs = yyvs1;
1731 #ifdef YYLSP_NEEDED
1732 yyls = yyls1;
1733 #endif
1734 #else /* no yyoverflow */
1735 /* Extend the stack our own way. */
1736 if (yystacksize >= YYMAXDEPTH)
1737 {
1738 yyerror("parser stack overflow");
1739 return 2;
1740 }
1741 yystacksize *= 2;
1742 if (yystacksize > YYMAXDEPTH)
1743 yystacksize = YYMAXDEPTH;
1744 yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
1745 __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
1746 yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
1747 __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
1748 #ifdef YYLSP_NEEDED
1749 yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
1750 __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp));
1751 #endif
1752 #endif /* no yyoverflow */
1753
1754 yyssp = yyss + size - 1;
1755 yyvsp = yyvs + size - 1;
1756 #ifdef YYLSP_NEEDED
1757 yylsp = yyls + size - 1;
1758 #endif
1759
1760 #if YYDEBUG != 0
1761 if (yydebug)
1762 fprintf(stderr, "Stack size increased to %d\n", yystacksize);
1763 #endif
1764
1765 if (yyssp >= yyss + yystacksize - 1)
1766 YYABORT;
1767 }
1768
1769 #if YYDEBUG != 0
1770 if (yydebug)
1771 fprintf(stderr, "Entering state %d\n", yystate);
1772 #endif
1773
1774 goto yybackup;
1775 yybackup:
1776
1777 /* Do appropriate processing given the current state. */
1778 /* Read a lookahead token if we need one and don't already have one. */
1779 /* yyresume: */
1780
1781 /* First try to decide what to do without reference to lookahead token. */
1782
1783 yyn = yypact[yystate];
1784 if (yyn == YYFLAG)
1785 goto yydefault;
1786
1787 /* Not known => get a lookahead token if don't already have one. */
1788
1789 /* yychar is either YYEMPTY or YYEOF
1790 or a valid token in external form. */
1791
1792 if (yychar == YYEMPTY)
1793 {
1794 #if YYDEBUG != 0
1795 if (yydebug)
1796 fprintf(stderr, "Reading a token: ");
1797 #endif
1798 yychar = YYLEX;
1799 }
1800
1801 /* Convert token to internal form (in yychar1) for indexing tables with */
1802
1803 if (yychar <= 0) /* This means end of input. */
1804 {
1805 yychar1 = 0;
1806 yychar = YYEOF; /* Don't call YYLEX any more */
1807
1808 #if YYDEBUG != 0
1809 if (yydebug)
1810 fprintf(stderr, "Now at end of input.\n");
1811 #endif
1812 }
1813 else
1814 {
1815 yychar1 = YYTRANSLATE(yychar);
1816
1817 #if YYDEBUG != 0
1818 if (yydebug)
1819 {
1820 fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
1821 /* Give the individual parser a way to print the precise meaning
1822 of a token, for further debugging info. */
1823 #ifdef YYPRINT
1824 YYPRINT (stderr, yychar, yylval);
1825 #endif
1826 fprintf (stderr, ")\n");
1827 }
1828 #endif
1829 }
1830
1831 yyn += yychar1;
1832 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
1833 goto yydefault;
1834
1835 yyn = yytable[yyn];
1836
1837 /* yyn is what to do for this token type in this state.
1838 Negative => reduce, -yyn is rule number.
1839 Positive => shift, yyn is new state.
1840 New state is final state => don't bother to shift,
1841 just return success.
1842 0, or most negative number => error. */
1843
1844 if (yyn < 0)
1845 {
1846 if (yyn == YYFLAG)
1847 goto yyerrlab;
1848 yyn = -yyn;
1849 goto yyreduce;
1850 }
1851 else if (yyn == 0)
1852 goto yyerrlab;
1853
1854 if (yyn == YYFINAL)
1855 YYACCEPT;
1856
1857 /* Shift the lookahead token. */
1858
1859 #if YYDEBUG != 0
1860 if (yydebug)
1861 fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
1862 #endif
1863
1864 /* Discard the token being shifted unless it is eof. */
1865 if (yychar != YYEOF)
1866 yychar = YYEMPTY;
1867
1868 *++yyvsp = yylval;
1869 #ifdef YYLSP_NEEDED
1870 *++yylsp = yylloc;
1871 #endif
1872
1873 /* count tokens shifted since error; after three, turn off error status. */
1874 if (yyerrstatus) yyerrstatus--;
1875
1876 yystate = yyn;
1877 goto yynewstate;
1878
1879 /* Do the default action for the current state. */
1880 yydefault:
1881
1882 yyn = yydefact[yystate];
1883 if (yyn == 0)
1884 goto yyerrlab;
1885
1886 /* Do a reduction. yyn is the number of a rule to reduce with. */
1887 yyreduce:
1888 yylen = yyr2[yyn];
1889 if (yylen > 0)
1890 yyval = yyvsp[1-yylen]; /* implement default value of the action */
1891
1892 #if YYDEBUG != 0
1893 if (yydebug)
1894 {
1895 int i;
1896
1897 fprintf (stderr, "Reducing via rule %d (line %d), ",
1898 yyn, yyrline[yyn]);
1899
1900 /* Print the symbols being reduced, and their result. */
1901 for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
1902 fprintf (stderr, "%s ", yytname[yyrhs[i]]);
1903 fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
1904 }
1905 #endif
1906
1907
1908 switch (yyn) {
1909
1910 case 1:
1911 #line 461 "core/parse-asn1.y"
1912 { yyval.intVal = myLineNoG; ;
1913 break;}
1914 case 2:
1915 #line 466 "core/parse-asn1.y"
1916 { modulePtrG->tagDefault = yyvsp[0].intVal; ;
1917 break;}
1918 case 3:
1919 #line 471 "core/parse-asn1.y"
1920 {
1921 modulePtrG->modId = yyvsp[-7].moduleId;
1922
1923 /*
1924 * Set exported flags in type/value defs as appropriate
1925 */
1926 SetExports (modulePtrG, exportListG, exportsParsedG);
1927
1928 /* clean up */
1929
1930 /* Free Application tag list */
1931 FreeApplTags();
1932
1933 /*
1934 * Add values defined in any parsed object identifiers.
1935 * Only the Module name and some macro oids have been parsed,
1936 * the rest are just "{...}" strings at this point
1937 * (they will be parsed in later)
1938 */
1939 modulePtrG->valueDefs =
1940 AsnListConcat (modulePtrG->valueDefs, oidElmtValDefsG);
1941
1942 /*
1943 * free list head only
1944 */
1945 Free (oidElmtValDefsG);
1946 ;
1947 break;}
1948 case 4:
1949 #line 501 "core/parse-asn1.y"
1950 { yyval.intVal = EXPLICIT_TAGS; ;
1951 break;}
1952 case 5:
1953 #line 502 "core/parse-asn1.y"
1954 { yyval.intVal = IMPLICIT_TAGS; ;
1955 break;}
1956 case 6:
1957 #line 504 "core/parse-asn1.y"
1958 {
1959 /* default is EXPLICIT TAGS */
1960 yyval.intVal = EXPLICIT_TAGS;
1961 ;
1962 break;}
1963 case 7:
1964 #line 512 "core/parse-asn1.y"
1965 {
1966 yyval.moduleId = MT (ModuleId);
1967 yyval.moduleId->name = yyvsp[-1].charPtr;
1968 yyval.moduleId->oid = yyvsp[0].oidPtr;
1969 ;
1970 break;}
1971 case 9:
1972 #line 521 "core/parse-asn1.y"
1973 { yyval.oidPtr = NULL; ;
1974 break;}
1975 case 12:
1976 #line 531 "core/parse-asn1.y"
1977 {
1978 /*
1979 * allows differentiation between "EXPORTS;"
1980 * (in which no exports allowed)
1981 * and when the EXPORTS symbol does not appear
1982 * (then all are exported)
1983 */
1984 exportsParsedG = TRUE;
1985 ;
1986 break;}
1987 case 13:
1988 #line 541 "core/parse-asn1.y"
1989 {
1990 PARSE_ERROR();
1991 exportsParsedG = FALSE;
1992 exportListG = NULL;
1993 yyerrok;
1994 ;
1995 break;}
1996 case 14:
1997 #line 547 "core/parse-asn1.y"
1998 { exportsParsedG = FALSE; ;
1999 break;}
2000 case 15:
2001 #line 551 "core/parse-asn1.y"
2002 { exportListG = yyvsp[0].exportList; ;
2003 break;}
2004 case 16:
2005 #line 552 "core/parse-asn1.y"
2006 { exportListG = NULL; ;
2007 break;}
2008 case 17:
2009 #line 557 "core/parse-asn1.y"
2010 {
2011 yyval.exportList = MT (ExportElmt);
2012 yyval.exportList->name = yyvsp[0].charPtr;
2013 yyval.exportList->lineNo = myLineNoG;
2014 yyval.exportList->next = NULL;
2015 ;
2016 break;}
2017 case 18:
2018 #line 564 "core/parse-asn1.y"
2019 {
2020 yyval.exportList = MT (ExportElmt);
2021 yyval.exportList->name = yyvsp[0].charPtr;
2022 yyval.exportList->next = yyvsp[-3].exportList;
2023 yyval.exportList->lineNo = yyvsp[-1].intVal;
2024 ;
2025 break;}
2026 case 20:
2027 #line 575 "core/parse-asn1.y"
2028 {
2029 PARSE_ERROR();
2030 yyerrok;
2031 ;
2032 break;}
2033 case 22:
2034 #line 583 "core/parse-asn1.y"
2035 { modulePtrG->imports = yyvsp[0].importModuleListPtr; ;
2036 break;}
2037 case 24:
2038 #line 589 "core/parse-asn1.y"
2039 {
2040 APPEND (yyvsp[0].importModulePtr,yyvsp[-1].importModuleListPtr);
2041 ;
2042 break;}
2043 case 25:
2044 #line 593 "core/parse-asn1.y"
2045 {
2046 yyval.importModuleListPtr = NEWLIST();
2047 APPEND (yyvsp[0].importModulePtr, yyval.importModuleListPtr);
2048 ;
2049 break;}
2050 case 26:
2051 #line 601 "core/parse-asn1.y"
2052 {
2053 yyval.importModulePtr = MT (ImportModule);
2054 yyval.importModulePtr->modId = yyvsp[0].moduleId;
2055 yyval.importModulePtr->lineNo = yyvsp[-1].intVal;
2056 yyval.importModulePtr->importElmts = yyvsp[-3].importElmtListPtr;
2057 ;
2058 break;}
2059 case 27:
2060 #line 612 "core/parse-asn1.y"
2061 {
2062 ImportElmt *ie;
2063
2064 ie = MT (ImportElmt);
2065 ie->name = yyvsp[0].charPtr;
2066 ie->lineNo = myLineNoG;
2067 APPEND (ie, yyvsp[-2].importElmtListPtr);
2068 yyval.importElmtListPtr = yyvsp[-2].importElmtListPtr;
2069 ;
2070 break;}
2071 case 28:
2072 #line 622 "core/parse-asn1.y"
2073 {
2074 ImportElmt *ie;
2075
2076 /* called for the first element only, so create list head */
2077 yyval.importElmtListPtr = NEWLIST();
2078 ie = MT (ImportElmt);
2079 ie->name = yyvsp[0].charPtr;
2080 ie->lineNo = myLineNoG;
2081 APPEND (ie, yyval.importElmtListPtr);
2082 ;
2083 break;}
2084 case 31:
2085 #line 638 "core/parse-asn1.y"
2086 {
2087 /*
2088 * hack to make DefinedMacroNames "freeable"
2089 * like idents and typeref
2090 */
2091 yyval.charPtr = Malloc (strlen (yyvsp[0].charPtr)+1);
2092 strcpy (yyval.charPtr, yyvsp[0].charPtr);
2093 ;
2094 break;}
2095 case 36:
2096 #line 659 "core/parse-asn1.y"
2097 {
2098 PARSE_ERROR();
2099 yyerrok;
2100 ;
2101 break;}
2102 case 37:
2103 #line 667 "core/parse-asn1.y"
2104 {
2105 /*
2106 * a macro may produce a null type
2107 */
2108 if (yyvsp[0].typeDefPtr != NULL)
2109 {
2110 /*
2111 * add to head of type def list
2112 */
2113 APPEND (yyvsp[0].typeDefPtr, modulePtrG->typeDefs);
2114 }
2115
2116 ;
2117 break;}
2118 case 38:
2119 #line 681 "core/parse-asn1.y"
2120 {
2121 /*
2122 * a macro may produce a null value
2123 */
2124 if (yyvsp[0].valueDefPtr != NULL)
2125 {
2126 /*
2127 * add to head of value def list
2128 */
2129 APPEND (yyvsp[0].valueDefPtr, modulePtrG->valueDefs);
2130 }
2131 ;
2132 break;}
2133 case 39:
2134 #line 693 "core/parse-asn1.y"
2135 { LexBeginMacroDefContext(); ;
2136 break;}
2137 case 40:
2138 #line 695 "core/parse-asn1.y"
2139 {
2140 TypeDef *tmpTypeDef;
2141
2142 /*
2143 * LEXICAL TIE IN!!
2144 * create macro type to eliminate import resolution
2145 * errors msgs from other modules importing the macro.
2146 * (hopefully) Only the import list will link with
2147 * these type defs.
2148 * keeps macro def around incase of future processing needs
2149 *
2150 * NOTE: MACRODEFBODY_SYM returns the macro def body with
2151 * with "BEGIN" at the begininning and "END" at the end
2152 */
2153
2154 /*
2155 * put lexical analyzer back in normal state
2156 */
2157 /* BEGIN (INITIAL); */
2158 LexBeginInitialContext();
2159
2160 tmpTypeDef = MT (TypeDef);
2161 SetupType (&tmpTypeDef->type, BASICTYPE_MACRODEF, yyvsp[-2].intVal);
2162 tmpTypeDef->definedName = yyvsp[-5].charPtr;
2163
2164 /*
2165 * keeps the macro def body
2166 * (all text between & including the BEGIN and END)
2167 * as a simple string - incase you want to fart around with
2168 * it.
2169 */
2170 tmpTypeDef->type->basicType->a.macroDef = yyvsp[0].charPtr;
2171
2172 /*
2173 * put in type list
2174 */
2175 APPEND (tmpTypeDef, modulePtrG->typeDefs);
2176
2177 ;
2178 break;}
2179 case 41:
2180 #line 735 "core/parse-asn1.y"
2181 {
2182 TypeDef *tmpTypeDef;
2183
2184 tmpTypeDef = MT (TypeDef);
2185 SetupType (&tmpTypeDef->type, BASICTYPE_MACRODEF, myLineNoG);
2186 tmpTypeDef->definedName = yyvsp[-2].charPtr;
2187
2188 tmpTypeDef->type->basicType->a.macroDef = yyvsp[0].charPtr;
2189
2190 /*
2191 * put in type list
2192 */
2193 APPEND (tmpTypeDef, modulePtrG->typeDefs);
2194
2195 ;
2196 break;}
2197 case 42:
2198 #line 751 "core/parse-asn1.y"
2199 {
2200 TypeDef *tmpTypeDef;
2201
2202 tmpTypeDef = MT (TypeDef);
2203 SetupType (&tmpTypeDef->type, BASICTYPE_MACRODEF, myLineNoG);
2204 tmpTypeDef->definedName = yyvsp[-4].charPtr;
2205
2206 tmpTypeDef->type->basicType->a.macroDef =
2207 (MyString) Malloc (strlen (yyvsp[-2].charPtr) + strlen (yyvsp[0].charPtr) + 2);
2208
2209 strcpy (tmpTypeDef->type->basicType->a.macroDef, yyvsp[-2].charPtr);
2210 strcat (tmpTypeDef->type->basicType->a.macroDef, ".");
2211 strcat (tmpTypeDef->type->basicType->a.macroDef, yyvsp[0].charPtr);
2212
2213 /*
2214 * put in type list
2215 */
2216 APPEND (tmpTypeDef, modulePtrG->typeDefs);
2217
2218 Free (yyvsp[-2].charPtr);
2219 Free (yyvsp[0].charPtr);
2220 ;
2221 break;}
2222 case 45:
2223 #line 786 "core/parse-asn1.y"
2224 {
2225 /*
2226 * a macro type may produce a null type
2227 */
2228 if (yyvsp[-1].typePtr != NULL)
2229 {
2230 yyval.typeDefPtr = MT (TypeDef);
2231 yyval.typeDefPtr->type = yyvsp[-1].typePtr;
2232 yyval.typeDefPtr->type->lineNo = yyvsp[-2].intVal;
2233 yyval.typeDefPtr->type->attrList = yyvsp[0].attrList;
2234 yyval.typeDefPtr->definedName = yyvsp[-5].charPtr;
2235 yyval.typeDefPtr->attrList = yyvsp[-3].attrList;
2236 }
2237 else
2238 yyval.typeDefPtr = NULL;
2239 ;
2240 break;}
2241 case 46:
2242 #line 807 "core/parse-asn1.y"
2243 {
2244 /* allocate a Type with basic type of ImportTypeRef */
2245 SetupType (&yyval.typePtr, BASICTYPE_IMPORTTYPEREF, yyvsp[-1].intVal);
2246 yyval.typePtr->basicType->a.importTypeRef = MT (TypeRef);
2247 yyval.typePtr->basicType->a.importTypeRef->typeName = yyvsp[0].charPtr;
2248 yyval.typePtr->basicType->a.importTypeRef->moduleName = yyvsp[-3].charPtr;
2249
2250 /* add entry to this module's import list */
2251 AddPrivateImportElmt (modulePtrG, yyvsp[0].charPtr, yyvsp[-3].charPtr, yyvsp[-1].intVal);
2252 ;
2253 break;}
2254 case 47:
2255 #line 821 "core/parse-asn1.y"
2256 { yyval.typePtr = yyvsp[0].typePtr; ;
2257 break;}
2258 case 48:
2259 #line 823 "core/parse-asn1.y"
2260 {
2261 SetupType (&yyval.typePtr, BASICTYPE_LOCALTYPEREF, myLineNoG);
2262 yyval.typePtr->basicType->a.localTypeRef = MT (TypeRef);
2263 yyval.typePtr->basicType->a.localTypeRef->typeName = yyvsp[0].charPtr;
2264 ;
2265 break;}
2266 case 68:
2267 #line 856 "core/parse-asn1.y"
2268 {
2269 SetupType (&yyval.typePtr, BASICTYPE_OCTETSTRING, myLineNoG);
2270 ;
2271 break;}
2272 case 69:
2273 #line 863 "core/parse-asn1.y"
2274 {
2275 yyval.namedTypePtr = MT (NamedType);
2276 yyval.namedTypePtr->type = yyvsp[0].typePtr;
2277 yyval.namedTypePtr->fieldName = yyvsp[-1].charPtr;
2278 ;
2279 break;}
2280 case 70:
2281 #line 869 "core/parse-asn1.y"
2282 {
2283 yyval.namedTypePtr = MT (NamedType);
2284 yyval.namedTypePtr->type = yyvsp[0].typePtr;
2285 ;
2286 break;}
2287 case 71:
2288 #line 877 "core/parse-asn1.y"
2289 {
2290 SetupType (&yyval.typePtr, BASICTYPE_BOOLEAN, myLineNoG);
2291 ;
2292 break;}
2293 case 72:
2294 #line 884 "core/parse-asn1.y"
2295 {
2296 SetupType (&yyval.typePtr, BASICTYPE_INTEGER, myLineNoG);
2297 yyval.typePtr->basicType->a.integer = NEWLIST(); /* empty list */
2298 ;
2299 break;}
2300 case 73:
2301 #line 889 "core/parse-asn1.y"
2302 {
2303 SetupType (&yyval.typePtr, BASICTYPE_INTEGER, myLineNoG);
2304 yyval.typePtr->basicType->a.integer = yyvsp[-1].valueDefListPtr;
2305 ;
2306 break;}
2307 case 74:
2308 #line 898 "core/parse-asn1.y"
2309 {
2310 yyval.valueDefListPtr = NEWLIST();
2311 APPEND (yyvsp[0].valueDefPtr, yyval.valueDefListPtr);
2312 ;
2313 break;}
2314 case 75:
2315 #line 903 "core/parse-asn1.y"
2316 {
2317 APPEND (yyvsp[0].valueDefPtr,yyvsp[-2].valueDefListPtr);
2318 yyval.valueDefListPtr = yyvsp[-2].valueDefListPtr;
2319 ;
2320 break;}
2321 case 76:
2322 #line 911 "core/parse-asn1.y"
2323 {
2324 yyval.valueDefPtr = MT (ValueDef);
2325 yyval.valueDefPtr->definedName = yyvsp[-3].charPtr;
2326 SetupValue (&yyval.valueDefPtr->value, BASICVALUE_INTEGER, myLineNoG);
2327 yyval.valueDefPtr->value->basicValue->a.integer = yyvsp[-1].intVal;
2328 ;
2329 break;}
2330 case 77:
2331 #line 918 "core/parse-asn1.y"
2332 {
2333 yyval.valueDefPtr = MT (ValueDef);
2334 yyval.valueDefPtr->definedName = yyvsp[-3].charPtr;
2335 yyval.valueDefPtr->value = yyvsp[-1].valuePtr;
2336 ;
2337 break;}
2338 case 78:
2339 #line 927 "core/parse-asn1.y"
2340 {
2341 if (yyvsp[0].uintVal>0x7FFFFFFF) {
2342 yyerror("Warning: positive signed number out of range");
2343 yyval.intVal = 0x7FFFFFFF;
2344 }
2345 ;
2346 break;}
2347 case 79:
2348 #line 934 "core/parse-asn1.y"
2349 {
2350 yyerror ("Warning: positive signed number out of range");
2351 yyval.intVal = 0x7FFFFFFF;
2352 /* modulePtrG->status = MOD_ERROR; */
2353 ;
2354 break;}
2355 case 80:
2356 #line 940 "core/parse-asn1.y"
2357 {
2358 if (yyvsp[0].uintVal>0x80000000) {
2359 yyerror("Warning: negative signed number out of range");
2360 yyval.intVal = -0x80000000;
2361 } else if (yyvsp[0].uintVal==0x80000000) {
2362 yyval.intVal = -0x80000000;
2363 } else {
2364 yyval.intVal = -yyvsp[0].uintVal;
2365 }
2366 ;
2367 break;}
2368 case 81:
2369 #line 951 "core/parse-asn1.y"
2370 {
2371 yyerror ("Warning: negative signed number out of range");
2372 yyval.intVal = -0x80000000;
2373 /* modulePtrG->status = MOD_ERROR; */
2374 ;
2375 break;}
2376 case 82:
2377 #line 960 "core/parse-asn1.y"
2378 {
2379 SetupType (&yyval.typePtr, BASICTYPE_ENUMERATED, myLineNoG);
2380 yyval.typePtr->basicType->a.enumerated = yyvsp[-1].valueDefListPtr;
2381 ;
2382 break;}
2383 case 83:
2384 #line 969 "core/parse-asn1.y"
2385 {
2386 SetupType (&yyval.typePtr, BASICTYPE_REAL, myLineNoG);
2387 ;
2388 break;}
2389 case 84:
2390 #line 976 "core/parse-asn1.y"
2391 {
2392 SetupType (&yyval.typePtr, BASICTYPE_BITSTRING, myLineNoG);
2393 yyval.typePtr->basicType->a.bitString = NEWLIST(); /* empty list */
2394 ;
2395 break;}
2396 case 85:
2397 #line 981 "core/parse-asn1.y"
2398 {
2399 SetupType (&yyval.typePtr, BASICTYPE_BITSTRING, myLineNoG);
2400 yyval.typePtr->basicType->a.bitString = yyvsp[-1].valueDefListPtr;
2401 ;
2402 break;}
2403 case 87:
2404 #line 995 "core/parse-asn1.y"
2405 {
2406 SetupType (&yyval.typePtr, BASICTYPE_NULL, myLineNoG);
2407 ;
2408 break;}
2409 case 88:
2410 #line 1002 "core/parse-asn1.y"
2411 { yyval.intVal = yyvsp[-1].intVal; ;
2412 break;}
2413 case 89:
2414 #line 1007 "core/parse-asn1.y"
2415 {
2416 NamedType *n;
2417
2418 SetupType (&yyval.typePtr, BASICTYPE_SEQUENCE, yyvsp[-2].intVal);
2419
2420 if (AsnListCount ((AsnList*)yyvsp[-1].namedTypeListPtr) != 0)
2421 {
2422 n = (NamedType*) FIRST_LIST_ELMT ((AsnList*)yyvsp[-1].namedTypeListPtr);
2423 n->type->lineNo = yyvsp[-2].intVal;
2424 }
2425
2426 yyval.typePtr->basicType->a.sequence = yyvsp[-1].namedTypeListPtr;
2427
2428 ;
2429 break;}
2430 case 90:
2431 #line 1022 "core/parse-asn1.y"
2432 {
2433 SetupType (&yyval.typePtr, BASICTYPE_SEQUENCE, yyvsp[-1].intVal);
2434
2435 /* set up empty list for SEQ with no elmts */
2436 yyval.typePtr->basicType->a.sequence = AsnListNew (sizeof (void*));
2437 ;
2438 break;}
2439 case 91:
2440 #line 1037 "core/parse-asn1.y"
2441 {
2442 NamedType *lastElmt;
2443
2444 if (yyvsp[0].attrList != NULL)
2445 {
2446 lastElmt = (NamedType*)LAST_LIST_ELMT (yyvsp[-1].namedTypeListPtr);
2447 lastElmt->type->attrList = yyvsp[0].attrList;
2448 }
2449 yyval.namedTypeListPtr = yyvsp[-1].namedTypeListPtr;
2450 ;
2451 break;}
2452 case 92:
2453 #line 1051 "core/parse-asn1.y"
2454 {
2455 yyval.namedTypeListPtr = NEWLIST();
2456 APPEND (yyvsp[0].namedTypePtr,yyval.namedTypeListPtr);
2457 ;
2458 break;}
2459 case 93:
2460 #line 1056 "core/parse-asn1.y"
2461 {
2462 NamedType *lastElmt;
2463
2464 if (yyvsp[-2].attrList != NULL)
2465 {
2466 lastElmt = (NamedType*)LAST_LIST_ELMT (yyvsp[-4].namedTypeListPtr);
2467 lastElmt->type->attrList = yyvsp[-2].attrList;
2468 }
2469
2470 APPEND (yyvsp[0].namedTypePtr, yyvsp[-4].namedTypeListPtr);
2471 lastElmt = (NamedType*)LAST_LIST_ELMT (yyvsp[-4].namedTypeListPtr);
2472 lastElmt->type->lineNo = yyvsp[-1].intVal;
2473 yyval.namedTypeListPtr = yyvsp[-4].namedTypeListPtr;
2474 ;
2475 break;}
2476 case 95:
2477 #line 1075 "core/parse-asn1.y"
2478 {
2479 yyval.namedTypePtr = yyvsp[-1].namedTypePtr;
2480 yyval.namedTypePtr->type->optional = TRUE;
2481 ;
2482 break;}
2483 case 96:
2484 #line 1080 "core/parse-asn1.y"
2485 {
2486 /*
2487 * this rules uses NamedValue instead of Value
2488 * for the stupid choice value syntax (fieldname value)
2489 * it should be like a set/seq value (ie with
2490 * enclosing { }
2491 */
2492 yyval.namedTypePtr = yyvsp[-2].namedTypePtr;
2493 yyval.namedTypePtr->type->defaultVal = yyvsp[0].namedValuePtr;
2494 /*
2495 * could link value to the elmt type here (done in link_types.c)
2496 */
2497 ;
2498 break;}
2499 case 97:
2500 #line 1094 "core/parse-asn1.y"
2501 {
2502 yyval.namedTypePtr = MT (NamedType);
2503 SetupType (&yyval.namedTypePtr->type, BASICTYPE_COMPONENTSOF, myLineNoG);
2504 yyval.namedTypePtr->type->basicType->a.componentsOf = yyvsp[0].typePtr;
2505 ;
2506 break;}
2507 case 98:
2508 #line 1100 "core/parse-asn1.y"
2509 {
2510 yyval.namedTypePtr = MT (NamedType);
2511 SetupType (&yyval.namedTypePtr->type, BASICTYPE_COMPONENTSOF, myLineNoG);
2512 yyval.namedTypePtr->fieldName = yyvsp[-3].charPtr;
2513 yyval.namedTypePtr->type->basicType->a.componentsOf = yyvsp[0].typePtr;
2514 ;
2515 break;}
2516 case 99:
2517 #line 1112 "core/parse-asn1.y"
2518 {
2519 NamedType *n;
2520
2521 /* does not use SEQUENCE == SEQ OF ANY abrev*/
2522 SetupType (&yyval.typePtr, BASICTYPE_SEQUENCEOF, myLineNoG);
2523
2524 /* grab line number from first elmt */
2525 if (yyvsp[0].typePtr != NULL)
2526 yyval.typePtr->lineNo = yyvsp[0].typePtr->lineNo - 1;
2527
2528 yyval.typePtr->basicType->a.sequenceOf = yyvsp[0].typePtr;
2529 ;
2530 break;}
2531 case 100:
2532 #line 1127 "core/parse-asn1.y"
2533 { yyval.intVal = yyvsp[-1].intVal; ;
2534 break;}
2535 case 101:
2536 #line 1132 "core/parse-asn1.y"
2537 {
2538 NamedType *n;
2539
2540 SetupType (&yyval.typePtr, BASICTYPE_SET, yyvsp[-2].intVal);
2541
2542 /* reset first elmt's line number */
2543 if (AsnListCount ((AsnList*)yyvsp[-1].namedTypeListPtr) != 0)
2544 {
2545 n = (NamedType*)FIRST_LIST_ELMT ((AsnList*)yyvsp[-1].namedTypeListPtr);
2546 n->type->lineNo = yyvsp[-2].intVal;
2547 }
2548 yyval.typePtr->basicType->a.set = yyvsp[-1].namedTypeListPtr;
2549 ;
2550 break;}
2551 case 102:
2552 #line 1146 "core/parse-asn1.y"
2553 {
2554 SetupType (&yyval.typePtr, BASICTYPE_SET, yyvsp[-1].intVal);
2555
2556 /* set up empty elmt list for SET */
2557 yyval.typePtr->basicType->a.set = AsnListNew (sizeof (void*));
2558 ;
2559 break;}
2560 case 103:
2561 #line 1162 "core/parse-asn1.y"
2562 {
2563 /* does not allow SET == SET OF ANY Abrev */
2564 SetupType (&yyval.typePtr, BASICTYPE_SETOF, myLineNoG);
2565
2566 if (yyvsp[0].typePtr != NULL)
2567 yyval.typePtr->lineNo = yyvsp[0].typePtr->lineNo;
2568
2569 yyval.typePtr->basicType->a.setOf = yyvsp[0].typePtr;
2570 ;
2571 break;}
2572 case 104:
2573 #line 1176 "core/parse-asn1.y"
2574 {
2575 NamedType *n;
2576
2577 SetupType (&yyval.typePtr, BASICTYPE_CHOICE, yyvsp[-3].intVal);
2578
2579 yyval.typePtr->basicType->a.choice = yyvsp[-1].namedTypeListPtr;
2580
2581 if (AsnListCount (yyvsp[-1].namedTypeListPtr) != 0)
2582 {
2583 n = (NamedType*)FIRST_LIST_ELMT (yyvsp[-1].namedTypeListPtr);
2584 n->type->lineNo = yyvsp[-3].intVal;
2585 }
2586 ;
2587 break;}
2588 case 105:
2589 #line 1193 "core/parse-asn1.y"
2590 {
2591 NamedType *lastElmt;
2592 if (yyvsp[0].attrList != NULL)
2593 {
2594 lastElmt = (NamedType*)LAST_LIST_ELMT (yyvsp[-1].namedTypeListPtr);
2595 lastElmt->type->attrList = yyvsp[0].attrList;
2596 }
2597 yyval.namedTypeListPtr = yyvsp[-1].namedTypeListPtr;
2598 ;
2599 break;}
2600 case 106:
2601 #line 1206 "core/parse-asn1.y"
2602 {
2603 yyval.namedTypeListPtr = NEWLIST();
2604 APPEND (yyvsp[0].namedTypePtr, yyval.namedTypeListPtr);
2605 ;
2606 break;}
2607 case 107:
2608 #line 1211 "core/parse-asn1.y"
2609 {
2610 NamedType *lastElmt;
2611
2612 if (yyvsp[-1].attrList != NULL)
2613 {
2614 lastElmt = (NamedType*)LAST_LIST_ELMT (yyvsp[-3].namedTypeListPtr);
2615 lastElmt->type->attrList = yyvsp[-1].attrList;
2616 }
2617 APPEND (yyvsp[0].namedTypePtr,yyvsp[-3].namedTypeListPtr);
2618 yyval.namedTypeListPtr = yyvsp[-3].namedTypeListPtr;
2619 ;
2620 break;}
2621 case 108:
2622 #line 1227 "core/parse-asn1.y"
2623 {
2624 /*
2625 * the selection type should be replaced after
2626 * link with actual type
2627 */
2628 SetupType (&yyval.typePtr, BASICTYPE_SELECTION, myLineNoG);
2629
2630 yyval.typePtr->basicType->a.selection = MT (SelectionType);
2631 yyval.typePtr->basicType->a.selection->typeRef = yyvsp[0].typePtr;
2632 yyval.typePtr->basicType->a.selection->fieldName = yyvsp[-2].charPtr;
2633 ;
2634 break;}
2635 case 109:
2636 #line 1242 "core/parse-asn1.y"
2637 {
2638 Tag *tag;
2639
2640 /* remove next tag if any && IMPLICIT_TAGS */
2641 if ((modulePtrG->tagDefault == IMPLICIT_TAGS) &&
2642 (yyvsp[0].typePtr->tags != NULL) && !LIST_EMPTY (yyvsp[0].typePtr->tags))
2643 {
2644 tag = (Tag*)FIRST_LIST_ELMT (yyvsp[0].typePtr->tags); /* set curr to first */
2645 AsnListFirst (yyvsp[0].typePtr->tags); /* set curr to first elmt */
2646 AsnListRemove (yyvsp[0].typePtr->tags); /* remove first elmt */
2647
2648 /*
2649 * set implicit if implicitly tagged built in type (ie not ref)
2650 * (this simplifies the module ASN.1 printer (print.c))
2651 */
2652 if (tag->tclass == UNIV)
2653 yyvsp[0].typePtr->implicit = TRUE;
2654
2655 Free (tag);
2656 }
2657
2658 PREPEND (yyvsp[-1].tagPtr, yyvsp[0].typePtr->tags);
2659 yyval.typePtr = yyvsp[0].typePtr;
2660 ;
2661 break;}
2662 case 110:
2663 #line 1267 "core/parse-asn1.y"
2664 {
2665 Tag *tag;
2666
2667 /* remove next tag if any */
2668 if ((yyvsp[0].typePtr->tags != NULL) && !LIST_EMPTY (yyvsp[0].typePtr->tags))
2669 {
2670 tag = (Tag*)FIRST_LIST_ELMT (yyvsp[0].typePtr->tags); /* set curr to first */
2671 AsnListFirst (yyvsp[0].typePtr->tags); /* set curr to first elmt */
2672 AsnListRemove (yyvsp[0].typePtr->tags); /* remove first elmt */
2673
2674 if (tag->tclass == UNIV)
2675 yyvsp[0].typePtr->implicit = TRUE;
2676
2677 Free (tag);
2678 }
2679
2680 /*
2681 * must check after linking that implicitly tagged
2682 * local/import type refs are not untagged choice/any etc
2683 */
2684 else if ((yyvsp[0].typePtr->basicType->choiceId == BASICTYPE_IMPORTTYPEREF) ||
2685 (yyvsp[0].typePtr->basicType->choiceId == BASICTYPE_LOCALTYPEREF) ||
2686 (yyvsp[0].typePtr->basicType->choiceId == BASICTYPE_SELECTION))
2687 yyvsp[0].typePtr->implicit = TRUE;
2688
2689 /*
2690 * all other implicitly tagable types should have tags
2691 * to remove - if this else clause fires then it is
2692 * probably a CHOICE or ANY type
2693 */
2694 else
2695 {
2696 PrintErrLoc (modulePtrG->asn1SrcFileName, yyvsp[0].typePtr->lineNo);
2697 fprintf (stderr, "ERROR - attempt to implicitly reference untagged type\n");
2698 smallErrG = 1;
2699 }
2700
2701 PREPEND (yyvsp[-2].tagPtr, yyvsp[0].typePtr->tags);
2702 yyval.typePtr = yyvsp[0].typePtr;
2703 ;
2704 break;}
2705 case 111:
2706 #line 1308 "core/parse-asn1.y"
2707 {
2708 /* insert tag at head of list */
2709 yyvsp[-2].tagPtr->explicit = TRUE;
2710 PREPEND (yyvsp[-2].tagPtr, yyvsp[0].typePtr->tags);
2711 yyval.typePtr = yyvsp[0].typePtr;
2712 ;
2713 break;}
2714 case 112:
2715 #line 1318 "core/parse-asn1.y"
2716 {
2717 yyval.tagPtr = yyvsp[-1].tagPtr;
2718 yyval.tagPtr->tclass = yyvsp[-2].intVal;
2719 yyval.tagPtr->explicit = FALSE; /* default to false */
2720
2721 /*
2722 * keep track of APPLICATION Tags per module
2723 * should only be used once
2724 */
2725 if (yyvsp[-2].intVal == APPL)
2726 {
2727 PushApplTag (yyval.tagPtr->code, myLineNoG);
2728 }
2729 ;
2730 break;}
2731 case 113:
2732 #line 1336 "core/parse-asn1.y"
2733 {
2734 yyval.tagPtr = MT (Tag);
2735 yyval.tagPtr->code = yyvsp[0].intVal;
2736 ;
2737 break;}
2738 case 114:
2739 #line 1341 "core/parse-asn1.y"
2740 {
2741 yyval.tagPtr = MT (Tag);
2742 yyval.tagPtr->code = NO_TAG_CODE;
2743 yyval.tagPtr->valueRef = yyvsp[0].valuePtr;
2744 ;
2745 break;}
2746 case 115:
2747 #line 1349 "core/parse-asn1.y"
2748 { yyval.intVal = UNIV; ;
2749 break;}
2750 case 116:
2751 #line 1350 "core/parse-asn1.y"
2752 { yyval.intVal = APPL; ;
2753 break;}
2754 case 117:
2755 #line 1351 "core/parse-asn1.y"
2756 { yyval.intVal = PRIV; ;
2757 break;}
2758 case 118:
2759 #line 1352 "core/parse-asn1.y"
2760 { yyval.intVal = CNTX; ;
2761 break;}
2762 case 119:
2763 #line 1358 "core/parse-asn1.y"
2764 {
2765 SetupType (&yyval.typePtr, BASICTYPE_ANY, myLineNoG);
2766 ;
2767 break;}
2768 case 120:
2769 #line 1362 "core/parse-asn1.y"
2770 {
2771 SetupType (&yyval.typePtr, BASICTYPE_ANYDEFINEDBY, myLineNoG);
2772 yyval.typePtr->basicType->a.anyDefinedBy = MT (AnyDefinedByType);
2773 yyval.typePtr->basicType->a.anyDefinedBy->fieldName = yyvsp[0].charPtr;
2774 ;
2775 break;}
2776 case 121:
2777 #line 1372 "core/parse-asn1.y"
2778 {
2779 SetupType (&yyval.typePtr, BASICTYPE_OID, myLineNoG);
2780 ;
2781 break;}
2782 case 122:
2783 #line 1380 "core/parse-asn1.y"
2784 {
2785 /*
2786 * append new subtype list to existing one (s) if any
2787 * with AND relation
2788 */
2789 AppendSubtype (&yyvsp[-1].typePtr->subtypes, yyvsp[0].subtypePtr, SUBTYPE_AND);
2790 yyval.typePtr = yyvsp[-1].typePtr;
2791 ;
2792 break;}
2793 case 123:
2794 #line 1389 "core/parse-asn1.y"
2795 {
2796 Subtype *s;
2797
2798 SetupType (&yyval.typePtr, BASICTYPE_SETOF, myLineNoG);
2799 yyval.typePtr->basicType->a.setOf = yyvsp[0].typePtr;
2800
2801 /* add size constraint */
2802 s = MT (Subtype);
2803 s->choiceId = SUBTYPE_SINGLE;
2804 s->a.single = yyvsp[-2].subtypeValuePtr;
2805 AppendSubtype (&yyval.typePtr->subtypes, s, SUBTYPE_AND);
2806 ;
2807 break;}
2808 case 124:
2809 #line 1402 "core/parse-asn1.y"
2810 {
2811 Subtype *s;
2812
2813 SetupType (&yyval.typePtr, BASICTYPE_SEQUENCEOF, myLineNoG);
2814 yyval.typePtr->basicType->a.sequenceOf = yyvsp[0].typePtr;
2815
2816 /* add size constraint */
2817 s = MT (Subtype);
2818 s->choiceId = SUBTYPE_SINGLE;
2819 s->a.single = yyvsp[-2].subtypeValuePtr;
2820 AppendSubtype (&yyval.typePtr->subtypes, s, SUBTYPE_AND);
2821 ;
2822 break;}
2823 case 125:
2824 #line 1419 "core/parse-asn1.y"
2825 {
2826 yyval.subtypePtr = yyvsp[-1].subtypePtr;
2827 ;
2828 break;}
2829 case 126:
2830 #line 1426 "core/parse-asn1.y"
2831 {
2832 Subtype *s;
2833
2834 /* OR relation between all elmts of in ValueSetList */
2835
2836 yyval.subtypePtr = MT (Subtype);
2837 yyval.subtypePtr->choiceId = SUBTYPE_OR;
2838 yyval.subtypePtr->a.or = NEWLIST();
2839
2840 s = MT (Subtype);
2841 s->choiceId = SUBTYPE_SINGLE;
2842 s->a.single = yyvsp[0].subtypeValuePtr;
2843 APPEND (s, yyval.subtypePtr->a.or);
2844 ;
2845 break;}
2846 case 127:
2847 #line 1441 "core/parse-asn1.y"
2848 {
2849 Subtype *s;
2850 s = MT (Subtype);
2851 s->choiceId = SUBTYPE_SINGLE;
2852 s->a.single = yyvsp[0].subtypeValuePtr;
2853 APPEND (s, yyvsp[-2].subtypePtr->a.or);
2854 yyval.subtypePtr = yyvsp[-2].subtypePtr;
2855 ;
2856 break;}
2857 case 134:
2858 #line 1463 "core/parse-asn1.y"
2859 {
2860 yyval.subtypeValuePtr = MT (SubtypeValue);
2861 yyval.subtypeValuePtr->choiceId = SUBTYPEVALUE_SINGLEVALUE;
2862 yyval.subtypeValuePtr->a.singleValue = yyvsp[0].valuePtr;
2863 ;
2864 break;}
2865 case 135:
2866 #line 1471 "core/parse-asn1.y"
2867 {
2868 yyval.subtypeValuePtr = MT (SubtypeValue);
2869 yyval.subtypeValuePtr->choiceId = SUBTYPEVALUE_CONTAINED;
2870 yyval.subtypeValuePtr->a.contained = yyvsp[0].typePtr;
2871 ;
2872 break;}
2873 case 136:
2874 #line 1480 "core/parse-asn1.y"
2875 {
2876 yyval.subtypeValuePtr = MT (SubtypeValue);
2877 yyval.subtypeValuePtr->choiceId = SUBTYPEVALUE_VALUERANGE;
2878 yyval.subtypeValuePtr->a.valueRange = MT (ValueRangeSubtype);
2879 yyval.subtypeValuePtr->a.valueRange->lowerEndInclusive =
2880 valueRangeLowerEndInclusiveG;
2881 yyval.subtypeValuePtr->a.valueRange->upperEndInclusive =
2882 valueRangeUpperEndInclusiveG;
2883 yyval.subtypeValuePtr->a.valueRange->lowerEndValue = yyvsp[-3].valuePtr;
2884 yyval.subtypeValuePtr->a.valueRange->upperEndValue = yyvsp[0].valuePtr;
2885 ;
2886 break;}
2887 case 137:
2888 #line 1495 "core/parse-asn1.y"
2889 {
2890 yyval.valuePtr = yyvsp[0].valuePtr;
2891 valueRangeLowerEndInclusiveG = TRUE;
2892 ;
2893 break;}
2894 case 138:
2895 #line 1500 "core/parse-asn1.y"
2896 {
2897 yyval.valuePtr = yyvsp[-1].valuePtr;
2898 valueRangeLowerEndInclusiveG = FALSE;
2899 ;
2900 break;}
2901 case 139:
2902 #line 1508 "core/parse-asn1.y"
2903 {
2904 yyval.valuePtr = yyvsp[0].valuePtr;
2905 valueRangeUpperEndInclusiveG = TRUE;
2906 ;
2907 break;}
2908 case 140:
2909 #line 1513 "core/parse-asn1.y"
2910 {
2911 yyval.valuePtr = yyvsp[0].valuePtr;
2912 valueRangeUpperEndInclusiveG = FALSE;
2913 ;
2914 break;}
2915 case 141:
2916 #line 1520 "core/parse-asn1.y"
2917 { yyval.valuePtr = yyvsp[0].valuePtr; ;
2918 break;}
2919 case 142:
2920 #line 1522 "core/parse-asn1.y"
2921 {
2922 SetupValue (&yyval.valuePtr, BASICVALUE_SPECIALINTEGER, myLineNoG);
2923 yyval.valuePtr->basicValue->a.specialInteger = MIN_INT;
2924 ;
2925 break;}
2926 case 143:
2927 #line 1529 "core/parse-asn1.y"
2928 { yyval.valuePtr = yyvsp[0].valuePtr; ;
2929 break;}
2930 case 144:
2931 #line 1531 "core/parse-asn1.y"
2932 {
2933 SetupValue (&yyval.valuePtr, BASICVALUE_SPECIALINTEGER, myLineNoG);
2934 yyval.valuePtr->basicValue->a.specialInteger = MAX_INT;
2935 ;
2936 break;}
2937 case 145:
2938 #line 1539 "core/parse-asn1.y"
2939 {
2940 yyval.subtypeValuePtr = MT (SubtypeValue);
2941 yyval.subtypeValuePtr->choiceId = SUBTYPEVALUE_SIZECONSTRAINT;
2942 yyval.subtypeValuePtr->a.sizeConstraint = yyvsp[0].subtypePtr;
2943 ;
2944 break;}
2945 case 146:
2946 #line 1549 "core/parse-asn1.y"
2947 {
2948 yyval.subtypeValuePtr = MT (SubtypeValue);
2949 yyval.subtypeValuePtr->choiceId = SUBTYPEVALUE_PERMITTEDALPHABET;
2950 yyval.subtypeValuePtr->a.permittedAlphabet = yyvsp[0].subtypePtr;
2951 ;
2952 break;}
2953 case 147:
2954 #line 1558 "core/parse-asn1.y"
2955 {
2956 yyval.subtypeValuePtr = MT (SubtypeValue);
2957 yyval.subtypeValuePtr->choiceId = SUBTYPEVALUE_INNERSUBTYPE;
2958 yyval.subtypeValuePtr->a.innerSubtype = yyvsp[0].innerSubtypePtr;
2959 ;
2960 break;}
2961 case 148:
2962 #line 1564 "core/parse-asn1.y"
2963 {
2964 yyval.subtypeValuePtr = MT (SubtypeValue);
2965 yyval.subtypeValuePtr->choiceId = SUBTYPEVALUE_INNERSUBTYPE;
2966 yyval.subtypeValuePtr->a.innerSubtype = yyvsp[0].innerSubtypePtr;
2967 ;
2968 break;}
2969 case 149:
2970 #line 1573 "core/parse-asn1.y"
2971 {
2972 Constraint *constraint;
2973
2974 /* this constrains the elmt of setof or seq of */
2975 yyval.innerSubtypePtr = MT (InnerSubtype);
2976 yyval.innerSubtypePtr->constraintType = SINGLE_CT;
2977 yyval.innerSubtypePtr->constraints = NEWLIST();
2978 constraint = MT (Constraint);
2979 APPEND (constraint, yyval.innerSubtypePtr->constraints);
2980 constraint->valueConstraints = yyvsp[0].subtypePtr;
2981 ;
2982 break;}
2983 case 152:
2984 #line 1593 "core/parse-asn1.y"
2985 {
2986 yyval.innerSubtypePtr = MT (InnerSubtype);
2987 yyval.innerSubtypePtr->constraintType = FULL_CT;
2988 yyval.innerSubtypePtr->constraints = yyvsp[-1].constraintListPtr;
2989 ;
2990 break;}
2991 case 153:
2992 #line 1602 "core/parse-asn1.y"
2993 {
2994 yyval.innerSubtypePtr = MT (InnerSubtype);
2995 yyval.innerSubtypePtr->constraintType = PARTIAL_CT;
2996 yyval.innerSubtypePtr->constraints = yyvsp[-1].constraintListPtr;
2997 ;
2998 break;}
2999 case 154:
3000 #line 1612 "core/parse-asn1.y"
3001 {
3002 yyval.constraintListPtr = NEWLIST();
3003 APPEND (yyvsp[0].constraintPtr, yyval.constraintListPtr);
3004 ;
3005 break;}
3006 case 155:
3007 #line 1617 "core/parse-asn1.y"
3008 {
3009 APPEND (yyvsp[0].constraintPtr, yyvsp[-2].constraintListPtr);
3010 yyval.constraintListPtr = yyvsp[-2].constraintListPtr;
3011 ;
3012 break;}
3013 case 156:
3014 #line 1625 "core/parse-asn1.y"
3015 {
3016 yyval.constraintPtr = yyvsp[0].constraintPtr;
3017 yyval.constraintPtr->fieldRef = yyvsp[-1].charPtr;
3018 ;
3019 break;}
3020 case 158:
3021 #line 1635 "core/parse-asn1.y"
3022 {
3023 yyval.constraintPtr = MT (Constraint);
3024 yyval.constraintPtr->presenceConstraint = yyvsp[0].intVal;
3025 yyval.constraintPtr->valueConstraints = yyvsp[-1].subtypePtr;
3026 ;
3027 break;}
3028 case 159:
3029 #line 1643 "core/parse-asn1.y"
3030 { yyval.subtypePtr = yyvsp[0].subtypePtr; ;
3031 break;}
3032 case 160:
3033 #line 1644 "core/parse-asn1.y"
3034 { yyval.subtypePtr = NULL; ;
3035 break;}
3036 case 161:
3037 #line 1648 "core/parse-asn1.y"
3038 { yyval.intVal = PRESENT_CT; ;
3039 break;}
3040 case 162:
3041 #line 1649 "core/parse-asn1.y"
3042 { yyval.intVal = ABSENT_CT; ;
3043 break;}
3044 case 163:
3045 #line 1650 "core/parse-asn1.y"
3046 { yyval.intVal = EMPTY_CT; ;
3047 break;}
3048 case 164:
3049 #line 1651 "core/parse-asn1.y"
3050 { yyval.intVal = OPTIONAL_CT; ;
3051 break;}
3052 case 165:
3053 #line 1665 "core/parse-asn1.y"
3054 {
3055 yyval.valueDefPtr = MT (ValueDef);
3056 yyval.valueDefPtr->definedName = yyvsp[-4].charPtr;
3057 yyval.valueDefPtr->value = yyvsp[0].valuePtr;
3058 yyval.valueDefPtr->value->lineNo = yyvsp[-1].intVal;
3059 yyval.valueDefPtr->value->type = yyvsp[-3].typePtr;
3060 ;
3061 break;}
3062 case 168:
3063 #line 1681 "core/parse-asn1.y"
3064 { yyval.valuePtr = yyvsp[0].valuePtr; ;
3065 break;}
3066 case 169:
3067 #line 1683 "core/parse-asn1.y"
3068 {
3069 /*
3070 * for parse, may be set to BASICVALUE_IMPORTEDTYPEREF
3071 * by linker
3072 */
3073 SetupValue (&yyval.valuePtr, BASICVALUE_LOCALVALUEREF, myLineNoG);
3074 yyval.valuePtr->basicValue->a.localValueRef = MT (ValueRef);
3075 yyval.valuePtr->basicValue->a.localValueRef->valueName = yyvsp[0].charPtr;
3076 yyval.valuePtr->valueType = BASICTYPE_UNKNOWN;
3077 ;
3078 break;}
3079 case 170:
3080 #line 1697 "core/parse-asn1.y"
3081 {
3082 /* Alloc value with basicValue of importValueRef */
3083 SetupValue (&yyval.valuePtr, BASICVALUE_IMPORTVALUEREF, yyvsp[-1].intVal);
3084 yyval.valuePtr->valueType = BASICTYPE_UNKNOWN;
3085 yyval.valuePtr->basicValue->a.importValueRef = MT (ValueRef);
3086 yyval.valuePtr->basicValue->a.importValueRef->valueName = yyvsp[0].charPtr;
3087 yyval.valuePtr->basicValue->a.importValueRef->moduleName = yyvsp[-3].charPtr;
3088
3089 /* add entry to this module's import list */
3090 AddPrivateImportElmt (modulePtrG, yyvsp[0].charPtr, yyvsp[-3].charPtr, yyvsp[-1].intVal);
3091 ;
3092 break;}
3093 case 174:
3094 #line 1715 "core/parse-asn1.y"
3095 {
3096 SetupValue (&yyval.valuePtr, BASICVALUE_INTEGER, myLineNoG);
3097 yyval.valuePtr->valueType = BASICTYPE_UNKNOWN;
3098 yyval.valuePtr->basicValue->a.integer = yyvsp[0].intVal;
3099 ;
3100 break;}
3101 case 175:
3102 #line 1721 "core/parse-asn1.y"
3103 {
3104 SetupValue (&yyval.valuePtr, BASICVALUE_ASCIIHEX, myLineNoG);
3105 yyval.valuePtr->valueType = BASICTYPE_UNKNOWN;
3106 yyval.valuePtr->basicValue->a.asciiHex = MT (AsnOcts);
3107 yyval.valuePtr->basicValue->a.asciiHex->octs = yyvsp[0].charPtr;
3108 yyval.valuePtr->basicValue->a.asciiHex->octetLen = strlen (yyvsp[0].charPtr);
3109 ;
3110 break;}
3111 case 176:
3112 #line 1729 "core/parse-asn1.y"
3113 {
3114 SetupValue (&yyval.valuePtr, BASICVALUE_ASCIIBITSTRING, myLineNoG);
3115 yyval.valuePtr->valueType = BASICTYPE_UNKNOWN;
3116 yyval.valuePtr->basicValue->a.asciiBitString = MT (AsnOcts);
3117 yyval.valuePtr->basicValue->a.asciiBitString->octs = yyvsp[0].charPtr;
3118 yyval.valuePtr->basicValue->a.asciiBitString->octetLen = strlen (yyvsp[0].charPtr);
3119 ;
3120 break;}
3121 case 177:
3122 #line 1737 "core/parse-asn1.y"
3123 {
3124 SetupValue (&yyval.valuePtr, BASICVALUE_ASCIITEXT, myLineNoG);
3125 yyval.valuePtr->valueType = BASICTYPE_UNKNOWN;
3126 yyval.valuePtr->basicValue->a.asciiText = MT (AsnOcts);
3127 yyval.valuePtr->basicValue->a.asciiText->octs = yyvsp[0].charPtr;
3128 yyval.valuePtr->basicValue->a.asciiText->octetLen = strlen (yyvsp[0].charPtr);
3129 ;
3130 break;}
3131 case 178:
3132 #line 1744 "core/parse-asn1.y"
3133 { LexBeginBraceBalContext(); ;
3134 break;}
3135 case 179:
3136 #line 1745 "core/parse-asn1.y"
3137 {
3138 /*
3139 * LEXICAL TIE IN!!
3140 * string returned by BRACEBAL_SYM has
3141 * the $1 '{' prepended and includes everything
3142 * upto and including '}' that balances $1
3143 */
3144 LexBeginInitialContext();
3145 SetupValue (&yyval.valuePtr, BASICVALUE_VALUENOTATION, myLineNoG);
3146 yyval.valuePtr->basicValue->a.valueNotation = MT (AsnOcts);
3147 yyval.valuePtr->basicValue->a.valueNotation->octs = yyvsp[0].charPtr;
3148 yyval.valuePtr->basicValue->a.valueNotation->octetLen = strlen (yyvsp[0].charPtr);
3149 yyval.valuePtr->valueType = BASICTYPE_UNKNOWN;
3150 ;
3151 break;}
3152 case 180:
3153 #line 1763 "core/parse-asn1.y"
3154 {
3155 SetupValue (&yyval.valuePtr, BASICVALUE_BOOLEAN, myLineNoG);
3156 yyval.valuePtr->valueType = BASICTYPE_UNKNOWN;
3157 yyval.valuePtr->basicValue->a.boolean = TRUE;
3158 ;
3159 break;}
3160 case 181:
3161 #line 1769 "core/parse-asn1.y"
3162 {
3163 SetupValue (&yyval.valuePtr, BASICVALUE_BOOLEAN, myLineNoG);
3164 yyval.valuePtr->valueType = BASICTYPE_UNKNOWN;
3165 yyval.valuePtr->basicValue->a.boolean = FALSE;
3166 ;
3167 break;}
3168 case 182:
3169 #line 1779 "core/parse-asn1.y"
3170 {
3171 SetupValue (&yyval.valuePtr, BASICVALUE_SPECIALREAL, myLineNoG);
3172 yyval.valuePtr->valueType = BASICTYPE_UNKNOWN;
3173 yyval.valuePtr->basicValue->a.specialReal = PLUS_INFINITY_REAL;
3174 ;
3175 break;}
3176 case 183:
3177 #line 1785 "core/parse-asn1.y"
3178 {
3179 SetupValue (&yyval.valuePtr, BASICVALUE_SPECIALREAL, myLineNoG);
3180 yyval.valuePtr->valueType = BASICTYPE_UNKNOWN;
3181 yyval.valuePtr->basicValue->a.specialReal = MINUS_INFINITY_REAL;
3182 ;
3183 break;}
3184 case 184:
3185 #line 1796 "core/parse-asn1.y"
3186 {
3187 /* create a NULL value */
3188 SetupValue (&yyval.valuePtr, BASICVALUE_NULL, myLineNoG);
3189 yyval.valuePtr->valueType = BASICTYPE_UNKNOWN;
3190 ;
3191 break;}
3192 case 185:
3193 #line 1806 "core/parse-asn1.y"
3194 {
3195 yyval.namedValuePtr = MT (NamedValue);
3196 yyval.namedValuePtr->value = yyvsp[0].valuePtr;
3197 ;
3198 break;}
3199 case 186:
3200 #line 1811 "core/parse-asn1.y"
3201 {
3202 yyval.namedValuePtr = MT (NamedValue);
3203 yyval.namedValuePtr->value = yyvsp[0].valuePtr;
3204 yyval.namedValuePtr->fieldName = yyvsp[-1].charPtr;
3205 ;
3206 break;}
3207 case 187:
3208 #line 1821 "core/parse-asn1.y"
3209 {
3210 /*
3211 * example OID setup
3212 *
3213 * for { ccitt foo (1) bar bell (bunt) 2 }
3214 *
3215 * ccitt
3216 * - arcnum is set to number from oid table (oid.c)
3217 * foo (1)
3218 * - sets up a new value def foo defined as 1
3219 * - makes oid valueref a value ref to foo (doesn't link it tho)
3220 * bar
3221 * - makes oid valueref a value ref to bar (doesn't link it tho)
3222 * bell (bunt)
3223 * - sets up a new value def bell defined as a val ref to bunt
3224 * - makes oid valueref a value ref to bell (doesn't link it tho)
3225 * 2
3226 * - arcnum is set to 2
3227 */
3228
3229 yyval.oidPtr = yyvsp[-1].oidPtr;
3230 ;
3231 break;}
3232 case 188:
3233 #line 1848 "core/parse-asn1.y"
3234 {
3235 OID *o;
3236 /* append component */
3237 for (o = yyvsp[-1].oidPtr; o->next != NULL; o = o->next)
3238 ;
3239 o->next = yyvsp[0].oidPtr;
3240 yyval.oidPtr = yyvsp[-1].oidPtr;
3241 ;
3242 break;}
3243 case 191:
3244 #line 1864 "core/parse-asn1.y"
3245 {
3246 Value *newVal;
3247 /*
3248 * if the arcName is a defined arc name like
3249 * ccitt or iso etc, fill in the arc number.
3250 * otherwise make a value ref to that named value
3251 */
3252 yyval.oidPtr = MT (OID);
3253
3254 yyval.oidPtr->arcNum = OidArcNameToNum (yyvsp[0].charPtr);
3255 if (yyval.oidPtr->arcNum == NULL_OID_ARCNUM)
3256 {
3257 /* set up value ref to named value */
3258 SetupValue (&newVal, BASICVALUE_LOCALVALUEREF, myLineNoG);
3259 newVal->basicValue->a.localValueRef = MT (ValueRef);
3260 newVal->valueType = BASICTYPE_INTEGER;
3261 newVal->basicValue->a.localValueRef->valueName = yyvsp[0].charPtr;
3262 yyval.oidPtr->valueRef = newVal;
3263 }
3264 ;
3265 break;}
3266 case 193:
3267 #line 1890 "core/parse-asn1.y"
3268 {
3269 yyval.oidPtr = MT (OID);
3270 yyval.oidPtr->arcNum = yyvsp[0].intVal;
3271 ;
3272 break;}
3273 case 195:
3274 #line 1903 "core/parse-asn1.y"
3275 {
3276 Value *newVal;
3277
3278 yyval.oidPtr = yyvsp[-1].oidPtr;
3279
3280 /* shared refs to named numbers name */
3281 SetupValue (&newVal, BASICVALUE_INTEGER, myLineNoG);
3282 newVal->basicValue->a.integer = yyval.oidPtr->arcNum;
3283 newVal->valueType = BASICTYPE_INTEGER;
3284 AddNewValueDef (oidElmtValDefsG, yyvsp[-3].charPtr, newVal);
3285
3286 SetupValue (&newVal, BASICVALUE_LOCALVALUEREF, myLineNoG);
3287 newVal->basicValue->a.localValueRef = MT (ValueRef);
3288 newVal->basicValue->a.localValueRef->valueName = yyvsp[-3].charPtr;
3289
3290 yyval.oidPtr->valueRef = newVal;
3291 ;
3292 break;}
3293 case 196:
3294 #line 1921 "core/parse-asn1.y"
3295 {
3296 Value *newVal;
3297
3298 /* shared refs to named numbers name */
3299 yyval.oidPtr = MT (OID);
3300 yyval.oidPtr->arcNum = NULL_OID_ARCNUM;
3301
3302 AddNewValueDef (oidElmtValDefsG, yyvsp[-3].charPtr, yyvsp[-1].valuePtr);
3303
3304 SetupValue (&newVal, BASICVALUE_LOCALVALUEREF, myLineNoG);
3305 newVal->basicValue->a.localValueRef = MT (ValueRef);
3306 newVal->basicValue->a.localValueRef->valueName = yyvsp[-3].charPtr;
3307
3308 yyval.oidPtr->valueRef = newVal;
3309 ;
3310 break;}
3311 case 200:
3312 #line 1955 "core/parse-asn1.y"
3313 {
3314 if (yyvsp[0].uintVal>0x7FFFFFFF) {
3315 yyerror("Warning: number out of range");
3316 yyval.intVal = 0x7FFFFFFF;
3317 }
3318 ;
3319 break;}
3320 case 201:
3321 #line 1962 "core/parse-asn1.y"
3322 {
3323 yyerror ("Warning: number out of range");
3324 yyval.intVal = 0x7FFFFFFF;
3325 /* modulePtrG->status = MOD_ERROR; */
3326 ;
3327 break;}
3328 case 207:
3329 #line 1990 "core/parse-asn1.y"
3330 {yyval.attrList = NULL;;
3331 break;}
3332 case 208:
3333 #line 1995 "core/parse-asn1.y"
3334 {
3335 yyval.attrList = NEWLIST();
3336 APPEND (yyvsp[0].charPtr,yyval.attrList);
3337 ;
3338 break;}
3339 case 209:
3340 #line 2000 "core/parse-asn1.y"
3341 {
3342 APPEND (yyvsp[0].charPtr,yyvsp[-1].attrList);
3343 yyval.attrList = yyvsp[-1].attrList;
3344 ;
3345 break;}
3346 case 235:
3347 #line 2039 "core/parse-asn1.y"
3348 { yyval.charPtr = "OPERATION"; ;
3349 break;}
3350 case 236:
3351 #line 2040 "core/parse-asn1.y"
3352 { yyval.charPtr = "ERROR"; ;
3353 break;}
3354 case 237:
3355 #line 2041 "core/parse-asn1.y"
3356 { yyval.charPtr = "BIND"; ;
3357 break;}
3358 case 238:
3359 #line 2042 "core/parse-asn1.y"
3360 { yyval.charPtr = "UNBIND"; ;
3361 break;}
3362 case 239:
3363 #line 2043 "core/parse-asn1.y"
3364 { yyval.charPtr = "APPLICATION-SERVICE-ELEMENT"; ;
3365 break;}
3366 case 240:
3367 #line 2044 "core/parse-asn1.y"
3368 { yyval.charPtr = "APPLICATION-CONTEXT"; ;
3369 break;}
3370 case 241:
3371 #line 2045 "core/parse-asn1.y"
3372 { yyval.charPtr = "EXTENSION"; ;
3373 break;}
3374 case 242:
3375 #line 2046 "core/parse-asn1.y"
3376 { yyval.charPtr = "EXTENSIONS"; ;
3377 break;}
3378 case 243:
3379 #line 2047 "core/parse-asn1.y"
3380 { yyval.charPtr = "EXTENSION-ATTRIBUTE"; ;
3381 break;}
3382 case 244:
3383 #line 2048 "core/parse-asn1.y"
3384 { yyval.charPtr = "TOKEN"; ;
3385 break;}
3386 case 245:
3387 #line 2049 "core/parse-asn1.y"
3388 { yyval.charPtr = "TOKEN-DATA"; ;
3389 break;}
3390 case 246:
3391 #line 2050 "core/parse-asn1.y"
3392 { yyval.charPtr = "SECURITY-CATEGORY"; ;
3393 break;}
3394 case 247:
3395 #line 2051 "core/parse-asn1.y"
3396 { yyval.charPtr = "OBJECT"; ;
3397 break;}
3398 case 248:
3399 #line 2052 "core/parse-asn1.y"
3400 { yyval.charPtr = "PORT"; ;
3401 break;}
3402 case 249:
3403 #line 2053 "core/parse-asn1.y"
3404 { yyval.charPtr = "REFINE"; ;
3405 break;}
3406 case 250:
3407 #line 2054 "core/parse-asn1.y"
3408 { yyval.charPtr = "ABSTRACT-BIND"; ;
3409 break;}
3410 case 251:
3411 #line 2055 "core/parse-asn1.y"
3412 { yyval.charPtr = "ABSTRACT-UNBIND"; ;
3413 break;}
3414 case 252:
3415 #line 2056 "core/parse-asn1.y"
3416 { yyval.charPtr = "ABSTRACT-OPERATION"; ;
3417 break;}
3418 case 253:
3419 #line 2057 "core/parse-asn1.y"
3420 { yyval.charPtr = "ABSTRACT-ERROR"; ;
3421 break;}
3422 case 254:
3423 #line 2058 "core/parse-asn1.y"
3424 { yyval.charPtr = "ALGORITHM"; ;
3425 break;}
3426 case 255:
3427 #line 2059 "core/parse-asn1.y"
3428 { yyval.charPtr = "ENCRYPTED"; ;
3429 break;}
3430 case 256:
3431 #line 2060 "core/parse-asn1.y"
3432 { yyval.charPtr = "SIGNED"; ;
3433 break;}
3434 case 257:
3435 #line 2061 "core/parse-asn1.y"
3436 { yyval.charPtr = "SIGNATURE"; ;
3437 break;}
3438 case 258:
3439 #line 2062 "core/parse-asn1.y"
3440 { yyval.charPtr = "PROTECTED"; ;
3441 break;}
3442 case 259:
3443 #line 2063 "core/parse-asn1.y"
3444 { yyval.charPtr = "OBJECT-TYPE"; ;
3445 break;}
3446 case 260:
3447 #line 2072 "core/parse-asn1.y"
3448 { yyval.typePtr = yyvsp[0].typePtr; ;
3449 break;}
3450 case 261:
3451 #line 2077 "core/parse-asn1.y"
3452 {
3453 RosOperationMacroType *r;
3454
3455 SetupMacroType (&yyval.typePtr, MACROTYPE_ROSOPERATION, myLineNoG);
3456 r = yyval.typePtr->basicType->a.macroType->a.rosOperation =
3457 MT (RosOperationMacroType);
3458 r->arguments = yyvsp[-3].namedTypePtr;
3459 r->result = yyvsp[-2].namedTypePtr;
3460 r->errors = yyvsp[-1].typeOrValueListPtr;
3461 r->linkedOps = yyvsp[0].typeOrValueListPtr;
3462 ;
3463 break;}
3464 case 262:
3465 #line 2092 "core/parse-asn1.y"
3466 { yyval.namedTypePtr = yyvsp[0].namedTypePtr; ;
3467 break;}
3468 case 263:
3469 #line 2093 "core/parse-asn1.y"
3470 { yyval.namedTypePtr = NULL; ;
3471 break;}
3472 case 264:
3473 #line 2097 "core/parse-asn1.y"
3474 { yyval.namedTypePtr = yyvsp[0].namedTypePtr; ;
3475 break;}
3476 case 265:
3477 #line 2098 "core/parse-asn1.y"
3478 { yyval.namedTypePtr = NULL; ;
3479 break;}
3480 case 267:
3481 #line 2104 "core/parse-asn1.y"
3482 { yyval.namedTypePtr = NULL; ;
3483 break;}
3484 case 268:
3485 #line 2110 "core/parse-asn1.y"
3486 {
3487 yyval.typeOrValueListPtr = yyvsp[-1].typeOrValueListPtr;
3488 ;
3489 break;}
3490 case 269:
3491 #line 2113 "core/parse-asn1.y"
3492 { yyval.typeOrValueListPtr = NULL; ;
3493 break;}
3494 case 270:
3495 #line 2120 "core/parse-asn1.y"
3496 {
3497 yyval.typeOrValueListPtr = yyvsp[-1].typeOrValueListPtr;
3498 ;
3499 break;}
3500 case 271:
3501 #line 2123 "core/parse-asn1.y"
3502 { yyval.typeOrValueListPtr = NULL; ;
3503 break;}
3504 case 272:
3505 #line 2136 "core/parse-asn1.y"
3506 {
3507 RosErrorMacroType *r;
3508 /*
3509 * defines error macro type
3510 */
3511 SetupMacroType (&yyval.typePtr, MACROTYPE_ROSERROR, myLineNoG);
3512 r = yyval.typePtr->basicType->a.macroType->a.rosError = MT (RosErrorMacroType);
3513 r->parameter = yyvsp[0].namedTypePtr;
3514 ;
3515 break;}
3516 case 273:
3517 #line 2149 "core/parse-asn1.y"
3518 { yyval.namedTypePtr = yyvsp[0].namedTypePtr; ;
3519 break;}
3520 case 274:
3521 #line 2150 "core/parse-asn1.y"
3522 { yyval.namedTypePtr = NULL; ;
3523 break;}
3524 case 275:
3525 #line 2160 "core/parse-asn1.y"
3526 {
3527 RosBindMacroType *r;
3528
3529 SetupMacroType (&yyval.typePtr, MACROTYPE_ROSBIND, myLineNoG);
3530
3531 r = yyval.typePtr->basicType->a.macroType->a.rosBind = MT (RosBindMacroType);
3532 r->argument = yyvsp[-2].namedTypePtr;
3533 r->result = yyvsp[-1].namedTypePtr;
3534 r->error = yyvsp[0].namedTypePtr;
3535 ;
3536 break;}
3537 case 276:
3538 #line 2173 "core/parse-asn1.y"
3539 { yyval.namedTypePtr = yyvsp[0].namedTypePtr; ;
3540 break;}
3541 case 277:
3542 #line 2174 "core/parse-asn1.y"
3543 { yyval.namedTypePtr = NULL; ;
3544 break;}
3545 case 278:
3546 #line 2179 "core/parse-asn1.y"
3547 { yyval.namedTypePtr = yyvsp[0].namedTypePtr; ;
3548 break;}
3549 case 279:
3550 #line 2180 "core/parse-asn1.y"
3551 { yyval.namedTypePtr = NULL; ;
3552 break;}
3553 case 280:
3554 #line 2185 "core/parse-asn1.y"
3555 { yyval.namedTypePtr = yyvsp[0].namedTypePtr; ;
3556 break;}
3557 case 281:
3558 #line 2186 "core/parse-asn1.y"
3559 { yyval.namedTypePtr = NULL; ;
3560 break;}
3561 case 282:
3562 #line 2196 "core/parse-asn1.y"
3563 {
3564 RosBindMacroType *r;
3565
3566 SetupMacroType (&yyval.typePtr, MACROTYPE_ROSUNBIND, myLineNoG);
3567
3568 r = yyval.typePtr->basicType->a.macroType->a.rosUnbind = MT (RosBindMacroType);
3569 r->argument = yyvsp[-2].namedTypePtr;
3570 r->result = yyvsp[-1].namedTypePtr;
3571 r->error = yyvsp[0].namedTypePtr;
3572 ;
3573 break;}
3574 case 283:
3575 #line 2210 "core/parse-asn1.y"
3576 { yyval.namedTypePtr = yyvsp[0].namedTypePtr; ;
3577 break;}
3578 case 284:
3579 #line 2211 "core/parse-asn1.y"
3580 { yyval.namedTypePtr = NULL; ;
3581 break;}
3582 case 285:
3583 #line 2221 "core/parse-asn1.y"
3584 {
3585 RosAseMacroType *r;
3586
3587 SetupMacroType (&yyval.typePtr, MACROTYPE_ROSASE, myLineNoG);
3588 r = yyval.typePtr->basicType->a.macroType->a.rosAse = MT (RosAseMacroType);
3589 r->operations = yyvsp[0].valueListPtr;
3590 ;
3591 break;}
3592 case 286:
3593 #line 2229 "core/parse-asn1.y"
3594 {
3595 RosAseMacroType *r;
3596
3597 SetupMacroType (&yyval.typePtr, MACROTYPE_ROSASE, myLineNoG);
3598 r = yyval.typePtr->basicType->a.macroType->a.rosAse = MT (RosAseMacroType);
3599 r->consumerInvokes = yyvsp[-1].valueListPtr;
3600 r->supplierInvokes = yyvsp[0].valueListPtr;
3601 ;
3602 break;}
3603 case 287:
3604 #line 2242 "core/parse-asn1.y"
3605 {
3606 yyval.valueListPtr = yyvsp[-1].valueListPtr;
3607 ;
3608 break;}
3609 case 288:
3610 #line 2250 "core/parse-asn1.y"
3611 {
3612 yyval.valueListPtr = yyvsp[-1].valueListPtr;
3613 ;
3614 break;}
3615 case 289:
3616 #line 2253 "core/parse-asn1.y"
3617 { yyval.valueListPtr = NULL; ;
3618 break;}
3619 case 290:
3620 #line 2259 "core/parse-asn1.y"
3621 {
3622 yyval.valueListPtr = yyvsp[-1].valueListPtr;
3623 ;
3624 break;}
3625 case 291:
3626 #line 2262 "core/parse-asn1.y"
3627 { yyval.valueListPtr = NULL; ;
3628 break;}
3629 case 293:
3630 #line 2282 "core/parse-asn1.y"
3631 {
3632 RosAcMacroType *r;
3633
3634 SetupMacroType (&yyval.typePtr, MACROTYPE_ROSAC, myLineNoG);
3635 r = yyval.typePtr->basicType->a.macroType->a.rosAc = MT (RosAcMacroType);
3636 r->nonRoElements = yyvsp[-6].valueListPtr;
3637 r->bindMacroType = yyvsp[-4].typePtr;
3638 r->unbindMacroType = yyvsp[-2].typePtr;
3639 r->remoteOperations = yyvsp[-1].valuePtr;
3640 r->operationsOf = rosAcSymmetricAsesG;
3641 r->initiatorConsumerOf = rosAcInitiatorConsumerOfG;
3642 r->responderConsumerOf = rosAcResponderConsumerOfG;
3643 r->abstractSyntaxes = yyvsp[0].oidListPtr;
3644 ;
3645 break;}
3646 case 294:
3647 #line 2301 "core/parse-asn1.y"
3648 {
3649 yyval.valueListPtr = yyvsp[-1].valueListPtr;
3650 ;
3651 break;}
3652 case 295:
3653 #line 2310 "core/parse-asn1.y"
3654 {
3655 yyval.valuePtr = yyvsp[-3].valuePtr;
3656 ;
3657 break;}
3658 case 296:
3659 #line 2314 "core/parse-asn1.y"
3660 {
3661 yyval.valuePtr = NULL;
3662 rosAcSymmetricAsesG = NULL;
3663 rosAcInitiatorConsumerOfG = NULL;
3664 rosAcResponderConsumerOfG = NULL;
3665 ;
3666 break;}
3667 case 297:
3668 #line 2324 "core/parse-asn1.y"
3669 {
3670 rosAcSymmetricAsesG = yyvsp[-1].valueListPtr;
3671 ;
3672 break;}
3673 case 298:
3674 #line 2327 "core/parse-asn1.y"
3675 { rosAcSymmetricAsesG = NULL; ;
3676 break;}
3677 case 300:
3678 #line 2336 "core/parse-asn1.y"
3679 {
3680 rosAcInitiatorConsumerOfG = yyvsp[-1].valueListPtr;
3681 ;
3682 break;}
3683 case 301:
3684 #line 2339 "core/parse-asn1.y"
3685 { rosAcInitiatorConsumerOfG = NULL; ;
3686 break;}
3687 case 302:
3688 #line 2344 "core/parse-asn1.y"
3689 {
3690 rosAcResponderConsumerOfG = yyvsp[-1].valueListPtr;
3691 ;
3692 break;}
3693 case 303:
3694 #line 2347 "core/parse-asn1.y"
3695 { rosAcResponderConsumerOfG = NULL; ;
3696 break;}
3697 case 304:
3698 #line 2352 "core/parse-asn1.y"
3699 {
3700 yyval.oidListPtr = yyvsp[-1].oidListPtr;
3701 ;
3702 break;}
3703 case 305:
3704 #line 2355 "core/parse-asn1.y"
3705 { yyval.oidListPtr = NULL; ;
3706 break;}
3707 case 306:
3708 #line 2361 "core/parse-asn1.y"
3709 {
3710 yyval.oidListPtr = NEWLIST();
3711 APPEND (yyvsp[0].oidPtr,yyval.oidListPtr);
3712 ;
3713 break;}
3714 case 307:
3715 #line 2366 "core/parse-asn1.y"
3716 {
3717 APPEND (yyvsp[0].oidPtr, yyvsp[-2].oidListPtr);
3718 yyval.oidListPtr = yyvsp[-2].oidListPtr;
3719 ;
3720 break;}
3721 case 308:
3722 #line 2380 "core/parse-asn1.y"
3723 {
3724 MtsasExtensionsMacroType *m;
3725
3726 SetupMacroType (&yyval.typePtr, MACROTYPE_MTSASEXTENSIONS, myLineNoG);
3727 m = yyval.typePtr->basicType->a.macroType->a.mtsasExtensions =
3728 MT (MtsasExtensionsMacroType);
3729 m->extensions = yyvsp[-1].valueListPtr;
3730 ;
3731 break;}
3732 case 310:
3733 #line 2393 "core/parse-asn1.y"
3734 { yyval.valueListPtr = NULL; ;
3735 break;}
3736 case 311:
3737 #line 2398 "core/parse-asn1.y"
3738 {
3739 yyval.valueListPtr = NEWLIST();
3740 APPEND (yyvsp[0].valuePtr, yyval.valueListPtr);
3741 ;
3742 break;}
3743 case 312:
3744 #line 2403 "core/parse-asn1.y"
3745 {
3746 APPEND (yyvsp[0].valuePtr,yyvsp[-2].valueListPtr);
3747 yyval.valueListPtr = yyvsp[-2].valueListPtr;
3748 ;
3749 break;}
3750 case 314:
3751 #line 2411 "core/parse-asn1.y"
3752 { yyval.typeOrValueListPtr = NULL; ;
3753 break;}
3754 case 315:
3755 #line 2416 "core/parse-asn1.y"
3756 {
3757 yyval.typeOrValueListPtr = NEWLIST();
3758 APPEND (yyvsp[0].typeOrValuePtr, yyval.typeOrValueListPtr);
3759 ;
3760 break;}
3761 case 316:
3762 #line 2421 "core/parse-asn1.y"
3763 {
3764 APPEND (yyvsp[0].typeOrValuePtr,yyvsp[-2].typeOrValueListPtr);
3765 yyval.typeOrValueListPtr = yyvsp[-2].typeOrValueListPtr;
3766 ;
3767 break;}
3768 case 317:
3769 #line 2429 "core/parse-asn1.y"
3770 {
3771 yyval.typeOrValuePtr = MT (TypeOrValue);
3772 yyval.typeOrValuePtr->choiceId = TYPEORVALUE_TYPE;
3773 yyval.typeOrValuePtr->a.type = yyvsp[0].typePtr;
3774 ;
3775 break;}
3776 case 318:
3777 #line 2435 "core/parse-asn1.y"
3778 {
3779 yyval.typeOrValuePtr = MT (TypeOrValue);
3780 yyval.typeOrValuePtr->choiceId = TYPEORVALUE_VALUE;
3781 yyval.typeOrValuePtr->a.value = yyvsp[0].valuePtr;
3782 ;
3783 break;}
3784 case 319:
3785 #line 2448 "core/parse-asn1.y"
3786 {
3787 MtsasExtensionMacroType *m;
3788
3789 SetupMacroType (&yyval.typePtr, MACROTYPE_MTSASEXTENSION, myLineNoG);
3790 m = yyval.typePtr->basicType->a.macroType->a.mtsasExtension =
3791 MT (MtsasExtensionMacroType);
3792 m->elmtType = yyvsp[-2].namedTypePtr;
3793 m->defaultValue = yyvsp[-1].valuePtr;
3794 m->criticalForSubmission = mtsasCriticalForSubmissionG;
3795 m->criticalForTransfer = mtsasCriticalForTransferG;
3796 m->criticalForDelivery = mtsasCriticalForDeliveryG;
3797
3798 mtsasCriticalForSubmissionG = NULL; /* set up for next parse */
3799 mtsasCriticalForTransferG = NULL;
3800 mtsasCriticalForDeliveryG = NULL;
3801 ;
3802 break;}
3803 case 320:
3804 #line 2465 "core/parse-asn1.y"
3805 {
3806 SetupMacroType (&yyval.typePtr, MACROTYPE_MTSASEXTENSION, myLineNoG);
3807 yyval.typePtr->basicType->a.macroType->a.mtsasExtension =
3808 MT (MtsasExtensionMacroType);
3809 /*
3810 * all fields are NULL in the MtsasExtensionsMacroType
3811 * for this production
3812 */
3813 ;
3814 break;}
3815 case 321:
3816 #line 2477 "core/parse-asn1.y"
3817 { yyval.valuePtr = yyvsp[0].valuePtr; ;
3818 break;}
3819 case 322:
3820 #line 2478 "core/parse-asn1.y"
3821 { yyval.valuePtr = NULL; ;
3822 break;}
3823 case 327:
3824 #line 2494 "core/parse-asn1.y"
3825 {
3826 mtsasCriticalForSubmissionG = MT (AsnBool);
3827 *mtsasCriticalForSubmissionG = TRUE;
3828 ;
3829 break;}
3830 case 328:
3831 #line 2499 "core/parse-asn1.y"
3832 {
3833 mtsasCriticalForTransferG = MT (AsnBool);
3834 *mtsasCriticalForTransferG = TRUE;
3835 ;
3836 break;}
3837 case 329:
3838 #line 2504 "core/parse-asn1.y"
3839 {
3840 mtsasCriticalForDeliveryG = MT (AsnBool);
3841 *mtsasCriticalForDeliveryG = TRUE;
3842 ;
3843 break;}
3844 case 330:
3845 #line 2518 "core/parse-asn1.y"
3846 {
3847 MtsasExtensionAttributeMacroType *m;
3848
3849 SetupMacroType (&yyval.typePtr, MACROTYPE_MTSASEXTENSIONATTRIBUTE, myLineNoG);
3850 m = yyval.typePtr->basicType->a.macroType->a.mtsasExtensionAttribute =
3851 MT (MtsasExtensionAttributeMacroType);
3852 m->type = NULL;
3853 ;
3854 break;}
3855 case 331:
3856 #line 2527 "core/parse-asn1.y"
3857 {
3858 MtsasExtensionAttributeMacroType *m;
3859
3860 SetupMacroType (&yyval.typePtr, MACROTYPE_MTSASEXTENSIONATTRIBUTE, myLineNoG);
3861 m = yyval.typePtr->basicType->a.macroType->a.mtsasExtensionAttribute =
3862 MT (MtsasExtensionAttributeMacroType);
3863 m->type = yyvsp[0].typePtr;
3864 ;
3865 break;}
3866 case 332:
3867 #line 2543 "core/parse-asn1.y"
3868 {
3869 MtsasTokenMacroType *m;
3870
3871 SetupMacroType (&yyval.typePtr, MACROTYPE_MTSASTOKEN, myLineNoG);
3872 m = yyval.typePtr->basicType->a.macroType->a.mtsasToken = MT (MtsasTokenMacroType);
3873 m->type = NULL;
3874 ;
3875 break;}
3876 case 333:
3877 #line 2551 "core/parse-asn1.y"
3878 {
3879 MtsasTokenMacroType *m;
3880
3881 SetupMacroType (&yyval.typePtr, MACROTYPE_MTSASTOKEN, myLineNoG);
3882 m = yyval.typePtr->basicType->a.macroType->a.mtsasToken = MT (MtsasTokenMacroType);
3883 m->type = yyvsp[0].typePtr;
3884 ;
3885 break;}
3886 case 334:
3887 #line 2566 "core/parse-asn1.y"
3888 {
3889 MtsasTokenDataMacroType *m;
3890
3891 SetupMacroType (&yyval.typePtr, MACROTYPE_MTSASTOKENDATA, myLineNoG);
3892 m = yyval.typePtr->basicType->a.macroType->a.mtsasTokenData =
3893 MT (MtsasTokenDataMacroType);
3894 m->type = NULL;
3895 ;
3896 break;}
3897 case 335:
3898 #line 2575 "core/parse-asn1.y"
3899 {
3900 MtsasTokenDataMacroType *m;
3901
3902 SetupMacroType (&yyval.typePtr, MACROTYPE_MTSASTOKENDATA, myLineNoG);
3903 m = yyval.typePtr->basicType->a.macroType->a.mtsasTokenData =
3904 MT (MtsasTokenDataMacroType);
3905 m->type = yyvsp[0].typePtr;
3906 ;
3907 break;}
3908 case 336:
3909 #line 2591 "core/parse-asn1.y"
3910 {
3911 MtsasSecurityCategoryMacroType *m;
3912
3913 SetupMacroType (&yyval.typePtr, MACROTYPE_MTSASSECURITYCATEGORY, myLineNoG);
3914 m = yyval.typePtr->basicType->a.macroType->a.mtsasSecurityCategory =
3915 MT (MtsasSecurityCategoryMacroType);
3916 m->type = NULL;
3917 ;
3918 break;}
3919 case 337:
3920 #line 2600 "core/parse-asn1.y"
3921 {
3922 MtsasSecurityCategoryMacroType *m;
3923
3924 SetupMacroType (&yyval.typePtr, MACROTYPE_MTSASSECURITYCATEGORY, myLineNoG);
3925 m = yyval.typePtr->basicType->a.macroType->a.mtsasSecurityCategory =
3926 MT (MtsasSecurityCategoryMacroType);
3927 m->type = yyvsp[0].typePtr;
3928 ;
3929 break;}
3930 case 338:
3931 #line 2622 "core/parse-asn1.y"
3932 {
3933 AsnObjectMacroType *a;
3934 SetupMacroType (&yyval.typePtr, MACROTYPE_ASNOBJECT, myLineNoG);
3935 a = yyval.typePtr->basicType->a.macroType->a.asnObject = MT (AsnObjectMacroType);
3936 a->ports = yyvsp[0].asnPortListPtr;
3937 ;
3938 break;}
3939 case 339:
3940 #line 2632 "core/parse-asn1.y"
3941 {
3942 yyval.asnPortListPtr = yyvsp[-1].asnPortListPtr;
3943 ;
3944 break;}
3945 case 340:
3946 #line 2635 "core/parse-asn1.y"
3947 { yyval.asnPortListPtr = NULL; ;
3948 break;}
3949 case 341:
3950 #line 2640 "core/parse-asn1.y"
3951 {
3952 yyval.asnPortListPtr = NEWLIST();
3953 APPEND (yyvsp[0].asnPortPtr, yyval.asnPortListPtr);
3954 ;
3955 break;}
3956 case 342:
3957 #line 2645 "core/parse-asn1.y"
3958 {
3959 APPEND (yyvsp[0].asnPortPtr, yyvsp[-2].asnPortListPtr);
3960 yyval.asnPortListPtr = yyvsp[-2].asnPortListPtr;
3961 ;
3962 break;}
3963 case 343:
3964 #line 2653 "core/parse-asn1.y"
3965 {
3966 yyval.asnPortPtr = MT (AsnPort);
3967 yyval.asnPortPtr->portValue = yyvsp[-1].valuePtr;
3968 yyval.asnPortPtr->portType = yyvsp[0].intVal;
3969 ;
3970 break;}
3971 case 344:
3972 #line 2662 "core/parse-asn1.y"
3973 {
3974 /* [C] consumer */
3975 yyval.intVal = CONSUMER_PORT;
3976 ;
3977 break;}
3978 case 345:
3979 #line 2667 "core/parse-asn1.y"
3980 {
3981 /* [S] supplier */
3982 yyval.intVal = SUPPLIER_PORT;
3983 ;
3984 break;}
3985 case 346:
3986 #line 2672 "core/parse-asn1.y"
3987 {
3988 /* symmetric */
3989 yyval.intVal = SYMMETRIC_PORT;
3990 ;
3991 break;}
3992 case 347:
3993 #line 2685 "core/parse-asn1.y"
3994 {
3995 AsnPortMacroType *a;
3996
3997 SetupMacroType (&yyval.typePtr, MACROTYPE_ASNPORT, myLineNoG);
3998 a = yyval.typePtr->basicType->a.macroType->a.asnPort = MT (AsnPortMacroType);
3999 a->abstractOps = yyvsp[0].typeOrValueListPtr;
4000 a->consumerInvokes = asnConsumerG;
4001 a->supplierInvokes = asnSupplierG;
4002 ;
4003 break;}
4004 case 348:
4005 #line 2695 "core/parse-asn1.y"
4006 {
4007 SetupMacroType (&yyval.typePtr, MACROTYPE_ASNPORT, myLineNoG);
4008 yyval.typePtr->basicType->a.macroType->a.asnPort = MT (AsnPortMacroType);
4009 ;
4010 break;}
4011 case 349:
4012 #line 2704 "core/parse-asn1.y"
4013 {
4014 yyval.typeOrValueListPtr = yyvsp[-1].typeOrValueListPtr;
4015 ;
4016 break;}
4017 case 350:
4018 #line 2708 "core/parse-asn1.y"
4019 {
4020 yyval.typeOrValueListPtr = NULL;
4021 asnConsumerG = yyvsp[0].typeOrValueListPtr;
4022 asnSupplierG = NULL;
4023 ;
4024 break;}
4025 case 351:
4026 #line 2714 "core/parse-asn1.y"
4027 {
4028 yyval.typeOrValueListPtr = NULL;
4029 asnConsumerG = yyvsp[0].typeOrValueListPtr;
4030 asnSupplierG = NULL;
4031 ;
4032 break;}
4033 case 352:
4034 #line 2720 "core/parse-asn1.y"
4035 {
4036 yyval.typeOrValueListPtr = NULL;
4037 asnConsumerG = yyvsp[-1].typeOrValueListPtr;
4038 asnSupplierG = NULL;
4039 ;
4040 break;}
4041 case 353:
4042 #line 2726 "core/parse-asn1.y"
4043 {
4044 yyval.typeOrValueListPtr = NULL;
4045 asnConsumerG = yyvsp[-1].typeOrValueListPtr;
4046 asnSupplierG = NULL;
4047 ;
4048 break;}
4049 case 354:
4050 #line 2735 "core/parse-asn1.y"
4051 {
4052 yyval.typeOrValueListPtr = yyvsp[-1].typeOrValueListPtr;
4053 ;
4054 break;}
4055 case 355:
4056 #line 2742 "core/parse-asn1.y"
4057 {
4058 yyval.typeOrValueListPtr = yyvsp[-1].typeOrValueListPtr;
4059 ;
4060 break;}
4061 case 356:
4062 #line 2758 "core/parse-asn1.y"
4063 {
4064 SetupType (&yyval.typePtr, BASICTYPE_UNKNOWN, myLineNoG);
4065 ;
4066 break;}
4067 case 364:
4068 #line 2784 "core/parse-asn1.y"
4069 {
4070 yyval.intVal = 0; /* just to quiet yacc warning */
4071 ;
4072 break;}
4073 case 369:
4074 #line 2802 "core/parse-asn1.y"
4075 {
4076 yyval.intVal = 0; /* just to quiet yacc warning */
4077 ;
4078 break;}
4079 case 370:
4080 #line 2815 "core/parse-asn1.y"
4081 {
4082 AsnAbstractBindMacroType *a;
4083
4084 SetupMacroType (&yyval.typePtr, MACROTYPE_ASNABSTRACTBIND, myLineNoG);
4085 a = yyval.typePtr->basicType->a.macroType->a.asnAbstractBind =
4086 MT (AsnAbstractBindMacroType);
4087 a->ports = yyvsp[0].asnPortListPtr;
4088 ;
4089 break;}
4090 case 371:
4091 #line 2824 "core/parse-asn1.y"
4092 {
4093 AsnAbstractBindMacroType *a;
4094
4095 SetupMacroType (&yyval.typePtr, MACROTYPE_ASNABSTRACTBIND, myLineNoG);
4096 a = yyval.typePtr->basicType->a.macroType->a.asnAbstractBind =
4097 MT (AsnAbstractBindMacroType);
4098 a->ports = yyvsp[-1].asnPortListPtr;
4099 a->type = yyvsp[0].typePtr;
4100 ;
4101 break;}
4102 case 372:
4103 #line 2837 "core/parse-asn1.y"
4104 {
4105 yyval.asnPortListPtr = yyvsp[-1].asnPortListPtr;
4106 ;
4107 break;}
4108 case 373:
4109 #line 2840 "core/parse-asn1.y"
4110 { yyval.asnPortListPtr = NULL; ;
4111 break;}
4112 case 374:
4113 #line 2851 "core/parse-asn1.y"
4114 {
4115 AsnAbstractBindMacroType *a;
4116
4117 SetupMacroType (&yyval.typePtr, MACROTYPE_ASNABSTRACTUNBIND, myLineNoG);
4118 a = yyval.typePtr->basicType->a.macroType->a.asnAbstractUnbind =
4119 MT (AsnAbstractBindMacroType);
4120
4121 a->ports = yyvsp[0].asnPortListPtr;
4122 ;
4123 break;}
4124 case 375:
4125 #line 2861 "core/parse-asn1.y"
4126 {
4127 AsnAbstractBindMacroType *a;
4128
4129 SetupMacroType (&yyval.typePtr, MACROTYPE_ASNABSTRACTUNBIND, myLineNoG);
4130 a = yyval.typePtr->basicType->a.macroType->a.asnAbstractUnbind =
4131 MT (AsnAbstractBindMacroType);
4132
4133 a->ports = yyvsp[-1].asnPortListPtr;
4134 a->type = yyvsp[0].typePtr;
4135 ;
4136 break;}
4137 case 376:
4138 #line 2875 "core/parse-asn1.y"
4139 {
4140 yyval.asnPortListPtr = yyvsp[-1].asnPortListPtr;
4141 ;
4142 break;}
4143 case 377:
4144 #line 2878 "core/parse-asn1.y"
4145 { yyval.asnPortListPtr = NULL; ;
4146 break;}
4147 case 378:
4148 #line 2888 "core/parse-asn1.y"
4149 {
4150 yyval.typePtr = yyvsp[0].typePtr;
4151 yyvsp[0].typePtr->basicType->a.macroType->choiceId = MACROTYPE_ASNABSTRACTOPERATION;
4152 ;
4153 break;}
4154 case 379:
4155 #line 2900 "core/parse-asn1.y"
4156 {
4157 SetupMacroType (&yyval.typePtr, MACROTYPE_ASNABSTRACTERROR, myLineNoG);
4158 yyval.typePtr->basicType->a.macroType->a.asnAbstractError = MT (RosErrorMacroType);
4159 yyval.typePtr->basicType->a.macroType->a.asnAbstractError->parameter = yyvsp[0].namedTypePtr;
4160 ;
4161 break;}
4162 case 380:
4163 #line 2913 "core/parse-asn1.y"
4164 {
4165 SetupMacroType (&yyval.typePtr, MACROTYPE_AFALGORITHM, myLineNoG);
4166 yyval.typePtr->basicType->a.macroType->a.afAlgorithm = yyvsp[0].typePtr;
4167 ;
4168 break;}
4169 case 381:
4170 #line 2924 "core/parse-asn1.y"
4171 {
4172 SetupMacroType (&yyval.typePtr, MACROTYPE_AFENCRYPTED, myLineNoG);
4173 yyval.typePtr->basicType->a.macroType->a.afEncrypted = yyvsp[0].typePtr;
4174 ;
4175 break;}
4176 case 382:
4177 #line 2936 "core/parse-asn1.y"
4178 {
4179 SetupMacroType (&yyval.typePtr, MACROTYPE_AFSIGNED, myLineNoG);
4180 yyval.typePtr->basicType->a.macroType->a.afSigned = yyvsp[0].typePtr;
4181 ;
4182 break;}
4183 case 383:
4184 #line 2947 "core/parse-asn1.y"
4185 {
4186 SetupMacroType (&yyval.typePtr, MACROTYPE_AFSIGNATURE, myLineNoG);
4187 yyval.typePtr->basicType->a.macroType->a.afSignature = yyvsp[0].typePtr;
4188 ;
4189 break;}
4190 case 384:
4191 #line 2961 "core/parse-asn1.y"
4192 {
4193 SetupMacroType (&yyval.typePtr, MACROTYPE_AFPROTECTED, myLineNoG);
4194 yyval.typePtr->basicType->a.macroType->a.afProtected = yyvsp[0].typePtr;
4195 ;
4196 break;}
4197 case 385:
4198 #line 2978 "core/parse-asn1.y"
4199 {
4200 SnmpObjectTypeMacroType *s;
4201
4202 SetupMacroType (&yyval.typePtr, MACROTYPE_SNMPOBJECTTYPE, myLineNoG);
4203 s = yyval.typePtr->basicType->a.macroType->a.snmpObjectType =
4204 MT (SnmpObjectTypeMacroType);
4205
4206 s->syntax = yyvsp[-8].typePtr;
4207 s->access = yyvsp[-6].intVal;
4208 s->status = yyvsp[-4].intVal;
4209 s->description = yyvsp[-3].valuePtr;
4210 s->reference = yyvsp[-2].valuePtr;
4211 s->index = yyvsp[-1].typeOrValueListPtr;
4212 s->defVal = yyvsp[0].valuePtr;
4213 ;
4214 break;}
4215 case 386:
4216 #line 2997 "core/parse-asn1.y"
4217 {
4218 if (strcmp (yyvsp[0].charPtr, "read-only") == 0)
4219 yyval.intVal = SNMP_READ_ONLY;
4220 else if (strcmp (yyvsp[0].charPtr, "read-write") == 0)
4221 yyval.intVal = SNMP_READ_WRITE;
4222 else if (strcmp (yyvsp[0].charPtr, "write-only") == 0)
4223 yyval.intVal = SNMP_WRITE_ONLY;
4224 else if (strcmp (yyvsp[0].charPtr, "not-accessible") == 0)
4225 yyval.intVal = SNMP_NOT_ACCESSIBLE;
4226 else
4227 {
4228 yyerror ("ACCESS field of SNMP OBJECT-TYPE MACRO can only be one of \"read-write\", \"write-only\" or \"not-accessible\"");
4229 yyval.intVal = -1;
4230 modulePtrG->status = MOD_ERROR;
4231 }
4232 Free (yyvsp[0].charPtr);
4233 ;
4234 break;}
4235 case 387:
4236 #line 3019 "core/parse-asn1.y"
4237 {
4238 if (strcmp (yyvsp[0].charPtr, "mandatory") == 0)
4239 yyval.intVal = SNMP_MANDATORY;
4240 else if (strcmp (yyvsp[0].charPtr, "optional") == 0)
4241 yyval.intVal = SNMP_OPTIONAL;
4242 else if (strcmp (yyvsp[0].charPtr, "obsolete") == 0)
4243 yyval.intVal = SNMP_OBSOLETE;
4244 else if (strcmp (yyvsp[0].charPtr, "deprecated") == 0)
4245 yyval.intVal = SNMP_DEPRECATED;
4246 else
4247 {
4248 yyerror ("STATUS field of SNMP OBJECT-TYPE MACRO can only be one of \"optional\", \"obsolete\" or \"deprecated\"");
4249 yyval.intVal = -1;
4250 modulePtrG->status = MOD_ERROR;
4251 }
4252 Free (yyvsp[0].charPtr);
4253 ;
4254 break;}
4255 case 388:
4256 #line 3039 "core/parse-asn1.y"
4257 { yyval.valuePtr = yyvsp[0].valuePtr; ;
4258 break;}
4259 case 389:
4260 #line 3040 "core/parse-asn1.y"
4261 { yyval.valuePtr = NULL; ;
4262 break;}
4263 case 390:
4264 #line 3044 "core/parse-asn1.y"
4265 { yyval.valuePtr = yyvsp[0].valuePtr; ;
4266 break;}
4267 case 391:
4268 #line 3045 "core/parse-asn1.y"
4269 { yyval.valuePtr = NULL; ;
4270 break;}
4271 case 392:
4272 #line 3050 "core/parse-asn1.y"
4273 {
4274 yyval.typeOrValueListPtr = yyvsp[-1].typeOrValueListPtr;
4275 ;
4276 break;}
4277 case 393:
4278 #line 3053 "core/parse-asn1.y"
4279 { yyval.typeOrValueListPtr = NULL; ;
4280 break;}
4281 case 394:
4282 #line 3058 "core/parse-asn1.y"
4283 {
4284 yyval.valuePtr = yyvsp[-1].valuePtr;
4285 ;
4286 break;}
4287 case 395:
4288 #line 3061 "core/parse-asn1.y"
4289 { yyval.valuePtr = NULL; ;
4290 break;}
4291 }
4292 /* the action file gets copied in in place of this dollarsign */
4293 #line 498 "/usr/local/lib/bison.simple"
4294 \f
4295 yyvsp -= yylen;
4296 yyssp -= yylen;
4297 #ifdef YYLSP_NEEDED
4298 yylsp -= yylen;
4299 #endif
4300
4301 #if YYDEBUG != 0
4302 if (yydebug)
4303 {
4304 short *ssp1 = yyss - 1;
4305 fprintf (stderr, "state stack now");
4306 while (ssp1 != yyssp)
4307 fprintf (stderr, " %d", *++ssp1);
4308 fprintf (stderr, "\n");
4309 }
4310 #endif
4311
4312 *++yyvsp = yyval;
4313
4314 #ifdef YYLSP_NEEDED
4315 yylsp++;
4316 if (yylen == 0)
4317 {
4318 yylsp->first_line = yylloc.first_line;
4319 yylsp->first_column = yylloc.first_column;
4320 yylsp->last_line = (yylsp-1)->last_line;
4321 yylsp->last_column = (yylsp-1)->last_column;
4322 yylsp->text = 0;
4323 }
4324 else
4325 {
4326 yylsp->last_line = (yylsp+yylen-1)->last_line;
4327 yylsp->last_column = (yylsp+yylen-1)->last_column;
4328 }
4329 #endif
4330
4331 /* Now "shift" the result of the reduction.
4332 Determine what state that goes to,
4333 based on the state we popped back to
4334 and the rule number reduced by. */
4335
4336 yyn = yyr1[yyn];
4337
4338 yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
4339 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
4340 yystate = yytable[yystate];
4341 else
4342 yystate = yydefgoto[yyn - YYNTBASE];
4343
4344 goto yynewstate;
4345
4346 yyerrlab: /* here on detecting error */
4347
4348 if (! yyerrstatus)
4349 /* If not already recovering from an error, report this error. */
4350 {
4351 ++yynerrs;
4352
4353 #ifdef YYERROR_VERBOSE
4354 yyn = yypact[yystate];
4355
4356 if (yyn > YYFLAG && yyn < YYLAST)
4357 {
4358 int size = 0;
4359 char *msg;
4360 int x, count;
4361
4362 count = 0;
4363 /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
4364 for (x = (yyn < 0 ? -yyn : 0);
4365 x < (sizeof(yytname) / sizeof(char *)); x++)
4366 if (yycheck[x + yyn] == x)
4367 size += strlen(yytname[x]) + 15, count++;
4368 msg = (char *) malloc(size + 15);
4369 if (msg != 0)
4370 {
4371 strcpy(msg, "parse error");
4372
4373 if (count < 5)
4374 {
4375 count = 0;
4376 for (x = (yyn < 0 ? -yyn : 0);
4377 x < (sizeof(yytname) / sizeof(char *)); x++)
4378 if (yycheck[x + yyn] == x)
4379 {
4380 strcat(msg, count == 0 ? ", expecting `" : " or `");
4381 strcat(msg, yytname[x]);
4382 strcat(msg, "'");
4383 count++;
4384 }
4385 }
4386 yyerror(msg);
4387 free(msg);
4388 }
4389 else
4390 yyerror ("parse error; also virtual memory exceeded");
4391 }
4392 else
4393 #endif /* YYERROR_VERBOSE */
4394 yyerror("parse error");
4395 }
4396
4397 goto yyerrlab1;
4398 yyerrlab1: /* here on error raised explicitly by an action */
4399
4400 if (yyerrstatus == 3)
4401 {
4402 /* if just tried and failed to reuse lookahead token after an error, discard it. */
4403
4404 /* return failure if at end of input */
4405 if (yychar == YYEOF)
4406 YYABORT;
4407
4408 #if YYDEBUG != 0
4409 if (yydebug)
4410 fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
4411 #endif
4412
4413 yychar = YYEMPTY;
4414 }
4415
4416 /* Else will try to reuse lookahead token
4417 after shifting the error token. */
4418
4419 yyerrstatus = 3; /* Each real token shifted decrements this */
4420
4421 goto yyerrhandle;
4422
4423 yyerrdefault: /* current state does not do anything special for the error token. */
4424
4425 #if 0
4426 /* This is wrong; only states that explicitly want error tokens
4427 should shift them. */
4428 yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
4429 if (yyn) goto yydefault;
4430 #endif
4431
4432 yyerrpop: /* pop the current state because it cannot handle the error token */
4433
4434 if (yyssp == yyss) YYABORT;
4435 yyvsp--;
4436 yystate = *--yyssp;
4437 #ifdef YYLSP_NEEDED
4438 yylsp--;
4439 #endif
4440
4441 #if YYDEBUG != 0
4442 if (yydebug)
4443 {
4444 short *ssp1 = yyss - 1;
4445 fprintf (stderr, "Error: state stack now");
4446 while (ssp1 != yyssp)
4447 fprintf (stderr, " %d", *++ssp1);
4448 fprintf (stderr, "\n");
4449 }
4450 #endif
4451
4452 yyerrhandle:
4453
4454 yyn = yypact[yystate];
4455 if (yyn == YYFLAG)
4456 goto yyerrdefault;
4457
4458 yyn += YYTERROR;
4459 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
4460 goto yyerrdefault;
4461
4462 yyn = yytable[yyn];
4463 if (yyn < 0)
4464 {
4465 if (yyn == YYFLAG)
4466 goto yyerrpop;
4467 yyn = -yyn;
4468 goto yyreduce;
4469 }
4470 else if (yyn == 0)
4471 goto yyerrpop;
4472
4473 if (yyn == YYFINAL)
4474 YYACCEPT;
4475
4476 #if YYDEBUG != 0
4477 if (yydebug)
4478 fprintf(stderr, "Shifting error token, ");
4479 #endif
4480
4481 *++yyvsp = yylval;
4482 #ifdef YYLSP_NEEDED
4483 *++yylsp = yylloc;
4484 #endif
4485
4486 yystate = yyn;
4487 goto yynewstate;
4488 }
4489 #line 3064 "core/parse-asn1.y"
4490
4491
4492 yyerror (s)
4493 char*s;
4494 {
4495 fprintf (stderr,"file \"%s\", line %d: %s at symbol \"%s\"\n\n", modulePtrG->asn1SrcFileName, myLineNoG, s, yytext);
4496 }
4497
4498
4499 /*
4500 * given a Module*, the file name associated witht the open
4501 * FILE *fPtr, InitAsn1Parser sets up the yacc/lex parser
4502 * to parse an ASN.1 module read from fPtr and write the
4503 * parse results into the given Module *mod.
4504 */
4505 int
4506 InitAsn1Parser PARAMS ((mod, fileName, fPtr),
4507 Module *mod _AND_
4508 char *fileName _AND_
4509 FILE *fPtr)
4510 {
4511 yyin = fPtr;
4512
4513 /*
4514 * reset lexical analyzer input file ptr
4515 * (only do this on succesive calls ow yyrestart seg faults
4516 */
4517 #ifdef FLEX_IN_USE
4518 if (!firstTimeThroughG)
4519 yyrestart (fPtr);
4520
4521 firstTimeThroughG = FALSE;
4522 #endif
4523
4524
4525 /*
4526 * init modulePtr
4527 */
4528 memzero (mod, sizeof (Module));
4529 modulePtrG = mod;
4530 mod->asn1SrcFileName = fileName;
4531 mod->status = MOD_NOT_LINKED;
4532 mod->hasAnys = FALSE;
4533
4534 /* init lists to empty */
4535 mod->typeDefs = AsnListNew (sizeof (void*));
4536 mod->valueDefs = AsnListNew (sizeof (void*));
4537
4538 /*
4539 * init export list stuff
4540 */
4541 exportListG = NULL;
4542 exportsParsedG = FALSE;
4543
4544 /*
4545 * reset line number to 1
4546 */
4547 myLineNoG = 1;
4548
4549 /*
4550 * reset error count
4551 */
4552 parseErrCountG = 0;
4553
4554 /*
4555 * set up list to hold values defined in parsed oids
4556 */
4557 oidElmtValDefsG = AsnListNew (sizeof (void *));
4558
4559 smallErrG = 0;
4560
4561 return 0;
4562
4563 } /* InitAsn1Parser */
4564
4565
4566 /*
4567 * puts the applicatin tag code, tagCode, and line number it was
4568 * parsed at into the applTagsG list. If the APPLICATION tag code
4569 * is already in the applTagsG list then an error is printed.
4570 * and the smallErrG flag set to prevent code production.
4571 */
4572 void
4573 PushApplTag PARAMS ((tagCode, lineNo),
4574 unsigned long int tagCode _AND_
4575 unsigned long int lineNo)
4576 {
4577 ApplTag *l;
4578 ApplTag *new;
4579 int wasDefined = 0;
4580
4581 /* make sure not already in list */
4582 for (l = applTagsG; l != NULL; l = l->next)
4583 {
4584 if (l->tagCode == tagCode)
4585 {
4586 PrintErrLoc (modulePtrG->asn1SrcFileName, lineNo);
4587 fprintf (stderr,"ERROR - APPLICATION tags can be used only once per ASN.1 module. The tag \"[APPLICATION %d]\" was previously used on line %d.\n", tagCode, l->lineNo);
4588 wasDefined = 1;
4589 smallErrG = 1;
4590 }
4591 }
4592 if (!wasDefined)
4593 {
4594 new = MT (ApplTag);
4595 new->lineNo = lineNo;
4596 new->tagCode = tagCode;
4597 new->next = applTagsG;
4598 applTagsG = new;
4599 }
4600 } /* PushApplTag */
4601
4602
4603 /*
4604 * Empties the applTagsG list. Usually done between modules.
4605 */
4606 void
4607 FreeApplTags()
4608 {
4609 ApplTag *l;
4610 ApplTag *lTmp;
4611
4612 for (l = applTagsG; l != NULL; )
4613 {
4614 lTmp = l->next;
4615 Free (l);
4616 l = lTmp;
4617 }
4618 applTagsG = NULL;
4619 } /* FreeApplTags */