asn1c/libasn1parser/asn1p_y.c

3848 lines
114 KiB
C
Raw Normal View History

2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
/* A Bison parser, made from asn1p_y.y
by GNU Bison version 1.28 */
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
#define YYBISON 1 /* Identify Bison output. */
2004-06-03 03:38:44 +00:00
#define yyparse asn1p_parse
2004-09-08 00:28:11 +00:00
#define yylex asn1p_lex
2004-06-03 03:38:44 +00:00
#define yyerror asn1p_error
2004-09-08 00:28:11 +00:00
#define yylval asn1p_lval
#define yychar asn1p_char
2004-06-03 03:38:44 +00:00
#define yydebug asn1p_debug
#define yynerrs asn1p_nerrs
2004-09-08 00:28:11 +00:00
#define TOK_PPEQ 257
#define TOK_opaque 258
#define TOK_bstring 259
#define TOK_cstring 260
#define TOK_hstring 261
#define TOK_identifier 262
#define TOK_number 263
#define TOK_tuple 264
#define TOK_quadruple 265
#define TOK_number_negative 266
#define TOK_typereference 267
#define TOK_capitalreference 268
#define TOK_typefieldreference 269
#define TOK_valuefieldreference 270
#define TOK_ABSENT 271
#define TOK_ABSTRACT_SYNTAX 272
#define TOK_ALL 273
#define TOK_ANY 274
#define TOK_APPLICATION 275
#define TOK_AUTOMATIC 276
#define TOK_BEGIN 277
#define TOK_BIT 278
#define TOK_BMPString 279
#define TOK_BOOLEAN 280
#define TOK_BY 281
#define TOK_CHARACTER 282
#define TOK_CHOICE 283
#define TOK_CLASS 284
#define TOK_COMPONENT 285
#define TOK_COMPONENTS 286
#define TOK_CONSTRAINED 287
#define TOK_CONTAINING 288
#define TOK_DEFAULT 289
#define TOK_DEFINITIONS 290
#define TOK_DEFINED 291
#define TOK_EMBEDDED 292
#define TOK_ENCODED 293
#define TOK_ENCODING_CONTROL 294
#define TOK_END 295
#define TOK_ENUMERATED 296
#define TOK_EXPLICIT 297
#define TOK_EXPORTS 298
#define TOK_EXTENSIBILITY 299
#define TOK_EXTERNAL 300
#define TOK_FALSE 301
#define TOK_FROM 302
#define TOK_GeneralizedTime 303
#define TOK_GeneralString 304
#define TOK_GraphicString 305
#define TOK_IA5String 306
#define TOK_IDENTIFIER 307
#define TOK_IMPLICIT 308
#define TOK_IMPLIED 309
#define TOK_IMPORTS 310
#define TOK_INCLUDES 311
#define TOK_INSTANCE 312
#define TOK_INSTRUCTIONS 313
#define TOK_INTEGER 314
#define TOK_ISO646String 315
#define TOK_MAX 316
#define TOK_MIN 317
#define TOK_MINUS_INFINITY 318
#define TOK_NULL 319
#define TOK_NumericString 320
#define TOK_OBJECT 321
#define TOK_ObjectDescriptor 322
#define TOK_OCTET 323
#define TOK_OF 324
#define TOK_OPTIONAL 325
#define TOK_PATTERN 326
#define TOK_PDV 327
#define TOK_PLUS_INFINITY 328
#define TOK_PRESENT 329
#define TOK_PrintableString 330
#define TOK_PRIVATE 331
#define TOK_REAL 332
#define TOK_RELATIVE_OID 333
#define TOK_SEQUENCE 334
#define TOK_SET 335
#define TOK_SIZE 336
#define TOK_STRING 337
#define TOK_SYNTAX 338
#define TOK_T61String 339
#define TOK_TAGS 340
#define TOK_TeletexString 341
#define TOK_TRUE 342
#define TOK_TYPE_IDENTIFIER 343
#define TOK_UNIQUE 344
#define TOK_UNIVERSAL 345
#define TOK_UniversalString 346
#define TOK_UTCTime 347
#define TOK_UTF8String 348
#define TOK_VideotexString 349
#define TOK_VisibleString 350
#define TOK_WITH 351
#define TOK_EXCEPT 352
#define TOK_INTERSECTION 353
#define TOK_UNION 354
#define TOK_TwoDots 355
#define TOK_ThreeDots 356
2004-06-03 03:38:44 +00:00
#line 1 "asn1p_y.y"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <assert.h>
#include "asn1parser.h"
#define YYPARSE_PARAM param
2005-06-07 21:43:32 +00:00
#define YYPARSE_PARAM_TYPE void **
2004-06-03 03:38:44 +00:00
#define YYERROR_VERBOSE
int yylex(void);
int yyerror(const char *msg);
2005-06-07 21:43:32 +00:00
#ifdef YYBYACC
int yyparse(void **param); /* byacc does not produce a prototype */
#endif
2004-06-03 03:38:44 +00:00
void asn1p_lexer_hack_push_opaque_state(void);
void asn1p_lexer_hack_enable_with_syntax(void);
void asn1p_lexer_hack_push_encoding_control(void);
2004-06-03 03:38:44 +00:00
#define yylineno asn1p_lineno
extern int asn1p_lineno;
2005-08-12 10:09:10 +00:00
/*
* This temporary variable is used to solve the shortcomings of 1-lookahead
* parser.
*/
static struct AssignedIdentifier *saved_aid;
2004-06-03 03:38:44 +00:00
2005-08-13 09:07:11 +00:00
static asn1p_value_t *_convert_bitstring2binary(char *str, int base);
static void _fixup_anonymous_identifier(asn1p_expr_t *expr);
2004-06-03 03:38:44 +00:00
2005-08-12 10:09:10 +00:00
#define checkmem(ptr) do { \
if(!(ptr)) \
return yyerror("Memory failure"); \
2004-06-03 03:38:44 +00:00
} while(0)
2005-08-12 10:09:10 +00:00
#define CONSTRAINT_INSERT(root, constr_type, arg1, arg2) do { \
if(arg1->type != constr_type) { \
int __ret; \
root = asn1p_constraint_new(yylineno); \
checkmem(root); \
root->type = constr_type; \
__ret = asn1p_constraint_insert(root, \
arg1); \
checkmem(__ret == 0); \
} else { \
root = arg1; \
} \
if(arg2) { \
int __ret \
= asn1p_constraint_insert(root, arg2); \
checkmem(__ret == 0); \
} \
2004-06-03 03:38:44 +00:00
} while(0)
2005-08-12 10:09:10 +00:00
#line 67 "asn1p_y.y"
2004-06-03 03:38:44 +00:00
typedef union {
asn1p_t *a_grammar;
asn1p_module_flags_e a_module_flags;
asn1p_module_t *a_module;
asn1p_expr_type_e a_type; /* ASN.1 Type */
asn1p_expr_t *a_expr; /* Constructed collection */
asn1p_constraint_t *a_constr; /* Constraint */
enum asn1p_constraint_type_e a_ctype;/* Constraint type */
asn1p_xports_t *a_xports; /* IMports/EXports */
2005-08-12 10:09:10 +00:00
struct AssignedIdentifier a_aid; /* Assigned Identifier */
2004-06-03 03:38:44 +00:00
asn1p_oid_t *a_oid; /* Object Identifier */
asn1p_oid_arc_t a_oid_arc; /* Single OID's arc */
struct asn1p_type_tag_s a_tag; /* A tag */
asn1p_ref_t *a_ref; /* Reference to custom type */
asn1p_wsyntx_t *a_wsynt; /* WITH SYNTAX contents */
asn1p_wsyntx_chunk_t *a_wchunk; /* WITH SYNTAX chunk */
struct asn1p_ref_component_s a_refcomp; /* Component of a reference */
asn1p_value_t *a_value; /* Number, DefinedValue, etc */
struct asn1p_param_s a_parg; /* A parameter argument */
asn1p_paramlist_t *a_plist; /* A pargs list */
2004-09-15 11:59:51 +00:00
struct asn1p_expr_marker_s a_marker; /* OPTIONAL/DEFAULT */
2004-06-03 03:38:44 +00:00
enum asn1p_constr_pres_e a_pres; /* PRESENT/ABSENT/OPTIONAL */
asn1c_integer_t a_int;
2004-06-03 03:38:44 +00:00
char *tv_str;
struct {
char *buf;
int len;
} tv_opaque;
struct {
char *name;
struct asn1p_type_tag_s tag;
} tv_nametag;
2004-09-08 00:28:11 +00:00
} YYSTYPE;
#include <stdio.h>
2004-09-08 00:28:11 +00:00
#ifndef __cplusplus
#ifndef __STDC__
#define const
2004-09-04 04:49:21 +00:00
#endif
#endif
2004-06-03 03:38:44 +00:00
2004-08-13 12:35:09 +00:00
2004-06-03 03:38:44 +00:00
2005-08-13 09:07:11 +00:00
#define YYFINAL 429
2004-09-08 00:28:11 +00:00
#define YYFLAG -32768
#define YYNTBASE 118
2004-09-08 00:28:11 +00:00
2005-08-12 10:09:10 +00:00
#define YYTRANSLATE(x) ((unsigned)(x) <= 356 ? yytranslate[x] : 221)
2004-09-08 00:28:11 +00:00
static const char yytranslate[] = { 0,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 112, 2, 2, 2, 2, 2, 2, 107,
108, 2, 2, 110, 2, 113, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 111, 109, 114,
2, 2, 2, 115, 2, 2, 2, 2, 2, 2,
2004-09-08 00:28:11 +00:00
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
116, 2, 117, 99, 2, 2, 2, 2, 2, 2,
2004-09-08 00:28:11 +00:00
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 105, 101, 106, 2, 2, 2, 2, 2,
2004-09-08 00:28:11 +00:00
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
97, 98, 100, 102, 103, 104
2004-06-03 03:38:44 +00:00
};
2004-09-08 00:28:11 +00:00
#if YYDEBUG != 0
static const short yyprhs[] = { 0,
0, 2, 4, 7, 16, 17, 19, 23, 26, 28,
31, 33, 38, 40, 41, 43, 45, 48, 51, 54,
57, 60, 63, 64, 66, 68, 71, 73, 75, 77,
2005-08-12 10:09:10 +00:00
79, 81, 82, 86, 88, 92, 95, 97, 100, 101,
103, 108, 110, 114, 116, 120, 122, 126, 130, 133,
135, 139, 141, 145, 147, 148, 155, 157, 159, 164,
168, 172, 179, 181, 185, 187, 191, 195, 199, 201,
205, 207, 209, 210, 212, 214, 218, 222, 226, 228,
2005-08-13 09:07:11 +00:00
231, 233, 237, 240, 242, 244, 250, 251, 253, 255,
259, 262, 267, 272, 273, 275, 276, 283, 285, 288,
290, 292, 294, 298, 302, 306, 308, 313, 318, 323,
330, 337, 339, 344, 349, 351, 355, 357, 361, 365,
369, 371, 375, 377, 381, 383, 385, 387, 389, 394,
398, 399, 403, 405, 407, 409, 411, 413, 415, 417,
419, 421, 425, 427, 429, 431, 433, 436, 438, 440,
442, 444, 447, 450, 452, 454, 457, 460, 462, 464,
466, 468, 470, 473, 475, 478, 480, 482, 484, 486,
488, 490, 492, 494, 496, 498, 500, 502, 504, 506,
508, 510, 512, 514, 516, 517, 519, 521, 526, 530,
535, 537, 541, 547, 549, 553, 557, 561, 565, 570,
574, 576, 578, 582, 586, 590, 594, 596, 598, 599,
605, 607, 610, 613, 617, 619, 621, 623, 625, 627,
629, 631, 633, 637, 643, 645, 649, 651, 655, 656,
658, 660, 662, 664, 666, 668, 672, 677, 679, 683,
686, 690, 692, 696, 697, 699, 701, 704, 707, 711,
713, 717, 719, 724, 729, 731, 733, 735, 737, 738,
740, 743, 748, 749, 751, 753, 755, 756, 758, 760,
762, 764, 766, 767, 769
};
2004-06-03 03:38:44 +00:00
static const short yyrhs[] = { 119,
2005-08-12 10:09:10 +00:00
0, 120, 0, 119, 120, 0, 217, 121, 36, 125,
3, 23, 128, 41, 0, 0, 122, 0, 105, 123,
106, 0, 105, 106, 0, 124, 0, 123, 124, 0,
2005-08-12 10:09:10 +00:00
220, 0, 220, 107, 9, 108, 0, 9, 0, 0,
126, 0, 127, 0, 126, 127, 0, 43, 86, 0,
54, 86, 0, 22, 86, 0, 45, 55, 0, 14,
59, 0, 0, 129, 0, 130, 0, 129, 130, 0,
2005-08-12 10:09:10 +00:00
132, 0, 138, 0, 144, 0, 171, 0, 141, 0,
0, 40, 14, 131, 0, 180, 0, 56, 133, 109,
0, 56, 48, 0, 135, 0, 133, 135, 0, 0,
122, 0, 136, 48, 217, 134, 0, 137, 0, 136,
110, 137, 0, 217, 0, 217, 105, 106, 0, 220,
0, 44, 139, 109, 0, 44, 19, 109, 0, 44,
109, 0, 140, 0, 139, 110, 140, 0, 217, 0,
217, 105, 106, 0, 220, 0, 0, 217, 143, 3,
105, 142, 176, 0, 166, 0, 177, 0, 217, 3,
212, 89, 0, 217, 3, 164, 0, 217, 3, 154,
0, 217, 105, 145, 106, 3, 164, 0, 146, 0,
145, 110, 146, 0, 217, 0, 217, 111, 220, 0,
217, 111, 217, 0, 177, 111, 220, 0, 148, 0,
147, 110, 148, 0, 164, 0, 220, 0, 0, 150,
0, 151, 0, 150, 110, 151, 0, 220, 164, 206,
2005-08-13 09:07:11 +00:00
0, 32, 70, 164, 0, 163, 0, 164, 206, 0,
153, 0, 152, 110, 153, 0, 220, 164, 0, 163,
0, 164, 0, 30, 105, 156, 106, 158, 0, 0,
90, 0, 157, 0, 156, 110, 157, 0, 169, 206,
0, 169, 164, 155, 206, 0, 169, 169, 155, 206,
0, 0, 159, 0, 0, 97, 84, 105, 160, 161,
106, 0, 162, 0, 161, 162, 0, 4, 0, 169,
0, 104, 0, 104, 112, 174, 0, 104, 112, 211,
0, 212, 165, 184, 0, 179, 0, 29, 105, 152,
106, 0, 80, 105, 149, 106, 0, 81, 105, 149,
106, 0, 80, 184, 70, 219, 212, 165, 0, 81,
184, 70, 219, 212, 165, 0, 20, 0, 20, 37,
27, 220, 0, 217, 105, 147, 106, 0, 166, 0,
58, 70, 166, 0, 13, 0, 13, 113, 217, 0,
218, 113, 217, 0, 13, 113, 220, 0, 218, 0,
218, 113, 167, 0, 168, 0, 167, 113, 168, 0,
170, 0, 170, 0, 15, 0, 16, 0, 220, 143,
3, 172, 0, 220, 111, 172, 0, 0, 105, 173,
176, 0, 65, 0, 47, 0, 88, 0, 5, 0,
7, 0, 175, 0, 211, 0, 174, 0, 220, 0,
217, 113, 220, 0, 6, 0, 10, 0, 11, 0,
4, 0, 176, 4, 0, 26, 0, 65, 0, 78,
0, 178, 0, 69, 83, 0, 67, 53, 0, 79,
0, 46, 0, 38, 73, 0, 28, 83, 0, 93,
0, 49, 0, 180, 0, 60, 0, 42, 0, 24,
83, 0, 177, 0, 178, 208, 0, 25, 0, 50,
0, 51, 0, 52, 0, 61, 0, 66, 0, 76,
0, 85, 0, 87, 0, 92, 0, 94, 0, 95,
0, 96, 0, 68, 0, 101, 0, 102, 0, 99,
0, 100, 0, 98, 0, 0, 185, 0, 186, 0,
82, 107, 187, 108, 0, 107, 187, 108, 0, 186,
107, 187, 108, 0, 188, 0, 188, 110, 104, 0,
188, 110, 104, 110, 188, 0, 189, 0, 19, 98,
189, 0, 188, 181, 189, 0, 188, 182, 189, 0,
189, 183, 189, 0, 192, 107, 187, 108, 0, 107,
187, 108, 0, 193, 0, 194, 0, 193, 191, 193,
0, 63, 191, 193, 0, 193, 191, 62, 0, 63,
191, 62, 0, 200, 0, 195, 0, 0, 33, 27,
105, 190, 176, 0, 103, 0, 103, 114, 0, 114,
103, 0, 114, 103, 114, 0, 82, 0, 48, 0,
47, 0, 88, 0, 211, 0, 175, 0, 220, 0,
217, 0, 97, 31, 186, 0, 97, 32, 105, 196,
106, 0, 197, 0, 196, 110, 197, 0, 104, 0,
220, 184, 198, 0, 0, 199, 0, 75, 0, 17,
0, 71, 0, 201, 0, 202, 0, 105, 217, 106,
0, 201, 105, 203, 106, 0, 204, 0, 203, 110,
204, 0, 115, 205, 0, 115, 113, 205, 0, 220,
0, 205, 113, 220, 0, 0, 207, 0, 71, 0,
35, 172, 0, 105, 106, 0, 105, 209, 106, 0,
210, 0, 209, 110, 210, 0, 220, 0, 220, 107,
211, 108, 0, 220, 107, 174, 108, 0, 211, 0,
104, 0, 9, 0, 12, 0, 0, 213, 0, 214,
216, 0, 116, 215, 9, 117, 0, 0, 91, 0,
21, 0, 77, 0, 0, 54, 0, 43, 0, 13,
0, 14, 0, 14, 0, 0, 220, 0, 8, 0
2004-06-03 03:38:44 +00:00
};
2004-09-08 00:28:11 +00:00
2004-08-13 12:35:09 +00:00
#endif
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
#if YYDEBUG != 0
static const short yyrline[] = { 0,
2005-08-12 10:09:10 +00:00
313, 319, 325, 341, 366, 368, 371, 375, 380, 387,
395, 400, 404, 413, 415, 423, 427, 435, 439, 442,
445, 449, 469, 471, 479, 483, 515, 519, 528, 535,
548, 555, 557, 569, 582, 593, 598, 604, 610, 612,
615, 626, 632, 638, 645, 651, 659, 663, 666, 673,
679, 685, 692, 698, 707, 709, 718, 726, 740, 752,
758, 774, 783, 793, 803, 808, 815, 822, 832, 838,
2005-08-13 09:07:11 +00:00
844, 848, 871, 873, 875, 881, 887, 894, 901, 904,
911, 917, 923, 929, 932, 938, 948, 950, 953, 961,
967, 976, 982, 999, 1001, 1006, 1010, 1015, 1020, 1026,
1030, 1041, 1050, 1059, 1070, 1092, 1096, 1102, 1108, 1114,
1124, 1134, 1140, 1154, 1178, 1185, 1199, 1208, 1218, 1228,
1238, 1246, 1267, 1276, 1285, 1286, 1288, 1295, 1307, 1317,
1325, 1325, 1330, 1335, 1340, 1345, 1349, 1353, 1356, 1359,
1364, 1376, 1393, 1398, 1403, 1436, 1446, 1460, 1462, 1463,
1464, 1465, 1466, 1467, 1468, 1469, 1470, 1471, 1472, 1473,
1479, 1481, 1482, 1485, 1492, 1504, 1506, 1510, 1514, 1515,
1516, 1517, 1518, 1522, 1523, 1524, 1525, 1529, 1530, 1537,
1537, 1538, 1538, 1539, 1541, 1543, 1548, 1552, 1561, 1565,
1570, 1574, 1580, 1590, 1594, 1597, 1600, 1603, 1608, 1617,
1625, 1631, 1637, 1644, 1652, 1660, 1669, 1672, 1675, 1676,
1686, 1688, 1689, 1690, 1693, 1697, 1702, 1708, 1713, 1716,
1719, 1732, 1746, 1750, 1755, 1759, 1764, 1771, 1784, 1786,
1789, 1793, 1796, 1801, 1805, 1813, 1828, 1834, 1841, 1854,
1866, 1881, 1885, 1902, 1907, 1910, 1915, 1937, 1942, 1947,
1953, 1959, 1967, 1975, 1983, 1990, 2000, 2005, 2035, 2037,
2040, 2047, 2053, 2055, 2056, 2057, 2060, 2062, 2063, 2066,
2071, 2078, 2085, 2087, 2092
2004-06-03 03:38:44 +00:00
};
#endif
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
static const char * const yytname[] = { "$","error","$undefined.","TOK_PPEQ",
"TOK_opaque","TOK_bstring","TOK_cstring","TOK_hstring","TOK_identifier","TOK_number",
"TOK_tuple","TOK_quadruple","TOK_number_negative","TOK_typereference","TOK_capitalreference",
"TOK_typefieldreference","TOK_valuefieldreference","TOK_ABSENT","TOK_ABSTRACT_SYNTAX",
"TOK_ALL","TOK_ANY","TOK_APPLICATION","TOK_AUTOMATIC","TOK_BEGIN","TOK_BIT",
"TOK_BMPString","TOK_BOOLEAN","TOK_BY","TOK_CHARACTER","TOK_CHOICE","TOK_CLASS",
"TOK_COMPONENT","TOK_COMPONENTS","TOK_CONSTRAINED","TOK_CONTAINING","TOK_DEFAULT",
"TOK_DEFINITIONS","TOK_DEFINED","TOK_EMBEDDED","TOK_ENCODED","TOK_ENCODING_CONTROL",
"TOK_END","TOK_ENUMERATED","TOK_EXPLICIT","TOK_EXPORTS","TOK_EXTENSIBILITY",
"TOK_EXTERNAL","TOK_FALSE","TOK_FROM","TOK_GeneralizedTime","TOK_GeneralString",
"TOK_GraphicString","TOK_IA5String","TOK_IDENTIFIER","TOK_IMPLICIT","TOK_IMPLIED",
"TOK_IMPORTS","TOK_INCLUDES","TOK_INSTANCE","TOK_INSTRUCTIONS","TOK_INTEGER",
"TOK_ISO646String","TOK_MAX","TOK_MIN","TOK_MINUS_INFINITY","TOK_NULL","TOK_NumericString",
"TOK_OBJECT","TOK_ObjectDescriptor","TOK_OCTET","TOK_OF","TOK_OPTIONAL","TOK_PATTERN",
"TOK_PDV","TOK_PLUS_INFINITY","TOK_PRESENT","TOK_PrintableString","TOK_PRIVATE",
"TOK_REAL","TOK_RELATIVE_OID","TOK_SEQUENCE","TOK_SET","TOK_SIZE","TOK_STRING",
"TOK_SYNTAX","TOK_T61String","TOK_TAGS","TOK_TeletexString","TOK_TRUE","TOK_TYPE_IDENTIFIER",
"TOK_UNIQUE","TOK_UNIVERSAL","TOK_UniversalString","TOK_UTCTime","TOK_UTF8String",
"TOK_VideotexString","TOK_VisibleString","TOK_WITH","TOK_EXCEPT","'^'","TOK_INTERSECTION",
"'|'","TOK_UNION","TOK_TwoDots","TOK_ThreeDots","'{'","'}'","'('","')'","';'",
"','","':'","'!'","'.'","'<'","'@'","'['","']'","ParsedGrammar","ModuleList",
"ModuleSpecification","optObjectIdentifier","ObjectIdentifier","ObjectIdentifierBody",
"ObjectIdentifierElement","optModuleSpecificationFlags","ModuleSpecificationFlags",
"ModuleSpecificationFlag","optModuleSpecificationBody","ModuleSpecificationBody",
2005-08-12 10:09:10 +00:00
"ModuleSpecificationElement","@1","ImportsDefinition","ImportsBundleSet","AssignedIdentifier",
"ImportsBundle","ImportsList","ImportsElement","ExportsDefinition","ExportsBody",
"ExportsElement","ValueSetDefinition","@2","DefinedTypeRef","DataTypeReference",
"ParameterArgumentList","ParameterArgumentName","ActualParameterList","ActualParameter",
"optComponentTypeLists","ComponentTypeLists","ComponentType","AlternativeTypeLists",
"AlternativeType","ClassDeclaration","optUnique","ClassFieldList","ClassField",
"optWithSyntax","WithSyntax","@3","WithSyntaxFormat","WithSyntaxFormatToken",
"ExtensionAndException","Type","TypeDeclaration","ComplexTypeReference","ComplexTypeReferenceAmpList",
2004-10-12 23:26:53 +00:00
"ComplexTypeReferenceElement","ClassFieldIdentifier","ClassFieldName","ValueDefinition",
2005-03-31 21:48:13 +00:00
"Value","@4","DefinedValue","RestrictedCharacterStringValue","Opaque","BasicTypeId",
2005-03-24 14:26:38 +00:00
"BasicTypeId_UniverationCompatible","BasicType","BasicString","Union","Intersection",
"Except","optConstraints","Constraints","SetOfConstraints","ElementSetSpecs",
2005-03-31 21:48:13 +00:00
"ElementSetSpec","ConstraintSubtypeElement","@5","ConstraintRangeSpec","ConstraintSpec",
2005-03-28 15:01:27 +00:00
"SingleValue","ContainedSubtype","InnerTypeConstraint","WithComponentsList",
"WithComponentsElement","optPresenceConstraint","PresenceConstraint","TableConstraint",
"SimpleTableConstraint","ComponentRelationConstraint","AtNotationList","AtNotationElement",
"ComponentIdList","optMarker","Marker","UniverationDefinition","UniverationList",
"UniverationElement","SignedNumber","optTag","Tag","TagTypeValue","TagClass",
"TagPlicit","TypeRefName","ObjectClassReference","optIdentifier","Identifier", NULL
2004-06-03 03:38:44 +00:00
};
2004-09-08 00:28:11 +00:00
#endif
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
static const short yyr1[] = { 0,
118, 119, 119, 120, 121, 121, 122, 122, 123, 123,
124, 124, 124, 125, 125, 126, 126, 127, 127, 127,
127, 127, 128, 128, 129, 129, 130, 130, 130, 130,
2005-08-12 10:09:10 +00:00
130, 131, 130, 130, 132, 132, 133, 133, 134, 134,
135, 136, 136, 137, 137, 137, 138, 138, 138, 139,
139, 140, 140, 140, 142, 141, 143, 143, 144, 144,
144, 144, 145, 145, 146, 146, 146, 146, 147, 147,
2005-08-13 09:07:11 +00:00
148, 148, 149, 149, 150, 150, 151, 151, 151, 151,
152, 152, 153, 153, 153, 154, 155, 155, 156, 156,
157, 157, 157, 158, 158, 160, 159, 161, 161, 162,
162, 163, 163, 163, 164, 165, 165, 165, 165, 165,
165, 165, 165, 165, 165, 165, 166, 166, 166, 166,
166, 166, 167, 167, 168, 169, 170, 170, 171, 172,
173, 172, 172, 172, 172, 172, 172, 172, 172, 172,
174, 174, 175, 175, 175, 176, 176, 177, 177, 177,
177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
178, 178, 178, 179, 179, 180, 180, 180, 180, 180,
180, 180, 180, 180, 180, 180, 180, 180, 180, 181,
181, 182, 182, 183, 184, 184, 185, 185, 186, 186,
187, 187, 187, 188, 188, 188, 188, 188, 189, 189,
189, 189, 189, 189, 189, 189, 189, 189, 190, 189,
191, 191, 191, 191, 192, 192, 193, 193, 193, 193,
193, 194, 195, 195, 196, 196, 197, 197, 198, 198,
199, 199, 199, 200, 200, 201, 202, 203, 203, 204,
204, 205, 205, 206, 206, 207, 207, 208, 208, 209,
209, 210, 210, 210, 210, 210, 211, 211, 212, 212,
213, 214, 215, 215, 215, 215, 216, 216, 216, 217,
217, 218, 219, 219, 220
2004-06-03 03:38:44 +00:00
};
2004-09-08 00:28:11 +00:00
static const short yyr2[] = { 0,
1, 1, 2, 8, 0, 1, 3, 2, 1, 2,
1, 4, 1, 0, 1, 1, 2, 2, 2, 2,
2, 2, 0, 1, 1, 2, 1, 1, 1, 1,
2005-08-12 10:09:10 +00:00
1, 0, 3, 1, 3, 2, 1, 2, 0, 1,
4, 1, 3, 1, 3, 1, 3, 3, 2, 1,
3, 1, 3, 1, 0, 6, 1, 1, 4, 3,
3, 6, 1, 3, 1, 3, 3, 3, 1, 3,
2005-08-13 09:07:11 +00:00
1, 1, 0, 1, 1, 3, 3, 3, 1, 2,
1, 3, 2, 1, 1, 5, 0, 1, 1, 3,
2, 4, 4, 0, 1, 0, 6, 1, 2, 1,
1, 1, 3, 3, 3, 1, 4, 4, 4, 6,
6, 1, 4, 4, 1, 3, 1, 3, 3, 3,
1, 3, 1, 3, 1, 1, 1, 1, 4, 3,
0, 3, 1, 1, 1, 1, 1, 1, 1, 1,
1, 3, 1, 1, 1, 1, 2, 1, 1, 1,
1, 2, 2, 1, 1, 2, 2, 1, 1, 1,
1, 1, 2, 1, 2, 1, 1, 1, 1, 1,
2004-09-08 00:28:11 +00:00
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2005-08-13 09:07:11 +00:00
1, 1, 1, 1, 0, 1, 1, 4, 3, 4,
1, 3, 5, 1, 3, 3, 3, 3, 4, 3,
1, 1, 3, 3, 3, 3, 1, 1, 0, 5,
1, 2, 2, 3, 1, 1, 1, 1, 1, 1,
1, 1, 3, 5, 1, 3, 1, 3, 0, 1,
1, 1, 1, 1, 1, 3, 4, 1, 3, 2,
3, 1, 3, 0, 1, 1, 2, 2, 3, 1,
3, 1, 4, 4, 1, 1, 1, 1, 0, 1,
2, 4, 0, 1, 1, 1, 0, 1, 1, 1,
1, 1, 0, 1, 1
2004-06-03 03:38:44 +00:00
};
2004-09-08 00:28:11 +00:00
static const short yydefact[] = { 0,
2005-08-13 09:07:11 +00:00
270, 271, 1, 2, 5, 3, 0, 0, 6, 275,
2004-09-08 00:28:11 +00:00
13, 8, 0, 9, 11, 14, 7, 10, 0, 0,
0, 0, 0, 0, 0, 15, 16, 0, 22, 20,
2005-08-13 09:07:11 +00:00
18, 21, 19, 0, 17, 12, 23, 166, 0, 0,
167, 168, 169, 0, 170, 171, 179, 172, 173, 174,
175, 176, 177, 178, 0, 24, 25, 27, 28, 31,
2005-08-12 10:09:10 +00:00
29, 30, 34, 0, 0, 32, 0, 49, 0, 50,
52, 54, 36, 0, 37, 0, 42, 44, 46, 4,
2005-08-13 09:07:11 +00:00
26, 259, 117, 272, 0, 148, 0, 0, 162, 155,
159, 161, 149, 0, 0, 150, 154, 158, 0, 0,
57, 58, 151, 160, 121, 0, 33, 48, 47, 0,
0, 35, 38, 0, 0, 0, 0, 263, 61, 60,
0, 260, 267, 0, 163, 157, 156, 153, 152, 0,
2005-08-12 10:09:10 +00:00
63, 0, 65, 0, 0, 0, 51, 53, 39, 43,
2005-08-13 09:07:11 +00:00
45, 0, 265, 266, 264, 0, 117, 272, 112, 0,
0, 185, 185, 59, 185, 115, 164, 151, 106, 0,
269, 268, 261, 118, 120, 0, 0, 0, 0, 55,
127, 128, 122, 123, 125, 119, 136, 143, 137, 257,
144, 145, 258, 134, 133, 135, 131, 129, 140, 138,
139, 0, 141, 40, 41, 0, 89, 259, 126, 0,
0, 259, 0, 0, 259, 0, 0, 186, 187, 259,
0, 105, 0, 165, 259, 259, 64, 68, 67, 66,
0, 0, 0, 0, 0, 94, 0, 0, 246, 87,
87, 91, 245, 0, 262, 0, 102, 0, 81, 84,
85, 259, 116, 0, 0, 0, 74, 75, 79, 244,
259, 0, 0, 217, 216, 0, 215, 218, 0, 0,
0, 220, 0, 191, 194, 0, 201, 202, 208, 207,
234, 235, 219, 222, 221, 273, 0, 0, 273, 256,
248, 0, 250, 255, 252, 0, 69, 71, 72, 62,
146, 56, 124, 132, 142, 130, 0, 86, 95, 90,
247, 88, 244, 244, 113, 0, 107, 259, 83, 0,
259, 108, 259, 80, 244, 0, 0, 211, 0, 0,
0, 0, 0, 0, 189, 182, 183, 180, 181, 0,
0, 0, 184, 0, 0, 0, 0, 259, 274, 0,
109, 259, 249, 0, 0, 114, 259, 147, 0, 92,
93, 103, 104, 141, 82, 188, 78, 76, 77, 195,
209, 212, 213, 206, 204, 223, 0, 236, 200, 192,
196, 197, 198, 0, 205, 203, 0, 0, 238, 0,
190, 0, 251, 0, 0, 70, 96, 0, 214, 227,
0, 225, 185, 0, 199, 0, 240, 242, 237, 0,
110, 111, 254, 253, 0, 210, 224, 0, 229, 193,
241, 0, 239, 100, 0, 98, 101, 226, 232, 233,
231, 228, 230, 243, 97, 99, 0, 0, 0
2004-06-03 05:07:41 +00:00
};
2004-06-03 03:38:44 +00:00
2005-08-13 09:07:11 +00:00
static const short yydefgoto[] = { 427,
2004-09-08 00:28:11 +00:00
3, 4, 8, 9, 13, 14, 25, 26, 27, 55,
2005-08-12 10:09:10 +00:00
56, 57, 107, 58, 74, 195, 75, 76, 77, 59,
2005-08-13 09:07:11 +00:00
69, 70, 60, 221, 100, 61, 130, 131, 286, 287,
246, 247, 248, 238, 239, 119, 303, 196, 197, 298,
299, 405, 415, 416, 249, 250, 155, 156, 173, 174,
198, 199, 62, 188, 223, 189, 262, 292, 157, 103,
159, 104, 331, 332, 334, 207, 208, 209, 263, 264,
265, 388, 320, 266, 267, 268, 269, 391, 392, 422,
423, 270, 271, 272, 378, 379, 397, 232, 233, 214,
282, 283, 273, 234, 122, 123, 146, 163, 274, 105,
338, 275
2004-06-03 05:07:41 +00:00
};
2004-08-13 12:35:09 +00:00
2005-08-13 09:07:11 +00:00
static const short yypact[] = { 72,
-32768,-32768, 72,-32768, -69,-32768, 36, 58,-32768,-32768,
-32768,-32768, 60,-32768, -48, 137,-32768,-32768, 32, 79,
69, 74, 142, 106, 162, 137,-32768, 116,-32768,-32768,
-32768,-32768,-32768, 218,-32768,-32768, 508,-32768, 232, 38,
-32768,-32768,-32768, 127,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768, 208, 508,-32768,-32768,-32768,-32768,
-32768,-32768,-32768, 358, 737,-32768, 156,-32768, 95,-32768,
168,-32768,-32768, 47,-32768, -10,-32768, 169,-32768,-32768,
-32768, 23, 174,-32768, 205,-32768, 212, 224,-32768,-32768,
-32768,-32768,-32768, 243, 215,-32768,-32768,-32768, 812, 297,
-32768,-32768,-32768,-32768, 189, 300,-32768,-32768,-32768, 223,
198,-32768,-32768, 72, 223, 201, 203, 6,-32768,-32768,
585,-32768, 48, 223,-32768,-32768,-32768,-32768,-32768, 62,
-32768, 200, 202, 204, 263, 466,-32768,-32768, -69,-32768,
-32768, 199,-32768,-32768,-32768, 301, -40, 207, 277, 210,
247, 66, 76,-32768, -18,-32768,-32768, 213,-32768, 217,
-32768,-32768,-32768,-32768,-32768, 316, 812, 312, 223,-32768,
-32768,-32768, 216,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768, 220, 221,-32768,-32768, 101,-32768, 27,-32768, 206,
298, 11, 219, 227, 0, 242, 256,-32768, 228, 0,
257,-32768, 17,-32768, 12, 225,-32768,-32768,-32768,-32768,
324, 199, 324, 312, 466, 234, 199, 466,-32768, 252,
252,-32768,-32768, 662,-32768, 312, 231, 110,-32768,-32768,
-32768, 225,-32768, 242, 275, 238, 236,-32768,-32768, 21,
225, 250, 323,-32768,-32768, -2,-32768,-32768, 226, 72,
242,-32768, 244, 100, 253, 246, -2,-32768,-32768,-32768,
249,-32768,-32768,-32768,-32768, 312, 242, 251, 312,-32768,
-32768, 124,-32768,-32768, 258, 133,-32768,-32768,-32768,-32768,
-32768, 352,-32768, 352,-32768,-32768, 279,-32768,-32768,-32768,
-32768,-32768, 21, 21,-32768, 214,-32768, 11,-32768, 259,
225,-32768, 3,-32768, 21, 456, 254, 255, 261, 178,
266, 269, 260, 267,-32768,-32768,-32768,-32768,-32768, 264,
456, 456,-32768, 456, 242, 274, 262, 225,-32768, 268,
-32768, 225,-32768, 63, 214,-32768, 12,-32768, 273,-32768,
2005-03-24 14:26:38 +00:00
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
2005-08-13 09:07:11 +00:00
-32768,-32768, 265,-32768,-32768, 228, 40,-32768,-32768, 248,
-32768,-32768,-32768, 272,-32768,-32768, 9, 158,-32768, 662,
-32768, 662,-32768, 280, 283,-32768,-32768, 324,-32768,-32768,
161,-32768, -18, 242,-32768, 312, 281,-32768,-32768, 262,
-32768,-32768,-32768,-32768, 148, 352,-32768, 40, 5, 192,
281, 312,-32768,-32768, 24,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768, 381, 385,-32768
2004-09-04 04:49:21 +00:00
};
2004-08-13 12:35:09 +00:00
2004-09-08 00:28:11 +00:00
static const short yypgoto[] = {-32768,
2005-08-13 09:07:11 +00:00
-32768, 384,-32768, 276,-32768, 380,-32768,-32768, 369,-32768,
-32768, 341,-32768,-32768,-32768,-32768, 325,-32768, 287,-32768,
-32768, 288,-32768,-32768, 338,-32768,-32768, 239,-32768, 64,
211,-32768, 99,-32768, 105,-32768, 183,-32768, 190,-32768,
-32768,-32768,-32768, 1, -190, -66, -303, -50,-32768, 209,
-196, -117,-32768, -71,-32768, -275, -115, -218, -41, -120,
-32768, 26,-32768,-32768,-32768, -146,-32768, 107, -166, 28,
-138,-32768, 153,-32768, -246,-32768,-32768,-32768, 22,-32768,
-32768,-32768,-32768,-32768,-32768, 29, 37, -216,-32768,-32768,
-32768, 88, -132, -79,-32768,-32768,-32768,-32768, 10,-32768,
159, -7
2004-09-04 04:49:21 +00:00
};
2004-09-08 00:28:11 +00:00
2005-08-13 09:07:11 +00:00
#define YYLAST 908
2004-09-08 00:28:11 +00:00
static const short yytable[] = { 15,
2005-08-13 09:07:11 +00:00
158, 231, 121, 191, 294, 15, 211, 10, 212, 5,
10, 240, 5, 101, 101, 120, 10, 175, 10, 10,
190, 419, 102, 102, 10, 180, 143, 414, 183, 65,
352, 245, 72, 314, 245, 7, 79, 114, 171, 172,
28, 171, 172, 10, 11, 10, 64, 10, 65, 71,
1, 2, 117, 78, 10, 228, 67, 132, 19, 1,
2, 228, 63, 204, -270, 64, 79, 10, 11, 384,
10, 180, 124, 365, 183, 420, 401, 310, 402, 421,
284, 63, 144, 78, 1, 2, 350, 351, 206, 376,
161, 229, 191, 16, 324, 191, 145, 229, 359, 115,
318, 162, 72, 237, 175, -73, 237, 79, 133, 190,
340, 319, 190, 158, 237, 118, 165, 240, 118, 71,
280, 396, 281, 139, 78, 132, 118, 118, 193, 425,
160, 230, -244, 164, 10, 241, -244, 29, 118, 1,
2, 12, 118, 390, 176, 192, 68, 204, 288, 290,
20, 414, 243, 296, 30, 112, 301, 204, 21, 31,
218, 220, 171, 172, 34, 17, 280, 166, 374, 406,
205, 167, 206, 353, 73, 309, 133, 360, 219, 22,
210, 23, 206, 178, 315, 10, 180, 181, 182, 183,
24, 33, 371, 372, 242, 373, 32, 251, 326, 327,
328, 329, 251, 109, 110, 285, 226, 289, 417, 330,
227, 284, 385, 171, 172, 307, 295, 193, 417, 308,
193, 10, 180, 36, 254, 183, 1, 2, 305, 343,
10, 83, 84, 344, 192, 1, 2, 192, 346, 364,
37, 241, 347, 160, 357, 66, 409, 178, 80, 10,
180, 181, 182, 183, 1, 2, 321, 322, 380, 158,
252, 158, 382, 399, 108, 258, 407, 400, 339, 323,
408, 339, 111, 116, 253, 1, 2, 171, 172, 178,
288, 10, 180, 181, 182, 183, 124, 125, 254, 255,
326, 327, 328, 329, 126, 128, 127, 129, 354, 134,
242, 135, 136, 138, 256, 251, 141, 142, 170, 200,
168, -271, 169, 201, 202, 192, 203, 213, 216, 10,
254, 215, 235, 257, 236, 276, 279, 291, 222, 258,
297, 225, 224, 244, 277, 375, 285, 354, 259, 289,
118, 302, 306, 312, 311, 313, 260, 316, 261, 317,
333, 325, 335, 337, 192, 348, 341, 394, 361, 393,
82, 258, 349, 363, 345, 368, 356, 370, 362, 398,
83, 84, 206, 367, 369, 381, 377, 387, 389, 395,
428, 85, 38, 86, 429, 87, 6, 403, 398, 160,
404, 160, 18, 412, 35, 88, 81, 137, 113, 89,
393, 140, 106, 90, 424, 217, 91, 41, 42, 43,
386, 358, 355, 304, 194, 426, 300, 92, 45, 336,
278, 410, 93, 46, 94, 47, 95, 366, 413, 418,
293, 383, 411, 48, 0, 96, 97, 342, 0, 0,
0, 0, 49, 0, 50, 0, 0, 0, 0, 51,
98, 52, 53, 54, 0, 0, 0, 0, 0, 0,
0, 178, 99, 10, 180, 181, 182, 183, 1, 2,
177, 178, 179, 10, 180, 181, 182, 183, 1, 2,
0, 0, 0, 0, 0, 0, 0, 0, 253, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 254, 255, 0, 0, 0, 0, 0, 0,
0, 0, 184, 0, 0, 10, 0, 0, 256, 0,
1, 2, 0, 0, 0, 0, 0, 0, 0, 0,
185, 0, 38, 0, 0, 0, 0, 257, 0, 0,
0, 0, 0, 258, 0, 0, 0, 39, 0, 0,
0, 40, 259, 186, 0, 0, 0, 41, 42, 43,
260, 0, 261, 44, 0, 0, 0, 0, 45, 0,
187, 0, 0, 46, 0, 47, 0, 0, 0, 0,
0, 0, 0, 48, 0, 0, 0, 0, 0, 0,
0, 0, 49, 0, 50, 0, 0, 147, 148, 51,
0, 52, 53, 54, 149, 0, 0, 0, 85, 38,
86, 0, 87, 150, 0, 0, 0, 0, 0, 0,
0, 0, 88, 0, 0, 0, 89, 0, 0, 0,
90, 0, 0, 91, 41, 42, 43, 0, 0, 0,
0, 0, 151, 0, 92, 45, 0, 0, 0, 93,
46, 94, 47, 95, 0, 0, 0, 0, 0, 0,
48, 0, 96, 97, 152, 153, 0, 0, 0, 49,
0, 50, 0, 154, 147, 148, 51, 98, 52, 53,
54, 149, 0, 0, 0, 85, 38, 86, 0, 87,
150, 0, 0, 0, 0, 0, 0, 0, 0, 88,
0, 0, 0, 89, 0, 0, 0, 90, 0, 0,
91, 41, 42, 43, 0, 0, 0, 0, 0, 151,
0, 92, 45, 0, 0, 0, 93, 46, 94, 47,
95, 0, 0, 0, 0, 0, 0, 48, 0, 96,
97, 152, 153, 0, 0, 0, 49, 0, 50, 83,
84, 0, 0, 51, 98, 52, 53, 54, 0, 0,
85, 38, 86, 0, 87, 0, 0, 0, 0, 0,
2005-08-12 10:09:10 +00:00
0, 0, 0, 0, 88, 0, 0, 0, 89, 0,
0, 0, 90, 0, 0, 91, 41, 42, 43, 0,
2005-08-13 09:07:11 +00:00
0, 0, 0, 0, 0, 0, 92, 45, 0, 0,
2005-08-12 10:09:10 +00:00
0, 93, 46, 94, 47, 95, 0, 0, 0, 0,
2005-08-13 09:07:11 +00:00
0, 0, 48, 0, 96, 97, 0, 0, 0, 0,
0, 49, 0, 50, 1, 2, 0, 0, 51, 98,
52, 53, 54, 0, 0, 85, 38, 86, 0, 87,
0, 0, 0, 0, 0, 0, 0, 0, 0, 88,
0, 0, 0, 89, 0, 0, 0, 90, 0, 0,
91, 41, 42, 43, 0, 0, 0, 0, 0, 0,
0, 92, 45, 0, 0, 0, 93, 46, 94, 47,
95, 0, 0, 0, 0, 0, 0, 48, 0, 96,
97, 0, 0, 0, 0, 0, 49, 0, 50, 0,
0, 0, 0, 51, 98, 52, 53, 54
};
2004-09-08 00:28:11 +00:00
static const short yycheck[] = { 7,
2005-08-13 09:07:11 +00:00
121, 198, 82, 136, 223, 13, 153, 8, 155, 0,
8, 202, 3, 64, 65, 82, 8, 135, 8, 8,
136, 17, 64, 65, 8, 9, 21, 4, 12, 37,
306, 32, 40, 250, 32, 105, 44, 48, 15, 16,
9, 15, 16, 8, 9, 8, 37, 8, 56, 40,
13, 14, 30, 44, 8, 35, 19, 99, 107, 13,
14, 35, 37, 82, 105, 56, 74, 8, 9, 345,
8, 9, 113, 320, 12, 71, 380, 244, 382, 75,
213, 56, 77, 74, 13, 14, 303, 304, 107, 336,
43, 71, 225, 36, 261, 228, 91, 71, 315, 110,
103, 54, 110, 104, 222, 106, 104, 115, 99, 225,
277, 114, 228, 234, 104, 116, 124, 308, 116, 110,
104, 113, 106, 114, 115, 167, 116, 116, 136, 106,
121, 198, 106, 124, 8, 202, 110, 59, 116, 13,
14, 106, 116, 104, 135, 136, 109, 82, 215, 216,
14, 4, 203, 225, 86, 109, 228, 82, 22, 86,
168, 169, 15, 16, 3, 106, 104, 106, 335, 388,
105, 110, 107, 306, 48, 242, 167, 316, 169, 43,
105, 45, 107, 6, 251, 8, 9, 10, 11, 12,
54, 86, 331, 332, 202, 334, 55, 205, 99, 100,
101, 102, 210, 109, 110, 213, 106, 215, 405, 110,
110, 344, 345, 15, 16, 106, 224, 225, 415, 110,
228, 8, 9, 108, 47, 12, 13, 14, 236, 106,
8, 13, 14, 110, 225, 13, 14, 228, 106, 62,
23, 308, 110, 234, 311, 14, 393, 6, 41, 8,
9, 10, 11, 12, 13, 14, 31, 32, 338, 380,
19, 382, 342, 106, 109, 88, 106, 110, 276, 260,
110, 279, 105, 105, 33, 13, 14, 15, 16, 6,
347, 8, 9, 10, 11, 12, 113, 83, 47, 48,
99, 100, 101, 102, 83, 53, 73, 83, 306, 3,
308, 113, 3, 106, 63, 313, 106, 105, 105, 9,
111, 105, 111, 37, 105, 306, 70, 105, 3, 8,
47, 105, 117, 82, 27, 70, 70, 4, 113, 88,
97, 111, 113, 107, 107, 62, 344, 345, 97, 347,
116, 90, 112, 106, 70, 110, 105, 98, 107, 27,
98, 108, 107, 105, 345, 4, 106, 110, 105, 367,
3, 88, 84, 103, 107, 106, 108, 104, 114, 377,
13, 14, 107, 105, 108, 108, 115, 105, 114, 108,
0, 24, 25, 26, 0, 28, 3, 108, 396, 380,
108, 382, 13, 113, 26, 38, 56, 110, 74, 42,
408, 115, 65, 46, 412, 167, 49, 50, 51, 52,
347, 313, 308, 231, 139, 415, 227, 60, 61, 267,
210, 394, 65, 66, 67, 68, 69, 321, 400, 408,
222, 344, 396, 76, -1, 78, 79, 279, -1, -1,
-1, -1, 85, -1, 87, -1, -1, -1, -1, 92,
93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
-1, 6, 105, 8, 9, 10, 11, 12, 13, 14,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
-1, -1, -1, -1, -1, -1, -1, -1, 33, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 47, 48, -1, -1, -1, -1, -1, -1,
-1, -1, 47, -1, -1, 8, -1, -1, 63, -1,
13, 14, -1, -1, -1, -1, -1, -1, -1, -1,
65, -1, 25, -1, -1, -1, -1, 82, -1, -1,
-1, -1, -1, 88, -1, -1, -1, 40, -1, -1,
-1, 44, 97, 88, -1, -1, -1, 50, 51, 52,
105, -1, 107, 56, -1, -1, -1, -1, 61, -1,
105, -1, -1, 66, -1, 68, -1, -1, -1, -1,
-1, -1, -1, 76, -1, -1, -1, -1, -1, -1,
-1, -1, 85, -1, 87, -1, -1, 13, 14, 92,
-1, 94, 95, 96, 20, -1, -1, -1, 24, 25,
26, -1, 28, 29, -1, -1, -1, -1, -1, -1,
-1, -1, 38, -1, -1, -1, 42, -1, -1, -1,
46, -1, -1, 49, 50, 51, 52, -1, -1, -1,
-1, -1, 58, -1, 60, 61, -1, -1, -1, 65,
66, 67, 68, 69, -1, -1, -1, -1, -1, -1,
76, -1, 78, 79, 80, 81, -1, -1, -1, 85,
-1, 87, -1, 89, 13, 14, 92, 93, 94, 95,
96, 20, -1, -1, -1, 24, 25, 26, -1, 28,
29, -1, -1, -1, -1, -1, -1, -1, -1, 38,
-1, -1, -1, 42, -1, -1, -1, 46, -1, -1,
49, 50, 51, 52, -1, -1, -1, -1, -1, 58,
-1, 60, 61, -1, -1, -1, 65, 66, 67, 68,
69, -1, -1, -1, -1, -1, -1, 76, -1, 78,
79, 80, 81, -1, -1, -1, 85, -1, 87, 13,
14, -1, -1, 92, 93, 94, 95, 96, -1, -1,
24, 25, 26, -1, 28, -1, -1, -1, -1, -1,
2005-08-12 10:09:10 +00:00
-1, -1, -1, -1, 38, -1, -1, -1, 42, -1,
-1, -1, 46, -1, -1, 49, 50, 51, 52, -1,
2005-08-13 09:07:11 +00:00
-1, -1, -1, -1, -1, -1, 60, 61, -1, -1,
2005-08-12 10:09:10 +00:00
-1, 65, 66, 67, 68, 69, -1, -1, -1, -1,
2005-08-13 09:07:11 +00:00
-1, -1, 76, -1, 78, 79, -1, -1, -1, -1,
-1, 85, -1, 87, 13, 14, -1, -1, 92, 93,
94, 95, 96, -1, -1, 24, 25, 26, -1, 28,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 38,
-1, -1, -1, 42, -1, -1, -1, 46, -1, -1,
49, 50, 51, 52, -1, -1, -1, -1, -1, -1,
-1, 60, 61, -1, -1, -1, 65, 66, 67, 68,
69, -1, -1, -1, -1, -1, -1, 76, -1, 78,
79, -1, -1, -1, -1, -1, 85, -1, 87, -1,
-1, -1, -1, 92, 93, 94, 95, 96
};
2004-09-08 00:28:11 +00:00
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
#line 3 "/usr/share/bison.simple"
/* This file comes from bison-1.28. */
2004-09-08 00:28:11 +00:00
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */
/* This is the parser code that is written into each bison parser
when the %semantic_parser declaration is not specified in the grammar.
It was written by Richard Stallman by simplifying the hairy parser
used when %semantic_parser is specified. */
#ifndef YYSTACK_USE_ALLOCA
#ifdef alloca
#define YYSTACK_USE_ALLOCA
#else /* alloca not defined */
#ifdef __GNUC__
#define YYSTACK_USE_ALLOCA
#define alloca __builtin_alloca
#else /* not GNU C. */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
#define YYSTACK_USE_ALLOCA
#include <alloca.h>
#else /* not sparc */
/* We think this test detects Watcom and Microsoft C. */
/* This used to test MSDOS, but that is a bad idea
since that symbol is in the user namespace. */
#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
#if 0 /* No need for malloc.h, which pollutes the namespace;
instead, just don't use alloca. */
#include <malloc.h>
2004-09-04 04:49:21 +00:00
#endif
2004-09-08 00:28:11 +00:00
#else /* not MSDOS, or __TURBOC__ */
#if defined(_AIX)
/* I don't know what this was needed for, but it pollutes the namespace.
So I turned it off. rms, 2 May 1997. */
/* #include <malloc.h> */
#pragma alloca
#define YYSTACK_USE_ALLOCA
#else /* not MSDOS, or __TURBOC__, or _AIX */
#if 0
#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
and on HPUX 10. Eventually we can turn this on. */
#define YYSTACK_USE_ALLOCA
#define alloca __builtin_alloca
#endif /* __hpux */
#endif
2004-09-08 00:28:11 +00:00
#endif /* not _AIX */
#endif /* not MSDOS, or __TURBOC__ */
#endif /* not sparc */
#endif /* not GNU C */
#endif /* alloca not defined */
#endif /* YYSTACK_USE_ALLOCA not defined */
#ifdef YYSTACK_USE_ALLOCA
#define YYSTACK_ALLOC alloca
#else
#define YYSTACK_ALLOC malloc
2004-06-03 03:38:44 +00:00
#endif
2004-09-08 00:28:11 +00:00
/* Note: there must be only one dollar sign in this file.
It is replaced by the list of actions, each action
as one case of the switch. */
2004-06-03 03:38:44 +00:00
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY -2
#define YYEOF 0
#define YYACCEPT goto yyacceptlab
2004-09-08 00:28:11 +00:00
#define YYABORT goto yyabortlab
2004-06-03 03:38:44 +00:00
#define YYERROR goto yyerrlab1
2004-09-08 00:28:11 +00:00
/* Like YYERROR except do call yyerror.
This remains here temporarily to ease the
transition to the new meaning of YYERROR, for GCC.
2004-06-03 03:38:44 +00:00
Once GCC version 2 has supplanted version 1, this can go. */
#define YYFAIL goto yyerrlab
#define YYRECOVERING() (!!yyerrstatus)
2004-09-08 00:28:11 +00:00
#define YYBACKUP(token, value) \
2004-06-03 03:38:44 +00:00
do \
if (yychar == YYEMPTY && yylen == 1) \
2004-09-08 00:28:11 +00:00
{ yychar = (token), yylval = (value); \
2004-06-03 03:38:44 +00:00
yychar1 = YYTRANSLATE (yychar); \
YYPOPSTACK; \
goto yybackup; \
} \
else \
2004-09-08 00:28:11 +00:00
{ yyerror ("syntax error: cannot back up"); YYERROR; } \
2004-06-03 03:38:44 +00:00
while (0)
#define YYTERROR 1
#define YYERRCODE 256
2004-09-08 00:28:11 +00:00
#ifndef YYPURE
#define YYLEX yylex()
#endif
2004-09-08 00:28:11 +00:00
#ifdef YYPURE
#ifdef YYLSP_NEEDED
#ifdef YYLEX_PARAM
#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
#else
#define YYLEX yylex(&yylval, &yylloc)
#endif
#else /* not YYLSP_NEEDED */
#ifdef YYLEX_PARAM
#define YYLEX yylex(&yylval, YYLEX_PARAM)
#else
#define YYLEX yylex(&yylval)
#endif
#endif /* not YYLSP_NEEDED */
2004-06-03 03:38:44 +00:00
#endif
2004-09-08 00:28:11 +00:00
/* If nonreentrant, generate the variables here */
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
#ifndef YYPURE
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
int yychar; /* the lookahead symbol */
YYSTYPE yylval; /* the semantic value of the */
/* lookahead symbol */
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
#ifdef YYLSP_NEEDED
YYLTYPE yylloc; /* location data for the lookahead */
/* symbol */
2004-06-03 03:38:44 +00:00
#endif
2004-09-08 00:28:11 +00:00
int yynerrs; /* number of parse errors so far */
#endif /* not YYPURE */
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
#if YYDEBUG != 0
int yydebug; /* nonzero means print parse trace */
/* Since this is uninitialized, it does not stop multiple parsers
from coexisting. */
#endif
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
/* YYINITDEPTH indicates the initial size of the parser's stacks */
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
#ifndef YYINITDEPTH
#define YYINITDEPTH 200
#endif
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
/* YYMAXDEPTH is the maximum size the stacks can grow to
(effective only if the built-in stack extension method is used). */
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
#if YYMAXDEPTH == 0
#undef YYMAXDEPTH
#endif
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
#ifndef YYMAXDEPTH
#define YYMAXDEPTH 10000
#endif
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
/* Define __yy_memcpy. Note that the size argument
should be passed with type unsigned int, because that is what the non-GCC
definitions require. With GCC, __builtin_memcpy takes an arg
of type size_t, but it can handle unsigned int. */
#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
#else /* not GNU C or C++ */
#ifndef __cplusplus
/* This is the most reliable way to avoid incompatibilities
in available built-in functions on various systems. */
2004-06-03 03:38:44 +00:00
static void
2004-09-08 00:28:11 +00:00
__yy_memcpy (to, from, count)
char *to;
char *from;
unsigned int count;
2004-06-03 03:38:44 +00:00
{
2004-09-08 00:28:11 +00:00
register char *f = from;
register char *t = to;
register int i = count;
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
while (i-- > 0)
*t++ = *f++;
2004-06-03 03:38:44 +00:00
}
2004-09-08 00:28:11 +00:00
#else /* __cplusplus */
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
/* This is the most reliable way to avoid incompatibilities
in available built-in functions on various systems. */
2004-06-03 03:38:44 +00:00
static void
2004-09-08 00:28:11 +00:00
__yy_memcpy (char *to, char *from, unsigned int count)
2004-06-03 03:38:44 +00:00
{
2004-09-08 00:28:11 +00:00
register char *t = to;
register char *f = from;
register int i = count;
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
while (i-- > 0)
*t++ = *f++;
2004-06-03 03:38:44 +00:00
}
2004-09-08 00:28:11 +00:00
#endif
#endif
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
#line 217 "/usr/share/bison.simple"
2004-06-03 03:38:44 +00:00
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
It should actually point to an object.
Grammar actions can access the variable by casting it
to the proper pointer type. */
#ifdef YYPARSE_PARAM
2004-09-08 00:28:11 +00:00
#ifdef __cplusplus
#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
#define YYPARSE_PARAM_DECL
#else /* not __cplusplus */
#define YYPARSE_PARAM_ARG YYPARSE_PARAM
#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
#endif /* not __cplusplus */
#else /* not YYPARSE_PARAM */
#define YYPARSE_PARAM_ARG
#define YYPARSE_PARAM_DECL
#endif /* not YYPARSE_PARAM */
2004-06-03 03:38:44 +00:00
/* Prevent warning if -Wstrict-prototypes. */
#ifdef __GNUC__
2004-09-08 00:28:11 +00:00
#ifdef YYPARSE_PARAM
2004-06-03 03:38:44 +00:00
int yyparse (void *);
2004-09-08 00:28:11 +00:00
#else
2004-06-03 03:38:44 +00:00
int yyparse (void);
#endif
2004-09-08 00:28:11 +00:00
#endif
2004-06-03 03:38:44 +00:00
int
2004-09-08 00:28:11 +00:00
yyparse(YYPARSE_PARAM_ARG)
2004-06-03 03:38:44 +00:00
YYPARSE_PARAM_DECL
{
register int yystate;
register int yyn;
register short *yyssp;
register YYSTYPE *yyvsp;
2004-09-08 00:28:11 +00:00
int yyerrstatus; /* number of tokens to shift before error messages enabled */
int yychar1 = 0; /* lookahead token as an internal (translated) token number */
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
short yyssa[YYINITDEPTH]; /* the state stack */
YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
2004-08-13 12:35:09 +00:00
2004-09-08 00:28:11 +00:00
short *yyss = yyssa; /* refer to the stacks thru separate pointers */
YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
2004-09-08 00:28:11 +00:00
#ifdef YYLSP_NEEDED
YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
YYLTYPE *yyls = yylsa;
YYLTYPE *yylsp;
#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
#else
2004-06-03 03:38:44 +00:00
#define YYPOPSTACK (yyvsp--, yyssp--)
2004-09-08 00:28:11 +00:00
#endif
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
int yystacksize = YYINITDEPTH;
int yyfree_stacks = 0;
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
#ifdef YYPURE
int yychar;
YYSTYPE yylval;
int yynerrs;
#ifdef YYLSP_NEEDED
YYLTYPE yylloc;
#endif
#endif
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
YYSTYPE yyval; /* the variable used to return */
/* semantic values from the action */
/* routines */
2004-06-03 03:38:44 +00:00
int yylen;
2004-09-08 00:28:11 +00:00
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Starting parse\n");
#endif
2004-06-03 03:38:44 +00:00
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
2004-09-08 00:28:11 +00:00
yyssp = yyss - 1;
2004-06-03 03:38:44 +00:00
yyvsp = yyvs;
2004-09-08 00:28:11 +00:00
#ifdef YYLSP_NEEDED
yylsp = yyls;
#endif
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
/* Push a new state, which is found in yystate . */
/* In all cases, when you get here, the value and location stacks
have just been pushed. so pushing a state here evens the stacks. */
yynewstate:
2004-09-08 00:28:11 +00:00
*++yyssp = yystate;
2004-06-03 03:38:44 +00:00
if (yyssp >= yyss + yystacksize - 1)
{
2004-09-08 00:28:11 +00:00
/* Give user a chance to reallocate the stack */
/* Use copies of these so that the &'s don't force the real ones into memory. */
YYSTYPE *yyvs1 = yyvs;
short *yyss1 = yyss;
#ifdef YYLSP_NEEDED
YYLTYPE *yyls1 = yyls;
#endif
2004-06-03 03:38:44 +00:00
/* Get the current used size of the three stacks, in elements. */
2004-09-08 00:28:11 +00:00
int size = yyssp - yyss + 1;
2004-06-03 03:38:44 +00:00
#ifdef yyoverflow
2004-09-08 00:28:11 +00:00
/* Each stack pointer address is followed by the size of
the data in use in that stack, in bytes. */
#ifdef YYLSP_NEEDED
/* This used to be a conditional around just the two extra args,
but that might be undefined if yyoverflow is a macro. */
yyoverflow("parser stack overflow",
&yyss1, size * sizeof (*yyssp),
&yyvs1, size * sizeof (*yyvsp),
&yyls1, size * sizeof (*yylsp),
&yystacksize);
#else
yyoverflow("parser stack overflow",
&yyss1, size * sizeof (*yyssp),
&yyvs1, size * sizeof (*yyvsp),
&yystacksize);
#endif
yyss = yyss1; yyvs = yyvs1;
#ifdef YYLSP_NEEDED
yyls = yyls1;
#endif
2004-06-03 03:38:44 +00:00
#else /* no yyoverflow */
/* Extend the stack our own way. */
if (yystacksize >= YYMAXDEPTH)
2004-09-08 00:28:11 +00:00
{
yyerror("parser stack overflow");
if (yyfree_stacks)
{
free (yyss);
free (yyvs);
#ifdef YYLSP_NEEDED
free (yyls);
#endif
}
return 2;
}
2004-06-03 03:38:44 +00:00
yystacksize *= 2;
if (yystacksize > YYMAXDEPTH)
yystacksize = YYMAXDEPTH;
2004-09-08 00:28:11 +00:00
#ifndef YYSTACK_USE_ALLOCA
yyfree_stacks = 1;
#endif
yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
__yy_memcpy ((char *)yyss, (char *)yyss1,
size * (unsigned int) sizeof (*yyssp));
yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
__yy_memcpy ((char *)yyvs, (char *)yyvs1,
size * (unsigned int) sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
__yy_memcpy ((char *)yyls, (char *)yyls1,
size * (unsigned int) sizeof (*yylsp));
#endif
2004-06-03 03:38:44 +00:00
#endif /* no yyoverflow */
2004-09-08 00:28:11 +00:00
yyssp = yyss + size - 1;
yyvsp = yyvs + size - 1;
#ifdef YYLSP_NEEDED
yylsp = yyls + size - 1;
#endif
2004-09-08 00:28:11 +00:00
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Stack size increased to %d\n", yystacksize);
#endif
2004-06-03 03:38:44 +00:00
if (yyssp >= yyss + yystacksize - 1)
YYABORT;
}
2004-09-08 00:28:11 +00:00
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Entering state %d\n", yystate);
#endif
2004-06-03 03:38:44 +00:00
goto yybackup;
2004-09-08 00:28:11 +00:00
yybackup:
2004-06-03 03:38:44 +00:00
/* Do appropriate processing given the current state. */
/* Read a lookahead token if we need one and don't already have one. */
/* yyresume: */
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
2004-09-08 00:28:11 +00:00
if (yyn == YYFLAG)
2004-06-03 03:38:44 +00:00
goto yydefault;
/* Not known => get a lookahead token if don't already have one. */
/* yychar is either YYEMPTY or YYEOF
or a valid token in external form. */
if (yychar == YYEMPTY)
{
2004-09-08 00:28:11 +00:00
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Reading a token: ");
#endif
2004-06-03 03:38:44 +00:00
yychar = YYLEX;
}
2004-09-08 00:28:11 +00:00
/* Convert token to internal form (in yychar1) for indexing tables with */
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
if (yychar <= 0) /* This means end of input. */
2004-06-03 03:38:44 +00:00
{
yychar1 = 0;
2004-09-08 00:28:11 +00:00
yychar = YYEOF; /* Don't call YYLEX any more */
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Now at end of input.\n");
#endif
2004-06-03 03:38:44 +00:00
}
else
{
2004-09-08 00:28:11 +00:00
yychar1 = YYTRANSLATE(yychar);
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
#if YYDEBUG != 0
if (yydebug)
{
fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
/* Give the individual parser a way to print the precise meaning
of a token, for further debugging info. */
#ifdef YYPRINT
YYPRINT (stderr, yychar, yylval);
#endif
fprintf (stderr, ")\n");
}
#endif
2004-06-03 03:38:44 +00:00
}
yyn += yychar1;
2004-09-08 00:28:11 +00:00
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
2004-06-03 03:38:44 +00:00
goto yydefault;
2004-09-08 00:28:11 +00:00
2004-06-03 03:38:44 +00:00
yyn = yytable[yyn];
2004-09-08 00:28:11 +00:00
/* yyn is what to do for this token type in this state.
Negative => reduce, -yyn is rule number.
Positive => shift, yyn is new state.
New state is final state => don't bother to shift,
just return success.
0, or most negative number => error. */
if (yyn < 0)
2004-06-03 03:38:44 +00:00
{
2004-09-08 00:28:11 +00:00
if (yyn == YYFLAG)
2004-06-03 03:38:44 +00:00
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
2004-09-08 00:28:11 +00:00
else if (yyn == 0)
goto yyerrlab;
2004-06-03 03:38:44 +00:00
if (yyn == YYFINAL)
YYACCEPT;
/* Shift the lookahead token. */
2004-09-08 00:28:11 +00:00
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
#endif
2004-06-03 03:38:44 +00:00
/* Discard the token being shifted unless it is eof. */
if (yychar != YYEOF)
yychar = YYEMPTY;
*++yyvsp = yylval;
2004-09-08 00:28:11 +00:00
#ifdef YYLSP_NEEDED
*++yylsp = yylloc;
#endif
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
/* count tokens shifted since error; after three, turn off error status. */
if (yyerrstatus) yyerrstatus--;
2004-06-03 03:38:44 +00:00
yystate = yyn;
goto yynewstate;
2004-09-08 00:28:11 +00:00
/* Do the default action for the current state. */
yydefault:
2004-09-08 00:28:11 +00:00
2004-06-03 03:38:44 +00:00
yyn = yydefact[yystate];
if (yyn == 0)
goto yyerrlab;
2004-09-08 00:28:11 +00:00
/* Do a reduction. yyn is the number of a rule to reduce with. */
2004-06-03 03:38:44 +00:00
yyreduce:
yylen = yyr2[yyn];
2004-09-08 00:28:11 +00:00
if (yylen > 0)
yyval = yyvsp[1-yylen]; /* implement default value of the action */
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
#if YYDEBUG != 0
2004-06-03 03:38:44 +00:00
if (yydebug)
{
2004-09-08 00:28:11 +00:00
int i;
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
fprintf (stderr, "Reducing via rule %d (line %d), ",
yyn, yyrline[yyn]);
2004-06-03 03:38:44 +00:00
/* Print the symbols being reduced, and their result. */
2004-09-08 00:28:11 +00:00
for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
fprintf (stderr, "%s ", yytname[yyrhs[i]]);
fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
2004-06-03 03:38:44 +00:00
}
#endif
2004-09-08 00:28:11 +00:00
switch (yyn) {
case 1:
2005-08-12 10:09:10 +00:00
#line 314 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
*(void **)param = yyvsp[0].a_grammar;
2004-09-08 00:28:11 +00:00
;
break;}
case 2:
2005-08-12 10:09:10 +00:00
#line 320 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_grammar = asn1p_new();
checkmem(yyval.a_grammar);
TQ_ADD(&(yyval.a_grammar->modules), yyvsp[0].a_module, mod_next);
2004-09-08 00:28:11 +00:00
;
break;}
case 3:
2005-08-12 10:09:10 +00:00
#line 325 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_grammar = yyvsp[-1].a_grammar;
TQ_ADD(&(yyval.a_grammar->modules), yyvsp[0].a_module, mod_next);
2004-09-08 00:28:11 +00:00
;
break;}
case 4:
2005-08-12 10:09:10 +00:00
#line 346 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
if(yyvsp[-1].a_module) {
yyval.a_module = yyvsp[-1].a_module;
} else {
/* There's a chance that a module is just plain empty */
yyval.a_module = asn1p_module_new();
}
checkmem(yyval.a_module);
2005-08-12 10:09:10 +00:00
yyval.a_module->ModuleName = yyvsp[-7].tv_str;
2004-06-03 03:38:44 +00:00
yyval.a_module->module_oid = yyvsp[-6].a_oid;
yyval.a_module->module_flags = yyvsp[-4].a_module_flags;
2004-09-08 00:28:11 +00:00
;
break;}
case 5:
2005-08-12 10:09:10 +00:00
#line 367 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_oid = 0; ;
break;}
case 6:
2005-08-12 10:09:10 +00:00
#line 368 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_oid = yyvsp[0].a_oid; ;
break;}
case 7:
2005-08-12 10:09:10 +00:00
#line 372 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_oid = yyvsp[-1].a_oid;
2004-09-08 00:28:11 +00:00
;
break;}
case 8:
2005-08-12 10:09:10 +00:00
#line 375 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_oid = 0;
2004-09-08 00:28:11 +00:00
;
break;}
case 9:
2005-08-12 10:09:10 +00:00
#line 381 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_oid = asn1p_oid_new();
asn1p_oid_add_arc(yyval.a_oid, &yyvsp[0].a_oid_arc);
if(yyvsp[0].a_oid_arc.name)
free(yyvsp[0].a_oid_arc.name);
2004-09-08 00:28:11 +00:00
;
break;}
case 10:
2005-08-12 10:09:10 +00:00
#line 387 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_oid = yyvsp[-1].a_oid;
asn1p_oid_add_arc(yyval.a_oid, &yyvsp[0].a_oid_arc);
if(yyvsp[0].a_oid_arc.name)
free(yyvsp[0].a_oid_arc.name);
2004-09-08 00:28:11 +00:00
;
break;}
case 11:
2005-08-12 10:09:10 +00:00
#line 396 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ /* iso */
2004-06-03 03:38:44 +00:00
yyval.a_oid_arc.name = yyvsp[0].tv_str;
yyval.a_oid_arc.number = -1;
2004-09-08 00:28:11 +00:00
;
break;}
case 12:
2005-08-12 10:09:10 +00:00
#line 400 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ /* iso(1) */
2004-06-03 03:38:44 +00:00
yyval.a_oid_arc.name = yyvsp[-3].tv_str;
yyval.a_oid_arc.number = yyvsp[-1].a_int;
2004-09-08 00:28:11 +00:00
;
break;}
case 13:
2005-08-12 10:09:10 +00:00
#line 404 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ /* 1 */
2004-06-03 03:38:44 +00:00
yyval.a_oid_arc.name = 0;
yyval.a_oid_arc.number = yyvsp[0].a_int;
2004-09-08 00:28:11 +00:00
;
break;}
case 14:
2005-08-12 10:09:10 +00:00
#line 414 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_module_flags = MSF_NOFLAGS; ;
break;}
case 15:
2005-08-12 10:09:10 +00:00
#line 415 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_module_flags = yyvsp[0].a_module_flags;
2004-09-08 00:28:11 +00:00
;
break;}
case 16:
2005-08-12 10:09:10 +00:00
#line 424 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_module_flags = yyvsp[0].a_module_flags;
2004-09-08 00:28:11 +00:00
;
break;}
case 17:
2005-08-12 10:09:10 +00:00
#line 427 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_module_flags = yyvsp[-1].a_module_flags | yyvsp[0].a_module_flags;
2004-09-08 00:28:11 +00:00
;
break;}
case 18:
2005-08-12 10:09:10 +00:00
#line 436 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_module_flags = MSF_EXPLICIT_TAGS;
2004-09-08 00:28:11 +00:00
;
break;}
case 19:
2005-08-12 10:09:10 +00:00
#line 439 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_module_flags = MSF_IMPLICIT_TAGS;
2004-09-08 00:28:11 +00:00
;
break;}
case 20:
2005-08-12 10:09:10 +00:00
#line 442 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_module_flags = MSF_AUTOMATIC_TAGS;
2004-09-08 00:28:11 +00:00
;
break;}
case 21:
2005-08-12 10:09:10 +00:00
#line 445 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_module_flags = MSF_EXTENSIBILITY_IMPLIED;
2004-09-08 00:28:11 +00:00
;
break;}
case 22:
2005-08-12 10:09:10 +00:00
#line 449 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
/* X.680Amd1 specifies TAG and XER */
if(strcmp(yyvsp[-1].tv_str, "TAG") == 0) {
yyval.a_module_flags = MSF_TAG_INSTRUCTIONS;
} else if(strcmp(yyvsp[-1].tv_str, "XER") == 0) {
yyval.a_module_flags = MSF_XER_INSTRUCTIONS;
} else {
fprintf(stderr,
"WARNING: %s INSTRUCTIONS at line %d: "
"Unrecognized encoding reference\n",
yyvsp[-1].tv_str, yylineno);
yyval.a_module_flags = MSF_unk_INSTRUCTIONS;
}
free(yyvsp[-1].tv_str);
2004-09-08 00:28:11 +00:00
;
break;}
case 23:
2005-08-12 10:09:10 +00:00
#line 470 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_module = 0; ;
break;}
case 24:
2005-08-12 10:09:10 +00:00
#line 471 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_module = yyvsp[0].a_module;
2004-09-08 00:28:11 +00:00
;
break;}
case 25:
2005-08-12 10:09:10 +00:00
#line 480 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_module = yyvsp[0].a_module;
2004-09-08 00:28:11 +00:00
;
break;}
case 26:
2005-08-12 10:09:10 +00:00
#line 483 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_module = yyvsp[-1].a_module;
/* Behave well when one of them is skipped. */
if(!(yyvsp[-1].a_module)) {
if(yyvsp[0].a_module) yyval.a_module = yyvsp[0].a_module;
break;
}
2004-06-03 03:38:44 +00:00
#ifdef MY_IMPORT
#error MY_IMPORT DEFINED ELSEWHERE!
#endif
#define MY_IMPORT(foo,field) do { \
2004-08-13 12:31:09 +00:00
while(TQ_FIRST(&(yyvsp[0].a_module->foo))) { \
2004-06-03 03:38:44 +00:00
TQ_ADD(&(yyval.a_module->foo), \
TQ_REMOVE(&(yyvsp[0].a_module->foo), field), \
field); \
2004-08-13 12:31:09 +00:00
} \
assert(TQ_FIRST(&(yyvsp[0].a_module->foo)) == 0); \
} while(0)
2004-06-03 03:38:44 +00:00
MY_IMPORT(imports, xp_next);
MY_IMPORT(exports, xp_next);
MY_IMPORT(members, next);
#undef MY_IMPORT
2004-09-08 00:28:11 +00:00
;
break;}
case 27:
2005-08-12 10:09:10 +00:00
#line 516 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_module = yyvsp[0].a_module;
2004-09-08 00:28:11 +00:00
;
break;}
case 28:
2005-08-12 10:09:10 +00:00
#line 519 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_module = asn1p_module_new();
checkmem(yyval.a_module);
if(yyvsp[0].a_xports) {
TQ_ADD(&(yyval.a_module->exports), yyvsp[0].a_xports, xp_next);
} else {
/* "EXPORTS ALL;" ? */
}
2004-09-08 00:28:11 +00:00
;
break;}
case 29:
2005-08-12 10:09:10 +00:00
#line 528 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_module = asn1p_module_new();
checkmem(yyval.a_module);
assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
2004-09-08 00:28:11 +00:00
;
break;}
case 30:
2005-08-12 10:09:10 +00:00
#line 535 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_module = asn1p_module_new();
checkmem(yyval.a_module);
assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
2004-09-08 00:28:11 +00:00
;
break;}
case 31:
2005-08-12 10:09:10 +00:00
#line 548 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_module = asn1p_module_new();
checkmem(yyval.a_module);
assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
2004-09-08 00:28:11 +00:00
;
break;}
case 32:
2005-08-12 10:09:10 +00:00
#line 556 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ asn1p_lexer_hack_push_encoding_control(); ;
break;}
case 33:
2005-08-12 10:09:10 +00:00
#line 557 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
fprintf(stderr,
"WARNING: ENCODING-CONTROL %s "
"specification at line %d ignored\n",
yyvsp[-1].tv_str, yylineno);
free(yyvsp[-1].tv_str);
yyval.a_module = 0;
2004-09-08 00:28:11 +00:00
;
break;}
case 34:
2005-08-12 10:09:10 +00:00
#line 569 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
return yyerror(
"Attempt to redefine a standard basic type, "
"use -ftypesXY to switch back "
"to older version of ASN.1 standard");
2004-09-08 00:28:11 +00:00
;
break;}
case 35:
2005-08-12 10:09:10 +00:00
#line 583 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2005-08-12 10:09:10 +00:00
if(!saved_aid && 0)
return yyerror("Unterminated IMPORTS FROM, "
"expected semicolon ';'");
saved_aid = 0;
2004-06-03 03:38:44 +00:00
yyval.a_module = yyvsp[-1].a_module;
2004-09-08 00:28:11 +00:00
;
break;}
case 36:
2005-08-12 10:09:10 +00:00
#line 593 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
return yyerror("Empty IMPORTS list");
2004-09-08 00:28:11 +00:00
;
break;}
case 37:
2005-08-12 10:09:10 +00:00
#line 599 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_module = asn1p_module_new();
checkmem(yyval.a_module);
TQ_ADD(&(yyval.a_module->imports), yyvsp[0].a_xports, xp_next);
2004-09-08 00:28:11 +00:00
;
break;}
case 38:
2005-08-12 10:09:10 +00:00
#line 604 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_module = yyvsp[-1].a_module;
TQ_ADD(&(yyval.a_module->imports), yyvsp[0].a_xports, xp_next);
2004-09-08 00:28:11 +00:00
;
break;}
case 39:
2005-08-12 10:09:10 +00:00
#line 611 "asn1p_y.y"
{ memset(&yyval.a_aid, 0, sizeof(yyval.a_aid)); ;
break;}
case 40:
#line 612 "asn1p_y.y"
{ yyval.a_aid.oid = yyvsp[0].a_oid; ;
break;}
case 41:
#line 616 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_xports = yyvsp[-3].a_xports;
2005-08-12 10:09:10 +00:00
yyval.a_xports->fromModuleName = yyvsp[-1].tv_str;
yyval.a_xports->identifier = yyvsp[0].a_aid;
/* This stupid thing is used for look-back hack. */
saved_aid = yyval.a_xports->identifier.oid ? 0 : &(yyval.a_xports->identifier);
2004-06-03 03:38:44 +00:00
checkmem(yyval.a_xports);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 42:
#line 627 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_xports = asn1p_xports_new();
checkmem(yyval.a_xports);
TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 43:
#line 632 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_xports = yyvsp[-2].a_xports;
TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 44:
#line 639 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = asn1p_expr_new(yylineno);
checkmem(yyval.a_expr);
yyval.a_expr->Identifier = yyvsp[0].tv_str;
yyval.a_expr->expr_type = A1TC_REFERENCE;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 45:
#line 645 "asn1p_y.y"
2004-10-12 23:26:53 +00:00
{ /* Completely equivalent to above */
yyval.a_expr = asn1p_expr_new(yylineno);
checkmem(yyval.a_expr);
yyval.a_expr->Identifier = yyvsp[-2].tv_str;
yyval.a_expr->expr_type = A1TC_REFERENCE;
;
break;}
2005-08-12 10:09:10 +00:00
case 46:
#line 651 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = asn1p_expr_new(yylineno);
checkmem(yyval.a_expr);
yyval.a_expr->Identifier = yyvsp[0].tv_str;
yyval.a_expr->expr_type = A1TC_REFERENCE;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 47:
#line 660 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_xports = yyvsp[-1].a_xports;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 48:
#line 663 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_xports = 0;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 49:
#line 666 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
/* Empty EXPORTS clause effectively prohibits export. */
yyval.a_xports = asn1p_xports_new();
checkmem(yyval.a_xports);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 50:
#line 674 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_xports = asn1p_xports_new();
assert(yyval.a_xports);
TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 51:
#line 679 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_xports = yyvsp[-2].a_xports;
TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 52:
#line 686 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = asn1p_expr_new(yylineno);
checkmem(yyval.a_expr);
yyval.a_expr->Identifier = yyvsp[0].tv_str;
yyval.a_expr->expr_type = A1TC_EXPORTVAR;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 53:
#line 692 "asn1p_y.y"
2004-10-12 23:26:53 +00:00
{
yyval.a_expr = asn1p_expr_new(yylineno);
checkmem(yyval.a_expr);
yyval.a_expr->Identifier = yyvsp[-2].tv_str;
yyval.a_expr->expr_type = A1TC_EXPORTVAR;
;
break;}
2005-08-12 10:09:10 +00:00
case 54:
#line 698 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = asn1p_expr_new(yylineno);
checkmem(yyval.a_expr);
yyval.a_expr->Identifier = yyvsp[0].tv_str;
yyval.a_expr->expr_type = A1TC_EXPORTVAR;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 55:
#line 709 "asn1p_y.y"
2005-03-31 21:48:13 +00:00
{ asn1p_lexer_hack_push_opaque_state(); ;
break;}
2005-08-12 10:09:10 +00:00
case 56:
#line 709 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = yyvsp[-4].a_expr;
assert(yyval.a_expr->Identifier == 0);
yyval.a_expr->Identifier = yyvsp[-5].tv_str;
yyval.a_expr->meta_type = AMT_VALUESET;
2005-03-31 21:48:13 +00:00
// take care of ValueSet body
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 57:
#line 719 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = asn1p_expr_new(yylineno);
checkmem(yyval.a_expr);
yyval.a_expr->reference = yyvsp[0].a_ref;
yyval.a_expr->expr_type = A1TC_REFERENCE;
yyval.a_expr->meta_type = AMT_TYPEREF;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 58:
#line 726 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = asn1p_expr_new(yylineno);
checkmem(yyval.a_expr);
yyval.a_expr->expr_type = yyvsp[0].a_type;
yyval.a_expr->meta_type = AMT_TYPE;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 59:
#line 744 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = asn1p_expr_new(yylineno);
checkmem(yyval.a_expr);
yyval.a_expr->Identifier = yyvsp[-3].tv_str;
yyval.a_expr->tag = yyvsp[-1].a_tag;
yyval.a_expr->expr_type = A1TC_TYPEID;
yyval.a_expr->meta_type = AMT_TYPE;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 60:
#line 752 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = yyvsp[0].a_expr;
2004-09-14 02:36:39 +00:00
yyval.a_expr->Identifier = yyvsp[-2].tv_str;
2004-06-03 03:38:44 +00:00
assert(yyval.a_expr->expr_type);
assert(yyval.a_expr->meta_type);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 61:
#line 758 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = yyvsp[0].a_expr;
yyval.a_expr->Identifier = yyvsp[-2].tv_str;
assert(yyval.a_expr->expr_type == A1TC_CLASSDEF);
assert(yyval.a_expr->meta_type == AMT_OBJECT);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 62:
#line 774 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = yyvsp[0].a_expr;
assert(yyval.a_expr->Identifier == 0);
yyval.a_expr->Identifier = yyvsp[-5].tv_str;
yyval.a_expr->params = yyvsp[-3].a_plist;
yyval.a_expr->meta_type = AMT_PARAMTYPE;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 63:
#line 784 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
int ret;
yyval.a_plist = asn1p_paramlist_new(yylineno);
checkmem(yyval.a_plist);
ret = asn1p_paramlist_add_param(yyval.a_plist, yyvsp[0].a_parg.governor, yyvsp[0].a_parg.argument);
checkmem(ret == 0);
if(yyvsp[0].a_parg.governor) asn1p_ref_free(yyvsp[0].a_parg.governor);
if(yyvsp[0].a_parg.argument) free(yyvsp[0].a_parg.argument);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 64:
#line 793 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
int ret;
yyval.a_plist = yyvsp[-2].a_plist;
ret = asn1p_paramlist_add_param(yyval.a_plist, yyvsp[0].a_parg.governor, yyvsp[0].a_parg.argument);
checkmem(ret == 0);
if(yyvsp[0].a_parg.governor) asn1p_ref_free(yyvsp[0].a_parg.governor);
if(yyvsp[0].a_parg.argument) free(yyvsp[0].a_parg.argument);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 65:
#line 804 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_parg.governor = NULL;
yyval.a_parg.argument = yyvsp[0].tv_str;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 66:
#line 808 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
int ret;
yyval.a_parg.governor = asn1p_ref_new(yylineno);
ret = asn1p_ref_add_component(yyval.a_parg.governor, yyvsp[-2].tv_str, 0);
checkmem(ret == 0);
yyval.a_parg.argument = yyvsp[0].tv_str;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 67:
#line 815 "asn1p_y.y"
2005-02-18 16:34:21 +00:00
{
int ret;
yyval.a_parg.governor = asn1p_ref_new(yylineno);
ret = asn1p_ref_add_component(yyval.a_parg.governor, yyvsp[-2].tv_str, 0);
checkmem(ret == 0);
yyval.a_parg.argument = yyvsp[0].tv_str;
;
break;}
2005-08-12 10:09:10 +00:00
case 68:
#line 822 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
int ret;
yyval.a_parg.governor = asn1p_ref_new(yylineno);
ret = asn1p_ref_add_component(yyval.a_parg.governor,
ASN_EXPR_TYPE2STR(yyvsp[-2].a_type), 1);
checkmem(ret == 0);
yyval.a_parg.argument = yyvsp[0].tv_str;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 69:
#line 833 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = asn1p_expr_new(yylineno);
checkmem(yyval.a_expr);
2004-09-08 00:28:11 +00:00
asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
;
break;}
2005-08-12 10:09:10 +00:00
case 70:
#line 838 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = yyvsp[-2].a_expr;
2004-09-08 00:28:11 +00:00
asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
;
break;}
2005-08-12 10:09:10 +00:00
case 71:
#line 845 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = yyvsp[0].a_expr;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 72:
#line 848 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = asn1p_expr_new(yylineno);
checkmem(yyval.a_expr);
yyval.a_expr->Identifier = yyvsp[0].tv_str;
yyval.a_expr->expr_type = A1TC_REFERENCE;
yyval.a_expr->meta_type = AMT_VALUE;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 73:
#line 872 "asn1p_y.y"
2004-10-12 23:26:53 +00:00
{ yyval.a_expr = asn1p_expr_new(yylineno); ;
break;}
2005-08-12 10:09:10 +00:00
case 74:
#line 873 "asn1p_y.y"
2004-10-12 23:26:53 +00:00
{ yyval.a_expr = yyvsp[0].a_expr; ;
break;}
2005-08-12 10:09:10 +00:00
case 75:
#line 876 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = asn1p_expr_new(yylineno);
checkmem(yyval.a_expr);
2004-09-08 00:28:11 +00:00
asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
;
break;}
2005-08-12 10:09:10 +00:00
case 76:
#line 881 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = yyvsp[-2].a_expr;
2004-09-08 00:28:11 +00:00
asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
;
break;}
2005-08-12 10:09:10 +00:00
case 77:
#line 888 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_expr = yyvsp[-1].a_expr;
assert(yyval.a_expr->Identifier == 0);
2004-09-14 02:36:39 +00:00
yyval.a_expr->Identifier = yyvsp[-2].tv_str;
yyval.a_expr->marker = yyvsp[0].a_marker;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 78:
#line 894 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_expr = asn1p_expr_new(yylineno);
checkmem(yyval.a_expr);
yyval.a_expr->meta_type = yyvsp[0].a_expr->meta_type;
yyval.a_expr->expr_type = A1TC_COMPONENTS_OF;
2004-09-08 00:28:11 +00:00
asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
;
break;}
2005-08-12 10:09:10 +00:00
case 79:
#line 901 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_expr = yyvsp[0].a_expr;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-12 10:09:10 +00:00
case 80:
2005-08-13 09:07:11 +00:00
#line 904 "asn1p_y.y"
{
yyval.a_expr = yyvsp[-1].a_expr;
yyval.a_expr->marker = yyvsp[0].a_marker;
_fixup_anonymous_identifier(yyval.a_expr);
;
break;}
case 81:
#line 912 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_expr = asn1p_expr_new(yylineno);
checkmem(yyval.a_expr);
2004-09-08 00:28:11 +00:00
asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
;
break;}
2005-08-13 09:07:11 +00:00
case 82:
#line 917 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_expr = yyvsp[-2].a_expr;
2004-09-08 00:28:11 +00:00
asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
;
break;}
2005-08-13 09:07:11 +00:00
case 83:
#line 924 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_expr = yyvsp[0].a_expr;
assert(yyval.a_expr->Identifier == 0);
2004-09-14 02:36:39 +00:00
yyval.a_expr->Identifier = yyvsp[-1].tv_str;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 84:
#line 929 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_expr = yyvsp[0].a_expr;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 85:
#line 932 "asn1p_y.y"
{
yyval.a_expr = yyvsp[0].a_expr;
_fixup_anonymous_identifier(yyval.a_expr);
;
break;}
case 86:
#line 939 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = yyvsp[-2].a_expr;
checkmem(yyval.a_expr);
yyval.a_expr->with_syntax = yyvsp[0].a_wsynt;
assert(yyval.a_expr->expr_type == A1TC_CLASSDEF);
assert(yyval.a_expr->meta_type == AMT_OBJECT);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 87:
#line 949 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_int = 0; ;
break;}
2005-08-13 09:07:11 +00:00
case 88:
#line 950 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_int = 1; ;
break;}
2005-08-13 09:07:11 +00:00
case 89:
#line 954 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = asn1p_expr_new(yylineno);
checkmem(yyval.a_expr);
yyval.a_expr->expr_type = A1TC_CLASSDEF;
yyval.a_expr->meta_type = AMT_OBJECT;
2004-09-08 00:28:11 +00:00
asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
;
break;}
2005-08-13 09:07:11 +00:00
case 90:
#line 961 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = yyvsp[-2].a_expr;
2004-09-08 00:28:11 +00:00
asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
;
break;}
2005-08-13 09:07:11 +00:00
case 91:
#line 968 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = asn1p_expr_new(yylineno);
checkmem(yyval.a_expr);
yyval.a_expr->Identifier = yyvsp[-1].a_refcomp.name;
yyval.a_expr->expr_type = A1TC_CLASSFIELD;
yyval.a_expr->meta_type = AMT_OBJECTFIELD;
yyval.a_expr->marker = yyvsp[0].a_marker;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 92:
#line 976 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_expr = yyvsp[-2].a_expr;
yyval.a_expr->Identifier = yyvsp[-3].a_refcomp.name;
2004-11-24 17:43:29 +00:00
yyval.a_expr->marker = yyvsp[0].a_marker;
yyval.a_expr->unique = yyvsp[-1].a_int;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 93:
#line 982 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
int ret;
yyval.a_expr = asn1p_expr_new(yylineno);
checkmem(yyval.a_expr);
yyval.a_expr->Identifier = yyvsp[-3].a_refcomp.name;
yyval.a_expr->reference = asn1p_ref_new(yylineno);
checkmem(yyval.a_expr->reference);
ret = asn1p_ref_add_component(yyval.a_expr->reference,
yyvsp[-2].a_refcomp.name, yyvsp[-2].a_refcomp.lex_type);
checkmem(ret == 0);
yyval.a_expr->expr_type = A1TC_CLASSFIELD;
yyval.a_expr->meta_type = AMT_OBJECTFIELD;
2004-11-24 17:43:29 +00:00
yyval.a_expr->marker = yyvsp[0].a_marker;
yyval.a_expr->unique = yyvsp[-1].a_int;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 94:
#line 1000 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_wsynt = 0; ;
break;}
2005-08-13 09:07:11 +00:00
case 95:
#line 1001 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_wsynt = yyvsp[0].a_wsynt;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 96:
#line 1008 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ asn1p_lexer_hack_enable_with_syntax(); ;
break;}
2005-08-13 09:07:11 +00:00
case 97:
#line 1010 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_wsynt = yyvsp[-1].a_wsynt;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 98:
#line 1016 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_wsynt = asn1p_wsyntx_new();
TQ_ADD(&(yyval.a_wsynt->chunks), yyvsp[0].a_wchunk, next);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 99:
#line 1020 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_wsynt = yyvsp[-1].a_wsynt;
TQ_ADD(&(yyval.a_wsynt->chunks), yyvsp[0].a_wchunk, next);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 100:
#line 1027 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_wchunk = asn1p_wsyntx_chunk_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 101:
#line 1030 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
asn1p_ref_t *ref;
int ret;
ref = asn1p_ref_new(yylineno);
checkmem(ref);
ret = asn1p_ref_add_component(ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
checkmem(ret == 0);
yyval.a_wchunk = asn1p_wsyntx_chunk_fromref(ref, 0);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 102:
#line 1042 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_expr = asn1p_expr_new(yylineno);
2004-06-03 03:38:44 +00:00
checkmem(yyval.a_expr);
yyval.a_expr->Identifier = strdup("...");
checkmem(yyval.a_expr->Identifier);
yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
yyval.a_expr->meta_type = AMT_TYPE;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 103:
#line 1050 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_expr = asn1p_expr_new(yylineno);
2004-06-03 03:38:44 +00:00
checkmem(yyval.a_expr);
yyval.a_expr->Identifier = strdup("...");
checkmem(yyval.a_expr->Identifier);
yyval.a_expr->value = yyvsp[0].a_value;
yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
yyval.a_expr->meta_type = AMT_TYPE;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 104:
#line 1059 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_expr = asn1p_expr_new(yylineno);
2004-06-03 03:38:44 +00:00
checkmem(yyval.a_expr);
yyval.a_expr->Identifier = strdup("...");
yyval.a_expr->value = yyvsp[0].a_value;
checkmem(yyval.a_expr->Identifier);
yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
yyval.a_expr->meta_type = AMT_TYPE;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 105:
#line 1071 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_expr = yyvsp[-1].a_expr;
2004-09-14 02:36:39 +00:00
yyval.a_expr->tag = yyvsp[-2].a_tag;
/*
* Outer constraint for SEQUENCE OF and SET OF applies
* to the inner type.
*/
if(yyval.a_expr->expr_type == ASN_CONSTR_SEQUENCE_OF
|| yyval.a_expr->expr_type == ASN_CONSTR_SET_OF) {
assert(!TQ_FIRST(&(yyval.a_expr->members))->constraints);
TQ_FIRST(&(yyval.a_expr->members))->constraints = yyvsp[0].a_constr;
} else {
if(yyval.a_expr->constraints) {
2004-09-14 02:36:39 +00:00
assert(!yyvsp[-1].a_expr);
} else {
yyval.a_expr->constraints = yyvsp[0].a_constr;
}
}
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 106:
#line 1093 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = yyvsp[0].a_expr;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 107:
#line 1096 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2005-03-20 11:12:40 +00:00
yyval.a_expr = yyvsp[-1].a_expr;
assert(yyval.a_expr->expr_type == A1TC_INVALID);
yyval.a_expr->expr_type = ASN_CONSTR_CHOICE;
2004-06-03 03:38:44 +00:00
yyval.a_expr->meta_type = AMT_TYPE;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 108:
#line 1102 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_expr = yyvsp[-1].a_expr;
assert(yyval.a_expr->expr_type == A1TC_INVALID);
2005-03-20 11:12:40 +00:00
yyval.a_expr->expr_type = ASN_CONSTR_SEQUENCE;
yyval.a_expr->meta_type = AMT_TYPE;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 109:
#line 1108 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_expr = yyvsp[-1].a_expr;
assert(yyval.a_expr->expr_type == A1TC_INVALID);
2005-03-20 11:12:40 +00:00
yyval.a_expr->expr_type = ASN_CONSTR_SET;
yyval.a_expr->meta_type = AMT_TYPE;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 110:
#line 1114 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_expr = asn1p_expr_new(yylineno);
2004-06-03 03:38:44 +00:00
checkmem(yyval.a_expr);
2004-09-22 16:03:36 +00:00
yyval.a_expr->constraints = yyvsp[-4].a_constr;
yyval.a_expr->expr_type = ASN_CONSTR_SEQUENCE_OF;
yyval.a_expr->meta_type = AMT_TYPE;
2004-09-22 16:03:36 +00:00
yyvsp[0].a_expr->Identifier = yyvsp[-2].tv_str;
yyvsp[0].a_expr->tag = yyvsp[-1].a_tag;
2004-09-08 00:28:11 +00:00
asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
;
break;}
2005-08-13 09:07:11 +00:00
case 111:
#line 1124 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_expr = asn1p_expr_new(yylineno);
checkmem(yyval.a_expr);
2004-09-22 16:03:36 +00:00
yyval.a_expr->constraints = yyvsp[-4].a_constr;
yyval.a_expr->expr_type = ASN_CONSTR_SET_OF;
yyval.a_expr->meta_type = AMT_TYPE;
2004-09-22 16:03:36 +00:00
yyvsp[0].a_expr->Identifier = yyvsp[-2].tv_str;
yyvsp[0].a_expr->tag = yyvsp[-1].a_tag;
2004-09-08 00:28:11 +00:00
asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
;
break;}
2005-08-13 09:07:11 +00:00
case 112:
#line 1134 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_expr = asn1p_expr_new(yylineno);
checkmem(yyval.a_expr);
2004-09-04 04:49:21 +00:00
yyval.a_expr->expr_type = ASN_TYPE_ANY;
yyval.a_expr->meta_type = AMT_TYPE;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 113:
#line 1140 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
int ret;
yyval.a_expr = asn1p_expr_new(yylineno);
checkmem(yyval.a_expr);
yyval.a_expr->reference = asn1p_ref_new(yylineno);
ret = asn1p_ref_add_component(yyval.a_expr->reference,
yyvsp[0].tv_str, RLT_lowercase);
checkmem(ret == 0);
2004-09-04 04:49:21 +00:00
yyval.a_expr->expr_type = ASN_TYPE_ANY;
yyval.a_expr->meta_type = AMT_TYPE;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 114:
#line 1154 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
int ret;
yyval.a_expr = yyvsp[-1].a_expr;
assert(yyval.a_expr->expr_type == 0);
assert(yyval.a_expr->meta_type == 0);
assert(yyval.a_expr->reference == 0);
yyval.a_expr->reference = asn1p_ref_new(yylineno);
checkmem(yyval.a_expr->reference);
ret = asn1p_ref_add_component(yyval.a_expr->reference, yyvsp[-3].tv_str, RLT_UNKNOWN);
checkmem(ret == 0);
free(yyvsp[-3].tv_str);
yyval.a_expr->expr_type = A1TC_PARAMETRIZED;
yyval.a_expr->meta_type = AMT_TYPE;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 115:
#line 1178 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = asn1p_expr_new(yylineno);
checkmem(yyval.a_expr);
yyval.a_expr->reference = yyvsp[0].a_ref;
yyval.a_expr->expr_type = A1TC_REFERENCE;
yyval.a_expr->meta_type = AMT_TYPEREF;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 116:
#line 1185 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = asn1p_expr_new(yylineno);
checkmem(yyval.a_expr);
yyval.a_expr->reference = yyvsp[0].a_ref;
yyval.a_expr->expr_type = A1TC_INSTANCE;
yyval.a_expr->meta_type = AMT_TYPE;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 117:
#line 1200 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
int ret;
yyval.a_ref = asn1p_ref_new(yylineno);
checkmem(yyval.a_ref);
ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN);
checkmem(ret == 0);
free(yyvsp[0].tv_str);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 118:
#line 1208 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
int ret;
yyval.a_ref = asn1p_ref_new(yylineno);
checkmem(yyval.a_ref);
ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
checkmem(ret == 0);
ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN);
checkmem(ret == 0);
free(yyvsp[-2].tv_str);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 119:
#line 1218 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
int ret;
yyval.a_ref = asn1p_ref_new(yylineno);
checkmem(yyval.a_ref);
ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
checkmem(ret == 0);
2004-09-15 11:59:51 +00:00
ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN);
2004-06-03 03:38:44 +00:00
checkmem(ret == 0);
free(yyvsp[-2].tv_str);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 120:
#line 1228 "asn1p_y.y"
2004-09-15 11:59:51 +00:00
{
int ret;
yyval.a_ref = asn1p_ref_new(yylineno);
checkmem(yyval.a_ref);
ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
checkmem(ret == 0);
ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_lowercase);
checkmem(ret == 0);
free(yyvsp[-2].tv_str);
;
break;}
2005-08-13 09:07:11 +00:00
case 121:
#line 1238 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
int ret;
yyval.a_ref = asn1p_ref_new(yylineno);
checkmem(yyval.a_ref);
ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_CAPITALS);
free(yyvsp[0].tv_str);
checkmem(ret == 0);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 122:
#line 1246 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
int ret;
yyval.a_ref = yyvsp[0].a_ref;
ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_CAPITALS);
free(yyvsp[-2].tv_str);
checkmem(ret == 0);
/*
* Move the last element infront.
*/
{
struct asn1p_ref_component_s tmp_comp;
tmp_comp = yyval.a_ref->components[yyval.a_ref->comp_count-1];
memmove(&yyval.a_ref->components[1],
&yyval.a_ref->components[0],
sizeof(yyval.a_ref->components[0])
* (yyval.a_ref->comp_count - 1));
yyval.a_ref->components[0] = tmp_comp;
}
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 123:
#line 1268 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
int ret;
yyval.a_ref = asn1p_ref_new(yylineno);
checkmem(yyval.a_ref);
ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
free(yyvsp[0].a_refcomp.name);
checkmem(ret == 0);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 124:
#line 1276 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
int ret;
yyval.a_ref = yyvsp[-2].a_ref;
ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
free(yyvsp[0].a_refcomp.name);
checkmem(ret == 0);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 127:
#line 1290 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_refcomp.lex_type = RLT_AmpUppercase;
yyval.a_refcomp.name = yyvsp[0].tv_str;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 128:
#line 1295 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_refcomp.lex_type = RLT_Amplowercase;
yyval.a_refcomp.name = yyvsp[0].tv_str;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 129:
#line 1308 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = yyvsp[-2].a_expr;
assert(yyval.a_expr->Identifier == NULL);
yyval.a_expr->Identifier = yyvsp[-3].tv_str;
yyval.a_expr->meta_type = AMT_VALUE;
yyval.a_expr->value = yyvsp[0].a_value;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 130:
#line 1318 "asn1p_y.y"
2004-09-15 11:59:51 +00:00
{
yyval.a_value = asn1p_value_fromint(0);
checkmem(yyval.a_value);
yyval.a_value->type = ATV_CHOICE_IDENTIFIER;
yyval.a_value->value.choice_identifier.identifier = yyvsp[-2].tv_str;
yyval.a_value->value.choice_identifier.value = yyvsp[0].a_value;
;
break;}
2005-08-13 09:07:11 +00:00
case 131:
#line 1325 "asn1p_y.y"
2005-03-24 16:27:02 +00:00
{ asn1p_lexer_hack_push_opaque_state(); ;
2004-09-08 00:28:11 +00:00
break;}
2005-08-13 09:07:11 +00:00
case 132:
#line 1325 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
checkmem(yyval.a_value);
yyval.a_value->type = ATV_UNPARSED;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 133:
#line 1330 "asn1p_y.y"
2004-09-15 11:59:51 +00:00
{
yyval.a_value = asn1p_value_fromint(0);
checkmem(yyval.a_value);
yyval.a_value->type = ATV_NULL;
;
break;}
2005-08-13 09:07:11 +00:00
case 134:
#line 1335 "asn1p_y.y"
2004-09-15 11:59:51 +00:00
{
yyval.a_value = asn1p_value_fromint(0);
checkmem(yyval.a_value);
yyval.a_value->type = ATV_FALSE;
;
break;}
2005-08-13 09:07:11 +00:00
case 135:
#line 1340 "asn1p_y.y"
2004-09-15 11:59:51 +00:00
{
yyval.a_value = asn1p_value_fromint(0);
checkmem(yyval.a_value);
yyval.a_value->type = ATV_TRUE;
;
break;}
2005-08-13 09:07:11 +00:00
case 136:
#line 1345 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_value = _convert_bitstring2binary(yyvsp[0].tv_str, 'B');
checkmem(yyval.a_value);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 137:
#line 1349 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_value = _convert_bitstring2binary(yyvsp[0].tv_str, 'H');
checkmem(yyval.a_value);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 138:
#line 1353 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2005-03-24 14:26:38 +00:00
yyval.a_value = yyval.a_value;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 139:
#line 1356 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_value = yyvsp[0].a_value;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 140:
#line 1359 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_value = yyvsp[0].a_value;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 141:
#line 1365 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
asn1p_ref_t *ref;
int ret;
ref = asn1p_ref_new(yylineno);
checkmem(ref);
ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
checkmem(ret == 0);
yyval.a_value = asn1p_value_fromref(ref, 0);
checkmem(yyval.a_value);
free(yyvsp[0].tv_str);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 142:
#line 1376 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
asn1p_ref_t *ref;
int ret;
ref = asn1p_ref_new(yylineno);
checkmem(ref);
ret = asn1p_ref_add_component(ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
checkmem(ret == 0);
ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
checkmem(ret == 0);
yyval.a_value = asn1p_value_fromref(ref, 0);
checkmem(yyval.a_value);
free(yyvsp[-2].tv_str);
free(yyvsp[0].tv_str);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 143:
#line 1394 "asn1p_y.y"
2005-03-24 14:26:38 +00:00
{
yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
checkmem(yyval.a_value);
;
break;}
2005-08-13 09:07:11 +00:00
case 144:
#line 1398 "asn1p_y.y"
{
yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int);
2005-03-24 14:26:38 +00:00
checkmem(yyval.a_value);
yyval.a_value->type = ATV_TUPLE;
;
break;}
2005-08-13 09:07:11 +00:00
case 145:
#line 1403 "asn1p_y.y"
{
yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int);
2005-03-24 14:26:38 +00:00
checkmem(yyval.a_value);
yyval.a_value->type = ATV_QUADRUPLE;
;
break;}
2005-08-13 09:07:11 +00:00
case 146:
#line 1437 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2005-03-20 14:28:32 +00:00
yyval.tv_opaque.len = yyvsp[0].tv_opaque.len + 1;
2004-06-03 03:38:44 +00:00
yyval.tv_opaque.buf = malloc(yyval.tv_opaque.len + 1);
checkmem(yyval.tv_opaque.buf);
yyval.tv_opaque.buf[0] = '{';
2005-03-20 14:28:32 +00:00
memcpy(yyval.tv_opaque.buf + 1, yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len);
2004-06-03 03:38:44 +00:00
yyval.tv_opaque.buf[yyval.tv_opaque.len] = '\0';
free(yyvsp[0].tv_opaque.buf);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 147:
#line 1446 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
int newsize = yyvsp[-1].tv_opaque.len + yyvsp[0].tv_opaque.len;
char *p = malloc(newsize + 1);
checkmem(p);
memcpy(p , yyvsp[-1].tv_opaque.buf, yyvsp[-1].tv_opaque.len);
memcpy(p + yyvsp[-1].tv_opaque.len, yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len);
p[newsize] = '\0';
free(yyvsp[-1].tv_opaque.buf);
free(yyvsp[0].tv_opaque.buf);
yyval.tv_opaque.buf = p;
yyval.tv_opaque.len = newsize;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 148:
#line 1461 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_type = ASN_BASIC_BOOLEAN; ;
break;}
2005-08-13 09:07:11 +00:00
case 149:
#line 1462 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_type = ASN_BASIC_NULL; ;
break;}
2005-08-13 09:07:11 +00:00
case 150:
#line 1463 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_type = ASN_BASIC_REAL; ;
break;}
2005-08-13 09:07:11 +00:00
case 151:
#line 1464 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_type = yyvsp[0].a_type; ;
break;}
2005-08-13 09:07:11 +00:00
case 152:
#line 1465 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_type = ASN_BASIC_OCTET_STRING; ;
break;}
2005-08-13 09:07:11 +00:00
case 153:
#line 1466 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_type = ASN_BASIC_OBJECT_IDENTIFIER; ;
break;}
2005-08-13 09:07:11 +00:00
case 154:
#line 1467 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_type = ASN_BASIC_RELATIVE_OID; ;
break;}
2005-08-13 09:07:11 +00:00
case 155:
#line 1468 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_type = ASN_BASIC_EXTERNAL; ;
break;}
2005-08-13 09:07:11 +00:00
case 156:
#line 1469 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_type = ASN_BASIC_EMBEDDED_PDV; ;
break;}
2005-08-13 09:07:11 +00:00
case 157:
#line 1470 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_type = ASN_BASIC_CHARACTER_STRING; ;
break;}
2005-08-13 09:07:11 +00:00
case 158:
#line 1471 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_type = ASN_BASIC_UTCTime; ;
break;}
2005-08-13 09:07:11 +00:00
case 159:
#line 1472 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_type = ASN_BASIC_GeneralizedTime; ;
break;}
2005-08-13 09:07:11 +00:00
case 160:
#line 1473 "asn1p_y.y"
2005-03-20 11:12:40 +00:00
{ yyval.a_type = yyvsp[0].a_type; ;
break;}
2005-08-13 09:07:11 +00:00
case 161:
#line 1480 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_type = ASN_BASIC_INTEGER; ;
break;}
2005-08-13 09:07:11 +00:00
case 162:
#line 1481 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_type = ASN_BASIC_ENUMERATED; ;
break;}
2005-08-13 09:07:11 +00:00
case 163:
#line 1482 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_type = ASN_BASIC_BIT_STRING; ;
break;}
2005-08-13 09:07:11 +00:00
case 164:
#line 1486 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_expr = asn1p_expr_new(yylineno);
2004-06-03 03:38:44 +00:00
checkmem(yyval.a_expr);
yyval.a_expr->expr_type = yyvsp[0].a_type;
yyval.a_expr->meta_type = AMT_TYPE;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 165:
#line 1492 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
if(yyvsp[0].a_expr) {
yyval.a_expr = yyvsp[0].a_expr;
} else {
yyval.a_expr = asn1p_expr_new(yylineno);
2004-06-03 03:38:44 +00:00
checkmem(yyval.a_expr);
}
yyval.a_expr->expr_type = yyvsp[-1].a_type;
yyval.a_expr->meta_type = AMT_TYPE;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 166:
#line 1505 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_type = ASN_STRING_BMPString; ;
break;}
2005-08-13 09:07:11 +00:00
case 167:
#line 1506 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_type = ASN_STRING_GeneralString;
2004-09-15 11:59:51 +00:00
fprintf(stderr, "WARNING: GeneralString is not fully supported\n");
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 168:
#line 1510 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_type = ASN_STRING_GraphicString;
2004-09-15 11:59:51 +00:00
fprintf(stderr, "WARNING: GraphicString is not fully supported\n");
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 169:
#line 1514 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_type = ASN_STRING_IA5String; ;
break;}
2005-08-13 09:07:11 +00:00
case 170:
#line 1515 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_type = ASN_STRING_ISO646String; ;
break;}
2005-08-13 09:07:11 +00:00
case 171:
#line 1516 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_type = ASN_STRING_NumericString; ;
break;}
2005-08-13 09:07:11 +00:00
case 172:
#line 1517 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_type = ASN_STRING_PrintableString; ;
break;}
2005-08-13 09:07:11 +00:00
case 173:
#line 1518 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_type = ASN_STRING_T61String;
2004-09-15 11:59:51 +00:00
fprintf(stderr, "WARNING: T61String is not fully supported\n");
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 174:
#line 1522 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_type = ASN_STRING_TeletexString; ;
break;}
2005-08-13 09:07:11 +00:00
case 175:
#line 1523 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_type = ASN_STRING_UniversalString; ;
break;}
2005-08-13 09:07:11 +00:00
case 176:
#line 1524 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_type = ASN_STRING_UTF8String; ;
break;}
2005-08-13 09:07:11 +00:00
case 177:
#line 1525 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_type = ASN_STRING_VideotexString;
2004-09-15 11:59:51 +00:00
fprintf(stderr, "WARNING: VideotexString is not fully supported\n");
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 178:
#line 1529 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_type = ASN_STRING_VisibleString; ;
break;}
2005-08-13 09:07:11 +00:00
case 179:
#line 1530 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_type = ASN_STRING_ObjectDescriptor; ;
break;}
2005-08-13 09:07:11 +00:00
case 185:
#line 1542 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_constr = 0; ;
break;}
2005-08-13 09:07:11 +00:00
case 186:
#line 1543 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_constr = yyvsp[0].a_constr;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 187:
#line 1549 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_SET, yyvsp[0].a_constr, 0);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 188:
#line 1552 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
/*
* This is a special case, for compatibility purposes.
* It goes without parentheses.
2004-06-03 03:38:44 +00:00
*/
CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_SIZE, yyvsp[-1].a_constr, 0);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 189:
#line 1562 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_constr = yyvsp[-1].a_constr;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 190:
#line 1565 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_SET, yyvsp[-3].a_constr, yyvsp[-1].a_constr);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 191:
#line 1571 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_constr = yyvsp[0].a_constr;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 192:
#line 1574 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
asn1p_constraint_t *ct;
ct = asn1p_constraint_new(yylineno);
ct->type = ACT_EL_EXT;
CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-2].a_constr, ct);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 193:
#line 1580 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
asn1p_constraint_t *ct;
ct = asn1p_constraint_new(yylineno);
ct->type = ACT_EL_EXT;
CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-4].a_constr, ct);
2004-08-13 12:35:09 +00:00
ct = yyval.a_constr;
CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, ct, yyvsp[0].a_constr);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 194:
#line 1591 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_constr = yyvsp[0].a_constr;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 195:
#line 1594 "asn1p_y.y"
2005-03-24 14:26:38 +00:00
{
CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_AEX, yyvsp[0].a_constr, 0);
;
break;}
2005-08-13 09:07:11 +00:00
case 196:
#line 1597 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_UNI, yyvsp[-2].a_constr, yyvsp[0].a_constr);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 197:
#line 1600 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_INT, yyvsp[-2].a_constr, yyvsp[0].a_constr);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 198:
#line 1603 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_EXC, yyvsp[-2].a_constr, yyvsp[0].a_constr);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 199:
#line 1609 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
int ret;
yyval.a_constr = asn1p_constraint_new(yylineno);
checkmem(yyval.a_constr);
yyval.a_constr->type = yyvsp[-3].a_ctype;
ret = asn1p_constraint_insert(yyval.a_constr, yyvsp[-1].a_constr);
checkmem(ret == 0);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 200:
#line 1617 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
int ret;
yyval.a_constr = asn1p_constraint_new(yylineno);
checkmem(yyval.a_constr);
yyval.a_constr->type = ACT_CA_SET;
ret = asn1p_constraint_insert(yyval.a_constr, yyvsp[-1].a_constr);
checkmem(ret == 0);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 201:
#line 1625 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_constr = asn1p_constraint_new(yylineno);
checkmem(yyval.a_constr);
yyval.a_constr->type = ACT_EL_VALUE;
yyval.a_constr->value = yyvsp[0].a_value;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 202:
#line 1631 "asn1p_y.y"
2005-03-20 12:58:00 +00:00
{
yyval.a_constr = asn1p_constraint_new(yylineno);
checkmem(yyval.a_constr);
yyval.a_constr->type = ACT_EL_TYPE;
yyval.a_constr->containedSubtype = yyvsp[0].a_value;
;
break;}
2005-08-13 09:07:11 +00:00
case 203:
#line 1637 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_constr = asn1p_constraint_new(yylineno);
checkmem(yyval.a_constr);
yyval.a_constr->type = yyvsp[-1].a_ctype;
yyval.a_constr->range_start = yyvsp[-2].a_value;
yyval.a_constr->range_stop = yyvsp[0].a_value;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 204:
#line 1644 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_constr = asn1p_constraint_new(yylineno);
checkmem(yyval.a_constr);
yyval.a_constr->type = yyvsp[-1].a_ctype;
yyval.a_constr->range_start = asn1p_value_fromint(-123);
2004-06-03 03:38:44 +00:00
yyval.a_constr->range_stop = yyvsp[0].a_value;
yyval.a_constr->range_start->type = ATV_MIN;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 205:
#line 1652 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_constr = asn1p_constraint_new(yylineno);
checkmem(yyval.a_constr);
yyval.a_constr->type = yyvsp[-1].a_ctype;
yyval.a_constr->range_start = yyvsp[-2].a_value;
yyval.a_constr->range_stop = asn1p_value_fromint(321);
yyval.a_constr->range_stop->type = ATV_MAX;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 206:
#line 1660 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_constr = asn1p_constraint_new(yylineno);
checkmem(yyval.a_constr);
yyval.a_constr->type = yyvsp[-1].a_ctype;
yyval.a_constr->range_start = asn1p_value_fromint(-123);
yyval.a_constr->range_stop = asn1p_value_fromint(321);
yyval.a_constr->range_start->type = ATV_MIN;
yyval.a_constr->range_stop->type = ATV_MAX;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 207:
#line 1669 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_constr = yyvsp[0].a_constr;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 208:
#line 1672 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_constr = yyvsp[0].a_constr;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 209:
#line 1676 "asn1p_y.y"
2005-03-20 14:28:32 +00:00
{ asn1p_lexer_hack_push_opaque_state(); ;
2004-09-08 00:28:11 +00:00
break;}
2005-08-13 09:07:11 +00:00
case 210:
#line 1676 "asn1p_y.y"
2005-03-20 14:28:32 +00:00
{
yyval.a_constr = asn1p_constraint_new(yylineno);
checkmem(yyval.a_constr);
yyval.a_constr->type = ACT_CT_CTDBY;
yyval.a_constr->value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
checkmem(yyval.a_constr->value);
yyval.a_constr->value->type = ATV_UNPARSED;
;
2004-09-08 00:28:11 +00:00
break;}
2005-08-13 09:07:11 +00:00
case 211:
#line 1687 "asn1p_y.y"
2005-03-20 14:28:32 +00:00
{ yyval.a_ctype = ACT_EL_RANGE; ;
2004-09-08 00:28:11 +00:00
break;}
2005-08-13 09:07:11 +00:00
case 212:
#line 1688 "asn1p_y.y"
2005-03-20 14:28:32 +00:00
{ yyval.a_ctype = ACT_EL_RLRANGE; ;
2004-09-08 00:28:11 +00:00
break;}
2005-08-13 09:07:11 +00:00
case 213:
#line 1689 "asn1p_y.y"
2005-03-20 14:28:32 +00:00
{ yyval.a_ctype = ACT_EL_LLRANGE; ;
break;}
2005-08-13 09:07:11 +00:00
case 214:
#line 1690 "asn1p_y.y"
2005-03-20 14:28:32 +00:00
{ yyval.a_ctype = ACT_EL_ULRANGE; ;
break;}
2005-08-13 09:07:11 +00:00
case 215:
#line 1694 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2005-02-18 16:34:21 +00:00
yyval.a_ctype = ACT_CT_SIZE;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 216:
#line 1697 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2005-02-18 16:34:21 +00:00
yyval.a_ctype = ACT_CT_FROM;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 217:
#line 1703 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2005-02-18 16:34:21 +00:00
yyval.a_value = asn1p_value_fromint(0);
2004-06-03 03:38:44 +00:00
checkmem(yyval.a_value);
2005-02-18 16:34:21 +00:00
yyval.a_value->type = ATV_FALSE;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 218:
#line 1708 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2005-02-18 16:34:21 +00:00
yyval.a_value = asn1p_value_fromint(1);
2004-06-03 03:38:44 +00:00
checkmem(yyval.a_value);
2005-02-18 16:34:21 +00:00
yyval.a_value->type = ATV_TRUE;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 219:
#line 1713 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2005-02-18 16:34:21 +00:00
yyval.a_value = yyvsp[0].a_value;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 220:
#line 1716 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2005-03-24 14:26:38 +00:00
yyval.a_value = yyvsp[0].a_value;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 221:
#line 1719 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2005-02-18 16:34:21 +00:00
asn1p_ref_t *ref;
int ret;
ref = asn1p_ref_new(yylineno);
checkmem(ref);
ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
checkmem(ret == 0);
yyval.a_value = asn1p_value_fromref(ref, 0);
checkmem(yyval.a_value);
free(yyvsp[0].tv_str);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 222:
#line 1733 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2005-02-18 16:34:21 +00:00
asn1p_ref_t *ref;
int ret;
ref = asn1p_ref_new(yylineno);
checkmem(ref);
ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_UNKNOWN);
checkmem(ret == 0);
yyval.a_value = asn1p_value_fromref(ref, 0);
checkmem(yyval.a_value);
free(yyvsp[0].tv_str);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 223:
#line 1747 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2005-03-28 15:01:27 +00:00
CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_WCOMP, yyvsp[0].a_constr, 0);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 224:
#line 1750 "asn1p_y.y"
2005-02-18 16:34:21 +00:00
{
2005-03-28 15:01:27 +00:00
CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_WCOMPS, yyvsp[-1].a_constr, 0);
2005-02-18 16:34:21 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 225:
#line 1756 "asn1p_y.y"
2005-02-18 16:34:21 +00:00
{
2005-03-28 15:01:27 +00:00
yyval.a_constr = yyvsp[0].a_constr;
2005-02-18 16:34:21 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 226:
#line 1759 "asn1p_y.y"
2005-03-28 15:01:27 +00:00
{
CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_WCOMPS, yyvsp[-2].a_constr, yyvsp[0].a_constr);
;
break;}
2005-08-13 09:07:11 +00:00
case 227:
#line 1765 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_constr = asn1p_constraint_new(yylineno);
checkmem(yyval.a_constr);
yyval.a_constr->type = ACT_EL_EXT;
2005-03-28 15:01:27 +00:00
yyval.a_constr->value = asn1p_value_frombuf("...", 3, 0);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 228:
#line 1771 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_constr = asn1p_constraint_new(yylineno);
checkmem(yyval.a_constr);
yyval.a_constr->type = ACT_EL_VALUE;
yyval.a_constr->value = asn1p_value_frombuf(yyvsp[-2].tv_str, strlen(yyvsp[-2].tv_str), 0);
yyval.a_constr->presence = yyvsp[0].a_pres;
2005-03-28 15:01:27 +00:00
if(yyvsp[-1].a_constr) asn1p_constraint_insert(yyval.a_constr, yyvsp[-1].a_constr);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 229:
#line 1785 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_pres = ACPRES_DEFAULT; ;
break;}
2005-08-13 09:07:11 +00:00
case 230:
#line 1786 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_pres = yyvsp[0].a_pres; ;
break;}
2005-08-13 09:07:11 +00:00
case 231:
#line 1790 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_pres = ACPRES_PRESENT;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 232:
#line 1793 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_pres = ACPRES_ABSENT;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 233:
#line 1796 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_pres = ACPRES_OPTIONAL;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 234:
#line 1802 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_constr = yyvsp[0].a_constr;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 235:
#line 1805 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_constr = yyvsp[0].a_constr;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 236:
#line 1814 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
asn1p_ref_t *ref = asn1p_ref_new(yylineno);
asn1p_constraint_t *ct;
int ret;
ret = asn1p_ref_add_component(ref, yyvsp[-1].tv_str, 0);
checkmem(ret == 0);
ct = asn1p_constraint_new(yylineno);
checkmem(yyval.a_constr);
ct->type = ACT_EL_VALUE;
ct->value = asn1p_value_fromref(ref, 0);
CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CRC, ct, 0);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 237:
#line 1829 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CRC, yyvsp[-3].a_constr, yyvsp[-1].a_constr);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 238:
#line 1835 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_constr = asn1p_constraint_new(yylineno);
checkmem(yyval.a_constr);
yyval.a_constr->type = ACT_EL_VALUE;
yyval.a_constr->value = asn1p_value_fromref(yyvsp[0].a_ref, 0);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 239:
#line 1841 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
asn1p_constraint_t *ct;
ct = asn1p_constraint_new(yylineno);
checkmem(ct);
ct->type = ACT_EL_VALUE;
ct->value = asn1p_value_fromref(yyvsp[0].a_ref, 0);
CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-2].a_constr, ct);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 240:
#line 1855 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
char *p = malloc(strlen(yyvsp[0].tv_str) + 2);
int ret;
*p = '@';
strcpy(p + 1, yyvsp[0].tv_str);
yyval.a_ref = asn1p_ref_new(yylineno);
ret = asn1p_ref_add_component(yyval.a_ref, p, 0);
checkmem(ret == 0);
free(p);
free(yyvsp[0].tv_str);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 241:
#line 1866 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
char *p = malloc(strlen(yyvsp[0].tv_str) + 3);
int ret;
p[0] = '@';
p[1] = '.';
strcpy(p + 2, yyvsp[0].tv_str);
yyval.a_ref = asn1p_ref_new(yylineno);
ret = asn1p_ref_add_component(yyval.a_ref, p, 0);
checkmem(ret == 0);
free(p);
free(yyvsp[0].tv_str);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 242:
#line 1882 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.tv_str = yyvsp[0].tv_str;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 243:
#line 1885 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
int l1 = strlen(yyvsp[-2].tv_str);
int l3 = strlen(yyvsp[0].tv_str);
yyval.tv_str = malloc(l1 + 1 + l3 + 1);
memcpy(yyval.tv_str, yyvsp[-2].tv_str, l1);
yyval.tv_str[l1] = '.';
memcpy(yyval.tv_str + l1 + 1, yyvsp[0].tv_str, l3);
yyval.tv_str[l1 + 1 + l3] = '\0';
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 244:
#line 1903 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-09-15 11:59:51 +00:00
yyval.a_marker.flags = EM_NOMARK;
yyval.a_marker.default_value = 0;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 245:
#line 1907 "asn1p_y.y"
2004-09-15 11:59:51 +00:00
{ yyval.a_marker = yyvsp[0].a_marker; ;
2004-09-08 00:28:11 +00:00
break;}
2005-08-13 09:07:11 +00:00
case 246:
#line 1911 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-09-15 11:59:51 +00:00
yyval.a_marker.flags = EM_OPTIONAL;
yyval.a_marker.default_value = 0;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 247:
#line 1915 "asn1p_y.y"
2004-09-15 11:59:51 +00:00
{
yyval.a_marker.flags = EM_DEFAULT;
yyval.a_marker.default_value = yyvsp[0].a_value;
;
break;}
2005-08-13 09:07:11 +00:00
case 248:
#line 1938 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_expr = asn1p_expr_new(yylineno);
2004-06-03 03:38:44 +00:00
checkmem(yyval.a_expr);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 249:
#line 1942 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = yyvsp[-1].a_expr;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 250:
#line 1948 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_expr = asn1p_expr_new(yylineno);
2004-06-03 03:38:44 +00:00
checkmem(yyval.a_expr);
2004-09-08 00:28:11 +00:00
asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
;
break;}
2005-08-13 09:07:11 +00:00
case 251:
#line 1953 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_expr = yyvsp[-2].a_expr;
2004-09-08 00:28:11 +00:00
asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
;
break;}
2005-08-13 09:07:11 +00:00
case 252:
#line 1960 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_expr = asn1p_expr_new(yylineno);
2004-06-03 03:38:44 +00:00
checkmem(yyval.a_expr);
yyval.a_expr->expr_type = A1TC_UNIVERVAL;
yyval.a_expr->meta_type = AMT_VALUE;
yyval.a_expr->Identifier = yyvsp[0].tv_str;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 253:
#line 1967 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_expr = asn1p_expr_new(yylineno);
2004-06-03 03:38:44 +00:00
checkmem(yyval.a_expr);
yyval.a_expr->expr_type = A1TC_UNIVERVAL;
yyval.a_expr->meta_type = AMT_VALUE;
yyval.a_expr->Identifier = yyvsp[-3].tv_str;
yyval.a_expr->value = yyvsp[-1].a_value;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 254:
#line 1975 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_expr = asn1p_expr_new(yylineno);
2004-06-03 03:38:44 +00:00
checkmem(yyval.a_expr);
yyval.a_expr->expr_type = A1TC_UNIVERVAL;
yyval.a_expr->meta_type = AMT_VALUE;
yyval.a_expr->Identifier = yyvsp[-3].tv_str;
yyval.a_expr->value = yyvsp[-1].a_value;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 255:
#line 1983 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_expr = asn1p_expr_new(yylineno);
2004-06-03 03:38:44 +00:00
checkmem(yyval.a_expr);
yyval.a_expr->expr_type = A1TC_UNIVERVAL;
yyval.a_expr->meta_type = AMT_VALUE;
yyval.a_expr->value = yyvsp[0].a_value;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 256:
#line 1990 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
yyval.a_expr = asn1p_expr_new(yylineno);
2004-06-03 03:38:44 +00:00
checkmem(yyval.a_expr);
yyval.a_expr->Identifier = strdup("...");
checkmem(yyval.a_expr->Identifier);
yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
yyval.a_expr->meta_type = AMT_VALUE;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 257:
#line 2001 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int);
checkmem(yyval.a_value);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 258:
#line 2005 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int);
checkmem(yyval.a_value);
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 259:
#line 2036 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ memset(&yyval.a_tag, 0, sizeof(yyval.a_tag)); ;
break;}
2005-08-13 09:07:11 +00:00
case 260:
#line 2037 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{ yyval.a_tag = yyvsp[0].a_tag; ;
break;}
2005-08-13 09:07:11 +00:00
case 261:
#line 2041 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2005-01-23 09:51:44 +00:00
yyval.a_tag = yyvsp[-1].a_tag;
yyval.a_tag.tag_mode = yyvsp[0].a_tag.tag_mode;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 262:
#line 2048 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2005-01-23 09:51:44 +00:00
yyval.a_tag = yyvsp[-2].a_tag;
yyval.a_tag.tag_value = yyvsp[-1].a_int;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 263:
#line 2054 "asn1p_y.y"
2005-01-23 09:51:44 +00:00
{ yyval.a_tag.tag_class = TC_CONTEXT_SPECIFIC; ;
2004-09-08 00:28:11 +00:00
break;}
2005-08-13 09:07:11 +00:00
case 264:
#line 2055 "asn1p_y.y"
2005-01-23 09:51:44 +00:00
{ yyval.a_tag.tag_class = TC_UNIVERSAL; ;
break;}
2005-08-13 09:07:11 +00:00
case 265:
#line 2056 "asn1p_y.y"
2005-01-23 09:51:44 +00:00
{ yyval.a_tag.tag_class = TC_APPLICATION; ;
break;}
2005-08-13 09:07:11 +00:00
case 266:
#line 2057 "asn1p_y.y"
2005-01-23 09:51:44 +00:00
{ yyval.a_tag.tag_class = TC_PRIVATE; ;
break;}
2005-08-13 09:07:11 +00:00
case 267:
#line 2061 "asn1p_y.y"
2005-01-23 09:51:44 +00:00
{ yyval.a_tag.tag_mode = TM_DEFAULT; ;
break;}
2005-08-13 09:07:11 +00:00
case 268:
#line 2062 "asn1p_y.y"
2005-01-23 09:51:44 +00:00
{ yyval.a_tag.tag_mode = TM_IMPLICIT; ;
break;}
2005-08-13 09:07:11 +00:00
case 269:
#line 2063 "asn1p_y.y"
2005-01-23 09:51:44 +00:00
{ yyval.a_tag.tag_mode = TM_EXPLICIT; ;
break;}
2005-08-13 09:07:11 +00:00
case 270:
#line 2067 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
checkmem(yyvsp[0].tv_str);
yyval.tv_str = yyvsp[0].tv_str;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 271:
#line 2071 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
checkmem(yyvsp[0].tv_str);
yyval.tv_str = yyvsp[0].tv_str;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 272:
#line 2079 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
checkmem(yyvsp[0].tv_str);
yyval.tv_str = yyvsp[0].tv_str;
2004-09-08 00:28:11 +00:00
;
break;}
2005-08-13 09:07:11 +00:00
case 273:
#line 2086 "asn1p_y.y"
2004-09-22 16:03:36 +00:00
{ yyval.tv_str = 0; ;
break;}
2005-08-13 09:07:11 +00:00
case 274:
#line 2087 "asn1p_y.y"
2004-09-22 16:03:36 +00:00
{
yyval.tv_str = yyvsp[0].tv_str;
;
break;}
2005-08-13 09:07:11 +00:00
case 275:
#line 2093 "asn1p_y.y"
2004-09-08 00:28:11 +00:00
{
2004-06-03 03:38:44 +00:00
checkmem(yyvsp[0].tv_str);
yyval.tv_str = yyvsp[0].tv_str;
2004-09-08 00:28:11 +00:00
;
break;}
}
/* the action file gets copied in in place of this dollarsign */
#line 543 "/usr/share/bison.simple"
2004-06-03 03:38:44 +00:00
yyvsp -= yylen;
yyssp -= yylen;
2004-09-08 00:28:11 +00:00
#ifdef YYLSP_NEEDED
yylsp -= yylen;
#endif
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
#if YYDEBUG != 0
2004-06-03 03:38:44 +00:00
if (yydebug)
{
2004-09-08 00:28:11 +00:00
short *ssp1 = yyss - 1;
fprintf (stderr, "state stack now");
while (ssp1 != yyssp)
fprintf (stderr, " %d", *++ssp1);
fprintf (stderr, "\n");
2004-06-03 03:38:44 +00:00
}
#endif
*++yyvsp = yyval;
2004-09-08 00:28:11 +00:00
#ifdef YYLSP_NEEDED
yylsp++;
if (yylen == 0)
{
yylsp->first_line = yylloc.first_line;
yylsp->first_column = yylloc.first_column;
yylsp->last_line = (yylsp-1)->last_line;
yylsp->last_column = (yylsp-1)->last_column;
yylsp->text = 0;
}
else
{
yylsp->last_line = (yylsp+yylen-1)->last_line;
yylsp->last_column = (yylsp+yylen-1)->last_column;
}
#endif
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
/* Now "shift" the result of the reduction.
Determine what state that goes to,
based on the state we popped back to
and the rule number reduced by. */
2004-06-03 03:38:44 +00:00
yyn = yyr1[yyn];
2004-09-08 00:28:11 +00:00
yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2004-06-03 03:38:44 +00:00
yystate = yytable[yystate];
else
2004-09-08 00:28:11 +00:00
yystate = yydefgoto[yyn - YYNTBASE];
2004-06-03 03:38:44 +00:00
goto yynewstate;
2004-09-08 00:28:11 +00:00
yyerrlab: /* here on detecting error */
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
if (! yyerrstatus)
/* If not already recovering from an error, report this error. */
2004-06-03 03:38:44 +00:00
{
++yynerrs;
2004-09-08 00:28:11 +00:00
#ifdef YYERROR_VERBOSE
2004-06-03 03:38:44 +00:00
yyn = yypact[yystate];
2004-09-08 00:28:11 +00:00
if (yyn > YYFLAG && yyn < YYLAST)
2004-06-03 03:38:44 +00:00
{
2004-09-08 00:28:11 +00:00
int size = 0;
char *msg;
int x, count;
count = 0;
/* Start X at -yyn if nec to avoid negative indexes in yycheck. */
for (x = (yyn < 0 ? -yyn : 0);
2005-06-07 21:43:32 +00:00
x < (int)(sizeof(yytname) / sizeof(char *)); x++)
2004-09-08 00:28:11 +00:00
if (yycheck[x + yyn] == x)
size += strlen(yytname[x]) + 15, count++;
msg = (char *) malloc(size + 15);
if (msg != 0)
2004-06-03 03:38:44 +00:00
{
2004-09-08 00:28:11 +00:00
strcpy(msg, "parse error");
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
if (count < 5)
2004-06-03 03:38:44 +00:00
{
2004-09-08 00:28:11 +00:00
count = 0;
for (x = (yyn < 0 ? -yyn : 0);
2005-06-07 21:43:32 +00:00
x < (int)(sizeof(yytname) / sizeof(char *)); x++)
2004-09-08 00:28:11 +00:00
if (yycheck[x + yyn] == x)
2004-06-03 03:38:44 +00:00
{
2004-09-08 00:28:11 +00:00
strcat(msg, count == 0 ? ", expecting `" : " or `");
strcat(msg, yytname[x]);
strcat(msg, "'");
count++;
2004-06-03 03:38:44 +00:00
}
}
2004-09-08 00:28:11 +00:00
yyerror(msg);
free(msg);
2004-06-03 03:38:44 +00:00
}
else
2004-09-08 00:28:11 +00:00
yyerror ("parse error; also virtual memory exceeded");
2004-06-03 03:38:44 +00:00
}
else
#endif /* YYERROR_VERBOSE */
2004-09-08 00:28:11 +00:00
yyerror("parse error");
2004-06-03 03:38:44 +00:00
}
2004-09-04 04:49:21 +00:00
2004-09-08 00:28:11 +00:00
goto yyerrlab1;
yyerrlab1: /* here on error raised explicitly by an action */
2004-06-03 03:38:44 +00:00
if (yyerrstatus == 3)
{
2004-09-08 00:28:11 +00:00
/* if just tried and failed to reuse lookahead token after an error, discard it. */
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
/* return failure if at end of input */
2004-06-03 03:38:44 +00:00
if (yychar == YYEOF)
2004-09-08 00:28:11 +00:00
YYABORT;
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
#endif
2004-06-03 03:38:44 +00:00
yychar = YYEMPTY;
}
2004-09-08 00:28:11 +00:00
/* Else will try to reuse lookahead token
after shifting the error token. */
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
yyerrstatus = 3; /* Each real token shifted decrements this */
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
goto yyerrhandle;
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
yyerrdefault: /* current state does not do anything special for the error token. */
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
#if 0
/* This is wrong; only states that explicitly want error tokens
should shift them. */
yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
if (yyn) goto yydefault;
#endif
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
yyerrpop: /* pop the current state because it cannot handle the error token */
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
if (yyssp == yyss) YYABORT;
yyvsp--;
yystate = *--yyssp;
#ifdef YYLSP_NEEDED
yylsp--;
#endif
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
#if YYDEBUG != 0
if (yydebug)
{
short *ssp1 = yyss - 1;
fprintf (stderr, "Error: state stack now");
while (ssp1 != yyssp)
fprintf (stderr, " %d", *++ssp1);
fprintf (stderr, "\n");
}
2004-06-03 03:38:44 +00:00
#endif
2004-09-08 00:28:11 +00:00
yyerrhandle:
yyn = yypact[yystate];
if (yyn == YYFLAG)
goto yyerrdefault;
yyn += YYTERROR;
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
goto yyerrdefault;
yyn = yytable[yyn];
if (yyn < 0)
{
if (yyn == YYFLAG)
goto yyerrpop;
yyn = -yyn;
goto yyreduce;
2004-06-03 03:38:44 +00:00
}
2004-09-08 00:28:11 +00:00
else if (yyn == 0)
goto yyerrpop;
2004-06-03 03:38:44 +00:00
if (yyn == YYFINAL)
YYACCEPT;
2004-09-08 00:28:11 +00:00
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Shifting error token, ");
#endif
2004-06-03 03:38:44 +00:00
*++yyvsp = yylval;
2004-09-08 00:28:11 +00:00
#ifdef YYLSP_NEEDED
*++yylsp = yylloc;
#endif
2004-06-03 03:38:44 +00:00
yystate = yyn;
goto yynewstate;
2004-09-08 00:28:11 +00:00
yyacceptlab:
/* YYACCEPT comes here. */
if (yyfree_stacks)
{
free (yyss);
free (yyvs);
#ifdef YYLSP_NEEDED
free (yyls);
2004-06-03 03:38:44 +00:00
#endif
2004-09-08 00:28:11 +00:00
}
return 0;
2004-06-03 03:38:44 +00:00
2004-09-08 00:28:11 +00:00
yyabortlab:
/* YYABORT comes here. */
if (yyfree_stacks)
{
free (yyss);
free (yyvs);
#ifdef YYLSP_NEEDED
free (yyls);
2004-06-03 03:38:44 +00:00
#endif
2004-09-08 00:28:11 +00:00
}
return 1;
2004-06-03 03:38:44 +00:00
}
2005-08-13 09:07:11 +00:00
#line 2099 "asn1p_y.y"
2004-06-03 03:38:44 +00:00
/*
* Convert Xstring ('0101'B or '5'H) to the binary vector.
*/
static asn1p_value_t *
_convert_bitstring2binary(char *str, int base) {
asn1p_value_t *val;
int slen;
int memlen;
int baselen;
int bits;
uint8_t *binary_vector;
uint8_t *bv_ptr;
uint8_t cur_val;
assert(str);
assert(str[0] == '\'');
switch(base) {
case 'B':
baselen = 1;
break;
case 'H':
baselen = 4;
break;
default:
assert(base == 'B' || base == 'H');
errno = EINVAL;
return NULL;
}
slen = strlen(str);
assert(str[slen - 1] == base);
assert(str[slen - 2] == '\'');
memlen = slen / (8 / baselen); /* Conservative estimate */
bv_ptr = binary_vector = malloc(memlen + 1);
if(bv_ptr == NULL)
/* ENOMEM */
return NULL;
cur_val = 0;
bits = 0;
while(*(++str) != '\'') {
switch(baselen) {
case 1:
switch(*str) {
case '1':
cur_val |= 1 << (7 - (bits % 8));
case '0':
break;
default:
assert(!"_y UNREACH1");
case ' ': case '\r': case '\n':
continue;
}
break;
case 4:
switch(*str) {
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
cur_val |= (*str - '0') << (4 - (bits % 8));
break;
case 'A': case 'B': case 'C':
case 'D': case 'E': case 'F':
cur_val |= ((*str - 'A') + 10)
<< (4 - (bits % 8));
break;
default:
assert(!"_y UNREACH2");
case ' ': case '\r': case '\n':
continue;
}
break;
}
bits += baselen;
if((bits % 8) == 0) {
*bv_ptr++ = cur_val;
cur_val = 0;
}
}
*bv_ptr = cur_val;
assert((bv_ptr - binary_vector) <= memlen);
val = asn1p_value_frombits(binary_vector, bits, 0);
if(val == NULL) {
free(binary_vector);
}
return val;
}
2005-08-13 09:07:11 +00:00
/*
* For unnamed types (used in old X.208 compliant modules)
* generate some sort of interim names, to not to force human being to fix
* the specification's compliance to modern ASN.1 standards.
*/
static void
_fixup_anonymous_identifier(asn1p_expr_t *expr) {
char *p;
assert(expr->Identifier == 0);
/*
* Try to figure out the type name
* without going too much into details
*/
expr->Identifier = ASN_EXPR_TYPE2STR(expr->expr_type);
if(expr->reference && expr->reference->comp_count > 0)
expr->Identifier = expr->reference->components[0].name;
fprintf(stderr,
"WARNING: Line %d: expected lower-case member identifier, "
"found an unnamed %s.\n"
"WARNING: Obsolete X.208 syntax detected, "
"please give the member a name.\n",
yylineno, expr->Identifier ? expr->Identifier : "type");
if(!expr->Identifier)
expr->Identifier = "unnamed";
expr->Identifier = strdup(expr->Identifier);
assert(expr->Identifier);
/* Make a lowercase identifier from the type name */
for(p = expr->Identifier; *p; p++) {
switch(*p) {
case 'A' ... 'Z': *p += 32; break;
case ' ': *p = '_'; break;
case '-': *p = '_'; break;
}
}
fprintf(stderr, "NOTE: Assigning temporary identifier \"%s\". "
"Name clash may occur later.\n",
expr->Identifier);
}
2004-06-03 03:38:44 +00:00
extern char *asn1p_text;
int
yyerror(const char *msg) {
fprintf(stderr,
"ASN.1 grammar parse error "
"near line %d (token \"%s\"): %s\n",
yylineno, asn1p_text, msg);
2004-06-03 03:38:44 +00:00
return -1;
}