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, |
Lev Walkin | be518fa | 2017-09-07 02:05:28 -0700 | [diff] [blame] | 96 | TOK_ExtValue_BIT_STRING = 277, |
| 97 | TOK_ABSENT = 278, |
| 98 | TOK_ABSTRACT_SYNTAX = 279, |
| 99 | TOK_ALL = 280, |
| 100 | TOK_ANY = 281, |
| 101 | TOK_APPLICATION = 282, |
| 102 | TOK_AUTOMATIC = 283, |
| 103 | TOK_BEGIN = 284, |
| 104 | TOK_BIT = 285, |
| 105 | TOK_BMPString = 286, |
| 106 | TOK_BOOLEAN = 287, |
| 107 | TOK_BY = 288, |
| 108 | TOK_CHARACTER = 289, |
| 109 | TOK_CHOICE = 290, |
| 110 | TOK_CLASS = 291, |
| 111 | TOK_COMPONENT = 292, |
| 112 | TOK_COMPONENTS = 293, |
| 113 | TOK_CONSTRAINED = 294, |
| 114 | TOK_CONTAINING = 295, |
| 115 | TOK_DEFAULT = 296, |
| 116 | TOK_DEFINITIONS = 297, |
| 117 | TOK_DEFINED = 298, |
| 118 | TOK_EMBEDDED = 299, |
| 119 | TOK_ENCODED = 300, |
| 120 | TOK_ENCODING_CONTROL = 301, |
| 121 | TOK_END = 302, |
| 122 | TOK_ENUMERATED = 303, |
| 123 | TOK_EXPLICIT = 304, |
| 124 | TOK_EXPORTS = 305, |
| 125 | TOK_EXTENSIBILITY = 306, |
| 126 | TOK_EXTERNAL = 307, |
| 127 | TOK_FALSE = 308, |
| 128 | TOK_FROM = 309, |
| 129 | TOK_GeneralizedTime = 310, |
| 130 | TOK_GeneralString = 311, |
| 131 | TOK_GraphicString = 312, |
| 132 | TOK_IA5String = 313, |
| 133 | TOK_IDENTIFIER = 314, |
| 134 | TOK_IMPLICIT = 315, |
| 135 | TOK_IMPLIED = 316, |
| 136 | TOK_IMPORTS = 317, |
| 137 | TOK_INCLUDES = 318, |
| 138 | TOK_INSTANCE = 319, |
| 139 | TOK_INSTRUCTIONS = 320, |
| 140 | TOK_INTEGER = 321, |
| 141 | TOK_ISO646String = 322, |
| 142 | TOK_MAX = 323, |
| 143 | TOK_MIN = 324, |
| 144 | TOK_MINUS_INFINITY = 325, |
| 145 | TOK_NULL = 326, |
| 146 | TOK_NumericString = 327, |
| 147 | TOK_OBJECT = 328, |
| 148 | TOK_ObjectDescriptor = 329, |
| 149 | TOK_OCTET = 330, |
| 150 | TOK_OF = 331, |
| 151 | TOK_OPTIONAL = 332, |
| 152 | TOK_PATTERN = 333, |
| 153 | TOK_PDV = 334, |
| 154 | TOK_PLUS_INFINITY = 335, |
| 155 | TOK_PRESENT = 336, |
| 156 | TOK_PrintableString = 337, |
| 157 | TOK_PRIVATE = 338, |
| 158 | TOK_REAL = 339, |
| 159 | TOK_RELATIVE_OID = 340, |
| 160 | TOK_SEQUENCE = 341, |
| 161 | TOK_SET = 342, |
| 162 | TOK_SIZE = 343, |
| 163 | TOK_STRING = 344, |
| 164 | TOK_SYNTAX = 345, |
| 165 | TOK_T61String = 346, |
| 166 | TOK_TAGS = 347, |
| 167 | TOK_TeletexString = 348, |
| 168 | TOK_TRUE = 349, |
| 169 | TOK_TYPE_IDENTIFIER = 350, |
| 170 | TOK_UNIQUE = 351, |
| 171 | TOK_UNIVERSAL = 352, |
| 172 | TOK_UniversalString = 353, |
| 173 | TOK_UTCTime = 354, |
| 174 | TOK_UTF8String = 355, |
| 175 | TOK_VideotexString = 356, |
| 176 | TOK_VisibleString = 357, |
| 177 | TOK_WITH = 358, |
| 178 | UTF8_BOM = 359, |
| 179 | TOK_EXCEPT = 360, |
| 180 | TOK_INTERSECTION = 361, |
| 181 | TOK_UNION = 362, |
| 182 | TOK_TwoDots = 363, |
| 183 | TOK_ThreeDots = 364 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 184 | }; |
| 185 | #endif |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 186 | /* Tokens. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 187 | #define TOK_PPEQ 258 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 188 | #define TOK_VBracketLeft 259 |
| 189 | #define TOK_VBracketRight 260 |
| 190 | #define TOK_whitespace 261 |
| 191 | #define TOK_opaque 262 |
| 192 | #define TOK_bstring 263 |
| 193 | #define TOK_cstring 264 |
| 194 | #define TOK_hstring 265 |
| 195 | #define TOK_identifier 266 |
| 196 | #define TOK_number 267 |
| 197 | #define TOK_number_negative 268 |
| 198 | #define TOK_realnumber 269 |
| 199 | #define TOK_tuple 270 |
| 200 | #define TOK_quadruple 271 |
| 201 | #define TOK_typereference 272 |
| 202 | #define TOK_capitalreference 273 |
| 203 | #define TOK_typefieldreference 274 |
| 204 | #define TOK_valuefieldreference 275 |
| 205 | #define TOK_Literal 276 |
Lev Walkin | be518fa | 2017-09-07 02:05:28 -0700 | [diff] [blame] | 206 | #define TOK_ExtValue_BIT_STRING 277 |
| 207 | #define TOK_ABSENT 278 |
| 208 | #define TOK_ABSTRACT_SYNTAX 279 |
| 209 | #define TOK_ALL 280 |
| 210 | #define TOK_ANY 281 |
| 211 | #define TOK_APPLICATION 282 |
| 212 | #define TOK_AUTOMATIC 283 |
| 213 | #define TOK_BEGIN 284 |
| 214 | #define TOK_BIT 285 |
| 215 | #define TOK_BMPString 286 |
| 216 | #define TOK_BOOLEAN 287 |
| 217 | #define TOK_BY 288 |
| 218 | #define TOK_CHARACTER 289 |
| 219 | #define TOK_CHOICE 290 |
| 220 | #define TOK_CLASS 291 |
| 221 | #define TOK_COMPONENT 292 |
| 222 | #define TOK_COMPONENTS 293 |
| 223 | #define TOK_CONSTRAINED 294 |
| 224 | #define TOK_CONTAINING 295 |
| 225 | #define TOK_DEFAULT 296 |
| 226 | #define TOK_DEFINITIONS 297 |
| 227 | #define TOK_DEFINED 298 |
| 228 | #define TOK_EMBEDDED 299 |
| 229 | #define TOK_ENCODED 300 |
| 230 | #define TOK_ENCODING_CONTROL 301 |
| 231 | #define TOK_END 302 |
| 232 | #define TOK_ENUMERATED 303 |
| 233 | #define TOK_EXPLICIT 304 |
| 234 | #define TOK_EXPORTS 305 |
| 235 | #define TOK_EXTENSIBILITY 306 |
| 236 | #define TOK_EXTERNAL 307 |
| 237 | #define TOK_FALSE 308 |
| 238 | #define TOK_FROM 309 |
| 239 | #define TOK_GeneralizedTime 310 |
| 240 | #define TOK_GeneralString 311 |
| 241 | #define TOK_GraphicString 312 |
| 242 | #define TOK_IA5String 313 |
| 243 | #define TOK_IDENTIFIER 314 |
| 244 | #define TOK_IMPLICIT 315 |
| 245 | #define TOK_IMPLIED 316 |
| 246 | #define TOK_IMPORTS 317 |
| 247 | #define TOK_INCLUDES 318 |
| 248 | #define TOK_INSTANCE 319 |
| 249 | #define TOK_INSTRUCTIONS 320 |
| 250 | #define TOK_INTEGER 321 |
| 251 | #define TOK_ISO646String 322 |
| 252 | #define TOK_MAX 323 |
| 253 | #define TOK_MIN 324 |
| 254 | #define TOK_MINUS_INFINITY 325 |
| 255 | #define TOK_NULL 326 |
| 256 | #define TOK_NumericString 327 |
| 257 | #define TOK_OBJECT 328 |
| 258 | #define TOK_ObjectDescriptor 329 |
| 259 | #define TOK_OCTET 330 |
| 260 | #define TOK_OF 331 |
| 261 | #define TOK_OPTIONAL 332 |
| 262 | #define TOK_PATTERN 333 |
| 263 | #define TOK_PDV 334 |
| 264 | #define TOK_PLUS_INFINITY 335 |
| 265 | #define TOK_PRESENT 336 |
| 266 | #define TOK_PrintableString 337 |
| 267 | #define TOK_PRIVATE 338 |
| 268 | #define TOK_REAL 339 |
| 269 | #define TOK_RELATIVE_OID 340 |
| 270 | #define TOK_SEQUENCE 341 |
| 271 | #define TOK_SET 342 |
| 272 | #define TOK_SIZE 343 |
| 273 | #define TOK_STRING 344 |
| 274 | #define TOK_SYNTAX 345 |
| 275 | #define TOK_T61String 346 |
| 276 | #define TOK_TAGS 347 |
| 277 | #define TOK_TeletexString 348 |
| 278 | #define TOK_TRUE 349 |
| 279 | #define TOK_TYPE_IDENTIFIER 350 |
| 280 | #define TOK_UNIQUE 351 |
| 281 | #define TOK_UNIVERSAL 352 |
| 282 | #define TOK_UniversalString 353 |
| 283 | #define TOK_UTCTime 354 |
| 284 | #define TOK_UTF8String 355 |
| 285 | #define TOK_VideotexString 356 |
| 286 | #define TOK_VisibleString 357 |
| 287 | #define TOK_WITH 358 |
| 288 | #define UTF8_BOM 359 |
| 289 | #define TOK_EXCEPT 360 |
| 290 | #define TOK_INTERSECTION 361 |
| 291 | #define TOK_UNION 362 |
| 292 | #define TOK_TwoDots 363 |
| 293 | #define TOK_ThreeDots 364 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 294 | |
| 295 | |
| 296 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 297 | |
| 298 | /* Copy the first part of user declarations. */ |
| 299 | #line 1 "asn1p_y.y" |
| 300 | |
| 301 | |
| 302 | #include <stdlib.h> |
| 303 | #include <stdio.h> |
| 304 | #include <string.h> |
Lev Walkin | 0c68645 | 2017-09-07 22:59:36 -0700 | [diff] [blame] | 305 | #include <stdarg.h> |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 306 | #include <errno.h> |
| 307 | #include <assert.h> |
| 308 | |
| 309 | #include "asn1parser.h" |
| 310 | |
| 311 | #define YYPARSE_PARAM param |
| 312 | #define YYPARSE_PARAM_TYPE void ** |
| 313 | #define YYERROR_VERBOSE |
Lev Walkin | 0c68645 | 2017-09-07 22:59:36 -0700 | [diff] [blame] | 314 | #define YYDEBUG 1 |
| 315 | #define YYFPRINTF prefixed_fprintf |
| 316 | |
| 317 | /* |
| 318 | * Prefix parser debug with "PARSER: " for easier human eye scanning. |
| 319 | */ |
| 320 | static int |
| 321 | __attribute__((format(printf, 2, 3))) |
| 322 | prefixed_fprintf(FILE *f, const char *fmt, ...) { |
| 323 | static int line_ended = 1; |
| 324 | va_list ap; |
| 325 | va_start(ap, fmt); |
| 326 | if(line_ended) { |
| 327 | fprintf(f, "PARSER: "); |
| 328 | line_ended = 0; |
| 329 | } |
| 330 | size_t len = strlen(fmt); |
| 331 | if(len && fmt[len-1] == '\n') { |
| 332 | line_ended = 1; |
| 333 | } |
| 334 | int ret = vfprintf(f, fmt, ap); |
| 335 | va_end(ap); |
| 336 | return ret; |
| 337 | } |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 338 | |
| 339 | int yylex(void); |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 340 | static int yyerror(const char *msg); |
| 341 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 342 | #ifdef YYBYACC |
| 343 | int yyparse(void **param); /* byacc does not produce a prototype */ |
| 344 | #endif |
| 345 | void asn1p_lexer_hack_push_opaque_state(void); |
| 346 | void asn1p_lexer_hack_enable_with_syntax(void); |
| 347 | void asn1p_lexer_hack_push_encoding_control(void); |
| 348 | #define yylineno asn1p_lineno |
| 349 | extern int asn1p_lineno; |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 350 | const char *asn1p_parse_debug_filename; |
| 351 | #define ASN_FILENAME asn1p_parse_debug_filename |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 352 | |
| 353 | /* |
| 354 | * Process directives as <ASN1C:RepresentAsPointer> |
| 355 | */ |
| 356 | extern int asn1p_as_pointer; |
| 357 | |
| 358 | /* |
| 359 | * This temporary variable is used to solve the shortcomings of 1-lookahead |
| 360 | * parser. |
| 361 | */ |
| 362 | static struct AssignedIdentifier *saved_aid; |
| 363 | |
| 364 | static asn1p_value_t *_convert_bitstring2binary(char *str, int base); |
| 365 | static void _fixup_anonymous_identifier(asn1p_expr_t *expr); |
| 366 | |
| 367 | static asn1p_module_t *currentModule; |
| 368 | #define NEW_EXPR() (asn1p_expr_new(yylineno, currentModule)) |
| 369 | |
| 370 | #define checkmem(ptr) do { \ |
| 371 | if(!(ptr)) \ |
| 372 | return yyerror("Memory failure"); \ |
| 373 | } while(0) |
| 374 | |
| 375 | #define CONSTRAINT_INSERT(root, constr_type, arg1, arg2) do { \ |
| 376 | if(arg1->type != constr_type) { \ |
| 377 | int __ret; \ |
| 378 | root = asn1p_constraint_new(yylineno, currentModule); \ |
| 379 | checkmem(root); \ |
| 380 | root->type = constr_type; \ |
| 381 | __ret = asn1p_constraint_insert(root, \ |
| 382 | arg1); \ |
| 383 | checkmem(__ret == 0); \ |
| 384 | } else { \ |
| 385 | root = arg1; \ |
| 386 | } \ |
| 387 | if(arg2) { \ |
| 388 | int __ret \ |
| 389 | = asn1p_constraint_insert(root, arg2); \ |
| 390 | checkmem(__ret == 0); \ |
| 391 | } \ |
| 392 | } while(0) |
| 393 | |
| 394 | #ifdef AL_IMPORT |
| 395 | #error AL_IMPORT DEFINED ELSEWHERE! |
| 396 | #endif |
| 397 | #define AL_IMPORT(to,where,from,field) do { \ |
| 398 | if(!(from)) break; \ |
| 399 | while(TQ_FIRST(&((from)->where))) { \ |
| 400 | TQ_ADD(&((to)->where), \ |
| 401 | TQ_REMOVE(&((from)->where), field), \ |
| 402 | field); \ |
| 403 | } \ |
| 404 | assert(TQ_FIRST(&((from)->where)) == 0); \ |
| 405 | } while(0) |
| 406 | |
| 407 | |
| 408 | |
| 409 | /* Enabling traces. */ |
| 410 | #ifndef YYDEBUG |
| 411 | # define YYDEBUG 0 |
| 412 | #endif |
| 413 | |
| 414 | /* Enabling verbose error messages. */ |
| 415 | #ifdef YYERROR_VERBOSE |
| 416 | # undef YYERROR_VERBOSE |
| 417 | # define YYERROR_VERBOSE 1 |
| 418 | #else |
| 419 | # define YYERROR_VERBOSE 0 |
| 420 | #endif |
| 421 | |
| 422 | /* Enabling the token table. */ |
| 423 | #ifndef YYTOKEN_TABLE |
| 424 | # define YYTOKEN_TABLE 0 |
| 425 | #endif |
| 426 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 427 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
| 428 | typedef union YYSTYPE |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 429 | #line 116 "asn1p_y.y" |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 430 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 431 | asn1p_t *a_grammar; |
| 432 | asn1p_module_flags_e a_module_flags; |
| 433 | asn1p_module_t *a_module; |
| 434 | asn1p_expr_type_e a_type; /* ASN.1 Type */ |
| 435 | asn1p_expr_t *a_expr; /* Constructed collection */ |
| 436 | asn1p_constraint_t *a_constr; /* Constraint */ |
| 437 | enum asn1p_constraint_type_e a_ctype;/* Constraint type */ |
| 438 | asn1p_xports_t *a_xports; /* IMports/EXports */ |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 439 | struct AssignedIdentifier a_aid; /* Assigned Identifier */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 440 | asn1p_oid_t *a_oid; /* Object Identifier */ |
| 441 | asn1p_oid_arc_t a_oid_arc; /* Single OID's arc */ |
| 442 | struct asn1p_type_tag_s a_tag; /* A tag */ |
| 443 | asn1p_ref_t *a_ref; /* Reference to custom type */ |
| 444 | asn1p_wsyntx_t *a_wsynt; /* WITH SYNTAX contents */ |
| 445 | asn1p_wsyntx_chunk_t *a_wchunk; /* WITH SYNTAX chunk */ |
| 446 | struct asn1p_ref_component_s a_refcomp; /* Component of a reference */ |
| 447 | asn1p_value_t *a_value; /* Number, DefinedValue, etc */ |
| 448 | struct asn1p_param_s a_parg; /* A parameter argument */ |
| 449 | asn1p_paramlist_t *a_plist; /* A pargs list */ |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 450 | struct asn1p_expr_marker_s a_marker; /* OPTIONAL/DEFAULT */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 451 | enum asn1p_constr_pres_e a_pres; /* PRESENT/ABSENT/OPTIONAL */ |
Lev Walkin | d21c505 | 2004-09-29 13:18:09 +0000 | [diff] [blame] | 452 | asn1c_integer_t a_int; |
Lev Walkin | adf863f | 2006-09-05 16:18:34 +0000 | [diff] [blame] | 453 | double a_dbl; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 454 | char *tv_str; |
| 455 | struct { |
| 456 | char *buf; |
| 457 | int len; |
| 458 | } tv_opaque; |
| 459 | struct { |
| 460 | char *name; |
| 461 | struct asn1p_type_tag_s tag; |
| 462 | } tv_nametag; |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 463 | } |
| 464 | /* Line 193 of yacc.c. */ |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 465 | #line 466 "asn1p_y.c" |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 466 | YYSTYPE; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 467 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
| 468 | # define YYSTYPE_IS_DECLARED 1 |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 469 | # define YYSTYPE_IS_TRIVIAL 1 |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 470 | #endif |
| 471 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 472 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 473 | |
| 474 | /* Copy the second part of user declarations. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 475 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 476 | |
| 477 | /* Line 216 of yacc.c. */ |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 478 | #line 479 "asn1p_y.c" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 479 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 480 | #ifdef short |
| 481 | # undef short |
| 482 | #endif |
| 483 | |
| 484 | #ifdef YYTYPE_UINT8 |
| 485 | typedef YYTYPE_UINT8 yytype_uint8; |
| 486 | #else |
| 487 | typedef unsigned char yytype_uint8; |
| 488 | #endif |
| 489 | |
| 490 | #ifdef YYTYPE_INT8 |
| 491 | typedef YYTYPE_INT8 yytype_int8; |
| 492 | #elif (defined __STDC__ || defined __C99__FUNC__ \ |
| 493 | || defined __cplusplus || defined _MSC_VER) |
| 494 | typedef signed char yytype_int8; |
| 495 | #else |
| 496 | typedef short int yytype_int8; |
| 497 | #endif |
| 498 | |
| 499 | #ifdef YYTYPE_UINT16 |
| 500 | typedef YYTYPE_UINT16 yytype_uint16; |
| 501 | #else |
| 502 | typedef unsigned short int yytype_uint16; |
| 503 | #endif |
| 504 | |
| 505 | #ifdef YYTYPE_INT16 |
| 506 | typedef YYTYPE_INT16 yytype_int16; |
| 507 | #else |
| 508 | typedef short int yytype_int16; |
| 509 | #endif |
| 510 | |
| 511 | #ifndef YYSIZE_T |
| 512 | # ifdef __SIZE_TYPE__ |
| 513 | # define YYSIZE_T __SIZE_TYPE__ |
| 514 | # elif defined size_t |
| 515 | # define YYSIZE_T size_t |
| 516 | # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ |
| 517 | || defined __cplusplus || defined _MSC_VER) |
| 518 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
| 519 | # define YYSIZE_T size_t |
| 520 | # else |
| 521 | # define YYSIZE_T unsigned int |
| 522 | # endif |
| 523 | #endif |
| 524 | |
| 525 | #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
| 526 | |
| 527 | #ifndef YY_ |
| 528 | # if defined YYENABLE_NLS && YYENABLE_NLS |
| 529 | # if ENABLE_NLS |
| 530 | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 531 | # define YY_(msgid) dgettext ("bison-runtime", msgid) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 532 | # endif |
| 533 | # endif |
| 534 | # ifndef YY_ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 535 | # define YY_(msgid) msgid |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 536 | # endif |
| 537 | #endif |
| 538 | |
| 539 | /* Suppress unused-variable warnings by "using" E. */ |
| 540 | #if ! defined lint || defined __GNUC__ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 541 | # define YYUSE(e) ((void) (e)) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 542 | #else |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 543 | # define YYUSE(e) /* empty */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 544 | #endif |
| 545 | |
| 546 | /* Identity function, used to suppress warnings about constant conditions. */ |
| 547 | #ifndef lint |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 548 | # define YYID(n) (n) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 549 | #else |
| 550 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 551 | || defined __cplusplus || defined _MSC_VER) |
| 552 | static int |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 553 | YYID (int i) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 554 | #else |
| 555 | static int |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 556 | YYID (i) |
| 557 | int i; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 558 | #endif |
| 559 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 560 | return i; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 561 | } |
| 562 | #endif |
| 563 | |
| 564 | #if ! defined yyoverflow || YYERROR_VERBOSE |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 565 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 566 | /* The parser invokes alloca or malloc; define the necessary symbols. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 567 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 568 | # ifdef YYSTACK_USE_ALLOCA |
| 569 | # if YYSTACK_USE_ALLOCA |
| 570 | # ifdef __GNUC__ |
| 571 | # define YYSTACK_ALLOC __builtin_alloca |
| 572 | # elif defined __BUILTIN_VA_ARG_INCR |
| 573 | # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
| 574 | # elif defined _AIX |
| 575 | # define YYSTACK_ALLOC __alloca |
| 576 | # elif defined _MSC_VER |
| 577 | # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
| 578 | # define alloca _alloca |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 579 | # else |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 580 | # define YYSTACK_ALLOC alloca |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 581 | # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 582 | || defined __cplusplus || defined _MSC_VER) |
| 583 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 584 | # ifndef _STDLIB_H |
| 585 | # define _STDLIB_H 1 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 586 | # endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 587 | # endif |
| 588 | # endif |
| 589 | # endif |
| 590 | # endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 591 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 592 | # ifdef YYSTACK_ALLOC |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 593 | /* Pacify GCC's `empty if-body' warning. */ |
| 594 | # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) |
| 595 | # ifndef YYSTACK_ALLOC_MAXIMUM |
| 596 | /* The OS might guarantee only one guard page at the bottom of the stack, |
| 597 | and a page size can be as small as 4096 bytes. So we cannot safely |
| 598 | invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
| 599 | to allow for a few compiler-allocated temporary stack slots. */ |
| 600 | # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 601 | # endif |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 602 | # else |
| 603 | # define YYSTACK_ALLOC YYMALLOC |
| 604 | # define YYSTACK_FREE YYFREE |
| 605 | # ifndef YYSTACK_ALLOC_MAXIMUM |
| 606 | # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
| 607 | # endif |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 608 | # if (defined __cplusplus && ! defined _STDLIB_H \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 609 | && ! ((defined YYMALLOC || defined malloc) \ |
| 610 | && (defined YYFREE || defined free))) |
| 611 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 612 | # ifndef _STDLIB_H |
| 613 | # define _STDLIB_H 1 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 614 | # endif |
| 615 | # endif |
| 616 | # ifndef YYMALLOC |
| 617 | # define YYMALLOC malloc |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 618 | # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 619 | || defined __cplusplus || defined _MSC_VER) |
| 620 | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
| 621 | # endif |
| 622 | # endif |
| 623 | # ifndef YYFREE |
| 624 | # define YYFREE free |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 625 | # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 626 | || defined __cplusplus || defined _MSC_VER) |
| 627 | void free (void *); /* INFRINGES ON USER NAME SPACE */ |
| 628 | # endif |
| 629 | # endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 630 | # endif |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 631 | #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 632 | |
| 633 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 634 | #if (! defined yyoverflow \ |
| 635 | && (! defined __cplusplus \ |
| 636 | || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 637 | |
| 638 | /* A type that is properly aligned for any stack member. */ |
| 639 | union yyalloc |
| 640 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 641 | yytype_int16 yyss; |
| 642 | YYSTYPE yyvs; |
| 643 | }; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 644 | |
| 645 | /* 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] | 646 | # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 647 | |
| 648 | /* The size of an array large to enough to hold all stacks, each with |
| 649 | N elements. */ |
| 650 | # define YYSTACK_BYTES(N) \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 651 | ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ |
| 652 | + YYSTACK_GAP_MAXIMUM) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 653 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 654 | /* Copy COUNT objects from FROM to TO. The source and destination do |
| 655 | not overlap. */ |
| 656 | # ifndef YYCOPY |
| 657 | # if defined __GNUC__ && 1 < __GNUC__ |
| 658 | # define YYCOPY(To, From, Count) \ |
| 659 | __builtin_memcpy (To, From, (Count) * sizeof (*(From))) |
| 660 | # else |
| 661 | # define YYCOPY(To, From, Count) \ |
| 662 | do \ |
| 663 | { \ |
| 664 | YYSIZE_T yyi; \ |
| 665 | for (yyi = 0; yyi < (Count); yyi++) \ |
| 666 | (To)[yyi] = (From)[yyi]; \ |
| 667 | } \ |
| 668 | while (YYID (0)) |
| 669 | # endif |
| 670 | # endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 671 | |
| 672 | /* Relocate STACK from its old location to the new one. The |
| 673 | local variables YYSIZE and YYSTACKSIZE give the old and new number of |
| 674 | elements in the stack, and YYPTR gives the new location of the |
| 675 | stack. Advance YYPTR to a properly aligned location for the next |
| 676 | stack. */ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 677 | # define YYSTACK_RELOCATE(Stack) \ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 678 | do \ |
| 679 | { \ |
| 680 | YYSIZE_T yynewbytes; \ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 681 | YYCOPY (&yyptr->Stack, Stack, yysize); \ |
| 682 | Stack = &yyptr->Stack; \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 683 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 684 | yyptr += yynewbytes / sizeof (*yyptr); \ |
| 685 | } \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 686 | while (YYID (0)) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 687 | |
| 688 | #endif |
| 689 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 690 | /* YYFINAL -- State number of the termination state. */ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 691 | #define YYFINAL 9 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 692 | /* YYLAST -- Last index in YYTABLE. */ |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 693 | #define YYLAST 919 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 694 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 695 | /* YYNTOKENS -- Number of terminals. */ |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 696 | #define YYNTOKENS 126 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 697 | /* YYNNTS -- Number of nonterminals. */ |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 698 | #define YYNNTS 147 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 699 | /* YYNRULES -- Number of rules. */ |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 700 | #define YYNRULES 342 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 701 | /* YYNRULES -- Number of states. */ |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 702 | #define YYNSTATES 522 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 703 | |
| 704 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ |
| 705 | #define YYUNDEFTOK 2 |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 706 | #define YYMAXUTOK 365 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 707 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 708 | #define YYTRANSLATE(YYX) \ |
| 709 | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 710 | |
| 711 | /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 712 | static const yytype_uint8 yytranslate[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 713 | { |
| 714 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 715 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 716 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 717 | 2, 2, 2, 122, 2, 2, 2, 2, 2, 2, |
| 718 | 115, 116, 2, 2, 118, 2, 123, 2, 2, 2, |
| 719 | 2, 2, 2, 2, 2, 2, 2, 2, 119, 117, |
| 720 | 124, 2, 2, 2, 125, 2, 2, 2, 2, 2, |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 721 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 722 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 723 | 2, 120, 2, 121, 106, 2, 2, 2, 2, 2, |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 724 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 725 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 726 | 2, 2, 2, 113, 108, 114, 2, 2, 2, 2, |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 727 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 728 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 729 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 730 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 731 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 732 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 733 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 734 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 735 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 736 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 737 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 738 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 739 | 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
| 740 | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
| 741 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
| 742 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
| 743 | 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, |
| 744 | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, |
| 745 | 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, |
| 746 | 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, |
| 747 | 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, |
| 748 | 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 749 | 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 750 | 105, 107, 109, 110, 111, 112 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 751 | }; |
| 752 | |
| 753 | #if YYDEBUG |
| 754 | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in |
| 755 | YYRHS. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 756 | static const yytype_uint16 yyprhs[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 757 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 758 | 0, 0, 3, 6, 8, 10, 13, 14, 24, 25, |
| 759 | 27, 31, 34, 36, 39, 41, 46, 48, 49, 51, |
| 760 | 53, 56, 59, 62, 65, 68, 71, 72, 74, 78, |
| 761 | 80, 83, 85, 87, 89, 90, 94, 96, 97, 99, |
| 762 | 103, 106, 107, 109, 111, 114, 115, 117, 122, 124, |
| 763 | 128, 130, 134, 136, 137, 139, 143, 147, 150, 152, |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 764 | 156, 158, 162, 164, 168, 173, 175, 180, 184, 188, |
| 765 | 195, 202, 204, 208, 210, 214, 218, 222, 226, 228, |
| 766 | 232, 234, 236, 238, 240, 241, 243, 245, 249, 255, |
| 767 | 259, 262, 266, 268, 270, 274, 277, 279, 281, 287, |
| 768 | 288, 290, 292, 296, 299, 304, 308, 312, 316, 320, |
| 769 | 324, 325, 327, 328, 335, 337, 340, 342, 344, 346, |
| 770 | 350, 352, 356, 360, 362, 365, 368, 371, 375, 376, |
| 771 | 379, 381, 383, 385, 390, 395, 400, 407, 414, 416, |
| 772 | 421, 425, 427, 429, 433, 437, 441, 443, 447, 449, |
| 773 | 451, 453, 455, 459, 463, 465, 470, 472, 474, 475, |
| 774 | 479, 481, 483, 485, 487, 489, 491, 493, 495, 499, |
| 775 | 501, 503, 505, 507, 510, 512, 514, 516, 518, 520, |
| 776 | 523, 526, 528, 530, 533, 536, 538, 540, 542, 544, |
| 777 | 546, 548, 551, 553, 558, 563, 569, 574, 578, 580, |
| 778 | 582, 584, 586, 588, 590, 592, 594, 596, 598, 600, |
| 779 | 602, 604, 606, 608, 610, 612, 614, 615, 617, 618, |
| 780 | 620, 621, 623, 625, 629, 631, 634, 636, 638, 640, |
| 781 | 642, 644, 648, 654, 656, 660, 662, 666, 668, 672, |
| 782 | 674, 678, 680, 684, 686, 688, 690, 692, 694, 696, |
| 783 | 698, 701, 704, 707, 710, 714, 716, 718, 720, 722, |
| 784 | 724, 726, 728, 731, 733, 737, 741, 743, 745, 747, |
| 785 | 751, 757, 759, 763, 767, 768, 770, 772, 774, 776, |
| 786 | 778, 780, 782, 783, 789, 792, 794, 797, 800, 804, |
| 787 | 806, 808, 812, 817, 819, 823, 826, 830, 832, 836, |
| 788 | 837, 839, 841, 844, 846, 850, 852, 854, 858, 863, |
| 789 | 868, 870, 874, 879, 884, 886, 888, 892, 894, 899, |
| 790 | 904, 906, 908, 910, 912, 914, 915, 917, 920, 925, |
| 791 | 926, 928, 930, 932, 933, 935, 937, 939, 941, 942, |
| 792 | 944, 946, 948 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 793 | }; |
| 794 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 795 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
| 796 | static const yytype_int16 yyrhs[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 797 | { |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 798 | 127, 0, -1, 104, 128, -1, 128, -1, 129, -1, |
| 799 | 128, 129, -1, -1, 268, 130, 131, 42, 135, 3, |
| 800 | 29, 138, 47, -1, -1, 132, -1, 113, 133, 114, |
| 801 | -1, 113, 114, -1, 134, -1, 133, 134, -1, 270, |
| 802 | -1, 270, 115, 12, 116, -1, 12, -1, -1, 136, |
| 803 | -1, 137, -1, 136, 137, -1, 49, 92, -1, 60, |
Lev Walkin | be518fa | 2017-09-07 02:05:28 -0700 | [diff] [blame] | 804 | 92, -1, 28, 92, -1, 51, 61, -1, 18, 65, |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 805 | -1, -1, 139, -1, 151, 143, 140, -1, 141, -1, |
| 806 | 140, 141, -1, 158, -1, 193, -1, 156, -1, -1, |
| 807 | 46, 18, 142, -1, 204, -1, -1, 144, -1, 62, |
| 808 | 145, 117, -1, 62, 54, -1, -1, 146, -1, 148, |
| 809 | -1, 146, 148, -1, -1, 132, -1, 149, 54, 268, |
| 810 | 147, -1, 150, -1, 149, 118, 150, -1, 268, -1, |
| 811 | 268, 113, 114, -1, 270, -1, -1, 152, -1, 50, |
| 812 | 153, 117, -1, 50, 25, 117, -1, 50, 117, -1, |
| 813 | 154, -1, 153, 118, 154, -1, 268, -1, 268, 113, |
| 814 | 114, -1, 270, -1, 113, 214, 114, -1, 268, 178, |
| 815 | 3, 155, -1, 187, -1, 187, 113, 161, 114, -1, |
| 816 | 268, 3, 178, -1, 268, 3, 168, -1, 268, 113, |
| 817 | 159, 114, 3, 178, -1, 268, 113, 159, 114, 3, |
| 818 | 168, -1, 160, -1, 159, 118, 160, -1, 268, -1, |
| 819 | 268, 119, 270, -1, 268, 119, 268, -1, 201, 119, |
| 820 | 270, -1, 201, 119, 268, -1, 162, -1, 161, 118, |
| 821 | 162, -1, 181, -1, 196, -1, 197, -1, 155, -1, |
| 822 | -1, 164, -1, 165, -1, 164, 118, 165, -1, 164, |
| 823 | 118, 4, 164, 5, -1, 270, 182, 250, -1, 182, |
| 824 | 250, -1, 38, 76, 182, -1, 177, -1, 167, -1, |
| 825 | 166, 118, 167, -1, 270, 182, -1, 177, -1, 182, |
| 826 | -1, 36, 113, 170, 114, 172, -1, -1, 96, -1, |
| 827 | 171, -1, 170, 118, 171, -1, 19, 250, -1, 20, |
| 828 | 178, 169, 250, -1, 20, 191, 250, -1, 20, 192, |
| 829 | 250, -1, 19, 191, 250, -1, 19, 178, 250, -1, |
| 830 | 19, 192, 250, -1, -1, 173, -1, -1, 103, 90, |
| 831 | 113, 174, 175, 114, -1, 176, -1, 175, 176, -1, |
| 832 | 6, -1, 21, -1, 190, -1, 120, 175, 121, -1, |
| 833 | 111, -1, 111, 122, 197, -1, 111, 122, 261, -1, |
| 834 | 179, -1, 263, 181, -1, 157, 208, -1, 185, 208, |
| 835 | -1, 263, 184, 208, -1, -1, 183, 185, -1, 186, |
| 836 | -1, 157, -1, 203, -1, 35, 113, 166, 114, -1, |
| 837 | 86, 113, 163, 114, -1, 87, 113, 163, 114, -1, |
| 838 | 86, 209, 76, 269, 263, 184, -1, 87, 209, 76, |
| 839 | 269, 263, 184, -1, 26, -1, 26, 43, 33, 270, |
| 840 | -1, 64, 76, 187, -1, 17, -1, 18, -1, 17, |
| 841 | 123, 268, -1, 18, 123, 268, -1, 18, 123, 188, |
| 842 | -1, 189, -1, 188, 123, 189, -1, 190, -1, 19, |
| 843 | -1, 20, -1, 19, -1, 191, 123, 19, -1, 191, |
| 844 | 123, 20, -1, 18, -1, 270, 178, 3, 194, -1, |
| 845 | 196, -1, 197, -1, -1, 113, 195, 199, -1, 71, |
| 846 | -1, 53, -1, 94, -1, 261, -1, 262, -1, 198, |
| 847 | -1, 228, -1, 272, -1, 268, 123, 270, -1, 9, |
| 848 | -1, 15, -1, 16, -1, 200, -1, 199, 7, -1, |
| 849 | 7, -1, 270, -1, 32, -1, 71, -1, 84, -1, |
| 850 | 75, 89, -1, 73, 59, -1, 85, -1, 52, -1, |
| 851 | 44, 79, -1, 34, 89, -1, 99, -1, 55, -1, |
| 852 | 204, -1, 202, -1, 66, -1, 48, -1, 30, 89, |
| 853 | -1, 201, -1, 66, 113, 254, 114, -1, 48, 113, |
| 854 | 258, 114, -1, 30, 89, 113, 256, 114, -1, 22, |
| 855 | 113, 252, 114, -1, 22, 113, 114, -1, 31, -1, |
| 856 | 56, -1, 57, -1, 58, -1, 67, -1, 72, -1, |
| 857 | 82, -1, 91, -1, 93, -1, 98, -1, 100, -1, |
| 858 | 101, -1, 102, -1, 74, -1, 108, -1, 109, -1, |
| 859 | 106, -1, 107, -1, -1, 210, -1, -1, 211, -1, |
| 860 | -1, 210, -1, 222, -1, 115, 212, 116, -1, 210, |
| 861 | -1, 211, 210, -1, 213, -1, 239, -1, 214, -1, |
| 862 | 111, -1, 215, -1, 215, 118, 111, -1, 215, 118, |
| 863 | 111, 118, 215, -1, 216, -1, 25, 105, 219, -1, |
| 864 | 217, -1, 216, 205, 217, -1, 218, -1, 217, 206, |
| 865 | 218, -1, 219, -1, 219, 105, 219, -1, 220, -1, |
| 866 | 115, 215, 116, -1, 227, -1, 229, -1, 221, -1, |
| 867 | 222, -1, 230, -1, 223, -1, 224, -1, 54, 210, |
| 868 | -1, 88, 210, -1, 78, 9, -1, 78, 270, -1, |
| 869 | 225, 243, 226, -1, 227, -1, 69, -1, 227, -1, |
| 870 | 68, -1, 194, -1, 8, -1, 10, -1, 63, 178, |
| 871 | -1, 180, -1, 103, 37, 231, -1, 103, 38, 232, |
| 872 | -1, 210, -1, 233, -1, 234, -1, 113, 235, 114, |
| 873 | -1, 113, 111, 118, 235, 114, -1, 236, -1, 235, |
| 874 | 118, 236, -1, 272, 207, 237, -1, -1, 238, -1, |
| 875 | 81, -1, 23, -1, 77, -1, 240, -1, 244, -1, |
| 876 | 242, -1, -1, 39, 33, 113, 241, 199, -1, 40, |
| 877 | 178, -1, 110, -1, 110, 124, -1, 124, 110, -1, |
| 878 | 124, 110, 124, -1, 245, -1, 246, -1, 113, 268, |
| 879 | 114, -1, 245, 113, 247, 114, -1, 248, -1, 247, |
| 880 | 118, 248, -1, 125, 249, -1, 125, 123, 249, -1, |
| 881 | 270, -1, 249, 123, 270, -1, -1, 251, -1, 77, |
| 882 | -1, 41, 194, -1, 253, -1, 252, 118, 253, -1, |
| 883 | 270, -1, 255, -1, 254, 118, 255, -1, 270, 115, |
| 884 | 261, 116, -1, 270, 115, 197, 116, -1, 257, -1, |
| 885 | 256, 118, 257, -1, 270, 115, 12, 116, -1, 270, |
| 886 | 115, 197, 116, -1, 259, -1, 260, -1, 259, 118, |
| 887 | 260, -1, 270, -1, 270, 115, 261, 116, -1, 270, |
| 888 | 115, 197, 116, -1, 261, -1, 111, -1, 12, -1, |
| 889 | 13, -1, 14, -1, -1, 264, -1, 265, 267, -1, |
| 890 | 120, 266, 12, 121, -1, -1, 97, -1, 27, -1, |
| 891 | 83, -1, -1, 60, -1, 49, -1, 17, -1, 18, |
| 892 | -1, -1, 270, -1, 11, -1, 270, -1, 271, -1 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 893 | }; |
| 894 | |
| 895 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 896 | static const yytype_uint16 yyrline[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 897 | { |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 898 | 0, 415, 415, 418, 424, 429, 446, 446, 475, 476, |
| 899 | 480, 483, 489, 495, 504, 508, 512, 522, 523, 532, |
| 900 | 535, 544, 547, 550, 553, 557, 578, 579, 588, 601, |
| 901 | 604, 621, 628, 642, 650, 649, 663, 676, 677, 680, |
| 902 | 690, 696, 697, 700, 705, 712, 713, 717, 728, 733, |
| 903 | 740, 746, 752, 762, 763, 775, 778, 781, 789, 794, |
| 904 | 801, 807, 813, 822, 825, 845, 855, 875, 881, 897, |
| 905 | 903, 911, 920, 931, 935, 943, 951, 959, 970, 975, |
| 906 | 982, 983, 991, 999, 1022, 1023, 1026, 1031, 1035, 1043, |
| 907 | 1050, 1056, 1063, 1069, 1074, 1081, 1086, 1089, 1096, 1106, |
| 908 | 1107, 1111, 1118, 1128, 1138, 1149, 1159, 1170, 1180, 1191, |
| 909 | 1203, 1204, 1211, 1210, 1219, 1223, 1230, 1234, 1237, 1241, |
| 910 | 1247, 1255, 1264, 1275, 1278, 1285, 1308, 1331, 1355, 1362, |
| 911 | 1381, 1382, 1385, 1386, 1392, 1398, 1404, 1414, 1424, 1430, |
| 912 | 1442, 1457, 1465, 1473, 1484, 1495, 1517, 1525, 1534, 1538, |
| 913 | 1543, 1552, 1557, 1562, 1570, 1593, 1603, 1604, 1605, 1605, |
| 914 | 1613, 1618, 1623, 1628, 1629, 1630, 1631, 1635, 1636, 1654, |
| 915 | 1658, 1663, 1671, 1680, 1695, 1696, 1702, 1703, 1704, 1705, |
| 916 | 1706, 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1721, |
| 917 | 1722, 1723, 1727, 1733, 1738, 1743, 1748, 1753, 1762, 1763, |
| 918 | 1767, 1771, 1772, 1773, 1774, 1775, 1779, 1780, 1781, 1782, |
| 919 | 1786, 1787, 1794, 1794, 1795, 1795, 1799, 1800, 1804, 1805, |
| 920 | 1809, 1810, 1811, 1815, 1821, 1822, 1831, 1831, 1833, 1836, |
| 921 | 1840, 1841, 1847, 1858, 1859, 1865, 1866, 1872, 1873, 1880, |
| 922 | 1881, 1887, 1888, 1899, 1905, 1911, 1912, 1914, 1915, 1916, |
| 923 | 1921, 1926, 1931, 1936, 1948, 1957, 1958, 1964, 1965, 1970, |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 924 | 1973, 1978, 1986, 1992, 2004, 2007, 2013, 2014, 2014, 2015, |
| 925 | 2017, 2030, 2035, 2041, 2055, 2056, 2060, 2063, 2066, 2074, |
| 926 | 2075, 2076, 2081, 2080, 2092, 2101, 2102, 2103, 2104, 2107, |
| 927 | 2110, 2119, 2135, 2141, 2147, 2161, 2172, 2188, 2191, 2211, |
| 928 | 2215, 2219, 2223, 2230, 2235, 2241, 2250, 2255, 2262, 2270, |
| 929 | 2280, 2285, 2292, 2300, 2310, 2325, 2330, 2337, 2344, 2352, |
| 930 | 2360, 2367, 2378, 2382, 2389, 2420, 2421, 2425, 2432, 2438, |
| 931 | 2439, 2440, 2441, 2445, 2446, 2447, 2451, 2455, 2463, 2464, |
| 932 | 2470, 2477, 2484 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 933 | }; |
| 934 | #endif |
| 935 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 936 | #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 937 | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
| 938 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 939 | static const char *const yytname[] = |
| 940 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 941 | "$end", "error", "$undefined", "TOK_PPEQ", "TOK_VBracketLeft", |
| 942 | "TOK_VBracketRight", "TOK_whitespace", "TOK_opaque", "TOK_bstring", |
Lev Walkin | be518fa | 2017-09-07 02:05:28 -0700 | [diff] [blame] | 943 | "TOK_cstring", "TOK_hstring", "\"identifier\"", "\"number\"", |
| 944 | "\"negative number\"", "TOK_realnumber", "TOK_tuple", "TOK_quadruple", |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 945 | "TOK_typereference", "TOK_capitalreference", "TOK_typefieldreference", |
Lev Walkin | be518fa | 2017-09-07 02:05:28 -0700 | [diff] [blame] | 946 | "TOK_valuefieldreference", "TOK_Literal", "TOK_ExtValue_BIT_STRING", |
| 947 | "TOK_ABSENT", "TOK_ABSTRACT_SYNTAX", "TOK_ALL", "TOK_ANY", |
| 948 | "TOK_APPLICATION", "TOK_AUTOMATIC", "TOK_BEGIN", "TOK_BIT", |
| 949 | "TOK_BMPString", "TOK_BOOLEAN", "TOK_BY", "TOK_CHARACTER", "TOK_CHOICE", |
| 950 | "TOK_CLASS", "TOK_COMPONENT", "TOK_COMPONENTS", "TOK_CONSTRAINED", |
| 951 | "TOK_CONTAINING", "TOK_DEFAULT", "TOK_DEFINITIONS", "TOK_DEFINED", |
| 952 | "TOK_EMBEDDED", "TOK_ENCODED", "TOK_ENCODING_CONTROL", "TOK_END", |
| 953 | "TOK_ENUMERATED", "TOK_EXPLICIT", "TOK_EXPORTS", "TOK_EXTENSIBILITY", |
| 954 | "TOK_EXTERNAL", "TOK_FALSE", "TOK_FROM", "TOK_GeneralizedTime", |
| 955 | "TOK_GeneralString", "TOK_GraphicString", "TOK_IA5String", |
| 956 | "TOK_IDENTIFIER", "TOK_IMPLICIT", "TOK_IMPLIED", "TOK_IMPORTS", |
| 957 | "TOK_INCLUDES", "TOK_INSTANCE", "TOK_INSTRUCTIONS", "TOK_INTEGER", |
| 958 | "TOK_ISO646String", "TOK_MAX", "TOK_MIN", "TOK_MINUS_INFINITY", |
| 959 | "TOK_NULL", "TOK_NumericString", "TOK_OBJECT", "TOK_ObjectDescriptor", |
| 960 | "TOK_OCTET", "TOK_OF", "TOK_OPTIONAL", "TOK_PATTERN", "TOK_PDV", |
| 961 | "TOK_PLUS_INFINITY", "TOK_PRESENT", "TOK_PrintableString", "TOK_PRIVATE", |
| 962 | "TOK_REAL", "TOK_RELATIVE_OID", "TOK_SEQUENCE", "TOK_SET", "TOK_SIZE", |
| 963 | "TOK_STRING", "TOK_SYNTAX", "TOK_T61String", "TOK_TAGS", |
| 964 | "TOK_TeletexString", "TOK_TRUE", "TOK_TYPE_IDENTIFIER", "TOK_UNIQUE", |
| 965 | "TOK_UNIVERSAL", "TOK_UniversalString", "TOK_UTCTime", "TOK_UTF8String", |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 966 | "TOK_VideotexString", "TOK_VisibleString", "TOK_WITH", |
| 967 | "\"UTF-8 byte order mark\"", "TOK_EXCEPT", "'^'", "TOK_INTERSECTION", |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 968 | "'|'", "TOK_UNION", "\"..\"", "\"...\"", "\"concrete TypeDeclaration\"", |
| 969 | "'{'", "'}'", "'('", "')'", "';'", "','", "':'", "'['", "']'", "'!'", |
| 970 | "'.'", "'<'", "'@'", "$accept", "ParsedGrammar", "ModuleList", |
| 971 | "ModuleDefinition", "@1", "optObjectIdentifier", "ObjectIdentifier", |
| 972 | "ObjectIdentifierBody", "ObjectIdentifierElement", |
| 973 | "optModuleDefinitionFlags", "ModuleDefinitionFlags", |
| 974 | "ModuleDefinitionFlag", "optModuleBody", "ModuleBody", "AssignmentList", |
| 975 | "Assignment", "@2", "optImports", "ImportsDefinition", |
| 976 | "optImportsBundleSet", "ImportsBundleSet", "AssignedIdentifier", |
| 977 | "ImportsBundle", "ImportsList", "ImportsElement", "optExports", |
| 978 | "ExportsDefinition", "ExportsBody", "ExportsElement", "ValueSet", |
| 979 | "ValueSetTypeAssignment", "DefinedType", "DataTypeReference", |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 980 | "ParameterArgumentList", "ParameterArgumentName", "ActualParameterList", |
| 981 | "ActualParameter", "optComponentTypeLists", "ComponentTypeLists", |
| 982 | "ComponentType", "AlternativeTypeLists", "AlternativeType", |
Lev Walkin | 0c68645 | 2017-09-07 22:59:36 -0700 | [diff] [blame] | 983 | "ObjectClass", "optUNIQUE", "FieldSpec", "ClassField", "optWithSyntax", |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 984 | "WithSyntax", "@3", "WithSyntaxList", "WithSyntaxToken", |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 985 | "ExtensionAndException", "Type", "TaggedType", "DefinedUntaggedType", |
| 986 | "UntaggedType", "MaybeIndirectTaggedType", "NSTD_IndirectMarker", |
| 987 | "MaybeIndirectTypeDeclaration", "TypeDeclaration", |
| 988 | "ConcreteTypeDeclaration", "ComplexTypeReference", |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 989 | "ComplexTypeReferenceAmpList", "ComplexTypeReferenceElement", |
| 990 | "PrimitiveFieldReference", "FieldName", "DefinedObjectClass", |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 991 | "ValueAssignment", "Value", "@4", "SimpleValue", "DefinedValue", |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 992 | "RestrictedCharacterStringValue", "Opaque", "OpaqueFirstToken", |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 993 | "BasicTypeId", "BasicTypeId_UniverationCompatible", "BuiltinType", |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 994 | "BasicString", "UnionMark", "IntersectionMark", "optConstraint", |
| 995 | "optManyConstraints", "optSizeOrConstraint", "Constraint", |
| 996 | "ManyConstraints", "ConstraintSpec", "SubtypeConstraint", |
| 997 | "ElementSetSpecs", "ElementSetSpec", "Unions", "Intersections", |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 998 | "IntersectionElements", "Elements", "SubtypeElements", |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 999 | "PermittedAlphabet", "SizeConstraint", "PatternConstraint", "ValueRange", |
| 1000 | "LowerEndValue", "UpperEndValue", "SingleValue", "BitStringValue", |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 1001 | "ContainedSubtype", "InnerTypeConstraints", "SingleTypeConstraint", |
| 1002 | "MultipleTypeConstraints", "FullSpecification", "PartialSpecification", |
| 1003 | "TypeConstraints", "NamedConstraint", "optPresenceConstraint", |
| 1004 | "PresenceConstraint", "GeneralConstraint", "UserDefinedConstraint", "@5", |
| 1005 | "ContentsConstraint", "ConstraintRangeSpec", "TableConstraint", |
| 1006 | "SimpleTableConstraint", "ComponentRelationConstraint", "AtNotationList", |
| 1007 | "AtNotationElement", "ComponentIdList", "optMarker", "Marker", |
| 1008 | "IdentifierList", "IdentifierElement", "NamedNumberList", "NamedNumber", |
| 1009 | "NamedBitList", "NamedBit", "Enumerations", "UniverationList", |
| 1010 | "UniverationElement", "SignedNumber", "RealValue", "optTag", "Tag", |
| 1011 | "TagTypeValue", "TagClass", "TagPlicit", "TypeRefName", "optIdentifier", |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 1012 | "Identifier", "IdentifierAsReference", "IdentifierAsValue", 0 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1013 | }; |
| 1014 | #endif |
| 1015 | |
| 1016 | # ifdef YYPRINT |
| 1017 | /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to |
| 1018 | token YYLEX-NUM. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1019 | static const yytype_uint16 yytoknum[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1020 | { |
| 1021 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
| 1022 | 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, |
| 1023 | 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, |
| 1024 | 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, |
| 1025 | 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, |
| 1026 | 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, |
| 1027 | 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, |
| 1028 | 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, |
| 1029 | 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, |
| 1030 | 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, |
Lev Walkin | be518fa | 2017-09-07 02:05:28 -0700 | [diff] [blame] | 1031 | 355, 356, 357, 358, 359, 360, 94, 361, 124, 362, |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 1032 | 363, 364, 365, 123, 125, 40, 41, 59, 44, 58, |
| 1033 | 91, 93, 33, 46, 60, 64 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1034 | }; |
| 1035 | # endif |
| 1036 | |
| 1037 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
Lev Walkin | be518fa | 2017-09-07 02:05:28 -0700 | [diff] [blame] | 1038 | static const yytype_uint16 yyr1[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1039 | { |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 1040 | 0, 126, 127, 127, 128, 128, 130, 129, 131, 131, |
| 1041 | 132, 132, 133, 133, 134, 134, 134, 135, 135, 136, |
| 1042 | 136, 137, 137, 137, 137, 137, 138, 138, 139, 140, |
| 1043 | 140, 141, 141, 141, 142, 141, 141, 143, 143, 144, |
| 1044 | 144, 145, 145, 146, 146, 147, 147, 148, 149, 149, |
| 1045 | 150, 150, 150, 151, 151, 152, 152, 152, 153, 153, |
| 1046 | 154, 154, 154, 155, 156, 157, 157, 158, 158, 158, |
| 1047 | 158, 159, 159, 160, 160, 160, 160, 160, 161, 161, |
| 1048 | 162, 162, 162, 162, 163, 163, 164, 164, 164, 165, |
| 1049 | 165, 165, 165, 166, 166, 167, 167, 167, 168, 169, |
| 1050 | 169, 170, 170, 171, 171, 171, 171, 171, 171, 171, |
| 1051 | 172, 172, 174, 173, 175, 175, 176, 176, 176, 176, |
| 1052 | 177, 177, 177, 178, 179, 180, 181, 182, 183, 184, |
| 1053 | 185, 185, 186, 186, 186, 186, 186, 186, 186, 186, |
| 1054 | 186, 187, 187, 187, 187, 187, 188, 188, 189, 190, |
| 1055 | 190, 191, 191, 191, 192, 193, 194, 194, 195, 194, |
| 1056 | 196, 196, 196, 196, 196, 196, 196, 197, 197, 198, |
| 1057 | 198, 198, 199, 199, 200, 200, 201, 201, 201, 201, |
| 1058 | 201, 201, 201, 201, 201, 201, 201, 201, 201, 202, |
| 1059 | 202, 202, 203, 203, 203, 203, 203, 203, 204, 204, |
| 1060 | 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, |
| 1061 | 204, 204, 205, 205, 206, 206, 207, 207, 208, 208, |
| 1062 | 209, 209, 209, 210, 211, 211, 212, 212, 213, 214, |
| 1063 | 214, 214, 214, 215, 215, 216, 216, 217, 217, 218, |
| 1064 | 218, 219, 219, 220, 220, 220, 220, 220, 220, 220, |
| 1065 | 221, 222, 223, 223, 224, 225, 225, 226, 226, 227, |
| 1066 | 228, 228, 229, 229, 230, 230, 231, 232, 232, 233, |
| 1067 | 234, 235, 235, 236, 237, 237, 238, 238, 238, 239, |
| 1068 | 239, 239, 241, 240, 242, 243, 243, 243, 243, 244, |
| 1069 | 244, 245, 246, 247, 247, 248, 248, 249, 249, 250, |
| 1070 | 250, 251, 251, 252, 252, 253, 254, 254, 255, 255, |
| 1071 | 256, 256, 257, 257, 258, 259, 259, 260, 260, 260, |
| 1072 | 260, 260, 261, 261, 262, 263, 263, 264, 265, 266, |
| 1073 | 266, 266, 266, 267, 267, 267, 268, 268, 269, 269, |
| 1074 | 270, 271, 272 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1075 | }; |
| 1076 | |
| 1077 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1078 | static const yytype_uint8 yyr2[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1079 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1080 | 0, 2, 2, 1, 1, 2, 0, 9, 0, 1, |
| 1081 | 3, 2, 1, 2, 1, 4, 1, 0, 1, 1, |
| 1082 | 2, 2, 2, 2, 2, 2, 0, 1, 3, 1, |
| 1083 | 2, 1, 1, 1, 0, 3, 1, 0, 1, 3, |
| 1084 | 2, 0, 1, 1, 2, 0, 1, 4, 1, 3, |
| 1085 | 1, 3, 1, 0, 1, 3, 3, 2, 1, 3, |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 1086 | 1, 3, 1, 3, 4, 1, 4, 3, 3, 6, |
| 1087 | 6, 1, 3, 1, 3, 3, 3, 3, 1, 3, |
| 1088 | 1, 1, 1, 1, 0, 1, 1, 3, 5, 3, |
| 1089 | 2, 3, 1, 1, 3, 2, 1, 1, 5, 0, |
| 1090 | 1, 1, 3, 2, 4, 3, 3, 3, 3, 3, |
| 1091 | 0, 1, 0, 6, 1, 2, 1, 1, 1, 3, |
| 1092 | 1, 3, 3, 1, 2, 2, 2, 3, 0, 2, |
| 1093 | 1, 1, 1, 4, 4, 4, 6, 6, 1, 4, |
| 1094 | 3, 1, 1, 3, 3, 3, 1, 3, 1, 1, |
| 1095 | 1, 1, 3, 3, 1, 4, 1, 1, 0, 3, |
| 1096 | 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, |
| 1097 | 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, |
| 1098 | 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, |
| 1099 | 1, 2, 1, 4, 4, 5, 4, 3, 1, 1, |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1100 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 1101 | 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, |
| 1102 | 0, 1, 1, 3, 1, 2, 1, 1, 1, 1, |
| 1103 | 1, 3, 5, 1, 3, 1, 3, 1, 3, 1, |
| 1104 | 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, |
| 1105 | 2, 2, 2, 2, 3, 1, 1, 1, 1, 1, |
| 1106 | 1, 1, 2, 1, 3, 3, 1, 1, 1, 3, |
| 1107 | 5, 1, 3, 3, 0, 1, 1, 1, 1, 1, |
| 1108 | 1, 1, 0, 5, 2, 1, 2, 2, 3, 1, |
| 1109 | 1, 3, 4, 1, 3, 2, 3, 1, 3, 0, |
| 1110 | 1, 1, 2, 1, 3, 1, 1, 3, 4, 4, |
| 1111 | 1, 3, 4, 4, 1, 1, 3, 1, 4, 4, |
| 1112 | 1, 1, 1, 1, 1, 0, 1, 2, 4, 0, |
| 1113 | 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, |
| 1114 | 1, 1, 1 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1115 | }; |
| 1116 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1117 | /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state |
| 1118 | STATE-NUM when YYTABLE doesn't specify something else to do. Zero |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1119 | means the default is an error. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1120 | static const yytype_uint16 yydefact[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1121 | { |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 1122 | 0, 336, 337, 0, 0, 3, 4, 6, 2, 1, |
| 1123 | 5, 8, 0, 0, 9, 340, 16, 11, 0, 12, |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1124 | 14, 17, 10, 13, 0, 0, 0, 0, 0, 0, |
| 1125 | 0, 18, 19, 0, 25, 23, 21, 24, 22, 0, |
| 1126 | 20, 15, 53, 0, 0, 27, 37, 54, 0, 57, |
| 1127 | 0, 58, 60, 62, 7, 41, 0, 38, 56, 55, |
| 1128 | 0, 0, 40, 0, 42, 43, 0, 48, 50, 52, |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 1129 | 198, 0, 199, 200, 201, 202, 203, 211, 204, 205, |
| 1130 | 206, 207, 208, 209, 210, 28, 29, 33, 31, 32, |
| 1131 | 36, 325, 325, 59, 61, 39, 44, 0, 0, 0, |
| 1132 | 34, 30, 325, 0, 329, 0, 123, 0, 326, 333, |
| 1133 | 0, 45, 49, 51, 35, 0, 68, 67, 0, 176, |
| 1134 | 0, 0, 190, 182, 186, 189, 177, 0, 0, 178, |
| 1135 | 181, 185, 0, 71, 0, 188, 187, 73, 331, 332, |
| 1136 | 330, 0, 0, 141, 142, 0, 138, 0, 0, 190, |
| 1137 | 0, 189, 220, 220, 131, 124, 218, 130, 65, 192, |
| 1138 | 132, 335, 334, 327, 0, 46, 47, 0, 191, 184, |
| 1139 | 183, 180, 179, 0, 0, 0, 0, 0, 0, 64, |
| 1140 | 0, 0, 0, 0, 191, 325, 0, 0, 0, 0, |
| 1141 | 325, 0, 0, 221, 222, 325, 0, 126, 224, 219, |
| 1142 | 0, 260, 169, 261, 322, 323, 324, 170, 171, 161, |
| 1143 | 160, 162, 158, 155, 156, 157, 165, 166, 163, 164, |
| 1144 | 0, 341, 342, 167, 325, 325, 0, 101, 325, 72, |
| 1145 | 77, 76, 75, 74, 328, 141, 142, 0, 0, 325, |
| 1146 | 256, 0, 0, 229, 0, 218, 263, 259, 0, 230, |
| 1147 | 233, 235, 237, 239, 241, 245, 246, 248, 249, 0, |
| 1148 | 243, 244, 247, 143, 149, 150, 145, 146, 148, 144, |
| 1149 | 197, 0, 303, 305, 0, 0, 120, 0, 93, 96, |
| 1150 | 97, 128, 325, 321, 0, 314, 315, 320, 317, 140, |
| 1151 | 0, 306, 0, 251, 0, 0, 85, 86, 92, 299, |
| 1152 | 325, 0, 325, 158, 0, 226, 228, 227, 279, 281, |
| 1153 | 280, 289, 290, 338, 0, 338, 225, 160, 83, 0, |
| 1154 | 78, 80, 81, 82, 0, 0, 154, 151, 0, 301, |
| 1155 | 299, 299, 299, 103, 300, 99, 299, 299, 110, 0, |
| 1156 | 70, 69, 0, 250, 262, 252, 253, 0, 0, 0, |
| 1157 | 125, 63, 0, 212, 213, 0, 214, 215, 0, 0, |
| 1158 | 285, 0, 0, 0, 196, 0, 139, 0, 310, 0, |
| 1159 | 0, 133, 325, 0, 218, 95, 194, 0, 0, 193, |
| 1160 | 0, 0, 325, 134, 325, 90, 299, 0, 284, 0, |
| 1161 | 223, 0, 325, 339, 135, 325, 66, 0, 174, 159, |
| 1162 | 172, 175, 168, 302, 108, 0, 107, 109, 100, 299, |
| 1163 | 105, 106, 0, 98, 111, 102, 234, 266, 264, 0, |
| 1164 | 265, 267, 268, 242, 231, 236, 238, 240, 286, 287, |
| 1165 | 258, 254, 257, 147, 304, 195, 0, 0, 121, 122, |
| 1166 | 94, 129, 127, 316, 0, 0, 307, 0, 0, 91, |
| 1167 | 325, 87, 89, 282, 291, 0, 0, 293, 128, 128, |
| 1168 | 79, 173, 152, 153, 104, 0, 0, 0, 271, 216, |
| 1169 | 0, 288, 311, 0, 0, 319, 318, 309, 308, 0, |
| 1170 | 0, 0, 295, 297, 292, 0, 136, 137, 112, 0, |
| 1171 | 269, 0, 274, 217, 232, 312, 313, 88, 283, 296, |
| 1172 | 0, 294, 0, 0, 272, 277, 278, 276, 273, 275, |
| 1173 | 298, 116, 117, 0, 0, 114, 118, 270, 0, 113, |
| 1174 | 115, 119 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1175 | }; |
| 1176 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1177 | /* YYDEFGOTO[NTERM-NUM]. */ |
| 1178 | static const yytype_int16 yydefgoto[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1179 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1180 | -1, 4, 5, 6, 11, 13, 14, 18, 19, 30, |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 1181 | 31, 32, 44, 45, 85, 86, 114, 56, 57, 63, |
| 1182 | 64, 166, 65, 66, 67, 46, 47, 50, 51, 318, |
| 1183 | 87, 245, 88, 132, 133, 319, 320, 295, 296, 297, |
| 1184 | 277, 278, 116, 409, 226, 227, 413, 414, 502, 514, |
| 1185 | 515, 298, 105, 106, 246, 321, 299, 373, 374, 156, |
| 1186 | 157, 158, 266, 267, 516, 331, 332, 89, 247, 324, |
| 1187 | 214, 215, 216, 399, 400, 159, 135, 160, 136, 355, |
| 1188 | 358, 492, 197, 192, 198, 199, 304, 305, 248, 249, |
| 1189 | 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, |
| 1190 | 431, 260, 217, 261, 262, 418, 420, 421, 422, 467, |
| 1191 | 468, 508, 509, 307, 308, 480, 309, 362, 310, 311, |
| 1192 | 312, 456, 457, 482, 333, 334, 271, 272, 290, 291, |
| 1193 | 367, 368, 284, 285, 286, 218, 219, 281, 108, 109, |
| 1194 | 141, 163, 220, 392, 221, 222, 223 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1195 | }; |
| 1196 | |
| 1197 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
| 1198 | STATE-NUM. */ |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 1199 | #define YYPACT_NINF -296 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1200 | static const yytype_int16 yypact[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1201 | { |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 1202 | 51, -296, -296, 217, 41, 217, -296, -296, 217, -296, |
| 1203 | -296, -63, 53, 43, -296, -296, -296, -296, 70, -296, |
| 1204 | -45, 204, -296, -296, 79, 32, 30, 38, 110, 87, |
| 1205 | 200, 204, -296, 95, -296, -296, -296, -296, -296, 198, |
| 1206 | -296, -296, 247, 12, 178, -296, 174, -296, 134, -296, |
| 1207 | 140, -296, 183, -296, -296, 72, 663, -296, -296, -296, |
| 1208 | 213, 173, -296, 187, 213, -296, 50, -296, 211, -296, |
| 1209 | -296, 293, -296, -296, -296, -296, -296, -296, -296, -296, |
| 1210 | -296, -296, -296, -296, -296, 663, -296, -296, -296, -296, |
| 1211 | -296, 19, 219, -296, -296, -296, -296, 217, 213, 227, |
| 1212 | -296, -296, -2, 817, 68, 340, -296, 740, -296, 120, |
| 1213 | 356, -63, -296, -296, -296, 249, -296, -296, 272, -296, |
| 1214 | 274, 285, -296, -296, -296, -296, -296, 307, 278, -296, |
| 1215 | -296, -296, 13, -296, 250, -296, -296, 251, -296, -296, |
| 1216 | -296, 359, 260, 264, 265, 261, 346, 301, 279, 281, |
| 1217 | 315, 294, 113, 135, -296, -296, 280, -296, 295, -296, |
| 1218 | -296, -296, -296, -296, 510, -296, -296, 290, -296, -296, |
| 1219 | -296, -296, -296, 406, 817, 213, 213, 289, 368, -296, |
| 1220 | 217, 309, 14, 378, 299, 29, 108, 318, 403, 280, |
| 1221 | 61, 229, 339, -296, -296, 61, 341, -296, -296, 280, |
| 1222 | 604, -296, -296, -296, -296, -296, -296, -296, -296, -296, |
| 1223 | -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, |
| 1224 | 296, -296, -296, -296, 84, 28, 98, -296, -2, -296, |
| 1225 | -296, -296, -296, -296, -296, 264, 265, 311, 280, 219, |
| 1226 | -296, 104, 300, -296, 388, 280, -296, -296, 304, 302, |
| 1227 | 237, 241, -296, 320, -296, -296, -296, -296, -296, -18, |
| 1228 | -17, -296, -296, -296, -296, -296, 303, -296, -296, -296, |
| 1229 | -296, 138, -296, -296, 403, 403, 305, 167, -296, -296, |
| 1230 | -296, -296, 219, -296, 314, 312, -296, -296, 308, -296, |
| 1231 | 170, -296, 317, -296, 353, 319, 316, -296, -296, -3, |
| 1232 | 219, 402, 219, 217, 324, -296, -296, -296, -296, -296, |
| 1233 | -296, 323, -296, 403, 331, 403, -296, 329, -296, 172, |
| 1234 | -296, -296, -296, -296, 282, 403, -296, -296, 510, -296, |
| 1235 | -3, 10, -3, -296, -296, 351, 10, -3, 345, 290, |
| 1236 | -296, -296, 496, -296, -296, -296, -296, 280, 336, 334, |
| 1237 | -296, -296, 342, -296, -296, 496, -296, -296, 496, 496, |
| 1238 | 328, 344, 262, 330, -296, 403, -296, 181, -296, 343, |
| 1239 | 248, -296, 29, 740, 280, -296, -296, 108, 248, -296, |
| 1240 | 403, 248, 219, -296, 24, -296, -3, 347, -296, 349, |
| 1241 | -296, 348, 219, -296, -296, 219, -296, 604, -296, 448, |
| 1242 | -296, -296, -296, -296, -296, 332, -296, -296, -296, -3, |
| 1243 | -296, -296, 371, -296, -296, -296, -296, -296, -296, 25, |
| 1244 | -296, -296, -296, -296, 352, 241, -296, -296, -296, 350, |
| 1245 | -296, -296, -296, -296, -296, -296, 403, 196, -296, -296, |
| 1246 | -296, -296, -296, -296, 361, 362, -296, 364, 369, -296, |
| 1247 | 42, -296, -296, -296, -296, 22, 188, -296, -296, -296, |
| 1248 | -296, -296, -296, -296, -296, 354, 357, 202, -296, 280, |
| 1249 | 388, -296, -296, 370, 373, -296, -296, -296, -296, 16, |
| 1250 | 282, 403, 367, -296, -296, 348, -296, -296, -296, 403, |
| 1251 | -296, 403, 77, -296, -296, -296, -296, -296, 448, 367, |
| 1252 | 403, -296, 57, 207, -296, -296, -296, -296, -296, -296, |
| 1253 | -296, -296, -296, 57, 36, -296, -296, -296, 39, -296, |
| 1254 | -296, -296 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1255 | }; |
| 1256 | |
| 1257 | /* YYPGOTO[NTERM-NUM]. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1258 | static const yytype_int16 yypgoto[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1259 | { |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 1260 | -296, -296, 461, 326, -296, -296, 376, -296, 447, -296, |
| 1261 | -296, 441, -296, -296, -296, 399, -296, -296, -296, -296, |
| 1262 | -296, -296, 428, -296, 395, -296, -296, -296, 434, 355, |
| 1263 | -296, -106, -296, -296, 321, -296, 99, 322, 48, 115, |
| 1264 | -296, 128, 287, -296, -296, 163, -296, -296, -296, 3, |
| 1265 | -196, -172, -82, -296, -296, 422, -177, -296, -104, 157, |
| 1266 | -296, 358, -296, 168, -164, 310, 313, -296, -140, -296, |
| 1267 | -191, -188, -296, 52, -296, -76, -296, -296, -24, -296, |
| 1268 | -296, -296, -227, 380, -150, -296, -296, -296, 360, -237, |
| 1269 | -296, 179, 182, -258, -296, -296, 205, -296, -296, -296, |
| 1270 | -296, 175, -296, -296, -296, -296, -296, -296, -296, 47, |
| 1271 | 55, -296, -296, -296, -296, -296, -296, -296, -296, -296, |
| 1272 | -296, -296, 54, 60, -220, -296, -296, 177, -296, 164, |
| 1273 | -296, 107, -296, -296, 171, -160, -296, -87, -296, -296, |
| 1274 | -296, -296, 11, 232, -12, -296, -295 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1275 | }; |
| 1276 | |
| 1277 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
| 1278 | positive, shift that token. If negative, reduce the rule which |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1279 | number is the opposite. If zero, do what YYDEFACT says. |
| 1280 | If YYTABLE_NINF, syntax error. */ |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 1281 | #define YYTABLE_NINF -300 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1282 | static const yytype_int16 yytable[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1283 | { |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 1284 | 20, 154, 193, 193, 107, 107, 20, 349, 280, 322, |
| 1285 | 110, 7, 323, 279, 7, 107, 7, 268, 350, 7, |
| 1286 | 117, 497, 102, 15, 213, 15, 287, 134, 450, 1, |
| 1287 | 2, 53, 90, 15, 115, 15, 15, 48, 328, 293, |
| 1288 | 15, 9, 511, 69, 92, 511, 326, 327, 53, 316, |
| 1289 | 12, 328, 69, 15, 52, 264, 265, 512, 264, 265, |
| 1290 | 512, 90, 294, 511, 15, 16, 68, 91, 1, 2, |
| 1291 | 24, 52, 15, 92, 329, 68, 264, 265, 512, 385, |
| 1292 | 294, 15, 16, 15, 416, 21, 69, 329, 343, 1, |
| 1293 | 2, 33, 360, -255, 154, 138, 91, 34, 134, 294, |
| 1294 | 505, 427, 326, 327, 97, 375, 361, -255, 111, 68, |
| 1295 | 404, 406, 407, 345, 137, 15, 410, 411, 104, 15, |
| 1296 | 204, 205, 35, 386, 469, 328, 62, 173, 270, 49, |
| 1297 | 36, 174, 103, 405, 384, 276, 466, 107, 107, 104, |
| 1298 | 276, 107, 330, 335, 104, 481, 341, 442, 104, 104, |
| 1299 | 519, 139, 107, 276, 506, 3, 513, 344, 507, 513, |
| 1300 | 521, 329, 104, 231, 233, 140, 452, 17, 98, 161, |
| 1301 | 273, 37, 276, 282, 288, -84, 292, 513, 300, 38, |
| 1302 | 162, 104, 438, 300, 22, 137, 230, 232, 403, 464, |
| 1303 | 444, 263, 269, 447, 469, 280, 469, 417, -299, 268, |
| 1304 | 279, 189, -299, 39, 104, 449, 322, 15, 473, 323, |
| 1305 | 439, 41, 338, 1, 2, 107, 339, 287, 445, 283, |
| 1306 | 388, 448, 25, 189, 15, 54, 190, 42, 191, 346, |
| 1307 | 1, 2, 26, 494, 1, 2, 55, 201, 202, 203, |
| 1308 | 15, 204, 205, 206, 207, 208, 235, 236, 195, 474, |
| 1309 | 191, 58, 364, 27, 237, 28, 365, 59, 60, 15, |
| 1310 | 204, 205, 366, 369, 29, 1, 2, 154, 301, 302, |
| 1311 | 201, 202, 203, 15, 204, 205, 206, 207, 208, 1, |
| 1312 | 2, 371, 209, 238, 379, 372, 396, 94, 380, 398, |
| 1313 | 397, 154, 239, 15, -26, 435, 61, 43, 240, 436, |
| 1314 | 210, 393, 484, 393, 95, 458, 485, 241, 459, 224, |
| 1315 | 225, 100, 401, 402, 389, 209, 490, 189, 520, 493, |
| 1316 | 491, 517, 520, 211, 99, 491, 1, 2, 264, 265, |
| 1317 | 430, 10, 242, 210, 10, 143, 144, 347, 348, 104, |
| 1318 | 243, 113, 303, 142, 244, 353, 354, 356, 357, 264, |
| 1319 | 265, 462, 463, 273, 486, 487, 211, 194, 194, 164, |
| 1320 | 282, 168, 167, 169, 170, 288, 171, 172, 292, 175, |
| 1321 | 176, 177, 300, 178, 182, 212, 201, 202, 203, 15, |
| 1322 | 204, 205, 206, 207, 208, 235, 236, 180, 181, 183, |
| 1323 | 184, 187, 185, 237, 186, 191, 201, 202, 203, 15, |
| 1324 | 204, 205, 206, 207, 208, 235, 236, 188, 200, 228, |
| 1325 | 234, 274, 275, 237, 15, 313, 342, 315, 351, 325, |
| 1326 | 352, 209, 238, 378, 369, 359, 363, 370, 376, 382, |
| 1327 | 377, 239, 381, 383, 384, 387, 391, 240, 300, 210, |
| 1328 | 390, 209, 238, 483, -177, 394, 241, 408, 412, 419, |
| 1329 | 423, 239, 428, 424, 429, 461, 189, 240, 437, 210, |
| 1330 | 453, 465, 211, 454, 8, 23, 241, 488, 401, 483, |
| 1331 | 470, 242, 40, 455, 471, 489, 189, 475, 476, 243, |
| 1332 | 477, 212, 211, 244, 101, 478, 495, 165, 510, 496, |
| 1333 | 500, 242, 96, 112, 93, 229, 460, 179, 479, 451, |
| 1334 | 440, 212, 415, 244, 201, 202, 203, 15, 204, 205, |
| 1335 | 206, 207, 208, 235, 236, 340, 518, 314, 201, 202, |
| 1336 | 203, 15, 204, 205, 206, 207, 208, 1, 2, 155, |
| 1337 | 441, 433, 498, 196, 425, 336, 503, 432, 337, 501, |
| 1338 | 426, 499, 434, 472, 446, 289, 504, 395, 443, 209, |
| 1339 | 238, 306, 0, 0, 0, 0, 0, 0, 0, 239, |
| 1340 | 0, 0, 0, 209, 0, 240, 0, 210, 0, 0, |
| 1341 | 0, 0, 0, 0, 241, 0, 0, 0, 0, 0, |
| 1342 | 0, 210, 0, 0, 189, 0, 0, 0, 0, 0, |
| 1343 | 211, 0, 0, 0, 0, 0, 0, 0, 0, 242, |
| 1344 | 0, 0, 0, 0, 211, 0, 0, 0, 0, 212, |
| 1345 | 0, 244, 201, 202, 203, 15, 204, 205, 206, 207, |
| 1346 | 208, 235, 236, 212, 0, 0, 145, 0, 0, 0, |
| 1347 | 146, 0, 0, 0, 147, 70, 119, 0, 120, 148, |
| 1348 | 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, |
| 1349 | 0, 0, 149, 0, 0, 0, 123, 209, 0, 124, |
| 1350 | 72, 73, 74, 0, 0, 0, 0, 0, 150, 0, |
| 1351 | 151, 75, 0, 0, 15, 317, 76, 127, 77, 128, |
| 1352 | 1, 2, 0, 0, 0, 0, 78, 0, 129, 130, |
| 1353 | 152, 153, 0, 0, 70, 79, 0, 80, 211, 0, |
| 1354 | 0, 0, 81, 131, 82, 83, 84, 0, 0, 71, |
| 1355 | 0, 0, 0, 0, 0, 0, 0, 178, 0, 72, |
| 1356 | 73, 74, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1357 | 75, 0, 0, 0, 0, 76, 0, 77, 0, 0, |
| 1358 | 0, 0, 0, 0, 0, 78, 0, 0, 0, 0, |
| 1359 | 0, 0, 0, 0, 79, 0, 80, 143, 144, 0, |
| 1360 | 0, 81, 145, 82, 83, 84, 146, 0, 0, 0, |
| 1361 | 147, 70, 119, 0, 120, 148, 0, 0, 0, 0, |
| 1362 | 0, 0, 0, 0, 121, 0, 0, 0, 149, 0, |
| 1363 | 0, 0, 123, 0, 0, 124, 72, 73, 74, 0, |
| 1364 | 0, 0, 0, 0, 150, 0, 151, 75, 0, 0, |
| 1365 | 0, 126, 76, 127, 77, 128, 0, 0, 0, 0, |
| 1366 | 0, 0, 78, 0, 129, 130, 152, 153, 0, 0, |
| 1367 | 0, 79, 0, 80, 1, 2, 0, 0, 81, 131, |
| 1368 | 82, 83, 84, 0, 0, 0, 0, 118, 70, 119, |
| 1369 | 0, 120, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1370 | 0, 121, 0, 0, 0, 122, 0, 0, 0, 123, |
| 1371 | 0, 0, 124, 72, 73, 74, 0, 0, 0, 0, |
| 1372 | 0, 0, 0, 125, 75, 0, 0, 0, 126, 76, |
| 1373 | 127, 77, 128, 0, 0, 0, 0, 0, 0, 78, |
| 1374 | 0, 129, 130, 0, 0, 0, 0, 0, 79, 0, |
| 1375 | 80, 0, 0, 0, 0, 81, 131, 82, 83, 84 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1376 | }; |
| 1377 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1378 | static const yytype_int16 yycheck[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1379 | { |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 1380 | 12, 107, 152, 153, 91, 92, 18, 244, 185, 200, |
| 1381 | 92, 0, 200, 185, 3, 102, 5, 181, 245, 8, |
| 1382 | 102, 5, 3, 11, 164, 11, 186, 103, 4, 17, |
| 1383 | 18, 43, 56, 11, 36, 11, 11, 25, 41, 189, |
| 1384 | 11, 0, 6, 55, 56, 6, 18, 19, 60, 199, |
| 1385 | 113, 41, 64, 11, 43, 19, 20, 21, 19, 20, |
| 1386 | 21, 85, 38, 6, 11, 12, 55, 56, 17, 18, |
| 1387 | 115, 60, 11, 85, 77, 64, 19, 20, 21, 299, |
| 1388 | 38, 11, 12, 11, 342, 42, 98, 77, 238, 17, |
| 1389 | 18, 12, 110, 110, 200, 27, 85, 65, 174, 38, |
| 1390 | 23, 359, 18, 19, 54, 282, 124, 124, 97, 98, |
| 1391 | 330, 331, 332, 9, 103, 11, 336, 337, 120, 11, |
| 1392 | 12, 13, 92, 300, 419, 41, 54, 114, 114, 117, |
| 1393 | 92, 118, 113, 123, 118, 111, 111, 224, 225, 120, |
| 1394 | 111, 228, 224, 225, 120, 123, 228, 374, 120, 120, |
| 1395 | 114, 83, 239, 111, 77, 104, 120, 239, 81, 120, |
| 1396 | 121, 77, 120, 175, 176, 97, 386, 114, 118, 49, |
| 1397 | 182, 61, 111, 185, 186, 114, 188, 120, 190, 92, |
| 1398 | 60, 120, 370, 195, 114, 174, 175, 176, 328, 409, |
| 1399 | 378, 180, 181, 381, 489, 372, 491, 347, 114, 363, |
| 1400 | 372, 88, 118, 3, 120, 382, 397, 11, 12, 397, |
| 1401 | 370, 116, 114, 17, 18, 302, 118, 377, 378, 111, |
| 1402 | 302, 381, 18, 88, 11, 47, 113, 29, 115, 241, |
| 1403 | 17, 18, 28, 470, 17, 18, 62, 8, 9, 10, |
| 1404 | 11, 12, 13, 14, 15, 16, 17, 18, 113, 437, |
| 1405 | 115, 117, 114, 49, 25, 51, 118, 117, 118, 11, |
| 1406 | 12, 13, 274, 275, 60, 17, 18, 373, 39, 40, |
| 1407 | 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, |
| 1408 | 18, 114, 53, 54, 114, 118, 114, 114, 118, 7, |
| 1409 | 118, 397, 63, 11, 47, 114, 113, 50, 69, 118, |
| 1410 | 71, 313, 114, 315, 117, 392, 118, 78, 395, 19, |
| 1411 | 20, 18, 324, 325, 303, 53, 114, 88, 514, 469, |
| 1412 | 118, 114, 518, 94, 113, 118, 17, 18, 19, 20, |
| 1413 | 68, 5, 103, 71, 8, 17, 18, 37, 38, 120, |
| 1414 | 111, 114, 113, 3, 115, 108, 109, 106, 107, 19, |
| 1415 | 20, 19, 20, 365, 458, 459, 94, 152, 153, 3, |
| 1416 | 372, 89, 113, 89, 79, 377, 59, 89, 380, 119, |
| 1417 | 119, 12, 384, 113, 113, 113, 8, 9, 10, 11, |
| 1418 | 12, 13, 14, 15, 16, 17, 18, 123, 123, 43, |
| 1419 | 89, 76, 113, 25, 113, 115, 8, 9, 10, 11, |
| 1420 | 12, 13, 14, 15, 16, 17, 18, 113, 113, 3, |
| 1421 | 121, 33, 113, 25, 11, 76, 105, 76, 114, 123, |
| 1422 | 118, 53, 54, 115, 436, 105, 123, 122, 114, 76, |
| 1423 | 118, 63, 115, 114, 118, 33, 113, 69, 450, 71, |
| 1424 | 116, 53, 54, 455, 115, 114, 78, 96, 103, 113, |
| 1425 | 116, 63, 124, 111, 110, 7, 88, 69, 115, 71, |
| 1426 | 113, 90, 94, 114, 3, 18, 78, 113, 480, 481, |
| 1427 | 118, 103, 31, 125, 124, 118, 88, 116, 116, 111, |
| 1428 | 116, 113, 94, 115, 85, 116, 116, 111, 500, 116, |
| 1429 | 123, 103, 64, 98, 60, 174, 397, 142, 450, 384, |
| 1430 | 372, 113, 339, 115, 8, 9, 10, 11, 12, 13, |
| 1431 | 14, 15, 16, 17, 18, 228, 513, 195, 8, 9, |
| 1432 | 10, 11, 12, 13, 14, 15, 16, 17, 18, 107, |
| 1433 | 373, 363, 480, 153, 355, 225, 489, 362, 225, 485, |
| 1434 | 358, 481, 365, 436, 380, 187, 491, 315, 377, 53, |
| 1435 | 54, 191, -1, -1, -1, -1, -1, -1, -1, 63, |
| 1436 | -1, -1, -1, 53, -1, 69, -1, 71, -1, -1, |
| 1437 | -1, -1, -1, -1, 78, -1, -1, -1, -1, -1, |
| 1438 | -1, 71, -1, -1, 88, -1, -1, -1, -1, -1, |
| 1439 | 94, -1, -1, -1, -1, -1, -1, -1, -1, 103, |
| 1440 | -1, -1, -1, -1, 94, -1, -1, -1, -1, 113, |
| 1441 | -1, 115, 8, 9, 10, 11, 12, 13, 14, 15, |
| 1442 | 16, 17, 18, 113, -1, -1, 22, -1, -1, -1, |
| 1443 | 26, -1, -1, -1, 30, 31, 32, -1, 34, 35, |
| 1444 | -1, -1, -1, -1, -1, -1, -1, -1, 44, -1, |
| 1445 | -1, -1, 48, -1, -1, -1, 52, 53, -1, 55, |
| 1446 | 56, 57, 58, -1, -1, -1, -1, -1, 64, -1, |
| 1447 | 66, 67, -1, -1, 11, 71, 72, 73, 74, 75, |
| 1448 | 17, 18, -1, -1, -1, -1, 82, -1, 84, 85, |
| 1449 | 86, 87, -1, -1, 31, 91, -1, 93, 94, -1, |
| 1450 | -1, -1, 98, 99, 100, 101, 102, -1, -1, 46, |
| 1451 | -1, -1, -1, -1, -1, -1, -1, 113, -1, 56, |
| 1452 | 57, 58, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1453 | 67, -1, -1, -1, -1, 72, -1, 74, -1, -1, |
| 1454 | -1, -1, -1, -1, -1, 82, -1, -1, -1, -1, |
| 1455 | -1, -1, -1, -1, 91, -1, 93, 17, 18, -1, |
| 1456 | -1, 98, 22, 100, 101, 102, 26, -1, -1, -1, |
| 1457 | 30, 31, 32, -1, 34, 35, -1, -1, -1, -1, |
| 1458 | -1, -1, -1, -1, 44, -1, -1, -1, 48, -1, |
| 1459 | -1, -1, 52, -1, -1, 55, 56, 57, 58, -1, |
| 1460 | -1, -1, -1, -1, 64, -1, 66, 67, -1, -1, |
| 1461 | -1, 71, 72, 73, 74, 75, -1, -1, -1, -1, |
| 1462 | -1, -1, 82, -1, 84, 85, 86, 87, -1, -1, |
| 1463 | -1, 91, -1, 93, 17, 18, -1, -1, 98, 99, |
| 1464 | 100, 101, 102, -1, -1, -1, -1, 30, 31, 32, |
| 1465 | -1, 34, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1466 | -1, 44, -1, -1, -1, 48, -1, -1, -1, 52, |
| 1467 | -1, -1, 55, 56, 57, 58, -1, -1, -1, -1, |
| 1468 | -1, -1, -1, 66, 67, -1, -1, -1, 71, 72, |
| 1469 | 73, 74, 75, -1, -1, -1, -1, -1, -1, 82, |
| 1470 | -1, 84, 85, -1, -1, -1, -1, -1, 91, -1, |
| 1471 | 93, -1, -1, -1, -1, 98, 99, 100, 101, 102 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1472 | }; |
| 1473 | |
| 1474 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
| 1475 | symbol of state STATE-NUM. */ |
Lev Walkin | be518fa | 2017-09-07 02:05:28 -0700 | [diff] [blame] | 1476 | static const yytype_uint16 yystos[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1477 | { |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 1478 | 0, 17, 18, 104, 127, 128, 129, 268, 128, 0, |
| 1479 | 129, 130, 113, 131, 132, 11, 12, 114, 133, 134, |
| 1480 | 270, 42, 114, 134, 115, 18, 28, 49, 51, 60, |
| 1481 | 135, 136, 137, 12, 65, 92, 92, 61, 92, 3, |
| 1482 | 137, 116, 29, 50, 138, 139, 151, 152, 25, 117, |
| 1483 | 153, 154, 268, 270, 47, 62, 143, 144, 117, 117, |
| 1484 | 118, 113, 54, 145, 146, 148, 149, 150, 268, 270, |
Lev Walkin | be518fa | 2017-09-07 02:05:28 -0700 | [diff] [blame] | 1485 | 31, 46, 56, 57, 58, 67, 72, 74, 82, 91, |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 1486 | 93, 98, 100, 101, 102, 140, 141, 156, 158, 193, |
| 1487 | 204, 268, 270, 154, 114, 117, 148, 54, 118, 113, |
| 1488 | 18, 141, 3, 113, 120, 178, 179, 263, 264, 265, |
| 1489 | 178, 268, 150, 114, 142, 36, 168, 178, 30, 32, |
| 1490 | 34, 44, 48, 52, 55, 66, 71, 73, 75, 84, |
| 1491 | 85, 99, 159, 160, 201, 202, 204, 268, 27, 83, |
| 1492 | 97, 266, 3, 17, 18, 22, 26, 30, 35, 48, |
| 1493 | 64, 66, 86, 87, 157, 181, 185, 186, 187, 201, |
| 1494 | 203, 49, 60, 267, 3, 132, 147, 113, 89, 89, |
| 1495 | 79, 59, 89, 114, 118, 119, 119, 12, 113, 155, |
| 1496 | 123, 123, 113, 43, 89, 113, 113, 76, 113, 88, |
| 1497 | 113, 115, 209, 210, 222, 113, 209, 208, 210, 211, |
| 1498 | 113, 8, 9, 10, 12, 13, 14, 15, 16, 53, |
| 1499 | 71, 94, 113, 194, 196, 197, 198, 228, 261, 262, |
| 1500 | 268, 270, 271, 272, 19, 20, 170, 171, 3, 160, |
| 1501 | 268, 270, 268, 270, 121, 17, 18, 25, 54, 63, |
| 1502 | 69, 78, 103, 111, 115, 157, 180, 194, 214, 215, |
| 1503 | 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, |
| 1504 | 227, 229, 230, 268, 19, 20, 188, 189, 190, 268, |
| 1505 | 114, 252, 253, 270, 33, 113, 111, 166, 167, 177, |
| 1506 | 182, 263, 270, 111, 258, 259, 260, 261, 270, 187, |
| 1507 | 254, 255, 270, 210, 38, 163, 164, 165, 177, 182, |
| 1508 | 270, 39, 40, 113, 212, 213, 214, 239, 240, 242, |
| 1509 | 244, 245, 246, 76, 163, 76, 210, 71, 155, 161, |
| 1510 | 162, 181, 196, 197, 195, 123, 18, 19, 41, 77, |
| 1511 | 178, 191, 192, 250, 251, 178, 191, 192, 114, 118, |
| 1512 | 168, 178, 105, 210, 178, 9, 270, 37, 38, 215, |
| 1513 | 208, 114, 118, 108, 109, 205, 106, 107, 206, 105, |
| 1514 | 110, 124, 243, 123, 114, 118, 270, 256, 257, 270, |
| 1515 | 122, 114, 118, 183, 184, 182, 114, 118, 115, 114, |
| 1516 | 118, 115, 76, 114, 118, 250, 182, 33, 178, 268, |
| 1517 | 116, 113, 269, 270, 114, 269, 114, 118, 7, 199, |
| 1518 | 200, 270, 270, 194, 250, 123, 250, 250, 96, 169, |
| 1519 | 250, 250, 103, 172, 173, 171, 219, 210, 231, 113, |
| 1520 | 232, 233, 234, 116, 111, 217, 218, 219, 124, 110, |
| 1521 | 68, 226, 227, 189, 253, 114, 118, 115, 197, 261, |
| 1522 | 167, 185, 208, 260, 197, 261, 255, 197, 261, 182, |
| 1523 | 4, 165, 250, 113, 114, 125, 247, 248, 263, 263, |
| 1524 | 162, 7, 19, 20, 250, 90, 111, 235, 236, 272, |
| 1525 | 118, 124, 257, 12, 197, 116, 116, 116, 116, 164, |
| 1526 | 241, 123, 249, 270, 114, 118, 184, 184, 113, 118, |
| 1527 | 114, 118, 207, 210, 215, 116, 116, 5, 199, 249, |
| 1528 | 123, 248, 174, 235, 236, 23, 77, 81, 237, 238, |
| 1529 | 270, 6, 21, 120, 175, 176, 190, 114, 175, 114, |
| 1530 | 176, 121 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1531 | }; |
| 1532 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1533 | #define yyerrok (yyerrstatus = 0) |
| 1534 | #define yyclearin (yychar = YYEMPTY) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1535 | #define YYEMPTY (-2) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1536 | #define YYEOF 0 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1537 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1538 | #define YYACCEPT goto yyacceptlab |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1539 | #define YYABORT goto yyabortlab |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1540 | #define YYERROR goto yyerrorlab |
| 1541 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1542 | |
| 1543 | /* Like YYERROR except do call yyerror. This remains here temporarily |
| 1544 | to ease the transition to the new meaning of YYERROR, for GCC. |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1545 | Once GCC version 2 has supplanted version 1, this can go. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1546 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1547 | #define YYFAIL goto yyerrlab |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1548 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1549 | #define YYRECOVERING() (!!yyerrstatus) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1550 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1551 | #define YYBACKUP(Token, Value) \ |
| 1552 | do \ |
| 1553 | if (yychar == YYEMPTY && yylen == 1) \ |
| 1554 | { \ |
| 1555 | yychar = (Token); \ |
| 1556 | yylval = (Value); \ |
| 1557 | yytoken = YYTRANSLATE (yychar); \ |
| 1558 | YYPOPSTACK (1); \ |
| 1559 | goto yybackup; \ |
| 1560 | } \ |
| 1561 | else \ |
| 1562 | { \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1563 | yyerror (YY_("syntax error: cannot back up")); \ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1564 | YYERROR; \ |
| 1565 | } \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1566 | while (YYID (0)) |
| 1567 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1568 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1569 | #define YYTERROR 1 |
| 1570 | #define YYERRCODE 256 |
| 1571 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1572 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1573 | /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. |
| 1574 | If N is 0, then set CURRENT to the empty location which ends |
| 1575 | the previous symbol: RHS[0] (always defined). */ |
| 1576 | |
| 1577 | #define YYRHSLOC(Rhs, K) ((Rhs)[K]) |
| 1578 | #ifndef YYLLOC_DEFAULT |
| 1579 | # define YYLLOC_DEFAULT(Current, Rhs, N) \ |
| 1580 | do \ |
| 1581 | if (YYID (N)) \ |
| 1582 | { \ |
| 1583 | (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ |
| 1584 | (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ |
| 1585 | (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ |
| 1586 | (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ |
| 1587 | } \ |
| 1588 | else \ |
| 1589 | { \ |
| 1590 | (Current).first_line = (Current).last_line = \ |
| 1591 | YYRHSLOC (Rhs, 0).last_line; \ |
| 1592 | (Current).first_column = (Current).last_column = \ |
| 1593 | YYRHSLOC (Rhs, 0).last_column; \ |
| 1594 | } \ |
| 1595 | while (YYID (0)) |
| 1596 | #endif |
| 1597 | |
| 1598 | |
| 1599 | /* YY_LOCATION_PRINT -- Print the location on the stream. |
| 1600 | This macro was not mandated originally: define only if we know |
| 1601 | we won't break user code: when these are the locations we know. */ |
| 1602 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1603 | #ifndef YY_LOCATION_PRINT |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1604 | # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL |
| 1605 | # define YY_LOCATION_PRINT(File, Loc) \ |
| 1606 | fprintf (File, "%d.%d-%d.%d", \ |
| 1607 | (Loc).first_line, (Loc).first_column, \ |
| 1608 | (Loc).last_line, (Loc).last_column) |
| 1609 | # else |
| 1610 | # define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
| 1611 | # endif |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1612 | #endif |
| 1613 | |
| 1614 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1615 | /* YYLEX -- calling `yylex' with the right arguments. */ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1616 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1617 | #ifdef YYLEX_PARAM |
| 1618 | # define YYLEX yylex (YYLEX_PARAM) |
| 1619 | #else |
| 1620 | # define YYLEX yylex () |
| 1621 | #endif |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 1622 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1623 | /* Enable debugging if requested. */ |
| 1624 | #if YYDEBUG |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 1625 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1626 | # ifndef YYFPRINTF |
| 1627 | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
| 1628 | # define YYFPRINTF fprintf |
| 1629 | # endif |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 1630 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1631 | # define YYDPRINTF(Args) \ |
| 1632 | do { \ |
| 1633 | if (yydebug) \ |
| 1634 | YYFPRINTF Args; \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1635 | } while (YYID (0)) |
| 1636 | |
| 1637 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
| 1638 | do { \ |
| 1639 | if (yydebug) \ |
| 1640 | { \ |
| 1641 | YYFPRINTF (stderr, "%s ", Title); \ |
| 1642 | yy_symbol_print (stderr, \ |
| 1643 | Type, Value); \ |
| 1644 | YYFPRINTF (stderr, "\n"); \ |
| 1645 | } \ |
| 1646 | } while (YYID (0)) |
| 1647 | |
| 1648 | |
| 1649 | /*--------------------------------. |
| 1650 | | Print this symbol on YYOUTPUT. | |
| 1651 | `--------------------------------*/ |
| 1652 | |
| 1653 | /*ARGSUSED*/ |
| 1654 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1655 | || defined __cplusplus || defined _MSC_VER) |
| 1656 | static void |
| 1657 | yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
| 1658 | #else |
| 1659 | static void |
| 1660 | yy_symbol_value_print (yyoutput, yytype, yyvaluep) |
| 1661 | FILE *yyoutput; |
| 1662 | int yytype; |
| 1663 | YYSTYPE const * const yyvaluep; |
| 1664 | #endif |
| 1665 | { |
| 1666 | if (!yyvaluep) |
| 1667 | return; |
| 1668 | # ifdef YYPRINT |
| 1669 | if (yytype < YYNTOKENS) |
| 1670 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); |
| 1671 | # else |
| 1672 | YYUSE (yyoutput); |
| 1673 | # endif |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1674 | switch (yytype) |
| 1675 | { |
| 1676 | default: |
| 1677 | break; |
| 1678 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1679 | } |
| 1680 | |
| 1681 | |
| 1682 | /*--------------------------------. |
| 1683 | | Print this symbol on YYOUTPUT. | |
| 1684 | `--------------------------------*/ |
| 1685 | |
| 1686 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1687 | || defined __cplusplus || defined _MSC_VER) |
| 1688 | static void |
| 1689 | yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
| 1690 | #else |
| 1691 | static void |
| 1692 | yy_symbol_print (yyoutput, yytype, yyvaluep) |
| 1693 | FILE *yyoutput; |
| 1694 | int yytype; |
| 1695 | YYSTYPE const * const yyvaluep; |
| 1696 | #endif |
| 1697 | { |
| 1698 | if (yytype < YYNTOKENS) |
| 1699 | YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); |
| 1700 | else |
| 1701 | YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); |
| 1702 | |
| 1703 | yy_symbol_value_print (yyoutput, yytype, yyvaluep); |
| 1704 | YYFPRINTF (yyoutput, ")"); |
| 1705 | } |
| 1706 | |
| 1707 | /*------------------------------------------------------------------. |
| 1708 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | |
| 1709 | | TOP (included). | |
| 1710 | `------------------------------------------------------------------*/ |
| 1711 | |
| 1712 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1713 | || defined __cplusplus || defined _MSC_VER) |
| 1714 | static void |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1715 | yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1716 | #else |
| 1717 | static void |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1718 | yy_stack_print (bottom, top) |
| 1719 | yytype_int16 *bottom; |
| 1720 | yytype_int16 *top; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1721 | #endif |
| 1722 | { |
| 1723 | YYFPRINTF (stderr, "Stack now"); |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1724 | for (; bottom <= top; ++bottom) |
| 1725 | YYFPRINTF (stderr, " %d", *bottom); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1726 | YYFPRINTF (stderr, "\n"); |
| 1727 | } |
| 1728 | |
| 1729 | # define YY_STACK_PRINT(Bottom, Top) \ |
| 1730 | do { \ |
| 1731 | if (yydebug) \ |
| 1732 | yy_stack_print ((Bottom), (Top)); \ |
| 1733 | } while (YYID (0)) |
| 1734 | |
| 1735 | |
| 1736 | /*------------------------------------------------. |
| 1737 | | Report that the YYRULE is going to be reduced. | |
| 1738 | `------------------------------------------------*/ |
| 1739 | |
| 1740 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1741 | || defined __cplusplus || defined _MSC_VER) |
| 1742 | static void |
| 1743 | yy_reduce_print (YYSTYPE *yyvsp, int yyrule) |
| 1744 | #else |
| 1745 | static void |
| 1746 | yy_reduce_print (yyvsp, yyrule) |
| 1747 | YYSTYPE *yyvsp; |
| 1748 | int yyrule; |
| 1749 | #endif |
| 1750 | { |
| 1751 | int yynrhs = yyr2[yyrule]; |
| 1752 | int yyi; |
| 1753 | unsigned long int yylno = yyrline[yyrule]; |
| 1754 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", |
| 1755 | yyrule - 1, yylno); |
| 1756 | /* The symbols being reduced. */ |
| 1757 | for (yyi = 0; yyi < yynrhs; yyi++) |
| 1758 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1759 | fprintf (stderr, " $%d = ", yyi + 1); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1760 | yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], |
| 1761 | &(yyvsp[(yyi + 1) - (yynrhs)]) |
| 1762 | ); |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1763 | fprintf (stderr, "\n"); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1764 | } |
| 1765 | } |
| 1766 | |
| 1767 | # define YY_REDUCE_PRINT(Rule) \ |
| 1768 | do { \ |
| 1769 | if (yydebug) \ |
| 1770 | yy_reduce_print (yyvsp, Rule); \ |
| 1771 | } while (YYID (0)) |
| 1772 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1773 | /* Nonzero means print parse trace. It is left uninitialized so that |
| 1774 | multiple parsers can coexist. */ |
| 1775 | int yydebug; |
| 1776 | #else /* !YYDEBUG */ |
| 1777 | # define YYDPRINTF(Args) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1778 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
| 1779 | # define YY_STACK_PRINT(Bottom, Top) |
| 1780 | # define YY_REDUCE_PRINT(Rule) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1781 | #endif /* !YYDEBUG */ |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 1782 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1783 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1784 | /* YYINITDEPTH -- initial size of the parser's stacks. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1785 | #ifndef YYINITDEPTH |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1786 | # define YYINITDEPTH 200 |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1787 | #endif |
| 1788 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1789 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
| 1790 | if the built-in stack extension method is used). |
| 1791 | |
| 1792 | Do not make this value too large; the results are undefined if |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1793 | YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1794 | evaluated with infinite-precision integer arithmetic. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1795 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1796 | #ifndef YYMAXDEPTH |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1797 | # define YYMAXDEPTH 10000 |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1798 | #endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1799 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1800 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1801 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1802 | #if YYERROR_VERBOSE |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1803 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1804 | # ifndef yystrlen |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1805 | # if defined __GLIBC__ && defined _STRING_H |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1806 | # define yystrlen strlen |
| 1807 | # else |
| 1808 | /* Return the length of YYSTR. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1809 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1810 | || defined __cplusplus || defined _MSC_VER) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1811 | static YYSIZE_T |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1812 | yystrlen (const char *yystr) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1813 | #else |
| 1814 | static YYSIZE_T |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1815 | yystrlen (yystr) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1816 | const char *yystr; |
| 1817 | #endif |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 1818 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1819 | YYSIZE_T yylen; |
| 1820 | for (yylen = 0; yystr[yylen]; yylen++) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1821 | continue; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1822 | return yylen; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1823 | } |
| 1824 | # endif |
| 1825 | # endif |
| 1826 | |
| 1827 | # ifndef yystpcpy |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1828 | # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1829 | # define yystpcpy stpcpy |
| 1830 | # else |
| 1831 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
| 1832 | YYDEST. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1833 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1834 | || defined __cplusplus || defined _MSC_VER) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1835 | static char * |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1836 | yystpcpy (char *yydest, const char *yysrc) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1837 | #else |
| 1838 | static char * |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1839 | yystpcpy (yydest, yysrc) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1840 | char *yydest; |
| 1841 | const char *yysrc; |
| 1842 | #endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1843 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1844 | char *yyd = yydest; |
| 1845 | const char *yys = yysrc; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1846 | |
| 1847 | while ((*yyd++ = *yys++) != '\0') |
| 1848 | continue; |
| 1849 | |
| 1850 | return yyd - 1; |
| 1851 | } |
| 1852 | # endif |
| 1853 | # endif |
| 1854 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1855 | # ifndef yytnamerr |
| 1856 | /* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
| 1857 | quotes and backslashes, so that it's suitable for yyerror. The |
| 1858 | heuristic is that double-quoting is unnecessary unless the string |
| 1859 | contains an apostrophe, a comma, or backslash (other than |
| 1860 | backslash-backslash). YYSTR is taken from yytname. If YYRES is |
| 1861 | null, do not copy; instead, return the length of what the result |
| 1862 | would have been. */ |
| 1863 | static YYSIZE_T |
| 1864 | yytnamerr (char *yyres, const char *yystr) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1865 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1866 | if (*yystr == '"') |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1867 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1868 | YYSIZE_T yyn = 0; |
| 1869 | char const *yyp = yystr; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1870 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1871 | for (;;) |
| 1872 | switch (*++yyp) |
| 1873 | { |
| 1874 | case '\'': |
| 1875 | case ',': |
| 1876 | goto do_not_strip_quotes; |
| 1877 | |
| 1878 | case '\\': |
| 1879 | if (*++yyp != '\\') |
| 1880 | goto do_not_strip_quotes; |
| 1881 | /* Fall through. */ |
| 1882 | default: |
| 1883 | if (yyres) |
| 1884 | yyres[yyn] = *yyp; |
| 1885 | yyn++; |
| 1886 | break; |
| 1887 | |
| 1888 | case '"': |
| 1889 | if (yyres) |
| 1890 | yyres[yyn] = '\0'; |
| 1891 | return yyn; |
| 1892 | } |
| 1893 | do_not_strip_quotes: ; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1894 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1895 | |
| 1896 | if (! yyres) |
| 1897 | return yystrlen (yystr); |
| 1898 | |
| 1899 | return yystpcpy (yyres, yystr) - yyres; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1900 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1901 | # endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1902 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1903 | /* Copy into YYRESULT an error message about the unexpected token |
| 1904 | YYCHAR while in state YYSTATE. Return the number of bytes copied, |
| 1905 | including the terminating null byte. If YYRESULT is null, do not |
| 1906 | copy anything; just return the number of bytes that would be |
| 1907 | copied. As a special case, return 0 if an ordinary "syntax error" |
| 1908 | message will do. Return YYSIZE_MAXIMUM if overflow occurs during |
| 1909 | size calculation. */ |
| 1910 | static YYSIZE_T |
| 1911 | yysyntax_error (char *yyresult, int yystate, int yychar) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1912 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1913 | int yyn = yypact[yystate]; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1914 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1915 | if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) |
| 1916 | return 0; |
| 1917 | else |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1918 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1919 | int yytype = YYTRANSLATE (yychar); |
| 1920 | YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); |
| 1921 | YYSIZE_T yysize = yysize0; |
| 1922 | YYSIZE_T yysize1; |
| 1923 | int yysize_overflow = 0; |
| 1924 | enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
| 1925 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
| 1926 | int yyx; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1927 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 1928 | # if 0 |
| 1929 | /* This is so xgettext sees the translatable formats that are |
| 1930 | constructed on the fly. */ |
| 1931 | YY_("syntax error, unexpected %s"); |
| 1932 | YY_("syntax error, unexpected %s, expecting %s"); |
| 1933 | YY_("syntax error, unexpected %s, expecting %s or %s"); |
| 1934 | YY_("syntax error, unexpected %s, expecting %s or %s or %s"); |
| 1935 | YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); |
| 1936 | # endif |
| 1937 | char *yyfmt; |
| 1938 | char const *yyf; |
| 1939 | static char const yyunexpected[] = "syntax error, unexpected %s"; |
| 1940 | static char const yyexpecting[] = ", expecting %s"; |
| 1941 | static char const yyor[] = " or %s"; |
| 1942 | char yyformat[sizeof yyunexpected |
| 1943 | + sizeof yyexpecting - 1 |
| 1944 | + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) |
| 1945 | * (sizeof yyor - 1))]; |
| 1946 | char const *yyprefix = yyexpecting; |
| 1947 | |
| 1948 | /* Start YYX at -YYN if negative to avoid negative indexes in |
| 1949 | YYCHECK. */ |
| 1950 | int yyxbegin = yyn < 0 ? -yyn : 0; |
| 1951 | |
| 1952 | /* Stay within bounds of both yycheck and yytname. */ |
| 1953 | int yychecklim = YYLAST - yyn + 1; |
| 1954 | int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
| 1955 | int yycount = 1; |
| 1956 | |
| 1957 | yyarg[0] = yytname[yytype]; |
| 1958 | yyfmt = yystpcpy (yyformat, yyunexpected); |
| 1959 | |
| 1960 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
| 1961 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) |
| 1962 | { |
| 1963 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
| 1964 | { |
| 1965 | yycount = 1; |
| 1966 | yysize = yysize0; |
| 1967 | yyformat[sizeof yyunexpected - 1] = '\0'; |
| 1968 | break; |
| 1969 | } |
| 1970 | yyarg[yycount++] = yytname[yyx]; |
| 1971 | yysize1 = yysize + yytnamerr (0, yytname[yyx]); |
| 1972 | yysize_overflow |= (yysize1 < yysize); |
| 1973 | yysize = yysize1; |
| 1974 | yyfmt = yystpcpy (yyfmt, yyprefix); |
| 1975 | yyprefix = yyor; |
| 1976 | } |
| 1977 | |
| 1978 | yyf = YY_(yyformat); |
| 1979 | yysize1 = yysize + yystrlen (yyf); |
| 1980 | yysize_overflow |= (yysize1 < yysize); |
| 1981 | yysize = yysize1; |
| 1982 | |
| 1983 | if (yysize_overflow) |
| 1984 | return YYSIZE_MAXIMUM; |
| 1985 | |
| 1986 | if (yyresult) |
| 1987 | { |
| 1988 | /* Avoid sprintf, as that infringes on the user's name space. |
| 1989 | Don't have undefined behavior even if the translation |
| 1990 | produced a string with the wrong number of "%s"s. */ |
| 1991 | char *yyp = yyresult; |
| 1992 | int yyi = 0; |
| 1993 | while ((*yyp = *yyf) != '\0') |
| 1994 | { |
| 1995 | if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) |
| 1996 | { |
| 1997 | yyp += yytnamerr (yyp, yyarg[yyi++]); |
| 1998 | yyf += 2; |
| 1999 | } |
| 2000 | else |
| 2001 | { |
| 2002 | yyp++; |
| 2003 | yyf++; |
| 2004 | } |
| 2005 | } |
| 2006 | } |
| 2007 | return yysize; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2008 | } |
| 2009 | } |
| 2010 | #endif /* YYERROR_VERBOSE */ |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2011 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2012 | |
| 2013 | /*-----------------------------------------------. |
| 2014 | | Release the memory associated to this symbol. | |
| 2015 | `-----------------------------------------------*/ |
| 2016 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2017 | /*ARGSUSED*/ |
| 2018 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 2019 | || defined __cplusplus || defined _MSC_VER) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2020 | static void |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2021 | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2022 | #else |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2023 | static void |
| 2024 | yydestruct (yymsg, yytype, yyvaluep) |
| 2025 | const char *yymsg; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2026 | int yytype; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2027 | YYSTYPE *yyvaluep; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2028 | #endif |
| 2029 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2030 | YYUSE (yyvaluep); |
| 2031 | |
| 2032 | if (!yymsg) |
| 2033 | yymsg = "Deleting"; |
| 2034 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2035 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2036 | switch (yytype) |
| 2037 | { |
| 2038 | |
| 2039 | default: |
| 2040 | break; |
| 2041 | } |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 2042 | } |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2043 | |
| 2044 | |
| 2045 | /* Prevent warnings from -Wmissing-prototypes. */ |
| 2046 | |
| 2047 | #ifdef YYPARSE_PARAM |
| 2048 | #if defined __STDC__ || defined __cplusplus |
| 2049 | int yyparse (void *YYPARSE_PARAM); |
| 2050 | #else |
| 2051 | int yyparse (); |
| 2052 | #endif |
| 2053 | #else /* ! YYPARSE_PARAM */ |
| 2054 | #if defined __STDC__ || defined __cplusplus |
| 2055 | int yyparse (void); |
| 2056 | #else |
| 2057 | int yyparse (); |
| 2058 | #endif |
| 2059 | #endif /* ! YYPARSE_PARAM */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2060 | |
| 2061 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2062 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2063 | /* The look-ahead symbol. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2064 | int yychar; |
| 2065 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2066 | /* The semantic value of the look-ahead symbol. */ |
| 2067 | YYSTYPE yylval; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2068 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2069 | /* Number of syntax errors so far. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2070 | int yynerrs; |
| 2071 | |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 2072 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2073 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2074 | /*----------. |
| 2075 | | yyparse. | |
| 2076 | `----------*/ |
| 2077 | |
| 2078 | #ifdef YYPARSE_PARAM |
| 2079 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 2080 | || defined __cplusplus || defined _MSC_VER) |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 2081 | int |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2082 | yyparse (void *YYPARSE_PARAM) |
| 2083 | #else |
| 2084 | int |
| 2085 | yyparse (YYPARSE_PARAM) |
| 2086 | void *YYPARSE_PARAM; |
| 2087 | #endif |
| 2088 | #else /* ! YYPARSE_PARAM */ |
| 2089 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 2090 | || defined __cplusplus || defined _MSC_VER) |
| 2091 | int |
| 2092 | yyparse (void) |
| 2093 | #else |
| 2094 | int |
| 2095 | yyparse () |
| 2096 | |
| 2097 | #endif |
| 2098 | #endif |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 2099 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2100 | |
| 2101 | int yystate; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2102 | int yyn; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2103 | int yyresult; |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2104 | /* Number of tokens to shift before error messages enabled. */ |
| 2105 | int yyerrstatus; |
| 2106 | /* Look-ahead token as an internal (translated) token number. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2107 | int yytoken = 0; |
| 2108 | #if YYERROR_VERBOSE |
| 2109 | /* Buffer for error messages, and its allocated size. */ |
| 2110 | char yymsgbuf[128]; |
| 2111 | char *yymsg = yymsgbuf; |
| 2112 | YYSIZE_T yymsg_alloc = sizeof yymsgbuf; |
| 2113 | #endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2114 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2115 | /* Three stacks and their tools: |
| 2116 | `yyss': related to states, |
| 2117 | `yyvs': related to semantic values, |
| 2118 | `yyls': related to locations. |
| 2119 | |
| 2120 | Refer to the stacks thru separate pointers, to allow yyoverflow |
| 2121 | to reallocate them elsewhere. */ |
| 2122 | |
| 2123 | /* The state stack. */ |
| 2124 | yytype_int16 yyssa[YYINITDEPTH]; |
| 2125 | yytype_int16 *yyss = yyssa; |
| 2126 | yytype_int16 *yyssp; |
| 2127 | |
| 2128 | /* The semantic value stack. */ |
| 2129 | YYSTYPE yyvsa[YYINITDEPTH]; |
| 2130 | YYSTYPE *yyvs = yyvsa; |
| 2131 | YYSTYPE *yyvsp; |
| 2132 | |
| 2133 | |
| 2134 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2135 | #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2136 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2137 | YYSIZE_T yystacksize = YYINITDEPTH; |
| 2138 | |
| 2139 | /* The variables used to return semantic value and location from the |
| 2140 | action routines. */ |
| 2141 | YYSTYPE yyval; |
| 2142 | |
| 2143 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2144 | /* The number of symbols on the RHS of the reduced rule. |
| 2145 | Keep to zero when no symbol should be popped. */ |
| 2146 | int yylen = 0; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2147 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2148 | YYDPRINTF ((stderr, "Starting parse\n")); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2149 | |
| 2150 | yystate = 0; |
| 2151 | yyerrstatus = 0; |
| 2152 | yynerrs = 0; |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2153 | yychar = YYEMPTY; /* Cause a token to be read. */ |
| 2154 | |
| 2155 | /* Initialize stack pointers. |
| 2156 | Waste one element of value and location stack |
| 2157 | so that they stay on the same level as the state stack. |
| 2158 | The wasted elements are never initialized. */ |
| 2159 | |
| 2160 | yyssp = yyss; |
| 2161 | yyvsp = yyvs; |
| 2162 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2163 | goto yysetstate; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2164 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2165 | /*------------------------------------------------------------. |
| 2166 | | yynewstate -- Push a new state, which is found in yystate. | |
| 2167 | `------------------------------------------------------------*/ |
| 2168 | yynewstate: |
| 2169 | /* In all cases, when you get here, the value and location stacks |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2170 | have just been pushed. So pushing a state here evens the stacks. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2171 | yyssp++; |
| 2172 | |
| 2173 | yysetstate: |
| 2174 | *yyssp = yystate; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2175 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2176 | if (yyss + yystacksize - 1 <= yyssp) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2177 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2178 | /* Get the current used size of the three stacks, in elements. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2179 | YYSIZE_T yysize = yyssp - yyss + 1; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2180 | |
| 2181 | #ifdef yyoverflow |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2182 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2183 | /* Give user a chance to reallocate the stack. Use copies of |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2184 | these so that the &'s don't force the real ones into |
| 2185 | memory. */ |
| 2186 | YYSTYPE *yyvs1 = yyvs; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2187 | yytype_int16 *yyss1 = yyss; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2188 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2189 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2190 | /* Each stack pointer address is followed by the size of the |
| 2191 | data in use in that stack, in bytes. This used to be a |
| 2192 | conditional around just the two extra args, but that might |
| 2193 | be undefined if yyoverflow is a macro. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2194 | yyoverflow (YY_("memory exhausted"), |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2195 | &yyss1, yysize * sizeof (*yyssp), |
| 2196 | &yyvs1, yysize * sizeof (*yyvsp), |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2197 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2198 | &yystacksize); |
| 2199 | |
| 2200 | yyss = yyss1; |
| 2201 | yyvs = yyvs1; |
| 2202 | } |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2203 | #else /* no yyoverflow */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2204 | # ifndef YYSTACK_RELOCATE |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2205 | goto yyexhaustedlab; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2206 | # else |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2207 | /* Extend the stack our own way. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2208 | if (YYMAXDEPTH <= yystacksize) |
| 2209 | goto yyexhaustedlab; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2210 | yystacksize *= 2; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2211 | if (YYMAXDEPTH < yystacksize) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2212 | yystacksize = YYMAXDEPTH; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2213 | |
| 2214 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2215 | yytype_int16 *yyss1 = yyss; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2216 | union yyalloc *yyptr = |
| 2217 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
| 2218 | if (! yyptr) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2219 | goto yyexhaustedlab; |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2220 | YYSTACK_RELOCATE (yyss); |
| 2221 | YYSTACK_RELOCATE (yyvs); |
| 2222 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2223 | # undef YYSTACK_RELOCATE |
| 2224 | if (yyss1 != yyssa) |
| 2225 | YYSTACK_FREE (yyss1); |
| 2226 | } |
| 2227 | # endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2228 | #endif /* no yyoverflow */ |
| 2229 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2230 | yyssp = yyss + yysize - 1; |
| 2231 | yyvsp = yyvs + yysize - 1; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2232 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2233 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2234 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
| 2235 | (unsigned long int) yystacksize)); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2236 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2237 | if (yyss + yystacksize - 1 <= yyssp) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2238 | YYABORT; |
| 2239 | } |
| 2240 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2241 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2242 | |
| 2243 | goto yybackup; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2244 | |
| 2245 | /*-----------. |
| 2246 | | yybackup. | |
| 2247 | `-----------*/ |
| 2248 | yybackup: |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2249 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2250 | /* Do appropriate processing given the current state. Read a |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2251 | 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] | 2252 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2253 | /* 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] | 2254 | yyn = yypact[yystate]; |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2255 | if (yyn == YYPACT_NINF) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2256 | goto yydefault; |
| 2257 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2258 | /* 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] | 2259 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2260 | /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2261 | if (yychar == YYEMPTY) |
| 2262 | { |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2263 | YYDPRINTF ((stderr, "Reading a token: ")); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2264 | yychar = YYLEX; |
| 2265 | } |
| 2266 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2267 | if (yychar <= YYEOF) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2268 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2269 | yychar = yytoken = YYEOF; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2270 | YYDPRINTF ((stderr, "Now at end of input.\n")); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2271 | } |
| 2272 | else |
| 2273 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2274 | yytoken = YYTRANSLATE (yychar); |
| 2275 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2276 | } |
| 2277 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2278 | /* 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] | 2279 | detect an error, take that action. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2280 | yyn += yytoken; |
| 2281 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2282 | goto yydefault; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2283 | yyn = yytable[yyn]; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2284 | if (yyn <= 0) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2285 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2286 | if (yyn == 0 || yyn == YYTABLE_NINF) |
| 2287 | goto yyerrlab; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2288 | yyn = -yyn; |
| 2289 | goto yyreduce; |
| 2290 | } |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2291 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2292 | if (yyn == YYFINAL) |
| 2293 | YYACCEPT; |
| 2294 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2295 | /* Count tokens shifted since error; after three, turn off error |
| 2296 | status. */ |
| 2297 | if (yyerrstatus) |
| 2298 | yyerrstatus--; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2299 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2300 | /* Shift the look-ahead token. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2301 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
| 2302 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2303 | /* Discard the shifted token unless it is eof. */ |
| 2304 | if (yychar != YYEOF) |
| 2305 | yychar = YYEMPTY; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2306 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2307 | yystate = yyn; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2308 | *++yyvsp = yylval; |
| 2309 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2310 | goto yynewstate; |
| 2311 | |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 2312 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2313 | /*-----------------------------------------------------------. |
| 2314 | | yydefault -- do the default action for the current state. | |
| 2315 | `-----------------------------------------------------------*/ |
| 2316 | yydefault: |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2317 | yyn = yydefact[yystate]; |
| 2318 | if (yyn == 0) |
| 2319 | goto yyerrlab; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2320 | goto yyreduce; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2321 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2322 | |
| 2323 | /*-----------------------------. |
| 2324 | | yyreduce -- Do a reduction. | |
| 2325 | `-----------------------------*/ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2326 | yyreduce: |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2327 | /* yyn is the number of a rule to reduce with. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2328 | yylen = yyr2[yyn]; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2329 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2330 | /* If YYLEN is nonzero, implement the default value of the action: |
| 2331 | `$$ = $1'. |
| 2332 | |
| 2333 | Otherwise, the following line sets YYVAL to garbage. |
| 2334 | This behavior is undocumented and Bison |
| 2335 | users should not rely upon it. Assigning to YYVAL |
| 2336 | unconditionally makes the parser a bit smaller, and it avoids a |
| 2337 | GCC warning that YYVAL may be used uninitialized. */ |
| 2338 | yyval = yyvsp[1-yylen]; |
| 2339 | |
| 2340 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2341 | YY_REDUCE_PRINT (yyn); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2342 | switch (yyn) |
| 2343 | { |
| 2344 | case 2: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2345 | #line 415 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2346 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2347 | *(void **)param = (yyvsp[(2) - (2)].a_grammar); |
| 2348 | } |
| 2349 | break; |
| 2350 | |
| 2351 | case 3: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2352 | #line 418 "asn1p_y.y" |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2353 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2354 | *(void **)param = (yyvsp[(1) - (1)].a_grammar); |
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 4: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2359 | #line 424 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2360 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2361 | (yyval.a_grammar) = asn1p_new(); |
| 2362 | checkmem((yyval.a_grammar)); |
| 2363 | 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] | 2364 | } |
| 2365 | break; |
| 2366 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2367 | case 5: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2368 | #line 429 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2369 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2370 | (yyval.a_grammar) = (yyvsp[(1) - (2)].a_grammar); |
| 2371 | 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] | 2372 | } |
| 2373 | break; |
| 2374 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2375 | case 6: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2376 | #line 446 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2377 | { currentModule = asn1p_module_new(); } |
| 2378 | break; |
| 2379 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2380 | case 7: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2381 | #line 451 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2382 | { |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 2383 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2384 | (yyval.a_module) = currentModule; |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2385 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2386 | if((yyvsp[(8) - (9)].a_module)) { |
| 2387 | asn1p_module_t tmp = *((yyval.a_module)); |
| 2388 | *((yyval.a_module)) = *((yyvsp[(8) - (9)].a_module)); |
| 2389 | *((yyvsp[(8) - (9)].a_module)) = tmp; |
| 2390 | asn1p_module_free((yyvsp[(8) - (9)].a_module)); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2391 | } else { |
| 2392 | /* There's a chance that a module is just plain empty */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2393 | } |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2394 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2395 | (yyval.a_module)->ModuleName = (yyvsp[(1) - (9)].tv_str); |
| 2396 | (yyval.a_module)->module_oid = (yyvsp[(3) - (9)].a_oid); |
| 2397 | (yyval.a_module)->module_flags = (yyvsp[(5) - (9)].a_module_flags); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2398 | } |
| 2399 | break; |
| 2400 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2401 | case 8: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2402 | #line 475 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2403 | { (yyval.a_oid) = 0; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2404 | break; |
| 2405 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2406 | case 9: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2407 | #line 476 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2408 | { (yyval.a_oid) = (yyvsp[(1) - (1)].a_oid); } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2409 | break; |
| 2410 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2411 | case 10: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2412 | #line 480 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2413 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2414 | (yyval.a_oid) = (yyvsp[(2) - (3)].a_oid); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2415 | } |
| 2416 | break; |
| 2417 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2418 | case 11: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2419 | #line 483 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2420 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2421 | (yyval.a_oid) = 0; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2422 | } |
| 2423 | break; |
| 2424 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2425 | case 12: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2426 | #line 489 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2427 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2428 | (yyval.a_oid) = asn1p_oid_new(); |
| 2429 | 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] | 2430 | if((yyvsp[(1) - (1)].a_oid_arc).name) |
| 2431 | free((yyvsp[(1) - (1)].a_oid_arc).name); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2432 | } |
| 2433 | break; |
| 2434 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2435 | case 13: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2436 | #line 495 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2437 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2438 | (yyval.a_oid) = (yyvsp[(1) - (2)].a_oid); |
| 2439 | 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] | 2440 | if((yyvsp[(2) - (2)].a_oid_arc).name) |
| 2441 | free((yyvsp[(2) - (2)].a_oid_arc).name); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2442 | } |
| 2443 | break; |
| 2444 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2445 | case 14: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2446 | #line 504 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2447 | { /* iso */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2448 | (yyval.a_oid_arc).name = (yyvsp[(1) - (1)].tv_str); |
| 2449 | (yyval.a_oid_arc).number = -1; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2450 | } |
| 2451 | break; |
| 2452 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2453 | case 15: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2454 | #line 508 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2455 | { /* iso(1) */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2456 | (yyval.a_oid_arc).name = (yyvsp[(1) - (4)].tv_str); |
| 2457 | (yyval.a_oid_arc).number = (yyvsp[(3) - (4)].a_int); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2458 | } |
| 2459 | break; |
| 2460 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2461 | case 16: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2462 | #line 512 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2463 | { /* 1 */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2464 | (yyval.a_oid_arc).name = 0; |
| 2465 | (yyval.a_oid_arc).number = (yyvsp[(1) - (1)].a_int); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2466 | } |
| 2467 | break; |
| 2468 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2469 | case 17: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2470 | #line 522 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2471 | { (yyval.a_module_flags) = MSF_NOFLAGS; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2472 | break; |
| 2473 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2474 | case 18: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2475 | #line 523 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2476 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2477 | (yyval.a_module_flags) = (yyvsp[(1) - (1)].a_module_flags); |
| 2478 | } |
| 2479 | break; |
| 2480 | |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 2481 | case 19: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2482 | #line 532 "asn1p_y.y" |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 2483 | { |
| 2484 | (yyval.a_module_flags) = (yyvsp[(1) - (1)].a_module_flags); |
| 2485 | } |
| 2486 | break; |
| 2487 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2488 | case 20: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2489 | #line 535 "asn1p_y.y" |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2490 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2491 | (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] | 2492 | } |
| 2493 | break; |
| 2494 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2495 | case 21: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2496 | #line 544 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2497 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2498 | (yyval.a_module_flags) = MSF_EXPLICIT_TAGS; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2499 | } |
| 2500 | break; |
| 2501 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2502 | case 22: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2503 | #line 547 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2504 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2505 | (yyval.a_module_flags) = MSF_IMPLICIT_TAGS; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2506 | } |
| 2507 | break; |
| 2508 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2509 | case 23: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2510 | #line 550 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2511 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2512 | (yyval.a_module_flags) = MSF_AUTOMATIC_TAGS; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2513 | } |
| 2514 | break; |
| 2515 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2516 | case 24: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2517 | #line 553 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2518 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2519 | (yyval.a_module_flags) = MSF_EXTENSIBILITY_IMPLIED; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2520 | } |
| 2521 | break; |
| 2522 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2523 | case 25: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2524 | #line 557 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2525 | { |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 2526 | /* X.680Amd1 specifies TAG and XER */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2527 | if(strcmp((yyvsp[(1) - (2)].tv_str), "TAG") == 0) { |
| 2528 | (yyval.a_module_flags) = MSF_TAG_INSTRUCTIONS; |
| 2529 | } else if(strcmp((yyvsp[(1) - (2)].tv_str), "XER") == 0) { |
| 2530 | (yyval.a_module_flags) = MSF_XER_INSTRUCTIONS; |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 2531 | } else { |
| 2532 | fprintf(stderr, |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 2533 | "WARNING: %s INSTRUCTIONS at %s:%d: " |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 2534 | "Unrecognized encoding reference\n", |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 2535 | (yyvsp[(1) - (2)].tv_str), ASN_FILENAME, yylineno); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2536 | (yyval.a_module_flags) = MSF_unk_INSTRUCTIONS; |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 2537 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2538 | free((yyvsp[(1) - (2)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2539 | } |
| 2540 | break; |
| 2541 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2542 | case 26: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2543 | #line 578 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2544 | { (yyval.a_module) = 0; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2545 | break; |
| 2546 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2547 | case 27: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2548 | #line 579 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2549 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2550 | (yyval.a_module) = (yyvsp[(1) - (1)].a_module); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2551 | } |
| 2552 | break; |
| 2553 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2554 | case 28: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2555 | #line 588 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2556 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2557 | (yyval.a_module) = asn1p_module_new(); |
| 2558 | AL_IMPORT((yyval.a_module), exports, (yyvsp[(1) - (3)].a_module), xp_next); |
| 2559 | AL_IMPORT((yyval.a_module), imports, (yyvsp[(2) - (3)].a_module), xp_next); |
| 2560 | 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] | 2561 | |
| 2562 | asn1p_module_free((yyvsp[(1) - (3)].a_module)); |
| 2563 | asn1p_module_free((yyvsp[(2) - (3)].a_module)); |
| 2564 | asn1p_module_free((yyvsp[(3) - (3)].a_module)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2565 | } |
| 2566 | break; |
| 2567 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2568 | case 29: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2569 | #line 601 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2570 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2571 | (yyval.a_module) = (yyvsp[(1) - (1)].a_module); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2572 | } |
| 2573 | break; |
| 2574 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2575 | case 30: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2576 | #line 604 "asn1p_y.y" |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2577 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2578 | if((yyvsp[(1) - (2)].a_module)) { |
| 2579 | (yyval.a_module) = (yyvsp[(1) - (2)].a_module); |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2580 | } else { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2581 | (yyval.a_module) = (yyvsp[(2) - (2)].a_module); |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2582 | break; |
| 2583 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2584 | 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] | 2585 | asn1p_module_free((yyvsp[(2) - (2)].a_module)); |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2586 | } |
| 2587 | break; |
| 2588 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2589 | case 31: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2590 | #line 621 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2591 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2592 | (yyval.a_module) = asn1p_module_new(); |
| 2593 | checkmem((yyval.a_module)); |
| 2594 | assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID); |
| 2595 | assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID); |
| 2596 | TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2597 | } |
| 2598 | break; |
| 2599 | |
| 2600 | case 32: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2601 | #line 628 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2602 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2603 | (yyval.a_module) = asn1p_module_new(); |
| 2604 | checkmem((yyval.a_module)); |
| 2605 | assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID); |
| 2606 | assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID); |
| 2607 | TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next); |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2608 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2609 | break; |
| 2610 | |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2611 | case 33: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2612 | #line 642 "asn1p_y.y" |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2613 | { |
| 2614 | (yyval.a_module) = asn1p_module_new(); |
| 2615 | checkmem((yyval.a_module)); |
| 2616 | assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID); |
| 2617 | assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID); |
| 2618 | TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next); |
| 2619 | } |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2620 | break; |
| 2621 | |
| 2622 | case 34: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2623 | #line 650 "asn1p_y.y" |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2624 | { asn1p_lexer_hack_push_encoding_control(); } |
| 2625 | break; |
| 2626 | |
| 2627 | case 35: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2628 | #line 651 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2629 | { |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 2630 | fprintf(stderr, |
| 2631 | "WARNING: ENCODING-CONTROL %s " |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 2632 | "specification at %s:%d ignored\n", |
| 2633 | (yyvsp[(2) - (3)].tv_str), ASN_FILENAME, yylineno); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2634 | free((yyvsp[(2) - (3)].tv_str)); |
| 2635 | (yyval.a_module) = 0; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2636 | } |
| 2637 | break; |
| 2638 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2639 | case 36: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2640 | #line 663 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2641 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2642 | return yyerror( |
Lev Walkin | 7085305 | 2005-11-26 11:21:55 +0000 | [diff] [blame] | 2643 | "Attempt to redefine a standard basic string type, " |
| 2644 | "please comment out or remove this type redefinition."); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2645 | } |
| 2646 | break; |
| 2647 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2648 | case 37: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2649 | #line 676 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2650 | { (yyval.a_module) = 0; } |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2651 | break; |
| 2652 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2653 | case 39: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2654 | #line 680 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2655 | { |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 2656 | if(!saved_aid && 0) |
| 2657 | return yyerror("Unterminated IMPORTS FROM, " |
| 2658 | "expected semicolon ';'"); |
| 2659 | saved_aid = 0; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2660 | (yyval.a_module) = (yyvsp[(2) - (3)].a_module); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2661 | } |
| 2662 | break; |
| 2663 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2664 | case 40: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2665 | #line 690 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2666 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2667 | return yyerror("Empty IMPORTS list"); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2668 | } |
| 2669 | break; |
| 2670 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2671 | case 41: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2672 | #line 696 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2673 | { (yyval.a_module) = asn1p_module_new(); } |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2674 | break; |
| 2675 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2676 | case 43: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2677 | #line 700 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2678 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2679 | (yyval.a_module) = asn1p_module_new(); |
| 2680 | checkmem((yyval.a_module)); |
| 2681 | 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] | 2682 | } |
| 2683 | break; |
| 2684 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2685 | case 44: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2686 | #line 705 "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_module) = (yyvsp[(1) - (2)].a_module); |
| 2689 | 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] | 2690 | } |
| 2691 | break; |
| 2692 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2693 | case 45: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2694 | #line 712 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2695 | { memset(&(yyval.a_aid), 0, sizeof((yyval.a_aid))); } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2696 | break; |
| 2697 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2698 | case 46: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2699 | #line 713 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2700 | { (yyval.a_aid).oid = (yyvsp[(1) - (1)].a_oid); } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2701 | break; |
| 2702 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2703 | case 47: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2704 | #line 717 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2705 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2706 | (yyval.a_xports) = (yyvsp[(1) - (4)].a_xports); |
| 2707 | (yyval.a_xports)->fromModuleName = (yyvsp[(3) - (4)].tv_str); |
| 2708 | (yyval.a_xports)->identifier = (yyvsp[(4) - (4)].a_aid); |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 2709 | /* This stupid thing is used for look-back hack. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2710 | saved_aid = (yyval.a_xports)->identifier.oid ? 0 : &((yyval.a_xports)->identifier); |
| 2711 | checkmem((yyval.a_xports)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2712 | } |
| 2713 | break; |
| 2714 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2715 | case 48: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2716 | #line 728 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2717 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2718 | (yyval.a_xports) = asn1p_xports_new(); |
| 2719 | checkmem((yyval.a_xports)); |
| 2720 | TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(1) - (1)].a_expr), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2721 | } |
| 2722 | break; |
| 2723 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2724 | case 49: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2725 | #line 733 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2726 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2727 | (yyval.a_xports) = (yyvsp[(1) - (3)].a_xports); |
| 2728 | TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(3) - (3)].a_expr), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2729 | } |
| 2730 | break; |
| 2731 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2732 | case 50: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2733 | #line 740 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2734 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2735 | (yyval.a_expr) = NEW_EXPR(); |
| 2736 | checkmem((yyval.a_expr)); |
| 2737 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str); |
| 2738 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2739 | } |
| 2740 | break; |
| 2741 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2742 | case 51: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2743 | #line 746 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2744 | { /* Completely equivalent to above */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2745 | (yyval.a_expr) = NEW_EXPR(); |
| 2746 | checkmem((yyval.a_expr)); |
| 2747 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 2748 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2749 | } |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2750 | break; |
| 2751 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2752 | case 52: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2753 | #line 752 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2754 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2755 | (yyval.a_expr) = NEW_EXPR(); |
| 2756 | checkmem((yyval.a_expr)); |
| 2757 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str); |
| 2758 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2759 | } |
| 2760 | break; |
| 2761 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2762 | case 53: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2763 | #line 762 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2764 | { (yyval.a_module) = 0; } |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2765 | break; |
| 2766 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2767 | case 54: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2768 | #line 763 "asn1p_y.y" |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2769 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2770 | (yyval.a_module) = asn1p_module_new(); |
| 2771 | checkmem((yyval.a_module)); |
| 2772 | if((yyvsp[(1) - (1)].a_xports)) { |
| 2773 | 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] | 2774 | } else { |
| 2775 | /* "EXPORTS ALL;" */ |
| 2776 | } |
| 2777 | } |
| 2778 | break; |
| 2779 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2780 | case 55: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2781 | #line 775 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2782 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2783 | (yyval.a_xports) = (yyvsp[(2) - (3)].a_xports); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2784 | } |
| 2785 | break; |
| 2786 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2787 | case 56: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2788 | #line 778 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2789 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2790 | (yyval.a_xports) = 0; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2791 | } |
| 2792 | break; |
| 2793 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2794 | case 57: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2795 | #line 781 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2796 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2797 | /* Empty EXPORTS clause effectively prohibits export. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2798 | (yyval.a_xports) = asn1p_xports_new(); |
| 2799 | checkmem((yyval.a_xports)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2800 | } |
| 2801 | break; |
| 2802 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2803 | case 58: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2804 | #line 789 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2805 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2806 | (yyval.a_xports) = asn1p_xports_new(); |
| 2807 | assert((yyval.a_xports)); |
| 2808 | TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(1) - (1)].a_expr), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2809 | } |
| 2810 | break; |
| 2811 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2812 | case 59: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2813 | #line 794 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2814 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2815 | (yyval.a_xports) = (yyvsp[(1) - (3)].a_xports); |
| 2816 | TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(3) - (3)].a_expr), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2817 | } |
| 2818 | break; |
| 2819 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2820 | case 60: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2821 | #line 801 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2822 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2823 | (yyval.a_expr) = NEW_EXPR(); |
| 2824 | checkmem((yyval.a_expr)); |
| 2825 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str); |
| 2826 | (yyval.a_expr)->expr_type = A1TC_EXPORTVAR; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2827 | } |
| 2828 | break; |
| 2829 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2830 | case 61: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2831 | #line 807 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2832 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2833 | (yyval.a_expr) = NEW_EXPR(); |
| 2834 | checkmem((yyval.a_expr)); |
| 2835 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 2836 | (yyval.a_expr)->expr_type = A1TC_EXPORTVAR; |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2837 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2838 | break; |
| 2839 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2840 | case 62: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2841 | #line 813 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2842 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2843 | (yyval.a_expr) = NEW_EXPR(); |
| 2844 | checkmem((yyval.a_expr)); |
| 2845 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str); |
| 2846 | (yyval.a_expr)->expr_type = A1TC_EXPORTVAR; |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2847 | } |
| 2848 | break; |
| 2849 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2850 | case 63: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2851 | #line 822 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2852 | { (yyval.a_constr) = (yyvsp[(2) - (3)].a_constr); } |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2853 | break; |
| 2854 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2855 | case 64: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2856 | #line 825 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2857 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2858 | (yyval.a_expr) = (yyvsp[(2) - (4)].a_expr); |
| 2859 | assert((yyval.a_expr)->Identifier == 0); |
| 2860 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str); |
| 2861 | (yyval.a_expr)->meta_type = AMT_VALUESET; |
| 2862 | (yyval.a_expr)->constraints = (yyvsp[(4) - (4)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2863 | } |
| 2864 | break; |
| 2865 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 2866 | case 65: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2867 | #line 845 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2868 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2869 | (yyval.a_expr) = NEW_EXPR(); |
| 2870 | checkmem((yyval.a_expr)); |
| 2871 | (yyval.a_expr)->reference = (yyvsp[(1) - (1)].a_ref); |
| 2872 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
| 2873 | (yyval.a_expr)->meta_type = AMT_TYPEREF; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2874 | } |
| 2875 | break; |
| 2876 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2877 | case 66: |
| 2878 | #line 855 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2879 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2880 | (yyval.a_expr) = NEW_EXPR(); |
| 2881 | checkmem((yyval.a_expr)); |
| 2882 | (yyval.a_expr)->reference = (yyvsp[(1) - (4)].a_ref); |
| 2883 | (yyval.a_expr)->rhs_pspecs = (yyvsp[(3) - (4)].a_expr); |
| 2884 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
| 2885 | (yyval.a_expr)->meta_type = AMT_TYPEREF; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2886 | } |
| 2887 | break; |
| 2888 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2889 | case 67: |
| 2890 | #line 875 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2891 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2892 | (yyval.a_expr) = (yyvsp[(3) - (3)].a_expr); |
| 2893 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 2894 | assert((yyval.a_expr)->expr_type); |
| 2895 | assert((yyval.a_expr)->meta_type); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2896 | } |
| 2897 | break; |
| 2898 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2899 | case 68: |
| 2900 | #line 881 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2901 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2902 | (yyval.a_expr) = (yyvsp[(3) - (3)].a_expr); |
| 2903 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 2904 | assert((yyval.a_expr)->expr_type == A1TC_CLASSDEF); |
| 2905 | assert((yyval.a_expr)->meta_type == AMT_OBJECTCLASS); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2906 | } |
| 2907 | break; |
| 2908 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2909 | case 69: |
| 2910 | #line 897 "asn1p_y.y" |
| 2911 | { |
| 2912 | (yyval.a_expr) = (yyvsp[(6) - (6)].a_expr); |
| 2913 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (6)].tv_str); |
| 2914 | (yyval.a_expr)->lhs_params = (yyvsp[(3) - (6)].a_plist); |
| 2915 | } |
| 2916 | break; |
| 2917 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2918 | case 70: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2919 | #line 903 "asn1p_y.y" |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2920 | { |
| 2921 | (yyval.a_expr) = (yyvsp[(6) - (6)].a_expr); |
| 2922 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (6)].tv_str); |
| 2923 | (yyval.a_expr)->lhs_params = (yyvsp[(3) - (6)].a_plist); |
| 2924 | } |
| 2925 | break; |
| 2926 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2927 | case 71: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2928 | #line 911 "asn1p_y.y" |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2929 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2930 | int ret; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2931 | (yyval.a_plist) = asn1p_paramlist_new(yylineno); |
| 2932 | checkmem((yyval.a_plist)); |
| 2933 | 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] | 2934 | checkmem(ret == 0); |
Lev Walkin | a964e03 | 2017-03-26 03:48:06 -0700 | [diff] [blame] | 2935 | asn1p_ref_free((yyvsp[(1) - (1)].a_parg).governor); |
Markus Elfring | f3d1861 | 2016-03-15 08:35:24 +0100 | [diff] [blame] | 2936 | free((yyvsp[(1) - (1)].a_parg).argument); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2937 | } |
| 2938 | break; |
| 2939 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2940 | case 72: |
| 2941 | #line 920 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2942 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2943 | int ret; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2944 | (yyval.a_plist) = (yyvsp[(1) - (3)].a_plist); |
| 2945 | 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] | 2946 | checkmem(ret == 0); |
Lev Walkin | a964e03 | 2017-03-26 03:48:06 -0700 | [diff] [blame] | 2947 | asn1p_ref_free((yyvsp[(3) - (3)].a_parg).governor); |
Markus Elfring | f3d1861 | 2016-03-15 08:35:24 +0100 | [diff] [blame] | 2948 | free((yyvsp[(3) - (3)].a_parg).argument); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2949 | } |
| 2950 | break; |
| 2951 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2952 | case 73: |
| 2953 | #line 931 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2954 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2955 | (yyval.a_parg).governor = NULL; |
| 2956 | (yyval.a_parg).argument = (yyvsp[(1) - (1)].tv_str); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2957 | } |
| 2958 | break; |
| 2959 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2960 | case 74: |
| 2961 | #line 935 "asn1p_y.y" |
| 2962 | { |
| 2963 | int ret; |
| 2964 | (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule); |
| 2965 | ret = asn1p_ref_add_component((yyval.a_parg).governor, (yyvsp[(1) - (3)].tv_str), 0); |
| 2966 | checkmem(ret == 0); |
| 2967 | (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str); |
| 2968 | free((yyvsp[(1) - (3)].tv_str)); |
| 2969 | } |
| 2970 | break; |
| 2971 | |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2972 | case 75: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2973 | #line 943 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2974 | { |
| 2975 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2976 | (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2977 | 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] | 2978 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2979 | (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2980 | free((yyvsp[(1) - (3)].tv_str)); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2981 | } |
| 2982 | break; |
| 2983 | |
| 2984 | case 76: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2985 | #line 951 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2986 | { |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2987 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2988 | (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2989 | ret = asn1p_ref_add_component((yyval.a_parg).governor, |
| 2990 | ASN_EXPR_TYPE2STR((yyvsp[(1) - (3)].a_type)), 1); |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2991 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2992 | (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str); |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2993 | } |
| 2994 | break; |
| 2995 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2996 | case 77: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 2997 | #line 959 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2998 | { |
| 2999 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3000 | (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3001 | ret = asn1p_ref_add_component((yyval.a_parg).governor, |
| 3002 | ASN_EXPR_TYPE2STR((yyvsp[(1) - (3)].a_type)), 1); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3003 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3004 | (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3005 | } |
| 3006 | break; |
| 3007 | |
| 3008 | case 78: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3009 | #line 970 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 3010 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3011 | (yyval.a_expr) = NEW_EXPR(); |
| 3012 | checkmem((yyval.a_expr)); |
| 3013 | asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3014 | } |
| 3015 | break; |
| 3016 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3017 | case 79: |
| 3018 | #line 975 "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[(1) - (3)].a_expr); |
| 3021 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3022 | } |
| 3023 | break; |
| 3024 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3025 | case 81: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3026 | #line 983 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3027 | { |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3028 | (yyval.a_expr) = NEW_EXPR(); |
| 3029 | checkmem((yyval.a_expr)); |
| 3030 | (yyval.a_expr)->Identifier = strdup("?"); |
| 3031 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
| 3032 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 3033 | (yyval.a_expr)->value = (yyvsp[(1) - (1)].a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3034 | } |
| 3035 | break; |
| 3036 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3037 | case 82: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3038 | #line 991 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3039 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3040 | (yyval.a_expr) = NEW_EXPR(); |
| 3041 | checkmem((yyval.a_expr)); |
Bi-Ruei, Chiu | 3dcf05b | 2017-05-04 21:45:05 +0800 | [diff] [blame] | 3042 | (yyval.a_expr)->Identifier = strdup("?"); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3043 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
| 3044 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 3045 | (yyval.a_expr)->value = (yyvsp[(1) - (1)].a_value); |
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 83: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3050 | #line 999 "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) = NEW_EXPR(); |
| 3053 | (yyval.a_expr)->expr_type = A1TC_VALUESET; |
| 3054 | (yyval.a_expr)->meta_type = AMT_VALUESET; |
| 3055 | (yyval.a_expr)->constraints = (yyvsp[(1) - (1)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3056 | } |
| 3057 | break; |
| 3058 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3059 | case 84: |
| 3060 | #line 1022 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3061 | { (yyval.a_expr) = NEW_EXPR(); } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3062 | break; |
| 3063 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3064 | case 85: |
| 3065 | #line 1023 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3066 | { (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); } |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 3067 | break; |
| 3068 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3069 | case 86: |
| 3070 | #line 1026 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3071 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3072 | (yyval.a_expr) = NEW_EXPR(); |
| 3073 | checkmem((yyval.a_expr)); |
| 3074 | asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3075 | } |
| 3076 | break; |
| 3077 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3078 | case 87: |
| 3079 | #line 1031 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3080 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3081 | (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); |
| 3082 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3083 | } |
| 3084 | break; |
| 3085 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3086 | case 88: |
| 3087 | #line 1035 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3088 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3089 | (yyval.a_expr) = (yyvsp[(1) - (5)].a_expr); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3090 | 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] | 3091 | asn1p_expr_free((yyvsp[(4) - (5)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3092 | } |
| 3093 | break; |
| 3094 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3095 | case 89: |
| 3096 | #line 1043 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3097 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3098 | (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr); |
| 3099 | assert((yyval.a_expr)->Identifier == 0); |
| 3100 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 3101 | (yyvsp[(3) - (3)].a_marker).flags |= (yyval.a_expr)->marker.flags; |
| 3102 | (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3103 | } |
| 3104 | break; |
| 3105 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3106 | case 90: |
| 3107 | #line 1050 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3108 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3109 | (yyval.a_expr) = (yyvsp[(1) - (2)].a_expr); |
| 3110 | (yyvsp[(2) - (2)].a_marker).flags |= (yyval.a_expr)->marker.flags; |
| 3111 | (yyval.a_expr)->marker = (yyvsp[(2) - (2)].a_marker); |
| 3112 | _fixup_anonymous_identifier((yyval.a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3113 | } |
| 3114 | break; |
| 3115 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3116 | case 91: |
| 3117 | #line 1056 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3118 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3119 | (yyval.a_expr) = NEW_EXPR(); |
| 3120 | checkmem((yyval.a_expr)); |
| 3121 | (yyval.a_expr)->meta_type = (yyvsp[(3) - (3)].a_expr)->meta_type; |
| 3122 | (yyval.a_expr)->expr_type = A1TC_COMPONENTS_OF; |
| 3123 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3124 | } |
| 3125 | break; |
| 3126 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3127 | case 92: |
| 3128 | #line 1063 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3129 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3130 | (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3131 | } |
| 3132 | break; |
| 3133 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3134 | case 93: |
| 3135 | #line 1069 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3136 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3137 | (yyval.a_expr) = NEW_EXPR(); |
| 3138 | checkmem((yyval.a_expr)); |
| 3139 | asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3140 | } |
| 3141 | break; |
| 3142 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3143 | case 94: |
| 3144 | #line 1074 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3145 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3146 | (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); |
| 3147 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3148 | } |
| 3149 | break; |
| 3150 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3151 | case 95: |
| 3152 | #line 1081 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3153 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3154 | (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr); |
| 3155 | assert((yyval.a_expr)->Identifier == 0); |
| 3156 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (2)].tv_str); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3157 | } |
| 3158 | break; |
| 3159 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3160 | case 96: |
| 3161 | #line 1086 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3162 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3163 | (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3164 | } |
| 3165 | break; |
| 3166 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3167 | case 97: |
| 3168 | #line 1089 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3169 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3170 | (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); |
| 3171 | _fixup_anonymous_identifier((yyval.a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3172 | } |
| 3173 | break; |
| 3174 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3175 | case 98: |
| 3176 | #line 1096 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3177 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3178 | (yyval.a_expr) = (yyvsp[(3) - (5)].a_expr); |
| 3179 | checkmem((yyval.a_expr)); |
| 3180 | (yyval.a_expr)->with_syntax = (yyvsp[(5) - (5)].a_wsynt); |
| 3181 | assert((yyval.a_expr)->expr_type == A1TC_CLASSDEF); |
| 3182 | assert((yyval.a_expr)->meta_type == AMT_OBJECTCLASS); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3183 | } |
| 3184 | break; |
| 3185 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3186 | case 99: |
| 3187 | #line 1106 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3188 | { (yyval.a_int) = 0; } |
| 3189 | break; |
| 3190 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3191 | case 100: |
| 3192 | #line 1107 "asn1p_y.y" |
| 3193 | { (yyval.a_int) = 1; } |
| 3194 | break; |
| 3195 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3196 | case 101: |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 3197 | #line 1111 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3198 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3199 | (yyval.a_expr) = NEW_EXPR(); |
| 3200 | checkmem((yyval.a_expr)); |
| 3201 | (yyval.a_expr)->expr_type = A1TC_CLASSDEF; |
| 3202 | (yyval.a_expr)->meta_type = AMT_OBJECTCLASS; |
| 3203 | asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3204 | } |
| 3205 | break; |
| 3206 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3207 | case 102: |
| 3208 | #line 1118 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3209 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3210 | (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); |
| 3211 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3212 | } |
| 3213 | break; |
| 3214 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3215 | case 103: |
| 3216 | #line 1128 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3217 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3218 | (yyval.a_expr) = NEW_EXPR(); |
| 3219 | checkmem((yyval.a_expr)); |
| 3220 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (2)].tv_str); |
| 3221 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3222 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_TFS; /* TypeFieldSpec */ |
| 3223 | (yyval.a_expr)->marker = (yyvsp[(2) - (2)].a_marker); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3224 | } |
| 3225 | break; |
| 3226 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3227 | case 104: |
| 3228 | #line 1138 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3229 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3230 | (yyval.a_expr) = NEW_EXPR(); |
| 3231 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str); |
| 3232 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3233 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_FTVFS; /* FixedTypeValueFieldSpec */ |
| 3234 | (yyval.a_expr)->unique = (yyvsp[(3) - (4)].a_int); |
| 3235 | (yyval.a_expr)->marker = (yyvsp[(4) - (4)].a_marker); |
| 3236 | asn1p_expr_add((yyval.a_expr), (yyvsp[(2) - (4)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3237 | } |
| 3238 | break; |
| 3239 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3240 | case 105: |
| 3241 | #line 1149 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3242 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3243 | (yyval.a_expr) = NEW_EXPR(); |
| 3244 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 3245 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3246 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_VTVFS; |
| 3247 | (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref); |
| 3248 | (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3249 | } |
| 3250 | break; |
| 3251 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3252 | case 106: |
| 3253 | #line 1159 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3254 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3255 | (yyval.a_expr) = NEW_EXPR(); |
| 3256 | checkmem((yyval.a_expr)); |
| 3257 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 3258 | (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref); |
| 3259 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3260 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_OFS; |
| 3261 | (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3262 | } |
| 3263 | break; |
| 3264 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3265 | case 107: |
| 3266 | #line 1170 "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_expr) = NEW_EXPR(); |
| 3269 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 3270 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3271 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_VTVSFS; |
| 3272 | (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref); |
| 3273 | (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3274 | } |
| 3275 | break; |
| 3276 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3277 | case 108: |
| 3278 | #line 1180 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3279 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3280 | (yyval.a_expr) = NEW_EXPR(); |
| 3281 | checkmem((yyval.a_expr)); |
| 3282 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 3283 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3284 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_FTVSFS; |
| 3285 | asn1p_expr_add((yyval.a_expr), (yyvsp[(2) - (3)].a_expr)); |
| 3286 | (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3287 | } |
| 3288 | break; |
| 3289 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3290 | case 109: |
| 3291 | #line 1191 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3292 | { |
| 3293 | (yyval.a_expr) = NEW_EXPR(); |
| 3294 | checkmem((yyval.a_expr)); |
| 3295 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 3296 | (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref); |
| 3297 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3298 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_OSFS; |
| 3299 | (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker); |
| 3300 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3301 | break; |
| 3302 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3303 | case 110: |
| 3304 | #line 1203 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3305 | { (yyval.a_wsynt) = 0; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3306 | break; |
| 3307 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3308 | case 111: |
| 3309 | #line 1204 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3310 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3311 | (yyval.a_wsynt) = (yyvsp[(1) - (1)].a_wsynt); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3312 | } |
| 3313 | break; |
| 3314 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3315 | case 112: |
| 3316 | #line 1211 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3317 | { asn1p_lexer_hack_enable_with_syntax(); } |
| 3318 | break; |
| 3319 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3320 | case 113: |
| 3321 | #line 1213 "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_wsynt) = (yyvsp[(5) - (6)].a_wsynt); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3324 | } |
| 3325 | break; |
| 3326 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3327 | case 114: |
| 3328 | #line 1219 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3329 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3330 | (yyval.a_wsynt) = asn1p_wsyntx_new(); |
| 3331 | TQ_ADD(&((yyval.a_wsynt)->chunks), (yyvsp[(1) - (1)].a_wchunk), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3332 | } |
| 3333 | break; |
| 3334 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3335 | case 115: |
| 3336 | #line 1223 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3337 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3338 | (yyval.a_wsynt) = (yyvsp[(1) - (2)].a_wsynt); |
| 3339 | TQ_ADD(&((yyval.a_wsynt)->chunks), (yyvsp[(2) - (2)].a_wchunk), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3340 | } |
| 3341 | break; |
| 3342 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3343 | case 116: |
| 3344 | #line 1230 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3345 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3346 | (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].tv_opaque).buf, 0); |
| 3347 | (yyval.a_wchunk)->type = WC_WHITESPACE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3348 | } |
| 3349 | break; |
| 3350 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3351 | case 117: |
| 3352 | #line 1234 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3353 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3354 | (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] | 3355 | } |
| 3356 | break; |
| 3357 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3358 | case 118: |
| 3359 | #line 1237 "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_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].a_refcomp).name, 0); |
| 3362 | (yyval.a_wchunk)->type = WC_FIELD; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3363 | } |
| 3364 | break; |
| 3365 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3366 | case 119: |
| 3367 | #line 1241 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 3368 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3369 | (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromsyntax((yyvsp[(2) - (3)].a_wsynt)); |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 3370 | } |
| 3371 | break; |
| 3372 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3373 | case 120: |
| 3374 | #line 1247 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3375 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3376 | (yyval.a_expr) = NEW_EXPR(); |
| 3377 | checkmem((yyval.a_expr)); |
| 3378 | (yyval.a_expr)->Identifier = strdup("..."); |
| 3379 | checkmem((yyval.a_expr)->Identifier); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3380 | (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE; |
| 3381 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3382 | } |
| 3383 | break; |
| 3384 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3385 | case 121: |
| 3386 | #line 1255 "asn1p_y.y" |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3387 | { |
| 3388 | (yyval.a_expr) = NEW_EXPR(); |
| 3389 | checkmem((yyval.a_expr)); |
| 3390 | (yyval.a_expr)->Identifier = strdup("..."); |
| 3391 | checkmem((yyval.a_expr)->Identifier); |
| 3392 | (yyval.a_expr)->value = (yyvsp[(3) - (3)].a_value); |
| 3393 | (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE; |
| 3394 | (yyval.a_expr)->meta_type = AMT_TYPE; |
| 3395 | } |
| 3396 | break; |
| 3397 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3398 | case 122: |
| 3399 | #line 1264 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3400 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3401 | (yyval.a_expr) = NEW_EXPR(); |
| 3402 | checkmem((yyval.a_expr)); |
| 3403 | (yyval.a_expr)->Identifier = strdup("..."); |
| 3404 | (yyval.a_expr)->value = (yyvsp[(3) - (3)].a_value); |
| 3405 | checkmem((yyval.a_expr)->Identifier); |
| 3406 | (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE; |
| 3407 | (yyval.a_expr)->meta_type = AMT_TYPE; |
| 3408 | } |
| 3409 | break; |
| 3410 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3411 | case 124: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3412 | #line 1278 "asn1p_y.y" |
| 3413 | { |
| 3414 | (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr); |
| 3415 | (yyval.a_expr)->tag = (yyvsp[(1) - (2)].a_tag); |
| 3416 | } |
| 3417 | break; |
| 3418 | |
| 3419 | case 125: |
| 3420 | #line 1285 "asn1p_y.y" |
| 3421 | { |
| 3422 | (yyval.a_expr) = (yyvsp[(1) - (2)].a_expr); |
| 3423 | /* |
| 3424 | * Outer constraint for SEQUENCE OF and SET OF applies |
| 3425 | * to the inner type. |
| 3426 | */ |
| 3427 | if((yyval.a_expr)->expr_type == ASN_CONSTR_SEQUENCE_OF |
| 3428 | || (yyval.a_expr)->expr_type == ASN_CONSTR_SET_OF) { |
| 3429 | assert(!TQ_FIRST(&((yyval.a_expr)->members))->constraints); |
| 3430 | TQ_FIRST(&((yyval.a_expr)->members))->constraints = (yyvsp[(2) - (2)].a_constr); |
| 3431 | } else { |
| 3432 | if((yyval.a_expr)->constraints) { |
| 3433 | assert(!(yyvsp[(2) - (2)].a_constr)); |
| 3434 | /* Check this : optManyConstraints is not used ?! */ |
| 3435 | asn1p_constraint_free((yyvsp[(2) - (2)].a_constr)); |
| 3436 | } else { |
| 3437 | (yyval.a_expr)->constraints = (yyvsp[(2) - (2)].a_constr); |
| 3438 | } |
| 3439 | } |
| 3440 | } |
| 3441 | break; |
| 3442 | |
| 3443 | case 126: |
| 3444 | #line 1308 "asn1p_y.y" |
| 3445 | { |
| 3446 | (yyval.a_expr) = (yyvsp[(1) - (2)].a_expr); |
| 3447 | /* |
| 3448 | * Outer constraint for SEQUENCE OF and SET OF applies |
| 3449 | * to the inner type. |
| 3450 | */ |
| 3451 | if((yyval.a_expr)->expr_type == ASN_CONSTR_SEQUENCE_OF |
| 3452 | || (yyval.a_expr)->expr_type == ASN_CONSTR_SET_OF) { |
| 3453 | assert(!TQ_FIRST(&((yyval.a_expr)->members))->constraints); |
| 3454 | TQ_FIRST(&((yyval.a_expr)->members))->constraints = (yyvsp[(2) - (2)].a_constr); |
| 3455 | } else { |
| 3456 | if((yyval.a_expr)->constraints) { |
| 3457 | assert(!(yyvsp[(2) - (2)].a_constr)); |
| 3458 | /* Check this : optManyConstraints is not used ?! */ |
| 3459 | asn1p_constraint_free((yyvsp[(2) - (2)].a_constr)); |
| 3460 | } else { |
| 3461 | (yyval.a_expr)->constraints = (yyvsp[(2) - (2)].a_constr); |
| 3462 | } |
| 3463 | } |
| 3464 | } |
| 3465 | break; |
| 3466 | |
| 3467 | case 127: |
| 3468 | #line 1331 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3469 | { |
| 3470 | (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr); |
| 3471 | (yyval.a_expr)->tag = (yyvsp[(1) - (3)].a_tag); |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 3472 | /* |
| 3473 | * Outer constraint for SEQUENCE OF and SET OF applies |
| 3474 | * to the inner type. |
| 3475 | */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3476 | if((yyval.a_expr)->expr_type == ASN_CONSTR_SEQUENCE_OF |
| 3477 | || (yyval.a_expr)->expr_type == ASN_CONSTR_SET_OF) { |
| 3478 | assert(!TQ_FIRST(&((yyval.a_expr)->members))->constraints); |
| 3479 | TQ_FIRST(&((yyval.a_expr)->members))->constraints = (yyvsp[(3) - (3)].a_constr); |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 3480 | } else { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3481 | if((yyval.a_expr)->constraints) { |
| 3482 | assert(!(yyvsp[(2) - (3)].a_expr)); |
Lev Walkin | 0c68645 | 2017-09-07 22:59:36 -0700 | [diff] [blame] | 3483 | /* Check this : optManyConstraints is not used ?! */ |
Bi-Ruei, Chiu | 3dcf05b | 2017-05-04 21:45:05 +0800 | [diff] [blame] | 3484 | asn1p_constraint_free((yyvsp[(3) - (3)].a_constr)); |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 3485 | } else { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3486 | (yyval.a_expr)->constraints = (yyvsp[(3) - (3)].a_constr); |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 3487 | } |
| 3488 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3489 | } |
| 3490 | break; |
| 3491 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3492 | case 128: |
| 3493 | #line 1355 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3494 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3495 | (yyval.a_int) = asn1p_as_pointer ? EM_INDIRECT : 0; |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 3496 | asn1p_as_pointer = 0; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3497 | } |
| 3498 | break; |
| 3499 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3500 | case 129: |
| 3501 | #line 1362 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3502 | { |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3503 | (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3504 | (yyval.a_expr)->marker.flags |= (yyvsp[(1) - (2)].a_int); |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 3505 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3506 | if(((yyval.a_expr)->marker.flags & EM_INDIRECT) |
| 3507 | && ((yyval.a_expr)->marker.flags & EM_OPTIONAL) != EM_OPTIONAL) { |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 3508 | fprintf(stderr, |
| 3509 | "INFO: Directive <ASN1C:RepresentAsPointer> " |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 3510 | "applied to %s at %s:%d\n", |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3511 | ASN_EXPR_TYPE2STR((yyval.a_expr)->expr_type) |
| 3512 | ? ASN_EXPR_TYPE2STR((yyval.a_expr)->expr_type) |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 3513 | : "member", |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 3514 | ASN_FILENAME, (yyval.a_expr)->_lineno |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 3515 | ); |
| 3516 | } |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3517 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3518 | break; |
| 3519 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3520 | case 133: |
| 3521 | #line 1386 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3522 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3523 | (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr); |
| 3524 | assert((yyval.a_expr)->expr_type == A1TC_INVALID); |
| 3525 | (yyval.a_expr)->expr_type = ASN_CONSTR_CHOICE; |
| 3526 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3527 | } |
| 3528 | break; |
| 3529 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3530 | case 134: |
| 3531 | #line 1392 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3532 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3533 | (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr); |
| 3534 | assert((yyval.a_expr)->expr_type == A1TC_INVALID); |
| 3535 | (yyval.a_expr)->expr_type = ASN_CONSTR_SEQUENCE; |
| 3536 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3537 | } |
| 3538 | break; |
| 3539 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3540 | case 135: |
| 3541 | #line 1398 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3542 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3543 | (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr); |
| 3544 | assert((yyval.a_expr)->expr_type == A1TC_INVALID); |
| 3545 | (yyval.a_expr)->expr_type = ASN_CONSTR_SET; |
| 3546 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3547 | } |
| 3548 | break; |
| 3549 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3550 | case 136: |
| 3551 | #line 1404 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3552 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3553 | (yyval.a_expr) = NEW_EXPR(); |
| 3554 | checkmem((yyval.a_expr)); |
| 3555 | (yyval.a_expr)->constraints = (yyvsp[(2) - (6)].a_constr); |
| 3556 | (yyval.a_expr)->expr_type = ASN_CONSTR_SEQUENCE_OF; |
| 3557 | (yyval.a_expr)->meta_type = AMT_TYPE; |
| 3558 | (yyvsp[(6) - (6)].a_expr)->Identifier = (yyvsp[(4) - (6)].tv_str); |
| 3559 | (yyvsp[(6) - (6)].a_expr)->tag = (yyvsp[(5) - (6)].a_tag); |
| 3560 | asn1p_expr_add((yyval.a_expr), (yyvsp[(6) - (6)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3561 | } |
| 3562 | break; |
| 3563 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3564 | case 137: |
| 3565 | #line 1414 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3566 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3567 | (yyval.a_expr) = NEW_EXPR(); |
| 3568 | checkmem((yyval.a_expr)); |
| 3569 | (yyval.a_expr)->constraints = (yyvsp[(2) - (6)].a_constr); |
| 3570 | (yyval.a_expr)->expr_type = ASN_CONSTR_SET_OF; |
| 3571 | (yyval.a_expr)->meta_type = AMT_TYPE; |
| 3572 | (yyvsp[(6) - (6)].a_expr)->Identifier = (yyvsp[(4) - (6)].tv_str); |
| 3573 | (yyvsp[(6) - (6)].a_expr)->tag = (yyvsp[(5) - (6)].a_tag); |
| 3574 | asn1p_expr_add((yyval.a_expr), (yyvsp[(6) - (6)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3575 | } |
| 3576 | break; |
| 3577 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3578 | case 138: |
| 3579 | #line 1424 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3580 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3581 | (yyval.a_expr) = NEW_EXPR(); |
| 3582 | checkmem((yyval.a_expr)); |
| 3583 | (yyval.a_expr)->expr_type = ASN_TYPE_ANY; |
| 3584 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3585 | } |
| 3586 | break; |
| 3587 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3588 | case 139: |
| 3589 | #line 1430 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3590 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3591 | int ret; |
| 3592 | (yyval.a_expr) = NEW_EXPR(); |
| 3593 | checkmem((yyval.a_expr)); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3594 | (yyval.a_expr)->reference = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3595 | ret = asn1p_ref_add_component((yyval.a_expr)->reference, |
| 3596 | (yyvsp[(4) - (4)].tv_str), RLT_lowercase); |
| 3597 | checkmem(ret == 0); |
| 3598 | (yyval.a_expr)->expr_type = ASN_TYPE_ANY; |
| 3599 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3600 | free((yyvsp[(4) - (4)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3601 | } |
| 3602 | break; |
| 3603 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3604 | case 140: |
| 3605 | #line 1442 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3606 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3607 | (yyval.a_expr) = NEW_EXPR(); |
| 3608 | checkmem((yyval.a_expr)); |
| 3609 | (yyval.a_expr)->reference = (yyvsp[(3) - (3)].a_ref); |
| 3610 | (yyval.a_expr)->expr_type = A1TC_INSTANCE; |
| 3611 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3612 | } |
| 3613 | break; |
| 3614 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3615 | case 141: |
| 3616 | #line 1457 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3617 | { |
| 3618 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3619 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3620 | checkmem((yyval.a_ref)); |
| 3621 | 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] | 3622 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3623 | free((yyvsp[(1) - (1)].tv_str)); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3624 | } |
| 3625 | break; |
| 3626 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3627 | case 142: |
| 3628 | #line 1465 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3629 | { |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 3630 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3631 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3632 | checkmem((yyval.a_ref)); |
| 3633 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_CAPITALS); |
| 3634 | free((yyvsp[(1) - (1)].tv_str)); |
| 3635 | checkmem(ret == 0); |
| 3636 | } |
| 3637 | break; |
| 3638 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3639 | case 143: |
| 3640 | #line 1473 "asn1p_y.y" |
| 3641 | { |
| 3642 | int ret; |
| 3643 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
| 3644 | checkmem((yyval.a_ref)); |
| 3645 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN); |
| 3646 | checkmem(ret == 0); |
| 3647 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_UNKNOWN); |
| 3648 | checkmem(ret == 0); |
| 3649 | free((yyvsp[(1) - (3)].tv_str)); |
| 3650 | free((yyvsp[(3) - (3)].tv_str)); |
| 3651 | } |
| 3652 | break; |
| 3653 | |
| 3654 | case 144: |
| 3655 | #line 1484 "asn1p_y.y" |
| 3656 | { |
| 3657 | int ret; |
| 3658 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
| 3659 | checkmem((yyval.a_ref)); |
| 3660 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN); |
| 3661 | checkmem(ret == 0); |
| 3662 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_UNKNOWN); |
| 3663 | checkmem(ret == 0); |
| 3664 | free((yyvsp[(1) - (3)].tv_str)); |
| 3665 | free((yyvsp[(3) - (3)].tv_str)); |
| 3666 | } |
| 3667 | break; |
| 3668 | |
| 3669 | case 145: |
| 3670 | #line 1495 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3671 | { |
| 3672 | int ret; |
| 3673 | (yyval.a_ref) = (yyvsp[(3) - (3)].a_ref); |
| 3674 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_CAPITALS); |
| 3675 | free((yyvsp[(1) - (3)].tv_str)); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3676 | checkmem(ret == 0); |
| 3677 | /* |
| 3678 | * Move the last element infront. |
| 3679 | */ |
| 3680 | { |
| 3681 | struct asn1p_ref_component_s tmp_comp; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3682 | tmp_comp = (yyval.a_ref)->components[(yyval.a_ref)->comp_count-1]; |
| 3683 | memmove(&(yyval.a_ref)->components[1], |
| 3684 | &(yyval.a_ref)->components[0], |
| 3685 | sizeof((yyval.a_ref)->components[0]) |
| 3686 | * ((yyval.a_ref)->comp_count - 1)); |
| 3687 | (yyval.a_ref)->components[0] = tmp_comp; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3688 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3689 | } |
| 3690 | break; |
| 3691 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3692 | case 146: |
| 3693 | #line 1517 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3694 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3695 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3696 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3697 | checkmem((yyval.a_ref)); |
| 3698 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].a_refcomp).name, (yyvsp[(1) - (1)].a_refcomp).lex_type); |
| 3699 | free((yyvsp[(1) - (1)].a_refcomp).name); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3700 | checkmem(ret == 0); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3701 | } |
| 3702 | break; |
| 3703 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3704 | case 147: |
| 3705 | #line 1525 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3706 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3707 | int ret; |
| 3708 | (yyval.a_ref) = (yyvsp[(1) - (3)].a_ref); |
| 3709 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].a_refcomp).name, (yyvsp[(3) - (3)].a_refcomp).lex_type); |
| 3710 | free((yyvsp[(3) - (3)].a_refcomp).name); |
| 3711 | checkmem(ret == 0); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3712 | } |
| 3713 | break; |
| 3714 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3715 | case 149: |
| 3716 | #line 1538 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3717 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3718 | (yyval.a_refcomp).lex_type = RLT_AmpUppercase; |
| 3719 | (yyval.a_refcomp).name = (yyvsp[(1) - (1)].tv_str); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3720 | } |
| 3721 | break; |
| 3722 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3723 | case 150: |
| 3724 | #line 1543 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3725 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3726 | (yyval.a_refcomp).lex_type = RLT_Amplowercase; |
| 3727 | (yyval.a_refcomp).name = (yyvsp[(1) - (1)].tv_str); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3728 | } |
| 3729 | break; |
| 3730 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3731 | case 151: |
| 3732 | #line 1552 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3733 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3734 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3735 | 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] | 3736 | free((yyvsp[(1) - (1)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3737 | } |
| 3738 | break; |
| 3739 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3740 | case 152: |
| 3741 | #line 1557 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3742 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3743 | (yyval.a_ref) = (yyval.a_ref); |
| 3744 | 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] | 3745 | free((yyvsp[(3) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3746 | } |
| 3747 | break; |
| 3748 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3749 | case 153: |
| 3750 | #line 1562 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3751 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3752 | (yyval.a_ref) = (yyval.a_ref); |
| 3753 | 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] | 3754 | free((yyvsp[(3) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3755 | } |
| 3756 | break; |
| 3757 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3758 | case 154: |
| 3759 | #line 1570 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3760 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3761 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3762 | 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] | 3763 | free((yyvsp[(1) - (1)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3764 | } |
| 3765 | break; |
| 3766 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3767 | case 155: |
| 3768 | #line 1593 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3769 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3770 | (yyval.a_expr) = (yyvsp[(2) - (4)].a_expr); |
| 3771 | assert((yyval.a_expr)->Identifier == NULL); |
| 3772 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str); |
| 3773 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 3774 | (yyval.a_expr)->value = (yyvsp[(4) - (4)].a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3775 | } |
| 3776 | break; |
| 3777 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3778 | case 158: |
| 3779 | #line 1605 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3780 | { asn1p_lexer_hack_push_opaque_state(); } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3781 | break; |
| 3782 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3783 | case 159: |
| 3784 | #line 1605 "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[(3) - (3)].tv_opaque).buf, (yyvsp[(3) - (3)].tv_opaque).len, 0); |
| 3787 | checkmem((yyval.a_value)); |
| 3788 | (yyval.a_value)->type = ATV_UNPARSED; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3789 | } |
| 3790 | break; |
| 3791 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3792 | case 160: |
| 3793 | #line 1613 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3794 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3795 | (yyval.a_value) = asn1p_value_fromint(0); |
| 3796 | checkmem((yyval.a_value)); |
| 3797 | (yyval.a_value)->type = ATV_NULL; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3798 | } |
| 3799 | break; |
| 3800 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3801 | case 161: |
| 3802 | #line 1618 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3803 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3804 | (yyval.a_value) = asn1p_value_fromint(0); |
| 3805 | checkmem((yyval.a_value)); |
| 3806 | (yyval.a_value)->type = ATV_FALSE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3807 | } |
| 3808 | break; |
| 3809 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3810 | case 162: |
| 3811 | #line 1623 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3812 | { |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3813 | (yyval.a_value) = asn1p_value_fromint(1); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3814 | checkmem((yyval.a_value)); |
| 3815 | (yyval.a_value)->type = ATV_TRUE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3816 | } |
| 3817 | break; |
| 3818 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3819 | case 168: |
| 3820 | #line 1636 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3821 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3822 | asn1p_ref_t *ref; |
| 3823 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3824 | ref = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3825 | checkmem(ref); |
| 3826 | ret = asn1p_ref_add_component(ref, (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN); |
| 3827 | checkmem(ret == 0); |
| 3828 | ret = asn1p_ref_add_component(ref, (yyvsp[(3) - (3)].tv_str), RLT_lowercase); |
| 3829 | checkmem(ret == 0); |
| 3830 | (yyval.a_value) = asn1p_value_fromref(ref, 0); |
| 3831 | checkmem((yyval.a_value)); |
| 3832 | free((yyvsp[(1) - (3)].tv_str)); |
| 3833 | free((yyvsp[(3) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3834 | } |
| 3835 | break; |
| 3836 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3837 | case 169: |
| 3838 | #line 1654 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3839 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3840 | (yyval.a_value) = asn1p_value_frombuf((yyvsp[(1) - (1)].tv_opaque).buf, (yyvsp[(1) - (1)].tv_opaque).len, 0); |
| 3841 | checkmem((yyval.a_value)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3842 | } |
| 3843 | break; |
| 3844 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3845 | case 170: |
| 3846 | #line 1658 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3847 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3848 | (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int)); |
| 3849 | checkmem((yyval.a_value)); |
| 3850 | (yyval.a_value)->type = ATV_TUPLE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3851 | } |
| 3852 | break; |
| 3853 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3854 | case 171: |
| 3855 | #line 1663 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3856 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3857 | (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int)); |
| 3858 | checkmem((yyval.a_value)); |
| 3859 | (yyval.a_value)->type = ATV_QUADRUPLE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3860 | } |
| 3861 | break; |
| 3862 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3863 | case 172: |
| 3864 | #line 1671 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3865 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3866 | (yyval.tv_opaque).len = (yyvsp[(1) - (1)].tv_opaque).len + 1; |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 3867 | (yyval.tv_opaque).buf = malloc(1 + (yyval.tv_opaque).len + 1); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3868 | checkmem((yyval.tv_opaque).buf); |
| 3869 | (yyval.tv_opaque).buf[0] = '{'; |
| 3870 | memcpy((yyval.tv_opaque).buf + 1, (yyvsp[(1) - (1)].tv_opaque).buf, (yyvsp[(1) - (1)].tv_opaque).len); |
| 3871 | (yyval.tv_opaque).buf[(yyval.tv_opaque).len] = '\0'; |
| 3872 | free((yyvsp[(1) - (1)].tv_opaque).buf); |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 3873 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3874 | break; |
| 3875 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3876 | case 173: |
| 3877 | #line 1680 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3878 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3879 | int newsize = (yyvsp[(1) - (2)].tv_opaque).len + (yyvsp[(2) - (2)].tv_opaque).len; |
| 3880 | char *p = malloc(newsize + 1); |
| 3881 | checkmem(p); |
| 3882 | memcpy(p , (yyvsp[(1) - (2)].tv_opaque).buf, (yyvsp[(1) - (2)].tv_opaque).len); |
| 3883 | memcpy(p + (yyvsp[(1) - (2)].tv_opaque).len, (yyvsp[(2) - (2)].tv_opaque).buf, (yyvsp[(2) - (2)].tv_opaque).len); |
| 3884 | p[newsize] = '\0'; |
| 3885 | free((yyvsp[(1) - (2)].tv_opaque).buf); |
| 3886 | free((yyvsp[(2) - (2)].tv_opaque).buf); |
| 3887 | (yyval.tv_opaque).buf = p; |
| 3888 | (yyval.tv_opaque).len = newsize; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3889 | } |
| 3890 | break; |
| 3891 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3892 | case 175: |
| 3893 | #line 1696 "asn1p_y.y" |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 3894 | { |
| 3895 | (yyval.tv_opaque).len = strlen((yyvsp[(1) - (1)].tv_str)); |
| 3896 | (yyval.tv_opaque).buf = (yyvsp[(1) - (1)].tv_str); |
| 3897 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3898 | break; |
| 3899 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3900 | case 176: |
| 3901 | #line 1702 "asn1p_y.y" |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 3902 | { (yyval.a_type) = ASN_BASIC_BOOLEAN; } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3903 | break; |
| 3904 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3905 | case 177: |
| 3906 | #line 1703 "asn1p_y.y" |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 3907 | { (yyval.a_type) = ASN_BASIC_NULL; } |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 3908 | break; |
| 3909 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3910 | case 178: |
| 3911 | #line 1704 "asn1p_y.y" |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 3912 | { (yyval.a_type) = ASN_BASIC_REAL; } |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 3913 | break; |
| 3914 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3915 | case 179: |
| 3916 | #line 1705 "asn1p_y.y" |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 3917 | { (yyval.a_type) = ASN_BASIC_OCTET_STRING; } |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 3918 | break; |
| 3919 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3920 | case 180: |
| 3921 | #line 1706 "asn1p_y.y" |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 3922 | { (yyval.a_type) = ASN_BASIC_OBJECT_IDENTIFIER; } |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 3923 | break; |
| 3924 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3925 | case 181: |
| 3926 | #line 1707 "asn1p_y.y" |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 3927 | { (yyval.a_type) = ASN_BASIC_RELATIVE_OID; } |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 3928 | break; |
| 3929 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3930 | case 182: |
| 3931 | #line 1708 "asn1p_y.y" |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 3932 | { (yyval.a_type) = ASN_BASIC_EXTERNAL; } |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 3933 | break; |
| 3934 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3935 | case 183: |
| 3936 | #line 1709 "asn1p_y.y" |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 3937 | { (yyval.a_type) = ASN_BASIC_EMBEDDED_PDV; } |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 3938 | break; |
| 3939 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3940 | case 184: |
| 3941 | #line 1710 "asn1p_y.y" |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 3942 | { (yyval.a_type) = ASN_BASIC_CHARACTER_STRING; } |
| 3943 | break; |
| 3944 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3945 | case 185: |
| 3946 | #line 1711 "asn1p_y.y" |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 3947 | { (yyval.a_type) = ASN_BASIC_UTCTime; } |
| 3948 | break; |
| 3949 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3950 | case 186: |
| 3951 | #line 1712 "asn1p_y.y" |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 3952 | { (yyval.a_type) = ASN_BASIC_GeneralizedTime; } |
| 3953 | break; |
| 3954 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3955 | case 189: |
| 3956 | #line 1721 "asn1p_y.y" |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 3957 | { (yyval.a_type) = ASN_BASIC_INTEGER; } |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 3958 | break; |
| 3959 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3960 | case 190: |
| 3961 | #line 1722 "asn1p_y.y" |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 3962 | { (yyval.a_type) = ASN_BASIC_ENUMERATED; } |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 3963 | break; |
| 3964 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3965 | case 191: |
| 3966 | #line 1723 "asn1p_y.y" |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 3967 | { (yyval.a_type) = ASN_BASIC_BIT_STRING; } |
| 3968 | break; |
| 3969 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3970 | case 192: |
| 3971 | #line 1727 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3972 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3973 | (yyval.a_expr) = NEW_EXPR(); |
| 3974 | checkmem((yyval.a_expr)); |
| 3975 | (yyval.a_expr)->expr_type = (yyvsp[(1) - (1)].a_type); |
| 3976 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3977 | } |
| 3978 | break; |
| 3979 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3980 | case 193: |
| 3981 | #line 1733 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3982 | { |
Lev Walkin | be518fa | 2017-09-07 02:05:28 -0700 | [diff] [blame] | 3983 | (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr); |
| 3984 | (yyval.a_expr)->expr_type = ASN_BASIC_INTEGER; |
| 3985 | (yyval.a_expr)->meta_type = AMT_TYPE; |
| 3986 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3987 | break; |
| 3988 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3989 | case 194: |
| 3990 | #line 1738 "asn1p_y.y" |
Lev Walkin | be518fa | 2017-09-07 02:05:28 -0700 | [diff] [blame] | 3991 | { |
| 3992 | (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr); |
| 3993 | (yyval.a_expr)->expr_type = ASN_BASIC_ENUMERATED; |
| 3994 | (yyval.a_expr)->meta_type = AMT_TYPE; |
| 3995 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3996 | break; |
| 3997 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 3998 | case 195: |
| 3999 | #line 1743 "asn1p_y.y" |
Lev Walkin | be518fa | 2017-09-07 02:05:28 -0700 | [diff] [blame] | 4000 | { |
| 4001 | (yyval.a_expr) = (yyvsp[(4) - (5)].a_expr); |
| 4002 | (yyval.a_expr)->expr_type = ASN_BASIC_BIT_STRING; |
| 4003 | (yyval.a_expr)->meta_type = AMT_TYPE; |
| 4004 | } |
| 4005 | break; |
| 4006 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4007 | case 196: |
| 4008 | #line 1748 "asn1p_y.y" |
Lev Walkin | be518fa | 2017-09-07 02:05:28 -0700 | [diff] [blame] | 4009 | { |
| 4010 | (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr); |
| 4011 | (yyval.a_expr)->expr_type = ASN_BASIC_BIT_STRING; |
| 4012 | (yyval.a_expr)->meta_type = AMT_TYPE; |
| 4013 | } |
| 4014 | break; |
| 4015 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4016 | case 197: |
| 4017 | #line 1753 "asn1p_y.y" |
Lev Walkin | be518fa | 2017-09-07 02:05:28 -0700 | [diff] [blame] | 4018 | { |
| 4019 | (yyval.a_expr) = NEW_EXPR(); |
| 4020 | checkmem((yyval.a_expr)); |
| 4021 | (yyval.a_expr)->expr_type = ASN_BASIC_BIT_STRING; |
| 4022 | (yyval.a_expr)->meta_type = AMT_TYPE; |
| 4023 | } |
| 4024 | break; |
| 4025 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4026 | case 198: |
| 4027 | #line 1762 "asn1p_y.y" |
Lev Walkin | be518fa | 2017-09-07 02:05:28 -0700 | [diff] [blame] | 4028 | { (yyval.a_type) = ASN_STRING_BMPString; } |
| 4029 | break; |
| 4030 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4031 | case 199: |
| 4032 | #line 1763 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4033 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4034 | (yyval.a_type) = ASN_STRING_GeneralString; |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 4035 | fprintf(stderr, "WARNING: GeneralString is not fully supported\n"); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4036 | } |
| 4037 | break; |
| 4038 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4039 | case 200: |
| 4040 | #line 1767 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4041 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4042 | (yyval.a_type) = ASN_STRING_GraphicString; |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 4043 | fprintf(stderr, "WARNING: GraphicString is not fully supported\n"); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4044 | } |
| 4045 | break; |
| 4046 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4047 | case 201: |
| 4048 | #line 1771 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4049 | { (yyval.a_type) = ASN_STRING_IA5String; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4050 | break; |
| 4051 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4052 | case 202: |
| 4053 | #line 1772 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4054 | { (yyval.a_type) = ASN_STRING_ISO646String; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4055 | break; |
| 4056 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4057 | case 203: |
| 4058 | #line 1773 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4059 | { (yyval.a_type) = ASN_STRING_NumericString; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4060 | break; |
| 4061 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4062 | case 204: |
| 4063 | #line 1774 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4064 | { (yyval.a_type) = ASN_STRING_PrintableString; } |
| 4065 | break; |
| 4066 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4067 | case 205: |
| 4068 | #line 1775 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4069 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4070 | (yyval.a_type) = ASN_STRING_T61String; |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 4071 | fprintf(stderr, "WARNING: T61String is not fully supported\n"); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4072 | } |
| 4073 | break; |
| 4074 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4075 | case 206: |
| 4076 | #line 1779 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4077 | { (yyval.a_type) = ASN_STRING_TeletexString; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4078 | break; |
| 4079 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4080 | case 207: |
| 4081 | #line 1780 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4082 | { (yyval.a_type) = ASN_STRING_UniversalString; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4083 | break; |
| 4084 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4085 | case 208: |
| 4086 | #line 1781 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4087 | { (yyval.a_type) = ASN_STRING_UTF8String; } |
| 4088 | break; |
| 4089 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4090 | case 209: |
| 4091 | #line 1782 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4092 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4093 | (yyval.a_type) = ASN_STRING_VideotexString; |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 4094 | fprintf(stderr, "WARNING: VideotexString is not fully supported\n"); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4095 | } |
| 4096 | break; |
| 4097 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4098 | case 210: |
| 4099 | #line 1786 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4100 | { (yyval.a_type) = ASN_STRING_VisibleString; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4101 | break; |
| 4102 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4103 | case 211: |
| 4104 | #line 1787 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4105 | { (yyval.a_type) = ASN_STRING_ObjectDescriptor; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4106 | break; |
| 4107 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4108 | case 216: |
| 4109 | #line 1799 "asn1p_y.y" |
Lev Walkin | be518fa | 2017-09-07 02:05:28 -0700 | [diff] [blame] | 4110 | { (yyval.a_constr) = 0; } |
| 4111 | break; |
| 4112 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4113 | case 218: |
| 4114 | #line 1804 "asn1p_y.y" |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 4115 | { (yyval.a_constr) = 0; } |
| 4116 | break; |
| 4117 | |
| 4118 | case 220: |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4119 | #line 1809 "asn1p_y.y" |
| 4120 | { (yyval.a_constr) = 0; } |
| 4121 | break; |
| 4122 | |
| 4123 | case 223: |
| 4124 | #line 1815 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4125 | { |
Lev Walkin | 0c68645 | 2017-09-07 22:59:36 -0700 | [diff] [blame] | 4126 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(2) - (3)].a_constr), 0); |
| 4127 | } |
| 4128 | break; |
| 4129 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4130 | case 225: |
| 4131 | #line 1822 "asn1p_y.y" |
Lev Walkin | 0c68645 | 2017-09-07 22:59:36 -0700 | [diff] [blame] | 4132 | { |
| 4133 | if((yyvsp[(2) - (2)].a_constr)->type == ACT_CA_SET && (yyvsp[(2) - (2)].a_constr)->el_count == 1) { |
| 4134 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(1) - (2)].a_constr), (yyvsp[(2) - (2)].a_constr)->elements[0]); |
| 4135 | } else { |
| 4136 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(1) - (2)].a_constr), (yyvsp[(2) - (2)].a_constr)); |
| 4137 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4138 | } |
| 4139 | break; |
| 4140 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4141 | case 229: |
| 4142 | #line 1836 "asn1p_y.y" |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4143 | { |
| 4144 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
| 4145 | (yyval.a_constr)->type = ACT_EL_EXT; |
| 4146 | } |
| 4147 | break; |
| 4148 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4149 | case 231: |
| 4150 | #line 1841 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4151 | { |
Lev Walkin | 0c68645 | 2017-09-07 22:59:36 -0700 | [diff] [blame] | 4152 | asn1p_constraint_t *ct; |
| 4153 | ct = asn1p_constraint_new(yylineno, currentModule); |
| 4154 | ct->type = ACT_EL_EXT; |
| 4155 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, (yyvsp[(1) - (3)].a_constr), ct); |
| 4156 | } |
Lev Walkin | c6ab03c | 2006-10-21 05:54:49 +0000 | [diff] [blame] | 4157 | break; |
| 4158 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4159 | case 232: |
| 4160 | #line 1847 "asn1p_y.y" |
Lev Walkin | 0c68645 | 2017-09-07 22:59:36 -0700 | [diff] [blame] | 4161 | { |
| 4162 | asn1p_constraint_t *ct; |
| 4163 | ct = asn1p_constraint_new(yylineno, currentModule); |
| 4164 | ct->type = ACT_EL_EXT; |
| 4165 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, (yyvsp[(1) - (5)].a_constr), ct); |
| 4166 | ct = (yyval.a_constr); |
| 4167 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, ct, (yyvsp[(5) - (5)].a_constr)); |
| 4168 | } |
| 4169 | break; |
| 4170 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4171 | case 234: |
| 4172 | #line 1859 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4173 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4174 | 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] | 4175 | } |
| 4176 | break; |
| 4177 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4178 | case 236: |
| 4179 | #line 1866 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4180 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4181 | 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] | 4182 | } |
| 4183 | break; |
| 4184 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4185 | case 238: |
| 4186 | #line 1873 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4187 | { |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 4188 | 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] | 4189 | } |
| 4190 | break; |
| 4191 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4192 | case 240: |
| 4193 | #line 1881 "asn1p_y.y" |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 4194 | { |
| 4195 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_EXC, (yyvsp[(1) - (3)].a_constr), (yyvsp[(3) - (3)].a_constr)); |
| 4196 | } |
| 4197 | break; |
| 4198 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4199 | case 242: |
| 4200 | #line 1888 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4201 | { |
Lev Walkin | 0c68645 | 2017-09-07 22:59:36 -0700 | [diff] [blame] | 4202 | int ret; |
| 4203 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
| 4204 | checkmem((yyval.a_constr)); |
| 4205 | (yyval.a_constr)->type = ACT_CA_SET; |
| 4206 | ret = asn1p_constraint_insert((yyval.a_constr), (yyvsp[(2) - (3)].a_constr)); |
| 4207 | checkmem(ret == 0); |
| 4208 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4209 | break; |
| 4210 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4211 | case 243: |
| 4212 | #line 1899 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4213 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4214 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4215 | checkmem((yyval.a_constr)); |
| 4216 | (yyval.a_constr)->type = ACT_EL_VALUE; |
| 4217 | (yyval.a_constr)->value = (yyvsp[(1) - (1)].a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4218 | } |
| 4219 | break; |
| 4220 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4221 | case 244: |
| 4222 | #line 1905 "asn1p_y.y" |
Lev Walkin | f172715 | 2006-09-21 01:50:37 +0000 | [diff] [blame] | 4223 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4224 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4225 | checkmem((yyval.a_constr)); |
| 4226 | (yyval.a_constr)->type = ACT_EL_TYPE; |
| 4227 | (yyval.a_constr)->containedSubtype = (yyvsp[(1) - (1)].a_value); |
Lev Walkin | f172715 | 2006-09-21 01:50:37 +0000 | [diff] [blame] | 4228 | } |
| 4229 | break; |
| 4230 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4231 | case 250: |
| 4232 | #line 1921 "asn1p_y.y" |
Lev Walkin | 0c68645 | 2017-09-07 22:59:36 -0700 | [diff] [blame] | 4233 | { |
| 4234 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_FROM, (yyvsp[(2) - (2)].a_constr), 0); |
| 4235 | } |
| 4236 | break; |
| 4237 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4238 | case 251: |
| 4239 | #line 1926 "asn1p_y.y" |
Lev Walkin | 0c68645 | 2017-09-07 22:59:36 -0700 | [diff] [blame] | 4240 | { |
| 4241 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_SIZE, (yyvsp[(2) - (2)].a_constr), 0); |
| 4242 | } |
| 4243 | break; |
| 4244 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4245 | case 252: |
| 4246 | #line 1931 "asn1p_y.y" |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4247 | { |
| 4248 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4249 | (yyval.a_constr)->type = ACT_CT_PATTERN; |
| 4250 | (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] | 4251 | } |
| 4252 | break; |
| 4253 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4254 | case 253: |
| 4255 | #line 1936 "asn1p_y.y" |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4256 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4257 | asn1p_ref_t *ref; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4258 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4259 | (yyval.a_constr)->type = ACT_CT_PATTERN; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4260 | ref = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4261 | asn1p_ref_add_component(ref, (yyvsp[(2) - (2)].tv_str), RLT_lowercase); |
| 4262 | (yyval.a_constr)->value = asn1p_value_fromref(ref, 0); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4263 | free((yyvsp[(2) - (2)].tv_str)); |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4264 | } |
| 4265 | break; |
| 4266 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4267 | case 254: |
| 4268 | #line 1948 "asn1p_y.y" |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4269 | { |
Lev Walkin | 0c68645 | 2017-09-07 22:59:36 -0700 | [diff] [blame] | 4270 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
| 4271 | checkmem((yyval.a_constr)); |
| 4272 | (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype); |
| 4273 | (yyval.a_constr)->range_start = (yyvsp[(1) - (3)].a_value); |
| 4274 | (yyval.a_constr)->range_stop = (yyvsp[(3) - (3)].a_value); |
| 4275 | } |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4276 | break; |
| 4277 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4278 | case 256: |
| 4279 | #line 1958 "asn1p_y.y" |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4280 | { |
Lev Walkin | 0c68645 | 2017-09-07 22:59:36 -0700 | [diff] [blame] | 4281 | (yyval.a_value) = asn1p_value_fromint(-123); |
| 4282 | (yyval.a_value)->type = ATV_MIN; |
| 4283 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4284 | break; |
| 4285 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4286 | case 258: |
| 4287 | #line 1965 "asn1p_y.y" |
Lev Walkin | 0c68645 | 2017-09-07 22:59:36 -0700 | [diff] [blame] | 4288 | { |
| 4289 | (yyval.a_value) = asn1p_value_fromint(321); |
| 4290 | (yyval.a_value)->type = ATV_MAX; |
| 4291 | } |
| 4292 | break; |
| 4293 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4294 | case 260: |
| 4295 | #line 1973 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4296 | { |
| 4297 | (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'B'); |
| 4298 | checkmem((yyval.a_value)); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4299 | free((yyvsp[(1) - (1)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4300 | } |
| 4301 | break; |
| 4302 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4303 | case 261: |
| 4304 | #line 1978 "asn1p_y.y" |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4305 | { |
| 4306 | (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'H'); |
| 4307 | checkmem((yyval.a_value)); |
| 4308 | free((yyvsp[(1) - (1)].tv_str)); |
| 4309 | } |
| 4310 | break; |
| 4311 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4312 | case 262: |
| 4313 | #line 1986 "asn1p_y.y" |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4314 | { |
Lev Walkin | 0c68645 | 2017-09-07 22:59:36 -0700 | [diff] [blame] | 4315 | (yyval.a_value) = asn1p_value_fromtype((yyvsp[(2) - (2)].a_expr)); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4316 | checkmem((yyval.a_value)); |
Lev Walkin | ed409e2 | 2017-09-26 18:07:40 -0700 | [diff] [blame] | 4317 | asn1p_expr_free((yyvsp[(2) - (2)].a_expr)); |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 4318 | } |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4319 | break; |
| 4320 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4321 | case 263: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4322 | #line 1992 "asn1p_y.y" |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4323 | { |
| 4324 | (yyval.a_value) = asn1p_value_fromtype((yyvsp[(1) - (1)].a_expr)); |
| 4325 | checkmem((yyval.a_value)); |
Lev Walkin | ed409e2 | 2017-09-26 18:07:40 -0700 | [diff] [blame] | 4326 | asn1p_expr_free((yyvsp[(1) - (1)].a_expr)); |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4327 | } |
Lev Walkin | 0c68645 | 2017-09-07 22:59:36 -0700 | [diff] [blame] | 4328 | break; |
| 4329 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4330 | case 264: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4331 | #line 2004 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4332 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4333 | 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] | 4334 | } |
| 4335 | break; |
| 4336 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4337 | case 265: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4338 | #line 2007 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4339 | { |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 4340 | assert((yyvsp[(3) - (3)].a_constr)->type == ACT_CA_CSV); |
| 4341 | (yyvsp[(3) - (3)].a_constr)->type = ACT_CT_WCOMPS; |
| 4342 | (yyval.a_constr) = (yyvsp[(3) - (3)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4343 | } |
| 4344 | break; |
| 4345 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4346 | case 269: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4347 | #line 2015 "asn1p_y.y" |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 4348 | { (yyval.a_constr) = (yyvsp[(2) - (3)].a_constr); } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4349 | break; |
| 4350 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4351 | case 270: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4352 | #line 2017 "asn1p_y.y" |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 4353 | { |
| 4354 | assert((yyvsp[(4) - (5)].a_constr)->type == ACT_CA_CSV); |
| 4355 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
| 4356 | (yyval.a_constr)->type = ACT_CA_CSV; |
| 4357 | asn1p_constraint_t *ct = asn1p_constraint_new(yylineno, currentModule); |
| 4358 | checkmem((yyval.a_constr)); |
| 4359 | ct->type = ACT_EL_EXT; |
| 4360 | asn1p_constraint_insert((yyval.a_constr), ct); |
| 4361 | for(unsigned i = 0; i < (yyvsp[(4) - (5)].a_constr)->el_count; i++) { |
| 4362 | asn1p_constraint_insert((yyval.a_constr), (yyvsp[(4) - (5)].a_constr)->elements[i]); |
| 4363 | } |
| 4364 | } |
| 4365 | break; |
| 4366 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4367 | case 271: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4368 | #line 2030 "asn1p_y.y" |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 4369 | { |
| 4370 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
| 4371 | (yyval.a_constr)->type = ACT_CA_CSV; |
| 4372 | asn1p_constraint_insert((yyval.a_constr), (yyvsp[(1) - (1)].a_constr)); |
| 4373 | } |
| 4374 | break; |
| 4375 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4376 | case 272: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4377 | #line 2035 "asn1p_y.y" |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 4378 | { |
| 4379 | (yyval.a_constr) = (yyvsp[(1) - (3)].a_constr); |
| 4380 | asn1p_constraint_insert((yyval.a_constr), (yyvsp[(3) - (3)].a_constr)); |
| 4381 | } |
| 4382 | break; |
| 4383 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4384 | case 273: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4385 | #line 2041 "asn1p_y.y" |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 4386 | { |
| 4387 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
| 4388 | checkmem((yyval.a_constr)); |
| 4389 | (yyval.a_constr)->type = ACT_EL_VALUE; |
| 4390 | (yyval.a_constr)->value = (yyvsp[(1) - (3)].a_value); |
| 4391 | if((yyvsp[(2) - (3)].a_constr)) asn1p_constraint_insert((yyval.a_constr), (yyvsp[(2) - (3)].a_constr)); |
| 4392 | (yyval.a_constr)->presence = (yyvsp[(3) - (3)].a_pres); |
| 4393 | } |
| 4394 | break; |
| 4395 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4396 | case 274: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4397 | #line 2055 "asn1p_y.y" |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 4398 | { (yyval.a_pres) = ACPRES_DEFAULT; } |
| 4399 | break; |
| 4400 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4401 | case 275: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4402 | #line 2056 "asn1p_y.y" |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 4403 | { (yyval.a_pres) = (yyvsp[(1) - (1)].a_pres); } |
| 4404 | break; |
| 4405 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4406 | case 276: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4407 | #line 2060 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4408 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4409 | (yyval.a_pres) = ACPRES_PRESENT; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4410 | } |
| 4411 | break; |
| 4412 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4413 | case 277: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4414 | #line 2063 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4415 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4416 | (yyval.a_pres) = ACPRES_ABSENT; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4417 | } |
| 4418 | break; |
| 4419 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4420 | case 278: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4421 | #line 2066 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4422 | { |
| 4423 | (yyval.a_pres) = ACPRES_OPTIONAL; |
| 4424 | } |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 4425 | break; |
| 4426 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4427 | case 282: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4428 | #line 2081 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4429 | { asn1p_lexer_hack_push_opaque_state(); } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4430 | break; |
| 4431 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4432 | case 283: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4433 | #line 2081 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 4434 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4435 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4436 | checkmem((yyval.a_constr)); |
| 4437 | (yyval.a_constr)->type = ACT_CT_CTDBY; |
| 4438 | (yyval.a_constr)->value = asn1p_value_frombuf((yyvsp[(5) - (5)].tv_opaque).buf, (yyvsp[(5) - (5)].tv_opaque).len, 0); |
| 4439 | checkmem((yyval.a_constr)->value); |
| 4440 | (yyval.a_constr)->value->type = ATV_UNPARSED; |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 4441 | } |
| 4442 | break; |
| 4443 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4444 | case 284: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4445 | #line 2092 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4446 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4447 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4448 | (yyval.a_constr)->type = ACT_CT_CTNG; |
| 4449 | (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] | 4450 | asn1p_expr_free((yyvsp[(2) - (2)].a_expr)); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4451 | } |
| 4452 | break; |
| 4453 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4454 | case 285: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4455 | #line 2101 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4456 | { (yyval.a_ctype) = ACT_EL_RANGE; } |
| 4457 | break; |
| 4458 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4459 | case 286: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4460 | #line 2102 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4461 | { (yyval.a_ctype) = ACT_EL_RLRANGE; } |
| 4462 | break; |
| 4463 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4464 | case 287: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4465 | #line 2103 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4466 | { (yyval.a_ctype) = ACT_EL_LLRANGE; } |
| 4467 | break; |
| 4468 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4469 | case 288: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4470 | #line 2104 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4471 | { (yyval.a_ctype) = ACT_EL_ULRANGE; } |
| 4472 | break; |
| 4473 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4474 | case 289: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4475 | #line 2107 "asn1p_y.y" |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 4476 | { |
| 4477 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
| 4478 | } |
| 4479 | break; |
| 4480 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4481 | case 290: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4482 | #line 2110 "asn1p_y.y" |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 4483 | { |
| 4484 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
| 4485 | } |
| 4486 | break; |
| 4487 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4488 | case 291: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4489 | #line 2119 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4490 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4491 | asn1p_ref_t *ref = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4492 | asn1p_constraint_t *ct; |
| 4493 | int ret; |
| 4494 | ret = asn1p_ref_add_component(ref, (yyvsp[(2) - (3)].tv_str), 0); |
| 4495 | checkmem(ret == 0); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4496 | ct = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4497 | checkmem((yyval.a_constr)); |
| 4498 | ct->type = ACT_EL_VALUE; |
| 4499 | ct->value = asn1p_value_fromref(ref, 0); |
| 4500 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CRC, ct, 0); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4501 | free((yyvsp[(2) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4502 | } |
| 4503 | break; |
| 4504 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4505 | case 292: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4506 | #line 2135 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4507 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4508 | 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] | 4509 | } |
| 4510 | break; |
| 4511 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4512 | case 293: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4513 | #line 2141 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4514 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4515 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4516 | checkmem((yyval.a_constr)); |
| 4517 | (yyval.a_constr)->type = ACT_EL_VALUE; |
| 4518 | (yyval.a_constr)->value = asn1p_value_fromref((yyvsp[(1) - (1)].a_ref), 0); |
| 4519 | } |
| 4520 | break; |
| 4521 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4522 | case 294: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4523 | #line 2147 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4524 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4525 | asn1p_constraint_t *ct; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4526 | ct = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4527 | checkmem(ct); |
| 4528 | ct->type = ACT_EL_VALUE; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4529 | ct->value = asn1p_value_fromref((yyvsp[(3) - (3)].a_ref), 0); |
| 4530 | 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] | 4531 | } |
| 4532 | break; |
| 4533 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4534 | case 295: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4535 | #line 2161 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4536 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4537 | char *p = malloc(strlen((yyvsp[(2) - (2)].tv_str)) + 2); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4538 | int ret; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4539 | *p = '@'; |
| 4540 | strcpy(p + 1, (yyvsp[(2) - (2)].tv_str)); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4541 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4542 | ret = asn1p_ref_add_component((yyval.a_ref), p, 0); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4543 | checkmem(ret == 0); |
| 4544 | free(p); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4545 | free((yyvsp[(2) - (2)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4546 | } |
| 4547 | break; |
| 4548 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4549 | case 296: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4550 | #line 2172 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4551 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4552 | char *p = malloc(strlen((yyvsp[(3) - (3)].tv_str)) + 3); |
| 4553 | int ret; |
| 4554 | p[0] = '@'; |
| 4555 | p[1] = '.'; |
| 4556 | strcpy(p + 2, (yyvsp[(3) - (3)].tv_str)); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4557 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4558 | ret = asn1p_ref_add_component((yyval.a_ref), p, 0); |
| 4559 | checkmem(ret == 0); |
| 4560 | free(p); |
| 4561 | free((yyvsp[(3) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4562 | } |
| 4563 | break; |
| 4564 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4565 | case 297: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4566 | #line 2188 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4567 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4568 | (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4569 | } |
| 4570 | break; |
| 4571 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4572 | case 298: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4573 | #line 2191 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4574 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4575 | int l1 = strlen((yyvsp[(1) - (3)].tv_str)); |
| 4576 | int l3 = strlen((yyvsp[(3) - (3)].tv_str)); |
| 4577 | (yyval.tv_str) = malloc(l1 + 1 + l3 + 1); |
| 4578 | memcpy((yyval.tv_str), (yyvsp[(1) - (3)].tv_str), l1); |
| 4579 | (yyval.tv_str)[l1] = '.'; |
| 4580 | memcpy((yyval.tv_str) + l1 + 1, (yyvsp[(3) - (3)].tv_str), l3); |
| 4581 | (yyval.tv_str)[l1 + 1 + l3] = '\0'; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4582 | free((yyvsp[(1) - (3)].tv_str)); |
| 4583 | free((yyvsp[(3) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4584 | } |
| 4585 | break; |
| 4586 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4587 | case 299: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4588 | #line 2211 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4589 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4590 | (yyval.a_marker).flags = EM_NOMARK; |
| 4591 | (yyval.a_marker).default_value = 0; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4592 | } |
| 4593 | break; |
| 4594 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4595 | case 300: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4596 | #line 2215 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4597 | { (yyval.a_marker) = (yyvsp[(1) - (1)].a_marker); } |
| 4598 | break; |
| 4599 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4600 | case 301: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4601 | #line 2219 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4602 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4603 | (yyval.a_marker).flags = EM_OPTIONAL | EM_INDIRECT; |
| 4604 | (yyval.a_marker).default_value = 0; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4605 | } |
| 4606 | break; |
| 4607 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4608 | case 302: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4609 | #line 2223 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4610 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4611 | (yyval.a_marker).flags = EM_DEFAULT; |
| 4612 | (yyval.a_marker).default_value = (yyvsp[(2) - (2)].a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4613 | } |
| 4614 | break; |
| 4615 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4616 | case 303: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4617 | #line 2230 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4618 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4619 | (yyval.a_expr) = NEW_EXPR(); |
| 4620 | checkmem((yyval.a_expr)); |
Lev Walkin | be518fa | 2017-09-07 02:05:28 -0700 | [diff] [blame] | 4621 | asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr)); |
| 4622 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4623 | break; |
| 4624 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4625 | case 304: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4626 | #line 2235 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4627 | { |
Lev Walkin | be518fa | 2017-09-07 02:05:28 -0700 | [diff] [blame] | 4628 | (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); |
| 4629 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
| 4630 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4631 | break; |
| 4632 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4633 | case 305: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4634 | #line 2241 "asn1p_y.y" |
Lev Walkin | be518fa | 2017-09-07 02:05:28 -0700 | [diff] [blame] | 4635 | { |
| 4636 | (yyval.a_expr) = NEW_EXPR(); |
| 4637 | checkmem((yyval.a_expr)); |
| 4638 | (yyval.a_expr)->expr_type = A1TC_UNIVERVAL; |
| 4639 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 4640 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str); |
| 4641 | } |
| 4642 | break; |
| 4643 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4644 | case 306: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4645 | #line 2250 "asn1p_y.y" |
Lev Walkin | be518fa | 2017-09-07 02:05:28 -0700 | [diff] [blame] | 4646 | { |
Lev Walkin | 0c68645 | 2017-09-07 22:59:36 -0700 | [diff] [blame] | 4647 | (yyval.a_expr) = NEW_EXPR(); |
| 4648 | checkmem((yyval.a_expr)); |
| 4649 | asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr)); |
| 4650 | } |
| 4651 | break; |
| 4652 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4653 | case 307: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4654 | #line 2255 "asn1p_y.y" |
Lev Walkin | 0c68645 | 2017-09-07 22:59:36 -0700 | [diff] [blame] | 4655 | { |
Lev Walkin | be518fa | 2017-09-07 02:05:28 -0700 | [diff] [blame] | 4656 | (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); |
| 4657 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
| 4658 | } |
| 4659 | break; |
| 4660 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4661 | case 308: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4662 | #line 2262 "asn1p_y.y" |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4663 | { |
| 4664 | (yyval.a_expr) = NEW_EXPR(); |
| 4665 | checkmem((yyval.a_expr)); |
| 4666 | (yyval.a_expr)->expr_type = A1TC_UNIVERVAL; |
| 4667 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 4668 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str); |
| 4669 | (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value); |
| 4670 | } |
| 4671 | break; |
| 4672 | |
| 4673 | case 309: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4674 | #line 2270 "asn1p_y.y" |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4675 | { |
| 4676 | (yyval.a_expr) = NEW_EXPR(); |
| 4677 | checkmem((yyval.a_expr)); |
| 4678 | (yyval.a_expr)->expr_type = A1TC_UNIVERVAL; |
| 4679 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 4680 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str); |
| 4681 | (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value); |
| 4682 | } |
| 4683 | break; |
| 4684 | |
| 4685 | case 310: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4686 | #line 2280 "asn1p_y.y" |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4687 | { |
| 4688 | (yyval.a_expr) = NEW_EXPR(); |
| 4689 | checkmem((yyval.a_expr)); |
| 4690 | asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr)); |
| 4691 | } |
| 4692 | break; |
| 4693 | |
| 4694 | case 311: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4695 | #line 2285 "asn1p_y.y" |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4696 | { |
| 4697 | (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); |
| 4698 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
| 4699 | } |
| 4700 | break; |
| 4701 | |
| 4702 | case 312: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4703 | #line 2292 "asn1p_y.y" |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4704 | { |
| 4705 | (yyval.a_expr) = NEW_EXPR(); |
| 4706 | checkmem((yyval.a_expr)); |
| 4707 | (yyval.a_expr)->expr_type = A1TC_UNIVERVAL; |
| 4708 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 4709 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str); |
| 4710 | (yyval.a_expr)->value = asn1p_value_fromint((yyvsp[(3) - (4)].a_int)); |
| 4711 | } |
| 4712 | break; |
| 4713 | |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 4714 | case 313: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4715 | #line 2300 "asn1p_y.y" |
Lev Walkin | 0c68645 | 2017-09-07 22:59:36 -0700 | [diff] [blame] | 4716 | { |
| 4717 | (yyval.a_expr) = NEW_EXPR(); |
| 4718 | checkmem((yyval.a_expr)); |
| 4719 | (yyval.a_expr)->expr_type = A1TC_UNIVERVAL; |
| 4720 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 4721 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str); |
| 4722 | (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value); |
| 4723 | } |
| 4724 | break; |
| 4725 | |
Lev Walkin | 0c68645 | 2017-09-07 22:59:36 -0700 | [diff] [blame] | 4726 | case 314: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4727 | #line 2310 "asn1p_y.y" |
Lev Walkin | be518fa | 2017-09-07 02:05:28 -0700 | [diff] [blame] | 4728 | { |
| 4729 | (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); |
| 4730 | asn1p_expr_t *first_memb = TQ_FIRST(&((yyval.a_expr)->members)); |
| 4731 | if(first_memb) { |
| 4732 | if(first_memb->expr_type == A1TC_EXTENSIBLE) { |
| 4733 | return yyerror( |
| 4734 | "The ENUMERATION cannot start with extension (...)."); |
| 4735 | } |
| 4736 | } else { |
| 4737 | return yyerror( |
| 4738 | "The ENUMERATION list cannot be empty."); |
| 4739 | } |
| 4740 | } |
| 4741 | break; |
| 4742 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4743 | case 315: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4744 | #line 2325 "asn1p_y.y" |
Lev Walkin | be518fa | 2017-09-07 02:05:28 -0700 | [diff] [blame] | 4745 | { |
| 4746 | (yyval.a_expr) = NEW_EXPR(); |
| 4747 | checkmem((yyval.a_expr)); |
| 4748 | asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr)); |
| 4749 | } |
| 4750 | break; |
| 4751 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4752 | case 316: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4753 | #line 2330 "asn1p_y.y" |
Lev Walkin | be518fa | 2017-09-07 02:05:28 -0700 | [diff] [blame] | 4754 | { |
| 4755 | (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); |
| 4756 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
| 4757 | } |
| 4758 | break; |
| 4759 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4760 | case 317: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4761 | #line 2337 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4762 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4763 | (yyval.a_expr) = NEW_EXPR(); |
| 4764 | checkmem((yyval.a_expr)); |
| 4765 | (yyval.a_expr)->expr_type = A1TC_UNIVERVAL; |
| 4766 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 4767 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4768 | } |
| 4769 | break; |
| 4770 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4771 | case 318: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4772 | #line 2344 "asn1p_y.y" |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4773 | { |
| 4774 | (yyval.a_expr) = NEW_EXPR(); |
| 4775 | checkmem((yyval.a_expr)); |
| 4776 | (yyval.a_expr)->expr_type = A1TC_UNIVERVAL; |
| 4777 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 4778 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str); |
| 4779 | (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value); |
| 4780 | } |
| 4781 | break; |
| 4782 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4783 | case 319: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4784 | #line 2352 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4785 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4786 | (yyval.a_expr) = NEW_EXPR(); |
| 4787 | checkmem((yyval.a_expr)); |
| 4788 | (yyval.a_expr)->expr_type = A1TC_UNIVERVAL; |
| 4789 | (yyval.a_expr)->meta_type = AMT_VALUE; |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 4790 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str); |
| 4791 | (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value); |
| 4792 | } |
| 4793 | break; |
| 4794 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4795 | case 320: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4796 | #line 2360 "asn1p_y.y" |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 4797 | { |
| 4798 | (yyval.a_expr) = NEW_EXPR(); |
| 4799 | checkmem((yyval.a_expr)); |
| 4800 | (yyval.a_expr)->expr_type = A1TC_UNIVERVAL; |
| 4801 | (yyval.a_expr)->meta_type = AMT_VALUE; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4802 | (yyval.a_expr)->value = (yyvsp[(1) - (1)].a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4803 | } |
| 4804 | break; |
| 4805 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4806 | case 321: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4807 | #line 2367 "asn1p_y.y" |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4808 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4809 | (yyval.a_expr) = NEW_EXPR(); |
| 4810 | checkmem((yyval.a_expr)); |
| 4811 | (yyval.a_expr)->Identifier = strdup("..."); |
| 4812 | checkmem((yyval.a_expr)->Identifier); |
| 4813 | (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE; |
| 4814 | (yyval.a_expr)->meta_type = AMT_VALUE; |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4815 | } |
| 4816 | break; |
| 4817 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4818 | case 322: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4819 | #line 2378 "asn1p_y.y" |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4820 | { |
| 4821 | (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int)); |
| 4822 | checkmem((yyval.a_value)); |
| 4823 | } |
| 4824 | break; |
| 4825 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4826 | case 323: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4827 | #line 2382 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4828 | { |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 4829 | (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int)); |
| 4830 | checkmem((yyval.a_value)); |
| 4831 | } |
| 4832 | break; |
| 4833 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4834 | case 324: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4835 | #line 2389 "asn1p_y.y" |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 4836 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4837 | (yyval.a_value) = asn1p_value_fromdouble((yyvsp[(1) - (1)].a_dbl)); |
| 4838 | checkmem((yyval.a_value)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4839 | } |
| 4840 | break; |
| 4841 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4842 | case 325: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4843 | #line 2420 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4844 | { memset(&(yyval.a_tag), 0, sizeof((yyval.a_tag))); } |
| 4845 | break; |
| 4846 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4847 | case 326: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4848 | #line 2421 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4849 | { (yyval.a_tag) = (yyvsp[(1) - (1)].a_tag); } |
| 4850 | break; |
| 4851 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4852 | case 327: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4853 | #line 2425 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4854 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4855 | (yyval.a_tag) = (yyvsp[(1) - (2)].a_tag); |
| 4856 | (yyval.a_tag).tag_mode = (yyvsp[(2) - (2)].a_tag).tag_mode; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4857 | } |
| 4858 | break; |
| 4859 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4860 | case 328: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4861 | #line 2432 "asn1p_y.y" |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4862 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4863 | (yyval.a_tag) = (yyvsp[(2) - (4)].a_tag); |
| 4864 | (yyval.a_tag).tag_value = (yyvsp[(3) - (4)].a_int); |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4865 | } |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4866 | break; |
| 4867 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4868 | case 329: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4869 | #line 2438 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4870 | { (yyval.a_tag).tag_class = TC_CONTEXT_SPECIFIC; } |
| 4871 | break; |
| 4872 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4873 | case 330: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4874 | #line 2439 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4875 | { (yyval.a_tag).tag_class = TC_UNIVERSAL; } |
| 4876 | break; |
| 4877 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4878 | case 331: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4879 | #line 2440 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4880 | { (yyval.a_tag).tag_class = TC_APPLICATION; } |
| 4881 | break; |
| 4882 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4883 | case 332: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4884 | #line 2441 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4885 | { (yyval.a_tag).tag_class = TC_PRIVATE; } |
| 4886 | break; |
| 4887 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4888 | case 333: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4889 | #line 2445 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4890 | { (yyval.a_tag).tag_mode = TM_DEFAULT; } |
| 4891 | break; |
| 4892 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4893 | case 334: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4894 | #line 2446 "asn1p_y.y" |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 4895 | { (yyval.a_tag).tag_mode = TM_IMPLICIT; } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4896 | break; |
| 4897 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4898 | case 335: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4899 | #line 2447 "asn1p_y.y" |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 4900 | { (yyval.a_tag).tag_mode = TM_EXPLICIT; } |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4901 | break; |
| 4902 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4903 | case 336: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4904 | #line 2451 "asn1p_y.y" |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4905 | { |
| 4906 | checkmem((yyvsp[(1) - (1)].tv_str)); |
| 4907 | (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); |
| 4908 | } |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4909 | break; |
| 4910 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4911 | case 337: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4912 | #line 2455 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4913 | { |
| 4914 | checkmem((yyvsp[(1) - (1)].tv_str)); |
| 4915 | (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 4916 | } |
| 4917 | break; |
| 4918 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4919 | case 338: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4920 | #line 2463 "asn1p_y.y" |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 4921 | { (yyval.tv_str) = 0; } |
| 4922 | break; |
| 4923 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4924 | case 339: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4925 | #line 2464 "asn1p_y.y" |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 4926 | { |
| 4927 | (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); |
| 4928 | } |
| 4929 | break; |
| 4930 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4931 | case 340: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4932 | #line 2470 "asn1p_y.y" |
Lev Walkin | bf97915 | 2017-09-07 23:36:11 -0700 | [diff] [blame] | 4933 | { |
| 4934 | checkmem((yyvsp[(1) - (1)].tv_str)); |
| 4935 | (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); |
| 4936 | } |
| 4937 | break; |
| 4938 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4939 | case 341: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4940 | #line 2477 "asn1p_y.y" |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 4941 | { |
| 4942 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
| 4943 | asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_lowercase); |
Lev Walkin | ed409e2 | 2017-09-26 18:07:40 -0700 | [diff] [blame] | 4944 | free((yyvsp[(1) - (1)].tv_str)); |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 4945 | } |
| 4946 | break; |
| 4947 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 4948 | case 342: |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4949 | #line 2484 "asn1p_y.y" |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 4950 | { |
| 4951 | (yyval.a_value) = asn1p_value_fromref((yyvsp[(1) - (1)].a_ref), 0); |
| 4952 | } |
| 4953 | break; |
| 4954 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4955 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4956 | /* Line 1267 of yacc.c. */ |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 4957 | #line 4958 "asn1p_y.c" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4958 | default: break; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4959 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4960 | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4961 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4962 | YYPOPSTACK (yylen); |
| 4963 | yylen = 0; |
| 4964 | YY_STACK_PRINT (yyss, yyssp); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4965 | |
| 4966 | *++yyvsp = yyval; |
| 4967 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4968 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4969 | /* Now `shift' the result of the reduction. Determine what state |
| 4970 | that goes to, based on the state we popped back to and the rule |
| 4971 | number reduced by. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4972 | |
| 4973 | yyn = yyr1[yyn]; |
| 4974 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4975 | yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; |
| 4976 | if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4977 | yystate = yytable[yystate]; |
| 4978 | else |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4979 | yystate = yydefgoto[yyn - YYNTOKENS]; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4980 | |
| 4981 | goto yynewstate; |
| 4982 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4983 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4984 | /*------------------------------------. |
| 4985 | | yyerrlab -- here on detecting error | |
| 4986 | `------------------------------------*/ |
| 4987 | yyerrlab: |
| 4988 | /* If not already recovering from an error, report this error. */ |
| 4989 | if (!yyerrstatus) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4990 | { |
| 4991 | ++yynerrs; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4992 | #if ! YYERROR_VERBOSE |
| 4993 | yyerror (YY_("syntax error")); |
| 4994 | #else |
| 4995 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 4996 | YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); |
| 4997 | if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) |
| 4998 | { |
| 4999 | YYSIZE_T yyalloc = 2 * yysize; |
| 5000 | if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) |
| 5001 | yyalloc = YYSTACK_ALLOC_MAXIMUM; |
| 5002 | if (yymsg != yymsgbuf) |
| 5003 | YYSTACK_FREE (yymsg); |
| 5004 | yymsg = (char *) YYSTACK_ALLOC (yyalloc); |
| 5005 | if (yymsg) |
| 5006 | yymsg_alloc = yyalloc; |
| 5007 | else |
| 5008 | { |
| 5009 | yymsg = yymsgbuf; |
| 5010 | yymsg_alloc = sizeof yymsgbuf; |
| 5011 | } |
| 5012 | } |
| 5013 | |
| 5014 | if (0 < yysize && yysize <= yymsg_alloc) |
| 5015 | { |
| 5016 | (void) yysyntax_error (yymsg, yystate, yychar); |
| 5017 | yyerror (yymsg); |
| 5018 | } |
| 5019 | else |
| 5020 | { |
| 5021 | yyerror (YY_("syntax error")); |
| 5022 | if (yysize != 0) |
| 5023 | goto yyexhaustedlab; |
| 5024 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5025 | } |
| 5026 | #endif |
| 5027 | } |
| 5028 | |
| 5029 | |
| 5030 | |
| 5031 | if (yyerrstatus == 3) |
| 5032 | { |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 5033 | /* If just tried and failed to reuse look-ahead token after an |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5034 | error, discard it. */ |
| 5035 | |
| 5036 | if (yychar <= YYEOF) |
| 5037 | { |
| 5038 | /* Return failure if at end of input. */ |
| 5039 | if (yychar == YYEOF) |
| 5040 | YYABORT; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5041 | } |
| 5042 | else |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5043 | { |
| 5044 | yydestruct ("Error: discarding", |
| 5045 | yytoken, &yylval); |
| 5046 | yychar = YYEMPTY; |
| 5047 | } |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5048 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5049 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 5050 | /* Else will try to reuse look-ahead token after shifting the error |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5051 | token. */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 5052 | goto yyerrlab1; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5053 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5054 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5055 | /*---------------------------------------------------. |
| 5056 | | yyerrorlab -- error raised explicitly by YYERROR. | |
| 5057 | `---------------------------------------------------*/ |
| 5058 | yyerrorlab: |
| 5059 | |
| 5060 | /* Pacify compilers like GCC when the user code never invokes |
| 5061 | YYERROR and the label yyerrorlab therefore never appears in user |
| 5062 | code. */ |
| 5063 | if (/*CONSTCOND*/ 0) |
| 5064 | goto yyerrorlab; |
| 5065 | |
| 5066 | /* Do not reclaim the symbols of the rule which action triggered |
| 5067 | this YYERROR. */ |
| 5068 | YYPOPSTACK (yylen); |
| 5069 | yylen = 0; |
| 5070 | YY_STACK_PRINT (yyss, yyssp); |
| 5071 | yystate = *yyssp; |
| 5072 | goto yyerrlab1; |
| 5073 | |
| 5074 | |
| 5075 | /*-------------------------------------------------------------. |
| 5076 | | yyerrlab1 -- common code for both syntax error and YYERROR. | |
| 5077 | `-------------------------------------------------------------*/ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5078 | yyerrlab1: |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5079 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 5080 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5081 | for (;;) |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 5082 | { |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5083 | yyn = yypact[yystate]; |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 5084 | if (yyn != YYPACT_NINF) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5085 | { |
| 5086 | yyn += YYTERROR; |
| 5087 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
| 5088 | { |
| 5089 | yyn = yytable[yyn]; |
| 5090 | if (0 < yyn) |
| 5091 | break; |
| 5092 | } |
| 5093 | } |
| 5094 | |
| 5095 | /* Pop the current state because it cannot handle the error token. */ |
| 5096 | if (yyssp == yyss) |
| 5097 | YYABORT; |
| 5098 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5099 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5100 | yydestruct ("Error: popping", |
| 5101 | yystos[yystate], yyvsp); |
| 5102 | YYPOPSTACK (1); |
| 5103 | yystate = *yyssp; |
| 5104 | YY_STACK_PRINT (yyss, yyssp); |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 5105 | } |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 5106 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 5107 | if (yyn == YYFINAL) |
| 5108 | YYACCEPT; |
| 5109 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5110 | *++yyvsp = yylval; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5111 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5112 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5113 | /* Shift the error token. */ |
| 5114 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
| 5115 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5116 | yystate = yyn; |
| 5117 | goto yynewstate; |
| 5118 | |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 5119 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5120 | /*-------------------------------------. |
| 5121 | | yyacceptlab -- YYACCEPT comes here. | |
| 5122 | `-------------------------------------*/ |
| 5123 | yyacceptlab: |
| 5124 | yyresult = 0; |
| 5125 | goto yyreturn; |
| 5126 | |
| 5127 | /*-----------------------------------. |
| 5128 | | yyabortlab -- YYABORT comes here. | |
| 5129 | `-----------------------------------*/ |
| 5130 | yyabortlab: |
| 5131 | yyresult = 1; |
| 5132 | goto yyreturn; |
| 5133 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 5134 | #ifndef yyoverflow |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5135 | /*-------------------------------------------------. |
| 5136 | | yyexhaustedlab -- memory exhaustion comes here. | |
| 5137 | `-------------------------------------------------*/ |
| 5138 | yyexhaustedlab: |
| 5139 | yyerror (YY_("memory exhausted")); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5140 | yyresult = 2; |
| 5141 | /* Fall through. */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 5142 | #endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5143 | |
| 5144 | yyreturn: |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 5145 | if (yychar != YYEOF && yychar != YYEMPTY) |
| 5146 | yydestruct ("Cleanup: discarding lookahead", |
| 5147 | yytoken, &yylval); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5148 | /* Do not reclaim the symbols of the rule which action triggered |
| 5149 | this YYABORT or YYACCEPT. */ |
| 5150 | YYPOPSTACK (yylen); |
| 5151 | YY_STACK_PRINT (yyss, yyssp); |
| 5152 | while (yyssp != yyss) |
| 5153 | { |
| 5154 | yydestruct ("Cleanup: popping", |
| 5155 | yystos[*yyssp], yyvsp); |
| 5156 | YYPOPSTACK (1); |
| 5157 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5158 | #ifndef yyoverflow |
| 5159 | if (yyss != yyssa) |
| 5160 | YYSTACK_FREE (yyss); |
| 5161 | #endif |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5162 | #if YYERROR_VERBOSE |
| 5163 | if (yymsg != yymsgbuf) |
| 5164 | YYSTACK_FREE (yymsg); |
| 5165 | #endif |
| 5166 | /* Make sure YYID is used. */ |
| 5167 | return YYID (yyresult); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5168 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5169 | |
| 5170 | |
Lev Walkin | a25584b | 2017-10-01 13:43:17 -0700 | [diff] [blame] | 5171 | #line 2488 "asn1p_y.y" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5172 | |
| 5173 | |
| 5174 | |
| 5175 | /* |
| 5176 | * Convert Xstring ('0101'B or '5'H) to the binary vector. |
| 5177 | */ |
| 5178 | static asn1p_value_t * |
| 5179 | _convert_bitstring2binary(char *str, int base) { |
| 5180 | asn1p_value_t *val; |
| 5181 | int slen; |
| 5182 | int memlen; |
| 5183 | int baselen; |
| 5184 | int bits; |
| 5185 | uint8_t *binary_vector; |
| 5186 | uint8_t *bv_ptr; |
| 5187 | uint8_t cur_val; |
| 5188 | |
| 5189 | assert(str); |
| 5190 | assert(str[0] == '\''); |
| 5191 | |
| 5192 | switch(base) { |
| 5193 | case 'B': |
| 5194 | baselen = 1; |
| 5195 | break; |
| 5196 | case 'H': |
| 5197 | baselen = 4; |
| 5198 | break; |
| 5199 | default: |
| 5200 | assert(base == 'B' || base == 'H'); |
| 5201 | errno = EINVAL; |
| 5202 | return NULL; |
| 5203 | } |
| 5204 | |
| 5205 | slen = strlen(str); |
| 5206 | assert(str[slen - 1] == base); |
| 5207 | assert(str[slen - 2] == '\''); |
| 5208 | |
| 5209 | memlen = slen / (8 / baselen); /* Conservative estimate */ |
| 5210 | |
| 5211 | bv_ptr = binary_vector = malloc(memlen + 1); |
| 5212 | if(bv_ptr == NULL) |
| 5213 | /* ENOMEM */ |
| 5214 | return NULL; |
| 5215 | |
| 5216 | cur_val = 0; |
| 5217 | bits = 0; |
| 5218 | while(*(++str) != '\'') { |
| 5219 | switch(baselen) { |
| 5220 | case 1: |
| 5221 | switch(*str) { |
| 5222 | case '1': |
| 5223 | cur_val |= 1 << (7 - (bits % 8)); |
| 5224 | case '0': |
| 5225 | break; |
| 5226 | default: |
| 5227 | assert(!"_y UNREACH1"); |
| 5228 | case ' ': case '\r': case '\n': |
| 5229 | continue; |
| 5230 | } |
| 5231 | break; |
| 5232 | case 4: |
| 5233 | switch(*str) { |
| 5234 | case '0': case '1': case '2': case '3': case '4': |
| 5235 | case '5': case '6': case '7': case '8': case '9': |
| 5236 | cur_val |= (*str - '0') << (4 - (bits % 8)); |
| 5237 | break; |
| 5238 | case 'A': case 'B': case 'C': |
| 5239 | case 'D': case 'E': case 'F': |
| 5240 | cur_val |= ((*str - 'A') + 10) |
| 5241 | << (4 - (bits % 8)); |
| 5242 | break; |
| 5243 | default: |
| 5244 | assert(!"_y UNREACH2"); |
| 5245 | case ' ': case '\r': case '\n': |
| 5246 | continue; |
| 5247 | } |
| 5248 | break; |
| 5249 | } |
| 5250 | |
| 5251 | bits += baselen; |
| 5252 | if((bits % 8) == 0) { |
| 5253 | *bv_ptr++ = cur_val; |
| 5254 | cur_val = 0; |
| 5255 | } |
| 5256 | } |
| 5257 | |
| 5258 | *bv_ptr = cur_val; |
| 5259 | assert((bv_ptr - binary_vector) <= memlen); |
| 5260 | |
| 5261 | val = asn1p_value_frombits(binary_vector, bits, 0); |
| 5262 | if(val == NULL) { |
| 5263 | free(binary_vector); |
| 5264 | } |
| 5265 | |
| 5266 | return val; |
| 5267 | } |
| 5268 | |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 5269 | /* |
| 5270 | * For unnamed types (used in old X.208 compliant modules) |
| 5271 | * generate some sort of interim names, to not to force human being to fix |
| 5272 | * the specification's compliance to modern ASN.1 standards. |
| 5273 | */ |
| 5274 | static void |
| 5275 | _fixup_anonymous_identifier(asn1p_expr_t *expr) { |
| 5276 | char *p; |
| 5277 | assert(expr->Identifier == 0); |
| 5278 | |
| 5279 | /* |
| 5280 | * Try to figure out the type name |
| 5281 | * without going too much into details |
| 5282 | */ |
| 5283 | expr->Identifier = ASN_EXPR_TYPE2STR(expr->expr_type); |
| 5284 | if(expr->reference && expr->reference->comp_count > 0) |
| 5285 | expr->Identifier = expr->reference->components[0].name; |
| 5286 | |
| 5287 | fprintf(stderr, |
| 5288 | "WARNING: Line %d: expected lower-case member identifier, " |
| 5289 | "found an unnamed %s.\n" |
| 5290 | "WARNING: Obsolete X.208 syntax detected, " |
| 5291 | "please give the member a name.\n", |
| 5292 | yylineno, expr->Identifier ? expr->Identifier : "type"); |
| 5293 | |
| 5294 | if(!expr->Identifier) |
| 5295 | expr->Identifier = "unnamed"; |
| 5296 | expr->Identifier = strdup(expr->Identifier); |
| 5297 | assert(expr->Identifier); |
| 5298 | /* Make a lowercase identifier from the type name */ |
| 5299 | for(p = expr->Identifier; *p; p++) { |
| 5300 | switch(*p) { |
| 5301 | case 'A' ... 'Z': *p += 32; break; |
| 5302 | case ' ': *p = '_'; break; |
| 5303 | case '-': *p = '_'; break; |
| 5304 | } |
| 5305 | } |
| 5306 | fprintf(stderr, "NOTE: Assigning temporary identifier \"%s\". " |
| 5307 | "Name clash may occur later.\n", |
| 5308 | expr->Identifier); |
| 5309 | } |
| 5310 | |
Lev Walkin | 59165cf | 2017-09-11 06:24:45 -0700 | [diff] [blame] | 5311 | static int |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5312 | yyerror(const char *msg) { |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 5313 | extern char *asn1p_text; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5314 | fprintf(stderr, |
| 5315 | "ASN.1 grammar parse error " |
Lev Walkin | d523ea4 | 2017-09-06 22:15:08 -0700 | [diff] [blame] | 5316 | "near %s:%d (token \"%s\"): %s\n", |
| 5317 | ASN_FILENAME, yylineno, asn1p_text, msg); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5318 | return -1; |
| 5319 | } |
| 5320 | |
Lev Walkin | 752e973 | 2017-08-04 02:06:22 -0700 | [diff] [blame] | 5321 | |