diff options
author | Pawel Kowalski <p.kowalski2@partner.samsung.com> | 2019-08-28 14:28:40 +0200 |
---|---|---|
committer | Pawel Kowalski <p.kowalski2@partner.samsung.com> | 2019-08-28 14:28:40 +0200 |
commit | 26bea900a531662c6028ecc06f4adea825658434 (patch) | |
tree | 1db3d30bddc8b8336fa7a8f2bf5a3615001071e1 /lib/ASN1.c | |
parent | e527f54afdf27ab8ce73a22d05d69e5482f5e92b (diff) | |
download | libtasn1-26bea900a531662c6028ecc06f4adea825658434.tar.gz libtasn1-26bea900a531662c6028ecc06f4adea825658434.tar.bz2 libtasn1-26bea900a531662c6028ecc06f4adea825658434.zip |
Imported Upstream version 4.14upstream/4.14
Diffstat (limited to 'lib/ASN1.c')
-rw-r--r-- | lib/ASN1.c | 915 |
1 files changed, 476 insertions, 439 deletions
@@ -1,8 +1,9 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ +/* A Bison parser, made by GNU Bison 3.3.2. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 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 @@ -40,11 +41,14 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ +/* Undocumented macros, especially those whose name start with YY_, + are private implementation details. Do not rely on them. */ + /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "3.0.4" +#define YYBISON_VERSION "3.3.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -69,8 +73,8 @@ #define yylval _asn1_yylval #define yychar _asn1_yychar -/* Copy the first part of user declarations. */ -#line 1 "ASN1.y" /* yacc.c:339 */ +/* First part of user prologue. */ +#line 1 "ASN1.y" /* yacc.c:337 */ /* * Copyright (C) 2001-2014 Free Software Foundation, Inc. @@ -105,6 +109,7 @@ #include <structure.h> #include <libtasn1.h> +static list_type *e_list = NULL; static FILE *file_asn1; /* Pointer to file to parse */ static int result_parse = 0; /* result of the parser algorithm */ @@ -125,14 +130,26 @@ static const char *file_name; /* file to parse */ static void _asn1_yyerror (const char *); static int _asn1_yylex(void); +#define SAFE_COPY(dst, dst_size, fmt, ...) { \ + int _ret = snprintf(dst, dst_size, fmt, __VA_ARGS__); \ + if (_ret != (int)strlen(dst)) \ + { \ + fprintf(stderr, "%s:%u: Oversize value\n", \ + file_name, line_number); \ + exit(1); \ + } \ +} -#line 130 "ASN1.c" /* yacc.c:339 */ - +#line 144 "ASN1.c" /* yacc.c:337 */ # ifndef YY_NULLPTR -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif # else -# define YY_NULLPTR 0 +# define YY_NULLPTR ((void*)0) # endif # endif @@ -259,13 +276,13 @@ extern int _asn1_yydebug; union YYSTYPE { -#line 62 "ASN1.y" /* yacc.c:355 */ +#line 72 "ASN1.y" /* yacc.c:352 */ unsigned int constant; char str[ASN1_MAX_NAME_SIZE+1]; asn1_node node; -#line 269 "ASN1.c" /* yacc.c:355 */ +#line 286 "ASN1.c" /* yacc.c:352 */ }; typedef union YYSTYPE YYSTYPE; @@ -280,9 +297,7 @@ int _asn1_yyparse (void); -/* Copy the second part of user declarations. */ -#line 286 "ASN1.c" /* yacc.c:358 */ #ifdef short # undef short @@ -303,13 +318,13 @@ typedef signed char yytype_int8; #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else -typedef unsigned short int yytype_uint16; +typedef unsigned short yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else -typedef short int yytype_int16; +typedef short yytype_int16; #endif #ifndef YYSIZE_T @@ -321,7 +336,7 @@ typedef short int yytype_int16; # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else -# define YYSIZE_T unsigned int +# define YYSIZE_T unsigned # endif #endif @@ -357,15 +372,6 @@ typedef short int yytype_int16; # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) #endif -#if !defined _Noreturn \ - && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) -# if defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) -# endif -#endif - /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) @@ -373,7 +379,7 @@ typedef short int yytype_int16; # define YYUSE(E) /* empty */ #endif -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ @@ -535,16 +541,16 @@ union yyalloc /* YYNSTATES -- Number of states. */ #define YYNSTATES 223 -/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned - by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 303 +/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, with out-of-bounds checking. */ #define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM - as returned by yylex, without out-of-bounds checking. */ + as returned by yylex. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -584,19 +590,19 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 135, 135, 148, 149, 152, 155, 156, 159, 160, - 163, 164, 165, 168, 169, 172, 174, 179, 180, 184, - 186, 191, 192, 196, 197, 198, 201, 203, 207, 208, - 209, 212, 214, 215, 219, 220, 224, 225, 227, 228, - 235, 238, 239, 242, 244, 250, 251, 254, 255, 259, - 260, 264, 265, 269, 270, 274, 275, 279, 280, 284, - 285, 289, 290, 294, 295, 299, 300, 304, 309, 310, - 314, 315, 316, 321, 327, 330, 332, 335, 336, 337, - 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, - 348, 349, 350, 351, 352, 353, 354, 355, 358, 359, - 364, 365, 368, 371, 374, 375, 379, 381, 383, 388, - 390, 392, 397, 401, 402, 407, 409, 412, 416, 421, - 427, 428, 431, 432, 436, 439, 441, 465, 466 + 0, 145, 145, 158, 159, 162, 165, 166, 169, 170, + 173, 174, 175, 178, 179, 182, 184, 189, 190, 194, + 196, 201, 202, 206, 207, 208, 211, 213, 217, 218, + 219, 222, 224, 225, 229, 230, 234, 235, 237, 238, + 245, 248, 249, 252, 254, 260, 261, 264, 265, 269, + 270, 274, 275, 279, 280, 284, 285, 289, 290, 294, + 295, 299, 300, 304, 305, 309, 310, 314, 319, 320, + 324, 325, 326, 331, 337, 340, 342, 345, 346, 347, + 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, + 358, 359, 360, 361, 362, 363, 364, 365, 368, 369, + 374, 375, 378, 381, 384, 385, 389, 391, 393, 398, + 400, 402, 407, 411, 412, 417, 419, 422, 426, 431, + 437, 438, 441, 442, 446, 449, 451, 475, 476 }; #endif @@ -872,22 +878,22 @@ static const yytype_uint8 yyr2[] = #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (0) +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ + while (0) /* Error token number */ #define YYTERROR 1 @@ -927,37 +933,37 @@ do { \ } while (0) -/*----------------------------------------. -| Print this symbol's value on YYOUTPUT. | -`----------------------------------------*/ +/*-----------------------------------. +| Print this symbol's value on YYO. | +`-----------------------------------*/ static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) { - FILE *yyo = yyoutput; - YYUSE (yyo); + FILE *yyoutput = yyo; + YYUSE (yyoutput); if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); + YYPRINT (yyo, yytoknum[yytype], *yyvaluep); # endif YYUSE (yytype); } -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ +/*---------------------------. +| Print this symbol on YYO. | +`---------------------------*/ static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) { - YYFPRINTF (yyoutput, "%s %s (", + YYFPRINTF (yyo, "%s %s (", yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); - yy_symbol_value_print (yyoutput, yytype, yyvaluep); - YYFPRINTF (yyoutput, ")"); + yy_symbol_value_print (yyo, yytype, yyvaluep); + YYFPRINTF (yyo, ")"); } /*------------------------------------------------------------------. @@ -991,7 +997,7 @@ do { \ static void yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) { - unsigned long int yylno = yyrline[yyrule]; + unsigned long yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", @@ -1002,7 +1008,7 @@ yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yystos[yyssp[yyi + 1 - yynrhs]], - &(yyvsp[(yyi + 1) - (yynrhs)]) + &yyvsp[(yyi + 1) - (yynrhs)] ); YYFPRINTF (stderr, "\n"); } @@ -1106,7 +1112,10 @@ yytnamerr (char *yyres, const char *yystr) case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; - /* Fall through. */ + else + goto append; + + append: default: if (yyres) yyres[yyn] = *yyp; @@ -1124,7 +1133,7 @@ yytnamerr (char *yyres, const char *yystr) if (! yyres) return yystrlen (yystr); - return yystpcpy (yyres, yystr) - yyres; + return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres); } # endif @@ -1202,10 +1211,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yyarg[yycount++] = yytname[yyx]; { YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else return 2; - yysize = yysize1; } } } @@ -1217,6 +1226,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, case N: \ yyformat = S; \ break + default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); @@ -1228,9 +1238,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, { YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else return 2; - yysize = yysize1; } if (*yymsg_alloc < yysize) @@ -1356,23 +1367,31 @@ yyparse (void) yychar = YYEMPTY; /* Cause a token to be read. */ goto yysetstate; + /*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | +| yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ - yynewstate: +yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; - yysetstate: - *yyssp = yystate; + +/*--------------------------------------------------------------------. +| yynewstate -- set current state (the top of the stack) to yystate. | +`--------------------------------------------------------------------*/ +yysetstate: + *yyssp = (yytype_int16) yystate; if (yyss + yystacksize - 1 <= yyssp) +#if !defined yyoverflow && !defined YYSTACK_RELOCATE + goto yyexhaustedlab; +#else { /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; + YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1); -#ifdef yyoverflow +# if defined yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into @@ -1388,14 +1407,10 @@ yyparse (void) &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); - yyss = yyss1; yyvs = yyvs1; } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else +# else /* defined YYSTACK_RELOCATE */ /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; @@ -1411,22 +1426,22 @@ yyparse (void) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE +# undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif -#endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } +#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ YYDPRINTF ((stderr, "Entering state %d\n", yystate)); @@ -1435,11 +1450,11 @@ yyparse (void) goto yybackup; + /*-----------. | yybackup. | `-----------*/ yybackup: - /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ @@ -1512,7 +1527,7 @@ yydefault: /*-----------------------------. -| yyreduce -- Do a reduction. | +| yyreduce -- do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ @@ -1533,8 +1548,8 @@ yyreduce: switch (yyn) { case 2: -#line 138 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_DEFINITIONS|(yyvsp[-5].constant)); +#line 148 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_DEFINITIONS|(yyvsp[-5].constant)); _asn1_set_name((yyval.node),_asn1_get_name((yyvsp[-7].node))); _asn1_set_name((yyvsp[-7].node),""); _asn1_set_right((yyvsp[-7].node),(yyvsp[-1].node)); @@ -1542,813 +1557,813 @@ yyreduce: p_tree=(yyval.node); } -#line 1546 "ASN1.c" /* yacc.c:1646 */ +#line 1561 "ASN1.c" /* yacc.c:1652 */ break; case 3: -#line 148 "ASN1.y" /* yacc.c:1646 */ +#line 158 "ASN1.y" /* yacc.c:1652 */ {snprintf((yyval.str),sizeof((yyval.str)),"%s",(yyvsp[0].str));} -#line 1552 "ASN1.c" /* yacc.c:1646 */ +#line 1567 "ASN1.c" /* yacc.c:1652 */ break; case 4: -#line 149 "ASN1.y" /* yacc.c:1646 */ +#line 159 "ASN1.y" /* yacc.c:1652 */ {snprintf((yyval.str),sizeof((yyval.str)),"%s",(yyvsp[0].str));} -#line 1558 "ASN1.c" /* yacc.c:1646 */ +#line 1573 "ASN1.c" /* yacc.c:1652 */ break; case 5: -#line 152 "ASN1.y" /* yacc.c:1646 */ - {snprintf((yyval.str),sizeof((yyval.str)),"-%s",(yyvsp[0].str));} -#line 1564 "ASN1.c" /* yacc.c:1646 */ +#line 162 "ASN1.y" /* yacc.c:1652 */ + {SAFE_COPY((yyval.str),sizeof((yyval.str)),"-%s",(yyvsp[0].str));} +#line 1579 "ASN1.c" /* yacc.c:1652 */ break; case 6: -#line 155 "ASN1.y" /* yacc.c:1646 */ +#line 165 "ASN1.y" /* yacc.c:1652 */ {snprintf((yyval.str),sizeof((yyval.str)),"%s",(yyvsp[0].str));} -#line 1570 "ASN1.c" /* yacc.c:1646 */ +#line 1585 "ASN1.c" /* yacc.c:1652 */ break; case 7: -#line 156 "ASN1.y" /* yacc.c:1646 */ +#line 166 "ASN1.y" /* yacc.c:1652 */ {snprintf((yyval.str),sizeof((yyval.str)),"%s",(yyvsp[0].str));} -#line 1576 "ASN1.c" /* yacc.c:1646 */ +#line 1591 "ASN1.c" /* yacc.c:1652 */ break; case 8: -#line 159 "ASN1.y" /* yacc.c:1646 */ +#line 169 "ASN1.y" /* yacc.c:1652 */ {snprintf((yyval.str),sizeof((yyval.str)),"%s",(yyvsp[0].str));} -#line 1582 "ASN1.c" /* yacc.c:1646 */ +#line 1597 "ASN1.c" /* yacc.c:1652 */ break; case 9: -#line 160 "ASN1.y" /* yacc.c:1646 */ +#line 170 "ASN1.y" /* yacc.c:1652 */ {snprintf((yyval.str),sizeof((yyval.str)),"%s",(yyvsp[0].str));} -#line 1588 "ASN1.c" /* yacc.c:1646 */ +#line 1603 "ASN1.c" /* yacc.c:1652 */ break; case 10: -#line 163 "ASN1.y" /* yacc.c:1646 */ +#line 173 "ASN1.y" /* yacc.c:1652 */ {snprintf((yyval.str),sizeof((yyval.str)),"%s",(yyvsp[0].str));} -#line 1594 "ASN1.c" /* yacc.c:1646 */ +#line 1609 "ASN1.c" /* yacc.c:1652 */ break; case 11: -#line 164 "ASN1.y" /* yacc.c:1646 */ - {snprintf((yyval.str),sizeof((yyval.str)),"-%s",(yyvsp[0].str));} -#line 1600 "ASN1.c" /* yacc.c:1646 */ +#line 174 "ASN1.y" /* yacc.c:1652 */ + {SAFE_COPY((yyval.str),sizeof((yyval.str)),"-%s",(yyvsp[0].str));} +#line 1615 "ASN1.c" /* yacc.c:1652 */ break; case 12: -#line 165 "ASN1.y" /* yacc.c:1646 */ +#line 175 "ASN1.y" /* yacc.c:1652 */ {snprintf((yyval.str),sizeof((yyval.str)),"%s",(yyvsp[0].str));} -#line 1606 "ASN1.c" /* yacc.c:1646 */ +#line 1621 "ASN1.c" /* yacc.c:1652 */ break; case 13: -#line 168 "ASN1.y" /* yacc.c:1646 */ +#line 178 "ASN1.y" /* yacc.c:1652 */ {snprintf((yyval.str),sizeof((yyval.str)),"%s",(yyvsp[0].str));} -#line 1612 "ASN1.c" /* yacc.c:1646 */ +#line 1627 "ASN1.c" /* yacc.c:1652 */ break; case 14: -#line 169 "ASN1.y" /* yacc.c:1646 */ +#line 179 "ASN1.y" /* yacc.c:1652 */ {snprintf((yyval.str),sizeof((yyval.str)),"%s",(yyvsp[0].str));} -#line 1618 "ASN1.c" /* yacc.c:1646 */ +#line 1633 "ASN1.c" /* yacc.c:1652 */ break; case 15: -#line 172 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_CONSTANT); +#line 182 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_CONSTANT); _asn1_set_value((yyval.node),(yyvsp[-1].str),strlen((yyvsp[-1].str))+1);} -#line 1625 "ASN1.c" /* yacc.c:1646 */ +#line 1640 "ASN1.c" /* yacc.c:1652 */ break; case 16: -#line 174 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_CONSTANT); +#line 184 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_CONSTANT); _asn1_set_name((yyval.node),(yyvsp[-3].str)); _asn1_set_value((yyval.node),(yyvsp[-1].str),strlen((yyvsp[-1].str))+1);} -#line 1633 "ASN1.c" /* yacc.c:1646 */ +#line 1648 "ASN1.c" /* yacc.c:1652 */ break; case 17: -#line 179 "ASN1.y" /* yacc.c:1646 */ +#line 189 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 1639 "ASN1.c" /* yacc.c:1646 */ +#line 1654 "ASN1.c" /* yacc.c:1652 */ break; case 18: -#line 180 "ASN1.y" /* yacc.c:1646 */ +#line 190 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[-2].node); _asn1_set_right(_asn1_get_last_right((yyvsp[-2].node)),(yyvsp[0].node));} -#line 1646 "ASN1.c" /* yacc.c:1646 */ +#line 1661 "ASN1.c" /* yacc.c:1652 */ break; case 19: -#line 184 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_CONSTANT); +#line 194 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_CONSTANT); _asn1_set_value((yyval.node),(yyvsp[0].str),strlen((yyvsp[0].str))+1);} -#line 1653 "ASN1.c" /* yacc.c:1646 */ +#line 1668 "ASN1.c" /* yacc.c:1652 */ break; case 20: -#line 186 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_CONSTANT); +#line 196 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_CONSTANT); _asn1_set_name((yyval.node),(yyvsp[-3].str)); _asn1_set_value((yyval.node),(yyvsp[-1].str),strlen((yyvsp[-1].str))+1);} -#line 1661 "ASN1.c" /* yacc.c:1646 */ +#line 1676 "ASN1.c" /* yacc.c:1652 */ break; case 21: -#line 191 "ASN1.y" /* yacc.c:1646 */ +#line 201 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 1667 "ASN1.c" /* yacc.c:1646 */ +#line 1682 "ASN1.c" /* yacc.c:1652 */ break; case 22: -#line 192 "ASN1.y" /* yacc.c:1646 */ +#line 202 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[-1].node); _asn1_set_right(_asn1_get_last_right((yyvsp[-1].node)),(yyvsp[0].node));} -#line 1674 "ASN1.c" /* yacc.c:1646 */ +#line 1689 "ASN1.c" /* yacc.c:1652 */ break; case 23: -#line 196 "ASN1.y" /* yacc.c:1646 */ +#line 206 "ASN1.y" /* yacc.c:1652 */ {(yyval.constant)=CONST_UNIVERSAL;} -#line 1680 "ASN1.c" /* yacc.c:1646 */ +#line 1695 "ASN1.c" /* yacc.c:1652 */ break; case 24: -#line 197 "ASN1.y" /* yacc.c:1646 */ +#line 207 "ASN1.y" /* yacc.c:1652 */ {(yyval.constant)=CONST_PRIVATE;} -#line 1686 "ASN1.c" /* yacc.c:1646 */ +#line 1701 "ASN1.c" /* yacc.c:1652 */ break; case 25: -#line 198 "ASN1.y" /* yacc.c:1646 */ +#line 208 "ASN1.y" /* yacc.c:1652 */ {(yyval.constant)=CONST_APPLICATION;} -#line 1692 "ASN1.c" /* yacc.c:1646 */ +#line 1707 "ASN1.c" /* yacc.c:1652 */ break; case 26: -#line 201 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_TAG); +#line 211 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_TAG); _asn1_set_value((yyval.node),(yyvsp[-1].str),strlen((yyvsp[-1].str))+1);} -#line 1699 "ASN1.c" /* yacc.c:1646 */ +#line 1714 "ASN1.c" /* yacc.c:1652 */ break; case 27: -#line 203 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_TAG | (yyvsp[-2].constant)); +#line 213 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_TAG | (yyvsp[-2].constant)); _asn1_set_value((yyval.node),(yyvsp[-1].str),strlen((yyvsp[-1].str))+1);} -#line 1706 "ASN1.c" /* yacc.c:1646 */ +#line 1721 "ASN1.c" /* yacc.c:1652 */ break; case 28: -#line 207 "ASN1.y" /* yacc.c:1646 */ +#line 217 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 1712 "ASN1.c" /* yacc.c:1646 */ +#line 1727 "ASN1.c" /* yacc.c:1652 */ break; case 29: -#line 208 "ASN1.y" /* yacc.c:1646 */ +#line 218 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=_asn1_mod_type((yyvsp[-1].node),CONST_EXPLICIT);} -#line 1718 "ASN1.c" /* yacc.c:1646 */ +#line 1733 "ASN1.c" /* yacc.c:1652 */ break; case 30: -#line 209 "ASN1.y" /* yacc.c:1646 */ +#line 219 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=_asn1_mod_type((yyvsp[-1].node),CONST_IMPLICIT);} -#line 1724 "ASN1.c" /* yacc.c:1646 */ +#line 1739 "ASN1.c" /* yacc.c:1652 */ break; case 31: -#line 212 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_DEFAULT); +#line 222 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_DEFAULT); _asn1_set_value((yyval.node),(yyvsp[0].str),strlen((yyvsp[0].str))+1);} -#line 1731 "ASN1.c" /* yacc.c:1646 */ +#line 1746 "ASN1.c" /* yacc.c:1652 */ break; case 32: -#line 214 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_DEFAULT|CONST_TRUE);} -#line 1737 "ASN1.c" /* yacc.c:1646 */ +#line 224 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_DEFAULT|CONST_TRUE);} +#line 1752 "ASN1.c" /* yacc.c:1652 */ break; case 33: -#line 215 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_DEFAULT|CONST_FALSE);} -#line 1743 "ASN1.c" /* yacc.c:1646 */ +#line 225 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_DEFAULT|CONST_FALSE);} +#line 1758 "ASN1.c" /* yacc.c:1652 */ break; case 36: -#line 224 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_INTEGER);} -#line 1749 "ASN1.c" /* yacc.c:1646 */ +#line 234 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_INTEGER);} +#line 1764 "ASN1.c" /* yacc.c:1652 */ break; case 37: -#line 225 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_INTEGER|CONST_LIST); +#line 235 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_INTEGER|CONST_LIST); _asn1_set_down((yyval.node),(yyvsp[-1].node));} -#line 1756 "ASN1.c" /* yacc.c:1646 */ +#line 1771 "ASN1.c" /* yacc.c:1652 */ break; case 38: -#line 227 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_INTEGER);} -#line 1762 "ASN1.c" /* yacc.c:1646 */ +#line 237 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_INTEGER);} +#line 1777 "ASN1.c" /* yacc.c:1652 */ break; case 39: -#line 229 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_INTEGER|CONST_MIN_MAX); - _asn1_set_down((yyval.node),_asn1_add_static_node(ASN1_ETYPE_SIZE)); +#line 239 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_INTEGER|CONST_MIN_MAX); + _asn1_set_down((yyval.node),_asn1_add_static_node(&e_list, ASN1_ETYPE_SIZE)); _asn1_set_value(_asn1_get_down((yyval.node)),(yyvsp[-1].str),strlen((yyvsp[-1].str))+1); _asn1_set_name(_asn1_get_down((yyval.node)),(yyvsp[-4].str));} -#line 1771 "ASN1.c" /* yacc.c:1646 */ +#line 1786 "ASN1.c" /* yacc.c:1652 */ break; case 40: -#line 235 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_BOOLEAN);} -#line 1777 "ASN1.c" /* yacc.c:1646 */ +#line 245 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_BOOLEAN);} +#line 1792 "ASN1.c" /* yacc.c:1652 */ break; case 41: -#line 238 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_UTC_TIME);} -#line 1783 "ASN1.c" /* yacc.c:1646 */ +#line 248 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_UTC_TIME);} +#line 1798 "ASN1.c" /* yacc.c:1652 */ break; case 42: -#line 239 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_GENERALIZED_TIME);} -#line 1789 "ASN1.c" /* yacc.c:1646 */ +#line 249 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_GENERALIZED_TIME);} +#line 1804 "ASN1.c" /* yacc.c:1652 */ break; case 43: -#line 242 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_SIZE|CONST_1_PARAM); +#line 252 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_SIZE|CONST_1_PARAM); _asn1_set_value((yyval.node),(yyvsp[-1].str),strlen((yyvsp[-1].str))+1);} -#line 1796 "ASN1.c" /* yacc.c:1646 */ +#line 1811 "ASN1.c" /* yacc.c:1652 */ break; case 44: -#line 245 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_SIZE|CONST_MIN_MAX); +#line 255 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_SIZE|CONST_MIN_MAX); _asn1_set_value((yyval.node),(yyvsp[-4].str),strlen((yyvsp[-4].str))+1); _asn1_set_name((yyval.node),(yyvsp[-1].str));} -#line 1804 "ASN1.c" /* yacc.c:1646 */ +#line 1819 "ASN1.c" /* yacc.c:1652 */ break; case 45: -#line 250 "ASN1.y" /* yacc.c:1646 */ +#line 260 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 1810 "ASN1.c" /* yacc.c:1646 */ +#line 1825 "ASN1.c" /* yacc.c:1652 */ break; case 46: -#line 251 "ASN1.y" /* yacc.c:1646 */ +#line 261 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[-1].node);} -#line 1816 "ASN1.c" /* yacc.c:1646 */ +#line 1831 "ASN1.c" /* yacc.c:1652 */ break; case 47: -#line 254 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_GENERALSTRING);} -#line 1822 "ASN1.c" /* yacc.c:1646 */ +#line 264 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_GENERALSTRING);} +#line 1837 "ASN1.c" /* yacc.c:1652 */ break; case 48: -#line 255 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_GENERALSTRING|CONST_SIZE); +#line 265 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_GENERALSTRING|CONST_SIZE); _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 1829 "ASN1.c" /* yacc.c:1646 */ +#line 1844 "ASN1.c" /* yacc.c:1652 */ break; case 49: -#line 259 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_NUMERIC_STRING|CONST_UNIVERSAL);} -#line 1835 "ASN1.c" /* yacc.c:1646 */ +#line 269 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_NUMERIC_STRING|CONST_UNIVERSAL);} +#line 1850 "ASN1.c" /* yacc.c:1652 */ break; case 50: -#line 260 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_NUMERIC_STRING|CONST_SIZE); +#line 270 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_NUMERIC_STRING|CONST_SIZE); _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 1842 "ASN1.c" /* yacc.c:1646 */ +#line 1857 "ASN1.c" /* yacc.c:1652 */ break; case 51: -#line 264 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_IA5_STRING);} -#line 1848 "ASN1.c" /* yacc.c:1646 */ +#line 274 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_IA5_STRING);} +#line 1863 "ASN1.c" /* yacc.c:1652 */ break; case 52: -#line 265 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_IA5_STRING|CONST_SIZE); +#line 275 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_IA5_STRING|CONST_SIZE); _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 1855 "ASN1.c" /* yacc.c:1646 */ +#line 1870 "ASN1.c" /* yacc.c:1652 */ break; case 53: -#line 269 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_TELETEX_STRING);} -#line 1861 "ASN1.c" /* yacc.c:1646 */ +#line 279 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_TELETEX_STRING);} +#line 1876 "ASN1.c" /* yacc.c:1652 */ break; case 54: -#line 270 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_TELETEX_STRING|CONST_SIZE); +#line 280 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_TELETEX_STRING|CONST_SIZE); _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 1868 "ASN1.c" /* yacc.c:1646 */ +#line 1883 "ASN1.c" /* yacc.c:1652 */ break; case 55: -#line 274 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_PRINTABLE_STRING);} -#line 1874 "ASN1.c" /* yacc.c:1646 */ +#line 284 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_PRINTABLE_STRING);} +#line 1889 "ASN1.c" /* yacc.c:1652 */ break; case 56: -#line 275 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_PRINTABLE_STRING|CONST_SIZE); +#line 285 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_PRINTABLE_STRING|CONST_SIZE); _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 1881 "ASN1.c" /* yacc.c:1646 */ +#line 1896 "ASN1.c" /* yacc.c:1652 */ break; case 57: -#line 279 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_UNIVERSAL_STRING);} -#line 1887 "ASN1.c" /* yacc.c:1646 */ +#line 289 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_UNIVERSAL_STRING);} +#line 1902 "ASN1.c" /* yacc.c:1652 */ break; case 58: -#line 280 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_UNIVERSAL_STRING|CONST_SIZE); +#line 290 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_UNIVERSAL_STRING|CONST_SIZE); _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 1894 "ASN1.c" /* yacc.c:1646 */ +#line 1909 "ASN1.c" /* yacc.c:1652 */ break; case 59: -#line 284 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_BMP_STRING);} -#line 1900 "ASN1.c" /* yacc.c:1646 */ +#line 294 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_BMP_STRING);} +#line 1915 "ASN1.c" /* yacc.c:1652 */ break; case 60: -#line 285 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_BMP_STRING|CONST_SIZE); +#line 295 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_BMP_STRING|CONST_SIZE); _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 1907 "ASN1.c" /* yacc.c:1646 */ +#line 1922 "ASN1.c" /* yacc.c:1652 */ break; case 61: -#line 289 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_UTF8_STRING);} -#line 1913 "ASN1.c" /* yacc.c:1646 */ +#line 299 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_UTF8_STRING);} +#line 1928 "ASN1.c" /* yacc.c:1652 */ break; case 62: -#line 290 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_UTF8_STRING|CONST_SIZE); +#line 300 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_UTF8_STRING|CONST_SIZE); _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 1920 "ASN1.c" /* yacc.c:1646 */ +#line 1935 "ASN1.c" /* yacc.c:1652 */ break; case 63: -#line 294 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_VISIBLE_STRING);} -#line 1926 "ASN1.c" /* yacc.c:1646 */ +#line 304 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_VISIBLE_STRING);} +#line 1941 "ASN1.c" /* yacc.c:1652 */ break; case 64: -#line 295 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_VISIBLE_STRING|CONST_SIZE); +#line 305 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_VISIBLE_STRING|CONST_SIZE); _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 1933 "ASN1.c" /* yacc.c:1646 */ +#line 1948 "ASN1.c" /* yacc.c:1652 */ break; case 65: -#line 299 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_OCTET_STRING);} -#line 1939 "ASN1.c" /* yacc.c:1646 */ +#line 309 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_OCTET_STRING);} +#line 1954 "ASN1.c" /* yacc.c:1652 */ break; case 66: -#line 300 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_OCTET_STRING|CONST_SIZE); +#line 310 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_OCTET_STRING|CONST_SIZE); _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 1946 "ASN1.c" /* yacc.c:1646 */ +#line 1961 "ASN1.c" /* yacc.c:1652 */ break; case 67: -#line 304 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_CONSTANT); +#line 314 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_CONSTANT); _asn1_set_name((yyval.node),(yyvsp[-3].str)); _asn1_set_value((yyval.node),(yyvsp[-1].str),strlen((yyvsp[-1].str))+1);} -#line 1954 "ASN1.c" /* yacc.c:1646 */ +#line 1969 "ASN1.c" /* yacc.c:1652 */ break; case 68: -#line 309 "ASN1.y" /* yacc.c:1646 */ +#line 319 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 1960 "ASN1.c" /* yacc.c:1646 */ +#line 1975 "ASN1.c" /* yacc.c:1652 */ break; case 69: -#line 310 "ASN1.y" /* yacc.c:1646 */ +#line 320 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[-2].node); _asn1_set_right(_asn1_get_last_right((yyvsp[-2].node)),(yyvsp[0].node));} -#line 1967 "ASN1.c" /* yacc.c:1646 */ +#line 1982 "ASN1.c" /* yacc.c:1652 */ break; case 70: -#line 314 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_BIT_STRING);} -#line 1973 "ASN1.c" /* yacc.c:1646 */ +#line 324 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_BIT_STRING);} +#line 1988 "ASN1.c" /* yacc.c:1652 */ break; case 71: -#line 315 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_BIT_STRING|CONST_SIZE);} -#line 1979 "ASN1.c" /* yacc.c:1646 */ +#line 325 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_BIT_STRING|CONST_SIZE);} +#line 1994 "ASN1.c" /* yacc.c:1652 */ break; case 72: -#line 317 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_BIT_STRING|CONST_LIST); +#line 327 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_BIT_STRING|CONST_LIST); _asn1_set_down((yyval.node),(yyvsp[-1].node));} -#line 1986 "ASN1.c" /* yacc.c:1646 */ +#line 2001 "ASN1.c" /* yacc.c:1652 */ break; case 73: -#line 322 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_ENUMERATED|CONST_LIST); +#line 332 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_ENUMERATED|CONST_LIST); _asn1_set_down((yyval.node),(yyvsp[-1].node));} -#line 1993 "ASN1.c" /* yacc.c:1646 */ +#line 2008 "ASN1.c" /* yacc.c:1652 */ break; case 74: -#line 327 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_OBJECT_ID);} -#line 1999 "ASN1.c" /* yacc.c:1646 */ +#line 337 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_OBJECT_ID);} +#line 2014 "ASN1.c" /* yacc.c:1652 */ break; case 75: -#line 330 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_IDENTIFIER); +#line 340 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_IDENTIFIER); _asn1_set_value((yyval.node),(yyvsp[0].str),strlen((yyvsp[0].str))+1);} -#line 2006 "ASN1.c" /* yacc.c:1646 */ +#line 2021 "ASN1.c" /* yacc.c:1652 */ break; case 76: -#line 332 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_IDENTIFIER|CONST_SIZE); +#line 342 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_IDENTIFIER|CONST_SIZE); _asn1_set_value((yyval.node),(yyvsp[-1].str),strlen((yyvsp[-1].str))+1); _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 2014 "ASN1.c" /* yacc.c:1646 */ +#line 2029 "ASN1.c" /* yacc.c:1652 */ break; case 77: -#line 335 "ASN1.y" /* yacc.c:1646 */ +#line 345 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 2020 "ASN1.c" /* yacc.c:1646 */ +#line 2035 "ASN1.c" /* yacc.c:1652 */ break; case 78: -#line 336 "ASN1.y" /* yacc.c:1646 */ +#line 346 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 2026 "ASN1.c" /* yacc.c:1646 */ +#line 2041 "ASN1.c" /* yacc.c:1652 */ break; case 79: -#line 337 "ASN1.y" /* yacc.c:1646 */ +#line 347 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 2032 "ASN1.c" /* yacc.c:1646 */ +#line 2047 "ASN1.c" /* yacc.c:1652 */ break; case 81: -#line 339 "ASN1.y" /* yacc.c:1646 */ +#line 349 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 2038 "ASN1.c" /* yacc.c:1646 */ +#line 2053 "ASN1.c" /* yacc.c:1652 */ break; case 82: -#line 340 "ASN1.y" /* yacc.c:1646 */ +#line 350 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 2044 "ASN1.c" /* yacc.c:1646 */ +#line 2059 "ASN1.c" /* yacc.c:1652 */ break; case 83: -#line 341 "ASN1.y" /* yacc.c:1646 */ +#line 351 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 2050 "ASN1.c" /* yacc.c:1646 */ +#line 2065 "ASN1.c" /* yacc.c:1652 */ break; case 84: -#line 342 "ASN1.y" /* yacc.c:1646 */ +#line 352 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 2056 "ASN1.c" /* yacc.c:1646 */ +#line 2071 "ASN1.c" /* yacc.c:1652 */ break; case 85: -#line 343 "ASN1.y" /* yacc.c:1646 */ +#line 353 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 2062 "ASN1.c" /* yacc.c:1646 */ +#line 2077 "ASN1.c" /* yacc.c:1652 */ break; case 86: -#line 344 "ASN1.y" /* yacc.c:1646 */ +#line 354 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 2068 "ASN1.c" /* yacc.c:1646 */ +#line 2083 "ASN1.c" /* yacc.c:1652 */ break; case 87: -#line 345 "ASN1.y" /* yacc.c:1646 */ +#line 355 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 2074 "ASN1.c" /* yacc.c:1646 */ +#line 2089 "ASN1.c" /* yacc.c:1652 */ break; case 88: -#line 346 "ASN1.y" /* yacc.c:1646 */ +#line 356 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 2080 "ASN1.c" /* yacc.c:1646 */ +#line 2095 "ASN1.c" /* yacc.c:1652 */ break; case 89: -#line 347 "ASN1.y" /* yacc.c:1646 */ +#line 357 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 2086 "ASN1.c" /* yacc.c:1646 */ +#line 2101 "ASN1.c" /* yacc.c:1652 */ break; case 90: -#line 348 "ASN1.y" /* yacc.c:1646 */ +#line 358 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 2092 "ASN1.c" /* yacc.c:1646 */ +#line 2107 "ASN1.c" /* yacc.c:1652 */ break; case 91: -#line 349 "ASN1.y" /* yacc.c:1646 */ +#line 359 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 2098 "ASN1.c" /* yacc.c:1646 */ +#line 2113 "ASN1.c" /* yacc.c:1652 */ break; case 92: -#line 350 "ASN1.y" /* yacc.c:1646 */ +#line 360 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 2104 "ASN1.c" /* yacc.c:1646 */ +#line 2119 "ASN1.c" /* yacc.c:1652 */ break; case 93: -#line 351 "ASN1.y" /* yacc.c:1646 */ +#line 361 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 2110 "ASN1.c" /* yacc.c:1646 */ +#line 2125 "ASN1.c" /* yacc.c:1652 */ break; case 94: -#line 352 "ASN1.y" /* yacc.c:1646 */ +#line 362 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 2116 "ASN1.c" /* yacc.c:1646 */ +#line 2131 "ASN1.c" /* yacc.c:1652 */ break; case 95: -#line 353 "ASN1.y" /* yacc.c:1646 */ +#line 363 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 2122 "ASN1.c" /* yacc.c:1646 */ +#line 2137 "ASN1.c" /* yacc.c:1652 */ break; case 96: -#line 354 "ASN1.y" /* yacc.c:1646 */ +#line 364 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 2128 "ASN1.c" /* yacc.c:1646 */ +#line 2143 "ASN1.c" /* yacc.c:1652 */ break; case 97: -#line 355 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_NULL);} -#line 2134 "ASN1.c" /* yacc.c:1646 */ +#line 365 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_NULL);} +#line 2149 "ASN1.c" /* yacc.c:1652 */ break; case 98: -#line 358 "ASN1.y" /* yacc.c:1646 */ +#line 368 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 2140 "ASN1.c" /* yacc.c:1646 */ +#line 2155 "ASN1.c" /* yacc.c:1652 */ break; case 99: -#line 359 "ASN1.y" /* yacc.c:1646 */ +#line 369 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=_asn1_mod_type((yyvsp[0].node),CONST_TAG); _asn1_set_right((yyvsp[-1].node),_asn1_get_down((yyval.node))); _asn1_set_down((yyval.node),(yyvsp[-1].node));} -#line 2148 "ASN1.c" /* yacc.c:1646 */ +#line 2163 "ASN1.c" /* yacc.c:1652 */ break; case 100: -#line 364 "ASN1.y" /* yacc.c:1646 */ +#line 374 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 2154 "ASN1.c" /* yacc.c:1646 */ +#line 2169 "ASN1.c" /* yacc.c:1652 */ break; case 101: -#line 365 "ASN1.y" /* yacc.c:1646 */ +#line 375 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=_asn1_mod_type((yyvsp[-1].node),CONST_DEFAULT); _asn1_set_right((yyvsp[0].node),_asn1_get_down((yyval.node))); _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 2162 "ASN1.c" /* yacc.c:1646 */ +#line 2177 "ASN1.c" /* yacc.c:1652 */ break; case 102: -#line 368 "ASN1.y" /* yacc.c:1646 */ +#line 378 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=_asn1_mod_type((yyvsp[-1].node),CONST_OPTION);} -#line 2168 "ASN1.c" /* yacc.c:1646 */ +#line 2183 "ASN1.c" /* yacc.c:1652 */ break; case 103: -#line 371 "ASN1.y" /* yacc.c:1646 */ +#line 381 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=_asn1_set_name((yyvsp[0].node),(yyvsp[-1].str));} -#line 2174 "ASN1.c" /* yacc.c:1646 */ +#line 2189 "ASN1.c" /* yacc.c:1652 */ break; case 104: -#line 374 "ASN1.y" /* yacc.c:1646 */ +#line 384 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 2180 "ASN1.c" /* yacc.c:1646 */ +#line 2195 "ASN1.c" /* yacc.c:1652 */ break; case 105: -#line 375 "ASN1.y" /* yacc.c:1646 */ +#line 385 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[-2].node); _asn1_set_right(_asn1_get_last_right((yyvsp[-2].node)),(yyvsp[0].node));} -#line 2187 "ASN1.c" /* yacc.c:1646 */ +#line 2202 "ASN1.c" /* yacc.c:1652 */ break; case 106: -#line 379 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_SEQUENCE); +#line 389 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_SEQUENCE); _asn1_set_down((yyval.node),(yyvsp[-1].node));} -#line 2194 "ASN1.c" /* yacc.c:1646 */ +#line 2209 "ASN1.c" /* yacc.c:1652 */ break; case 107: -#line 381 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_SEQUENCE_OF); +#line 391 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_SEQUENCE_OF); _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 2201 "ASN1.c" /* yacc.c:1646 */ +#line 2216 "ASN1.c" /* yacc.c:1652 */ break; case 108: -#line 383 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_SEQUENCE_OF|CONST_SIZE); +#line 393 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_SEQUENCE_OF|CONST_SIZE); _asn1_set_right((yyvsp[-2].node),(yyvsp[0].node)); _asn1_set_down((yyval.node),(yyvsp[-2].node));} -#line 2209 "ASN1.c" /* yacc.c:1646 */ +#line 2224 "ASN1.c" /* yacc.c:1652 */ break; case 109: -#line 388 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_SET); +#line 398 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_SET); _asn1_set_down((yyval.node),(yyvsp[-1].node));} -#line 2216 "ASN1.c" /* yacc.c:1646 */ +#line 2231 "ASN1.c" /* yacc.c:1652 */ break; case 110: -#line 390 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_SET_OF); +#line 400 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_SET_OF); _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 2223 "ASN1.c" /* yacc.c:1646 */ +#line 2238 "ASN1.c" /* yacc.c:1652 */ break; case 111: -#line 392 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_SET_OF|CONST_SIZE); +#line 402 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_SET_OF|CONST_SIZE); _asn1_set_right((yyvsp[-2].node),(yyvsp[0].node)); _asn1_set_down((yyval.node),(yyvsp[-2].node));} -#line 2231 "ASN1.c" /* yacc.c:1646 */ +#line 2246 "ASN1.c" /* yacc.c:1652 */ break; case 112: -#line 397 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_CHOICE); +#line 407 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_CHOICE); _asn1_set_down((yyval.node),(yyvsp[-1].node));} -#line 2238 "ASN1.c" /* yacc.c:1646 */ +#line 2253 "ASN1.c" /* yacc.c:1652 */ break; case 113: -#line 401 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_ANY);} -#line 2244 "ASN1.c" /* yacc.c:1646 */ +#line 411 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_ANY);} +#line 2259 "ASN1.c" /* yacc.c:1652 */ break; case 114: -#line 402 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_ANY|CONST_DEFINED_BY); - _asn1_set_down((yyval.node),_asn1_add_static_node(ASN1_ETYPE_CONSTANT)); +#line 412 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_ANY|CONST_DEFINED_BY); + _asn1_set_down((yyval.node),_asn1_add_static_node(&e_list, ASN1_ETYPE_CONSTANT)); _asn1_set_name(_asn1_get_down((yyval.node)),(yyvsp[0].str));} -#line 2252 "ASN1.c" /* yacc.c:1646 */ +#line 2267 "ASN1.c" /* yacc.c:1652 */ break; case 115: -#line 407 "ASN1.y" /* yacc.c:1646 */ +#line 417 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=_asn1_set_name((yyvsp[0].node),(yyvsp[-2].str));} -#line 2258 "ASN1.c" /* yacc.c:1646 */ +#line 2273 "ASN1.c" /* yacc.c:1652 */ break; case 116: -#line 409 "ASN1.y" /* yacc.c:1646 */ +#line 419 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=_asn1_set_name((yyvsp[0].node), last_error_token);} -#line 2264 "ASN1.c" /* yacc.c:1646 */ +#line 2279 "ASN1.c" /* yacc.c:1652 */ break; case 117: -#line 413 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_OBJECT_ID|CONST_ASSIGN); +#line 423 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_OBJECT_ID|CONST_ASSIGN); _asn1_set_name((yyval.node),(yyvsp[-6].str)); _asn1_set_down((yyval.node),(yyvsp[-1].node));} -#line 2272 "ASN1.c" /* yacc.c:1646 */ +#line 2287 "ASN1.c" /* yacc.c:1652 */ break; case 118: -#line 417 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_OBJECT_ID|CONST_ASSIGN|CONST_1_PARAM); +#line 427 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_OBJECT_ID|CONST_ASSIGN|CONST_1_PARAM); _asn1_set_name((yyval.node),(yyvsp[-5].str)); _asn1_set_value((yyval.node),(yyvsp[-4].str),strlen((yyvsp[-4].str))+1); _asn1_set_down((yyval.node),(yyvsp[-1].node));} -#line 2281 "ASN1.c" /* yacc.c:1646 */ +#line 2296 "ASN1.c" /* yacc.c:1652 */ break; case 119: -#line 422 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_INTEGER|CONST_ASSIGN); +#line 432 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_INTEGER|CONST_ASSIGN); _asn1_set_name((yyval.node),(yyvsp[-3].str)); _asn1_set_value((yyval.node),(yyvsp[0].str),strlen((yyvsp[0].str))+1);} -#line 2289 "ASN1.c" /* yacc.c:1646 */ +#line 2304 "ASN1.c" /* yacc.c:1652 */ break; case 120: -#line 427 "ASN1.y" /* yacc.c:1646 */ +#line 437 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 2295 "ASN1.c" /* yacc.c:1646 */ +#line 2310 "ASN1.c" /* yacc.c:1652 */ break; case 121: -#line 428 "ASN1.y" /* yacc.c:1646 */ +#line 438 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 2301 "ASN1.c" /* yacc.c:1646 */ +#line 2316 "ASN1.c" /* yacc.c:1652 */ break; case 122: -#line 431 "ASN1.y" /* yacc.c:1646 */ +#line 441 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[0].node);} -#line 2307 "ASN1.c" /* yacc.c:1646 */ +#line 2322 "ASN1.c" /* yacc.c:1652 */ break; case 123: -#line 432 "ASN1.y" /* yacc.c:1646 */ +#line 442 "ASN1.y" /* yacc.c:1652 */ {(yyval.node)=(yyvsp[-1].node); _asn1_set_right(_asn1_get_last_right((yyvsp[-1].node)),(yyvsp[0].node));} -#line 2314 "ASN1.c" /* yacc.c:1646 */ +#line 2329 "ASN1.c" /* yacc.c:1652 */ break; case 124: -#line 436 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_OBJECT_ID); +#line 446 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_OBJECT_ID); _asn1_set_down((yyval.node),(yyvsp[-1].node)); _asn1_set_name((yyval.node),(yyvsp[-3].str));} -#line 2322 "ASN1.c" /* yacc.c:1646 */ +#line 2337 "ASN1.c" /* yacc.c:1652 */ break; case 125: -#line 439 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_OBJECT_ID); +#line 449 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_OBJECT_ID); _asn1_set_name((yyval.node),(yyvsp[-2].str));} -#line 2329 "ASN1.c" /* yacc.c:1646 */ +#line 2344 "ASN1.c" /* yacc.c:1652 */ break; case 126: -#line 441 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_OBJECT_ID); +#line 451 "ASN1.y" /* yacc.c:1652 */ + {(yyval.node)=_asn1_add_static_node(&e_list, ASN1_ETYPE_OBJECT_ID); _asn1_set_name((yyval.node),(yyvsp[0].str));} -#line 2336 "ASN1.c" /* yacc.c:1646 */ +#line 2351 "ASN1.c" /* yacc.c:1652 */ break; case 127: -#line 465 "ASN1.y" /* yacc.c:1646 */ +#line 475 "ASN1.y" /* yacc.c:1652 */ {(yyval.constant)=CONST_EXPLICIT;} -#line 2342 "ASN1.c" /* yacc.c:1646 */ +#line 2357 "ASN1.c" /* yacc.c:1652 */ break; case 128: -#line 466 "ASN1.y" /* yacc.c:1646 */ +#line 476 "ASN1.y" /* yacc.c:1652 */ {(yyval.constant)=CONST_IMPLICIT;} -#line 2348 "ASN1.c" /* yacc.c:1646 */ +#line 2363 "ASN1.c" /* yacc.c:1652 */ break; -#line 2352 "ASN1.c" /* yacc.c:1646 */ +#line 2367 "ASN1.c" /* yacc.c:1652 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -2373,14 +2388,13 @@ yyreduce: /* 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. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; + { + const int yylhs = yyr1[yyn] - YYNTOKENS; + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp + ? yytable[yyi] + : yydefgoto[yylhs]); + } goto yynewstate; @@ -2463,12 +2477,10 @@ yyerrlab: | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; + /* Pacify compilers when the user code never invokes YYERROR and the + label yyerrorlab therefore never appears in user code. */ + if (0) + YYERROR; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ @@ -2530,6 +2542,7 @@ yyacceptlab: yyresult = 0; goto yyreturn; + /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ @@ -2537,6 +2550,7 @@ yyabortlab: yyresult = 1; goto yyreturn; + #if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | @@ -2547,6 +2561,10 @@ yyexhaustedlab: /* Fall through. */ #endif + +/*-----------------------------------------------------. +| yyreturn -- parsing is finished, return the result. | +`-----------------------------------------------------*/ yyreturn: if (yychar != YYEMPTY) { @@ -2576,7 +2594,7 @@ yyreturn: #endif return yyresult; } -#line 470 "ASN1.y" /* yacc.c:1906 */ +#line 480 "ASN1.y" /* yacc.c:1918 */ @@ -2807,23 +2825,33 @@ asn1_parser2tree (const char *file, asn1_node * definitions, if (result_parse == ASN1_SUCCESS) { /* all identifier defined */ /* Delete the list and keep the ASN1 structure */ - _asn1_delete_list (); + _asn1_delete_list (e_list); + e_list = NULL; /* Convert into DER coding the value assign to INTEGER constants */ _asn1_change_integer_value (p_tree); /* Expand the IDs of OBJECT IDENTIFIER constants */ - _asn1_expand_object_id (p_tree); + result_parse = _asn1_expand_object_id (e_list, p_tree); + if (result_parse != ASN1_SUCCESS) + goto error; *definitions = p_tree; } else /* some identifiers not defined */ - /* Delete the list and the ASN1 structure */ - _asn1_delete_list_and_nodes (); + { + /* Delete the list and the ASN1 structure */ + _asn1_delete_list_and_nodes (e_list); + e_list = NULL; + } } else /* syntax error */ - /* Delete the list and the ASN1 structure */ - _asn1_delete_list_and_nodes (); + { + /* Delete the list and the ASN1 structure */ + _asn1_delete_list_and_nodes (e_list); + e_list = NULL; + } } + error: _asn1_create_errorDescription (result_parse, error_desc); return result_parse; @@ -2914,7 +2942,7 @@ asn1_parser2array (const char *inputFileName, const char *outputFileName, { /* file_out_name = inputFileName + _asn1_tab.c */ file_out_name = malloc (dot_p - inputFileName + 1 + - strlen ("_asn1_tab.c")); + sizeof ("_asn1_tab.c")-1); memcpy (file_out_name, inputFileName, dot_p - inputFileName); file_out_name[dot_p - inputFileName] = 0; @@ -2930,12 +2958,20 @@ asn1_parser2array (const char *inputFileName, const char *outputFileName, if (vectorName == NULL) { + unsigned len, i; /* vector_name = file name + _asn1_tab */ vector_name = malloc (dot_p - slash_p + 1 + - strlen ("_asn1_tab")); + sizeof("_asn1_tab") - 1); memcpy (vector_name, slash_p, dot_p - slash_p); vector_name[dot_p - slash_p] = 0; strcat (vector_name, "_asn1_tab"); + + len = strlen(vector_name); + for (i=0;i<len;i++) + { + if (vector_name[i] == '-') + vector_name[i] = '_'; + } } else { @@ -2954,7 +2990,8 @@ asn1_parser2array (const char *inputFileName, const char *outputFileName, } /* result == OK */ /* Delete the list and the ASN1 structure */ - _asn1_delete_list_and_nodes (); + _asn1_delete_list_and_nodes (e_list); + e_list = NULL; } /* inputFile exist */ _asn1_create_errorDescription (result_parse, error_desc); |