Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1 | /* A Bison parser, made by GNU Bison 2.3. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3 | /* Skeleton implementation for Bison's Yacc-like parsers in C |
| 4 | |
| 5 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 |
| 6 | Free Software Foundation, Inc. |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 7 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 8 | This program is free software; you can redistribute it and/or modify |
| 9 | it under the terms of the GNU General Public License as published by |
| 10 | the Free Software Foundation; either version 2, or (at your option) |
| 11 | any later version. |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 12 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 13 | This program is distributed in the hope that it will be useful, |
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | GNU General Public License for more details. |
| 17 | |
| 18 | You should have received a copy of the GNU General Public License |
| 19 | along with this program; if not, write to the Free Software |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 20 | Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 21 | Boston, MA 02110-1301, USA. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 22 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 23 | /* As a special exception, you may create a larger work that contains |
| 24 | part or all of the Bison parser skeleton and distribute that work |
| 25 | under terms of your choice, so long as that work isn't itself a |
| 26 | parser generator using the skeleton or a modified version thereof |
| 27 | as a parser skeleton. Alternatively, if you modify or redistribute |
| 28 | the parser skeleton itself, you may (at your option) remove this |
| 29 | special exception, which will cause the skeleton and the resulting |
| 30 | Bison output files to be licensed under the GNU General Public |
| 31 | License without this special exception. |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 32 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 33 | This special exception was added by the Free Software Foundation in |
| 34 | version 2.2 of Bison. */ |
| 35 | |
| 36 | /* C LALR(1) parser skeleton written by Richard Stallman, by |
| 37 | simplifying the original so-called "semantic" parser. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 38 | |
| 39 | /* All symbols defined below should begin with yy or YY, to avoid |
| 40 | infringing on user name space. This should be done even for local |
| 41 | variables, as they might otherwise be expanded by user macros. |
| 42 | There are some unavoidable exceptions within include files to |
| 43 | define necessary library symbols; they are noted "INFRINGES ON |
| 44 | USER NAME SPACE" below. */ |
| 45 | |
| 46 | /* Identify Bison output. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 47 | #define YYBISON 1 |
| 48 | |
| 49 | /* Bison version. */ |
| 50 | #define YYBISON_VERSION "2.3" |
| 51 | |
| 52 | /* Skeleton name. */ |
| 53 | #define YYSKELETON_NAME "yacc.c" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 54 | |
| 55 | /* Pure parsers. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 56 | #define YYPURE 0 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 57 | |
| 58 | /* Using locations. */ |
| 59 | #define YYLSP_NEEDED 0 |
| 60 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 61 | /* Substitute the variable and function names. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 62 | #define yyparse asn1p_parse |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 63 | #define yylex asn1p_lex |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 64 | #define yyerror asn1p_error |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 65 | #define yylval asn1p_lval |
| 66 | #define yychar asn1p_char |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 67 | #define yydebug asn1p_debug |
| 68 | #define yynerrs asn1p_nerrs |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 69 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 70 | |
| 71 | /* Tokens. */ |
| 72 | #ifndef YYTOKENTYPE |
| 73 | # define YYTOKENTYPE |
| 74 | /* Put the tokens into the symbol table, so that GDB and other debuggers |
| 75 | know about them. */ |
| 76 | enum yytokentype { |
| 77 | TOK_PPEQ = 258, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 78 | TOK_VBracketLeft = 259, |
| 79 | TOK_VBracketRight = 260, |
| 80 | TOK_whitespace = 261, |
| 81 | TOK_opaque = 262, |
| 82 | TOK_bstring = 263, |
| 83 | TOK_cstring = 264, |
| 84 | TOK_hstring = 265, |
| 85 | TOK_identifier = 266, |
| 86 | TOK_number = 267, |
| 87 | TOK_number_negative = 268, |
| 88 | TOK_realnumber = 269, |
| 89 | TOK_tuple = 270, |
| 90 | TOK_quadruple = 271, |
| 91 | TOK_typereference = 272, |
| 92 | TOK_capitalreference = 273, |
| 93 | TOK_typefieldreference = 274, |
| 94 | TOK_valuefieldreference = 275, |
| 95 | TOK_Literal = 276, |
| 96 | TOK_ABSENT = 277, |
| 97 | TOK_ABSTRACT_SYNTAX = 278, |
| 98 | TOK_ALL = 279, |
| 99 | TOK_ANY = 280, |
| 100 | TOK_APPLICATION = 281, |
| 101 | TOK_AUTOMATIC = 282, |
| 102 | TOK_BEGIN = 283, |
| 103 | TOK_BIT = 284, |
| 104 | TOK_BMPString = 285, |
| 105 | TOK_BOOLEAN = 286, |
| 106 | TOK_BY = 287, |
| 107 | TOK_CHARACTER = 288, |
| 108 | TOK_CHOICE = 289, |
| 109 | TOK_CLASS = 290, |
| 110 | TOK_COMPONENT = 291, |
| 111 | TOK_COMPONENTS = 292, |
| 112 | TOK_CONSTRAINED = 293, |
| 113 | TOK_CONTAINING = 294, |
| 114 | TOK_DEFAULT = 295, |
| 115 | TOK_DEFINITIONS = 296, |
| 116 | TOK_DEFINED = 297, |
| 117 | TOK_EMBEDDED = 298, |
| 118 | TOK_ENCODED = 299, |
| 119 | TOK_ENCODING_CONTROL = 300, |
| 120 | TOK_END = 301, |
| 121 | TOK_ENUMERATED = 302, |
| 122 | TOK_EXPLICIT = 303, |
| 123 | TOK_EXPORTS = 304, |
| 124 | TOK_EXTENSIBILITY = 305, |
| 125 | TOK_EXTERNAL = 306, |
| 126 | TOK_FALSE = 307, |
| 127 | TOK_FROM = 308, |
| 128 | TOK_GeneralizedTime = 309, |
| 129 | TOK_GeneralString = 310, |
| 130 | TOK_GraphicString = 311, |
| 131 | TOK_IA5String = 312, |
| 132 | TOK_IDENTIFIER = 313, |
| 133 | TOK_IMPLICIT = 314, |
| 134 | TOK_IMPLIED = 315, |
| 135 | TOK_IMPORTS = 316, |
| 136 | TOK_INCLUDES = 317, |
| 137 | TOK_INSTANCE = 318, |
| 138 | TOK_INSTRUCTIONS = 319, |
| 139 | TOK_INTEGER = 320, |
| 140 | TOK_ISO646String = 321, |
| 141 | TOK_MAX = 322, |
| 142 | TOK_MIN = 323, |
| 143 | TOK_MINUS_INFINITY = 324, |
| 144 | TOK_NULL = 325, |
| 145 | TOK_NumericString = 326, |
| 146 | TOK_OBJECT = 327, |
| 147 | TOK_ObjectDescriptor = 328, |
| 148 | TOK_OCTET = 329, |
| 149 | TOK_OF = 330, |
| 150 | TOK_OPTIONAL = 331, |
| 151 | TOK_PATTERN = 332, |
| 152 | TOK_PDV = 333, |
| 153 | TOK_PLUS_INFINITY = 334, |
| 154 | TOK_PRESENT = 335, |
| 155 | TOK_PrintableString = 336, |
| 156 | TOK_PRIVATE = 337, |
| 157 | TOK_REAL = 338, |
| 158 | TOK_RELATIVE_OID = 339, |
| 159 | TOK_SEQUENCE = 340, |
| 160 | TOK_SET = 341, |
| 161 | TOK_SIZE = 342, |
| 162 | TOK_STRING = 343, |
| 163 | TOK_SYNTAX = 344, |
| 164 | TOK_T61String = 345, |
| 165 | TOK_TAGS = 346, |
| 166 | TOK_TeletexString = 347, |
| 167 | TOK_TRUE = 348, |
| 168 | TOK_TYPE_IDENTIFIER = 349, |
| 169 | TOK_UNIQUE = 350, |
| 170 | TOK_UNIVERSAL = 351, |
| 171 | TOK_UniversalString = 352, |
| 172 | TOK_UTCTime = 353, |
| 173 | TOK_UTF8String = 354, |
| 174 | TOK_VideotexString = 355, |
| 175 | TOK_VisibleString = 356, |
| 176 | TOK_WITH = 357, |
| 177 | TOK_EXCEPT = 358, |
| 178 | TOK_INTERSECTION = 359, |
| 179 | TOK_UNION = 360, |
| 180 | TOK_TwoDots = 361, |
| 181 | TOK_ThreeDots = 362 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 182 | }; |
| 183 | #endif |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 184 | /* Tokens. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 185 | #define TOK_PPEQ 258 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 186 | #define TOK_VBracketLeft 259 |
| 187 | #define TOK_VBracketRight 260 |
| 188 | #define TOK_whitespace 261 |
| 189 | #define TOK_opaque 262 |
| 190 | #define TOK_bstring 263 |
| 191 | #define TOK_cstring 264 |
| 192 | #define TOK_hstring 265 |
| 193 | #define TOK_identifier 266 |
| 194 | #define TOK_number 267 |
| 195 | #define TOK_number_negative 268 |
| 196 | #define TOK_realnumber 269 |
| 197 | #define TOK_tuple 270 |
| 198 | #define TOK_quadruple 271 |
| 199 | #define TOK_typereference 272 |
| 200 | #define TOK_capitalreference 273 |
| 201 | #define TOK_typefieldreference 274 |
| 202 | #define TOK_valuefieldreference 275 |
| 203 | #define TOK_Literal 276 |
| 204 | #define TOK_ABSENT 277 |
| 205 | #define TOK_ABSTRACT_SYNTAX 278 |
| 206 | #define TOK_ALL 279 |
| 207 | #define TOK_ANY 280 |
| 208 | #define TOK_APPLICATION 281 |
| 209 | #define TOK_AUTOMATIC 282 |
| 210 | #define TOK_BEGIN 283 |
| 211 | #define TOK_BIT 284 |
| 212 | #define TOK_BMPString 285 |
| 213 | #define TOK_BOOLEAN 286 |
| 214 | #define TOK_BY 287 |
| 215 | #define TOK_CHARACTER 288 |
| 216 | #define TOK_CHOICE 289 |
| 217 | #define TOK_CLASS 290 |
| 218 | #define TOK_COMPONENT 291 |
| 219 | #define TOK_COMPONENTS 292 |
| 220 | #define TOK_CONSTRAINED 293 |
| 221 | #define TOK_CONTAINING 294 |
| 222 | #define TOK_DEFAULT 295 |
| 223 | #define TOK_DEFINITIONS 296 |
| 224 | #define TOK_DEFINED 297 |
| 225 | #define TOK_EMBEDDED 298 |
| 226 | #define TOK_ENCODED 299 |
| 227 | #define TOK_ENCODING_CONTROL 300 |
| 228 | #define TOK_END 301 |
| 229 | #define TOK_ENUMERATED 302 |
| 230 | #define TOK_EXPLICIT 303 |
| 231 | #define TOK_EXPORTS 304 |
| 232 | #define TOK_EXTENSIBILITY 305 |
| 233 | #define TOK_EXTERNAL 306 |
| 234 | #define TOK_FALSE 307 |
| 235 | #define TOK_FROM 308 |
| 236 | #define TOK_GeneralizedTime 309 |
| 237 | #define TOK_GeneralString 310 |
| 238 | #define TOK_GraphicString 311 |
| 239 | #define TOK_IA5String 312 |
| 240 | #define TOK_IDENTIFIER 313 |
| 241 | #define TOK_IMPLICIT 314 |
| 242 | #define TOK_IMPLIED 315 |
| 243 | #define TOK_IMPORTS 316 |
| 244 | #define TOK_INCLUDES 317 |
| 245 | #define TOK_INSTANCE 318 |
| 246 | #define TOK_INSTRUCTIONS 319 |
| 247 | #define TOK_INTEGER 320 |
| 248 | #define TOK_ISO646String 321 |
| 249 | #define TOK_MAX 322 |
| 250 | #define TOK_MIN 323 |
| 251 | #define TOK_MINUS_INFINITY 324 |
| 252 | #define TOK_NULL 325 |
| 253 | #define TOK_NumericString 326 |
| 254 | #define TOK_OBJECT 327 |
| 255 | #define TOK_ObjectDescriptor 328 |
| 256 | #define TOK_OCTET 329 |
| 257 | #define TOK_OF 330 |
| 258 | #define TOK_OPTIONAL 331 |
| 259 | #define TOK_PATTERN 332 |
| 260 | #define TOK_PDV 333 |
| 261 | #define TOK_PLUS_INFINITY 334 |
| 262 | #define TOK_PRESENT 335 |
| 263 | #define TOK_PrintableString 336 |
| 264 | #define TOK_PRIVATE 337 |
| 265 | #define TOK_REAL 338 |
| 266 | #define TOK_RELATIVE_OID 339 |
| 267 | #define TOK_SEQUENCE 340 |
| 268 | #define TOK_SET 341 |
| 269 | #define TOK_SIZE 342 |
| 270 | #define TOK_STRING 343 |
| 271 | #define TOK_SYNTAX 344 |
| 272 | #define TOK_T61String 345 |
| 273 | #define TOK_TAGS 346 |
| 274 | #define TOK_TeletexString 347 |
| 275 | #define TOK_TRUE 348 |
| 276 | #define TOK_TYPE_IDENTIFIER 349 |
| 277 | #define TOK_UNIQUE 350 |
| 278 | #define TOK_UNIVERSAL 351 |
| 279 | #define TOK_UniversalString 352 |
| 280 | #define TOK_UTCTime 353 |
| 281 | #define TOK_UTF8String 354 |
| 282 | #define TOK_VideotexString 355 |
| 283 | #define TOK_VisibleString 356 |
| 284 | #define TOK_WITH 357 |
| 285 | #define TOK_EXCEPT 358 |
| 286 | #define TOK_INTERSECTION 359 |
| 287 | #define TOK_UNION 360 |
| 288 | #define TOK_TwoDots 361 |
| 289 | #define TOK_ThreeDots 362 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 290 | |
| 291 | |
| 292 | |
| 293 | |
| 294 | /* Copy the first part of user declarations. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 295 | #line 1 "asn1p_y.y" |
| 296 | |
| 297 | |
| 298 | #include <stdlib.h> |
| 299 | #include <stdio.h> |
| 300 | #include <string.h> |
| 301 | #include <errno.h> |
| 302 | #include <assert.h> |
| 303 | |
| 304 | #include "asn1parser.h" |
| 305 | |
| 306 | #define YYPARSE_PARAM param |
Lev Walkin | 4a4bdf7 | 2005-06-07 21:43:32 +0000 | [diff] [blame] | 307 | #define YYPARSE_PARAM_TYPE void ** |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 308 | #define YYERROR_VERBOSE |
| 309 | |
| 310 | int yylex(void); |
| 311 | int yyerror(const char *msg); |
Lev Walkin | 4a4bdf7 | 2005-06-07 21:43:32 +0000 | [diff] [blame] | 312 | #ifdef YYBYACC |
| 313 | int yyparse(void **param); /* byacc does not produce a prototype */ |
| 314 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 315 | void asn1p_lexer_hack_push_opaque_state(void); |
| 316 | void asn1p_lexer_hack_enable_with_syntax(void); |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 317 | void asn1p_lexer_hack_push_encoding_control(void); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 318 | #define yylineno asn1p_lineno |
| 319 | extern int asn1p_lineno; |
| 320 | |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 321 | /* |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 322 | * Process directives as <ASN1C:RepresentAsPointer> |
Lev Walkin | 4696c74 | 2005-08-22 12:23:54 +0000 | [diff] [blame] | 323 | */ |
| 324 | extern int asn1p_as_pointer; |
Lev Walkin | 4696c74 | 2005-08-22 12:23:54 +0000 | [diff] [blame] | 325 | |
| 326 | /* |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 327 | * This temporary variable is used to solve the shortcomings of 1-lookahead |
| 328 | * parser. |
| 329 | */ |
| 330 | static struct AssignedIdentifier *saved_aid; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 331 | |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 332 | static asn1p_value_t *_convert_bitstring2binary(char *str, int base); |
| 333 | static void _fixup_anonymous_identifier(asn1p_expr_t *expr); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 334 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 335 | static asn1p_module_t *currentModule; |
| 336 | #define NEW_EXPR() (asn1p_expr_new(yylineno, currentModule)) |
| 337 | |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 338 | #define checkmem(ptr) do { \ |
| 339 | if(!(ptr)) \ |
| 340 | return yyerror("Memory failure"); \ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 341 | } while(0) |
| 342 | |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 343 | #define CONSTRAINT_INSERT(root, constr_type, arg1, arg2) do { \ |
| 344 | if(arg1->type != constr_type) { \ |
| 345 | int __ret; \ |
| 346 | root = asn1p_constraint_new(yylineno); \ |
| 347 | checkmem(root); \ |
| 348 | root->type = constr_type; \ |
| 349 | __ret = asn1p_constraint_insert(root, \ |
| 350 | arg1); \ |
| 351 | checkmem(__ret == 0); \ |
| 352 | } else { \ |
| 353 | root = arg1; \ |
| 354 | } \ |
| 355 | if(arg2) { \ |
| 356 | int __ret \ |
| 357 | = asn1p_constraint_insert(root, arg2); \ |
| 358 | checkmem(__ret == 0); \ |
| 359 | } \ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 360 | } while(0) |
| 361 | |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 362 | #ifdef AL_IMPORT |
| 363 | #error AL_IMPORT DEFINED ELSEWHERE! |
| 364 | #endif |
| 365 | #define AL_IMPORT(to,where,from,field) do { \ |
| 366 | if(!(from)) break; \ |
| 367 | while(TQ_FIRST(&((from)->where))) { \ |
| 368 | TQ_ADD(&((to)->where), \ |
| 369 | TQ_REMOVE(&((from)->where), field), \ |
| 370 | field); \ |
| 371 | } \ |
| 372 | assert(TQ_FIRST(&((from)->where)) == 0); \ |
| 373 | } while(0) |
| 374 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 375 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 376 | |
| 377 | /* Enabling traces. */ |
| 378 | #ifndef YYDEBUG |
| 379 | # define YYDEBUG 0 |
| 380 | #endif |
| 381 | |
| 382 | /* Enabling verbose error messages. */ |
| 383 | #ifdef YYERROR_VERBOSE |
| 384 | # undef YYERROR_VERBOSE |
| 385 | # define YYERROR_VERBOSE 1 |
| 386 | #else |
| 387 | # define YYERROR_VERBOSE 0 |
| 388 | #endif |
| 389 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 390 | /* Enabling the token table. */ |
| 391 | #ifndef YYTOKEN_TABLE |
| 392 | # define YYTOKEN_TABLE 0 |
| 393 | #endif |
| 394 | |
| 395 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
| 396 | typedef union YYSTYPE |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 397 | #line 88 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 398 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 399 | asn1p_t *a_grammar; |
| 400 | asn1p_module_flags_e a_module_flags; |
| 401 | asn1p_module_t *a_module; |
| 402 | asn1p_expr_type_e a_type; /* ASN.1 Type */ |
| 403 | asn1p_expr_t *a_expr; /* Constructed collection */ |
| 404 | asn1p_constraint_t *a_constr; /* Constraint */ |
| 405 | enum asn1p_constraint_type_e a_ctype;/* Constraint type */ |
| 406 | asn1p_xports_t *a_xports; /* IMports/EXports */ |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 407 | struct AssignedIdentifier a_aid; /* Assigned Identifier */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 408 | asn1p_oid_t *a_oid; /* Object Identifier */ |
| 409 | asn1p_oid_arc_t a_oid_arc; /* Single OID's arc */ |
| 410 | struct asn1p_type_tag_s a_tag; /* A tag */ |
| 411 | asn1p_ref_t *a_ref; /* Reference to custom type */ |
| 412 | asn1p_wsyntx_t *a_wsynt; /* WITH SYNTAX contents */ |
| 413 | asn1p_wsyntx_chunk_t *a_wchunk; /* WITH SYNTAX chunk */ |
| 414 | struct asn1p_ref_component_s a_refcomp; /* Component of a reference */ |
| 415 | asn1p_value_t *a_value; /* Number, DefinedValue, etc */ |
| 416 | struct asn1p_param_s a_parg; /* A parameter argument */ |
| 417 | asn1p_paramlist_t *a_plist; /* A pargs list */ |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 418 | struct asn1p_expr_marker_s a_marker; /* OPTIONAL/DEFAULT */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 419 | enum asn1p_constr_pres_e a_pres; /* PRESENT/ABSENT/OPTIONAL */ |
Lev Walkin | d21c505 | 2004-09-29 13:18:09 +0000 | [diff] [blame] | 420 | asn1c_integer_t a_int; |
Lev Walkin | adf863f | 2006-09-05 16:18:34 +0000 | [diff] [blame] | 421 | double a_dbl; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 422 | char *tv_str; |
| 423 | struct { |
| 424 | char *buf; |
| 425 | int len; |
| 426 | } tv_opaque; |
| 427 | struct { |
| 428 | char *name; |
| 429 | struct asn1p_type_tag_s tag; |
| 430 | } tv_nametag; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 431 | } |
| 432 | /* Line 193 of yacc.c. */ |
| 433 | #line 434 "y.tab.c" |
| 434 | YYSTYPE; |
| 435 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
| 436 | # define YYSTYPE_IS_DECLARED 1 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 437 | # define YYSTYPE_IS_TRIVIAL 1 |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 438 | #endif |
| 439 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 440 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 441 | |
| 442 | /* Copy the second part of user declarations. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 443 | |
| 444 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 445 | /* Line 216 of yacc.c. */ |
| 446 | #line 447 "y.tab.c" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 447 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 448 | #ifdef short |
| 449 | # undef short |
| 450 | #endif |
| 451 | |
| 452 | #ifdef YYTYPE_UINT8 |
| 453 | typedef YYTYPE_UINT8 yytype_uint8; |
| 454 | #else |
| 455 | typedef unsigned char yytype_uint8; |
| 456 | #endif |
| 457 | |
| 458 | #ifdef YYTYPE_INT8 |
| 459 | typedef YYTYPE_INT8 yytype_int8; |
| 460 | #elif (defined __STDC__ || defined __C99__FUNC__ \ |
| 461 | || defined __cplusplus || defined _MSC_VER) |
| 462 | typedef signed char yytype_int8; |
| 463 | #else |
| 464 | typedef short int yytype_int8; |
| 465 | #endif |
| 466 | |
| 467 | #ifdef YYTYPE_UINT16 |
| 468 | typedef YYTYPE_UINT16 yytype_uint16; |
| 469 | #else |
| 470 | typedef unsigned short int yytype_uint16; |
| 471 | #endif |
| 472 | |
| 473 | #ifdef YYTYPE_INT16 |
| 474 | typedef YYTYPE_INT16 yytype_int16; |
| 475 | #else |
| 476 | typedef short int yytype_int16; |
| 477 | #endif |
| 478 | |
| 479 | #ifndef YYSIZE_T |
| 480 | # ifdef __SIZE_TYPE__ |
| 481 | # define YYSIZE_T __SIZE_TYPE__ |
| 482 | # elif defined size_t |
| 483 | # define YYSIZE_T size_t |
| 484 | # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ |
| 485 | || defined __cplusplus || defined _MSC_VER) |
| 486 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
| 487 | # define YYSIZE_T size_t |
| 488 | # else |
| 489 | # define YYSIZE_T unsigned int |
| 490 | # endif |
| 491 | #endif |
| 492 | |
| 493 | #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
| 494 | |
| 495 | #ifndef YY_ |
| 496 | # if defined YYENABLE_NLS && YYENABLE_NLS |
| 497 | # if ENABLE_NLS |
| 498 | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
| 499 | # define YY_(msgid) dgettext ("bison-runtime", msgid) |
| 500 | # endif |
| 501 | # endif |
| 502 | # ifndef YY_ |
| 503 | # define YY_(msgid) msgid |
| 504 | # endif |
| 505 | #endif |
| 506 | |
| 507 | /* Suppress unused-variable warnings by "using" E. */ |
| 508 | #if ! defined lint || defined __GNUC__ |
| 509 | # define YYUSE(e) ((void) (e)) |
| 510 | #else |
| 511 | # define YYUSE(e) /* empty */ |
| 512 | #endif |
| 513 | |
| 514 | /* Identity function, used to suppress warnings about constant conditions. */ |
| 515 | #ifndef lint |
| 516 | # define YYID(n) (n) |
| 517 | #else |
| 518 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 519 | || defined __cplusplus || defined _MSC_VER) |
| 520 | static int |
| 521 | YYID (int i) |
| 522 | #else |
| 523 | static int |
| 524 | YYID (i) |
| 525 | int i; |
| 526 | #endif |
| 527 | { |
| 528 | return i; |
| 529 | } |
| 530 | #endif |
| 531 | |
| 532 | #if ! defined yyoverflow || YYERROR_VERBOSE |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 533 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 534 | /* The parser invokes alloca or malloc; define the necessary symbols. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 535 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 536 | # ifdef YYSTACK_USE_ALLOCA |
| 537 | # if YYSTACK_USE_ALLOCA |
| 538 | # ifdef __GNUC__ |
| 539 | # define YYSTACK_ALLOC __builtin_alloca |
| 540 | # elif defined __BUILTIN_VA_ARG_INCR |
| 541 | # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
| 542 | # elif defined _AIX |
| 543 | # define YYSTACK_ALLOC __alloca |
| 544 | # elif defined _MSC_VER |
| 545 | # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
| 546 | # define alloca _alloca |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 547 | # else |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 548 | # define YYSTACK_ALLOC alloca |
| 549 | # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
| 550 | || defined __cplusplus || defined _MSC_VER) |
| 551 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
| 552 | # ifndef _STDLIB_H |
| 553 | # define _STDLIB_H 1 |
| 554 | # endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 555 | # endif |
| 556 | # endif |
| 557 | # endif |
| 558 | # endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 559 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 560 | # ifdef YYSTACK_ALLOC |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 561 | /* Pacify GCC's `empty if-body' warning. */ |
| 562 | # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) |
| 563 | # ifndef YYSTACK_ALLOC_MAXIMUM |
| 564 | /* The OS might guarantee only one guard page at the bottom of the stack, |
| 565 | and a page size can be as small as 4096 bytes. So we cannot safely |
| 566 | invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
| 567 | to allow for a few compiler-allocated temporary stack slots. */ |
| 568 | # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 569 | # endif |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 570 | # else |
| 571 | # define YYSTACK_ALLOC YYMALLOC |
| 572 | # define YYSTACK_FREE YYFREE |
| 573 | # ifndef YYSTACK_ALLOC_MAXIMUM |
| 574 | # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
| 575 | # endif |
| 576 | # if (defined __cplusplus && ! defined _STDLIB_H \ |
| 577 | && ! ((defined YYMALLOC || defined malloc) \ |
| 578 | && (defined YYFREE || defined free))) |
| 579 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
| 580 | # ifndef _STDLIB_H |
| 581 | # define _STDLIB_H 1 |
| 582 | # endif |
| 583 | # endif |
| 584 | # ifndef YYMALLOC |
| 585 | # define YYMALLOC malloc |
| 586 | # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
| 587 | || defined __cplusplus || defined _MSC_VER) |
| 588 | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
| 589 | # endif |
| 590 | # endif |
| 591 | # ifndef YYFREE |
| 592 | # define YYFREE free |
| 593 | # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
| 594 | || defined __cplusplus || defined _MSC_VER) |
| 595 | void free (void *); /* INFRINGES ON USER NAME SPACE */ |
| 596 | # endif |
| 597 | # endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 598 | # endif |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 599 | #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 600 | |
| 601 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 602 | #if (! defined yyoverflow \ |
| 603 | && (! defined __cplusplus \ |
| 604 | || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 605 | |
| 606 | /* A type that is properly aligned for any stack member. */ |
| 607 | union yyalloc |
| 608 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 609 | yytype_int16 yyss; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 610 | YYSTYPE yyvs; |
| 611 | }; |
| 612 | |
| 613 | /* 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] | 614 | # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 615 | |
| 616 | /* The size of an array large to enough to hold all stacks, each with |
| 617 | N elements. */ |
| 618 | # define YYSTACK_BYTES(N) \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 619 | ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ |
| 620 | + YYSTACK_GAP_MAXIMUM) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 621 | |
| 622 | /* Copy COUNT objects from FROM to TO. The source and destination do |
| 623 | not overlap. */ |
| 624 | # ifndef YYCOPY |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 625 | # if defined __GNUC__ && 1 < __GNUC__ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 626 | # define YYCOPY(To, From, Count) \ |
| 627 | __builtin_memcpy (To, From, (Count) * sizeof (*(From))) |
| 628 | # else |
| 629 | # define YYCOPY(To, From, Count) \ |
| 630 | do \ |
| 631 | { \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 632 | YYSIZE_T yyi; \ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 633 | for (yyi = 0; yyi < (Count); yyi++) \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 634 | (To)[yyi] = (From)[yyi]; \ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 635 | } \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 636 | while (YYID (0)) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 637 | # endif |
| 638 | # endif |
| 639 | |
| 640 | /* Relocate STACK from its old location to the new one. The |
| 641 | local variables YYSIZE and YYSTACKSIZE give the old and new number of |
| 642 | elements in the stack, and YYPTR gives the new location of the |
| 643 | stack. Advance YYPTR to a properly aligned location for the next |
| 644 | stack. */ |
| 645 | # define YYSTACK_RELOCATE(Stack) \ |
| 646 | do \ |
| 647 | { \ |
| 648 | YYSIZE_T yynewbytes; \ |
| 649 | YYCOPY (&yyptr->Stack, Stack, yysize); \ |
| 650 | Stack = &yyptr->Stack; \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 651 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 652 | yyptr += yynewbytes / sizeof (*yyptr); \ |
| 653 | } \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 654 | while (YYID (0)) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 655 | |
| 656 | #endif |
| 657 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 658 | /* YYFINAL -- State number of the termination state. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 659 | #define YYFINAL 7 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 660 | /* YYLAST -- Last index in YYTABLE. */ |
| 661 | #define YYLAST 793 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 662 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 663 | /* YYNTOKENS -- Number of terminals. */ |
| 664 | #define YYNTOKENS 123 |
| 665 | /* YYNNTS -- Number of nonterminals. */ |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 666 | #define YYNNTS 122 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 667 | /* YYNRULES -- Number of rules. */ |
| 668 | #define YYNRULES 313 |
| 669 | /* YYNRULES -- Number of states. */ |
| 670 | #define YYNSTATES 473 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 671 | |
| 672 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ |
| 673 | #define YYUNDEFTOK 2 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 674 | #define YYMAXUTOK 362 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 675 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 676 | #define YYTRANSLATE(YYX) \ |
| 677 | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 678 | |
| 679 | /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 680 | static const yytype_uint8 yytranslate[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 681 | { |
| 682 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 683 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 684 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 685 | 2, 2, 2, 119, 2, 2, 2, 2, 2, 2, |
| 686 | 112, 113, 2, 2, 115, 2, 120, 2, 2, 2, |
| 687 | 2, 2, 2, 2, 2, 2, 2, 2, 116, 114, |
| 688 | 121, 2, 2, 2, 122, 2, 2, 2, 2, 2, |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 689 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 690 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 691 | 2, 117, 2, 118, 104, 2, 2, 2, 2, 2, |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 692 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 693 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 694 | 2, 2, 2, 110, 106, 111, 2, 2, 2, 2, |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 695 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 696 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 697 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 698 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 699 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 700 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 701 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 702 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 703 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 704 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 705 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 706 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 707 | 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
| 708 | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
| 709 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
| 710 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
| 711 | 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, |
| 712 | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, |
| 713 | 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, |
| 714 | 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, |
| 715 | 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, |
| 716 | 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 717 | 95, 96, 97, 98, 99, 100, 101, 102, 103, 105, |
| 718 | 107, 108, 109 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 719 | }; |
| 720 | |
| 721 | #if YYDEBUG |
| 722 | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in |
| 723 | YYRHS. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 724 | static const yytype_uint16 yyprhs[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 725 | { |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 726 | 0, 0, 3, 5, 7, 10, 11, 21, 22, 24, |
| 727 | 28, 31, 33, 36, 38, 43, 45, 46, 48, 50, |
| 728 | 53, 56, 59, 62, 65, 68, 69, 71, 75, 77, |
| 729 | 80, 82, 84, 86, 87, 91, 93, 94, 96, 100, |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 730 | 103, 104, 106, 108, 111, 112, 114, 119, 121, 125, |
| 731 | 127, 131, 133, 134, 136, 140, 144, 147, 149, 153, |
| 732 | 155, 159, 161, 165, 170, 172, 174, 179, 183, 187, |
| 733 | 194, 201, 203, 207, 209, 213, 217, 221, 225, 227, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 734 | 231, 233, 235, 237, 239, 240, 242, 244, 248, 254, |
| 735 | 258, 261, 265, 267, 269, 273, 276, 278, 280, 286, |
| 736 | 287, 289, 291, 295, 298, 303, 307, 311, 315, 319, |
| 737 | 323, 324, 326, 327, 334, 336, 339, 341, 343, 345, |
| 738 | 349, 351, 355, 359, 363, 364, 367, 369, 374, 379, |
| 739 | 384, 391, 398, 400, 405, 409, 411, 415, 419, 423, |
| 740 | 425, 429, 431, 435, 437, 439, 441, 443, 447, 451, |
| 741 | 453, 458, 460, 462, 466, 467, 471, 473, 475, 477, |
| 742 | 479, 481, 483, 485, 487, 491, 493, 495, 497, 499, |
| 743 | 502, 504, 506, 508, 510, 513, 516, 518, 520, 523, |
| 744 | 526, 528, 530, 532, 534, 536, 539, 541, 544, 546, |
| 745 | 548, 550, 552, 554, 556, 558, 560, 562, 564, 566, |
| 746 | 568, 570, 572, 574, 576, 578, 580, 581, 583, 585, |
| 747 | 587, 592, 596, 601, 603, 605, 609, 615, 617, 619, |
| 748 | 623, 625, 629, 631, 635, 637, 641, 646, 650, 652, |
| 749 | 654, 658, 662, 666, 670, 672, 674, 677, 680, 682, |
| 750 | 684, 686, 688, 690, 692, 694, 696, 698, 700, 702, |
| 751 | 706, 712, 714, 718, 720, 724, 725, 727, 729, 731, |
| 752 | 733, 735, 737, 739, 740, 746, 749, 751, 754, 757, |
| 753 | 761, 763, 765, 769, 774, 776, 780, 783, 787, 789, |
| 754 | 793, 794, 796, 798, 801, 804, 808, 810, 814, 816, |
| 755 | 821, 826, 828, 830, 832, 834, 836, 838, 839, 841, |
| 756 | 844, 849, 850, 852, 854, 856, 857, 859, 861, 863, |
| 757 | 865, 867, 868, 870 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 758 | }; |
| 759 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 760 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
| 761 | static const yytype_int16 yyrhs[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 762 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 763 | 124, 0, -1, 125, -1, 126, -1, 125, 126, -1, |
| 764 | -1, 241, 127, 128, 41, 132, 3, 28, 135, 46, |
| 765 | -1, -1, 129, -1, 110, 130, 111, -1, 110, 111, |
| 766 | -1, 131, -1, 130, 131, -1, 244, -1, 244, 112, |
| 767 | 12, 113, -1, 12, -1, -1, 133, -1, 134, -1, |
| 768 | 133, 134, -1, 48, 91, -1, 59, 91, -1, 27, |
| 769 | 91, -1, 50, 60, -1, 18, 64, -1, -1, 136, |
| 770 | -1, 148, 140, 137, -1, 138, -1, 137, 138, -1, |
| 771 | 155, -1, 185, -1, 153, -1, -1, 45, 18, 139, |
| 772 | -1, 195, -1, -1, 141, -1, 61, 142, 114, -1, |
| 773 | 61, 53, -1, -1, 143, -1, 145, -1, 143, 145, |
| 774 | -1, -1, 129, -1, 146, 53, 241, 144, -1, 147, |
| 775 | -1, 146, 115, 147, -1, 241, -1, 241, 110, 111, |
| 776 | -1, 244, -1, -1, 149, -1, 49, 150, 114, -1, |
| 777 | 49, 24, 114, -1, 49, 114, -1, 151, -1, 150, |
| 778 | 115, 151, -1, 241, -1, 241, 110, 111, -1, 244, |
| 779 | -1, 110, 202, 111, -1, 241, 154, 3, 152, -1, |
| 780 | 194, -1, 179, -1, 179, 110, 158, 111, -1, 241, |
| 781 | 3, 175, -1, 241, 3, 165, -1, 241, 110, 156, |
| 782 | 111, 3, 175, -1, 241, 110, 156, 111, 3, 165, |
| 783 | -1, 157, -1, 156, 115, 157, -1, 241, -1, 241, |
| 784 | 116, 244, -1, 241, 116, 241, -1, 192, 116, 244, |
| 785 | -1, 192, 116, 241, -1, 159, -1, 158, 115, 159, |
| 786 | -1, 175, -1, 188, -1, 244, -1, 152, -1, -1, |
| 787 | 161, -1, 162, -1, 161, 115, 162, -1, 161, 115, |
| 788 | 4, 161, 5, -1, 244, 175, 229, -1, 175, 229, |
| 789 | -1, 37, 75, 175, -1, 174, -1, 164, -1, 163, |
| 790 | 115, 164, -1, 244, 175, -1, 174, -1, 175, -1, |
| 791 | 35, 110, 167, 111, 169, -1, -1, 95, -1, 168, |
| 792 | -1, 167, 115, 168, -1, 19, 229, -1, 20, 175, |
| 793 | 166, 229, -1, 20, 183, 229, -1, 20, 184, 229, |
| 794 | -1, 19, 183, 229, -1, 19, 175, 229, -1, 19, |
| 795 | 184, 229, -1, -1, 170, -1, -1, 102, 89, 110, |
| 796 | 171, 172, 111, -1, 173, -1, 172, 173, -1, 6, |
| 797 | -1, 21, -1, 182, -1, 117, 172, 118, -1, 109, |
| 798 | -1, 109, 119, 189, -1, 109, 119, 234, -1, 236, |
| 799 | 177, 198, -1, -1, 176, 178, -1, 154, -1, 34, |
| 800 | 110, 163, 111, -1, 85, 110, 160, 111, -1, 86, |
| 801 | 110, 160, 111, -1, 85, 198, 75, 243, 236, 177, |
| 802 | -1, 86, 198, 75, 243, 236, 177, -1, 25, -1, |
| 803 | 25, 42, 32, 244, -1, 63, 75, 179, -1, 17, |
| 804 | -1, 17, 120, 241, -1, 242, 120, 241, -1, 17, |
| 805 | 120, 244, -1, 242, -1, 242, 120, 180, -1, 181, |
| 806 | -1, 180, 120, 181, -1, 182, -1, 19, -1, 20, |
| 807 | -1, 19, -1, 183, 120, 19, -1, 183, 120, 20, |
| 808 | -1, 18, -1, 244, 175, 3, 186, -1, 188, -1, |
| 809 | 189, -1, 244, 116, 186, -1, -1, 110, 187, 191, |
| 810 | -1, 70, -1, 52, -1, 93, -1, 8, -1, 10, |
| 811 | -1, 190, -1, 234, -1, 244, -1, 241, 120, 244, |
| 812 | -1, 9, -1, 15, -1, 16, -1, 7, -1, 191, |
| 813 | 7, -1, 31, -1, 70, -1, 83, -1, 193, -1, |
| 814 | 74, 88, -1, 72, 58, -1, 84, -1, 51, -1, |
| 815 | 43, 78, -1, 33, 88, -1, 98, -1, 54, -1, |
| 816 | 195, -1, 65, -1, 47, -1, 29, 88, -1, 192, |
| 817 | -1, 193, 231, -1, 30, -1, 55, -1, 56, -1, |
| 818 | 57, -1, 66, -1, 71, -1, 81, -1, 90, -1, |
| 819 | 92, -1, 97, -1, 99, -1, 100, -1, 101, -1, |
| 820 | 73, -1, 106, -1, 107, -1, 104, -1, 105, -1, |
| 821 | -1, 199, -1, 200, -1, 201, -1, 87, 112, 202, |
| 822 | 113, -1, 112, 202, 113, -1, 201, 112, 202, 113, |
| 823 | -1, 109, -1, 203, -1, 203, 115, 109, -1, 203, |
| 824 | 115, 109, 115, 203, -1, 218, -1, 204, -1, 24, |
| 825 | 103, 207, -1, 205, -1, 204, 196, 205, -1, 206, |
| 826 | -1, 205, 197, 206, -1, 207, -1, 207, 103, 207, |
| 827 | -1, 209, 112, 202, 113, -1, 112, 202, 113, -1, |
| 828 | 210, -1, 212, -1, 210, 222, 210, -1, 68, 222, |
| 829 | 210, -1, 210, 222, 67, -1, 68, 222, 67, -1, |
| 830 | 213, -1, 208, -1, 77, 9, -1, 77, 244, -1, |
| 831 | 87, -1, 53, -1, 52, -1, 93, -1, 235, -1, |
| 832 | 190, -1, 211, -1, 244, -1, 8, -1, 10, -1, |
| 833 | 241, -1, 102, 36, 201, -1, 102, 37, 110, 214, |
| 834 | 111, -1, 215, -1, 214, 115, 215, -1, 109, -1, |
| 835 | 244, 198, 216, -1, -1, 217, -1, 80, -1, 22, |
| 836 | -1, 76, -1, 219, -1, 223, -1, 221, -1, -1, |
| 837 | 38, 32, 110, 220, 191, -1, 39, 175, -1, 108, |
| 838 | -1, 108, 121, -1, 121, 108, -1, 121, 108, 121, |
| 839 | -1, 224, -1, 225, -1, 110, 241, 111, -1, 224, |
| 840 | 110, 226, 111, -1, 227, -1, 226, 115, 227, -1, |
| 841 | 122, 228, -1, 122, 120, 228, -1, 244, -1, 228, |
| 842 | 120, 244, -1, -1, 230, -1, 76, -1, 40, 186, |
| 843 | -1, 110, 111, -1, 110, 232, 111, -1, 233, -1, |
| 844 | 232, 115, 233, -1, 244, -1, 244, 112, 234, 113, |
| 845 | -1, 244, 112, 189, 113, -1, 234, -1, 109, -1, |
| 846 | 12, -1, 13, -1, 234, -1, 14, -1, -1, 237, |
| 847 | -1, 238, 240, -1, 117, 239, 12, 118, -1, -1, |
| 848 | 96, -1, 26, -1, 82, -1, -1, 59, -1, 48, |
| 849 | -1, 17, -1, 18, -1, 18, -1, -1, 244, -1, |
| 850 | 11, -1 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 851 | }; |
| 852 | |
| 853 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 854 | static const yytype_uint16 yyrline[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 855 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 856 | 0, 357, 357, 363, 368, 385, 385, 414, 415, 419, |
| 857 | 422, 428, 434, 443, 447, 451, 461, 462, 471, 474, |
| 858 | 483, 486, 489, 492, 496, 517, 518, 527, 536, 539, |
| 859 | 555, 562, 575, 583, 582, 596, 609, 610, 613, 623, |
| 860 | 629, 630, 633, 638, 645, 646, 650, 661, 666, 673, |
| 861 | 679, 685, 695, 696, 708, 711, 714, 722, 727, 734, |
| 862 | 740, 746, 755, 758, 768, 781, 791, 811, 817, 833, |
| 863 | 839, 847, 856, 867, 871, 878, 885, 893, 904, 909, |
| 864 | 916, 919, 927, 938, 961, 962, 965, 970, 974, 981, |
| 865 | 988, 994, 1001, 1007, 1012, 1019, 1024, 1027, 1034, 1044, |
| 866 | 1045, 1049, 1056, 1066, 1076, 1087, 1097, 1108, 1118, 1129, |
| 867 | 1141, 1142, 1149, 1148, 1157, 1161, 1168, 1172, 1175, 1179, |
| 868 | 1185, 1193, 1202, 1214, 1236, 1243, 1262, 1265, 1271, 1277, |
| 869 | 1283, 1293, 1303, 1309, 1320, 1335, 1343, 1353, 1363, 1373, |
| 870 | 1381, 1403, 1411, 1420, 1424, 1429, 1438, 1442, 1446, 1453, |
| 871 | 1473, 1483, 1484, 1485, 1492, 1492, 1497, 1505, 1510, 1515, |
| 872 | 1519, 1523, 1526, 1532, 1543, 1561, 1565, 1570, 1578, 1587, |
| 873 | 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, |
| 874 | 1612, 1613, 1614, 1621, 1622, 1623, 1627, 1633, 1646, 1647, |
| 875 | 1651, 1655, 1656, 1657, 1658, 1659, 1663, 1664, 1665, 1666, |
| 876 | 1670, 1671, 1678, 1678, 1679, 1679, 1682, 1683, 1689, 1693, |
| 877 | 1696, 1706, 1709, 1715, 1719, 1722, 1728, 1736, 1742, 1743, |
| 878 | 1749, 1750, 1756, 1757, 1764, 1765, 1771, 1779, 1787, 1793, |
| 879 | 1799, 1806, 1814, 1822, 1831, 1834, 1840, 1845, 1856, 1859, |
| 880 | 1865, 1870, 1875, 1876, 1877, 1878, 1892, 1896, 1903, 1917, |
| 881 | 1920, 1926, 1929, 1935, 1941, 1955, 1956, 1960, 1963, 1966, |
| 882 | 1974, 1975, 1976, 1981, 1980, 1992, 2000, 2001, 2002, 2003, |
| 883 | 2006, 2009, 2018, 2033, 2039, 2045, 2059, 2070, 2086, 2089, |
| 884 | 2107, 2111, 2115, 2119, 2142, 2146, 2152, 2157, 2164, 2171, |
| 885 | 2179, 2187, 2194, 2205, 2209, 2216, 2217, 2248, 2249, 2253, |
| 886 | 2260, 2266, 2267, 2268, 2269, 2273, 2274, 2275, 2279, 2283, |
| 887 | 2291, 2298, 2299, 2305 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 888 | }; |
| 889 | #endif |
| 890 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 891 | #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE |
| 892 | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
| 893 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 894 | static const char *const yytname[] = |
| 895 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 896 | "$end", "error", "$undefined", "TOK_PPEQ", "TOK_VBracketLeft", |
| 897 | "TOK_VBracketRight", "TOK_whitespace", "TOK_opaque", "TOK_bstring", |
| 898 | "TOK_cstring", "TOK_hstring", "TOK_identifier", "TOK_number", |
| 899 | "TOK_number_negative", "TOK_realnumber", "TOK_tuple", "TOK_quadruple", |
| 900 | "TOK_typereference", "TOK_capitalreference", "TOK_typefieldreference", |
| 901 | "TOK_valuefieldreference", "TOK_Literal", "TOK_ABSENT", |
| 902 | "TOK_ABSTRACT_SYNTAX", "TOK_ALL", "TOK_ANY", "TOK_APPLICATION", |
| 903 | "TOK_AUTOMATIC", "TOK_BEGIN", "TOK_BIT", "TOK_BMPString", "TOK_BOOLEAN", |
| 904 | "TOK_BY", "TOK_CHARACTER", "TOK_CHOICE", "TOK_CLASS", "TOK_COMPONENT", |
| 905 | "TOK_COMPONENTS", "TOK_CONSTRAINED", "TOK_CONTAINING", "TOK_DEFAULT", |
| 906 | "TOK_DEFINITIONS", "TOK_DEFINED", "TOK_EMBEDDED", "TOK_ENCODED", |
| 907 | "TOK_ENCODING_CONTROL", "TOK_END", "TOK_ENUMERATED", "TOK_EXPLICIT", |
| 908 | "TOK_EXPORTS", "TOK_EXTENSIBILITY", "TOK_EXTERNAL", "TOK_FALSE", |
| 909 | "TOK_FROM", "TOK_GeneralizedTime", "TOK_GeneralString", |
| 910 | "TOK_GraphicString", "TOK_IA5String", "TOK_IDENTIFIER", "TOK_IMPLICIT", |
| 911 | "TOK_IMPLIED", "TOK_IMPORTS", "TOK_INCLUDES", "TOK_INSTANCE", |
| 912 | "TOK_INSTRUCTIONS", "TOK_INTEGER", "TOK_ISO646String", "TOK_MAX", |
| 913 | "TOK_MIN", "TOK_MINUS_INFINITY", "TOK_NULL", "TOK_NumericString", |
| 914 | "TOK_OBJECT", "TOK_ObjectDescriptor", "TOK_OCTET", "TOK_OF", |
| 915 | "TOK_OPTIONAL", "TOK_PATTERN", "TOK_PDV", "TOK_PLUS_INFINITY", |
| 916 | "TOK_PRESENT", "TOK_PrintableString", "TOK_PRIVATE", "TOK_REAL", |
| 917 | "TOK_RELATIVE_OID", "TOK_SEQUENCE", "TOK_SET", "TOK_SIZE", "TOK_STRING", |
| 918 | "TOK_SYNTAX", "TOK_T61String", "TOK_TAGS", "TOK_TeletexString", |
| 919 | "TOK_TRUE", "TOK_TYPE_IDENTIFIER", "TOK_UNIQUE", "TOK_UNIVERSAL", |
| 920 | "TOK_UniversalString", "TOK_UTCTime", "TOK_UTF8String", |
| 921 | "TOK_VideotexString", "TOK_VisibleString", "TOK_WITH", "TOK_EXCEPT", |
| 922 | "'^'", "TOK_INTERSECTION", "'|'", "TOK_UNION", "TOK_TwoDots", |
| 923 | "TOK_ThreeDots", "'{'", "'}'", "'('", "')'", "';'", "','", "':'", "'['", |
| 924 | "']'", "'!'", "'.'", "'<'", "'@'", "$accept", "ParsedGrammar", |
| 925 | "ModuleList", "ModuleDefinition", "@1", "optObjectIdentifier", |
| 926 | "ObjectIdentifier", "ObjectIdentifierBody", "ObjectIdentifierElement", |
| 927 | "optModuleDefinitionFlags", "ModuleDefinitionFlags", |
| 928 | "ModuleDefinitionFlag", "optModuleBody", "ModuleBody", "AssignmentList", |
| 929 | "Assignment", "@2", "optImports", "ImportsDefinition", |
| 930 | "optImportsBundleSet", "ImportsBundleSet", "AssignedIdentifier", |
| 931 | "ImportsBundle", "ImportsList", "ImportsElement", "optExports", |
| 932 | "ExportsDefinition", "ExportsBody", "ExportsElement", "ValueSet", |
| 933 | "ValueSetTypeAssignment", "DefinedType", "DataTypeReference", |
| 934 | "ParameterArgumentList", "ParameterArgumentName", "ActualParameterList", |
| 935 | "ActualParameter", "optComponentTypeLists", "ComponentTypeLists", |
| 936 | "ComponentType", "AlternativeTypeLists", "AlternativeType", |
| 937 | "ObjectClass", "optUnique", "FieldSpec", "ClassField", "optWithSyntax", |
| 938 | "WithSyntax", "@3", "WithSyntaxList", "WithSyntaxToken", |
| 939 | "ExtensionAndException", "Type", "NSTD_IndirectMarker", |
| 940 | "TypeDeclaration", "TypeDeclarationSet", "ComplexTypeReference", |
| 941 | "ComplexTypeReferenceAmpList", "ComplexTypeReferenceElement", |
| 942 | "PrimitiveFieldReference", "FieldName", "DefinedObjectClass", |
| 943 | "ValueAssignment", "Value", "@4", "SimpleValue", "DefinedValue", |
| 944 | "RestrictedCharacterStringValue", "Opaque", "BasicTypeId", |
| 945 | "BasicTypeId_UniverationCompatible", "BasicType", "BasicString", |
| 946 | "UnionMark", "IntersectionMark", "optConstraints", "Constraint", |
| 947 | "SubtypeConstraint", "SetOfConstraints", "ElementSetSpecs", |
| 948 | "ElementSetSpec", "Unions", "Intersections", "IntersectionElements", |
| 949 | "ConstraintSubtypeElement", "PatternConstraint", "ConstraintSpec", |
| 950 | "SingleValue", "BitStringValue", "ContainedSubtype", |
| 951 | "InnerTypeConstraint", "WithComponentsList", "WithComponentsElement", |
| 952 | "optPresenceConstraint", "PresenceConstraint", "GeneralConstraint", |
| 953 | "UserDefinedConstraint", "@5", "ContentsConstraint", |
| 954 | "ConstraintRangeSpec", "TableConstraint", "SimpleTableConstraint", |
| 955 | "ComponentRelationConstraint", "AtNotationList", "AtNotationElement", |
| 956 | "ComponentIdList", "optMarker", "Marker", "UniverationDefinition", |
| 957 | "UniverationList", "UniverationElement", "SignedNumber", "RealValue", |
| 958 | "optTag", "Tag", "TagTypeValue", "TagClass", "TagPlicit", "TypeRefName", |
Lev Walkin | adf863f | 2006-09-05 16:18:34 +0000 | [diff] [blame] | 959 | "ObjectClassReference", "optIdentifier", "Identifier", 0 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 960 | }; |
| 961 | #endif |
| 962 | |
| 963 | # ifdef YYPRINT |
| 964 | /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to |
| 965 | token YYLEX-NUM. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 966 | static const yytype_uint16 yytoknum[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 967 | { |
| 968 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
| 969 | 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, |
| 970 | 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, |
| 971 | 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, |
| 972 | 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, |
| 973 | 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, |
| 974 | 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, |
| 975 | 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, |
| 976 | 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, |
| 977 | 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 978 | 355, 356, 357, 358, 94, 359, 124, 360, 361, 362, |
| 979 | 123, 125, 40, 41, 59, 44, 58, 91, 93, 33, |
| 980 | 46, 60, 64 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 981 | }; |
| 982 | # endif |
| 983 | |
| 984 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 985 | static const yytype_uint8 yyr1[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 986 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 987 | 0, 123, 124, 125, 125, 127, 126, 128, 128, 129, |
| 988 | 129, 130, 130, 131, 131, 131, 132, 132, 133, 133, |
| 989 | 134, 134, 134, 134, 134, 135, 135, 136, 137, 137, |
| 990 | 138, 138, 138, 139, 138, 138, 140, 140, 141, 141, |
| 991 | 142, 142, 143, 143, 144, 144, 145, 146, 146, 147, |
| 992 | 147, 147, 148, 148, 149, 149, 149, 150, 150, 151, |
| 993 | 151, 151, 152, 153, 154, 154, 154, 155, 155, 155, |
| 994 | 155, 156, 156, 157, 157, 157, 157, 157, 158, 158, |
| 995 | 159, 159, 159, 159, 160, 160, 161, 161, 161, 162, |
| 996 | 162, 162, 162, 163, 163, 164, 164, 164, 165, 166, |
| 997 | 166, 167, 167, 168, 168, 168, 168, 168, 168, 168, |
| 998 | 169, 169, 171, 170, 172, 172, 173, 173, 173, 173, |
| 999 | 174, 174, 174, 175, 176, 177, 178, 178, 178, 178, |
| 1000 | 178, 178, 178, 178, 178, 179, 179, 179, 179, 179, |
| 1001 | 179, 180, 180, 181, 182, 182, 183, 183, 183, 184, |
| 1002 | 185, 186, 186, 186, 187, 186, 186, 188, 188, 188, |
| 1003 | 188, 188, 188, 189, 189, 190, 190, 190, 191, 191, |
| 1004 | 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, |
| 1005 | 192, 192, 192, 193, 193, 193, 194, 194, 195, 195, |
| 1006 | 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, |
| 1007 | 195, 195, 196, 196, 197, 197, 198, 198, 199, 200, |
| 1008 | 200, 201, 201, 202, 202, 202, 202, 202, 203, 203, |
| 1009 | 204, 204, 205, 205, 206, 206, 207, 207, 207, 207, |
| 1010 | 207, 207, 207, 207, 207, 207, 208, 208, 209, 209, |
| 1011 | 210, 210, 210, 210, 210, 210, 211, 211, 212, 213, |
| 1012 | 213, 214, 214, 215, 215, 216, 216, 217, 217, 217, |
| 1013 | 218, 218, 218, 220, 219, 221, 222, 222, 222, 222, |
| 1014 | 223, 223, 224, 225, 226, 226, 227, 227, 228, 228, |
| 1015 | 229, 229, 230, 230, 231, 231, 232, 232, 233, 233, |
| 1016 | 233, 233, 233, 234, 234, 235, 235, 236, 236, 237, |
| 1017 | 238, 239, 239, 239, 239, 240, 240, 240, 241, 241, |
| 1018 | 242, 243, 243, 244 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1019 | }; |
| 1020 | |
| 1021 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1022 | static const yytype_uint8 yyr2[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1023 | { |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 1024 | 0, 2, 1, 1, 2, 0, 9, 0, 1, 3, |
| 1025 | 2, 1, 2, 1, 4, 1, 0, 1, 1, 2, |
| 1026 | 2, 2, 2, 2, 2, 0, 1, 3, 1, 2, |
| 1027 | 1, 1, 1, 0, 3, 1, 0, 1, 3, 2, |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 1028 | 0, 1, 1, 2, 0, 1, 4, 1, 3, 1, |
| 1029 | 3, 1, 0, 1, 3, 3, 2, 1, 3, 1, |
| 1030 | 3, 1, 3, 4, 1, 1, 4, 3, 3, 6, |
| 1031 | 6, 1, 3, 1, 3, 3, 3, 3, 1, 3, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1032 | 1, 1, 1, 1, 0, 1, 1, 3, 5, 3, |
| 1033 | 2, 3, 1, 1, 3, 2, 1, 1, 5, 0, |
| 1034 | 1, 1, 3, 2, 4, 3, 3, 3, 3, 3, |
| 1035 | 0, 1, 0, 6, 1, 2, 1, 1, 1, 3, |
| 1036 | 1, 3, 3, 3, 0, 2, 1, 4, 4, 4, |
| 1037 | 6, 6, 1, 4, 3, 1, 3, 3, 3, 1, |
| 1038 | 3, 1, 3, 1, 1, 1, 1, 3, 3, 1, |
| 1039 | 4, 1, 1, 3, 0, 3, 1, 1, 1, 1, |
| 1040 | 1, 1, 1, 1, 3, 1, 1, 1, 1, 2, |
| 1041 | 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, |
| 1042 | 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1043 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1044 | 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, |
| 1045 | 4, 3, 4, 1, 1, 3, 5, 1, 1, 3, |
| 1046 | 1, 3, 1, 3, 1, 3, 4, 3, 1, 1, |
| 1047 | 3, 3, 3, 3, 1, 1, 2, 2, 1, 1, |
| 1048 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, |
| 1049 | 5, 1, 3, 1, 3, 0, 1, 1, 1, 1, |
| 1050 | 1, 1, 1, 0, 5, 2, 1, 2, 2, 3, |
| 1051 | 1, 1, 3, 4, 1, 3, 2, 3, 1, 3, |
| 1052 | 0, 1, 1, 2, 2, 3, 1, 3, 1, 4, |
| 1053 | 4, 1, 1, 1, 1, 1, 1, 0, 1, 2, |
| 1054 | 4, 0, 1, 1, 1, 0, 1, 1, 1, 1, |
| 1055 | 1, 0, 1, 1 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1056 | }; |
| 1057 | |
| 1058 | /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state |
| 1059 | STATE-NUM when YYTABLE doesn't specify something else to do. Zero |
| 1060 | means the default is an error. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1061 | static const yytype_uint16 yydefact[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1062 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1063 | 0, 308, 309, 0, 2, 3, 5, 1, 4, 7, |
| 1064 | 0, 0, 8, 313, 15, 10, 0, 11, 13, 16, |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 1065 | 9, 12, 0, 0, 0, 0, 0, 0, 0, 17, |
| 1066 | 18, 0, 24, 22, 20, 23, 21, 0, 19, 14, |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 1067 | 52, 0, 0, 26, 36, 53, 0, 56, 0, 57, |
| 1068 | 59, 61, 6, 40, 0, 37, 55, 54, 0, 0, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1069 | 39, 0, 41, 42, 0, 47, 49, 51, 188, 0, |
| 1070 | 189, 190, 191, 192, 193, 201, 194, 195, 196, 197, |
| 1071 | 198, 199, 200, 27, 28, 32, 30, 31, 35, 0, |
| 1072 | 297, 58, 60, 38, 43, 0, 0, 0, 33, 29, |
| 1073 | 297, 135, 310, 0, 170, 0, 0, 184, 177, 181, |
| 1074 | 183, 171, 0, 0, 172, 176, 180, 0, 0, 65, |
| 1075 | 186, 173, 64, 182, 139, 301, 0, 124, 298, 305, |
| 1076 | 44, 48, 50, 34, 0, 68, 67, 0, 185, 179, |
| 1077 | 178, 175, 174, 0, 71, 0, 173, 73, 0, 297, |
| 1078 | 0, 187, 0, 303, 304, 302, 0, 0, 0, 206, |
| 1079 | 307, 306, 299, 45, 46, 0, 136, 138, 0, 0, |
| 1080 | 0, 0, 0, 63, 159, 165, 160, 293, 294, 166, |
| 1081 | 167, 157, 158, 83, 0, 78, 80, 81, 161, 162, |
| 1082 | 82, 292, 284, 0, 286, 291, 288, 144, 145, 140, |
| 1083 | 141, 143, 137, 0, 156, 154, 150, 151, 152, 0, |
| 1084 | 163, 132, 0, 0, 206, 206, 126, 125, 0, 0, |
| 1085 | 123, 207, 208, 209, 297, 297, 0, 101, 297, 72, |
| 1086 | 77, 76, 75, 74, 246, 247, 296, 0, 0, 297, |
| 1087 | 240, 239, 0, 0, 238, 241, 0, 213, 0, 0, |
| 1088 | 243, 0, 214, 218, 220, 222, 224, 235, 0, 228, |
| 1089 | 244, 229, 234, 217, 260, 262, 261, 270, 271, 295, |
| 1090 | 242, 248, 245, 66, 297, 285, 0, 0, 0, 300, |
| 1091 | 0, 0, 0, 0, 297, 0, 297, 0, 297, 0, |
| 1092 | 0, 0, 0, 149, 146, 0, 282, 280, 280, 280, |
| 1093 | 103, 281, 99, 280, 280, 110, 0, 70, 69, 0, |
| 1094 | 0, 265, 266, 0, 0, 236, 237, 0, 0, 0, |
| 1095 | 0, 62, 0, 202, 203, 0, 204, 205, 0, 0, |
| 1096 | 0, 0, 0, 79, 287, 0, 0, 163, 142, 168, |
| 1097 | 155, 164, 153, 0, 120, 0, 93, 96, 97, 297, |
| 1098 | 134, 0, 0, 85, 86, 92, 280, 297, 311, 0, |
| 1099 | 311, 0, 211, 0, 283, 108, 0, 107, 109, 100, |
| 1100 | 280, 105, 106, 0, 98, 111, 102, 219, 263, 267, |
| 1101 | 268, 233, 231, 249, 0, 272, 227, 215, 221, 223, |
| 1102 | 225, 0, 232, 230, 0, 0, 274, 290, 289, 169, |
| 1103 | 133, 0, 127, 297, 95, 297, 128, 297, 90, 280, |
| 1104 | 297, 312, 129, 297, 210, 212, 147, 148, 104, 0, |
| 1105 | 0, 269, 253, 0, 251, 206, 0, 226, 0, 276, |
| 1106 | 278, 273, 0, 121, 122, 94, 91, 297, 87, 89, |
| 1107 | 124, 124, 112, 264, 250, 0, 255, 216, 277, 0, |
| 1108 | 275, 0, 130, 131, 0, 252, 258, 259, 257, 254, |
| 1109 | 256, 279, 88, 116, 117, 0, 0, 114, 118, 0, |
| 1110 | 113, 115, 119 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1111 | }; |
| 1112 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1113 | /* YYDEFGOTO[NTERM-NUM]. */ |
| 1114 | static const yytype_int16 yydefgoto[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1115 | { |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 1116 | -1, 3, 4, 5, 9, 11, 12, 16, 17, 28, |
Lev Walkin | c6ab03c | 2006-10-21 05:54:49 +0000 | [diff] [blame] | 1117 | 29, 30, 42, 43, 83, 84, 133, 54, 55, 61, |
| 1118 | 62, 164, 63, 64, 65, 44, 45, 48, 49, 183, |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 1119 | 85, 118, 86, 143, 144, 184, 185, 352, 353, 354, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1120 | 345, 346, 135, 370, 226, 227, 374, 375, 454, 466, |
| 1121 | 467, 355, 356, 158, 159, 217, 119, 199, 200, 468, |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 1122 | 298, 299, 87, 206, 280, 207, 208, 250, 340, 120, |
| 1123 | 121, 122, 123, 325, 328, 220, 221, 222, 223, 251, |
| 1124 | 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1125 | 262, 423, 424, 459, 460, 263, 264, 420, 265, 314, |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 1126 | 266, 267, 268, 395, 396, 429, 300, 301, 151, 193, |
| 1127 | 194, 269, 270, 127, 128, 129, 156, 162, 271, 124, |
| 1128 | 410, 272 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1129 | }; |
| 1130 | |
| 1131 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
| 1132 | STATE-NUM. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1133 | #define YYPACT_NINF -276 |
| 1134 | static const yytype_int16 yypact[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1135 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1136 | 223, -276, -276, 28, 223, -276, -276, -276, -276, -61, |
| 1137 | 13, 25, -276, -276, -276, -276, 42, -276, -56, 229, |
| 1138 | -276, -276, 90, 54, 32, 64, 129, 79, 193, 229, |
| 1139 | -276, 104, -276, -276, -276, -276, -276, 197, -276, -276, |
| 1140 | 133, 66, 185, -276, 191, -276, 144, -276, 154, -276, |
| 1141 | 176, -276, -276, 196, 524, -276, -276, -276, 237, 149, |
| 1142 | -276, 177, 237, -276, -26, -276, 189, -276, -276, 291, |
| 1143 | -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, |
| 1144 | -276, -276, -276, 524, -276, -276, -276, -276, -276, 272, |
| 1145 | 200, -276, -276, -276, -276, 223, 237, 209, -276, -276, |
| 1146 | -18, 202, -276, 247, -276, 253, 269, -276, -276, -276, |
| 1147 | -276, -276, 296, 261, -276, -276, -276, 692, 356, 255, |
| 1148 | -276, 258, -276, -276, 243, 77, 372, -276, -276, 184, |
| 1149 | -61, -276, -276, -276, 266, -276, -276, 237, -276, -276, |
| 1150 | -276, -276, -276, -64, -276, 262, -276, 263, 267, 99, |
| 1151 | 84, -276, 294, -276, -276, -276, 368, 211, 616, -57, |
| 1152 | -276, -276, -276, -276, -276, 288, -276, -276, 378, 692, |
| 1153 | 237, 237, 399, -276, -276, -276, -276, -276, -276, -276, |
| 1154 | -276, -276, -276, -276, 150, -276, -276, -276, -276, -276, |
| 1155 | -276, -276, -276, 169, -276, -276, 271, -276, -276, 265, |
| 1156 | -276, -276, -276, 268, -276, -276, -276, -276, -276, 270, |
| 1157 | 273, 345, 278, 317, 78, 124, -276, -276, 282, 399, |
| 1158 | -276, -276, -276, 283, 219, 46, 181, -276, -18, -276, |
| 1159 | -276, -276, -276, -276, -276, -276, -276, 293, 366, 200, |
| 1160 | -276, -276, 63, 199, -276, -276, 295, -276, 223, 399, |
| 1161 | -276, 289, 284, 218, 235, -276, 298, -276, 290, 63, |
| 1162 | -276, -276, -276, -276, -276, -276, -276, 309, -276, -276, |
| 1163 | -276, -276, -276, -276, 99, -276, 69, 233, 332, -276, |
| 1164 | 396, 393, 211, 373, 49, 340, 8, 346, 8, 347, |
| 1165 | 399, 307, 399, -276, -276, 211, -276, -8, 110, -8, |
| 1166 | -276, -276, 329, 110, -8, 323, 288, -276, -276, 550, |
| 1167 | 316, -276, 308, 320, 190, -276, -276, 318, 321, 322, |
| 1168 | 319, -276, 325, -276, -276, 550, -276, -276, 550, 550, |
| 1169 | 399, 432, 314, -276, -276, 336, 337, -276, -276, -276, |
| 1170 | 457, -276, -276, 393, 349, 182, -276, -276, -276, 200, |
| 1171 | -276, 390, 355, 357, -276, -276, -8, 200, 393, 359, |
| 1172 | 393, 358, -276, 360, -276, -276, 341, -276, -276, -276, |
| 1173 | -8, -276, -276, 385, -276, -276, -276, -276, -276, -276, |
| 1174 | 354, -276, -276, 283, 74, -276, -276, 362, 235, -276, |
| 1175 | -276, 365, -276, -276, 0, 183, -276, -276, -276, -276, |
| 1176 | -276, 233, -276, 49, -276, 200, -276, 4, -276, -8, |
| 1177 | 200, -276, -276, 200, -276, -276, -276, -276, -276, 369, |
| 1178 | 396, -276, -276, 195, -276, -57, 445, -276, 393, 361, |
| 1179 | -276, -276, 314, -276, -276, -276, -276, 68, -276, -276, |
| 1180 | -276, -276, -276, 457, -276, 74, 159, -276, 361, 393, |
| 1181 | -276, 11, -276, -276, 55, -276, -276, -276, -276, -276, |
| 1182 | -276, -276, -276, -276, -276, 55, 17, -276, -276, 51, |
| 1183 | -276, -276, -276 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1184 | }; |
| 1185 | |
| 1186 | /* YYPGOTO[NTERM-NUM]. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1187 | static const yytype_int16 yypgoto[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1188 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1189 | -276, -276, -276, 476, -276, -276, 352, -276, 467, -276, |
| 1190 | -276, 456, -276, -276, -276, 404, -276, -276, -276, -276, |
| 1191 | -276, -276, 426, -276, 394, -276, -276, -276, 431, 343, |
| 1192 | -276, 335, -276, -276, 326, -276, 220, 208, 65, 93, |
| 1193 | -276, 100, 276, -276, -276, 201, -276, -276, -276, 40, |
| 1194 | -275, -270, -87, -276, -74, -276, 221, -276, 232, -148, |
| 1195 | 287, 292, -276, -166, -276, -142, -265, -139, 94, -91, |
| 1196 | -75, -276, 15, -276, -276, -213, -276, -276, 198, -199, |
| 1197 | 92, -276, 194, 188, -165, -276, -276, -227, -276, -276, |
| 1198 | -276, -276, 75, -276, -276, -276, -276, -276, -276, 264, |
| 1199 | -276, -276, -276, -276, 89, 96, -264, -276, -276, -276, |
| 1200 | 250, -128, -276, -195, -276, -276, -276, -276, 5, -276, |
| 1201 | 167, -10 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1202 | }; |
| 1203 | |
| 1204 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
| 1205 | positive, shift that token. If negative, reduce the rule which |
| 1206 | number is the opposite. If zero, do what YYDEFACT says. |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1207 | If YYTABLE_NINF, syntax error. */ |
| 1208 | #define YYTABLE_NINF -281 |
| 1209 | static const yytype_int16 yytable[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1210 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1211 | 18, 287, 289, 126, 201, 6, 18, 187, 437, 6, |
| 1212 | 188, 13, 335, 136, 347, 13, 462, 134, 188, 13, |
| 1213 | 291, 189, 195, 463, 13, 14, 145, 95, 7, 189, |
| 1214 | 218, 51, 295, 365, 367, 368, 197, 198, 464, 371, |
| 1215 | 372, 351, 146, 67, 90, 351, 50, 168, 51, 10, |
| 1216 | 320, 169, 67, 13, 14, 219, 22, 463, 66, 89, |
| 1217 | 13, 463, 186, 50, 293, 294, 19, 66, 296, 88, |
| 1218 | 197, 198, 464, 90, 197, 198, 464, 13, 145, 13, |
| 1219 | 13, 177, 178, 1, 2, 13, 67, 382, 89, 96, |
| 1220 | 46, 361, 408, 363, 146, 13, 177, 178, 88, 125, |
| 1221 | 130, 66, 31, 153, 393, 351, 418, 174, 175, 176, |
| 1222 | 13, 177, 178, 344, 179, 180, 342, 344, 32, -84, |
| 1223 | 428, 125, 147, 33, 15, 125, 407, 167, 470, 364, |
| 1224 | 201, 391, 187, 347, 465, 188, 433, 297, 302, 190, |
| 1225 | 196, 308, 166, 188, 377, 439, 189, 210, 195, 336, |
| 1226 | 295, 181, 311, 20, 189, 34, 188, 202, 344, 154, |
| 1227 | 231, 233, 209, 125, 390, 218, 125, 189, 465, 472, |
| 1228 | 36, 312, 465, 155, 147, 230, 232, 344, 191, -25, |
| 1229 | 47, 456, 41, 422, 313, 125, 296, 186, 286, 35, |
| 1230 | 219, 471, 182, 191, 471, 192, 37, 348, 234, 175, |
| 1231 | 235, 13, 177, 178, 236, 179, 180, 13, 315, 172, |
| 1232 | 13, 218, 446, 1, 2, 440, 125, 39, 441, 174, |
| 1233 | 175, 176, 13, 177, 178, 40, 179, 180, 1, 2, |
| 1234 | 366, 52, 160, 316, 288, 457, 219, 293, 294, 458, |
| 1235 | 1, 2, 240, 161, 13, 177, 178, 23, 13, 60, |
| 1236 | 1, 2, 53, 319, 1, 2, 24, 381, 56, 295, |
| 1237 | 92, 273, 404, 181, 190, 274, 196, 337, 57, 58, |
| 1238 | 409, 341, 210, 434, 349, 100, 357, 25, 357, 26, |
| 1239 | 275, 204, 209, 245, 276, 210, 59, 209, 27, 101, |
| 1240 | 102, 93, 305, 402, 431, 296, 306, 403, 432, 97, |
| 1241 | 209, 103, 68, 104, 182, 105, 444, 224, 225, 98, |
| 1242 | 445, 1, 2, 197, 198, 106, 348, 125, 436, 107, |
| 1243 | 132, 205, 137, 108, 323, 324, 109, 70, 71, 72, |
| 1244 | -280, 317, 318, 400, -280, 138, 125, 110, 73, 326, |
| 1245 | 327, 139, 111, 74, 112, 75, 113, 140, 411, 142, |
| 1246 | 411, 197, 198, 76, 141, 114, 115, 101, 102, 148, |
| 1247 | 416, 417, 77, 152, 78, 149, 452, 453, 150, 79, |
| 1248 | 116, 80, 81, 82, 425, 157, 165, 172, 170, 171, |
| 1249 | 203, 228, 117, 277, 430, 278, 279, 283, 284, 282, |
| 1250 | 281, 337, 285, 349, 290, 292, 309, 357, 310, 322, |
| 1251 | 321, 329, 330, 339, 13, 343, 209, 234, 175, 235, |
| 1252 | 13, 177, 178, 236, 179, 180, 1, 2, 430, 332, |
| 1253 | 362, 358, 360, 237, 369, 373, 378, 357, 380, 379, |
| 1254 | 219, 384, 386, 385, 387, 425, 394, 238, 239, 461, |
| 1255 | 234, 175, 235, 13, 177, 178, 236, 179, 180, 397, |
| 1256 | 398, 240, 241, 234, 175, 235, 13, 177, 178, 236, |
| 1257 | 179, 180, 1, 2, 399, 405, 406, 242, 401, 237, |
| 1258 | 412, 414, 407, 415, 419, 421, 243, 426, 427, 442, |
| 1259 | 8, 449, 163, 21, 240, 38, 244, 99, 94, 91, |
| 1260 | 131, 173, 245, 216, 333, 229, 359, 240, 241, 392, |
| 1261 | 438, 246, 451, 435, 307, 469, 350, 376, 247, 248, |
| 1262 | 338, 249, 303, 242, 443, 383, 389, 304, 447, 388, |
| 1263 | 455, 450, 243, 331, 448, 245, 334, 413, 0, 0, |
| 1264 | 0, 0, 244, 0, 0, 13, 0, 0, 245, 0, |
| 1265 | 0, 1, 2, 0, 0, 0, 0, 246, 0, 0, |
| 1266 | 0, 0, 0, 0, 68, 0, 0, 249, 234, 175, |
| 1267 | 235, 13, 177, 178, 236, 179, 180, 1, 2, 69, |
| 1268 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, |
| 1269 | 71, 72, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1270 | 73, 0, 0, 0, 0, 74, 0, 75, 0, 0, |
| 1271 | 0, 0, 240, 241, 0, 76, 0, 0, 0, 0, |
| 1272 | 0, 0, 0, 0, 77, 0, 78, 0, 242, 0, |
| 1273 | 0, 79, 0, 80, 81, 82, 0, 243, 0, 0, |
| 1274 | 0, 0, 0, 101, 102, 0, 0, 244, 0, 0, |
| 1275 | 0, 211, 0, 245, 0, 103, 68, 104, 0, 105, |
| 1276 | 212, 0, 246, 0, 0, 0, 0, 0, 0, 106, |
| 1277 | 0, 0, 249, 107, 0, 0, 0, 108, 0, 0, |
| 1278 | 109, 70, 71, 72, 0, 0, 0, 0, 0, 213, |
| 1279 | 0, 110, 73, 0, 0, 0, 111, 74, 112, 75, |
| 1280 | 113, 0, 0, 0, 0, 0, 0, 76, 0, 114, |
| 1281 | 115, 214, 215, 0, 0, 0, 77, 0, 78, 1, |
| 1282 | 2, 0, 0, 79, 116, 80, 81, 82, 0, 0, |
| 1283 | 0, 103, 68, 104, 0, 105, 0, 0, 0, 0, |
| 1284 | 0, 0, 0, 0, 0, 106, 0, 0, 0, 107, |
| 1285 | 0, 0, 0, 108, 0, 0, 109, 70, 71, 72, |
| 1286 | 0, 0, 0, 0, 0, 0, 0, 110, 73, 0, |
| 1287 | 0, 0, 111, 74, 112, 75, 113, 0, 0, 0, |
| 1288 | 0, 0, 0, 76, 0, 114, 115, 0, 0, 0, |
| 1289 | 0, 0, 77, 0, 78, 0, 0, 0, 0, 79, |
| 1290 | 116, 80, 81, 82 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1291 | }; |
| 1292 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1293 | static const yytype_int16 yycheck[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1294 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1295 | 10, 214, 215, 90, 152, 0, 16, 149, 4, 4, |
| 1296 | 149, 11, 277, 100, 284, 11, 5, 35, 157, 11, |
| 1297 | 219, 149, 150, 6, 11, 12, 117, 53, 0, 157, |
| 1298 | 87, 41, 40, 297, 298, 299, 19, 20, 21, 303, |
| 1299 | 304, 37, 117, 53, 54, 37, 41, 111, 58, 110, |
| 1300 | 249, 115, 62, 11, 12, 112, 112, 6, 53, 54, |
| 1301 | 11, 6, 149, 58, 18, 19, 41, 62, 76, 54, |
| 1302 | 19, 20, 21, 83, 19, 20, 21, 11, 169, 11, |
| 1303 | 11, 12, 13, 17, 18, 11, 96, 314, 83, 115, |
| 1304 | 24, 290, 356, 292, 169, 11, 12, 13, 83, 117, |
| 1305 | 95, 96, 12, 26, 331, 37, 370, 8, 9, 10, |
| 1306 | 11, 12, 13, 109, 15, 16, 282, 109, 64, 111, |
| 1307 | 120, 117, 117, 91, 111, 117, 115, 137, 111, 295, |
| 1308 | 278, 330, 274, 403, 117, 274, 401, 224, 225, 149, |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 1309 | 150, 228, 137, 282, 309, 409, 274, 157, 276, 277, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1310 | 40, 52, 239, 111, 282, 91, 295, 152, 109, 82, |
| 1311 | 170, 171, 157, 117, 329, 87, 117, 295, 117, 118, |
| 1312 | 91, 108, 117, 96, 169, 170, 171, 109, 109, 46, |
| 1313 | 114, 22, 49, 109, 121, 117, 76, 274, 110, 60, |
| 1314 | 112, 466, 93, 109, 469, 111, 3, 284, 8, 9, |
| 1315 | 10, 11, 12, 13, 14, 15, 16, 11, 9, 110, |
| 1316 | 11, 87, 425, 17, 18, 410, 117, 113, 413, 8, |
| 1317 | 9, 10, 11, 12, 13, 28, 15, 16, 17, 18, |
| 1318 | 120, 46, 48, 243, 110, 76, 112, 18, 19, 80, |
| 1319 | 17, 18, 52, 59, 11, 12, 13, 18, 11, 53, |
| 1320 | 17, 18, 61, 248, 17, 18, 27, 67, 114, 40, |
| 1321 | 111, 111, 349, 52, 274, 115, 276, 277, 114, 115, |
| 1322 | 357, 281, 282, 401, 284, 3, 286, 48, 288, 50, |
| 1323 | 111, 70, 277, 93, 115, 295, 110, 282, 59, 17, |
| 1324 | 18, 114, 111, 111, 111, 76, 115, 115, 115, 110, |
| 1325 | 295, 29, 30, 31, 93, 33, 111, 19, 20, 18, |
| 1326 | 115, 17, 18, 19, 20, 43, 403, 117, 405, 47, |
| 1327 | 111, 110, 120, 51, 106, 107, 54, 55, 56, 57, |
| 1328 | 111, 36, 37, 343, 115, 88, 117, 65, 66, 104, |
| 1329 | 105, 88, 70, 71, 72, 73, 74, 78, 358, 88, |
| 1330 | 360, 19, 20, 81, 58, 83, 84, 17, 18, 3, |
| 1331 | 19, 20, 90, 120, 92, 110, 440, 441, 110, 97, |
| 1332 | 98, 99, 100, 101, 384, 3, 110, 110, 116, 116, |
| 1333 | 12, 3, 110, 112, 394, 120, 118, 42, 110, 116, |
| 1334 | 120, 401, 75, 403, 112, 112, 103, 407, 32, 115, |
| 1335 | 111, 103, 112, 7, 11, 32, 401, 8, 9, 10, |
| 1336 | 11, 12, 13, 14, 15, 16, 17, 18, 428, 110, |
| 1337 | 113, 75, 75, 24, 95, 102, 110, 437, 108, 121, |
| 1338 | 112, 110, 113, 111, 109, 445, 122, 38, 39, 449, |
| 1339 | 8, 9, 10, 11, 12, 13, 14, 15, 16, 113, |
| 1340 | 113, 52, 53, 8, 9, 10, 11, 12, 13, 14, |
| 1341 | 15, 16, 17, 18, 7, 75, 111, 68, 119, 24, |
| 1342 | 111, 113, 115, 113, 89, 121, 77, 115, 113, 110, |
| 1343 | 4, 120, 130, 16, 52, 29, 87, 83, 62, 58, |
| 1344 | 96, 148, 93, 158, 274, 169, 288, 52, 53, 67, |
| 1345 | 407, 102, 437, 403, 228, 465, 285, 306, 109, 110, |
| 1346 | 278, 112, 225, 68, 420, 317, 328, 225, 426, 325, |
| 1347 | 445, 432, 77, 259, 428, 93, 276, 360, -1, -1, |
| 1348 | -1, -1, 87, -1, -1, 11, -1, -1, 93, -1, |
| 1349 | -1, 17, 18, -1, -1, -1, -1, 102, -1, -1, |
| 1350 | -1, -1, -1, -1, 30, -1, -1, 112, 8, 9, |
| 1351 | 10, 11, 12, 13, 14, 15, 16, 17, 18, 45, |
| 1352 | -1, -1, -1, -1, -1, -1, -1, -1, -1, 55, |
| 1353 | 56, 57, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1354 | 66, -1, -1, -1, -1, 71, -1, 73, -1, -1, |
| 1355 | -1, -1, 52, 53, -1, 81, -1, -1, -1, -1, |
| 1356 | -1, -1, -1, -1, 90, -1, 92, -1, 68, -1, |
| 1357 | -1, 97, -1, 99, 100, 101, -1, 77, -1, -1, |
| 1358 | -1, -1, -1, 17, 18, -1, -1, 87, -1, -1, |
| 1359 | -1, 25, -1, 93, -1, 29, 30, 31, -1, 33, |
| 1360 | 34, -1, 102, -1, -1, -1, -1, -1, -1, 43, |
| 1361 | -1, -1, 112, 47, -1, -1, -1, 51, -1, -1, |
| 1362 | 54, 55, 56, 57, -1, -1, -1, -1, -1, 63, |
| 1363 | -1, 65, 66, -1, -1, -1, 70, 71, 72, 73, |
| 1364 | 74, -1, -1, -1, -1, -1, -1, 81, -1, 83, |
| 1365 | 84, 85, 86, -1, -1, -1, 90, -1, 92, 17, |
| 1366 | 18, -1, -1, 97, 98, 99, 100, 101, -1, -1, |
| 1367 | -1, 29, 30, 31, -1, 33, -1, -1, -1, -1, |
| 1368 | -1, -1, -1, -1, -1, 43, -1, -1, -1, 47, |
| 1369 | -1, -1, -1, 51, -1, -1, 54, 55, 56, 57, |
| 1370 | -1, -1, -1, -1, -1, -1, -1, 65, 66, -1, |
| 1371 | -1, -1, 70, 71, 72, 73, 74, -1, -1, -1, |
| 1372 | -1, -1, -1, 81, -1, 83, 84, -1, -1, -1, |
| 1373 | -1, -1, 90, -1, 92, -1, -1, -1, -1, 97, |
| 1374 | 98, 99, 100, 101 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1375 | }; |
| 1376 | |
| 1377 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
| 1378 | symbol of state STATE-NUM. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1379 | static const yytype_uint8 yystos[] = |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1380 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1381 | 0, 17, 18, 124, 125, 126, 241, 0, 126, 127, |
| 1382 | 110, 128, 129, 11, 12, 111, 130, 131, 244, 41, |
| 1383 | 111, 131, 112, 18, 27, 48, 50, 59, 132, 133, |
| 1384 | 134, 12, 64, 91, 91, 60, 91, 3, 134, 113, |
| 1385 | 28, 49, 135, 136, 148, 149, 24, 114, 150, 151, |
| 1386 | 241, 244, 46, 61, 140, 141, 114, 114, 115, 110, |
| 1387 | 53, 142, 143, 145, 146, 147, 241, 244, 30, 45, |
| 1388 | 55, 56, 57, 66, 71, 73, 81, 90, 92, 97, |
| 1389 | 99, 100, 101, 137, 138, 153, 155, 185, 195, 241, |
| 1390 | 244, 151, 111, 114, 145, 53, 115, 110, 18, 138, |
| 1391 | 3, 17, 18, 29, 31, 33, 43, 47, 51, 54, |
| 1392 | 65, 70, 72, 74, 83, 84, 98, 110, 154, 179, |
| 1393 | 192, 193, 194, 195, 242, 117, 175, 236, 237, 238, |
| 1394 | 241, 147, 111, 139, 35, 165, 175, 120, 88, 88, |
| 1395 | 78, 58, 88, 156, 157, 192, 193, 241, 3, 110, |
| 1396 | 110, 231, 120, 26, 82, 96, 239, 3, 176, 177, |
| 1397 | 48, 59, 240, 129, 144, 110, 241, 244, 111, 115, |
| 1398 | 116, 116, 110, 152, 8, 9, 10, 12, 13, 15, |
| 1399 | 16, 52, 93, 152, 158, 159, 175, 188, 190, 234, |
| 1400 | 244, 109, 111, 232, 233, 234, 244, 19, 20, 180, |
| 1401 | 181, 182, 241, 12, 70, 110, 186, 188, 189, 241, |
| 1402 | 244, 25, 34, 63, 85, 86, 154, 178, 87, 112, |
| 1403 | 198, 199, 200, 201, 19, 20, 167, 168, 3, 157, |
| 1404 | 241, 244, 241, 244, 8, 10, 14, 24, 38, 39, |
| 1405 | 52, 53, 68, 77, 87, 93, 102, 109, 110, 112, |
| 1406 | 190, 202, 203, 204, 205, 206, 207, 208, 209, 210, |
| 1407 | 211, 212, 213, 218, 219, 221, 223, 224, 225, 234, |
| 1408 | 235, 241, 244, 111, 115, 111, 115, 112, 120, 118, |
| 1409 | 187, 120, 116, 42, 110, 75, 110, 198, 110, 198, |
| 1410 | 112, 202, 112, 18, 19, 40, 76, 175, 183, 184, |
| 1411 | 229, 230, 175, 183, 184, 111, 115, 165, 175, 103, |
| 1412 | 32, 175, 108, 121, 222, 9, 244, 36, 37, 241, |
| 1413 | 202, 111, 115, 106, 107, 196, 104, 105, 197, 103, |
| 1414 | 112, 222, 110, 159, 233, 189, 234, 244, 181, 7, |
| 1415 | 191, 244, 186, 32, 109, 163, 164, 174, 175, 244, |
| 1416 | 179, 37, 160, 161, 162, 174, 175, 244, 75, 160, |
| 1417 | 75, 202, 113, 202, 186, 229, 120, 229, 229, 95, |
| 1418 | 166, 229, 229, 102, 169, 170, 168, 207, 110, 121, |
| 1419 | 108, 67, 210, 201, 110, 111, 113, 109, 205, 206, |
| 1420 | 207, 202, 67, 210, 122, 226, 227, 113, 113, 7, |
| 1421 | 244, 119, 111, 115, 175, 75, 111, 115, 229, 175, |
| 1422 | 243, 244, 111, 243, 113, 113, 19, 20, 229, 89, |
| 1423 | 220, 121, 109, 214, 215, 244, 115, 113, 120, 228, |
| 1424 | 244, 111, 115, 189, 234, 164, 175, 4, 162, 229, |
| 1425 | 236, 236, 110, 191, 111, 115, 198, 203, 228, 120, |
| 1426 | 227, 161, 177, 177, 171, 215, 22, 76, 80, 216, |
| 1427 | 217, 244, 5, 6, 21, 117, 172, 173, 182, 172, |
| 1428 | 111, 173, 118 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1429 | }; |
| 1430 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1431 | #define yyerrok (yyerrstatus = 0) |
| 1432 | #define yyclearin (yychar = YYEMPTY) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1433 | #define YYEMPTY (-2) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1434 | #define YYEOF 0 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1435 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1436 | #define YYACCEPT goto yyacceptlab |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1437 | #define YYABORT goto yyabortlab |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1438 | #define YYERROR goto yyerrorlab |
| 1439 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1440 | |
| 1441 | /* Like YYERROR except do call yyerror. This remains here temporarily |
| 1442 | to ease the transition to the new meaning of YYERROR, for GCC. |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1443 | Once GCC version 2 has supplanted version 1, this can go. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1444 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1445 | #define YYFAIL goto yyerrlab |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1446 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1447 | #define YYRECOVERING() (!!yyerrstatus) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1448 | |
| 1449 | #define YYBACKUP(Token, Value) \ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1450 | do \ |
| 1451 | if (yychar == YYEMPTY && yylen == 1) \ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1452 | { \ |
| 1453 | yychar = (Token); \ |
| 1454 | yylval = (Value); \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1455 | yytoken = YYTRANSLATE (yychar); \ |
| 1456 | YYPOPSTACK (1); \ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1457 | goto yybackup; \ |
| 1458 | } \ |
| 1459 | else \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1460 | { \ |
| 1461 | yyerror (YY_("syntax error: cannot back up")); \ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1462 | YYERROR; \ |
| 1463 | } \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1464 | while (YYID (0)) |
| 1465 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1466 | |
| 1467 | #define YYTERROR 1 |
| 1468 | #define YYERRCODE 256 |
| 1469 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1470 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1471 | /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. |
| 1472 | If N is 0, then set CURRENT to the empty location which ends |
| 1473 | the previous symbol: RHS[0] (always defined). */ |
| 1474 | |
| 1475 | #define YYRHSLOC(Rhs, K) ((Rhs)[K]) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1476 | #ifndef YYLLOC_DEFAULT |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1477 | # define YYLLOC_DEFAULT(Current, Rhs, N) \ |
| 1478 | do \ |
| 1479 | if (YYID (N)) \ |
| 1480 | { \ |
| 1481 | (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ |
| 1482 | (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ |
| 1483 | (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ |
| 1484 | (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ |
| 1485 | } \ |
| 1486 | else \ |
| 1487 | { \ |
| 1488 | (Current).first_line = (Current).last_line = \ |
| 1489 | YYRHSLOC (Rhs, 0).last_line; \ |
| 1490 | (Current).first_column = (Current).last_column = \ |
| 1491 | YYRHSLOC (Rhs, 0).last_column; \ |
| 1492 | } \ |
| 1493 | while (YYID (0)) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1494 | #endif |
| 1495 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1496 | |
| 1497 | /* YY_LOCATION_PRINT -- Print the location on the stream. |
| 1498 | This macro was not mandated originally: define only if we know |
| 1499 | we won't break user code: when these are the locations we know. */ |
| 1500 | |
| 1501 | #ifndef YY_LOCATION_PRINT |
| 1502 | # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL |
| 1503 | # define YY_LOCATION_PRINT(File, Loc) \ |
| 1504 | fprintf (File, "%d.%d-%d.%d", \ |
| 1505 | (Loc).first_line, (Loc).first_column, \ |
| 1506 | (Loc).last_line, (Loc).last_column) |
| 1507 | # else |
| 1508 | # define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
| 1509 | # endif |
| 1510 | #endif |
| 1511 | |
| 1512 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1513 | /* YYLEX -- calling `yylex' with the right arguments. */ |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 1514 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1515 | #ifdef YYLEX_PARAM |
| 1516 | # define YYLEX yylex (YYLEX_PARAM) |
| 1517 | #else |
| 1518 | # define YYLEX yylex () |
| 1519 | #endif |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 1520 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1521 | /* Enable debugging if requested. */ |
| 1522 | #if YYDEBUG |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 1523 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1524 | # ifndef YYFPRINTF |
| 1525 | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
| 1526 | # define YYFPRINTF fprintf |
| 1527 | # endif |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 1528 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1529 | # define YYDPRINTF(Args) \ |
| 1530 | do { \ |
| 1531 | if (yydebug) \ |
| 1532 | YYFPRINTF Args; \ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1533 | } while (YYID (0)) |
| 1534 | |
| 1535 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
| 1536 | do { \ |
| 1537 | if (yydebug) \ |
| 1538 | { \ |
| 1539 | YYFPRINTF (stderr, "%s ", Title); \ |
| 1540 | yy_symbol_print (stderr, \ |
| 1541 | Type, Value); \ |
| 1542 | YYFPRINTF (stderr, "\n"); \ |
| 1543 | } \ |
| 1544 | } while (YYID (0)) |
| 1545 | |
| 1546 | |
| 1547 | /*--------------------------------. |
| 1548 | | Print this symbol on YYOUTPUT. | |
| 1549 | `--------------------------------*/ |
| 1550 | |
| 1551 | /*ARGSUSED*/ |
| 1552 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1553 | || defined __cplusplus || defined _MSC_VER) |
| 1554 | static void |
| 1555 | yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
| 1556 | #else |
| 1557 | static void |
| 1558 | yy_symbol_value_print (yyoutput, yytype, yyvaluep) |
| 1559 | FILE *yyoutput; |
| 1560 | int yytype; |
| 1561 | YYSTYPE const * const yyvaluep; |
| 1562 | #endif |
| 1563 | { |
| 1564 | if (!yyvaluep) |
| 1565 | return; |
| 1566 | # ifdef YYPRINT |
| 1567 | if (yytype < YYNTOKENS) |
| 1568 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); |
| 1569 | # else |
| 1570 | YYUSE (yyoutput); |
| 1571 | # endif |
| 1572 | switch (yytype) |
| 1573 | { |
| 1574 | default: |
| 1575 | break; |
| 1576 | } |
| 1577 | } |
| 1578 | |
| 1579 | |
| 1580 | /*--------------------------------. |
| 1581 | | Print this symbol on YYOUTPUT. | |
| 1582 | `--------------------------------*/ |
| 1583 | |
| 1584 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1585 | || defined __cplusplus || defined _MSC_VER) |
| 1586 | static void |
| 1587 | yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
| 1588 | #else |
| 1589 | static void |
| 1590 | yy_symbol_print (yyoutput, yytype, yyvaluep) |
| 1591 | FILE *yyoutput; |
| 1592 | int yytype; |
| 1593 | YYSTYPE const * const yyvaluep; |
| 1594 | #endif |
| 1595 | { |
| 1596 | if (yytype < YYNTOKENS) |
| 1597 | YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); |
| 1598 | else |
| 1599 | YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); |
| 1600 | |
| 1601 | yy_symbol_value_print (yyoutput, yytype, yyvaluep); |
| 1602 | YYFPRINTF (yyoutput, ")"); |
| 1603 | } |
| 1604 | |
| 1605 | /*------------------------------------------------------------------. |
| 1606 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | |
| 1607 | | TOP (included). | |
| 1608 | `------------------------------------------------------------------*/ |
| 1609 | |
| 1610 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1611 | || defined __cplusplus || defined _MSC_VER) |
| 1612 | static void |
| 1613 | yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) |
| 1614 | #else |
| 1615 | static void |
| 1616 | yy_stack_print (bottom, top) |
| 1617 | yytype_int16 *bottom; |
| 1618 | yytype_int16 *top; |
| 1619 | #endif |
| 1620 | { |
| 1621 | YYFPRINTF (stderr, "Stack now"); |
| 1622 | for (; bottom <= top; ++bottom) |
| 1623 | YYFPRINTF (stderr, " %d", *bottom); |
| 1624 | YYFPRINTF (stderr, "\n"); |
| 1625 | } |
| 1626 | |
| 1627 | # define YY_STACK_PRINT(Bottom, Top) \ |
| 1628 | do { \ |
| 1629 | if (yydebug) \ |
| 1630 | yy_stack_print ((Bottom), (Top)); \ |
| 1631 | } while (YYID (0)) |
| 1632 | |
| 1633 | |
| 1634 | /*------------------------------------------------. |
| 1635 | | Report that the YYRULE is going to be reduced. | |
| 1636 | `------------------------------------------------*/ |
| 1637 | |
| 1638 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1639 | || defined __cplusplus || defined _MSC_VER) |
| 1640 | static void |
| 1641 | yy_reduce_print (YYSTYPE *yyvsp, int yyrule) |
| 1642 | #else |
| 1643 | static void |
| 1644 | yy_reduce_print (yyvsp, yyrule) |
| 1645 | YYSTYPE *yyvsp; |
| 1646 | int yyrule; |
| 1647 | #endif |
| 1648 | { |
| 1649 | int yynrhs = yyr2[yyrule]; |
| 1650 | int yyi; |
| 1651 | unsigned long int yylno = yyrline[yyrule]; |
| 1652 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", |
| 1653 | yyrule - 1, yylno); |
| 1654 | /* The symbols being reduced. */ |
| 1655 | for (yyi = 0; yyi < yynrhs; yyi++) |
| 1656 | { |
| 1657 | fprintf (stderr, " $%d = ", yyi + 1); |
| 1658 | yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], |
| 1659 | &(yyvsp[(yyi + 1) - (yynrhs)]) |
| 1660 | ); |
| 1661 | fprintf (stderr, "\n"); |
| 1662 | } |
| 1663 | } |
| 1664 | |
| 1665 | # define YY_REDUCE_PRINT(Rule) \ |
| 1666 | do { \ |
| 1667 | if (yydebug) \ |
| 1668 | yy_reduce_print (yyvsp, Rule); \ |
| 1669 | } while (YYID (0)) |
| 1670 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1671 | /* Nonzero means print parse trace. It is left uninitialized so that |
| 1672 | multiple parsers can coexist. */ |
| 1673 | int yydebug; |
| 1674 | #else /* !YYDEBUG */ |
| 1675 | # define YYDPRINTF(Args) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1676 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
| 1677 | # define YY_STACK_PRINT(Bottom, Top) |
| 1678 | # define YY_REDUCE_PRINT(Rule) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1679 | #endif /* !YYDEBUG */ |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 1680 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1681 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1682 | /* YYINITDEPTH -- initial size of the parser's stacks. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1683 | #ifndef YYINITDEPTH |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1684 | # define YYINITDEPTH 200 |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1685 | #endif |
| 1686 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1687 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
| 1688 | if the built-in stack extension method is used). |
| 1689 | |
| 1690 | Do not make this value too large; the results are undefined if |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1691 | YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1692 | evaluated with infinite-precision integer arithmetic. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1693 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1694 | #ifndef YYMAXDEPTH |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1695 | # define YYMAXDEPTH 10000 |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1696 | #endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1697 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1698 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1699 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1700 | #if YYERROR_VERBOSE |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1701 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1702 | # ifndef yystrlen |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1703 | # if defined __GLIBC__ && defined _STRING_H |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1704 | # define yystrlen strlen |
| 1705 | # else |
| 1706 | /* Return the length of YYSTR. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1707 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1708 | || defined __cplusplus || defined _MSC_VER) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1709 | static YYSIZE_T |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1710 | yystrlen (const char *yystr) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1711 | #else |
| 1712 | static YYSIZE_T |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1713 | yystrlen (yystr) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1714 | const char *yystr; |
| 1715 | #endif |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 1716 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1717 | YYSIZE_T yylen; |
| 1718 | for (yylen = 0; yystr[yylen]; yylen++) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1719 | continue; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1720 | return yylen; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1721 | } |
| 1722 | # endif |
| 1723 | # endif |
| 1724 | |
| 1725 | # ifndef yystpcpy |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1726 | # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1727 | # define yystpcpy stpcpy |
| 1728 | # else |
| 1729 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
| 1730 | YYDEST. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1731 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1732 | || defined __cplusplus || defined _MSC_VER) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1733 | static char * |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1734 | yystpcpy (char *yydest, const char *yysrc) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1735 | #else |
| 1736 | static char * |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1737 | yystpcpy (yydest, yysrc) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1738 | char *yydest; |
| 1739 | const char *yysrc; |
| 1740 | #endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1741 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1742 | char *yyd = yydest; |
| 1743 | const char *yys = yysrc; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1744 | |
| 1745 | while ((*yyd++ = *yys++) != '\0') |
| 1746 | continue; |
| 1747 | |
| 1748 | return yyd - 1; |
| 1749 | } |
| 1750 | # endif |
| 1751 | # endif |
| 1752 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1753 | # ifndef yytnamerr |
| 1754 | /* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
| 1755 | quotes and backslashes, so that it's suitable for yyerror. The |
| 1756 | heuristic is that double-quoting is unnecessary unless the string |
| 1757 | contains an apostrophe, a comma, or backslash (other than |
| 1758 | backslash-backslash). YYSTR is taken from yytname. If YYRES is |
| 1759 | null, do not copy; instead, return the length of what the result |
| 1760 | would have been. */ |
| 1761 | static YYSIZE_T |
| 1762 | yytnamerr (char *yyres, const char *yystr) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1763 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1764 | if (*yystr == '"') |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1765 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1766 | YYSIZE_T yyn = 0; |
| 1767 | char const *yyp = yystr; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1768 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1769 | for (;;) |
| 1770 | switch (*++yyp) |
| 1771 | { |
| 1772 | case '\'': |
| 1773 | case ',': |
| 1774 | goto do_not_strip_quotes; |
| 1775 | |
| 1776 | case '\\': |
| 1777 | if (*++yyp != '\\') |
| 1778 | goto do_not_strip_quotes; |
| 1779 | /* Fall through. */ |
| 1780 | default: |
| 1781 | if (yyres) |
| 1782 | yyres[yyn] = *yyp; |
| 1783 | yyn++; |
| 1784 | break; |
| 1785 | |
| 1786 | case '"': |
| 1787 | if (yyres) |
| 1788 | yyres[yyn] = '\0'; |
| 1789 | return yyn; |
| 1790 | } |
| 1791 | do_not_strip_quotes: ; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1792 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1793 | |
| 1794 | if (! yyres) |
| 1795 | return yystrlen (yystr); |
| 1796 | |
| 1797 | return yystpcpy (yyres, yystr) - yyres; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1798 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1799 | # endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1800 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1801 | /* Copy into YYRESULT an error message about the unexpected token |
| 1802 | YYCHAR while in state YYSTATE. Return the number of bytes copied, |
| 1803 | including the terminating null byte. If YYRESULT is null, do not |
| 1804 | copy anything; just return the number of bytes that would be |
| 1805 | copied. As a special case, return 0 if an ordinary "syntax error" |
| 1806 | message will do. Return YYSIZE_MAXIMUM if overflow occurs during |
| 1807 | size calculation. */ |
| 1808 | static YYSIZE_T |
| 1809 | yysyntax_error (char *yyresult, int yystate, int yychar) |
| 1810 | { |
| 1811 | int yyn = yypact[yystate]; |
| 1812 | |
| 1813 | if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) |
| 1814 | return 0; |
| 1815 | else |
| 1816 | { |
| 1817 | int yytype = YYTRANSLATE (yychar); |
| 1818 | YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); |
| 1819 | YYSIZE_T yysize = yysize0; |
| 1820 | YYSIZE_T yysize1; |
| 1821 | int yysize_overflow = 0; |
| 1822 | enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
| 1823 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
| 1824 | int yyx; |
| 1825 | |
| 1826 | # if 0 |
| 1827 | /* This is so xgettext sees the translatable formats that are |
| 1828 | constructed on the fly. */ |
| 1829 | YY_("syntax error, unexpected %s"); |
| 1830 | YY_("syntax error, unexpected %s, expecting %s"); |
| 1831 | YY_("syntax error, unexpected %s, expecting %s or %s"); |
| 1832 | YY_("syntax error, unexpected %s, expecting %s or %s or %s"); |
| 1833 | YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); |
| 1834 | # endif |
| 1835 | char *yyfmt; |
| 1836 | char const *yyf; |
| 1837 | static char const yyunexpected[] = "syntax error, unexpected %s"; |
| 1838 | static char const yyexpecting[] = ", expecting %s"; |
| 1839 | static char const yyor[] = " or %s"; |
| 1840 | char yyformat[sizeof yyunexpected |
| 1841 | + sizeof yyexpecting - 1 |
| 1842 | + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) |
| 1843 | * (sizeof yyor - 1))]; |
| 1844 | char const *yyprefix = yyexpecting; |
| 1845 | |
| 1846 | /* Start YYX at -YYN if negative to avoid negative indexes in |
| 1847 | YYCHECK. */ |
| 1848 | int yyxbegin = yyn < 0 ? -yyn : 0; |
| 1849 | |
| 1850 | /* Stay within bounds of both yycheck and yytname. */ |
| 1851 | int yychecklim = YYLAST - yyn + 1; |
| 1852 | int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
| 1853 | int yycount = 1; |
| 1854 | |
| 1855 | yyarg[0] = yytname[yytype]; |
| 1856 | yyfmt = yystpcpy (yyformat, yyunexpected); |
| 1857 | |
| 1858 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
| 1859 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) |
| 1860 | { |
| 1861 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
| 1862 | { |
| 1863 | yycount = 1; |
| 1864 | yysize = yysize0; |
| 1865 | yyformat[sizeof yyunexpected - 1] = '\0'; |
| 1866 | break; |
| 1867 | } |
| 1868 | yyarg[yycount++] = yytname[yyx]; |
| 1869 | yysize1 = yysize + yytnamerr (0, yytname[yyx]); |
| 1870 | yysize_overflow |= (yysize1 < yysize); |
| 1871 | yysize = yysize1; |
| 1872 | yyfmt = yystpcpy (yyfmt, yyprefix); |
| 1873 | yyprefix = yyor; |
| 1874 | } |
| 1875 | |
| 1876 | yyf = YY_(yyformat); |
| 1877 | yysize1 = yysize + yystrlen (yyf); |
| 1878 | yysize_overflow |= (yysize1 < yysize); |
| 1879 | yysize = yysize1; |
| 1880 | |
| 1881 | if (yysize_overflow) |
| 1882 | return YYSIZE_MAXIMUM; |
| 1883 | |
| 1884 | if (yyresult) |
| 1885 | { |
| 1886 | /* Avoid sprintf, as that infringes on the user's name space. |
| 1887 | Don't have undefined behavior even if the translation |
| 1888 | produced a string with the wrong number of "%s"s. */ |
| 1889 | char *yyp = yyresult; |
| 1890 | int yyi = 0; |
| 1891 | while ((*yyp = *yyf) != '\0') |
| 1892 | { |
| 1893 | if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) |
| 1894 | { |
| 1895 | yyp += yytnamerr (yyp, yyarg[yyi++]); |
| 1896 | yyf += 2; |
| 1897 | } |
| 1898 | else |
| 1899 | { |
| 1900 | yyp++; |
| 1901 | yyf++; |
| 1902 | } |
| 1903 | } |
| 1904 | } |
| 1905 | return yysize; |
| 1906 | } |
| 1907 | } |
| 1908 | #endif /* YYERROR_VERBOSE */ |
| 1909 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1910 | |
| 1911 | /*-----------------------------------------------. |
| 1912 | | Release the memory associated to this symbol. | |
| 1913 | `-----------------------------------------------*/ |
| 1914 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1915 | /*ARGSUSED*/ |
| 1916 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1917 | || defined __cplusplus || defined _MSC_VER) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1918 | static void |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1919 | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1920 | #else |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1921 | static void |
| 1922 | yydestruct (yymsg, yytype, yyvaluep) |
| 1923 | const char *yymsg; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1924 | int yytype; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1925 | YYSTYPE *yyvaluep; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1926 | #endif |
| 1927 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1928 | YYUSE (yyvaluep); |
| 1929 | |
| 1930 | if (!yymsg) |
| 1931 | yymsg = "Deleting"; |
| 1932 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1933 | |
| 1934 | switch (yytype) |
| 1935 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1936 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1937 | default: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1938 | break; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1939 | } |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 1940 | } |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 1941 | |
| 1942 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1943 | /* Prevent warnings from -Wmissing-prototypes. */ |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 1944 | |
| 1945 | #ifdef YYPARSE_PARAM |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1946 | #if defined __STDC__ || defined __cplusplus |
| 1947 | int yyparse (void *YYPARSE_PARAM); |
| 1948 | #else |
| 1949 | int yyparse (); |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 1950 | #endif |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1951 | #else /* ! YYPARSE_PARAM */ |
| 1952 | #if defined __STDC__ || defined __cplusplus |
| 1953 | int yyparse (void); |
| 1954 | #else |
| 1955 | int yyparse (); |
| 1956 | #endif |
| 1957 | #endif /* ! YYPARSE_PARAM */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1958 | |
| 1959 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1960 | |
| 1961 | /* The look-ahead symbol. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1962 | int yychar; |
| 1963 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1964 | /* The semantic value of the look-ahead symbol. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1965 | YYSTYPE yylval; |
| 1966 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1967 | /* Number of syntax errors so far. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1968 | int yynerrs; |
| 1969 | |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 1970 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1971 | |
| 1972 | /*----------. |
| 1973 | | yyparse. | |
| 1974 | `----------*/ |
| 1975 | |
| 1976 | #ifdef YYPARSE_PARAM |
| 1977 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1978 | || defined __cplusplus || defined _MSC_VER) |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 1979 | int |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1980 | yyparse (void *YYPARSE_PARAM) |
| 1981 | #else |
| 1982 | int |
| 1983 | yyparse (YYPARSE_PARAM) |
| 1984 | void *YYPARSE_PARAM; |
| 1985 | #endif |
| 1986 | #else /* ! YYPARSE_PARAM */ |
| 1987 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1988 | || defined __cplusplus || defined _MSC_VER) |
| 1989 | int |
| 1990 | yyparse (void) |
| 1991 | #else |
| 1992 | int |
| 1993 | yyparse () |
| 1994 | |
| 1995 | #endif |
| 1996 | #endif |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 1997 | { |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 1998 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1999 | int yystate; |
| 2000 | int yyn; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2001 | int yyresult; |
| 2002 | /* Number of tokens to shift before error messages enabled. */ |
| 2003 | int yyerrstatus; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2004 | /* Look-ahead token as an internal (translated) token number. */ |
| 2005 | int yytoken = 0; |
| 2006 | #if YYERROR_VERBOSE |
| 2007 | /* Buffer for error messages, and its allocated size. */ |
| 2008 | char yymsgbuf[128]; |
| 2009 | char *yymsg = yymsgbuf; |
| 2010 | YYSIZE_T yymsg_alloc = sizeof yymsgbuf; |
| 2011 | #endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2012 | |
| 2013 | /* Three stacks and their tools: |
| 2014 | `yyss': related to states, |
| 2015 | `yyvs': related to semantic values, |
| 2016 | `yyls': related to locations. |
| 2017 | |
| 2018 | Refer to the stacks thru separate pointers, to allow yyoverflow |
| 2019 | to reallocate them elsewhere. */ |
| 2020 | |
| 2021 | /* The state stack. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2022 | yytype_int16 yyssa[YYINITDEPTH]; |
| 2023 | yytype_int16 *yyss = yyssa; |
| 2024 | yytype_int16 *yyssp; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2025 | |
| 2026 | /* The semantic value stack. */ |
| 2027 | YYSTYPE yyvsa[YYINITDEPTH]; |
| 2028 | YYSTYPE *yyvs = yyvsa; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2029 | YYSTYPE *yyvsp; |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 2030 | |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 2031 | |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 2032 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2033 | #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2034 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2035 | YYSIZE_T yystacksize = YYINITDEPTH; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2036 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2037 | /* The variables used to return semantic value and location from the |
| 2038 | action routines. */ |
| 2039 | YYSTYPE yyval; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2040 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2041 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2042 | /* The number of symbols on the RHS of the reduced rule. |
| 2043 | Keep to zero when no symbol should be popped. */ |
| 2044 | int yylen = 0; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2045 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2046 | YYDPRINTF ((stderr, "Starting parse\n")); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2047 | |
| 2048 | yystate = 0; |
| 2049 | yyerrstatus = 0; |
| 2050 | yynerrs = 0; |
| 2051 | yychar = YYEMPTY; /* Cause a token to be read. */ |
| 2052 | |
| 2053 | /* Initialize stack pointers. |
| 2054 | Waste one element of value and location stack |
| 2055 | so that they stay on the same level as the state stack. |
| 2056 | The wasted elements are never initialized. */ |
| 2057 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2058 | yyssp = yyss; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2059 | yyvsp = yyvs; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2060 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2061 | goto yysetstate; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2062 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2063 | /*------------------------------------------------------------. |
| 2064 | | yynewstate -- Push a new state, which is found in yystate. | |
| 2065 | `------------------------------------------------------------*/ |
| 2066 | yynewstate: |
| 2067 | /* In all cases, when you get here, the value and location stacks |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2068 | have just been pushed. So pushing a state here evens the stacks. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2069 | yyssp++; |
| 2070 | |
| 2071 | yysetstate: |
| 2072 | *yyssp = yystate; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2073 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2074 | if (yyss + yystacksize - 1 <= yyssp) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2075 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2076 | /* Get the current used size of the three stacks, in elements. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2077 | YYSIZE_T yysize = yyssp - yyss + 1; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2078 | |
| 2079 | #ifdef yyoverflow |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2080 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2081 | /* Give user a chance to reallocate the stack. Use copies of |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2082 | these so that the &'s don't force the real ones into |
| 2083 | memory. */ |
| 2084 | YYSTYPE *yyvs1 = yyvs; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2085 | yytype_int16 *yyss1 = yyss; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2086 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2087 | |
| 2088 | /* Each stack pointer address is followed by the size of the |
| 2089 | data in use in that stack, in bytes. This used to be a |
| 2090 | conditional around just the two extra args, but that might |
| 2091 | be undefined if yyoverflow is a macro. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2092 | yyoverflow (YY_("memory exhausted"), |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2093 | &yyss1, yysize * sizeof (*yyssp), |
| 2094 | &yyvs1, yysize * sizeof (*yyvsp), |
| 2095 | |
| 2096 | &yystacksize); |
| 2097 | |
| 2098 | yyss = yyss1; |
| 2099 | yyvs = yyvs1; |
| 2100 | } |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2101 | #else /* no yyoverflow */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2102 | # ifndef YYSTACK_RELOCATE |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2103 | goto yyexhaustedlab; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2104 | # else |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2105 | /* Extend the stack our own way. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2106 | if (YYMAXDEPTH <= yystacksize) |
| 2107 | goto yyexhaustedlab; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2108 | yystacksize *= 2; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2109 | if (YYMAXDEPTH < yystacksize) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2110 | yystacksize = YYMAXDEPTH; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2111 | |
| 2112 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2113 | yytype_int16 *yyss1 = yyss; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2114 | union yyalloc *yyptr = |
| 2115 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
| 2116 | if (! yyptr) |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2117 | goto yyexhaustedlab; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2118 | YYSTACK_RELOCATE (yyss); |
| 2119 | YYSTACK_RELOCATE (yyvs); |
| 2120 | |
| 2121 | # undef YYSTACK_RELOCATE |
| 2122 | if (yyss1 != yyssa) |
| 2123 | YYSTACK_FREE (yyss1); |
| 2124 | } |
| 2125 | # endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2126 | #endif /* no yyoverflow */ |
| 2127 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2128 | yyssp = yyss + yysize - 1; |
| 2129 | yyvsp = yyvs + yysize - 1; |
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 | |
| 2132 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
| 2133 | (unsigned long int) yystacksize)); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2134 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2135 | if (yyss + yystacksize - 1 <= yyssp) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2136 | YYABORT; |
| 2137 | } |
| 2138 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2139 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2140 | |
| 2141 | goto yybackup; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2142 | |
| 2143 | /*-----------. |
| 2144 | | yybackup. | |
| 2145 | `-----------*/ |
| 2146 | yybackup: |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2147 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2148 | /* Do appropriate processing given the current state. Read a |
| 2149 | look-ahead token if we need one and don't already have one. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2150 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2151 | /* First try to decide what to do without reference to look-ahead token. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2152 | yyn = yypact[yystate]; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2153 | if (yyn == YYPACT_NINF) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2154 | goto yydefault; |
| 2155 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2156 | /* Not known => get a look-ahead token if don't already have one. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2157 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2158 | /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2159 | if (yychar == YYEMPTY) |
| 2160 | { |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2161 | YYDPRINTF ((stderr, "Reading a token: ")); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2162 | yychar = YYLEX; |
| 2163 | } |
| 2164 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2165 | if (yychar <= YYEOF) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2166 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2167 | yychar = yytoken = YYEOF; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2168 | YYDPRINTF ((stderr, "Now at end of input.\n")); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2169 | } |
| 2170 | else |
| 2171 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2172 | yytoken = YYTRANSLATE (yychar); |
| 2173 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2174 | } |
| 2175 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2176 | /* 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] | 2177 | detect an error, take that action. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2178 | yyn += yytoken; |
| 2179 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2180 | goto yydefault; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2181 | yyn = yytable[yyn]; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2182 | if (yyn <= 0) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2183 | { |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2184 | if (yyn == 0 || yyn == YYTABLE_NINF) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2185 | goto yyerrlab; |
| 2186 | yyn = -yyn; |
| 2187 | goto yyreduce; |
| 2188 | } |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2189 | |
| 2190 | if (yyn == YYFINAL) |
| 2191 | YYACCEPT; |
| 2192 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2193 | /* Count tokens shifted since error; after three, turn off error |
| 2194 | status. */ |
| 2195 | if (yyerrstatus) |
| 2196 | yyerrstatus--; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2197 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2198 | /* Shift the look-ahead token. */ |
| 2199 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
| 2200 | |
| 2201 | /* Discard the shifted token unless it is eof. */ |
| 2202 | if (yychar != YYEOF) |
| 2203 | yychar = YYEMPTY; |
| 2204 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2205 | yystate = yyn; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2206 | *++yyvsp = yylval; |
| 2207 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2208 | goto yynewstate; |
| 2209 | |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 2210 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2211 | /*-----------------------------------------------------------. |
| 2212 | | yydefault -- do the default action for the current state. | |
| 2213 | `-----------------------------------------------------------*/ |
| 2214 | yydefault: |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2215 | yyn = yydefact[yystate]; |
| 2216 | if (yyn == 0) |
| 2217 | goto yyerrlab; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2218 | goto yyreduce; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2219 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2220 | |
| 2221 | /*-----------------------------. |
| 2222 | | yyreduce -- Do a reduction. | |
| 2223 | `-----------------------------*/ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2224 | yyreduce: |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2225 | /* yyn is the number of a rule to reduce with. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2226 | yylen = yyr2[yyn]; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2227 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2228 | /* If YYLEN is nonzero, implement the default value of the action: |
| 2229 | `$$ = $1'. |
| 2230 | |
| 2231 | Otherwise, the following line sets YYVAL to garbage. |
| 2232 | This behavior is undocumented and Bison |
| 2233 | users should not rely upon it. Assigning to YYVAL |
| 2234 | unconditionally makes the parser a bit smaller, and it avoids a |
| 2235 | GCC warning that YYVAL may be used uninitialized. */ |
| 2236 | yyval = yyvsp[1-yylen]; |
| 2237 | |
| 2238 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2239 | YY_REDUCE_PRINT (yyn); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2240 | switch (yyn) |
| 2241 | { |
| 2242 | case 2: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2243 | #line 357 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2244 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2245 | *(void **)param = (yyvsp[(1) - (1)].a_grammar); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2246 | } |
| 2247 | break; |
| 2248 | |
| 2249 | case 3: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2250 | #line 363 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2251 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2252 | (yyval.a_grammar) = asn1p_new(); |
| 2253 | checkmem((yyval.a_grammar)); |
| 2254 | 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] | 2255 | } |
| 2256 | break; |
| 2257 | |
| 2258 | case 4: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2259 | #line 368 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2260 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2261 | (yyval.a_grammar) = (yyvsp[(1) - (2)].a_grammar); |
| 2262 | 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] | 2263 | } |
| 2264 | break; |
| 2265 | |
| 2266 | case 5: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2267 | #line 385 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2268 | { currentModule = asn1p_module_new(); } |
| 2269 | break; |
| 2270 | |
| 2271 | case 6: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2272 | #line 390 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2273 | { |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 2274 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2275 | (yyval.a_module) = currentModule; |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2276 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2277 | if((yyvsp[(8) - (9)].a_module)) { |
| 2278 | asn1p_module_t tmp = *((yyval.a_module)); |
| 2279 | *((yyval.a_module)) = *((yyvsp[(8) - (9)].a_module)); |
| 2280 | *((yyvsp[(8) - (9)].a_module)) = tmp; |
| 2281 | asn1p_module_free((yyvsp[(8) - (9)].a_module)); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2282 | } else { |
| 2283 | /* There's a chance that a module is just plain empty */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2284 | } |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2285 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2286 | (yyval.a_module)->ModuleName = (yyvsp[(1) - (9)].tv_str); |
| 2287 | (yyval.a_module)->module_oid = (yyvsp[(3) - (9)].a_oid); |
| 2288 | (yyval.a_module)->module_flags = (yyvsp[(5) - (9)].a_module_flags); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2289 | } |
| 2290 | break; |
| 2291 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2292 | case 7: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2293 | #line 414 "asn1p_y.y" |
| 2294 | { (yyval.a_oid) = 0; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2295 | break; |
| 2296 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2297 | case 8: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2298 | #line 415 "asn1p_y.y" |
| 2299 | { (yyval.a_oid) = (yyvsp[(1) - (1)].a_oid); } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2300 | break; |
| 2301 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2302 | case 9: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2303 | #line 419 "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_oid) = (yyvsp[(2) - (3)].a_oid); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2306 | } |
| 2307 | break; |
| 2308 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2309 | case 10: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2310 | #line 422 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2311 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2312 | (yyval.a_oid) = 0; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2313 | } |
| 2314 | break; |
| 2315 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2316 | case 11: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2317 | #line 428 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2318 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2319 | (yyval.a_oid) = asn1p_oid_new(); |
| 2320 | asn1p_oid_add_arc((yyval.a_oid), &(yyvsp[(1) - (1)].a_oid_arc)); |
| 2321 | if((yyvsp[(1) - (1)].a_oid_arc).name) |
| 2322 | free((yyvsp[(1) - (1)].a_oid_arc).name); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2323 | } |
| 2324 | break; |
| 2325 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2326 | case 12: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2327 | #line 434 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2328 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2329 | (yyval.a_oid) = (yyvsp[(1) - (2)].a_oid); |
| 2330 | asn1p_oid_add_arc((yyval.a_oid), &(yyvsp[(2) - (2)].a_oid_arc)); |
| 2331 | if((yyvsp[(2) - (2)].a_oid_arc).name) |
| 2332 | free((yyvsp[(2) - (2)].a_oid_arc).name); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2333 | } |
| 2334 | break; |
| 2335 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2336 | case 13: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2337 | #line 443 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2338 | { /* iso */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2339 | (yyval.a_oid_arc).name = (yyvsp[(1) - (1)].tv_str); |
| 2340 | (yyval.a_oid_arc).number = -1; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2341 | } |
| 2342 | break; |
| 2343 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2344 | case 14: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2345 | #line 447 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2346 | { /* iso(1) */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2347 | (yyval.a_oid_arc).name = (yyvsp[(1) - (4)].tv_str); |
| 2348 | (yyval.a_oid_arc).number = (yyvsp[(3) - (4)].a_int); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2349 | } |
| 2350 | break; |
| 2351 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2352 | case 15: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2353 | #line 451 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2354 | { /* 1 */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2355 | (yyval.a_oid_arc).name = 0; |
| 2356 | (yyval.a_oid_arc).number = (yyvsp[(1) - (1)].a_int); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2357 | } |
| 2358 | break; |
| 2359 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2360 | case 16: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2361 | #line 461 "asn1p_y.y" |
| 2362 | { (yyval.a_module_flags) = MSF_NOFLAGS; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2363 | break; |
| 2364 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2365 | case 17: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2366 | #line 462 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2367 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2368 | (yyval.a_module_flags) = (yyvsp[(1) - (1)].a_module_flags); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2369 | } |
| 2370 | break; |
| 2371 | |
| 2372 | case 18: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2373 | #line 471 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2374 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2375 | (yyval.a_module_flags) = (yyvsp[(1) - (1)].a_module_flags); |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2376 | } |
| 2377 | break; |
| 2378 | |
| 2379 | case 19: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2380 | #line 474 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2381 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2382 | (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] | 2383 | } |
| 2384 | break; |
| 2385 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2386 | case 20: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2387 | #line 483 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2388 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2389 | (yyval.a_module_flags) = MSF_EXPLICIT_TAGS; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2390 | } |
| 2391 | break; |
| 2392 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2393 | case 21: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2394 | #line 486 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2395 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2396 | (yyval.a_module_flags) = MSF_IMPLICIT_TAGS; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2397 | } |
| 2398 | break; |
| 2399 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2400 | case 22: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2401 | #line 489 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2402 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2403 | (yyval.a_module_flags) = MSF_AUTOMATIC_TAGS; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2404 | } |
| 2405 | break; |
| 2406 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2407 | case 23: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2408 | #line 492 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2409 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2410 | (yyval.a_module_flags) = MSF_EXTENSIBILITY_IMPLIED; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2411 | } |
| 2412 | break; |
| 2413 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2414 | case 24: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2415 | #line 496 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2416 | { |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 2417 | /* X.680Amd1 specifies TAG and XER */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2418 | if(strcmp((yyvsp[(1) - (2)].tv_str), "TAG") == 0) { |
| 2419 | (yyval.a_module_flags) = MSF_TAG_INSTRUCTIONS; |
| 2420 | } else if(strcmp((yyvsp[(1) - (2)].tv_str), "XER") == 0) { |
| 2421 | (yyval.a_module_flags) = MSF_XER_INSTRUCTIONS; |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 2422 | } else { |
| 2423 | fprintf(stderr, |
| 2424 | "WARNING: %s INSTRUCTIONS at line %d: " |
| 2425 | "Unrecognized encoding reference\n", |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2426 | (yyvsp[(1) - (2)].tv_str), yylineno); |
| 2427 | (yyval.a_module_flags) = MSF_unk_INSTRUCTIONS; |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 2428 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2429 | free((yyvsp[(1) - (2)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2430 | } |
| 2431 | break; |
| 2432 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2433 | case 25: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2434 | #line 517 "asn1p_y.y" |
| 2435 | { (yyval.a_module) = 0; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2436 | break; |
| 2437 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2438 | case 26: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2439 | #line 518 "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) = (yyvsp[(1) - (1)].a_module); |
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 27: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2446 | #line 527 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2447 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2448 | (yyval.a_module) = asn1p_module_new(); |
| 2449 | AL_IMPORT((yyval.a_module), exports, (yyvsp[(1) - (3)].a_module), xp_next); |
| 2450 | AL_IMPORT((yyval.a_module), imports, (yyvsp[(2) - (3)].a_module), xp_next); |
| 2451 | AL_IMPORT((yyval.a_module), members, (yyvsp[(3) - (3)].a_module), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2452 | } |
| 2453 | break; |
| 2454 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2455 | case 28: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2456 | #line 536 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2457 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2458 | (yyval.a_module) = (yyvsp[(1) - (1)].a_module); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2459 | } |
| 2460 | break; |
| 2461 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2462 | case 29: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2463 | #line 539 "asn1p_y.y" |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2464 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2465 | if((yyvsp[(1) - (2)].a_module)) { |
| 2466 | (yyval.a_module) = (yyvsp[(1) - (2)].a_module); |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2467 | } else { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2468 | (yyval.a_module) = (yyvsp[(2) - (2)].a_module); |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2469 | break; |
| 2470 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2471 | AL_IMPORT((yyval.a_module), members, (yyvsp[(2) - (2)].a_module), next); |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2472 | } |
| 2473 | break; |
| 2474 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2475 | case 30: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2476 | #line 555 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2477 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2478 | (yyval.a_module) = asn1p_module_new(); |
| 2479 | checkmem((yyval.a_module)); |
| 2480 | assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID); |
| 2481 | assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID); |
| 2482 | TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2483 | } |
| 2484 | break; |
| 2485 | |
| 2486 | case 31: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2487 | #line 562 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2488 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2489 | (yyval.a_module) = asn1p_module_new(); |
| 2490 | checkmem((yyval.a_module)); |
| 2491 | assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID); |
| 2492 | assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID); |
| 2493 | TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2494 | } |
| 2495 | break; |
| 2496 | |
| 2497 | case 32: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2498 | #line 575 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2499 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2500 | (yyval.a_module) = asn1p_module_new(); |
| 2501 | checkmem((yyval.a_module)); |
| 2502 | assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID); |
| 2503 | assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID); |
| 2504 | TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next); |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2505 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2506 | break; |
| 2507 | |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2508 | case 33: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2509 | #line 583 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2510 | { asn1p_lexer_hack_push_encoding_control(); } |
| 2511 | break; |
| 2512 | |
| 2513 | case 34: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2514 | #line 584 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2515 | { |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 2516 | fprintf(stderr, |
| 2517 | "WARNING: ENCODING-CONTROL %s " |
| 2518 | "specification at line %d ignored\n", |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2519 | (yyvsp[(2) - (3)].tv_str), yylineno); |
| 2520 | free((yyvsp[(2) - (3)].tv_str)); |
| 2521 | (yyval.a_module) = 0; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2522 | } |
| 2523 | break; |
| 2524 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2525 | case 35: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2526 | #line 596 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2527 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2528 | return yyerror( |
Lev Walkin | 7085305 | 2005-11-26 11:21:55 +0000 | [diff] [blame] | 2529 | "Attempt to redefine a standard basic string type, " |
| 2530 | "please comment out or remove this type redefinition."); |
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 36: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2535 | #line 609 "asn1p_y.y" |
| 2536 | { (yyval.a_module) = 0; } |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2537 | break; |
| 2538 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2539 | case 38: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2540 | #line 613 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2541 | { |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 2542 | if(!saved_aid && 0) |
| 2543 | return yyerror("Unterminated IMPORTS FROM, " |
| 2544 | "expected semicolon ';'"); |
| 2545 | saved_aid = 0; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2546 | (yyval.a_module) = (yyvsp[(2) - (3)].a_module); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2547 | } |
| 2548 | break; |
| 2549 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2550 | case 39: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2551 | #line 623 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2552 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2553 | return yyerror("Empty IMPORTS list"); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2554 | } |
| 2555 | break; |
| 2556 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2557 | case 40: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2558 | #line 629 "asn1p_y.y" |
| 2559 | { (yyval.a_module) = asn1p_module_new(); } |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2560 | break; |
| 2561 | |
| 2562 | case 42: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2563 | #line 633 "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 | 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] | 2568 | } |
| 2569 | break; |
| 2570 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2571 | case 43: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2572 | #line 638 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2573 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2574 | (yyval.a_module) = (yyvsp[(1) - (2)].a_module); |
| 2575 | 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] | 2576 | } |
| 2577 | break; |
| 2578 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2579 | case 44: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2580 | #line 645 "asn1p_y.y" |
| 2581 | { memset(&(yyval.a_aid), 0, sizeof((yyval.a_aid))); } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2582 | break; |
| 2583 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2584 | case 45: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2585 | #line 646 "asn1p_y.y" |
| 2586 | { (yyval.a_aid).oid = (yyvsp[(1) - (1)].a_oid); } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2587 | break; |
| 2588 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2589 | case 46: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2590 | #line 650 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2591 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2592 | (yyval.a_xports) = (yyvsp[(1) - (4)].a_xports); |
| 2593 | (yyval.a_xports)->fromModuleName = (yyvsp[(3) - (4)].tv_str); |
| 2594 | (yyval.a_xports)->identifier = (yyvsp[(4) - (4)].a_aid); |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 2595 | /* This stupid thing is used for look-back hack. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2596 | saved_aid = (yyval.a_xports)->identifier.oid ? 0 : &((yyval.a_xports)->identifier); |
| 2597 | checkmem((yyval.a_xports)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2598 | } |
| 2599 | break; |
| 2600 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2601 | case 47: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2602 | #line 661 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2603 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2604 | (yyval.a_xports) = asn1p_xports_new(); |
| 2605 | checkmem((yyval.a_xports)); |
| 2606 | TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(1) - (1)].a_expr), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2607 | } |
| 2608 | break; |
| 2609 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2610 | case 48: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2611 | #line 666 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2612 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2613 | (yyval.a_xports) = (yyvsp[(1) - (3)].a_xports); |
| 2614 | TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(3) - (3)].a_expr), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2615 | } |
| 2616 | break; |
| 2617 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2618 | case 49: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2619 | #line 673 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2620 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2621 | (yyval.a_expr) = NEW_EXPR(); |
| 2622 | checkmem((yyval.a_expr)); |
| 2623 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str); |
| 2624 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2625 | } |
| 2626 | break; |
| 2627 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2628 | case 50: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2629 | #line 679 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2630 | { /* Completely equivalent to above */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2631 | (yyval.a_expr) = NEW_EXPR(); |
| 2632 | checkmem((yyval.a_expr)); |
| 2633 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 2634 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2635 | } |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2636 | break; |
| 2637 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2638 | case 51: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2639 | #line 685 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2640 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2641 | (yyval.a_expr) = NEW_EXPR(); |
| 2642 | checkmem((yyval.a_expr)); |
| 2643 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str); |
| 2644 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2645 | } |
| 2646 | break; |
| 2647 | |
| 2648 | case 52: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2649 | #line 695 "asn1p_y.y" |
| 2650 | { (yyval.a_module) = 0; } |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2651 | break; |
| 2652 | |
| 2653 | case 53: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2654 | #line 696 "asn1p_y.y" |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2655 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2656 | (yyval.a_module) = asn1p_module_new(); |
| 2657 | checkmem((yyval.a_module)); |
| 2658 | if((yyvsp[(1) - (1)].a_xports)) { |
| 2659 | 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] | 2660 | } else { |
| 2661 | /* "EXPORTS ALL;" */ |
| 2662 | } |
| 2663 | } |
| 2664 | break; |
| 2665 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2666 | case 54: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2667 | #line 708 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2668 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2669 | (yyval.a_xports) = (yyvsp[(2) - (3)].a_xports); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2670 | } |
| 2671 | break; |
| 2672 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2673 | case 55: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2674 | #line 711 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2675 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2676 | (yyval.a_xports) = 0; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2677 | } |
| 2678 | break; |
| 2679 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2680 | case 56: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2681 | #line 714 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2682 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2683 | /* Empty EXPORTS clause effectively prohibits export. */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2684 | (yyval.a_xports) = asn1p_xports_new(); |
| 2685 | checkmem((yyval.a_xports)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2686 | } |
| 2687 | break; |
| 2688 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2689 | case 57: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2690 | #line 722 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2691 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2692 | (yyval.a_xports) = asn1p_xports_new(); |
| 2693 | assert((yyval.a_xports)); |
| 2694 | TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(1) - (1)].a_expr), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2695 | } |
| 2696 | break; |
| 2697 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2698 | case 58: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2699 | #line 727 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2700 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2701 | (yyval.a_xports) = (yyvsp[(1) - (3)].a_xports); |
| 2702 | TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(3) - (3)].a_expr), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2703 | } |
| 2704 | break; |
| 2705 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2706 | case 59: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2707 | #line 734 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2708 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2709 | (yyval.a_expr) = NEW_EXPR(); |
| 2710 | checkmem((yyval.a_expr)); |
| 2711 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str); |
| 2712 | (yyval.a_expr)->expr_type = A1TC_EXPORTVAR; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2713 | } |
| 2714 | break; |
| 2715 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2716 | case 60: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2717 | #line 740 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2718 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2719 | (yyval.a_expr) = NEW_EXPR(); |
| 2720 | checkmem((yyval.a_expr)); |
| 2721 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 2722 | (yyval.a_expr)->expr_type = A1TC_EXPORTVAR; |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2723 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2724 | break; |
| 2725 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2726 | case 61: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2727 | #line 746 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2728 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2729 | (yyval.a_expr) = NEW_EXPR(); |
| 2730 | checkmem((yyval.a_expr)); |
| 2731 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str); |
| 2732 | (yyval.a_expr)->expr_type = A1TC_EXPORTVAR; |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2733 | } |
| 2734 | break; |
| 2735 | |
| 2736 | case 62: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2737 | #line 755 "asn1p_y.y" |
| 2738 | { (yyval.a_constr) = (yyvsp[(2) - (3)].a_constr); } |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2739 | break; |
| 2740 | |
| 2741 | case 63: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2742 | #line 758 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2743 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2744 | (yyval.a_expr) = (yyvsp[(2) - (4)].a_expr); |
| 2745 | assert((yyval.a_expr)->Identifier == 0); |
| 2746 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str); |
| 2747 | (yyval.a_expr)->meta_type = AMT_VALUESET; |
| 2748 | (yyval.a_expr)->constraints = (yyvsp[(4) - (4)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2749 | } |
| 2750 | break; |
| 2751 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2752 | case 64: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2753 | #line 768 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2754 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2755 | (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2756 | } |
| 2757 | break; |
| 2758 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2759 | case 65: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2760 | #line 781 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2761 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2762 | (yyval.a_expr) = NEW_EXPR(); |
| 2763 | checkmem((yyval.a_expr)); |
| 2764 | (yyval.a_expr)->reference = (yyvsp[(1) - (1)].a_ref); |
| 2765 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
| 2766 | (yyval.a_expr)->meta_type = AMT_TYPEREF; |
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 66: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2771 | #line 791 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2772 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2773 | (yyval.a_expr) = NEW_EXPR(); |
| 2774 | checkmem((yyval.a_expr)); |
| 2775 | (yyval.a_expr)->reference = (yyvsp[(1) - (4)].a_ref); |
| 2776 | (yyval.a_expr)->rhs_pspecs = (yyvsp[(3) - (4)].a_expr); |
| 2777 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
| 2778 | (yyval.a_expr)->meta_type = AMT_TYPEREF; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2779 | } |
| 2780 | break; |
| 2781 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2782 | case 67: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2783 | #line 811 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2784 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2785 | (yyval.a_expr) = (yyvsp[(3) - (3)].a_expr); |
| 2786 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 2787 | assert((yyval.a_expr)->expr_type); |
| 2788 | assert((yyval.a_expr)->meta_type); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2789 | } |
| 2790 | break; |
| 2791 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2792 | case 68: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2793 | #line 817 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2794 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2795 | (yyval.a_expr) = (yyvsp[(3) - (3)].a_expr); |
| 2796 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 2797 | assert((yyval.a_expr)->expr_type == A1TC_CLASSDEF); |
| 2798 | assert((yyval.a_expr)->meta_type == AMT_OBJECTCLASS); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2799 | } |
| 2800 | break; |
| 2801 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2802 | case 69: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2803 | #line 833 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2804 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2805 | (yyval.a_expr) = (yyvsp[(6) - (6)].a_expr); |
| 2806 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (6)].tv_str); |
| 2807 | (yyval.a_expr)->lhs_params = (yyvsp[(3) - (6)].a_plist); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2808 | } |
| 2809 | break; |
| 2810 | |
| 2811 | case 70: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2812 | #line 839 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2813 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2814 | (yyval.a_expr) = (yyvsp[(6) - (6)].a_expr); |
| 2815 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (6)].tv_str); |
| 2816 | (yyval.a_expr)->lhs_params = (yyvsp[(3) - (6)].a_plist); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2817 | } |
| 2818 | break; |
| 2819 | |
| 2820 | case 71: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2821 | #line 847 "asn1p_y.y" |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2822 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2823 | int ret; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2824 | (yyval.a_plist) = asn1p_paramlist_new(yylineno); |
| 2825 | checkmem((yyval.a_plist)); |
| 2826 | 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] | 2827 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2828 | if((yyvsp[(1) - (1)].a_parg).governor) asn1p_ref_free((yyvsp[(1) - (1)].a_parg).governor); |
| 2829 | if((yyvsp[(1) - (1)].a_parg).argument) free((yyvsp[(1) - (1)].a_parg).argument); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2830 | } |
| 2831 | break; |
| 2832 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2833 | case 72: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2834 | #line 856 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2835 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2836 | int ret; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2837 | (yyval.a_plist) = (yyvsp[(1) - (3)].a_plist); |
| 2838 | 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] | 2839 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2840 | if((yyvsp[(3) - (3)].a_parg).governor) asn1p_ref_free((yyvsp[(3) - (3)].a_parg).governor); |
| 2841 | if((yyvsp[(3) - (3)].a_parg).argument) free((yyvsp[(3) - (3)].a_parg).argument); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2842 | } |
| 2843 | break; |
| 2844 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2845 | case 73: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2846 | #line 867 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2847 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2848 | (yyval.a_parg).governor = NULL; |
| 2849 | (yyval.a_parg).argument = (yyvsp[(1) - (1)].tv_str); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2850 | } |
| 2851 | break; |
| 2852 | |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2853 | case 74: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2854 | #line 871 "asn1p_y.y" |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2855 | { |
| 2856 | int ret; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2857 | (yyval.a_parg).governor = asn1p_ref_new(yylineno); |
| 2858 | 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] | 2859 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2860 | (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str); |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 2861 | } |
| 2862 | break; |
| 2863 | |
| 2864 | case 75: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2865 | #line 878 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2866 | { |
| 2867 | int ret; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2868 | (yyval.a_parg).governor = asn1p_ref_new(yylineno); |
| 2869 | 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] | 2870 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2871 | (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2872 | } |
| 2873 | break; |
| 2874 | |
| 2875 | case 76: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2876 | #line 885 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2877 | { |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2878 | int ret; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2879 | (yyval.a_parg).governor = asn1p_ref_new(yylineno); |
| 2880 | ret = asn1p_ref_add_component((yyval.a_parg).governor, |
| 2881 | ASN_EXPR_TYPE2STR((yyvsp[(1) - (3)].a_type)), 1); |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2882 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2883 | (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str); |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2884 | } |
| 2885 | break; |
| 2886 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2887 | case 77: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2888 | #line 893 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2889 | { |
| 2890 | int ret; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2891 | (yyval.a_parg).governor = asn1p_ref_new(yylineno); |
| 2892 | ret = asn1p_ref_add_component((yyval.a_parg).governor, |
| 2893 | ASN_EXPR_TYPE2STR((yyvsp[(1) - (3)].a_type)), 1); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2894 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2895 | (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2896 | } |
| 2897 | break; |
| 2898 | |
| 2899 | case 78: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2900 | #line 904 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2901 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2902 | (yyval.a_expr) = NEW_EXPR(); |
| 2903 | checkmem((yyval.a_expr)); |
| 2904 | asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2905 | } |
| 2906 | break; |
| 2907 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2908 | case 79: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2909 | #line 909 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2910 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2911 | (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); |
| 2912 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2913 | } |
| 2914 | break; |
| 2915 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2916 | case 80: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2917 | #line 916 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2918 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2919 | (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2920 | } |
| 2921 | break; |
| 2922 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2923 | case 81: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2924 | #line 919 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2925 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2926 | (yyval.a_expr) = NEW_EXPR(); |
| 2927 | checkmem((yyval.a_expr)); |
| 2928 | (yyval.a_expr)->Identifier = "?"; |
| 2929 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
| 2930 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 2931 | (yyval.a_expr)->value = (yyvsp[(1) - (1)].a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2932 | } |
| 2933 | break; |
| 2934 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2935 | case 82: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2936 | #line 927 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2937 | { |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 2938 | asn1p_ref_t *ref; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2939 | (yyval.a_expr) = NEW_EXPR(); |
| 2940 | checkmem((yyval.a_expr)); |
| 2941 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str); |
| 2942 | (yyval.a_expr)->expr_type = A1TC_REFERENCE; |
| 2943 | (yyval.a_expr)->meta_type = AMT_VALUE; |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 2944 | ref = asn1p_ref_new(yylineno); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2945 | asn1p_ref_add_component(ref, (yyvsp[(1) - (1)].tv_str), RLT_lowercase); |
| 2946 | (yyval.a_expr)->value = asn1p_value_fromref(ref, 0); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2947 | } |
| 2948 | break; |
| 2949 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2950 | case 83: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2951 | #line 938 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2952 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2953 | (yyval.a_expr) = NEW_EXPR(); |
| 2954 | (yyval.a_expr)->expr_type = A1TC_VALUESET; |
| 2955 | (yyval.a_expr)->meta_type = AMT_VALUESET; |
| 2956 | (yyval.a_expr)->constraints = (yyvsp[(1) - (1)].a_constr); |
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 84: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2961 | #line 961 "asn1p_y.y" |
| 2962 | { (yyval.a_expr) = NEW_EXPR(); } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2963 | break; |
| 2964 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2965 | case 85: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2966 | #line 962 "asn1p_y.y" |
| 2967 | { (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); } |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 2968 | break; |
| 2969 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2970 | case 86: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2971 | #line 965 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2972 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2973 | (yyval.a_expr) = NEW_EXPR(); |
| 2974 | checkmem((yyval.a_expr)); |
| 2975 | asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2976 | } |
| 2977 | break; |
| 2978 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2979 | case 87: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2980 | #line 970 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2981 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2982 | (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); |
| 2983 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2984 | } |
| 2985 | break; |
| 2986 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2987 | case 88: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2988 | #line 974 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2989 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2990 | (yyval.a_expr) = (yyvsp[(1) - (5)].a_expr); |
| 2991 | asn1p_expr_add_many((yyval.a_expr), (yyvsp[(4) - (5)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2992 | } |
| 2993 | break; |
| 2994 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 2995 | case 89: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2996 | #line 981 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2997 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 2998 | (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr); |
| 2999 | assert((yyval.a_expr)->Identifier == 0); |
| 3000 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 3001 | (yyvsp[(3) - (3)].a_marker).flags |= (yyval.a_expr)->marker.flags; |
| 3002 | (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3003 | } |
| 3004 | break; |
| 3005 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3006 | case 90: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3007 | #line 988 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3008 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3009 | (yyval.a_expr) = (yyvsp[(1) - (2)].a_expr); |
| 3010 | (yyvsp[(2) - (2)].a_marker).flags |= (yyval.a_expr)->marker.flags; |
| 3011 | (yyval.a_expr)->marker = (yyvsp[(2) - (2)].a_marker); |
| 3012 | _fixup_anonymous_identifier((yyval.a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3013 | } |
| 3014 | break; |
| 3015 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3016 | case 91: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3017 | #line 994 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3018 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3019 | (yyval.a_expr) = NEW_EXPR(); |
| 3020 | checkmem((yyval.a_expr)); |
| 3021 | (yyval.a_expr)->meta_type = (yyvsp[(3) - (3)].a_expr)->meta_type; |
| 3022 | (yyval.a_expr)->expr_type = A1TC_COMPONENTS_OF; |
| 3023 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3024 | } |
| 3025 | break; |
| 3026 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3027 | case 92: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3028 | #line 1001 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3029 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3030 | (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3031 | } |
| 3032 | break; |
| 3033 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3034 | case 93: |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 3035 | #line 1007 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3036 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3037 | (yyval.a_expr) = NEW_EXPR(); |
| 3038 | checkmem((yyval.a_expr)); |
| 3039 | asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3040 | } |
| 3041 | break; |
| 3042 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3043 | case 94: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3044 | #line 1012 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3045 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3046 | (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); |
| 3047 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3048 | } |
| 3049 | break; |
| 3050 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3051 | case 95: |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 3052 | #line 1019 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3053 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3054 | (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr); |
| 3055 | assert((yyval.a_expr)->Identifier == 0); |
| 3056 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (2)].tv_str); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3057 | } |
| 3058 | break; |
| 3059 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3060 | case 96: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3061 | #line 1024 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3062 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3063 | (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3064 | } |
| 3065 | break; |
| 3066 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3067 | case 97: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3068 | #line 1027 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3069 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3070 | (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); |
| 3071 | _fixup_anonymous_identifier((yyval.a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3072 | } |
| 3073 | break; |
| 3074 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3075 | case 98: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3076 | #line 1034 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3077 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3078 | (yyval.a_expr) = (yyvsp[(3) - (5)].a_expr); |
| 3079 | checkmem((yyval.a_expr)); |
| 3080 | (yyval.a_expr)->with_syntax = (yyvsp[(5) - (5)].a_wsynt); |
| 3081 | assert((yyval.a_expr)->expr_type == A1TC_CLASSDEF); |
| 3082 | assert((yyval.a_expr)->meta_type == AMT_OBJECTCLASS); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3083 | } |
| 3084 | break; |
| 3085 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3086 | case 99: |
| 3087 | #line 1044 "asn1p_y.y" |
| 3088 | { (yyval.a_int) = 0; } |
| 3089 | break; |
| 3090 | |
| 3091 | case 100: |
| 3092 | #line 1045 "asn1p_y.y" |
| 3093 | { (yyval.a_int) = 1; } |
| 3094 | break; |
| 3095 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3096 | case 101: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3097 | #line 1049 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3098 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3099 | (yyval.a_expr) = NEW_EXPR(); |
| 3100 | checkmem((yyval.a_expr)); |
| 3101 | (yyval.a_expr)->expr_type = A1TC_CLASSDEF; |
| 3102 | (yyval.a_expr)->meta_type = AMT_OBJECTCLASS; |
| 3103 | asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3104 | } |
| 3105 | break; |
| 3106 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3107 | case 102: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3108 | #line 1056 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3109 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3110 | (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); |
| 3111 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3112 | } |
| 3113 | break; |
| 3114 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3115 | case 103: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3116 | #line 1066 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3117 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3118 | (yyval.a_expr) = NEW_EXPR(); |
| 3119 | checkmem((yyval.a_expr)); |
| 3120 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (2)].tv_str); |
| 3121 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3122 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_TFS; /* TypeFieldSpec */ |
| 3123 | (yyval.a_expr)->marker = (yyvsp[(2) - (2)].a_marker); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3124 | } |
| 3125 | break; |
| 3126 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3127 | case 104: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3128 | #line 1076 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3129 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3130 | (yyval.a_expr) = NEW_EXPR(); |
| 3131 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str); |
| 3132 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3133 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_FTVFS; /* FixedTypeValueFieldSpec */ |
| 3134 | (yyval.a_expr)->unique = (yyvsp[(3) - (4)].a_int); |
| 3135 | (yyval.a_expr)->marker = (yyvsp[(4) - (4)].a_marker); |
| 3136 | asn1p_expr_add((yyval.a_expr), (yyvsp[(2) - (4)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3137 | } |
| 3138 | break; |
| 3139 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3140 | case 105: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3141 | #line 1087 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3142 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3143 | (yyval.a_expr) = NEW_EXPR(); |
| 3144 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 3145 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3146 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_VTVFS; |
| 3147 | (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref); |
| 3148 | (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker); |
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 106: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3153 | #line 1097 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3154 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3155 | (yyval.a_expr) = NEW_EXPR(); |
| 3156 | checkmem((yyval.a_expr)); |
| 3157 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 3158 | (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref); |
| 3159 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3160 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_OFS; |
| 3161 | (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3162 | } |
| 3163 | break; |
| 3164 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3165 | case 107: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3166 | #line 1108 "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) = NEW_EXPR(); |
| 3169 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 3170 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3171 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_VTVSFS; |
| 3172 | (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref); |
| 3173 | (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3174 | } |
| 3175 | break; |
| 3176 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3177 | case 108: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3178 | #line 1118 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3179 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3180 | (yyval.a_expr) = NEW_EXPR(); |
| 3181 | checkmem((yyval.a_expr)); |
| 3182 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 3183 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3184 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_FTVSFS; |
| 3185 | asn1p_expr_add((yyval.a_expr), (yyvsp[(2) - (3)].a_expr)); |
| 3186 | (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3187 | } |
| 3188 | break; |
| 3189 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3190 | case 109: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3191 | #line 1129 "asn1p_y.y" |
| 3192 | { |
| 3193 | (yyval.a_expr) = NEW_EXPR(); |
| 3194 | checkmem((yyval.a_expr)); |
| 3195 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); |
| 3196 | (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref); |
| 3197 | (yyval.a_expr)->meta_type = AMT_OBJECTFIELD; |
| 3198 | (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_OSFS; |
| 3199 | (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker); |
| 3200 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3201 | break; |
| 3202 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3203 | case 110: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3204 | #line 1141 "asn1p_y.y" |
| 3205 | { (yyval.a_wsynt) = 0; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3206 | break; |
| 3207 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3208 | case 111: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3209 | #line 1142 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3210 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3211 | (yyval.a_wsynt) = (yyvsp[(1) - (1)].a_wsynt); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3212 | } |
| 3213 | break; |
| 3214 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3215 | case 112: |
| 3216 | #line 1149 "asn1p_y.y" |
| 3217 | { asn1p_lexer_hack_enable_with_syntax(); } |
| 3218 | break; |
| 3219 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3220 | case 113: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3221 | #line 1151 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3222 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3223 | (yyval.a_wsynt) = (yyvsp[(5) - (6)].a_wsynt); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3224 | } |
| 3225 | break; |
| 3226 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3227 | case 114: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3228 | #line 1157 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3229 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3230 | (yyval.a_wsynt) = asn1p_wsyntx_new(); |
| 3231 | TQ_ADD(&((yyval.a_wsynt)->chunks), (yyvsp[(1) - (1)].a_wchunk), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3232 | } |
| 3233 | break; |
| 3234 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3235 | case 115: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3236 | #line 1161 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3237 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3238 | (yyval.a_wsynt) = (yyvsp[(1) - (2)].a_wsynt); |
| 3239 | TQ_ADD(&((yyval.a_wsynt)->chunks), (yyvsp[(2) - (2)].a_wchunk), next); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3240 | } |
| 3241 | break; |
| 3242 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3243 | case 116: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3244 | #line 1168 "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_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].tv_opaque).buf, 0); |
| 3247 | (yyval.a_wchunk)->type = WC_WHITESPACE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3248 | } |
| 3249 | break; |
| 3250 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3251 | case 117: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3252 | #line 1172 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3253 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3254 | (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] | 3255 | } |
| 3256 | break; |
| 3257 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3258 | case 118: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3259 | #line 1175 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3260 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3261 | (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].a_refcomp).name, 0); |
| 3262 | (yyval.a_wchunk)->type = WC_FIELD; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3263 | } |
| 3264 | break; |
| 3265 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 3266 | case 119: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3267 | #line 1179 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 3268 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3269 | (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromsyntax((yyvsp[(2) - (3)].a_wsynt)); |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 3270 | } |
| 3271 | break; |
| 3272 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 3273 | case 120: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3274 | #line 1185 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3275 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3276 | (yyval.a_expr) = NEW_EXPR(); |
| 3277 | checkmem((yyval.a_expr)); |
| 3278 | (yyval.a_expr)->Identifier = strdup("..."); |
| 3279 | checkmem((yyval.a_expr)->Identifier); |
| 3280 | (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE; |
| 3281 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3282 | } |
| 3283 | break; |
| 3284 | |
| 3285 | case 121: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3286 | #line 1193 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3287 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3288 | (yyval.a_expr) = NEW_EXPR(); |
| 3289 | checkmem((yyval.a_expr)); |
| 3290 | (yyval.a_expr)->Identifier = strdup("..."); |
| 3291 | checkmem((yyval.a_expr)->Identifier); |
| 3292 | (yyval.a_expr)->value = (yyvsp[(3) - (3)].a_value); |
| 3293 | (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE; |
| 3294 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3295 | } |
| 3296 | break; |
| 3297 | |
| 3298 | case 122: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3299 | #line 1202 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3300 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3301 | (yyval.a_expr) = NEW_EXPR(); |
| 3302 | checkmem((yyval.a_expr)); |
| 3303 | (yyval.a_expr)->Identifier = strdup("..."); |
| 3304 | (yyval.a_expr)->value = (yyvsp[(3) - (3)].a_value); |
| 3305 | checkmem((yyval.a_expr)->Identifier); |
| 3306 | (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE; |
| 3307 | (yyval.a_expr)->meta_type = AMT_TYPE; |
| 3308 | } |
| 3309 | break; |
| 3310 | |
| 3311 | case 123: |
| 3312 | #line 1214 "asn1p_y.y" |
| 3313 | { |
| 3314 | (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr); |
| 3315 | (yyval.a_expr)->tag = (yyvsp[(1) - (3)].a_tag); |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 3316 | /* |
| 3317 | * Outer constraint for SEQUENCE OF and SET OF applies |
| 3318 | * to the inner type. |
| 3319 | */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3320 | if((yyval.a_expr)->expr_type == ASN_CONSTR_SEQUENCE_OF |
| 3321 | || (yyval.a_expr)->expr_type == ASN_CONSTR_SET_OF) { |
| 3322 | assert(!TQ_FIRST(&((yyval.a_expr)->members))->constraints); |
| 3323 | TQ_FIRST(&((yyval.a_expr)->members))->constraints = (yyvsp[(3) - (3)].a_constr); |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 3324 | } else { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3325 | if((yyval.a_expr)->constraints) { |
| 3326 | assert(!(yyvsp[(2) - (3)].a_expr)); |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 3327 | } else { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3328 | (yyval.a_expr)->constraints = (yyvsp[(3) - (3)].a_constr); |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 3329 | } |
| 3330 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3331 | } |
| 3332 | break; |
| 3333 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3334 | case 124: |
| 3335 | #line 1236 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3336 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3337 | (yyval.a_int) = asn1p_as_pointer ? EM_INDIRECT : 0; |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 3338 | asn1p_as_pointer = 0; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3339 | } |
| 3340 | break; |
| 3341 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3342 | case 125: |
| 3343 | #line 1243 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3344 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3345 | (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr); |
| 3346 | (yyval.a_expr)->marker.flags |= (yyvsp[(1) - (2)].a_int); |
Lev Walkin | fb872bd | 2006-03-18 06:53:11 +0000 | [diff] [blame] | 3347 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3348 | if(((yyval.a_expr)->marker.flags & EM_INDIRECT) |
| 3349 | && ((yyval.a_expr)->marker.flags & EM_OPTIONAL) != EM_OPTIONAL) { |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 3350 | fprintf(stderr, |
| 3351 | "INFO: Directive <ASN1C:RepresentAsPointer> " |
| 3352 | "applied to %s at line %d\n", |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3353 | ASN_EXPR_TYPE2STR((yyval.a_expr)->expr_type) |
| 3354 | ? ASN_EXPR_TYPE2STR((yyval.a_expr)->expr_type) |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 3355 | : "member", |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3356 | (yyval.a_expr)->_lineno |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 3357 | ); |
| 3358 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3359 | } |
| 3360 | break; |
| 3361 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3362 | case 126: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3363 | #line 1262 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3364 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3365 | (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3366 | } |
| 3367 | break; |
| 3368 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3369 | case 127: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3370 | #line 1265 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3371 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3372 | (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr); |
| 3373 | assert((yyval.a_expr)->expr_type == A1TC_INVALID); |
| 3374 | (yyval.a_expr)->expr_type = ASN_CONSTR_CHOICE; |
| 3375 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3376 | } |
| 3377 | break; |
| 3378 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3379 | case 128: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3380 | #line 1271 "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_expr) = (yyvsp[(3) - (4)].a_expr); |
| 3383 | assert((yyval.a_expr)->expr_type == A1TC_INVALID); |
| 3384 | (yyval.a_expr)->expr_type = ASN_CONSTR_SEQUENCE; |
| 3385 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3386 | } |
| 3387 | break; |
| 3388 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3389 | case 129: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3390 | #line 1277 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3391 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3392 | (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr); |
| 3393 | assert((yyval.a_expr)->expr_type == A1TC_INVALID); |
| 3394 | (yyval.a_expr)->expr_type = ASN_CONSTR_SET; |
| 3395 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3396 | } |
| 3397 | break; |
| 3398 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3399 | case 130: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3400 | #line 1283 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3401 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3402 | (yyval.a_expr) = NEW_EXPR(); |
| 3403 | checkmem((yyval.a_expr)); |
| 3404 | (yyval.a_expr)->constraints = (yyvsp[(2) - (6)].a_constr); |
| 3405 | (yyval.a_expr)->expr_type = ASN_CONSTR_SEQUENCE_OF; |
| 3406 | (yyval.a_expr)->meta_type = AMT_TYPE; |
| 3407 | (yyvsp[(6) - (6)].a_expr)->Identifier = (yyvsp[(4) - (6)].tv_str); |
| 3408 | (yyvsp[(6) - (6)].a_expr)->tag = (yyvsp[(5) - (6)].a_tag); |
| 3409 | asn1p_expr_add((yyval.a_expr), (yyvsp[(6) - (6)].a_expr)); |
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 131: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3414 | #line 1293 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3415 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3416 | (yyval.a_expr) = NEW_EXPR(); |
| 3417 | checkmem((yyval.a_expr)); |
| 3418 | (yyval.a_expr)->constraints = (yyvsp[(2) - (6)].a_constr); |
| 3419 | (yyval.a_expr)->expr_type = ASN_CONSTR_SET_OF; |
| 3420 | (yyval.a_expr)->meta_type = AMT_TYPE; |
| 3421 | (yyvsp[(6) - (6)].a_expr)->Identifier = (yyvsp[(4) - (6)].tv_str); |
| 3422 | (yyvsp[(6) - (6)].a_expr)->tag = (yyvsp[(5) - (6)].a_tag); |
| 3423 | asn1p_expr_add((yyval.a_expr), (yyvsp[(6) - (6)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3424 | } |
| 3425 | break; |
| 3426 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3427 | case 132: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3428 | #line 1303 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3429 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3430 | (yyval.a_expr) = NEW_EXPR(); |
| 3431 | checkmem((yyval.a_expr)); |
| 3432 | (yyval.a_expr)->expr_type = ASN_TYPE_ANY; |
| 3433 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3434 | } |
| 3435 | break; |
| 3436 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3437 | case 133: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3438 | #line 1309 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3439 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3440 | int ret; |
| 3441 | (yyval.a_expr) = NEW_EXPR(); |
| 3442 | checkmem((yyval.a_expr)); |
| 3443 | (yyval.a_expr)->reference = asn1p_ref_new(yylineno); |
| 3444 | ret = asn1p_ref_add_component((yyval.a_expr)->reference, |
| 3445 | (yyvsp[(4) - (4)].tv_str), RLT_lowercase); |
| 3446 | checkmem(ret == 0); |
| 3447 | (yyval.a_expr)->expr_type = ASN_TYPE_ANY; |
| 3448 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3449 | } |
| 3450 | break; |
| 3451 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3452 | case 134: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3453 | #line 1320 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +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)->reference = (yyvsp[(3) - (3)].a_ref); |
| 3458 | (yyval.a_expr)->expr_type = A1TC_INSTANCE; |
| 3459 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3460 | } |
| 3461 | break; |
| 3462 | |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 3463 | case 135: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3464 | #line 1335 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3465 | { |
| 3466 | int ret; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3467 | (yyval.a_ref) = asn1p_ref_new(yylineno); |
| 3468 | checkmem((yyval.a_ref)); |
| 3469 | 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] | 3470 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3471 | free((yyvsp[(1) - (1)].tv_str)); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3472 | } |
| 3473 | break; |
| 3474 | |
| 3475 | case 136: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3476 | #line 1343 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3477 | { |
| 3478 | int ret; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3479 | (yyval.a_ref) = asn1p_ref_new(yylineno); |
| 3480 | checkmem((yyval.a_ref)); |
| 3481 | 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] | 3482 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3483 | 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] | 3484 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3485 | free((yyvsp[(1) - (3)].tv_str)); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3486 | } |
| 3487 | break; |
| 3488 | |
| 3489 | case 137: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3490 | #line 1353 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3491 | { |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 3492 | int ret; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3493 | (yyval.a_ref) = asn1p_ref_new(yylineno); |
| 3494 | checkmem((yyval.a_ref)); |
| 3495 | 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] | 3496 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3497 | 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] | 3498 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3499 | free((yyvsp[(1) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3500 | } |
| 3501 | break; |
| 3502 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3503 | case 138: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3504 | #line 1363 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3505 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3506 | int ret; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3507 | (yyval.a_ref) = asn1p_ref_new(yylineno); |
| 3508 | checkmem((yyval.a_ref)); |
| 3509 | 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] | 3510 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3511 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_lowercase); |
| 3512 | checkmem(ret == 0); |
| 3513 | free((yyvsp[(1) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3514 | } |
| 3515 | break; |
| 3516 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3517 | case 139: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3518 | #line 1373 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3519 | { |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 3520 | int ret; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3521 | (yyval.a_ref) = asn1p_ref_new(yylineno); |
| 3522 | checkmem((yyval.a_ref)); |
| 3523 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_CAPITALS); |
| 3524 | free((yyvsp[(1) - (1)].tv_str)); |
| 3525 | checkmem(ret == 0); |
| 3526 | } |
| 3527 | break; |
| 3528 | |
| 3529 | case 140: |
| 3530 | #line 1381 "asn1p_y.y" |
| 3531 | { |
| 3532 | int ret; |
| 3533 | (yyval.a_ref) = (yyvsp[(3) - (3)].a_ref); |
| 3534 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_CAPITALS); |
| 3535 | free((yyvsp[(1) - (3)].tv_str)); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3536 | checkmem(ret == 0); |
| 3537 | /* |
| 3538 | * Move the last element infront. |
| 3539 | */ |
| 3540 | { |
| 3541 | struct asn1p_ref_component_s tmp_comp; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3542 | tmp_comp = (yyval.a_ref)->components[(yyval.a_ref)->comp_count-1]; |
| 3543 | memmove(&(yyval.a_ref)->components[1], |
| 3544 | &(yyval.a_ref)->components[0], |
| 3545 | sizeof((yyval.a_ref)->components[0]) |
| 3546 | * ((yyval.a_ref)->comp_count - 1)); |
| 3547 | (yyval.a_ref)->components[0] = tmp_comp; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3548 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3549 | } |
| 3550 | break; |
| 3551 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3552 | case 141: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3553 | #line 1403 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3554 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3555 | int ret; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3556 | (yyval.a_ref) = asn1p_ref_new(yylineno); |
| 3557 | checkmem((yyval.a_ref)); |
| 3558 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].a_refcomp).name, (yyvsp[(1) - (1)].a_refcomp).lex_type); |
| 3559 | free((yyvsp[(1) - (1)].a_refcomp).name); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3560 | checkmem(ret == 0); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3561 | } |
| 3562 | break; |
| 3563 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3564 | case 142: |
| 3565 | #line 1411 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3566 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3567 | int ret; |
| 3568 | (yyval.a_ref) = (yyvsp[(1) - (3)].a_ref); |
| 3569 | ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].a_refcomp).name, (yyvsp[(3) - (3)].a_refcomp).lex_type); |
| 3570 | free((yyvsp[(3) - (3)].a_refcomp).name); |
| 3571 | checkmem(ret == 0); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3572 | } |
| 3573 | break; |
| 3574 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3575 | case 144: |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 3576 | #line 1424 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3577 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3578 | (yyval.a_refcomp).lex_type = RLT_AmpUppercase; |
| 3579 | (yyval.a_refcomp).name = (yyvsp[(1) - (1)].tv_str); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3580 | } |
| 3581 | break; |
| 3582 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3583 | case 145: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3584 | #line 1429 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3585 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3586 | (yyval.a_refcomp).lex_type = RLT_Amplowercase; |
| 3587 | (yyval.a_refcomp).name = (yyvsp[(1) - (1)].tv_str); |
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 146: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3592 | #line 1438 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3593 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3594 | (yyval.a_ref) = asn1p_ref_new(yylineno); |
| 3595 | asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_AmpUppercase); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3596 | } |
| 3597 | break; |
| 3598 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3599 | case 147: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3600 | #line 1442 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3601 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3602 | (yyval.a_ref) = (yyval.a_ref); |
| 3603 | asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_AmpUppercase); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3604 | } |
| 3605 | break; |
| 3606 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3607 | case 148: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3608 | #line 1446 "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_ref) = (yyval.a_ref); |
| 3611 | asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_Amplowercase); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3612 | } |
| 3613 | break; |
| 3614 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3615 | case 149: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3616 | #line 1453 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3617 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3618 | (yyval.a_ref) = asn1p_ref_new(yylineno); |
| 3619 | asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_CAPITALS); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3620 | } |
| 3621 | break; |
| 3622 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3623 | case 150: |
| 3624 | #line 1473 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3625 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3626 | (yyval.a_expr) = (yyvsp[(2) - (4)].a_expr); |
| 3627 | assert((yyval.a_expr)->Identifier == NULL); |
| 3628 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str); |
| 3629 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 3630 | (yyval.a_expr)->value = (yyvsp[(4) - (4)].a_value); |
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 153: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3635 | #line 1485 "asn1p_y.y" |
| 3636 | { |
| 3637 | (yyval.a_value) = asn1p_value_fromint(0); |
| 3638 | checkmem((yyval.a_value)); |
| 3639 | (yyval.a_value)->type = ATV_CHOICE_IDENTIFIER; |
| 3640 | (yyval.a_value)->value.choice_identifier.identifier = (yyvsp[(1) - (3)].tv_str); |
| 3641 | (yyval.a_value)->value.choice_identifier.value = (yyvsp[(3) - (3)].a_value); |
| 3642 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3643 | break; |
| 3644 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3645 | case 154: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3646 | #line 1492 "asn1p_y.y" |
| 3647 | { asn1p_lexer_hack_push_opaque_state(); } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3648 | break; |
| 3649 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3650 | case 155: |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 3651 | #line 1492 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3652 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3653 | (yyval.a_value) = asn1p_value_frombuf((yyvsp[(3) - (3)].tv_opaque).buf, (yyvsp[(3) - (3)].tv_opaque).len, 0); |
| 3654 | checkmem((yyval.a_value)); |
| 3655 | (yyval.a_value)->type = ATV_UNPARSED; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3656 | } |
| 3657 | break; |
| 3658 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3659 | case 156: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3660 | #line 1497 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3661 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3662 | (yyval.a_value) = asn1p_value_fromint(0); |
| 3663 | checkmem((yyval.a_value)); |
| 3664 | (yyval.a_value)->type = ATV_NULL; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3665 | } |
| 3666 | break; |
| 3667 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3668 | case 157: |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 3669 | #line 1505 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3670 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3671 | (yyval.a_value) = asn1p_value_fromint(0); |
| 3672 | checkmem((yyval.a_value)); |
| 3673 | (yyval.a_value)->type = ATV_FALSE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3674 | } |
| 3675 | break; |
| 3676 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3677 | case 158: |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 3678 | #line 1510 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3679 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3680 | (yyval.a_value) = asn1p_value_fromint(0); |
| 3681 | checkmem((yyval.a_value)); |
| 3682 | (yyval.a_value)->type = ATV_TRUE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3683 | } |
| 3684 | break; |
| 3685 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3686 | case 159: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3687 | #line 1515 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3688 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3689 | (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'B'); |
| 3690 | checkmem((yyval.a_value)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3691 | } |
| 3692 | break; |
| 3693 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3694 | case 160: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3695 | #line 1519 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3696 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3697 | (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'H'); |
| 3698 | checkmem((yyval.a_value)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3699 | } |
| 3700 | break; |
| 3701 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3702 | case 161: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3703 | #line 1523 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3704 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3705 | (yyval.a_value) = (yyval.a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3706 | } |
| 3707 | break; |
| 3708 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3709 | case 162: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3710 | #line 1526 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3711 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3712 | (yyval.a_value) = (yyvsp[(1) - (1)].a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3713 | } |
| 3714 | break; |
| 3715 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3716 | case 163: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3717 | #line 1532 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3718 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3719 | asn1p_ref_t *ref; |
| 3720 | int ret; |
| 3721 | ref = asn1p_ref_new(yylineno); |
| 3722 | checkmem(ref); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3723 | 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] | 3724 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3725 | (yyval.a_value) = asn1p_value_fromref(ref, 0); |
| 3726 | checkmem((yyval.a_value)); |
| 3727 | free((yyvsp[(1) - (1)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3728 | } |
| 3729 | break; |
| 3730 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3731 | case 164: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3732 | #line 1543 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3733 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3734 | asn1p_ref_t *ref; |
| 3735 | int ret; |
| 3736 | ref = asn1p_ref_new(yylineno); |
| 3737 | checkmem(ref); |
| 3738 | ret = asn1p_ref_add_component(ref, (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN); |
| 3739 | checkmem(ret == 0); |
| 3740 | ret = asn1p_ref_add_component(ref, (yyvsp[(3) - (3)].tv_str), RLT_lowercase); |
| 3741 | checkmem(ret == 0); |
| 3742 | (yyval.a_value) = asn1p_value_fromref(ref, 0); |
| 3743 | checkmem((yyval.a_value)); |
| 3744 | free((yyvsp[(1) - (3)].tv_str)); |
| 3745 | free((yyvsp[(3) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3746 | } |
| 3747 | break; |
| 3748 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3749 | case 165: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3750 | #line 1561 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3751 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3752 | (yyval.a_value) = asn1p_value_frombuf((yyvsp[(1) - (1)].tv_opaque).buf, (yyvsp[(1) - (1)].tv_opaque).len, 0); |
| 3753 | checkmem((yyval.a_value)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3754 | } |
| 3755 | break; |
| 3756 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3757 | case 166: |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 3758 | #line 1565 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3759 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3760 | (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int)); |
| 3761 | checkmem((yyval.a_value)); |
| 3762 | (yyval.a_value)->type = ATV_TUPLE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3763 | } |
| 3764 | break; |
| 3765 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3766 | case 167: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3767 | #line 1570 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3768 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3769 | (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int)); |
| 3770 | checkmem((yyval.a_value)); |
| 3771 | (yyval.a_value)->type = ATV_QUADRUPLE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3772 | } |
| 3773 | break; |
| 3774 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3775 | case 168: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3776 | #line 1578 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3777 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3778 | (yyval.tv_opaque).len = (yyvsp[(1) - (1)].tv_opaque).len + 1; |
| 3779 | (yyval.tv_opaque).buf = malloc((yyval.tv_opaque).len + 1); |
| 3780 | checkmem((yyval.tv_opaque).buf); |
| 3781 | (yyval.tv_opaque).buf[0] = '{'; |
| 3782 | memcpy((yyval.tv_opaque).buf + 1, (yyvsp[(1) - (1)].tv_opaque).buf, (yyvsp[(1) - (1)].tv_opaque).len); |
| 3783 | (yyval.tv_opaque).buf[(yyval.tv_opaque).len] = '\0'; |
| 3784 | free((yyvsp[(1) - (1)].tv_opaque).buf); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3785 | } |
| 3786 | break; |
| 3787 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3788 | case 169: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3789 | #line 1587 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3790 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3791 | int newsize = (yyvsp[(1) - (2)].tv_opaque).len + (yyvsp[(2) - (2)].tv_opaque).len; |
| 3792 | char *p = malloc(newsize + 1); |
| 3793 | checkmem(p); |
| 3794 | memcpy(p , (yyvsp[(1) - (2)].tv_opaque).buf, (yyvsp[(1) - (2)].tv_opaque).len); |
| 3795 | memcpy(p + (yyvsp[(1) - (2)].tv_opaque).len, (yyvsp[(2) - (2)].tv_opaque).buf, (yyvsp[(2) - (2)].tv_opaque).len); |
| 3796 | p[newsize] = '\0'; |
| 3797 | free((yyvsp[(1) - (2)].tv_opaque).buf); |
| 3798 | free((yyvsp[(2) - (2)].tv_opaque).buf); |
| 3799 | (yyval.tv_opaque).buf = p; |
| 3800 | (yyval.tv_opaque).len = newsize; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3801 | } |
| 3802 | break; |
| 3803 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3804 | case 170: |
| 3805 | #line 1602 "asn1p_y.y" |
| 3806 | { (yyval.a_type) = ASN_BASIC_BOOLEAN; } |
| 3807 | break; |
| 3808 | |
| 3809 | case 171: |
| 3810 | #line 1603 "asn1p_y.y" |
| 3811 | { (yyval.a_type) = ASN_BASIC_NULL; } |
| 3812 | break; |
| 3813 | |
| 3814 | case 172: |
| 3815 | #line 1604 "asn1p_y.y" |
| 3816 | { (yyval.a_type) = ASN_BASIC_REAL; } |
| 3817 | break; |
| 3818 | |
| 3819 | case 173: |
| 3820 | #line 1605 "asn1p_y.y" |
| 3821 | { (yyval.a_type) = (yyvsp[(1) - (1)].a_type); } |
| 3822 | break; |
| 3823 | |
| 3824 | case 174: |
| 3825 | #line 1606 "asn1p_y.y" |
| 3826 | { (yyval.a_type) = ASN_BASIC_OCTET_STRING; } |
| 3827 | break; |
| 3828 | |
| 3829 | case 175: |
| 3830 | #line 1607 "asn1p_y.y" |
| 3831 | { (yyval.a_type) = ASN_BASIC_OBJECT_IDENTIFIER; } |
| 3832 | break; |
| 3833 | |
| 3834 | case 176: |
| 3835 | #line 1608 "asn1p_y.y" |
| 3836 | { (yyval.a_type) = ASN_BASIC_RELATIVE_OID; } |
| 3837 | break; |
| 3838 | |
| 3839 | case 177: |
| 3840 | #line 1609 "asn1p_y.y" |
| 3841 | { (yyval.a_type) = ASN_BASIC_EXTERNAL; } |
| 3842 | break; |
| 3843 | |
| 3844 | case 178: |
| 3845 | #line 1610 "asn1p_y.y" |
| 3846 | { (yyval.a_type) = ASN_BASIC_EMBEDDED_PDV; } |
| 3847 | break; |
| 3848 | |
| 3849 | case 179: |
| 3850 | #line 1611 "asn1p_y.y" |
| 3851 | { (yyval.a_type) = ASN_BASIC_CHARACTER_STRING; } |
| 3852 | break; |
| 3853 | |
| 3854 | case 180: |
| 3855 | #line 1612 "asn1p_y.y" |
| 3856 | { (yyval.a_type) = ASN_BASIC_UTCTime; } |
| 3857 | break; |
| 3858 | |
| 3859 | case 181: |
| 3860 | #line 1613 "asn1p_y.y" |
| 3861 | { (yyval.a_type) = ASN_BASIC_GeneralizedTime; } |
| 3862 | break; |
| 3863 | |
| 3864 | case 182: |
| 3865 | #line 1614 "asn1p_y.y" |
| 3866 | { (yyval.a_type) = (yyvsp[(1) - (1)].a_type); } |
| 3867 | break; |
| 3868 | |
| 3869 | case 183: |
| 3870 | #line 1621 "asn1p_y.y" |
| 3871 | { (yyval.a_type) = ASN_BASIC_INTEGER; } |
| 3872 | break; |
| 3873 | |
| 3874 | case 184: |
| 3875 | #line 1622 "asn1p_y.y" |
| 3876 | { (yyval.a_type) = ASN_BASIC_ENUMERATED; } |
| 3877 | break; |
| 3878 | |
| 3879 | case 185: |
| 3880 | #line 1623 "asn1p_y.y" |
| 3881 | { (yyval.a_type) = ASN_BASIC_BIT_STRING; } |
| 3882 | break; |
| 3883 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3884 | case 186: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3885 | #line 1627 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3886 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3887 | (yyval.a_expr) = NEW_EXPR(); |
| 3888 | checkmem((yyval.a_expr)); |
| 3889 | (yyval.a_expr)->expr_type = (yyvsp[(1) - (1)].a_type); |
| 3890 | (yyval.a_expr)->meta_type = AMT_TYPE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3891 | } |
| 3892 | break; |
| 3893 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3894 | case 187: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3895 | #line 1633 "asn1p_y.y" |
| 3896 | { |
| 3897 | if((yyvsp[(2) - (2)].a_expr)) { |
| 3898 | (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr); |
| 3899 | } else { |
| 3900 | (yyval.a_expr) = NEW_EXPR(); |
| 3901 | checkmem((yyval.a_expr)); |
| 3902 | } |
| 3903 | (yyval.a_expr)->expr_type = (yyvsp[(1) - (2)].a_type); |
| 3904 | (yyval.a_expr)->meta_type = AMT_TYPE; |
| 3905 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3906 | break; |
| 3907 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3908 | case 188: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3909 | #line 1646 "asn1p_y.y" |
| 3910 | { (yyval.a_type) = ASN_STRING_BMPString; } |
| 3911 | break; |
| 3912 | |
| 3913 | case 189: |
| 3914 | #line 1647 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3915 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3916 | (yyval.a_type) = ASN_STRING_GeneralString; |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 3917 | fprintf(stderr, "WARNING: GeneralString is not fully supported\n"); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3918 | } |
| 3919 | break; |
| 3920 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3921 | case 190: |
| 3922 | #line 1651 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3923 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3924 | (yyval.a_type) = ASN_STRING_GraphicString; |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 3925 | fprintf(stderr, "WARNING: GraphicString is not fully supported\n"); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3926 | } |
| 3927 | break; |
| 3928 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3929 | case 191: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3930 | #line 1655 "asn1p_y.y" |
| 3931 | { (yyval.a_type) = ASN_STRING_IA5String; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3932 | break; |
| 3933 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3934 | case 192: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3935 | #line 1656 "asn1p_y.y" |
| 3936 | { (yyval.a_type) = ASN_STRING_ISO646String; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3937 | break; |
| 3938 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3939 | case 193: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3940 | #line 1657 "asn1p_y.y" |
| 3941 | { (yyval.a_type) = ASN_STRING_NumericString; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3942 | break; |
| 3943 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3944 | case 194: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3945 | #line 1658 "asn1p_y.y" |
| 3946 | { (yyval.a_type) = ASN_STRING_PrintableString; } |
| 3947 | break; |
| 3948 | |
| 3949 | case 195: |
| 3950 | #line 1659 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3951 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3952 | (yyval.a_type) = ASN_STRING_T61String; |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 3953 | fprintf(stderr, "WARNING: T61String is not fully supported\n"); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3954 | } |
| 3955 | break; |
| 3956 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3957 | case 196: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3958 | #line 1663 "asn1p_y.y" |
| 3959 | { (yyval.a_type) = ASN_STRING_TeletexString; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3960 | break; |
| 3961 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3962 | case 197: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3963 | #line 1664 "asn1p_y.y" |
| 3964 | { (yyval.a_type) = ASN_STRING_UniversalString; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3965 | break; |
| 3966 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3967 | case 198: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3968 | #line 1665 "asn1p_y.y" |
| 3969 | { (yyval.a_type) = ASN_STRING_UTF8String; } |
| 3970 | break; |
| 3971 | |
| 3972 | case 199: |
| 3973 | #line 1666 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3974 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3975 | (yyval.a_type) = ASN_STRING_VideotexString; |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 3976 | fprintf(stderr, "WARNING: VideotexString is not fully supported\n"); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3977 | } |
| 3978 | break; |
| 3979 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3980 | case 200: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3981 | #line 1670 "asn1p_y.y" |
| 3982 | { (yyval.a_type) = ASN_STRING_VisibleString; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3983 | break; |
| 3984 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3985 | case 201: |
| 3986 | #line 1671 "asn1p_y.y" |
| 3987 | { (yyval.a_type) = ASN_STRING_ObjectDescriptor; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3988 | break; |
| 3989 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 3990 | case 206: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3991 | #line 1682 "asn1p_y.y" |
| 3992 | { (yyval.a_constr) = 0; } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3993 | break; |
| 3994 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3995 | case 207: |
| 3996 | #line 1683 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3997 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3998 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 3999 | } |
| 4000 | break; |
| 4001 | |
Lev Walkin | c6ab03c | 2006-10-21 05:54:49 +0000 | [diff] [blame] | 4002 | case 209: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4003 | #line 1693 "asn1p_y.y" |
| 4004 | { |
| 4005 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(1) - (1)].a_constr), 0); |
| 4006 | } |
| 4007 | break; |
| 4008 | |
| 4009 | case 210: |
| 4010 | #line 1696 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4011 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4012 | /* |
| 4013 | * This is a special case, for compatibility purposes. |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 4014 | * It goes without parentheses. |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4015 | */ |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4016 | 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] | 4017 | } |
| 4018 | break; |
| 4019 | |
Lev Walkin | c6ab03c | 2006-10-21 05:54:49 +0000 | [diff] [blame] | 4020 | case 211: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4021 | #line 1706 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4022 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4023 | (yyval.a_constr) = (yyvsp[(2) - (3)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4024 | } |
| 4025 | break; |
| 4026 | |
Lev Walkin | c6ab03c | 2006-10-21 05:54:49 +0000 | [diff] [blame] | 4027 | case 212: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4028 | #line 1709 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4029 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4030 | 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] | 4031 | } |
| 4032 | break; |
| 4033 | |
Lev Walkin | c6ab03c | 2006-10-21 05:54:49 +0000 | [diff] [blame] | 4034 | case 213: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4035 | #line 1715 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4036 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4037 | (yyval.a_constr) = asn1p_constraint_new(yylineno); |
| 4038 | (yyval.a_constr)->type = ACT_EL_EXT; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4039 | } |
| 4040 | break; |
| 4041 | |
Lev Walkin | c6ab03c | 2006-10-21 05:54:49 +0000 | [diff] [blame] | 4042 | case 214: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4043 | #line 1719 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4044 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4045 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4046 | } |
| 4047 | break; |
| 4048 | |
Lev Walkin | c6ab03c | 2006-10-21 05:54:49 +0000 | [diff] [blame] | 4049 | case 215: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4050 | #line 1722 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4051 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4052 | asn1p_constraint_t *ct; |
| 4053 | ct = asn1p_constraint_new(yylineno); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4054 | ct->type = ACT_EL_EXT; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4055 | 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] | 4056 | } |
| 4057 | break; |
| 4058 | |
Lev Walkin | c6ab03c | 2006-10-21 05:54:49 +0000 | [diff] [blame] | 4059 | case 216: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4060 | #line 1728 "asn1p_y.y" |
Lev Walkin | c6ab03c | 2006-10-21 05:54:49 +0000 | [diff] [blame] | 4061 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4062 | asn1p_constraint_t *ct; |
| 4063 | ct = asn1p_constraint_new(yylineno); |
| 4064 | ct->type = ACT_EL_EXT; |
| 4065 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, (yyvsp[(1) - (5)].a_constr), ct); |
| 4066 | ct = (yyval.a_constr); |
| 4067 | 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] | 4068 | } |
| 4069 | break; |
| 4070 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4071 | case 217: |
| 4072 | #line 1736 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4073 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4074 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4075 | } |
| 4076 | break; |
| 4077 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4078 | case 219: |
| 4079 | #line 1743 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4080 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4081 | 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] | 4082 | } |
| 4083 | break; |
| 4084 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4085 | case 221: |
| 4086 | #line 1750 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4087 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4088 | 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] | 4089 | } |
| 4090 | break; |
| 4091 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4092 | case 223: |
| 4093 | #line 1757 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4094 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4095 | 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] | 4096 | } |
| 4097 | break; |
| 4098 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4099 | case 225: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4100 | #line 1765 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4101 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4102 | 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] | 4103 | } |
| 4104 | break; |
| 4105 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4106 | case 226: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4107 | #line 1771 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4108 | { |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 4109 | int ret; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4110 | (yyval.a_constr) = asn1p_constraint_new(yylineno); |
| 4111 | checkmem((yyval.a_constr)); |
| 4112 | (yyval.a_constr)->type = (yyvsp[(1) - (4)].a_ctype); |
| 4113 | ret = asn1p_constraint_insert((yyval.a_constr), (yyvsp[(3) - (4)].a_constr)); |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 4114 | checkmem(ret == 0); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4115 | } |
| 4116 | break; |
| 4117 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4118 | case 227: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4119 | #line 1779 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4120 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4121 | int ret; |
| 4122 | (yyval.a_constr) = asn1p_constraint_new(yylineno); |
| 4123 | checkmem((yyval.a_constr)); |
| 4124 | (yyval.a_constr)->type = ACT_CA_SET; |
| 4125 | ret = asn1p_constraint_insert((yyval.a_constr), (yyvsp[(2) - (3)].a_constr)); |
| 4126 | checkmem(ret == 0); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4127 | } |
| 4128 | break; |
| 4129 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4130 | case 228: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4131 | #line 1787 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4132 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4133 | (yyval.a_constr) = asn1p_constraint_new(yylineno); |
| 4134 | checkmem((yyval.a_constr)); |
| 4135 | (yyval.a_constr)->type = ACT_EL_VALUE; |
| 4136 | (yyval.a_constr)->value = (yyvsp[(1) - (1)].a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4137 | } |
| 4138 | break; |
| 4139 | |
Lev Walkin | f172715 | 2006-09-21 01:50:37 +0000 | [diff] [blame] | 4140 | case 229: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4141 | #line 1793 "asn1p_y.y" |
Lev Walkin | f172715 | 2006-09-21 01:50:37 +0000 | [diff] [blame] | 4142 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4143 | (yyval.a_constr) = asn1p_constraint_new(yylineno); |
| 4144 | checkmem((yyval.a_constr)); |
| 4145 | (yyval.a_constr)->type = ACT_EL_TYPE; |
| 4146 | (yyval.a_constr)->containedSubtype = (yyvsp[(1) - (1)].a_value); |
Lev Walkin | f172715 | 2006-09-21 01:50:37 +0000 | [diff] [blame] | 4147 | } |
| 4148 | break; |
| 4149 | |
| 4150 | case 230: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4151 | #line 1799 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4152 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4153 | (yyval.a_constr) = asn1p_constraint_new(yylineno); |
| 4154 | checkmem((yyval.a_constr)); |
| 4155 | (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype); |
| 4156 | (yyval.a_constr)->range_start = (yyvsp[(1) - (3)].a_value); |
| 4157 | (yyval.a_constr)->range_stop = (yyvsp[(3) - (3)].a_value); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4158 | } |
| 4159 | break; |
| 4160 | |
| 4161 | case 231: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4162 | #line 1806 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4163 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4164 | (yyval.a_constr) = asn1p_constraint_new(yylineno); |
| 4165 | checkmem((yyval.a_constr)); |
| 4166 | (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype); |
| 4167 | (yyval.a_constr)->range_start = asn1p_value_fromint(-123); |
| 4168 | (yyval.a_constr)->range_stop = (yyvsp[(3) - (3)].a_value); |
| 4169 | (yyval.a_constr)->range_start->type = ATV_MIN; |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4170 | } |
| 4171 | break; |
| 4172 | |
| 4173 | case 232: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4174 | #line 1814 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 4175 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4176 | (yyval.a_constr) = asn1p_constraint_new(yylineno); |
| 4177 | checkmem((yyval.a_constr)); |
| 4178 | (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype); |
| 4179 | (yyval.a_constr)->range_start = (yyvsp[(1) - (3)].a_value); |
| 4180 | (yyval.a_constr)->range_stop = asn1p_value_fromint(321); |
| 4181 | (yyval.a_constr)->range_stop->type = ATV_MAX; |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 4182 | } |
| 4183 | break; |
| 4184 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4185 | case 233: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4186 | #line 1822 "asn1p_y.y" |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 4187 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4188 | (yyval.a_constr) = asn1p_constraint_new(yylineno); |
| 4189 | checkmem((yyval.a_constr)); |
| 4190 | (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype); |
| 4191 | (yyval.a_constr)->range_start = asn1p_value_fromint(-123); |
| 4192 | (yyval.a_constr)->range_stop = asn1p_value_fromint(321); |
| 4193 | (yyval.a_constr)->range_start->type = ATV_MIN; |
| 4194 | (yyval.a_constr)->range_stop->type = ATV_MAX; |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 4195 | } |
| 4196 | break; |
| 4197 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4198 | case 234: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4199 | #line 1831 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4200 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4201 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4202 | } |
| 4203 | break; |
| 4204 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4205 | case 235: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4206 | #line 1834 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4207 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4208 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4209 | } |
| 4210 | break; |
| 4211 | |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4212 | case 236: |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4213 | #line 1840 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4214 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4215 | (yyval.a_constr) = asn1p_constraint_new(yylineno); |
| 4216 | (yyval.a_constr)->type = ACT_CT_PATTERN; |
| 4217 | (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] | 4218 | } |
| 4219 | break; |
| 4220 | |
| 4221 | case 237: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4222 | #line 1845 "asn1p_y.y" |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4223 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4224 | asn1p_ref_t *ref; |
| 4225 | (yyval.a_constr) = asn1p_constraint_new(yylineno); |
| 4226 | (yyval.a_constr)->type = ACT_CT_PATTERN; |
| 4227 | ref = asn1p_ref_new(yylineno); |
| 4228 | asn1p_ref_add_component(ref, (yyvsp[(2) - (2)].tv_str), RLT_lowercase); |
| 4229 | (yyval.a_constr)->value = asn1p_value_fromref(ref, 0); |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4230 | } |
| 4231 | break; |
| 4232 | |
| 4233 | case 238: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4234 | #line 1856 "asn1p_y.y" |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4235 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4236 | (yyval.a_ctype) = ACT_CT_SIZE; |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4237 | } |
| 4238 | break; |
| 4239 | |
| 4240 | case 239: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4241 | #line 1859 "asn1p_y.y" |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4242 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4243 | (yyval.a_ctype) = ACT_CT_FROM; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4244 | } |
| 4245 | break; |
| 4246 | |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4247 | case 240: |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4248 | #line 1865 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4249 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4250 | (yyval.a_value) = asn1p_value_fromint(0); |
| 4251 | checkmem((yyval.a_value)); |
| 4252 | (yyval.a_value)->type = ATV_FALSE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4253 | } |
| 4254 | break; |
| 4255 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4256 | case 241: |
| 4257 | #line 1870 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4258 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4259 | (yyval.a_value) = asn1p_value_fromint(1); |
| 4260 | checkmem((yyval.a_value)); |
| 4261 | (yyval.a_value)->type = ATV_TRUE; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4262 | } |
| 4263 | break; |
| 4264 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4265 | case 245: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4266 | #line 1878 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4267 | { |
Lev Walkin | c8092cb | 2005-02-18 16:34:21 +0000 | [diff] [blame] | 4268 | asn1p_ref_t *ref; |
| 4269 | int ret; |
| 4270 | ref = asn1p_ref_new(yylineno); |
| 4271 | checkmem(ref); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4272 | 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] | 4273 | checkmem(ret == 0); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4274 | (yyval.a_value) = asn1p_value_fromref(ref, 0); |
| 4275 | checkmem((yyval.a_value)); |
| 4276 | free((yyvsp[(1) - (1)].tv_str)); |
| 4277 | } |
| 4278 | break; |
| 4279 | |
| 4280 | case 246: |
| 4281 | #line 1892 "asn1p_y.y" |
| 4282 | { |
| 4283 | (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'B'); |
| 4284 | checkmem((yyval.a_value)); |
| 4285 | } |
| 4286 | break; |
| 4287 | |
| 4288 | case 247: |
| 4289 | #line 1896 "asn1p_y.y" |
| 4290 | { |
| 4291 | (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'H'); |
| 4292 | checkmem((yyval.a_value)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4293 | } |
| 4294 | break; |
| 4295 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4296 | case 248: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4297 | #line 1903 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4298 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4299 | asn1p_ref_t *ref; |
| 4300 | int ret; |
| 4301 | ref = asn1p_ref_new(yylineno); |
| 4302 | checkmem(ref); |
| 4303 | ret = asn1p_ref_add_component(ref, (yyvsp[(1) - (1)].tv_str), RLT_UNKNOWN); |
| 4304 | checkmem(ret == 0); |
| 4305 | (yyval.a_value) = asn1p_value_fromref(ref, 0); |
| 4306 | checkmem((yyval.a_value)); |
| 4307 | free((yyvsp[(1) - (1)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4308 | } |
| 4309 | break; |
| 4310 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4311 | case 249: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4312 | #line 1917 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4313 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4314 | 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] | 4315 | } |
| 4316 | break; |
| 4317 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4318 | case 250: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4319 | #line 1920 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4320 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4321 | 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] | 4322 | } |
| 4323 | break; |
| 4324 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4325 | case 251: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4326 | #line 1926 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4327 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4328 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4329 | } |
| 4330 | break; |
| 4331 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4332 | case 252: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4333 | #line 1929 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4334 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4335 | 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] | 4336 | } |
| 4337 | break; |
| 4338 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4339 | case 253: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4340 | #line 1935 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4341 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4342 | (yyval.a_constr) = asn1p_constraint_new(yylineno); |
| 4343 | checkmem((yyval.a_constr)); |
| 4344 | (yyval.a_constr)->type = ACT_EL_EXT; |
| 4345 | (yyval.a_constr)->value = asn1p_value_frombuf("...", 3, 1); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4346 | } |
| 4347 | break; |
| 4348 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4349 | case 254: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4350 | #line 1941 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4351 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4352 | (yyval.a_constr) = asn1p_constraint_new(yylineno); |
| 4353 | checkmem((yyval.a_constr)); |
| 4354 | (yyval.a_constr)->type = ACT_EL_VALUE; |
| 4355 | (yyval.a_constr)->value = asn1p_value_frombuf((yyvsp[(1) - (3)].tv_str), strlen((yyvsp[(1) - (3)].tv_str)), 0); |
| 4356 | (yyval.a_constr)->presence = (yyvsp[(3) - (3)].a_pres); |
| 4357 | 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] | 4358 | } |
| 4359 | break; |
| 4360 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4361 | case 255: |
| 4362 | #line 1955 "asn1p_y.y" |
| 4363 | { (yyval.a_pres) = ACPRES_DEFAULT; } |
| 4364 | break; |
| 4365 | |
| 4366 | case 256: |
| 4367 | #line 1956 "asn1p_y.y" |
| 4368 | { (yyval.a_pres) = (yyvsp[(1) - (1)].a_pres); } |
| 4369 | break; |
| 4370 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4371 | case 257: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4372 | #line 1960 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4373 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4374 | (yyval.a_pres) = ACPRES_PRESENT; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4375 | } |
| 4376 | break; |
| 4377 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4378 | case 258: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4379 | #line 1963 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4380 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4381 | (yyval.a_pres) = ACPRES_ABSENT; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4382 | } |
| 4383 | break; |
| 4384 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4385 | case 259: |
| 4386 | #line 1966 "asn1p_y.y" |
| 4387 | { |
| 4388 | (yyval.a_pres) = ACPRES_OPTIONAL; |
| 4389 | } |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 4390 | break; |
| 4391 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4392 | case 263: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4393 | #line 1981 "asn1p_y.y" |
| 4394 | { asn1p_lexer_hack_push_opaque_state(); } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4395 | break; |
| 4396 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4397 | case 264: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4398 | #line 1981 "asn1p_y.y" |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 4399 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4400 | (yyval.a_constr) = asn1p_constraint_new(yylineno); |
| 4401 | checkmem((yyval.a_constr)); |
| 4402 | (yyval.a_constr)->type = ACT_CT_CTDBY; |
| 4403 | (yyval.a_constr)->value = asn1p_value_frombuf((yyvsp[(5) - (5)].tv_opaque).buf, (yyvsp[(5) - (5)].tv_opaque).len, 0); |
| 4404 | checkmem((yyval.a_constr)->value); |
| 4405 | (yyval.a_constr)->value->type = ATV_UNPARSED; |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 4406 | } |
| 4407 | break; |
| 4408 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4409 | case 265: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4410 | #line 1992 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4411 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4412 | (yyval.a_constr) = asn1p_constraint_new(yylineno); |
| 4413 | (yyval.a_constr)->type = ACT_CT_CTNG; |
| 4414 | (yyval.a_constr)->value = asn1p_value_fromtype((yyvsp[(2) - (2)].a_expr)); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4415 | } |
| 4416 | break; |
| 4417 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4418 | case 266: |
| 4419 | #line 2000 "asn1p_y.y" |
| 4420 | { (yyval.a_ctype) = ACT_EL_RANGE; } |
| 4421 | break; |
| 4422 | |
| 4423 | case 267: |
| 4424 | #line 2001 "asn1p_y.y" |
| 4425 | { (yyval.a_ctype) = ACT_EL_RLRANGE; } |
| 4426 | break; |
| 4427 | |
| 4428 | case 268: |
| 4429 | #line 2002 "asn1p_y.y" |
| 4430 | { (yyval.a_ctype) = ACT_EL_LLRANGE; } |
| 4431 | break; |
| 4432 | |
| 4433 | case 269: |
| 4434 | #line 2003 "asn1p_y.y" |
| 4435 | { (yyval.a_ctype) = ACT_EL_ULRANGE; } |
| 4436 | break; |
| 4437 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4438 | case 270: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4439 | #line 2006 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4440 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4441 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4442 | } |
| 4443 | break; |
| 4444 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4445 | case 271: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4446 | #line 2009 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4447 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4448 | (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4449 | } |
| 4450 | break; |
| 4451 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4452 | case 272: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4453 | #line 2018 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4454 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4455 | asn1p_ref_t *ref = asn1p_ref_new(yylineno); |
| 4456 | asn1p_constraint_t *ct; |
| 4457 | int ret; |
| 4458 | ret = asn1p_ref_add_component(ref, (yyvsp[(2) - (3)].tv_str), 0); |
| 4459 | checkmem(ret == 0); |
| 4460 | ct = asn1p_constraint_new(yylineno); |
| 4461 | checkmem((yyval.a_constr)); |
| 4462 | ct->type = ACT_EL_VALUE; |
| 4463 | ct->value = asn1p_value_fromref(ref, 0); |
| 4464 | CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CRC, ct, 0); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4465 | } |
| 4466 | break; |
| 4467 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4468 | case 273: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4469 | #line 2033 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4470 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4471 | 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] | 4472 | } |
| 4473 | break; |
| 4474 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4475 | case 274: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4476 | #line 2039 "asn1p_y.y" |
| 4477 | { |
| 4478 | (yyval.a_constr) = asn1p_constraint_new(yylineno); |
| 4479 | checkmem((yyval.a_constr)); |
| 4480 | (yyval.a_constr)->type = ACT_EL_VALUE; |
| 4481 | (yyval.a_constr)->value = asn1p_value_fromref((yyvsp[(1) - (1)].a_ref), 0); |
| 4482 | } |
| 4483 | break; |
| 4484 | |
| 4485 | case 275: |
| 4486 | #line 2045 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4487 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4488 | asn1p_constraint_t *ct; |
| 4489 | ct = asn1p_constraint_new(yylineno); |
| 4490 | checkmem(ct); |
| 4491 | ct->type = ACT_EL_VALUE; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4492 | ct->value = asn1p_value_fromref((yyvsp[(3) - (3)].a_ref), 0); |
| 4493 | 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] | 4494 | } |
| 4495 | break; |
| 4496 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4497 | case 276: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4498 | #line 2059 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4499 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4500 | char *p = malloc(strlen((yyvsp[(2) - (2)].tv_str)) + 2); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4501 | int ret; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4502 | *p = '@'; |
| 4503 | strcpy(p + 1, (yyvsp[(2) - (2)].tv_str)); |
| 4504 | (yyval.a_ref) = asn1p_ref_new(yylineno); |
| 4505 | ret = asn1p_ref_add_component((yyval.a_ref), p, 0); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4506 | checkmem(ret == 0); |
| 4507 | free(p); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4508 | free((yyvsp[(2) - (2)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4509 | } |
| 4510 | break; |
| 4511 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4512 | case 277: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4513 | #line 2070 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4514 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4515 | char *p = malloc(strlen((yyvsp[(3) - (3)].tv_str)) + 3); |
| 4516 | int ret; |
| 4517 | p[0] = '@'; |
| 4518 | p[1] = '.'; |
| 4519 | strcpy(p + 2, (yyvsp[(3) - (3)].tv_str)); |
| 4520 | (yyval.a_ref) = asn1p_ref_new(yylineno); |
| 4521 | ret = asn1p_ref_add_component((yyval.a_ref), p, 0); |
| 4522 | checkmem(ret == 0); |
| 4523 | free(p); |
| 4524 | free((yyvsp[(3) - (3)].tv_str)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4525 | } |
| 4526 | break; |
| 4527 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4528 | case 278: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4529 | #line 2086 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4530 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4531 | (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4532 | } |
| 4533 | break; |
| 4534 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4535 | case 279: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4536 | #line 2089 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4537 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4538 | int l1 = strlen((yyvsp[(1) - (3)].tv_str)); |
| 4539 | int l3 = strlen((yyvsp[(3) - (3)].tv_str)); |
| 4540 | (yyval.tv_str) = malloc(l1 + 1 + l3 + 1); |
| 4541 | memcpy((yyval.tv_str), (yyvsp[(1) - (3)].tv_str), l1); |
| 4542 | (yyval.tv_str)[l1] = '.'; |
| 4543 | memcpy((yyval.tv_str) + l1 + 1, (yyvsp[(3) - (3)].tv_str), l3); |
| 4544 | (yyval.tv_str)[l1 + 1 + l3] = '\0'; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4545 | } |
| 4546 | break; |
| 4547 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4548 | case 280: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4549 | #line 2107 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4550 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4551 | (yyval.a_marker).flags = EM_NOMARK; |
| 4552 | (yyval.a_marker).default_value = 0; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4553 | } |
| 4554 | break; |
| 4555 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4556 | case 281: |
| 4557 | #line 2111 "asn1p_y.y" |
| 4558 | { (yyval.a_marker) = (yyvsp[(1) - (1)].a_marker); } |
| 4559 | break; |
| 4560 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4561 | case 282: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4562 | #line 2115 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4563 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4564 | (yyval.a_marker).flags = EM_OPTIONAL | EM_INDIRECT; |
| 4565 | (yyval.a_marker).default_value = 0; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4566 | } |
| 4567 | break; |
| 4568 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4569 | case 283: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4570 | #line 2119 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4571 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4572 | (yyval.a_marker).flags = EM_DEFAULT; |
| 4573 | (yyval.a_marker).default_value = (yyvsp[(2) - (2)].a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4574 | } |
| 4575 | break; |
| 4576 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4577 | case 284: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4578 | #line 2142 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4579 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4580 | (yyval.a_expr) = NEW_EXPR(); |
| 4581 | checkmem((yyval.a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4582 | } |
| 4583 | break; |
| 4584 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4585 | case 285: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4586 | #line 2146 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4587 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4588 | (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4589 | } |
| 4590 | break; |
| 4591 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4592 | case 286: |
| 4593 | #line 2152 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4594 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4595 | (yyval.a_expr) = NEW_EXPR(); |
| 4596 | checkmem((yyval.a_expr)); |
| 4597 | asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4598 | } |
| 4599 | break; |
| 4600 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4601 | case 287: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4602 | #line 2157 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4603 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4604 | (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); |
| 4605 | asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4606 | } |
| 4607 | break; |
| 4608 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4609 | case 288: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4610 | #line 2164 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4611 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4612 | (yyval.a_expr) = NEW_EXPR(); |
| 4613 | checkmem((yyval.a_expr)); |
| 4614 | (yyval.a_expr)->expr_type = A1TC_UNIVERVAL; |
| 4615 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 4616 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4617 | } |
| 4618 | break; |
| 4619 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4620 | case 289: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4621 | #line 2171 "asn1p_y.y" |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4622 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4623 | (yyval.a_expr) = NEW_EXPR(); |
| 4624 | checkmem((yyval.a_expr)); |
| 4625 | (yyval.a_expr)->expr_type = A1TC_UNIVERVAL; |
| 4626 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 4627 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str); |
| 4628 | (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value); |
Lev Walkin | 4a4543f | 2006-10-13 12:37:39 +0000 | [diff] [blame] | 4629 | } |
| 4630 | break; |
| 4631 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4632 | case 290: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4633 | #line 2179 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4634 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4635 | (yyval.a_expr) = NEW_EXPR(); |
| 4636 | checkmem((yyval.a_expr)); |
| 4637 | (yyval.a_expr)->expr_type = A1TC_UNIVERVAL; |
| 4638 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 4639 | (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str); |
| 4640 | (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4641 | } |
| 4642 | break; |
| 4643 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4644 | case 291: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4645 | #line 2187 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4646 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4647 | (yyval.a_expr) = NEW_EXPR(); |
| 4648 | checkmem((yyval.a_expr)); |
| 4649 | (yyval.a_expr)->expr_type = A1TC_UNIVERVAL; |
| 4650 | (yyval.a_expr)->meta_type = AMT_VALUE; |
| 4651 | (yyval.a_expr)->value = (yyvsp[(1) - (1)].a_value); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4652 | } |
| 4653 | break; |
| 4654 | |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4655 | case 292: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4656 | #line 2194 "asn1p_y.y" |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4657 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4658 | (yyval.a_expr) = NEW_EXPR(); |
| 4659 | checkmem((yyval.a_expr)); |
| 4660 | (yyval.a_expr)->Identifier = strdup("..."); |
| 4661 | checkmem((yyval.a_expr)->Identifier); |
| 4662 | (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE; |
| 4663 | (yyval.a_expr)->meta_type = AMT_VALUE; |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4664 | } |
| 4665 | break; |
| 4666 | |
| 4667 | case 293: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4668 | #line 2205 "asn1p_y.y" |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4669 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4670 | (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int)); |
| 4671 | checkmem((yyval.a_value)); |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4672 | } |
| 4673 | break; |
| 4674 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4675 | case 294: |
| 4676 | #line 2209 "asn1p_y.y" |
Lev Walkin | adf863f | 2006-09-05 16:18:34 +0000 | [diff] [blame] | 4677 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4678 | (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int)); |
| 4679 | checkmem((yyval.a_value)); |
Lev Walkin | adf863f | 2006-09-05 16:18:34 +0000 | [diff] [blame] | 4680 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4681 | break; |
| 4682 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4683 | case 296: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4684 | #line 2217 "asn1p_y.y" |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4685 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4686 | (yyval.a_value) = asn1p_value_fromdouble((yyvsp[(1) - (1)].a_dbl)); |
| 4687 | checkmem((yyval.a_value)); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4688 | } |
| 4689 | break; |
| 4690 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4691 | case 297: |
| 4692 | #line 2248 "asn1p_y.y" |
| 4693 | { memset(&(yyval.a_tag), 0, sizeof((yyval.a_tag))); } |
| 4694 | break; |
| 4695 | |
| 4696 | case 298: |
| 4697 | #line 2249 "asn1p_y.y" |
| 4698 | { (yyval.a_tag) = (yyvsp[(1) - (1)].a_tag); } |
| 4699 | break; |
| 4700 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4701 | case 299: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4702 | #line 2253 "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_tag) = (yyvsp[(1) - (2)].a_tag); |
| 4705 | (yyval.a_tag).tag_mode = (yyvsp[(2) - (2)].a_tag).tag_mode; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4706 | } |
| 4707 | break; |
| 4708 | |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4709 | case 300: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4710 | #line 2260 "asn1p_y.y" |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4711 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4712 | (yyval.a_tag) = (yyvsp[(2) - (4)].a_tag); |
| 4713 | (yyval.a_tag).tag_value = (yyvsp[(3) - (4)].a_int); |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4714 | } |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4715 | break; |
| 4716 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4717 | case 301: |
| 4718 | #line 2266 "asn1p_y.y" |
| 4719 | { (yyval.a_tag).tag_class = TC_CONTEXT_SPECIFIC; } |
| 4720 | break; |
| 4721 | |
| 4722 | case 302: |
| 4723 | #line 2267 "asn1p_y.y" |
| 4724 | { (yyval.a_tag).tag_class = TC_UNIVERSAL; } |
| 4725 | break; |
| 4726 | |
| 4727 | case 303: |
| 4728 | #line 2268 "asn1p_y.y" |
| 4729 | { (yyval.a_tag).tag_class = TC_APPLICATION; } |
| 4730 | break; |
| 4731 | |
| 4732 | case 304: |
| 4733 | #line 2269 "asn1p_y.y" |
| 4734 | { (yyval.a_tag).tag_class = TC_PRIVATE; } |
| 4735 | break; |
| 4736 | |
| 4737 | case 305: |
| 4738 | #line 2273 "asn1p_y.y" |
| 4739 | { (yyval.a_tag).tag_mode = TM_DEFAULT; } |
| 4740 | break; |
| 4741 | |
| 4742 | case 306: |
| 4743 | #line 2274 "asn1p_y.y" |
| 4744 | { (yyval.a_tag).tag_mode = TM_IMPLICIT; } |
| 4745 | break; |
| 4746 | |
| 4747 | case 307: |
| 4748 | #line 2275 "asn1p_y.y" |
| 4749 | { (yyval.a_tag).tag_mode = TM_EXPLICIT; } |
| 4750 | break; |
| 4751 | |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4752 | case 308: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4753 | #line 2279 "asn1p_y.y" |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4754 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4755 | checkmem((yyvsp[(1) - (1)].tv_str)); |
| 4756 | (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); |
Lev Walkin | 5c541f1 | 2006-10-18 18:40:14 +0000 | [diff] [blame] | 4757 | } |
| 4758 | break; |
| 4759 | |
| 4760 | case 309: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4761 | #line 2283 "asn1p_y.y" |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4762 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4763 | checkmem((yyvsp[(1) - (1)].tv_str)); |
| 4764 | (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4765 | } |
| 4766 | break; |
| 4767 | |
| 4768 | case 310: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4769 | #line 2291 "asn1p_y.y" |
| 4770 | { |
| 4771 | checkmem((yyvsp[(1) - (1)].tv_str)); |
| 4772 | (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); |
| 4773 | } |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4774 | break; |
| 4775 | |
| 4776 | case 311: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4777 | #line 2298 "asn1p_y.y" |
| 4778 | { (yyval.tv_str) = 0; } |
Lev Walkin | 1c8d5aa | 2006-10-27 05:37:39 +0000 | [diff] [blame] | 4779 | break; |
| 4780 | |
| 4781 | case 312: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4782 | #line 2299 "asn1p_y.y" |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 4783 | { |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4784 | (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); |
| 4785 | } |
| 4786 | break; |
| 4787 | |
| 4788 | case 313: |
| 4789 | #line 2305 "asn1p_y.y" |
| 4790 | { |
| 4791 | checkmem((yyvsp[(1) - (1)].tv_str)); |
| 4792 | (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); |
Lev Walkin | 866bd7f | 2006-09-14 10:35:20 +0000 | [diff] [blame] | 4793 | } |
| 4794 | break; |
| 4795 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4796 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4797 | /* Line 1267 of yacc.c. */ |
| 4798 | #line 4799 "y.tab.c" |
| 4799 | default: break; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4800 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4801 | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4802 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4803 | YYPOPSTACK (yylen); |
| 4804 | yylen = 0; |
| 4805 | YY_STACK_PRINT (yyss, yyssp); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4806 | |
| 4807 | *++yyvsp = yyval; |
| 4808 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4809 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4810 | /* Now `shift' the result of the reduction. Determine what state |
| 4811 | that goes to, based on the state we popped back to and the rule |
| 4812 | number reduced by. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4813 | |
| 4814 | yyn = yyr1[yyn]; |
| 4815 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4816 | yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; |
| 4817 | if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4818 | yystate = yytable[yystate]; |
| 4819 | else |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4820 | yystate = yydefgoto[yyn - YYNTOKENS]; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4821 | |
| 4822 | goto yynewstate; |
| 4823 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4824 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4825 | /*------------------------------------. |
| 4826 | | yyerrlab -- here on detecting error | |
| 4827 | `------------------------------------*/ |
| 4828 | yyerrlab: |
| 4829 | /* If not already recovering from an error, report this error. */ |
| 4830 | if (!yyerrstatus) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4831 | { |
| 4832 | ++yynerrs; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4833 | #if ! YYERROR_VERBOSE |
| 4834 | yyerror (YY_("syntax error")); |
| 4835 | #else |
| 4836 | { |
| 4837 | YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); |
| 4838 | if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) |
| 4839 | { |
| 4840 | YYSIZE_T yyalloc = 2 * yysize; |
| 4841 | if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) |
| 4842 | yyalloc = YYSTACK_ALLOC_MAXIMUM; |
| 4843 | if (yymsg != yymsgbuf) |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4844 | YYSTACK_FREE (yymsg); |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4845 | yymsg = (char *) YYSTACK_ALLOC (yyalloc); |
| 4846 | if (yymsg) |
| 4847 | yymsg_alloc = yyalloc; |
| 4848 | else |
| 4849 | { |
| 4850 | yymsg = yymsgbuf; |
| 4851 | yymsg_alloc = sizeof yymsgbuf; |
| 4852 | } |
| 4853 | } |
| 4854 | |
| 4855 | if (0 < yysize && yysize <= yymsg_alloc) |
| 4856 | { |
| 4857 | (void) yysyntax_error (yymsg, yystate, yychar); |
| 4858 | yyerror (yymsg); |
| 4859 | } |
| 4860 | else |
| 4861 | { |
| 4862 | yyerror (YY_("syntax error")); |
| 4863 | if (yysize != 0) |
| 4864 | goto yyexhaustedlab; |
| 4865 | } |
| 4866 | } |
| 4867 | #endif |
| 4868 | } |
| 4869 | |
| 4870 | |
| 4871 | |
| 4872 | if (yyerrstatus == 3) |
| 4873 | { |
| 4874 | /* If just tried and failed to reuse look-ahead token after an |
| 4875 | error, discard it. */ |
| 4876 | |
| 4877 | if (yychar <= YYEOF) |
| 4878 | { |
| 4879 | /* Return failure if at end of input. */ |
| 4880 | if (yychar == YYEOF) |
| 4881 | YYABORT; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4882 | } |
| 4883 | else |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4884 | { |
| 4885 | yydestruct ("Error: discarding", |
| 4886 | yytoken, &yylval); |
| 4887 | yychar = YYEMPTY; |
| 4888 | } |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4889 | } |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4890 | |
| 4891 | /* Else will try to reuse look-ahead token after shifting the error |
| 4892 | token. */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 4893 | goto yyerrlab1; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4894 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4895 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4896 | /*---------------------------------------------------. |
| 4897 | | yyerrorlab -- error raised explicitly by YYERROR. | |
| 4898 | `---------------------------------------------------*/ |
| 4899 | yyerrorlab: |
| 4900 | |
| 4901 | /* Pacify compilers like GCC when the user code never invokes |
| 4902 | YYERROR and the label yyerrorlab therefore never appears in user |
| 4903 | code. */ |
| 4904 | if (/*CONSTCOND*/ 0) |
| 4905 | goto yyerrorlab; |
| 4906 | |
| 4907 | /* Do not reclaim the symbols of the rule which action triggered |
| 4908 | this YYERROR. */ |
| 4909 | YYPOPSTACK (yylen); |
| 4910 | yylen = 0; |
| 4911 | YY_STACK_PRINT (yyss, yyssp); |
| 4912 | yystate = *yyssp; |
| 4913 | goto yyerrlab1; |
| 4914 | |
| 4915 | |
| 4916 | /*-------------------------------------------------------------. |
| 4917 | | yyerrlab1 -- common code for both syntax error and YYERROR. | |
| 4918 | `-------------------------------------------------------------*/ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4919 | yyerrlab1: |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4920 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 4921 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4922 | for (;;) |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 4923 | { |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4924 | yyn = yypact[yystate]; |
| 4925 | if (yyn != YYPACT_NINF) |
| 4926 | { |
| 4927 | yyn += YYTERROR; |
| 4928 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
| 4929 | { |
| 4930 | yyn = yytable[yyn]; |
| 4931 | if (0 < yyn) |
| 4932 | break; |
| 4933 | } |
| 4934 | } |
| 4935 | |
| 4936 | /* Pop the current state because it cannot handle the error token. */ |
| 4937 | if (yyssp == yyss) |
| 4938 | YYABORT; |
| 4939 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4940 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4941 | yydestruct ("Error: popping", |
| 4942 | yystos[yystate], yyvsp); |
| 4943 | YYPOPSTACK (1); |
| 4944 | yystate = *yyssp; |
| 4945 | YY_STACK_PRINT (yyss, yyssp); |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 4946 | } |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 4947 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4948 | if (yyn == YYFINAL) |
| 4949 | YYACCEPT; |
| 4950 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4951 | *++yyvsp = yylval; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4952 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4953 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4954 | /* Shift the error token. */ |
| 4955 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
| 4956 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4957 | yystate = yyn; |
| 4958 | goto yynewstate; |
| 4959 | |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 4960 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4961 | /*-------------------------------------. |
| 4962 | | yyacceptlab -- YYACCEPT comes here. | |
| 4963 | `-------------------------------------*/ |
| 4964 | yyacceptlab: |
| 4965 | yyresult = 0; |
| 4966 | goto yyreturn; |
| 4967 | |
| 4968 | /*-----------------------------------. |
| 4969 | | yyabortlab -- YYABORT comes here. | |
| 4970 | `-----------------------------------*/ |
| 4971 | yyabortlab: |
| 4972 | yyresult = 1; |
| 4973 | goto yyreturn; |
| 4974 | |
| 4975 | #ifndef yyoverflow |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4976 | /*-------------------------------------------------. |
| 4977 | | yyexhaustedlab -- memory exhaustion comes here. | |
| 4978 | `-------------------------------------------------*/ |
| 4979 | yyexhaustedlab: |
| 4980 | yyerror (YY_("memory exhausted")); |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4981 | yyresult = 2; |
| 4982 | /* Fall through. */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 4983 | #endif |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4984 | |
| 4985 | yyreturn: |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 4986 | if (yychar != YYEOF && yychar != YYEMPTY) |
| 4987 | yydestruct ("Cleanup: discarding lookahead", |
| 4988 | yytoken, &yylval); |
| 4989 | /* Do not reclaim the symbols of the rule which action triggered |
| 4990 | this YYABORT or YYACCEPT. */ |
| 4991 | YYPOPSTACK (yylen); |
| 4992 | YY_STACK_PRINT (yyss, yyssp); |
| 4993 | while (yyssp != yyss) |
| 4994 | { |
| 4995 | yydestruct ("Cleanup: popping", |
| 4996 | yystos[*yyssp], yyvsp); |
| 4997 | YYPOPSTACK (1); |
| 4998 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 4999 | #ifndef yyoverflow |
| 5000 | if (yyss != yyssa) |
| 5001 | YYSTACK_FREE (yyss); |
| 5002 | #endif |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5003 | #if YYERROR_VERBOSE |
| 5004 | if (yymsg != yymsgbuf) |
| 5005 | YYSTACK_FREE (yymsg); |
| 5006 | #endif |
| 5007 | /* Make sure YYID is used. */ |
| 5008 | return YYID (yyresult); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5009 | } |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5010 | |
| 5011 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 5012 | #line 2311 "asn1p_y.y" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5013 | |
| 5014 | |
| 5015 | |
| 5016 | /* |
| 5017 | * Convert Xstring ('0101'B or '5'H) to the binary vector. |
| 5018 | */ |
| 5019 | static asn1p_value_t * |
| 5020 | _convert_bitstring2binary(char *str, int base) { |
| 5021 | asn1p_value_t *val; |
| 5022 | int slen; |
| 5023 | int memlen; |
| 5024 | int baselen; |
| 5025 | int bits; |
| 5026 | uint8_t *binary_vector; |
| 5027 | uint8_t *bv_ptr; |
| 5028 | uint8_t cur_val; |
| 5029 | |
| 5030 | assert(str); |
| 5031 | assert(str[0] == '\''); |
| 5032 | |
| 5033 | switch(base) { |
| 5034 | case 'B': |
| 5035 | baselen = 1; |
| 5036 | break; |
| 5037 | case 'H': |
| 5038 | baselen = 4; |
| 5039 | break; |
| 5040 | default: |
| 5041 | assert(base == 'B' || base == 'H'); |
| 5042 | errno = EINVAL; |
| 5043 | return NULL; |
| 5044 | } |
| 5045 | |
| 5046 | slen = strlen(str); |
| 5047 | assert(str[slen - 1] == base); |
| 5048 | assert(str[slen - 2] == '\''); |
| 5049 | |
| 5050 | memlen = slen / (8 / baselen); /* Conservative estimate */ |
| 5051 | |
| 5052 | bv_ptr = binary_vector = malloc(memlen + 1); |
| 5053 | if(bv_ptr == NULL) |
| 5054 | /* ENOMEM */ |
| 5055 | return NULL; |
| 5056 | |
| 5057 | cur_val = 0; |
| 5058 | bits = 0; |
| 5059 | while(*(++str) != '\'') { |
| 5060 | switch(baselen) { |
| 5061 | case 1: |
| 5062 | switch(*str) { |
| 5063 | case '1': |
| 5064 | cur_val |= 1 << (7 - (bits % 8)); |
| 5065 | case '0': |
| 5066 | break; |
| 5067 | default: |
| 5068 | assert(!"_y UNREACH1"); |
| 5069 | case ' ': case '\r': case '\n': |
| 5070 | continue; |
| 5071 | } |
| 5072 | break; |
| 5073 | case 4: |
| 5074 | switch(*str) { |
| 5075 | case '0': case '1': case '2': case '3': case '4': |
| 5076 | case '5': case '6': case '7': case '8': case '9': |
| 5077 | cur_val |= (*str - '0') << (4 - (bits % 8)); |
| 5078 | break; |
| 5079 | case 'A': case 'B': case 'C': |
| 5080 | case 'D': case 'E': case 'F': |
| 5081 | cur_val |= ((*str - 'A') + 10) |
| 5082 | << (4 - (bits % 8)); |
| 5083 | break; |
| 5084 | default: |
| 5085 | assert(!"_y UNREACH2"); |
| 5086 | case ' ': case '\r': case '\n': |
| 5087 | continue; |
| 5088 | } |
| 5089 | break; |
| 5090 | } |
| 5091 | |
| 5092 | bits += baselen; |
| 5093 | if((bits % 8) == 0) { |
| 5094 | *bv_ptr++ = cur_val; |
| 5095 | cur_val = 0; |
| 5096 | } |
| 5097 | } |
| 5098 | |
| 5099 | *bv_ptr = cur_val; |
| 5100 | assert((bv_ptr - binary_vector) <= memlen); |
| 5101 | |
| 5102 | val = asn1p_value_frombits(binary_vector, bits, 0); |
| 5103 | if(val == NULL) { |
| 5104 | free(binary_vector); |
| 5105 | } |
| 5106 | |
| 5107 | return val; |
| 5108 | } |
| 5109 | |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 5110 | /* |
| 5111 | * For unnamed types (used in old X.208 compliant modules) |
| 5112 | * generate some sort of interim names, to not to force human being to fix |
| 5113 | * the specification's compliance to modern ASN.1 standards. |
| 5114 | */ |
| 5115 | static void |
| 5116 | _fixup_anonymous_identifier(asn1p_expr_t *expr) { |
| 5117 | char *p; |
| 5118 | assert(expr->Identifier == 0); |
| 5119 | |
| 5120 | /* |
| 5121 | * Try to figure out the type name |
| 5122 | * without going too much into details |
| 5123 | */ |
| 5124 | expr->Identifier = ASN_EXPR_TYPE2STR(expr->expr_type); |
| 5125 | if(expr->reference && expr->reference->comp_count > 0) |
| 5126 | expr->Identifier = expr->reference->components[0].name; |
| 5127 | |
| 5128 | fprintf(stderr, |
| 5129 | "WARNING: Line %d: expected lower-case member identifier, " |
| 5130 | "found an unnamed %s.\n" |
| 5131 | "WARNING: Obsolete X.208 syntax detected, " |
| 5132 | "please give the member a name.\n", |
| 5133 | yylineno, expr->Identifier ? expr->Identifier : "type"); |
| 5134 | |
| 5135 | if(!expr->Identifier) |
| 5136 | expr->Identifier = "unnamed"; |
| 5137 | expr->Identifier = strdup(expr->Identifier); |
| 5138 | assert(expr->Identifier); |
| 5139 | /* Make a lowercase identifier from the type name */ |
| 5140 | for(p = expr->Identifier; *p; p++) { |
| 5141 | switch(*p) { |
| 5142 | case 'A' ... 'Z': *p += 32; break; |
| 5143 | case ' ': *p = '_'; break; |
| 5144 | case '-': *p = '_'; break; |
| 5145 | } |
| 5146 | } |
| 5147 | fprintf(stderr, "NOTE: Assigning temporary identifier \"%s\". " |
| 5148 | "Name clash may occur later.\n", |
| 5149 | expr->Identifier); |
| 5150 | } |
| 5151 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5152 | int |
| 5153 | yyerror(const char *msg) { |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 5154 | extern char *asn1p_text; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5155 | fprintf(stderr, |
| 5156 | "ASN.1 grammar parse error " |
| 5157 | "near line %d (token \"%s\"): %s\n", |
Lev Walkin | ceb20e7 | 2004-09-05 10:40:41 +0000 | [diff] [blame] | 5158 | yylineno, asn1p_text, msg); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5159 | return -1; |
| 5160 | } |
| 5161 | |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 5162 | |