1ae771770SStanislav Sedov /* A Bison parser, made by GNU Bison 2.3. */ 2ae771770SStanislav Sedov 3ae771770SStanislav Sedov /* Skeleton implementation for Bison's Yacc-like parsers in C 4ae771770SStanislav Sedov 5ae771770SStanislav Sedov Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 6ae771770SStanislav Sedov Free Software Foundation, Inc. 7ae771770SStanislav Sedov 8ae771770SStanislav Sedov This program is free software; you can redistribute it and/or modify 9ae771770SStanislav Sedov it under the terms of the GNU General Public License as published by 10ae771770SStanislav Sedov the Free Software Foundation; either version 2, or (at your option) 11ae771770SStanislav Sedov any later version. 12ae771770SStanislav Sedov 13ae771770SStanislav Sedov This program is distributed in the hope that it will be useful, 14ae771770SStanislav Sedov but WITHOUT ANY WARRANTY; without even the implied warranty of 15ae771770SStanislav Sedov MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16ae771770SStanislav Sedov GNU General Public License for more details. 17ae771770SStanislav Sedov 18ae771770SStanislav Sedov You should have received a copy of the GNU General Public License 19ae771770SStanislav Sedov along with this program; if not, write to the Free Software 20ae771770SStanislav Sedov Foundation, Inc., 51 Franklin Street, Fifth Floor, 21ae771770SStanislav Sedov Boston, MA 02110-1301, USA. */ 22ae771770SStanislav Sedov 23ae771770SStanislav Sedov /* As a special exception, you may create a larger work that contains 24ae771770SStanislav Sedov part or all of the Bison parser skeleton and distribute that work 25ae771770SStanislav Sedov under terms of your choice, so long as that work isn't itself a 26ae771770SStanislav Sedov parser generator using the skeleton or a modified version thereof 27ae771770SStanislav Sedov as a parser skeleton. Alternatively, if you modify or redistribute 28ae771770SStanislav Sedov the parser skeleton itself, you may (at your option) remove this 29ae771770SStanislav Sedov special exception, which will cause the skeleton and the resulting 30ae771770SStanislav Sedov Bison output files to be licensed under the GNU General Public 31ae771770SStanislav Sedov License without this special exception. 32ae771770SStanislav Sedov 33ae771770SStanislav Sedov This special exception was added by the Free Software Foundation in 34ae771770SStanislav Sedov version 2.2 of Bison. */ 35ae771770SStanislav Sedov 36ae771770SStanislav Sedov /* C LALR(1) parser skeleton written by Richard Stallman, by 37ae771770SStanislav Sedov simplifying the original so-called "semantic" parser. */ 38ae771770SStanislav Sedov 39ae771770SStanislav Sedov /* All symbols defined below should begin with yy or YY, to avoid 40ae771770SStanislav Sedov infringing on user name space. This should be done even for local 41ae771770SStanislav Sedov variables, as they might otherwise be expanded by user macros. 42ae771770SStanislav Sedov There are some unavoidable exceptions within include files to 43ae771770SStanislav Sedov define necessary library symbols; they are noted "INFRINGES ON 44ae771770SStanislav Sedov USER NAME SPACE" below. */ 45ae771770SStanislav Sedov 46ae771770SStanislav Sedov /* Identify Bison output. */ 47ae771770SStanislav Sedov #define YYBISON 1 48ae771770SStanislav Sedov 49ae771770SStanislav Sedov /* Bison version. */ 50ae771770SStanislav Sedov #define YYBISON_VERSION "2.3" 51ae771770SStanislav Sedov 52ae771770SStanislav Sedov /* Skeleton name. */ 53ae771770SStanislav Sedov #define YYSKELETON_NAME "yacc.c" 54ae771770SStanislav Sedov 55ae771770SStanislav Sedov /* Pure parsers. */ 56ae771770SStanislav Sedov #define YYPURE 0 57ae771770SStanislav Sedov 58ae771770SStanislav Sedov /* Using locations. */ 59ae771770SStanislav Sedov #define YYLSP_NEEDED 0 60ae771770SStanislav Sedov 61ae771770SStanislav Sedov 62ae771770SStanislav Sedov 63ae771770SStanislav Sedov /* Tokens. */ 64ae771770SStanislav Sedov #ifndef YYTOKENTYPE 65ae771770SStanislav Sedov # define YYTOKENTYPE 66ae771770SStanislav Sedov /* Put the tokens into the symbol table, so that GDB and other debuggers 67ae771770SStanislav Sedov know about them. */ 68ae771770SStanislav Sedov enum yytokentype { 69ae771770SStanislav Sedov kw_ABSENT = 258, 70ae771770SStanislav Sedov kw_ABSTRACT_SYNTAX = 259, 71ae771770SStanislav Sedov kw_ALL = 260, 72ae771770SStanislav Sedov kw_APPLICATION = 261, 73ae771770SStanislav Sedov kw_AUTOMATIC = 262, 74ae771770SStanislav Sedov kw_BEGIN = 263, 75ae771770SStanislav Sedov kw_BIT = 264, 76ae771770SStanislav Sedov kw_BMPString = 265, 77ae771770SStanislav Sedov kw_BOOLEAN = 266, 78ae771770SStanislav Sedov kw_BY = 267, 79ae771770SStanislav Sedov kw_CHARACTER = 268, 80ae771770SStanislav Sedov kw_CHOICE = 269, 81ae771770SStanislav Sedov kw_CLASS = 270, 82ae771770SStanislav Sedov kw_COMPONENT = 271, 83ae771770SStanislav Sedov kw_COMPONENTS = 272, 84ae771770SStanislav Sedov kw_CONSTRAINED = 273, 85ae771770SStanislav Sedov kw_CONTAINING = 274, 86ae771770SStanislav Sedov kw_DEFAULT = 275, 87ae771770SStanislav Sedov kw_DEFINITIONS = 276, 88ae771770SStanislav Sedov kw_EMBEDDED = 277, 89ae771770SStanislav Sedov kw_ENCODED = 278, 90ae771770SStanislav Sedov kw_END = 279, 91ae771770SStanislav Sedov kw_ENUMERATED = 280, 92ae771770SStanislav Sedov kw_EXCEPT = 281, 93ae771770SStanislav Sedov kw_EXPLICIT = 282, 94ae771770SStanislav Sedov kw_EXPORTS = 283, 95ae771770SStanislav Sedov kw_EXTENSIBILITY = 284, 96ae771770SStanislav Sedov kw_EXTERNAL = 285, 97ae771770SStanislav Sedov kw_FALSE = 286, 98ae771770SStanislav Sedov kw_FROM = 287, 99ae771770SStanislav Sedov kw_GeneralString = 288, 100ae771770SStanislav Sedov kw_GeneralizedTime = 289, 101ae771770SStanislav Sedov kw_GraphicString = 290, 102ae771770SStanislav Sedov kw_IA5String = 291, 103ae771770SStanislav Sedov kw_IDENTIFIER = 292, 104ae771770SStanislav Sedov kw_IMPLICIT = 293, 105ae771770SStanislav Sedov kw_IMPLIED = 294, 106ae771770SStanislav Sedov kw_IMPORTS = 295, 107ae771770SStanislav Sedov kw_INCLUDES = 296, 108ae771770SStanislav Sedov kw_INSTANCE = 297, 109ae771770SStanislav Sedov kw_INTEGER = 298, 110ae771770SStanislav Sedov kw_INTERSECTION = 299, 111ae771770SStanislav Sedov kw_ISO646String = 300, 112ae771770SStanislav Sedov kw_MAX = 301, 113ae771770SStanislav Sedov kw_MIN = 302, 114ae771770SStanislav Sedov kw_MINUS_INFINITY = 303, 115ae771770SStanislav Sedov kw_NULL = 304, 116ae771770SStanislav Sedov kw_NumericString = 305, 117ae771770SStanislav Sedov kw_OBJECT = 306, 118ae771770SStanislav Sedov kw_OCTET = 307, 119ae771770SStanislav Sedov kw_OF = 308, 120ae771770SStanislav Sedov kw_OPTIONAL = 309, 121ae771770SStanislav Sedov kw_ObjectDescriptor = 310, 122ae771770SStanislav Sedov kw_PATTERN = 311, 123ae771770SStanislav Sedov kw_PDV = 312, 124ae771770SStanislav Sedov kw_PLUS_INFINITY = 313, 125ae771770SStanislav Sedov kw_PRESENT = 314, 126ae771770SStanislav Sedov kw_PRIVATE = 315, 127ae771770SStanislav Sedov kw_PrintableString = 316, 128ae771770SStanislav Sedov kw_REAL = 317, 129ae771770SStanislav Sedov kw_RELATIVE_OID = 318, 130ae771770SStanislav Sedov kw_SEQUENCE = 319, 131ae771770SStanislav Sedov kw_SET = 320, 132ae771770SStanislav Sedov kw_SIZE = 321, 133ae771770SStanislav Sedov kw_STRING = 322, 134ae771770SStanislav Sedov kw_SYNTAX = 323, 135ae771770SStanislav Sedov kw_T61String = 324, 136ae771770SStanislav Sedov kw_TAGS = 325, 137ae771770SStanislav Sedov kw_TRUE = 326, 138ae771770SStanislav Sedov kw_TYPE_IDENTIFIER = 327, 139ae771770SStanislav Sedov kw_TeletexString = 328, 140ae771770SStanislav Sedov kw_UNION = 329, 141ae771770SStanislav Sedov kw_UNIQUE = 330, 142ae771770SStanislav Sedov kw_UNIVERSAL = 331, 143ae771770SStanislav Sedov kw_UTCTime = 332, 144ae771770SStanislav Sedov kw_UTF8String = 333, 145ae771770SStanislav Sedov kw_UniversalString = 334, 146ae771770SStanislav Sedov kw_VideotexString = 335, 147ae771770SStanislav Sedov kw_VisibleString = 336, 148ae771770SStanislav Sedov kw_WITH = 337, 149ae771770SStanislav Sedov RANGE = 338, 150ae771770SStanislav Sedov EEQUAL = 339, 151ae771770SStanislav Sedov ELLIPSIS = 340, 152ae771770SStanislav Sedov IDENTIFIER = 341, 153ae771770SStanislav Sedov referencename = 342, 154ae771770SStanislav Sedov STRING = 343, 155ae771770SStanislav Sedov NUMBER = 344 156ae771770SStanislav Sedov }; 157ae771770SStanislav Sedov #endif 158ae771770SStanislav Sedov /* Tokens. */ 159ae771770SStanislav Sedov #define kw_ABSENT 258 160ae771770SStanislav Sedov #define kw_ABSTRACT_SYNTAX 259 161ae771770SStanislav Sedov #define kw_ALL 260 162ae771770SStanislav Sedov #define kw_APPLICATION 261 163ae771770SStanislav Sedov #define kw_AUTOMATIC 262 164ae771770SStanislav Sedov #define kw_BEGIN 263 165ae771770SStanislav Sedov #define kw_BIT 264 166ae771770SStanislav Sedov #define kw_BMPString 265 167ae771770SStanislav Sedov #define kw_BOOLEAN 266 168ae771770SStanislav Sedov #define kw_BY 267 169ae771770SStanislav Sedov #define kw_CHARACTER 268 170ae771770SStanislav Sedov #define kw_CHOICE 269 171ae771770SStanislav Sedov #define kw_CLASS 270 172ae771770SStanislav Sedov #define kw_COMPONENT 271 173ae771770SStanislav Sedov #define kw_COMPONENTS 272 174ae771770SStanislav Sedov #define kw_CONSTRAINED 273 175ae771770SStanislav Sedov #define kw_CONTAINING 274 176ae771770SStanislav Sedov #define kw_DEFAULT 275 177ae771770SStanislav Sedov #define kw_DEFINITIONS 276 178ae771770SStanislav Sedov #define kw_EMBEDDED 277 179ae771770SStanislav Sedov #define kw_ENCODED 278 180ae771770SStanislav Sedov #define kw_END 279 181ae771770SStanislav Sedov #define kw_ENUMERATED 280 182ae771770SStanislav Sedov #define kw_EXCEPT 281 183ae771770SStanislav Sedov #define kw_EXPLICIT 282 184ae771770SStanislav Sedov #define kw_EXPORTS 283 185ae771770SStanislav Sedov #define kw_EXTENSIBILITY 284 186ae771770SStanislav Sedov #define kw_EXTERNAL 285 187ae771770SStanislav Sedov #define kw_FALSE 286 188ae771770SStanislav Sedov #define kw_FROM 287 189ae771770SStanislav Sedov #define kw_GeneralString 288 190ae771770SStanislav Sedov #define kw_GeneralizedTime 289 191ae771770SStanislav Sedov #define kw_GraphicString 290 192ae771770SStanislav Sedov #define kw_IA5String 291 193ae771770SStanislav Sedov #define kw_IDENTIFIER 292 194ae771770SStanislav Sedov #define kw_IMPLICIT 293 195ae771770SStanislav Sedov #define kw_IMPLIED 294 196ae771770SStanislav Sedov #define kw_IMPORTS 295 197ae771770SStanislav Sedov #define kw_INCLUDES 296 198ae771770SStanislav Sedov #define kw_INSTANCE 297 199ae771770SStanislav Sedov #define kw_INTEGER 298 200ae771770SStanislav Sedov #define kw_INTERSECTION 299 201ae771770SStanislav Sedov #define kw_ISO646String 300 202ae771770SStanislav Sedov #define kw_MAX 301 203ae771770SStanislav Sedov #define kw_MIN 302 204ae771770SStanislav Sedov #define kw_MINUS_INFINITY 303 205ae771770SStanislav Sedov #define kw_NULL 304 206ae771770SStanislav Sedov #define kw_NumericString 305 207ae771770SStanislav Sedov #define kw_OBJECT 306 208ae771770SStanislav Sedov #define kw_OCTET 307 209ae771770SStanislav Sedov #define kw_OF 308 210ae771770SStanislav Sedov #define kw_OPTIONAL 309 211ae771770SStanislav Sedov #define kw_ObjectDescriptor 310 212ae771770SStanislav Sedov #define kw_PATTERN 311 213ae771770SStanislav Sedov #define kw_PDV 312 214ae771770SStanislav Sedov #define kw_PLUS_INFINITY 313 215ae771770SStanislav Sedov #define kw_PRESENT 314 216ae771770SStanislav Sedov #define kw_PRIVATE 315 217ae771770SStanislav Sedov #define kw_PrintableString 316 218ae771770SStanislav Sedov #define kw_REAL 317 219ae771770SStanislav Sedov #define kw_RELATIVE_OID 318 220ae771770SStanislav Sedov #define kw_SEQUENCE 319 221ae771770SStanislav Sedov #define kw_SET 320 222ae771770SStanislav Sedov #define kw_SIZE 321 223ae771770SStanislav Sedov #define kw_STRING 322 224ae771770SStanislav Sedov #define kw_SYNTAX 323 225ae771770SStanislav Sedov #define kw_T61String 324 226ae771770SStanislav Sedov #define kw_TAGS 325 227ae771770SStanislav Sedov #define kw_TRUE 326 228ae771770SStanislav Sedov #define kw_TYPE_IDENTIFIER 327 229ae771770SStanislav Sedov #define kw_TeletexString 328 230ae771770SStanislav Sedov #define kw_UNION 329 231ae771770SStanislav Sedov #define kw_UNIQUE 330 232ae771770SStanislav Sedov #define kw_UNIVERSAL 331 233ae771770SStanislav Sedov #define kw_UTCTime 332 234ae771770SStanislav Sedov #define kw_UTF8String 333 235ae771770SStanislav Sedov #define kw_UniversalString 334 236ae771770SStanislav Sedov #define kw_VideotexString 335 237ae771770SStanislav Sedov #define kw_VisibleString 336 238ae771770SStanislav Sedov #define kw_WITH 337 239ae771770SStanislav Sedov #define RANGE 338 240ae771770SStanislav Sedov #define EEQUAL 339 241ae771770SStanislav Sedov #define ELLIPSIS 340 242ae771770SStanislav Sedov #define IDENTIFIER 341 243ae771770SStanislav Sedov #define referencename 342 244ae771770SStanislav Sedov #define STRING 343 245ae771770SStanislav Sedov #define NUMBER 344 246ae771770SStanislav Sedov 247ae771770SStanislav Sedov 248ae771770SStanislav Sedov 249ae771770SStanislav Sedov 250ae771770SStanislav Sedov /* Copy the first part of user declarations. */ 251ae771770SStanislav Sedov #line 38 "asn1parse.y" 252ae771770SStanislav Sedov 253ae771770SStanislav Sedov 254ae771770SStanislav Sedov #include <config.h> 255ae771770SStanislav Sedov 256ae771770SStanislav Sedov #include <stdio.h> 257ae771770SStanislav Sedov #include <stdlib.h> 258ae771770SStanislav Sedov #include <string.h> 259ae771770SStanislav Sedov #include "symbol.h" 260ae771770SStanislav Sedov #include "lex.h" 261ae771770SStanislav Sedov #include "gen_locl.h" 262ae771770SStanislav Sedov #include "der.h" 263ae771770SStanislav Sedov 264ae771770SStanislav Sedov RCSID("$Id$"); 265ae771770SStanislav Sedov 266ae771770SStanislav Sedov static Type *new_type (Typetype t); 267ae771770SStanislav Sedov static struct constraint_spec *new_constraint_spec(enum ctype); 268ae771770SStanislav Sedov static Type *new_tag(int tagclass, int tagvalue, int tagenv, Type *oldtype); 269ae771770SStanislav Sedov void yyerror (const char *); 270ae771770SStanislav Sedov static struct objid *new_objid(const char *label, int value); 271ae771770SStanislav Sedov static void add_oid_to_tail(struct objid *, struct objid *); 272ae771770SStanislav Sedov static void fix_labels(Symbol *s); 273ae771770SStanislav Sedov 274ae771770SStanislav Sedov struct string_list { 275ae771770SStanislav Sedov char *string; 276ae771770SStanislav Sedov struct string_list *next; 277ae771770SStanislav Sedov }; 278ae771770SStanislav Sedov 279ae771770SStanislav Sedov /* Declarations for Bison */ 280ae771770SStanislav Sedov #define YYMALLOC malloc 281ae771770SStanislav Sedov #define YYFREE free 282ae771770SStanislav Sedov 283ae771770SStanislav Sedov 284ae771770SStanislav Sedov 285ae771770SStanislav Sedov /* Enabling traces. */ 286ae771770SStanislav Sedov #ifndef YYDEBUG 287ae771770SStanislav Sedov # define YYDEBUG 1 288ae771770SStanislav Sedov #endif 289ae771770SStanislav Sedov 290ae771770SStanislav Sedov /* Enabling verbose error messages. */ 291ae771770SStanislav Sedov #ifdef YYERROR_VERBOSE 292ae771770SStanislav Sedov # undef YYERROR_VERBOSE 293ae771770SStanislav Sedov # define YYERROR_VERBOSE 1 294ae771770SStanislav Sedov #else 295ae771770SStanislav Sedov # define YYERROR_VERBOSE 0 296ae771770SStanislav Sedov #endif 297ae771770SStanislav Sedov 298ae771770SStanislav Sedov /* Enabling the token table. */ 299ae771770SStanislav Sedov #ifndef YYTOKEN_TABLE 300ae771770SStanislav Sedov # define YYTOKEN_TABLE 0 301ae771770SStanislav Sedov #endif 302ae771770SStanislav Sedov 303ae771770SStanislav Sedov #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 304ae771770SStanislav Sedov typedef union YYSTYPE 305ae771770SStanislav Sedov #line 71 "asn1parse.y" 306ae771770SStanislav Sedov { 307*1b748759SDimitry Andric int64_t constant; 308ae771770SStanislav Sedov struct value *value; 309ae771770SStanislav Sedov struct range *range; 310ae771770SStanislav Sedov char *name; 311ae771770SStanislav Sedov Type *type; 312ae771770SStanislav Sedov Member *member; 313ae771770SStanislav Sedov struct objid *objid; 314ae771770SStanislav Sedov char *defval; 315ae771770SStanislav Sedov struct string_list *sl; 316ae771770SStanislav Sedov struct tagtype tag; 317ae771770SStanislav Sedov struct memhead *members; 318ae771770SStanislav Sedov struct constraint_spec *constraint_spec; 319ae771770SStanislav Sedov } 320ae771770SStanislav Sedov /* Line 193 of yacc.c. */ 321ae771770SStanislav Sedov #line 322 "asn1parse.c" 322ae771770SStanislav Sedov YYSTYPE; 323ae771770SStanislav Sedov # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 324ae771770SStanislav Sedov # define YYSTYPE_IS_DECLARED 1 325ae771770SStanislav Sedov # define YYSTYPE_IS_TRIVIAL 1 326ae771770SStanislav Sedov #endif 327ae771770SStanislav Sedov 328ae771770SStanislav Sedov 329ae771770SStanislav Sedov 330ae771770SStanislav Sedov /* Copy the second part of user declarations. */ 331ae771770SStanislav Sedov 332ae771770SStanislav Sedov 333ae771770SStanislav Sedov /* Line 216 of yacc.c. */ 334ae771770SStanislav Sedov #line 335 "asn1parse.c" 335ae771770SStanislav Sedov 336ae771770SStanislav Sedov #ifdef short 337ae771770SStanislav Sedov # undef short 338ae771770SStanislav Sedov #endif 339ae771770SStanislav Sedov 340ae771770SStanislav Sedov #ifdef YYTYPE_UINT8 341ae771770SStanislav Sedov typedef YYTYPE_UINT8 yytype_uint8; 342ae771770SStanislav Sedov #else 343ae771770SStanislav Sedov typedef unsigned char yytype_uint8; 344ae771770SStanislav Sedov #endif 345ae771770SStanislav Sedov 346ae771770SStanislav Sedov #ifdef YYTYPE_INT8 347ae771770SStanislav Sedov typedef YYTYPE_INT8 yytype_int8; 348ae771770SStanislav Sedov #elif (defined __STDC__ || defined __C99__FUNC__ \ 349ae771770SStanislav Sedov || defined __cplusplus || defined _MSC_VER) 350ae771770SStanislav Sedov typedef signed char yytype_int8; 351ae771770SStanislav Sedov #else 352ae771770SStanislav Sedov typedef short int yytype_int8; 353ae771770SStanislav Sedov #endif 354ae771770SStanislav Sedov 355ae771770SStanislav Sedov #ifdef YYTYPE_UINT16 356ae771770SStanislav Sedov typedef YYTYPE_UINT16 yytype_uint16; 357ae771770SStanislav Sedov #else 358ae771770SStanislav Sedov typedef unsigned short int yytype_uint16; 359ae771770SStanislav Sedov #endif 360ae771770SStanislav Sedov 361ae771770SStanislav Sedov #ifdef YYTYPE_INT16 362ae771770SStanislav Sedov typedef YYTYPE_INT16 yytype_int16; 363ae771770SStanislav Sedov #else 364ae771770SStanislav Sedov typedef short int yytype_int16; 365ae771770SStanislav Sedov #endif 366ae771770SStanislav Sedov 367ae771770SStanislav Sedov #ifndef YYSIZE_T 368ae771770SStanislav Sedov # ifdef __SIZE_TYPE__ 369ae771770SStanislav Sedov # define YYSIZE_T __SIZE_TYPE__ 370ae771770SStanislav Sedov # elif defined size_t 371ae771770SStanislav Sedov # define YYSIZE_T size_t 372ae771770SStanislav Sedov # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 373ae771770SStanislav Sedov || defined __cplusplus || defined _MSC_VER) 374ae771770SStanislav Sedov # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 375ae771770SStanislav Sedov # define YYSIZE_T size_t 376ae771770SStanislav Sedov # else 377ae771770SStanislav Sedov # define YYSIZE_T unsigned int 378ae771770SStanislav Sedov # endif 379ae771770SStanislav Sedov #endif 380ae771770SStanislav Sedov 381ae771770SStanislav Sedov #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 382ae771770SStanislav Sedov 383ae771770SStanislav Sedov #ifndef YY_ 384ae771770SStanislav Sedov # if defined YYENABLE_NLS && YYENABLE_NLS 385ae771770SStanislav Sedov # if ENABLE_NLS 386ae771770SStanislav Sedov # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 387ae771770SStanislav Sedov # define YY_(msgid) dgettext ("bison-runtime", msgid) 388ae771770SStanislav Sedov # endif 389ae771770SStanislav Sedov # endif 390ae771770SStanislav Sedov # ifndef YY_ 391ae771770SStanislav Sedov # define YY_(msgid) msgid 392ae771770SStanislav Sedov # endif 393ae771770SStanislav Sedov #endif 394ae771770SStanislav Sedov 395ae771770SStanislav Sedov /* Suppress unused-variable warnings by "using" E. */ 396ae771770SStanislav Sedov #if ! defined lint || defined __GNUC__ 397ae771770SStanislav Sedov # define YYUSE(e) ((void) (e)) 398ae771770SStanislav Sedov #else 399ae771770SStanislav Sedov # define YYUSE(e) /* empty */ 400ae771770SStanislav Sedov #endif 401ae771770SStanislav Sedov 402ae771770SStanislav Sedov /* Identity function, used to suppress warnings about constant conditions. */ 403ae771770SStanislav Sedov #ifndef lint 404ae771770SStanislav Sedov # define YYID(n) (n) 405ae771770SStanislav Sedov #else 406ae771770SStanislav Sedov #if (defined __STDC__ || defined __C99__FUNC__ \ 407ae771770SStanislav Sedov || defined __cplusplus || defined _MSC_VER) 408ae771770SStanislav Sedov static int 409ae771770SStanislav Sedov YYID (int i) 410ae771770SStanislav Sedov #else 411ae771770SStanislav Sedov static int 412ae771770SStanislav Sedov YYID (i) 413ae771770SStanislav Sedov int i; 414ae771770SStanislav Sedov #endif 415ae771770SStanislav Sedov { 416ae771770SStanislav Sedov return i; 417ae771770SStanislav Sedov } 418ae771770SStanislav Sedov #endif 419ae771770SStanislav Sedov 420ae771770SStanislav Sedov #if ! defined yyoverflow || YYERROR_VERBOSE 421ae771770SStanislav Sedov 422ae771770SStanislav Sedov /* The parser invokes alloca or malloc; define the necessary symbols. */ 423ae771770SStanislav Sedov 424ae771770SStanislav Sedov # ifdef YYSTACK_USE_ALLOCA 425ae771770SStanislav Sedov # if YYSTACK_USE_ALLOCA 426ae771770SStanislav Sedov # ifdef __GNUC__ 427ae771770SStanislav Sedov # define YYSTACK_ALLOC __builtin_alloca 428ae771770SStanislav Sedov # elif defined __BUILTIN_VA_ARG_INCR 429ae771770SStanislav Sedov # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 430ae771770SStanislav Sedov # elif defined _AIX 431ae771770SStanislav Sedov # define YYSTACK_ALLOC __alloca 432ae771770SStanislav Sedov # elif defined _MSC_VER 433ae771770SStanislav Sedov # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 434ae771770SStanislav Sedov # define alloca _alloca 435ae771770SStanislav Sedov # else 436ae771770SStanislav Sedov # define YYSTACK_ALLOC alloca 437ae771770SStanislav Sedov # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 438ae771770SStanislav Sedov || defined __cplusplus || defined _MSC_VER) 439ae771770SStanislav Sedov # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 440ae771770SStanislav Sedov # ifndef _STDLIB_H 441ae771770SStanislav Sedov # define _STDLIB_H 1 442ae771770SStanislav Sedov # endif 443ae771770SStanislav Sedov # endif 444ae771770SStanislav Sedov # endif 445ae771770SStanislav Sedov # endif 446ae771770SStanislav Sedov # endif 447ae771770SStanislav Sedov 448ae771770SStanislav Sedov # ifdef YYSTACK_ALLOC 449ae771770SStanislav Sedov /* Pacify GCC's `empty if-body' warning. */ 450ae771770SStanislav Sedov # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 451ae771770SStanislav Sedov # ifndef YYSTACK_ALLOC_MAXIMUM 452ae771770SStanislav Sedov /* The OS might guarantee only one guard page at the bottom of the stack, 453ae771770SStanislav Sedov and a page size can be as small as 4096 bytes. So we cannot safely 454ae771770SStanislav Sedov invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 455ae771770SStanislav Sedov to allow for a few compiler-allocated temporary stack slots. */ 456ae771770SStanislav Sedov # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 457ae771770SStanislav Sedov # endif 458ae771770SStanislav Sedov # else 459ae771770SStanislav Sedov # define YYSTACK_ALLOC YYMALLOC 460ae771770SStanislav Sedov # define YYSTACK_FREE YYFREE 461ae771770SStanislav Sedov # ifndef YYSTACK_ALLOC_MAXIMUM 462ae771770SStanislav Sedov # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 463ae771770SStanislav Sedov # endif 464ae771770SStanislav Sedov # if (defined __cplusplus && ! defined _STDLIB_H \ 465ae771770SStanislav Sedov && ! ((defined YYMALLOC || defined malloc) \ 466ae771770SStanislav Sedov && (defined YYFREE || defined free))) 467ae771770SStanislav Sedov # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 468ae771770SStanislav Sedov # ifndef _STDLIB_H 469ae771770SStanislav Sedov # define _STDLIB_H 1 470ae771770SStanislav Sedov # endif 471ae771770SStanislav Sedov # endif 472ae771770SStanislav Sedov # ifndef YYMALLOC 473ae771770SStanislav Sedov # define YYMALLOC malloc 474ae771770SStanislav Sedov # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 475ae771770SStanislav Sedov || defined __cplusplus || defined _MSC_VER) 476ae771770SStanislav Sedov void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 477ae771770SStanislav Sedov # endif 478ae771770SStanislav Sedov # endif 479ae771770SStanislav Sedov # ifndef YYFREE 480ae771770SStanislav Sedov # define YYFREE free 481ae771770SStanislav Sedov # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 482ae771770SStanislav Sedov || defined __cplusplus || defined _MSC_VER) 483ae771770SStanislav Sedov void free (void *); /* INFRINGES ON USER NAME SPACE */ 484ae771770SStanislav Sedov # endif 485ae771770SStanislav Sedov # endif 486ae771770SStanislav Sedov # endif 487ae771770SStanislav Sedov #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 488ae771770SStanislav Sedov 489ae771770SStanislav Sedov 490ae771770SStanislav Sedov #if (! defined yyoverflow \ 491ae771770SStanislav Sedov && (! defined __cplusplus \ 492ae771770SStanislav Sedov || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 493ae771770SStanislav Sedov 494ae771770SStanislav Sedov /* A type that is properly aligned for any stack member. */ 495ae771770SStanislav Sedov union yyalloc 496ae771770SStanislav Sedov { 497ae771770SStanislav Sedov yytype_int16 yyss; 498ae771770SStanislav Sedov YYSTYPE yyvs; 499ae771770SStanislav Sedov }; 500ae771770SStanislav Sedov 501ae771770SStanislav Sedov /* The size of the maximum gap between one aligned stack and the next. */ 502ae771770SStanislav Sedov # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 503ae771770SStanislav Sedov 504ae771770SStanislav Sedov /* The size of an array large to enough to hold all stacks, each with 505ae771770SStanislav Sedov N elements. */ 506ae771770SStanislav Sedov # define YYSTACK_BYTES(N) \ 507ae771770SStanislav Sedov ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 508ae771770SStanislav Sedov + YYSTACK_GAP_MAXIMUM) 509ae771770SStanislav Sedov 510ae771770SStanislav Sedov /* Copy COUNT objects from FROM to TO. The source and destination do 511ae771770SStanislav Sedov not overlap. */ 512ae771770SStanislav Sedov # ifndef YYCOPY 513ae771770SStanislav Sedov # if defined __GNUC__ && 1 < __GNUC__ 514ae771770SStanislav Sedov # define YYCOPY(To, From, Count) \ 515ae771770SStanislav Sedov __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 516ae771770SStanislav Sedov # else 517ae771770SStanislav Sedov # define YYCOPY(To, From, Count) \ 518ae771770SStanislav Sedov do \ 519ae771770SStanislav Sedov { \ 520ae771770SStanislav Sedov YYSIZE_T yyi; \ 521ae771770SStanislav Sedov for (yyi = 0; yyi < (Count); yyi++) \ 522ae771770SStanislav Sedov (To)[yyi] = (From)[yyi]; \ 523ae771770SStanislav Sedov } \ 524ae771770SStanislav Sedov while (YYID (0)) 525ae771770SStanislav Sedov # endif 526ae771770SStanislav Sedov # endif 527ae771770SStanislav Sedov 528ae771770SStanislav Sedov /* Relocate STACK from its old location to the new one. The 529ae771770SStanislav Sedov local variables YYSIZE and YYSTACKSIZE give the old and new number of 530ae771770SStanislav Sedov elements in the stack, and YYPTR gives the new location of the 531ae771770SStanislav Sedov stack. Advance YYPTR to a properly aligned location for the next 532ae771770SStanislav Sedov stack. */ 533ae771770SStanislav Sedov # define YYSTACK_RELOCATE(Stack) \ 534ae771770SStanislav Sedov do \ 535ae771770SStanislav Sedov { \ 536ae771770SStanislav Sedov YYSIZE_T yynewbytes; \ 537ae771770SStanislav Sedov YYCOPY (&yyptr->Stack, Stack, yysize); \ 538ae771770SStanislav Sedov Stack = &yyptr->Stack; \ 539ae771770SStanislav Sedov yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 540ae771770SStanislav Sedov yyptr += yynewbytes / sizeof (*yyptr); \ 541ae771770SStanislav Sedov } \ 542ae771770SStanislav Sedov while (YYID (0)) 543ae771770SStanislav Sedov 544ae771770SStanislav Sedov #endif 545ae771770SStanislav Sedov 546ae771770SStanislav Sedov /* YYFINAL -- State number of the termination state. */ 547ae771770SStanislav Sedov #define YYFINAL 6 548ae771770SStanislav Sedov /* YYLAST -- Last index in YYTABLE. */ 549ae771770SStanislav Sedov #define YYLAST 203 550ae771770SStanislav Sedov 551ae771770SStanislav Sedov /* YYNTOKENS -- Number of terminals. */ 552ae771770SStanislav Sedov #define YYNTOKENS 98 553ae771770SStanislav Sedov /* YYNNTS -- Number of nonterminals. */ 554ae771770SStanislav Sedov #define YYNNTS 69 555ae771770SStanislav Sedov /* YYNRULES -- Number of rules. */ 556ae771770SStanislav Sedov #define YYNRULES 140 557ae771770SStanislav Sedov /* YYNRULES -- Number of states. */ 558ae771770SStanislav Sedov #define YYNSTATES 220 559ae771770SStanislav Sedov 560ae771770SStanislav Sedov /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 561ae771770SStanislav Sedov #define YYUNDEFTOK 2 562ae771770SStanislav Sedov #define YYMAXUTOK 344 563ae771770SStanislav Sedov 564ae771770SStanislav Sedov #define YYTRANSLATE(YYX) \ 565ae771770SStanislav Sedov ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 566ae771770SStanislav Sedov 567ae771770SStanislav Sedov /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 568ae771770SStanislav Sedov static const yytype_uint8 yytranslate[] = 569ae771770SStanislav Sedov { 570ae771770SStanislav Sedov 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 571ae771770SStanislav Sedov 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 572ae771770SStanislav Sedov 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 573ae771770SStanislav Sedov 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 574ae771770SStanislav Sedov 92, 93, 2, 2, 91, 2, 2, 2, 2, 2, 575ae771770SStanislav Sedov 2, 2, 2, 2, 2, 2, 2, 2, 2, 90, 576ae771770SStanislav Sedov 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 577ae771770SStanislav Sedov 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 578ae771770SStanislav Sedov 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 579ae771770SStanislav Sedov 2, 96, 2, 97, 2, 2, 2, 2, 2, 2, 580ae771770SStanislav Sedov 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 581ae771770SStanislav Sedov 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 582ae771770SStanislav Sedov 2, 2, 2, 94, 2, 95, 2, 2, 2, 2, 583ae771770SStanislav Sedov 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 584ae771770SStanislav Sedov 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 585ae771770SStanislav Sedov 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 586ae771770SStanislav Sedov 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 587ae771770SStanislav Sedov 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 588ae771770SStanislav Sedov 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 589ae771770SStanislav Sedov 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 590ae771770SStanislav Sedov 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 591ae771770SStanislav Sedov 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 592ae771770SStanislav Sedov 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 593ae771770SStanislav Sedov 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 594ae771770SStanislav Sedov 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 595ae771770SStanislav Sedov 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 596ae771770SStanislav Sedov 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 597ae771770SStanislav Sedov 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 598ae771770SStanislav Sedov 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 599ae771770SStanislav Sedov 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 600ae771770SStanislav Sedov 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 601ae771770SStanislav Sedov 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 602ae771770SStanislav Sedov 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 603ae771770SStanislav Sedov 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 604ae771770SStanislav Sedov 85, 86, 87, 88, 89 605ae771770SStanislav Sedov }; 606ae771770SStanislav Sedov 607ae771770SStanislav Sedov #if YYDEBUG 608ae771770SStanislav Sedov /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 609ae771770SStanislav Sedov YYRHS. */ 610ae771770SStanislav Sedov static const yytype_uint16 yyprhs[] = 611ae771770SStanislav Sedov { 612ae771770SStanislav Sedov 0, 0, 3, 13, 16, 19, 22, 23, 26, 27, 613ae771770SStanislav Sedov 31, 32, 36, 37, 39, 40, 42, 45, 50, 54, 614ae771770SStanislav Sedov 57, 58, 60, 63, 65, 67, 71, 73, 77, 79, 615ae771770SStanislav Sedov 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 616ae771770SStanislav Sedov 101, 103, 105, 107, 109, 111, 113, 119, 125, 131, 617ae771770SStanislav Sedov 135, 137, 140, 145, 147, 151, 155, 160, 165, 167, 618ae771770SStanislav Sedov 170, 176, 179, 183, 185, 186, 189, 194, 198, 203, 619ae771770SStanislav Sedov 208, 212, 216, 221, 223, 225, 227, 229, 231, 234, 620ae771770SStanislav Sedov 238, 240, 242, 244, 247, 251, 257, 262, 266, 271, 621ae771770SStanislav Sedov 272, 274, 276, 278, 279, 281, 283, 288, 290, 292, 622ae771770SStanislav Sedov 294, 296, 298, 300, 302, 304, 306, 308, 312, 316, 623ae771770SStanislav Sedov 319, 321, 324, 328, 330, 334, 339, 341, 342, 346, 624ae771770SStanislav Sedov 347, 350, 355, 357, 359, 361, 363, 365, 367, 369, 625ae771770SStanislav Sedov 371, 373, 375, 377, 379, 381, 383, 385, 387, 389, 626ae771770SStanislav Sedov 391 627ae771770SStanislav Sedov }; 628ae771770SStanislav Sedov 629ae771770SStanislav Sedov /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 630ae771770SStanislav Sedov static const yytype_int16 yyrhs[] = 631ae771770SStanislav Sedov { 632ae771770SStanislav Sedov 99, 0, -1, 86, 152, 21, 100, 101, 84, 8, 633ae771770SStanislav Sedov 102, 24, -1, 27, 70, -1, 38, 70, -1, 7, 634ae771770SStanislav Sedov 70, -1, -1, 29, 39, -1, -1, 107, 103, 108, 635ae771770SStanislav Sedov -1, -1, 40, 104, 90, -1, -1, 105, -1, -1, 636ae771770SStanislav Sedov 106, -1, 105, 106, -1, 110, 32, 86, 152, -1, 637ae771770SStanislav Sedov 28, 110, 90, -1, 28, 5, -1, -1, 109, -1, 638ae771770SStanislav Sedov 109, 108, -1, 111, -1, 144, -1, 86, 91, 110, 639ae771770SStanislav Sedov -1, 86, -1, 86, 84, 112, -1, 113, -1, 131, 640ae771770SStanislav Sedov -1, 134, -1, 121, -1, 114, -1, 145, -1, 130, 641ae771770SStanislav Sedov -1, 119, -1, 116, -1, 124, -1, 122, -1, 123, 642ae771770SStanislav Sedov -1, 126, -1, 127, -1, 128, -1, 129, -1, 140, 643ae771770SStanislav Sedov -1, 11, -1, 92, 156, 83, 156, 93, -1, 92, 644ae771770SStanislav Sedov 156, 83, 46, 93, -1, 92, 47, 83, 156, 93, 645ae771770SStanislav Sedov -1, 92, 156, 93, -1, 43, -1, 43, 115, -1, 646ae771770SStanislav Sedov 43, 94, 117, 95, -1, 118, -1, 117, 91, 118, 647ae771770SStanislav Sedov -1, 117, 91, 85, -1, 86, 92, 164, 93, -1, 648ae771770SStanislav Sedov 25, 94, 120, 95, -1, 117, -1, 9, 67, -1, 649ae771770SStanislav Sedov 9, 67, 94, 150, 95, -1, 51, 37, -1, 52, 650ae771770SStanislav Sedov 67, 125, -1, 49, -1, -1, 66, 115, -1, 64, 651ae771770SStanislav Sedov 94, 147, 95, -1, 64, 94, 95, -1, 64, 125, 652ae771770SStanislav Sedov 53, 112, -1, 65, 94, 147, 95, -1, 65, 94, 653ae771770SStanislav Sedov 95, -1, 65, 53, 112, -1, 14, 94, 147, 95, 654ae771770SStanislav Sedov -1, 132, -1, 133, -1, 86, -1, 34, -1, 77, 655ae771770SStanislav Sedov -1, 112, 135, -1, 92, 136, 93, -1, 137, -1, 656ae771770SStanislav Sedov 138, -1, 139, -1, 19, 112, -1, 23, 12, 156, 657ae771770SStanislav Sedov -1, 19, 112, 23, 12, 156, -1, 18, 12, 94, 658ae771770SStanislav Sedov 95, -1, 141, 143, 112, -1, 96, 142, 89, 97, 659ae771770SStanislav Sedov -1, -1, 76, -1, 6, -1, 60, -1, -1, 27, 660ae771770SStanislav Sedov -1, 38, -1, 86, 112, 84, 156, -1, 146, -1, 661ae771770SStanislav Sedov 33, -1, 73, -1, 78, -1, 61, -1, 81, -1, 662ae771770SStanislav Sedov 36, -1, 10, -1, 79, -1, 149, -1, 147, 91, 663ae771770SStanislav Sedov 149, -1, 147, 91, 85, -1, 86, 112, -1, 148, 664ae771770SStanislav Sedov -1, 148, 54, -1, 148, 20, 156, -1, 151, -1, 665ae771770SStanislav Sedov 150, 91, 151, -1, 86, 92, 89, 93, -1, 153, 666ae771770SStanislav Sedov -1, -1, 94, 154, 95, -1, -1, 155, 154, -1, 667ae771770SStanislav Sedov 86, 92, 89, 93, -1, 86, -1, 89, -1, 157, 668ae771770SStanislav Sedov -1, 158, -1, 162, -1, 161, -1, 163, -1, 166, 669ae771770SStanislav Sedov -1, 165, -1, 159, -1, 160, -1, 86, -1, 88, 670ae771770SStanislav Sedov -1, 71, -1, 31, -1, 164, -1, 89, -1, 49, 671ae771770SStanislav Sedov -1, 153, -1 672ae771770SStanislav Sedov }; 673ae771770SStanislav Sedov 674ae771770SStanislav Sedov /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 675ae771770SStanislav Sedov static const yytype_uint16 yyrline[] = 676ae771770SStanislav Sedov { 677ae771770SStanislav Sedov 0, 239, 239, 246, 247, 249, 251, 254, 256, 259, 678ae771770SStanislav Sedov 260, 263, 264, 267, 268, 271, 272, 275, 287, 293, 679ae771770SStanislav Sedov 294, 297, 298, 301, 302, 305, 311, 319, 329, 330, 680ae771770SStanislav Sedov 331, 334, 335, 336, 337, 338, 339, 340, 341, 342, 681ae771770SStanislav Sedov 343, 344, 345, 346, 347, 350, 357, 367, 375, 383, 682ae771770SStanislav Sedov 394, 399, 405, 413, 419, 424, 428, 441, 449, 452, 683ae771770SStanislav Sedov 459, 467, 473, 482, 490, 491, 496, 502, 510, 519, 684ae771770SStanislav Sedov 525, 533, 541, 548, 549, 552, 563, 568, 575, 591, 685ae771770SStanislav Sedov 597, 600, 601, 604, 610, 618, 628, 634, 647, 656, 686ae771770SStanislav Sedov 659, 663, 667, 674, 677, 681, 688, 699, 702, 707, 687ae771770SStanislav Sedov 712, 717, 722, 727, 732, 737, 745, 751, 756, 767, 688ae771770SStanislav Sedov 778, 784, 790, 798, 804, 811, 824, 825, 828, 835, 689ae771770SStanislav Sedov 838, 849, 853, 864, 870, 871, 874, 875, 876, 877, 690ae771770SStanislav Sedov 878, 881, 884, 887, 898, 906, 912, 920, 928, 931, 691ae771770SStanislav Sedov 936 692ae771770SStanislav Sedov }; 693ae771770SStanislav Sedov #endif 694ae771770SStanislav Sedov 695ae771770SStanislav Sedov #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 696ae771770SStanislav Sedov /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 697ae771770SStanislav Sedov First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 698ae771770SStanislav Sedov static const char *const yytname[] = 699ae771770SStanislav Sedov { 700ae771770SStanislav Sedov "$end", "error", "$undefined", "kw_ABSENT", "kw_ABSTRACT_SYNTAX", 701ae771770SStanislav Sedov "kw_ALL", "kw_APPLICATION", "kw_AUTOMATIC", "kw_BEGIN", "kw_BIT", 702ae771770SStanislav Sedov "kw_BMPString", "kw_BOOLEAN", "kw_BY", "kw_CHARACTER", "kw_CHOICE", 703ae771770SStanislav Sedov "kw_CLASS", "kw_COMPONENT", "kw_COMPONENTS", "kw_CONSTRAINED", 704ae771770SStanislav Sedov "kw_CONTAINING", "kw_DEFAULT", "kw_DEFINITIONS", "kw_EMBEDDED", 705ae771770SStanislav Sedov "kw_ENCODED", "kw_END", "kw_ENUMERATED", "kw_EXCEPT", "kw_EXPLICIT", 706ae771770SStanislav Sedov "kw_EXPORTS", "kw_EXTENSIBILITY", "kw_EXTERNAL", "kw_FALSE", "kw_FROM", 707ae771770SStanislav Sedov "kw_GeneralString", "kw_GeneralizedTime", "kw_GraphicString", 708ae771770SStanislav Sedov "kw_IA5String", "kw_IDENTIFIER", "kw_IMPLICIT", "kw_IMPLIED", 709ae771770SStanislav Sedov "kw_IMPORTS", "kw_INCLUDES", "kw_INSTANCE", "kw_INTEGER", 710ae771770SStanislav Sedov "kw_INTERSECTION", "kw_ISO646String", "kw_MAX", "kw_MIN", 711ae771770SStanislav Sedov "kw_MINUS_INFINITY", "kw_NULL", "kw_NumericString", "kw_OBJECT", 712ae771770SStanislav Sedov "kw_OCTET", "kw_OF", "kw_OPTIONAL", "kw_ObjectDescriptor", "kw_PATTERN", 713ae771770SStanislav Sedov "kw_PDV", "kw_PLUS_INFINITY", "kw_PRESENT", "kw_PRIVATE", 714ae771770SStanislav Sedov "kw_PrintableString", "kw_REAL", "kw_RELATIVE_OID", "kw_SEQUENCE", 715ae771770SStanislav Sedov "kw_SET", "kw_SIZE", "kw_STRING", "kw_SYNTAX", "kw_T61String", "kw_TAGS", 716ae771770SStanislav Sedov "kw_TRUE", "kw_TYPE_IDENTIFIER", "kw_TeletexString", "kw_UNION", 717ae771770SStanislav Sedov "kw_UNIQUE", "kw_UNIVERSAL", "kw_UTCTime", "kw_UTF8String", 718ae771770SStanislav Sedov "kw_UniversalString", "kw_VideotexString", "kw_VisibleString", "kw_WITH", 719ae771770SStanislav Sedov "RANGE", "EEQUAL", "ELLIPSIS", "IDENTIFIER", "referencename", "STRING", 720ae771770SStanislav Sedov "NUMBER", "';'", "','", "'('", "')'", "'{'", "'}'", "'['", "']'", 721ae771770SStanislav Sedov "$accept", "ModuleDefinition", "TagDefault", "ExtensionDefault", 722ae771770SStanislav Sedov "ModuleBody", "Imports", "SymbolsImported", "SymbolsFromModuleList", 723ae771770SStanislav Sedov "SymbolsFromModule", "Exports", "AssignmentList", "Assignment", 724ae771770SStanislav Sedov "referencenames", "TypeAssignment", "Type", "BuiltinType", "BooleanType", 725ae771770SStanislav Sedov "range", "IntegerType", "NamedNumberList", "NamedNumber", 726ae771770SStanislav Sedov "EnumeratedType", "Enumerations", "BitStringType", 727ae771770SStanislav Sedov "ObjectIdentifierType", "OctetStringType", "NullType", "size", 728ae771770SStanislav Sedov "SequenceType", "SequenceOfType", "SetType", "SetOfType", "ChoiceType", 729ae771770SStanislav Sedov "ReferencedType", "DefinedType", "UsefulType", "ConstrainedType", 730ae771770SStanislav Sedov "Constraint", "ConstraintSpec", "GeneralConstraint", 731ae771770SStanislav Sedov "ContentsConstraint", "UserDefinedConstraint", "TaggedType", "Tag", 732ae771770SStanislav Sedov "Class", "tagenv", "ValueAssignment", "CharacterStringType", 733ae771770SStanislav Sedov "RestrictedCharactedStringType", "ComponentTypeList", "NamedType", 734ae771770SStanislav Sedov "ComponentType", "NamedBitList", "NamedBit", "objid_opt", "objid", 735ae771770SStanislav Sedov "objid_list", "objid_element", "Value", "BuiltinValue", 736ae771770SStanislav Sedov "ReferencedValue", "DefinedValue", "Valuereference", 737ae771770SStanislav Sedov "CharacterStringValue", "BooleanValue", "IntegerValue", "SignedNumber", 738ae771770SStanislav Sedov "NullValue", "ObjectIdentifierValue", 0 739ae771770SStanislav Sedov }; 740ae771770SStanislav Sedov #endif 741ae771770SStanislav Sedov 742ae771770SStanislav Sedov # ifdef YYPRINT 743ae771770SStanislav Sedov /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 744ae771770SStanislav Sedov token YYLEX-NUM. */ 745ae771770SStanislav Sedov static const yytype_uint16 yytoknum[] = 746ae771770SStanislav Sedov { 747ae771770SStanislav Sedov 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 748ae771770SStanislav Sedov 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 749ae771770SStanislav Sedov 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 750ae771770SStanislav Sedov 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 751ae771770SStanislav Sedov 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 752ae771770SStanislav Sedov 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 753ae771770SStanislav Sedov 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 754ae771770SStanislav Sedov 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 755ae771770SStanislav Sedov 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 756ae771770SStanislav Sedov 59, 44, 40, 41, 123, 125, 91, 93 757ae771770SStanislav Sedov }; 758ae771770SStanislav Sedov # endif 759ae771770SStanislav Sedov 760ae771770SStanislav Sedov /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 761ae771770SStanislav Sedov static const yytype_uint8 yyr1[] = 762ae771770SStanislav Sedov { 763ae771770SStanislav Sedov 0, 98, 99, 100, 100, 100, 100, 101, 101, 102, 764ae771770SStanislav Sedov 102, 103, 103, 104, 104, 105, 105, 106, 107, 107, 765ae771770SStanislav Sedov 107, 108, 108, 109, 109, 110, 110, 111, 112, 112, 766ae771770SStanislav Sedov 112, 113, 113, 113, 113, 113, 113, 113, 113, 113, 767ae771770SStanislav Sedov 113, 113, 113, 113, 113, 114, 115, 115, 115, 115, 768ae771770SStanislav Sedov 116, 116, 116, 117, 117, 117, 118, 119, 120, 121, 769ae771770SStanislav Sedov 121, 122, 123, 124, 125, 125, 126, 126, 127, 128, 770ae771770SStanislav Sedov 128, 129, 130, 131, 131, 132, 133, 133, 134, 135, 771ae771770SStanislav Sedov 136, 137, 137, 138, 138, 138, 139, 140, 141, 142, 772ae771770SStanislav Sedov 142, 142, 142, 143, 143, 143, 144, 145, 146, 146, 773ae771770SStanislav Sedov 146, 146, 146, 146, 146, 146, 147, 147, 147, 148, 774ae771770SStanislav Sedov 149, 149, 149, 150, 150, 151, 152, 152, 153, 154, 775ae771770SStanislav Sedov 154, 155, 155, 155, 156, 156, 157, 157, 157, 157, 776ae771770SStanislav Sedov 157, 158, 159, 160, 161, 162, 162, 163, 164, 165, 777ae771770SStanislav Sedov 166 778ae771770SStanislav Sedov }; 779ae771770SStanislav Sedov 780ae771770SStanislav Sedov /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 781ae771770SStanislav Sedov static const yytype_uint8 yyr2[] = 782ae771770SStanislav Sedov { 783ae771770SStanislav Sedov 0, 2, 9, 2, 2, 2, 0, 2, 0, 3, 784ae771770SStanislav Sedov 0, 3, 0, 1, 0, 1, 2, 4, 3, 2, 785ae771770SStanislav Sedov 0, 1, 2, 1, 1, 3, 1, 3, 1, 1, 786ae771770SStanislav Sedov 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 787ae771770SStanislav Sedov 1, 1, 1, 1, 1, 1, 5, 5, 5, 3, 788ae771770SStanislav Sedov 1, 2, 4, 1, 3, 3, 4, 4, 1, 2, 789ae771770SStanislav Sedov 5, 2, 3, 1, 0, 2, 4, 3, 4, 4, 790ae771770SStanislav Sedov 3, 3, 4, 1, 1, 1, 1, 1, 2, 3, 791ae771770SStanislav Sedov 1, 1, 1, 2, 3, 5, 4, 3, 4, 0, 792ae771770SStanislav Sedov 1, 1, 1, 0, 1, 1, 4, 1, 1, 1, 793ae771770SStanislav Sedov 1, 1, 1, 1, 1, 1, 1, 3, 3, 2, 794ae771770SStanislav Sedov 1, 2, 3, 1, 3, 4, 1, 0, 3, 0, 795ae771770SStanislav Sedov 2, 4, 1, 1, 1, 1, 1, 1, 1, 1, 796ae771770SStanislav Sedov 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 797ae771770SStanislav Sedov 1 798ae771770SStanislav Sedov }; 799ae771770SStanislav Sedov 800ae771770SStanislav Sedov /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 801ae771770SStanislav Sedov STATE-NUM when YYTABLE doesn't specify something else to do. Zero 802ae771770SStanislav Sedov means the default is an error. */ 803ae771770SStanislav Sedov static const yytype_uint8 yydefact[] = 804ae771770SStanislav Sedov { 805ae771770SStanislav Sedov 0, 117, 0, 119, 0, 116, 1, 122, 123, 0, 806ae771770SStanislav Sedov 119, 6, 0, 118, 120, 0, 0, 0, 8, 0, 807ae771770SStanislav Sedov 5, 3, 4, 0, 0, 121, 7, 0, 20, 0, 808ae771770SStanislav Sedov 0, 12, 19, 26, 0, 2, 14, 0, 0, 18, 809ae771770SStanislav Sedov 0, 13, 15, 0, 0, 9, 21, 23, 24, 25, 810ae771770SStanislav Sedov 11, 16, 0, 0, 104, 45, 0, 0, 98, 76, 811ae771770SStanislav Sedov 103, 50, 63, 0, 0, 101, 64, 0, 99, 77, 812ae771770SStanislav Sedov 100, 105, 102, 0, 75, 89, 0, 28, 32, 36, 813ae771770SStanislav Sedov 35, 31, 38, 39, 37, 40, 41, 42, 43, 34, 814ae771770SStanislav Sedov 29, 73, 74, 30, 44, 93, 33, 97, 22, 117, 815ae771770SStanislav Sedov 59, 0, 0, 0, 0, 51, 61, 64, 0, 0, 816ae771770SStanislav Sedov 0, 0, 0, 27, 91, 92, 90, 0, 0, 0, 817ae771770SStanislav Sedov 78, 94, 95, 0, 17, 0, 0, 0, 110, 106, 818ae771770SStanislav Sedov 0, 58, 53, 0, 136, 0, 139, 135, 133, 134, 819ae771770SStanislav Sedov 138, 140, 0, 124, 125, 131, 132, 127, 126, 128, 820ae771770SStanislav Sedov 137, 130, 129, 0, 62, 65, 67, 0, 0, 71, 821ae771770SStanislav Sedov 70, 0, 0, 96, 0, 0, 0, 0, 80, 81, 822ae771770SStanislav Sedov 82, 87, 0, 0, 113, 109, 0, 72, 0, 111, 823ae771770SStanislav Sedov 0, 0, 57, 0, 0, 49, 52, 66, 68, 69, 824ae771770SStanislav Sedov 88, 0, 83, 0, 79, 0, 0, 60, 108, 107, 825ae771770SStanislav Sedov 112, 0, 55, 54, 0, 0, 0, 0, 0, 84, 826ae771770SStanislav Sedov 0, 114, 56, 48, 47, 46, 86, 0, 115, 85 827ae771770SStanislav Sedov }; 828ae771770SStanislav Sedov 829ae771770SStanislav Sedov /* YYDEFGOTO[NTERM-NUM]. */ 830ae771770SStanislav Sedov static const yytype_int16 yydefgoto[] = 831ae771770SStanislav Sedov { 832ae771770SStanislav Sedov -1, 2, 18, 24, 30, 37, 40, 41, 42, 31, 833ae771770SStanislav Sedov 45, 46, 43, 47, 76, 77, 78, 105, 79, 131, 834ae771770SStanislav Sedov 132, 80, 133, 81, 82, 83, 84, 110, 85, 86, 835ae771770SStanislav Sedov 87, 88, 89, 90, 91, 92, 93, 120, 167, 168, 836ae771770SStanislav Sedov 169, 170, 94, 95, 117, 123, 48, 96, 97, 127, 837ae771770SStanislav Sedov 128, 129, 173, 174, 4, 141, 9, 10, 142, 143, 838ae771770SStanislav Sedov 144, 145, 146, 147, 148, 149, 150, 151, 152 839ae771770SStanislav Sedov }; 840ae771770SStanislav Sedov 841ae771770SStanislav Sedov /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 842ae771770SStanislav Sedov STATE-NUM. */ 843ae771770SStanislav Sedov #define YYPACT_NINF -119 844ae771770SStanislav Sedov static const yytype_int16 yypact[] = 845ae771770SStanislav Sedov { 846ae771770SStanislav Sedov -43, -56, 47, -65, 29, -119, -119, -31, -119, -25, 847ae771770SStanislav Sedov -65, 4, -1, -119, -119, 17, 20, 26, 50, 13, 848ae771770SStanislav Sedov -119, -119, -119, 63, 24, -119, -119, 104, 8, -2, 849ae771770SStanislav Sedov 89, 74, -119, 33, 25, -119, 34, 39, 34, -119, 850ae771770SStanislav Sedov 37, 34, -119, 98, 58, -119, 39, -119, -119, -119, 851ae771770SStanislav Sedov -119, -119, 52, 66, -119, -119, 51, 53, -119, -119, 852ae771770SStanislav Sedov -119, -79, -119, 109, 81, -119, -60, -48, -119, -119, 853ae771770SStanislav Sedov -119, -119, -119, 107, -119, 2, -74, -119, -119, -119, 854ae771770SStanislav Sedov -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, 855ae771770SStanislav Sedov -119, -119, -119, -119, -119, -18, -119, -119, -119, -56, 856ae771770SStanislav Sedov 55, 65, 67, -12, 67, -119, -119, 86, 68, -70, 857ae771770SStanislav Sedov 102, 107, -69, 69, -119, -119, -119, 73, 40, 10, 858ae771770SStanislav Sedov -119, -119, -119, 107, -119, 71, 107, -47, -13, -119, 859ae771770SStanislav Sedov 72, 75, -119, 70, -119, 80, -119, -119, -119, -119, 860ae771770SStanislav Sedov -119, -119, -71, -119, -119, -119, -119, -119, -119, -119, 861ae771770SStanislav Sedov -119, -119, -119, -46, -119, -119, -119, -39, 107, 69, 862ae771770SStanislav Sedov -119, -38, 76, -119, 155, 107, 157, 77, -119, -119, 863ae771770SStanislav Sedov -119, 69, 82, -10, -119, 69, -22, -119, 40, -119, 864ae771770SStanislav Sedov 87, 19, -119, 40, 9, -119, -119, -119, 69, -119, 865ae771770SStanislav Sedov -119, 83, -19, 40, -119, 90, 71, -119, -119, -119, 866ae771770SStanislav Sedov -119, 85, -119, -119, 88, 94, 96, 95, 163, -119, 867ae771770SStanislav Sedov 99, -119, -119, -119, -119, -119, -119, 40, -119, -119 868ae771770SStanislav Sedov }; 869ae771770SStanislav Sedov 870ae771770SStanislav Sedov /* YYPGOTO[NTERM-NUM]. */ 871ae771770SStanislav Sedov static const yytype_int16 yypgoto[] = 872ae771770SStanislav Sedov { 873ae771770SStanislav Sedov -119, -119, -119, -119, -119, -119, -119, -119, 141, -119, 874ae771770SStanislav Sedov 137, -119, -15, -119, -72, -119, -119, 91, -119, 92, 875ae771770SStanislav Sedov 14, -119, -119, -119, -119, -119, -119, 84, -119, -119, 876ae771770SStanislav Sedov -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, 877ae771770SStanislav Sedov -119, -119, -119, -119, -119, -119, -119, -119, -119, -82, 878ae771770SStanislav Sedov -119, 18, -119, 5, 101, 1, 187, -119, -118, -119, 879ae771770SStanislav Sedov -119, -119, -119, -119, -119, -119, 22, -119, -119 880ae771770SStanislav Sedov }; 881ae771770SStanislav Sedov 882ae771770SStanislav Sedov /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 883ae771770SStanislav Sedov positive, shift that token. If negative, reduce the rule which 884ae771770SStanislav Sedov number is the opposite. If zero, do what YYDEFACT says. 885ae771770SStanislav Sedov If YYTABLE_NINF, syntax error. */ 886ae771770SStanislav Sedov #define YYTABLE_NINF -11 887ae771770SStanislav Sedov static const yytype_int16 yytable[] = 888ae771770SStanislav Sedov { 889ae771770SStanislav Sedov 163, 113, 5, 32, 208, 111, 108, 178, 114, 121, 890ae771770SStanislav Sedov 118, 15, 184, 103, 34, 104, 126, 126, 119, 134, 891ae771770SStanislav Sedov 122, 7, 185, 49, 8, 156, 160, 157, 164, 165, 892ae771770SStanislav Sedov 161, 16, -10, 166, 109, 135, 29, 136, 3, 159, 893ae771770SStanislav Sedov 134, 179, 17, 1, 176, 181, 112, 6, 177, 186, 894ae771770SStanislav Sedov 11, 171, 176, 176, 175, 205, 187, 189, 136, 137, 895ae771770SStanislav Sedov 200, 12, 115, 198, 126, 204, 206, 53, 54, 55, 896ae771770SStanislav Sedov 13, 134, 56, 119, 138, 209, 139, 140, 116, 23, 897ae771770SStanislav Sedov 137, 196, 3, 57, 33, 197, 188, 20, 19, 136, 898ae771770SStanislav Sedov 21, 58, 59, 192, 60, 138, 22, 139, 140, 219, 899ae771770SStanislav Sedov 5, 61, 26, 3, 202, 130, 25, 62, 27, 63, 900ae771770SStanislav Sedov 64, 137, 28, 35, 36, 39, 53, 54, 55, 65, 901ae771770SStanislav Sedov 33, 56, 66, 67, 38, 44, 138, 50, 139, 140, 902ae771770SStanislav Sedov 52, 68, 57, 100, 3, 69, 70, 71, 99, 72, 903ae771770SStanislav Sedov 58, 59, 73, 60, 74, 101, 106, 102, 107, 125, 904ae771770SStanislav Sedov 61, 126, 108, 130, 75, 158, 62, 172, 63, 64, 905ae771770SStanislav Sedov 103, 119, 162, 183, 180, 182, 181, 191, 65, 193, 906ae771770SStanislav Sedov 194, 66, 67, 190, 195, 217, 140, 207, 212, 210, 907ae771770SStanislav Sedov 68, 213, 51, 98, 69, 70, 71, 214, 72, 215, 908ae771770SStanislav Sedov 216, 154, 218, 74, 199, 203, 153, 14, 0, 155, 909ae771770SStanislav Sedov 124, 211, 201, 75 910ae771770SStanislav Sedov }; 911ae771770SStanislav Sedov 912ae771770SStanislav Sedov static const yytype_int16 yycheck[] = 913ae771770SStanislav Sedov { 914ae771770SStanislav Sedov 118, 73, 1, 5, 23, 53, 66, 20, 6, 27, 915ae771770SStanislav Sedov 84, 7, 83, 92, 29, 94, 86, 86, 92, 31, 916ae771770SStanislav Sedov 38, 86, 93, 38, 89, 95, 95, 109, 18, 19, 917ae771770SStanislav Sedov 112, 27, 24, 23, 94, 47, 28, 49, 94, 111, 918ae771770SStanislav Sedov 31, 54, 38, 86, 91, 91, 94, 0, 95, 95, 919ae771770SStanislav Sedov 21, 123, 91, 91, 126, 46, 95, 95, 49, 71, 920ae771770SStanislav Sedov 178, 92, 60, 85, 86, 183, 184, 9, 10, 11, 921ae771770SStanislav Sedov 95, 31, 14, 92, 86, 193, 88, 89, 76, 29, 922ae771770SStanislav Sedov 71, 91, 94, 25, 86, 95, 158, 70, 89, 49, 923ae771770SStanislav Sedov 70, 33, 34, 165, 36, 86, 70, 88, 89, 217, 924ae771770SStanislav Sedov 99, 43, 39, 94, 85, 86, 93, 49, 84, 51, 925ae771770SStanislav Sedov 52, 71, 8, 24, 40, 90, 9, 10, 11, 61, 926ae771770SStanislav Sedov 86, 14, 64, 65, 91, 86, 86, 90, 88, 89, 927ae771770SStanislav Sedov 32, 73, 25, 67, 94, 77, 78, 79, 86, 81, 928ae771770SStanislav Sedov 33, 34, 84, 36, 86, 94, 37, 94, 67, 94, 929ae771770SStanislav Sedov 43, 86, 66, 86, 96, 53, 49, 86, 51, 52, 930ae771770SStanislav Sedov 92, 92, 89, 83, 92, 95, 91, 12, 61, 12, 931ae771770SStanislav Sedov 93, 64, 65, 97, 92, 12, 89, 94, 93, 89, 932ae771770SStanislav Sedov 73, 93, 41, 46, 77, 78, 79, 93, 81, 93, 933ae771770SStanislav Sedov 95, 107, 93, 86, 176, 181, 104, 10, -1, 108, 934ae771770SStanislav Sedov 99, 196, 180, 96 935ae771770SStanislav Sedov }; 936ae771770SStanislav Sedov 937ae771770SStanislav Sedov /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 938ae771770SStanislav Sedov symbol of state STATE-NUM. */ 939ae771770SStanislav Sedov static const yytype_uint8 yystos[] = 940ae771770SStanislav Sedov { 941ae771770SStanislav Sedov 0, 86, 99, 94, 152, 153, 0, 86, 89, 154, 942ae771770SStanislav Sedov 155, 21, 92, 95, 154, 7, 27, 38, 100, 89, 943ae771770SStanislav Sedov 70, 70, 70, 29, 101, 93, 39, 84, 8, 28, 944ae771770SStanislav Sedov 102, 107, 5, 86, 110, 24, 40, 103, 91, 90, 945ae771770SStanislav Sedov 104, 105, 106, 110, 86, 108, 109, 111, 144, 110, 946ae771770SStanislav Sedov 90, 106, 32, 9, 10, 11, 14, 25, 33, 34, 947ae771770SStanislav Sedov 36, 43, 49, 51, 52, 61, 64, 65, 73, 77, 948ae771770SStanislav Sedov 78, 79, 81, 84, 86, 96, 112, 113, 114, 116, 949ae771770SStanislav Sedov 119, 121, 122, 123, 124, 126, 127, 128, 129, 130, 950ae771770SStanislav Sedov 131, 132, 133, 134, 140, 141, 145, 146, 108, 86, 951ae771770SStanislav Sedov 67, 94, 94, 92, 94, 115, 37, 67, 66, 94, 952ae771770SStanislav Sedov 125, 53, 94, 112, 6, 60, 76, 142, 84, 92, 953ae771770SStanislav Sedov 135, 27, 38, 143, 152, 94, 86, 147, 148, 149, 954ae771770SStanislav Sedov 86, 117, 118, 120, 31, 47, 49, 71, 86, 88, 955ae771770SStanislav Sedov 89, 153, 156, 157, 158, 159, 160, 161, 162, 163, 956ae771770SStanislav Sedov 164, 165, 166, 117, 125, 115, 95, 147, 53, 112, 957ae771770SStanislav Sedov 95, 147, 89, 156, 18, 19, 23, 136, 137, 138, 958ae771770SStanislav Sedov 139, 112, 86, 150, 151, 112, 91, 95, 20, 54, 959ae771770SStanislav Sedov 92, 91, 95, 83, 83, 93, 95, 95, 112, 95, 960ae771770SStanislav Sedov 97, 12, 112, 12, 93, 92, 91, 95, 85, 149, 961ae771770SStanislav Sedov 156, 164, 85, 118, 156, 46, 156, 94, 23, 156, 962ae771770SStanislav Sedov 89, 151, 93, 93, 93, 93, 95, 12, 93, 156 963ae771770SStanislav Sedov }; 964ae771770SStanislav Sedov 965ae771770SStanislav Sedov #define yyerrok (yyerrstatus = 0) 966ae771770SStanislav Sedov #define yyclearin (yychar = YYEMPTY) 967ae771770SStanislav Sedov #define YYEMPTY (-2) 968ae771770SStanislav Sedov #define YYEOF 0 969ae771770SStanislav Sedov 970ae771770SStanislav Sedov #define YYACCEPT goto yyacceptlab 971ae771770SStanislav Sedov #define YYABORT goto yyabortlab 972ae771770SStanislav Sedov #define YYERROR goto yyerrorlab 973ae771770SStanislav Sedov 974ae771770SStanislav Sedov 975ae771770SStanislav Sedov /* Like YYERROR except do call yyerror. This remains here temporarily 976ae771770SStanislav Sedov to ease the transition to the new meaning of YYERROR, for GCC. 977ae771770SStanislav Sedov Once GCC version 2 has supplanted version 1, this can go. */ 978ae771770SStanislav Sedov 979ae771770SStanislav Sedov #define YYFAIL goto yyerrlab 980ae771770SStanislav Sedov 981ae771770SStanislav Sedov #define YYRECOVERING() (!!yyerrstatus) 982ae771770SStanislav Sedov 983ae771770SStanislav Sedov #define YYBACKUP(Token, Value) \ 984ae771770SStanislav Sedov do \ 985ae771770SStanislav Sedov if (yychar == YYEMPTY && yylen == 1) \ 986ae771770SStanislav Sedov { \ 987ae771770SStanislav Sedov yychar = (Token); \ 988ae771770SStanislav Sedov yylval = (Value); \ 989ae771770SStanislav Sedov yytoken = YYTRANSLATE (yychar); \ 990ae771770SStanislav Sedov YYPOPSTACK (1); \ 991ae771770SStanislav Sedov goto yybackup; \ 992ae771770SStanislav Sedov } \ 993ae771770SStanislav Sedov else \ 994ae771770SStanislav Sedov { \ 995ae771770SStanislav Sedov yyerror (YY_("syntax error: cannot back up")); \ 996ae771770SStanislav Sedov YYERROR; \ 997ae771770SStanislav Sedov } \ 998ae771770SStanislav Sedov while (YYID (0)) 999ae771770SStanislav Sedov 1000ae771770SStanislav Sedov 1001ae771770SStanislav Sedov #define YYTERROR 1 1002ae771770SStanislav Sedov #define YYERRCODE 256 1003ae771770SStanislav Sedov 1004ae771770SStanislav Sedov 1005ae771770SStanislav Sedov /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 1006ae771770SStanislav Sedov If N is 0, then set CURRENT to the empty location which ends 1007ae771770SStanislav Sedov the previous symbol: RHS[0] (always defined). */ 1008ae771770SStanislav Sedov 1009ae771770SStanislav Sedov #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 1010ae771770SStanislav Sedov #ifndef YYLLOC_DEFAULT 1011ae771770SStanislav Sedov # define YYLLOC_DEFAULT(Current, Rhs, N) \ 1012ae771770SStanislav Sedov do \ 1013ae771770SStanislav Sedov if (YYID (N)) \ 1014ae771770SStanislav Sedov { \ 1015ae771770SStanislav Sedov (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 1016ae771770SStanislav Sedov (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 1017ae771770SStanislav Sedov (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 1018ae771770SStanislav Sedov (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 1019ae771770SStanislav Sedov } \ 1020ae771770SStanislav Sedov else \ 1021ae771770SStanislav Sedov { \ 1022ae771770SStanislav Sedov (Current).first_line = (Current).last_line = \ 1023ae771770SStanislav Sedov YYRHSLOC (Rhs, 0).last_line; \ 1024ae771770SStanislav Sedov (Current).first_column = (Current).last_column = \ 1025ae771770SStanislav Sedov YYRHSLOC (Rhs, 0).last_column; \ 1026ae771770SStanislav Sedov } \ 1027ae771770SStanislav Sedov while (YYID (0)) 1028ae771770SStanislav Sedov #endif 1029ae771770SStanislav Sedov 1030ae771770SStanislav Sedov 1031ae771770SStanislav Sedov /* YY_LOCATION_PRINT -- Print the location on the stream. 1032ae771770SStanislav Sedov This macro was not mandated originally: define only if we know 1033ae771770SStanislav Sedov we won't break user code: when these are the locations we know. */ 1034ae771770SStanislav Sedov 1035ae771770SStanislav Sedov #ifndef YY_LOCATION_PRINT 1036ae771770SStanislav Sedov # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL 1037ae771770SStanislav Sedov # define YY_LOCATION_PRINT(File, Loc) \ 1038ae771770SStanislav Sedov fprintf (File, "%d.%d-%d.%d", \ 1039ae771770SStanislav Sedov (Loc).first_line, (Loc).first_column, \ 1040ae771770SStanislav Sedov (Loc).last_line, (Loc).last_column) 1041ae771770SStanislav Sedov # else 1042ae771770SStanislav Sedov # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 1043ae771770SStanislav Sedov # endif 1044ae771770SStanislav Sedov #endif 1045ae771770SStanislav Sedov 1046ae771770SStanislav Sedov 1047ae771770SStanislav Sedov /* YYLEX -- calling `yylex' with the right arguments. */ 1048ae771770SStanislav Sedov 1049ae771770SStanislav Sedov #ifdef YYLEX_PARAM 1050ae771770SStanislav Sedov # define YYLEX yylex (YYLEX_PARAM) 1051ae771770SStanislav Sedov #else 1052ae771770SStanislav Sedov # define YYLEX yylex () 1053ae771770SStanislav Sedov #endif 1054ae771770SStanislav Sedov 1055ae771770SStanislav Sedov /* Enable debugging if requested. */ 1056ae771770SStanislav Sedov #if YYDEBUG 1057ae771770SStanislav Sedov 1058ae771770SStanislav Sedov # ifndef YYFPRINTF 1059ae771770SStanislav Sedov # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 1060ae771770SStanislav Sedov # define YYFPRINTF fprintf 1061ae771770SStanislav Sedov # endif 1062ae771770SStanislav Sedov 1063ae771770SStanislav Sedov # define YYDPRINTF(Args) \ 1064ae771770SStanislav Sedov do { \ 1065ae771770SStanislav Sedov if (yydebug) \ 1066ae771770SStanislav Sedov YYFPRINTF Args; \ 1067ae771770SStanislav Sedov } while (YYID (0)) 1068ae771770SStanislav Sedov 1069ae771770SStanislav Sedov # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 1070ae771770SStanislav Sedov do { \ 1071ae771770SStanislav Sedov if (yydebug) \ 1072ae771770SStanislav Sedov { \ 1073ae771770SStanislav Sedov YYFPRINTF (stderr, "%s ", Title); \ 1074ae771770SStanislav Sedov yy_symbol_print (stderr, \ 1075ae771770SStanislav Sedov Type, Value); \ 1076ae771770SStanislav Sedov YYFPRINTF (stderr, "\n"); \ 1077ae771770SStanislav Sedov } \ 1078ae771770SStanislav Sedov } while (YYID (0)) 1079ae771770SStanislav Sedov 1080ae771770SStanislav Sedov 1081ae771770SStanislav Sedov /*--------------------------------. 1082ae771770SStanislav Sedov | Print this symbol on YYOUTPUT. | 1083ae771770SStanislav Sedov `--------------------------------*/ 1084ae771770SStanislav Sedov 1085ae771770SStanislav Sedov /*ARGSUSED*/ 1086ae771770SStanislav Sedov #if (defined __STDC__ || defined __C99__FUNC__ \ 1087ae771770SStanislav Sedov || defined __cplusplus || defined _MSC_VER) 1088ae771770SStanislav Sedov static void 1089ae771770SStanislav Sedov yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 1090ae771770SStanislav Sedov #else 1091ae771770SStanislav Sedov static void 1092ae771770SStanislav Sedov yy_symbol_value_print (yyoutput, yytype, yyvaluep) 1093ae771770SStanislav Sedov FILE *yyoutput; 1094ae771770SStanislav Sedov int yytype; 1095ae771770SStanislav Sedov YYSTYPE const * const yyvaluep; 1096ae771770SStanislav Sedov #endif 1097ae771770SStanislav Sedov { 1098ae771770SStanislav Sedov if (!yyvaluep) 1099ae771770SStanislav Sedov return; 1100ae771770SStanislav Sedov # ifdef YYPRINT 1101ae771770SStanislav Sedov if (yytype < YYNTOKENS) 1102ae771770SStanislav Sedov YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 1103ae771770SStanislav Sedov # else 1104ae771770SStanislav Sedov YYUSE (yyoutput); 1105ae771770SStanislav Sedov # endif 1106ae771770SStanislav Sedov switch (yytype) 1107ae771770SStanislav Sedov { 1108ae771770SStanislav Sedov default: 1109ae771770SStanislav Sedov break; 1110ae771770SStanislav Sedov } 1111ae771770SStanislav Sedov } 1112ae771770SStanislav Sedov 1113ae771770SStanislav Sedov 1114ae771770SStanislav Sedov /*--------------------------------. 1115ae771770SStanislav Sedov | Print this symbol on YYOUTPUT. | 1116ae771770SStanislav Sedov `--------------------------------*/ 1117ae771770SStanislav Sedov 1118ae771770SStanislav Sedov #if (defined __STDC__ || defined __C99__FUNC__ \ 1119ae771770SStanislav Sedov || defined __cplusplus || defined _MSC_VER) 1120ae771770SStanislav Sedov static void 1121ae771770SStanislav Sedov yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 1122ae771770SStanislav Sedov #else 1123ae771770SStanislav Sedov static void 1124ae771770SStanislav Sedov yy_symbol_print (yyoutput, yytype, yyvaluep) 1125ae771770SStanislav Sedov FILE *yyoutput; 1126ae771770SStanislav Sedov int yytype; 1127ae771770SStanislav Sedov YYSTYPE const * const yyvaluep; 1128ae771770SStanislav Sedov #endif 1129ae771770SStanislav Sedov { 1130ae771770SStanislav Sedov if (yytype < YYNTOKENS) 1131ae771770SStanislav Sedov YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 1132ae771770SStanislav Sedov else 1133ae771770SStanislav Sedov YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 1134ae771770SStanislav Sedov 1135ae771770SStanislav Sedov yy_symbol_value_print (yyoutput, yytype, yyvaluep); 1136ae771770SStanislav Sedov YYFPRINTF (yyoutput, ")"); 1137ae771770SStanislav Sedov } 1138ae771770SStanislav Sedov 1139ae771770SStanislav Sedov /*------------------------------------------------------------------. 1140ae771770SStanislav Sedov | yy_stack_print -- Print the state stack from its BOTTOM up to its | 1141ae771770SStanislav Sedov | TOP (included). | 1142ae771770SStanislav Sedov `------------------------------------------------------------------*/ 1143ae771770SStanislav Sedov 1144ae771770SStanislav Sedov #if (defined __STDC__ || defined __C99__FUNC__ \ 1145ae771770SStanislav Sedov || defined __cplusplus || defined _MSC_VER) 1146ae771770SStanislav Sedov static void 1147ae771770SStanislav Sedov yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) 1148ae771770SStanislav Sedov #else 1149ae771770SStanislav Sedov static void 1150ae771770SStanislav Sedov yy_stack_print (bottom, top) 1151ae771770SStanislav Sedov yytype_int16 *bottom; 1152ae771770SStanislav Sedov yytype_int16 *top; 1153ae771770SStanislav Sedov #endif 1154ae771770SStanislav Sedov { 1155ae771770SStanislav Sedov YYFPRINTF (stderr, "Stack now"); 1156ae771770SStanislav Sedov for (; bottom <= top; ++bottom) 1157ae771770SStanislav Sedov YYFPRINTF (stderr, " %d", *bottom); 1158ae771770SStanislav Sedov YYFPRINTF (stderr, "\n"); 1159ae771770SStanislav Sedov } 1160ae771770SStanislav Sedov 1161ae771770SStanislav Sedov # define YY_STACK_PRINT(Bottom, Top) \ 1162ae771770SStanislav Sedov do { \ 1163ae771770SStanislav Sedov if (yydebug) \ 1164ae771770SStanislav Sedov yy_stack_print ((Bottom), (Top)); \ 1165ae771770SStanislav Sedov } while (YYID (0)) 1166ae771770SStanislav Sedov 1167ae771770SStanislav Sedov 1168ae771770SStanislav Sedov /*------------------------------------------------. 1169ae771770SStanislav Sedov | Report that the YYRULE is going to be reduced. | 1170ae771770SStanislav Sedov `------------------------------------------------*/ 1171ae771770SStanislav Sedov 1172ae771770SStanislav Sedov #if (defined __STDC__ || defined __C99__FUNC__ \ 1173ae771770SStanislav Sedov || defined __cplusplus || defined _MSC_VER) 1174ae771770SStanislav Sedov static void 1175ae771770SStanislav Sedov yy_reduce_print (YYSTYPE *yyvsp, int yyrule) 1176ae771770SStanislav Sedov #else 1177ae771770SStanislav Sedov static void 1178ae771770SStanislav Sedov yy_reduce_print (yyvsp, yyrule) 1179ae771770SStanislav Sedov YYSTYPE *yyvsp; 1180ae771770SStanislav Sedov int yyrule; 1181ae771770SStanislav Sedov #endif 1182ae771770SStanislav Sedov { 1183ae771770SStanislav Sedov int yynrhs = yyr2[yyrule]; 1184ae771770SStanislav Sedov int yyi; 1185ae771770SStanislav Sedov unsigned long int yylno = yyrline[yyrule]; 1186ae771770SStanislav Sedov YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 1187ae771770SStanislav Sedov yyrule - 1, yylno); 1188ae771770SStanislav Sedov /* The symbols being reduced. */ 1189ae771770SStanislav Sedov for (yyi = 0; yyi < yynrhs; yyi++) 1190ae771770SStanislav Sedov { 1191ae771770SStanislav Sedov fprintf (stderr, " $%d = ", yyi + 1); 1192ae771770SStanislav Sedov yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 1193ae771770SStanislav Sedov &(yyvsp[(yyi + 1) - (yynrhs)]) 1194ae771770SStanislav Sedov ); 1195ae771770SStanislav Sedov fprintf (stderr, "\n"); 1196ae771770SStanislav Sedov } 1197ae771770SStanislav Sedov } 1198ae771770SStanislav Sedov 1199ae771770SStanislav Sedov # define YY_REDUCE_PRINT(Rule) \ 1200ae771770SStanislav Sedov do { \ 1201ae771770SStanislav Sedov if (yydebug) \ 1202ae771770SStanislav Sedov yy_reduce_print (yyvsp, Rule); \ 1203ae771770SStanislav Sedov } while (YYID (0)) 1204ae771770SStanislav Sedov 1205ae771770SStanislav Sedov /* Nonzero means print parse trace. It is left uninitialized so that 1206ae771770SStanislav Sedov multiple parsers can coexist. */ 1207ae771770SStanislav Sedov int yydebug; 1208ae771770SStanislav Sedov #else /* !YYDEBUG */ 1209ae771770SStanislav Sedov # define YYDPRINTF(Args) 1210ae771770SStanislav Sedov # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 1211ae771770SStanislav Sedov # define YY_STACK_PRINT(Bottom, Top) 1212ae771770SStanislav Sedov # define YY_REDUCE_PRINT(Rule) 1213ae771770SStanislav Sedov #endif /* !YYDEBUG */ 1214ae771770SStanislav Sedov 1215ae771770SStanislav Sedov 1216ae771770SStanislav Sedov /* YYINITDEPTH -- initial size of the parser's stacks. */ 1217ae771770SStanislav Sedov #ifndef YYINITDEPTH 1218ae771770SStanislav Sedov # define YYINITDEPTH 200 1219ae771770SStanislav Sedov #endif 1220ae771770SStanislav Sedov 1221ae771770SStanislav Sedov /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 1222ae771770SStanislav Sedov if the built-in stack extension method is used). 1223ae771770SStanislav Sedov 1224ae771770SStanislav Sedov Do not make this value too large; the results are undefined if 1225ae771770SStanislav Sedov YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 1226ae771770SStanislav Sedov evaluated with infinite-precision integer arithmetic. */ 1227ae771770SStanislav Sedov 1228ae771770SStanislav Sedov #ifndef YYMAXDEPTH 1229ae771770SStanislav Sedov # define YYMAXDEPTH 10000 1230ae771770SStanislav Sedov #endif 1231ae771770SStanislav Sedov 1232ae771770SStanislav Sedov 1233ae771770SStanislav Sedov 1234ae771770SStanislav Sedov #if YYERROR_VERBOSE 1235ae771770SStanislav Sedov 1236ae771770SStanislav Sedov # ifndef yystrlen 1237ae771770SStanislav Sedov # if defined __GLIBC__ && defined _STRING_H 1238ae771770SStanislav Sedov # define yystrlen strlen 1239ae771770SStanislav Sedov # else 1240ae771770SStanislav Sedov /* Return the length of YYSTR. */ 1241ae771770SStanislav Sedov #if (defined __STDC__ || defined __C99__FUNC__ \ 1242ae771770SStanislav Sedov || defined __cplusplus || defined _MSC_VER) 1243ae771770SStanislav Sedov static YYSIZE_T 1244ae771770SStanislav Sedov yystrlen (const char *yystr) 1245ae771770SStanislav Sedov #else 1246ae771770SStanislav Sedov static YYSIZE_T 1247ae771770SStanislav Sedov yystrlen (yystr) 1248ae771770SStanislav Sedov const char *yystr; 1249ae771770SStanislav Sedov #endif 1250ae771770SStanislav Sedov { 1251ae771770SStanislav Sedov YYSIZE_T yylen; 1252ae771770SStanislav Sedov for (yylen = 0; yystr[yylen]; yylen++) 1253ae771770SStanislav Sedov continue; 1254ae771770SStanislav Sedov return yylen; 1255ae771770SStanislav Sedov } 1256ae771770SStanislav Sedov # endif 1257ae771770SStanislav Sedov # endif 1258ae771770SStanislav Sedov 1259ae771770SStanislav Sedov # ifndef yystpcpy 1260ae771770SStanislav Sedov # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 1261ae771770SStanislav Sedov # define yystpcpy stpcpy 1262ae771770SStanislav Sedov # else 1263ae771770SStanislav Sedov /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 1264ae771770SStanislav Sedov YYDEST. */ 1265ae771770SStanislav Sedov #if (defined __STDC__ || defined __C99__FUNC__ \ 1266ae771770SStanislav Sedov || defined __cplusplus || defined _MSC_VER) 1267ae771770SStanislav Sedov static char * 1268ae771770SStanislav Sedov yystpcpy (char *yydest, const char *yysrc) 1269ae771770SStanislav Sedov #else 1270ae771770SStanislav Sedov static char * 1271ae771770SStanislav Sedov yystpcpy (yydest, yysrc) 1272ae771770SStanislav Sedov char *yydest; 1273ae771770SStanislav Sedov const char *yysrc; 1274ae771770SStanislav Sedov #endif 1275ae771770SStanislav Sedov { 1276ae771770SStanislav Sedov char *yyd = yydest; 1277ae771770SStanislav Sedov const char *yys = yysrc; 1278ae771770SStanislav Sedov 1279ae771770SStanislav Sedov while ((*yyd++ = *yys++) != '\0') 1280ae771770SStanislav Sedov continue; 1281ae771770SStanislav Sedov 1282ae771770SStanislav Sedov return yyd - 1; 1283ae771770SStanislav Sedov } 1284ae771770SStanislav Sedov # endif 1285ae771770SStanislav Sedov # endif 1286ae771770SStanislav Sedov 1287ae771770SStanislav Sedov # ifndef yytnamerr 1288ae771770SStanislav Sedov /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 1289ae771770SStanislav Sedov quotes and backslashes, so that it's suitable for yyerror. The 1290ae771770SStanislav Sedov heuristic is that double-quoting is unnecessary unless the string 1291ae771770SStanislav Sedov contains an apostrophe, a comma, or backslash (other than 1292ae771770SStanislav Sedov backslash-backslash). YYSTR is taken from yytname. If YYRES is 1293ae771770SStanislav Sedov null, do not copy; instead, return the length of what the result 1294ae771770SStanislav Sedov would have been. */ 1295ae771770SStanislav Sedov static YYSIZE_T 1296ae771770SStanislav Sedov yytnamerr (char *yyres, const char *yystr) 1297ae771770SStanislav Sedov { 1298ae771770SStanislav Sedov if (*yystr == '"') 1299ae771770SStanislav Sedov { 1300ae771770SStanislav Sedov YYSIZE_T yyn = 0; 1301ae771770SStanislav Sedov char const *yyp = yystr; 1302ae771770SStanislav Sedov 1303ae771770SStanislav Sedov for (;;) 1304ae771770SStanislav Sedov switch (*++yyp) 1305ae771770SStanislav Sedov { 1306ae771770SStanislav Sedov case '\'': 1307ae771770SStanislav Sedov case ',': 1308ae771770SStanislav Sedov goto do_not_strip_quotes; 1309ae771770SStanislav Sedov 1310ae771770SStanislav Sedov case '\\': 1311ae771770SStanislav Sedov if (*++yyp != '\\') 1312ae771770SStanislav Sedov goto do_not_strip_quotes; 1313ae771770SStanislav Sedov /* Fall through. */ 1314ae771770SStanislav Sedov default: 1315ae771770SStanislav Sedov if (yyres) 1316ae771770SStanislav Sedov yyres[yyn] = *yyp; 1317ae771770SStanislav Sedov yyn++; 1318ae771770SStanislav Sedov break; 1319ae771770SStanislav Sedov 1320ae771770SStanislav Sedov case '"': 1321ae771770SStanislav Sedov if (yyres) 1322ae771770SStanislav Sedov yyres[yyn] = '\0'; 1323ae771770SStanislav Sedov return yyn; 1324ae771770SStanislav Sedov } 1325ae771770SStanislav Sedov do_not_strip_quotes: ; 1326ae771770SStanislav Sedov } 1327ae771770SStanislav Sedov 1328ae771770SStanislav Sedov if (! yyres) 1329ae771770SStanislav Sedov return yystrlen (yystr); 1330ae771770SStanislav Sedov 1331ae771770SStanislav Sedov return yystpcpy (yyres, yystr) - yyres; 1332ae771770SStanislav Sedov } 1333ae771770SStanislav Sedov # endif 1334ae771770SStanislav Sedov 1335ae771770SStanislav Sedov /* Copy into YYRESULT an error message about the unexpected token 1336ae771770SStanislav Sedov YYCHAR while in state YYSTATE. Return the number of bytes copied, 1337ae771770SStanislav Sedov including the terminating null byte. If YYRESULT is null, do not 1338ae771770SStanislav Sedov copy anything; just return the number of bytes that would be 1339ae771770SStanislav Sedov copied. As a special case, return 0 if an ordinary "syntax error" 1340ae771770SStanislav Sedov message will do. Return YYSIZE_MAXIMUM if overflow occurs during 1341ae771770SStanislav Sedov size calculation. */ 1342ae771770SStanislav Sedov static YYSIZE_T 1343ae771770SStanislav Sedov yysyntax_error (char *yyresult, int yystate, int yychar) 1344ae771770SStanislav Sedov { 1345ae771770SStanislav Sedov int yyn = yypact[yystate]; 1346ae771770SStanislav Sedov 1347ae771770SStanislav Sedov if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) 1348ae771770SStanislav Sedov return 0; 1349ae771770SStanislav Sedov else 1350ae771770SStanislav Sedov { 1351ae771770SStanislav Sedov int yytype = YYTRANSLATE (yychar); 1352ae771770SStanislav Sedov YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 1353ae771770SStanislav Sedov YYSIZE_T yysize = yysize0; 1354ae771770SStanislav Sedov YYSIZE_T yysize1; 1355ae771770SStanislav Sedov int yysize_overflow = 0; 1356ae771770SStanislav Sedov enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 1357ae771770SStanislav Sedov char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 1358ae771770SStanislav Sedov int yyx; 1359ae771770SStanislav Sedov 1360ae771770SStanislav Sedov # if 0 1361ae771770SStanislav Sedov /* This is so xgettext sees the translatable formats that are 1362ae771770SStanislav Sedov constructed on the fly. */ 1363ae771770SStanislav Sedov YY_("syntax error, unexpected %s"); 1364ae771770SStanislav Sedov YY_("syntax error, unexpected %s, expecting %s"); 1365ae771770SStanislav Sedov YY_("syntax error, unexpected %s, expecting %s or %s"); 1366ae771770SStanislav Sedov YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 1367ae771770SStanislav Sedov YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 1368ae771770SStanislav Sedov # endif 1369ae771770SStanislav Sedov char *yyfmt; 1370ae771770SStanislav Sedov char const *yyf; 1371ae771770SStanislav Sedov static char const yyunexpected[] = "syntax error, unexpected %s"; 1372ae771770SStanislav Sedov static char const yyexpecting[] = ", expecting %s"; 1373ae771770SStanislav Sedov static char const yyor[] = " or %s"; 1374ae771770SStanislav Sedov char yyformat[sizeof yyunexpected 1375ae771770SStanislav Sedov + sizeof yyexpecting - 1 1376ae771770SStanislav Sedov + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) 1377ae771770SStanislav Sedov * (sizeof yyor - 1))]; 1378ae771770SStanislav Sedov char const *yyprefix = yyexpecting; 1379ae771770SStanislav Sedov 1380ae771770SStanislav Sedov /* Start YYX at -YYN if negative to avoid negative indexes in 1381ae771770SStanislav Sedov YYCHECK. */ 1382ae771770SStanislav Sedov int yyxbegin = yyn < 0 ? -yyn : 0; 1383ae771770SStanislav Sedov 1384ae771770SStanislav Sedov /* Stay within bounds of both yycheck and yytname. */ 1385ae771770SStanislav Sedov int yychecklim = YYLAST - yyn + 1; 1386ae771770SStanislav Sedov int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 1387ae771770SStanislav Sedov int yycount = 1; 1388ae771770SStanislav Sedov 1389ae771770SStanislav Sedov yyarg[0] = yytname[yytype]; 1390ae771770SStanislav Sedov yyfmt = yystpcpy (yyformat, yyunexpected); 1391ae771770SStanislav Sedov 1392ae771770SStanislav Sedov for (yyx = yyxbegin; yyx < yyxend; ++yyx) 1393ae771770SStanislav Sedov if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 1394ae771770SStanislav Sedov { 1395ae771770SStanislav Sedov if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 1396ae771770SStanislav Sedov { 1397ae771770SStanislav Sedov yycount = 1; 1398ae771770SStanislav Sedov yysize = yysize0; 1399ae771770SStanislav Sedov yyformat[sizeof yyunexpected - 1] = '\0'; 1400ae771770SStanislav Sedov break; 1401ae771770SStanislav Sedov } 1402ae771770SStanislav Sedov yyarg[yycount++] = yytname[yyx]; 1403ae771770SStanislav Sedov yysize1 = yysize + yytnamerr (0, yytname[yyx]); 1404ae771770SStanislav Sedov yysize_overflow |= (yysize1 < yysize); 1405ae771770SStanislav Sedov yysize = yysize1; 1406ae771770SStanislav Sedov yyfmt = yystpcpy (yyfmt, yyprefix); 1407ae771770SStanislav Sedov yyprefix = yyor; 1408ae771770SStanislav Sedov } 1409ae771770SStanislav Sedov 1410ae771770SStanislav Sedov yyf = YY_(yyformat); 1411ae771770SStanislav Sedov yysize1 = yysize + yystrlen (yyf); 1412ae771770SStanislav Sedov yysize_overflow |= (yysize1 < yysize); 1413ae771770SStanislav Sedov yysize = yysize1; 1414ae771770SStanislav Sedov 1415ae771770SStanislav Sedov if (yysize_overflow) 1416ae771770SStanislav Sedov return YYSIZE_MAXIMUM; 1417ae771770SStanislav Sedov 1418ae771770SStanislav Sedov if (yyresult) 1419ae771770SStanislav Sedov { 1420ae771770SStanislav Sedov /* Avoid sprintf, as that infringes on the user's name space. 1421ae771770SStanislav Sedov Don't have undefined behavior even if the translation 1422ae771770SStanislav Sedov produced a string with the wrong number of "%s"s. */ 1423ae771770SStanislav Sedov char *yyp = yyresult; 1424ae771770SStanislav Sedov int yyi = 0; 1425ae771770SStanislav Sedov while ((*yyp = *yyf) != '\0') 1426ae771770SStanislav Sedov { 1427ae771770SStanislav Sedov if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) 1428ae771770SStanislav Sedov { 1429ae771770SStanislav Sedov yyp += yytnamerr (yyp, yyarg[yyi++]); 1430ae771770SStanislav Sedov yyf += 2; 1431ae771770SStanislav Sedov } 1432ae771770SStanislav Sedov else 1433ae771770SStanislav Sedov { 1434ae771770SStanislav Sedov yyp++; 1435ae771770SStanislav Sedov yyf++; 1436ae771770SStanislav Sedov } 1437ae771770SStanislav Sedov } 1438ae771770SStanislav Sedov } 1439ae771770SStanislav Sedov return yysize; 1440ae771770SStanislav Sedov } 1441ae771770SStanislav Sedov } 1442ae771770SStanislav Sedov #endif /* YYERROR_VERBOSE */ 1443ae771770SStanislav Sedov 1444ae771770SStanislav Sedov 1445ae771770SStanislav Sedov /*-----------------------------------------------. 1446ae771770SStanislav Sedov | Release the memory associated to this symbol. | 1447ae771770SStanislav Sedov `-----------------------------------------------*/ 1448ae771770SStanislav Sedov 1449ae771770SStanislav Sedov /*ARGSUSED*/ 1450ae771770SStanislav Sedov #if (defined __STDC__ || defined __C99__FUNC__ \ 1451ae771770SStanislav Sedov || defined __cplusplus || defined _MSC_VER) 1452ae771770SStanislav Sedov static void 1453ae771770SStanislav Sedov yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 1454ae771770SStanislav Sedov #else 1455ae771770SStanislav Sedov static void 1456ae771770SStanislav Sedov yydestruct (yymsg, yytype, yyvaluep) 1457ae771770SStanislav Sedov const char *yymsg; 1458ae771770SStanislav Sedov int yytype; 1459ae771770SStanislav Sedov YYSTYPE *yyvaluep; 1460ae771770SStanislav Sedov #endif 1461ae771770SStanislav Sedov { 1462ae771770SStanislav Sedov YYUSE (yyvaluep); 1463ae771770SStanislav Sedov 1464ae771770SStanislav Sedov if (!yymsg) 1465ae771770SStanislav Sedov yymsg = "Deleting"; 1466ae771770SStanislav Sedov YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 1467ae771770SStanislav Sedov 1468ae771770SStanislav Sedov switch (yytype) 1469ae771770SStanislav Sedov { 1470ae771770SStanislav Sedov 1471ae771770SStanislav Sedov default: 1472ae771770SStanislav Sedov break; 1473ae771770SStanislav Sedov } 1474ae771770SStanislav Sedov } 1475ae771770SStanislav Sedov 1476ae771770SStanislav Sedov 1477ae771770SStanislav Sedov /* Prevent warnings from -Wmissing-prototypes. */ 1478ae771770SStanislav Sedov 1479ae771770SStanislav Sedov #ifdef YYPARSE_PARAM 1480ae771770SStanislav Sedov #if defined __STDC__ || defined __cplusplus 1481ae771770SStanislav Sedov int yyparse (void *YYPARSE_PARAM); 1482ae771770SStanislav Sedov #else 1483ae771770SStanislav Sedov int yyparse (); 1484ae771770SStanislav Sedov #endif 1485ae771770SStanislav Sedov #else /* ! YYPARSE_PARAM */ 1486ae771770SStanislav Sedov #if defined __STDC__ || defined __cplusplus 1487ae771770SStanislav Sedov int yyparse (void); 1488ae771770SStanislav Sedov #else 1489ae771770SStanislav Sedov int yyparse (); 1490ae771770SStanislav Sedov #endif 1491ae771770SStanislav Sedov #endif /* ! YYPARSE_PARAM */ 1492ae771770SStanislav Sedov 1493ae771770SStanislav Sedov 1494ae771770SStanislav Sedov 1495ae771770SStanislav Sedov /* The look-ahead symbol. */ 1496ae771770SStanislav Sedov int yychar; 1497ae771770SStanislav Sedov 1498ae771770SStanislav Sedov /* The semantic value of the look-ahead symbol. */ 1499ae771770SStanislav Sedov YYSTYPE yylval; 1500ae771770SStanislav Sedov 1501ae771770SStanislav Sedov /* Number of syntax errors so far. */ 1502ae771770SStanislav Sedov int yynerrs; 1503ae771770SStanislav Sedov 1504ae771770SStanislav Sedov 1505ae771770SStanislav Sedov 1506ae771770SStanislav Sedov /*----------. 1507ae771770SStanislav Sedov | yyparse. | 1508ae771770SStanislav Sedov `----------*/ 1509ae771770SStanislav Sedov 1510ae771770SStanislav Sedov #ifdef YYPARSE_PARAM 1511ae771770SStanislav Sedov #if (defined __STDC__ || defined __C99__FUNC__ \ 1512ae771770SStanislav Sedov || defined __cplusplus || defined _MSC_VER) 1513ae771770SStanislav Sedov int 1514ae771770SStanislav Sedov yyparse (void *YYPARSE_PARAM) 1515ae771770SStanislav Sedov #else 1516ae771770SStanislav Sedov int 1517ae771770SStanislav Sedov yyparse (YYPARSE_PARAM) 1518ae771770SStanislav Sedov void *YYPARSE_PARAM; 1519ae771770SStanislav Sedov #endif 1520ae771770SStanislav Sedov #else /* ! YYPARSE_PARAM */ 1521ae771770SStanislav Sedov #if (defined __STDC__ || defined __C99__FUNC__ \ 1522ae771770SStanislav Sedov || defined __cplusplus || defined _MSC_VER) 1523ae771770SStanislav Sedov int 1524ae771770SStanislav Sedov yyparse (void) 1525ae771770SStanislav Sedov #else 1526ae771770SStanislav Sedov int 1527ae771770SStanislav Sedov yyparse () 1528ae771770SStanislav Sedov 1529ae771770SStanislav Sedov #endif 1530ae771770SStanislav Sedov #endif 1531ae771770SStanislav Sedov { 1532ae771770SStanislav Sedov 1533ae771770SStanislav Sedov int yystate; 1534ae771770SStanislav Sedov int yyn; 1535ae771770SStanislav Sedov int yyresult; 1536ae771770SStanislav Sedov /* Number of tokens to shift before error messages enabled. */ 1537ae771770SStanislav Sedov int yyerrstatus; 1538ae771770SStanislav Sedov /* Look-ahead token as an internal (translated) token number. */ 1539ae771770SStanislav Sedov int yytoken = 0; 1540ae771770SStanislav Sedov #if YYERROR_VERBOSE 1541ae771770SStanislav Sedov /* Buffer for error messages, and its allocated size. */ 1542ae771770SStanislav Sedov char yymsgbuf[128]; 1543ae771770SStanislav Sedov char *yymsg = yymsgbuf; 1544ae771770SStanislav Sedov YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 1545ae771770SStanislav Sedov #endif 1546ae771770SStanislav Sedov 1547ae771770SStanislav Sedov /* Three stacks and their tools: 1548ae771770SStanislav Sedov `yyss': related to states, 1549ae771770SStanislav Sedov `yyvs': related to semantic values, 1550ae771770SStanislav Sedov `yyls': related to locations. 1551ae771770SStanislav Sedov 1552ae771770SStanislav Sedov Refer to the stacks thru separate pointers, to allow yyoverflow 1553ae771770SStanislav Sedov to reallocate them elsewhere. */ 1554ae771770SStanislav Sedov 1555ae771770SStanislav Sedov /* The state stack. */ 1556ae771770SStanislav Sedov yytype_int16 yyssa[YYINITDEPTH]; 1557ae771770SStanislav Sedov yytype_int16 *yyss = yyssa; 1558ae771770SStanislav Sedov yytype_int16 *yyssp; 1559ae771770SStanislav Sedov 1560ae771770SStanislav Sedov /* The semantic value stack. */ 1561ae771770SStanislav Sedov YYSTYPE yyvsa[YYINITDEPTH]; 1562ae771770SStanislav Sedov YYSTYPE *yyvs = yyvsa; 1563ae771770SStanislav Sedov YYSTYPE *yyvsp; 1564ae771770SStanislav Sedov 1565ae771770SStanislav Sedov 1566ae771770SStanislav Sedov 1567ae771770SStanislav Sedov #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 1568ae771770SStanislav Sedov 1569ae771770SStanislav Sedov YYSIZE_T yystacksize = YYINITDEPTH; 1570ae771770SStanislav Sedov 1571ae771770SStanislav Sedov /* The variables used to return semantic value and location from the 1572ae771770SStanislav Sedov action routines. */ 1573ae771770SStanislav Sedov YYSTYPE yyval; 1574ae771770SStanislav Sedov 1575ae771770SStanislav Sedov 1576ae771770SStanislav Sedov /* The number of symbols on the RHS of the reduced rule. 1577ae771770SStanislav Sedov Keep to zero when no symbol should be popped. */ 1578ae771770SStanislav Sedov int yylen = 0; 1579ae771770SStanislav Sedov 1580ae771770SStanislav Sedov YYDPRINTF ((stderr, "Starting parse\n")); 1581ae771770SStanislav Sedov 1582ae771770SStanislav Sedov yystate = 0; 1583ae771770SStanislav Sedov yyerrstatus = 0; 1584ae771770SStanislav Sedov yynerrs = 0; 1585ae771770SStanislav Sedov yychar = YYEMPTY; /* Cause a token to be read. */ 1586ae771770SStanislav Sedov 1587ae771770SStanislav Sedov /* Initialize stack pointers. 1588ae771770SStanislav Sedov Waste one element of value and location stack 1589ae771770SStanislav Sedov so that they stay on the same level as the state stack. 1590ae771770SStanislav Sedov The wasted elements are never initialized. */ 1591ae771770SStanislav Sedov 1592ae771770SStanislav Sedov yyssp = yyss; 1593ae771770SStanislav Sedov yyvsp = yyvs; 1594ae771770SStanislav Sedov 1595ae771770SStanislav Sedov goto yysetstate; 1596ae771770SStanislav Sedov 1597ae771770SStanislav Sedov /*------------------------------------------------------------. 1598ae771770SStanislav Sedov | yynewstate -- Push a new state, which is found in yystate. | 1599ae771770SStanislav Sedov `------------------------------------------------------------*/ 1600ae771770SStanislav Sedov yynewstate: 1601ae771770SStanislav Sedov /* In all cases, when you get here, the value and location stacks 1602ae771770SStanislav Sedov have just been pushed. So pushing a state here evens the stacks. */ 1603ae771770SStanislav Sedov yyssp++; 1604ae771770SStanislav Sedov 1605ae771770SStanislav Sedov yysetstate: 1606ae771770SStanislav Sedov *yyssp = yystate; 1607ae771770SStanislav Sedov 1608ae771770SStanislav Sedov if (yyss + yystacksize - 1 <= yyssp) 1609ae771770SStanislav Sedov { 1610ae771770SStanislav Sedov /* Get the current used size of the three stacks, in elements. */ 1611ae771770SStanislav Sedov YYSIZE_T yysize = yyssp - yyss + 1; 1612ae771770SStanislav Sedov 1613ae771770SStanislav Sedov #ifdef yyoverflow 1614ae771770SStanislav Sedov { 1615ae771770SStanislav Sedov /* Give user a chance to reallocate the stack. Use copies of 1616ae771770SStanislav Sedov these so that the &'s don't force the real ones into 1617ae771770SStanislav Sedov memory. */ 1618ae771770SStanislav Sedov YYSTYPE *yyvs1 = yyvs; 1619ae771770SStanislav Sedov yytype_int16 *yyss1 = yyss; 1620ae771770SStanislav Sedov 1621ae771770SStanislav Sedov 1622ae771770SStanislav Sedov /* Each stack pointer address is followed by the size of the 1623ae771770SStanislav Sedov data in use in that stack, in bytes. This used to be a 1624ae771770SStanislav Sedov conditional around just the two extra args, but that might 1625ae771770SStanislav Sedov be undefined if yyoverflow is a macro. */ 1626ae771770SStanislav Sedov yyoverflow (YY_("memory exhausted"), 1627ae771770SStanislav Sedov &yyss1, yysize * sizeof (*yyssp), 1628ae771770SStanislav Sedov &yyvs1, yysize * sizeof (*yyvsp), 1629ae771770SStanislav Sedov 1630ae771770SStanislav Sedov &yystacksize); 1631ae771770SStanislav Sedov 1632ae771770SStanislav Sedov yyss = yyss1; 1633ae771770SStanislav Sedov yyvs = yyvs1; 1634ae771770SStanislav Sedov } 1635ae771770SStanislav Sedov #else /* no yyoverflow */ 1636ae771770SStanislav Sedov # ifndef YYSTACK_RELOCATE 1637ae771770SStanislav Sedov goto yyexhaustedlab; 1638ae771770SStanislav Sedov # else 1639ae771770SStanislav Sedov /* Extend the stack our own way. */ 1640ae771770SStanislav Sedov if (YYMAXDEPTH <= yystacksize) 1641ae771770SStanislav Sedov goto yyexhaustedlab; 1642ae771770SStanislav Sedov yystacksize *= 2; 1643ae771770SStanislav Sedov if (YYMAXDEPTH < yystacksize) 1644ae771770SStanislav Sedov yystacksize = YYMAXDEPTH; 1645ae771770SStanislav Sedov 1646ae771770SStanislav Sedov { 1647ae771770SStanislav Sedov yytype_int16 *yyss1 = yyss; 1648ae771770SStanislav Sedov union yyalloc *yyptr = 1649ae771770SStanislav Sedov (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 1650ae771770SStanislav Sedov if (! yyptr) 1651ae771770SStanislav Sedov goto yyexhaustedlab; 1652ae771770SStanislav Sedov YYSTACK_RELOCATE (yyss); 1653ae771770SStanislav Sedov YYSTACK_RELOCATE (yyvs); 1654ae771770SStanislav Sedov 1655ae771770SStanislav Sedov # undef YYSTACK_RELOCATE 1656ae771770SStanislav Sedov if (yyss1 != yyssa) 1657ae771770SStanislav Sedov YYSTACK_FREE (yyss1); 1658ae771770SStanislav Sedov } 1659ae771770SStanislav Sedov # endif 1660ae771770SStanislav Sedov #endif /* no yyoverflow */ 1661ae771770SStanislav Sedov 1662ae771770SStanislav Sedov yyssp = yyss + yysize - 1; 1663ae771770SStanislav Sedov yyvsp = yyvs + yysize - 1; 1664ae771770SStanislav Sedov 1665ae771770SStanislav Sedov 1666ae771770SStanislav Sedov YYDPRINTF ((stderr, "Stack size increased to %lu\n", 1667ae771770SStanislav Sedov (unsigned long int) yystacksize)); 1668ae771770SStanislav Sedov 1669ae771770SStanislav Sedov if (yyss + yystacksize - 1 <= yyssp) 1670ae771770SStanislav Sedov YYABORT; 1671ae771770SStanislav Sedov } 1672ae771770SStanislav Sedov 1673ae771770SStanislav Sedov YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 1674ae771770SStanislav Sedov 1675ae771770SStanislav Sedov goto yybackup; 1676ae771770SStanislav Sedov 1677ae771770SStanislav Sedov /*-----------. 1678ae771770SStanislav Sedov | yybackup. | 1679ae771770SStanislav Sedov `-----------*/ 1680ae771770SStanislav Sedov yybackup: 1681ae771770SStanislav Sedov 1682ae771770SStanislav Sedov /* Do appropriate processing given the current state. Read a 1683ae771770SStanislav Sedov look-ahead token if we need one and don't already have one. */ 1684ae771770SStanislav Sedov 1685ae771770SStanislav Sedov /* First try to decide what to do without reference to look-ahead token. */ 1686ae771770SStanislav Sedov yyn = yypact[yystate]; 1687ae771770SStanislav Sedov if (yyn == YYPACT_NINF) 1688ae771770SStanislav Sedov goto yydefault; 1689ae771770SStanislav Sedov 1690ae771770SStanislav Sedov /* Not known => get a look-ahead token if don't already have one. */ 1691ae771770SStanislav Sedov 1692ae771770SStanislav Sedov /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ 1693ae771770SStanislav Sedov if (yychar == YYEMPTY) 1694ae771770SStanislav Sedov { 1695ae771770SStanislav Sedov YYDPRINTF ((stderr, "Reading a token: ")); 1696ae771770SStanislav Sedov yychar = YYLEX; 1697ae771770SStanislav Sedov } 1698ae771770SStanislav Sedov 1699ae771770SStanislav Sedov if (yychar <= YYEOF) 1700ae771770SStanislav Sedov { 1701ae771770SStanislav Sedov yychar = yytoken = YYEOF; 1702ae771770SStanislav Sedov YYDPRINTF ((stderr, "Now at end of input.\n")); 1703ae771770SStanislav Sedov } 1704ae771770SStanislav Sedov else 1705ae771770SStanislav Sedov { 1706ae771770SStanislav Sedov yytoken = YYTRANSLATE (yychar); 1707ae771770SStanislav Sedov YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 1708ae771770SStanislav Sedov } 1709ae771770SStanislav Sedov 1710ae771770SStanislav Sedov /* If the proper action on seeing token YYTOKEN is to reduce or to 1711ae771770SStanislav Sedov detect an error, take that action. */ 1712ae771770SStanislav Sedov yyn += yytoken; 1713ae771770SStanislav Sedov if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 1714ae771770SStanislav Sedov goto yydefault; 1715ae771770SStanislav Sedov yyn = yytable[yyn]; 1716ae771770SStanislav Sedov if (yyn <= 0) 1717ae771770SStanislav Sedov { 1718ae771770SStanislav Sedov if (yyn == 0 || yyn == YYTABLE_NINF) 1719ae771770SStanislav Sedov goto yyerrlab; 1720ae771770SStanislav Sedov yyn = -yyn; 1721ae771770SStanislav Sedov goto yyreduce; 1722ae771770SStanislav Sedov } 1723ae771770SStanislav Sedov 1724ae771770SStanislav Sedov if (yyn == YYFINAL) 1725ae771770SStanislav Sedov YYACCEPT; 1726ae771770SStanislav Sedov 1727ae771770SStanislav Sedov /* Count tokens shifted since error; after three, turn off error 1728ae771770SStanislav Sedov status. */ 1729ae771770SStanislav Sedov if (yyerrstatus) 1730ae771770SStanislav Sedov yyerrstatus--; 1731ae771770SStanislav Sedov 1732ae771770SStanislav Sedov /* Shift the look-ahead token. */ 1733ae771770SStanislav Sedov YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 1734ae771770SStanislav Sedov 1735ae771770SStanislav Sedov /* Discard the shifted token unless it is eof. */ 1736ae771770SStanislav Sedov if (yychar != YYEOF) 1737ae771770SStanislav Sedov yychar = YYEMPTY; 1738ae771770SStanislav Sedov 1739ae771770SStanislav Sedov yystate = yyn; 1740ae771770SStanislav Sedov *++yyvsp = yylval; 1741ae771770SStanislav Sedov 1742ae771770SStanislav Sedov goto yynewstate; 1743ae771770SStanislav Sedov 1744ae771770SStanislav Sedov 1745ae771770SStanislav Sedov /*-----------------------------------------------------------. 1746ae771770SStanislav Sedov | yydefault -- do the default action for the current state. | 1747ae771770SStanislav Sedov `-----------------------------------------------------------*/ 1748ae771770SStanislav Sedov yydefault: 1749ae771770SStanislav Sedov yyn = yydefact[yystate]; 1750ae771770SStanislav Sedov if (yyn == 0) 1751ae771770SStanislav Sedov goto yyerrlab; 1752ae771770SStanislav Sedov goto yyreduce; 1753ae771770SStanislav Sedov 1754ae771770SStanislav Sedov 1755ae771770SStanislav Sedov /*-----------------------------. 1756ae771770SStanislav Sedov | yyreduce -- Do a reduction. | 1757ae771770SStanislav Sedov `-----------------------------*/ 1758ae771770SStanislav Sedov yyreduce: 1759ae771770SStanislav Sedov /* yyn is the number of a rule to reduce with. */ 1760ae771770SStanislav Sedov yylen = yyr2[yyn]; 1761ae771770SStanislav Sedov 1762ae771770SStanislav Sedov /* If YYLEN is nonzero, implement the default value of the action: 1763ae771770SStanislav Sedov `$$ = $1'. 1764ae771770SStanislav Sedov 1765ae771770SStanislav Sedov Otherwise, the following line sets YYVAL to garbage. 1766ae771770SStanislav Sedov This behavior is undocumented and Bison 1767ae771770SStanislav Sedov users should not rely upon it. Assigning to YYVAL 1768ae771770SStanislav Sedov unconditionally makes the parser a bit smaller, and it avoids a 1769ae771770SStanislav Sedov GCC warning that YYVAL may be used uninitialized. */ 1770ae771770SStanislav Sedov yyval = yyvsp[1-yylen]; 1771ae771770SStanislav Sedov 1772ae771770SStanislav Sedov 1773ae771770SStanislav Sedov YY_REDUCE_PRINT (yyn); 1774ae771770SStanislav Sedov switch (yyn) 1775ae771770SStanislav Sedov { 1776ae771770SStanislav Sedov case 2: 1777ae771770SStanislav Sedov #line 241 "asn1parse.y" 1778ae771770SStanislav Sedov { 1779ae771770SStanislav Sedov checkundefined(); 1780ae771770SStanislav Sedov } 1781ae771770SStanislav Sedov break; 1782ae771770SStanislav Sedov 1783ae771770SStanislav Sedov case 4: 1784ae771770SStanislav Sedov #line 248 "asn1parse.y" 1785ae771770SStanislav Sedov { lex_error_message("implicit tagging is not supported"); } 1786ae771770SStanislav Sedov break; 1787ae771770SStanislav Sedov 1788ae771770SStanislav Sedov case 5: 1789ae771770SStanislav Sedov #line 250 "asn1parse.y" 1790ae771770SStanislav Sedov { lex_error_message("automatic tagging is not supported"); } 1791ae771770SStanislav Sedov break; 1792ae771770SStanislav Sedov 1793ae771770SStanislav Sedov case 7: 1794ae771770SStanislav Sedov #line 255 "asn1parse.y" 1795ae771770SStanislav Sedov { lex_error_message("no extensibility options supported"); } 1796ae771770SStanislav Sedov break; 1797ae771770SStanislav Sedov 1798ae771770SStanislav Sedov case 17: 1799ae771770SStanislav Sedov #line 276 "asn1parse.y" 1800ae771770SStanislav Sedov { 1801ae771770SStanislav Sedov struct string_list *sl; 1802ae771770SStanislav Sedov for(sl = (yyvsp[(1) - (4)].sl); sl != NULL; sl = sl->next) { 1803ae771770SStanislav Sedov Symbol *s = addsym(sl->string); 1804ae771770SStanislav Sedov s->stype = Stype; 1805ae771770SStanislav Sedov gen_template_import(s); 1806ae771770SStanislav Sedov } 1807ae771770SStanislav Sedov add_import((yyvsp[(3) - (4)].name)); 1808ae771770SStanislav Sedov } 1809ae771770SStanislav Sedov break; 1810ae771770SStanislav Sedov 1811ae771770SStanislav Sedov case 18: 1812ae771770SStanislav Sedov #line 288 "asn1parse.y" 1813ae771770SStanislav Sedov { 1814ae771770SStanislav Sedov struct string_list *sl; 1815ae771770SStanislav Sedov for(sl = (yyvsp[(2) - (3)].sl); sl != NULL; sl = sl->next) 1816ae771770SStanislav Sedov add_export(sl->string); 1817ae771770SStanislav Sedov } 1818ae771770SStanislav Sedov break; 1819ae771770SStanislav Sedov 1820ae771770SStanislav Sedov case 25: 1821ae771770SStanislav Sedov #line 306 "asn1parse.y" 1822ae771770SStanislav Sedov { 1823ae771770SStanislav Sedov (yyval.sl) = emalloc(sizeof(*(yyval.sl))); 1824ae771770SStanislav Sedov (yyval.sl)->string = (yyvsp[(1) - (3)].name); 1825ae771770SStanislav Sedov (yyval.sl)->next = (yyvsp[(3) - (3)].sl); 1826ae771770SStanislav Sedov } 1827ae771770SStanislav Sedov break; 1828ae771770SStanislav Sedov 1829ae771770SStanislav Sedov case 26: 1830ae771770SStanislav Sedov #line 312 "asn1parse.y" 1831ae771770SStanislav Sedov { 1832ae771770SStanislav Sedov (yyval.sl) = emalloc(sizeof(*(yyval.sl))); 1833ae771770SStanislav Sedov (yyval.sl)->string = (yyvsp[(1) - (1)].name); 1834ae771770SStanislav Sedov (yyval.sl)->next = NULL; 1835ae771770SStanislav Sedov } 1836ae771770SStanislav Sedov break; 1837ae771770SStanislav Sedov 1838ae771770SStanislav Sedov case 27: 1839ae771770SStanislav Sedov #line 320 "asn1parse.y" 1840ae771770SStanislav Sedov { 1841ae771770SStanislav Sedov Symbol *s = addsym ((yyvsp[(1) - (3)].name)); 1842ae771770SStanislav Sedov s->stype = Stype; 1843ae771770SStanislav Sedov s->type = (yyvsp[(3) - (3)].type); 1844ae771770SStanislav Sedov fix_labels(s); 1845ae771770SStanislav Sedov generate_type (s); 1846ae771770SStanislav Sedov } 1847ae771770SStanislav Sedov break; 1848ae771770SStanislav Sedov 1849ae771770SStanislav Sedov case 45: 1850ae771770SStanislav Sedov #line 351 "asn1parse.y" 1851ae771770SStanislav Sedov { 1852ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_Boolean, 1853ae771770SStanislav Sedov TE_EXPLICIT, new_type(TBoolean)); 1854ae771770SStanislav Sedov } 1855ae771770SStanislav Sedov break; 1856ae771770SStanislav Sedov 1857ae771770SStanislav Sedov case 46: 1858ae771770SStanislav Sedov #line 358 "asn1parse.y" 1859ae771770SStanislav Sedov { 1860ae771770SStanislav Sedov if((yyvsp[(2) - (5)].value)->type != integervalue) 1861ae771770SStanislav Sedov lex_error_message("Non-integer used in first part of range"); 1862ae771770SStanislav Sedov if((yyvsp[(2) - (5)].value)->type != integervalue) 1863ae771770SStanislav Sedov lex_error_message("Non-integer in second part of range"); 1864ae771770SStanislav Sedov (yyval.range) = ecalloc(1, sizeof(*(yyval.range))); 1865ae771770SStanislav Sedov (yyval.range)->min = (yyvsp[(2) - (5)].value)->u.integervalue; 1866ae771770SStanislav Sedov (yyval.range)->max = (yyvsp[(4) - (5)].value)->u.integervalue; 1867ae771770SStanislav Sedov } 1868ae771770SStanislav Sedov break; 1869ae771770SStanislav Sedov 1870ae771770SStanislav Sedov case 47: 1871ae771770SStanislav Sedov #line 368 "asn1parse.y" 1872ae771770SStanislav Sedov { 1873ae771770SStanislav Sedov if((yyvsp[(2) - (5)].value)->type != integervalue) 1874ae771770SStanislav Sedov lex_error_message("Non-integer in first part of range"); 1875ae771770SStanislav Sedov (yyval.range) = ecalloc(1, sizeof(*(yyval.range))); 1876ae771770SStanislav Sedov (yyval.range)->min = (yyvsp[(2) - (5)].value)->u.integervalue; 1877*1b748759SDimitry Andric (yyval.range)->max = INT_MAX; 1878ae771770SStanislav Sedov } 1879ae771770SStanislav Sedov break; 1880ae771770SStanislav Sedov 1881ae771770SStanislav Sedov case 48: 1882ae771770SStanislav Sedov #line 376 "asn1parse.y" 1883ae771770SStanislav Sedov { 1884ae771770SStanislav Sedov if((yyvsp[(4) - (5)].value)->type != integervalue) 1885ae771770SStanislav Sedov lex_error_message("Non-integer in second part of range"); 1886ae771770SStanislav Sedov (yyval.range) = ecalloc(1, sizeof(*(yyval.range))); 1887*1b748759SDimitry Andric (yyval.range)->min = INT_MIN; 1888ae771770SStanislav Sedov (yyval.range)->max = (yyvsp[(4) - (5)].value)->u.integervalue; 1889ae771770SStanislav Sedov } 1890ae771770SStanislav Sedov break; 1891ae771770SStanislav Sedov 1892ae771770SStanislav Sedov case 49: 1893ae771770SStanislav Sedov #line 384 "asn1parse.y" 1894ae771770SStanislav Sedov { 1895ae771770SStanislav Sedov if((yyvsp[(2) - (3)].value)->type != integervalue) 1896ae771770SStanislav Sedov lex_error_message("Non-integer used in limit"); 1897ae771770SStanislav Sedov (yyval.range) = ecalloc(1, sizeof(*(yyval.range))); 1898ae771770SStanislav Sedov (yyval.range)->min = (yyvsp[(2) - (3)].value)->u.integervalue; 1899ae771770SStanislav Sedov (yyval.range)->max = (yyvsp[(2) - (3)].value)->u.integervalue; 1900ae771770SStanislav Sedov } 1901ae771770SStanislav Sedov break; 1902ae771770SStanislav Sedov 1903ae771770SStanislav Sedov case 50: 1904ae771770SStanislav Sedov #line 395 "asn1parse.y" 1905ae771770SStanislav Sedov { 1906ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_Integer, 1907ae771770SStanislav Sedov TE_EXPLICIT, new_type(TInteger)); 1908ae771770SStanislav Sedov } 1909ae771770SStanislav Sedov break; 1910ae771770SStanislav Sedov 1911ae771770SStanislav Sedov case 51: 1912ae771770SStanislav Sedov #line 400 "asn1parse.y" 1913ae771770SStanislav Sedov { 1914ae771770SStanislav Sedov (yyval.type) = new_type(TInteger); 1915ae771770SStanislav Sedov (yyval.type)->range = (yyvsp[(2) - (2)].range); 1916ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_Integer, TE_EXPLICIT, (yyval.type)); 1917ae771770SStanislav Sedov } 1918ae771770SStanislav Sedov break; 1919ae771770SStanislav Sedov 1920ae771770SStanislav Sedov case 52: 1921ae771770SStanislav Sedov #line 406 "asn1parse.y" 1922ae771770SStanislav Sedov { 1923ae771770SStanislav Sedov (yyval.type) = new_type(TInteger); 1924ae771770SStanislav Sedov (yyval.type)->members = (yyvsp[(3) - (4)].members); 1925ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_Integer, TE_EXPLICIT, (yyval.type)); 1926ae771770SStanislav Sedov } 1927ae771770SStanislav Sedov break; 1928ae771770SStanislav Sedov 1929ae771770SStanislav Sedov case 53: 1930ae771770SStanislav Sedov #line 414 "asn1parse.y" 1931ae771770SStanislav Sedov { 1932ae771770SStanislav Sedov (yyval.members) = emalloc(sizeof(*(yyval.members))); 1933ae771770SStanislav Sedov ASN1_TAILQ_INIT((yyval.members)); 1934ae771770SStanislav Sedov ASN1_TAILQ_INSERT_HEAD((yyval.members), (yyvsp[(1) - (1)].member), members); 1935ae771770SStanislav Sedov } 1936ae771770SStanislav Sedov break; 1937ae771770SStanislav Sedov 1938ae771770SStanislav Sedov case 54: 1939ae771770SStanislav Sedov #line 420 "asn1parse.y" 1940ae771770SStanislav Sedov { 1941ae771770SStanislav Sedov ASN1_TAILQ_INSERT_TAIL((yyvsp[(1) - (3)].members), (yyvsp[(3) - (3)].member), members); 1942ae771770SStanislav Sedov (yyval.members) = (yyvsp[(1) - (3)].members); 1943ae771770SStanislav Sedov } 1944ae771770SStanislav Sedov break; 1945ae771770SStanislav Sedov 1946ae771770SStanislav Sedov case 55: 1947ae771770SStanislav Sedov #line 425 "asn1parse.y" 1948ae771770SStanislav Sedov { (yyval.members) = (yyvsp[(1) - (3)].members); } 1949ae771770SStanislav Sedov break; 1950ae771770SStanislav Sedov 1951ae771770SStanislav Sedov case 56: 1952ae771770SStanislav Sedov #line 429 "asn1parse.y" 1953ae771770SStanislav Sedov { 1954ae771770SStanislav Sedov (yyval.member) = emalloc(sizeof(*(yyval.member))); 1955ae771770SStanislav Sedov (yyval.member)->name = (yyvsp[(1) - (4)].name); 1956ae771770SStanislav Sedov (yyval.member)->gen_name = estrdup((yyvsp[(1) - (4)].name)); 1957ae771770SStanislav Sedov output_name ((yyval.member)->gen_name); 1958ae771770SStanislav Sedov (yyval.member)->val = (yyvsp[(3) - (4)].constant); 1959ae771770SStanislav Sedov (yyval.member)->optional = 0; 1960ae771770SStanislav Sedov (yyval.member)->ellipsis = 0; 1961ae771770SStanislav Sedov (yyval.member)->type = NULL; 1962ae771770SStanislav Sedov } 1963ae771770SStanislav Sedov break; 1964ae771770SStanislav Sedov 1965ae771770SStanislav Sedov case 57: 1966ae771770SStanislav Sedov #line 442 "asn1parse.y" 1967ae771770SStanislav Sedov { 1968ae771770SStanislav Sedov (yyval.type) = new_type(TInteger); 1969ae771770SStanislav Sedov (yyval.type)->members = (yyvsp[(3) - (4)].members); 1970ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_Enumerated, TE_EXPLICIT, (yyval.type)); 1971ae771770SStanislav Sedov } 1972ae771770SStanislav Sedov break; 1973ae771770SStanislav Sedov 1974ae771770SStanislav Sedov case 59: 1975ae771770SStanislav Sedov #line 453 "asn1parse.y" 1976ae771770SStanislav Sedov { 1977ae771770SStanislav Sedov (yyval.type) = new_type(TBitString); 1978ae771770SStanislav Sedov (yyval.type)->members = emalloc(sizeof(*(yyval.type)->members)); 1979ae771770SStanislav Sedov ASN1_TAILQ_INIT((yyval.type)->members); 1980ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_BitString, TE_EXPLICIT, (yyval.type)); 1981ae771770SStanislav Sedov } 1982ae771770SStanislav Sedov break; 1983ae771770SStanislav Sedov 1984ae771770SStanislav Sedov case 60: 1985ae771770SStanislav Sedov #line 460 "asn1parse.y" 1986ae771770SStanislav Sedov { 1987ae771770SStanislav Sedov (yyval.type) = new_type(TBitString); 1988ae771770SStanislav Sedov (yyval.type)->members = (yyvsp[(4) - (5)].members); 1989ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_BitString, TE_EXPLICIT, (yyval.type)); 1990ae771770SStanislav Sedov } 1991ae771770SStanislav Sedov break; 1992ae771770SStanislav Sedov 1993ae771770SStanislav Sedov case 61: 1994ae771770SStanislav Sedov #line 468 "asn1parse.y" 1995ae771770SStanislav Sedov { 1996ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_OID, 1997ae771770SStanislav Sedov TE_EXPLICIT, new_type(TOID)); 1998ae771770SStanislav Sedov } 1999ae771770SStanislav Sedov break; 2000ae771770SStanislav Sedov 2001ae771770SStanislav Sedov case 62: 2002ae771770SStanislav Sedov #line 474 "asn1parse.y" 2003ae771770SStanislav Sedov { 2004ae771770SStanislav Sedov Type *t = new_type(TOctetString); 2005ae771770SStanislav Sedov t->range = (yyvsp[(3) - (3)].range); 2006ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_OctetString, 2007ae771770SStanislav Sedov TE_EXPLICIT, t); 2008ae771770SStanislav Sedov } 2009ae771770SStanislav Sedov break; 2010ae771770SStanislav Sedov 2011ae771770SStanislav Sedov case 63: 2012ae771770SStanislav Sedov #line 483 "asn1parse.y" 2013ae771770SStanislav Sedov { 2014ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_Null, 2015ae771770SStanislav Sedov TE_EXPLICIT, new_type(TNull)); 2016ae771770SStanislav Sedov } 2017ae771770SStanislav Sedov break; 2018ae771770SStanislav Sedov 2019ae771770SStanislav Sedov case 64: 2020ae771770SStanislav Sedov #line 490 "asn1parse.y" 2021ae771770SStanislav Sedov { (yyval.range) = NULL; } 2022ae771770SStanislav Sedov break; 2023ae771770SStanislav Sedov 2024ae771770SStanislav Sedov case 65: 2025ae771770SStanislav Sedov #line 492 "asn1parse.y" 2026ae771770SStanislav Sedov { (yyval.range) = (yyvsp[(2) - (2)].range); } 2027ae771770SStanislav Sedov break; 2028ae771770SStanislav Sedov 2029ae771770SStanislav Sedov case 66: 2030ae771770SStanislav Sedov #line 497 "asn1parse.y" 2031ae771770SStanislav Sedov { 2032ae771770SStanislav Sedov (yyval.type) = new_type(TSequence); 2033ae771770SStanislav Sedov (yyval.type)->members = (yyvsp[(3) - (4)].members); 2034ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_Sequence, TE_EXPLICIT, (yyval.type)); 2035ae771770SStanislav Sedov } 2036ae771770SStanislav Sedov break; 2037ae771770SStanislav Sedov 2038ae771770SStanislav Sedov case 67: 2039ae771770SStanislav Sedov #line 503 "asn1parse.y" 2040ae771770SStanislav Sedov { 2041ae771770SStanislav Sedov (yyval.type) = new_type(TSequence); 2042ae771770SStanislav Sedov (yyval.type)->members = NULL; 2043ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_Sequence, TE_EXPLICIT, (yyval.type)); 2044ae771770SStanislav Sedov } 2045ae771770SStanislav Sedov break; 2046ae771770SStanislav Sedov 2047ae771770SStanislav Sedov case 68: 2048ae771770SStanislav Sedov #line 511 "asn1parse.y" 2049ae771770SStanislav Sedov { 2050ae771770SStanislav Sedov (yyval.type) = new_type(TSequenceOf); 2051ae771770SStanislav Sedov (yyval.type)->range = (yyvsp[(2) - (4)].range); 2052ae771770SStanislav Sedov (yyval.type)->subtype = (yyvsp[(4) - (4)].type); 2053ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_Sequence, TE_EXPLICIT, (yyval.type)); 2054ae771770SStanislav Sedov } 2055ae771770SStanislav Sedov break; 2056ae771770SStanislav Sedov 2057ae771770SStanislav Sedov case 69: 2058ae771770SStanislav Sedov #line 520 "asn1parse.y" 2059ae771770SStanislav Sedov { 2060ae771770SStanislav Sedov (yyval.type) = new_type(TSet); 2061ae771770SStanislav Sedov (yyval.type)->members = (yyvsp[(3) - (4)].members); 2062ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_Set, TE_EXPLICIT, (yyval.type)); 2063ae771770SStanislav Sedov } 2064ae771770SStanislav Sedov break; 2065ae771770SStanislav Sedov 2066ae771770SStanislav Sedov case 70: 2067ae771770SStanislav Sedov #line 526 "asn1parse.y" 2068ae771770SStanislav Sedov { 2069ae771770SStanislav Sedov (yyval.type) = new_type(TSet); 2070ae771770SStanislav Sedov (yyval.type)->members = NULL; 2071ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_Set, TE_EXPLICIT, (yyval.type)); 2072ae771770SStanislav Sedov } 2073ae771770SStanislav Sedov break; 2074ae771770SStanislav Sedov 2075ae771770SStanislav Sedov case 71: 2076ae771770SStanislav Sedov #line 534 "asn1parse.y" 2077ae771770SStanislav Sedov { 2078ae771770SStanislav Sedov (yyval.type) = new_type(TSetOf); 2079ae771770SStanislav Sedov (yyval.type)->subtype = (yyvsp[(3) - (3)].type); 2080ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_Set, TE_EXPLICIT, (yyval.type)); 2081ae771770SStanislav Sedov } 2082ae771770SStanislav Sedov break; 2083ae771770SStanislav Sedov 2084ae771770SStanislav Sedov case 72: 2085ae771770SStanislav Sedov #line 542 "asn1parse.y" 2086ae771770SStanislav Sedov { 2087ae771770SStanislav Sedov (yyval.type) = new_type(TChoice); 2088ae771770SStanislav Sedov (yyval.type)->members = (yyvsp[(3) - (4)].members); 2089ae771770SStanislav Sedov } 2090ae771770SStanislav Sedov break; 2091ae771770SStanislav Sedov 2092ae771770SStanislav Sedov case 75: 2093ae771770SStanislav Sedov #line 553 "asn1parse.y" 2094ae771770SStanislav Sedov { 2095ae771770SStanislav Sedov Symbol *s = addsym((yyvsp[(1) - (1)].name)); 2096ae771770SStanislav Sedov (yyval.type) = new_type(TType); 2097ae771770SStanislav Sedov if(s->stype != Stype && s->stype != SUndefined) 2098ae771770SStanislav Sedov lex_error_message ("%s is not a type\n", (yyvsp[(1) - (1)].name)); 2099ae771770SStanislav Sedov else 2100ae771770SStanislav Sedov (yyval.type)->symbol = s; 2101ae771770SStanislav Sedov } 2102ae771770SStanislav Sedov break; 2103ae771770SStanislav Sedov 2104ae771770SStanislav Sedov case 76: 2105ae771770SStanislav Sedov #line 564 "asn1parse.y" 2106ae771770SStanislav Sedov { 2107ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_GeneralizedTime, 2108ae771770SStanislav Sedov TE_EXPLICIT, new_type(TGeneralizedTime)); 2109ae771770SStanislav Sedov } 2110ae771770SStanislav Sedov break; 2111ae771770SStanislav Sedov 2112ae771770SStanislav Sedov case 77: 2113ae771770SStanislav Sedov #line 569 "asn1parse.y" 2114ae771770SStanislav Sedov { 2115ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_UTCTime, 2116ae771770SStanislav Sedov TE_EXPLICIT, new_type(TUTCTime)); 2117ae771770SStanislav Sedov } 2118ae771770SStanislav Sedov break; 2119ae771770SStanislav Sedov 2120ae771770SStanislav Sedov case 78: 2121ae771770SStanislav Sedov #line 576 "asn1parse.y" 2122ae771770SStanislav Sedov { 2123ae771770SStanislav Sedov /* if (Constraint.type == contentConstrant) { 2124ae771770SStanislav Sedov assert(Constraint.u.constraint.type == octetstring|bitstring-w/o-NamedBitList); // remember to check type reference too 2125ae771770SStanislav Sedov if (Constraint.u.constraint.type) { 2126ae771770SStanislav Sedov assert((Constraint.u.constraint.type.length % 8) == 0); 2127ae771770SStanislav Sedov } 2128ae771770SStanislav Sedov } 2129ae771770SStanislav Sedov if (Constraint.u.constraint.encoding) { 2130ae771770SStanislav Sedov type == der-oid|ber-oid 2131ae771770SStanislav Sedov } 2132ae771770SStanislav Sedov */ 2133ae771770SStanislav Sedov } 2134ae771770SStanislav Sedov break; 2135ae771770SStanislav Sedov 2136ae771770SStanislav Sedov case 79: 2137ae771770SStanislav Sedov #line 592 "asn1parse.y" 2138ae771770SStanislav Sedov { 2139ae771770SStanislav Sedov (yyval.constraint_spec) = (yyvsp[(2) - (3)].constraint_spec); 2140ae771770SStanislav Sedov } 2141ae771770SStanislav Sedov break; 2142ae771770SStanislav Sedov 2143ae771770SStanislav Sedov case 83: 2144ae771770SStanislav Sedov #line 605 "asn1parse.y" 2145ae771770SStanislav Sedov { 2146ae771770SStanislav Sedov (yyval.constraint_spec) = new_constraint_spec(CT_CONTENTS); 2147ae771770SStanislav Sedov (yyval.constraint_spec)->u.content.type = (yyvsp[(2) - (2)].type); 2148ae771770SStanislav Sedov (yyval.constraint_spec)->u.content.encoding = NULL; 2149ae771770SStanislav Sedov } 2150ae771770SStanislav Sedov break; 2151ae771770SStanislav Sedov 2152ae771770SStanislav Sedov case 84: 2153ae771770SStanislav Sedov #line 611 "asn1parse.y" 2154ae771770SStanislav Sedov { 2155ae771770SStanislav Sedov if ((yyvsp[(3) - (3)].value)->type != objectidentifiervalue) 2156ae771770SStanislav Sedov lex_error_message("Non-OID used in ENCODED BY constraint"); 2157ae771770SStanislav Sedov (yyval.constraint_spec) = new_constraint_spec(CT_CONTENTS); 2158ae771770SStanislav Sedov (yyval.constraint_spec)->u.content.type = NULL; 2159ae771770SStanislav Sedov (yyval.constraint_spec)->u.content.encoding = (yyvsp[(3) - (3)].value); 2160ae771770SStanislav Sedov } 2161ae771770SStanislav Sedov break; 2162ae771770SStanislav Sedov 2163ae771770SStanislav Sedov case 85: 2164ae771770SStanislav Sedov #line 619 "asn1parse.y" 2165ae771770SStanislav Sedov { 2166ae771770SStanislav Sedov if ((yyvsp[(5) - (5)].value)->type != objectidentifiervalue) 2167ae771770SStanislav Sedov lex_error_message("Non-OID used in ENCODED BY constraint"); 2168ae771770SStanislav Sedov (yyval.constraint_spec) = new_constraint_spec(CT_CONTENTS); 2169ae771770SStanislav Sedov (yyval.constraint_spec)->u.content.type = (yyvsp[(2) - (5)].type); 2170ae771770SStanislav Sedov (yyval.constraint_spec)->u.content.encoding = (yyvsp[(5) - (5)].value); 2171ae771770SStanislav Sedov } 2172ae771770SStanislav Sedov break; 2173ae771770SStanislav Sedov 2174ae771770SStanislav Sedov case 86: 2175ae771770SStanislav Sedov #line 629 "asn1parse.y" 2176ae771770SStanislav Sedov { 2177ae771770SStanislav Sedov (yyval.constraint_spec) = new_constraint_spec(CT_USER); 2178ae771770SStanislav Sedov } 2179ae771770SStanislav Sedov break; 2180ae771770SStanislav Sedov 2181ae771770SStanislav Sedov case 87: 2182ae771770SStanislav Sedov #line 635 "asn1parse.y" 2183ae771770SStanislav Sedov { 2184ae771770SStanislav Sedov (yyval.type) = new_type(TTag); 2185ae771770SStanislav Sedov (yyval.type)->tag = (yyvsp[(1) - (3)].tag); 2186ae771770SStanislav Sedov (yyval.type)->tag.tagenv = (yyvsp[(2) - (3)].constant); 2187ae771770SStanislav Sedov if((yyvsp[(3) - (3)].type)->type == TTag && (yyvsp[(2) - (3)].constant) == TE_IMPLICIT) { 2188ae771770SStanislav Sedov (yyval.type)->subtype = (yyvsp[(3) - (3)].type)->subtype; 2189ae771770SStanislav Sedov free((yyvsp[(3) - (3)].type)); 2190ae771770SStanislav Sedov } else 2191ae771770SStanislav Sedov (yyval.type)->subtype = (yyvsp[(3) - (3)].type); 2192ae771770SStanislav Sedov } 2193ae771770SStanislav Sedov break; 2194ae771770SStanislav Sedov 2195ae771770SStanislav Sedov case 88: 2196ae771770SStanislav Sedov #line 648 "asn1parse.y" 2197ae771770SStanislav Sedov { 2198ae771770SStanislav Sedov (yyval.tag).tagclass = (yyvsp[(2) - (4)].constant); 2199ae771770SStanislav Sedov (yyval.tag).tagvalue = (yyvsp[(3) - (4)].constant); 2200ae771770SStanislav Sedov (yyval.tag).tagenv = TE_EXPLICIT; 2201ae771770SStanislav Sedov } 2202ae771770SStanislav Sedov break; 2203ae771770SStanislav Sedov 2204ae771770SStanislav Sedov case 89: 2205ae771770SStanislav Sedov #line 656 "asn1parse.y" 2206ae771770SStanislav Sedov { 2207ae771770SStanislav Sedov (yyval.constant) = ASN1_C_CONTEXT; 2208ae771770SStanislav Sedov } 2209ae771770SStanislav Sedov break; 2210ae771770SStanislav Sedov 2211ae771770SStanislav Sedov case 90: 2212ae771770SStanislav Sedov #line 660 "asn1parse.y" 2213ae771770SStanislav Sedov { 2214ae771770SStanislav Sedov (yyval.constant) = ASN1_C_UNIV; 2215ae771770SStanislav Sedov } 2216ae771770SStanislav Sedov break; 2217ae771770SStanislav Sedov 2218ae771770SStanislav Sedov case 91: 2219ae771770SStanislav Sedov #line 664 "asn1parse.y" 2220ae771770SStanislav Sedov { 2221ae771770SStanislav Sedov (yyval.constant) = ASN1_C_APPL; 2222ae771770SStanislav Sedov } 2223ae771770SStanislav Sedov break; 2224ae771770SStanislav Sedov 2225ae771770SStanislav Sedov case 92: 2226ae771770SStanislav Sedov #line 668 "asn1parse.y" 2227ae771770SStanislav Sedov { 2228ae771770SStanislav Sedov (yyval.constant) = ASN1_C_PRIVATE; 2229ae771770SStanislav Sedov } 2230ae771770SStanislav Sedov break; 2231ae771770SStanislav Sedov 2232ae771770SStanislav Sedov case 93: 2233ae771770SStanislav Sedov #line 674 "asn1parse.y" 2234ae771770SStanislav Sedov { 2235ae771770SStanislav Sedov (yyval.constant) = TE_EXPLICIT; 2236ae771770SStanislav Sedov } 2237ae771770SStanislav Sedov break; 2238ae771770SStanislav Sedov 2239ae771770SStanislav Sedov case 94: 2240ae771770SStanislav Sedov #line 678 "asn1parse.y" 2241ae771770SStanislav Sedov { 2242ae771770SStanislav Sedov (yyval.constant) = TE_EXPLICIT; 2243ae771770SStanislav Sedov } 2244ae771770SStanislav Sedov break; 2245ae771770SStanislav Sedov 2246ae771770SStanislav Sedov case 95: 2247ae771770SStanislav Sedov #line 682 "asn1parse.y" 2248ae771770SStanislav Sedov { 2249ae771770SStanislav Sedov (yyval.constant) = TE_IMPLICIT; 2250ae771770SStanislav Sedov } 2251ae771770SStanislav Sedov break; 2252ae771770SStanislav Sedov 2253ae771770SStanislav Sedov case 96: 2254ae771770SStanislav Sedov #line 689 "asn1parse.y" 2255ae771770SStanislav Sedov { 2256ae771770SStanislav Sedov Symbol *s; 2257ae771770SStanislav Sedov s = addsym ((yyvsp[(1) - (4)].name)); 2258ae771770SStanislav Sedov 2259ae771770SStanislav Sedov s->stype = SValue; 2260ae771770SStanislav Sedov s->value = (yyvsp[(4) - (4)].value); 2261ae771770SStanislav Sedov generate_constant (s); 2262ae771770SStanislav Sedov } 2263ae771770SStanislav Sedov break; 2264ae771770SStanislav Sedov 2265ae771770SStanislav Sedov case 98: 2266ae771770SStanislav Sedov #line 703 "asn1parse.y" 2267ae771770SStanislav Sedov { 2268ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_GeneralString, 2269ae771770SStanislav Sedov TE_EXPLICIT, new_type(TGeneralString)); 2270ae771770SStanislav Sedov } 2271ae771770SStanislav Sedov break; 2272ae771770SStanislav Sedov 2273ae771770SStanislav Sedov case 99: 2274ae771770SStanislav Sedov #line 708 "asn1parse.y" 2275ae771770SStanislav Sedov { 2276ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_TeletexString, 2277ae771770SStanislav Sedov TE_EXPLICIT, new_type(TTeletexString)); 2278ae771770SStanislav Sedov } 2279ae771770SStanislav Sedov break; 2280ae771770SStanislav Sedov 2281ae771770SStanislav Sedov case 100: 2282ae771770SStanislav Sedov #line 713 "asn1parse.y" 2283ae771770SStanislav Sedov { 2284ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_UTF8String, 2285ae771770SStanislav Sedov TE_EXPLICIT, new_type(TUTF8String)); 2286ae771770SStanislav Sedov } 2287ae771770SStanislav Sedov break; 2288ae771770SStanislav Sedov 2289ae771770SStanislav Sedov case 101: 2290ae771770SStanislav Sedov #line 718 "asn1parse.y" 2291ae771770SStanislav Sedov { 2292ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_PrintableString, 2293ae771770SStanislav Sedov TE_EXPLICIT, new_type(TPrintableString)); 2294ae771770SStanislav Sedov } 2295ae771770SStanislav Sedov break; 2296ae771770SStanislav Sedov 2297ae771770SStanislav Sedov case 102: 2298ae771770SStanislav Sedov #line 723 "asn1parse.y" 2299ae771770SStanislav Sedov { 2300ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_VisibleString, 2301ae771770SStanislav Sedov TE_EXPLICIT, new_type(TVisibleString)); 2302ae771770SStanislav Sedov } 2303ae771770SStanislav Sedov break; 2304ae771770SStanislav Sedov 2305ae771770SStanislav Sedov case 103: 2306ae771770SStanislav Sedov #line 728 "asn1parse.y" 2307ae771770SStanislav Sedov { 2308ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_IA5String, 2309ae771770SStanislav Sedov TE_EXPLICIT, new_type(TIA5String)); 2310ae771770SStanislav Sedov } 2311ae771770SStanislav Sedov break; 2312ae771770SStanislav Sedov 2313ae771770SStanislav Sedov case 104: 2314ae771770SStanislav Sedov #line 733 "asn1parse.y" 2315ae771770SStanislav Sedov { 2316ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_BMPString, 2317ae771770SStanislav Sedov TE_EXPLICIT, new_type(TBMPString)); 2318ae771770SStanislav Sedov } 2319ae771770SStanislav Sedov break; 2320ae771770SStanislav Sedov 2321ae771770SStanislav Sedov case 105: 2322ae771770SStanislav Sedov #line 738 "asn1parse.y" 2323ae771770SStanislav Sedov { 2324ae771770SStanislav Sedov (yyval.type) = new_tag(ASN1_C_UNIV, UT_UniversalString, 2325ae771770SStanislav Sedov TE_EXPLICIT, new_type(TUniversalString)); 2326ae771770SStanislav Sedov } 2327ae771770SStanislav Sedov break; 2328ae771770SStanislav Sedov 2329ae771770SStanislav Sedov case 106: 2330ae771770SStanislav Sedov #line 746 "asn1parse.y" 2331ae771770SStanislav Sedov { 2332ae771770SStanislav Sedov (yyval.members) = emalloc(sizeof(*(yyval.members))); 2333ae771770SStanislav Sedov ASN1_TAILQ_INIT((yyval.members)); 2334ae771770SStanislav Sedov ASN1_TAILQ_INSERT_HEAD((yyval.members), (yyvsp[(1) - (1)].member), members); 2335ae771770SStanislav Sedov } 2336ae771770SStanislav Sedov break; 2337ae771770SStanislav Sedov 2338ae771770SStanislav Sedov case 107: 2339ae771770SStanislav Sedov #line 752 "asn1parse.y" 2340ae771770SStanislav Sedov { 2341ae771770SStanislav Sedov ASN1_TAILQ_INSERT_TAIL((yyvsp[(1) - (3)].members), (yyvsp[(3) - (3)].member), members); 2342ae771770SStanislav Sedov (yyval.members) = (yyvsp[(1) - (3)].members); 2343ae771770SStanislav Sedov } 2344ae771770SStanislav Sedov break; 2345ae771770SStanislav Sedov 2346ae771770SStanislav Sedov case 108: 2347ae771770SStanislav Sedov #line 757 "asn1parse.y" 2348ae771770SStanislav Sedov { 2349ae771770SStanislav Sedov struct member *m = ecalloc(1, sizeof(*m)); 2350ae771770SStanislav Sedov m->name = estrdup("..."); 2351ae771770SStanislav Sedov m->gen_name = estrdup("asn1_ellipsis"); 2352ae771770SStanislav Sedov m->ellipsis = 1; 2353ae771770SStanislav Sedov ASN1_TAILQ_INSERT_TAIL((yyvsp[(1) - (3)].members), m, members); 2354ae771770SStanislav Sedov (yyval.members) = (yyvsp[(1) - (3)].members); 2355ae771770SStanislav Sedov } 2356ae771770SStanislav Sedov break; 2357ae771770SStanislav Sedov 2358ae771770SStanislav Sedov case 109: 2359ae771770SStanislav Sedov #line 768 "asn1parse.y" 2360ae771770SStanislav Sedov { 2361ae771770SStanislav Sedov (yyval.member) = emalloc(sizeof(*(yyval.member))); 2362ae771770SStanislav Sedov (yyval.member)->name = (yyvsp[(1) - (2)].name); 2363ae771770SStanislav Sedov (yyval.member)->gen_name = estrdup((yyvsp[(1) - (2)].name)); 2364ae771770SStanislav Sedov output_name ((yyval.member)->gen_name); 2365ae771770SStanislav Sedov (yyval.member)->type = (yyvsp[(2) - (2)].type); 2366ae771770SStanislav Sedov (yyval.member)->ellipsis = 0; 2367ae771770SStanislav Sedov } 2368ae771770SStanislav Sedov break; 2369ae771770SStanislav Sedov 2370ae771770SStanislav Sedov case 110: 2371ae771770SStanislav Sedov #line 779 "asn1parse.y" 2372ae771770SStanislav Sedov { 2373ae771770SStanislav Sedov (yyval.member) = (yyvsp[(1) - (1)].member); 2374ae771770SStanislav Sedov (yyval.member)->optional = 0; 2375ae771770SStanislav Sedov (yyval.member)->defval = NULL; 2376ae771770SStanislav Sedov } 2377ae771770SStanislav Sedov break; 2378ae771770SStanislav Sedov 2379ae771770SStanislav Sedov case 111: 2380ae771770SStanislav Sedov #line 785 "asn1parse.y" 2381ae771770SStanislav Sedov { 2382ae771770SStanislav Sedov (yyval.member) = (yyvsp[(1) - (2)].member); 2383ae771770SStanislav Sedov (yyval.member)->optional = 1; 2384ae771770SStanislav Sedov (yyval.member)->defval = NULL; 2385ae771770SStanislav Sedov } 2386ae771770SStanislav Sedov break; 2387ae771770SStanislav Sedov 2388ae771770SStanislav Sedov case 112: 2389ae771770SStanislav Sedov #line 791 "asn1parse.y" 2390ae771770SStanislav Sedov { 2391ae771770SStanislav Sedov (yyval.member) = (yyvsp[(1) - (3)].member); 2392ae771770SStanislav Sedov (yyval.member)->optional = 0; 2393ae771770SStanislav Sedov (yyval.member)->defval = (yyvsp[(3) - (3)].value); 2394ae771770SStanislav Sedov } 2395ae771770SStanislav Sedov break; 2396ae771770SStanislav Sedov 2397ae771770SStanislav Sedov case 113: 2398ae771770SStanislav Sedov #line 799 "asn1parse.y" 2399ae771770SStanislav Sedov { 2400ae771770SStanislav Sedov (yyval.members) = emalloc(sizeof(*(yyval.members))); 2401ae771770SStanislav Sedov ASN1_TAILQ_INIT((yyval.members)); 2402ae771770SStanislav Sedov ASN1_TAILQ_INSERT_HEAD((yyval.members), (yyvsp[(1) - (1)].member), members); 2403ae771770SStanislav Sedov } 2404ae771770SStanislav Sedov break; 2405ae771770SStanislav Sedov 2406ae771770SStanislav Sedov case 114: 2407ae771770SStanislav Sedov #line 805 "asn1parse.y" 2408ae771770SStanislav Sedov { 2409ae771770SStanislav Sedov ASN1_TAILQ_INSERT_TAIL((yyvsp[(1) - (3)].members), (yyvsp[(3) - (3)].member), members); 2410ae771770SStanislav Sedov (yyval.members) = (yyvsp[(1) - (3)].members); 2411ae771770SStanislav Sedov } 2412ae771770SStanislav Sedov break; 2413ae771770SStanislav Sedov 2414ae771770SStanislav Sedov case 115: 2415ae771770SStanislav Sedov #line 812 "asn1parse.y" 2416ae771770SStanislav Sedov { 2417ae771770SStanislav Sedov (yyval.member) = emalloc(sizeof(*(yyval.member))); 2418ae771770SStanislav Sedov (yyval.member)->name = (yyvsp[(1) - (4)].name); 2419ae771770SStanislav Sedov (yyval.member)->gen_name = estrdup((yyvsp[(1) - (4)].name)); 2420ae771770SStanislav Sedov output_name ((yyval.member)->gen_name); 2421ae771770SStanislav Sedov (yyval.member)->val = (yyvsp[(3) - (4)].constant); 2422ae771770SStanislav Sedov (yyval.member)->optional = 0; 2423ae771770SStanislav Sedov (yyval.member)->ellipsis = 0; 2424ae771770SStanislav Sedov (yyval.member)->type = NULL; 2425ae771770SStanislav Sedov } 2426ae771770SStanislav Sedov break; 2427ae771770SStanislav Sedov 2428ae771770SStanislav Sedov case 117: 2429ae771770SStanislav Sedov #line 825 "asn1parse.y" 2430ae771770SStanislav Sedov { (yyval.objid) = NULL; } 2431ae771770SStanislav Sedov break; 2432ae771770SStanislav Sedov 2433ae771770SStanislav Sedov case 118: 2434ae771770SStanislav Sedov #line 829 "asn1parse.y" 2435ae771770SStanislav Sedov { 2436ae771770SStanislav Sedov (yyval.objid) = (yyvsp[(2) - (3)].objid); 2437ae771770SStanislav Sedov } 2438ae771770SStanislav Sedov break; 2439ae771770SStanislav Sedov 2440ae771770SStanislav Sedov case 119: 2441ae771770SStanislav Sedov #line 835 "asn1parse.y" 2442ae771770SStanislav Sedov { 2443ae771770SStanislav Sedov (yyval.objid) = NULL; 2444ae771770SStanislav Sedov } 2445ae771770SStanislav Sedov break; 2446ae771770SStanislav Sedov 2447ae771770SStanislav Sedov case 120: 2448ae771770SStanislav Sedov #line 839 "asn1parse.y" 2449ae771770SStanislav Sedov { 2450ae771770SStanislav Sedov if ((yyvsp[(2) - (2)].objid)) { 2451ae771770SStanislav Sedov (yyval.objid) = (yyvsp[(2) - (2)].objid); 2452ae771770SStanislav Sedov add_oid_to_tail((yyvsp[(2) - (2)].objid), (yyvsp[(1) - (2)].objid)); 2453ae771770SStanislav Sedov } else { 2454ae771770SStanislav Sedov (yyval.objid) = (yyvsp[(1) - (2)].objid); 2455ae771770SStanislav Sedov } 2456ae771770SStanislav Sedov } 2457ae771770SStanislav Sedov break; 2458ae771770SStanislav Sedov 2459ae771770SStanislav Sedov case 121: 2460ae771770SStanislav Sedov #line 850 "asn1parse.y" 2461ae771770SStanislav Sedov { 2462ae771770SStanislav Sedov (yyval.objid) = new_objid((yyvsp[(1) - (4)].name), (yyvsp[(3) - (4)].constant)); 2463ae771770SStanislav Sedov } 2464ae771770SStanislav Sedov break; 2465ae771770SStanislav Sedov 2466ae771770SStanislav Sedov case 122: 2467ae771770SStanislav Sedov #line 854 "asn1parse.y" 2468ae771770SStanislav Sedov { 2469ae771770SStanislav Sedov Symbol *s = addsym((yyvsp[(1) - (1)].name)); 2470ae771770SStanislav Sedov if(s->stype != SValue || 2471ae771770SStanislav Sedov s->value->type != objectidentifiervalue) { 2472ae771770SStanislav Sedov lex_error_message("%s is not an object identifier\n", 2473ae771770SStanislav Sedov s->name); 2474ae771770SStanislav Sedov exit(1); 2475ae771770SStanislav Sedov } 2476ae771770SStanislav Sedov (yyval.objid) = s->value->u.objectidentifiervalue; 2477ae771770SStanislav Sedov } 2478ae771770SStanislav Sedov break; 2479ae771770SStanislav Sedov 2480ae771770SStanislav Sedov case 123: 2481ae771770SStanislav Sedov #line 865 "asn1parse.y" 2482ae771770SStanislav Sedov { 2483ae771770SStanislav Sedov (yyval.objid) = new_objid(NULL, (yyvsp[(1) - (1)].constant)); 2484ae771770SStanislav Sedov } 2485ae771770SStanislav Sedov break; 2486ae771770SStanislav Sedov 2487ae771770SStanislav Sedov case 133: 2488ae771770SStanislav Sedov #line 888 "asn1parse.y" 2489ae771770SStanislav Sedov { 2490ae771770SStanislav Sedov Symbol *s = addsym((yyvsp[(1) - (1)].name)); 2491ae771770SStanislav Sedov if(s->stype != SValue) 2492ae771770SStanislav Sedov lex_error_message ("%s is not a value\n", 2493ae771770SStanislav Sedov s->name); 2494ae771770SStanislav Sedov else 2495ae771770SStanislav Sedov (yyval.value) = s->value; 2496ae771770SStanislav Sedov } 2497ae771770SStanislav Sedov break; 2498ae771770SStanislav Sedov 2499ae771770SStanislav Sedov case 134: 2500ae771770SStanislav Sedov #line 899 "asn1parse.y" 2501ae771770SStanislav Sedov { 2502ae771770SStanislav Sedov (yyval.value) = emalloc(sizeof(*(yyval.value))); 2503ae771770SStanislav Sedov (yyval.value)->type = stringvalue; 2504ae771770SStanislav Sedov (yyval.value)->u.stringvalue = (yyvsp[(1) - (1)].name); 2505ae771770SStanislav Sedov } 2506ae771770SStanislav Sedov break; 2507ae771770SStanislav Sedov 2508ae771770SStanislav Sedov case 135: 2509ae771770SStanislav Sedov #line 907 "asn1parse.y" 2510ae771770SStanislav Sedov { 2511ae771770SStanislav Sedov (yyval.value) = emalloc(sizeof(*(yyval.value))); 2512ae771770SStanislav Sedov (yyval.value)->type = booleanvalue; 2513ae771770SStanislav Sedov (yyval.value)->u.booleanvalue = 0; 2514ae771770SStanislav Sedov } 2515ae771770SStanislav Sedov break; 2516ae771770SStanislav Sedov 2517ae771770SStanislav Sedov case 136: 2518ae771770SStanislav Sedov #line 913 "asn1parse.y" 2519ae771770SStanislav Sedov { 2520ae771770SStanislav Sedov (yyval.value) = emalloc(sizeof(*(yyval.value))); 2521ae771770SStanislav Sedov (yyval.value)->type = booleanvalue; 2522ae771770SStanislav Sedov (yyval.value)->u.booleanvalue = 0; 2523ae771770SStanislav Sedov } 2524ae771770SStanislav Sedov break; 2525ae771770SStanislav Sedov 2526ae771770SStanislav Sedov case 137: 2527ae771770SStanislav Sedov #line 921 "asn1parse.y" 2528ae771770SStanislav Sedov { 2529ae771770SStanislav Sedov (yyval.value) = emalloc(sizeof(*(yyval.value))); 2530ae771770SStanislav Sedov (yyval.value)->type = integervalue; 2531ae771770SStanislav Sedov (yyval.value)->u.integervalue = (yyvsp[(1) - (1)].constant); 2532ae771770SStanislav Sedov } 2533ae771770SStanislav Sedov break; 2534ae771770SStanislav Sedov 2535ae771770SStanislav Sedov case 139: 2536ae771770SStanislav Sedov #line 932 "asn1parse.y" 2537ae771770SStanislav Sedov { 2538ae771770SStanislav Sedov } 2539ae771770SStanislav Sedov break; 2540ae771770SStanislav Sedov 2541ae771770SStanislav Sedov case 140: 2542ae771770SStanislav Sedov #line 937 "asn1parse.y" 2543ae771770SStanislav Sedov { 2544ae771770SStanislav Sedov (yyval.value) = emalloc(sizeof(*(yyval.value))); 2545ae771770SStanislav Sedov (yyval.value)->type = objectidentifiervalue; 2546ae771770SStanislav Sedov (yyval.value)->u.objectidentifiervalue = (yyvsp[(1) - (1)].objid); 2547ae771770SStanislav Sedov } 2548ae771770SStanislav Sedov break; 2549ae771770SStanislav Sedov 2550ae771770SStanislav Sedov 2551ae771770SStanislav Sedov /* Line 1267 of yacc.c. */ 2552ae771770SStanislav Sedov #line 2553 "asn1parse.c" 2553ae771770SStanislav Sedov default: break; 2554ae771770SStanislav Sedov } 2555ae771770SStanislav Sedov YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 2556ae771770SStanislav Sedov 2557ae771770SStanislav Sedov YYPOPSTACK (yylen); 2558ae771770SStanislav Sedov yylen = 0; 2559ae771770SStanislav Sedov YY_STACK_PRINT (yyss, yyssp); 2560ae771770SStanislav Sedov 2561ae771770SStanislav Sedov *++yyvsp = yyval; 2562ae771770SStanislav Sedov 2563ae771770SStanislav Sedov 2564ae771770SStanislav Sedov /* Now `shift' the result of the reduction. Determine what state 2565ae771770SStanislav Sedov that goes to, based on the state we popped back to and the rule 2566ae771770SStanislav Sedov number reduced by. */ 2567ae771770SStanislav Sedov 2568ae771770SStanislav Sedov yyn = yyr1[yyn]; 2569ae771770SStanislav Sedov 2570ae771770SStanislav Sedov yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 2571ae771770SStanislav Sedov if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 2572ae771770SStanislav Sedov yystate = yytable[yystate]; 2573ae771770SStanislav Sedov else 2574ae771770SStanislav Sedov yystate = yydefgoto[yyn - YYNTOKENS]; 2575ae771770SStanislav Sedov 2576ae771770SStanislav Sedov goto yynewstate; 2577ae771770SStanislav Sedov 2578ae771770SStanislav Sedov 2579ae771770SStanislav Sedov /*------------------------------------. 2580ae771770SStanislav Sedov | yyerrlab -- here on detecting error | 2581ae771770SStanislav Sedov `------------------------------------*/ 2582ae771770SStanislav Sedov yyerrlab: 2583ae771770SStanislav Sedov /* If not already recovering from an error, report this error. */ 2584ae771770SStanislav Sedov if (!yyerrstatus) 2585ae771770SStanislav Sedov { 2586ae771770SStanislav Sedov ++yynerrs; 2587ae771770SStanislav Sedov #if ! YYERROR_VERBOSE 2588ae771770SStanislav Sedov yyerror (YY_("syntax error")); 2589ae771770SStanislav Sedov #else 2590ae771770SStanislav Sedov { 2591ae771770SStanislav Sedov YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); 2592ae771770SStanislav Sedov if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) 2593ae771770SStanislav Sedov { 2594ae771770SStanislav Sedov YYSIZE_T yyalloc = 2 * yysize; 2595ae771770SStanislav Sedov if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) 2596ae771770SStanislav Sedov yyalloc = YYSTACK_ALLOC_MAXIMUM; 2597ae771770SStanislav Sedov if (yymsg != yymsgbuf) 2598ae771770SStanislav Sedov YYSTACK_FREE (yymsg); 2599ae771770SStanislav Sedov yymsg = (char *) YYSTACK_ALLOC (yyalloc); 2600ae771770SStanislav Sedov if (yymsg) 2601ae771770SStanislav Sedov yymsg_alloc = yyalloc; 2602ae771770SStanislav Sedov else 2603ae771770SStanislav Sedov { 2604ae771770SStanislav Sedov yymsg = yymsgbuf; 2605ae771770SStanislav Sedov yymsg_alloc = sizeof yymsgbuf; 2606ae771770SStanislav Sedov } 2607ae771770SStanislav Sedov } 2608ae771770SStanislav Sedov 2609ae771770SStanislav Sedov if (0 < yysize && yysize <= yymsg_alloc) 2610ae771770SStanislav Sedov { 2611ae771770SStanislav Sedov (void) yysyntax_error (yymsg, yystate, yychar); 2612ae771770SStanislav Sedov yyerror (yymsg); 2613ae771770SStanislav Sedov } 2614ae771770SStanislav Sedov else 2615ae771770SStanislav Sedov { 2616ae771770SStanislav Sedov yyerror (YY_("syntax error")); 2617ae771770SStanislav Sedov if (yysize != 0) 2618ae771770SStanislav Sedov goto yyexhaustedlab; 2619ae771770SStanislav Sedov } 2620ae771770SStanislav Sedov } 2621ae771770SStanislav Sedov #endif 2622ae771770SStanislav Sedov } 2623ae771770SStanislav Sedov 2624ae771770SStanislav Sedov 2625ae771770SStanislav Sedov 2626ae771770SStanislav Sedov if (yyerrstatus == 3) 2627ae771770SStanislav Sedov { 2628ae771770SStanislav Sedov /* If just tried and failed to reuse look-ahead token after an 2629ae771770SStanislav Sedov error, discard it. */ 2630ae771770SStanislav Sedov 2631ae771770SStanislav Sedov if (yychar <= YYEOF) 2632ae771770SStanislav Sedov { 2633ae771770SStanislav Sedov /* Return failure if at end of input. */ 2634ae771770SStanislav Sedov if (yychar == YYEOF) 2635ae771770SStanislav Sedov YYABORT; 2636ae771770SStanislav Sedov } 2637ae771770SStanislav Sedov else 2638ae771770SStanislav Sedov { 2639ae771770SStanislav Sedov yydestruct ("Error: discarding", 2640ae771770SStanislav Sedov yytoken, &yylval); 2641ae771770SStanislav Sedov yychar = YYEMPTY; 2642ae771770SStanislav Sedov } 2643ae771770SStanislav Sedov } 2644ae771770SStanislav Sedov 2645ae771770SStanislav Sedov /* Else will try to reuse look-ahead token after shifting the error 2646ae771770SStanislav Sedov token. */ 2647ae771770SStanislav Sedov goto yyerrlab1; 2648ae771770SStanislav Sedov 2649ae771770SStanislav Sedov 2650ae771770SStanislav Sedov /*---------------------------------------------------. 2651ae771770SStanislav Sedov | yyerrorlab -- error raised explicitly by YYERROR. | 2652ae771770SStanislav Sedov `---------------------------------------------------*/ 2653ae771770SStanislav Sedov yyerrorlab: 2654ae771770SStanislav Sedov 2655ae771770SStanislav Sedov /* Pacify compilers like GCC when the user code never invokes 2656ae771770SStanislav Sedov YYERROR and the label yyerrorlab therefore never appears in user 2657ae771770SStanislav Sedov code. */ 2658ae771770SStanislav Sedov if (/*CONSTCOND*/ 0) 2659ae771770SStanislav Sedov goto yyerrorlab; 2660ae771770SStanislav Sedov 2661ae771770SStanislav Sedov /* Do not reclaim the symbols of the rule which action triggered 2662ae771770SStanislav Sedov this YYERROR. */ 2663ae771770SStanislav Sedov YYPOPSTACK (yylen); 2664ae771770SStanislav Sedov yylen = 0; 2665ae771770SStanislav Sedov YY_STACK_PRINT (yyss, yyssp); 2666ae771770SStanislav Sedov yystate = *yyssp; 2667ae771770SStanislav Sedov goto yyerrlab1; 2668ae771770SStanislav Sedov 2669ae771770SStanislav Sedov 2670ae771770SStanislav Sedov /*-------------------------------------------------------------. 2671ae771770SStanislav Sedov | yyerrlab1 -- common code for both syntax error and YYERROR. | 2672ae771770SStanislav Sedov `-------------------------------------------------------------*/ 2673ae771770SStanislav Sedov yyerrlab1: 2674ae771770SStanislav Sedov yyerrstatus = 3; /* Each real token shifted decrements this. */ 2675ae771770SStanislav Sedov 2676ae771770SStanislav Sedov for (;;) 2677ae771770SStanislav Sedov { 2678ae771770SStanislav Sedov yyn = yypact[yystate]; 2679ae771770SStanislav Sedov if (yyn != YYPACT_NINF) 2680ae771770SStanislav Sedov { 2681ae771770SStanislav Sedov yyn += YYTERROR; 2682ae771770SStanislav Sedov if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 2683ae771770SStanislav Sedov { 2684ae771770SStanislav Sedov yyn = yytable[yyn]; 2685ae771770SStanislav Sedov if (0 < yyn) 2686ae771770SStanislav Sedov break; 2687ae771770SStanislav Sedov } 2688ae771770SStanislav Sedov } 2689ae771770SStanislav Sedov 2690ae771770SStanislav Sedov /* Pop the current state because it cannot handle the error token. */ 2691ae771770SStanislav Sedov if (yyssp == yyss) 2692ae771770SStanislav Sedov YYABORT; 2693ae771770SStanislav Sedov 2694ae771770SStanislav Sedov 2695ae771770SStanislav Sedov yydestruct ("Error: popping", 2696ae771770SStanislav Sedov yystos[yystate], yyvsp); 2697ae771770SStanislav Sedov YYPOPSTACK (1); 2698ae771770SStanislav Sedov yystate = *yyssp; 2699ae771770SStanislav Sedov YY_STACK_PRINT (yyss, yyssp); 2700ae771770SStanislav Sedov } 2701ae771770SStanislav Sedov 2702ae771770SStanislav Sedov if (yyn == YYFINAL) 2703ae771770SStanislav Sedov YYACCEPT; 2704ae771770SStanislav Sedov 2705ae771770SStanislav Sedov *++yyvsp = yylval; 2706ae771770SStanislav Sedov 2707ae771770SStanislav Sedov 2708ae771770SStanislav Sedov /* Shift the error token. */ 2709ae771770SStanislav Sedov YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 2710ae771770SStanislav Sedov 2711ae771770SStanislav Sedov yystate = yyn; 2712ae771770SStanislav Sedov goto yynewstate; 2713ae771770SStanislav Sedov 2714ae771770SStanislav Sedov 2715ae771770SStanislav Sedov /*-------------------------------------. 2716ae771770SStanislav Sedov | yyacceptlab -- YYACCEPT comes here. | 2717ae771770SStanislav Sedov `-------------------------------------*/ 2718ae771770SStanislav Sedov yyacceptlab: 2719ae771770SStanislav Sedov yyresult = 0; 2720ae771770SStanislav Sedov goto yyreturn; 2721ae771770SStanislav Sedov 2722ae771770SStanislav Sedov /*-----------------------------------. 2723ae771770SStanislav Sedov | yyabortlab -- YYABORT comes here. | 2724ae771770SStanislav Sedov `-----------------------------------*/ 2725ae771770SStanislav Sedov yyabortlab: 2726ae771770SStanislav Sedov yyresult = 1; 2727ae771770SStanislav Sedov goto yyreturn; 2728ae771770SStanislav Sedov 2729ae771770SStanislav Sedov #ifndef yyoverflow 2730ae771770SStanislav Sedov /*-------------------------------------------------. 2731ae771770SStanislav Sedov | yyexhaustedlab -- memory exhaustion comes here. | 2732ae771770SStanislav Sedov `-------------------------------------------------*/ 2733ae771770SStanislav Sedov yyexhaustedlab: 2734ae771770SStanislav Sedov yyerror (YY_("memory exhausted")); 2735ae771770SStanislav Sedov yyresult = 2; 2736ae771770SStanislav Sedov /* Fall through. */ 2737ae771770SStanislav Sedov #endif 2738ae771770SStanislav Sedov 2739ae771770SStanislav Sedov yyreturn: 2740ae771770SStanislav Sedov if (yychar != YYEOF && yychar != YYEMPTY) 2741ae771770SStanislav Sedov yydestruct ("Cleanup: discarding lookahead", 2742ae771770SStanislav Sedov yytoken, &yylval); 2743ae771770SStanislav Sedov /* Do not reclaim the symbols of the rule which action triggered 2744ae771770SStanislav Sedov this YYABORT or YYACCEPT. */ 2745ae771770SStanislav Sedov YYPOPSTACK (yylen); 2746ae771770SStanislav Sedov YY_STACK_PRINT (yyss, yyssp); 2747ae771770SStanislav Sedov while (yyssp != yyss) 2748ae771770SStanislav Sedov { 2749ae771770SStanislav Sedov yydestruct ("Cleanup: popping", 2750ae771770SStanislav Sedov yystos[*yyssp], yyvsp); 2751ae771770SStanislav Sedov YYPOPSTACK (1); 2752ae771770SStanislav Sedov } 2753ae771770SStanislav Sedov #ifndef yyoverflow 2754ae771770SStanislav Sedov if (yyss != yyssa) 2755ae771770SStanislav Sedov YYSTACK_FREE (yyss); 2756ae771770SStanislav Sedov #endif 2757ae771770SStanislav Sedov #if YYERROR_VERBOSE 2758ae771770SStanislav Sedov if (yymsg != yymsgbuf) 2759ae771770SStanislav Sedov YYSTACK_FREE (yymsg); 2760ae771770SStanislav Sedov #endif 2761ae771770SStanislav Sedov /* Make sure YYID is used. */ 2762ae771770SStanislav Sedov return YYID (yyresult); 2763ae771770SStanislav Sedov } 2764ae771770SStanislav Sedov 2765ae771770SStanislav Sedov 2766ae771770SStanislav Sedov #line 944 "asn1parse.y" 2767ae771770SStanislav Sedov 2768ae771770SStanislav Sedov 2769ae771770SStanislav Sedov void 2770ae771770SStanislav Sedov yyerror (const char *s) 2771ae771770SStanislav Sedov { 2772ae771770SStanislav Sedov lex_error_message ("%s\n", s); 2773ae771770SStanislav Sedov } 2774ae771770SStanislav Sedov 2775ae771770SStanislav Sedov static Type * 2776ae771770SStanislav Sedov new_tag(int tagclass, int tagvalue, int tagenv, Type *oldtype) 2777ae771770SStanislav Sedov { 2778ae771770SStanislav Sedov Type *t; 2779ae771770SStanislav Sedov if(oldtype->type == TTag && oldtype->tag.tagenv == TE_IMPLICIT) { 2780ae771770SStanislav Sedov t = oldtype; 2781ae771770SStanislav Sedov oldtype = oldtype->subtype; /* XXX */ 2782ae771770SStanislav Sedov } else 2783ae771770SStanislav Sedov t = new_type (TTag); 2784ae771770SStanislav Sedov 2785ae771770SStanislav Sedov t->tag.tagclass = tagclass; 2786ae771770SStanislav Sedov t->tag.tagvalue = tagvalue; 2787ae771770SStanislav Sedov t->tag.tagenv = tagenv; 2788ae771770SStanislav Sedov t->subtype = oldtype; 2789ae771770SStanislav Sedov return t; 2790ae771770SStanislav Sedov } 2791ae771770SStanislav Sedov 2792ae771770SStanislav Sedov static struct objid * 2793ae771770SStanislav Sedov new_objid(const char *label, int value) 2794ae771770SStanislav Sedov { 2795ae771770SStanislav Sedov struct objid *s; 2796ae771770SStanislav Sedov s = emalloc(sizeof(*s)); 2797ae771770SStanislav Sedov s->label = label; 2798ae771770SStanislav Sedov s->value = value; 2799ae771770SStanislav Sedov s->next = NULL; 2800ae771770SStanislav Sedov return s; 2801ae771770SStanislav Sedov } 2802ae771770SStanislav Sedov 2803ae771770SStanislav Sedov static void 2804ae771770SStanislav Sedov add_oid_to_tail(struct objid *head, struct objid *tail) 2805ae771770SStanislav Sedov { 2806ae771770SStanislav Sedov struct objid *o; 2807ae771770SStanislav Sedov o = head; 2808ae771770SStanislav Sedov while (o->next) 2809ae771770SStanislav Sedov o = o->next; 2810ae771770SStanislav Sedov o->next = tail; 2811ae771770SStanislav Sedov } 2812ae771770SStanislav Sedov 2813ae771770SStanislav Sedov static Type * 2814ae771770SStanislav Sedov new_type (Typetype tt) 2815ae771770SStanislav Sedov { 2816ae771770SStanislav Sedov Type *t = ecalloc(1, sizeof(*t)); 2817ae771770SStanislav Sedov t->type = tt; 2818ae771770SStanislav Sedov return t; 2819ae771770SStanislav Sedov } 2820ae771770SStanislav Sedov 2821ae771770SStanislav Sedov static struct constraint_spec * 2822ae771770SStanislav Sedov new_constraint_spec(enum ctype ct) 2823ae771770SStanislav Sedov { 2824ae771770SStanislav Sedov struct constraint_spec *c = ecalloc(1, sizeof(*c)); 2825ae771770SStanislav Sedov c->ctype = ct; 2826ae771770SStanislav Sedov return c; 2827ae771770SStanislav Sedov } 2828ae771770SStanislav Sedov 2829ae771770SStanislav Sedov static void fix_labels2(Type *t, const char *prefix); 2830ae771770SStanislav Sedov static void fix_labels1(struct memhead *members, const char *prefix) 2831ae771770SStanislav Sedov { 2832ae771770SStanislav Sedov Member *m; 2833ae771770SStanislav Sedov 2834ae771770SStanislav Sedov if(members == NULL) 2835ae771770SStanislav Sedov return; 2836ae771770SStanislav Sedov ASN1_TAILQ_FOREACH(m, members, members) { 2837ae771770SStanislav Sedov if (asprintf(&m->label, "%s_%s", prefix, m->gen_name) < 0) 2838ae771770SStanislav Sedov errx(1, "malloc"); 2839ae771770SStanislav Sedov if (m->label == NULL) 2840ae771770SStanislav Sedov errx(1, "malloc"); 2841ae771770SStanislav Sedov if(m->type != NULL) 2842ae771770SStanislav Sedov fix_labels2(m->type, m->label); 2843ae771770SStanislav Sedov } 2844ae771770SStanislav Sedov } 2845ae771770SStanislav Sedov 2846ae771770SStanislav Sedov static void fix_labels2(Type *t, const char *prefix) 2847ae771770SStanislav Sedov { 2848ae771770SStanislav Sedov for(; t; t = t->subtype) 2849ae771770SStanislav Sedov fix_labels1(t->members, prefix); 2850ae771770SStanislav Sedov } 2851ae771770SStanislav Sedov 2852ae771770SStanislav Sedov static void 2853ae771770SStanislav Sedov fix_labels(Symbol *s) 2854ae771770SStanislav Sedov { 2855ae771770SStanislav Sedov char *p = NULL; 2856ae771770SStanislav Sedov if (asprintf(&p, "choice_%s", s->gen_name) < 0 || p == NULL) 2857ae771770SStanislav Sedov errx(1, "malloc"); 2858ae771770SStanislav Sedov fix_labels2(s->type, p); 2859ae771770SStanislav Sedov free(p); 2860ae771770SStanislav Sedov } 2861ae771770SStanislav Sedov 2862