#include <structure.h>
static FILE *file_asn1; /* Pointer to file to parse */
-static int result_parse; /* result of the parser
+static int result_parse = 0; /* result of the parser
algorithm */
static asn1_node p_tree; /* pointer to the root of the
structure created by the
UTCTime = 290,
GeneralizedTime = 291,
GeneralString = 292,
- FROM = 293,
- IMPORTS = 294,
- ENUMERATED = 295
+ NumericString = 293,
+ IA5String = 294,
+ TeletexString = 295,
+ PrintableString = 296,
+ UniversalString = 297,
+ BMPString = 298,
+ UTF8String = 299,
+ VisibleString = 300,
+ FROM = 301,
+ IMPORTS = 302,
+ ENUMERATED = 303
};
#endif
/* Tokens. */
#define UTCTime 290
#define GeneralizedTime 291
#define GeneralString 292
-#define FROM 293
-#define IMPORTS 294
-#define ENUMERATED 295
+#define NumericString 293
+#define IA5String 294
+#define TeletexString 295
+#define PrintableString 296
+#define UniversalString 297
+#define BMPString 298
+#define UTF8String 299
+#define VisibleString 300
+#define FROM 301
+#define IMPORTS 302
+#define ENUMERATED 303
/* Line 293 of yacc.c */
-#line 257 "ASN1.c"
+#line 273 "ASN1.c"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
/* Line 343 of yacc.c */
-#line 269 "ASN1.c"
+#line 285 "ASN1.c"
#ifdef short
# undef short
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 5
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 192
+#define YYLAST 217
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 52
+#define YYNTOKENS 60
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 43
+#define YYNNTS 51
/* YYNRULES -- Number of rules. */
-#define YYNRULES 100
+#define YYNRULES 125
/* YYNRULES -- Number of states. */
-#define YYNSTATES 190
+#define YYNSTATES 216
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 295
+#define YYMAXUTOK 303
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
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,
- 43, 44, 2, 41, 45, 42, 51, 2, 2, 2,
+ 51, 52, 2, 49, 53, 50, 59, 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, 46, 2, 47, 2, 2, 2, 2, 2, 2,
+ 2, 54, 2, 55, 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, 49, 48, 50, 2, 2, 2, 2,
+ 2, 2, 2, 57, 56, 58, 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,
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
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48
};
#if YYDEBUG
28, 30, 32, 36, 41, 43, 47, 49, 54, 56,
59, 61, 63, 65, 69, 74, 76, 79, 82, 85,
88, 91, 93, 97, 99, 104, 109, 117, 119, 121,
- 123, 128, 136, 138, 142, 144, 147, 150, 154, 159,
- 161, 165, 168, 172, 178, 183, 186, 188, 191, 193,
- 195, 197, 199, 201, 203, 205, 207, 209, 211, 213,
- 215, 217, 219, 222, 224, 227, 230, 233, 235, 239,
- 244, 248, 253, 258, 262, 267, 272, 274, 279, 283,
- 291, 298, 303, 305, 307, 309, 312, 317, 321, 323,
- 325
+ 123, 128, 136, 138, 142, 144, 147, 149, 152, 154,
+ 157, 159, 162, 164, 167, 169, 172, 174, 177, 179,
+ 182, 184, 187, 190, 194, 199, 201, 205, 208, 212,
+ 218, 223, 226, 228, 231, 233, 235, 237, 239, 241,
+ 243, 245, 247, 249, 251, 253, 255, 257, 259, 261,
+ 263, 265, 267, 269, 271, 273, 275, 278, 280, 283,
+ 286, 289, 291, 295, 300, 304, 309, 314, 318, 323,
+ 328, 330, 335, 339, 342, 350, 357, 362, 364, 366,
+ 368, 371, 376, 380, 382, 384
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int8 yyrhs[] =
{
- 53, 0, -1, 93, 31, 94, 32, 3, 33, 92,
- 34, -1, 4, -1, 41, 4, -1, 42, 4, -1,
- 54, -1, 55, -1, 4, -1, 5, -1, 56, -1,
- 5, -1, 43, 56, 44, -1, 5, 43, 56, 44,
- -1, 59, -1, 60, 45, 59, -1, 57, -1, 5,
- 43, 4, 44, -1, 61, -1, 62, 61, -1, 13,
- -1, 14, -1, 15, -1, 46, 4, 47, -1, 46,
- 63, 4, 47, -1, 64, -1, 64, 29, -1, 64,
- 30, -1, 16, 58, -1, 16, 22, -1, 16, 23,
- -1, 56, -1, 67, 48, 56, -1, 7, -1, 7,
- 49, 60, 50, -1, 68, 43, 67, 44, -1, 68,
- 43, 57, 51, 51, 57, 44, -1, 21, -1, 35,
- -1, 36, -1, 8, 43, 57, 44, -1, 8, 43,
- 57, 51, 51, 57, 44, -1, 71, -1, 43, 71,
- 44, -1, 37, -1, 37, 72, -1, 9, 10, -1,
- 9, 10, 72, -1, 5, 43, 4, 44, -1, 75,
- -1, 76, 45, 75, -1, 12, 10, -1, 12, 10,
- 72, -1, 12, 10, 49, 76, 50, -1, 40, 49,
- 76, 50, -1, 19, 20, -1, 5, -1, 5, 72,
- -1, 68, -1, 78, -1, 69, -1, 70, -1, 74,
- -1, 77, -1, 73, -1, 85, -1, 79, -1, 87,
- -1, 88, -1, 86, -1, 24, -1, 80, -1, 65,
- 80, -1, 81, -1, 81, 66, -1, 81, 6, -1,
- 5, 82, -1, 83, -1, 84, 45, 83, -1, 11,
- 49, 84, 50, -1, 11, 18, 80, -1, 11, 72,
- 18, 80, -1, 28, 49, 84, 50, -1, 28, 18,
- 80, -1, 28, 72, 18, 80, -1, 17, 49, 84,
- 50, -1, 25, -1, 25, 26, 27, 5, -1, 5,
- 3, 81, -1, 5, 19, 20, 3, 49, 62, 50,
- -1, 5, 5, 3, 49, 62, 50, -1, 5, 7,
- 3, 56, -1, 89, -1, 90, -1, 91, -1, 92,
- 91, -1, 5, 49, 62, 50, -1, 5, 49, 50,
- -1, 5, -1, 29, -1, 30, -1
+ 61, 0, -1, 109, 31, 110, 32, 3, 33, 108,
+ 34, -1, 4, -1, 49, 4, -1, 50, 4, -1,
+ 62, -1, 63, -1, 4, -1, 5, -1, 64, -1,
+ 5, -1, 51, 64, 52, -1, 5, 51, 64, 52,
+ -1, 67, -1, 68, 53, 67, -1, 65, -1, 5,
+ 51, 4, 52, -1, 69, -1, 70, 69, -1, 13,
+ -1, 14, -1, 15, -1, 54, 4, 55, -1, 54,
+ 71, 4, 55, -1, 72, -1, 72, 29, -1, 72,
+ 30, -1, 16, 66, -1, 16, 22, -1, 16, 23,
+ -1, 64, -1, 75, 56, 64, -1, 7, -1, 7,
+ 57, 68, 58, -1, 76, 51, 75, 52, -1, 76,
+ 51, 65, 59, 59, 65, 52, -1, 21, -1, 35,
+ -1, 36, -1, 8, 51, 65, 52, -1, 8, 51,
+ 65, 59, 59, 65, 52, -1, 79, -1, 51, 79,
+ 52, -1, 37, -1, 37, 80, -1, 38, -1, 38,
+ 80, -1, 39, -1, 39, 80, -1, 40, -1, 40,
+ 80, -1, 41, -1, 41, 80, -1, 42, -1, 42,
+ 80, -1, 43, -1, 43, 80, -1, 44, -1, 44,
+ 80, -1, 45, -1, 45, 80, -1, 9, 10, -1,
+ 9, 10, 80, -1, 5, 51, 4, 52, -1, 91,
+ -1, 92, 53, 91, -1, 12, 10, -1, 12, 10,
+ 80, -1, 12, 10, 57, 92, 58, -1, 48, 57,
+ 92, 58, -1, 19, 20, -1, 5, -1, 5, 80,
+ -1, 76, -1, 94, -1, 77, -1, 78, -1, 90,
+ -1, 93, -1, 81, -1, 82, -1, 83, -1, 84,
+ -1, 85, -1, 86, -1, 87, -1, 88, -1, 89,
+ -1, 101, -1, 95, -1, 103, -1, 104, -1, 102,
+ -1, 24, -1, 96, -1, 73, 96, -1, 97, -1,
+ 97, 74, -1, 97, 6, -1, 5, 98, -1, 99,
+ -1, 100, 53, 99, -1, 11, 57, 100, 58, -1,
+ 11, 18, 96, -1, 11, 80, 18, 96, -1, 28,
+ 57, 100, 58, -1, 28, 18, 96, -1, 28, 80,
+ 18, 96, -1, 17, 57, 100, 58, -1, 25, -1,
+ 25, 26, 27, 5, -1, 5, 3, 97, -1, 1,
+ 97, -1, 5, 19, 20, 3, 57, 70, 58, -1,
+ 5, 5, 3, 57, 70, 58, -1, 5, 7, 3,
+ 64, -1, 105, -1, 106, -1, 107, -1, 108, 107,
+ -1, 5, 57, 70, 58, -1, 5, 57, 58, -1,
+ 5, -1, 29, -1, 30, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 118, 118, 131, 132, 135, 139, 140, 143, 144,
- 147, 148, 151, 153, 158, 159, 163, 165, 170, 171,
- 175, 176, 177, 180, 182, 186, 187, 188, 191, 193,
- 194, 198, 199, 203, 204, 206, 207, 214, 217, 218,
- 221, 223, 229, 230, 233, 234, 238, 239, 243, 248,
- 249, 253, 254, 255, 260, 266, 269, 271, 274, 275,
- 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
- 286, 289, 290, 295, 296, 299, 302, 305, 306, 310,
- 312, 314, 319, 321, 323, 328, 332, 333, 338, 341,
- 345, 350, 356, 357, 360, 361, 365, 368, 370, 394,
- 395
+ 0, 129, 129, 142, 143, 146, 150, 151, 154, 155,
+ 158, 159, 162, 164, 169, 170, 174, 176, 181, 182,
+ 186, 187, 188, 191, 193, 197, 198, 199, 202, 204,
+ 205, 209, 210, 214, 215, 217, 218, 225, 228, 229,
+ 232, 234, 240, 241, 244, 245, 249, 250, 254, 255,
+ 259, 260, 264, 265, 269, 270, 274, 275, 279, 280,
+ 284, 285, 289, 290, 294, 299, 300, 304, 305, 306,
+ 311, 317, 320, 322, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 348, 349, 354, 355, 358,
+ 361, 364, 365, 369, 371, 373, 378, 380, 382, 387,
+ 391, 392, 397, 398, 401, 405, 410, 416, 417, 420,
+ 421, 425, 428, 430, 454, 455
};
#endif
"OBJECT", "STR_IDENTIFIER", "BOOLEAN", "ASN1_TRUE", "ASN1_FALSE",
"TOKEN_NULL", "ANY", "DEFINED", "BY", "SET", "EXPLICIT", "IMPLICIT",
"DEFINITIONS", "TAGS", "BEGIN", "END", "UTCTime", "GeneralizedTime",
- "GeneralString", "FROM", "IMPORTS", "ENUMERATED", "'+'", "'-'", "'('",
+ "GeneralString", "NumericString", "IA5String", "TeletexString",
+ "PrintableString", "UniversalString", "BMPString", "UTF8String",
+ "VisibleString", "FROM", "IMPORTS", "ENUMERATED", "'+'", "'-'", "'('",
"')'", "','", "'['", "']'", "'|'", "'{'", "'}'", "'.'", "$accept",
"definitions", "pos_num", "neg_num", "pos_neg_num", "num_identifier",
"pos_neg_identifier", "constant", "constant_list", "obj_constant",
"obj_constant_list", "class", "tag_type", "tag", "default",
"pos_neg_list", "integer_def", "boolean_def", "Time", "size_def2",
- "size_def", "generalstring_def", "octet_string_def", "bit_element",
- "bit_element_list", "bit_string_def", "enumerated_def", "object_def",
- "type_assig_right", "type_assig_right_tag",
- "type_assig_right_tag_default", "type_assig", "type_assig_list",
- "sequence_def", "set_def", "choise_def", "any_def", "type_def",
- "constant_def", "type_constant", "type_constant_list", "definitions_id",
- "explicit_implicit", 0
+ "size_def", "generalstring_def", "numericstring_def", "ia5string_def",
+ "teletexstring_def", "printablestring_def", "universalstring_def",
+ "bmpstring_def", "utf8string_def", "visiblestring_def",
+ "octet_string_def", "bit_element", "bit_element_list", "bit_string_def",
+ "enumerated_def", "object_def", "type_assig_right",
+ "type_assig_right_tag", "type_assig_right_tag_default", "type_assig",
+ "type_assig_list", "sequence_def", "set_def", "choise_def", "any_def",
+ "type_def", "constant_def", "type_constant", "type_constant_list",
+ "definitions_id", "explicit_implicit", 0
};
#endif
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
- 295, 43, 45, 40, 41, 44, 91, 93, 124, 123,
- 125, 46
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 43,
+ 45, 40, 41, 44, 91, 93, 124, 123, 125, 46
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
- 0, 52, 53, 54, 54, 55, 56, 56, 57, 57,
- 58, 58, 59, 59, 60, 60, 61, 61, 62, 62,
- 63, 63, 63, 64, 64, 65, 65, 65, 66, 66,
- 66, 67, 67, 68, 68, 68, 68, 69, 70, 70,
- 71, 71, 72, 72, 73, 73, 74, 74, 75, 76,
- 76, 77, 77, 77, 78, 79, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
- 80, 81, 81, 82, 82, 82, 83, 84, 84, 85,
- 85, 85, 86, 86, 86, 87, 88, 88, 89, 90,
- 90, 90, 91, 91, 92, 92, 93, 93, 93, 94,
- 94
+ 0, 60, 61, 62, 62, 63, 64, 64, 65, 65,
+ 66, 66, 67, 67, 68, 68, 69, 69, 70, 70,
+ 71, 71, 71, 72, 72, 73, 73, 73, 74, 74,
+ 74, 75, 75, 76, 76, 76, 76, 77, 78, 78,
+ 79, 79, 80, 80, 81, 81, 82, 82, 83, 83,
+ 84, 84, 85, 85, 86, 86, 87, 87, 88, 88,
+ 89, 89, 90, 90, 91, 92, 92, 93, 93, 93,
+ 94, 95, 96, 96, 96, 96, 96, 96, 96, 96,
+ 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
+ 96, 96, 96, 96, 96, 97, 97, 98, 98, 98,
+ 99, 100, 100, 101, 101, 101, 102, 102, 102, 103,
+ 104, 104, 105, 105, 106, 106, 106, 107, 107, 108,
+ 108, 109, 109, 109, 110, 110
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1, 1, 3, 4, 1, 3, 1, 4, 1, 2,
1, 1, 1, 3, 4, 1, 2, 2, 2, 2,
2, 1, 3, 1, 4, 4, 7, 1, 1, 1,
- 4, 7, 1, 3, 1, 2, 2, 3, 4, 1,
- 3, 2, 3, 5, 4, 2, 1, 2, 1, 1,
+ 4, 7, 1, 3, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 2, 3, 4, 1, 3, 2, 3, 5,
+ 4, 2, 1, 2, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 2, 1, 2, 2, 2, 1, 3, 4,
- 3, 4, 4, 3, 4, 4, 1, 4, 3, 7,
- 6, 4, 1, 1, 1, 2, 4, 3, 1, 1,
- 1
+ 1, 1, 1, 1, 1, 1, 2, 1, 2, 2,
+ 2, 1, 3, 4, 3, 4, 4, 3, 4, 4,
+ 1, 4, 3, 2, 7, 6, 4, 1, 1, 1,
+ 2, 4, 3, 1, 1, 1
};
/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
- 0, 98, 0, 0, 0, 1, 0, 8, 9, 97,
- 16, 18, 0, 99, 100, 0, 0, 96, 19, 0,
- 0, 0, 17, 0, 0, 92, 93, 94, 0, 0,
- 0, 0, 0, 2, 95, 56, 33, 0, 0, 0,
- 0, 0, 37, 70, 86, 0, 38, 39, 44, 0,
- 0, 25, 0, 58, 60, 61, 64, 62, 63, 59,
- 66, 71, 88, 65, 69, 67, 68, 0, 0, 0,
- 0, 0, 42, 57, 0, 46, 0, 0, 0, 51,
- 0, 55, 0, 0, 0, 0, 45, 0, 0, 20,
- 21, 22, 0, 26, 27, 72, 0, 0, 3, 0,
- 0, 6, 7, 91, 0, 0, 0, 0, 0, 14,
- 0, 47, 80, 0, 77, 0, 0, 0, 52, 0,
- 0, 83, 0, 0, 0, 49, 0, 23, 0, 3,
- 9, 31, 0, 0, 0, 4, 5, 0, 0, 43,
- 0, 0, 0, 34, 73, 76, 0, 79, 81, 0,
- 85, 87, 82, 84, 0, 0, 54, 24, 0, 35,
- 0, 90, 0, 40, 0, 0, 12, 15, 75, 0,
- 74, 78, 53, 0, 50, 0, 32, 89, 0, 13,
- 11, 29, 30, 10, 28, 48, 0, 0, 36, 41
+ 0, 123, 0, 0, 0, 1, 0, 8, 9, 122,
+ 16, 18, 0, 124, 125, 0, 0, 121, 19, 0,
+ 0, 0, 17, 0, 0, 0, 117, 118, 119, 0,
+ 72, 33, 0, 0, 0, 0, 0, 37, 94, 110,
+ 0, 38, 39, 44, 46, 48, 50, 52, 54, 56,
+ 58, 60, 0, 0, 25, 0, 74, 76, 77, 80,
+ 81, 82, 83, 84, 85, 86, 87, 88, 78, 79,
+ 75, 90, 95, 113, 89, 93, 91, 92, 0, 0,
+ 0, 0, 2, 120, 0, 0, 42, 73, 0, 62,
+ 0, 0, 0, 67, 0, 71, 0, 0, 0, 0,
+ 45, 47, 49, 51, 53, 55, 57, 59, 61, 0,
+ 0, 20, 21, 22, 0, 26, 27, 96, 0, 112,
+ 0, 0, 0, 0, 0, 0, 0, 14, 0, 63,
+ 104, 0, 101, 0, 0, 0, 68, 0, 0, 107,
+ 0, 0, 0, 65, 0, 23, 0, 3, 9, 0,
+ 0, 6, 7, 31, 0, 0, 0, 3, 116, 0,
+ 0, 43, 0, 0, 0, 34, 97, 100, 0, 103,
+ 105, 0, 109, 111, 106, 108, 0, 0, 70, 24,
+ 4, 5, 0, 35, 0, 0, 0, 40, 0, 0,
+ 12, 15, 99, 0, 98, 102, 69, 0, 66, 0,
+ 32, 115, 0, 0, 13, 11, 29, 30, 10, 28,
+ 64, 0, 114, 0, 36, 41
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 2, 101, 102, 103, 10, 184, 109, 110, 11,
- 12, 92, 51, 52, 170, 133, 53, 54, 55, 72,
- 73, 56, 57, 125, 126, 58, 59, 60, 61, 62,
- 145, 114, 115, 63, 64, 65, 66, 25, 26, 27,
- 28, 3, 15
+ -1, 2, 151, 152, 153, 10, 209, 127, 128, 11,
+ 12, 114, 54, 55, 194, 155, 56, 57, 58, 86,
+ 87, 59, 60, 61, 62, 63, 64, 65, 66, 67,
+ 68, 143, 144, 69, 70, 71, 72, 73, 167, 132,
+ 133, 74, 75, 76, 77, 26, 27, 28, 29, 3,
+ 15
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -96
+#define YYPACT_NINF -118
static const yytype_int16 yypact[] =
{
- 24, -14, 48, 56, 0, -96, -10, -96, -2, -96,
- -96, -96, 2, -96, -96, 71, 111, -96, -96, 117,
- 83, 96, -96, 127, 42, -96, -96, -96, 10, 77,
- 130, 131, 115, -96, -96, 8, 90, 132, 13, 135,
- 92, 126, -96, -96, 122, 15, -96, -96, 8, 100,
- 93, 49, 119, 94, -96, -96, -96, -96, -96, -96,
- -96, -96, -96, -96, -96, -96, -96, 102, 28, 149,
- 110, 150, -96, -96, 17, 8, 119, 152, 142, 22,
- 152, -96, 134, 119, 152, 144, -96, 158, 118, -96,
- -96, -96, 160, -96, -96, -96, 35, 88, -96, 162,
- 163, -96, -96, -96, 120, 114, 124, 128, 28, -96,
- -8, -96, -96, 77, -96, -7, 119, 158, -96, 18,
- 165, -96, 50, 119, 129, -96, 54, -96, 133, 123,
- -96, -96, 125, 37, 4, -96, -96, 88, -27, -96,
- 28, 137, 17, -96, 20, -96, 152, -96, -96, 66,
- -96, -96, -96, -96, 169, 158, -96, -96, 136, -96,
- 28, -96, 7, -96, 138, 139, -96, -96, -96, 68,
- -96, -96, -96, 140, -96, 114, -96, -96, 114, -96,
- -96, -96, -96, -96, -96, -96, 141, 146, -96, -96
+ 9, -25, 35, 61, 2, -118, 12, -118, 49, -118,
+ -118, -118, 6, -118, -118, 70, 100, -118, -118, 54,
+ 58, 112, -118, 45, 84, 44, -118, -118, -118, 32,
+ 31, 90, 144, 22, 145, 92, 137, -118, -118, 133,
+ 26, -118, -118, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 104, 103, 111, 139, 114, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, 84, 159,
+ 163, 149, -118, -118, 117, 162, -118, -118, 21, 31,
+ 139, 166, 154, 5, 166, -118, 158, 139, 166, 168,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, 183,
+ 134, -118, -118, -118, 187, -118, -118, -118, 64, -118,
+ 135, 25, 190, 138, 142, 146, 25, -118, 1, -118,
+ -118, 84, -118, 41, 139, 183, -118, 53, 191, -118,
+ 77, 139, 147, -118, 78, -118, 140, 141, -118, 195,
+ 197, -118, -118, -118, 143, 34, 148, -118, -118, 150,
+ -21, -118, 25, 151, 21, -118, 42, -118, 166, -118,
+ -118, 81, -118, -118, -118, -118, 200, 183, -118, -118,
+ -118, -118, 152, -118, 25, 20, 148, -118, 153, 156,
+ -118, -118, -118, 48, -118, -118, -118, 157, -118, 138,
+ -118, -118, 23, 138, -118, -118, -118, -118, -118, -118,
+ -118, 161, -118, 164, -118, -118
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -96, -96, -96, -96, -94, -95, -96, 33, -96, -12,
- -84, -96, -96, -96, -96, -96, -96, -96, -96, 106,
- -20, -96, -96, 23, 62, -96, -96, -96, -49, 69,
- -96, 40, 41, -96, -96, -96, -96, -96, -96, 164,
- -96, -96, -96
+ -118, -118, -118, -118, -117, -115, -118, 46, -118, -12,
+ -71, -118, -118, -118, -118, -118, -118, -118, -118, 120,
+ -28, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, 29, 79, -118, -118, -118, -54, -76, -118, 47,
+ 39, -118, -118, -118, -118, -118, -118, 188, -118, -118,
+ -118
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
#define YYTABLE_NINF -9
static const yytype_int16 yytable[] =
{
- 18, 132, 131, 95, 7, 8, 7, 8, 7, 8,
- 138, 7, 8, 134, 141, 24, 70, 163, 78, 13,
- 14, 70, 107, 70, 164, 85, 168, 112, 86, 1,
- 70, 76, 98, 83, 121, 4, 169, 142, 146, 129,
- 130, 16, 143, 147, 33, 29, 165, 30, 5, 31,
- 9, 71, 17, 162, 161, 111, 71, 177, 71, 118,
- 108, 32, 77, 146, 84, 71, 176, 148, 150, 99,
- 100, 117, 98, 180, 153, 183, 99, 100, 93, 94,
- 186, 159, 35, 187, 36, 160, 37, 6, 38, 39,
- 181, 182, 7, 8, 40, 146, 41, 88, 42, 155,
- 152, 43, 44, 19, 156, 45, 89, 90, 91, 99,
- 100, 155, 46, 47, 48, 20, 172, 49, 7, 130,
- 21, 119, 18, 50, 35, 122, 36, 22, 37, 23,
- 38, 39, 24, 67, 68, 69, 40, 96, 41, 74,
- 42, 80, 75, 43, 44, 79, 81, 45, 82, 87,
- 18, 97, 104, 105, 46, 47, 48, 113, 70, 49,
- 116, 120, 123, 124, 128, 127, 135, 136, 139, 137,
- 151, 140, 154, 173, -8, 167, 158, 106, 174, 149,
- 157, 166, 144, 179, 185, 188, 171, 175, 0, 178,
- 189, 0, 34
+ 18, 117, 119, 154, 158, 92, 7, 8, 160, 163,
+ 7, 8, 99, 84, 1, 100, 101, 102, 103, 104,
+ 105, 106, 107, 108, 7, 8, 125, 7, 8, 157,
+ 84, 187, 4, 24, 84, 5, 130, 25, 188, 84,
+ 90, 13, 14, 139, 97, 189, 24, 78, 192, 79,
+ 25, 80, 157, 205, 164, 166, 85, 21, 193, 165,
+ 9, 129, 135, 81, 17, 136, 82, 200, 147, 148,
+ 206, 207, 126, 85, 149, 150, 208, 85, 201, 91,
+ 170, 212, 85, 98, 211, 185, 183, 175, 213, 30,
+ 184, 31, 6, 32, 168, 33, 34, 149, 150, 169,
+ 16, 35, 19, 36, 20, 37, 168, 110, 38, 39,
+ 22, 172, 40, 149, 150, 202, 111, 112, 113, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 168, 177, 52, 137, 177, 174, 178, 140, 53, 196,
+ 115, 116, 7, 148, 30, 23, 31, 88, 32, 94,
+ 33, 34, 7, 8, 89, 93, 35, 95, 36, 96,
+ 37, 109, 120, 38, 39, 118, 121, 40, 123, 122,
+ 84, 131, 134, 18, 41, 42, 43, 44, 45, 46,
+ 47, 48, 49, 50, 51, 138, 141, 52, 142, 145,
+ 18, 146, 156, 159, 161, 179, 173, 162, 176, 180,
+ -8, 181, 182, 190, 197, 124, 198, 186, 204, 210,
+ 191, 199, 203, 214, 171, 195, 215, 83
};
#define yypact_value_is_default(yystate) \
- ((yystate) == (-96))
+ ((yystate) == (-118))
#define yytable_value_is_error(yytable_value) \
YYID (0)
-static const yytype_int16 yycheck[] =
+static const yytype_uint8 yycheck[] =
{
- 12, 96, 96, 52, 4, 5, 4, 5, 4, 5,
- 105, 4, 5, 97, 108, 5, 8, 44, 38, 29,
- 30, 8, 5, 8, 51, 45, 6, 76, 48, 5,
- 8, 18, 4, 18, 83, 49, 16, 45, 45, 4,
- 5, 43, 50, 50, 34, 3, 140, 5, 0, 7,
- 50, 43, 50, 137, 50, 75, 43, 50, 43, 79,
- 43, 19, 49, 45, 49, 43, 160, 116, 50, 41,
- 42, 49, 4, 5, 123, 169, 41, 42, 29, 30,
- 175, 44, 5, 178, 7, 48, 9, 31, 11, 12,
- 22, 23, 4, 5, 17, 45, 19, 4, 21, 45,
- 50, 24, 25, 32, 50, 28, 13, 14, 15, 41,
- 42, 45, 35, 36, 37, 4, 50, 40, 4, 5,
- 3, 80, 134, 46, 5, 84, 7, 44, 9, 33,
- 11, 12, 5, 3, 3, 20, 17, 43, 19, 49,
- 21, 49, 10, 24, 25, 10, 20, 28, 26, 49,
- 162, 49, 3, 43, 35, 36, 37, 5, 8, 40,
- 18, 27, 18, 5, 4, 47, 4, 4, 44, 49,
- 5, 43, 43, 4, 51, 142, 51, 71, 155, 117,
- 47, 44, 113, 44, 44, 44, 146, 51, -1, 51,
- 44, -1, 28
+ 12, 55, 78, 118, 121, 33, 4, 5, 123, 126,
+ 4, 5, 40, 8, 5, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 4, 5, 5, 4, 5, 4,
+ 8, 52, 57, 1, 8, 0, 90, 5, 59, 8,
+ 18, 29, 30, 97, 18, 162, 1, 3, 6, 5,
+ 5, 7, 4, 5, 53, 131, 51, 3, 16, 58,
+ 58, 89, 57, 19, 58, 93, 34, 184, 4, 5,
+ 22, 23, 51, 51, 49, 50, 193, 51, 58, 57,
+ 134, 58, 51, 57, 199, 156, 52, 141, 203, 5,
+ 56, 7, 31, 9, 53, 11, 12, 49, 50, 58,
+ 51, 17, 32, 19, 4, 21, 53, 4, 24, 25,
+ 52, 58, 28, 49, 50, 186, 13, 14, 15, 35,
+ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
+ 53, 53, 48, 94, 53, 58, 58, 98, 54, 58,
+ 29, 30, 4, 5, 5, 33, 7, 57, 9, 57,
+ 11, 12, 4, 5, 10, 10, 17, 20, 19, 26,
+ 21, 57, 3, 24, 25, 51, 3, 28, 51, 20,
+ 8, 5, 18, 185, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 27, 18, 48, 5, 55,
+ 202, 4, 57, 3, 52, 55, 5, 51, 51, 4,
+ 59, 4, 59, 52, 4, 85, 177, 57, 52, 52,
+ 164, 59, 59, 52, 135, 168, 52, 29
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
- 0, 5, 53, 93, 49, 0, 31, 4, 5, 50,
- 57, 61, 62, 29, 30, 94, 43, 50, 61, 32,
- 4, 3, 44, 33, 5, 89, 90, 91, 92, 3,
- 5, 7, 19, 34, 91, 5, 7, 9, 11, 12,
- 17, 19, 21, 24, 25, 28, 35, 36, 37, 40,
- 46, 64, 65, 68, 69, 70, 73, 74, 77, 78,
- 79, 80, 81, 85, 86, 87, 88, 3, 3, 20,
- 8, 43, 71, 72, 49, 10, 18, 49, 72, 10,
- 49, 20, 26, 18, 49, 72, 72, 49, 4, 13,
- 14, 15, 63, 29, 30, 80, 43, 49, 4, 41,
- 42, 54, 55, 56, 3, 43, 71, 5, 43, 59,
- 60, 72, 80, 5, 83, 84, 18, 49, 72, 84,
- 27, 80, 84, 18, 5, 75, 76, 47, 4, 4,
- 5, 56, 57, 67, 62, 4, 4, 49, 57, 44,
- 43, 56, 45, 50, 81, 82, 45, 50, 80, 76,
- 50, 5, 50, 80, 43, 45, 50, 47, 51, 44,
- 48, 50, 62, 44, 51, 56, 44, 59, 6, 16,
- 66, 83, 50, 4, 75, 51, 56, 50, 51, 44,
- 5, 22, 23, 56, 58, 44, 57, 57, 44, 44
+ 0, 5, 61, 109, 57, 0, 31, 4, 5, 58,
+ 65, 69, 70, 29, 30, 110, 51, 58, 69, 32,
+ 4, 3, 52, 33, 1, 5, 105, 106, 107, 108,
+ 5, 7, 9, 11, 12, 17, 19, 21, 24, 25,
+ 28, 35, 36, 37, 38, 39, 40, 41, 42, 43,
+ 44, 45, 48, 54, 72, 73, 76, 77, 78, 81,
+ 82, 83, 84, 85, 86, 87, 88, 89, 90, 93,
+ 94, 95, 96, 97, 101, 102, 103, 104, 3, 5,
+ 7, 19, 34, 107, 8, 51, 79, 80, 57, 10,
+ 18, 57, 80, 10, 57, 20, 26, 18, 57, 80,
+ 80, 80, 80, 80, 80, 80, 80, 80, 80, 57,
+ 4, 13, 14, 15, 71, 29, 30, 96, 51, 97,
+ 3, 3, 20, 51, 79, 5, 51, 67, 68, 80,
+ 96, 5, 99, 100, 18, 57, 80, 100, 27, 96,
+ 100, 18, 5, 91, 92, 55, 4, 4, 5, 49,
+ 50, 62, 63, 64, 65, 75, 57, 4, 64, 3,
+ 65, 52, 51, 64, 53, 58, 97, 98, 53, 58,
+ 96, 92, 58, 5, 58, 96, 51, 53, 58, 55,
+ 4, 4, 59, 52, 56, 70, 57, 52, 59, 64,
+ 52, 67, 6, 16, 74, 99, 58, 4, 91, 59,
+ 64, 58, 70, 59, 52, 5, 22, 23, 64, 66,
+ 52, 65, 58, 65, 52, 52
};
#define yyerrok (yyerrstatus = 0)
case 2:
/* Line 1806 of yacc.c */
-#line 121 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_DEFINITIONS|(yyvsp[(3) - (8)].constant));
+#line 132 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_DEFINITIONS|(yyvsp[(3) - (8)].constant));
_asn1_set_name((yyval.node),_asn1_get_name((yyvsp[(1) - (8)].node)));
_asn1_set_name((yyvsp[(1) - (8)].node),"");
_asn1_set_right((yyvsp[(1) - (8)].node),(yyvsp[(7) - (8)].node));
case 3:
/* Line 1806 of yacc.c */
-#line 131 "ASN1.y"
+#line 142 "ASN1.y"
{strcpy((yyval.str),(yyvsp[(1) - (1)].str));}
break;
case 4:
/* Line 1806 of yacc.c */
-#line 132 "ASN1.y"
+#line 143 "ASN1.y"
{strcpy((yyval.str),(yyvsp[(2) - (2)].str));}
break;
case 5:
/* Line 1806 of yacc.c */
-#line 135 "ASN1.y"
+#line 146 "ASN1.y"
{strcpy((yyval.str),"-");
strcat((yyval.str),(yyvsp[(2) - (2)].str));}
break;
case 6:
/* Line 1806 of yacc.c */
-#line 139 "ASN1.y"
+#line 150 "ASN1.y"
{strcpy((yyval.str),(yyvsp[(1) - (1)].str));}
break;
case 7:
/* Line 1806 of yacc.c */
-#line 140 "ASN1.y"
+#line 151 "ASN1.y"
{strcpy((yyval.str),(yyvsp[(1) - (1)].str));}
break;
case 8:
/* Line 1806 of yacc.c */
-#line 143 "ASN1.y"
+#line 154 "ASN1.y"
{strcpy((yyval.str),(yyvsp[(1) - (1)].str));}
break;
case 9:
/* Line 1806 of yacc.c */
-#line 144 "ASN1.y"
+#line 155 "ASN1.y"
{strcpy((yyval.str),(yyvsp[(1) - (1)].str));}
break;
case 10:
/* Line 1806 of yacc.c */
-#line 147 "ASN1.y"
+#line 158 "ASN1.y"
{strcpy((yyval.str),(yyvsp[(1) - (1)].str));}
break;
case 11:
/* Line 1806 of yacc.c */
-#line 148 "ASN1.y"
+#line 159 "ASN1.y"
{strcpy((yyval.str),(yyvsp[(1) - (1)].str));}
break;
case 12:
/* Line 1806 of yacc.c */
-#line 151 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_CONSTANT);
+#line 162 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_CONSTANT);
_asn1_set_value((yyval.node),(yyvsp[(2) - (3)].str),strlen((yyvsp[(2) - (3)].str))+1);}
break;
case 13:
/* Line 1806 of yacc.c */
-#line 153 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_CONSTANT);
+#line 164 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_CONSTANT);
_asn1_set_name((yyval.node),(yyvsp[(1) - (4)].str));
_asn1_set_value((yyval.node),(yyvsp[(3) - (4)].str),strlen((yyvsp[(3) - (4)].str))+1);}
break;
case 14:
/* Line 1806 of yacc.c */
-#line 158 "ASN1.y"
+#line 169 "ASN1.y"
{(yyval.node)=(yyvsp[(1) - (1)].node);}
break;
case 15:
/* Line 1806 of yacc.c */
-#line 159 "ASN1.y"
+#line 170 "ASN1.y"
{(yyval.node)=(yyvsp[(1) - (3)].node);
_asn1_set_right(_asn1_get_last_right((yyvsp[(1) - (3)].node)),(yyvsp[(3) - (3)].node));}
break;
case 16:
/* Line 1806 of yacc.c */
-#line 163 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_CONSTANT);
+#line 174 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_CONSTANT);
_asn1_set_value((yyval.node),(yyvsp[(1) - (1)].str),strlen((yyvsp[(1) - (1)].str))+1);}
break;
case 17:
/* Line 1806 of yacc.c */
-#line 165 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_CONSTANT);
+#line 176 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_CONSTANT);
_asn1_set_name((yyval.node),(yyvsp[(1) - (4)].str));
_asn1_set_value((yyval.node),(yyvsp[(3) - (4)].str),strlen((yyvsp[(3) - (4)].str))+1);}
break;
case 18:
/* Line 1806 of yacc.c */
-#line 170 "ASN1.y"
+#line 181 "ASN1.y"
{(yyval.node)=(yyvsp[(1) - (1)].node);}
break;
case 19:
/* Line 1806 of yacc.c */
-#line 171 "ASN1.y"
+#line 182 "ASN1.y"
{(yyval.node)=(yyvsp[(1) - (2)].node);
_asn1_set_right(_asn1_get_last_right((yyvsp[(1) - (2)].node)),(yyvsp[(2) - (2)].node));}
break;
case 20:
/* Line 1806 of yacc.c */
-#line 175 "ASN1.y"
+#line 186 "ASN1.y"
{(yyval.constant)=CONST_UNIVERSAL;}
break;
case 21:
/* Line 1806 of yacc.c */
-#line 176 "ASN1.y"
+#line 187 "ASN1.y"
{(yyval.constant)=CONST_PRIVATE;}
break;
case 22:
/* Line 1806 of yacc.c */
-#line 177 "ASN1.y"
+#line 188 "ASN1.y"
{(yyval.constant)=CONST_APPLICATION;}
break;
case 23:
/* Line 1806 of yacc.c */
-#line 180 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_TAG);
+#line 191 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_TAG);
_asn1_set_value((yyval.node),(yyvsp[(2) - (3)].str),strlen((yyvsp[(2) - (3)].str))+1);}
break;
case 24:
/* Line 1806 of yacc.c */
-#line 182 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_TAG | (yyvsp[(2) - (4)].constant));
+#line 193 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_TAG | (yyvsp[(2) - (4)].constant));
_asn1_set_value((yyval.node),(yyvsp[(3) - (4)].str),strlen((yyvsp[(3) - (4)].str))+1);}
break;
case 25:
/* Line 1806 of yacc.c */
-#line 186 "ASN1.y"
+#line 197 "ASN1.y"
{(yyval.node)=(yyvsp[(1) - (1)].node);}
break;
case 26:
/* Line 1806 of yacc.c */
-#line 187 "ASN1.y"
+#line 198 "ASN1.y"
{(yyval.node)=_asn1_mod_type((yyvsp[(1) - (2)].node),CONST_EXPLICIT);}
break;
case 27:
/* Line 1806 of yacc.c */
-#line 188 "ASN1.y"
+#line 199 "ASN1.y"
{(yyval.node)=_asn1_mod_type((yyvsp[(1) - (2)].node),CONST_IMPLICIT);}
break;
case 28:
/* Line 1806 of yacc.c */
-#line 191 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_DEFAULT);
+#line 202 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_DEFAULT);
_asn1_set_value((yyval.node),(yyvsp[(2) - (2)].str),strlen((yyvsp[(2) - (2)].str))+1);}
break;
case 29:
/* Line 1806 of yacc.c */
-#line 193 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_DEFAULT|CONST_TRUE);}
+#line 204 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_DEFAULT|CONST_TRUE);}
break;
case 30:
/* Line 1806 of yacc.c */
-#line 194 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_DEFAULT|CONST_FALSE);}
+#line 205 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_DEFAULT|CONST_FALSE);}
break;
case 33:
/* Line 1806 of yacc.c */
-#line 203 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_INTEGER);}
+#line 214 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_INTEGER);}
break;
case 34:
/* Line 1806 of yacc.c */
-#line 204 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_INTEGER|CONST_LIST);
+#line 215 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_INTEGER|CONST_LIST);
_asn1_set_down((yyval.node),(yyvsp[(3) - (4)].node));}
break;
case 35:
/* Line 1806 of yacc.c */
-#line 206 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_INTEGER);}
+#line 217 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_INTEGER);}
break;
case 36:
/* Line 1806 of yacc.c */
-#line 208 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_INTEGER|CONST_MIN_MAX);
- _asn1_set_down((yyval.node),_asn1_add_static_node(TYPE_SIZE));
+#line 219 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_INTEGER|CONST_MIN_MAX);
+ _asn1_set_down((yyval.node),_asn1_add_static_node(ASN1_ETYPE_SIZE));
_asn1_set_value(_asn1_get_down((yyval.node)),(yyvsp[(6) - (7)].str),strlen((yyvsp[(6) - (7)].str))+1);
_asn1_set_name(_asn1_get_down((yyval.node)),(yyvsp[(3) - (7)].str));}
break;
case 37:
/* Line 1806 of yacc.c */
-#line 214 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_BOOLEAN);}
+#line 225 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_BOOLEAN);}
break;
case 38:
/* Line 1806 of yacc.c */
-#line 217 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_TIME|CONST_UTC);}
+#line 228 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_TIME|CONST_UTC);}
break;
case 39:
/* Line 1806 of yacc.c */
-#line 218 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_TIME|CONST_GENERALIZED);}
+#line 229 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_TIME|CONST_GENERALIZED);}
break;
case 40:
/* Line 1806 of yacc.c */
-#line 221 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_SIZE|CONST_1_PARAM);
+#line 232 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_SIZE|CONST_1_PARAM);
_asn1_set_value((yyval.node),(yyvsp[(3) - (4)].str),strlen((yyvsp[(3) - (4)].str))+1);}
break;
case 41:
/* Line 1806 of yacc.c */
-#line 224 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_SIZE|CONST_MIN_MAX);
+#line 235 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_SIZE|CONST_MIN_MAX);
_asn1_set_value((yyval.node),(yyvsp[(3) - (7)].str),strlen((yyvsp[(3) - (7)].str))+1);
_asn1_set_name((yyval.node),(yyvsp[(6) - (7)].str));}
break;
case 42:
/* Line 1806 of yacc.c */
-#line 229 "ASN1.y"
+#line 240 "ASN1.y"
{(yyval.node)=(yyvsp[(1) - (1)].node);}
break;
case 43:
/* Line 1806 of yacc.c */
-#line 230 "ASN1.y"
+#line 241 "ASN1.y"
{(yyval.node)=(yyvsp[(2) - (3)].node);}
break;
case 44:
/* Line 1806 of yacc.c */
-#line 233 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_GENERALSTRING);}
+#line 244 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_GENERALSTRING);}
break;
case 45:
/* Line 1806 of yacc.c */
-#line 234 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_GENERALSTRING|CONST_SIZE);
+#line 245 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_GENERALSTRING|CONST_SIZE);
_asn1_set_down((yyval.node),(yyvsp[(2) - (2)].node));}
break;
case 46:
/* Line 1806 of yacc.c */
-#line 238 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_OCTET_STRING);}
+#line 249 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_NUMERICSTRING|CONST_UNIVERSAL);}
break;
case 47:
/* Line 1806 of yacc.c */
-#line 239 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_OCTET_STRING|CONST_SIZE);
- _asn1_set_down((yyval.node),(yyvsp[(3) - (3)].node));}
+#line 250 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_NUMERICSTRING|CONST_SIZE);
+ _asn1_set_down((yyval.node),(yyvsp[(2) - (2)].node));}
break;
case 48:
/* Line 1806 of yacc.c */
-#line 243 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_CONSTANT);
- _asn1_set_name((yyval.node),(yyvsp[(1) - (4)].str));
- _asn1_set_value((yyval.node),(yyvsp[(3) - (4)].str),strlen((yyvsp[(3) - (4)].str))+1);}
+#line 254 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_IA5STRING);}
break;
case 49:
/* Line 1806 of yacc.c */
-#line 248 "ASN1.y"
- {(yyval.node)=(yyvsp[(1) - (1)].node);}
+#line 255 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_IA5STRING|CONST_SIZE);
+ _asn1_set_down((yyval.node),(yyvsp[(2) - (2)].node));}
break;
case 50:
/* Line 1806 of yacc.c */
-#line 249 "ASN1.y"
- {(yyval.node)=(yyvsp[(1) - (3)].node);
- _asn1_set_right(_asn1_get_last_right((yyvsp[(1) - (3)].node)),(yyvsp[(3) - (3)].node));}
+#line 259 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_TELETEXSTRING);}
break;
case 51:
/* Line 1806 of yacc.c */
-#line 253 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_BIT_STRING);}
+#line 260 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_TELETEXSTRING|CONST_SIZE);
+ _asn1_set_down((yyval.node),(yyvsp[(2) - (2)].node));}
break;
case 52:
/* Line 1806 of yacc.c */
-#line 254 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_BIT_STRING|CONST_SIZE);}
+#line 264 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_PRINTABLESTRING);}
break;
case 53:
/* Line 1806 of yacc.c */
-#line 256 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_BIT_STRING|CONST_LIST);
- _asn1_set_down((yyval.node),(yyvsp[(4) - (5)].node));}
+#line 265 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_PRINTABLESTRING|CONST_SIZE);
+ _asn1_set_down((yyval.node),(yyvsp[(2) - (2)].node));}
break;
case 54:
/* Line 1806 of yacc.c */
-#line 261 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_ENUMERATED|CONST_LIST);
- _asn1_set_down((yyval.node),(yyvsp[(3) - (4)].node));}
+#line 269 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_UNIVERSALSTRING);}
break;
case 55:
/* Line 1806 of yacc.c */
-#line 266 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_OBJECT_ID);}
+#line 270 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_UNIVERSALSTRING|CONST_SIZE);
+ _asn1_set_down((yyval.node),(yyvsp[(2) - (2)].node));}
break;
case 56:
/* Line 1806 of yacc.c */
-#line 269 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_IDENTIFIER);
- _asn1_set_value((yyval.node),(yyvsp[(1) - (1)].str),strlen((yyvsp[(1) - (1)].str))+1);}
+#line 274 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_BMPSTRING);}
break;
case 57:
/* Line 1806 of yacc.c */
-#line 271 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_IDENTIFIER|CONST_SIZE);
- _asn1_set_value((yyval.node),(yyvsp[(1) - (2)].str),strlen((yyvsp[(1) - (2)].str))+1);
- _asn1_set_down((yyval.node),(yyvsp[(2) - (2)].node));}
+#line 275 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_BMPSTRING|CONST_SIZE);
+ _asn1_set_down((yyval.node),(yyvsp[(2) - (2)].node));}
break;
case 58:
/* Line 1806 of yacc.c */
-#line 274 "ASN1.y"
- {(yyval.node)=(yyvsp[(1) - (1)].node);}
+#line 279 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_UTF8STRING);}
break;
case 59:
/* Line 1806 of yacc.c */
-#line 275 "ASN1.y"
- {(yyval.node)=(yyvsp[(1) - (1)].node);}
+#line 280 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_UTF8STRING|CONST_SIZE);
+ _asn1_set_down((yyval.node),(yyvsp[(2) - (2)].node));}
break;
case 60:
/* Line 1806 of yacc.c */
-#line 276 "ASN1.y"
- {(yyval.node)=(yyvsp[(1) - (1)].node);}
+#line 284 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_VISIBLESTRING);}
+ break;
+
+ case 61:
+
+/* Line 1806 of yacc.c */
+#line 285 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_VISIBLESTRING|CONST_SIZE);
+ _asn1_set_down((yyval.node),(yyvsp[(2) - (2)].node));}
break;
case 62:
/* Line 1806 of yacc.c */
-#line 278 "ASN1.y"
- {(yyval.node)=(yyvsp[(1) - (1)].node);}
+#line 289 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_OCTET_STRING);}
break;
case 63:
/* Line 1806 of yacc.c */
-#line 279 "ASN1.y"
- {(yyval.node)=(yyvsp[(1) - (1)].node);}
+#line 290 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_OCTET_STRING|CONST_SIZE);
+ _asn1_set_down((yyval.node),(yyvsp[(3) - (3)].node));}
break;
case 64:
/* Line 1806 of yacc.c */
-#line 280 "ASN1.y"
- {(yyval.node)=(yyvsp[(1) - (1)].node);}
+#line 294 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_CONSTANT);
+ _asn1_set_name((yyval.node),(yyvsp[(1) - (4)].str));
+ _asn1_set_value((yyval.node),(yyvsp[(3) - (4)].str),strlen((yyvsp[(3) - (4)].str))+1);}
break;
case 65:
/* Line 1806 of yacc.c */
-#line 281 "ASN1.y"
+#line 299 "ASN1.y"
{(yyval.node)=(yyvsp[(1) - (1)].node);}
break;
case 66:
/* Line 1806 of yacc.c */
-#line 282 "ASN1.y"
- {(yyval.node)=(yyvsp[(1) - (1)].node);}
+#line 300 "ASN1.y"
+ {(yyval.node)=(yyvsp[(1) - (3)].node);
+ _asn1_set_right(_asn1_get_last_right((yyvsp[(1) - (3)].node)),(yyvsp[(3) - (3)].node));}
break;
case 67:
/* Line 1806 of yacc.c */
-#line 283 "ASN1.y"
- {(yyval.node)=(yyvsp[(1) - (1)].node);}
+#line 304 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_BIT_STRING);}
break;
case 68:
/* Line 1806 of yacc.c */
-#line 284 "ASN1.y"
- {(yyval.node)=(yyvsp[(1) - (1)].node);}
+#line 305 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_BIT_STRING|CONST_SIZE);}
break;
case 69:
/* Line 1806 of yacc.c */
-#line 285 "ASN1.y"
- {(yyval.node)=(yyvsp[(1) - (1)].node);}
+#line 307 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_BIT_STRING|CONST_LIST);
+ _asn1_set_down((yyval.node),(yyvsp[(4) - (5)].node));}
break;
case 70:
/* Line 1806 of yacc.c */
-#line 286 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_NULL);}
+#line 312 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_ENUMERATED|CONST_LIST);
+ _asn1_set_down((yyval.node),(yyvsp[(3) - (4)].node));}
break;
case 71:
/* Line 1806 of yacc.c */
-#line 289 "ASN1.y"
- {(yyval.node)=(yyvsp[(1) - (1)].node);}
+#line 317 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_OBJECT_ID);}
break;
case 72:
/* Line 1806 of yacc.c */
-#line 290 "ASN1.y"
+#line 320 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_IDENTIFIER);
+ _asn1_set_value((yyval.node),(yyvsp[(1) - (1)].str),strlen((yyvsp[(1) - (1)].str))+1);}
+ break;
+
+ case 73:
+
+/* Line 1806 of yacc.c */
+#line 322 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_IDENTIFIER|CONST_SIZE);
+ _asn1_set_value((yyval.node),(yyvsp[(1) - (2)].str),strlen((yyvsp[(1) - (2)].str))+1);
+ _asn1_set_down((yyval.node),(yyvsp[(2) - (2)].node));}
+ break;
+
+ case 74:
+
+/* Line 1806 of yacc.c */
+#line 325 "ASN1.y"
+ {(yyval.node)=(yyvsp[(1) - (1)].node);}
+ break;
+
+ case 75:
+
+/* Line 1806 of yacc.c */
+#line 326 "ASN1.y"
+ {(yyval.node)=(yyvsp[(1) - (1)].node);}
+ break;
+
+ case 76:
+
+/* Line 1806 of yacc.c */
+#line 327 "ASN1.y"
+ {(yyval.node)=(yyvsp[(1) - (1)].node);}
+ break;
+
+ case 78:
+
+/* Line 1806 of yacc.c */
+#line 329 "ASN1.y"
+ {(yyval.node)=(yyvsp[(1) - (1)].node);}
+ break;
+
+ case 79:
+
+/* Line 1806 of yacc.c */
+#line 330 "ASN1.y"
+ {(yyval.node)=(yyvsp[(1) - (1)].node);}
+ break;
+
+ case 80:
+
+/* Line 1806 of yacc.c */
+#line 331 "ASN1.y"
+ {(yyval.node)=(yyvsp[(1) - (1)].node);}
+ break;
+
+ case 81:
+
+/* Line 1806 of yacc.c */
+#line 332 "ASN1.y"
+ {(yyval.node)=(yyvsp[(1) - (1)].node);}
+ break;
+
+ case 82:
+
+/* Line 1806 of yacc.c */
+#line 333 "ASN1.y"
+ {(yyval.node)=(yyvsp[(1) - (1)].node);}
+ break;
+
+ case 83:
+
+/* Line 1806 of yacc.c */
+#line 334 "ASN1.y"
+ {(yyval.node)=(yyvsp[(1) - (1)].node);}
+ break;
+
+ case 84:
+
+/* Line 1806 of yacc.c */
+#line 335 "ASN1.y"
+ {(yyval.node)=(yyvsp[(1) - (1)].node);}
+ break;
+
+ case 85:
+
+/* Line 1806 of yacc.c */
+#line 336 "ASN1.y"
+ {(yyval.node)=(yyvsp[(1) - (1)].node);}
+ break;
+
+ case 86:
+
+/* Line 1806 of yacc.c */
+#line 337 "ASN1.y"
+ {(yyval.node)=(yyvsp[(1) - (1)].node);}
+ break;
+
+ case 87:
+
+/* Line 1806 of yacc.c */
+#line 338 "ASN1.y"
+ {(yyval.node)=(yyvsp[(1) - (1)].node);}
+ break;
+
+ case 88:
+
+/* Line 1806 of yacc.c */
+#line 339 "ASN1.y"
+ {(yyval.node)=(yyvsp[(1) - (1)].node);}
+ break;
+
+ case 89:
+
+/* Line 1806 of yacc.c */
+#line 340 "ASN1.y"
+ {(yyval.node)=(yyvsp[(1) - (1)].node);}
+ break;
+
+ case 90:
+
+/* Line 1806 of yacc.c */
+#line 341 "ASN1.y"
+ {(yyval.node)=(yyvsp[(1) - (1)].node);}
+ break;
+
+ case 91:
+
+/* Line 1806 of yacc.c */
+#line 342 "ASN1.y"
+ {(yyval.node)=(yyvsp[(1) - (1)].node);}
+ break;
+
+ case 92:
+
+/* Line 1806 of yacc.c */
+#line 343 "ASN1.y"
+ {(yyval.node)=(yyvsp[(1) - (1)].node);}
+ break;
+
+ case 93:
+
+/* Line 1806 of yacc.c */
+#line 344 "ASN1.y"
+ {(yyval.node)=(yyvsp[(1) - (1)].node);}
+ break;
+
+ case 94:
+
+/* Line 1806 of yacc.c */
+#line 345 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_NULL);}
+ break;
+
+ case 95:
+
+/* Line 1806 of yacc.c */
+#line 348 "ASN1.y"
+ {(yyval.node)=(yyvsp[(1) - (1)].node);}
+ break;
+
+ case 96:
+
+/* Line 1806 of yacc.c */
+#line 349 "ASN1.y"
{(yyval.node)=_asn1_mod_type((yyvsp[(2) - (2)].node),CONST_TAG);
_asn1_set_right((yyvsp[(1) - (2)].node),_asn1_get_down((yyval.node)));
_asn1_set_down((yyval.node),(yyvsp[(1) - (2)].node));}
break;
- case 73:
+ case 97:
/* Line 1806 of yacc.c */
-#line 295 "ASN1.y"
+#line 354 "ASN1.y"
{(yyval.node)=(yyvsp[(1) - (1)].node);}
break;
- case 74:
+ case 98:
/* Line 1806 of yacc.c */
-#line 296 "ASN1.y"
+#line 355 "ASN1.y"
{(yyval.node)=_asn1_mod_type((yyvsp[(1) - (2)].node),CONST_DEFAULT);
_asn1_set_right((yyvsp[(2) - (2)].node),_asn1_get_down((yyval.node)));
_asn1_set_down((yyval.node),(yyvsp[(2) - (2)].node));}
break;
- case 75:
+ case 99:
/* Line 1806 of yacc.c */
-#line 299 "ASN1.y"
+#line 358 "ASN1.y"
{(yyval.node)=_asn1_mod_type((yyvsp[(1) - (2)].node),CONST_OPTION);}
break;
- case 76:
+ case 100:
/* Line 1806 of yacc.c */
-#line 302 "ASN1.y"
+#line 361 "ASN1.y"
{(yyval.node)=_asn1_set_name((yyvsp[(2) - (2)].node),(yyvsp[(1) - (2)].str));}
break;
- case 77:
+ case 101:
/* Line 1806 of yacc.c */
-#line 305 "ASN1.y"
+#line 364 "ASN1.y"
{(yyval.node)=(yyvsp[(1) - (1)].node);}
break;
- case 78:
+ case 102:
/* Line 1806 of yacc.c */
-#line 306 "ASN1.y"
+#line 365 "ASN1.y"
{(yyval.node)=(yyvsp[(1) - (3)].node);
_asn1_set_right(_asn1_get_last_right((yyvsp[(1) - (3)].node)),(yyvsp[(3) - (3)].node));}
break;
- case 79:
+ case 103:
/* Line 1806 of yacc.c */
-#line 310 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_SEQUENCE);
+#line 369 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_SEQUENCE);
_asn1_set_down((yyval.node),(yyvsp[(3) - (4)].node));}
break;
- case 80:
+ case 104:
/* Line 1806 of yacc.c */
-#line 312 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_SEQUENCE_OF);
+#line 371 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_SEQUENCE_OF);
_asn1_set_down((yyval.node),(yyvsp[(3) - (3)].node));}
break;
- case 81:
+ case 105:
/* Line 1806 of yacc.c */
-#line 314 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_SEQUENCE_OF|CONST_SIZE);
+#line 373 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_SEQUENCE_OF|CONST_SIZE);
_asn1_set_right((yyvsp[(2) - (4)].node),(yyvsp[(4) - (4)].node));
_asn1_set_down((yyval.node),(yyvsp[(2) - (4)].node));}
break;
- case 82:
+ case 106:
/* Line 1806 of yacc.c */
-#line 319 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_SET);
+#line 378 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_SET);
_asn1_set_down((yyval.node),(yyvsp[(3) - (4)].node));}
break;
- case 83:
+ case 107:
/* Line 1806 of yacc.c */
-#line 321 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_SET_OF);
+#line 380 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_SET_OF);
_asn1_set_down((yyval.node),(yyvsp[(3) - (3)].node));}
break;
- case 84:
+ case 108:
/* Line 1806 of yacc.c */
-#line 323 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_SET_OF|CONST_SIZE);
+#line 382 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_SET_OF|CONST_SIZE);
_asn1_set_right((yyvsp[(2) - (4)].node),(yyvsp[(4) - (4)].node));
_asn1_set_down((yyval.node),(yyvsp[(2) - (4)].node));}
break;
- case 85:
+ case 109:
/* Line 1806 of yacc.c */
-#line 328 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_CHOICE);
+#line 387 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_CHOICE);
_asn1_set_down((yyval.node),(yyvsp[(3) - (4)].node));}
break;
- case 86:
+ case 110:
/* Line 1806 of yacc.c */
-#line 332 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_ANY);}
+#line 391 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_ANY);}
break;
- case 87:
+ case 111:
/* Line 1806 of yacc.c */
-#line 333 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_ANY|CONST_DEFINED_BY);
- _asn1_set_down((yyval.node),_asn1_add_static_node(TYPE_CONSTANT));
+#line 392 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_ANY|CONST_DEFINED_BY);
+ _asn1_set_down((yyval.node),_asn1_add_static_node(ASN1_ETYPE_CONSTANT));
_asn1_set_name(_asn1_get_down((yyval.node)),(yyvsp[(4) - (4)].str));}
break;
- case 88:
+ case 112:
/* Line 1806 of yacc.c */
-#line 338 "ASN1.y"
+#line 397 "ASN1.y"
{(yyval.node)=_asn1_set_name((yyvsp[(3) - (3)].node),(yyvsp[(1) - (3)].str));}
break;
- case 89:
+ case 113:
/* Line 1806 of yacc.c */
-#line 342 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_OBJECT_ID|CONST_ASSIGN);
+#line 398 "ASN1.y"
+ {(yyval.node)=_asn1_set_name((yyvsp[(2) - (2)].node),"");}
+ break;
+
+ case 114:
+
+/* Line 1806 of yacc.c */
+#line 402 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_OBJECT_ID|CONST_ASSIGN);
_asn1_set_name((yyval.node),(yyvsp[(1) - (7)].str));
_asn1_set_down((yyval.node),(yyvsp[(6) - (7)].node));}
break;
- case 90:
+ case 115:
/* Line 1806 of yacc.c */
-#line 346 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_OBJECT_ID|CONST_ASSIGN|CONST_1_PARAM);
+#line 406 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_OBJECT_ID|CONST_ASSIGN|CONST_1_PARAM);
_asn1_set_name((yyval.node),(yyvsp[(1) - (6)].str));
_asn1_set_value((yyval.node),(yyvsp[(2) - (6)].str),strlen((yyvsp[(2) - (6)].str))+1);
_asn1_set_down((yyval.node),(yyvsp[(5) - (6)].node));}
break;
- case 91:
+ case 116:
/* Line 1806 of yacc.c */
-#line 351 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_INTEGER|CONST_ASSIGN);
+#line 411 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_INTEGER|CONST_ASSIGN);
_asn1_set_name((yyval.node),(yyvsp[(1) - (4)].str));
_asn1_set_value((yyval.node),(yyvsp[(4) - (4)].str),strlen((yyvsp[(4) - (4)].str))+1);}
break;
- case 92:
+ case 117:
/* Line 1806 of yacc.c */
-#line 356 "ASN1.y"
+#line 416 "ASN1.y"
{(yyval.node)=(yyvsp[(1) - (1)].node);}
break;
- case 93:
+ case 118:
/* Line 1806 of yacc.c */
-#line 357 "ASN1.y"
+#line 417 "ASN1.y"
{(yyval.node)=(yyvsp[(1) - (1)].node);}
break;
- case 94:
+ case 119:
/* Line 1806 of yacc.c */
-#line 360 "ASN1.y"
+#line 420 "ASN1.y"
{(yyval.node)=(yyvsp[(1) - (1)].node);}
break;
- case 95:
+ case 120:
/* Line 1806 of yacc.c */
-#line 361 "ASN1.y"
+#line 421 "ASN1.y"
{(yyval.node)=(yyvsp[(1) - (2)].node);
_asn1_set_right(_asn1_get_last_right((yyvsp[(1) - (2)].node)),(yyvsp[(2) - (2)].node));}
break;
- case 96:
+ case 121:
/* Line 1806 of yacc.c */
-#line 365 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_OBJECT_ID);
+#line 425 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_OBJECT_ID);
_asn1_set_down((yyval.node),(yyvsp[(3) - (4)].node));
_asn1_set_name((yyval.node),(yyvsp[(1) - (4)].str));}
break;
- case 97:
+ case 122:
/* Line 1806 of yacc.c */
-#line 368 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_OBJECT_ID);
+#line 428 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_OBJECT_ID);
_asn1_set_name((yyval.node),(yyvsp[(1) - (3)].str));}
break;
- case 98:
+ case 123:
/* Line 1806 of yacc.c */
-#line 370 "ASN1.y"
- {(yyval.node)=_asn1_add_static_node(TYPE_OBJECT_ID);
+#line 430 "ASN1.y"
+ {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_OBJECT_ID);
_asn1_set_name((yyval.node),(yyvsp[(1) - (1)].str));}
break;
- case 99:
+ case 124:
/* Line 1806 of yacc.c */
-#line 394 "ASN1.y"
+#line 454 "ASN1.y"
{(yyval.constant)=CONST_EXPLICIT;}
break;
- case 100:
+ case 125:
/* Line 1806 of yacc.c */
-#line 395 "ASN1.y"
+#line 455 "ASN1.y"
{(yyval.constant)=CONST_IMPLICIT;}
break;
/* Line 1806 of yacc.c */
-#line 2412 "ASN1.c"
+#line 2645 "ASN1.c"
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
/* Line 2067 of yacc.c */
-#line 399 "ASN1.y"
+#line 459 "ASN1.y"
,"BOOLEAN","TRUE","FALSE","APPLICATION","ANY","DEFINED"
,"SET","BY","EXPLICIT","IMPLICIT","DEFINITIONS","TAGS"
,"BEGIN","END","UTCTime","GeneralizedTime"
- ,"GeneralString","FROM","IMPORTS","NULL","ENUMERATED"};
+ ,"GeneralString","FROM","IMPORTS","NULL","ENUMERATED"
+ ,"NumericString", "IA5String", "TeletexString", "PrintableString"
+ ,"UniversalString", "BMPString", "UTF8String", "VisibleString"};
static const int key_word_token[] = {
ASSIG,OPTIONAL,INTEGER,SIZE,OCTET,STRING
,SEQUENCE,BIT,UNIVERSAL,PRIVATE,OPTIONAL
,BOOLEAN,ASN1_TRUE,ASN1_FALSE,APPLICATION,ANY,DEFINED
,SET,BY,EXPLICIT,IMPLICIT,DEFINITIONS,TAGS
,BEGIN,END,UTCTime,GeneralizedTime
- ,GeneralString,FROM,IMPORTS,TOKEN_NULL,ENUMERATED};
+ ,GeneralString,FROM,IMPORTS,TOKEN_NULL,ENUMERATED
+ ,NumericString,IA5String,TeletexString,PrintableString
+ ,UniversalString,BMPString,UTF8String,VisibleString
+ };
/*************************************************************/
/* Function: _asn1_yylex */
while((c=fgetc(file_asn1))==' ' || c=='\t' || c=='\n')
if(c=='\n') lineNumber++;
- if(c==EOF){
- strcpy(lastToken,"End Of File");
+ if(c==EOF) {
+ strcpy(lastToken, "End Of File");
return 0;
}
while((c=fgetc(file_asn1))!=EOF && c!='\n' &&
(lastc!='-' || (lastc=='-' && c!='-')))
lastc=c;
- if(c==EOF){
- strcpy(lastToken,"End Of File");
+ if(c==EOF) {
+ strcpy(lastToken, "End Of File");
return 0;
}
else{
c=='(' || c==')' || c=='[' || c==']' ||
c=='{' || c=='}' || c==',' || c=='.'))
{
- if(counter>=ASN1_MAX_NAME_SIZE){
+ if(counter>=ASN1_MAX_NAME_SIZE) {
result_parse=ASN1_NAME_TOO_LONG;
return 0;
}
static void
_asn1_create_errorDescription(int error,char *errorDescription)
{
+ if (errorDescription == NULL)
+ return;
+
+ errorDescription[0]=0;
+
switch(error){
- case ASN1_SUCCESS: case ASN1_FILE_NOT_FOUND:
- if (errorDescription!=NULL) errorDescription[0]=0;
- break;
case ASN1_SYNTAX_ERROR:
- if (errorDescription!=NULL) {
- strcpy(errorDescription,fileName);
- strcat(errorDescription,":");
- _asn1_ltostr(lineNumber,errorDescription+strlen(fileName)+1);
- strcat(errorDescription,": parse error near '");
- strcat(errorDescription,lastToken);
- strcat(errorDescription,"'");
- }
+ snprintf(errorDescription, ASN1_MAX_ERROR_DESCRIPTION_SIZE,
+ "%s:%u: parse error near '%s'", fileName, lineNumber, lastToken);
break;
case ASN1_NAME_TOO_LONG:
- if (errorDescription!=NULL) {
- strcpy(errorDescription,fileName);
- strcat(errorDescription,":");
- _asn1_ltostr(lineNumber,errorDescription+strlen(fileName)+1);
- strcat(errorDescription,": name too long (more than ");
- _asn1_ltostr(ASN1_MAX_NAME_SIZE,errorDescription+strlen(errorDescription));
- strcat(errorDescription," characters)");
- }
+ snprintf(errorDescription, ASN1_MAX_ERROR_DESCRIPTION_SIZE,
+ "%s:%u: name too long (more than %u characters)", fileName, lineNumber,
+ ASN1_MAX_NAME_SIZE);
break;
case ASN1_IDENTIFIER_NOT_FOUND:
- if (errorDescription!=NULL) {
- strcpy(errorDescription,fileName);
- strcat(errorDescription,":");
- strcat(errorDescription,": identifier '");
- strcat(errorDescription,_asn1_identifierMissing);
- strcat(errorDescription,"' not found");
- }
- break;
- default:
- if (errorDescription!=NULL) errorDescription[0]=0;
+ snprintf(errorDescription, ASN1_MAX_ERROR_DESCRIPTION_SIZE,
+ "%s:: identifier '%s' not found", fileName, _asn1_identifierMissing);
break;
}
if(file_asn1==NULL){
result_parse=ASN1_FILE_NOT_FOUND;
- }
- else{
+ } else{
result_parse=ASN1_SUCCESS;
lineNumber=1;
/* set CONST_SET and CONST_NOT_USED */
_asn1_type_set_config(p_tree);
/* check the identifier definitions */
- result_parse=_asn1_check_identifier(p_tree);
+ result_parse = _asn1_check_identifier(p_tree);
if(result_parse==ASN1_SUCCESS){ /* all identifier defined */
/* Delete the list and keep the ASN1 structure */
_asn1_delete_list();
{
/* Sends the error description to the std_out */
-#if 0
- printf("_asn1_yyerror:%s:%ld: %s (Last Token:'%s')\n",fileName,
- lineNumber,s,lastToken);
-#endif
+ if (strcmp(lastToken, "VisibleString") == 0 ||
+ strcmp(lastToken, "PrintableString") == 0 ||
+ strcmp(lastToken, "UniversalString") == 0 ||
+ strcmp(lastToken, "IA5String") == 0 ||
+ strcmp(lastToken, "UTF8String") == 0 ||
+ strcmp(lastToken, "NumericString") == 0 ||
+ strcmp(lastToken, "TeletexString") == 0 ||
+ strcmp(lastToken, "BMPString") == 0)
+ {
+ fprintf(stderr, "%s:%ld: Warning: %s is already defined in libtasn1\n",
+ fileName, lineNumber, lastToken);
+ return 0; /* recover */
+ }
+
if(result_parse!=ASN1_NAME_TOO_LONG)
- result_parse=ASN1_SYNTAX_ERROR;
+ {
+ fprintf(stderr, "%s:%ld: Error: %s near '%s'\n", fileName,
+ lineNumber,s,lastToken);
+ result_parse = ASN1_SYNTAX_ERROR;
+ return 1;
+ }
return 0;
}