Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1 | /* A Bison parser, made by GNU Bison 2.7.12-4996. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3 | /* Bison implementation for Yacc-like parsers in C |
| 4 | |
| 5 | Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. |
| 6 | |
| 7 | This program is free software: you can redistribute it and/or modify |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 8 | it under the terms of the GNU General Public License as published by |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 9 | the Free Software Foundation, either version 3 of the License, or |
| 10 | (at your option) any later version. |
| 11 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 12 | This program is distributed in the hope that it will be useful, |
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | GNU General Public License for more details. |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 16 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 17 | You should have received a copy of the GNU General Public License |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 19 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 20 | /* As a special exception, you may create a larger work that contains |
| 21 | part or all of the Bison parser skeleton and distribute that work |
| 22 | under terms of your choice, so long as that work isn't itself a |
| 23 | parser generator using the skeleton or a modified version thereof |
| 24 | as a parser skeleton. Alternatively, if you modify or redistribute |
| 25 | the parser skeleton itself, you may (at your option) remove this |
| 26 | special exception, which will cause the skeleton and the resulting |
| 27 | Bison output files to be licensed under the GNU General Public |
| 28 | License without this special exception. |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 29 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 30 | This special exception was added by the Free Software Foundation in |
| 31 | version 2.2 of Bison. */ |
| 32 | |
| 33 | /* C LALR(1) parser skeleton written by Richard Stallman, by |
| 34 | simplifying the original so-called "semantic" parser. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 35 | |
| 36 | /* All symbols defined below should begin with yy or YY, to avoid |
| 37 | infringing on user name space. This should be done even for local |
| 38 | variables, as they might otherwise be expanded by user macros. |
| 39 | There are some unavoidable exceptions within include files to |
| 40 | define necessary library symbols; they are noted "INFRINGES ON |
| 41 | USER NAME SPACE" below. */ |
| 42 | |
| 43 | /* Identify Bison output. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 44 | #define YYBISON 1 |
| 45 | |
| 46 | /* Bison version. */ |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 47 | #define YYBISON_VERSION "2.7.12-4996" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 48 | |
| 49 | /* Skeleton name. */ |
| 50 | #define YYSKELETON_NAME "yacc.c" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 51 | |
| 52 | /* Pure parsers. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 53 | #define YYPURE 0 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 54 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 55 | /* Push parsers. */ |
| 56 | #define YYPUSH 0 |
| 57 | |
| 58 | /* Pull parsers. */ |
| 59 | #define YYPULL 1 |
| 60 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 61 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 62 | /* Substitute the variable and function names. */ |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 63 | #define yyparse asn1p_parse |
| 64 | #define yylex asn1p_lex |
| 65 | #define yyerror asn1p_error |
| 66 | #define yydebug asn1p_debug |
| 67 | #define yynerrs asn1p_nerrs |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 68 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 69 | #define yylval asn1p_lval |
| 70 | #define yychar asn1p_char |
| 71 | |
| 72 | /* Copy the first part of user declarations. */ |
| 73 | /* Line 371 of yacc.c */ |
| 74 | #line 1 "asn1p_y.y" |
| 75 | |
| 76 | |
| 77 | #include <stdlib.h> |
| 78 | #include <stdio.h> |
| 79 | #include <string.h> |
| 80 | #include <errno.h> |
| 81 | #include <assert.h> |
| 82 | |
| 83 | #include "asn1parser.h" |
| 84 | |
| 85 | #define YYPARSE_PARAM param |
| 86 | #define YYPARSE_PARAM_TYPE void ** |
| 87 | #define YYERROR_VERBOSE |
| 88 | |
| 89 | int yylex(void); |
| 90 | int yyerror(const char *msg); |
| 91 | #ifdef YYBYACC |
| 92 | int yyparse(void **param); /* byacc does not produce a prototype */ |
| 93 | #endif |
| 94 | void asn1p_lexer_hack_push_opaque_state(void); |
| 95 | void asn1p_lexer_hack_enable_with_syntax(void); |
| 96 | void asn1p_lexer_hack_push_encoding_control(void); |
| 97 | #define yylineno asn1p_lineno |
| 98 | extern int asn1p_lineno; |
| 99 | |
| 100 | /* |
| 101 | * Process directives as <ASN1C:RepresentAsPointer> |
| 102 | */ |
| 103 | extern int asn1p_as_pointer; |
| 104 | |
| 105 | /* |
| 106 | * This temporary variable is used to solve the shortcomings of 1-lookahead |
| 107 | * parser. |
| 108 | */ |
| 109 | static struct AssignedIdentifier *saved_aid; |
| 110 | |
| 111 | static asn1p_value_t *_convert_bitstring2binary(char *str, int base); |
| 112 | static void _fixup_anonymous_identifier(asn1p_expr_t *expr); |
| 113 | |
| 114 | static asn1p_module_t *currentModule; |
| 115 | #define NEW_EXPR() (asn1p_expr_new(yylineno, currentModule)) |
| 116 | |
| 117 | #define checkmem(ptr) do { \ |
| 118 | if(!(ptr)) \ |
| 119 | return yyerror("Memory failure"); \ |
| 120 | } while(0) |
| 121 | |
| 122 | #define CONSTRAINT_INSERT(root, constr_type, arg1, arg2) do { \ |
| 123 | if(arg1->type != constr_type) { \ |
| 124 | int __ret; \ |
| 125 | root = asn1p_constraint_new(yylineno, currentModule); \ |
| 126 | checkmem(root); \ |
| 127 | root->type = constr_type; \ |
| 128 | __ret = asn1p_constraint_insert(root, \ |
| 129 | arg1); \ |
| 130 | checkmem(__ret == 0); \ |
| 131 | } else { \ |
| 132 | root = arg1; \ |
| 133 | } \ |
| 134 | if(arg2) { \ |
| 135 | int __ret \ |
| 136 | = asn1p_constraint_insert(root, arg2); \ |
| 137 | checkmem(__ret == 0); \ |
| 138 | } \ |
| 139 | } while(0) |
| 140 | |
| 141 | #ifdef AL_IMPORT |
| 142 | #error AL_IMPORT DEFINED ELSEWHERE! |
| 143 | #endif |
| 144 | #define AL_IMPORT(to,where,from,field) do { \ |
| 145 | if(!(from)) break; \ |
| 146 | while(TQ_FIRST(&((from)->where))) { \ |
| 147 | TQ_ADD(&((to)->where), \ |
| 148 | TQ_REMOVE(&((from)->where), field), \ |
| 149 | field); \ |
| 150 | } \ |
| 151 | assert(TQ_FIRST(&((from)->where)) == 0); \ |
| 152 | } while(0) |
| 153 | |
| 154 | |
| 155 | /* Line 371 of yacc.c */ |
| 156 | #line 149 "asn1p_y.y" |
| 157 | |
| 158 | # ifndef YY_NULL |
| 159 | # if defined __cplusplus && 201103L <= __cplusplus |
| 160 | # define YY_NULL nullptr |
| 161 | # else |
| 162 | # define YY_NULL 0 |
| 163 | # endif |
| 164 | # endif |
| 165 | |
| 166 | /* Enabling verbose error messages. */ |
| 167 | #ifdef YYERROR_VERBOSE |
| 168 | # undef YYERROR_VERBOSE |
| 169 | # define YYERROR_VERBOSE 1 |
| 170 | #else |
| 171 | # define YYERROR_VERBOSE 0 |
| 172 | #endif |
| 173 | |
| 174 | |
| 175 | /* Enabling traces. */ |
| 176 | #ifndef YYDEBUG |
| 177 | # define YYDEBUG 0 |
| 178 | #endif |
| 179 | #if YYDEBUG |
| 180 | extern int yydebug; |
| 181 | #endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 182 | |
| 183 | /* Tokens. */ |
| 184 | #ifndef YYTOKENTYPE |
| 185 | # define YYTOKENTYPE |
| 186 | /* Put the tokens into the symbol table, so that GDB and other debuggers |
| 187 | know about them. */ |
| 188 | enum yytokentype { |
| 189 | TOK_PPEQ = 258, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 190 | TOK_VBracketLeft = 259, |
| 191 | TOK_VBracketRight = 260, |
| 192 | TOK_whitespace = 261, |
| 193 | TOK_opaque = 262, |
| 194 | TOK_bstring = 263, |
| 195 | TOK_cstring = 264, |
| 196 | TOK_hstring = 265, |
| 197 | TOK_identifier = 266, |
| 198 | TOK_number = 267, |
| 199 | TOK_number_negative = 268, |
| 200 | TOK_realnumber = 269, |
| 201 | TOK_tuple = 270, |
| 202 | TOK_quadruple = 271, |
| 203 | TOK_typereference = 272, |
| 204 | TOK_capitalreference = 273, |
| 205 | TOK_typefieldreference = 274, |
| 206 | TOK_valuefieldreference = 275, |
| 207 | TOK_Literal = 276, |
| 208 | TOK_ABSENT = 277, |
| 209 | TOK_ABSTRACT_SYNTAX = 278, |
| 210 | TOK_ALL = 279, |
| 211 | TOK_ANY = 280, |
| 212 | TOK_APPLICATION = 281, |
| 213 | TOK_AUTOMATIC = 282, |
| 214 | TOK_BEGIN = 283, |
| 215 | TOK_BIT = 284, |
| 216 | TOK_BMPString = 285, |
| 217 | TOK_BOOLEAN = 286, |
| 218 | TOK_BY = 287, |
| 219 | TOK_CHARACTER = 288, |
| 220 | TOK_CHOICE = 289, |
| 221 | TOK_CLASS = 290, |
| 222 | TOK_COMPONENT = 291, |
| 223 | TOK_COMPONENTS = 292, |
| 224 | TOK_CONSTRAINED = 293, |
| 225 | TOK_CONTAINING = 294, |
| 226 | TOK_DEFAULT = 295, |
| 227 | TOK_DEFINITIONS = 296, |
| 228 | TOK_DEFINED = 297, |
| 229 | TOK_EMBEDDED = 298, |
| 230 | TOK_ENCODED = 299, |
| 231 | TOK_ENCODING_CONTROL = 300, |
| 232 | TOK_END = 301, |
| 233 | TOK_ENUMERATED = 302, |
| 234 | TOK_EXPLICIT = 303, |
| 235 | TOK_EXPORTS = 304, |
| 236 | TOK_EXTENSIBILITY = 305, |
| 237 | TOK_EXTERNAL = 306, |
| 238 | TOK_FALSE = 307, |
| 239 | TOK_FROM = 308, |
| 240 | TOK_GeneralizedTime = 309, |
| 241 | TOK_GeneralString = 310, |
| 242 | TOK_GraphicString = 311, |
| 243 | TOK_IA5String = 312, |
| 244 | TOK_IDENTIFIER = 313, |
| 245 | TOK_IMPLICIT = 314, |
| 246 | TOK_IMPLIED = 315, |
| 247 | TOK_IMPORTS = 316, |
| 248 | TOK_INCLUDES = 317, |
| 249 | TOK_INSTANCE = 318, |
| 250 | TOK_INSTRUCTIONS = 319, |
| 251 | TOK_INTEGER = 320, |
| 252 | TOK_ISO646String = 321, |
| 253 | TOK_MAX = 322, |
| 254 | TOK_MIN = 323, |
| 255 | TOK_MINUS_INFINITY = 324, |
| 256 | TOK_NULL = 325, |
| 257 | TOK_NumericString = 326, |
| 258 | TOK_OBJECT = 327, |
| 259 | TOK_ObjectDescriptor = 328, |
| 260 | TOK_OCTET = 329, |
| 261 | TOK_OF = 330, |
| 262 | TOK_OPTIONAL = 331, |
| 263 | TOK_PATTERN = 332, |
| 264 | TOK_PDV = 333, |
| 265 | TOK_PLUS_INFINITY = 334, |
| 266 | TOK_PRESENT = 335, |
| 267 | TOK_PrintableString = 336, |
| 268 | TOK_PRIVATE = 337, |
| 269 | TOK_REAL = 338, |
| 270 | TOK_RELATIVE_OID = 339, |
| 271 | TOK_SEQUENCE = 340, |
| 272 | TOK_SET = 341, |
| 273 | TOK_SIZE = 342, |
| 274 | TOK_STRING = 343, |
| 275 | TOK_SYNTAX = 344, |
| 276 | TOK_T61String = 345, |
| 277 | TOK_TAGS = 346, |
| 278 | TOK_TeletexString = 347, |
| 279 | TOK_TRUE = 348, |
| 280 | TOK_TYPE_IDENTIFIER = 349, |
| 281 | TOK_UNIQUE = 350, |
| 282 | TOK_UNIVERSAL = 351, |
| 283 | TOK_UniversalString = 352, |
| 284 | TOK_UTCTime = 353, |
| 285 | TOK_UTF8String = 354, |
| 286 | TOK_VideotexString = 355, |
| 287 | TOK_VisibleString = 356, |
| 288 | TOK_WITH = 357, |
| 289 | TOK_EXCEPT = 358, |
| 290 | TOK_INTERSECTION = 359, |
| 291 | TOK_UNION = 360, |
| 292 | TOK_TwoDots = 361, |
| 293 | TOK_ThreeDots = 362 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 294 | }; |
| 295 | #endif |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 296 | /* Tokens. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 297 | #define TOK_PPEQ 258 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 298 | #define TOK_VBracketLeft 259 |
| 299 | #define TOK_VBracketRight 260 |
| 300 | #define TOK_whitespace 261 |
| 301 | #define TOK_opaque 262 |
| 302 | #define TOK_bstring 263 |
| 303 | #define TOK_cstring 264 |
| 304 | #define TOK_hstring 265 |
| 305 | #define TOK_identifier 266 |
| 306 | #define TOK_number 267 |
| 307 | #define TOK_number_negative 268 |
| 308 | #define TOK_realnumber 269 |
| 309 | #define TOK_tuple 270 |
| 310 | #define TOK_quadruple 271 |
| 311 | #define TOK_typereference 272 |
| 312 | #define TOK_capitalreference 273 |
| 313 | #define TOK_typefieldreference 274 |
| 314 | #define TOK_valuefieldreference 275 |
| 315 | #define TOK_Literal 276 |
| 316 | #define TOK_ABSENT 277 |
| 317 | #define TOK_ABSTRACT_SYNTAX 278 |
| 318 | #define TOK_ALL 279 |
| 319 | #define TOK_ANY 280 |
| 320 | #define TOK_APPLICATION 281 |
| 321 | #define TOK_AUTOMATIC 282 |
| 322 | #define TOK_BEGIN 283 |
| 323 | #define TOK_BIT 284 |
| 324 | #define TOK_BMPString 285 |
| 325 | #define TOK_BOOLEAN 286 |
| 326 | #define TOK_BY 287 |
| 327 | #define TOK_CHARACTER 288 |
| 328 | #define TOK_CHOICE 289 |
| 329 | #define TOK_CLASS 290 |
| 330 | #define TOK_COMPONENT 291 |
| 331 | #define TOK_COMPONENTS 292 |
| 332 | #define TOK_CONSTRAINED 293 |
| 333 | #define TOK_CONTAINING 294 |
| 334 | #define TOK_DEFAULT 295 |
| 335 | #define TOK_DEFINITIONS 296 |
| 336 | #define TOK_DEFINED 297 |
| 337 | #define TOK_EMBEDDED 298 |
| 338 | #define TOK_ENCODED 299 |
| 339 | #define TOK_ENCODING_CONTROL 300 |
| 340 | #define TOK_END 301 |
| 341 | #define TOK_ENUMERATED 302 |
| 342 | #define TOK_EXPLICIT 303 |
| 343 | #define TOK_EXPORTS 304 |
| 344 | #define TOK_EXTENSIBILITY 305 |
| 345 | #define TOK_EXTERNAL 306 |
| 346 | #define TOK_FALSE 307 |
| 347 | #define TOK_FROM 308 |
| 348 | #define TOK_GeneralizedTime 309 |
| 349 | #define TOK_GeneralString 310 |
| 350 | #define TOK_GraphicString 311 |
| 351 | #define TOK_IA5String 312 |
| 352 | #define TOK_IDENTIFIER 313 |
| 353 | #define TOK_IMPLICIT 314 |
| 354 | #define TOK_IMPLIED 315 |
| 355 | #define TOK_IMPORTS 316 |
| 356 | #define TOK_INCLUDES 317 |
| 357 | #define TOK_INSTANCE 318 |
| 358 | #define TOK_INSTRUCTIONS 319 |
| 359 | #define TOK_INTEGER 320 |
| 360 | #define TOK_ISO646String 321 |
| 361 | #define TOK_MAX 322 |
| 362 | #define TOK_MIN 323 |
| 363 | #define TOK_MINUS_INFINITY 324 |
| 364 | #define TOK_NULL 325 |
| 365 | #define TOK_NumericString 326 |
| 366 | #define TOK_OBJECT 327 |
| 367 | #define TOK_ObjectDescriptor 328 |
| 368 | #define TOK_OCTET 329 |
| 369 | #define TOK_OF 330 |
| 370 | #define TOK_OPTIONAL 331 |
| 371 | #define TOK_PATTERN 332 |
| 372 | #define TOK_PDV 333 |
| 373 | #define TOK_PLUS_INFINITY 334 |
| 374 | #define TOK_PRESENT 335 |
| 375 | #define TOK_PrintableString 336 |
| 376 | #define TOK_PRIVATE 337 |
| 377 | #define TOK_REAL 338 |
| 378 | #define TOK_RELATIVE_OID 339 |
| 379 | #define TOK_SEQUENCE 340 |
| 380 | #define TOK_SET 341 |
| 381 | #define TOK_SIZE 342 |
| 382 | #define TOK_STRING 343 |
| 383 | #define TOK_SYNTAX 344 |
| 384 | #define TOK_T61String 345 |
| 385 | #define TOK_TAGS 346 |
| 386 | #define TOK_TeletexString 347 |
| 387 | #define TOK_TRUE 348 |
| 388 | #define TOK_TYPE_IDENTIFIER 349 |
| 389 | #define TOK_UNIQUE 350 |
| 390 | #define TOK_UNIVERSAL 351 |
| 391 | #define TOK_UniversalString 352 |
| 392 | #define TOK_UTCTime 353 |
| 393 | #define TOK_UTF8String 354 |
| 394 | #define TOK_VideotexString 355 |
| 395 | #define TOK_VisibleString 356 |
| 396 | #define TOK_WITH 357 |
| 397 | #define TOK_EXCEPT 358 |
| 398 | #define TOK_INTERSECTION 359 |
| 399 | #define TOK_UNION 360 |
| 400 | #define TOK_TwoDots 361 |
| 401 | #define TOK_ThreeDots 362 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 402 | |
| 403 | |
| 404 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 405 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
| 406 | typedef union YYSTYPE |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 407 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 408 | /* Line 387 of yacc.c */ |
| 409 | #line 88 "asn1p_y.y" |
| 410 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 411 | asn1p_t *a_grammar; |
| 412 | asn1p_module_flags_e a_module_flags; |
| 413 | asn1p_module_t *a_module; |
| 414 | asn1p_expr_type_e a_type; /* ASN.1 Type */ |
| 415 | asn1p_expr_t *a_expr; /* Constructed collection */ |
| 416 | asn1p_constraint_t *a_constr; /* Constraint */ |
| 417 | enum asn1p_constraint_type_e a_ctype;/* Constraint type */ |
| 418 | asn1p_xports_t *a_xports; /* IMports/EXports */ |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 419 | struct AssignedIdentifier a_aid; /* Assigned Identifier */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 420 | asn1p_oid_t *a_oid; /* Object Identifier */ |
| 421 | asn1p_oid_arc_t a_oid_arc; /* Single OID's arc */ |
| 422 | struct asn1p_type_tag_s a_tag; /* A tag */ |
| 423 | asn1p_ref_t *a_ref; /* Reference to custom type */ |
| 424 | asn1p_wsyntx_t *a_wsynt; /* WITH SYNTAX contents */ |
| 425 | asn1p_wsyntx_chunk_t *a_wchunk; /* WITH SYNTAX chunk */ |
| 426 | struct asn1p_ref_component_s a_refcomp; /* Component of a reference */ |
| 427 | asn1p_value_t *a_value; /* Number, DefinedValue, etc */ |
| 428 | struct asn1p_param_s a_parg; /* A parameter argument */ |
| 429 | asn1p_paramlist_t *a_plist; /* A pargs list */ |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 430 | struct asn1p_expr_marker_s a_marker; /* OPTIONAL/DEFAULT */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 431 | enum asn1p_constr_pres_e a_pres; /* PRESENT/ABSENT/OPTIONAL */ |
Lev Walkin | d21c505 | 2004-09-29 13:18:09 +0000 | [diff] [blame] | 432 | asn1c_integer_t a_int; |
Lev Walkin | adf863f | 2006-09-05 16:18:34 +0000 | [diff] [blame] | 433 | double a_dbl; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 434 | char *tv_str; |
| 435 | struct { |
| 436 | char *buf; |
| 437 | int len; |
| 438 | } tv_opaque; |
| 439 | struct { |
| 440 | char *name; |
| 441 | struct asn1p_type_tag_s tag; |
| 442 | } tv_nametag; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 443 | |
| 444 | |
| 445 | /* Line 387 of yacc.c */ |
| 446 | #line 439 "asn1p_y.y" |
| 447 | } YYSTYPE; |
| 448 | # define YYSTYPE_IS_TRIVIAL 1 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 449 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
| 450 | # define YYSTYPE_IS_DECLARED 1 |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 451 | #endif |
| 452 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 453 | extern YYSTYPE yylval; |
| 454 | |
| 455 | #ifdef YYPARSE_PARAM |
| 456 | #if defined __STDC__ || defined __cplusplus |
| 457 | int yyparse (void *YYPARSE_PARAM); |
| 458 | #else |
| 459 | int yyparse (); |
| 460 | #endif |
| 461 | #else /* ! YYPARSE_PARAM */ |
| 462 | #if defined __STDC__ || defined __cplusplus |
| 463 | int yyparse (void); |
| 464 | #else |
| 465 | int yyparse (); |
| 466 | #endif |
| 467 | #endif /* ! YYPARSE_PARAM */ |
| 468 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 469 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 470 | |
| 471 | /* Copy the second part of user declarations. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 472 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 473 | /* Line 390 of yacc.c */ |
| 474 | #line 467 "asn1p_y.y" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 475 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 476 | #ifdef short |
| 477 | # undef short |
| 478 | #endif |
| 479 | |
| 480 | #ifdef YYTYPE_UINT8 |
| 481 | typedef YYTYPE_UINT8 yytype_uint8; |
| 482 | #else |
| 483 | typedef unsigned char yytype_uint8; |
| 484 | #endif |
| 485 | |
| 486 | #ifdef YYTYPE_INT8 |
| 487 | typedef YYTYPE_INT8 yytype_int8; |
| 488 | #elif (defined __STDC__ || defined __C99__FUNC__ \ |
| 489 | || defined __cplusplus || defined _MSC_VER) |
| 490 | typedef signed char yytype_int8; |
| 491 | #else |
| 492 | typedef short int yytype_int8; |
| 493 | #endif |
| 494 | |
| 495 | #ifdef YYTYPE_UINT16 |
| 496 | typedef YYTYPE_UINT16 yytype_uint16; |
| 497 | #else |
| 498 | typedef unsigned short int yytype_uint16; |
| 499 | #endif |
| 500 | |
| 501 | #ifdef YYTYPE_INT16 |
| 502 | typedef YYTYPE_INT16 yytype_int16; |
| 503 | #else |
| 504 | typedef short int yytype_int16; |
| 505 | #endif |
| 506 | |
| 507 | #ifndef YYSIZE_T |
| 508 | # ifdef __SIZE_TYPE__ |
| 509 | # define YYSIZE_T __SIZE_TYPE__ |
| 510 | # elif defined size_t |
| 511 | # define YYSIZE_T size_t |
| 512 | # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ |
| 513 | || defined __cplusplus || defined _MSC_VER) |
| 514 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
| 515 | # define YYSIZE_T size_t |
| 516 | # else |
| 517 | # define YYSIZE_T unsigned int |
| 518 | # endif |
| 519 | #endif |
| 520 | |
| 521 | #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
| 522 | |
| 523 | #ifndef YY_ |
| 524 | # if defined YYENABLE_NLS && YYENABLE_NLS |
| 525 | # if ENABLE_NLS |
| 526 | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 527 | # define YY_(Msgid) dgettext ("bison-runtime", Msgid) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 528 | # endif |
| 529 | # endif |
| 530 | # ifndef YY_ |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 531 | # define YY_(Msgid) Msgid |
| 532 | # endif |
| 533 | #endif |
| 534 | |
| 535 | #ifndef __attribute__ |
| 536 | /* This feature is available in gcc versions 2.5 and later. */ |
| 537 | # if (! defined __GNUC__ || __GNUC__ < 2 \ |
| 538 | || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) |
| 539 | # define __attribute__(Spec) /* empty */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 540 | # endif |
| 541 | #endif |
| 542 | |
| 543 | /* Suppress unused-variable warnings by "using" E. */ |
| 544 | #if ! defined lint || defined __GNUC__ |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 545 | # define YYUSE(E) ((void) (E)) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 546 | #else |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 547 | # define YYUSE(E) /* empty */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 548 | #endif |
| 549 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 550 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 551 | /* Identity function, used to suppress warnings about constant conditions. */ |
| 552 | #ifndef lint |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 553 | # define YYID(N) (N) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 554 | #else |
| 555 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 556 | || defined __cplusplus || defined _MSC_VER) |
| 557 | static int |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 558 | YYID (int yyi) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 559 | #else |
| 560 | static int |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 561 | YYID (yyi) |
| 562 | int yyi; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 563 | #endif |
| 564 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 565 | return yyi; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 566 | } |
| 567 | #endif |
| 568 | |
| 569 | #if ! defined yyoverflow || YYERROR_VERBOSE |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 570 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 571 | /* The parser invokes alloca or malloc; define the necessary symbols. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 572 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 573 | # ifdef YYSTACK_USE_ALLOCA |
| 574 | # if YYSTACK_USE_ALLOCA |
| 575 | # ifdef __GNUC__ |
| 576 | # define YYSTACK_ALLOC __builtin_alloca |
| 577 | # elif defined __BUILTIN_VA_ARG_INCR |
| 578 | # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
| 579 | # elif defined _AIX |
| 580 | # define YYSTACK_ALLOC __alloca |
| 581 | # elif defined _MSC_VER |
| 582 | # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
| 583 | # define alloca _alloca |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 584 | # else |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 585 | # define YYSTACK_ALLOC alloca |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 586 | # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 587 | || defined __cplusplus || defined _MSC_VER) |
| 588 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 589 | /* Use EXIT_SUCCESS as a witness for stdlib.h. */ |
| 590 | # ifndef EXIT_SUCCESS |
| 591 | # define EXIT_SUCCESS 0 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 592 | # endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 593 | # endif |
| 594 | # endif |
| 595 | # endif |
| 596 | # endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 597 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 598 | # ifdef YYSTACK_ALLOC |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 599 | /* Pacify GCC's `empty if-body' warning. */ |
| 600 | # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) |
| 601 | # ifndef YYSTACK_ALLOC_MAXIMUM |
| 602 | /* The OS might guarantee only one guard page at the bottom of the stack, |
| 603 | and a page size can be as small as 4096 bytes. So we cannot safely |
| 604 | invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
| 605 | to allow for a few compiler-allocated temporary stack slots. */ |
| 606 | # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 607 | # endif |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 608 | # else |
| 609 | # define YYSTACK_ALLOC YYMALLOC |
| 610 | # define YYSTACK_FREE YYFREE |
| 611 | # ifndef YYSTACK_ALLOC_MAXIMUM |
| 612 | # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
| 613 | # endif |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 614 | # if (defined __cplusplus && ! defined EXIT_SUCCESS \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 615 | && ! ((defined YYMALLOC || defined malloc) \ |
| 616 | && (defined YYFREE || defined free))) |
| 617 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 618 | # ifndef EXIT_SUCCESS |
| 619 | # define EXIT_SUCCESS 0 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 620 | # endif |
| 621 | # endif |
| 622 | # ifndef YYMALLOC |
| 623 | # define YYMALLOC malloc |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 624 | # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 625 | || defined __cplusplus || defined _MSC_VER) |
| 626 | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
| 627 | # endif |
| 628 | # endif |
| 629 | # ifndef YYFREE |
| 630 | # define YYFREE free |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 631 | # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 632 | || defined __cplusplus || defined _MSC_VER) |
| 633 | void free (void *); /* INFRINGES ON USER NAME SPACE */ |
| 634 | # endif |
| 635 | # endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 636 | # endif |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 637 | #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 638 | |
| 639 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 640 | #if (! defined yyoverflow \ |
| 641 | && (! defined __cplusplus \ |
| 642 | || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 643 | |
| 644 | /* A type that is properly aligned for any stack member. */ |
| 645 | union yyalloc |
| 646 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 647 | yytype_int16 yyss_alloc; |
| 648 | YYSTYPE yyvs_alloc; |
| 649 | }; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 650 | |
| 651 | /* 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] | 652 | # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 653 | |
| 654 | /* The size of an array large to enough to hold all stacks, each with |
| 655 | N elements. */ |
| 656 | # define YYSTACK_BYTES(N) \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 657 | ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ |
| 658 | + YYSTACK_GAP_MAXIMUM) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 659 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 660 | # define YYCOPY_NEEDED 1 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 661 | |
| 662 | /* Relocate STACK from its old location to the new one. The |
| 663 | local variables YYSIZE and YYSTACKSIZE give the old and new number of |
| 664 | elements in the stack, and YYPTR gives the new location of the |
| 665 | stack. Advance YYPTR to a properly aligned location for the next |
| 666 | stack. */ |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 667 | # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 668 | do \ |
| 669 | { \ |
| 670 | YYSIZE_T yynewbytes; \ |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 671 | YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ |
| 672 | Stack = &yyptr->Stack_alloc; \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 673 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 674 | yyptr += yynewbytes / sizeof (*yyptr); \ |
| 675 | } \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 676 | while (YYID (0)) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 677 | |
| 678 | #endif |
| 679 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 680 | #if defined YYCOPY_NEEDED && YYCOPY_NEEDED |
| 681 | /* Copy COUNT objects from SRC to DST. The source and destination do |
| 682 | not overlap. */ |
| 683 | # ifndef YYCOPY |
| 684 | # if defined __GNUC__ && 1 < __GNUC__ |
| 685 | # define YYCOPY(Dst, Src, Count) \ |
| 686 | __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) |
| 687 | # else |
| 688 | # define YYCOPY(Dst, Src, Count) \ |
| 689 | do \ |
| 690 | { \ |
| 691 | YYSIZE_T yyi; \ |
| 692 | for (yyi = 0; yyi < (Count); yyi++) \ |
| 693 | (Dst)[yyi] = (Src)[yyi]; \ |
| 694 | } \ |
| 695 | while (YYID (0)) |
| 696 | # endif |
| 697 | # endif |
| 698 | #endif /* !YYCOPY_NEEDED */ |
| 699 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 700 | /* YYFINAL -- State number of the termination state. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 701 | #define YYFINAL 7 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 702 | /* YYLAST -- Last index in YYTABLE. */ |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 703 | #define YYLAST 873 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 704 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 705 | /* YYNTOKENS -- Number of terminals. */ |
| 706 | #define YYNTOKENS 123 |
| 707 | /* YYNNTS -- Number of nonterminals. */ |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 708 | #define YYNNTS 124 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 709 | /* YYNRULES -- Number of rules. */ |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 710 | #define YYNRULES 316 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 711 | /* YYNRULES -- Number of states. */ |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 712 | #define YYNSTATES 477 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 713 | |
| 714 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ |
| 715 | #define YYUNDEFTOK 2 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 716 | #define YYMAXUTOK 362 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 717 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 718 | #define YYTRANSLATE(YYX) \ |
| 719 | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 720 | |
| 721 | /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 722 | static const yytype_uint8 yytranslate[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 723 | { |
| 724 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 725 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 726 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 727 | 2, 2, 2, 119, 2, 2, 2, 2, 2, 2, |
| 728 | 112, 113, 2, 2, 115, 2, 120, 2, 2, 2, |
| 729 | 2, 2, 2, 2, 2, 2, 2, 2, 116, 114, |
| 730 | 121, 2, 2, 2, 122, 2, 2, 2, 2, 2, |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 731 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 732 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 733 | 2, 117, 2, 118, 104, 2, 2, 2, 2, 2, |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 734 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 735 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 736 | 2, 2, 2, 110, 106, 111, 2, 2, 2, 2, |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 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, 2, 2, 2, 2, |
| 740 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 741 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 742 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 743 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 744 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 745 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 746 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 747 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 748 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 749 | 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
| 750 | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
| 751 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
| 752 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
| 753 | 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, |
| 754 | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, |
| 755 | 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, |
| 756 | 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, |
| 757 | 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, |
| 758 | 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 759 | 95, 96, 97, 98, 99, 100, 101, 102, 103, 105, |
| 760 | 107, 108, 109 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 761 | }; |
| 762 | |
| 763 | #if YYDEBUG |
| 764 | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in |
| 765 | YYRHS. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 766 | static const yytype_uint16 yyprhs[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 767 | { |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 768 | 0, 0, 3, 5, 7, 10, 11, 21, 22, 24, |
| 769 | 28, 31, 33, 36, 38, 43, 45, 46, 48, 50, |
| 770 | 53, 56, 59, 62, 65, 68, 69, 71, 75, 77, |
| 771 | 80, 82, 84, 86, 87, 91, 93, 94, 96, 100, |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 772 | 103, 104, 106, 108, 111, 112, 114, 119, 121, 125, |
| 773 | 127, 131, 133, 134, 136, 140, 144, 147, 149, 153, |
| 774 | 155, 159, 161, 165, 170, 172, 174, 179, 183, 187, |
| 775 | 194, 201, 203, 207, 209, 213, 217, 221, 225, 227, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 776 | 231, 233, 235, 237, 239, 240, 242, 244, 248, 254, |
| 777 | 258, 261, 265, 267, 269, 273, 276, 278, 280, 286, |
| 778 | 287, 289, 291, 295, 298, 303, 307, 311, 315, 319, |
| 779 | 323, 324, 326, 327, 334, 336, 339, 341, 343, 345, |
| 780 | 349, 351, 355, 359, 363, 364, 367, 369, 374, 379, |
| 781 | 384, 391, 398, 400, 405, 409, 411, 415, 419, 423, |
| 782 | 425, 429, 431, 435, 437, 439, 441, 443, 447, 451, |
| 783 | 453, 458, 460, 462, 466, 467, 471, 473, 475, 477, |
| 784 | 479, 481, 483, 485, 487, 491, 493, 495, 497, 499, |
| 785 | 502, 504, 506, 508, 510, 513, 516, 518, 520, 523, |
| 786 | 526, 528, 530, 532, 534, 536, 539, 541, 544, 546, |
| 787 | 548, 550, 552, 554, 556, 558, 560, 562, 564, 566, |
| 788 | 568, 570, 572, 574, 576, 578, 580, 581, 583, 585, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 789 | 587, 592, 596, 601, 603, 605, 607, 609, 613, 619, |
| 790 | 621, 625, 627, 631, 633, 637, 639, 643, 648, 652, |
| 791 | 654, 656, 660, 664, 668, 672, 674, 676, 677, 681, |
| 792 | 684, 687, 689, 691, 693, 695, 697, 699, 701, 703, |
| 793 | 705, 707, 709, 713, 719, 721, 725, 727, 731, 732, |
| 794 | 734, 736, 738, 740, 742, 744, 746, 747, 753, 756, |
| 795 | 758, 761, 764, 768, 770, 772, 776, 781, 783, 787, |
| 796 | 790, 794, 796, 800, 801, 803, 805, 808, 811, 815, |
| 797 | 817, 821, 823, 828, 833, 835, 837, 839, 841, 843, |
| 798 | 845, 846, 848, 851, 856, 857, 859, 861, 863, 864, |
| 799 | 866, 868, 870, 872, 874, 875, 877 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 800 | }; |
| 801 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 802 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
| 803 | static const yytype_int16 yyrhs[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 804 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 805 | 124, 0, -1, 125, -1, 126, -1, 125, 126, -1, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 806 | -1, 243, 127, 128, 41, 132, 3, 28, 135, 46, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 807 | -1, -1, 129, -1, 110, 130, 111, -1, 110, 111, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 808 | -1, 131, -1, 130, 131, -1, 246, -1, 246, 112, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 809 | 12, 113, -1, 12, -1, -1, 133, -1, 134, -1, |
| 810 | 133, 134, -1, 48, 91, -1, 59, 91, -1, 27, |
| 811 | 91, -1, 50, 60, -1, 18, 64, -1, -1, 136, |
| 812 | -1, 148, 140, 137, -1, 138, -1, 137, 138, -1, |
| 813 | 155, -1, 185, -1, 153, -1, -1, 45, 18, 139, |
| 814 | -1, 195, -1, -1, 141, -1, 61, 142, 114, -1, |
| 815 | 61, 53, -1, -1, 143, -1, 145, -1, 143, 145, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 816 | -1, -1, 129, -1, 146, 53, 243, 144, -1, 147, |
| 817 | -1, 146, 115, 147, -1, 243, -1, 243, 110, 111, |
| 818 | -1, 246, -1, -1, 149, -1, 49, 150, 114, -1, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 819 | 49, 24, 114, -1, 49, 114, -1, 151, -1, 150, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 820 | 115, 151, -1, 243, -1, 243, 110, 111, -1, 246, |
| 821 | -1, 110, 203, 111, -1, 243, 154, 3, 152, -1, |
| 822 | 194, -1, 179, -1, 179, 110, 158, 111, -1, 243, |
| 823 | 3, 175, -1, 243, 3, 165, -1, 243, 110, 156, |
| 824 | 111, 3, 175, -1, 243, 110, 156, 111, 3, 165, |
| 825 | -1, 157, -1, 156, 115, 157, -1, 243, -1, 243, |
| 826 | 116, 246, -1, 243, 116, 243, -1, 192, 116, 246, |
| 827 | -1, 192, 116, 243, -1, 159, -1, 158, 115, 159, |
| 828 | -1, 175, -1, 188, -1, 246, -1, 152, -1, -1, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 829 | 161, -1, 162, -1, 161, 115, 162, -1, 161, 115, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 830 | 4, 161, 5, -1, 246, 175, 231, -1, 175, 231, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 831 | -1, 37, 75, 175, -1, 174, -1, 164, -1, 163, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 832 | 115, 164, -1, 246, 175, -1, 174, -1, 175, -1, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 833 | 35, 110, 167, 111, 169, -1, -1, 95, -1, 168, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 834 | -1, 167, 115, 168, -1, 19, 231, -1, 20, 175, |
| 835 | 166, 231, -1, 20, 183, 231, -1, 20, 184, 231, |
| 836 | -1, 19, 183, 231, -1, 19, 175, 231, -1, 19, |
| 837 | 184, 231, -1, -1, 170, -1, -1, 102, 89, 110, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 838 | 171, 172, 111, -1, 173, -1, 172, 173, -1, 6, |
| 839 | -1, 21, -1, 182, -1, 117, 172, 118, -1, 109, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 840 | -1, 109, 119, 189, -1, 109, 119, 236, -1, 238, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 841 | 177, 198, -1, -1, 176, 178, -1, 154, -1, 34, |
| 842 | 110, 163, 111, -1, 85, 110, 160, 111, -1, 86, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 843 | 110, 160, 111, -1, 85, 198, 75, 245, 238, 177, |
| 844 | -1, 86, 198, 75, 245, 238, 177, -1, 25, -1, |
| 845 | 25, 42, 32, 246, -1, 63, 75, 179, -1, 17, |
| 846 | -1, 17, 120, 243, -1, 244, 120, 243, -1, 17, |
| 847 | 120, 246, -1, 244, -1, 244, 120, 180, -1, 181, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 848 | -1, 180, 120, 181, -1, 182, -1, 19, -1, 20, |
| 849 | -1, 19, -1, 183, 120, 19, -1, 183, 120, 20, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 850 | -1, 18, -1, 246, 175, 3, 186, -1, 188, -1, |
| 851 | 189, -1, 246, 116, 186, -1, -1, 110, 187, 191, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 852 | -1, 70, -1, 52, -1, 93, -1, 8, -1, 10, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 853 | -1, 190, -1, 236, -1, 246, -1, 243, 120, 246, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 854 | -1, 9, -1, 15, -1, 16, -1, 7, -1, 191, |
| 855 | 7, -1, 31, -1, 70, -1, 83, -1, 193, -1, |
| 856 | 74, 88, -1, 72, 58, -1, 84, -1, 51, -1, |
| 857 | 43, 78, -1, 33, 88, -1, 98, -1, 54, -1, |
| 858 | 195, -1, 65, -1, 47, -1, 29, 88, -1, 192, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 859 | -1, 193, 233, -1, 30, -1, 55, -1, 56, -1, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 860 | 57, -1, 66, -1, 71, -1, 81, -1, 90, -1, |
| 861 | 92, -1, 97, -1, 99, -1, 100, -1, 101, -1, |
| 862 | 73, -1, 106, -1, 107, -1, 104, -1, 105, -1, |
| 863 | -1, 199, -1, 200, -1, 201, -1, 87, 112, 202, |
| 864 | 113, -1, 112, 202, 113, -1, 201, 112, 202, 113, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 865 | -1, 203, -1, 220, -1, 109, -1, 204, -1, 204, |
| 866 | 115, 109, -1, 204, 115, 109, 115, 204, -1, 205, |
| 867 | -1, 24, 103, 208, -1, 206, -1, 205, 196, 206, |
| 868 | -1, 207, -1, 206, 197, 207, -1, 208, -1, 208, |
| 869 | 103, 208, -1, 211, 112, 203, 113, -1, 112, 203, |
| 870 | 113, -1, 212, -1, 214, -1, 212, 224, 212, -1, |
| 871 | 68, 224, 212, -1, 212, 224, 67, -1, 68, 224, |
| 872 | 67, -1, 215, -1, 210, -1, -1, 110, 209, 191, |
| 873 | -1, 77, 9, -1, 77, 246, -1, 87, -1, 53, |
| 874 | -1, 52, -1, 93, -1, 237, -1, 190, -1, 213, |
| 875 | -1, 246, -1, 8, -1, 10, -1, 179, -1, 102, |
| 876 | 36, 201, -1, 102, 37, 110, 216, 111, -1, 217, |
| 877 | -1, 216, 115, 217, -1, 109, -1, 246, 198, 218, |
| 878 | -1, -1, 219, -1, 80, -1, 22, -1, 76, -1, |
| 879 | 221, -1, 225, -1, 223, -1, -1, 38, 32, 110, |
| 880 | 222, 191, -1, 39, 175, -1, 108, -1, 108, 121, |
| 881 | -1, 121, 108, -1, 121, 108, 121, -1, 226, -1, |
| 882 | 227, -1, 110, 243, 111, -1, 226, 110, 228, 111, |
| 883 | -1, 229, -1, 228, 115, 229, -1, 122, 230, -1, |
| 884 | 122, 120, 230, -1, 246, -1, 230, 120, 246, -1, |
| 885 | -1, 232, -1, 76, -1, 40, 186, -1, 110, 111, |
| 886 | -1, 110, 234, 111, -1, 235, -1, 234, 115, 235, |
| 887 | -1, 246, -1, 246, 112, 236, 113, -1, 246, 112, |
| 888 | 189, 113, -1, 236, -1, 109, -1, 12, -1, 13, |
| 889 | -1, 236, -1, 14, -1, -1, 239, -1, 240, 242, |
| 890 | -1, 117, 241, 12, 118, -1, -1, 96, -1, 26, |
| 891 | -1, 82, -1, -1, 59, -1, 48, -1, 17, -1, |
| 892 | 18, -1, 18, -1, -1, 246, -1, 11, -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 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 898 | 0, 358, 358, 364, 369, 386, 386, 415, 416, 420, |
| 899 | 423, 429, 435, 444, 448, 452, 462, 463, 472, 475, |
| 900 | 484, 487, 490, 493, 497, 518, 519, 528, 541, 544, |
| 901 | 561, 568, 581, 589, 588, 602, 615, 616, 619, 629, |
| 902 | 635, 636, 639, 644, 651, 652, 656, 667, 672, 679, |
| 903 | 685, 691, 701, 702, 714, 717, 720, 728, 733, 740, |
| 904 | 746, 752, 761, 764, 774, 787, 797, 817, 823, 839, |
| 905 | 845, 853, 862, 873, 877, 885, 893, 901, 912, 917, |
| 906 | 924, 927, 935, 946, 969, 970, 973, 978, 982, 990, |
| 907 | 997, 1003, 1010, 1016, 1021, 1028, 1033, 1036, 1043, 1053, |
| 908 | 1054, 1058, 1065, 1075, 1085, 1096, 1106, 1117, 1127, 1138, |
| 909 | 1150, 1151, 1158, 1157, 1166, 1170, 1177, 1181, 1184, 1188, |
| 910 | 1194, 1202, 1211, 1223, 1247, 1254, 1273, 1276, 1282, 1288, |
| 911 | 1294, 1304, 1314, 1320, 1332, 1347, 1355, 1366, 1377, 1388, |
| 912 | 1396, 1418, 1426, 1435, 1439, 1444, 1453, 1458, 1463, 1471, |
| 913 | 1494, 1504, 1505, 1506, 1513, 1513, 1518, 1526, 1531, 1536, |
| 914 | 1541, 1546, 1549, 1555, 1566, 1584, 1588, 1593, 1601, 1610, |
| 915 | 1625, 1626, 1627, 1628, 1629, 1630, 1631, 1632, 1633, 1634, |
| 916 | 1635, 1636, 1637, 1644, 1645, 1646, 1650, 1656, 1669, 1670, |
| 917 | 1674, 1678, 1679, 1680, 1681, 1682, 1686, 1687, 1688, 1689, |
| 918 | 1693, 1694, 1701, 1701, 1702, 1702, 1705, 1706, 1712, 1716, |
| 919 | 1719, 1729, 1732, 1738, 1741, 1747, 1751, 1754, 1760, 1771, |
| 920 | 1772, 1778, 1779, 1785, 1786, 1793, 1794, 1800, 1808, 1816, |
| 921 | 1822, 1828, 1835, 1843, 1851, 1860, 1863, 1866, 1866, 1876, |
| 922 | 1881, 1893, 1896, 1902, 1907, 1912, 1913, 1914, 1915, 1929, |
| 923 | 1934, 1942, 1962, 1965, 1971, 1974, 1980, 1986, 2000, 2001, |
| 924 | 2005, 2008, 2011, 2019, 2020, 2021, 2026, 2025, 2037, 2046, |
| 925 | 2047, 2048, 2049, 2052, 2055, 2064, 2080, 2086, 2092, 2106, |
| 926 | 2117, 2133, 2136, 2156, 2160, 2164, 2168, 2191, 2195, 2201, |
| 927 | 2206, 2213, 2220, 2228, 2236, 2243, 2254, 2258, 2265, 2266, |
| 928 | 2297, 2298, 2302, 2309, 2315, 2316, 2317, 2318, 2322, 2323, |
| 929 | 2324, 2328, 2332, 2340, 2347, 2348, 2354 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 930 | }; |
| 931 | #endif |
| 932 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 933 | #if YYDEBUG || YYERROR_VERBOSE || 0 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 934 | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
| 935 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 936 | static const char *const yytname[] = |
| 937 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 938 | "$end", "error", "$undefined", "TOK_PPEQ", "TOK_VBracketLeft", |
| 939 | "TOK_VBracketRight", "TOK_whitespace", "TOK_opaque", "TOK_bstring", |
| 940 | "TOK_cstring", "TOK_hstring", "TOK_identifier", "TOK_number", |
| 941 | "TOK_number_negative", "TOK_realnumber", "TOK_tuple", "TOK_quadruple", |
| 942 | "TOK_typereference", "TOK_capitalreference", "TOK_typefieldreference", |
| 943 | "TOK_valuefieldreference", "TOK_Literal", "TOK_ABSENT", |
| 944 | "TOK_ABSTRACT_SYNTAX", "TOK_ALL", "TOK_ANY", "TOK_APPLICATION", |
| 945 | "TOK_AUTOMATIC", "TOK_BEGIN", "TOK_BIT", "TOK_BMPString", "TOK_BOOLEAN", |
| 946 | "TOK_BY", "TOK_CHARACTER", "TOK_CHOICE", "TOK_CLASS", "TOK_COMPONENT", |
| 947 | "TOK_COMPONENTS", "TOK_CONSTRAINED", "TOK_CONTAINING", "TOK_DEFAULT", |
| 948 | "TOK_DEFINITIONS", "TOK_DEFINED", "TOK_EMBEDDED", "TOK_ENCODED", |
| 949 | "TOK_ENCODING_CONTROL", "TOK_END", "TOK_ENUMERATED", "TOK_EXPLICIT", |
| 950 | "TOK_EXPORTS", "TOK_EXTENSIBILITY", "TOK_EXTERNAL", "TOK_FALSE", |
| 951 | "TOK_FROM", "TOK_GeneralizedTime", "TOK_GeneralString", |
| 952 | "TOK_GraphicString", "TOK_IA5String", "TOK_IDENTIFIER", "TOK_IMPLICIT", |
| 953 | "TOK_IMPLIED", "TOK_IMPORTS", "TOK_INCLUDES", "TOK_INSTANCE", |
| 954 | "TOK_INSTRUCTIONS", "TOK_INTEGER", "TOK_ISO646String", "TOK_MAX", |
| 955 | "TOK_MIN", "TOK_MINUS_INFINITY", "TOK_NULL", "TOK_NumericString", |
| 956 | "TOK_OBJECT", "TOK_ObjectDescriptor", "TOK_OCTET", "TOK_OF", |
| 957 | "TOK_OPTIONAL", "TOK_PATTERN", "TOK_PDV", "TOK_PLUS_INFINITY", |
| 958 | "TOK_PRESENT", "TOK_PrintableString", "TOK_PRIVATE", "TOK_REAL", |
| 959 | "TOK_RELATIVE_OID", "TOK_SEQUENCE", "TOK_SET", "TOK_SIZE", "TOK_STRING", |
| 960 | "TOK_SYNTAX", "TOK_T61String", "TOK_TAGS", "TOK_TeletexString", |
| 961 | "TOK_TRUE", "TOK_TYPE_IDENTIFIER", "TOK_UNIQUE", "TOK_UNIVERSAL", |
| 962 | "TOK_UniversalString", "TOK_UTCTime", "TOK_UTF8String", |
| 963 | "TOK_VideotexString", "TOK_VisibleString", "TOK_WITH", "TOK_EXCEPT", |
| 964 | "'^'", "TOK_INTERSECTION", "'|'", "TOK_UNION", "TOK_TwoDots", |
| 965 | "TOK_ThreeDots", "'{'", "'}'", "'('", "')'", "';'", "','", "':'", "'['", |
| 966 | "']'", "'!'", "'.'", "'<'", "'@'", "$accept", "ParsedGrammar", |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 967 | "ModuleList", "ModuleDefinition", "$@1", "optObjectIdentifier", |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 968 | "ObjectIdentifier", "ObjectIdentifierBody", "ObjectIdentifierElement", |
| 969 | "optModuleDefinitionFlags", "ModuleDefinitionFlags", |
| 970 | "ModuleDefinitionFlag", "optModuleBody", "ModuleBody", "AssignmentList", |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 971 | "Assignment", "$@2", "optImports", "ImportsDefinition", |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 972 | "optImportsBundleSet", "ImportsBundleSet", "AssignedIdentifier", |
| 973 | "ImportsBundle", "ImportsList", "ImportsElement", "optExports", |
| 974 | "ExportsDefinition", "ExportsBody", "ExportsElement", "ValueSet", |
| 975 | "ValueSetTypeAssignment", "DefinedType", "DataTypeReference", |
| 976 | "ParameterArgumentList", "ParameterArgumentName", "ActualParameterList", |
| 977 | "ActualParameter", "optComponentTypeLists", "ComponentTypeLists", |
| 978 | "ComponentType", "AlternativeTypeLists", "AlternativeType", |
| 979 | "ObjectClass", "optUnique", "FieldSpec", "ClassField", "optWithSyntax", |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 980 | "WithSyntax", "$@3", "WithSyntaxList", "WithSyntaxToken", |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 981 | "ExtensionAndException", "Type", "NSTD_IndirectMarker", |
| 982 | "TypeDeclaration", "TypeDeclarationSet", "ComplexTypeReference", |
| 983 | "ComplexTypeReferenceAmpList", "ComplexTypeReferenceElement", |
| 984 | "PrimitiveFieldReference", "FieldName", "DefinedObjectClass", |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 985 | "ValueAssignment", "Value", "$@4", "SimpleValue", "DefinedValue", |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 986 | "RestrictedCharacterStringValue", "Opaque", "BasicTypeId", |
| 987 | "BasicTypeId_UniverationCompatible", "BasicType", "BasicString", |
| 988 | "UnionMark", "IntersectionMark", "optConstraints", "Constraint", |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 989 | "SubtypeConstraint", "SetOfConstraints", "ConstraintSpecs", |
| 990 | "ElementSetSpecs", "ElementSetSpec", "Unions", "Intersections", |
| 991 | "IntersectionElements", "ConstraintSubtypeElement", "$@5", |
| 992 | "PatternConstraint", "ConstraintSpec", "SingleValue", "BitStringValue", |
| 993 | "ContainedSubtype", "InnerTypeConstraint", "WithComponentsList", |
| 994 | "WithComponentsElement", "optPresenceConstraint", "PresenceConstraint", |
| 995 | "GeneralConstraint", "UserDefinedConstraint", "$@6", |
| 996 | "ContentsConstraint", "ConstraintRangeSpec", "TableConstraint", |
| 997 | "SimpleTableConstraint", "ComponentRelationConstraint", "AtNotationList", |
| 998 | "AtNotationElement", "ComponentIdList", "optMarker", "Marker", |
| 999 | "UniverationDefinition", "UniverationList", "UniverationElement", |
| 1000 | "SignedNumber", "RealValue", "optTag", "Tag", "TagTypeValue", "TagClass", |
| 1001 | "TagPlicit", "TypeRefName", "ObjectClassReference", "optIdentifier", |
| 1002 | "Identifier", YY_NULL |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1003 | }; |
| 1004 | #endif |
| 1005 | |
| 1006 | # ifdef YYPRINT |
| 1007 | /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to |
| 1008 | token YYLEX-NUM. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1009 | static const yytype_uint16 yytoknum[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1010 | { |
| 1011 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
| 1012 | 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, |
| 1013 | 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, |
| 1014 | 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, |
| 1015 | 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, |
| 1016 | 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, |
| 1017 | 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, |
| 1018 | 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, |
| 1019 | 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, |
| 1020 | 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1021 | 355, 356, 357, 358, 94, 359, 124, 360, 361, 362, |
| 1022 | 123, 125, 40, 41, 59, 44, 58, 91, 93, 33, |
| 1023 | 46, 60, 64 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1024 | }; |
| 1025 | # endif |
| 1026 | |
| 1027 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1028 | static const yytype_uint8 yyr1[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1029 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1030 | 0, 123, 124, 125, 125, 127, 126, 128, 128, 129, |
| 1031 | 129, 130, 130, 131, 131, 131, 132, 132, 133, 133, |
| 1032 | 134, 134, 134, 134, 134, 135, 135, 136, 137, 137, |
| 1033 | 138, 138, 138, 139, 138, 138, 140, 140, 141, 141, |
| 1034 | 142, 142, 143, 143, 144, 144, 145, 146, 146, 147, |
| 1035 | 147, 147, 148, 148, 149, 149, 149, 150, 150, 151, |
| 1036 | 151, 151, 152, 153, 154, 154, 154, 155, 155, 155, |
| 1037 | 155, 156, 156, 157, 157, 157, 157, 157, 158, 158, |
| 1038 | 159, 159, 159, 159, 160, 160, 161, 161, 161, 162, |
| 1039 | 162, 162, 162, 163, 163, 164, 164, 164, 165, 166, |
| 1040 | 166, 167, 167, 168, 168, 168, 168, 168, 168, 168, |
| 1041 | 169, 169, 171, 170, 172, 172, 173, 173, 173, 173, |
| 1042 | 174, 174, 174, 175, 176, 177, 178, 178, 178, 178, |
| 1043 | 178, 178, 178, 178, 178, 179, 179, 179, 179, 179, |
| 1044 | 179, 180, 180, 181, 182, 182, 183, 183, 183, 184, |
| 1045 | 185, 186, 186, 186, 187, 186, 186, 188, 188, 188, |
| 1046 | 188, 188, 188, 189, 189, 190, 190, 190, 191, 191, |
| 1047 | 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, |
| 1048 | 192, 192, 192, 193, 193, 193, 194, 194, 195, 195, |
| 1049 | 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, |
| 1050 | 195, 195, 196, 196, 197, 197, 198, 198, 199, 200, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1051 | 200, 201, 201, 202, 202, 203, 203, 203, 203, 204, |
| 1052 | 204, 205, 205, 206, 206, 207, 207, 208, 208, 208, |
| 1053 | 208, 208, 208, 208, 208, 208, 208, 209, 208, 210, |
| 1054 | 210, 211, 211, 212, 212, 212, 212, 212, 212, 213, |
| 1055 | 213, 214, 215, 215, 216, 216, 217, 217, 218, 218, |
| 1056 | 219, 219, 219, 220, 220, 220, 222, 221, 223, 224, |
| 1057 | 224, 224, 224, 225, 225, 226, 227, 228, 228, 229, |
| 1058 | 229, 230, 230, 231, 231, 232, 232, 233, 233, 234, |
| 1059 | 234, 235, 235, 235, 235, 235, 236, 236, 237, 237, |
| 1060 | 238, 238, 239, 240, 241, 241, 241, 241, 242, 242, |
| 1061 | 242, 243, 243, 244, 245, 245, 246 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1062 | }; |
| 1063 | |
| 1064 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1065 | static const yytype_uint8 yyr2[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1066 | { |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 1067 | 0, 2, 1, 1, 2, 0, 9, 0, 1, 3, |
| 1068 | 2, 1, 2, 1, 4, 1, 0, 1, 1, 2, |
| 1069 | 2, 2, 2, 2, 2, 0, 1, 3, 1, 2, |
| 1070 | 1, 1, 1, 0, 3, 1, 0, 1, 3, 2, |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 1071 | 0, 1, 1, 2, 0, 1, 4, 1, 3, 1, |
| 1072 | 3, 1, 0, 1, 3, 3, 2, 1, 3, 1, |
| 1073 | 3, 1, 3, 4, 1, 1, 4, 3, 3, 6, |
| 1074 | 6, 1, 3, 1, 3, 3, 3, 3, 1, 3, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1075 | 1, 1, 1, 1, 0, 1, 1, 3, 5, 3, |
| 1076 | 2, 3, 1, 1, 3, 2, 1, 1, 5, 0, |
| 1077 | 1, 1, 3, 2, 4, 3, 3, 3, 3, 3, |
| 1078 | 0, 1, 0, 6, 1, 2, 1, 1, 1, 3, |
| 1079 | 1, 3, 3, 3, 0, 2, 1, 4, 4, 4, |
| 1080 | 6, 6, 1, 4, 3, 1, 3, 3, 3, 1, |
| 1081 | 3, 1, 3, 1, 1, 1, 1, 3, 3, 1, |
| 1082 | 4, 1, 1, 3, 0, 3, 1, 1, 1, 1, |
| 1083 | 1, 1, 1, 1, 3, 1, 1, 1, 1, 2, |
| 1084 | 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, |
| 1085 | 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1086 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1087 | 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1088 | 4, 3, 4, 1, 1, 1, 1, 3, 5, 1, |
| 1089 | 3, 1, 3, 1, 3, 1, 3, 4, 3, 1, |
| 1090 | 1, 3, 3, 3, 3, 1, 1, 0, 3, 2, |
| 1091 | 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1092 | 1, 1, 3, 5, 1, 3, 1, 3, 0, 1, |
| 1093 | 1, 1, 1, 1, 1, 1, 0, 5, 2, 1, |
| 1094 | 2, 2, 3, 1, 1, 3, 4, 1, 3, 2, |
| 1095 | 3, 1, 3, 0, 1, 1, 2, 2, 3, 1, |
| 1096 | 3, 1, 4, 4, 1, 1, 1, 1, 1, 1, |
| 1097 | 0, 1, 2, 4, 0, 1, 1, 1, 0, 1, |
| 1098 | 1, 1, 1, 1, 0, 1, 1 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1099 | }; |
| 1100 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1101 | /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. |
| 1102 | Performed when YYTABLE doesn't specify something else to do. Zero |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1103 | means the default is an error. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1104 | static const yytype_uint16 yydefact[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1105 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1106 | 0, 311, 312, 0, 2, 3, 5, 1, 4, 7, |
| 1107 | 0, 0, 8, 316, 15, 10, 0, 11, 13, 16, |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 1108 | 9, 12, 0, 0, 0, 0, 0, 0, 0, 17, |
| 1109 | 18, 0, 24, 22, 20, 23, 21, 0, 19, 14, |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 1110 | 52, 0, 0, 26, 36, 53, 0, 56, 0, 57, |
| 1111 | 59, 61, 6, 40, 0, 37, 55, 54, 0, 0, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1112 | 39, 0, 41, 42, 0, 47, 49, 51, 188, 0, |
| 1113 | 189, 190, 191, 192, 193, 201, 194, 195, 196, 197, |
| 1114 | 198, 199, 200, 27, 28, 32, 30, 31, 35, 0, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1115 | 300, 58, 60, 38, 43, 0, 0, 0, 33, 29, |
| 1116 | 300, 135, 313, 0, 170, 0, 0, 184, 177, 181, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1117 | 183, 171, 0, 0, 172, 176, 180, 0, 0, 65, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1118 | 186, 173, 64, 182, 139, 304, 0, 124, 301, 308, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1119 | 44, 48, 50, 34, 0, 68, 67, 0, 185, 179, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1120 | 178, 175, 174, 0, 71, 0, 173, 73, 0, 300, |
| 1121 | 0, 187, 0, 306, 307, 305, 0, 0, 0, 206, |
| 1122 | 310, 309, 302, 45, 46, 0, 136, 138, 0, 0, |
| 1123 | 0, 0, 0, 63, 159, 165, 160, 296, 297, 166, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1124 | 167, 157, 158, 83, 0, 78, 80, 81, 161, 162, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1125 | 82, 295, 287, 0, 289, 294, 291, 144, 145, 140, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1126 | 141, 143, 137, 0, 156, 154, 150, 151, 152, 0, |
| 1127 | 163, 132, 0, 0, 206, 206, 126, 125, 0, 0, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1128 | 123, 207, 208, 209, 300, 300, 0, 101, 300, 72, |
| 1129 | 77, 76, 75, 74, 249, 250, 299, 0, 243, 242, |
| 1130 | 0, 0, 241, 244, 0, 215, 237, 0, 251, 246, |
| 1131 | 0, 216, 219, 221, 223, 225, 236, 0, 229, 247, |
| 1132 | 230, 235, 298, 245, 248, 66, 300, 288, 0, 0, |
| 1133 | 0, 303, 0, 0, 0, 0, 300, 0, 300, 0, |
| 1134 | 300, 0, 0, 0, 300, 237, 0, 213, 214, 263, |
| 1135 | 265, 264, 273, 274, 0, 149, 146, 0, 285, 283, |
| 1136 | 283, 283, 103, 284, 99, 283, 283, 110, 0, 70, |
| 1137 | 69, 0, 269, 0, 0, 239, 240, 0, 0, 0, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1138 | 0, 62, 0, 202, 203, 0, 204, 205, 0, 0, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1139 | 0, 0, 79, 290, 0, 0, 163, 142, 168, 155, |
| 1140 | 164, 153, 0, 120, 0, 93, 96, 97, 300, 134, |
| 1141 | 0, 0, 85, 86, 92, 283, 300, 314, 0, 314, |
| 1142 | 0, 0, 268, 0, 211, 0, 0, 286, 108, 0, |
| 1143 | 107, 109, 100, 283, 105, 106, 0, 98, 111, 102, |
| 1144 | 220, 270, 271, 234, 232, 252, 0, 238, 228, 217, |
| 1145 | 222, 224, 226, 0, 233, 231, 293, 292, 169, 133, |
| 1146 | 0, 127, 300, 95, 300, 128, 300, 90, 283, 300, |
| 1147 | 315, 129, 300, 210, 266, 275, 0, 0, 277, 212, |
| 1148 | 147, 148, 104, 0, 272, 256, 0, 254, 206, 0, |
| 1149 | 227, 121, 122, 94, 91, 300, 87, 89, 124, 124, |
| 1150 | 0, 0, 279, 281, 276, 0, 112, 253, 0, 258, |
| 1151 | 218, 0, 130, 131, 267, 280, 0, 278, 0, 255, |
| 1152 | 261, 262, 260, 257, 259, 88, 282, 116, 117, 0, |
| 1153 | 0, 114, 118, 0, 113, 115, 119 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1154 | }; |
| 1155 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1156 | /* YYDEFGOTO[NTERM-NUM]. */ |
| 1157 | static const yytype_int16 yydefgoto[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1158 | { |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 1159 | -1, 3, 4, 5, 9, 11, 12, 16, 17, 28, |
Lev Walkin | c6ab03c | 2006-10-21 05:54:49 +0000 | [diff] [blame] | 1160 | 29, 30, 42, 43, 83, 84, 133, 54, 55, 61, |
| 1161 | 62, 164, 63, 64, 65, 44, 45, 48, 49, 183, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1162 | 85, 118, 86, 143, 144, 184, 185, 351, 352, 353, |
| 1163 | 344, 345, 135, 373, 226, 227, 377, 378, 458, 470, |
| 1164 | 471, 354, 355, 158, 159, 217, 248, 199, 200, 472, |
| 1165 | 300, 301, 87, 206, 272, 207, 208, 249, 339, 120, |
| 1166 | 121, 122, 123, 325, 328, 220, 221, 222, 223, 286, |
| 1167 | 287, 251, 252, 253, 254, 255, 319, 256, 257, 258, |
| 1168 | 259, 260, 261, 426, 427, 463, 464, 288, 289, 440, |
| 1169 | 290, 314, 291, 292, 293, 417, 418, 442, 302, 303, |
| 1170 | 151, 193, 194, 262, 263, 127, 128, 129, 156, 162, |
| 1171 | 209, 124, 409, 264 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1172 | }; |
| 1173 | |
| 1174 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
| 1175 | STATE-NUM. */ |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1176 | #define YYPACT_NINF -297 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1177 | static const yytype_int16 yypact[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1178 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1179 | 201, -297, -297, 30, 201, -297, -297, -297, -297, -59, |
| 1180 | 10, 41, -297, -297, -297, -297, 23, -297, -35, 176, |
| 1181 | -297, -297, 103, 59, 82, 117, 122, 134, 239, 176, |
| 1182 | -297, 142, -297, -297, -297, -297, -297, 237, -297, -297, |
| 1183 | 119, 57, 227, -297, 206, -297, 165, -297, 157, -297, |
| 1184 | 189, -297, -297, 169, 596, -297, -297, -297, 193, 186, |
| 1185 | -297, 195, 193, -297, -26, -297, 209, -297, -297, 298, |
| 1186 | -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, |
| 1187 | -297, -297, -297, 596, -297, -297, -297, -297, -297, 271, |
| 1188 | 203, -297, -297, -297, -297, 201, 193, 212, -297, -297, |
| 1189 | -3, 204, -297, 241, -297, 242, 253, -297, -297, -297, |
| 1190 | -297, -297, 275, 246, -297, -297, -297, 772, 332, 230, |
| 1191 | -297, 236, -297, -297, 231, 124, 345, -297, -297, 110, |
| 1192 | -59, -297, -297, -297, 240, -297, -297, 193, -297, -297, |
| 1193 | -297, -297, -297, -66, -297, 243, -297, 244, 247, 97, |
| 1194 | 91, -297, 258, -297, -297, -297, 341, 228, 696, 105, |
| 1195 | -297, -297, -297, -297, -297, 265, -297, -297, 353, 772, |
| 1196 | 193, 193, 448, -297, -297, -297, -297, -297, -297, -297, |
| 1197 | -297, -297, -297, -297, 98, -297, -297, -297, -297, -297, |
| 1198 | -297, -297, -297, 101, -297, -297, 250, -297, -297, 238, |
| 1199 | -297, -297, -297, 248, -297, -297, -297, -297, -297, 245, |
| 1200 | 251, 322, 267, 300, -46, 111, -297, -297, 261, 402, |
| 1201 | -297, -297, -297, 270, 263, 7, 136, -297, -3, -297, |
| 1202 | -297, -297, -297, -297, -297, -297, -297, 276, -297, -297, |
| 1203 | -79, 221, -297, -297, 255, -297, -297, 448, -297, -297, |
| 1204 | 272, 269, 187, 191, -297, 282, -297, 274, -79, -297, |
| 1205 | -297, -297, -297, -297, -297, -297, 97, -297, 84, 216, |
| 1206 | 286, -297, 380, 377, 228, 357, 9, 290, 74, 316, |
| 1207 | 74, 318, 402, 362, 203, 201, 284, -297, -297, -297, |
| 1208 | -297, -297, 285, -297, 402, -297, -297, 228, -297, -4, |
| 1209 | 44, -4, -297, -297, 303, 44, -4, 297, 265, -297, |
| 1210 | -297, 571, 279, 293, 582, -297, -297, 292, 295, 380, |
| 1211 | 289, -297, 294, -297, -297, 571, -297, -297, 571, 571, |
| 1212 | 448, 690, -297, -297, 296, 308, -297, -297, -297, 400, |
| 1213 | -297, -297, 377, 304, 137, -297, -297, -297, 203, -297, |
| 1214 | 333, 311, 309, -297, -297, -4, 203, 377, 317, 377, |
| 1215 | 314, 319, -297, 321, -297, 312, 320, -297, -297, 291, |
| 1216 | -297, -297, -297, -4, -297, -297, 346, -297, -297, -297, |
| 1217 | -297, -297, 315, -297, -297, 270, 69, 400, -297, 324, |
| 1218 | 191, -297, -297, 329, -297, -297, -297, -297, -297, -297, |
| 1219 | 216, -297, 9, -297, 203, -297, 46, -297, -4, 203, |
| 1220 | -297, -297, 203, -297, -297, -297, -1, 138, -297, -297, |
| 1221 | -297, -297, -297, 327, -297, -297, 139, -297, 105, 553, |
| 1222 | -297, -297, -297, -297, -297, 79, -297, -297, -297, -297, |
| 1223 | 380, 377, 310, -297, -297, 312, -297, -297, 69, 11, |
| 1224 | -297, 55, -297, -297, 400, 310, 377, -297, 50, -297, |
| 1225 | -297, -297, -297, -297, -297, -297, -297, -297, -297, 50, |
| 1226 | 18, -297, -297, 34, -297, -297, -297 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1227 | }; |
| 1228 | |
| 1229 | /* YYPGOTO[NTERM-NUM]. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1230 | static const yytype_int16 yypgoto[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1231 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1232 | -297, -297, -297, 439, -297, -297, 323, -297, 428, -297, |
| 1233 | -297, 416, -297, -297, -297, 364, -297, -297, -297, -297, |
| 1234 | -297, -297, 386, -297, 354, -297, -297, -297, 391, 325, |
| 1235 | -297, 313, -297, -297, 283, -297, 185, 188, 32, 63, |
| 1236 | -297, 72, 249, -297, -297, 167, -297, -297, -297, 12, |
| 1237 | -187, -259, -87, -297, -126, -297, -82, -297, 208, -124, |
| 1238 | 257, 259, -297, -120, -297, -134, -255, -141, -296, -52, |
| 1239 | 36, -297, -36, -297, -297, -213, -297, -297, 159, -110, |
| 1240 | -168, 51, -297, 158, 160, -130, -297, -297, -297, -253, |
| 1241 | -297, -297, -297, -297, 37, -297, -297, -297, -297, -297, |
| 1242 | -297, 229, -297, -297, -297, -297, 45, 52, -207, -297, |
| 1243 | -297, -297, 218, -138, -297, -152, -297, -297, -297, -297, |
| 1244 | 5, -297, 132, -10 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1245 | }; |
| 1246 | |
| 1247 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
| 1248 | positive, shift that token. If negative, reduce the rule which |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1249 | number is the opposite. If YYTABLE_NINF, syntax error. */ |
| 1250 | #define YYTABLE_NINF -284 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1251 | static const yytype_int16 yytable[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1252 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1253 | 18, 279, 281, 126, 250, 6, 18, 119, 188, 6, |
| 1254 | 13, 189, 195, 136, 334, 187, 188, 346, 88, 189, |
| 1255 | 13, 13, 14, 387, 467, 295, 296, 95, 201, 312, |
| 1256 | 7, 51, 134, 460, 13, 14, 297, 197, 198, 468, |
| 1257 | 467, 218, 313, 67, 90, 168, 50, 88, 51, 169, |
| 1258 | 435, 10, 67, 197, 198, 468, 467, 13, 66, 89, |
| 1259 | 465, 384, 186, 50, 278, 145, 219, 66, 13, 197, |
| 1260 | 198, 468, 298, 90, 1, 2, 119, 22, 395, 320, |
| 1261 | 13, 46, 19, 350, 297, 13, 67, 461, 89, 96, |
| 1262 | 13, 462, 368, 370, 371, 13, 177, 178, 374, 375, |
| 1263 | 130, 66, 13, 177, 178, 174, 175, 176, 13, 177, |
| 1264 | 178, 350, 179, 180, 125, 31, 350, 145, 343, 441, |
| 1265 | 298, 15, 147, 32, 125, 188, 125, 167, 189, 474, |
| 1266 | 195, 335, 187, 188, 20, 469, 189, 299, 304, 190, |
| 1267 | 196, 310, 166, 346, 454, 431, 201, 210, 407, 181, |
| 1268 | 153, 469, 476, 146, 341, 343, 188, 202, 160, 189, |
| 1269 | 231, 233, 393, 125, 369, -25, 422, 469, 41, 161, |
| 1270 | 406, 47, 360, 33, 147, 230, 232, 367, 425, 186, |
| 1271 | 13, 380, 35, 343, 366, -84, 1, 2, 343, 347, |
| 1272 | 182, 125, 218, 191, 23, 349, 125, 362, 218, 392, |
| 1273 | 191, 437, 192, 24, 13, 146, 154, 172, 34, 265, |
| 1274 | 1, 2, 267, 266, 125, 449, 268, 219, 1, 2, |
| 1275 | 155, 280, 60, 219, 25, 36, 26, 13, 177, 178, |
| 1276 | 315, 316, 13, 1, 2, 27, 174, 175, 176, 13, |
| 1277 | 177, 178, 37, 179, 180, 1, 2, 307, 401, 444, |
| 1278 | 447, 308, 402, 445, 448, 39, 190, 438, 196, 336, |
| 1279 | 439, 403, 432, 340, 210, 40, 348, 53, 356, 408, |
| 1280 | 356, 57, 58, 52, 100, 1, 2, 197, 198, 56, |
| 1281 | 181, 295, 296, 475, 224, 225, 475, 210, 101, 102, |
| 1282 | 363, 317, 318, 323, 324, 326, 327, 92, 204, 59, |
| 1283 | 103, 68, 104, 297, 105, 197, 198, 101, 102, 93, |
| 1284 | 420, 421, 452, 453, 106, 347, 98, 434, 107, 97, |
| 1285 | 125, 182, 108, 132, 137, 109, 70, 71, 72, 138, |
| 1286 | 139, 140, 399, 141, 142, 148, 110, 73, 205, 298, |
| 1287 | 149, 111, 74, 112, 75, 113, 150, 410, 157, 410, |
| 1288 | 165, 152, 76, 203, 114, 115, 228, 172, 270, 170, |
| 1289 | 171, 77, 269, 78, 275, 273, 271, 274, 79, 116, |
| 1290 | 80, 81, 82, 282, -283, 277, 428, 276, -283, 311, |
| 1291 | 125, 117, 294, 321, 322, 329, 330, 338, 13, 342, |
| 1292 | 336, 357, 348, 359, 361, 365, 356, 364, 372, 376, |
| 1293 | 381, 382, 388, 389, 219, 386, 443, 398, 404, 396, |
| 1294 | 234, 175, 235, 13, 177, 178, 236, 179, 180, 101, |
| 1295 | 102, 397, 405, 400, 406, 356, 237, 413, 411, 414, |
| 1296 | 456, 443, 415, 419, 416, 423, 424, 446, 428, 429, |
| 1297 | 283, 284, 430, 8, 21, 38, 466, 99, 94, 91, |
| 1298 | 131, 332, 229, 163, 238, 239, 234, 175, 235, 13, |
| 1299 | 177, 178, 236, 179, 180, 101, 102, 451, 358, 436, |
| 1300 | 240, 216, 237, 173, 433, 379, 385, 309, 337, 241, |
| 1301 | 450, 473, 305, 390, 306, 459, 333, 331, 391, 242, |
| 1302 | 457, 412, 0, 455, 0, 243, 0, 0, 0, 0, |
| 1303 | 238, 239, 0, 0, 244, 0, 0, 0, 0, 0, |
| 1304 | 0, 245, 285, 0, 247, 0, 240, 0, 0, 0, |
| 1305 | 0, 0, 0, 0, 0, 241, 0, 0, 0, 0, |
| 1306 | 0, 0, 0, 0, 0, 242, 0, 0, 0, 0, |
| 1307 | 0, 243, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1308 | 244, 0, 0, 0, 0, 0, 0, 245, 246, 0, |
| 1309 | 247, 234, 175, 235, 13, 177, 178, 236, 179, 180, |
| 1310 | 101, 102, 0, 0, 0, 0, 0, 237, 0, 234, |
| 1311 | 175, 235, 13, 177, 178, 236, 179, 180, 101, 102, |
| 1312 | 234, 175, 235, 13, 177, 178, 236, 179, 180, 0, |
| 1313 | 0, 0, 0, 0, 0, 238, 239, 13, 0, 0, |
| 1314 | 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, |
| 1315 | 0, 240, 0, 238, 239, 0, 68, 0, 0, 0, |
| 1316 | 241, 0, 0, 0, 238, 0, 0, 0, 0, 240, |
| 1317 | 242, 69, 0, 0, 0, 0, 243, 0, 241, 383, |
| 1318 | 0, 70, 71, 72, 0, 244, 0, 0, 242, 0, |
| 1319 | 0, 0, 73, 246, 243, 247, 0, 74, 0, 75, |
| 1320 | 0, 0, 0, 244, 0, 243, 0, 76, 0, 0, |
| 1321 | 0, 246, 0, 247, 0, 0, 77, 0, 78, 0, |
| 1322 | 0, 0, 0, 79, 0, 80, 81, 82, 234, 175, |
| 1323 | 235, 13, 177, 178, 236, 179, 180, 0, 0, 0, |
| 1324 | 0, 0, 0, 101, 102, 0, 0, 0, 0, 0, |
| 1325 | 0, 211, 0, 0, 0, 103, 68, 104, 0, 105, |
| 1326 | 212, 0, 0, 0, 0, 0, 0, 0, 0, 106, |
| 1327 | 0, 0, 238, 107, 0, 0, 0, 108, 0, 0, |
| 1328 | 109, 70, 71, 72, 0, 0, 0, 394, 0, 213, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1329 | 0, 110, 73, 0, 0, 0, 111, 74, 112, 75, |
| 1330 | 113, 0, 0, 0, 0, 0, 0, 76, 0, 114, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1331 | 115, 214, 215, 243, 0, 0, 77, 0, 78, 1, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1332 | 2, 0, 0, 79, 116, 80, 81, 82, 0, 0, |
| 1333 | 0, 103, 68, 104, 0, 105, 0, 0, 0, 0, |
| 1334 | 0, 0, 0, 0, 0, 106, 0, 0, 0, 107, |
| 1335 | 0, 0, 0, 108, 0, 0, 109, 70, 71, 72, |
| 1336 | 0, 0, 0, 0, 0, 0, 0, 110, 73, 0, |
| 1337 | 0, 0, 111, 74, 112, 75, 113, 0, 0, 0, |
| 1338 | 0, 0, 0, 76, 0, 114, 115, 0, 0, 0, |
| 1339 | 0, 0, 77, 0, 78, 0, 0, 0, 0, 79, |
| 1340 | 116, 80, 81, 82 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1341 | }; |
| 1342 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1343 | #define yypact_value_is_default(Yystate) \ |
| 1344 | (!!((Yystate) == (-297))) |
| 1345 | |
| 1346 | #define yytable_value_is_error(Yytable_value) \ |
| 1347 | YYID (0) |
| 1348 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1349 | static const yytype_int16 yycheck[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1350 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1351 | 10, 214, 215, 90, 172, 0, 16, 89, 149, 4, |
| 1352 | 11, 149, 150, 100, 269, 149, 157, 276, 54, 157, |
| 1353 | 11, 11, 12, 319, 6, 18, 19, 53, 152, 108, |
| 1354 | 0, 41, 35, 22, 11, 12, 40, 19, 20, 21, |
| 1355 | 6, 87, 121, 53, 54, 111, 41, 83, 58, 115, |
| 1356 | 4, 110, 62, 19, 20, 21, 6, 11, 53, 54, |
| 1357 | 5, 314, 149, 58, 110, 117, 112, 62, 11, 19, |
| 1358 | 20, 21, 76, 83, 17, 18, 158, 112, 331, 247, |
| 1359 | 11, 24, 41, 37, 40, 11, 96, 76, 83, 115, |
| 1360 | 11, 80, 299, 300, 301, 11, 12, 13, 305, 306, |
| 1361 | 95, 96, 11, 12, 13, 8, 9, 10, 11, 12, |
| 1362 | 13, 37, 15, 16, 117, 12, 37, 169, 109, 120, |
| 1363 | 76, 111, 117, 64, 117, 266, 117, 137, 266, 111, |
| 1364 | 268, 269, 266, 274, 111, 117, 274, 224, 225, 149, |
| 1365 | 150, 228, 137, 402, 440, 400, 270, 157, 355, 52, |
| 1366 | 26, 117, 118, 117, 274, 109, 297, 152, 48, 297, |
| 1367 | 170, 171, 330, 117, 120, 46, 373, 117, 49, 59, |
| 1368 | 115, 114, 282, 91, 169, 170, 171, 297, 109, 266, |
| 1369 | 11, 311, 60, 109, 294, 111, 17, 18, 109, 276, |
| 1370 | 93, 117, 87, 109, 18, 277, 117, 284, 87, 329, |
| 1371 | 109, 408, 111, 27, 11, 169, 82, 110, 91, 111, |
| 1372 | 17, 18, 111, 115, 117, 428, 115, 112, 17, 18, |
| 1373 | 96, 110, 53, 112, 48, 91, 50, 11, 12, 13, |
| 1374 | 9, 241, 11, 17, 18, 59, 8, 9, 10, 11, |
| 1375 | 12, 13, 3, 15, 16, 17, 18, 111, 111, 111, |
| 1376 | 111, 115, 115, 115, 115, 113, 266, 409, 268, 269, |
| 1377 | 412, 348, 400, 273, 274, 28, 276, 61, 278, 356, |
| 1378 | 280, 114, 115, 46, 3, 17, 18, 19, 20, 114, |
| 1379 | 52, 18, 19, 470, 19, 20, 473, 297, 17, 18, |
| 1380 | 285, 36, 37, 106, 107, 104, 105, 111, 70, 110, |
| 1381 | 29, 30, 31, 40, 33, 19, 20, 17, 18, 114, |
| 1382 | 19, 20, 438, 439, 43, 402, 18, 404, 47, 110, |
| 1383 | 117, 93, 51, 111, 120, 54, 55, 56, 57, 88, |
| 1384 | 88, 78, 342, 58, 88, 3, 65, 66, 110, 76, |
| 1385 | 110, 70, 71, 72, 73, 74, 110, 357, 3, 359, |
| 1386 | 110, 120, 81, 12, 83, 84, 3, 110, 120, 116, |
| 1387 | 116, 90, 112, 92, 42, 120, 118, 116, 97, 98, |
| 1388 | 99, 100, 101, 112, 111, 75, 386, 110, 115, 103, |
| 1389 | 117, 110, 112, 111, 115, 103, 112, 7, 11, 32, |
| 1390 | 400, 75, 402, 75, 32, 110, 406, 113, 95, 102, |
| 1391 | 121, 108, 113, 109, 112, 110, 416, 7, 75, 113, |
| 1392 | 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, |
| 1393 | 18, 113, 111, 119, 115, 435, 24, 113, 111, 110, |
| 1394 | 120, 441, 111, 113, 122, 89, 121, 110, 448, 115, |
| 1395 | 38, 39, 113, 4, 16, 29, 456, 83, 62, 58, |
| 1396 | 96, 266, 169, 130, 52, 53, 8, 9, 10, 11, |
| 1397 | 12, 13, 14, 15, 16, 17, 18, 435, 280, 406, |
| 1398 | 68, 158, 24, 148, 402, 308, 317, 228, 270, 77, |
| 1399 | 429, 469, 225, 325, 225, 448, 268, 258, 328, 87, |
| 1400 | 445, 359, -1, 441, -1, 93, -1, -1, -1, -1, |
| 1401 | 52, 53, -1, -1, 102, -1, -1, -1, -1, -1, |
| 1402 | -1, 109, 110, -1, 112, -1, 68, -1, -1, -1, |
| 1403 | -1, -1, -1, -1, -1, 77, -1, -1, -1, -1, |
| 1404 | -1, -1, -1, -1, -1, 87, -1, -1, -1, -1, |
| 1405 | -1, 93, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1406 | 102, -1, -1, -1, -1, -1, -1, 109, 110, -1, |
| 1407 | 112, 8, 9, 10, 11, 12, 13, 14, 15, 16, |
| 1408 | 17, 18, -1, -1, -1, -1, -1, 24, -1, 8, |
| 1409 | 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, |
| 1410 | 8, 9, 10, 11, 12, 13, 14, 15, 16, -1, |
| 1411 | -1, -1, -1, -1, -1, 52, 53, 11, -1, -1, |
| 1412 | -1, -1, -1, 17, 18, -1, -1, -1, -1, -1, |
| 1413 | -1, 68, -1, 52, 53, -1, 30, -1, -1, -1, |
| 1414 | 77, -1, -1, -1, 52, -1, -1, -1, -1, 68, |
| 1415 | 87, 45, -1, -1, -1, -1, 93, -1, 77, 67, |
| 1416 | -1, 55, 56, 57, -1, 102, -1, -1, 87, -1, |
| 1417 | -1, -1, 66, 110, 93, 112, -1, 71, -1, 73, |
| 1418 | -1, -1, -1, 102, -1, 93, -1, 81, -1, -1, |
| 1419 | -1, 110, -1, 112, -1, -1, 90, -1, 92, -1, |
| 1420 | -1, -1, -1, 97, -1, 99, 100, 101, 8, 9, |
| 1421 | 10, 11, 12, 13, 14, 15, 16, -1, -1, -1, |
| 1422 | -1, -1, -1, 17, 18, -1, -1, -1, -1, -1, |
| 1423 | -1, 25, -1, -1, -1, 29, 30, 31, -1, 33, |
| 1424 | 34, -1, -1, -1, -1, -1, -1, -1, -1, 43, |
| 1425 | -1, -1, 52, 47, -1, -1, -1, 51, -1, -1, |
| 1426 | 54, 55, 56, 57, -1, -1, -1, 67, -1, 63, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1427 | -1, 65, 66, -1, -1, -1, 70, 71, 72, 73, |
| 1428 | 74, -1, -1, -1, -1, -1, -1, 81, -1, 83, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1429 | 84, 85, 86, 93, -1, -1, 90, -1, 92, 17, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1430 | 18, -1, -1, 97, 98, 99, 100, 101, -1, -1, |
| 1431 | -1, 29, 30, 31, -1, 33, -1, -1, -1, -1, |
| 1432 | -1, -1, -1, -1, -1, 43, -1, -1, -1, 47, |
| 1433 | -1, -1, -1, 51, -1, -1, 54, 55, 56, 57, |
| 1434 | -1, -1, -1, -1, -1, -1, -1, 65, 66, -1, |
| 1435 | -1, -1, 70, 71, 72, 73, 74, -1, -1, -1, |
| 1436 | -1, -1, -1, 81, -1, 83, 84, -1, -1, -1, |
| 1437 | -1, -1, 90, -1, 92, -1, -1, -1, -1, 97, |
| 1438 | 98, 99, 100, 101 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1439 | }; |
| 1440 | |
| 1441 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
| 1442 | symbol of state STATE-NUM. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1443 | static const yytype_uint8 yystos[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1444 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1445 | 0, 17, 18, 124, 125, 126, 243, 0, 126, 127, |
| 1446 | 110, 128, 129, 11, 12, 111, 130, 131, 246, 41, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1447 | 111, 131, 112, 18, 27, 48, 50, 59, 132, 133, |
| 1448 | 134, 12, 64, 91, 91, 60, 91, 3, 134, 113, |
| 1449 | 28, 49, 135, 136, 148, 149, 24, 114, 150, 151, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1450 | 243, 246, 46, 61, 140, 141, 114, 114, 115, 110, |
| 1451 | 53, 142, 143, 145, 146, 147, 243, 246, 30, 45, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1452 | 55, 56, 57, 66, 71, 73, 81, 90, 92, 97, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1453 | 99, 100, 101, 137, 138, 153, 155, 185, 195, 243, |
| 1454 | 246, 151, 111, 114, 145, 53, 115, 110, 18, 138, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1455 | 3, 17, 18, 29, 31, 33, 43, 47, 51, 54, |
| 1456 | 65, 70, 72, 74, 83, 84, 98, 110, 154, 179, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1457 | 192, 193, 194, 195, 244, 117, 175, 238, 239, 240, |
| 1458 | 243, 147, 111, 139, 35, 165, 175, 120, 88, 88, |
| 1459 | 78, 58, 88, 156, 157, 192, 193, 243, 3, 110, |
| 1460 | 110, 233, 120, 26, 82, 96, 241, 3, 176, 177, |
| 1461 | 48, 59, 242, 129, 144, 110, 243, 246, 111, 115, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1462 | 116, 116, 110, 152, 8, 9, 10, 12, 13, 15, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1463 | 16, 52, 93, 152, 158, 159, 175, 188, 190, 236, |
| 1464 | 246, 109, 111, 234, 235, 236, 246, 19, 20, 180, |
| 1465 | 181, 182, 243, 12, 70, 110, 186, 188, 189, 243, |
| 1466 | 246, 25, 34, 63, 85, 86, 154, 178, 87, 112, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1467 | 198, 199, 200, 201, 19, 20, 167, 168, 3, 157, |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1468 | 243, 246, 243, 246, 8, 10, 14, 24, 52, 53, |
| 1469 | 68, 77, 87, 93, 102, 109, 110, 112, 179, 190, |
| 1470 | 203, 204, 205, 206, 207, 208, 210, 211, 212, 213, |
| 1471 | 214, 215, 236, 237, 246, 111, 115, 111, 115, 112, |
| 1472 | 120, 118, 187, 120, 116, 42, 110, 75, 110, 198, |
| 1473 | 110, 198, 112, 38, 39, 110, 202, 203, 220, 221, |
| 1474 | 223, 225, 226, 227, 112, 18, 19, 40, 76, 175, |
| 1475 | 183, 184, 231, 232, 175, 183, 184, 111, 115, 165, |
| 1476 | 175, 103, 108, 121, 224, 9, 246, 36, 37, 209, |
| 1477 | 203, 111, 115, 106, 107, 196, 104, 105, 197, 103, |
| 1478 | 112, 224, 159, 235, 189, 236, 246, 181, 7, 191, |
| 1479 | 246, 186, 32, 109, 163, 164, 174, 175, 246, 179, |
| 1480 | 37, 160, 161, 162, 174, 175, 246, 75, 160, 75, |
| 1481 | 202, 32, 175, 243, 113, 110, 202, 186, 231, 120, |
| 1482 | 231, 231, 95, 166, 231, 231, 102, 169, 170, 168, |
| 1483 | 208, 121, 108, 67, 212, 201, 110, 191, 113, 109, |
| 1484 | 206, 207, 208, 203, 67, 212, 113, 113, 7, 246, |
| 1485 | 119, 111, 115, 175, 75, 111, 115, 231, 175, 245, |
| 1486 | 246, 111, 245, 113, 110, 111, 122, 228, 229, 113, |
| 1487 | 19, 20, 231, 89, 121, 109, 216, 217, 246, 115, |
| 1488 | 113, 189, 236, 164, 175, 4, 162, 231, 238, 238, |
| 1489 | 222, 120, 230, 246, 111, 115, 110, 111, 115, 198, |
| 1490 | 204, 161, 177, 177, 191, 230, 120, 229, 171, 217, |
| 1491 | 22, 76, 80, 218, 219, 5, 246, 6, 21, 117, |
| 1492 | 172, 173, 182, 172, 111, 173, 118 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1493 | }; |
| 1494 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1495 | #define yyerrok (yyerrstatus = 0) |
| 1496 | #define yyclearin (yychar = YYEMPTY) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1497 | #define YYEMPTY (-2) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1498 | #define YYEOF 0 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1499 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1500 | #define YYACCEPT goto yyacceptlab |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1501 | #define YYABORT goto yyabortlab |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1502 | #define YYERROR goto yyerrorlab |
| 1503 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1504 | |
| 1505 | /* Like YYERROR except do call yyerror. This remains here temporarily |
| 1506 | to ease the transition to the new meaning of YYERROR, for GCC. |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1507 | Once GCC version 2 has supplanted version 1, this can go. However, |
| 1508 | YYFAIL appears to be in use. Nevertheless, it is formally deprecated |
| 1509 | in Bison 2.4.2's NEWS entry, where a plan to phase it out is |
| 1510 | discussed. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1511 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1512 | #define YYFAIL goto yyerrlab |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1513 | #if defined YYFAIL |
| 1514 | /* This is here to suppress warnings from the GCC cpp's |
| 1515 | -Wunused-macros. Normally we don't worry about that warning, but |
| 1516 | some users do, and we want to make it easy for users to remove |
| 1517 | YYFAIL uses, which will produce warnings from Bison 2.5. */ |
| 1518 | #endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1519 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1520 | #define YYRECOVERING() (!!yyerrstatus) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1521 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1522 | #define YYBACKUP(Token, Value) \ |
| 1523 | do \ |
| 1524 | if (yychar == YYEMPTY) \ |
| 1525 | { \ |
| 1526 | yychar = (Token); \ |
| 1527 | yylval = (Value); \ |
| 1528 | YYPOPSTACK (yylen); \ |
| 1529 | yystate = *yyssp; \ |
| 1530 | goto yybackup; \ |
| 1531 | } \ |
| 1532 | else \ |
| 1533 | { \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1534 | yyerror (YY_("syntax error: cannot back up")); \ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1535 | YYERROR; \ |
| 1536 | } \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1537 | while (YYID (0)) |
| 1538 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1539 | /* Error token number */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1540 | #define YYTERROR 1 |
| 1541 | #define YYERRCODE 256 |
| 1542 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1543 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1544 | /* This macro is provided for backward compatibility. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1545 | #ifndef YY_LOCATION_PRINT |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1546 | # define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1547 | #endif |
| 1548 | |
| 1549 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1550 | /* YYLEX -- calling `yylex' with the right arguments. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1551 | #ifdef YYLEX_PARAM |
| 1552 | # define YYLEX yylex (YYLEX_PARAM) |
| 1553 | #else |
| 1554 | # define YYLEX yylex () |
| 1555 | #endif |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 1556 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1557 | /* Enable debugging if requested. */ |
| 1558 | #if YYDEBUG |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 1559 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1560 | # ifndef YYFPRINTF |
| 1561 | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
| 1562 | # define YYFPRINTF fprintf |
| 1563 | # endif |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 1564 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1565 | # define YYDPRINTF(Args) \ |
| 1566 | do { \ |
| 1567 | if (yydebug) \ |
| 1568 | YYFPRINTF Args; \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1569 | } while (YYID (0)) |
| 1570 | |
| 1571 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
| 1572 | do { \ |
| 1573 | if (yydebug) \ |
| 1574 | { \ |
| 1575 | YYFPRINTF (stderr, "%s ", Title); \ |
| 1576 | yy_symbol_print (stderr, \ |
| 1577 | Type, Value); \ |
| 1578 | YYFPRINTF (stderr, "\n"); \ |
| 1579 | } \ |
| 1580 | } while (YYID (0)) |
| 1581 | |
| 1582 | |
| 1583 | /*--------------------------------. |
| 1584 | | Print this symbol on YYOUTPUT. | |
| 1585 | `--------------------------------*/ |
| 1586 | |
| 1587 | /*ARGSUSED*/ |
| 1588 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1589 | || defined __cplusplus || defined _MSC_VER) |
| 1590 | static void |
| 1591 | yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
| 1592 | #else |
| 1593 | static void |
| 1594 | yy_symbol_value_print (yyoutput, yytype, yyvaluep) |
| 1595 | FILE *yyoutput; |
| 1596 | int yytype; |
| 1597 | YYSTYPE const * const yyvaluep; |
| 1598 | #endif |
| 1599 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1600 | FILE *yyo = yyoutput; |
| 1601 | YYUSE (yyo); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1602 | if (!yyvaluep) |
| 1603 | return; |
| 1604 | # ifdef YYPRINT |
| 1605 | if (yytype < YYNTOKENS) |
| 1606 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); |
| 1607 | # else |
| 1608 | YYUSE (yyoutput); |
| 1609 | # endif |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1610 | YYUSE (yytype); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1611 | } |
| 1612 | |
| 1613 | |
| 1614 | /*--------------------------------. |
| 1615 | | Print this symbol on YYOUTPUT. | |
| 1616 | `--------------------------------*/ |
| 1617 | |
| 1618 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1619 | || defined __cplusplus || defined _MSC_VER) |
| 1620 | static void |
| 1621 | yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
| 1622 | #else |
| 1623 | static void |
| 1624 | yy_symbol_print (yyoutput, yytype, yyvaluep) |
| 1625 | FILE *yyoutput; |
| 1626 | int yytype; |
| 1627 | YYSTYPE const * const yyvaluep; |
| 1628 | #endif |
| 1629 | { |
| 1630 | if (yytype < YYNTOKENS) |
| 1631 | YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); |
| 1632 | else |
| 1633 | YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); |
| 1634 | |
| 1635 | yy_symbol_value_print (yyoutput, yytype, yyvaluep); |
| 1636 | YYFPRINTF (yyoutput, ")"); |
| 1637 | } |
| 1638 | |
| 1639 | /*------------------------------------------------------------------. |
| 1640 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | |
| 1641 | | TOP (included). | |
| 1642 | `------------------------------------------------------------------*/ |
| 1643 | |
| 1644 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1645 | || defined __cplusplus || defined _MSC_VER) |
| 1646 | static void |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1647 | yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1648 | #else |
| 1649 | static void |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1650 | yy_stack_print (yybottom, yytop) |
| 1651 | yytype_int16 *yybottom; |
| 1652 | yytype_int16 *yytop; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1653 | #endif |
| 1654 | { |
| 1655 | YYFPRINTF (stderr, "Stack now"); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1656 | for (; yybottom <= yytop; yybottom++) |
| 1657 | { |
| 1658 | int yybot = *yybottom; |
| 1659 | YYFPRINTF (stderr, " %d", yybot); |
| 1660 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1661 | YYFPRINTF (stderr, "\n"); |
| 1662 | } |
| 1663 | |
| 1664 | # define YY_STACK_PRINT(Bottom, Top) \ |
| 1665 | do { \ |
| 1666 | if (yydebug) \ |
| 1667 | yy_stack_print ((Bottom), (Top)); \ |
| 1668 | } while (YYID (0)) |
| 1669 | |
| 1670 | |
| 1671 | /*------------------------------------------------. |
| 1672 | | Report that the YYRULE is going to be reduced. | |
| 1673 | `------------------------------------------------*/ |
| 1674 | |
| 1675 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1676 | || defined __cplusplus || defined _MSC_VER) |
| 1677 | static void |
| 1678 | yy_reduce_print (YYSTYPE *yyvsp, int yyrule) |
| 1679 | #else |
| 1680 | static void |
| 1681 | yy_reduce_print (yyvsp, yyrule) |
| 1682 | YYSTYPE *yyvsp; |
| 1683 | int yyrule; |
| 1684 | #endif |
| 1685 | { |
| 1686 | int yynrhs = yyr2[yyrule]; |
| 1687 | int yyi; |
| 1688 | unsigned long int yylno = yyrline[yyrule]; |
| 1689 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", |
| 1690 | yyrule - 1, yylno); |
| 1691 | /* The symbols being reduced. */ |
| 1692 | for (yyi = 0; yyi < yynrhs; yyi++) |
| 1693 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1694 | YYFPRINTF (stderr, " $%d = ", yyi + 1); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1695 | yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], |
| 1696 | &(yyvsp[(yyi + 1) - (yynrhs)]) |
| 1697 | ); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1698 | YYFPRINTF (stderr, "\n"); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1699 | } |
| 1700 | } |
| 1701 | |
| 1702 | # define YY_REDUCE_PRINT(Rule) \ |
| 1703 | do { \ |
| 1704 | if (yydebug) \ |
| 1705 | yy_reduce_print (yyvsp, Rule); \ |
| 1706 | } while (YYID (0)) |
| 1707 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1708 | /* Nonzero means print parse trace. It is left uninitialized so that |
| 1709 | multiple parsers can coexist. */ |
| 1710 | int yydebug; |
| 1711 | #else /* !YYDEBUG */ |
| 1712 | # define YYDPRINTF(Args) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1713 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
| 1714 | # define YY_STACK_PRINT(Bottom, Top) |
| 1715 | # define YY_REDUCE_PRINT(Rule) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1716 | #endif /* !YYDEBUG */ |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 1717 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1718 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1719 | /* YYINITDEPTH -- initial size of the parser's stacks. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1720 | #ifndef YYINITDEPTH |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1721 | # define YYINITDEPTH 200 |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1722 | #endif |
| 1723 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1724 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
| 1725 | if the built-in stack extension method is used). |
| 1726 | |
| 1727 | Do not make this value too large; the results are undefined if |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1728 | YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1729 | evaluated with infinite-precision integer arithmetic. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1730 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1731 | #ifndef YYMAXDEPTH |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1732 | # define YYMAXDEPTH 10000 |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1733 | #endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1734 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1735 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1736 | #if YYERROR_VERBOSE |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1737 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1738 | # ifndef yystrlen |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1739 | # if defined __GLIBC__ && defined _STRING_H |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1740 | # define yystrlen strlen |
| 1741 | # else |
| 1742 | /* Return the length of YYSTR. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1743 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1744 | || defined __cplusplus || defined _MSC_VER) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1745 | static YYSIZE_T |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1746 | yystrlen (const char *yystr) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1747 | #else |
| 1748 | static YYSIZE_T |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1749 | yystrlen (yystr) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1750 | const char *yystr; |
| 1751 | #endif |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 1752 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1753 | YYSIZE_T yylen; |
| 1754 | for (yylen = 0; yystr[yylen]; yylen++) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1755 | continue; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1756 | return yylen; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1757 | } |
| 1758 | # endif |
| 1759 | # endif |
| 1760 | |
| 1761 | # ifndef yystpcpy |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1762 | # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1763 | # define yystpcpy stpcpy |
| 1764 | # else |
| 1765 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
| 1766 | YYDEST. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1767 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1768 | || defined __cplusplus || defined _MSC_VER) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1769 | static char * |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1770 | yystpcpy (char *yydest, const char *yysrc) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1771 | #else |
| 1772 | static char * |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1773 | yystpcpy (yydest, yysrc) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1774 | char *yydest; |
| 1775 | const char *yysrc; |
| 1776 | #endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1777 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1778 | char *yyd = yydest; |
| 1779 | const char *yys = yysrc; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1780 | |
| 1781 | while ((*yyd++ = *yys++) != '\0') |
| 1782 | continue; |
| 1783 | |
| 1784 | return yyd - 1; |
| 1785 | } |
| 1786 | # endif |
| 1787 | # endif |
| 1788 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1789 | # ifndef yytnamerr |
| 1790 | /* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
| 1791 | quotes and backslashes, so that it's suitable for yyerror. The |
| 1792 | heuristic is that double-quoting is unnecessary unless the string |
| 1793 | contains an apostrophe, a comma, or backslash (other than |
| 1794 | backslash-backslash). YYSTR is taken from yytname. If YYRES is |
| 1795 | null, do not copy; instead, return the length of what the result |
| 1796 | would have been. */ |
| 1797 | static YYSIZE_T |
| 1798 | yytnamerr (char *yyres, const char *yystr) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1799 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1800 | if (*yystr == '"') |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1801 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1802 | YYSIZE_T yyn = 0; |
| 1803 | char const *yyp = yystr; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1804 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1805 | for (;;) |
| 1806 | switch (*++yyp) |
| 1807 | { |
| 1808 | case '\'': |
| 1809 | case ',': |
| 1810 | goto do_not_strip_quotes; |
| 1811 | |
| 1812 | case '\\': |
| 1813 | if (*++yyp != '\\') |
| 1814 | goto do_not_strip_quotes; |
| 1815 | /* Fall through. */ |
| 1816 | default: |
| 1817 | if (yyres) |
| 1818 | yyres[yyn] = *yyp; |
| 1819 | yyn++; |
| 1820 | break; |
| 1821 | |
| 1822 | case '"': |
| 1823 | if (yyres) |
| 1824 | yyres[yyn] = '\0'; |
| 1825 | return yyn; |
| 1826 | } |
| 1827 | do_not_strip_quotes: ; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1828 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1829 | |
| 1830 | if (! yyres) |
| 1831 | return yystrlen (yystr); |
| 1832 | |
| 1833 | return yystpcpy (yyres, yystr) - yyres; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1834 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1835 | # endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1836 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1837 | /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message |
| 1838 | about the unexpected token YYTOKEN for the state stack whose top is |
| 1839 | YYSSP. |
| 1840 | |
| 1841 | Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is |
| 1842 | not large enough to hold the message. In that case, also set |
| 1843 | *YYMSG_ALLOC to the required number of bytes. Return 2 if the |
| 1844 | required number of bytes is too large to store. */ |
| 1845 | static int |
| 1846 | yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, |
| 1847 | yytype_int16 *yyssp, int yytoken) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1848 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1849 | YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); |
| 1850 | YYSIZE_T yysize = yysize0; |
| 1851 | enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
| 1852 | /* Internationalized format string. */ |
| 1853 | const char *yyformat = YY_NULL; |
| 1854 | /* Arguments of yyformat. */ |
| 1855 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
| 1856 | /* Number of reported tokens (one for the "unexpected", one per |
| 1857 | "expected"). */ |
| 1858 | int yycount = 0; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1859 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1860 | /* There are many possibilities here to consider: |
| 1861 | - Assume YYFAIL is not used. It's too flawed to consider. See |
| 1862 | <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> |
| 1863 | for details. YYERROR is fine as it does not invoke this |
| 1864 | function. |
| 1865 | - If this state is a consistent state with a default action, then |
| 1866 | the only way this function was invoked is if the default action |
| 1867 | is an error action. In that case, don't check for expected |
| 1868 | tokens because there are none. |
| 1869 | - The only way there can be no lookahead present (in yychar) is if |
| 1870 | this state is a consistent state with a default action. Thus, |
| 1871 | detecting the absence of a lookahead is sufficient to determine |
| 1872 | that there is no unexpected or expected token to report. In that |
| 1873 | case, just report a simple "syntax error". |
| 1874 | - Don't assume there isn't a lookahead just because this state is a |
| 1875 | consistent state with a default action. There might have been a |
| 1876 | previous inconsistent state, consistent state with a non-default |
| 1877 | action, or user semantic action that manipulated yychar. |
| 1878 | - Of course, the expected token list depends on states to have |
| 1879 | correct lookahead information, and it depends on the parser not |
| 1880 | to perform extra reductions after fetching a lookahead from the |
| 1881 | scanner and before detecting a syntax error. Thus, state merging |
| 1882 | (from LALR or IELR) and default reductions corrupt the expected |
| 1883 | token list. However, the list is correct for canonical LR with |
| 1884 | one exception: it will still contain any token that will not be |
| 1885 | accepted due to an error action in a later state. |
| 1886 | */ |
| 1887 | if (yytoken != YYEMPTY) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1888 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1889 | int yyn = yypact[*yyssp]; |
| 1890 | yyarg[yycount++] = yytname[yytoken]; |
| 1891 | if (!yypact_value_is_default (yyn)) |
| 1892 | { |
| 1893 | /* Start YYX at -YYN if negative to avoid negative indexes in |
| 1894 | YYCHECK. In other words, skip the first -YYN actions for |
| 1895 | this state because they are default actions. */ |
| 1896 | int yyxbegin = yyn < 0 ? -yyn : 0; |
| 1897 | /* Stay within bounds of both yycheck and yytname. */ |
| 1898 | int yychecklim = YYLAST - yyn + 1; |
| 1899 | int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
| 1900 | int yyx; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1901 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1902 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
| 1903 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR |
| 1904 | && !yytable_value_is_error (yytable[yyx + yyn])) |
| 1905 | { |
| 1906 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
| 1907 | { |
| 1908 | yycount = 1; |
| 1909 | yysize = yysize0; |
| 1910 | break; |
| 1911 | } |
| 1912 | yyarg[yycount++] = yytname[yyx]; |
| 1913 | { |
| 1914 | YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); |
| 1915 | if (! (yysize <= yysize1 |
| 1916 | && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) |
| 1917 | return 2; |
| 1918 | yysize = yysize1; |
| 1919 | } |
| 1920 | } |
| 1921 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1922 | } |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 1923 | |
| 1924 | switch (yycount) |
| 1925 | { |
| 1926 | # define YYCASE_(N, S) \ |
| 1927 | case N: \ |
| 1928 | yyformat = S; \ |
| 1929 | break |
| 1930 | YYCASE_(0, YY_("syntax error")); |
| 1931 | YYCASE_(1, YY_("syntax error, unexpected %s")); |
| 1932 | YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); |
| 1933 | YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); |
| 1934 | YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); |
| 1935 | YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); |
| 1936 | # undef YYCASE_ |
| 1937 | } |
| 1938 | |
| 1939 | { |
| 1940 | YYSIZE_T yysize1 = yysize + yystrlen (yyformat); |
| 1941 | if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) |
| 1942 | return 2; |
| 1943 | yysize = yysize1; |
| 1944 | } |
| 1945 | |
| 1946 | if (*yymsg_alloc < yysize) |
| 1947 | { |
| 1948 | *yymsg_alloc = 2 * yysize; |
| 1949 | if (! (yysize <= *yymsg_alloc |
| 1950 | && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) |
| 1951 | *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; |
| 1952 | return 1; |
| 1953 | } |
| 1954 | |
| 1955 | /* Avoid sprintf, as that infringes on the user's name space. |
| 1956 | Don't have undefined behavior even if the translation |
| 1957 | produced a string with the wrong number of "%s"s. */ |
| 1958 | { |
| 1959 | char *yyp = *yymsg; |
| 1960 | int yyi = 0; |
| 1961 | while ((*yyp = *yyformat) != '\0') |
| 1962 | if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) |
| 1963 | { |
| 1964 | yyp += yytnamerr (yyp, yyarg[yyi++]); |
| 1965 | yyformat += 2; |
| 1966 | } |
| 1967 | else |
| 1968 | { |
| 1969 | yyp++; |
| 1970 | yyformat++; |
| 1971 | } |
| 1972 | } |
| 1973 | return 0; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1974 | } |
| 1975 | #endif /* YYERROR_VERBOSE */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1976 | |
| 1977 | /*-----------------------------------------------. |
| 1978 | | Release the memory associated to this symbol. | |
| 1979 | `-----------------------------------------------*/ |
| 1980 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1981 | /*ARGSUSED*/ |
| 1982 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1983 | || defined __cplusplus || defined _MSC_VER) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1984 | static void |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1985 | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1986 | #else |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1987 | static void |
| 1988 | yydestruct (yymsg, yytype, yyvaluep) |
| 1989 | const char *yymsg; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1990 | int yytype; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1991 | YYSTYPE *yyvaluep; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1992 | #endif |
| 1993 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1994 | YYUSE (yyvaluep); |
| 1995 | |
| 1996 | if (!yymsg) |
| 1997 | yymsg = "Deleting"; |
| 1998 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1999 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2000 | YYUSE (yytype); |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 2001 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2002 | |
| 2003 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2004 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2005 | |
| 2006 | /* The lookahead symbol. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2007 | int yychar; |
| 2008 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2009 | |
| 2010 | #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
| 2011 | # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
| 2012 | # define YY_IGNORE_MAYBE_UNINITIALIZED_END |
| 2013 | #endif |
| 2014 | #ifndef YY_INITIAL_VALUE |
| 2015 | # define YY_INITIAL_VALUE(Value) /* Nothing. */ |
| 2016 | #endif |
| 2017 | |
| 2018 | /* The semantic value of the lookahead symbol. */ |
| 2019 | YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2020 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2021 | /* Number of syntax errors so far. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2022 | int yynerrs; |
| 2023 | |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 2024 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2025 | /*----------. |
| 2026 | | yyparse. | |
| 2027 | `----------*/ |
| 2028 | |
| 2029 | #ifdef YYPARSE_PARAM |
| 2030 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 2031 | || defined __cplusplus || defined _MSC_VER) |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 2032 | int |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2033 | yyparse (void *YYPARSE_PARAM) |
| 2034 | #else |
| 2035 | int |
| 2036 | yyparse (YYPARSE_PARAM) |
| 2037 | void *YYPARSE_PARAM; |
| 2038 | #endif |
| 2039 | #else /* ! YYPARSE_PARAM */ |
| 2040 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 2041 | || defined __cplusplus || defined _MSC_VER) |
| 2042 | int |
| 2043 | yyparse (void) |
| 2044 | #else |
| 2045 | int |
| 2046 | yyparse () |
| 2047 | |
| 2048 | #endif |
| 2049 | #endif |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 2050 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2051 | int yystate; |
| 2052 | /* Number of tokens to shift before error messages enabled. */ |
| 2053 | int yyerrstatus; |
| 2054 | |
| 2055 | /* The stacks and their tools: |
| 2056 | `yyss': related to states. |
| 2057 | `yyvs': related to semantic values. |
| 2058 | |
| 2059 | Refer to the stacks through separate pointers, to allow yyoverflow |
| 2060 | to reallocate them elsewhere. */ |
| 2061 | |
| 2062 | /* The state stack. */ |
| 2063 | yytype_int16 yyssa[YYINITDEPTH]; |
| 2064 | yytype_int16 *yyss; |
| 2065 | yytype_int16 *yyssp; |
| 2066 | |
| 2067 | /* The semantic value stack. */ |
| 2068 | YYSTYPE yyvsa[YYINITDEPTH]; |
| 2069 | YYSTYPE *yyvs; |
| 2070 | YYSTYPE *yyvsp; |
| 2071 | |
| 2072 | YYSIZE_T yystacksize; |
| 2073 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2074 | int yyn; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2075 | int yyresult; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2076 | /* Lookahead token as an internal (translated) token number. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2077 | int yytoken = 0; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2078 | /* The variables used to return semantic value and location from the |
| 2079 | action routines. */ |
| 2080 | YYSTYPE yyval; |
| 2081 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2082 | #if YYERROR_VERBOSE |
| 2083 | /* Buffer for error messages, and its allocated size. */ |
| 2084 | char yymsgbuf[128]; |
| 2085 | char *yymsg = yymsgbuf; |
| 2086 | YYSIZE_T yymsg_alloc = sizeof yymsgbuf; |
| 2087 | #endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2088 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2089 | #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2090 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2091 | /* The number of symbols on the RHS of the reduced rule. |
| 2092 | Keep to zero when no symbol should be popped. */ |
| 2093 | int yylen = 0; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2094 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2095 | yyssp = yyss = yyssa; |
| 2096 | yyvsp = yyvs = yyvsa; |
| 2097 | yystacksize = YYINITDEPTH; |
| 2098 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2099 | YYDPRINTF ((stderr, "Starting parse\n")); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2100 | |
| 2101 | yystate = 0; |
| 2102 | yyerrstatus = 0; |
| 2103 | yynerrs = 0; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2104 | yychar = YYEMPTY; /* Cause a token to be read. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2105 | goto yysetstate; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2106 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2107 | /*------------------------------------------------------------. |
| 2108 | | yynewstate -- Push a new state, which is found in yystate. | |
| 2109 | `------------------------------------------------------------*/ |
| 2110 | yynewstate: |
| 2111 | /* In all cases, when you get here, the value and location stacks |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2112 | have just been pushed. So pushing a state here evens the stacks. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2113 | yyssp++; |
| 2114 | |
| 2115 | yysetstate: |
| 2116 | *yyssp = yystate; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2117 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2118 | if (yyss + yystacksize - 1 <= yyssp) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2119 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2120 | /* Get the current used size of the three stacks, in elements. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2121 | YYSIZE_T yysize = yyssp - yyss + 1; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2122 | |
| 2123 | #ifdef yyoverflow |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2124 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2125 | /* Give user a chance to reallocate the stack. Use copies of |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2126 | these so that the &'s don't force the real ones into |
| 2127 | memory. */ |
| 2128 | YYSTYPE *yyvs1 = yyvs; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2129 | yytype_int16 *yyss1 = yyss; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2130 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2131 | /* Each stack pointer address is followed by the size of the |
| 2132 | data in use in that stack, in bytes. This used to be a |
| 2133 | conditional around just the two extra args, but that might |
| 2134 | be undefined if yyoverflow is a macro. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2135 | yyoverflow (YY_("memory exhausted"), |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2136 | &yyss1, yysize * sizeof (*yyssp), |
| 2137 | &yyvs1, yysize * sizeof (*yyvsp), |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2138 | &yystacksize); |
| 2139 | |
| 2140 | yyss = yyss1; |
| 2141 | yyvs = yyvs1; |
| 2142 | } |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2143 | #else /* no yyoverflow */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2144 | # ifndef YYSTACK_RELOCATE |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2145 | goto yyexhaustedlab; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2146 | # else |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2147 | /* Extend the stack our own way. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2148 | if (YYMAXDEPTH <= yystacksize) |
| 2149 | goto yyexhaustedlab; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2150 | yystacksize *= 2; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2151 | if (YYMAXDEPTH < yystacksize) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2152 | yystacksize = YYMAXDEPTH; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2153 | |
| 2154 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2155 | yytype_int16 *yyss1 = yyss; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2156 | union yyalloc *yyptr = |
| 2157 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
| 2158 | if (! yyptr) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2159 | goto yyexhaustedlab; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2160 | YYSTACK_RELOCATE (yyss_alloc, yyss); |
| 2161 | YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2162 | # undef YYSTACK_RELOCATE |
| 2163 | if (yyss1 != yyssa) |
| 2164 | YYSTACK_FREE (yyss1); |
| 2165 | } |
| 2166 | # endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2167 | #endif /* no yyoverflow */ |
| 2168 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2169 | yyssp = yyss + yysize - 1; |
| 2170 | yyvsp = yyvs + yysize - 1; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2171 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2172 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
| 2173 | (unsigned long int) yystacksize)); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2174 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2175 | if (yyss + yystacksize - 1 <= yyssp) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2176 | YYABORT; |
| 2177 | } |
| 2178 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2179 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2180 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2181 | if (yystate == YYFINAL) |
| 2182 | YYACCEPT; |
| 2183 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2184 | goto yybackup; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2185 | |
| 2186 | /*-----------. |
| 2187 | | yybackup. | |
| 2188 | `-----------*/ |
| 2189 | yybackup: |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2190 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2191 | /* Do appropriate processing given the current state. Read a |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2192 | lookahead token if we need one and don't already have one. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2193 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2194 | /* First try to decide what to do without reference to lookahead token. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2195 | yyn = yypact[yystate]; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2196 | if (yypact_value_is_default (yyn)) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2197 | goto yydefault; |
| 2198 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2199 | /* Not known => get a lookahead token if don't already have one. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2200 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2201 | /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2202 | if (yychar == YYEMPTY) |
| 2203 | { |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2204 | YYDPRINTF ((stderr, "Reading a token: ")); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2205 | yychar = YYLEX; |
| 2206 | } |
| 2207 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2208 | if (yychar <= YYEOF) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2209 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2210 | yychar = yytoken = YYEOF; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2211 | YYDPRINTF ((stderr, "Now at end of input.\n")); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2212 | } |
| 2213 | else |
| 2214 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2215 | yytoken = YYTRANSLATE (yychar); |
| 2216 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2217 | } |
| 2218 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2219 | /* 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] | 2220 | detect an error, take that action. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2221 | yyn += yytoken; |
| 2222 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2223 | goto yydefault; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2224 | yyn = yytable[yyn]; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2225 | if (yyn <= 0) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2226 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2227 | if (yytable_value_is_error (yyn)) |
| 2228 | goto yyerrlab; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2229 | yyn = -yyn; |
| 2230 | goto yyreduce; |
| 2231 | } |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2232 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2233 | /* Count tokens shifted since error; after three, turn off error |
| 2234 | status. */ |
| 2235 | if (yyerrstatus) |
| 2236 | yyerrstatus--; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2237 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2238 | /* Shift the lookahead token. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2239 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
| 2240 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2241 | /* Discard the shifted token. */ |
| 2242 | yychar = YYEMPTY; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2243 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2244 | yystate = yyn; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2245 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2246 | *++yyvsp = yylval; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2247 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2248 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2249 | goto yynewstate; |
| 2250 | |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 2251 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2252 | /*-----------------------------------------------------------. |
| 2253 | | yydefault -- do the default action for the current state. | |
| 2254 | `-----------------------------------------------------------*/ |
| 2255 | yydefault: |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2256 | yyn = yydefact[yystate]; |
| 2257 | if (yyn == 0) |
| 2258 | goto yyerrlab; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2259 | goto yyreduce; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2260 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2261 | |
| 2262 | /*-----------------------------. |
| 2263 | | yyreduce -- Do a reduction. | |
| 2264 | `-----------------------------*/ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2265 | yyreduce: |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2266 | /* yyn is the number of a rule to reduce with. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2267 | yylen = yyr2[yyn]; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2268 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2269 | /* If YYLEN is nonzero, implement the default value of the action: |
| 2270 | `$$ = $1'. |
| 2271 | |
| 2272 | Otherwise, the following line sets YYVAL to garbage. |
| 2273 | This behavior is undocumented and Bison |
| 2274 | users should not rely upon it. Assigning to YYVAL |
| 2275 | unconditionally makes the parser a bit smaller, and it avoids a |
| 2276 | GCC warning that YYVAL may be used uninitialized. */ |
| 2277 | yyval = yyvsp[1-yylen]; |
| 2278 | |
| 2279 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2280 | YY_REDUCE_PRINT (yyn); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2281 | switch (yyn) |
| 2282 | { |
| 2283 | case 2: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2284 | /* Line 1787 of yacc.c */ |
| 2285 | #line 358 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2286 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2287 | *(void **)param = (yyvsp[(1) - (1)].a_grammar); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2288 | } |
| 2289 | break; |
| 2290 | |
| 2291 | case 3: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2292 | /* Line 1787 of yacc.c */ |
| 2293 | #line 364 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2294 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2295 | (yyval.a_grammar) = asn1p_new(); |
| 2296 | checkmem((yyval.a_grammar)); |
| 2297 | 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] | 2298 | } |
| 2299 | break; |
| 2300 | |
| 2301 | case 4: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2302 | /* Line 1787 of yacc.c */ |
| 2303 | #line 369 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2304 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2305 | (yyval.a_grammar) = (yyvsp[(1) - (2)].a_grammar); |
| 2306 | 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] | 2307 | } |
| 2308 | break; |
| 2309 | |
| 2310 | case 5: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2311 | /* Line 1787 of yacc.c */ |
| 2312 | #line 386 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2313 | { currentModule = asn1p_module_new(); } |
| 2314 | break; |
| 2315 | |
| 2316 | case 6: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2317 | /* Line 1787 of yacc.c */ |
| 2318 | #line 391 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2319 | { |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 2320 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2321 | (yyval.a_module) = currentModule; |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2322 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2323 | if((yyvsp[(8) - (9)].a_module)) { |
| 2324 | asn1p_module_t tmp = *((yyval.a_module)); |
| 2325 | *((yyval.a_module)) = *((yyvsp[(8) - (9)].a_module)); |
| 2326 | *((yyvsp[(8) - (9)].a_module)) = tmp; |
| 2327 | asn1p_module_free((yyvsp[(8) - (9)].a_module)); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2328 | } else { |
| 2329 | /* There's a chance that a module is just plain empty */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2330 | } |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2331 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2332 | (yyval.a_module)->ModuleName = (yyvsp[(1) - (9)].tv_str); |
| 2333 | (yyval.a_module)->module_oid = (yyvsp[(3) - (9)].a_oid); |
| 2334 | (yyval.a_module)->module_flags = (yyvsp[(5) - (9)].a_module_flags); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2335 | } |
| 2336 | break; |
| 2337 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2338 | case 7: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2339 | /* Line 1787 of yacc.c */ |
| 2340 | #line 415 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2341 | { (yyval.a_oid) = 0; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2342 | break; |
| 2343 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2344 | case 8: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2345 | /* Line 1787 of yacc.c */ |
| 2346 | #line 416 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2347 | { (yyval.a_oid) = (yyvsp[(1) - (1)].a_oid); } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2348 | break; |
| 2349 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2350 | case 9: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2351 | /* Line 1787 of yacc.c */ |
| 2352 | #line 420 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2353 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2354 | (yyval.a_oid) = (yyvsp[(2) - (3)].a_oid); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2355 | } |
| 2356 | break; |
| 2357 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2358 | case 10: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2359 | /* Line 1787 of yacc.c */ |
| 2360 | #line 423 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2361 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2362 | (yyval.a_oid) = 0; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2363 | } |
| 2364 | break; |
| 2365 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2366 | case 11: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2367 | /* Line 1787 of yacc.c */ |
| 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_oid) = asn1p_oid_new(); |
| 2371 | 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] | 2372 | if((yyvsp[(1) - (1)].a_oid_arc).name) |
| 2373 | free((yyvsp[(1) - (1)].a_oid_arc).name); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2374 | } |
| 2375 | break; |
| 2376 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2377 | case 12: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2378 | /* Line 1787 of yacc.c */ |
| 2379 | #line 435 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2380 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2381 | (yyval.a_oid) = (yyvsp[(1) - (2)].a_oid); |
| 2382 | 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] | 2383 | if((yyvsp[(2) - (2)].a_oid_arc).name) |
| 2384 | free((yyvsp[(2) - (2)].a_oid_arc).name); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2385 | } |
| 2386 | break; |
| 2387 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2388 | case 13: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2389 | /* Line 1787 of yacc.c */ |
| 2390 | #line 444 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2391 | { /* iso */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2392 | (yyval.a_oid_arc).name = (yyvsp[(1) - (1)].tv_str); |
| 2393 | (yyval.a_oid_arc).number = -1; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2394 | } |
| 2395 | break; |
| 2396 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2397 | case 14: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2398 | /* Line 1787 of yacc.c */ |
| 2399 | #line 448 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2400 | { /* iso(1) */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2401 | (yyval.a_oid_arc).name = (yyvsp[(1) - (4)].tv_str); |
| 2402 | (yyval.a_oid_arc).number = (yyvsp[(3) - (4)].a_int); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2403 | } |
| 2404 | break; |
| 2405 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2406 | case 15: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2407 | /* Line 1787 of yacc.c */ |
| 2408 | #line 452 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2409 | { /* 1 */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2410 | (yyval.a_oid_arc).name = 0; |
| 2411 | (yyval.a_oid_arc).number = (yyvsp[(1) - (1)].a_int); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2412 | } |
| 2413 | break; |
| 2414 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2415 | case 16: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2416 | /* Line 1787 of yacc.c */ |
| 2417 | #line 462 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2418 | { (yyval.a_module_flags) = MSF_NOFLAGS; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2419 | break; |
| 2420 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2421 | case 17: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2422 | /* Line 1787 of yacc.c */ |
| 2423 | #line 463 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2424 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2425 | (yyval.a_module_flags) = (yyvsp[(1) - (1)].a_module_flags); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2426 | } |
| 2427 | break; |
| 2428 | |
| 2429 | case 18: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2430 | /* Line 1787 of yacc.c */ |
| 2431 | #line 472 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2432 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2433 | (yyval.a_module_flags) = (yyvsp[(1) - (1)].a_module_flags); |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2434 | } |
| 2435 | break; |
| 2436 | |
| 2437 | case 19: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2438 | /* Line 1787 of yacc.c */ |
| 2439 | #line 475 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2440 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2441 | (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] | 2442 | } |
| 2443 | break; |
| 2444 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2445 | case 20: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2446 | /* Line 1787 of yacc.c */ |
| 2447 | #line 484 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2448 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2449 | (yyval.a_module_flags) = MSF_EXPLICIT_TAGS; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2450 | } |
| 2451 | break; |
| 2452 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2453 | case 21: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2454 | /* Line 1787 of yacc.c */ |
| 2455 | #line 487 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2456 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2457 | (yyval.a_module_flags) = MSF_IMPLICIT_TAGS; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2458 | } |
| 2459 | break; |
| 2460 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2461 | case 22: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2462 | /* Line 1787 of yacc.c */ |
| 2463 | #line 490 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2464 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2465 | (yyval.a_module_flags) = MSF_AUTOMATIC_TAGS; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2466 | } |
| 2467 | break; |
| 2468 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2469 | case 23: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2470 | /* Line 1787 of yacc.c */ |
| 2471 | #line 493 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2472 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2473 | (yyval.a_module_flags) = MSF_EXTENSIBILITY_IMPLIED; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2474 | } |
| 2475 | break; |
| 2476 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2477 | case 24: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2478 | /* Line 1787 of yacc.c */ |
| 2479 | #line 497 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2480 | { |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 2481 | /* X.680Amd1 specifies TAG and XER */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2482 | if(strcmp((yyvsp[(1) - (2)].tv_str), "TAG") == 0) { |
| 2483 | (yyval.a_module_flags) = MSF_TAG_INSTRUCTIONS; |
| 2484 | } else if(strcmp((yyvsp[(1) - (2)].tv_str), "XER") == 0) { |
| 2485 | (yyval.a_module_flags) = MSF_XER_INSTRUCTIONS; |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 2486 | } else { |
| 2487 | fprintf(stderr, |
| 2488 | "WARNING: %s INSTRUCTIONS at line %d: " |
| 2489 | "Unrecognized encoding reference\n", |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2490 | (yyvsp[(1) - (2)].tv_str), yylineno); |
| 2491 | (yyval.a_module_flags) = MSF_unk_INSTRUCTIONS; |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 2492 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2493 | free((yyvsp[(1) - (2)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2494 | } |
| 2495 | break; |
| 2496 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2497 | case 25: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2498 | /* Line 1787 of yacc.c */ |
| 2499 | #line 518 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2500 | { (yyval.a_module) = 0; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2501 | break; |
| 2502 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2503 | case 26: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2504 | /* Line 1787 of yacc.c */ |
| 2505 | #line 519 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2506 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2507 | (yyval.a_module) = (yyvsp[(1) - (1)].a_module); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2508 | } |
| 2509 | break; |
| 2510 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2511 | case 27: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2512 | /* Line 1787 of yacc.c */ |
| 2513 | #line 528 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2514 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2515 | (yyval.a_module) = asn1p_module_new(); |
| 2516 | AL_IMPORT((yyval.a_module), exports, (yyvsp[(1) - (3)].a_module), xp_next); |
| 2517 | AL_IMPORT((yyval.a_module), imports, (yyvsp[(2) - (3)].a_module), xp_next); |
| 2518 | 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] | 2519 | |
| 2520 | asn1p_module_free((yyvsp[(1) - (3)].a_module)); |
| 2521 | asn1p_module_free((yyvsp[(2) - (3)].a_module)); |
| 2522 | asn1p_module_free((yyvsp[(3) - (3)].a_module)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2523 | } |
| 2524 | break; |
| 2525 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2526 | case 28: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2527 | /* Line 1787 of yacc.c */ |
| 2528 | #line 541 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2529 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2530 | (yyval.a_module) = (yyvsp[(1) - (1)].a_module); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2531 | } |
| 2532 | break; |
| 2533 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2534 | case 29: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2535 | /* Line 1787 of yacc.c */ |
| 2536 | #line 544 "asn1p_y.y" |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2537 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2538 | if((yyvsp[(1) - (2)].a_module)) { |
| 2539 | (yyval.a_module) = (yyvsp[(1) - (2)].a_module); |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2540 | } else { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2541 | (yyval.a_module) = (yyvsp[(2) - (2)].a_module); |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2542 | break; |
| 2543 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2544 | 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] | 2545 | asn1p_module_free((yyvsp[(2) - (2)].a_module)); |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2546 | } |
| 2547 | break; |
| 2548 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2549 | case 30: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2550 | /* Line 1787 of yacc.c */ |
| 2551 | #line 561 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2552 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2553 | (yyval.a_module) = asn1p_module_new(); |
| 2554 | checkmem((yyval.a_module)); |
| 2555 | assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID); |
| 2556 | assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID); |
| 2557 | TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2558 | } |
| 2559 | break; |
| 2560 | |
| 2561 | case 31: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2562 | /* Line 1787 of yacc.c */ |
| 2563 | #line 568 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2564 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2565 | (yyval.a_module) = asn1p_module_new(); |
| 2566 | checkmem((yyval.a_module)); |
| 2567 | assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID); |
| 2568 | assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID); |
| 2569 | TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2570 | } |
| 2571 | break; |
| 2572 | |
| 2573 | case 32: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2574 | /* Line 1787 of yacc.c */ |
| 2575 | #line 581 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2576 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2577 | (yyval.a_module) = asn1p_module_new(); |
| 2578 | checkmem((yyval.a_module)); |
| 2579 | assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID); |
| 2580 | assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID); |
| 2581 | TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next); |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2582 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2583 | break; |
| 2584 | |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2585 | case 33: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2586 | /* Line 1787 of yacc.c */ |
| 2587 | #line 589 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2588 | { asn1p_lexer_hack_push_encoding_control(); } |
| 2589 | break; |
| 2590 | |
| 2591 | case 34: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2592 | /* Line 1787 of yacc.c */ |
| 2593 | #line 590 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2594 | { |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 2595 | fprintf(stderr, |
| 2596 | "WARNING: ENCODING-CONTROL %s " |
| 2597 | "specification at line %d ignored\n", |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2598 | (yyvsp[(2) - (3)].tv_str), yylineno); |
| 2599 | free((yyvsp[(2) - (3)].tv_str)); |
| 2600 | (yyval.a_module) = 0; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2601 | } |
| 2602 | break; |
| 2603 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2604 | case 35: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2605 | /* Line 1787 of yacc.c */ |
| 2606 | #line 602 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2607 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2608 | return yyerror( |
Lev Walkin | 7085305 | 2005-11-26 11:21:55 +0000 | [diff] [blame] | 2609 | "Attempt to redefine a standard basic string type, " |
| 2610 | "please comment out or remove this type redefinition."); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2611 | } |
| 2612 | break; |
| 2613 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2614 | case 36: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2615 | /* Line 1787 of yacc.c */ |
| 2616 | #line 615 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2617 | { (yyval.a_module) = 0; } |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2618 | break; |
| 2619 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2620 | case 38: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2621 | /* Line 1787 of yacc.c */ |
| 2622 | #line 619 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2623 | { |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 2624 | if(!saved_aid && 0) |
| 2625 | return yyerror("Unterminated IMPORTS FROM, " |
| 2626 | "expected semicolon ';'"); |
| 2627 | saved_aid = 0; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2628 | (yyval.a_module) = (yyvsp[(2) - (3)].a_module); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2629 | } |
| 2630 | break; |
| 2631 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2632 | case 39: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2633 | /* Line 1787 of yacc.c */ |
| 2634 | #line 629 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2635 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2636 | return yyerror("Empty IMPORTS list"); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2637 | } |
| 2638 | break; |
| 2639 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2640 | case 40: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2641 | /* Line 1787 of yacc.c */ |
| 2642 | #line 635 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2643 | { (yyval.a_module) = asn1p_module_new(); } |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2644 | break; |
| 2645 | |
| 2646 | case 42: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2647 | /* Line 1787 of yacc.c */ |
| 2648 | #line 639 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2649 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2650 | (yyval.a_module) = asn1p_module_new(); |
| 2651 | checkmem((yyval.a_module)); |
| 2652 | 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] | 2653 | } |
| 2654 | break; |
| 2655 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2656 | case 43: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2657 | /* Line 1787 of yacc.c */ |
| 2658 | #line 644 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2659 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2660 | (yyval.a_module) = (yyvsp[(1) - (2)].a_module); |
| 2661 | 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] | 2662 | } |
| 2663 | break; |
| 2664 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2665 | case 44: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2666 | /* Line 1787 of yacc.c */ |
| 2667 | #line 651 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2668 | { memset(&(yyval.a_aid), 0, sizeof((yyval.a_aid))); } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2669 | break; |
| 2670 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2671 | case 45: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2672 | /* Line 1787 of yacc.c */ |
| 2673 | #line 652 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2674 | { (yyval.a_aid).oid = (yyvsp[(1) - (1)].a_oid); } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2675 | break; |
| 2676 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2677 | case 46: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2678 | /* Line 1787 of yacc.c */ |
| 2679 | #line 656 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2680 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2681 | (yyval.a_xports) = (yyvsp[(1) - (4)].a_xports); |
| 2682 | (yyval.a_xports)->fromModuleName = (yyvsp[(3) - (4)].tv_str); |
| 2683 | (yyval.a_xports)->identifier = (yyvsp[(4) - (4)].a_aid); |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 2684 | /* This stupid thing is used for look-back hack. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2685 | saved_aid = (yyval.a_xports)->identifier.oid ? 0 : &((yyval.a_xports)->identifier); |
| 2686 | checkmem((yyval.a_xports)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2687 | } |
| 2688 | break; |
| 2689 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2690 | case 47: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2691 | /* Line 1787 of yacc.c */ |
| 2692 | #line 667 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2693 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2694 | (yyval.a_xports) = asn1p_xports_new(); |
| 2695 | checkmem((yyval.a_xports)); |
| 2696 | TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(1) - (1)].a_expr), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2697 | } |
| 2698 | break; |
| 2699 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2700 | case 48: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2701 | /* Line 1787 of yacc.c */ |
| 2702 | #line 672 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2703 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2704 | (yyval.a_xports) = (yyvsp[(1) - (3)].a_xports); |
| 2705 | TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(3) - (3)].a_expr), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2706 | } |
| 2707 | break; |
| 2708 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2709 | case 49: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2710 | /* Line 1787 of yacc.c */ |
| 2711 | #line 679 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2712 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2713 | (yyval.a_expr) = NEW_EXPR(); |
| 2714 | checkmem((yyval.a_expr)); |
| 2715 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str); |
| 2716 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2717 | } |
| 2718 | break; |
| 2719 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2720 | case 50: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2721 | /* Line 1787 of yacc.c */ |
| 2722 | #line 685 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2723 | { /* Completely equivalent to above */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2724 | (yyval.a_expr) = NEW_EXPR(); |
| 2725 | checkmem((yyval.a_expr)); |
| 2726 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 2727 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2728 | } |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2729 | break; |
| 2730 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2731 | case 51: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2732 | /* Line 1787 of yacc.c */ |
| 2733 | #line 691 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +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 | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2739 | } |
| 2740 | break; |
| 2741 | |
| 2742 | case 52: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2743 | /* Line 1787 of yacc.c */ |
| 2744 | #line 701 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2745 | { (yyval.a_module) = 0; } |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2746 | break; |
| 2747 | |
| 2748 | case 53: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2749 | /* Line 1787 of yacc.c */ |
| 2750 | #line 702 "asn1p_y.y" |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2751 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2752 | (yyval.a_module) = asn1p_module_new(); |
| 2753 | checkmem((yyval.a_module)); |
| 2754 | if((yyvsp[(1) - (1)].a_xports)) { |
| 2755 | 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] | 2756 | } else { |
| 2757 | /* "EXPORTS ALL;" */ |
| 2758 | } |
| 2759 | } |
| 2760 | break; |
| 2761 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2762 | case 54: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2763 | /* Line 1787 of yacc.c */ |
| 2764 | #line 714 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2765 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2766 | (yyval.a_xports) = (yyvsp[(2) - (3)].a_xports); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2767 | } |
| 2768 | break; |
| 2769 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2770 | case 55: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2771 | /* Line 1787 of yacc.c */ |
| 2772 | #line 717 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2773 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2774 | (yyval.a_xports) = 0; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2775 | } |
| 2776 | break; |
| 2777 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2778 | case 56: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2779 | /* Line 1787 of yacc.c */ |
| 2780 | #line 720 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2781 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2782 | /* Empty EXPORTS clause effectively prohibits export. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2783 | (yyval.a_xports) = asn1p_xports_new(); |
| 2784 | checkmem((yyval.a_xports)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2785 | } |
| 2786 | break; |
| 2787 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2788 | case 57: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2789 | /* Line 1787 of yacc.c */ |
| 2790 | #line 728 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2791 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2792 | (yyval.a_xports) = asn1p_xports_new(); |
| 2793 | assert((yyval.a_xports)); |
| 2794 | TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(1) - (1)].a_expr), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2795 | } |
| 2796 | break; |
| 2797 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2798 | case 58: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2799 | /* Line 1787 of yacc.c */ |
| 2800 | #line 733 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2801 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2802 | (yyval.a_xports) = (yyvsp[(1) - (3)].a_xports); |
| 2803 | TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(3) - (3)].a_expr), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2804 | } |
| 2805 | break; |
| 2806 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2807 | case 59: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2808 | /* Line 1787 of yacc.c */ |
| 2809 | #line 740 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2810 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2811 | (yyval.a_expr) = NEW_EXPR(); |
| 2812 | checkmem((yyval.a_expr)); |
| 2813 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str); |
| 2814 | (yyval.a_expr)->expr_type = A1TC_EXPORTVAR; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2815 | } |
| 2816 | break; |
| 2817 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2818 | case 60: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2819 | /* Line 1787 of yacc.c */ |
| 2820 | #line 746 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2821 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2822 | (yyval.a_expr) = NEW_EXPR(); |
| 2823 | checkmem((yyval.a_expr)); |
| 2824 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 2825 | (yyval.a_expr)->expr_type = A1TC_EXPORTVAR; |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2826 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2827 | break; |
| 2828 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2829 | case 61: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2830 | /* Line 1787 of yacc.c */ |
| 2831 | #line 752 "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) - (1)].tv_str); |
| 2836 | (yyval.a_expr)->expr_type = A1TC_EXPORTVAR; |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2837 | } |
| 2838 | break; |
| 2839 | |
| 2840 | case 62: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2841 | /* Line 1787 of yacc.c */ |
| 2842 | #line 761 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2843 | { (yyval.a_constr) = (yyvsp[(2) - (3)].a_constr); } |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2844 | break; |
| 2845 | |
| 2846 | case 63: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2847 | /* Line 1787 of yacc.c */ |
| 2848 | #line 764 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2849 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2850 | (yyval.a_expr) = (yyvsp[(2) - (4)].a_expr); |
| 2851 | assert((yyval.a_expr)->Identifier == 0); |
| 2852 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str); |
| 2853 | (yyval.a_expr)->meta_type = AMT_VALUESET; |
| 2854 | (yyval.a_expr)->constraints = (yyvsp[(4) - (4)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2855 | } |
| 2856 | break; |
| 2857 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2858 | case 64: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2859 | /* Line 1787 of yacc.c */ |
| 2860 | #line 774 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2861 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2862 | (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2863 | } |
| 2864 | break; |
| 2865 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2866 | case 65: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2867 | /* Line 1787 of yacc.c */ |
| 2868 | #line 787 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2869 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2870 | (yyval.a_expr) = NEW_EXPR(); |
| 2871 | checkmem((yyval.a_expr)); |
| 2872 | (yyval.a_expr)->reference = (yyvsp[(1) - (1)].a_ref); |
| 2873 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
| 2874 | (yyval.a_expr)->meta_type = AMT_TYPEREF; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2875 | } |
| 2876 | break; |
| 2877 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2878 | case 66: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2879 | /* Line 1787 of yacc.c */ |
| 2880 | #line 797 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2881 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2882 | (yyval.a_expr) = NEW_EXPR(); |
| 2883 | checkmem((yyval.a_expr)); |
| 2884 | (yyval.a_expr)->reference = (yyvsp[(1) - (4)].a_ref); |
| 2885 | (yyval.a_expr)->rhs_pspecs = (yyvsp[(3) - (4)].a_expr); |
| 2886 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
| 2887 | (yyval.a_expr)->meta_type = AMT_TYPEREF; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2888 | } |
| 2889 | break; |
| 2890 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2891 | case 67: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2892 | /* Line 1787 of yacc.c */ |
| 2893 | #line 817 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2894 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2895 | (yyval.a_expr) = (yyvsp[(3) - (3)].a_expr); |
| 2896 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 2897 | assert((yyval.a_expr)->expr_type); |
| 2898 | assert((yyval.a_expr)->meta_type); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2899 | } |
| 2900 | break; |
| 2901 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2902 | case 68: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2903 | /* Line 1787 of yacc.c */ |
| 2904 | #line 823 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2905 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2906 | (yyval.a_expr) = (yyvsp[(3) - (3)].a_expr); |
| 2907 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 2908 | assert((yyval.a_expr)->expr_type == A1TC_CLASSDEF); |
| 2909 | assert((yyval.a_expr)->meta_type == AMT_OBJECTCLASS); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2910 | } |
| 2911 | break; |
| 2912 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2913 | case 69: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2914 | /* Line 1787 of yacc.c */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2915 | #line 839 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2916 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2917 | (yyval.a_expr) = (yyvsp[(6) - (6)].a_expr); |
| 2918 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (6)].tv_str); |
| 2919 | (yyval.a_expr)->lhs_params = (yyvsp[(3) - (6)].a_plist); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2920 | } |
| 2921 | break; |
| 2922 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2923 | case 70: |
| 2924 | /* Line 1787 of yacc.c */ |
| 2925 | #line 845 "asn1p_y.y" |
| 2926 | { |
| 2927 | (yyval.a_expr) = (yyvsp[(6) - (6)].a_expr); |
| 2928 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (6)].tv_str); |
| 2929 | (yyval.a_expr)->lhs_params = (yyvsp[(3) - (6)].a_plist); |
| 2930 | } |
| 2931 | break; |
| 2932 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2933 | case 71: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2934 | /* Line 1787 of yacc.c */ |
| 2935 | #line 853 "asn1p_y.y" |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2936 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2937 | int ret; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2938 | (yyval.a_plist) = asn1p_paramlist_new(yylineno); |
| 2939 | checkmem((yyval.a_plist)); |
| 2940 | 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] | 2941 | checkmem(ret == 0); |
Lev Walkin | a964e03 | 2017-03-26 03:48:06 -0700 | [diff] [blame] | 2942 | asn1p_ref_free((yyvsp[(1) - (1)].a_parg).governor); |
Markus Elfring | f3d1861 | 2016-03-15 08:35:24 +0100 | [diff] [blame] | 2943 | free((yyvsp[(1) - (1)].a_parg).argument); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2944 | } |
| 2945 | break; |
| 2946 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2947 | case 72: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2948 | /* Line 1787 of yacc.c */ |
| 2949 | #line 862 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2950 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2951 | int ret; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2952 | (yyval.a_plist) = (yyvsp[(1) - (3)].a_plist); |
| 2953 | 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] | 2954 | checkmem(ret == 0); |
Lev Walkin | a964e03 | 2017-03-26 03:48:06 -0700 | [diff] [blame] | 2955 | asn1p_ref_free((yyvsp[(3) - (3)].a_parg).governor); |
Markus Elfring | f3d1861 | 2016-03-15 08:35:24 +0100 | [diff] [blame] | 2956 | free((yyvsp[(3) - (3)].a_parg).argument); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2957 | } |
| 2958 | break; |
| 2959 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2960 | case 73: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2961 | /* Line 1787 of yacc.c */ |
| 2962 | #line 873 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2963 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2964 | (yyval.a_parg).governor = NULL; |
| 2965 | (yyval.a_parg).argument = (yyvsp[(1) - (1)].tv_str); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2966 | } |
| 2967 | break; |
| 2968 | |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2969 | case 74: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2970 | /* Line 1787 of yacc.c */ |
| 2971 | #line 877 "asn1p_y.y" |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2972 | { |
| 2973 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2974 | (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2975 | ret = asn1p_ref_add_component((yyval.a_parg).governor, (yyvsp[(1) - (3)].tv_str), 0); |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2976 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2977 | (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2978 | free((yyvsp[(1) - (3)].tv_str)); |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2979 | } |
| 2980 | break; |
| 2981 | |
| 2982 | case 75: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2983 | /* Line 1787 of yacc.c */ |
| 2984 | #line 885 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2985 | { |
| 2986 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2987 | (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2988 | 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] | 2989 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2990 | (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2991 | free((yyvsp[(1) - (3)].tv_str)); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2992 | } |
| 2993 | break; |
| 2994 | |
| 2995 | case 76: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 2996 | /* Line 1787 of yacc.c */ |
| 2997 | #line 893 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2998 | { |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 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 | a9532f4 | 2006-09-17 04:52:50 +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 | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 3005 | } |
| 3006 | break; |
| 3007 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3008 | case 77: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3009 | /* Line 1787 of yacc.c */ |
| 3010 | #line 901 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3011 | { |
| 3012 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3013 | (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3014 | ret = asn1p_ref_add_component((yyval.a_parg).governor, |
| 3015 | ASN_EXPR_TYPE2STR((yyvsp[(1) - (3)].a_type)), 1); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3016 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3017 | (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3018 | } |
| 3019 | break; |
| 3020 | |
| 3021 | case 78: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3022 | /* Line 1787 of yacc.c */ |
| 3023 | #line 912 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 3024 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3025 | (yyval.a_expr) = NEW_EXPR(); |
| 3026 | checkmem((yyval.a_expr)); |
| 3027 | asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3028 | } |
| 3029 | break; |
| 3030 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3031 | case 79: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3032 | /* Line 1787 of yacc.c */ |
| 3033 | #line 917 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3034 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3035 | (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); |
| 3036 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3037 | } |
| 3038 | break; |
| 3039 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3040 | case 80: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3041 | /* Line 1787 of yacc.c */ |
| 3042 | #line 924 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3043 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3044 | (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3045 | } |
| 3046 | break; |
| 3047 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3048 | case 81: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3049 | /* Line 1787 of yacc.c */ |
| 3050 | #line 927 "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 | checkmem((yyval.a_expr)); |
Bi-Ruei, Chiu | 3dcf05b | 2017-05-04 21:45:05 +0800 | [diff] [blame] | 3054 | (yyval.a_expr)->Identifier = strdup("?"); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3055 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
| 3056 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 3057 | (yyval.a_expr)->value = (yyvsp[(1) - (1)].a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3058 | } |
| 3059 | break; |
| 3060 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3061 | case 82: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3062 | /* Line 1787 of yacc.c */ |
| 3063 | #line 935 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3064 | { |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 3065 | asn1p_ref_t *ref; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3066 | (yyval.a_expr) = NEW_EXPR(); |
| 3067 | checkmem((yyval.a_expr)); |
| 3068 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str); |
| 3069 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
| 3070 | (yyval.a_expr)->meta_type = AMT_VALUE; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3071 | ref = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3072 | asn1p_ref_add_component(ref, (yyvsp[(1) - (1)].tv_str), RLT_lowercase); |
| 3073 | (yyval.a_expr)->value = asn1p_value_fromref(ref, 0); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3074 | } |
| 3075 | break; |
| 3076 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3077 | case 83: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3078 | /* Line 1787 of yacc.c */ |
| 3079 | #line 946 "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) = NEW_EXPR(); |
| 3082 | (yyval.a_expr)->expr_type = A1TC_VALUESET; |
| 3083 | (yyval.a_expr)->meta_type = AMT_VALUESET; |
| 3084 | (yyval.a_expr)->constraints = (yyvsp[(1) - (1)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3085 | } |
| 3086 | break; |
| 3087 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3088 | case 84: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3089 | /* Line 1787 of yacc.c */ |
| 3090 | #line 969 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3091 | { (yyval.a_expr) = NEW_EXPR(); } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3092 | break; |
| 3093 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3094 | case 85: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3095 | /* Line 1787 of yacc.c */ |
| 3096 | #line 970 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3097 | { (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); } |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 3098 | break; |
| 3099 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3100 | case 86: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3101 | /* Line 1787 of yacc.c */ |
| 3102 | #line 973 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3103 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3104 | (yyval.a_expr) = NEW_EXPR(); |
| 3105 | checkmem((yyval.a_expr)); |
| 3106 | asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3107 | } |
| 3108 | break; |
| 3109 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3110 | case 87: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3111 | /* Line 1787 of yacc.c */ |
| 3112 | #line 978 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3113 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3114 | (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); |
| 3115 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3116 | } |
| 3117 | break; |
| 3118 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3119 | case 88: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3120 | /* Line 1787 of yacc.c */ |
| 3121 | #line 982 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3122 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3123 | (yyval.a_expr) = (yyvsp[(1) - (5)].a_expr); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3124 | 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] | 3125 | asn1p_expr_free((yyvsp[(4) - (5)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3126 | } |
| 3127 | break; |
| 3128 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3129 | case 89: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3130 | /* Line 1787 of yacc.c */ |
| 3131 | #line 990 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3132 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3133 | (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr); |
| 3134 | assert((yyval.a_expr)->Identifier == 0); |
| 3135 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 3136 | (yyvsp[(3) - (3)].a_marker).flags |= (yyval.a_expr)->marker.flags; |
| 3137 | (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3138 | } |
| 3139 | break; |
| 3140 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3141 | case 90: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3142 | /* Line 1787 of yacc.c */ |
| 3143 | #line 997 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3144 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3145 | (yyval.a_expr) = (yyvsp[(1) - (2)].a_expr); |
| 3146 | (yyvsp[(2) - (2)].a_marker).flags |= (yyval.a_expr)->marker.flags; |
| 3147 | (yyval.a_expr)->marker = (yyvsp[(2) - (2)].a_marker); |
| 3148 | _fixup_anonymous_identifier((yyval.a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3149 | } |
| 3150 | break; |
| 3151 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3152 | case 91: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3153 | /* Line 1787 of yacc.c */ |
| 3154 | #line 1003 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3155 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3156 | (yyval.a_expr) = NEW_EXPR(); |
| 3157 | checkmem((yyval.a_expr)); |
| 3158 | (yyval.a_expr)->meta_type = (yyvsp[(3) - (3)].a_expr)->meta_type; |
| 3159 | (yyval.a_expr)->expr_type = A1TC_COMPONENTS_OF; |
| 3160 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3161 | } |
| 3162 | break; |
| 3163 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3164 | case 92: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3165 | /* Line 1787 of yacc.c */ |
| 3166 | #line 1010 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3167 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3168 | (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3169 | } |
| 3170 | break; |
| 3171 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3172 | case 93: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3173 | /* Line 1787 of yacc.c */ |
| 3174 | #line 1016 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3175 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3176 | (yyval.a_expr) = NEW_EXPR(); |
| 3177 | checkmem((yyval.a_expr)); |
| 3178 | asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3179 | } |
| 3180 | break; |
| 3181 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3182 | case 94: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3183 | /* Line 1787 of yacc.c */ |
| 3184 | #line 1021 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3185 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3186 | (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); |
| 3187 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3188 | } |
| 3189 | break; |
| 3190 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3191 | case 95: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3192 | /* Line 1787 of yacc.c */ |
| 3193 | #line 1028 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3194 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3195 | (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr); |
| 3196 | assert((yyval.a_expr)->Identifier == 0); |
| 3197 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (2)].tv_str); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3198 | } |
| 3199 | break; |
| 3200 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3201 | case 96: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3202 | /* Line 1787 of yacc.c */ |
| 3203 | #line 1033 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3204 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3205 | (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3206 | } |
| 3207 | break; |
| 3208 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3209 | case 97: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3210 | /* Line 1787 of yacc.c */ |
| 3211 | #line 1036 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3212 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3213 | (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); |
| 3214 | _fixup_anonymous_identifier((yyval.a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3215 | } |
| 3216 | break; |
| 3217 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3218 | case 98: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3219 | /* Line 1787 of yacc.c */ |
| 3220 | #line 1043 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3221 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3222 | (yyval.a_expr) = (yyvsp[(3) - (5)].a_expr); |
| 3223 | checkmem((yyval.a_expr)); |
| 3224 | (yyval.a_expr)->with_syntax = (yyvsp[(5) - (5)].a_wsynt); |
| 3225 | assert((yyval.a_expr)->expr_type == A1TC_CLASSDEF); |
| 3226 | assert((yyval.a_expr)->meta_type == AMT_OBJECTCLASS); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3227 | } |
| 3228 | break; |
| 3229 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3230 | case 99: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3231 | /* Line 1787 of yacc.c */ |
| 3232 | #line 1053 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3233 | { (yyval.a_int) = 0; } |
| 3234 | break; |
| 3235 | |
| 3236 | case 100: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3237 | /* Line 1787 of yacc.c */ |
| 3238 | #line 1054 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3239 | { (yyval.a_int) = 1; } |
| 3240 | break; |
| 3241 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3242 | case 101: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3243 | /* Line 1787 of yacc.c */ |
| 3244 | #line 1058 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3245 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3246 | (yyval.a_expr) = NEW_EXPR(); |
| 3247 | checkmem((yyval.a_expr)); |
| 3248 | (yyval.a_expr)->expr_type = A1TC_CLASSDEF; |
| 3249 | (yyval.a_expr)->meta_type = AMT_OBJECTCLASS; |
| 3250 | asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3251 | } |
| 3252 | break; |
| 3253 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3254 | case 102: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3255 | /* Line 1787 of yacc.c */ |
| 3256 | #line 1065 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3257 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3258 | (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); |
| 3259 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3260 | } |
| 3261 | break; |
| 3262 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3263 | case 103: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3264 | /* Line 1787 of yacc.c */ |
| 3265 | #line 1075 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3266 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3267 | (yyval.a_expr) = NEW_EXPR(); |
| 3268 | checkmem((yyval.a_expr)); |
| 3269 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (2)].tv_str); |
| 3270 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3271 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_TFS; /* TypeFieldSpec */ |
| 3272 | (yyval.a_expr)->marker = (yyvsp[(2) - (2)].a_marker); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3273 | } |
| 3274 | break; |
| 3275 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3276 | case 104: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3277 | /* Line 1787 of yacc.c */ |
| 3278 | #line 1085 "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 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str); |
| 3282 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3283 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_FTVFS; /* FixedTypeValueFieldSpec */ |
| 3284 | (yyval.a_expr)->unique = (yyvsp[(3) - (4)].a_int); |
| 3285 | (yyval.a_expr)->marker = (yyvsp[(4) - (4)].a_marker); |
| 3286 | asn1p_expr_add((yyval.a_expr), (yyvsp[(2) - (4)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3287 | } |
| 3288 | break; |
| 3289 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3290 | case 105: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3291 | /* Line 1787 of yacc.c */ |
| 3292 | #line 1096 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3293 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3294 | (yyval.a_expr) = NEW_EXPR(); |
| 3295 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 3296 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3297 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_VTVFS; |
| 3298 | (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref); |
| 3299 | (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3300 | } |
| 3301 | break; |
| 3302 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3303 | case 106: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3304 | /* Line 1787 of yacc.c */ |
| 3305 | #line 1106 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3306 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3307 | (yyval.a_expr) = NEW_EXPR(); |
| 3308 | checkmem((yyval.a_expr)); |
| 3309 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 3310 | (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref); |
| 3311 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3312 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_OFS; |
| 3313 | (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3314 | } |
| 3315 | break; |
| 3316 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3317 | case 107: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3318 | /* Line 1787 of yacc.c */ |
| 3319 | #line 1117 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3320 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3321 | (yyval.a_expr) = NEW_EXPR(); |
| 3322 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 3323 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3324 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_VTVSFS; |
| 3325 | (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref); |
| 3326 | (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3327 | } |
| 3328 | break; |
| 3329 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3330 | case 108: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3331 | /* Line 1787 of yacc.c */ |
| 3332 | #line 1127 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3333 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3334 | (yyval.a_expr) = NEW_EXPR(); |
| 3335 | checkmem((yyval.a_expr)); |
| 3336 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 3337 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3338 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_FTVSFS; |
| 3339 | asn1p_expr_add((yyval.a_expr), (yyvsp[(2) - (3)].a_expr)); |
| 3340 | (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3341 | } |
| 3342 | break; |
| 3343 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3344 | case 109: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3345 | /* Line 1787 of yacc.c */ |
| 3346 | #line 1138 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3347 | { |
| 3348 | (yyval.a_expr) = NEW_EXPR(); |
| 3349 | checkmem((yyval.a_expr)); |
| 3350 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 3351 | (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref); |
| 3352 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3353 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_OSFS; |
| 3354 | (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker); |
| 3355 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3356 | break; |
| 3357 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3358 | case 110: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3359 | /* Line 1787 of yacc.c */ |
| 3360 | #line 1150 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3361 | { (yyval.a_wsynt) = 0; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3362 | break; |
| 3363 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3364 | case 111: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3365 | /* Line 1787 of yacc.c */ |
| 3366 | #line 1151 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3367 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3368 | (yyval.a_wsynt) = (yyvsp[(1) - (1)].a_wsynt); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3369 | } |
| 3370 | break; |
| 3371 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3372 | case 112: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3373 | /* Line 1787 of yacc.c */ |
| 3374 | #line 1158 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3375 | { asn1p_lexer_hack_enable_with_syntax(); } |
| 3376 | break; |
| 3377 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3378 | case 113: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3379 | /* Line 1787 of yacc.c */ |
| 3380 | #line 1160 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3381 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3382 | (yyval.a_wsynt) = (yyvsp[(5) - (6)].a_wsynt); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3383 | } |
| 3384 | break; |
| 3385 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3386 | case 114: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3387 | /* Line 1787 of yacc.c */ |
| 3388 | #line 1166 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3389 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3390 | (yyval.a_wsynt) = asn1p_wsyntx_new(); |
| 3391 | TQ_ADD(&((yyval.a_wsynt)->chunks), (yyvsp[(1) - (1)].a_wchunk), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3392 | } |
| 3393 | break; |
| 3394 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3395 | case 115: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3396 | /* Line 1787 of yacc.c */ |
| 3397 | #line 1170 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3398 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3399 | (yyval.a_wsynt) = (yyvsp[(1) - (2)].a_wsynt); |
| 3400 | TQ_ADD(&((yyval.a_wsynt)->chunks), (yyvsp[(2) - (2)].a_wchunk), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3401 | } |
| 3402 | break; |
| 3403 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3404 | case 116: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3405 | /* Line 1787 of yacc.c */ |
| 3406 | #line 1177 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3407 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3408 | (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].tv_opaque).buf, 0); |
| 3409 | (yyval.a_wchunk)->type = WC_WHITESPACE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3410 | } |
| 3411 | break; |
| 3412 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3413 | case 117: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3414 | /* Line 1787 of yacc.c */ |
| 3415 | #line 1181 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3416 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3417 | (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] | 3418 | } |
| 3419 | break; |
| 3420 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3421 | case 118: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3422 | /* Line 1787 of yacc.c */ |
| 3423 | #line 1184 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3424 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3425 | (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].a_refcomp).name, 0); |
| 3426 | (yyval.a_wchunk)->type = WC_FIELD; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3427 | } |
| 3428 | break; |
| 3429 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 3430 | case 119: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3431 | /* Line 1787 of yacc.c */ |
| 3432 | #line 1188 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 3433 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3434 | (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromsyntax((yyvsp[(2) - (3)].a_wsynt)); |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 3435 | } |
| 3436 | break; |
| 3437 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 3438 | case 120: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3439 | /* Line 1787 of yacc.c */ |
| 3440 | #line 1194 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3441 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3442 | (yyval.a_expr) = NEW_EXPR(); |
| 3443 | checkmem((yyval.a_expr)); |
| 3444 | (yyval.a_expr)->Identifier = strdup("..."); |
| 3445 | checkmem((yyval.a_expr)->Identifier); |
| 3446 | (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE; |
| 3447 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3448 | } |
| 3449 | break; |
| 3450 | |
| 3451 | case 121: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3452 | /* Line 1787 of yacc.c */ |
| 3453 | #line 1202 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3454 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3455 | (yyval.a_expr) = NEW_EXPR(); |
| 3456 | checkmem((yyval.a_expr)); |
| 3457 | (yyval.a_expr)->Identifier = strdup("..."); |
| 3458 | checkmem((yyval.a_expr)->Identifier); |
| 3459 | (yyval.a_expr)->value = (yyvsp[(3) - (3)].a_value); |
| 3460 | (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE; |
| 3461 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3462 | } |
| 3463 | break; |
| 3464 | |
| 3465 | case 122: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3466 | /* Line 1787 of yacc.c */ |
| 3467 | #line 1211 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3468 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3469 | (yyval.a_expr) = NEW_EXPR(); |
| 3470 | checkmem((yyval.a_expr)); |
| 3471 | (yyval.a_expr)->Identifier = strdup("..."); |
| 3472 | (yyval.a_expr)->value = (yyvsp[(3) - (3)].a_value); |
| 3473 | checkmem((yyval.a_expr)->Identifier); |
| 3474 | (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE; |
| 3475 | (yyval.a_expr)->meta_type = AMT_TYPE; |
| 3476 | } |
| 3477 | break; |
| 3478 | |
| 3479 | case 123: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3480 | /* Line 1787 of yacc.c */ |
| 3481 | #line 1223 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3482 | { |
| 3483 | (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr); |
| 3484 | (yyval.a_expr)->tag = (yyvsp[(1) - (3)].a_tag); |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 3485 | /* |
| 3486 | * Outer constraint for SEQUENCE OF and SET OF applies |
| 3487 | * to the inner type. |
| 3488 | */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3489 | if((yyval.a_expr)->expr_type == ASN_CONSTR_SEQUENCE_OF |
| 3490 | || (yyval.a_expr)->expr_type == ASN_CONSTR_SET_OF) { |
| 3491 | assert(!TQ_FIRST(&((yyval.a_expr)->members))->constraints); |
| 3492 | TQ_FIRST(&((yyval.a_expr)->members))->constraints = (yyvsp[(3) - (3)].a_constr); |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 3493 | } else { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3494 | if((yyval.a_expr)->constraints) { |
| 3495 | assert(!(yyvsp[(2) - (3)].a_expr)); |
Bi-Ruei, Chiu | 3dcf05b | 2017-05-04 21:45:05 +0800 | [diff] [blame] | 3496 | /* Check this : optConstraints is not used ?! */ |
| 3497 | asn1p_constraint_free((yyvsp[(3) - (3)].a_constr)); |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 3498 | } else { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3499 | (yyval.a_expr)->constraints = (yyvsp[(3) - (3)].a_constr); |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 3500 | } |
| 3501 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3502 | } |
| 3503 | break; |
| 3504 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3505 | case 124: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3506 | /* Line 1787 of yacc.c */ |
| 3507 | #line 1247 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3508 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3509 | (yyval.a_int) = asn1p_as_pointer ? EM_INDIRECT : 0; |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 3510 | asn1p_as_pointer = 0; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3511 | } |
| 3512 | break; |
| 3513 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3514 | case 125: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3515 | /* Line 1787 of yacc.c */ |
| 3516 | #line 1254 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3517 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3518 | (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr); |
| 3519 | (yyval.a_expr)->marker.flags |= (yyvsp[(1) - (2)].a_int); |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 3520 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3521 | if(((yyval.a_expr)->marker.flags & EM_INDIRECT) |
| 3522 | && ((yyval.a_expr)->marker.flags & EM_OPTIONAL) != EM_OPTIONAL) { |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 3523 | fprintf(stderr, |
| 3524 | "INFO: Directive <ASN1C:RepresentAsPointer> " |
| 3525 | "applied to %s at line %d\n", |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3526 | ASN_EXPR_TYPE2STR((yyval.a_expr)->expr_type) |
| 3527 | ? ASN_EXPR_TYPE2STR((yyval.a_expr)->expr_type) |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 3528 | : "member", |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3529 | (yyval.a_expr)->_lineno |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 3530 | ); |
| 3531 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3532 | } |
| 3533 | break; |
| 3534 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3535 | case 126: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3536 | /* Line 1787 of yacc.c */ |
| 3537 | #line 1273 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3538 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3539 | (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3540 | } |
| 3541 | break; |
| 3542 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3543 | case 127: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3544 | /* Line 1787 of yacc.c */ |
| 3545 | #line 1276 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3546 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3547 | (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr); |
| 3548 | assert((yyval.a_expr)->expr_type == A1TC_INVALID); |
| 3549 | (yyval.a_expr)->expr_type = ASN_CONSTR_CHOICE; |
| 3550 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3551 | } |
| 3552 | break; |
| 3553 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3554 | case 128: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3555 | /* Line 1787 of yacc.c */ |
| 3556 | #line 1282 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3557 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3558 | (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr); |
| 3559 | assert((yyval.a_expr)->expr_type == A1TC_INVALID); |
| 3560 | (yyval.a_expr)->expr_type = ASN_CONSTR_SEQUENCE; |
| 3561 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3562 | } |
| 3563 | break; |
| 3564 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3565 | case 129: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3566 | /* Line 1787 of yacc.c */ |
| 3567 | #line 1288 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3568 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3569 | (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr); |
| 3570 | assert((yyval.a_expr)->expr_type == A1TC_INVALID); |
| 3571 | (yyval.a_expr)->expr_type = ASN_CONSTR_SET; |
| 3572 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3573 | } |
| 3574 | break; |
| 3575 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3576 | case 130: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3577 | /* Line 1787 of yacc.c */ |
| 3578 | #line 1294 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3579 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3580 | (yyval.a_expr) = NEW_EXPR(); |
| 3581 | checkmem((yyval.a_expr)); |
| 3582 | (yyval.a_expr)->constraints = (yyvsp[(2) - (6)].a_constr); |
| 3583 | (yyval.a_expr)->expr_type = ASN_CONSTR_SEQUENCE_OF; |
| 3584 | (yyval.a_expr)->meta_type = AMT_TYPE; |
| 3585 | (yyvsp[(6) - (6)].a_expr)->Identifier = (yyvsp[(4) - (6)].tv_str); |
| 3586 | (yyvsp[(6) - (6)].a_expr)->tag = (yyvsp[(5) - (6)].a_tag); |
| 3587 | asn1p_expr_add((yyval.a_expr), (yyvsp[(6) - (6)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3588 | } |
| 3589 | break; |
| 3590 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3591 | case 131: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3592 | /* Line 1787 of yacc.c */ |
| 3593 | #line 1304 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3594 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3595 | (yyval.a_expr) = NEW_EXPR(); |
| 3596 | checkmem((yyval.a_expr)); |
| 3597 | (yyval.a_expr)->constraints = (yyvsp[(2) - (6)].a_constr); |
| 3598 | (yyval.a_expr)->expr_type = ASN_CONSTR_SET_OF; |
| 3599 | (yyval.a_expr)->meta_type = AMT_TYPE; |
| 3600 | (yyvsp[(6) - (6)].a_expr)->Identifier = (yyvsp[(4) - (6)].tv_str); |
| 3601 | (yyvsp[(6) - (6)].a_expr)->tag = (yyvsp[(5) - (6)].a_tag); |
| 3602 | asn1p_expr_add((yyval.a_expr), (yyvsp[(6) - (6)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3603 | } |
| 3604 | break; |
| 3605 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3606 | case 132: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3607 | /* Line 1787 of yacc.c */ |
| 3608 | #line 1314 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3609 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3610 | (yyval.a_expr) = NEW_EXPR(); |
| 3611 | checkmem((yyval.a_expr)); |
| 3612 | (yyval.a_expr)->expr_type = ASN_TYPE_ANY; |
| 3613 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3614 | } |
| 3615 | break; |
| 3616 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3617 | case 133: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3618 | /* Line 1787 of yacc.c */ |
| 3619 | #line 1320 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3620 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3621 | int ret; |
| 3622 | (yyval.a_expr) = NEW_EXPR(); |
| 3623 | checkmem((yyval.a_expr)); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3624 | (yyval.a_expr)->reference = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3625 | ret = asn1p_ref_add_component((yyval.a_expr)->reference, |
| 3626 | (yyvsp[(4) - (4)].tv_str), RLT_lowercase); |
| 3627 | checkmem(ret == 0); |
| 3628 | (yyval.a_expr)->expr_type = ASN_TYPE_ANY; |
| 3629 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3630 | free((yyvsp[(4) - (4)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3631 | } |
| 3632 | break; |
| 3633 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3634 | case 134: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3635 | /* Line 1787 of yacc.c */ |
| 3636 | #line 1332 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3637 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3638 | (yyval.a_expr) = NEW_EXPR(); |
| 3639 | checkmem((yyval.a_expr)); |
| 3640 | (yyval.a_expr)->reference = (yyvsp[(3) - (3)].a_ref); |
| 3641 | (yyval.a_expr)->expr_type = A1TC_INSTANCE; |
| 3642 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3643 | } |
| 3644 | break; |
| 3645 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 3646 | case 135: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3647 | /* Line 1787 of yacc.c */ |
| 3648 | #line 1347 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3649 | { |
| 3650 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3651 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3652 | checkmem((yyval.a_ref)); |
| 3653 | 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] | 3654 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3655 | free((yyvsp[(1) - (1)].tv_str)); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3656 | } |
| 3657 | break; |
| 3658 | |
| 3659 | case 136: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3660 | /* Line 1787 of yacc.c */ |
| 3661 | #line 1355 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3662 | { |
| 3663 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3664 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3665 | checkmem((yyval.a_ref)); |
| 3666 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3667 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3668 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_UNKNOWN); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3669 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3670 | free((yyvsp[(1) - (3)].tv_str)); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3671 | free((yyvsp[(3) - (3)].tv_str)); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3672 | } |
| 3673 | break; |
| 3674 | |
| 3675 | case 137: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3676 | /* Line 1787 of yacc.c */ |
| 3677 | #line 1366 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3678 | { |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 3679 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3680 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3681 | checkmem((yyval.a_ref)); |
| 3682 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN); |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 3683 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3684 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_UNKNOWN); |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 3685 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3686 | free((yyvsp[(1) - (3)].tv_str)); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3687 | free((yyvsp[(3) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3688 | } |
| 3689 | break; |
| 3690 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3691 | case 138: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3692 | /* Line 1787 of yacc.c */ |
| 3693 | #line 1377 "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) - (3)].tv_str), RLT_UNKNOWN); |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 3699 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3700 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_lowercase); |
| 3701 | checkmem(ret == 0); |
| 3702 | free((yyvsp[(1) - (3)].tv_str)); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3703 | free((yyvsp[(3) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3704 | } |
| 3705 | break; |
| 3706 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3707 | case 139: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3708 | /* Line 1787 of yacc.c */ |
| 3709 | #line 1388 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3710 | { |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 3711 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3712 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3713 | checkmem((yyval.a_ref)); |
| 3714 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_CAPITALS); |
| 3715 | free((yyvsp[(1) - (1)].tv_str)); |
| 3716 | checkmem(ret == 0); |
| 3717 | } |
| 3718 | break; |
| 3719 | |
| 3720 | case 140: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3721 | /* Line 1787 of yacc.c */ |
| 3722 | #line 1396 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3723 | { |
| 3724 | int ret; |
| 3725 | (yyval.a_ref) = (yyvsp[(3) - (3)].a_ref); |
| 3726 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_CAPITALS); |
| 3727 | free((yyvsp[(1) - (3)].tv_str)); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3728 | checkmem(ret == 0); |
| 3729 | /* |
| 3730 | * Move the last element infront. |
| 3731 | */ |
| 3732 | { |
| 3733 | struct asn1p_ref_component_s tmp_comp; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3734 | tmp_comp = (yyval.a_ref)->components[(yyval.a_ref)->comp_count-1]; |
| 3735 | memmove(&(yyval.a_ref)->components[1], |
| 3736 | &(yyval.a_ref)->components[0], |
| 3737 | sizeof((yyval.a_ref)->components[0]) |
| 3738 | * ((yyval.a_ref)->comp_count - 1)); |
| 3739 | (yyval.a_ref)->components[0] = tmp_comp; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3740 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3741 | } |
| 3742 | break; |
| 3743 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3744 | case 141: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3745 | /* Line 1787 of yacc.c */ |
| 3746 | #line 1418 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3747 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3748 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3749 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3750 | checkmem((yyval.a_ref)); |
| 3751 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].a_refcomp).name, (yyvsp[(1) - (1)].a_refcomp).lex_type); |
| 3752 | free((yyvsp[(1) - (1)].a_refcomp).name); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3753 | checkmem(ret == 0); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3754 | } |
| 3755 | break; |
| 3756 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3757 | case 142: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3758 | /* Line 1787 of yacc.c */ |
| 3759 | #line 1426 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3760 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3761 | int ret; |
| 3762 | (yyval.a_ref) = (yyvsp[(1) - (3)].a_ref); |
| 3763 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].a_refcomp).name, (yyvsp[(3) - (3)].a_refcomp).lex_type); |
| 3764 | free((yyvsp[(3) - (3)].a_refcomp).name); |
| 3765 | checkmem(ret == 0); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3766 | } |
| 3767 | break; |
| 3768 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3769 | case 144: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3770 | /* Line 1787 of yacc.c */ |
| 3771 | #line 1439 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3772 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3773 | (yyval.a_refcomp).lex_type = RLT_AmpUppercase; |
| 3774 | (yyval.a_refcomp).name = (yyvsp[(1) - (1)].tv_str); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3775 | } |
| 3776 | break; |
| 3777 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3778 | case 145: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3779 | /* Line 1787 of yacc.c */ |
| 3780 | #line 1444 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3781 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3782 | (yyval.a_refcomp).lex_type = RLT_Amplowercase; |
| 3783 | (yyval.a_refcomp).name = (yyvsp[(1) - (1)].tv_str); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3784 | } |
| 3785 | break; |
| 3786 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3787 | case 146: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3788 | /* Line 1787 of yacc.c */ |
| 3789 | #line 1453 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3790 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3791 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3792 | 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] | 3793 | free((yyvsp[(1) - (1)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3794 | } |
| 3795 | break; |
| 3796 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3797 | case 147: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3798 | /* Line 1787 of yacc.c */ |
| 3799 | #line 1458 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3800 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3801 | (yyval.a_ref) = (yyval.a_ref); |
| 3802 | 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] | 3803 | free((yyvsp[(3) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3804 | } |
| 3805 | break; |
| 3806 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3807 | case 148: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3808 | /* Line 1787 of yacc.c */ |
| 3809 | #line 1463 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3810 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3811 | (yyval.a_ref) = (yyval.a_ref); |
| 3812 | 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] | 3813 | free((yyvsp[(3) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3814 | } |
| 3815 | break; |
| 3816 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3817 | case 149: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3818 | /* Line 1787 of yacc.c */ |
| 3819 | #line 1471 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3820 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3821 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3822 | 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] | 3823 | free((yyvsp[(1) - (1)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3824 | } |
| 3825 | break; |
| 3826 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3827 | case 150: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3828 | /* Line 1787 of yacc.c */ |
| 3829 | #line 1494 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3830 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3831 | (yyval.a_expr) = (yyvsp[(2) - (4)].a_expr); |
| 3832 | assert((yyval.a_expr)->Identifier == NULL); |
| 3833 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str); |
| 3834 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 3835 | (yyval.a_expr)->value = (yyvsp[(4) - (4)].a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3836 | } |
| 3837 | break; |
| 3838 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3839 | case 153: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3840 | /* Line 1787 of yacc.c */ |
| 3841 | #line 1506 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3842 | { |
| 3843 | (yyval.a_value) = asn1p_value_fromint(0); |
| 3844 | checkmem((yyval.a_value)); |
| 3845 | (yyval.a_value)->type = ATV_CHOICE_IDENTIFIER; |
| 3846 | (yyval.a_value)->value.choice_identifier.identifier = (yyvsp[(1) - (3)].tv_str); |
| 3847 | (yyval.a_value)->value.choice_identifier.value = (yyvsp[(3) - (3)].a_value); |
| 3848 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3849 | break; |
| 3850 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3851 | case 154: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3852 | /* Line 1787 of yacc.c */ |
| 3853 | #line 1513 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3854 | { asn1p_lexer_hack_push_opaque_state(); } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3855 | break; |
| 3856 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3857 | case 155: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3858 | /* Line 1787 of yacc.c */ |
| 3859 | #line 1513 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3860 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3861 | (yyval.a_value) = asn1p_value_frombuf((yyvsp[(3) - (3)].tv_opaque).buf, (yyvsp[(3) - (3)].tv_opaque).len, 0); |
| 3862 | checkmem((yyval.a_value)); |
| 3863 | (yyval.a_value)->type = ATV_UNPARSED; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3864 | } |
| 3865 | break; |
| 3866 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3867 | case 156: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3868 | /* Line 1787 of yacc.c */ |
| 3869 | #line 1518 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3870 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3871 | (yyval.a_value) = asn1p_value_fromint(0); |
| 3872 | checkmem((yyval.a_value)); |
| 3873 | (yyval.a_value)->type = ATV_NULL; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3874 | } |
| 3875 | break; |
| 3876 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3877 | case 157: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3878 | /* Line 1787 of yacc.c */ |
| 3879 | #line 1526 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3880 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3881 | (yyval.a_value) = asn1p_value_fromint(0); |
| 3882 | checkmem((yyval.a_value)); |
| 3883 | (yyval.a_value)->type = ATV_FALSE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3884 | } |
| 3885 | break; |
| 3886 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3887 | case 158: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3888 | /* Line 1787 of yacc.c */ |
| 3889 | #line 1531 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3890 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3891 | (yyval.a_value) = asn1p_value_fromint(0); |
| 3892 | checkmem((yyval.a_value)); |
| 3893 | (yyval.a_value)->type = ATV_TRUE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3894 | } |
| 3895 | break; |
| 3896 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3897 | case 159: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3898 | /* Line 1787 of yacc.c */ |
| 3899 | #line 1536 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3900 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3901 | (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'B'); |
| 3902 | checkmem((yyval.a_value)); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3903 | free((yyvsp[(1) - (1)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3904 | } |
| 3905 | break; |
| 3906 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3907 | case 160: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3908 | /* Line 1787 of yacc.c */ |
| 3909 | #line 1541 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3910 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3911 | (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'H'); |
| 3912 | checkmem((yyval.a_value)); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3913 | free((yyvsp[(1) - (1)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3914 | } |
| 3915 | break; |
| 3916 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3917 | case 161: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3918 | /* Line 1787 of yacc.c */ |
| 3919 | #line 1546 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3920 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3921 | (yyval.a_value) = (yyval.a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3922 | } |
| 3923 | break; |
| 3924 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3925 | case 162: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3926 | /* Line 1787 of yacc.c */ |
| 3927 | #line 1549 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3928 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3929 | (yyval.a_value) = (yyvsp[(1) - (1)].a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3930 | } |
| 3931 | break; |
| 3932 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3933 | case 163: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3934 | /* Line 1787 of yacc.c */ |
| 3935 | #line 1555 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3936 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3937 | asn1p_ref_t *ref; |
| 3938 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3939 | ref = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3940 | checkmem(ref); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3941 | ret = asn1p_ref_add_component(ref, (yyvsp[(1) - (1)].tv_str), RLT_lowercase); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3942 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3943 | (yyval.a_value) = asn1p_value_fromref(ref, 0); |
| 3944 | checkmem((yyval.a_value)); |
| 3945 | free((yyvsp[(1) - (1)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3946 | } |
| 3947 | break; |
| 3948 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3949 | case 164: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3950 | /* Line 1787 of yacc.c */ |
| 3951 | #line 1566 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3952 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3953 | asn1p_ref_t *ref; |
| 3954 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3955 | ref = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3956 | checkmem(ref); |
| 3957 | ret = asn1p_ref_add_component(ref, (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN); |
| 3958 | checkmem(ret == 0); |
| 3959 | ret = asn1p_ref_add_component(ref, (yyvsp[(3) - (3)].tv_str), RLT_lowercase); |
| 3960 | checkmem(ret == 0); |
| 3961 | (yyval.a_value) = asn1p_value_fromref(ref, 0); |
| 3962 | checkmem((yyval.a_value)); |
| 3963 | free((yyvsp[(1) - (3)].tv_str)); |
| 3964 | free((yyvsp[(3) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3965 | } |
| 3966 | break; |
| 3967 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3968 | case 165: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3969 | /* Line 1787 of yacc.c */ |
| 3970 | #line 1584 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3971 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3972 | (yyval.a_value) = asn1p_value_frombuf((yyvsp[(1) - (1)].tv_opaque).buf, (yyvsp[(1) - (1)].tv_opaque).len, 0); |
| 3973 | checkmem((yyval.a_value)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3974 | } |
| 3975 | break; |
| 3976 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3977 | case 166: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3978 | /* Line 1787 of yacc.c */ |
| 3979 | #line 1588 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3980 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3981 | (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int)); |
| 3982 | checkmem((yyval.a_value)); |
| 3983 | (yyval.a_value)->type = ATV_TUPLE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3984 | } |
| 3985 | break; |
| 3986 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3987 | case 167: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3988 | /* Line 1787 of yacc.c */ |
| 3989 | #line 1593 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3990 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3991 | (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int)); |
| 3992 | checkmem((yyval.a_value)); |
| 3993 | (yyval.a_value)->type = ATV_QUADRUPLE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3994 | } |
| 3995 | break; |
| 3996 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3997 | case 168: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 3998 | /* Line 1787 of yacc.c */ |
| 3999 | #line 1601 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4000 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4001 | (yyval.tv_opaque).len = (yyvsp[(1) - (1)].tv_opaque).len + 1; |
| 4002 | (yyval.tv_opaque).buf = malloc((yyval.tv_opaque).len + 1); |
| 4003 | checkmem((yyval.tv_opaque).buf); |
| 4004 | (yyval.tv_opaque).buf[0] = '{'; |
| 4005 | memcpy((yyval.tv_opaque).buf + 1, (yyvsp[(1) - (1)].tv_opaque).buf, (yyvsp[(1) - (1)].tv_opaque).len); |
| 4006 | (yyval.tv_opaque).buf[(yyval.tv_opaque).len] = '\0'; |
| 4007 | free((yyvsp[(1) - (1)].tv_opaque).buf); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4008 | } |
| 4009 | break; |
| 4010 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4011 | case 169: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4012 | /* Line 1787 of yacc.c */ |
| 4013 | #line 1610 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4014 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4015 | int newsize = (yyvsp[(1) - (2)].tv_opaque).len + (yyvsp[(2) - (2)].tv_opaque).len; |
| 4016 | char *p = malloc(newsize + 1); |
| 4017 | checkmem(p); |
| 4018 | memcpy(p , (yyvsp[(1) - (2)].tv_opaque).buf, (yyvsp[(1) - (2)].tv_opaque).len); |
| 4019 | memcpy(p + (yyvsp[(1) - (2)].tv_opaque).len, (yyvsp[(2) - (2)].tv_opaque).buf, (yyvsp[(2) - (2)].tv_opaque).len); |
| 4020 | p[newsize] = '\0'; |
| 4021 | free((yyvsp[(1) - (2)].tv_opaque).buf); |
| 4022 | free((yyvsp[(2) - (2)].tv_opaque).buf); |
| 4023 | (yyval.tv_opaque).buf = p; |
| 4024 | (yyval.tv_opaque).len = newsize; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4025 | } |
| 4026 | break; |
| 4027 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4028 | case 170: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4029 | /* Line 1787 of yacc.c */ |
| 4030 | #line 1625 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4031 | { (yyval.a_type) = ASN_BASIC_BOOLEAN; } |
| 4032 | break; |
| 4033 | |
| 4034 | case 171: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4035 | /* Line 1787 of yacc.c */ |
| 4036 | #line 1626 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4037 | { (yyval.a_type) = ASN_BASIC_NULL; } |
| 4038 | break; |
| 4039 | |
| 4040 | case 172: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4041 | /* Line 1787 of yacc.c */ |
| 4042 | #line 1627 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4043 | { (yyval.a_type) = ASN_BASIC_REAL; } |
| 4044 | break; |
| 4045 | |
| 4046 | case 173: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4047 | /* Line 1787 of yacc.c */ |
| 4048 | #line 1628 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4049 | { (yyval.a_type) = (yyvsp[(1) - (1)].a_type); } |
| 4050 | break; |
| 4051 | |
| 4052 | case 174: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4053 | /* Line 1787 of yacc.c */ |
| 4054 | #line 1629 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4055 | { (yyval.a_type) = ASN_BASIC_OCTET_STRING; } |
| 4056 | break; |
| 4057 | |
| 4058 | case 175: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4059 | /* Line 1787 of yacc.c */ |
| 4060 | #line 1630 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4061 | { (yyval.a_type) = ASN_BASIC_OBJECT_IDENTIFIER; } |
| 4062 | break; |
| 4063 | |
| 4064 | case 176: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4065 | /* Line 1787 of yacc.c */ |
| 4066 | #line 1631 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4067 | { (yyval.a_type) = ASN_BASIC_RELATIVE_OID; } |
| 4068 | break; |
| 4069 | |
| 4070 | case 177: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4071 | /* Line 1787 of yacc.c */ |
| 4072 | #line 1632 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4073 | { (yyval.a_type) = ASN_BASIC_EXTERNAL; } |
| 4074 | break; |
| 4075 | |
| 4076 | case 178: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4077 | /* Line 1787 of yacc.c */ |
| 4078 | #line 1633 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4079 | { (yyval.a_type) = ASN_BASIC_EMBEDDED_PDV; } |
| 4080 | break; |
| 4081 | |
| 4082 | case 179: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4083 | /* Line 1787 of yacc.c */ |
| 4084 | #line 1634 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4085 | { (yyval.a_type) = ASN_BASIC_CHARACTER_STRING; } |
| 4086 | break; |
| 4087 | |
| 4088 | case 180: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4089 | /* Line 1787 of yacc.c */ |
| 4090 | #line 1635 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4091 | { (yyval.a_type) = ASN_BASIC_UTCTime; } |
| 4092 | break; |
| 4093 | |
| 4094 | case 181: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4095 | /* Line 1787 of yacc.c */ |
| 4096 | #line 1636 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4097 | { (yyval.a_type) = ASN_BASIC_GeneralizedTime; } |
| 4098 | break; |
| 4099 | |
| 4100 | case 182: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4101 | /* Line 1787 of yacc.c */ |
| 4102 | #line 1637 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4103 | { (yyval.a_type) = (yyvsp[(1) - (1)].a_type); } |
| 4104 | break; |
| 4105 | |
| 4106 | case 183: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4107 | /* Line 1787 of yacc.c */ |
| 4108 | #line 1644 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4109 | { (yyval.a_type) = ASN_BASIC_INTEGER; } |
| 4110 | break; |
| 4111 | |
| 4112 | case 184: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4113 | /* Line 1787 of yacc.c */ |
| 4114 | #line 1645 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4115 | { (yyval.a_type) = ASN_BASIC_ENUMERATED; } |
| 4116 | break; |
| 4117 | |
| 4118 | case 185: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4119 | /* Line 1787 of yacc.c */ |
| 4120 | #line 1646 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4121 | { (yyval.a_type) = ASN_BASIC_BIT_STRING; } |
| 4122 | break; |
| 4123 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4124 | case 186: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4125 | /* Line 1787 of yacc.c */ |
| 4126 | #line 1650 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4127 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4128 | (yyval.a_expr) = NEW_EXPR(); |
| 4129 | checkmem((yyval.a_expr)); |
| 4130 | (yyval.a_expr)->expr_type = (yyvsp[(1) - (1)].a_type); |
| 4131 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4132 | } |
| 4133 | break; |
| 4134 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4135 | case 187: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4136 | /* Line 1787 of yacc.c */ |
| 4137 | #line 1656 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4138 | { |
| 4139 | if((yyvsp[(2) - (2)].a_expr)) { |
| 4140 | (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr); |
| 4141 | } else { |
| 4142 | (yyval.a_expr) = NEW_EXPR(); |
| 4143 | checkmem((yyval.a_expr)); |
| 4144 | } |
| 4145 | (yyval.a_expr)->expr_type = (yyvsp[(1) - (2)].a_type); |
| 4146 | (yyval.a_expr)->meta_type = AMT_TYPE; |
| 4147 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4148 | break; |
| 4149 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4150 | case 188: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4151 | /* Line 1787 of yacc.c */ |
| 4152 | #line 1669 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4153 | { (yyval.a_type) = ASN_STRING_BMPString; } |
| 4154 | break; |
| 4155 | |
| 4156 | case 189: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4157 | /* Line 1787 of yacc.c */ |
| 4158 | #line 1670 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4159 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4160 | (yyval.a_type) = ASN_STRING_GeneralString; |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 4161 | fprintf(stderr, "WARNING: GeneralString is not fully supported\n"); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4162 | } |
| 4163 | break; |
| 4164 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4165 | case 190: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4166 | /* Line 1787 of yacc.c */ |
| 4167 | #line 1674 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4168 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4169 | (yyval.a_type) = ASN_STRING_GraphicString; |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 4170 | fprintf(stderr, "WARNING: GraphicString is not fully supported\n"); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4171 | } |
| 4172 | break; |
| 4173 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4174 | case 191: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4175 | /* Line 1787 of yacc.c */ |
| 4176 | #line 1678 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4177 | { (yyval.a_type) = ASN_STRING_IA5String; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4178 | break; |
| 4179 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4180 | case 192: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4181 | /* Line 1787 of yacc.c */ |
| 4182 | #line 1679 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4183 | { (yyval.a_type) = ASN_STRING_ISO646String; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4184 | break; |
| 4185 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4186 | case 193: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4187 | /* Line 1787 of yacc.c */ |
| 4188 | #line 1680 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4189 | { (yyval.a_type) = ASN_STRING_NumericString; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4190 | break; |
| 4191 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4192 | case 194: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4193 | /* Line 1787 of yacc.c */ |
| 4194 | #line 1681 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4195 | { (yyval.a_type) = ASN_STRING_PrintableString; } |
| 4196 | break; |
| 4197 | |
| 4198 | case 195: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4199 | /* Line 1787 of yacc.c */ |
| 4200 | #line 1682 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4201 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4202 | (yyval.a_type) = ASN_STRING_T61String; |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 4203 | fprintf(stderr, "WARNING: T61String is not fully supported\n"); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4204 | } |
| 4205 | break; |
| 4206 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4207 | case 196: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4208 | /* Line 1787 of yacc.c */ |
| 4209 | #line 1686 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4210 | { (yyval.a_type) = ASN_STRING_TeletexString; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4211 | break; |
| 4212 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4213 | case 197: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4214 | /* Line 1787 of yacc.c */ |
| 4215 | #line 1687 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4216 | { (yyval.a_type) = ASN_STRING_UniversalString; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4217 | break; |
| 4218 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4219 | case 198: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4220 | /* Line 1787 of yacc.c */ |
| 4221 | #line 1688 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4222 | { (yyval.a_type) = ASN_STRING_UTF8String; } |
| 4223 | break; |
| 4224 | |
| 4225 | case 199: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4226 | /* Line 1787 of yacc.c */ |
| 4227 | #line 1689 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4228 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4229 | (yyval.a_type) = ASN_STRING_VideotexString; |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 4230 | fprintf(stderr, "WARNING: VideotexString is not fully supported\n"); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4231 | } |
| 4232 | break; |
| 4233 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4234 | case 200: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4235 | /* Line 1787 of yacc.c */ |
| 4236 | #line 1693 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4237 | { (yyval.a_type) = ASN_STRING_VisibleString; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4238 | break; |
| 4239 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4240 | case 201: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4241 | /* Line 1787 of yacc.c */ |
| 4242 | #line 1694 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4243 | { (yyval.a_type) = ASN_STRING_ObjectDescriptor; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4244 | break; |
| 4245 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4246 | case 206: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4247 | /* Line 1787 of yacc.c */ |
| 4248 | #line 1705 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4249 | { (yyval.a_constr) = 0; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4250 | break; |
| 4251 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4252 | case 207: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4253 | /* Line 1787 of yacc.c */ |
| 4254 | #line 1706 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4255 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4256 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4257 | } |
| 4258 | break; |
| 4259 | |
Lev Walkin | c6ab03c | 2006-10-21 05:54:49 +0000 | [diff] [blame] | 4260 | case 209: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4261 | /* Line 1787 of yacc.c */ |
| 4262 | #line 1716 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4263 | { |
| 4264 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(1) - (1)].a_constr), 0); |
| 4265 | } |
| 4266 | break; |
| 4267 | |
| 4268 | case 210: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4269 | /* Line 1787 of yacc.c */ |
| 4270 | #line 1719 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4271 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4272 | /* |
| 4273 | * This is a special case, for compatibility purposes. |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 4274 | * It goes without parentheses. |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4275 | */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4276 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_SIZE, (yyvsp[(3) - (4)].a_constr), 0); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4277 | } |
| 4278 | break; |
| 4279 | |
Lev Walkin | c6ab03c | 2006-10-21 05:54:49 +0000 | [diff] [blame] | 4280 | case 211: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4281 | /* Line 1787 of yacc.c */ |
| 4282 | #line 1729 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4283 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4284 | (yyval.a_constr) = (yyvsp[(2) - (3)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4285 | } |
| 4286 | break; |
| 4287 | |
Lev Walkin | c6ab03c | 2006-10-21 05:54:49 +0000 | [diff] [blame] | 4288 | case 212: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4289 | /* Line 1787 of yacc.c */ |
| 4290 | #line 1732 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4291 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4292 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(1) - (4)].a_constr), (yyvsp[(3) - (4)].a_constr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4293 | } |
| 4294 | break; |
| 4295 | |
Lev Walkin | c6ab03c | 2006-10-21 05:54:49 +0000 | [diff] [blame] | 4296 | case 213: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4297 | /* Line 1787 of yacc.c */ |
| 4298 | #line 1738 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4299 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4300 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4301 | } |
| 4302 | break; |
| 4303 | |
Lev Walkin | c6ab03c | 2006-10-21 05:54:49 +0000 | [diff] [blame] | 4304 | case 214: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4305 | /* Line 1787 of yacc.c */ |
| 4306 | #line 1741 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4307 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4308 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4309 | } |
| 4310 | break; |
| 4311 | |
Lev Walkin | c6ab03c | 2006-10-21 05:54:49 +0000 | [diff] [blame] | 4312 | case 215: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4313 | /* Line 1787 of yacc.c */ |
| 4314 | #line 1747 "asn1p_y.y" |
| 4315 | { |
| 4316 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
| 4317 | (yyval.a_constr)->type = ACT_EL_EXT; |
| 4318 | } |
| 4319 | break; |
| 4320 | |
| 4321 | case 216: |
| 4322 | /* Line 1787 of yacc.c */ |
| 4323 | #line 1751 "asn1p_y.y" |
| 4324 | { |
| 4325 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
| 4326 | } |
| 4327 | break; |
| 4328 | |
| 4329 | case 217: |
| 4330 | /* Line 1787 of yacc.c */ |
| 4331 | #line 1754 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4332 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4333 | asn1p_constraint_t *ct; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4334 | ct = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4335 | ct->type = ACT_EL_EXT; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4336 | 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] | 4337 | } |
| 4338 | break; |
| 4339 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4340 | case 218: |
| 4341 | /* Line 1787 of yacc.c */ |
| 4342 | #line 1760 "asn1p_y.y" |
Lev Walkin | c6ab03c | 2006-10-21 05:54:49 +0000 | [diff] [blame] | 4343 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4344 | asn1p_constraint_t *ct; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4345 | ct = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4346 | ct->type = ACT_EL_EXT; |
| 4347 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, (yyvsp[(1) - (5)].a_constr), ct); |
| 4348 | ct = (yyval.a_constr); |
| 4349 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, ct, (yyvsp[(5) - (5)].a_constr)); |
Lev Walkin | c6ab03c | 2006-10-21 05:54:49 +0000 | [diff] [blame] | 4350 | } |
| 4351 | break; |
| 4352 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4353 | case 220: |
| 4354 | /* Line 1787 of yacc.c */ |
| 4355 | #line 1772 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4356 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4357 | 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] | 4358 | } |
| 4359 | break; |
| 4360 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4361 | case 222: |
| 4362 | /* Line 1787 of yacc.c */ |
| 4363 | #line 1779 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4364 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4365 | 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] | 4366 | } |
| 4367 | break; |
| 4368 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4369 | case 224: |
| 4370 | /* Line 1787 of yacc.c */ |
| 4371 | #line 1786 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4372 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4373 | 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] | 4374 | } |
| 4375 | break; |
| 4376 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4377 | case 226: |
| 4378 | /* Line 1787 of yacc.c */ |
| 4379 | #line 1794 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4380 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4381 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_EXC, (yyvsp[(1) - (3)].a_constr), (yyvsp[(3) - (3)].a_constr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4382 | } |
| 4383 | break; |
| 4384 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4385 | case 227: |
| 4386 | /* Line 1787 of yacc.c */ |
| 4387 | #line 1800 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4388 | { |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 4389 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4390 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4391 | checkmem((yyval.a_constr)); |
| 4392 | (yyval.a_constr)->type = (yyvsp[(1) - (4)].a_ctype); |
| 4393 | ret = asn1p_constraint_insert((yyval.a_constr), (yyvsp[(3) - (4)].a_constr)); |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 4394 | checkmem(ret == 0); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4395 | } |
| 4396 | break; |
| 4397 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4398 | case 228: |
| 4399 | /* Line 1787 of yacc.c */ |
| 4400 | #line 1808 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4401 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4402 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4403 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4404 | checkmem((yyval.a_constr)); |
| 4405 | (yyval.a_constr)->type = ACT_CA_SET; |
| 4406 | ret = asn1p_constraint_insert((yyval.a_constr), (yyvsp[(2) - (3)].a_constr)); |
| 4407 | checkmem(ret == 0); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4408 | } |
| 4409 | break; |
| 4410 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4411 | case 229: |
| 4412 | /* Line 1787 of yacc.c */ |
| 4413 | #line 1816 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4414 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4415 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4416 | checkmem((yyval.a_constr)); |
| 4417 | (yyval.a_constr)->type = ACT_EL_VALUE; |
| 4418 | (yyval.a_constr)->value = (yyvsp[(1) - (1)].a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4419 | } |
| 4420 | break; |
| 4421 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4422 | case 230: |
| 4423 | /* Line 1787 of yacc.c */ |
| 4424 | #line 1822 "asn1p_y.y" |
Lev Walkin | f172715 | 2006-09-21 01:50:37 +0000 | [diff] [blame] | 4425 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4426 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4427 | checkmem((yyval.a_constr)); |
| 4428 | (yyval.a_constr)->type = ACT_EL_TYPE; |
| 4429 | (yyval.a_constr)->containedSubtype = (yyvsp[(1) - (1)].a_value); |
Lev Walkin | f172715 | 2006-09-21 01:50:37 +0000 | [diff] [blame] | 4430 | } |
| 4431 | break; |
| 4432 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4433 | case 231: |
| 4434 | /* Line 1787 of yacc.c */ |
| 4435 | #line 1828 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4436 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4437 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4438 | checkmem((yyval.a_constr)); |
| 4439 | (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype); |
| 4440 | (yyval.a_constr)->range_start = (yyvsp[(1) - (3)].a_value); |
| 4441 | (yyval.a_constr)->range_stop = (yyvsp[(3) - (3)].a_value); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4442 | } |
| 4443 | break; |
| 4444 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4445 | case 232: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4446 | /* Line 1787 of yacc.c */ |
| 4447 | #line 1835 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 4448 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4449 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4450 | checkmem((yyval.a_constr)); |
| 4451 | (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4452 | (yyval.a_constr)->range_start = asn1p_value_fromint(-123); |
| 4453 | (yyval.a_constr)->range_stop = (yyvsp[(3) - (3)].a_value); |
| 4454 | (yyval.a_constr)->range_start->type = ATV_MIN; |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 4455 | } |
| 4456 | break; |
| 4457 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4458 | case 233: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4459 | /* Line 1787 of yacc.c */ |
| 4460 | #line 1843 "asn1p_y.y" |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 4461 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4462 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4463 | checkmem((yyval.a_constr)); |
| 4464 | (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4465 | (yyval.a_constr)->range_start = (yyvsp[(1) - (3)].a_value); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4466 | (yyval.a_constr)->range_stop = asn1p_value_fromint(321); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4467 | (yyval.a_constr)->range_stop->type = ATV_MAX; |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 4468 | } |
| 4469 | break; |
| 4470 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4471 | case 234: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4472 | /* Line 1787 of yacc.c */ |
| 4473 | #line 1851 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4474 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4475 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
| 4476 | checkmem((yyval.a_constr)); |
| 4477 | (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype); |
| 4478 | (yyval.a_constr)->range_start = asn1p_value_fromint(-123); |
| 4479 | (yyval.a_constr)->range_stop = asn1p_value_fromint(321); |
| 4480 | (yyval.a_constr)->range_start->type = ATV_MIN; |
| 4481 | (yyval.a_constr)->range_stop->type = ATV_MAX; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4482 | } |
| 4483 | break; |
| 4484 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4485 | case 235: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4486 | /* Line 1787 of yacc.c */ |
| 4487 | #line 1860 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4488 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4489 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4490 | } |
| 4491 | break; |
| 4492 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4493 | case 236: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4494 | /* Line 1787 of yacc.c */ |
| 4495 | #line 1863 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4496 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4497 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
| 4498 | } |
| 4499 | break; |
| 4500 | |
| 4501 | case 237: |
| 4502 | /* Line 1787 of yacc.c */ |
| 4503 | #line 1866 "asn1p_y.y" |
| 4504 | { asn1p_lexer_hack_push_opaque_state(); } |
| 4505 | break; |
| 4506 | |
| 4507 | case 238: |
| 4508 | /* Line 1787 of yacc.c */ |
| 4509 | #line 1866 "asn1p_y.y" |
| 4510 | { |
| 4511 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
| 4512 | checkmem((yyval.a_constr)); |
| 4513 | (yyval.a_constr)->type = ACT_EL_VALUE; |
| 4514 | (yyval.a_constr)->value = asn1p_value_frombuf((yyvsp[(3) - (3)].tv_opaque).buf, (yyvsp[(3) - (3)].tv_opaque).len, 0); |
| 4515 | (yyval.a_constr)->value->type = ATV_UNPARSED; |
| 4516 | } |
| 4517 | break; |
| 4518 | |
| 4519 | case 239: |
| 4520 | /* Line 1787 of yacc.c */ |
| 4521 | #line 1876 "asn1p_y.y" |
| 4522 | { |
| 4523 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4524 | (yyval.a_constr)->type = ACT_CT_PATTERN; |
| 4525 | (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] | 4526 | } |
| 4527 | break; |
| 4528 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4529 | case 240: |
| 4530 | /* Line 1787 of yacc.c */ |
| 4531 | #line 1881 "asn1p_y.y" |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4532 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4533 | asn1p_ref_t *ref; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4534 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4535 | (yyval.a_constr)->type = ACT_CT_PATTERN; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4536 | ref = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4537 | asn1p_ref_add_component(ref, (yyvsp[(2) - (2)].tv_str), RLT_lowercase); |
| 4538 | (yyval.a_constr)->value = asn1p_value_fromref(ref, 0); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4539 | free((yyvsp[(2) - (2)].tv_str)); |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4540 | } |
| 4541 | break; |
| 4542 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4543 | case 241: |
| 4544 | /* Line 1787 of yacc.c */ |
| 4545 | #line 1893 "asn1p_y.y" |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4546 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4547 | (yyval.a_ctype) = ACT_CT_SIZE; |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4548 | } |
| 4549 | break; |
| 4550 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4551 | case 242: |
| 4552 | /* Line 1787 of yacc.c */ |
| 4553 | #line 1896 "asn1p_y.y" |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4554 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4555 | (yyval.a_ctype) = ACT_CT_FROM; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4556 | } |
| 4557 | break; |
| 4558 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4559 | case 243: |
| 4560 | /* Line 1787 of yacc.c */ |
| 4561 | #line 1902 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4562 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4563 | (yyval.a_value) = asn1p_value_fromint(0); |
| 4564 | checkmem((yyval.a_value)); |
| 4565 | (yyval.a_value)->type = ATV_FALSE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4566 | } |
| 4567 | break; |
| 4568 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4569 | case 244: |
| 4570 | /* Line 1787 of yacc.c */ |
| 4571 | #line 1907 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4572 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4573 | (yyval.a_value) = asn1p_value_fromint(1); |
| 4574 | checkmem((yyval.a_value)); |
| 4575 | (yyval.a_value)->type = ATV_TRUE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4576 | } |
| 4577 | break; |
| 4578 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4579 | case 248: |
| 4580 | /* Line 1787 of yacc.c */ |
| 4581 | #line 1915 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4582 | { |
Lev Walkin | c8092cb | 2005-02-18 16:34:21 +0000 | [diff] [blame] | 4583 | asn1p_ref_t *ref; |
| 4584 | int ret; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4585 | ref = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | c8092cb | 2005-02-18 16:34:21 +0000 | [diff] [blame] | 4586 | checkmem(ref); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4587 | ret = asn1p_ref_add_component(ref, (yyvsp[(1) - (1)].tv_str), RLT_lowercase); |
Lev Walkin | c8092cb | 2005-02-18 16:34:21 +0000 | [diff] [blame] | 4588 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4589 | (yyval.a_value) = asn1p_value_fromref(ref, 0); |
| 4590 | checkmem((yyval.a_value)); |
| 4591 | free((yyvsp[(1) - (1)].tv_str)); |
| 4592 | } |
| 4593 | break; |
| 4594 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4595 | case 249: |
| 4596 | /* Line 1787 of yacc.c */ |
| 4597 | #line 1929 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4598 | { |
| 4599 | (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'B'); |
| 4600 | checkmem((yyval.a_value)); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4601 | free((yyvsp[(1) - (1)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4602 | } |
| 4603 | break; |
| 4604 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4605 | case 250: |
| 4606 | /* Line 1787 of yacc.c */ |
| 4607 | #line 1934 "asn1p_y.y" |
| 4608 | { |
| 4609 | (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'H'); |
| 4610 | checkmem((yyval.a_value)); |
| 4611 | free((yyvsp[(1) - (1)].tv_str)); |
| 4612 | } |
| 4613 | break; |
| 4614 | |
| 4615 | case 251: |
| 4616 | /* Line 1787 of yacc.c */ |
| 4617 | #line 1942 "asn1p_y.y" |
| 4618 | { |
| 4619 | (yyval.a_value) = asn1p_value_fromref((yyvsp[(1) - (1)].a_ref), 0); |
| 4620 | checkmem((yyval.a_value)); |
| 4621 | } |
| 4622 | break; |
| 4623 | |
| 4624 | case 252: |
| 4625 | /* Line 1787 of yacc.c */ |
| 4626 | #line 1962 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4627 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4628 | 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] | 4629 | } |
| 4630 | break; |
| 4631 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4632 | case 253: |
| 4633 | /* Line 1787 of yacc.c */ |
| 4634 | #line 1965 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4635 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4636 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_WCOMPS, (yyvsp[(4) - (5)].a_constr), 0); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4637 | } |
| 4638 | break; |
| 4639 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4640 | case 254: |
| 4641 | /* Line 1787 of yacc.c */ |
| 4642 | #line 1971 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4643 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4644 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4645 | } |
| 4646 | break; |
| 4647 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4648 | case 255: |
| 4649 | /* Line 1787 of yacc.c */ |
| 4650 | #line 1974 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4651 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4652 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_WCOMPS, (yyvsp[(1) - (3)].a_constr), (yyvsp[(3) - (3)].a_constr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4653 | } |
| 4654 | break; |
| 4655 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4656 | case 256: |
| 4657 | /* Line 1787 of yacc.c */ |
| 4658 | #line 1980 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4659 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4660 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4661 | checkmem((yyval.a_constr)); |
| 4662 | (yyval.a_constr)->type = ACT_EL_EXT; |
| 4663 | (yyval.a_constr)->value = asn1p_value_frombuf("...", 3, 1); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4664 | } |
| 4665 | break; |
| 4666 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4667 | case 257: |
| 4668 | /* Line 1787 of yacc.c */ |
| 4669 | #line 1986 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4670 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4671 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4672 | checkmem((yyval.a_constr)); |
| 4673 | (yyval.a_constr)->type = ACT_EL_VALUE; |
| 4674 | (yyval.a_constr)->value = asn1p_value_frombuf((yyvsp[(1) - (3)].tv_str), strlen((yyvsp[(1) - (3)].tv_str)), 0); |
| 4675 | (yyval.a_constr)->presence = (yyvsp[(3) - (3)].a_pres); |
| 4676 | if((yyvsp[(2) - (3)].a_constr)) asn1p_constraint_insert((yyval.a_constr), (yyvsp[(2) - (3)].a_constr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4677 | } |
| 4678 | break; |
| 4679 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4680 | case 258: |
| 4681 | /* Line 1787 of yacc.c */ |
| 4682 | #line 2000 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4683 | { (yyval.a_pres) = ACPRES_DEFAULT; } |
| 4684 | break; |
| 4685 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4686 | case 259: |
| 4687 | /* Line 1787 of yacc.c */ |
| 4688 | #line 2001 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4689 | { (yyval.a_pres) = (yyvsp[(1) - (1)].a_pres); } |
| 4690 | break; |
| 4691 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4692 | case 260: |
| 4693 | /* Line 1787 of yacc.c */ |
| 4694 | #line 2005 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4695 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4696 | (yyval.a_pres) = ACPRES_PRESENT; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4697 | } |
| 4698 | break; |
| 4699 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4700 | case 261: |
| 4701 | /* Line 1787 of yacc.c */ |
| 4702 | #line 2008 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4703 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4704 | (yyval.a_pres) = ACPRES_ABSENT; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4705 | } |
| 4706 | break; |
| 4707 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4708 | case 262: |
| 4709 | /* Line 1787 of yacc.c */ |
| 4710 | #line 2011 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4711 | { |
| 4712 | (yyval.a_pres) = ACPRES_OPTIONAL; |
| 4713 | } |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 4714 | break; |
| 4715 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4716 | case 266: |
| 4717 | /* Line 1787 of yacc.c */ |
| 4718 | #line 2026 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4719 | { asn1p_lexer_hack_push_opaque_state(); } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4720 | break; |
| 4721 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4722 | case 267: |
| 4723 | /* Line 1787 of yacc.c */ |
| 4724 | #line 2026 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 4725 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4726 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4727 | checkmem((yyval.a_constr)); |
| 4728 | (yyval.a_constr)->type = ACT_CT_CTDBY; |
| 4729 | (yyval.a_constr)->value = asn1p_value_frombuf((yyvsp[(5) - (5)].tv_opaque).buf, (yyvsp[(5) - (5)].tv_opaque).len, 0); |
| 4730 | checkmem((yyval.a_constr)->value); |
| 4731 | (yyval.a_constr)->value->type = ATV_UNPARSED; |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 4732 | } |
| 4733 | break; |
| 4734 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4735 | case 268: |
| 4736 | /* Line 1787 of yacc.c */ |
| 4737 | #line 2037 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4738 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4739 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4740 | (yyval.a_constr)->type = ACT_CT_CTNG; |
| 4741 | (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] | 4742 | asn1p_expr_free((yyvsp[(2) - (2)].a_expr)); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4743 | } |
| 4744 | break; |
| 4745 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4746 | case 269: |
| 4747 | /* Line 1787 of yacc.c */ |
| 4748 | #line 2046 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4749 | { (yyval.a_ctype) = ACT_EL_RANGE; } |
| 4750 | break; |
| 4751 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4752 | case 270: |
| 4753 | /* Line 1787 of yacc.c */ |
| 4754 | #line 2047 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4755 | { (yyval.a_ctype) = ACT_EL_RLRANGE; } |
| 4756 | break; |
| 4757 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4758 | case 271: |
| 4759 | /* Line 1787 of yacc.c */ |
| 4760 | #line 2048 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4761 | { (yyval.a_ctype) = ACT_EL_LLRANGE; } |
| 4762 | break; |
| 4763 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4764 | case 272: |
| 4765 | /* Line 1787 of yacc.c */ |
| 4766 | #line 2049 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4767 | { (yyval.a_ctype) = ACT_EL_ULRANGE; } |
| 4768 | break; |
| 4769 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4770 | case 273: |
| 4771 | /* Line 1787 of yacc.c */ |
| 4772 | #line 2052 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4773 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4774 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4775 | } |
| 4776 | break; |
| 4777 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4778 | case 274: |
| 4779 | /* Line 1787 of yacc.c */ |
| 4780 | #line 2055 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4781 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4782 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4783 | } |
| 4784 | break; |
| 4785 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4786 | case 275: |
| 4787 | /* Line 1787 of yacc.c */ |
| 4788 | #line 2064 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4789 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4790 | asn1p_ref_t *ref = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4791 | asn1p_constraint_t *ct; |
| 4792 | int ret; |
| 4793 | ret = asn1p_ref_add_component(ref, (yyvsp[(2) - (3)].tv_str), 0); |
| 4794 | checkmem(ret == 0); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4795 | ct = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4796 | checkmem((yyval.a_constr)); |
| 4797 | ct->type = ACT_EL_VALUE; |
| 4798 | ct->value = asn1p_value_fromref(ref, 0); |
| 4799 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CRC, ct, 0); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4800 | free((yyvsp[(2) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4801 | } |
| 4802 | break; |
| 4803 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4804 | case 276: |
| 4805 | /* Line 1787 of yacc.c */ |
| 4806 | #line 2080 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4807 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4808 | 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] | 4809 | } |
| 4810 | break; |
| 4811 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4812 | case 277: |
| 4813 | /* Line 1787 of yacc.c */ |
| 4814 | #line 2086 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4815 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4816 | (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4817 | checkmem((yyval.a_constr)); |
| 4818 | (yyval.a_constr)->type = ACT_EL_VALUE; |
| 4819 | (yyval.a_constr)->value = asn1p_value_fromref((yyvsp[(1) - (1)].a_ref), 0); |
| 4820 | } |
| 4821 | break; |
| 4822 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4823 | case 278: |
| 4824 | /* Line 1787 of yacc.c */ |
| 4825 | #line 2092 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4826 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4827 | asn1p_constraint_t *ct; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4828 | ct = asn1p_constraint_new(yylineno, currentModule); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4829 | checkmem(ct); |
| 4830 | ct->type = ACT_EL_VALUE; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4831 | ct->value = asn1p_value_fromref((yyvsp[(3) - (3)].a_ref), 0); |
| 4832 | 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] | 4833 | } |
| 4834 | break; |
| 4835 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4836 | case 279: |
| 4837 | /* Line 1787 of yacc.c */ |
| 4838 | #line 2106 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4839 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4840 | char *p = malloc(strlen((yyvsp[(2) - (2)].tv_str)) + 2); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4841 | int ret; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4842 | *p = '@'; |
| 4843 | strcpy(p + 1, (yyvsp[(2) - (2)].tv_str)); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4844 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4845 | ret = asn1p_ref_add_component((yyval.a_ref), p, 0); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4846 | checkmem(ret == 0); |
| 4847 | free(p); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4848 | free((yyvsp[(2) - (2)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4849 | } |
| 4850 | break; |
| 4851 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4852 | case 280: |
| 4853 | /* Line 1787 of yacc.c */ |
| 4854 | #line 2117 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4855 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4856 | char *p = malloc(strlen((yyvsp[(3) - (3)].tv_str)) + 3); |
| 4857 | int ret; |
| 4858 | p[0] = '@'; |
| 4859 | p[1] = '.'; |
| 4860 | strcpy(p + 2, (yyvsp[(3) - (3)].tv_str)); |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4861 | (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4862 | ret = asn1p_ref_add_component((yyval.a_ref), p, 0); |
| 4863 | checkmem(ret == 0); |
| 4864 | free(p); |
| 4865 | free((yyvsp[(3) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4866 | } |
| 4867 | break; |
| 4868 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4869 | case 281: |
| 4870 | /* Line 1787 of yacc.c */ |
| 4871 | #line 2133 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4872 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4873 | (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4874 | } |
| 4875 | break; |
| 4876 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4877 | case 282: |
| 4878 | /* Line 1787 of yacc.c */ |
| 4879 | #line 2136 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4880 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4881 | int l1 = strlen((yyvsp[(1) - (3)].tv_str)); |
| 4882 | int l3 = strlen((yyvsp[(3) - (3)].tv_str)); |
| 4883 | (yyval.tv_str) = malloc(l1 + 1 + l3 + 1); |
| 4884 | memcpy((yyval.tv_str), (yyvsp[(1) - (3)].tv_str), l1); |
| 4885 | (yyval.tv_str)[l1] = '.'; |
| 4886 | memcpy((yyval.tv_str) + l1 + 1, (yyvsp[(3) - (3)].tv_str), l3); |
| 4887 | (yyval.tv_str)[l1 + 1 + l3] = '\0'; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4888 | free((yyvsp[(1) - (3)].tv_str)); |
| 4889 | free((yyvsp[(3) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4890 | } |
| 4891 | break; |
| 4892 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4893 | case 283: |
| 4894 | /* Line 1787 of yacc.c */ |
| 4895 | #line 2156 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4896 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4897 | (yyval.a_marker).flags = EM_NOMARK; |
| 4898 | (yyval.a_marker).default_value = 0; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4899 | } |
| 4900 | break; |
| 4901 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4902 | case 284: |
| 4903 | /* Line 1787 of yacc.c */ |
| 4904 | #line 2160 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4905 | { (yyval.a_marker) = (yyvsp[(1) - (1)].a_marker); } |
| 4906 | break; |
| 4907 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4908 | case 285: |
| 4909 | /* Line 1787 of yacc.c */ |
| 4910 | #line 2164 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4911 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4912 | (yyval.a_marker).flags = EM_OPTIONAL | EM_INDIRECT; |
| 4913 | (yyval.a_marker).default_value = 0; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4914 | } |
| 4915 | break; |
| 4916 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4917 | case 286: |
| 4918 | /* Line 1787 of yacc.c */ |
| 4919 | #line 2168 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4920 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4921 | (yyval.a_marker).flags = EM_DEFAULT; |
| 4922 | (yyval.a_marker).default_value = (yyvsp[(2) - (2)].a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4923 | } |
| 4924 | break; |
| 4925 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4926 | case 287: |
| 4927 | /* Line 1787 of yacc.c */ |
| 4928 | #line 2191 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4929 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4930 | (yyval.a_expr) = NEW_EXPR(); |
| 4931 | checkmem((yyval.a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4932 | } |
| 4933 | break; |
| 4934 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4935 | case 288: |
| 4936 | /* Line 1787 of yacc.c */ |
| 4937 | #line 2195 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4938 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4939 | (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4940 | } |
| 4941 | break; |
| 4942 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4943 | case 289: |
| 4944 | /* Line 1787 of yacc.c */ |
| 4945 | #line 2201 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4946 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4947 | (yyval.a_expr) = NEW_EXPR(); |
| 4948 | checkmem((yyval.a_expr)); |
| 4949 | asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4950 | } |
| 4951 | break; |
| 4952 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4953 | case 290: |
| 4954 | /* Line 1787 of yacc.c */ |
| 4955 | #line 2206 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4956 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4957 | (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); |
| 4958 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4959 | } |
| 4960 | break; |
| 4961 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4962 | case 291: |
| 4963 | /* Line 1787 of yacc.c */ |
| 4964 | #line 2213 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4965 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4966 | (yyval.a_expr) = NEW_EXPR(); |
| 4967 | checkmem((yyval.a_expr)); |
| 4968 | (yyval.a_expr)->expr_type = A1TC_UNIVERVAL; |
| 4969 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 4970 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4971 | } |
| 4972 | break; |
| 4973 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4974 | case 292: |
| 4975 | /* Line 1787 of yacc.c */ |
| 4976 | #line 2220 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4977 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4978 | (yyval.a_expr) = NEW_EXPR(); |
| 4979 | checkmem((yyval.a_expr)); |
| 4980 | (yyval.a_expr)->expr_type = A1TC_UNIVERVAL; |
| 4981 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 4982 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str); |
| 4983 | (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4984 | } |
| 4985 | break; |
| 4986 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 4987 | case 293: |
| 4988 | /* Line 1787 of yacc.c */ |
| 4989 | #line 2228 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4990 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4991 | (yyval.a_expr) = NEW_EXPR(); |
| 4992 | checkmem((yyval.a_expr)); |
| 4993 | (yyval.a_expr)->expr_type = A1TC_UNIVERVAL; |
| 4994 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 4995 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str); |
| 4996 | (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4997 | } |
| 4998 | break; |
| 4999 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5000 | case 294: |
| 5001 | /* Line 1787 of yacc.c */ |
| 5002 | #line 2236 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5003 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5004 | (yyval.a_expr) = NEW_EXPR(); |
| 5005 | checkmem((yyval.a_expr)); |
| 5006 | (yyval.a_expr)->expr_type = A1TC_UNIVERVAL; |
| 5007 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 5008 | (yyval.a_expr)->value = (yyvsp[(1) - (1)].a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5009 | } |
| 5010 | break; |
| 5011 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5012 | case 295: |
| 5013 | /* Line 1787 of yacc.c */ |
| 5014 | #line 2243 "asn1p_y.y" |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 5015 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5016 | (yyval.a_expr) = NEW_EXPR(); |
| 5017 | checkmem((yyval.a_expr)); |
| 5018 | (yyval.a_expr)->Identifier = strdup("..."); |
| 5019 | checkmem((yyval.a_expr)->Identifier); |
| 5020 | (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE; |
| 5021 | (yyval.a_expr)->meta_type = AMT_VALUE; |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 5022 | } |
| 5023 | break; |
| 5024 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 5025 | case 296: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5026 | /* Line 1787 of yacc.c */ |
| 5027 | #line 2254 "asn1p_y.y" |
| 5028 | { |
| 5029 | (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int)); |
| 5030 | checkmem((yyval.a_value)); |
| 5031 | } |
| 5032 | break; |
| 5033 | |
| 5034 | case 297: |
| 5035 | /* Line 1787 of yacc.c */ |
| 5036 | #line 2258 "asn1p_y.y" |
| 5037 | { |
| 5038 | (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int)); |
| 5039 | checkmem((yyval.a_value)); |
| 5040 | } |
| 5041 | break; |
| 5042 | |
| 5043 | case 299: |
| 5044 | /* Line 1787 of yacc.c */ |
| 5045 | #line 2266 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5046 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5047 | (yyval.a_value) = asn1p_value_fromdouble((yyvsp[(1) - (1)].a_dbl)); |
| 5048 | checkmem((yyval.a_value)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5049 | } |
| 5050 | break; |
| 5051 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5052 | case 300: |
| 5053 | /* Line 1787 of yacc.c */ |
| 5054 | #line 2297 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5055 | { memset(&(yyval.a_tag), 0, sizeof((yyval.a_tag))); } |
| 5056 | break; |
| 5057 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5058 | case 301: |
| 5059 | /* Line 1787 of yacc.c */ |
| 5060 | #line 2298 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5061 | { (yyval.a_tag) = (yyvsp[(1) - (1)].a_tag); } |
| 5062 | break; |
| 5063 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5064 | case 302: |
| 5065 | /* Line 1787 of yacc.c */ |
| 5066 | #line 2302 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5067 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5068 | (yyval.a_tag) = (yyvsp[(1) - (2)].a_tag); |
| 5069 | (yyval.a_tag).tag_mode = (yyvsp[(2) - (2)].a_tag).tag_mode; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5070 | } |
| 5071 | break; |
| 5072 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5073 | case 303: |
| 5074 | /* Line 1787 of yacc.c */ |
| 5075 | #line 2309 "asn1p_y.y" |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 5076 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5077 | (yyval.a_tag) = (yyvsp[(2) - (4)].a_tag); |
| 5078 | (yyval.a_tag).tag_value = (yyvsp[(3) - (4)].a_int); |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 5079 | } |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 5080 | break; |
| 5081 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5082 | case 304: |
| 5083 | /* Line 1787 of yacc.c */ |
| 5084 | #line 2315 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5085 | { (yyval.a_tag).tag_class = TC_CONTEXT_SPECIFIC; } |
| 5086 | break; |
| 5087 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5088 | case 305: |
| 5089 | /* Line 1787 of yacc.c */ |
| 5090 | #line 2316 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5091 | { (yyval.a_tag).tag_class = TC_UNIVERSAL; } |
| 5092 | break; |
| 5093 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5094 | case 306: |
| 5095 | /* Line 1787 of yacc.c */ |
| 5096 | #line 2317 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5097 | { (yyval.a_tag).tag_class = TC_APPLICATION; } |
| 5098 | break; |
| 5099 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5100 | case 307: |
| 5101 | /* Line 1787 of yacc.c */ |
| 5102 | #line 2318 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5103 | { (yyval.a_tag).tag_class = TC_PRIVATE; } |
| 5104 | break; |
| 5105 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5106 | case 308: |
| 5107 | /* Line 1787 of yacc.c */ |
| 5108 | #line 2322 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5109 | { (yyval.a_tag).tag_mode = TM_DEFAULT; } |
| 5110 | break; |
| 5111 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5112 | case 309: |
| 5113 | /* Line 1787 of yacc.c */ |
| 5114 | #line 2323 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5115 | { (yyval.a_tag).tag_mode = TM_IMPLICIT; } |
| 5116 | break; |
| 5117 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5118 | case 310: |
| 5119 | /* Line 1787 of yacc.c */ |
| 5120 | #line 2324 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5121 | { (yyval.a_tag).tag_mode = TM_EXPLICIT; } |
| 5122 | break; |
| 5123 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 5124 | case 311: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5125 | /* Line 1787 of yacc.c */ |
| 5126 | #line 2328 "asn1p_y.y" |
| 5127 | { |
| 5128 | checkmem((yyvsp[(1) - (1)].tv_str)); |
| 5129 | (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); |
| 5130 | } |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 5131 | break; |
| 5132 | |
| 5133 | case 312: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5134 | /* Line 1787 of yacc.c */ |
| 5135 | #line 2332 "asn1p_y.y" |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 5136 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5137 | checkmem((yyvsp[(1) - (1)].tv_str)); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5138 | (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); |
| 5139 | } |
| 5140 | break; |
| 5141 | |
| 5142 | case 313: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5143 | /* Line 1787 of yacc.c */ |
| 5144 | #line 2340 "asn1p_y.y" |
| 5145 | { |
| 5146 | checkmem((yyvsp[(1) - (1)].tv_str)); |
| 5147 | (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); |
| 5148 | } |
| 5149 | break; |
| 5150 | |
| 5151 | case 314: |
| 5152 | /* Line 1787 of yacc.c */ |
| 5153 | #line 2347 "asn1p_y.y" |
| 5154 | { (yyval.tv_str) = 0; } |
| 5155 | break; |
| 5156 | |
| 5157 | case 315: |
| 5158 | /* Line 1787 of yacc.c */ |
| 5159 | #line 2348 "asn1p_y.y" |
| 5160 | { |
| 5161 | (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); |
| 5162 | } |
| 5163 | break; |
| 5164 | |
| 5165 | case 316: |
| 5166 | /* Line 1787 of yacc.c */ |
| 5167 | #line 2354 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5168 | { |
| 5169 | checkmem((yyvsp[(1) - (1)].tv_str)); |
| 5170 | (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 5171 | } |
| 5172 | break; |
| 5173 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5174 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5175 | /* Line 1787 of yacc.c */ |
| 5176 | #line 5169 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5177 | default: break; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5178 | } |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5179 | /* User semantic actions sometimes alter yychar, and that requires |
| 5180 | that yytoken be updated with the new translation. We take the |
| 5181 | approach of translating immediately before every use of yytoken. |
| 5182 | One alternative is translating here after every semantic action, |
| 5183 | but that translation would be missed if the semantic action invokes |
| 5184 | YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or |
| 5185 | if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an |
| 5186 | incorrect destructor might then be invoked immediately. In the |
| 5187 | case of YYERROR or YYBACKUP, subsequent parser actions might lead |
| 5188 | to an incorrect destructor call or verbose syntax error message |
| 5189 | before the lookahead is translated. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5190 | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5191 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5192 | YYPOPSTACK (yylen); |
| 5193 | yylen = 0; |
| 5194 | YY_STACK_PRINT (yyss, yyssp); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5195 | |
| 5196 | *++yyvsp = yyval; |
| 5197 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5198 | /* Now `shift' the result of the reduction. Determine what state |
| 5199 | that goes to, based on the state we popped back to and the rule |
| 5200 | number reduced by. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5201 | |
| 5202 | yyn = yyr1[yyn]; |
| 5203 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5204 | yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; |
| 5205 | if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5206 | yystate = yytable[yystate]; |
| 5207 | else |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5208 | yystate = yydefgoto[yyn - YYNTOKENS]; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5209 | |
| 5210 | goto yynewstate; |
| 5211 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5212 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5213 | /*------------------------------------. |
| 5214 | | yyerrlab -- here on detecting error | |
| 5215 | `------------------------------------*/ |
| 5216 | yyerrlab: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5217 | /* Make sure we have latest lookahead translation. See comments at |
| 5218 | user semantic actions for why this is necessary. */ |
| 5219 | yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); |
| 5220 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5221 | /* If not already recovering from an error, report this error. */ |
| 5222 | if (!yyerrstatus) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5223 | { |
| 5224 | ++yynerrs; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5225 | #if ! YYERROR_VERBOSE |
| 5226 | yyerror (YY_("syntax error")); |
| 5227 | #else |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5228 | # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ |
| 5229 | yyssp, yytoken) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5230 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5231 | char const *yymsgp = YY_("syntax error"); |
| 5232 | int yysyntax_error_status; |
| 5233 | yysyntax_error_status = YYSYNTAX_ERROR; |
| 5234 | if (yysyntax_error_status == 0) |
| 5235 | yymsgp = yymsg; |
| 5236 | else if (yysyntax_error_status == 1) |
| 5237 | { |
| 5238 | if (yymsg != yymsgbuf) |
| 5239 | YYSTACK_FREE (yymsg); |
| 5240 | yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); |
| 5241 | if (!yymsg) |
| 5242 | { |
| 5243 | yymsg = yymsgbuf; |
| 5244 | yymsg_alloc = sizeof yymsgbuf; |
| 5245 | yysyntax_error_status = 2; |
| 5246 | } |
| 5247 | else |
| 5248 | { |
| 5249 | yysyntax_error_status = YYSYNTAX_ERROR; |
| 5250 | yymsgp = yymsg; |
| 5251 | } |
| 5252 | } |
| 5253 | yyerror (yymsgp); |
| 5254 | if (yysyntax_error_status == 2) |
| 5255 | goto yyexhaustedlab; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5256 | } |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5257 | # undef YYSYNTAX_ERROR |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5258 | #endif |
| 5259 | } |
| 5260 | |
| 5261 | |
| 5262 | |
| 5263 | if (yyerrstatus == 3) |
| 5264 | { |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5265 | /* If just tried and failed to reuse lookahead token after an |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5266 | error, discard it. */ |
| 5267 | |
| 5268 | if (yychar <= YYEOF) |
| 5269 | { |
| 5270 | /* Return failure if at end of input. */ |
| 5271 | if (yychar == YYEOF) |
| 5272 | YYABORT; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5273 | } |
| 5274 | else |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5275 | { |
| 5276 | yydestruct ("Error: discarding", |
| 5277 | yytoken, &yylval); |
| 5278 | yychar = YYEMPTY; |
| 5279 | } |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5280 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5281 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5282 | /* Else will try to reuse lookahead token after shifting the error |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5283 | token. */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 5284 | goto yyerrlab1; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5285 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5286 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5287 | /*---------------------------------------------------. |
| 5288 | | yyerrorlab -- error raised explicitly by YYERROR. | |
| 5289 | `---------------------------------------------------*/ |
| 5290 | yyerrorlab: |
| 5291 | |
| 5292 | /* Pacify compilers like GCC when the user code never invokes |
| 5293 | YYERROR and the label yyerrorlab therefore never appears in user |
| 5294 | code. */ |
| 5295 | if (/*CONSTCOND*/ 0) |
| 5296 | goto yyerrorlab; |
| 5297 | |
| 5298 | /* Do not reclaim the symbols of the rule which action triggered |
| 5299 | this YYERROR. */ |
| 5300 | YYPOPSTACK (yylen); |
| 5301 | yylen = 0; |
| 5302 | YY_STACK_PRINT (yyss, yyssp); |
| 5303 | yystate = *yyssp; |
| 5304 | goto yyerrlab1; |
| 5305 | |
| 5306 | |
| 5307 | /*-------------------------------------------------------------. |
| 5308 | | yyerrlab1 -- common code for both syntax error and YYERROR. | |
| 5309 | `-------------------------------------------------------------*/ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5310 | yyerrlab1: |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5311 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 5312 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5313 | for (;;) |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 5314 | { |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5315 | yyn = yypact[yystate]; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5316 | if (!yypact_value_is_default (yyn)) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5317 | { |
| 5318 | yyn += YYTERROR; |
| 5319 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
| 5320 | { |
| 5321 | yyn = yytable[yyn]; |
| 5322 | if (0 < yyn) |
| 5323 | break; |
| 5324 | } |
| 5325 | } |
| 5326 | |
| 5327 | /* Pop the current state because it cannot handle the error token. */ |
| 5328 | if (yyssp == yyss) |
| 5329 | YYABORT; |
| 5330 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5331 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5332 | yydestruct ("Error: popping", |
| 5333 | yystos[yystate], yyvsp); |
| 5334 | YYPOPSTACK (1); |
| 5335 | yystate = *yyssp; |
| 5336 | YY_STACK_PRINT (yyss, yyssp); |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 5337 | } |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 5338 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5339 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5340 | *++yyvsp = yylval; |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5341 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5342 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5343 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5344 | /* Shift the error token. */ |
| 5345 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
| 5346 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5347 | yystate = yyn; |
| 5348 | goto yynewstate; |
| 5349 | |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 5350 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5351 | /*-------------------------------------. |
| 5352 | | yyacceptlab -- YYACCEPT comes here. | |
| 5353 | `-------------------------------------*/ |
| 5354 | yyacceptlab: |
| 5355 | yyresult = 0; |
| 5356 | goto yyreturn; |
| 5357 | |
| 5358 | /*-----------------------------------. |
| 5359 | | yyabortlab -- YYABORT comes here. | |
| 5360 | `-----------------------------------*/ |
| 5361 | yyabortlab: |
| 5362 | yyresult = 1; |
| 5363 | goto yyreturn; |
| 5364 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5365 | #if !defined yyoverflow || YYERROR_VERBOSE |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5366 | /*-------------------------------------------------. |
| 5367 | | yyexhaustedlab -- memory exhaustion comes here. | |
| 5368 | `-------------------------------------------------*/ |
| 5369 | yyexhaustedlab: |
| 5370 | yyerror (YY_("memory exhausted")); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5371 | yyresult = 2; |
| 5372 | /* Fall through. */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 5373 | #endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5374 | |
| 5375 | yyreturn: |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5376 | if (yychar != YYEMPTY) |
| 5377 | { |
| 5378 | /* Make sure we have latest lookahead translation. See comments at |
| 5379 | user semantic actions for why this is necessary. */ |
| 5380 | yytoken = YYTRANSLATE (yychar); |
| 5381 | yydestruct ("Cleanup: discarding lookahead", |
| 5382 | yytoken, &yylval); |
| 5383 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5384 | /* Do not reclaim the symbols of the rule which action triggered |
| 5385 | this YYABORT or YYACCEPT. */ |
| 5386 | YYPOPSTACK (yylen); |
| 5387 | YY_STACK_PRINT (yyss, yyssp); |
| 5388 | while (yyssp != yyss) |
| 5389 | { |
| 5390 | yydestruct ("Cleanup: popping", |
| 5391 | yystos[*yyssp], yyvsp); |
| 5392 | YYPOPSTACK (1); |
| 5393 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5394 | #ifndef yyoverflow |
| 5395 | if (yyss != yyssa) |
| 5396 | YYSTACK_FREE (yyss); |
| 5397 | #endif |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5398 | #if YYERROR_VERBOSE |
| 5399 | if (yymsg != yymsgbuf) |
| 5400 | YYSTACK_FREE (yymsg); |
| 5401 | #endif |
| 5402 | /* Make sure YYID is used. */ |
| 5403 | return YYID (yyresult); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5404 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5405 | |
| 5406 | |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 5407 | /* Line 2050 of yacc.c */ |
| 5408 | #line 2360 "asn1p_y.y" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5409 | |
| 5410 | |
| 5411 | |
| 5412 | /* |
| 5413 | * Convert Xstring ('0101'B or '5'H) to the binary vector. |
| 5414 | */ |
| 5415 | static asn1p_value_t * |
| 5416 | _convert_bitstring2binary(char *str, int base) { |
| 5417 | asn1p_value_t *val; |
| 5418 | int slen; |
| 5419 | int memlen; |
| 5420 | int baselen; |
| 5421 | int bits; |
| 5422 | uint8_t *binary_vector; |
| 5423 | uint8_t *bv_ptr; |
| 5424 | uint8_t cur_val; |
| 5425 | |
| 5426 | assert(str); |
| 5427 | assert(str[0] == '\''); |
| 5428 | |
| 5429 | switch(base) { |
| 5430 | case 'B': |
| 5431 | baselen = 1; |
| 5432 | break; |
| 5433 | case 'H': |
| 5434 | baselen = 4; |
| 5435 | break; |
| 5436 | default: |
| 5437 | assert(base == 'B' || base == 'H'); |
| 5438 | errno = EINVAL; |
| 5439 | return NULL; |
| 5440 | } |
| 5441 | |
| 5442 | slen = strlen(str); |
| 5443 | assert(str[slen - 1] == base); |
| 5444 | assert(str[slen - 2] == '\''); |
| 5445 | |
| 5446 | memlen = slen / (8 / baselen); /* Conservative estimate */ |
| 5447 | |
| 5448 | bv_ptr = binary_vector = malloc(memlen + 1); |
| 5449 | if(bv_ptr == NULL) |
| 5450 | /* ENOMEM */ |
| 5451 | return NULL; |
| 5452 | |
| 5453 | cur_val = 0; |
| 5454 | bits = 0; |
| 5455 | while(*(++str) != '\'') { |
| 5456 | switch(baselen) { |
| 5457 | case 1: |
| 5458 | switch(*str) { |
| 5459 | case '1': |
| 5460 | cur_val |= 1 << (7 - (bits % 8)); |
| 5461 | case '0': |
| 5462 | break; |
| 5463 | default: |
| 5464 | assert(!"_y UNREACH1"); |
| 5465 | case ' ': case '\r': case '\n': |
| 5466 | continue; |
| 5467 | } |
| 5468 | break; |
| 5469 | case 4: |
| 5470 | switch(*str) { |
| 5471 | case '0': case '1': case '2': case '3': case '4': |
| 5472 | case '5': case '6': case '7': case '8': case '9': |
| 5473 | cur_val |= (*str - '0') << (4 - (bits % 8)); |
| 5474 | break; |
| 5475 | case 'A': case 'B': case 'C': |
| 5476 | case 'D': case 'E': case 'F': |
| 5477 | cur_val |= ((*str - 'A') + 10) |
| 5478 | << (4 - (bits % 8)); |
| 5479 | break; |
| 5480 | default: |
| 5481 | assert(!"_y UNREACH2"); |
| 5482 | case ' ': case '\r': case '\n': |
| 5483 | continue; |
| 5484 | } |
| 5485 | break; |
| 5486 | } |
| 5487 | |
| 5488 | bits += baselen; |
| 5489 | if((bits % 8) == 0) { |
| 5490 | *bv_ptr++ = cur_val; |
| 5491 | cur_val = 0; |
| 5492 | } |
| 5493 | } |
| 5494 | |
| 5495 | *bv_ptr = cur_val; |
| 5496 | assert((bv_ptr - binary_vector) <= memlen); |
| 5497 | |
| 5498 | val = asn1p_value_frombits(binary_vector, bits, 0); |
| 5499 | if(val == NULL) { |
| 5500 | free(binary_vector); |
| 5501 | } |
| 5502 | |
| 5503 | return val; |
| 5504 | } |
| 5505 | |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 5506 | /* |
| 5507 | * For unnamed types (used in old X.208 compliant modules) |
| 5508 | * generate some sort of interim names, to not to force human being to fix |
| 5509 | * the specification's compliance to modern ASN.1 standards. |
| 5510 | */ |
| 5511 | static void |
| 5512 | _fixup_anonymous_identifier(asn1p_expr_t *expr) { |
| 5513 | char *p; |
| 5514 | assert(expr->Identifier == 0); |
| 5515 | |
| 5516 | /* |
| 5517 | * Try to figure out the type name |
| 5518 | * without going too much into details |
| 5519 | */ |
| 5520 | expr->Identifier = ASN_EXPR_TYPE2STR(expr->expr_type); |
| 5521 | if(expr->reference && expr->reference->comp_count > 0) |
| 5522 | expr->Identifier = expr->reference->components[0].name; |
| 5523 | |
| 5524 | fprintf(stderr, |
| 5525 | "WARNING: Line %d: expected lower-case member identifier, " |
| 5526 | "found an unnamed %s.\n" |
| 5527 | "WARNING: Obsolete X.208 syntax detected, " |
| 5528 | "please give the member a name.\n", |
| 5529 | yylineno, expr->Identifier ? expr->Identifier : "type"); |
| 5530 | |
| 5531 | if(!expr->Identifier) |
| 5532 | expr->Identifier = "unnamed"; |
| 5533 | expr->Identifier = strdup(expr->Identifier); |
| 5534 | assert(expr->Identifier); |
| 5535 | /* Make a lowercase identifier from the type name */ |
| 5536 | for(p = expr->Identifier; *p; p++) { |
| 5537 | switch(*p) { |
| 5538 | case 'A' ... 'Z': *p += 32; break; |
| 5539 | case ' ': *p = '_'; break; |
| 5540 | case '-': *p = '_'; break; |
| 5541 | } |
| 5542 | } |
| 5543 | fprintf(stderr, "NOTE: Assigning temporary identifier \"%s\". " |
| 5544 | "Name clash may occur later.\n", |
| 5545 | expr->Identifier); |
| 5546 | } |
| 5547 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5548 | int |
| 5549 | yyerror(const char *msg) { |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 5550 | extern char *asn1p_text; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5551 | fprintf(stderr, |
| 5552 | "ASN.1 grammar parse error " |
| 5553 | "near line %d (token \"%s\"): %s\n", |
Lev Walkin | ceb20e7 | 2004-09-05 10:40:41 +0000 | [diff] [blame] | 5554 | yylineno, asn1p_text, msg); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5555 | return -1; |
| 5556 | } |
| 5557 | |