Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 1 | /* A Bison parser, made by GNU Bison 2.3. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 2 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 3 | /* Skeleton interface 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 | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 7 | |
| 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. |
| 12 | |
| 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. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 35 | |
| 36 | /* Tokens. */ |
| 37 | #ifndef YYTOKENTYPE |
| 38 | # define YYTOKENTYPE |
| 39 | /* Put the tokens into the symbol table, so that GDB and other debuggers |
| 40 | know about them. */ |
| 41 | enum yytokentype { |
| 42 | TOK_PPEQ = 258, |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 43 | TOK_VBracketLeft = 259, |
| 44 | TOK_VBracketRight = 260, |
| 45 | TOK_whitespace = 261, |
| 46 | TOK_opaque = 262, |
| 47 | TOK_bstring = 263, |
| 48 | TOK_cstring = 264, |
| 49 | TOK_hstring = 265, |
| 50 | TOK_identifier = 266, |
| 51 | TOK_number = 267, |
| 52 | TOK_number_negative = 268, |
| 53 | TOK_realnumber = 269, |
| 54 | TOK_tuple = 270, |
| 55 | TOK_quadruple = 271, |
| 56 | TOK_typereference = 272, |
| 57 | TOK_capitalreference = 273, |
| 58 | TOK_typefieldreference = 274, |
| 59 | TOK_valuefieldreference = 275, |
| 60 | TOK_Literal = 276, |
| 61 | TOK_ABSENT = 277, |
| 62 | TOK_ABSTRACT_SYNTAX = 278, |
| 63 | TOK_ALL = 279, |
| 64 | TOK_ANY = 280, |
| 65 | TOK_APPLICATION = 281, |
| 66 | TOK_AUTOMATIC = 282, |
| 67 | TOK_BEGIN = 283, |
| 68 | TOK_BIT = 284, |
| 69 | TOK_BMPString = 285, |
| 70 | TOK_BOOLEAN = 286, |
| 71 | TOK_BY = 287, |
| 72 | TOK_CHARACTER = 288, |
| 73 | TOK_CHOICE = 289, |
| 74 | TOK_CLASS = 290, |
| 75 | TOK_COMPONENT = 291, |
| 76 | TOK_COMPONENTS = 292, |
| 77 | TOK_CONSTRAINED = 293, |
| 78 | TOK_CONTAINING = 294, |
| 79 | TOK_DEFAULT = 295, |
| 80 | TOK_DEFINITIONS = 296, |
| 81 | TOK_DEFINED = 297, |
| 82 | TOK_EMBEDDED = 298, |
| 83 | TOK_ENCODED = 299, |
| 84 | TOK_ENCODING_CONTROL = 300, |
| 85 | TOK_END = 301, |
| 86 | TOK_ENUMERATED = 302, |
| 87 | TOK_EXPLICIT = 303, |
| 88 | TOK_EXPORTS = 304, |
| 89 | TOK_EXTENSIBILITY = 305, |
| 90 | TOK_EXTERNAL = 306, |
| 91 | TOK_FALSE = 307, |
| 92 | TOK_FROM = 308, |
| 93 | TOK_GeneralizedTime = 309, |
| 94 | TOK_GeneralString = 310, |
| 95 | TOK_GraphicString = 311, |
| 96 | TOK_IA5String = 312, |
| 97 | TOK_IDENTIFIER = 313, |
| 98 | TOK_IMPLICIT = 314, |
| 99 | TOK_IMPLIED = 315, |
| 100 | TOK_IMPORTS = 316, |
| 101 | TOK_INCLUDES = 317, |
| 102 | TOK_INSTANCE = 318, |
| 103 | TOK_INSTRUCTIONS = 319, |
| 104 | TOK_INTEGER = 320, |
| 105 | TOK_ISO646String = 321, |
| 106 | TOK_MAX = 322, |
| 107 | TOK_MIN = 323, |
| 108 | TOK_MINUS_INFINITY = 324, |
| 109 | TOK_NULL = 325, |
| 110 | TOK_NumericString = 326, |
| 111 | TOK_OBJECT = 327, |
| 112 | TOK_ObjectDescriptor = 328, |
| 113 | TOK_OCTET = 329, |
| 114 | TOK_OF = 330, |
| 115 | TOK_OPTIONAL = 331, |
| 116 | TOK_PATTERN = 332, |
| 117 | TOK_PDV = 333, |
| 118 | TOK_PLUS_INFINITY = 334, |
| 119 | TOK_PRESENT = 335, |
| 120 | TOK_PrintableString = 336, |
| 121 | TOK_PRIVATE = 337, |
| 122 | TOK_REAL = 338, |
| 123 | TOK_RELATIVE_OID = 339, |
| 124 | TOK_SEQUENCE = 340, |
| 125 | TOK_SET = 341, |
| 126 | TOK_SIZE = 342, |
| 127 | TOK_STRING = 343, |
| 128 | TOK_SYNTAX = 344, |
| 129 | TOK_T61String = 345, |
| 130 | TOK_TAGS = 346, |
| 131 | TOK_TeletexString = 347, |
| 132 | TOK_TRUE = 348, |
| 133 | TOK_TYPE_IDENTIFIER = 349, |
| 134 | TOK_UNIQUE = 350, |
| 135 | TOK_UNIVERSAL = 351, |
| 136 | TOK_UniversalString = 352, |
| 137 | TOK_UTCTime = 353, |
| 138 | TOK_UTF8String = 354, |
| 139 | TOK_VideotexString = 355, |
| 140 | TOK_VisibleString = 356, |
| 141 | TOK_WITH = 357, |
| 142 | TOK_EXCEPT = 358, |
| 143 | TOK_INTERSECTION = 359, |
| 144 | TOK_UNION = 360, |
| 145 | TOK_TwoDots = 361, |
| 146 | TOK_ThreeDots = 362 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 147 | }; |
| 148 | #endif |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 149 | /* Tokens. */ |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 150 | #define TOK_PPEQ 258 |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 151 | #define TOK_VBracketLeft 259 |
| 152 | #define TOK_VBracketRight 260 |
| 153 | #define TOK_whitespace 261 |
| 154 | #define TOK_opaque 262 |
| 155 | #define TOK_bstring 263 |
| 156 | #define TOK_cstring 264 |
| 157 | #define TOK_hstring 265 |
| 158 | #define TOK_identifier 266 |
| 159 | #define TOK_number 267 |
| 160 | #define TOK_number_negative 268 |
| 161 | #define TOK_realnumber 269 |
| 162 | #define TOK_tuple 270 |
| 163 | #define TOK_quadruple 271 |
| 164 | #define TOK_typereference 272 |
| 165 | #define TOK_capitalreference 273 |
| 166 | #define TOK_typefieldreference 274 |
| 167 | #define TOK_valuefieldreference 275 |
| 168 | #define TOK_Literal 276 |
| 169 | #define TOK_ABSENT 277 |
| 170 | #define TOK_ABSTRACT_SYNTAX 278 |
| 171 | #define TOK_ALL 279 |
| 172 | #define TOK_ANY 280 |
| 173 | #define TOK_APPLICATION 281 |
| 174 | #define TOK_AUTOMATIC 282 |
| 175 | #define TOK_BEGIN 283 |
| 176 | #define TOK_BIT 284 |
| 177 | #define TOK_BMPString 285 |
| 178 | #define TOK_BOOLEAN 286 |
| 179 | #define TOK_BY 287 |
| 180 | #define TOK_CHARACTER 288 |
| 181 | #define TOK_CHOICE 289 |
| 182 | #define TOK_CLASS 290 |
| 183 | #define TOK_COMPONENT 291 |
| 184 | #define TOK_COMPONENTS 292 |
| 185 | #define TOK_CONSTRAINED 293 |
| 186 | #define TOK_CONTAINING 294 |
| 187 | #define TOK_DEFAULT 295 |
| 188 | #define TOK_DEFINITIONS 296 |
| 189 | #define TOK_DEFINED 297 |
| 190 | #define TOK_EMBEDDED 298 |
| 191 | #define TOK_ENCODED 299 |
| 192 | #define TOK_ENCODING_CONTROL 300 |
| 193 | #define TOK_END 301 |
| 194 | #define TOK_ENUMERATED 302 |
| 195 | #define TOK_EXPLICIT 303 |
| 196 | #define TOK_EXPORTS 304 |
| 197 | #define TOK_EXTENSIBILITY 305 |
| 198 | #define TOK_EXTERNAL 306 |
| 199 | #define TOK_FALSE 307 |
| 200 | #define TOK_FROM 308 |
| 201 | #define TOK_GeneralizedTime 309 |
| 202 | #define TOK_GeneralString 310 |
| 203 | #define TOK_GraphicString 311 |
| 204 | #define TOK_IA5String 312 |
| 205 | #define TOK_IDENTIFIER 313 |
| 206 | #define TOK_IMPLICIT 314 |
| 207 | #define TOK_IMPLIED 315 |
| 208 | #define TOK_IMPORTS 316 |
| 209 | #define TOK_INCLUDES 317 |
| 210 | #define TOK_INSTANCE 318 |
| 211 | #define TOK_INSTRUCTIONS 319 |
| 212 | #define TOK_INTEGER 320 |
| 213 | #define TOK_ISO646String 321 |
| 214 | #define TOK_MAX 322 |
| 215 | #define TOK_MIN 323 |
| 216 | #define TOK_MINUS_INFINITY 324 |
| 217 | #define TOK_NULL 325 |
| 218 | #define TOK_NumericString 326 |
| 219 | #define TOK_OBJECT 327 |
| 220 | #define TOK_ObjectDescriptor 328 |
| 221 | #define TOK_OCTET 329 |
| 222 | #define TOK_OF 330 |
| 223 | #define TOK_OPTIONAL 331 |
| 224 | #define TOK_PATTERN 332 |
| 225 | #define TOK_PDV 333 |
| 226 | #define TOK_PLUS_INFINITY 334 |
| 227 | #define TOK_PRESENT 335 |
| 228 | #define TOK_PrintableString 336 |
| 229 | #define TOK_PRIVATE 337 |
| 230 | #define TOK_REAL 338 |
| 231 | #define TOK_RELATIVE_OID 339 |
| 232 | #define TOK_SEQUENCE 340 |
| 233 | #define TOK_SET 341 |
| 234 | #define TOK_SIZE 342 |
| 235 | #define TOK_STRING 343 |
| 236 | #define TOK_SYNTAX 344 |
| 237 | #define TOK_T61String 345 |
| 238 | #define TOK_TAGS 346 |
| 239 | #define TOK_TeletexString 347 |
| 240 | #define TOK_TRUE 348 |
| 241 | #define TOK_TYPE_IDENTIFIER 349 |
| 242 | #define TOK_UNIQUE 350 |
| 243 | #define TOK_UNIVERSAL 351 |
| 244 | #define TOK_UniversalString 352 |
| 245 | #define TOK_UTCTime 353 |
| 246 | #define TOK_UTF8String 354 |
| 247 | #define TOK_VideotexString 355 |
| 248 | #define TOK_VisibleString 356 |
| 249 | #define TOK_WITH 357 |
| 250 | #define TOK_EXCEPT 358 |
| 251 | #define TOK_INTERSECTION 359 |
| 252 | #define TOK_UNION 360 |
| 253 | #define TOK_TwoDots 361 |
| 254 | #define TOK_ThreeDots 362 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 255 | |
| 256 | |
| 257 | |
| 258 | |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 259 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
| 260 | typedef union YYSTYPE |
Lev Walkin | a9532f4 | 2006-09-17 04:52:50 +0000 | [diff] [blame] | 261 | #line 88 "asn1p_y.y" |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 262 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 263 | asn1p_t *a_grammar; |
| 264 | asn1p_module_flags_e a_module_flags; |
| 265 | asn1p_module_t *a_module; |
| 266 | asn1p_expr_type_e a_type; /* ASN.1 Type */ |
| 267 | asn1p_expr_t *a_expr; /* Constructed collection */ |
| 268 | asn1p_constraint_t *a_constr; /* Constraint */ |
| 269 | enum asn1p_constraint_type_e a_ctype;/* Constraint type */ |
| 270 | asn1p_xports_t *a_xports; /* IMports/EXports */ |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 271 | struct AssignedIdentifier a_aid; /* Assigned Identifier */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 272 | asn1p_oid_t *a_oid; /* Object Identifier */ |
| 273 | asn1p_oid_arc_t a_oid_arc; /* Single OID's arc */ |
| 274 | struct asn1p_type_tag_s a_tag; /* A tag */ |
| 275 | asn1p_ref_t *a_ref; /* Reference to custom type */ |
| 276 | asn1p_wsyntx_t *a_wsynt; /* WITH SYNTAX contents */ |
| 277 | asn1p_wsyntx_chunk_t *a_wchunk; /* WITH SYNTAX chunk */ |
| 278 | struct asn1p_ref_component_s a_refcomp; /* Component of a reference */ |
| 279 | asn1p_value_t *a_value; /* Number, DefinedValue, etc */ |
| 280 | struct asn1p_param_s a_parg; /* A parameter argument */ |
| 281 | asn1p_paramlist_t *a_plist; /* A pargs list */ |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 282 | struct asn1p_expr_marker_s a_marker; /* OPTIONAL/DEFAULT */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 283 | enum asn1p_constr_pres_e a_pres; /* PRESENT/ABSENT/OPTIONAL */ |
Lev Walkin | d21c505 | 2004-09-29 13:18:09 +0000 | [diff] [blame] | 284 | asn1c_integer_t a_int; |
Lev Walkin | adf863f | 2006-09-05 16:18:34 +0000 | [diff] [blame] | 285 | double a_dbl; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 286 | char *tv_str; |
| 287 | struct { |
| 288 | char *buf; |
| 289 | int len; |
| 290 | } tv_opaque; |
| 291 | struct { |
| 292 | char *name; |
| 293 | struct asn1p_type_tag_s tag; |
| 294 | } tv_nametag; |
Lev Walkin | 0e90aa0 | 2013-03-19 16:17:13 -0700 | [diff] [blame] | 295 | } |
| 296 | /* Line 1529 of yacc.c. */ |
| 297 | #line 298 "y.tab.h" |
| 298 | YYSTYPE; |
| 299 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
| 300 | # define YYSTYPE_IS_DECLARED 1 |
| 301 | # define YYSTYPE_IS_TRIVIAL 1 |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 302 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 303 | |
| 304 | extern YYSTYPE asn1p_lval; |
Lev Walkin | 418298d | 2006-07-13 08:24:20 +0000 | [diff] [blame] | 305 | |