Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1 | /* A Bison parser, made by GNU Bison 2.3. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3 | /* Skeleton implementation for Bison's Yacc-like parsers in C |
| 4 | |
| 5 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 |
| 6 | Free Software Foundation, Inc. |
| 7 | |
| 8 | This program is free software; you can redistribute it and/or modify |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 9 | it under the terms of the GNU General Public License as published by |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 10 | the Free Software Foundation; either version 2, or (at your option) |
| 11 | any later version. |
| 12 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 13 | This program is distributed in the hope that it will be useful, |
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | GNU General Public License for more details. |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 17 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 18 | You should have received a copy of the GNU General Public License |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 19 | along with this program; if not, write to the Free Software |
| 20 | Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 21 | Boston, MA 02110-1301, USA. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 22 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 23 | /* As a special exception, you may create a larger work that contains |
| 24 | part or all of the Bison parser skeleton and distribute that work |
| 25 | under terms of your choice, so long as that work isn't itself a |
| 26 | parser generator using the skeleton or a modified version thereof |
| 27 | as a parser skeleton. Alternatively, if you modify or redistribute |
| 28 | the parser skeleton itself, you may (at your option) remove this |
| 29 | special exception, which will cause the skeleton and the resulting |
| 30 | Bison output files to be licensed under the GNU General Public |
| 31 | License without this special exception. |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 32 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 33 | This special exception was added by the Free Software Foundation in |
| 34 | version 2.2 of Bison. */ |
| 35 | |
| 36 | /* C LALR(1) parser skeleton written by Richard Stallman, by |
| 37 | simplifying the original so-called "semantic" parser. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 38 | |
| 39 | /* All symbols defined below should begin with yy or YY, to avoid |
| 40 | infringing on user name space. This should be done even for local |
| 41 | variables, as they might otherwise be expanded by user macros. |
| 42 | There are some unavoidable exceptions within include files to |
| 43 | define necessary library symbols; they are noted "INFRINGES ON |
| 44 | USER NAME SPACE" below. */ |
| 45 | |
| 46 | /* Identify Bison output. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 47 | #define YYBISON 1 |
| 48 | |
| 49 | /* Bison version. */ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 50 | #define YYBISON_VERSION "2.3" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 51 | |
| 52 | /* Skeleton name. */ |
| 53 | #define YYSKELETON_NAME "yacc.c" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 54 | |
| 55 | /* Pure parsers. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 56 | #define YYPURE 0 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 57 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 58 | /* Using locations. */ |
| 59 | #define YYLSP_NEEDED 0 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 60 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 61 | /* Substitute the variable and function names. */ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 62 | #define yyparse asn1p_parse |
| 63 | #define yylex asn1p_lex |
| 64 | #define yyerror asn1p_error |
| 65 | #define yylval asn1p_lval |
| 66 | #define yychar asn1p_char |
| 67 | #define yydebug asn1p_debug |
| 68 | #define yynerrs asn1p_nerrs |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 69 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 70 | |
| 71 | /* Tokens. */ |
| 72 | #ifndef YYTOKENTYPE |
| 73 | # define YYTOKENTYPE |
| 74 | /* Put the tokens into the symbol table, so that GDB and other debuggers |
| 75 | know about them. */ |
| 76 | enum yytokentype { |
| 77 | TOK_PPEQ = 258, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 78 | TOK_VBracketLeft = 259, |
| 79 | TOK_VBracketRight = 260, |
| 80 | TOK_whitespace = 261, |
| 81 | TOK_opaque = 262, |
| 82 | TOK_bstring = 263, |
| 83 | TOK_cstring = 264, |
| 84 | TOK_hstring = 265, |
| 85 | TOK_identifier = 266, |
| 86 | TOK_number = 267, |
| 87 | TOK_number_negative = 268, |
| 88 | TOK_realnumber = 269, |
| 89 | TOK_tuple = 270, |
| 90 | TOK_quadruple = 271, |
| 91 | TOK_typereference = 272, |
| 92 | TOK_capitalreference = 273, |
| 93 | TOK_typefieldreference = 274, |
| 94 | TOK_valuefieldreference = 275, |
| 95 | TOK_Literal = 276, |
| 96 | TOK_ABSENT = 277, |
| 97 | TOK_ABSTRACT_SYNTAX = 278, |
| 98 | TOK_ALL = 279, |
| 99 | TOK_ANY = 280, |
| 100 | TOK_APPLICATION = 281, |
| 101 | TOK_AUTOMATIC = 282, |
| 102 | TOK_BEGIN = 283, |
| 103 | TOK_BIT = 284, |
| 104 | TOK_BMPString = 285, |
| 105 | TOK_BOOLEAN = 286, |
| 106 | TOK_BY = 287, |
| 107 | TOK_CHARACTER = 288, |
| 108 | TOK_CHOICE = 289, |
| 109 | TOK_CLASS = 290, |
| 110 | TOK_COMPONENT = 291, |
| 111 | TOK_COMPONENTS = 292, |
| 112 | TOK_CONSTRAINED = 293, |
| 113 | TOK_CONTAINING = 294, |
| 114 | TOK_DEFAULT = 295, |
| 115 | TOK_DEFINITIONS = 296, |
| 116 | TOK_DEFINED = 297, |
| 117 | TOK_EMBEDDED = 298, |
| 118 | TOK_ENCODED = 299, |
| 119 | TOK_ENCODING_CONTROL = 300, |
| 120 | TOK_END = 301, |
| 121 | TOK_ENUMERATED = 302, |
| 122 | TOK_EXPLICIT = 303, |
| 123 | TOK_EXPORTS = 304, |
| 124 | TOK_EXTENSIBILITY = 305, |
| 125 | TOK_EXTERNAL = 306, |
| 126 | TOK_FALSE = 307, |
| 127 | TOK_FROM = 308, |
| 128 | TOK_GeneralizedTime = 309, |
| 129 | TOK_GeneralString = 310, |
| 130 | TOK_GraphicString = 311, |
| 131 | TOK_IA5String = 312, |
| 132 | TOK_IDENTIFIER = 313, |
| 133 | TOK_IMPLICIT = 314, |
| 134 | TOK_IMPLIED = 315, |
| 135 | TOK_IMPORTS = 316, |
| 136 | TOK_INCLUDES = 317, |
| 137 | TOK_INSTANCE = 318, |
| 138 | TOK_INSTRUCTIONS = 319, |
| 139 | TOK_INTEGER = 320, |
| 140 | TOK_ISO646String = 321, |
| 141 | TOK_MAX = 322, |
| 142 | TOK_MIN = 323, |
| 143 | TOK_MINUS_INFINITY = 324, |
| 144 | TOK_NULL = 325, |
| 145 | TOK_NumericString = 326, |
| 146 | TOK_OBJECT = 327, |
| 147 | TOK_ObjectDescriptor = 328, |
| 148 | TOK_OCTET = 329, |
| 149 | TOK_OF = 330, |
| 150 | TOK_OPTIONAL = 331, |
| 151 | TOK_PATTERN = 332, |
| 152 | TOK_PDV = 333, |
| 153 | TOK_PLUS_INFINITY = 334, |
| 154 | TOK_PRESENT = 335, |
| 155 | TOK_PrintableString = 336, |
| 156 | TOK_PRIVATE = 337, |
| 157 | TOK_REAL = 338, |
| 158 | TOK_RELATIVE_OID = 339, |
| 159 | TOK_SEQUENCE = 340, |
| 160 | TOK_SET = 341, |
| 161 | TOK_SIZE = 342, |
| 162 | TOK_STRING = 343, |
| 163 | TOK_SYNTAX = 344, |
| 164 | TOK_T61String = 345, |
| 165 | TOK_TAGS = 346, |
| 166 | TOK_TeletexString = 347, |
| 167 | TOK_TRUE = 348, |
| 168 | TOK_TYPE_IDENTIFIER = 349, |
| 169 | TOK_UNIQUE = 350, |
| 170 | TOK_UNIVERSAL = 351, |
| 171 | TOK_UniversalString = 352, |
| 172 | TOK_UTCTime = 353, |
| 173 | TOK_UTF8String = 354, |
| 174 | TOK_VideotexString = 355, |
| 175 | TOK_VisibleString = 356, |
| 176 | TOK_WITH = 357, |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 177 | UTF8_BOM = 358, |
| 178 | TOK_EXCEPT = 359, |
| 179 | TOK_INTERSECTION = 360, |
| 180 | TOK_UNION = 361, |
| 181 | TOK_TwoDots = 362, |
| 182 | TOK_ThreeDots = 363 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 183 | }; |
| 184 | #endif |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 185 | /* Tokens. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 186 | #define TOK_PPEQ 258 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 187 | #define TOK_VBracketLeft 259 |
| 188 | #define TOK_VBracketRight 260 |
| 189 | #define TOK_whitespace 261 |
| 190 | #define TOK_opaque 262 |
| 191 | #define TOK_bstring 263 |
| 192 | #define TOK_cstring 264 |
| 193 | #define TOK_hstring 265 |
| 194 | #define TOK_identifier 266 |
| 195 | #define TOK_number 267 |
| 196 | #define TOK_number_negative 268 |
| 197 | #define TOK_realnumber 269 |
| 198 | #define TOK_tuple 270 |
| 199 | #define TOK_quadruple 271 |
| 200 | #define TOK_typereference 272 |
| 201 | #define TOK_capitalreference 273 |
| 202 | #define TOK_typefieldreference 274 |
| 203 | #define TOK_valuefieldreference 275 |
| 204 | #define TOK_Literal 276 |
| 205 | #define TOK_ABSENT 277 |
| 206 | #define TOK_ABSTRACT_SYNTAX 278 |
| 207 | #define TOK_ALL 279 |
| 208 | #define TOK_ANY 280 |
| 209 | #define TOK_APPLICATION 281 |
| 210 | #define TOK_AUTOMATIC 282 |
| 211 | #define TOK_BEGIN 283 |
| 212 | #define TOK_BIT 284 |
| 213 | #define TOK_BMPString 285 |
| 214 | #define TOK_BOOLEAN 286 |
| 215 | #define TOK_BY 287 |
| 216 | #define TOK_CHARACTER 288 |
| 217 | #define TOK_CHOICE 289 |
| 218 | #define TOK_CLASS 290 |
| 219 | #define TOK_COMPONENT 291 |
| 220 | #define TOK_COMPONENTS 292 |
| 221 | #define TOK_CONSTRAINED 293 |
| 222 | #define TOK_CONTAINING 294 |
| 223 | #define TOK_DEFAULT 295 |
| 224 | #define TOK_DEFINITIONS 296 |
| 225 | #define TOK_DEFINED 297 |
| 226 | #define TOK_EMBEDDED 298 |
| 227 | #define TOK_ENCODED 299 |
| 228 | #define TOK_ENCODING_CONTROL 300 |
| 229 | #define TOK_END 301 |
| 230 | #define TOK_ENUMERATED 302 |
| 231 | #define TOK_EXPLICIT 303 |
| 232 | #define TOK_EXPORTS 304 |
| 233 | #define TOK_EXTENSIBILITY 305 |
| 234 | #define TOK_EXTERNAL 306 |
| 235 | #define TOK_FALSE 307 |
| 236 | #define TOK_FROM 308 |
| 237 | #define TOK_GeneralizedTime 309 |
| 238 | #define TOK_GeneralString 310 |
| 239 | #define TOK_GraphicString 311 |
| 240 | #define TOK_IA5String 312 |
| 241 | #define TOK_IDENTIFIER 313 |
| 242 | #define TOK_IMPLICIT 314 |
| 243 | #define TOK_IMPLIED 315 |
| 244 | #define TOK_IMPORTS 316 |
| 245 | #define TOK_INCLUDES 317 |
| 246 | #define TOK_INSTANCE 318 |
| 247 | #define TOK_INSTRUCTIONS 319 |
| 248 | #define TOK_INTEGER 320 |
| 249 | #define TOK_ISO646String 321 |
| 250 | #define TOK_MAX 322 |
| 251 | #define TOK_MIN 323 |
| 252 | #define TOK_MINUS_INFINITY 324 |
| 253 | #define TOK_NULL 325 |
| 254 | #define TOK_NumericString 326 |
| 255 | #define TOK_OBJECT 327 |
| 256 | #define TOK_ObjectDescriptor 328 |
| 257 | #define TOK_OCTET 329 |
| 258 | #define TOK_OF 330 |
| 259 | #define TOK_OPTIONAL 331 |
| 260 | #define TOK_PATTERN 332 |
| 261 | #define TOK_PDV 333 |
| 262 | #define TOK_PLUS_INFINITY 334 |
| 263 | #define TOK_PRESENT 335 |
| 264 | #define TOK_PrintableString 336 |
| 265 | #define TOK_PRIVATE 337 |
| 266 | #define TOK_REAL 338 |
| 267 | #define TOK_RELATIVE_OID 339 |
| 268 | #define TOK_SEQUENCE 340 |
| 269 | #define TOK_SET 341 |
| 270 | #define TOK_SIZE 342 |
| 271 | #define TOK_STRING 343 |
| 272 | #define TOK_SYNTAX 344 |
| 273 | #define TOK_T61String 345 |
| 274 | #define TOK_TAGS 346 |
| 275 | #define TOK_TeletexString 347 |
| 276 | #define TOK_TRUE 348 |
| 277 | #define TOK_TYPE_IDENTIFIER 349 |
| 278 | #define TOK_UNIQUE 350 |
| 279 | #define TOK_UNIVERSAL 351 |
| 280 | #define TOK_UniversalString 352 |
| 281 | #define TOK_UTCTime 353 |
| 282 | #define TOK_UTF8String 354 |
| 283 | #define TOK_VideotexString 355 |
| 284 | #define TOK_VisibleString 356 |
| 285 | #define TOK_WITH 357 |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 286 | #define UTF8_BOM 358 |
| 287 | #define TOK_EXCEPT 359 |
| 288 | #define TOK_INTERSECTION 360 |
| 289 | #define TOK_UNION 361 |
| 290 | #define TOK_TwoDots 362 |
| 291 | #define TOK_ThreeDots 363 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 292 | |
| 293 | |
| 294 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 295 | |
| 296 | /* Copy the first part of user declarations. */ |
| 297 | #line 1 "asn1p_y.y" |
| 298 | |
| 299 | |
| 300 | #include <stdlib.h> |
| 301 | #include <stdio.h> |
| 302 | #include <string.h> |
| 303 | #include <errno.h> |
| 304 | #include <assert.h> |
| 305 | |
| 306 | #include "asn1parser.h" |
| 307 | |
| 308 | #define YYPARSE_PARAM param |
| 309 | #define YYPARSE_PARAM_TYPE void ** |
| 310 | #define YYERROR_VERBOSE |
| 311 | |
| 312 | int yylex(void); |
| 313 | int yyerror(const char *msg); |
| 314 | #ifdef YYBYACC |
| 315 | int yyparse(void **param); /* byacc does not produce a prototype */ |
| 316 | #endif |
| 317 | void asn1p_lexer_hack_push_opaque_state(void); |
| 318 | void asn1p_lexer_hack_enable_with_syntax(void); |
| 319 | void asn1p_lexer_hack_push_encoding_control(void); |
| 320 | #define yylineno asn1p_lineno |
| 321 | extern int asn1p_lineno; |
| 322 | |
| 323 | /* |
| 324 | * Process directives as <ASN1C:RepresentAsPointer> |
| 325 | */ |
| 326 | extern int asn1p_as_pointer; |
| 327 | |
| 328 | /* |
| 329 | * This temporary variable is used to solve the shortcomings of 1-lookahead |
| 330 | * parser. |
| 331 | */ |
| 332 | static struct AssignedIdentifier *saved_aid; |
| 333 | |
| 334 | static asn1p_value_t *_convert_bitstring2binary(char *str, int base); |
| 335 | static void _fixup_anonymous_identifier(asn1p_expr_t *expr); |
| 336 | |
| 337 | static asn1p_module_t *currentModule; |
| 338 | #define NEW_EXPR() (asn1p_expr_new(yylineno, currentModule)) |
| 339 | |
| 340 | #define checkmem(ptr) do { \ |
| 341 | if(!(ptr)) \ |
| 342 | return yyerror("Memory failure"); \ |
| 343 | } while(0) |
| 344 | |
| 345 | #define CONSTRAINT_INSERT(root, constr_type, arg1, arg2) do { \ |
| 346 | if(arg1->type != constr_type) { \ |
| 347 | int __ret; \ |
| 348 | root = asn1p_constraint_new(yylineno, currentModule); \ |
| 349 | checkmem(root); \ |
| 350 | root->type = constr_type; \ |
| 351 | __ret = asn1p_constraint_insert(root, \ |
| 352 | arg1); \ |
| 353 | checkmem(__ret == 0); \ |
| 354 | } else { \ |
| 355 | root = arg1; \ |
| 356 | } \ |
| 357 | if(arg2) { \ |
| 358 | int __ret \ |
| 359 | = asn1p_constraint_insert(root, arg2); \ |
| 360 | checkmem(__ret == 0); \ |
| 361 | } \ |
| 362 | } while(0) |
| 363 | |
| 364 | #ifdef AL_IMPORT |
| 365 | #error AL_IMPORT DEFINED ELSEWHERE! |
| 366 | #endif |
| 367 | #define AL_IMPORT(to,where,from,field) do { \ |
| 368 | if(!(from)) break; \ |
| 369 | while(TQ_FIRST(&((from)->where))) { \ |
| 370 | TQ_ADD(&((to)->where), \ |
| 371 | TQ_REMOVE(&((from)->where), field), \ |
| 372 | field); \ |
| 373 | } \ |
| 374 | assert(TQ_FIRST(&((from)->where)) == 0); \ |
| 375 | } while(0) |
| 376 | |
| 377 | |
| 378 | |
| 379 | /* Enabling traces. */ |
| 380 | #ifndef YYDEBUG |
| 381 | # define YYDEBUG 0 |
| 382 | #endif |
| 383 | |
| 384 | /* Enabling verbose error messages. */ |
| 385 | #ifdef YYERROR_VERBOSE |
| 386 | # undef YYERROR_VERBOSE |
| 387 | # define YYERROR_VERBOSE 1 |
| 388 | #else |
| 389 | # define YYERROR_VERBOSE 0 |
| 390 | #endif |
| 391 | |
| 392 | /* Enabling the token table. */ |
| 393 | #ifndef YYTOKEN_TABLE |
| 394 | # define YYTOKEN_TABLE 0 |
| 395 | #endif |
| 396 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 397 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
| 398 | typedef union YYSTYPE |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 399 | #line 88 "asn1p_y.y" |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 400 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 401 | asn1p_t *a_grammar; |
| 402 | asn1p_module_flags_e a_module_flags; |
| 403 | asn1p_module_t *a_module; |
| 404 | asn1p_expr_type_e a_type; /* ASN.1 Type */ |
| 405 | asn1p_expr_t *a_expr; /* Constructed collection */ |
| 406 | asn1p_constraint_t *a_constr; /* Constraint */ |
| 407 | enum asn1p_constraint_type_e a_ctype;/* Constraint type */ |
| 408 | asn1p_xports_t *a_xports; /* IMports/EXports */ |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 409 | struct AssignedIdentifier a_aid; /* Assigned Identifier */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 410 | asn1p_oid_t *a_oid; /* Object Identifier */ |
| 411 | asn1p_oid_arc_t a_oid_arc; /* Single OID's arc */ |
| 412 | struct asn1p_type_tag_s a_tag; /* A tag */ |
| 413 | asn1p_ref_t *a_ref; /* Reference to custom type */ |
| 414 | asn1p_wsyntx_t *a_wsynt; /* WITH SYNTAX contents */ |
| 415 | asn1p_wsyntx_chunk_t *a_wchunk; /* WITH SYNTAX chunk */ |
| 416 | struct asn1p_ref_component_s a_refcomp; /* Component of a reference */ |
| 417 | asn1p_value_t *a_value; /* Number, DefinedValue, etc */ |
| 418 | struct asn1p_param_s a_parg; /* A parameter argument */ |
| 419 | asn1p_paramlist_t *a_plist; /* A pargs list */ |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 420 | struct asn1p_expr_marker_s a_marker; /* OPTIONAL/DEFAULT */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 421 | enum asn1p_constr_pres_e a_pres; /* PRESENT/ABSENT/OPTIONAL */ |
Lev Walkin | d21c505 | 2004-09-29 13:18:09 +0000 | [diff] [blame] | 422 | asn1c_integer_t a_int; |
Lev Walkin | adf863f | 2006-09-05 16:18:34 +0000 | [diff] [blame] | 423 | double a_dbl; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 424 | char *tv_str; |
| 425 | struct { |
| 426 | char *buf; |
| 427 | int len; |
| 428 | } tv_opaque; |
| 429 | struct { |
| 430 | char *name; |
| 431 | struct asn1p_type_tag_s tag; |
| 432 | } tv_nametag; |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 433 | } |
| 434 | /* Line 193 of yacc.c. */ |
| 435 | #line 436 "asn1p_y.c" |
| 436 | YYSTYPE; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 437 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
| 438 | # define YYSTYPE_IS_DECLARED 1 |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 439 | # define YYSTYPE_IS_TRIVIAL 1 |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 440 | #endif |
| 441 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 442 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 443 | |
| 444 | /* Copy the second part of user declarations. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 445 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 446 | |
| 447 | /* Line 216 of yacc.c. */ |
| 448 | #line 449 "asn1p_y.c" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 449 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 450 | #ifdef short |
| 451 | # undef short |
| 452 | #endif |
| 453 | |
| 454 | #ifdef YYTYPE_UINT8 |
| 455 | typedef YYTYPE_UINT8 yytype_uint8; |
| 456 | #else |
| 457 | typedef unsigned char yytype_uint8; |
| 458 | #endif |
| 459 | |
| 460 | #ifdef YYTYPE_INT8 |
| 461 | typedef YYTYPE_INT8 yytype_int8; |
| 462 | #elif (defined __STDC__ || defined __C99__FUNC__ \ |
| 463 | || defined __cplusplus || defined _MSC_VER) |
| 464 | typedef signed char yytype_int8; |
| 465 | #else |
| 466 | typedef short int yytype_int8; |
| 467 | #endif |
| 468 | |
| 469 | #ifdef YYTYPE_UINT16 |
| 470 | typedef YYTYPE_UINT16 yytype_uint16; |
| 471 | #else |
| 472 | typedef unsigned short int yytype_uint16; |
| 473 | #endif |
| 474 | |
| 475 | #ifdef YYTYPE_INT16 |
| 476 | typedef YYTYPE_INT16 yytype_int16; |
| 477 | #else |
| 478 | typedef short int yytype_int16; |
| 479 | #endif |
| 480 | |
| 481 | #ifndef YYSIZE_T |
| 482 | # ifdef __SIZE_TYPE__ |
| 483 | # define YYSIZE_T __SIZE_TYPE__ |
| 484 | # elif defined size_t |
| 485 | # define YYSIZE_T size_t |
| 486 | # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ |
| 487 | || defined __cplusplus || defined _MSC_VER) |
| 488 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
| 489 | # define YYSIZE_T size_t |
| 490 | # else |
| 491 | # define YYSIZE_T unsigned int |
| 492 | # endif |
| 493 | #endif |
| 494 | |
| 495 | #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
| 496 | |
| 497 | #ifndef YY_ |
| 498 | # if defined YYENABLE_NLS && YYENABLE_NLS |
| 499 | # if ENABLE_NLS |
| 500 | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 501 | # define YY_(msgid) dgettext ("bison-runtime", msgid) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 502 | # endif |
| 503 | # endif |
| 504 | # ifndef YY_ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 505 | # define YY_(msgid) msgid |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 506 | # endif |
| 507 | #endif |
| 508 | |
| 509 | /* Suppress unused-variable warnings by "using" E. */ |
| 510 | #if ! defined lint || defined __GNUC__ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 511 | # define YYUSE(e) ((void) (e)) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 512 | #else |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 513 | # define YYUSE(e) /* empty */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 514 | #endif |
| 515 | |
| 516 | /* Identity function, used to suppress warnings about constant conditions. */ |
| 517 | #ifndef lint |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 518 | # define YYID(n) (n) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 519 | #else |
| 520 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 521 | || defined __cplusplus || defined _MSC_VER) |
| 522 | static int |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 523 | YYID (int i) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 524 | #else |
| 525 | static int |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 526 | YYID (i) |
| 527 | int i; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 528 | #endif |
| 529 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 530 | return i; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 531 | } |
| 532 | #endif |
| 533 | |
| 534 | #if ! defined yyoverflow || YYERROR_VERBOSE |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 535 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 536 | /* The parser invokes alloca or malloc; define the necessary symbols. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 537 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 538 | # ifdef YYSTACK_USE_ALLOCA |
| 539 | # if YYSTACK_USE_ALLOCA |
| 540 | # ifdef __GNUC__ |
| 541 | # define YYSTACK_ALLOC __builtin_alloca |
| 542 | # elif defined __BUILTIN_VA_ARG_INCR |
| 543 | # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
| 544 | # elif defined _AIX |
| 545 | # define YYSTACK_ALLOC __alloca |
| 546 | # elif defined _MSC_VER |
| 547 | # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
| 548 | # define alloca _alloca |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 549 | # else |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 550 | # define YYSTACK_ALLOC alloca |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 551 | # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 552 | || defined __cplusplus || defined _MSC_VER) |
| 553 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 554 | # ifndef _STDLIB_H |
| 555 | # define _STDLIB_H 1 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 556 | # endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 557 | # endif |
| 558 | # endif |
| 559 | # endif |
| 560 | # endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 561 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 562 | # ifdef YYSTACK_ALLOC |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 563 | /* Pacify GCC's `empty if-body' warning. */ |
| 564 | # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) |
| 565 | # ifndef YYSTACK_ALLOC_MAXIMUM |
| 566 | /* The OS might guarantee only one guard page at the bottom of the stack, |
| 567 | and a page size can be as small as 4096 bytes. So we cannot safely |
| 568 | invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
| 569 | to allow for a few compiler-allocated temporary stack slots. */ |
| 570 | # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 571 | # endif |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 572 | # else |
| 573 | # define YYSTACK_ALLOC YYMALLOC |
| 574 | # define YYSTACK_FREE YYFREE |
| 575 | # ifndef YYSTACK_ALLOC_MAXIMUM |
| 576 | # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
| 577 | # endif |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 578 | # if (defined __cplusplus && ! defined _STDLIB_H \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 579 | && ! ((defined YYMALLOC || defined malloc) \ |
| 580 | && (defined YYFREE || defined free))) |
| 581 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 582 | # ifndef _STDLIB_H |
| 583 | # define _STDLIB_H 1 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 584 | # endif |
| 585 | # endif |
| 586 | # ifndef YYMALLOC |
| 587 | # define YYMALLOC malloc |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 588 | # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 589 | || defined __cplusplus || defined _MSC_VER) |
| 590 | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
| 591 | # endif |
| 592 | # endif |
| 593 | # ifndef YYFREE |
| 594 | # define YYFREE free |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 595 | # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 596 | || defined __cplusplus || defined _MSC_VER) |
| 597 | void free (void *); /* INFRINGES ON USER NAME SPACE */ |
| 598 | # endif |
| 599 | # endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 600 | # endif |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 601 | #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 602 | |
| 603 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 604 | #if (! defined yyoverflow \ |
| 605 | && (! defined __cplusplus \ |
| 606 | || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 607 | |
| 608 | /* A type that is properly aligned for any stack member. */ |
| 609 | union yyalloc |
| 610 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 611 | yytype_int16 yyss; |
| 612 | YYSTYPE yyvs; |
| 613 | }; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 614 | |
| 615 | /* The size of the maximum gap between one aligned stack and the next. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 616 | # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 617 | |
| 618 | /* The size of an array large to enough to hold all stacks, each with |
| 619 | N elements. */ |
| 620 | # define YYSTACK_BYTES(N) \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 621 | ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ |
| 622 | + YYSTACK_GAP_MAXIMUM) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 623 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 624 | /* Copy COUNT objects from FROM to TO. The source and destination do |
| 625 | not overlap. */ |
| 626 | # ifndef YYCOPY |
| 627 | # if defined __GNUC__ && 1 < __GNUC__ |
| 628 | # define YYCOPY(To, From, Count) \ |
| 629 | __builtin_memcpy (To, From, (Count) * sizeof (*(From))) |
| 630 | # else |
| 631 | # define YYCOPY(To, From, Count) \ |
| 632 | do \ |
| 633 | { \ |
| 634 | YYSIZE_T yyi; \ |
| 635 | for (yyi = 0; yyi < (Count); yyi++) \ |
| 636 | (To)[yyi] = (From)[yyi]; \ |
| 637 | } \ |
| 638 | while (YYID (0)) |
| 639 | # endif |
| 640 | # endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 641 | |
| 642 | /* Relocate STACK from its old location to the new one. The |
| 643 | local variables YYSIZE and YYSTACKSIZE give the old and new number of |
| 644 | elements in the stack, and YYPTR gives the new location of the |
| 645 | stack. Advance YYPTR to a properly aligned location for the next |
| 646 | stack. */ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 647 | # define YYSTACK_RELOCATE(Stack) \ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 648 | do \ |
| 649 | { \ |
| 650 | YYSIZE_T yynewbytes; \ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 651 | YYCOPY (&yyptr->Stack, Stack, yysize); \ |
| 652 | Stack = &yyptr->Stack; \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 653 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 654 | yyptr += yynewbytes / sizeof (*yyptr); \ |
| 655 | } \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 656 | while (YYID (0)) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 657 | |
| 658 | #endif |
| 659 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 660 | /* YYFINAL -- State number of the termination state. */ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 661 | #define YYFINAL 9 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 662 | /* YYLAST -- Last index in YYTABLE. */ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 663 | #define YYLAST 812 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 664 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 665 | /* YYNTOKENS -- Number of terminals. */ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 666 | #define YYNTOKENS 124 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 667 | /* YYNNTS -- Number of nonterminals. */ |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 668 | #define YYNNTS 124 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 669 | /* YYNRULES -- Number of rules. */ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 670 | #define YYNRULES 317 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 671 | /* YYNRULES -- Number of states. */ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 672 | #define YYNSTATES 479 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 673 | |
| 674 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ |
| 675 | #define YYUNDEFTOK 2 |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 676 | #define YYMAXUTOK 363 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 677 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 678 | #define YYTRANSLATE(YYX) \ |
| 679 | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 680 | |
| 681 | /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 682 | static const yytype_uint8 yytranslate[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 683 | { |
| 684 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 685 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 686 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 687 | 2, 2, 2, 120, 2, 2, 2, 2, 2, 2, |
| 688 | 113, 114, 2, 2, 116, 2, 121, 2, 2, 2, |
| 689 | 2, 2, 2, 2, 2, 2, 2, 2, 117, 115, |
| 690 | 122, 2, 2, 2, 123, 2, 2, 2, 2, 2, |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 691 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 692 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 693 | 2, 118, 2, 119, 105, 2, 2, 2, 2, 2, |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 694 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 695 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 696 | 2, 2, 2, 111, 107, 112, 2, 2, 2, 2, |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 697 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 698 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 699 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 700 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 701 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 702 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 703 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 704 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 705 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 706 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 707 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 708 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 709 | 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
| 710 | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
| 711 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
| 712 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
| 713 | 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, |
| 714 | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, |
| 715 | 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, |
| 716 | 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, |
| 717 | 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, |
| 718 | 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 719 | 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, |
| 720 | 106, 108, 109, 110 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 721 | }; |
| 722 | |
| 723 | #if YYDEBUG |
| 724 | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in |
| 725 | YYRHS. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 726 | static const yytype_uint16 yyprhs[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 727 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 728 | 0, 0, 3, 6, 8, 10, 13, 14, 24, 25, |
| 729 | 27, 31, 34, 36, 39, 41, 46, 48, 49, 51, |
| 730 | 53, 56, 59, 62, 65, 68, 71, 72, 74, 78, |
| 731 | 80, 83, 85, 87, 89, 90, 94, 96, 97, 99, |
| 732 | 103, 106, 107, 109, 111, 114, 115, 117, 122, 124, |
| 733 | 128, 130, 134, 136, 137, 139, 143, 147, 150, 152, |
| 734 | 156, 158, 162, 164, 168, 173, 175, 177, 182, 186, |
| 735 | 190, 197, 204, 206, 210, 212, 216, 220, 224, 228, |
| 736 | 230, 234, 236, 238, 240, 242, 243, 245, 247, 251, |
| 737 | 257, 261, 264, 268, 270, 272, 276, 279, 281, 283, |
| 738 | 289, 290, 292, 294, 298, 301, 306, 310, 314, 318, |
| 739 | 322, 326, 327, 329, 330, 337, 339, 342, 344, 346, |
| 740 | 348, 352, 354, 358, 362, 366, 367, 370, 372, 377, |
| 741 | 382, 387, 394, 401, 403, 408, 412, 414, 418, 422, |
| 742 | 426, 428, 432, 434, 438, 440, 442, 444, 446, 450, |
| 743 | 454, 456, 461, 463, 465, 469, 470, 474, 476, 478, |
| 744 | 480, 482, 484, 486, 488, 490, 494, 496, 498, 500, |
| 745 | 502, 505, 507, 509, 511, 513, 516, 519, 521, 523, |
| 746 | 526, 529, 531, 533, 535, 537, 539, 542, 544, 547, |
| 747 | 549, 551, 553, 555, 557, 559, 561, 563, 565, 567, |
| 748 | 569, 571, 573, 575, 577, 579, 581, 583, 584, 586, |
| 749 | 588, 590, 595, 599, 604, 606, 608, 610, 612, 616, |
| 750 | 622, 624, 628, 630, 634, 636, 640, 642, 646, 651, |
| 751 | 655, 657, 659, 663, 667, 671, 675, 677, 679, 680, |
| 752 | 684, 687, 690, 692, 694, 696, 698, 700, 702, 704, |
| 753 | 706, 708, 710, 712, 716, 722, 724, 728, 730, 734, |
| 754 | 735, 737, 739, 741, 743, 745, 747, 749, 750, 756, |
| 755 | 759, 761, 764, 767, 771, 773, 775, 779, 784, 786, |
| 756 | 790, 793, 797, 799, 803, 804, 806, 808, 811, 814, |
| 757 | 818, 820, 824, 826, 831, 836, 838, 840, 842, 844, |
| 758 | 846, 848, 849, 851, 854, 859, 860, 862, 864, 866, |
| 759 | 867, 869, 871, 873, 875, 877, 878, 880 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 760 | }; |
| 761 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 762 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
| 763 | static const yytype_int16 yyrhs[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 764 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 765 | 125, 0, -1, 103, 126, -1, 126, -1, 127, -1, |
| 766 | 126, 127, -1, -1, 244, 128, 129, 41, 133, 3, |
| 767 | 28, 136, 46, -1, -1, 130, -1, 111, 131, 112, |
| 768 | -1, 111, 112, -1, 132, -1, 131, 132, -1, 247, |
| 769 | -1, 247, 113, 12, 114, -1, 12, -1, -1, 134, |
| 770 | -1, 135, -1, 134, 135, -1, 48, 91, -1, 59, |
| 771 | 91, -1, 27, 91, -1, 50, 60, -1, 18, 64, |
| 772 | -1, -1, 137, -1, 149, 141, 138, -1, 139, -1, |
| 773 | 138, 139, -1, 156, -1, 186, -1, 154, -1, -1, |
| 774 | 45, 18, 140, -1, 196, -1, -1, 142, -1, 61, |
| 775 | 143, 115, -1, 61, 53, -1, -1, 144, -1, 146, |
| 776 | -1, 144, 146, -1, -1, 130, -1, 147, 53, 244, |
| 777 | 145, -1, 148, -1, 147, 116, 148, -1, 244, -1, |
| 778 | 244, 111, 112, -1, 247, -1, -1, 150, -1, 49, |
| 779 | 151, 115, -1, 49, 24, 115, -1, 49, 115, -1, |
| 780 | 152, -1, 151, 116, 152, -1, 244, -1, 244, 111, |
| 781 | 112, -1, 247, -1, 111, 204, 112, -1, 244, 155, |
| 782 | 3, 153, -1, 195, -1, 180, -1, 180, 111, 159, |
| 783 | 112, -1, 244, 3, 176, -1, 244, 3, 166, -1, |
| 784 | 244, 111, 157, 112, 3, 176, -1, 244, 111, 157, |
| 785 | 112, 3, 166, -1, 158, -1, 157, 116, 158, -1, |
| 786 | 244, -1, 244, 117, 247, -1, 244, 117, 244, -1, |
| 787 | 193, 117, 247, -1, 193, 117, 244, -1, 160, -1, |
| 788 | 159, 116, 160, -1, 176, -1, 189, -1, 247, -1, |
| 789 | 153, -1, -1, 162, -1, 163, -1, 162, 116, 163, |
| 790 | -1, 162, 116, 4, 162, 5, -1, 247, 176, 232, |
| 791 | -1, 176, 232, -1, 37, 75, 176, -1, 175, -1, |
| 792 | 165, -1, 164, 116, 165, -1, 247, 176, -1, 175, |
| 793 | -1, 176, -1, 35, 111, 168, 112, 170, -1, -1, |
| 794 | 95, -1, 169, -1, 168, 116, 169, -1, 19, 232, |
| 795 | -1, 20, 176, 167, 232, -1, 20, 184, 232, -1, |
| 796 | 20, 185, 232, -1, 19, 184, 232, -1, 19, 176, |
| 797 | 232, -1, 19, 185, 232, -1, -1, 171, -1, -1, |
| 798 | 102, 89, 111, 172, 173, 112, -1, 174, -1, 173, |
| 799 | 174, -1, 6, -1, 21, -1, 183, -1, 118, 173, |
| 800 | 119, -1, 110, -1, 110, 120, 190, -1, 110, 120, |
| 801 | 237, -1, 239, 178, 199, -1, -1, 177, 179, -1, |
| 802 | 155, -1, 34, 111, 164, 112, -1, 85, 111, 161, |
| 803 | 112, -1, 86, 111, 161, 112, -1, 85, 199, 75, |
| 804 | 246, 239, 178, -1, 86, 199, 75, 246, 239, 178, |
| 805 | -1, 25, -1, 25, 42, 32, 247, -1, 63, 75, |
| 806 | 180, -1, 17, -1, 17, 121, 244, -1, 245, 121, |
| 807 | 244, -1, 17, 121, 247, -1, 245, -1, 245, 121, |
| 808 | 181, -1, 182, -1, 181, 121, 182, -1, 183, -1, |
| 809 | 19, -1, 20, -1, 19, -1, 184, 121, 19, -1, |
| 810 | 184, 121, 20, -1, 18, -1, 247, 176, 3, 187, |
| 811 | -1, 189, -1, 190, -1, 247, 117, 187, -1, -1, |
| 812 | 111, 188, 192, -1, 70, -1, 52, -1, 93, -1, |
| 813 | 8, -1, 10, -1, 191, -1, 237, -1, 247, -1, |
| 814 | 244, 121, 247, -1, 9, -1, 15, -1, 16, -1, |
| 815 | 7, -1, 192, 7, -1, 31, -1, 70, -1, 83, |
| 816 | -1, 194, -1, 74, 88, -1, 72, 58, -1, 84, |
| 817 | -1, 51, -1, 43, 78, -1, 33, 88, -1, 98, |
| 818 | -1, 54, -1, 196, -1, 65, -1, 47, -1, 29, |
| 819 | 88, -1, 193, -1, 194, 234, -1, 30, -1, 55, |
| 820 | -1, 56, -1, 57, -1, 66, -1, 71, -1, 81, |
| 821 | -1, 90, -1, 92, -1, 97, -1, 99, -1, 100, |
| 822 | -1, 101, -1, 73, -1, 107, -1, 108, -1, 105, |
| 823 | -1, 106, -1, -1, 200, -1, 201, -1, 202, -1, |
| 824 | 87, 113, 203, 114, -1, 113, 203, 114, -1, 202, |
| 825 | 113, 203, 114, -1, 204, -1, 221, -1, 110, -1, |
| 826 | 205, -1, 205, 116, 110, -1, 205, 116, 110, 116, |
| 827 | 205, -1, 206, -1, 24, 104, 209, -1, 207, -1, |
| 828 | 206, 197, 207, -1, 208, -1, 207, 198, 208, -1, |
| 829 | 209, -1, 209, 104, 209, -1, 212, 113, 204, 114, |
| 830 | -1, 113, 204, 114, -1, 213, -1, 215, -1, 213, |
| 831 | 225, 213, -1, 68, 225, 213, -1, 213, 225, 67, |
| 832 | -1, 68, 225, 67, -1, 216, -1, 211, -1, -1, |
| 833 | 111, 210, 192, -1, 77, 9, -1, 77, 247, -1, |
| 834 | 87, -1, 53, -1, 52, -1, 93, -1, 238, -1, |
| 835 | 191, -1, 214, -1, 247, -1, 8, -1, 10, -1, |
| 836 | 180, -1, 102, 36, 202, -1, 102, 37, 111, 217, |
| 837 | 112, -1, 218, -1, 217, 116, 218, -1, 110, -1, |
| 838 | 247, 199, 219, -1, -1, 220, -1, 80, -1, 22, |
| 839 | -1, 76, -1, 222, -1, 226, -1, 224, -1, -1, |
| 840 | 38, 32, 111, 223, 192, -1, 39, 176, -1, 109, |
| 841 | -1, 109, 122, -1, 122, 109, -1, 122, 109, 122, |
| 842 | -1, 227, -1, 228, -1, 111, 244, 112, -1, 227, |
| 843 | 111, 229, 112, -1, 230, -1, 229, 116, 230, -1, |
| 844 | 123, 231, -1, 123, 121, 231, -1, 247, -1, 231, |
| 845 | 121, 247, -1, -1, 233, -1, 76, -1, 40, 187, |
| 846 | -1, 111, 112, -1, 111, 235, 112, -1, 236, -1, |
| 847 | 235, 116, 236, -1, 247, -1, 247, 113, 237, 114, |
| 848 | -1, 247, 113, 190, 114, -1, 237, -1, 110, -1, |
| 849 | 12, -1, 13, -1, 237, -1, 14, -1, -1, 240, |
| 850 | -1, 241, 243, -1, 118, 242, 12, 119, -1, -1, |
| 851 | 96, -1, 26, -1, 82, -1, -1, 59, -1, 48, |
| 852 | -1, 17, -1, 18, -1, 18, -1, -1, 247, -1, |
| 853 | 11, -1 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 854 | }; |
| 855 | |
| 856 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 857 | static const yytype_uint16 yyrline[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 858 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 859 | 0, 358, 358, 361, 367, 372, 389, 389, 418, 419, |
| 860 | 423, 426, 432, 438, 447, 451, 455, 465, 466, 475, |
| 861 | 478, 487, 490, 493, 496, 500, 521, 522, 531, 544, |
| 862 | 547, 564, 571, 584, 592, 591, 605, 618, 619, 622, |
| 863 | 632, 638, 639, 642, 647, 654, 655, 659, 670, 675, |
| 864 | 682, 688, 694, 704, 705, 717, 720, 723, 731, 736, |
| 865 | 743, 749, 755, 764, 767, 777, 790, 800, 820, 826, |
| 866 | 842, 848, 856, 865, 876, 880, 888, 896, 904, 915, |
| 867 | 920, 927, 930, 938, 949, 972, 973, 976, 981, 985, |
| 868 | 993, 1000, 1006, 1013, 1019, 1024, 1031, 1036, 1039, 1046, |
| 869 | 1056, 1057, 1061, 1068, 1078, 1088, 1099, 1109, 1120, 1130, |
| 870 | 1141, 1153, 1154, 1161, 1160, 1169, 1173, 1180, 1184, 1187, |
| 871 | 1191, 1197, 1205, 1214, 1226, 1250, 1257, 1276, 1279, 1285, |
| 872 | 1291, 1297, 1307, 1317, 1323, 1335, 1350, 1358, 1369, 1380, |
| 873 | 1391, 1399, 1421, 1429, 1438, 1442, 1447, 1456, 1461, 1466, |
| 874 | 1474, 1497, 1507, 1508, 1509, 1516, 1516, 1521, 1529, 1534, |
| 875 | 1539, 1544, 1549, 1552, 1558, 1569, 1587, 1591, 1596, 1604, |
| 876 | 1613, 1628, 1629, 1630, 1631, 1632, 1633, 1634, 1635, 1636, |
| 877 | 1637, 1638, 1639, 1640, 1647, 1648, 1649, 1653, 1659, 1672, |
| 878 | 1673, 1677, 1681, 1682, 1683, 1684, 1685, 1689, 1690, 1691, |
| 879 | 1692, 1696, 1697, 1704, 1704, 1705, 1705, 1708, 1709, 1715, |
| 880 | 1719, 1722, 1732, 1735, 1741, 1744, 1750, 1754, 1757, 1763, |
| 881 | 1774, 1775, 1781, 1782, 1788, 1789, 1796, 1797, 1803, 1811, |
| 882 | 1819, 1825, 1831, 1838, 1846, 1854, 1863, 1866, 1869, 1869, |
| 883 | 1879, 1884, 1896, 1899, 1905, 1910, 1915, 1916, 1917, 1918, |
| 884 | 1932, 1937, 1945, 1965, 1968, 1974, 1977, 1983, 1989, 2003, |
| 885 | 2004, 2008, 2011, 2014, 2022, 2023, 2024, 2029, 2028, 2040, |
| 886 | 2049, 2050, 2051, 2052, 2055, 2058, 2067, 2083, 2089, 2095, |
| 887 | 2109, 2120, 2136, 2139, 2159, 2163, 2167, 2171, 2194, 2198, |
| 888 | 2204, 2209, 2216, 2223, 2231, 2239, 2246, 2257, 2261, 2268, |
| 889 | 2269, 2300, 2301, 2305, 2312, 2318, 2319, 2320, 2321, 2325, |
| 890 | 2326, 2327, 2331, 2335, 2343, 2350, 2351, 2357 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 891 | }; |
| 892 | #endif |
| 893 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 894 | #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 895 | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
| 896 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 897 | static const char *const yytname[] = |
| 898 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 899 | "$end", "error", "$undefined", "TOK_PPEQ", "TOK_VBracketLeft", |
| 900 | "TOK_VBracketRight", "TOK_whitespace", "TOK_opaque", "TOK_bstring", |
| 901 | "TOK_cstring", "TOK_hstring", "TOK_identifier", "TOK_number", |
| 902 | "TOK_number_negative", "TOK_realnumber", "TOK_tuple", "TOK_quadruple", |
| 903 | "TOK_typereference", "TOK_capitalreference", "TOK_typefieldreference", |
| 904 | "TOK_valuefieldreference", "TOK_Literal", "TOK_ABSENT", |
| 905 | "TOK_ABSTRACT_SYNTAX", "TOK_ALL", "TOK_ANY", "TOK_APPLICATION", |
| 906 | "TOK_AUTOMATIC", "TOK_BEGIN", "TOK_BIT", "TOK_BMPString", "TOK_BOOLEAN", |
| 907 | "TOK_BY", "TOK_CHARACTER", "TOK_CHOICE", "TOK_CLASS", "TOK_COMPONENT", |
| 908 | "TOK_COMPONENTS", "TOK_CONSTRAINED", "TOK_CONTAINING", "TOK_DEFAULT", |
| 909 | "TOK_DEFINITIONS", "TOK_DEFINED", "TOK_EMBEDDED", "TOK_ENCODED", |
| 910 | "TOK_ENCODING_CONTROL", "TOK_END", "TOK_ENUMERATED", "TOK_EXPLICIT", |
| 911 | "TOK_EXPORTS", "TOK_EXTENSIBILITY", "TOK_EXTERNAL", "TOK_FALSE", |
| 912 | "TOK_FROM", "TOK_GeneralizedTime", "TOK_GeneralString", |
| 913 | "TOK_GraphicString", "TOK_IA5String", "TOK_IDENTIFIER", "TOK_IMPLICIT", |
| 914 | "TOK_IMPLIED", "TOK_IMPORTS", "TOK_INCLUDES", "TOK_INSTANCE", |
| 915 | "TOK_INSTRUCTIONS", "TOK_INTEGER", "TOK_ISO646String", "TOK_MAX", |
| 916 | "TOK_MIN", "TOK_MINUS_INFINITY", "TOK_NULL", "TOK_NumericString", |
| 917 | "TOK_OBJECT", "TOK_ObjectDescriptor", "TOK_OCTET", "TOK_OF", |
| 918 | "TOK_OPTIONAL", "TOK_PATTERN", "TOK_PDV", "TOK_PLUS_INFINITY", |
| 919 | "TOK_PRESENT", "TOK_PrintableString", "TOK_PRIVATE", "TOK_REAL", |
| 920 | "TOK_RELATIVE_OID", "TOK_SEQUENCE", "TOK_SET", "TOK_SIZE", "TOK_STRING", |
| 921 | "TOK_SYNTAX", "TOK_T61String", "TOK_TAGS", "TOK_TeletexString", |
| 922 | "TOK_TRUE", "TOK_TYPE_IDENTIFIER", "TOK_UNIQUE", "TOK_UNIVERSAL", |
| 923 | "TOK_UniversalString", "TOK_UTCTime", "TOK_UTF8String", |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 924 | "TOK_VideotexString", "TOK_VisibleString", "TOK_WITH", |
| 925 | "\"UTF-8 byte order mark\"", "TOK_EXCEPT", "'^'", "TOK_INTERSECTION", |
| 926 | "'|'", "TOK_UNION", "TOK_TwoDots", "TOK_ThreeDots", "'{'", "'}'", "'('", |
| 927 | "')'", "';'", "','", "':'", "'['", "']'", "'!'", "'.'", "'<'", "'@'", |
| 928 | "$accept", "ParsedGrammar", "ModuleList", "ModuleDefinition", "@1", |
| 929 | "optObjectIdentifier", "ObjectIdentifier", "ObjectIdentifierBody", |
| 930 | "ObjectIdentifierElement", "optModuleDefinitionFlags", |
| 931 | "ModuleDefinitionFlags", "ModuleDefinitionFlag", "optModuleBody", |
| 932 | "ModuleBody", "AssignmentList", "Assignment", "@2", "optImports", |
| 933 | "ImportsDefinition", "optImportsBundleSet", "ImportsBundleSet", |
| 934 | "AssignedIdentifier", "ImportsBundle", "ImportsList", "ImportsElement", |
| 935 | "optExports", "ExportsDefinition", "ExportsBody", "ExportsElement", |
| 936 | "ValueSet", "ValueSetTypeAssignment", "DefinedType", "DataTypeReference", |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 937 | "ParameterArgumentList", "ParameterArgumentName", "ActualParameterList", |
| 938 | "ActualParameter", "optComponentTypeLists", "ComponentTypeLists", |
| 939 | "ComponentType", "AlternativeTypeLists", "AlternativeType", |
| 940 | "ObjectClass", "optUnique", "FieldSpec", "ClassField", "optWithSyntax", |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 941 | "WithSyntax", "@3", "WithSyntaxList", "WithSyntaxToken", |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 942 | "ExtensionAndException", "Type", "NSTD_IndirectMarker", |
| 943 | "TypeDeclaration", "TypeDeclarationSet", "ComplexTypeReference", |
| 944 | "ComplexTypeReferenceAmpList", "ComplexTypeReferenceElement", |
| 945 | "PrimitiveFieldReference", "FieldName", "DefinedObjectClass", |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 946 | "ValueAssignment", "Value", "@4", "SimpleValue", "DefinedValue", |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 947 | "RestrictedCharacterStringValue", "Opaque", "BasicTypeId", |
| 948 | "BasicTypeId_UniverationCompatible", "BasicType", "BasicString", |
| 949 | "UnionMark", "IntersectionMark", "optConstraints", "Constraint", |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 950 | "SubtypeConstraint", "SetOfConstraints", "ConstraintSpecs", |
| 951 | "ElementSetSpecs", "ElementSetSpec", "Unions", "Intersections", |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 952 | "IntersectionElements", "ConstraintSubtypeElement", "@5", |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 953 | "PatternConstraint", "ConstraintSpec", "SingleValue", "BitStringValue", |
| 954 | "ContainedSubtype", "InnerTypeConstraint", "WithComponentsList", |
| 955 | "WithComponentsElement", "optPresenceConstraint", "PresenceConstraint", |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 956 | "GeneralConstraint", "UserDefinedConstraint", "@6", "ContentsConstraint", |
| 957 | "ConstraintRangeSpec", "TableConstraint", "SimpleTableConstraint", |
| 958 | "ComponentRelationConstraint", "AtNotationList", "AtNotationElement", |
| 959 | "ComponentIdList", "optMarker", "Marker", "UniverationDefinition", |
| 960 | "UniverationList", "UniverationElement", "SignedNumber", "RealValue", |
| 961 | "optTag", "Tag", "TagTypeValue", "TagClass", "TagPlicit", "TypeRefName", |
| 962 | "ObjectClassReference", "optIdentifier", "Identifier", 0 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 963 | }; |
| 964 | #endif |
| 965 | |
| 966 | # ifdef YYPRINT |
| 967 | /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to |
| 968 | token YYLEX-NUM. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 969 | static const yytype_uint16 yytoknum[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 970 | { |
| 971 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
| 972 | 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, |
| 973 | 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, |
| 974 | 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, |
| 975 | 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, |
| 976 | 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, |
| 977 | 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, |
| 978 | 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, |
| 979 | 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, |
| 980 | 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 981 | 355, 356, 357, 358, 359, 94, 360, 124, 361, 362, |
| 982 | 363, 123, 125, 40, 41, 59, 44, 58, 91, 93, |
| 983 | 33, 46, 60, 64 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 984 | }; |
| 985 | # endif |
| 986 | |
| 987 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 988 | static const yytype_uint8 yyr1[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 989 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 990 | 0, 124, 125, 125, 126, 126, 128, 127, 129, 129, |
| 991 | 130, 130, 131, 131, 132, 132, 132, 133, 133, 134, |
| 992 | 134, 135, 135, 135, 135, 135, 136, 136, 137, 138, |
| 993 | 138, 139, 139, 139, 140, 139, 139, 141, 141, 142, |
| 994 | 142, 143, 143, 144, 144, 145, 145, 146, 147, 147, |
| 995 | 148, 148, 148, 149, 149, 150, 150, 150, 151, 151, |
| 996 | 152, 152, 152, 153, 154, 155, 155, 155, 156, 156, |
| 997 | 156, 156, 157, 157, 158, 158, 158, 158, 158, 159, |
| 998 | 159, 160, 160, 160, 160, 161, 161, 162, 162, 162, |
| 999 | 163, 163, 163, 163, 164, 164, 165, 165, 165, 166, |
| 1000 | 167, 167, 168, 168, 169, 169, 169, 169, 169, 169, |
| 1001 | 169, 170, 170, 172, 171, 173, 173, 174, 174, 174, |
| 1002 | 174, 175, 175, 175, 176, 177, 178, 179, 179, 179, |
| 1003 | 179, 179, 179, 179, 179, 179, 180, 180, 180, 180, |
| 1004 | 180, 180, 181, 181, 182, 183, 183, 184, 184, 184, |
| 1005 | 185, 186, 187, 187, 187, 188, 187, 187, 189, 189, |
| 1006 | 189, 189, 189, 189, 190, 190, 191, 191, 191, 192, |
| 1007 | 192, 193, 193, 193, 193, 193, 193, 193, 193, 193, |
| 1008 | 193, 193, 193, 193, 194, 194, 194, 195, 195, 196, |
| 1009 | 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, |
| 1010 | 196, 196, 196, 197, 197, 198, 198, 199, 199, 200, |
| 1011 | 201, 201, 202, 202, 203, 203, 204, 204, 204, 204, |
| 1012 | 205, 205, 206, 206, 207, 207, 208, 208, 209, 209, |
| 1013 | 209, 209, 209, 209, 209, 209, 209, 209, 210, 209, |
| 1014 | 211, 211, 212, 212, 213, 213, 213, 213, 213, 213, |
| 1015 | 214, 214, 215, 216, 216, 217, 217, 218, 218, 219, |
| 1016 | 219, 220, 220, 220, 221, 221, 221, 223, 222, 224, |
| 1017 | 225, 225, 225, 225, 226, 226, 227, 228, 229, 229, |
| 1018 | 230, 230, 231, 231, 232, 232, 233, 233, 234, 234, |
| 1019 | 235, 235, 236, 236, 236, 236, 236, 237, 237, 238, |
| 1020 | 238, 239, 239, 240, 241, 242, 242, 242, 242, 243, |
| 1021 | 243, 243, 244, 244, 245, 246, 246, 247 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1022 | }; |
| 1023 | |
| 1024 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1025 | static const yytype_uint8 yyr2[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1026 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1027 | 0, 2, 2, 1, 1, 2, 0, 9, 0, 1, |
| 1028 | 3, 2, 1, 2, 1, 4, 1, 0, 1, 1, |
| 1029 | 2, 2, 2, 2, 2, 2, 0, 1, 3, 1, |
| 1030 | 2, 1, 1, 1, 0, 3, 1, 0, 1, 3, |
| 1031 | 2, 0, 1, 1, 2, 0, 1, 4, 1, 3, |
| 1032 | 1, 3, 1, 0, 1, 3, 3, 2, 1, 3, |
| 1033 | 1, 3, 1, 3, 4, 1, 1, 4, 3, 3, |
| 1034 | 6, 6, 1, 3, 1, 3, 3, 3, 3, 1, |
| 1035 | 3, 1, 1, 1, 1, 0, 1, 1, 3, 5, |
| 1036 | 3, 2, 3, 1, 1, 3, 2, 1, 1, 5, |
| 1037 | 0, 1, 1, 3, 2, 4, 3, 3, 3, 3, |
| 1038 | 3, 0, 1, 0, 6, 1, 2, 1, 1, 1, |
| 1039 | 3, 1, 3, 3, 3, 0, 2, 1, 4, 4, |
| 1040 | 4, 6, 6, 1, 4, 3, 1, 3, 3, 3, |
| 1041 | 1, 3, 1, 3, 1, 1, 1, 1, 3, 3, |
| 1042 | 1, 4, 1, 1, 3, 0, 3, 1, 1, 1, |
| 1043 | 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, |
| 1044 | 2, 1, 1, 1, 1, 2, 2, 1, 1, 2, |
| 1045 | 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1046 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1047 | 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, |
| 1048 | 1, 4, 3, 4, 1, 1, 1, 1, 3, 5, |
| 1049 | 1, 3, 1, 3, 1, 3, 1, 3, 4, 3, |
| 1050 | 1, 1, 3, 3, 3, 3, 1, 1, 0, 3, |
| 1051 | 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1052 | 1, 1, 1, 3, 5, 1, 3, 1, 3, 0, |
| 1053 | 1, 1, 1, 1, 1, 1, 1, 0, 5, 2, |
| 1054 | 1, 2, 2, 3, 1, 1, 3, 4, 1, 3, |
| 1055 | 2, 3, 1, 3, 0, 1, 1, 2, 2, 3, |
| 1056 | 1, 3, 1, 4, 4, 1, 1, 1, 1, 1, |
| 1057 | 1, 0, 1, 2, 4, 0, 1, 1, 1, 0, |
| 1058 | 1, 1, 1, 1, 1, 0, 1, 1 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1059 | }; |
| 1060 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1061 | /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state |
| 1062 | STATE-NUM when YYTABLE doesn't specify something else to do. Zero |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1063 | means the default is an error. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1064 | static const yytype_uint16 yydefact[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1065 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1066 | 0, 312, 313, 0, 0, 3, 4, 6, 2, 1, |
| 1067 | 5, 8, 0, 0, 9, 317, 16, 11, 0, 12, |
| 1068 | 14, 17, 10, 13, 0, 0, 0, 0, 0, 0, |
| 1069 | 0, 18, 19, 0, 25, 23, 21, 24, 22, 0, |
| 1070 | 20, 15, 53, 0, 0, 27, 37, 54, 0, 57, |
| 1071 | 0, 58, 60, 62, 7, 41, 0, 38, 56, 55, |
| 1072 | 0, 0, 40, 0, 42, 43, 0, 48, 50, 52, |
| 1073 | 189, 0, 190, 191, 192, 193, 194, 202, 195, 196, |
| 1074 | 197, 198, 199, 200, 201, 28, 29, 33, 31, 32, |
| 1075 | 36, 0, 301, 59, 61, 39, 44, 0, 0, 0, |
| 1076 | 34, 30, 301, 136, 314, 0, 171, 0, 0, 185, |
| 1077 | 178, 182, 184, 172, 0, 0, 173, 177, 181, 0, |
| 1078 | 0, 66, 187, 174, 65, 183, 140, 305, 0, 125, |
| 1079 | 302, 309, 45, 49, 51, 35, 0, 69, 68, 0, |
| 1080 | 186, 180, 179, 176, 175, 0, 72, 0, 174, 74, |
| 1081 | 0, 301, 0, 188, 0, 307, 308, 306, 0, 0, |
| 1082 | 0, 207, 311, 310, 303, 46, 47, 0, 137, 139, |
| 1083 | 0, 0, 0, 0, 0, 64, 160, 166, 161, 297, |
| 1084 | 298, 167, 168, 158, 159, 84, 0, 79, 81, 82, |
| 1085 | 162, 163, 83, 296, 288, 0, 290, 295, 292, 145, |
| 1086 | 146, 141, 142, 144, 138, 0, 157, 155, 151, 152, |
| 1087 | 153, 0, 164, 133, 0, 0, 207, 207, 127, 126, |
| 1088 | 0, 0, 124, 208, 209, 210, 301, 301, 0, 102, |
| 1089 | 301, 73, 78, 77, 76, 75, 250, 251, 300, 0, |
| 1090 | 244, 243, 0, 0, 242, 245, 0, 216, 238, 0, |
| 1091 | 252, 247, 0, 217, 220, 222, 224, 226, 237, 0, |
| 1092 | 230, 248, 231, 236, 299, 246, 249, 67, 301, 289, |
| 1093 | 0, 0, 0, 304, 0, 0, 0, 0, 301, 0, |
| 1094 | 301, 0, 301, 0, 0, 0, 301, 238, 0, 214, |
| 1095 | 215, 264, 266, 265, 274, 275, 0, 150, 147, 0, |
| 1096 | 286, 284, 284, 284, 104, 285, 100, 284, 284, 111, |
| 1097 | 0, 71, 70, 0, 270, 0, 0, 240, 241, 0, |
| 1098 | 0, 0, 0, 63, 0, 203, 204, 0, 205, 206, |
| 1099 | 0, 0, 0, 0, 80, 291, 0, 0, 164, 143, |
| 1100 | 169, 156, 165, 154, 0, 121, 0, 94, 97, 98, |
| 1101 | 301, 135, 0, 0, 86, 87, 93, 284, 301, 315, |
| 1102 | 0, 315, 0, 0, 269, 0, 212, 0, 0, 287, |
| 1103 | 109, 0, 108, 110, 101, 284, 106, 107, 0, 99, |
| 1104 | 112, 103, 221, 271, 272, 235, 233, 253, 0, 239, |
| 1105 | 229, 218, 223, 225, 227, 0, 234, 232, 294, 293, |
| 1106 | 170, 134, 0, 128, 301, 96, 301, 129, 301, 91, |
| 1107 | 284, 301, 316, 130, 301, 211, 267, 276, 0, 0, |
| 1108 | 278, 213, 148, 149, 105, 0, 273, 257, 0, 255, |
| 1109 | 207, 0, 228, 122, 123, 95, 92, 301, 88, 90, |
| 1110 | 125, 125, 0, 0, 280, 282, 277, 0, 113, 254, |
| 1111 | 0, 259, 219, 0, 131, 132, 268, 281, 0, 279, |
| 1112 | 0, 256, 262, 263, 261, 258, 260, 89, 283, 117, |
| 1113 | 118, 0, 0, 115, 119, 0, 114, 116, 120 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1114 | }; |
| 1115 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1116 | /* YYDEFGOTO[NTERM-NUM]. */ |
| 1117 | static const yytype_int16 yydefgoto[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1118 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1119 | -1, 4, 5, 6, 11, 13, 14, 18, 19, 30, |
| 1120 | 31, 32, 44, 45, 85, 86, 135, 56, 57, 63, |
| 1121 | 64, 166, 65, 66, 67, 46, 47, 50, 51, 185, |
| 1122 | 87, 120, 88, 145, 146, 186, 187, 353, 354, 355, |
| 1123 | 346, 347, 137, 375, 228, 229, 379, 380, 460, 472, |
| 1124 | 473, 356, 357, 160, 161, 219, 250, 201, 202, 474, |
| 1125 | 302, 303, 89, 208, 274, 209, 210, 251, 341, 122, |
| 1126 | 123, 124, 125, 327, 330, 222, 223, 224, 225, 288, |
| 1127 | 289, 253, 254, 255, 256, 257, 321, 258, 259, 260, |
| 1128 | 261, 262, 263, 428, 429, 465, 466, 290, 291, 442, |
| 1129 | 292, 316, 293, 294, 295, 419, 420, 444, 304, 305, |
| 1130 | 153, 195, 196, 264, 265, 129, 130, 131, 158, 164, |
| 1131 | 211, 126, 411, 266 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1132 | }; |
| 1133 | |
| 1134 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
| 1135 | STATE-NUM. */ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1136 | #define YYPACT_NINF -312 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1137 | static const yytype_int16 yypact[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1138 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1139 | 97, -312, -312, 275, 72, 275, -312, -312, 275, -312, |
| 1140 | -312, 1, 39, 62, -312, -312, -312, -312, 83, -312, |
| 1141 | 51, 343, -312, -312, 159, 134, 144, 169, 154, 174, |
| 1142 | 247, 343, -312, 171, -312, -312, -312, -312, -312, 245, |
| 1143 | -312, -312, 187, 52, 237, -312, 240, -312, 191, -312, |
| 1144 | 2, -312, 202, -312, -312, 185, 558, -312, -312, -312, |
| 1145 | 228, 208, -312, 211, 228, -312, -8, -312, 258, -312, |
| 1146 | -312, 357, -312, -312, -312, -312, -312, -312, -312, -312, |
| 1147 | -312, -312, -312, -312, -312, 558, -312, -312, -312, -312, |
| 1148 | -312, 224, 230, -312, -312, -312, -312, 275, 228, 265, |
| 1149 | -312, -312, -11, 262, -312, 290, -312, 291, 306, -312, |
| 1150 | -312, -312, -312, -312, 327, 298, -312, -312, -312, 711, |
| 1151 | 384, 277, -312, 278, -312, -312, 279, 155, 395, -312, |
| 1152 | -312, 181, 1, -312, -312, -312, 288, -312, -312, 228, |
| 1153 | -312, -312, -312, -312, -312, -75, -312, 284, -312, 286, |
| 1154 | 293, 69, 80, -312, 292, -312, -312, -312, 393, 584, |
| 1155 | 635, 104, -312, -312, -312, -312, -312, 299, -312, -312, |
| 1156 | 404, 711, 228, 228, 448, -312, -312, -312, -312, -312, |
| 1157 | -312, -312, -312, -312, -312, -312, 100, -312, -312, -312, |
| 1158 | -312, -312, -312, -312, -312, 118, -312, -312, 295, -312, |
| 1159 | -312, 296, -312, -312, -312, 297, -312, -312, -312, -312, |
| 1160 | -312, 300, 301, 367, 302, 336, 98, 161, -312, -312, |
| 1161 | 307, 342, -312, -312, -312, 309, 92, 47, 131, -312, |
| 1162 | -11, -312, -312, -312, -312, -312, -312, -312, -312, 308, |
| 1163 | -312, -312, -13, 173, -312, -312, 294, -312, -312, 448, |
| 1164 | -312, -312, 303, 310, 229, 257, -312, 320, -312, 314, |
| 1165 | -13, -312, -312, -312, -312, -312, -312, -312, 69, -312, |
| 1166 | 45, 316, 345, -312, 407, 417, 584, 398, 6, 350, |
| 1167 | 76, 358, 76, 359, 342, 400, 230, 275, 322, -312, |
| 1168 | -312, -312, -312, -312, 326, -312, 342, -312, -312, 584, |
| 1169 | -312, 129, 123, 129, -312, -312, 344, 123, 129, 338, |
| 1170 | 299, -312, -312, 496, 319, 333, 210, -312, -312, 332, |
| 1171 | 337, 407, 329, -312, 339, -312, -312, 496, -312, -312, |
| 1172 | 496, 496, 448, 330, -312, -312, 340, 353, -312, -312, |
| 1173 | -312, 440, -312, -312, 417, 331, 170, -312, -312, -312, |
| 1174 | 230, -312, 375, 356, 354, -312, -312, 129, 230, 417, |
| 1175 | 361, 417, 355, 360, -312, 362, -312, 365, 376, -312, |
| 1176 | -312, 352, -312, -312, -312, 129, -312, -312, 386, -312, |
| 1177 | -312, -312, -312, -312, 369, -312, -312, 309, 19, 440, |
| 1178 | -312, 373, 257, -312, -312, 378, -312, -312, -312, -312, |
| 1179 | -312, -312, 316, -312, 6, -312, 230, -312, 38, -312, |
| 1180 | 129, 230, -312, -312, 230, -312, -312, -312, 9, 172, |
| 1181 | -312, -312, -312, -312, -312, 383, -312, -312, 188, -312, |
| 1182 | 104, 469, -312, -312, -312, -312, -312, 60, -312, -312, |
| 1183 | -312, -312, 407, 417, 374, -312, -312, 365, -312, -312, |
| 1184 | 19, 152, -312, 41, -312, -312, 440, 374, 417, -312, |
| 1185 | 15, -312, -312, -312, -312, -312, -312, -312, -312, -312, |
| 1186 | -312, 15, 8, -312, -312, 34, -312, -312, -312 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1187 | }; |
| 1188 | |
| 1189 | /* YYPGOTO[NTERM-NUM]. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1190 | static const yytype_int16 yypgoto[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1191 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1192 | -312, -312, 473, 117, -312, -312, 364, -312, 479, -312, |
| 1193 | -312, 467, -312, -312, -312, 414, -312, -312, -312, -312, |
| 1194 | -312, -312, 438, -312, 405, -312, -312, -312, 455, 368, |
| 1195 | -312, 363, -312, -312, 346, -312, 251, 238, 87, 119, |
| 1196 | -312, 122, 304, -312, -312, 218, -312, -312, -312, 58, |
| 1197 | -223, -255, -89, -312, -67, -312, -86, -312, 259, -138, |
| 1198 | 305, 311, -312, -93, -312, -133, -256, -140, -311, -81, |
| 1199 | -52, -312, -24, -312, -312, -215, -312, -312, 214, -83, |
| 1200 | -166, 99, -312, 209, 212, -225, -312, -312, -312, -294, |
| 1201 | -312, -312, -312, -312, 89, -312, -312, -312, -312, -312, |
| 1202 | -312, 280, -312, -312, -312, -312, 96, 101, -203, -312, |
| 1203 | -312, -312, 281, -126, -312, -112, -312, -312, -312, -312, |
| 1204 | 4, -312, 184, -12 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1205 | }; |
| 1206 | |
| 1207 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
| 1208 | positive, shift that token. If negative, reduce the rule which |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1209 | number is the opposite. If zero, do what YYDEFACT says. |
| 1210 | If YYTABLE_NINF, syntax error. */ |
| 1211 | #define YYTABLE_NINF -285 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1212 | static const yytype_int16 yytable[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1213 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1214 | 20, 281, 283, 128, 7, 121, 20, 7, 252, 7, |
| 1215 | 389, 190, 7, 138, 469, 336, 203, 15, 189, 190, |
| 1216 | 15, 469, 386, 348, 136, 191, 197, 199, 200, 470, |
| 1217 | 15, 53, 90, 191, 199, 200, 470, 170, 147, 397, |
| 1218 | 469, 171, 437, 69, 92, 97, 467, 52, 53, 15, |
| 1219 | 15, 16, 69, 199, 200, 470, 15, 179, 180, 68, |
| 1220 | 91, 90, 188, 15, 52, 297, 298, 148, 68, 1, |
| 1221 | 2, 15, 9, 92, 121, 352, 48, 176, 177, 178, |
| 1222 | 15, 179, 180, 322, 181, 182, 69, 15, 382, 91, |
| 1223 | 147, 15, 179, 180, 15, 16, 314, 352, 370, 372, |
| 1224 | 373, 132, 68, 21, 376, 377, 394, 127, 98, 315, |
| 1225 | 297, 298, 12, 352, 1, 2, 345, 59, 60, 148, |
| 1226 | 476, 183, 10, 149, 127, 10, 471, 169, 190, 427, |
| 1227 | 443, 456, 299, 471, 203, 189, 190, 301, 306, 192, |
| 1228 | 198, 312, 191, 168, 197, 337, 433, 212, 345, 348, |
| 1229 | 191, 17, 471, 478, 409, 193, 127, 408, 204, 190, |
| 1230 | 233, 235, 184, 299, 24, 127, 395, 49, 300, 299, |
| 1231 | 345, 33, 424, 191, 462, 149, 232, 234, 127, 188, |
| 1232 | 174, 155, 317, 343, 15, 220, 345, 127, -85, 349, |
| 1233 | 193, 220, 194, 351, 127, 22, 15, 364, 34, 300, |
| 1234 | 3, 362, 1, 2, -284, 300, 369, 439, -284, 280, |
| 1235 | 127, 221, 267, 368, 37, 451, 268, 221, 236, 177, |
| 1236 | 237, 15, 179, 180, 238, 181, 182, 102, 463, 162, |
| 1237 | 269, 318, 464, -26, 270, 35, 43, 156, 62, 15, |
| 1238 | 163, 103, 104, 309, 371, 1, 2, 310, 220, 477, |
| 1239 | 39, 157, 477, 105, 70, 106, 192, 107, 198, 338, |
| 1240 | 36, 405, 240, 342, 212, 38, 350, 108, 358, 410, |
| 1241 | 358, 109, 282, 42, 221, 110, 434, 385, 111, 72, |
| 1242 | 73, 74, 403, 54, 446, 41, 404, 212, 447, 112, |
| 1243 | 75, 365, 1, 2, 113, 76, 114, 77, 115, 440, |
| 1244 | 449, 55, 441, 245, 450, 78, 58, 116, 117, 1, |
| 1245 | 2, 199, 200, 61, 79, 349, 80, 436, 226, 227, |
| 1246 | 94, 81, 118, 82, 83, 84, 95, 15, 179, 180, |
| 1247 | 319, 320, 401, 1, 2, 119, 325, 326, 236, 177, |
| 1248 | 237, 15, 179, 180, 238, 181, 182, 412, 127, 412, |
| 1249 | 236, 177, 237, 15, 179, 180, 238, 181, 182, 103, |
| 1250 | 104, 25, 328, 329, 199, 200, 239, 103, 104, 99, |
| 1251 | 26, 422, 423, 454, 455, 100, 430, 134, 140, 141, |
| 1252 | 285, 286, 240, 139, 142, 143, 144, 150, 151, 152, |
| 1253 | 338, 27, 350, 28, 240, 241, 358, 396, 159, 167, |
| 1254 | 154, 172, 29, 173, 174, 205, 445, 230, 271, 277, |
| 1255 | 242, 279, 313, 278, 340, 323, 273, 272, 276, 243, |
| 1256 | 284, 275, 296, 245, 331, 358, 324, 332, 15, 244, |
| 1257 | 344, 445, 363, 359, 361, 245, 366, 367, 430, 374, |
| 1258 | 378, 383, 384, 390, 246, 221, 468, 400, 388, 391, |
| 1259 | 406, 402, 247, 287, 398, 249, 236, 177, 237, 15, |
| 1260 | 179, 180, 238, 181, 182, 103, 104, 399, 407, 415, |
| 1261 | 408, 416, 239, 413, 417, 425, 8, 236, 177, 237, |
| 1262 | 15, 179, 180, 238, 181, 182, 103, 104, 418, 431, |
| 1263 | 421, 426, 432, 239, 448, 458, 165, 23, 40, 101, |
| 1264 | 240, 241, 96, 133, 236, 177, 237, 15, 179, 180, |
| 1265 | 238, 181, 182, 103, 104, 93, 242, 231, 175, 334, |
| 1266 | 360, 240, 241, 218, 453, 243, 435, 438, 381, 475, |
| 1267 | 452, 339, 307, 387, 311, 244, 392, 242, 308, 461, |
| 1268 | 333, 245, 393, 459, 457, 414, 243, 0, 240, 241, |
| 1269 | 246, 335, 0, 0, 0, 0, 244, 0, 247, 248, |
| 1270 | 0, 249, 245, 0, 242, 0, 0, 0, 0, 15, |
| 1271 | 0, 246, 0, 243, 0, 1, 2, 0, 0, 0, |
| 1272 | 248, 0, 249, 244, 0, 0, 0, 0, 70, 245, |
| 1273 | 0, 0, 176, 177, 178, 15, 179, 180, 246, 181, |
| 1274 | 182, 1, 2, 71, 0, 0, 0, 248, 0, 249, |
| 1275 | 0, 0, 0, 72, 73, 74, 0, 0, 0, 0, |
| 1276 | 0, 0, 0, 0, 75, 0, 0, 0, 0, 76, |
| 1277 | 0, 77, 0, 0, 0, 0, 183, 0, 0, 78, |
| 1278 | 0, 0, 0, 0, 0, 0, 0, 0, 79, 0, |
| 1279 | 80, 0, 103, 104, 206, 81, 0, 82, 83, 84, |
| 1280 | 213, 0, 0, 0, 105, 70, 106, 0, 107, 214, |
| 1281 | 0, 0, 0, 0, 0, 0, 0, 184, 108, 0, |
| 1282 | 0, 0, 109, 0, 0, 0, 110, 0, 0, 111, |
| 1283 | 72, 73, 74, 0, 0, 207, 0, 0, 215, 0, |
| 1284 | 112, 75, 0, 0, 0, 113, 76, 114, 77, 115, |
| 1285 | 0, 0, 0, 0, 0, 0, 78, 0, 116, 117, |
| 1286 | 216, 217, 0, 0, 0, 79, 0, 80, 1, 2, |
| 1287 | 0, 0, 81, 118, 82, 83, 84, 0, 0, 0, |
| 1288 | 105, 70, 106, 0, 107, 0, 0, 0, 0, 0, |
| 1289 | 0, 0, 0, 0, 108, 0, 0, 0, 109, 0, |
| 1290 | 0, 0, 110, 0, 0, 111, 72, 73, 74, 0, |
| 1291 | 0, 0, 0, 0, 0, 0, 112, 75, 0, 0, |
| 1292 | 0, 113, 76, 114, 77, 115, 0, 0, 0, 0, |
| 1293 | 0, 0, 78, 0, 116, 117, 0, 0, 0, 0, |
| 1294 | 0, 79, 0, 80, 0, 0, 0, 0, 81, 118, |
| 1295 | 82, 83, 84 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1296 | }; |
| 1297 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1298 | static const yytype_int16 yycheck[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1299 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1300 | 12, 216, 217, 92, 0, 91, 18, 3, 174, 5, |
| 1301 | 321, 151, 8, 102, 6, 271, 154, 11, 151, 159, |
| 1302 | 11, 6, 316, 278, 35, 151, 152, 19, 20, 21, |
| 1303 | 11, 43, 56, 159, 19, 20, 21, 112, 119, 333, |
| 1304 | 6, 116, 4, 55, 56, 53, 5, 43, 60, 11, |
| 1305 | 11, 12, 64, 19, 20, 21, 11, 12, 13, 55, |
| 1306 | 56, 85, 151, 11, 60, 18, 19, 119, 64, 17, |
| 1307 | 18, 11, 0, 85, 160, 37, 24, 8, 9, 10, |
| 1308 | 11, 12, 13, 249, 15, 16, 98, 11, 313, 85, |
| 1309 | 171, 11, 12, 13, 11, 12, 109, 37, 301, 302, |
| 1310 | 303, 97, 98, 41, 307, 308, 331, 118, 116, 122, |
| 1311 | 18, 19, 111, 37, 17, 18, 110, 115, 116, 171, |
| 1312 | 112, 52, 5, 119, 118, 8, 118, 139, 268, 110, |
| 1313 | 121, 442, 40, 118, 272, 268, 276, 226, 227, 151, |
| 1314 | 152, 230, 268, 139, 270, 271, 402, 159, 110, 404, |
| 1315 | 276, 112, 118, 119, 357, 110, 118, 116, 154, 299, |
| 1316 | 172, 173, 93, 40, 113, 118, 332, 115, 76, 40, |
| 1317 | 110, 12, 375, 299, 22, 171, 172, 173, 118, 268, |
| 1318 | 111, 26, 9, 276, 11, 87, 110, 118, 112, 278, |
| 1319 | 110, 87, 112, 279, 118, 112, 11, 286, 64, 76, |
| 1320 | 103, 284, 17, 18, 112, 76, 299, 410, 116, 111, |
| 1321 | 118, 113, 112, 296, 60, 430, 116, 113, 8, 9, |
| 1322 | 10, 11, 12, 13, 14, 15, 16, 3, 76, 48, |
| 1323 | 112, 243, 80, 46, 116, 91, 49, 82, 53, 11, |
| 1324 | 59, 17, 18, 112, 121, 17, 18, 116, 87, 472, |
| 1325 | 3, 96, 475, 29, 30, 31, 268, 33, 270, 271, |
| 1326 | 91, 350, 52, 275, 276, 91, 278, 43, 280, 358, |
| 1327 | 282, 47, 111, 28, 113, 51, 402, 67, 54, 55, |
| 1328 | 56, 57, 112, 46, 112, 114, 116, 299, 116, 65, |
| 1329 | 66, 287, 17, 18, 70, 71, 72, 73, 74, 411, |
| 1330 | 112, 61, 414, 93, 116, 81, 115, 83, 84, 17, |
| 1331 | 18, 19, 20, 111, 90, 404, 92, 406, 19, 20, |
| 1332 | 112, 97, 98, 99, 100, 101, 115, 11, 12, 13, |
| 1333 | 36, 37, 344, 17, 18, 111, 107, 108, 8, 9, |
| 1334 | 10, 11, 12, 13, 14, 15, 16, 359, 118, 361, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1335 | 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1336 | 18, 18, 105, 106, 19, 20, 24, 17, 18, 111, |
| 1337 | 27, 19, 20, 440, 441, 18, 388, 112, 88, 88, |
| 1338 | 38, 39, 52, 121, 78, 58, 88, 3, 111, 111, |
| 1339 | 402, 48, 404, 50, 52, 53, 408, 67, 3, 111, |
| 1340 | 121, 117, 59, 117, 111, 12, 418, 3, 113, 42, |
| 1341 | 68, 75, 104, 111, 7, 112, 119, 121, 117, 77, |
| 1342 | 113, 121, 113, 93, 104, 437, 116, 113, 11, 87, |
| 1343 | 32, 443, 32, 75, 75, 93, 114, 111, 450, 95, |
| 1344 | 102, 122, 109, 114, 102, 113, 458, 7, 111, 110, |
| 1345 | 75, 120, 110, 111, 114, 113, 8, 9, 10, 11, |
| 1346 | 12, 13, 14, 15, 16, 17, 18, 114, 112, 114, |
| 1347 | 116, 111, 24, 112, 112, 89, 3, 8, 9, 10, |
| 1348 | 11, 12, 13, 14, 15, 16, 17, 18, 123, 116, |
| 1349 | 114, 122, 114, 24, 111, 121, 132, 18, 31, 85, |
| 1350 | 52, 53, 64, 98, 8, 9, 10, 11, 12, 13, |
| 1351 | 14, 15, 16, 17, 18, 60, 68, 171, 150, 268, |
| 1352 | 282, 52, 53, 160, 437, 77, 404, 408, 310, 471, |
| 1353 | 431, 272, 227, 319, 230, 87, 327, 68, 227, 450, |
| 1354 | 260, 93, 330, 447, 443, 361, 77, -1, 52, 53, |
| 1355 | 102, 270, -1, -1, -1, -1, 87, -1, 110, 111, |
| 1356 | -1, 113, 93, -1, 68, -1, -1, -1, -1, 11, |
| 1357 | -1, 102, -1, 77, -1, 17, 18, -1, -1, -1, |
| 1358 | 111, -1, 113, 87, -1, -1, -1, -1, 30, 93, |
| 1359 | -1, -1, 8, 9, 10, 11, 12, 13, 102, 15, |
| 1360 | 16, 17, 18, 45, -1, -1, -1, 111, -1, 113, |
| 1361 | -1, -1, -1, 55, 56, 57, -1, -1, -1, -1, |
| 1362 | -1, -1, -1, -1, 66, -1, -1, -1, -1, 71, |
| 1363 | -1, 73, -1, -1, -1, -1, 52, -1, -1, 81, |
| 1364 | -1, -1, -1, -1, -1, -1, -1, -1, 90, -1, |
| 1365 | 92, -1, 17, 18, 70, 97, -1, 99, 100, 101, |
| 1366 | 25, -1, -1, -1, 29, 30, 31, -1, 33, 34, |
| 1367 | -1, -1, -1, -1, -1, -1, -1, 93, 43, -1, |
| 1368 | -1, -1, 47, -1, -1, -1, 51, -1, -1, 54, |
| 1369 | 55, 56, 57, -1, -1, 111, -1, -1, 63, -1, |
| 1370 | 65, 66, -1, -1, -1, 70, 71, 72, 73, 74, |
| 1371 | -1, -1, -1, -1, -1, -1, 81, -1, 83, 84, |
| 1372 | 85, 86, -1, -1, -1, 90, -1, 92, 17, 18, |
| 1373 | -1, -1, 97, 98, 99, 100, 101, -1, -1, -1, |
| 1374 | 29, 30, 31, -1, 33, -1, -1, -1, -1, -1, |
| 1375 | -1, -1, -1, -1, 43, -1, -1, -1, 47, -1, |
| 1376 | -1, -1, 51, -1, -1, 54, 55, 56, 57, -1, |
| 1377 | -1, -1, -1, -1, -1, -1, 65, 66, -1, -1, |
| 1378 | -1, 70, 71, 72, 73, 74, -1, -1, -1, -1, |
| 1379 | -1, -1, 81, -1, 83, 84, -1, -1, -1, -1, |
| 1380 | -1, 90, -1, 92, -1, -1, -1, -1, 97, 98, |
| 1381 | 99, 100, 101 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1382 | }; |
| 1383 | |
| 1384 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
| 1385 | symbol of state STATE-NUM. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1386 | static const yytype_uint8 yystos[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1387 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1388 | 0, 17, 18, 103, 125, 126, 127, 244, 126, 0, |
| 1389 | 127, 128, 111, 129, 130, 11, 12, 112, 131, 132, |
| 1390 | 247, 41, 112, 132, 113, 18, 27, 48, 50, 59, |
| 1391 | 133, 134, 135, 12, 64, 91, 91, 60, 91, 3, |
| 1392 | 135, 114, 28, 49, 136, 137, 149, 150, 24, 115, |
| 1393 | 151, 152, 244, 247, 46, 61, 141, 142, 115, 115, |
| 1394 | 116, 111, 53, 143, 144, 146, 147, 148, 244, 247, |
| 1395 | 30, 45, 55, 56, 57, 66, 71, 73, 81, 90, |
| 1396 | 92, 97, 99, 100, 101, 138, 139, 154, 156, 186, |
| 1397 | 196, 244, 247, 152, 112, 115, 146, 53, 116, 111, |
| 1398 | 18, 139, 3, 17, 18, 29, 31, 33, 43, 47, |
| 1399 | 51, 54, 65, 70, 72, 74, 83, 84, 98, 111, |
| 1400 | 155, 180, 193, 194, 195, 196, 245, 118, 176, 239, |
| 1401 | 240, 241, 244, 148, 112, 140, 35, 166, 176, 121, |
| 1402 | 88, 88, 78, 58, 88, 157, 158, 193, 194, 244, |
| 1403 | 3, 111, 111, 234, 121, 26, 82, 96, 242, 3, |
| 1404 | 177, 178, 48, 59, 243, 130, 145, 111, 244, 247, |
| 1405 | 112, 116, 117, 117, 111, 153, 8, 9, 10, 12, |
| 1406 | 13, 15, 16, 52, 93, 153, 159, 160, 176, 189, |
| 1407 | 191, 237, 247, 110, 112, 235, 236, 237, 247, 19, |
| 1408 | 20, 181, 182, 183, 244, 12, 70, 111, 187, 189, |
| 1409 | 190, 244, 247, 25, 34, 63, 85, 86, 155, 179, |
| 1410 | 87, 113, 199, 200, 201, 202, 19, 20, 168, 169, |
| 1411 | 3, 158, 244, 247, 244, 247, 8, 10, 14, 24, |
| 1412 | 52, 53, 68, 77, 87, 93, 102, 110, 111, 113, |
| 1413 | 180, 191, 204, 205, 206, 207, 208, 209, 211, 212, |
| 1414 | 213, 214, 215, 216, 237, 238, 247, 112, 116, 112, |
| 1415 | 116, 113, 121, 119, 188, 121, 117, 42, 111, 75, |
| 1416 | 111, 199, 111, 199, 113, 38, 39, 111, 203, 204, |
| 1417 | 221, 222, 224, 226, 227, 228, 113, 18, 19, 40, |
| 1418 | 76, 176, 184, 185, 232, 233, 176, 184, 185, 112, |
| 1419 | 116, 166, 176, 104, 109, 122, 225, 9, 247, 36, |
| 1420 | 37, 210, 204, 112, 116, 107, 108, 197, 105, 106, |
| 1421 | 198, 104, 113, 225, 160, 236, 190, 237, 247, 182, |
| 1422 | 7, 192, 247, 187, 32, 110, 164, 165, 175, 176, |
| 1423 | 247, 180, 37, 161, 162, 163, 175, 176, 247, 75, |
| 1424 | 161, 75, 203, 32, 176, 244, 114, 111, 203, 187, |
| 1425 | 232, 121, 232, 232, 95, 167, 232, 232, 102, 170, |
| 1426 | 171, 169, 209, 122, 109, 67, 213, 202, 111, 192, |
| 1427 | 114, 110, 207, 208, 209, 204, 67, 213, 114, 114, |
| 1428 | 7, 247, 120, 112, 116, 176, 75, 112, 116, 232, |
| 1429 | 176, 246, 247, 112, 246, 114, 111, 112, 123, 229, |
| 1430 | 230, 114, 19, 20, 232, 89, 122, 110, 217, 218, |
| 1431 | 247, 116, 114, 190, 237, 165, 176, 4, 163, 232, |
| 1432 | 239, 239, 223, 121, 231, 247, 112, 116, 111, 112, |
| 1433 | 116, 199, 205, 162, 178, 178, 192, 231, 121, 230, |
| 1434 | 172, 218, 22, 76, 80, 219, 220, 5, 247, 6, |
| 1435 | 21, 118, 173, 174, 183, 173, 112, 174, 119 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1436 | }; |
| 1437 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1438 | #define yyerrok (yyerrstatus = 0) |
| 1439 | #define yyclearin (yychar = YYEMPTY) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1440 | #define YYEMPTY (-2) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1441 | #define YYEOF 0 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1442 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1443 | #define YYACCEPT goto yyacceptlab |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1444 | #define YYABORT goto yyabortlab |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1445 | #define YYERROR goto yyerrorlab |
| 1446 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1447 | |
| 1448 | /* Like YYERROR except do call yyerror. This remains here temporarily |
| 1449 | to ease the transition to the new meaning of YYERROR, for GCC. |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1450 | Once GCC version 2 has supplanted version 1, this can go. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1451 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1452 | #define YYFAIL goto yyerrlab |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1453 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1454 | #define YYRECOVERING() (!!yyerrstatus) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1455 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1456 | #define YYBACKUP(Token, Value) \ |
| 1457 | do \ |
| 1458 | if (yychar == YYEMPTY && yylen == 1) \ |
| 1459 | { \ |
| 1460 | yychar = (Token); \ |
| 1461 | yylval = (Value); \ |
| 1462 | yytoken = YYTRANSLATE (yychar); \ |
| 1463 | YYPOPSTACK (1); \ |
| 1464 | goto yybackup; \ |
| 1465 | } \ |
| 1466 | else \ |
| 1467 | { \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1468 | yyerror (YY_("syntax error: cannot back up")); \ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1469 | YYERROR; \ |
| 1470 | } \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1471 | while (YYID (0)) |
| 1472 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1473 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1474 | #define YYTERROR 1 |
| 1475 | #define YYERRCODE 256 |
| 1476 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1477 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1478 | /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. |
| 1479 | If N is 0, then set CURRENT to the empty location which ends |
| 1480 | the previous symbol: RHS[0] (always defined). */ |
| 1481 | |
| 1482 | #define YYRHSLOC(Rhs, K) ((Rhs)[K]) |
| 1483 | #ifndef YYLLOC_DEFAULT |
| 1484 | # define YYLLOC_DEFAULT(Current, Rhs, N) \ |
| 1485 | do \ |
| 1486 | if (YYID (N)) \ |
| 1487 | { \ |
| 1488 | (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ |
| 1489 | (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ |
| 1490 | (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ |
| 1491 | (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ |
| 1492 | } \ |
| 1493 | else \ |
| 1494 | { \ |
| 1495 | (Current).first_line = (Current).last_line = \ |
| 1496 | YYRHSLOC (Rhs, 0).last_line; \ |
| 1497 | (Current).first_column = (Current).last_column = \ |
| 1498 | YYRHSLOC (Rhs, 0).last_column; \ |
| 1499 | } \ |
| 1500 | while (YYID (0)) |
| 1501 | #endif |
| 1502 | |
| 1503 | |
| 1504 | /* YY_LOCATION_PRINT -- Print the location on the stream. |
| 1505 | This macro was not mandated originally: define only if we know |
| 1506 | we won't break user code: when these are the locations we know. */ |
| 1507 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1508 | #ifndef YY_LOCATION_PRINT |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1509 | # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL |
| 1510 | # define YY_LOCATION_PRINT(File, Loc) \ |
| 1511 | fprintf (File, "%d.%d-%d.%d", \ |
| 1512 | (Loc).first_line, (Loc).first_column, \ |
| 1513 | (Loc).last_line, (Loc).last_column) |
| 1514 | # else |
| 1515 | # define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
| 1516 | # endif |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1517 | #endif |
| 1518 | |
| 1519 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1520 | /* YYLEX -- calling `yylex' with the right arguments. */ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1521 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1522 | #ifdef YYLEX_PARAM |
| 1523 | # define YYLEX yylex (YYLEX_PARAM) |
| 1524 | #else |
| 1525 | # define YYLEX yylex () |
| 1526 | #endif |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 1527 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1528 | /* Enable debugging if requested. */ |
| 1529 | #if YYDEBUG |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 1530 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1531 | # ifndef YYFPRINTF |
| 1532 | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
| 1533 | # define YYFPRINTF fprintf |
| 1534 | # endif |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 1535 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1536 | # define YYDPRINTF(Args) \ |
| 1537 | do { \ |
| 1538 | if (yydebug) \ |
| 1539 | YYFPRINTF Args; \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1540 | } while (YYID (0)) |
| 1541 | |
| 1542 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
| 1543 | do { \ |
| 1544 | if (yydebug) \ |
| 1545 | { \ |
| 1546 | YYFPRINTF (stderr, "%s ", Title); \ |
| 1547 | yy_symbol_print (stderr, \ |
| 1548 | Type, Value); \ |
| 1549 | YYFPRINTF (stderr, "\n"); \ |
| 1550 | } \ |
| 1551 | } while (YYID (0)) |
| 1552 | |
| 1553 | |
| 1554 | /*--------------------------------. |
| 1555 | | Print this symbol on YYOUTPUT. | |
| 1556 | `--------------------------------*/ |
| 1557 | |
| 1558 | /*ARGSUSED*/ |
| 1559 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1560 | || defined __cplusplus || defined _MSC_VER) |
| 1561 | static void |
| 1562 | yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
| 1563 | #else |
| 1564 | static void |
| 1565 | yy_symbol_value_print (yyoutput, yytype, yyvaluep) |
| 1566 | FILE *yyoutput; |
| 1567 | int yytype; |
| 1568 | YYSTYPE const * const yyvaluep; |
| 1569 | #endif |
| 1570 | { |
| 1571 | if (!yyvaluep) |
| 1572 | return; |
| 1573 | # ifdef YYPRINT |
| 1574 | if (yytype < YYNTOKENS) |
| 1575 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); |
| 1576 | # else |
| 1577 | YYUSE (yyoutput); |
| 1578 | # endif |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1579 | switch (yytype) |
| 1580 | { |
| 1581 | default: |
| 1582 | break; |
| 1583 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1584 | } |
| 1585 | |
| 1586 | |
| 1587 | /*--------------------------------. |
| 1588 | | Print this symbol on YYOUTPUT. | |
| 1589 | `--------------------------------*/ |
| 1590 | |
| 1591 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1592 | || defined __cplusplus || defined _MSC_VER) |
| 1593 | static void |
| 1594 | yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
| 1595 | #else |
| 1596 | static void |
| 1597 | yy_symbol_print (yyoutput, yytype, yyvaluep) |
| 1598 | FILE *yyoutput; |
| 1599 | int yytype; |
| 1600 | YYSTYPE const * const yyvaluep; |
| 1601 | #endif |
| 1602 | { |
| 1603 | if (yytype < YYNTOKENS) |
| 1604 | YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); |
| 1605 | else |
| 1606 | YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); |
| 1607 | |
| 1608 | yy_symbol_value_print (yyoutput, yytype, yyvaluep); |
| 1609 | YYFPRINTF (yyoutput, ")"); |
| 1610 | } |
| 1611 | |
| 1612 | /*------------------------------------------------------------------. |
| 1613 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | |
| 1614 | | TOP (included). | |
| 1615 | `------------------------------------------------------------------*/ |
| 1616 | |
| 1617 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1618 | || defined __cplusplus || defined _MSC_VER) |
| 1619 | static void |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1620 | yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1621 | #else |
| 1622 | static void |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1623 | yy_stack_print (bottom, top) |
| 1624 | yytype_int16 *bottom; |
| 1625 | yytype_int16 *top; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1626 | #endif |
| 1627 | { |
| 1628 | YYFPRINTF (stderr, "Stack now"); |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1629 | for (; bottom <= top; ++bottom) |
| 1630 | YYFPRINTF (stderr, " %d", *bottom); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1631 | YYFPRINTF (stderr, "\n"); |
| 1632 | } |
| 1633 | |
| 1634 | # define YY_STACK_PRINT(Bottom, Top) \ |
| 1635 | do { \ |
| 1636 | if (yydebug) \ |
| 1637 | yy_stack_print ((Bottom), (Top)); \ |
| 1638 | } while (YYID (0)) |
| 1639 | |
| 1640 | |
| 1641 | /*------------------------------------------------. |
| 1642 | | Report that the YYRULE is going to be reduced. | |
| 1643 | `------------------------------------------------*/ |
| 1644 | |
| 1645 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1646 | || defined __cplusplus || defined _MSC_VER) |
| 1647 | static void |
| 1648 | yy_reduce_print (YYSTYPE *yyvsp, int yyrule) |
| 1649 | #else |
| 1650 | static void |
| 1651 | yy_reduce_print (yyvsp, yyrule) |
| 1652 | YYSTYPE *yyvsp; |
| 1653 | int yyrule; |
| 1654 | #endif |
| 1655 | { |
| 1656 | int yynrhs = yyr2[yyrule]; |
| 1657 | int yyi; |
| 1658 | unsigned long int yylno = yyrline[yyrule]; |
| 1659 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", |
| 1660 | yyrule - 1, yylno); |
| 1661 | /* The symbols being reduced. */ |
| 1662 | for (yyi = 0; yyi < yynrhs; yyi++) |
| 1663 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1664 | fprintf (stderr, " $%d = ", yyi + 1); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1665 | yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], |
| 1666 | &(yyvsp[(yyi + 1) - (yynrhs)]) |
| 1667 | ); |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1668 | fprintf (stderr, "\n"); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1669 | } |
| 1670 | } |
| 1671 | |
| 1672 | # define YY_REDUCE_PRINT(Rule) \ |
| 1673 | do { \ |
| 1674 | if (yydebug) \ |
| 1675 | yy_reduce_print (yyvsp, Rule); \ |
| 1676 | } while (YYID (0)) |
| 1677 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1678 | /* Nonzero means print parse trace. It is left uninitialized so that |
| 1679 | multiple parsers can coexist. */ |
| 1680 | int yydebug; |
| 1681 | #else /* !YYDEBUG */ |
| 1682 | # define YYDPRINTF(Args) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1683 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
| 1684 | # define YY_STACK_PRINT(Bottom, Top) |
| 1685 | # define YY_REDUCE_PRINT(Rule) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1686 | #endif /* !YYDEBUG */ |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 1687 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1688 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1689 | /* YYINITDEPTH -- initial size of the parser's stacks. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1690 | #ifndef YYINITDEPTH |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1691 | # define YYINITDEPTH 200 |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1692 | #endif |
| 1693 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1694 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
| 1695 | if the built-in stack extension method is used). |
| 1696 | |
| 1697 | Do not make this value too large; the results are undefined if |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1698 | YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1699 | evaluated with infinite-precision integer arithmetic. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1700 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1701 | #ifndef YYMAXDEPTH |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1702 | # define YYMAXDEPTH 10000 |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1703 | #endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1704 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1705 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1706 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1707 | #if YYERROR_VERBOSE |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1708 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1709 | # ifndef yystrlen |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1710 | # if defined __GLIBC__ && defined _STRING_H |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1711 | # define yystrlen strlen |
| 1712 | # else |
| 1713 | /* Return the length of YYSTR. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1714 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1715 | || defined __cplusplus || defined _MSC_VER) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1716 | static YYSIZE_T |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1717 | yystrlen (const char *yystr) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1718 | #else |
| 1719 | static YYSIZE_T |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1720 | yystrlen (yystr) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1721 | const char *yystr; |
| 1722 | #endif |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 1723 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1724 | YYSIZE_T yylen; |
| 1725 | for (yylen = 0; yystr[yylen]; yylen++) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1726 | continue; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1727 | return yylen; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1728 | } |
| 1729 | # endif |
| 1730 | # endif |
| 1731 | |
| 1732 | # ifndef yystpcpy |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1733 | # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1734 | # define yystpcpy stpcpy |
| 1735 | # else |
| 1736 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
| 1737 | YYDEST. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1738 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1739 | || defined __cplusplus || defined _MSC_VER) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1740 | static char * |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1741 | yystpcpy (char *yydest, const char *yysrc) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1742 | #else |
| 1743 | static char * |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1744 | yystpcpy (yydest, yysrc) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1745 | char *yydest; |
| 1746 | const char *yysrc; |
| 1747 | #endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1748 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1749 | char *yyd = yydest; |
| 1750 | const char *yys = yysrc; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1751 | |
| 1752 | while ((*yyd++ = *yys++) != '\0') |
| 1753 | continue; |
| 1754 | |
| 1755 | return yyd - 1; |
| 1756 | } |
| 1757 | # endif |
| 1758 | # endif |
| 1759 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1760 | # ifndef yytnamerr |
| 1761 | /* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
| 1762 | quotes and backslashes, so that it's suitable for yyerror. The |
| 1763 | heuristic is that double-quoting is unnecessary unless the string |
| 1764 | contains an apostrophe, a comma, or backslash (other than |
| 1765 | backslash-backslash). YYSTR is taken from yytname. If YYRES is |
| 1766 | null, do not copy; instead, return the length of what the result |
| 1767 | would have been. */ |
| 1768 | static YYSIZE_T |
| 1769 | yytnamerr (char *yyres, const char *yystr) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1770 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1771 | if (*yystr == '"') |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1772 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1773 | YYSIZE_T yyn = 0; |
| 1774 | char const *yyp = yystr; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1775 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1776 | for (;;) |
| 1777 | switch (*++yyp) |
| 1778 | { |
| 1779 | case '\'': |
| 1780 | case ',': |
| 1781 | goto do_not_strip_quotes; |
| 1782 | |
| 1783 | case '\\': |
| 1784 | if (*++yyp != '\\') |
| 1785 | goto do_not_strip_quotes; |
| 1786 | /* Fall through. */ |
| 1787 | default: |
| 1788 | if (yyres) |
| 1789 | yyres[yyn] = *yyp; |
| 1790 | yyn++; |
| 1791 | break; |
| 1792 | |
| 1793 | case '"': |
| 1794 | if (yyres) |
| 1795 | yyres[yyn] = '\0'; |
| 1796 | return yyn; |
| 1797 | } |
| 1798 | do_not_strip_quotes: ; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1799 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1800 | |
| 1801 | if (! yyres) |
| 1802 | return yystrlen (yystr); |
| 1803 | |
| 1804 | return yystpcpy (yyres, yystr) - yyres; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1805 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1806 | # endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1807 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1808 | /* Copy into YYRESULT an error message about the unexpected token |
| 1809 | YYCHAR while in state YYSTATE. Return the number of bytes copied, |
| 1810 | including the terminating null byte. If YYRESULT is null, do not |
| 1811 | copy anything; just return the number of bytes that would be |
| 1812 | copied. As a special case, return 0 if an ordinary "syntax error" |
| 1813 | message will do. Return YYSIZE_MAXIMUM if overflow occurs during |
| 1814 | size calculation. */ |
| 1815 | static YYSIZE_T |
| 1816 | yysyntax_error (char *yyresult, int yystate, int yychar) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1817 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1818 | int yyn = yypact[yystate]; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1819 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1820 | if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) |
| 1821 | return 0; |
| 1822 | else |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1823 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1824 | int yytype = YYTRANSLATE (yychar); |
| 1825 | YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); |
| 1826 | YYSIZE_T yysize = yysize0; |
| 1827 | YYSIZE_T yysize1; |
| 1828 | int yysize_overflow = 0; |
| 1829 | enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
| 1830 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
| 1831 | int yyx; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1832 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1833 | # if 0 |
| 1834 | /* This is so xgettext sees the translatable formats that are |
| 1835 | constructed on the fly. */ |
| 1836 | YY_("syntax error, unexpected %s"); |
| 1837 | YY_("syntax error, unexpected %s, expecting %s"); |
| 1838 | YY_("syntax error, unexpected %s, expecting %s or %s"); |
| 1839 | YY_("syntax error, unexpected %s, expecting %s or %s or %s"); |
| 1840 | YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); |
| 1841 | # endif |
| 1842 | char *yyfmt; |
| 1843 | char const *yyf; |
| 1844 | static char const yyunexpected[] = "syntax error, unexpected %s"; |
| 1845 | static char const yyexpecting[] = ", expecting %s"; |
| 1846 | static char const yyor[] = " or %s"; |
| 1847 | char yyformat[sizeof yyunexpected |
| 1848 | + sizeof yyexpecting - 1 |
| 1849 | + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) |
| 1850 | * (sizeof yyor - 1))]; |
| 1851 | char const *yyprefix = yyexpecting; |
| 1852 | |
| 1853 | /* Start YYX at -YYN if negative to avoid negative indexes in |
| 1854 | YYCHECK. */ |
| 1855 | int yyxbegin = yyn < 0 ? -yyn : 0; |
| 1856 | |
| 1857 | /* Stay within bounds of both yycheck and yytname. */ |
| 1858 | int yychecklim = YYLAST - yyn + 1; |
| 1859 | int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
| 1860 | int yycount = 1; |
| 1861 | |
| 1862 | yyarg[0] = yytname[yytype]; |
| 1863 | yyfmt = yystpcpy (yyformat, yyunexpected); |
| 1864 | |
| 1865 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
| 1866 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) |
| 1867 | { |
| 1868 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
| 1869 | { |
| 1870 | yycount = 1; |
| 1871 | yysize = yysize0; |
| 1872 | yyformat[sizeof yyunexpected - 1] = '\0'; |
| 1873 | break; |
| 1874 | } |
| 1875 | yyarg[yycount++] = yytname[yyx]; |
| 1876 | yysize1 = yysize + yytnamerr (0, yytname[yyx]); |
| 1877 | yysize_overflow |= (yysize1 < yysize); |
| 1878 | yysize = yysize1; |
| 1879 | yyfmt = yystpcpy (yyfmt, yyprefix); |
| 1880 | yyprefix = yyor; |
| 1881 | } |
| 1882 | |
| 1883 | yyf = YY_(yyformat); |
| 1884 | yysize1 = yysize + yystrlen (yyf); |
| 1885 | yysize_overflow |= (yysize1 < yysize); |
| 1886 | yysize = yysize1; |
| 1887 | |
| 1888 | if (yysize_overflow) |
| 1889 | return YYSIZE_MAXIMUM; |
| 1890 | |
| 1891 | if (yyresult) |
| 1892 | { |
| 1893 | /* Avoid sprintf, as that infringes on the user's name space. |
| 1894 | Don't have undefined behavior even if the translation |
| 1895 | produced a string with the wrong number of "%s"s. */ |
| 1896 | char *yyp = yyresult; |
| 1897 | int yyi = 0; |
| 1898 | while ((*yyp = *yyf) != '\0') |
| 1899 | { |
| 1900 | if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) |
| 1901 | { |
| 1902 | yyp += yytnamerr (yyp, yyarg[yyi++]); |
| 1903 | yyf += 2; |
| 1904 | } |
| 1905 | else |
| 1906 | { |
| 1907 | yyp++; |
| 1908 | yyf++; |
| 1909 | } |
| 1910 | } |
| 1911 | } |
| 1912 | return yysize; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1913 | } |
| 1914 | } |
| 1915 | #endif /* YYERROR_VERBOSE */ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1916 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1917 | |
| 1918 | /*-----------------------------------------------. |
| 1919 | | Release the memory associated to this symbol. | |
| 1920 | `-----------------------------------------------*/ |
| 1921 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1922 | /*ARGSUSED*/ |
| 1923 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1924 | || defined __cplusplus || defined _MSC_VER) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1925 | static void |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1926 | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1927 | #else |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1928 | static void |
| 1929 | yydestruct (yymsg, yytype, yyvaluep) |
| 1930 | const char *yymsg; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1931 | int yytype; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1932 | YYSTYPE *yyvaluep; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1933 | #endif |
| 1934 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1935 | YYUSE (yyvaluep); |
| 1936 | |
| 1937 | if (!yymsg) |
| 1938 | yymsg = "Deleting"; |
| 1939 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1940 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1941 | switch (yytype) |
| 1942 | { |
| 1943 | |
| 1944 | default: |
| 1945 | break; |
| 1946 | } |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 1947 | } |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1948 | |
| 1949 | |
| 1950 | /* Prevent warnings from -Wmissing-prototypes. */ |
| 1951 | |
| 1952 | #ifdef YYPARSE_PARAM |
| 1953 | #if defined __STDC__ || defined __cplusplus |
| 1954 | int yyparse (void *YYPARSE_PARAM); |
| 1955 | #else |
| 1956 | int yyparse (); |
| 1957 | #endif |
| 1958 | #else /* ! YYPARSE_PARAM */ |
| 1959 | #if defined __STDC__ || defined __cplusplus |
| 1960 | int yyparse (void); |
| 1961 | #else |
| 1962 | int yyparse (); |
| 1963 | #endif |
| 1964 | #endif /* ! YYPARSE_PARAM */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1965 | |
| 1966 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1967 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1968 | /* The look-ahead symbol. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1969 | int yychar; |
| 1970 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1971 | /* The semantic value of the look-ahead symbol. */ |
| 1972 | YYSTYPE yylval; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1973 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1974 | /* Number of syntax errors so far. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1975 | int yynerrs; |
| 1976 | |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 1977 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1978 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1979 | /*----------. |
| 1980 | | yyparse. | |
| 1981 | `----------*/ |
| 1982 | |
| 1983 | #ifdef YYPARSE_PARAM |
| 1984 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1985 | || defined __cplusplus || defined _MSC_VER) |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 1986 | int |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1987 | yyparse (void *YYPARSE_PARAM) |
| 1988 | #else |
| 1989 | int |
| 1990 | yyparse (YYPARSE_PARAM) |
| 1991 | void *YYPARSE_PARAM; |
| 1992 | #endif |
| 1993 | #else /* ! YYPARSE_PARAM */ |
| 1994 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1995 | || defined __cplusplus || defined _MSC_VER) |
| 1996 | int |
| 1997 | yyparse (void) |
| 1998 | #else |
| 1999 | int |
| 2000 | yyparse () |
| 2001 | |
| 2002 | #endif |
| 2003 | #endif |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 2004 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2005 | |
| 2006 | int yystate; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2007 | int yyn; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2008 | int yyresult; |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2009 | /* Number of tokens to shift before error messages enabled. */ |
| 2010 | int yyerrstatus; |
| 2011 | /* Look-ahead token as an internal (translated) token number. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2012 | int yytoken = 0; |
| 2013 | #if YYERROR_VERBOSE |
| 2014 | /* Buffer for error messages, and its allocated size. */ |
| 2015 | char yymsgbuf[128]; |
| 2016 | char *yymsg = yymsgbuf; |
| 2017 | YYSIZE_T yymsg_alloc = sizeof yymsgbuf; |
| 2018 | #endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2019 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2020 | /* Three stacks and their tools: |
| 2021 | `yyss': related to states, |
| 2022 | `yyvs': related to semantic values, |
| 2023 | `yyls': related to locations. |
| 2024 | |
| 2025 | Refer to the stacks thru separate pointers, to allow yyoverflow |
| 2026 | to reallocate them elsewhere. */ |
| 2027 | |
| 2028 | /* The state stack. */ |
| 2029 | yytype_int16 yyssa[YYINITDEPTH]; |
| 2030 | yytype_int16 *yyss = yyssa; |
| 2031 | yytype_int16 *yyssp; |
| 2032 | |
| 2033 | /* The semantic value stack. */ |
| 2034 | YYSTYPE yyvsa[YYINITDEPTH]; |
| 2035 | YYSTYPE *yyvs = yyvsa; |
| 2036 | YYSTYPE *yyvsp; |
| 2037 | |
| 2038 | |
| 2039 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2040 | #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2041 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2042 | YYSIZE_T yystacksize = YYINITDEPTH; |
| 2043 | |
| 2044 | /* The variables used to return semantic value and location from the |
| 2045 | action routines. */ |
| 2046 | YYSTYPE yyval; |
| 2047 | |
| 2048 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2049 | /* The number of symbols on the RHS of the reduced rule. |
| 2050 | Keep to zero when no symbol should be popped. */ |
| 2051 | int yylen = 0; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2052 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2053 | YYDPRINTF ((stderr, "Starting parse\n")); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2054 | |
| 2055 | yystate = 0; |
| 2056 | yyerrstatus = 0; |
| 2057 | yynerrs = 0; |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2058 | yychar = YYEMPTY; /* Cause a token to be read. */ |
| 2059 | |
| 2060 | /* Initialize stack pointers. |
| 2061 | Waste one element of value and location stack |
| 2062 | so that they stay on the same level as the state stack. |
| 2063 | The wasted elements are never initialized. */ |
| 2064 | |
| 2065 | yyssp = yyss; |
| 2066 | yyvsp = yyvs; |
| 2067 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2068 | goto yysetstate; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2069 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2070 | /*------------------------------------------------------------. |
| 2071 | | yynewstate -- Push a new state, which is found in yystate. | |
| 2072 | `------------------------------------------------------------*/ |
| 2073 | yynewstate: |
| 2074 | /* In all cases, when you get here, the value and location stacks |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2075 | have just been pushed. So pushing a state here evens the stacks. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2076 | yyssp++; |
| 2077 | |
| 2078 | yysetstate: |
| 2079 | *yyssp = yystate; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2080 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2081 | if (yyss + yystacksize - 1 <= yyssp) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2082 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2083 | /* Get the current used size of the three stacks, in elements. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2084 | YYSIZE_T yysize = yyssp - yyss + 1; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2085 | |
| 2086 | #ifdef yyoverflow |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2087 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2088 | /* Give user a chance to reallocate the stack. Use copies of |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2089 | these so that the &'s don't force the real ones into |
| 2090 | memory. */ |
| 2091 | YYSTYPE *yyvs1 = yyvs; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2092 | yytype_int16 *yyss1 = yyss; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2093 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2094 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2095 | /* Each stack pointer address is followed by the size of the |
| 2096 | data in use in that stack, in bytes. This used to be a |
| 2097 | conditional around just the two extra args, but that might |
| 2098 | be undefined if yyoverflow is a macro. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2099 | yyoverflow (YY_("memory exhausted"), |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2100 | &yyss1, yysize * sizeof (*yyssp), |
| 2101 | &yyvs1, yysize * sizeof (*yyvsp), |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2102 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2103 | &yystacksize); |
| 2104 | |
| 2105 | yyss = yyss1; |
| 2106 | yyvs = yyvs1; |
| 2107 | } |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2108 | #else /* no yyoverflow */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2109 | # ifndef YYSTACK_RELOCATE |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2110 | goto yyexhaustedlab; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2111 | # else |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2112 | /* Extend the stack our own way. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2113 | if (YYMAXDEPTH <= yystacksize) |
| 2114 | goto yyexhaustedlab; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2115 | yystacksize *= 2; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2116 | if (YYMAXDEPTH < yystacksize) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2117 | yystacksize = YYMAXDEPTH; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2118 | |
| 2119 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2120 | yytype_int16 *yyss1 = yyss; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2121 | union yyalloc *yyptr = |
| 2122 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
| 2123 | if (! yyptr) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2124 | goto yyexhaustedlab; |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2125 | YYSTACK_RELOCATE (yyss); |
| 2126 | YYSTACK_RELOCATE (yyvs); |
| 2127 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2128 | # undef YYSTACK_RELOCATE |
| 2129 | if (yyss1 != yyssa) |
| 2130 | YYSTACK_FREE (yyss1); |
| 2131 | } |
| 2132 | # endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2133 | #endif /* no yyoverflow */ |
| 2134 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2135 | yyssp = yyss + yysize - 1; |
| 2136 | yyvsp = yyvs + yysize - 1; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2137 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2138 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2139 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
| 2140 | (unsigned long int) yystacksize)); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2141 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2142 | if (yyss + yystacksize - 1 <= yyssp) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2143 | YYABORT; |
| 2144 | } |
| 2145 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2146 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2147 | |
| 2148 | goto yybackup; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2149 | |
| 2150 | /*-----------. |
| 2151 | | yybackup. | |
| 2152 | `-----------*/ |
| 2153 | yybackup: |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2154 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2155 | /* Do appropriate processing given the current state. Read a |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2156 | look-ahead token if we need one and don't already have one. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2157 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2158 | /* First try to decide what to do without reference to look-ahead token. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2159 | yyn = yypact[yystate]; |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2160 | if (yyn == YYPACT_NINF) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2161 | goto yydefault; |
| 2162 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2163 | /* Not known => get a look-ahead token if don't already have one. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2164 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2165 | /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2166 | if (yychar == YYEMPTY) |
| 2167 | { |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2168 | YYDPRINTF ((stderr, "Reading a token: ")); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2169 | yychar = YYLEX; |
| 2170 | } |
| 2171 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2172 | if (yychar <= YYEOF) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2173 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2174 | yychar = yytoken = YYEOF; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2175 | YYDPRINTF ((stderr, "Now at end of input.\n")); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2176 | } |
| 2177 | else |
| 2178 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2179 | yytoken = YYTRANSLATE (yychar); |
| 2180 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2181 | } |
| 2182 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2183 | /* If the proper action on seeing token YYTOKEN is to reduce or to |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2184 | detect an error, take that action. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2185 | yyn += yytoken; |
| 2186 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2187 | goto yydefault; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2188 | yyn = yytable[yyn]; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2189 | if (yyn <= 0) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2190 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2191 | if (yyn == 0 || yyn == YYTABLE_NINF) |
| 2192 | goto yyerrlab; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2193 | yyn = -yyn; |
| 2194 | goto yyreduce; |
| 2195 | } |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2196 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2197 | if (yyn == YYFINAL) |
| 2198 | YYACCEPT; |
| 2199 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2200 | /* Count tokens shifted since error; after three, turn off error |
| 2201 | status. */ |
| 2202 | if (yyerrstatus) |
| 2203 | yyerrstatus--; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2204 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2205 | /* Shift the look-ahead token. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2206 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
| 2207 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2208 | /* Discard the shifted token unless it is eof. */ |
| 2209 | if (yychar != YYEOF) |
| 2210 | yychar = YYEMPTY; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2211 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2212 | yystate = yyn; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2213 | *++yyvsp = yylval; |
| 2214 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2215 | goto yynewstate; |
| 2216 | |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 2217 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2218 | /*-----------------------------------------------------------. |
| 2219 | | yydefault -- do the default action for the current state. | |
| 2220 | `-----------------------------------------------------------*/ |
| 2221 | yydefault: |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2222 | yyn = yydefact[yystate]; |
| 2223 | if (yyn == 0) |
| 2224 | goto yyerrlab; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2225 | goto yyreduce; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2226 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2227 | |
| 2228 | /*-----------------------------. |
| 2229 | | yyreduce -- Do a reduction. | |
| 2230 | `-----------------------------*/ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2231 | yyreduce: |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2232 | /* yyn is the number of a rule to reduce with. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2233 | yylen = yyr2[yyn]; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2234 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2235 | /* If YYLEN is nonzero, implement the default value of the action: |
| 2236 | `$$ = $1'. |
| 2237 | |
| 2238 | Otherwise, the following line sets YYVAL to garbage. |
| 2239 | This behavior is undocumented and Bison |
| 2240 | users should not rely upon it. Assigning to YYVAL |
| 2241 | unconditionally makes the parser a bit smaller, and it avoids a |
| 2242 | GCC warning that YYVAL may be used uninitialized. */ |
| 2243 | yyval = yyvsp[1-yylen]; |
| 2244 | |
| 2245 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2246 | YY_REDUCE_PRINT (yyn); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2247 | switch (yyn) |
| 2248 | { |
| 2249 | case 2: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2250 | #line 358 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2251 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2252 | *(void **)param = (yyvsp[(2) - (2)].a_grammar); |
| 2253 | } |
| 2254 | break; |
| 2255 | |
| 2256 | case 3: |
| 2257 | #line 361 "asn1p_y.y" |
| 2258 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2259 | *(void **)param = (yyvsp[(1) - (1)].a_grammar); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2260 | } |
| 2261 | break; |
| 2262 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2263 | case 4: |
| 2264 | #line 367 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2265 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2266 | (yyval.a_grammar) = asn1p_new(); |
| 2267 | checkmem((yyval.a_grammar)); |
| 2268 | TQ_ADD(&((yyval.a_grammar)->modules), (yyvsp[(1) - (1)].a_module), mod_next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2269 | } |
| 2270 | break; |
| 2271 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2272 | case 5: |
| 2273 | #line 372 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2274 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2275 | (yyval.a_grammar) = (yyvsp[(1) - (2)].a_grammar); |
| 2276 | TQ_ADD(&((yyval.a_grammar)->modules), (yyvsp[(2) - (2)].a_module), mod_next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2277 | } |
| 2278 | break; |
| 2279 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2280 | case 6: |
| 2281 | #line 389 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2282 | { currentModule = asn1p_module_new(); } |
| 2283 | break; |
| 2284 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2285 | case 7: |
| 2286 | #line 394 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2287 | { |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 2288 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2289 | (yyval.a_module) = currentModule; |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2290 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2291 | if((yyvsp[(8) - (9)].a_module)) { |
| 2292 | asn1p_module_t tmp = *((yyval.a_module)); |
| 2293 | *((yyval.a_module)) = *((yyvsp[(8) - (9)].a_module)); |
| 2294 | *((yyvsp[(8) - (9)].a_module)) = tmp; |
| 2295 | asn1p_module_free((yyvsp[(8) - (9)].a_module)); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2296 | } else { |
| 2297 | /* There's a chance that a module is just plain empty */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2298 | } |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2299 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2300 | (yyval.a_module)->ModuleName = (yyvsp[(1) - (9)].tv_str); |
| 2301 | (yyval.a_module)->module_oid = (yyvsp[(3) - (9)].a_oid); |
| 2302 | (yyval.a_module)->module_flags = (yyvsp[(5) - (9)].a_module_flags); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2303 | } |
| 2304 | break; |
| 2305 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2306 | case 8: |
| 2307 | #line 418 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2308 | { (yyval.a_oid) = 0; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2309 | break; |
| 2310 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2311 | case 9: |
| 2312 | #line 419 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2313 | { (yyval.a_oid) = (yyvsp[(1) - (1)].a_oid); } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2314 | break; |
| 2315 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2316 | case 10: |
| 2317 | #line 423 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2318 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2319 | (yyval.a_oid) = (yyvsp[(2) - (3)].a_oid); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2320 | } |
| 2321 | break; |
| 2322 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2323 | case 11: |
| 2324 | #line 426 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2325 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2326 | (yyval.a_oid) = 0; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2327 | } |
| 2328 | break; |
| 2329 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2330 | case 12: |
| 2331 | #line 432 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2332 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2333 | (yyval.a_oid) = asn1p_oid_new(); |
| 2334 | asn1p_oid_add_arc((yyval.a_oid), &(yyvsp[(1) - (1)].a_oid_arc)); |
Lev Walkin | a964e03 | 2017-03-26 03:48:06 -0700 | [diff] [blame] | 2335 | if((yyvsp[(1) - (1)].a_oid_arc).name) |
| 2336 | free((yyvsp[(1) - (1)].a_oid_arc).name); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2337 | } |
| 2338 | break; |
| 2339 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2340 | case 13: |
| 2341 | #line 438 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2342 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2343 | (yyval.a_oid) = (yyvsp[(1) - (2)].a_oid); |
| 2344 | asn1p_oid_add_arc((yyval.a_oid), &(yyvsp[(2) - (2)].a_oid_arc)); |
Lev Walkin | a964e03 | 2017-03-26 03:48:06 -0700 | [diff] [blame] | 2345 | if((yyvsp[(2) - (2)].a_oid_arc).name) |
| 2346 | free((yyvsp[(2) - (2)].a_oid_arc).name); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2347 | } |
| 2348 | break; |
| 2349 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2350 | case 14: |
| 2351 | #line 447 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2352 | { /* iso */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2353 | (yyval.a_oid_arc).name = (yyvsp[(1) - (1)].tv_str); |
| 2354 | (yyval.a_oid_arc).number = -1; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2355 | } |
| 2356 | break; |
| 2357 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2358 | case 15: |
| 2359 | #line 451 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2360 | { /* iso(1) */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2361 | (yyval.a_oid_arc).name = (yyvsp[(1) - (4)].tv_str); |
| 2362 | (yyval.a_oid_arc).number = (yyvsp[(3) - (4)].a_int); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2363 | } |
| 2364 | break; |
| 2365 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2366 | case 16: |
| 2367 | #line 455 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2368 | { /* 1 */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2369 | (yyval.a_oid_arc).name = 0; |
| 2370 | (yyval.a_oid_arc).number = (yyvsp[(1) - (1)].a_int); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2371 | } |
| 2372 | break; |
| 2373 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2374 | case 17: |
| 2375 | #line 465 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2376 | { (yyval.a_module_flags) = MSF_NOFLAGS; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2377 | break; |
| 2378 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2379 | case 18: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2380 | #line 466 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2381 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2382 | (yyval.a_module_flags) = (yyvsp[(1) - (1)].a_module_flags); |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2383 | } |
| 2384 | break; |
| 2385 | |
| 2386 | case 19: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2387 | #line 475 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2388 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2389 | (yyval.a_module_flags) = (yyvsp[(1) - (1)].a_module_flags); |
| 2390 | } |
| 2391 | break; |
| 2392 | |
| 2393 | case 20: |
| 2394 | #line 478 "asn1p_y.y" |
| 2395 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2396 | (yyval.a_module_flags) = (yyvsp[(1) - (2)].a_module_flags) | (yyvsp[(2) - (2)].a_module_flags); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2397 | } |
| 2398 | break; |
| 2399 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2400 | case 21: |
| 2401 | #line 487 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2402 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2403 | (yyval.a_module_flags) = MSF_EXPLICIT_TAGS; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2404 | } |
| 2405 | break; |
| 2406 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2407 | case 22: |
| 2408 | #line 490 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2409 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2410 | (yyval.a_module_flags) = MSF_IMPLICIT_TAGS; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2411 | } |
| 2412 | break; |
| 2413 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2414 | case 23: |
| 2415 | #line 493 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2416 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2417 | (yyval.a_module_flags) = MSF_AUTOMATIC_TAGS; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2418 | } |
| 2419 | break; |
| 2420 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2421 | case 24: |
| 2422 | #line 496 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2423 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2424 | (yyval.a_module_flags) = MSF_EXTENSIBILITY_IMPLIED; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2425 | } |
| 2426 | break; |
| 2427 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2428 | case 25: |
| 2429 | #line 500 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2430 | { |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 2431 | /* X.680Amd1 specifies TAG and XER */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2432 | if(strcmp((yyvsp[(1) - (2)].tv_str), "TAG") == 0) { |
| 2433 | (yyval.a_module_flags) = MSF_TAG_INSTRUCTIONS; |
| 2434 | } else if(strcmp((yyvsp[(1) - (2)].tv_str), "XER") == 0) { |
| 2435 | (yyval.a_module_flags) = MSF_XER_INSTRUCTIONS; |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 2436 | } else { |
| 2437 | fprintf(stderr, |
| 2438 | "WARNING: %s INSTRUCTIONS at line %d: " |
| 2439 | "Unrecognized encoding reference\n", |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2440 | (yyvsp[(1) - (2)].tv_str), yylineno); |
| 2441 | (yyval.a_module_flags) = MSF_unk_INSTRUCTIONS; |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 2442 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2443 | free((yyvsp[(1) - (2)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2444 | } |
| 2445 | break; |
| 2446 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2447 | case 26: |
| 2448 | #line 521 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2449 | { (yyval.a_module) = 0; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2450 | break; |
| 2451 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2452 | case 27: |
| 2453 | #line 522 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2454 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2455 | (yyval.a_module) = (yyvsp[(1) - (1)].a_module); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2456 | } |
| 2457 | break; |
| 2458 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2459 | case 28: |
| 2460 | #line 531 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2461 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2462 | (yyval.a_module) = asn1p_module_new(); |
| 2463 | AL_IMPORT((yyval.a_module), exports, (yyvsp[(1) - (3)].a_module), xp_next); |
| 2464 | AL_IMPORT((yyval.a_module), imports, (yyvsp[(2) - (3)].a_module), xp_next); |
| 2465 | AL_IMPORT((yyval.a_module), members, (yyvsp[(3) - (3)].a_module), next); |
Bi-Ruei, Chiu | 3dcf05b | 2017-05-04 21:45:05 +0800 | [diff] [blame] | 2466 | |
| 2467 | asn1p_module_free((yyvsp[(1) - (3)].a_module)); |
| 2468 | asn1p_module_free((yyvsp[(2) - (3)].a_module)); |
| 2469 | asn1p_module_free((yyvsp[(3) - (3)].a_module)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2470 | } |
| 2471 | break; |
| 2472 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2473 | case 29: |
| 2474 | #line 544 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2475 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2476 | (yyval.a_module) = (yyvsp[(1) - (1)].a_module); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2477 | } |
| 2478 | break; |
| 2479 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2480 | case 30: |
| 2481 | #line 547 "asn1p_y.y" |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2482 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2483 | if((yyvsp[(1) - (2)].a_module)) { |
| 2484 | (yyval.a_module) = (yyvsp[(1) - (2)].a_module); |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2485 | } else { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2486 | (yyval.a_module) = (yyvsp[(2) - (2)].a_module); |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2487 | break; |
| 2488 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2489 | AL_IMPORT((yyval.a_module), members, (yyvsp[(2) - (2)].a_module), next); |
Bi-Ruei, Chiu | 3dcf05b | 2017-05-04 21:45:05 +0800 | [diff] [blame] | 2490 | asn1p_module_free((yyvsp[(2) - (2)].a_module)); |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2491 | } |
| 2492 | break; |
| 2493 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2494 | case 31: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2495 | #line 564 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2496 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2497 | (yyval.a_module) = asn1p_module_new(); |
| 2498 | checkmem((yyval.a_module)); |
| 2499 | assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID); |
| 2500 | assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID); |
| 2501 | TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2502 | } |
| 2503 | break; |
| 2504 | |
| 2505 | case 32: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2506 | #line 571 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2507 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2508 | (yyval.a_module) = asn1p_module_new(); |
| 2509 | checkmem((yyval.a_module)); |
| 2510 | assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID); |
| 2511 | assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID); |
| 2512 | TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next); |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2513 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2514 | break; |
| 2515 | |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2516 | case 33: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2517 | #line 584 "asn1p_y.y" |
| 2518 | { |
| 2519 | (yyval.a_module) = asn1p_module_new(); |
| 2520 | checkmem((yyval.a_module)); |
| 2521 | assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID); |
| 2522 | assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID); |
| 2523 | TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next); |
| 2524 | } |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2525 | break; |
| 2526 | |
| 2527 | case 34: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2528 | #line 592 "asn1p_y.y" |
| 2529 | { asn1p_lexer_hack_push_encoding_control(); } |
| 2530 | break; |
| 2531 | |
| 2532 | case 35: |
| 2533 | #line 593 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2534 | { |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 2535 | fprintf(stderr, |
| 2536 | "WARNING: ENCODING-CONTROL %s " |
| 2537 | "specification at line %d ignored\n", |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2538 | (yyvsp[(2) - (3)].tv_str), yylineno); |
| 2539 | free((yyvsp[(2) - (3)].tv_str)); |
| 2540 | (yyval.a_module) = 0; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2541 | } |
| 2542 | break; |
| 2543 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2544 | case 36: |
| 2545 | #line 605 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2546 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2547 | return yyerror( |
Lev Walkin | 7085305 | 2005-11-26 11:21:55 +0000 | [diff] [blame] | 2548 | "Attempt to redefine a standard basic string type, " |
| 2549 | "please comment out or remove this type redefinition."); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2550 | } |
| 2551 | break; |
| 2552 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2553 | case 37: |
| 2554 | #line 618 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2555 | { (yyval.a_module) = 0; } |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2556 | break; |
| 2557 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2558 | case 39: |
| 2559 | #line 622 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2560 | { |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 2561 | if(!saved_aid && 0) |
| 2562 | return yyerror("Unterminated IMPORTS FROM, " |
| 2563 | "expected semicolon ';'"); |
| 2564 | saved_aid = 0; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2565 | (yyval.a_module) = (yyvsp[(2) - (3)].a_module); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2566 | } |
| 2567 | break; |
| 2568 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2569 | case 40: |
| 2570 | #line 632 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2571 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2572 | return yyerror("Empty IMPORTS list"); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2573 | } |
| 2574 | break; |
| 2575 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2576 | case 41: |
| 2577 | #line 638 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2578 | { (yyval.a_module) = asn1p_module_new(); } |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2579 | break; |
| 2580 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2581 | case 43: |
| 2582 | #line 642 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2583 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2584 | (yyval.a_module) = asn1p_module_new(); |
| 2585 | checkmem((yyval.a_module)); |
| 2586 | TQ_ADD(&((yyval.a_module)->imports), (yyvsp[(1) - (1)].a_xports), xp_next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2587 | } |
| 2588 | break; |
| 2589 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2590 | case 44: |
| 2591 | #line 647 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2592 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2593 | (yyval.a_module) = (yyvsp[(1) - (2)].a_module); |
| 2594 | TQ_ADD(&((yyval.a_module)->imports), (yyvsp[(2) - (2)].a_xports), xp_next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2595 | } |
| 2596 | break; |
| 2597 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2598 | case 45: |
| 2599 | #line 654 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2600 | { memset(&(yyval.a_aid), 0, sizeof((yyval.a_aid))); } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2601 | break; |
| 2602 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2603 | case 46: |
| 2604 | #line 655 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2605 | { (yyval.a_aid).oid = (yyvsp[(1) - (1)].a_oid); } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2606 | break; |
| 2607 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2608 | case 47: |
| 2609 | #line 659 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2610 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2611 | (yyval.a_xports) = (yyvsp[(1) - (4)].a_xports); |
| 2612 | (yyval.a_xports)->fromModuleName = (yyvsp[(3) - (4)].tv_str); |
| 2613 | (yyval.a_xports)->identifier = (yyvsp[(4) - (4)].a_aid); |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 2614 | /* This stupid thing is used for look-back hack. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2615 | saved_aid = (yyval.a_xports)->identifier.oid ? 0 : &((yyval.a_xports)->identifier); |
| 2616 | checkmem((yyval.a_xports)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2617 | } |
| 2618 | break; |
| 2619 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2620 | case 48: |
| 2621 | #line 670 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2622 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2623 | (yyval.a_xports) = asn1p_xports_new(); |
| 2624 | checkmem((yyval.a_xports)); |
| 2625 | TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(1) - (1)].a_expr), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2626 | } |
| 2627 | break; |
| 2628 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2629 | case 49: |
| 2630 | #line 675 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2631 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2632 | (yyval.a_xports) = (yyvsp[(1) - (3)].a_xports); |
| 2633 | TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(3) - (3)].a_expr), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2634 | } |
| 2635 | break; |
| 2636 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2637 | case 50: |
| 2638 | #line 682 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2639 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2640 | (yyval.a_expr) = NEW_EXPR(); |
| 2641 | checkmem((yyval.a_expr)); |
| 2642 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str); |
| 2643 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2644 | } |
| 2645 | break; |
| 2646 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2647 | case 51: |
| 2648 | #line 688 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2649 | { /* Completely equivalent to above */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2650 | (yyval.a_expr) = NEW_EXPR(); |
| 2651 | checkmem((yyval.a_expr)); |
| 2652 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 2653 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2654 | } |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2655 | break; |
| 2656 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2657 | case 52: |
| 2658 | #line 694 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2659 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2660 | (yyval.a_expr) = NEW_EXPR(); |
| 2661 | checkmem((yyval.a_expr)); |
| 2662 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str); |
| 2663 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2664 | } |
| 2665 | break; |
| 2666 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2667 | case 53: |
| 2668 | #line 704 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2669 | { (yyval.a_module) = 0; } |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2670 | break; |
| 2671 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2672 | case 54: |
| 2673 | #line 705 "asn1p_y.y" |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2674 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2675 | (yyval.a_module) = asn1p_module_new(); |
| 2676 | checkmem((yyval.a_module)); |
| 2677 | if((yyvsp[(1) - (1)].a_xports)) { |
| 2678 | TQ_ADD(&((yyval.a_module)->exports), (yyvsp[(1) - (1)].a_xports), xp_next); |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2679 | } else { |
| 2680 | /* "EXPORTS ALL;" */ |
| 2681 | } |
| 2682 | } |
| 2683 | break; |
| 2684 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2685 | case 55: |
| 2686 | #line 717 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2687 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2688 | (yyval.a_xports) = (yyvsp[(2) - (3)].a_xports); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2689 | } |
| 2690 | break; |
| 2691 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2692 | case 56: |
| 2693 | #line 720 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2694 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2695 | (yyval.a_xports) = 0; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2696 | } |
| 2697 | break; |
| 2698 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2699 | case 57: |
| 2700 | #line 723 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2701 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2702 | /* Empty EXPORTS clause effectively prohibits export. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2703 | (yyval.a_xports) = asn1p_xports_new(); |
| 2704 | checkmem((yyval.a_xports)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2705 | } |
| 2706 | break; |
| 2707 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2708 | case 58: |
| 2709 | #line 731 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2710 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2711 | (yyval.a_xports) = asn1p_xports_new(); |
| 2712 | assert((yyval.a_xports)); |
| 2713 | TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(1) - (1)].a_expr), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2714 | } |
| 2715 | break; |
| 2716 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2717 | case 59: |
| 2718 | #line 736 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2719 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2720 | (yyval.a_xports) = (yyvsp[(1) - (3)].a_xports); |
| 2721 | TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(3) - (3)].a_expr), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2722 | } |
| 2723 | break; |
| 2724 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2725 | case 60: |
| 2726 | #line 743 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2727 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2728 | (yyval.a_expr) = NEW_EXPR(); |
| 2729 | checkmem((yyval.a_expr)); |
| 2730 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str); |
| 2731 | (yyval.a_expr)->expr_type = A1TC_EXPORTVAR; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2732 | } |
| 2733 | break; |
| 2734 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2735 | case 61: |
| 2736 | #line 749 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2737 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2738 | (yyval.a_expr) = NEW_EXPR(); |
| 2739 | checkmem((yyval.a_expr)); |
| 2740 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 2741 | (yyval.a_expr)->expr_type = A1TC_EXPORTVAR; |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2742 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2743 | break; |
| 2744 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2745 | case 62: |
| 2746 | #line 755 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2747 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2748 | (yyval.a_expr) = NEW_EXPR(); |
| 2749 | checkmem((yyval.a_expr)); |
| 2750 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str); |
| 2751 | (yyval.a_expr)->expr_type = A1TC_EXPORTVAR; |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2752 | } |
| 2753 | break; |
| 2754 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2755 | case 63: |
| 2756 | #line 764 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2757 | { (yyval.a_constr) = (yyvsp[(2) - (3)].a_constr); } |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2758 | break; |
| 2759 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2760 | case 64: |
| 2761 | #line 767 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2762 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2763 | (yyval.a_expr) = (yyvsp[(2) - (4)].a_expr); |
| 2764 | assert((yyval.a_expr)->Identifier == 0); |
| 2765 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str); |
| 2766 | (yyval.a_expr)->meta_type = AMT_VALUESET; |
| 2767 | (yyval.a_expr)->constraints = (yyvsp[(4) - (4)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2768 | } |
| 2769 | break; |
| 2770 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2771 | case 65: |
| 2772 | #line 777 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2773 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2774 | (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2775 | } |
| 2776 | break; |
| 2777 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2778 | case 66: |
| 2779 | #line 790 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2780 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2781 | (yyval.a_expr) = NEW_EXPR(); |
| 2782 | checkmem((yyval.a_expr)); |
| 2783 | (yyval.a_expr)->reference = (yyvsp[(1) - (1)].a_ref); |
| 2784 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
| 2785 | (yyval.a_expr)->meta_type = AMT_TYPEREF; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2786 | } |
| 2787 | break; |
| 2788 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2789 | case 67: |
| 2790 | #line 800 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2791 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2792 | (yyval.a_expr) = NEW_EXPR(); |
| 2793 | checkmem((yyval.a_expr)); |
| 2794 | (yyval.a_expr)->reference = (yyvsp[(1) - (4)].a_ref); |
| 2795 | (yyval.a_expr)->rhs_pspecs = (yyvsp[(3) - (4)].a_expr); |
| 2796 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
| 2797 | (yyval.a_expr)->meta_type = AMT_TYPEREF; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2798 | } |
| 2799 | break; |
| 2800 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2801 | case 68: |
| 2802 | #line 820 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2803 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2804 | (yyval.a_expr) = (yyvsp[(3) - (3)].a_expr); |
| 2805 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 2806 | assert((yyval.a_expr)->expr_type); |
| 2807 | assert((yyval.a_expr)->meta_type); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2808 | } |
| 2809 | break; |
| 2810 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2811 | case 69: |
| 2812 | #line 826 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2813 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2814 | (yyval.a_expr) = (yyvsp[(3) - (3)].a_expr); |
| 2815 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 2816 | assert((yyval.a_expr)->expr_type == A1TC_CLASSDEF); |
| 2817 | assert((yyval.a_expr)->meta_type == AMT_OBJECTCLASS); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2818 | } |
| 2819 | break; |
| 2820 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2821 | case 70: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2822 | #line 842 "asn1p_y.y" |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2823 | { |
| 2824 | (yyval.a_expr) = (yyvsp[(6) - (6)].a_expr); |
| 2825 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (6)].tv_str); |
| 2826 | (yyval.a_expr)->lhs_params = (yyvsp[(3) - (6)].a_plist); |
| 2827 | } |
| 2828 | break; |
| 2829 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2830 | case 71: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2831 | #line 848 "asn1p_y.y" |
| 2832 | { |
| 2833 | (yyval.a_expr) = (yyvsp[(6) - (6)].a_expr); |
| 2834 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (6)].tv_str); |
| 2835 | (yyval.a_expr)->lhs_params = (yyvsp[(3) - (6)].a_plist); |
| 2836 | } |
| 2837 | break; |
| 2838 | |
| 2839 | case 72: |
| 2840 | #line 856 "asn1p_y.y" |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2841 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2842 | int ret; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2843 | (yyval.a_plist) = asn1p_paramlist_new(yylineno); |
| 2844 | checkmem((yyval.a_plist)); |
| 2845 | ret = asn1p_paramlist_add_param((yyval.a_plist), (yyvsp[(1) - (1)].a_parg).governor, (yyvsp[(1) - (1)].a_parg).argument); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2846 | checkmem(ret == 0); |
Lev Walkin | a964e03 | 2017-03-26 03:48:06 -0700 | [diff] [blame] | 2847 | asn1p_ref_free((yyvsp[(1) - (1)].a_parg).governor); |
Markus Elfring | f3d1861 | 2016-03-15 08:35:24 +0100 | [diff] [blame] | 2848 | free((yyvsp[(1) - (1)].a_parg).argument); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2849 | } |
| 2850 | break; |
| 2851 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2852 | case 73: |
| 2853 | #line 865 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2854 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2855 | int ret; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2856 | (yyval.a_plist) = (yyvsp[(1) - (3)].a_plist); |
| 2857 | ret = asn1p_paramlist_add_param((yyval.a_plist), (yyvsp[(3) - (3)].a_parg).governor, (yyvsp[(3) - (3)].a_parg).argument); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2858 | checkmem(ret == 0); |
Lev Walkin | a964e03 | 2017-03-26 03:48:06 -0700 | [diff] [blame] | 2859 | asn1p_ref_free((yyvsp[(3) - (3)].a_parg).governor); |
Markus Elfring | f3d1861 | 2016-03-15 08:35:24 +0100 | [diff] [blame] | 2860 | free((yyvsp[(3) - (3)].a_parg).argument); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2861 | } |
| 2862 | break; |
| 2863 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2864 | case 74: |
| 2865 | #line 876 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2866 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2867 | (yyval.a_parg).governor = NULL; |
| 2868 | (yyval.a_parg).argument = (yyvsp[(1) - (1)].tv_str); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2869 | } |
| 2870 | break; |
| 2871 | |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2872 | case 75: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2873 | #line 880 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2874 | { |
| 2875 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2876 | (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2877 | ret = asn1p_ref_add_component((yyval.a_parg).governor, (yyvsp[(1) - (3)].tv_str), 0); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2878 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2879 | (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2880 | free((yyvsp[(1) - (3)].tv_str)); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2881 | } |
| 2882 | break; |
| 2883 | |
| 2884 | case 76: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2885 | #line 888 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2886 | { |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2887 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2888 | (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2889 | ret = asn1p_ref_add_component((yyval.a_parg).governor, (yyvsp[(1) - (3)].tv_str), 0); |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2890 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2891 | (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str); |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2892 | free((yyvsp[(1) - (3)].tv_str)); |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2893 | } |
| 2894 | break; |
| 2895 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2896 | case 77: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2897 | #line 896 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2898 | { |
| 2899 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2900 | (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2901 | ret = asn1p_ref_add_component((yyval.a_parg).governor, |
| 2902 | ASN_EXPR_TYPE2STR((yyvsp[(1) - (3)].a_type)), 1); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2903 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2904 | (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2905 | } |
| 2906 | break; |
| 2907 | |
| 2908 | case 78: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2909 | #line 904 "asn1p_y.y" |
| 2910 | { |
| 2911 | int ret; |
| 2912 | (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule); |
| 2913 | ret = asn1p_ref_add_component((yyval.a_parg).governor, |
| 2914 | ASN_EXPR_TYPE2STR((yyvsp[(1) - (3)].a_type)), 1); |
| 2915 | checkmem(ret == 0); |
| 2916 | (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str); |
| 2917 | } |
| 2918 | break; |
| 2919 | |
| 2920 | case 79: |
| 2921 | #line 915 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2922 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2923 | (yyval.a_expr) = NEW_EXPR(); |
| 2924 | checkmem((yyval.a_expr)); |
| 2925 | asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2926 | } |
| 2927 | break; |
| 2928 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2929 | case 80: |
| 2930 | #line 920 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2931 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2932 | (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); |
| 2933 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2934 | } |
| 2935 | break; |
| 2936 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2937 | case 81: |
| 2938 | #line 927 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2939 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2940 | (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2941 | } |
| 2942 | break; |
| 2943 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2944 | case 82: |
| 2945 | #line 930 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2946 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2947 | (yyval.a_expr) = NEW_EXPR(); |
| 2948 | checkmem((yyval.a_expr)); |
Bi-Ruei, Chiu | 3dcf05b | 2017-05-04 21:45:05 +0800 | [diff] [blame] | 2949 | (yyval.a_expr)->Identifier = strdup("?"); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2950 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
| 2951 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 2952 | (yyval.a_expr)->value = (yyvsp[(1) - (1)].a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2953 | } |
| 2954 | break; |
| 2955 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2956 | case 83: |
| 2957 | #line 938 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2958 | { |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 2959 | asn1p_ref_t *ref; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2960 | (yyval.a_expr) = NEW_EXPR(); |
| 2961 | checkmem((yyval.a_expr)); |
| 2962 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str); |
| 2963 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
| 2964 | (yyval.a_expr)->meta_type = AMT_VALUE; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2965 | ref = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2966 | asn1p_ref_add_component(ref, (yyvsp[(1) - (1)].tv_str), RLT_lowercase); |
| 2967 | (yyval.a_expr)->value = asn1p_value_fromref(ref, 0); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2968 | } |
| 2969 | break; |
| 2970 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2971 | case 84: |
| 2972 | #line 949 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2973 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2974 | (yyval.a_expr) = NEW_EXPR(); |
| 2975 | (yyval.a_expr)->expr_type = A1TC_VALUESET; |
| 2976 | (yyval.a_expr)->meta_type = AMT_VALUESET; |
| 2977 | (yyval.a_expr)->constraints = (yyvsp[(1) - (1)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2978 | } |
| 2979 | break; |
| 2980 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2981 | case 85: |
| 2982 | #line 972 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2983 | { (yyval.a_expr) = NEW_EXPR(); } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2984 | break; |
| 2985 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2986 | case 86: |
| 2987 | #line 973 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2988 | { (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); } |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2989 | break; |
| 2990 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2991 | case 87: |
| 2992 | #line 976 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2993 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2994 | (yyval.a_expr) = NEW_EXPR(); |
| 2995 | checkmem((yyval.a_expr)); |
| 2996 | asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2997 | } |
| 2998 | break; |
| 2999 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3000 | case 88: |
| 3001 | #line 981 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3002 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3003 | (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); |
| 3004 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3005 | } |
| 3006 | break; |
| 3007 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3008 | case 89: |
| 3009 | #line 985 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3010 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3011 | (yyval.a_expr) = (yyvsp[(1) - (5)].a_expr); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3012 | asn1p_expr_add_many((yyval.a_expr), (yyvsp[(4) - (5)].a_expr)); |
Bi-Ruei, Chiu | 3dcf05b | 2017-05-04 21:45:05 +0800 | [diff] [blame] | 3013 | asn1p_expr_free((yyvsp[(4) - (5)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3014 | } |
| 3015 | break; |
| 3016 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3017 | case 90: |
| 3018 | #line 993 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3019 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3020 | (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr); |
| 3021 | assert((yyval.a_expr)->Identifier == 0); |
| 3022 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 3023 | (yyvsp[(3) - (3)].a_marker).flags |= (yyval.a_expr)->marker.flags; |
| 3024 | (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3025 | } |
| 3026 | break; |
| 3027 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3028 | case 91: |
| 3029 | #line 1000 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3030 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3031 | (yyval.a_expr) = (yyvsp[(1) - (2)].a_expr); |
| 3032 | (yyvsp[(2) - (2)].a_marker).flags |= (yyval.a_expr)->marker.flags; |
| 3033 | (yyval.a_expr)->marker = (yyvsp[(2) - (2)].a_marker); |
| 3034 | _fixup_anonymous_identifier((yyval.a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3035 | } |
| 3036 | break; |
| 3037 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3038 | case 92: |
| 3039 | #line 1006 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3040 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3041 | (yyval.a_expr) = NEW_EXPR(); |
| 3042 | checkmem((yyval.a_expr)); |
| 3043 | (yyval.a_expr)->meta_type = (yyvsp[(3) - (3)].a_expr)->meta_type; |
| 3044 | (yyval.a_expr)->expr_type = A1TC_COMPONENTS_OF; |
| 3045 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3046 | } |
| 3047 | break; |
| 3048 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3049 | case 93: |
| 3050 | #line 1013 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3051 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3052 | (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3053 | } |
| 3054 | break; |
| 3055 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3056 | case 94: |
| 3057 | #line 1019 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3058 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3059 | (yyval.a_expr) = NEW_EXPR(); |
| 3060 | checkmem((yyval.a_expr)); |
| 3061 | asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3062 | } |
| 3063 | break; |
| 3064 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3065 | case 95: |
| 3066 | #line 1024 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3067 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3068 | (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); |
| 3069 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3070 | } |
| 3071 | break; |
| 3072 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3073 | case 96: |
| 3074 | #line 1031 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3075 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3076 | (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr); |
| 3077 | assert((yyval.a_expr)->Identifier == 0); |
| 3078 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (2)].tv_str); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3079 | } |
| 3080 | break; |
| 3081 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3082 | case 97: |
| 3083 | #line 1036 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3084 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3085 | (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3086 | } |
| 3087 | break; |
| 3088 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3089 | case 98: |
| 3090 | #line 1039 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3091 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3092 | (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); |
| 3093 | _fixup_anonymous_identifier((yyval.a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3094 | } |
| 3095 | break; |
| 3096 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3097 | case 99: |
| 3098 | #line 1046 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3099 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3100 | (yyval.a_expr) = (yyvsp[(3) - (5)].a_expr); |
| 3101 | checkmem((yyval.a_expr)); |
| 3102 | (yyval.a_expr)->with_syntax = (yyvsp[(5) - (5)].a_wsynt); |
| 3103 | assert((yyval.a_expr)->expr_type == A1TC_CLASSDEF); |
| 3104 | assert((yyval.a_expr)->meta_type == AMT_OBJECTCLASS); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3105 | } |
| 3106 | break; |
| 3107 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3108 | case 100: |
| 3109 | #line 1056 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3110 | { (yyval.a_int) = 0; } |
| 3111 | break; |
| 3112 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3113 | case 101: |
| 3114 | #line 1057 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3115 | { (yyval.a_int) = 1; } |
| 3116 | break; |
| 3117 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3118 | case 102: |
| 3119 | #line 1061 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3120 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3121 | (yyval.a_expr) = NEW_EXPR(); |
| 3122 | checkmem((yyval.a_expr)); |
| 3123 | (yyval.a_expr)->expr_type = A1TC_CLASSDEF; |
| 3124 | (yyval.a_expr)->meta_type = AMT_OBJECTCLASS; |
| 3125 | asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3126 | } |
| 3127 | break; |
| 3128 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3129 | case 103: |
| 3130 | #line 1068 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3131 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3132 | (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); |
| 3133 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3134 | } |
| 3135 | break; |
| 3136 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3137 | case 104: |
| 3138 | #line 1078 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3139 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3140 | (yyval.a_expr) = NEW_EXPR(); |
| 3141 | checkmem((yyval.a_expr)); |
| 3142 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (2)].tv_str); |
| 3143 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3144 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_TFS; /* TypeFieldSpec */ |
| 3145 | (yyval.a_expr)->marker = (yyvsp[(2) - (2)].a_marker); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3146 | } |
| 3147 | break; |
| 3148 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3149 | case 105: |
| 3150 | #line 1088 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3151 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3152 | (yyval.a_expr) = NEW_EXPR(); |
| 3153 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str); |
| 3154 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3155 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_FTVFS; /* FixedTypeValueFieldSpec */ |
| 3156 | (yyval.a_expr)->unique = (yyvsp[(3) - (4)].a_int); |
| 3157 | (yyval.a_expr)->marker = (yyvsp[(4) - (4)].a_marker); |
| 3158 | asn1p_expr_add((yyval.a_expr), (yyvsp[(2) - (4)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3159 | } |
| 3160 | break; |
| 3161 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3162 | case 106: |
| 3163 | #line 1099 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3164 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3165 | (yyval.a_expr) = NEW_EXPR(); |
| 3166 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 3167 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3168 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_VTVFS; |
| 3169 | (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref); |
| 3170 | (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3171 | } |
| 3172 | break; |
| 3173 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3174 | case 107: |
| 3175 | #line 1109 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3176 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3177 | (yyval.a_expr) = NEW_EXPR(); |
| 3178 | checkmem((yyval.a_expr)); |
| 3179 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 3180 | (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref); |
| 3181 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3182 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_OFS; |
| 3183 | (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3184 | } |
| 3185 | break; |
| 3186 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3187 | case 108: |
| 3188 | #line 1120 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3189 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3190 | (yyval.a_expr) = NEW_EXPR(); |
| 3191 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 3192 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3193 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_VTVSFS; |
| 3194 | (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref); |
| 3195 | (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3196 | } |
| 3197 | break; |
| 3198 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3199 | case 109: |
| 3200 | #line 1130 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3201 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3202 | (yyval.a_expr) = NEW_EXPR(); |
| 3203 | checkmem((yyval.a_expr)); |
| 3204 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 3205 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3206 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_FTVSFS; |
| 3207 | asn1p_expr_add((yyval.a_expr), (yyvsp[(2) - (3)].a_expr)); |
| 3208 | (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3209 | } |
| 3210 | break; |
| 3211 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3212 | case 110: |
| 3213 | #line 1141 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3214 | { |
| 3215 | (yyval.a_expr) = NEW_EXPR(); |
| 3216 | checkmem((yyval.a_expr)); |
| 3217 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 3218 | (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref); |
| 3219 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3220 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_OSFS; |
| 3221 | (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker); |
| 3222 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3223 | break; |
| 3224 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3225 | case 111: |
| 3226 | #line 1153 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3227 | { (yyval.a_wsynt) = 0; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3228 | break; |
| 3229 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3230 | case 112: |
| 3231 | #line 1154 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3232 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3233 | (yyval.a_wsynt) = (yyvsp[(1) - (1)].a_wsynt); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3234 | } |
| 3235 | break; |
| 3236 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3237 | case 113: |
| 3238 | #line 1161 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3239 | { asn1p_lexer_hack_enable_with_syntax(); } |
| 3240 | break; |
| 3241 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3242 | case 114: |
| 3243 | #line 1163 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3244 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3245 | (yyval.a_wsynt) = (yyvsp[(5) - (6)].a_wsynt); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3246 | } |
| 3247 | break; |
| 3248 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3249 | case 115: |
| 3250 | #line 1169 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3251 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3252 | (yyval.a_wsynt) = asn1p_wsyntx_new(); |
| 3253 | TQ_ADD(&((yyval.a_wsynt)->chunks), (yyvsp[(1) - (1)].a_wchunk), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3254 | } |
| 3255 | break; |
| 3256 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3257 | case 116: |
| 3258 | #line 1173 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3259 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3260 | (yyval.a_wsynt) = (yyvsp[(1) - (2)].a_wsynt); |
| 3261 | TQ_ADD(&((yyval.a_wsynt)->chunks), (yyvsp[(2) - (2)].a_wchunk), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3262 | } |
| 3263 | break; |
| 3264 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3265 | case 117: |
| 3266 | #line 1180 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3267 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3268 | (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].tv_opaque).buf, 0); |
| 3269 | (yyval.a_wchunk)->type = WC_WHITESPACE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3270 | } |
| 3271 | break; |
| 3272 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3273 | case 118: |
| 3274 | #line 1184 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3275 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3276 | (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].tv_str), 0); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3277 | } |
| 3278 | break; |
| 3279 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3280 | case 119: |
| 3281 | #line 1187 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3282 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3283 | (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].a_refcomp).name, 0); |
| 3284 | (yyval.a_wchunk)->type = WC_FIELD; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3285 | } |
| 3286 | break; |
| 3287 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3288 | case 120: |
| 3289 | #line 1191 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 3290 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3291 | (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromsyntax((yyvsp[(2) - (3)].a_wsynt)); |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 3292 | } |
| 3293 | break; |
| 3294 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3295 | case 121: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3296 | #line 1197 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3297 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3298 | (yyval.a_expr) = NEW_EXPR(); |
| 3299 | checkmem((yyval.a_expr)); |
| 3300 | (yyval.a_expr)->Identifier = strdup("..."); |
| 3301 | checkmem((yyval.a_expr)->Identifier); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3302 | (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE; |
| 3303 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3304 | } |
| 3305 | break; |
| 3306 | |
| 3307 | case 122: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3308 | #line 1205 "asn1p_y.y" |
| 3309 | { |
| 3310 | (yyval.a_expr) = NEW_EXPR(); |
| 3311 | checkmem((yyval.a_expr)); |
| 3312 | (yyval.a_expr)->Identifier = strdup("..."); |
| 3313 | checkmem((yyval.a_expr)->Identifier); |
| 3314 | (yyval.a_expr)->value = (yyvsp[(3) - (3)].a_value); |
| 3315 | (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE; |
| 3316 | (yyval.a_expr)->meta_type = AMT_TYPE; |
| 3317 | } |
| 3318 | break; |
| 3319 | |
| 3320 | case 123: |
| 3321 | #line 1214 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3322 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3323 | (yyval.a_expr) = NEW_EXPR(); |
| 3324 | checkmem((yyval.a_expr)); |
| 3325 | (yyval.a_expr)->Identifier = strdup("..."); |
| 3326 | (yyval.a_expr)->value = (yyvsp[(3) - (3)].a_value); |
| 3327 | checkmem((yyval.a_expr)->Identifier); |
| 3328 | (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE; |
| 3329 | (yyval.a_expr)->meta_type = AMT_TYPE; |
| 3330 | } |
| 3331 | break; |
| 3332 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3333 | case 124: |
| 3334 | #line 1226 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3335 | { |
| 3336 | (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr); |
| 3337 | (yyval.a_expr)->tag = (yyvsp[(1) - (3)].a_tag); |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 3338 | /* |
| 3339 | * Outer constraint for SEQUENCE OF and SET OF applies |
| 3340 | * to the inner type. |
| 3341 | */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3342 | if((yyval.a_expr)->expr_type == ASN_CONSTR_SEQUENCE_OF |
| 3343 | || (yyval.a_expr)->expr_type == ASN_CONSTR_SET_OF) { |
| 3344 | assert(!TQ_FIRST(&((yyval.a_expr)->members))->constraints); |
| 3345 | TQ_FIRST(&((yyval.a_expr)->members))->constraints = (yyvsp[(3) - (3)].a_constr); |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 3346 | } else { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3347 | if((yyval.a_expr)->constraints) { |
| 3348 | assert(!(yyvsp[(2) - (3)].a_expr)); |
Bi-Ruei, Chiu | 3dcf05b | 2017-05-04 21:45:05 +0800 | [diff] [blame] | 3349 | /* Check this : optConstraints is not used ?! */ |
| 3350 | asn1p_constraint_free((yyvsp[(3) - (3)].a_constr)); |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 3351 | } else { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3352 | (yyval.a_expr)->constraints = (yyvsp[(3) - (3)].a_constr); |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 3353 | } |
| 3354 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3355 | } |
| 3356 | break; |
| 3357 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3358 | case 125: |
| 3359 | #line 1250 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3360 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3361 | (yyval.a_int) = asn1p_as_pointer ? EM_INDIRECT : 0; |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 3362 | asn1p_as_pointer = 0; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3363 | } |
| 3364 | break; |
| 3365 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3366 | case 126: |
| 3367 | #line 1257 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3368 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3369 | (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr); |
| 3370 | (yyval.a_expr)->marker.flags |= (yyvsp[(1) - (2)].a_int); |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 3371 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3372 | if(((yyval.a_expr)->marker.flags & EM_INDIRECT) |
| 3373 | && ((yyval.a_expr)->marker.flags & EM_OPTIONAL) != EM_OPTIONAL) { |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 3374 | fprintf(stderr, |
| 3375 | "INFO: Directive <ASN1C:RepresentAsPointer> " |
| 3376 | "applied to %s at line %d\n", |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3377 | ASN_EXPR_TYPE2STR((yyval.a_expr)->expr_type) |
| 3378 | ? ASN_EXPR_TYPE2STR((yyval.a_expr)->expr_type) |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 3379 | : "member", |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3380 | (yyval.a_expr)->_lineno |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 3381 | ); |
| 3382 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3383 | } |
| 3384 | break; |
| 3385 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3386 | case 127: |
| 3387 | #line 1276 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3388 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3389 | (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3390 | } |
| 3391 | break; |
| 3392 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3393 | case 128: |
| 3394 | #line 1279 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3395 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3396 | (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr); |
| 3397 | assert((yyval.a_expr)->expr_type == A1TC_INVALID); |
| 3398 | (yyval.a_expr)->expr_type = ASN_CONSTR_CHOICE; |
| 3399 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3400 | } |
| 3401 | break; |
| 3402 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3403 | case 129: |
| 3404 | #line 1285 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3405 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3406 | (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr); |
| 3407 | assert((yyval.a_expr)->expr_type == A1TC_INVALID); |
| 3408 | (yyval.a_expr)->expr_type = ASN_CONSTR_SEQUENCE; |
| 3409 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3410 | } |
| 3411 | break; |
| 3412 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3413 | case 130: |
| 3414 | #line 1291 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3415 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3416 | (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr); |
| 3417 | assert((yyval.a_expr)->expr_type == A1TC_INVALID); |
| 3418 | (yyval.a_expr)->expr_type = ASN_CONSTR_SET; |
| 3419 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3420 | } |
| 3421 | break; |
| 3422 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3423 | case 131: |
| 3424 | #line 1297 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3425 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3426 | (yyval.a_expr) = NEW_EXPR(); |
| 3427 | checkmem((yyval.a_expr)); |
| 3428 | (yyval.a_expr)->constraints = (yyvsp[(2) - (6)].a_constr); |
| 3429 | (yyval.a_expr)->expr_type = ASN_CONSTR_SEQUENCE_OF; |
| 3430 | (yyval.a_expr)->meta_type = AMT_TYPE; |
| 3431 | (yyvsp[(6) - (6)].a_expr)->Identifier = (yyvsp[(4) - (6)].tv_str); |
| 3432 | (yyvsp[(6) - (6)].a_expr)->tag = (yyvsp[(5) - (6)].a_tag); |
| 3433 | asn1p_expr_add((yyval.a_expr), (yyvsp[(6) - (6)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3434 | } |
| 3435 | break; |
| 3436 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3437 | case 132: |
| 3438 | #line 1307 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3439 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3440 | (yyval.a_expr) = NEW_EXPR(); |
| 3441 | checkmem((yyval.a_expr)); |
| 3442 | (yyval.a_expr)->constraints = (yyvsp[(2) - (6)].a_constr); |
| 3443 | (yyval.a_expr)->expr_type = ASN_CONSTR_SET_OF; |
| 3444 | (yyval.a_expr)->meta_type = AMT_TYPE; |
| 3445 | (yyvsp[(6) - (6)].a_expr)->Identifier = (yyvsp[(4) - (6)].tv_str); |
| 3446 | (yyvsp[(6) - (6)].a_expr)->tag = (yyvsp[(5) - (6)].a_tag); |
| 3447 | asn1p_expr_add((yyval.a_expr), (yyvsp[(6) - (6)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3448 | } |
| 3449 | break; |
| 3450 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3451 | case 133: |
| 3452 | #line 1317 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3453 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3454 | (yyval.a_expr) = NEW_EXPR(); |
| 3455 | checkmem((yyval.a_expr)); |
| 3456 | (yyval.a_expr)->expr_type = ASN_TYPE_ANY; |
| 3457 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3458 | } |
| 3459 | break; |
| 3460 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3461 | case 134: |
| 3462 | #line 1323 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3463 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3464 | int ret; |
| 3465 | (yyval.a_expr) = NEW_EXPR(); |
| 3466 | checkmem((yyval.a_expr)); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3467 | (yyval.a_expr)->reference = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3468 | ret = asn1p_ref_add_component((yyval.a_expr)->reference, |
| 3469 | (yyvsp[(4) - (4)].tv_str), RLT_lowercase); |
| 3470 | checkmem(ret == 0); |
| 3471 | (yyval.a_expr)->expr_type = ASN_TYPE_ANY; |
| 3472 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3473 | free((yyvsp[(4) - (4)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3474 | } |
| 3475 | break; |
| 3476 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3477 | case 135: |
| 3478 | #line 1335 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3479 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3480 | (yyval.a_expr) = NEW_EXPR(); |
| 3481 | checkmem((yyval.a_expr)); |
| 3482 | (yyval.a_expr)->reference = (yyvsp[(3) - (3)].a_ref); |
| 3483 | (yyval.a_expr)->expr_type = A1TC_INSTANCE; |
| 3484 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3485 | } |
| 3486 | break; |
| 3487 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3488 | case 136: |
| 3489 | #line 1350 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3490 | { |
| 3491 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3492 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3493 | checkmem((yyval.a_ref)); |
| 3494 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_UNKNOWN); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3495 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3496 | free((yyvsp[(1) - (1)].tv_str)); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3497 | } |
| 3498 | break; |
| 3499 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3500 | case 137: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3501 | #line 1358 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3502 | { |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 3503 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3504 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3505 | checkmem((yyval.a_ref)); |
| 3506 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN); |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 3507 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3508 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_UNKNOWN); |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 3509 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3510 | free((yyvsp[(1) - (3)].tv_str)); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3511 | free((yyvsp[(3) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3512 | } |
| 3513 | break; |
| 3514 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3515 | case 138: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3516 | #line 1369 "asn1p_y.y" |
| 3517 | { |
| 3518 | int ret; |
| 3519 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
| 3520 | checkmem((yyval.a_ref)); |
| 3521 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN); |
| 3522 | checkmem(ret == 0); |
| 3523 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_UNKNOWN); |
| 3524 | checkmem(ret == 0); |
| 3525 | free((yyvsp[(1) - (3)].tv_str)); |
| 3526 | free((yyvsp[(3) - (3)].tv_str)); |
| 3527 | } |
| 3528 | break; |
| 3529 | |
| 3530 | case 139: |
| 3531 | #line 1380 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3532 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3533 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3534 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3535 | checkmem((yyval.a_ref)); |
| 3536 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN); |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 3537 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3538 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_lowercase); |
| 3539 | checkmem(ret == 0); |
| 3540 | free((yyvsp[(1) - (3)].tv_str)); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3541 | free((yyvsp[(3) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3542 | } |
| 3543 | break; |
| 3544 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3545 | case 140: |
| 3546 | #line 1391 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3547 | { |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 3548 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3549 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3550 | checkmem((yyval.a_ref)); |
| 3551 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_CAPITALS); |
| 3552 | free((yyvsp[(1) - (1)].tv_str)); |
| 3553 | checkmem(ret == 0); |
| 3554 | } |
| 3555 | break; |
| 3556 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3557 | case 141: |
| 3558 | #line 1399 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3559 | { |
| 3560 | int ret; |
| 3561 | (yyval.a_ref) = (yyvsp[(3) - (3)].a_ref); |
| 3562 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_CAPITALS); |
| 3563 | free((yyvsp[(1) - (3)].tv_str)); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3564 | checkmem(ret == 0); |
| 3565 | /* |
| 3566 | * Move the last element infront. |
| 3567 | */ |
| 3568 | { |
| 3569 | struct asn1p_ref_component_s tmp_comp; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3570 | tmp_comp = (yyval.a_ref)->components[(yyval.a_ref)->comp_count-1]; |
| 3571 | memmove(&(yyval.a_ref)->components[1], |
| 3572 | &(yyval.a_ref)->components[0], |
| 3573 | sizeof((yyval.a_ref)->components[0]) |
| 3574 | * ((yyval.a_ref)->comp_count - 1)); |
| 3575 | (yyval.a_ref)->components[0] = tmp_comp; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3576 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3577 | } |
| 3578 | break; |
| 3579 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3580 | case 142: |
| 3581 | #line 1421 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3582 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3583 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3584 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3585 | checkmem((yyval.a_ref)); |
| 3586 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].a_refcomp).name, (yyvsp[(1) - (1)].a_refcomp).lex_type); |
| 3587 | free((yyvsp[(1) - (1)].a_refcomp).name); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3588 | checkmem(ret == 0); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3589 | } |
| 3590 | break; |
| 3591 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3592 | case 143: |
| 3593 | #line 1429 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3594 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3595 | int ret; |
| 3596 | (yyval.a_ref) = (yyvsp[(1) - (3)].a_ref); |
| 3597 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].a_refcomp).name, (yyvsp[(3) - (3)].a_refcomp).lex_type); |
| 3598 | free((yyvsp[(3) - (3)].a_refcomp).name); |
| 3599 | checkmem(ret == 0); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3600 | } |
| 3601 | break; |
| 3602 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3603 | case 145: |
| 3604 | #line 1442 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3605 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3606 | (yyval.a_refcomp).lex_type = RLT_AmpUppercase; |
| 3607 | (yyval.a_refcomp).name = (yyvsp[(1) - (1)].tv_str); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3608 | } |
| 3609 | break; |
| 3610 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3611 | case 146: |
| 3612 | #line 1447 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3613 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3614 | (yyval.a_refcomp).lex_type = RLT_Amplowercase; |
| 3615 | (yyval.a_refcomp).name = (yyvsp[(1) - (1)].tv_str); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3616 | } |
| 3617 | break; |
| 3618 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3619 | case 147: |
| 3620 | #line 1456 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3621 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3622 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3623 | asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_AmpUppercase); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3624 | free((yyvsp[(1) - (1)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3625 | } |
| 3626 | break; |
| 3627 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3628 | case 148: |
| 3629 | #line 1461 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3630 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3631 | (yyval.a_ref) = (yyval.a_ref); |
| 3632 | asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_AmpUppercase); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3633 | free((yyvsp[(3) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3634 | } |
| 3635 | break; |
| 3636 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3637 | case 149: |
| 3638 | #line 1466 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3639 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3640 | (yyval.a_ref) = (yyval.a_ref); |
| 3641 | asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_Amplowercase); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3642 | free((yyvsp[(3) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3643 | } |
| 3644 | break; |
| 3645 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3646 | case 150: |
| 3647 | #line 1474 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3648 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3649 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3650 | asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_CAPITALS); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3651 | free((yyvsp[(1) - (1)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3652 | } |
| 3653 | break; |
| 3654 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3655 | case 151: |
| 3656 | #line 1497 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3657 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3658 | (yyval.a_expr) = (yyvsp[(2) - (4)].a_expr); |
| 3659 | assert((yyval.a_expr)->Identifier == NULL); |
| 3660 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str); |
| 3661 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 3662 | (yyval.a_expr)->value = (yyvsp[(4) - (4)].a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3663 | } |
| 3664 | break; |
| 3665 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3666 | case 154: |
| 3667 | #line 1509 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3668 | { |
| 3669 | (yyval.a_value) = asn1p_value_fromint(0); |
| 3670 | checkmem((yyval.a_value)); |
| 3671 | (yyval.a_value)->type = ATV_CHOICE_IDENTIFIER; |
| 3672 | (yyval.a_value)->value.choice_identifier.identifier = (yyvsp[(1) - (3)].tv_str); |
| 3673 | (yyval.a_value)->value.choice_identifier.value = (yyvsp[(3) - (3)].a_value); |
| 3674 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3675 | break; |
| 3676 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3677 | case 155: |
| 3678 | #line 1516 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3679 | { asn1p_lexer_hack_push_opaque_state(); } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3680 | break; |
| 3681 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3682 | case 156: |
| 3683 | #line 1516 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3684 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3685 | (yyval.a_value) = asn1p_value_frombuf((yyvsp[(3) - (3)].tv_opaque).buf, (yyvsp[(3) - (3)].tv_opaque).len, 0); |
| 3686 | checkmem((yyval.a_value)); |
| 3687 | (yyval.a_value)->type = ATV_UNPARSED; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3688 | } |
| 3689 | break; |
| 3690 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3691 | case 157: |
| 3692 | #line 1521 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3693 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3694 | (yyval.a_value) = asn1p_value_fromint(0); |
| 3695 | checkmem((yyval.a_value)); |
| 3696 | (yyval.a_value)->type = ATV_NULL; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3697 | } |
| 3698 | break; |
| 3699 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3700 | case 158: |
| 3701 | #line 1529 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3702 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3703 | (yyval.a_value) = asn1p_value_fromint(0); |
| 3704 | checkmem((yyval.a_value)); |
| 3705 | (yyval.a_value)->type = ATV_FALSE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3706 | } |
| 3707 | break; |
| 3708 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3709 | case 159: |
| 3710 | #line 1534 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3711 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3712 | (yyval.a_value) = asn1p_value_fromint(0); |
| 3713 | checkmem((yyval.a_value)); |
| 3714 | (yyval.a_value)->type = ATV_TRUE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3715 | } |
| 3716 | break; |
| 3717 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3718 | case 160: |
| 3719 | #line 1539 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3720 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3721 | (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'B'); |
| 3722 | checkmem((yyval.a_value)); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3723 | free((yyvsp[(1) - (1)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3724 | } |
| 3725 | break; |
| 3726 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3727 | case 161: |
| 3728 | #line 1544 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3729 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3730 | (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'H'); |
| 3731 | checkmem((yyval.a_value)); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3732 | free((yyvsp[(1) - (1)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3733 | } |
| 3734 | break; |
| 3735 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3736 | case 162: |
| 3737 | #line 1549 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3738 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3739 | (yyval.a_value) = (yyval.a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3740 | } |
| 3741 | break; |
| 3742 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3743 | case 163: |
| 3744 | #line 1552 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3745 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3746 | (yyval.a_value) = (yyvsp[(1) - (1)].a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3747 | } |
| 3748 | break; |
| 3749 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3750 | case 164: |
| 3751 | #line 1558 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3752 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3753 | asn1p_ref_t *ref; |
| 3754 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3755 | ref = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3756 | checkmem(ref); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3757 | ret = asn1p_ref_add_component(ref, (yyvsp[(1) - (1)].tv_str), RLT_lowercase); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3758 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3759 | (yyval.a_value) = asn1p_value_fromref(ref, 0); |
| 3760 | checkmem((yyval.a_value)); |
| 3761 | free((yyvsp[(1) - (1)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3762 | } |
| 3763 | break; |
| 3764 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3765 | case 165: |
| 3766 | #line 1569 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3767 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3768 | asn1p_ref_t *ref; |
| 3769 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3770 | ref = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3771 | checkmem(ref); |
| 3772 | ret = asn1p_ref_add_component(ref, (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN); |
| 3773 | checkmem(ret == 0); |
| 3774 | ret = asn1p_ref_add_component(ref, (yyvsp[(3) - (3)].tv_str), RLT_lowercase); |
| 3775 | checkmem(ret == 0); |
| 3776 | (yyval.a_value) = asn1p_value_fromref(ref, 0); |
| 3777 | checkmem((yyval.a_value)); |
| 3778 | free((yyvsp[(1) - (3)].tv_str)); |
| 3779 | free((yyvsp[(3) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3780 | } |
| 3781 | break; |
| 3782 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3783 | case 166: |
| 3784 | #line 1587 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3785 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3786 | (yyval.a_value) = asn1p_value_frombuf((yyvsp[(1) - (1)].tv_opaque).buf, (yyvsp[(1) - (1)].tv_opaque).len, 0); |
| 3787 | checkmem((yyval.a_value)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3788 | } |
| 3789 | break; |
| 3790 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3791 | case 167: |
| 3792 | #line 1591 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3793 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3794 | (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int)); |
| 3795 | checkmem((yyval.a_value)); |
| 3796 | (yyval.a_value)->type = ATV_TUPLE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3797 | } |
| 3798 | break; |
| 3799 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3800 | case 168: |
| 3801 | #line 1596 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3802 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3803 | (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int)); |
| 3804 | checkmem((yyval.a_value)); |
| 3805 | (yyval.a_value)->type = ATV_QUADRUPLE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3806 | } |
| 3807 | break; |
| 3808 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3809 | case 169: |
| 3810 | #line 1604 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3811 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3812 | (yyval.tv_opaque).len = (yyvsp[(1) - (1)].tv_opaque).len + 1; |
| 3813 | (yyval.tv_opaque).buf = malloc((yyval.tv_opaque).len + 1); |
| 3814 | checkmem((yyval.tv_opaque).buf); |
| 3815 | (yyval.tv_opaque).buf[0] = '{'; |
| 3816 | memcpy((yyval.tv_opaque).buf + 1, (yyvsp[(1) - (1)].tv_opaque).buf, (yyvsp[(1) - (1)].tv_opaque).len); |
| 3817 | (yyval.tv_opaque).buf[(yyval.tv_opaque).len] = '\0'; |
| 3818 | free((yyvsp[(1) - (1)].tv_opaque).buf); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3819 | } |
| 3820 | break; |
| 3821 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3822 | case 170: |
| 3823 | #line 1613 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3824 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3825 | int newsize = (yyvsp[(1) - (2)].tv_opaque).len + (yyvsp[(2) - (2)].tv_opaque).len; |
| 3826 | char *p = malloc(newsize + 1); |
| 3827 | checkmem(p); |
| 3828 | memcpy(p , (yyvsp[(1) - (2)].tv_opaque).buf, (yyvsp[(1) - (2)].tv_opaque).len); |
| 3829 | memcpy(p + (yyvsp[(1) - (2)].tv_opaque).len, (yyvsp[(2) - (2)].tv_opaque).buf, (yyvsp[(2) - (2)].tv_opaque).len); |
| 3830 | p[newsize] = '\0'; |
| 3831 | free((yyvsp[(1) - (2)].tv_opaque).buf); |
| 3832 | free((yyvsp[(2) - (2)].tv_opaque).buf); |
| 3833 | (yyval.tv_opaque).buf = p; |
| 3834 | (yyval.tv_opaque).len = newsize; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3835 | } |
| 3836 | break; |
| 3837 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3838 | case 171: |
| 3839 | #line 1628 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3840 | { (yyval.a_type) = ASN_BASIC_BOOLEAN; } |
| 3841 | break; |
| 3842 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3843 | case 172: |
| 3844 | #line 1629 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3845 | { (yyval.a_type) = ASN_BASIC_NULL; } |
| 3846 | break; |
| 3847 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3848 | case 173: |
| 3849 | #line 1630 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3850 | { (yyval.a_type) = ASN_BASIC_REAL; } |
| 3851 | break; |
| 3852 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3853 | case 174: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3854 | #line 1631 "asn1p_y.y" |
| 3855 | { (yyval.a_type) = (yyvsp[(1) - (1)].a_type); } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3856 | break; |
| 3857 | |
| 3858 | case 175: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3859 | #line 1632 "asn1p_y.y" |
| 3860 | { (yyval.a_type) = ASN_BASIC_OCTET_STRING; } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3861 | break; |
| 3862 | |
| 3863 | case 176: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3864 | #line 1633 "asn1p_y.y" |
| 3865 | { (yyval.a_type) = ASN_BASIC_OBJECT_IDENTIFIER; } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3866 | break; |
| 3867 | |
| 3868 | case 177: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3869 | #line 1634 "asn1p_y.y" |
| 3870 | { (yyval.a_type) = ASN_BASIC_RELATIVE_OID; } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3871 | break; |
| 3872 | |
| 3873 | case 178: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3874 | #line 1635 "asn1p_y.y" |
| 3875 | { (yyval.a_type) = ASN_BASIC_EXTERNAL; } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3876 | break; |
| 3877 | |
| 3878 | case 179: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3879 | #line 1636 "asn1p_y.y" |
| 3880 | { (yyval.a_type) = ASN_BASIC_EMBEDDED_PDV; } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3881 | break; |
| 3882 | |
| 3883 | case 180: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3884 | #line 1637 "asn1p_y.y" |
| 3885 | { (yyval.a_type) = ASN_BASIC_CHARACTER_STRING; } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3886 | break; |
| 3887 | |
| 3888 | case 181: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3889 | #line 1638 "asn1p_y.y" |
| 3890 | { (yyval.a_type) = ASN_BASIC_UTCTime; } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3891 | break; |
| 3892 | |
| 3893 | case 182: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3894 | #line 1639 "asn1p_y.y" |
| 3895 | { (yyval.a_type) = ASN_BASIC_GeneralizedTime; } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3896 | break; |
| 3897 | |
| 3898 | case 183: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3899 | #line 1640 "asn1p_y.y" |
| 3900 | { (yyval.a_type) = (yyvsp[(1) - (1)].a_type); } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3901 | break; |
| 3902 | |
| 3903 | case 184: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3904 | #line 1647 "asn1p_y.y" |
| 3905 | { (yyval.a_type) = ASN_BASIC_INTEGER; } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3906 | break; |
| 3907 | |
| 3908 | case 185: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3909 | #line 1648 "asn1p_y.y" |
| 3910 | { (yyval.a_type) = ASN_BASIC_ENUMERATED; } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3911 | break; |
| 3912 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3913 | case 186: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3914 | #line 1649 "asn1p_y.y" |
| 3915 | { (yyval.a_type) = ASN_BASIC_BIT_STRING; } |
| 3916 | break; |
| 3917 | |
| 3918 | case 187: |
| 3919 | #line 1653 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3920 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3921 | (yyval.a_expr) = NEW_EXPR(); |
| 3922 | checkmem((yyval.a_expr)); |
| 3923 | (yyval.a_expr)->expr_type = (yyvsp[(1) - (1)].a_type); |
| 3924 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3925 | } |
| 3926 | break; |
| 3927 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3928 | case 188: |
| 3929 | #line 1659 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3930 | { |
| 3931 | if((yyvsp[(2) - (2)].a_expr)) { |
| 3932 | (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr); |
| 3933 | } else { |
| 3934 | (yyval.a_expr) = NEW_EXPR(); |
| 3935 | checkmem((yyval.a_expr)); |
| 3936 | } |
| 3937 | (yyval.a_expr)->expr_type = (yyvsp[(1) - (2)].a_type); |
| 3938 | (yyval.a_expr)->meta_type = AMT_TYPE; |
| 3939 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3940 | break; |
| 3941 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3942 | case 189: |
| 3943 | #line 1672 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3944 | { (yyval.a_type) = ASN_STRING_BMPString; } |
| 3945 | break; |
| 3946 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3947 | case 190: |
| 3948 | #line 1673 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3949 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3950 | (yyval.a_type) = ASN_STRING_GeneralString; |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 3951 | fprintf(stderr, "WARNING: GeneralString is not fully supported\n"); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3952 | } |
| 3953 | break; |
| 3954 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3955 | case 191: |
| 3956 | #line 1677 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3957 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3958 | (yyval.a_type) = ASN_STRING_GraphicString; |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 3959 | fprintf(stderr, "WARNING: GraphicString is not fully supported\n"); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3960 | } |
| 3961 | break; |
| 3962 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3963 | case 192: |
| 3964 | #line 1681 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3965 | { (yyval.a_type) = ASN_STRING_IA5String; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3966 | break; |
| 3967 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3968 | case 193: |
| 3969 | #line 1682 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3970 | { (yyval.a_type) = ASN_STRING_ISO646String; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3971 | break; |
| 3972 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3973 | case 194: |
| 3974 | #line 1683 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3975 | { (yyval.a_type) = ASN_STRING_NumericString; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3976 | break; |
| 3977 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3978 | case 195: |
| 3979 | #line 1684 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3980 | { (yyval.a_type) = ASN_STRING_PrintableString; } |
| 3981 | break; |
| 3982 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3983 | case 196: |
| 3984 | #line 1685 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3985 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3986 | (yyval.a_type) = ASN_STRING_T61String; |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 3987 | fprintf(stderr, "WARNING: T61String is not fully supported\n"); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3988 | } |
| 3989 | break; |
| 3990 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3991 | case 197: |
| 3992 | #line 1689 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3993 | { (yyval.a_type) = ASN_STRING_TeletexString; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3994 | break; |
| 3995 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3996 | case 198: |
| 3997 | #line 1690 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3998 | { (yyval.a_type) = ASN_STRING_UniversalString; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3999 | break; |
| 4000 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4001 | case 199: |
| 4002 | #line 1691 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4003 | { (yyval.a_type) = ASN_STRING_UTF8String; } |
| 4004 | break; |
| 4005 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4006 | case 200: |
| 4007 | #line 1692 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4008 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4009 | (yyval.a_type) = ASN_STRING_VideotexString; |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 4010 | fprintf(stderr, "WARNING: VideotexString is not fully supported\n"); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4011 | } |
| 4012 | break; |
| 4013 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4014 | case 201: |
| 4015 | #line 1696 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4016 | { (yyval.a_type) = ASN_STRING_VisibleString; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4017 | break; |
| 4018 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4019 | case 202: |
| 4020 | #line 1697 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4021 | { (yyval.a_type) = ASN_STRING_ObjectDescriptor; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4022 | break; |
| 4023 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4024 | case 207: |
| 4025 | #line 1708 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4026 | { (yyval.a_constr) = 0; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4027 | break; |
| 4028 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4029 | case 208: |
| 4030 | #line 1709 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4031 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4032 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4033 | } |
| 4034 | break; |
| 4035 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4036 | case 210: |
| 4037 | #line 1719 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4038 | { |
| 4039 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(1) - (1)].a_constr), 0); |
| 4040 | } |
| 4041 | break; |
| 4042 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4043 | case 211: |
| 4044 | #line 1722 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4045 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4046 | /* |
| 4047 | * This is a special case, for compatibility purposes. |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 4048 | * It goes without parentheses. |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4049 | */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4050 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_SIZE, (yyvsp[(3) - (4)].a_constr), 0); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4051 | } |
| 4052 | break; |
| 4053 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4054 | case 212: |
| 4055 | #line 1732 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4056 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4057 | (yyval.a_constr) = (yyvsp[(2) - (3)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4058 | } |
| 4059 | break; |
| 4060 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4061 | case 213: |
| 4062 | #line 1735 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4063 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4064 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(1) - (4)].a_constr), (yyvsp[(3) - (4)].a_constr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4065 | } |
| 4066 | break; |
| 4067 | |
Lev Walkin | c6ab03c | 2006-10-21 05:54:49 +0000 | [diff] [blame] | 4068 | case 214: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4069 | #line 1741 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4070 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4071 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4072 | } |
| 4073 | break; |
| 4074 | |
Lev Walkin | c6ab03c | 2006-10-21 05:54:49 +0000 | [diff] [blame] | 4075 | case 215: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4076 | #line 1744 "asn1p_y.y" |
| 4077 | { |
| 4078 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
| 4079 | } |
| 4080 | break; |
| 4081 | |
| 4082 | case 216: |
| 4083 | #line 1750 "asn1p_y.y" |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4084 | { |
| 4085 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
| 4086 | (yyval.a_constr)->type = ACT_EL_EXT; |
| 4087 | } |
| 4088 | break; |
| 4089 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4090 | case 217: |
| 4091 | #line 1754 "asn1p_y.y" |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4092 | { |
| 4093 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
| 4094 | } |
| 4095 | break; |
| 4096 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4097 | case 218: |
| 4098 | #line 1757 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4099 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4100 | asn1p_constraint_t *ct; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4101 | ct = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4102 | ct->type = ACT_EL_EXT; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4103 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, (yyvsp[(1) - (3)].a_constr), ct); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4104 | } |
| 4105 | break; |
| 4106 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4107 | case 219: |
| 4108 | #line 1763 "asn1p_y.y" |
Lev Walkin | c6ab03c | 2006-10-21 05:54:49 +0000 | [diff] [blame] | 4109 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4110 | asn1p_constraint_t *ct; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4111 | ct = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4112 | ct->type = ACT_EL_EXT; |
| 4113 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, (yyvsp[(1) - (5)].a_constr), ct); |
| 4114 | ct = (yyval.a_constr); |
| 4115 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, ct, (yyvsp[(5) - (5)].a_constr)); |
Lev Walkin | c6ab03c | 2006-10-21 05:54:49 +0000 | [diff] [blame] | 4116 | } |
| 4117 | break; |
| 4118 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4119 | case 221: |
| 4120 | #line 1775 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4121 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4122 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_AEX, (yyvsp[(3) - (3)].a_constr), 0); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4123 | } |
| 4124 | break; |
| 4125 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4126 | case 223: |
| 4127 | #line 1782 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4128 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4129 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_UNI, (yyvsp[(1) - (3)].a_constr), (yyvsp[(3) - (3)].a_constr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4130 | } |
| 4131 | break; |
| 4132 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4133 | case 225: |
| 4134 | #line 1789 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4135 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4136 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_INT, (yyvsp[(1) - (3)].a_constr), (yyvsp[(3) - (3)].a_constr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4137 | } |
| 4138 | break; |
| 4139 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4140 | case 227: |
| 4141 | #line 1797 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4142 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4143 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_EXC, (yyvsp[(1) - (3)].a_constr), (yyvsp[(3) - (3)].a_constr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4144 | } |
| 4145 | break; |
| 4146 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4147 | case 228: |
| 4148 | #line 1803 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4149 | { |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 4150 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4151 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4152 | checkmem((yyval.a_constr)); |
| 4153 | (yyval.a_constr)->type = (yyvsp[(1) - (4)].a_ctype); |
| 4154 | ret = asn1p_constraint_insert((yyval.a_constr), (yyvsp[(3) - (4)].a_constr)); |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 4155 | checkmem(ret == 0); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4156 | } |
| 4157 | break; |
| 4158 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4159 | case 229: |
| 4160 | #line 1811 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4161 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4162 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4163 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4164 | checkmem((yyval.a_constr)); |
| 4165 | (yyval.a_constr)->type = ACT_CA_SET; |
| 4166 | ret = asn1p_constraint_insert((yyval.a_constr), (yyvsp[(2) - (3)].a_constr)); |
| 4167 | checkmem(ret == 0); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4168 | } |
| 4169 | break; |
| 4170 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4171 | case 230: |
| 4172 | #line 1819 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4173 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4174 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4175 | checkmem((yyval.a_constr)); |
| 4176 | (yyval.a_constr)->type = ACT_EL_VALUE; |
| 4177 | (yyval.a_constr)->value = (yyvsp[(1) - (1)].a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4178 | } |
| 4179 | break; |
| 4180 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4181 | case 231: |
| 4182 | #line 1825 "asn1p_y.y" |
Lev Walkin | f172715 | 2006-09-21 01:50:37 +0000 | [diff] [blame] | 4183 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4184 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4185 | checkmem((yyval.a_constr)); |
| 4186 | (yyval.a_constr)->type = ACT_EL_TYPE; |
| 4187 | (yyval.a_constr)->containedSubtype = (yyvsp[(1) - (1)].a_value); |
Lev Walkin | f172715 | 2006-09-21 01:50:37 +0000 | [diff] [blame] | 4188 | } |
| 4189 | break; |
| 4190 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4191 | case 232: |
| 4192 | #line 1831 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4193 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4194 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4195 | checkmem((yyval.a_constr)); |
| 4196 | (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype); |
| 4197 | (yyval.a_constr)->range_start = (yyvsp[(1) - (3)].a_value); |
| 4198 | (yyval.a_constr)->range_stop = (yyvsp[(3) - (3)].a_value); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4199 | } |
| 4200 | break; |
| 4201 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4202 | case 233: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4203 | #line 1838 "asn1p_y.y" |
| 4204 | { |
| 4205 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
| 4206 | checkmem((yyval.a_constr)); |
| 4207 | (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype); |
| 4208 | (yyval.a_constr)->range_start = asn1p_value_fromint(-123); |
| 4209 | (yyval.a_constr)->range_stop = (yyvsp[(3) - (3)].a_value); |
| 4210 | (yyval.a_constr)->range_start->type = ATV_MIN; |
| 4211 | } |
| 4212 | break; |
| 4213 | |
| 4214 | case 234: |
| 4215 | #line 1846 "asn1p_y.y" |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 4216 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4217 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4218 | checkmem((yyval.a_constr)); |
| 4219 | (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4220 | (yyval.a_constr)->range_start = (yyvsp[(1) - (3)].a_value); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4221 | (yyval.a_constr)->range_stop = asn1p_value_fromint(321); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4222 | (yyval.a_constr)->range_stop->type = ATV_MAX; |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 4223 | } |
| 4224 | break; |
| 4225 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4226 | case 235: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4227 | #line 1854 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4228 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4229 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
| 4230 | checkmem((yyval.a_constr)); |
| 4231 | (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype); |
| 4232 | (yyval.a_constr)->range_start = asn1p_value_fromint(-123); |
| 4233 | (yyval.a_constr)->range_stop = asn1p_value_fromint(321); |
| 4234 | (yyval.a_constr)->range_start->type = ATV_MIN; |
| 4235 | (yyval.a_constr)->range_stop->type = ATV_MAX; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4236 | } |
| 4237 | break; |
| 4238 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4239 | case 236: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4240 | #line 1863 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4241 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4242 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
| 4243 | } |
| 4244 | break; |
| 4245 | |
| 4246 | case 237: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4247 | #line 1866 "asn1p_y.y" |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4248 | { |
| 4249 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
| 4250 | } |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4251 | break; |
| 4252 | |
| 4253 | case 238: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4254 | #line 1869 "asn1p_y.y" |
| 4255 | { asn1p_lexer_hack_push_opaque_state(); } |
| 4256 | break; |
| 4257 | |
| 4258 | case 239: |
| 4259 | #line 1869 "asn1p_y.y" |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4260 | { |
| 4261 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
| 4262 | checkmem((yyval.a_constr)); |
| 4263 | (yyval.a_constr)->type = ACT_EL_VALUE; |
| 4264 | (yyval.a_constr)->value = asn1p_value_frombuf((yyvsp[(3) - (3)].tv_opaque).buf, (yyvsp[(3) - (3)].tv_opaque).len, 0); |
| 4265 | (yyval.a_constr)->value->type = ATV_UNPARSED; |
| 4266 | } |
| 4267 | break; |
| 4268 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4269 | case 240: |
| 4270 | #line 1879 "asn1p_y.y" |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4271 | { |
| 4272 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4273 | (yyval.a_constr)->type = ACT_CT_PATTERN; |
| 4274 | (yyval.a_constr)->value = asn1p_value_frombuf((yyvsp[(2) - (2)].tv_opaque).buf, (yyvsp[(2) - (2)].tv_opaque).len, 0); |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4275 | } |
| 4276 | break; |
| 4277 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4278 | case 241: |
| 4279 | #line 1884 "asn1p_y.y" |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4280 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4281 | asn1p_ref_t *ref; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4282 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4283 | (yyval.a_constr)->type = ACT_CT_PATTERN; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4284 | ref = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4285 | asn1p_ref_add_component(ref, (yyvsp[(2) - (2)].tv_str), RLT_lowercase); |
| 4286 | (yyval.a_constr)->value = asn1p_value_fromref(ref, 0); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4287 | free((yyvsp[(2) - (2)].tv_str)); |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4288 | } |
| 4289 | break; |
| 4290 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4291 | case 242: |
| 4292 | #line 1896 "asn1p_y.y" |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4293 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4294 | (yyval.a_ctype) = ACT_CT_SIZE; |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4295 | } |
| 4296 | break; |
| 4297 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4298 | case 243: |
| 4299 | #line 1899 "asn1p_y.y" |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4300 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4301 | (yyval.a_ctype) = ACT_CT_FROM; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4302 | } |
| 4303 | break; |
| 4304 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4305 | case 244: |
| 4306 | #line 1905 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4307 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4308 | (yyval.a_value) = asn1p_value_fromint(0); |
| 4309 | checkmem((yyval.a_value)); |
| 4310 | (yyval.a_value)->type = ATV_FALSE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4311 | } |
| 4312 | break; |
| 4313 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4314 | case 245: |
| 4315 | #line 1910 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4316 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4317 | (yyval.a_value) = asn1p_value_fromint(1); |
| 4318 | checkmem((yyval.a_value)); |
| 4319 | (yyval.a_value)->type = ATV_TRUE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4320 | } |
| 4321 | break; |
| 4322 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4323 | case 249: |
| 4324 | #line 1918 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4325 | { |
Lev Walkin | c8092cb | 2005-02-18 16:34:21 +0000 | [diff] [blame] | 4326 | asn1p_ref_t *ref; |
| 4327 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4328 | ref = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | c8092cb | 2005-02-18 16:34:21 +0000 | [diff] [blame] | 4329 | checkmem(ref); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4330 | ret = asn1p_ref_add_component(ref, (yyvsp[(1) - (1)].tv_str), RLT_lowercase); |
Lev Walkin | c8092cb | 2005-02-18 16:34:21 +0000 | [diff] [blame] | 4331 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4332 | (yyval.a_value) = asn1p_value_fromref(ref, 0); |
| 4333 | checkmem((yyval.a_value)); |
| 4334 | free((yyvsp[(1) - (1)].tv_str)); |
| 4335 | } |
| 4336 | break; |
| 4337 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4338 | case 250: |
| 4339 | #line 1932 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4340 | { |
| 4341 | (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'B'); |
| 4342 | checkmem((yyval.a_value)); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4343 | free((yyvsp[(1) - (1)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4344 | } |
| 4345 | break; |
| 4346 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4347 | case 251: |
| 4348 | #line 1937 "asn1p_y.y" |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4349 | { |
| 4350 | (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'H'); |
| 4351 | checkmem((yyval.a_value)); |
| 4352 | free((yyvsp[(1) - (1)].tv_str)); |
| 4353 | } |
| 4354 | break; |
| 4355 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4356 | case 252: |
| 4357 | #line 1945 "asn1p_y.y" |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4358 | { |
| 4359 | (yyval.a_value) = asn1p_value_fromref((yyvsp[(1) - (1)].a_ref), 0); |
| 4360 | checkmem((yyval.a_value)); |
| 4361 | } |
| 4362 | break; |
| 4363 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4364 | case 253: |
| 4365 | #line 1965 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4366 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4367 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_WCOMP, (yyvsp[(3) - (3)].a_constr), 0); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4368 | } |
| 4369 | break; |
| 4370 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4371 | case 254: |
| 4372 | #line 1968 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4373 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4374 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_WCOMPS, (yyvsp[(4) - (5)].a_constr), 0); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4375 | } |
| 4376 | break; |
| 4377 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4378 | case 255: |
| 4379 | #line 1974 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4380 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4381 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4382 | } |
| 4383 | break; |
| 4384 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4385 | case 256: |
| 4386 | #line 1977 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4387 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4388 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_WCOMPS, (yyvsp[(1) - (3)].a_constr), (yyvsp[(3) - (3)].a_constr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4389 | } |
| 4390 | break; |
| 4391 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4392 | case 257: |
| 4393 | #line 1983 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4394 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4395 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4396 | checkmem((yyval.a_constr)); |
| 4397 | (yyval.a_constr)->type = ACT_EL_EXT; |
| 4398 | (yyval.a_constr)->value = asn1p_value_frombuf("...", 3, 1); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4399 | } |
| 4400 | break; |
| 4401 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4402 | case 258: |
| 4403 | #line 1989 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4404 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4405 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4406 | checkmem((yyval.a_constr)); |
| 4407 | (yyval.a_constr)->type = ACT_EL_VALUE; |
| 4408 | (yyval.a_constr)->value = asn1p_value_frombuf((yyvsp[(1) - (3)].tv_str), strlen((yyvsp[(1) - (3)].tv_str)), 0); |
| 4409 | (yyval.a_constr)->presence = (yyvsp[(3) - (3)].a_pres); |
| 4410 | if((yyvsp[(2) - (3)].a_constr)) asn1p_constraint_insert((yyval.a_constr), (yyvsp[(2) - (3)].a_constr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4411 | } |
| 4412 | break; |
| 4413 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4414 | case 259: |
| 4415 | #line 2003 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4416 | { (yyval.a_pres) = ACPRES_DEFAULT; } |
| 4417 | break; |
| 4418 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4419 | case 260: |
| 4420 | #line 2004 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4421 | { (yyval.a_pres) = (yyvsp[(1) - (1)].a_pres); } |
| 4422 | break; |
| 4423 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4424 | case 261: |
| 4425 | #line 2008 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4426 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4427 | (yyval.a_pres) = ACPRES_PRESENT; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4428 | } |
| 4429 | break; |
| 4430 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4431 | case 262: |
| 4432 | #line 2011 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4433 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4434 | (yyval.a_pres) = ACPRES_ABSENT; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4435 | } |
| 4436 | break; |
| 4437 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4438 | case 263: |
| 4439 | #line 2014 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4440 | { |
| 4441 | (yyval.a_pres) = ACPRES_OPTIONAL; |
| 4442 | } |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 4443 | break; |
| 4444 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4445 | case 267: |
| 4446 | #line 2029 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4447 | { asn1p_lexer_hack_push_opaque_state(); } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4448 | break; |
| 4449 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4450 | case 268: |
| 4451 | #line 2029 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 4452 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4453 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4454 | checkmem((yyval.a_constr)); |
| 4455 | (yyval.a_constr)->type = ACT_CT_CTDBY; |
| 4456 | (yyval.a_constr)->value = asn1p_value_frombuf((yyvsp[(5) - (5)].tv_opaque).buf, (yyvsp[(5) - (5)].tv_opaque).len, 0); |
| 4457 | checkmem((yyval.a_constr)->value); |
| 4458 | (yyval.a_constr)->value->type = ATV_UNPARSED; |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 4459 | } |
| 4460 | break; |
| 4461 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4462 | case 269: |
| 4463 | #line 2040 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4464 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4465 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4466 | (yyval.a_constr)->type = ACT_CT_CTNG; |
| 4467 | (yyval.a_constr)->value = asn1p_value_fromtype((yyvsp[(2) - (2)].a_expr)); |
Bi-Ruei, Chiu | 3dcf05b | 2017-05-04 21:45:05 +0800 | [diff] [blame] | 4468 | asn1p_expr_free((yyvsp[(2) - (2)].a_expr)); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4469 | } |
| 4470 | break; |
| 4471 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4472 | case 270: |
| 4473 | #line 2049 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4474 | { (yyval.a_ctype) = ACT_EL_RANGE; } |
| 4475 | break; |
| 4476 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4477 | case 271: |
| 4478 | #line 2050 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4479 | { (yyval.a_ctype) = ACT_EL_RLRANGE; } |
| 4480 | break; |
| 4481 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4482 | case 272: |
| 4483 | #line 2051 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4484 | { (yyval.a_ctype) = ACT_EL_LLRANGE; } |
| 4485 | break; |
| 4486 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4487 | case 273: |
| 4488 | #line 2052 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4489 | { (yyval.a_ctype) = ACT_EL_ULRANGE; } |
| 4490 | break; |
| 4491 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4492 | case 274: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4493 | #line 2055 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4494 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4495 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4496 | } |
| 4497 | break; |
| 4498 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4499 | case 275: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4500 | #line 2058 "asn1p_y.y" |
| 4501 | { |
| 4502 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
| 4503 | } |
| 4504 | break; |
| 4505 | |
| 4506 | case 276: |
| 4507 | #line 2067 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4508 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4509 | asn1p_ref_t *ref = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4510 | asn1p_constraint_t *ct; |
| 4511 | int ret; |
| 4512 | ret = asn1p_ref_add_component(ref, (yyvsp[(2) - (3)].tv_str), 0); |
| 4513 | checkmem(ret == 0); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4514 | ct = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4515 | checkmem((yyval.a_constr)); |
| 4516 | ct->type = ACT_EL_VALUE; |
| 4517 | ct->value = asn1p_value_fromref(ref, 0); |
| 4518 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CRC, ct, 0); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4519 | free((yyvsp[(2) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4520 | } |
| 4521 | break; |
| 4522 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4523 | case 277: |
| 4524 | #line 2083 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4525 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4526 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CRC, (yyvsp[(1) - (4)].a_constr), (yyvsp[(3) - (4)].a_constr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4527 | } |
| 4528 | break; |
| 4529 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4530 | case 278: |
| 4531 | #line 2089 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4532 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4533 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4534 | checkmem((yyval.a_constr)); |
| 4535 | (yyval.a_constr)->type = ACT_EL_VALUE; |
| 4536 | (yyval.a_constr)->value = asn1p_value_fromref((yyvsp[(1) - (1)].a_ref), 0); |
| 4537 | } |
| 4538 | break; |
| 4539 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4540 | case 279: |
| 4541 | #line 2095 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4542 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4543 | asn1p_constraint_t *ct; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4544 | ct = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4545 | checkmem(ct); |
| 4546 | ct->type = ACT_EL_VALUE; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4547 | ct->value = asn1p_value_fromref((yyvsp[(3) - (3)].a_ref), 0); |
| 4548 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, (yyvsp[(1) - (3)].a_constr), ct); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4549 | } |
| 4550 | break; |
| 4551 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4552 | case 280: |
| 4553 | #line 2109 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4554 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4555 | char *p = malloc(strlen((yyvsp[(2) - (2)].tv_str)) + 2); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4556 | int ret; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4557 | *p = '@'; |
| 4558 | strcpy(p + 1, (yyvsp[(2) - (2)].tv_str)); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4559 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4560 | ret = asn1p_ref_add_component((yyval.a_ref), p, 0); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4561 | checkmem(ret == 0); |
| 4562 | free(p); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4563 | free((yyvsp[(2) - (2)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4564 | } |
| 4565 | break; |
| 4566 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4567 | case 281: |
| 4568 | #line 2120 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4569 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4570 | char *p = malloc(strlen((yyvsp[(3) - (3)].tv_str)) + 3); |
| 4571 | int ret; |
| 4572 | p[0] = '@'; |
| 4573 | p[1] = '.'; |
| 4574 | strcpy(p + 2, (yyvsp[(3) - (3)].tv_str)); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4575 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4576 | ret = asn1p_ref_add_component((yyval.a_ref), p, 0); |
| 4577 | checkmem(ret == 0); |
| 4578 | free(p); |
| 4579 | free((yyvsp[(3) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4580 | } |
| 4581 | break; |
| 4582 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4583 | case 282: |
| 4584 | #line 2136 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4585 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4586 | (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4587 | } |
| 4588 | break; |
| 4589 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4590 | case 283: |
| 4591 | #line 2139 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4592 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4593 | int l1 = strlen((yyvsp[(1) - (3)].tv_str)); |
| 4594 | int l3 = strlen((yyvsp[(3) - (3)].tv_str)); |
| 4595 | (yyval.tv_str) = malloc(l1 + 1 + l3 + 1); |
| 4596 | memcpy((yyval.tv_str), (yyvsp[(1) - (3)].tv_str), l1); |
| 4597 | (yyval.tv_str)[l1] = '.'; |
| 4598 | memcpy((yyval.tv_str) + l1 + 1, (yyvsp[(3) - (3)].tv_str), l3); |
| 4599 | (yyval.tv_str)[l1 + 1 + l3] = '\0'; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4600 | free((yyvsp[(1) - (3)].tv_str)); |
| 4601 | free((yyvsp[(3) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4602 | } |
| 4603 | break; |
| 4604 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4605 | case 284: |
| 4606 | #line 2159 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4607 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4608 | (yyval.a_marker).flags = EM_NOMARK; |
| 4609 | (yyval.a_marker).default_value = 0; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4610 | } |
| 4611 | break; |
| 4612 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4613 | case 285: |
| 4614 | #line 2163 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4615 | { (yyval.a_marker) = (yyvsp[(1) - (1)].a_marker); } |
| 4616 | break; |
| 4617 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4618 | case 286: |
| 4619 | #line 2167 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4620 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4621 | (yyval.a_marker).flags = EM_OPTIONAL | EM_INDIRECT; |
| 4622 | (yyval.a_marker).default_value = 0; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4623 | } |
| 4624 | break; |
| 4625 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4626 | case 287: |
| 4627 | #line 2171 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4628 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4629 | (yyval.a_marker).flags = EM_DEFAULT; |
| 4630 | (yyval.a_marker).default_value = (yyvsp[(2) - (2)].a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4631 | } |
| 4632 | break; |
| 4633 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4634 | case 288: |
| 4635 | #line 2194 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4636 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4637 | (yyval.a_expr) = NEW_EXPR(); |
| 4638 | checkmem((yyval.a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4639 | } |
| 4640 | break; |
| 4641 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4642 | case 289: |
| 4643 | #line 2198 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4644 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4645 | (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4646 | } |
| 4647 | break; |
| 4648 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4649 | case 290: |
| 4650 | #line 2204 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4651 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4652 | (yyval.a_expr) = NEW_EXPR(); |
| 4653 | checkmem((yyval.a_expr)); |
| 4654 | asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4655 | } |
| 4656 | break; |
| 4657 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4658 | case 291: |
| 4659 | #line 2209 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4660 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4661 | (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); |
| 4662 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4663 | } |
| 4664 | break; |
| 4665 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4666 | case 292: |
| 4667 | #line 2216 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4668 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4669 | (yyval.a_expr) = NEW_EXPR(); |
| 4670 | checkmem((yyval.a_expr)); |
| 4671 | (yyval.a_expr)->expr_type = A1TC_UNIVERVAL; |
| 4672 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 4673 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4674 | } |
| 4675 | break; |
| 4676 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4677 | case 293: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4678 | #line 2223 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4679 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4680 | (yyval.a_expr) = NEW_EXPR(); |
| 4681 | checkmem((yyval.a_expr)); |
| 4682 | (yyval.a_expr)->expr_type = A1TC_UNIVERVAL; |
| 4683 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 4684 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str); |
| 4685 | (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4686 | } |
| 4687 | break; |
| 4688 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4689 | case 294: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4690 | #line 2231 "asn1p_y.y" |
| 4691 | { |
| 4692 | (yyval.a_expr) = NEW_EXPR(); |
| 4693 | checkmem((yyval.a_expr)); |
| 4694 | (yyval.a_expr)->expr_type = A1TC_UNIVERVAL; |
| 4695 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 4696 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str); |
| 4697 | (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value); |
| 4698 | } |
| 4699 | break; |
| 4700 | |
| 4701 | case 295: |
| 4702 | #line 2239 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4703 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4704 | (yyval.a_expr) = NEW_EXPR(); |
| 4705 | checkmem((yyval.a_expr)); |
| 4706 | (yyval.a_expr)->expr_type = A1TC_UNIVERVAL; |
| 4707 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 4708 | (yyval.a_expr)->value = (yyvsp[(1) - (1)].a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4709 | } |
| 4710 | break; |
| 4711 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4712 | case 296: |
| 4713 | #line 2246 "asn1p_y.y" |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4714 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4715 | (yyval.a_expr) = NEW_EXPR(); |
| 4716 | checkmem((yyval.a_expr)); |
| 4717 | (yyval.a_expr)->Identifier = strdup("..."); |
| 4718 | checkmem((yyval.a_expr)->Identifier); |
| 4719 | (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE; |
| 4720 | (yyval.a_expr)->meta_type = AMT_VALUE; |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4721 | } |
| 4722 | break; |
| 4723 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4724 | case 297: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4725 | #line 2257 "asn1p_y.y" |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4726 | { |
| 4727 | (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int)); |
| 4728 | checkmem((yyval.a_value)); |
| 4729 | } |
| 4730 | break; |
| 4731 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4732 | case 298: |
| 4733 | #line 2261 "asn1p_y.y" |
| 4734 | { |
| 4735 | (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int)); |
| 4736 | checkmem((yyval.a_value)); |
| 4737 | } |
| 4738 | break; |
| 4739 | |
| 4740 | case 300: |
| 4741 | #line 2269 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4742 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4743 | (yyval.a_value) = asn1p_value_fromdouble((yyvsp[(1) - (1)].a_dbl)); |
| 4744 | checkmem((yyval.a_value)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4745 | } |
| 4746 | break; |
| 4747 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4748 | case 301: |
| 4749 | #line 2300 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4750 | { memset(&(yyval.a_tag), 0, sizeof((yyval.a_tag))); } |
| 4751 | break; |
| 4752 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4753 | case 302: |
| 4754 | #line 2301 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4755 | { (yyval.a_tag) = (yyvsp[(1) - (1)].a_tag); } |
| 4756 | break; |
| 4757 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4758 | case 303: |
| 4759 | #line 2305 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4760 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4761 | (yyval.a_tag) = (yyvsp[(1) - (2)].a_tag); |
| 4762 | (yyval.a_tag).tag_mode = (yyvsp[(2) - (2)].a_tag).tag_mode; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4763 | } |
| 4764 | break; |
| 4765 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4766 | case 304: |
| 4767 | #line 2312 "asn1p_y.y" |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4768 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4769 | (yyval.a_tag) = (yyvsp[(2) - (4)].a_tag); |
| 4770 | (yyval.a_tag).tag_value = (yyvsp[(3) - (4)].a_int); |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4771 | } |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4772 | break; |
| 4773 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4774 | case 305: |
| 4775 | #line 2318 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4776 | { (yyval.a_tag).tag_class = TC_CONTEXT_SPECIFIC; } |
| 4777 | break; |
| 4778 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4779 | case 306: |
| 4780 | #line 2319 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4781 | { (yyval.a_tag).tag_class = TC_UNIVERSAL; } |
| 4782 | break; |
| 4783 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4784 | case 307: |
| 4785 | #line 2320 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4786 | { (yyval.a_tag).tag_class = TC_APPLICATION; } |
| 4787 | break; |
| 4788 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4789 | case 308: |
| 4790 | #line 2321 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4791 | { (yyval.a_tag).tag_class = TC_PRIVATE; } |
| 4792 | break; |
| 4793 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4794 | case 309: |
| 4795 | #line 2325 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4796 | { (yyval.a_tag).tag_mode = TM_DEFAULT; } |
| 4797 | break; |
| 4798 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4799 | case 310: |
| 4800 | #line 2326 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4801 | { (yyval.a_tag).tag_mode = TM_IMPLICIT; } |
| 4802 | break; |
| 4803 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4804 | case 311: |
| 4805 | #line 2327 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4806 | { (yyval.a_tag).tag_mode = TM_EXPLICIT; } |
| 4807 | break; |
| 4808 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4809 | case 312: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4810 | #line 2331 "asn1p_y.y" |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 4811 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4812 | checkmem((yyvsp[(1) - (1)].tv_str)); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4813 | (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); |
| 4814 | } |
| 4815 | break; |
| 4816 | |
| 4817 | case 313: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4818 | #line 2335 "asn1p_y.y" |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4819 | { |
| 4820 | checkmem((yyvsp[(1) - (1)].tv_str)); |
| 4821 | (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); |
| 4822 | } |
| 4823 | break; |
| 4824 | |
| 4825 | case 314: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4826 | #line 2343 "asn1p_y.y" |
| 4827 | { |
| 4828 | checkmem((yyvsp[(1) - (1)].tv_str)); |
| 4829 | (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); |
| 4830 | } |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4831 | break; |
| 4832 | |
| 4833 | case 315: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4834 | #line 2350 "asn1p_y.y" |
| 4835 | { (yyval.tv_str) = 0; } |
| 4836 | break; |
| 4837 | |
| 4838 | case 316: |
| 4839 | #line 2351 "asn1p_y.y" |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4840 | { |
| 4841 | (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); |
| 4842 | } |
| 4843 | break; |
| 4844 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4845 | case 317: |
| 4846 | #line 2357 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4847 | { |
| 4848 | checkmem((yyvsp[(1) - (1)].tv_str)); |
| 4849 | (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 4850 | } |
| 4851 | break; |
| 4852 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4853 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4854 | /* Line 1267 of yacc.c. */ |
| 4855 | #line 4856 "asn1p_y.c" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4856 | default: break; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4857 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4858 | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4859 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4860 | YYPOPSTACK (yylen); |
| 4861 | yylen = 0; |
| 4862 | YY_STACK_PRINT (yyss, yyssp); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4863 | |
| 4864 | *++yyvsp = yyval; |
| 4865 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4866 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4867 | /* Now `shift' the result of the reduction. Determine what state |
| 4868 | that goes to, based on the state we popped back to and the rule |
| 4869 | number reduced by. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4870 | |
| 4871 | yyn = yyr1[yyn]; |
| 4872 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4873 | yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; |
| 4874 | if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4875 | yystate = yytable[yystate]; |
| 4876 | else |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4877 | yystate = yydefgoto[yyn - YYNTOKENS]; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4878 | |
| 4879 | goto yynewstate; |
| 4880 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4881 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4882 | /*------------------------------------. |
| 4883 | | yyerrlab -- here on detecting error | |
| 4884 | `------------------------------------*/ |
| 4885 | yyerrlab: |
| 4886 | /* If not already recovering from an error, report this error. */ |
| 4887 | if (!yyerrstatus) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4888 | { |
| 4889 | ++yynerrs; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4890 | #if ! YYERROR_VERBOSE |
| 4891 | yyerror (YY_("syntax error")); |
| 4892 | #else |
| 4893 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4894 | YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); |
| 4895 | if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) |
| 4896 | { |
| 4897 | YYSIZE_T yyalloc = 2 * yysize; |
| 4898 | if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) |
| 4899 | yyalloc = YYSTACK_ALLOC_MAXIMUM; |
| 4900 | if (yymsg != yymsgbuf) |
| 4901 | YYSTACK_FREE (yymsg); |
| 4902 | yymsg = (char *) YYSTACK_ALLOC (yyalloc); |
| 4903 | if (yymsg) |
| 4904 | yymsg_alloc = yyalloc; |
| 4905 | else |
| 4906 | { |
| 4907 | yymsg = yymsgbuf; |
| 4908 | yymsg_alloc = sizeof yymsgbuf; |
| 4909 | } |
| 4910 | } |
| 4911 | |
| 4912 | if (0 < yysize && yysize <= yymsg_alloc) |
| 4913 | { |
| 4914 | (void) yysyntax_error (yymsg, yystate, yychar); |
| 4915 | yyerror (yymsg); |
| 4916 | } |
| 4917 | else |
| 4918 | { |
| 4919 | yyerror (YY_("syntax error")); |
| 4920 | if (yysize != 0) |
| 4921 | goto yyexhaustedlab; |
| 4922 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4923 | } |
| 4924 | #endif |
| 4925 | } |
| 4926 | |
| 4927 | |
| 4928 | |
| 4929 | if (yyerrstatus == 3) |
| 4930 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4931 | /* If just tried and failed to reuse look-ahead token after an |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4932 | error, discard it. */ |
| 4933 | |
| 4934 | if (yychar <= YYEOF) |
| 4935 | { |
| 4936 | /* Return failure if at end of input. */ |
| 4937 | if (yychar == YYEOF) |
| 4938 | YYABORT; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4939 | } |
| 4940 | else |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4941 | { |
| 4942 | yydestruct ("Error: discarding", |
| 4943 | yytoken, &yylval); |
| 4944 | yychar = YYEMPTY; |
| 4945 | } |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4946 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4947 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4948 | /* Else will try to reuse look-ahead token after shifting the error |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4949 | token. */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 4950 | goto yyerrlab1; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4951 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4952 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4953 | /*---------------------------------------------------. |
| 4954 | | yyerrorlab -- error raised explicitly by YYERROR. | |
| 4955 | `---------------------------------------------------*/ |
| 4956 | yyerrorlab: |
| 4957 | |
| 4958 | /* Pacify compilers like GCC when the user code never invokes |
| 4959 | YYERROR and the label yyerrorlab therefore never appears in user |
| 4960 | code. */ |
| 4961 | if (/*CONSTCOND*/ 0) |
| 4962 | goto yyerrorlab; |
| 4963 | |
| 4964 | /* Do not reclaim the symbols of the rule which action triggered |
| 4965 | this YYERROR. */ |
| 4966 | YYPOPSTACK (yylen); |
| 4967 | yylen = 0; |
| 4968 | YY_STACK_PRINT (yyss, yyssp); |
| 4969 | yystate = *yyssp; |
| 4970 | goto yyerrlab1; |
| 4971 | |
| 4972 | |
| 4973 | /*-------------------------------------------------------------. |
| 4974 | | yyerrlab1 -- common code for both syntax error and YYERROR. | |
| 4975 | `-------------------------------------------------------------*/ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4976 | yyerrlab1: |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4977 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 4978 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4979 | for (;;) |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 4980 | { |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4981 | yyn = yypact[yystate]; |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4982 | if (yyn != YYPACT_NINF) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4983 | { |
| 4984 | yyn += YYTERROR; |
| 4985 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
| 4986 | { |
| 4987 | yyn = yytable[yyn]; |
| 4988 | if (0 < yyn) |
| 4989 | break; |
| 4990 | } |
| 4991 | } |
| 4992 | |
| 4993 | /* Pop the current state because it cannot handle the error token. */ |
| 4994 | if (yyssp == yyss) |
| 4995 | YYABORT; |
| 4996 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4997 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4998 | yydestruct ("Error: popping", |
| 4999 | yystos[yystate], yyvsp); |
| 5000 | YYPOPSTACK (1); |
| 5001 | yystate = *yyssp; |
| 5002 | YY_STACK_PRINT (yyss, yyssp); |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 5003 | } |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 5004 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 5005 | if (yyn == YYFINAL) |
| 5006 | YYACCEPT; |
| 5007 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5008 | *++yyvsp = yylval; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5009 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5010 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5011 | /* Shift the error token. */ |
| 5012 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
| 5013 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5014 | yystate = yyn; |
| 5015 | goto yynewstate; |
| 5016 | |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 5017 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5018 | /*-------------------------------------. |
| 5019 | | yyacceptlab -- YYACCEPT comes here. | |
| 5020 | `-------------------------------------*/ |
| 5021 | yyacceptlab: |
| 5022 | yyresult = 0; |
| 5023 | goto yyreturn; |
| 5024 | |
| 5025 | /*-----------------------------------. |
| 5026 | | yyabortlab -- YYABORT comes here. | |
| 5027 | `-----------------------------------*/ |
| 5028 | yyabortlab: |
| 5029 | yyresult = 1; |
| 5030 | goto yyreturn; |
| 5031 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 5032 | #ifndef yyoverflow |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5033 | /*-------------------------------------------------. |
| 5034 | | yyexhaustedlab -- memory exhaustion comes here. | |
| 5035 | `-------------------------------------------------*/ |
| 5036 | yyexhaustedlab: |
| 5037 | yyerror (YY_("memory exhausted")); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5038 | yyresult = 2; |
| 5039 | /* Fall through. */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 5040 | #endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5041 | |
| 5042 | yyreturn: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 5043 | if (yychar != YYEOF && yychar != YYEMPTY) |
| 5044 | yydestruct ("Cleanup: discarding lookahead", |
| 5045 | yytoken, &yylval); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5046 | /* Do not reclaim the symbols of the rule which action triggered |
| 5047 | this YYABORT or YYACCEPT. */ |
| 5048 | YYPOPSTACK (yylen); |
| 5049 | YY_STACK_PRINT (yyss, yyssp); |
| 5050 | while (yyssp != yyss) |
| 5051 | { |
| 5052 | yydestruct ("Cleanup: popping", |
| 5053 | yystos[*yyssp], yyvsp); |
| 5054 | YYPOPSTACK (1); |
| 5055 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5056 | #ifndef yyoverflow |
| 5057 | if (yyss != yyssa) |
| 5058 | YYSTACK_FREE (yyss); |
| 5059 | #endif |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5060 | #if YYERROR_VERBOSE |
| 5061 | if (yymsg != yymsgbuf) |
| 5062 | YYSTACK_FREE (yymsg); |
| 5063 | #endif |
| 5064 | /* Make sure YYID is used. */ |
| 5065 | return YYID (yyresult); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5066 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5067 | |
| 5068 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 5069 | #line 2363 "asn1p_y.y" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5070 | |
| 5071 | |
| 5072 | |
| 5073 | /* |
| 5074 | * Convert Xstring ('0101'B or '5'H) to the binary vector. |
| 5075 | */ |
| 5076 | static asn1p_value_t * |
| 5077 | _convert_bitstring2binary(char *str, int base) { |
| 5078 | asn1p_value_t *val; |
| 5079 | int slen; |
| 5080 | int memlen; |
| 5081 | int baselen; |
| 5082 | int bits; |
| 5083 | uint8_t *binary_vector; |
| 5084 | uint8_t *bv_ptr; |
| 5085 | uint8_t cur_val; |
| 5086 | |
| 5087 | assert(str); |
| 5088 | assert(str[0] == '\''); |
| 5089 | |
| 5090 | switch(base) { |
| 5091 | case 'B': |
| 5092 | baselen = 1; |
| 5093 | break; |
| 5094 | case 'H': |
| 5095 | baselen = 4; |
| 5096 | break; |
| 5097 | default: |
| 5098 | assert(base == 'B' || base == 'H'); |
| 5099 | errno = EINVAL; |
| 5100 | return NULL; |
| 5101 | } |
| 5102 | |
| 5103 | slen = strlen(str); |
| 5104 | assert(str[slen - 1] == base); |
| 5105 | assert(str[slen - 2] == '\''); |
| 5106 | |
| 5107 | memlen = slen / (8 / baselen); /* Conservative estimate */ |
| 5108 | |
| 5109 | bv_ptr = binary_vector = malloc(memlen + 1); |
| 5110 | if(bv_ptr == NULL) |
| 5111 | /* ENOMEM */ |
| 5112 | return NULL; |
| 5113 | |
| 5114 | cur_val = 0; |
| 5115 | bits = 0; |
| 5116 | while(*(++str) != '\'') { |
| 5117 | switch(baselen) { |
| 5118 | case 1: |
| 5119 | switch(*str) { |
| 5120 | case '1': |
| 5121 | cur_val |= 1 << (7 - (bits % 8)); |
| 5122 | case '0': |
| 5123 | break; |
| 5124 | default: |
| 5125 | assert(!"_y UNREACH1"); |
| 5126 | case ' ': case '\r': case '\n': |
| 5127 | continue; |
| 5128 | } |
| 5129 | break; |
| 5130 | case 4: |
| 5131 | switch(*str) { |
| 5132 | case '0': case '1': case '2': case '3': case '4': |
| 5133 | case '5': case '6': case '7': case '8': case '9': |
| 5134 | cur_val |= (*str - '0') << (4 - (bits % 8)); |
| 5135 | break; |
| 5136 | case 'A': case 'B': case 'C': |
| 5137 | case 'D': case 'E': case 'F': |
| 5138 | cur_val |= ((*str - 'A') + 10) |
| 5139 | << (4 - (bits % 8)); |
| 5140 | break; |
| 5141 | default: |
| 5142 | assert(!"_y UNREACH2"); |
| 5143 | case ' ': case '\r': case '\n': |
| 5144 | continue; |
| 5145 | } |
| 5146 | break; |
| 5147 | } |
| 5148 | |
| 5149 | bits += baselen; |
| 5150 | if((bits % 8) == 0) { |
| 5151 | *bv_ptr++ = cur_val; |
| 5152 | cur_val = 0; |
| 5153 | } |
| 5154 | } |
| 5155 | |
| 5156 | *bv_ptr = cur_val; |
| 5157 | assert((bv_ptr - binary_vector) <= memlen); |
| 5158 | |
| 5159 | val = asn1p_value_frombits(binary_vector, bits, 0); |
| 5160 | if(val == NULL) { |
| 5161 | free(binary_vector); |
| 5162 | } |
| 5163 | |
| 5164 | return val; |
| 5165 | } |
| 5166 | |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 5167 | /* |
| 5168 | * For unnamed types (used in old X.208 compliant modules) |
| 5169 | * generate some sort of interim names, to not to force human being to fix |
| 5170 | * the specification's compliance to modern ASN.1 standards. |
| 5171 | */ |
| 5172 | static void |
| 5173 | _fixup_anonymous_identifier(asn1p_expr_t *expr) { |
| 5174 | char *p; |
| 5175 | assert(expr->Identifier == 0); |
| 5176 | |
| 5177 | /* |
| 5178 | * Try to figure out the type name |
| 5179 | * without going too much into details |
| 5180 | */ |
| 5181 | expr->Identifier = ASN_EXPR_TYPE2STR(expr->expr_type); |
| 5182 | if(expr->reference && expr->reference->comp_count > 0) |
| 5183 | expr->Identifier = expr->reference->components[0].name; |
| 5184 | |
| 5185 | fprintf(stderr, |
| 5186 | "WARNING: Line %d: expected lower-case member identifier, " |
| 5187 | "found an unnamed %s.\n" |
| 5188 | "WARNING: Obsolete X.208 syntax detected, " |
| 5189 | "please give the member a name.\n", |
| 5190 | yylineno, expr->Identifier ? expr->Identifier : "type"); |
| 5191 | |
| 5192 | if(!expr->Identifier) |
| 5193 | expr->Identifier = "unnamed"; |
| 5194 | expr->Identifier = strdup(expr->Identifier); |
| 5195 | assert(expr->Identifier); |
| 5196 | /* Make a lowercase identifier from the type name */ |
| 5197 | for(p = expr->Identifier; *p; p++) { |
| 5198 | switch(*p) { |
| 5199 | case 'A' ... 'Z': *p += 32; break; |
| 5200 | case ' ': *p = '_'; break; |
| 5201 | case '-': *p = '_'; break; |
| 5202 | } |
| 5203 | } |
| 5204 | fprintf(stderr, "NOTE: Assigning temporary identifier \"%s\". " |
| 5205 | "Name clash may occur later.\n", |
| 5206 | expr->Identifier); |
| 5207 | } |
| 5208 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5209 | int |
| 5210 | yyerror(const char *msg) { |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 5211 | extern char *asn1p_text; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5212 | fprintf(stderr, |
| 5213 | "ASN.1 grammar parse error " |
| 5214 | "near line %d (token \"%s\"): %s\n", |
Lev Walkin | ceb20e7 | 2004-09-05 10:40:41 +0000 | [diff] [blame] | 5215 | yylineno, asn1p_text, msg); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5216 | return -1; |
| 5217 | } |
| 5218 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 5219 | |