Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2 | /* A Bison parser, made from asn1p_y.y |
| 3 | by GNU Bison version 1.28 */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 5 | #define YYBISON 1 /* Identify Bison output. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 6 | |
| 7 | #define yyparse asn1p_parse |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 8 | #define yylex asn1p_lex |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 9 | #define yyerror asn1p_error |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 10 | #define yylval asn1p_lval |
| 11 | #define yychar asn1p_char |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 12 | #define yydebug asn1p_debug |
| 13 | #define yynerrs asn1p_nerrs |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 14 | #define TOK_PPEQ 257 |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 15 | #define TOK_whitespace 258 |
| 16 | #define TOK_opaque 259 |
| 17 | #define TOK_bstring 260 |
| 18 | #define TOK_cstring 261 |
| 19 | #define TOK_hstring 262 |
| 20 | #define TOK_identifier 263 |
| 21 | #define TOK_number 264 |
| 22 | #define TOK_tuple 265 |
| 23 | #define TOK_quadruple 266 |
| 24 | #define TOK_number_negative 267 |
| 25 | #define TOK_typereference 268 |
| 26 | #define TOK_capitalreference 269 |
| 27 | #define TOK_typefieldreference 270 |
| 28 | #define TOK_valuefieldreference 271 |
| 29 | #define TOK_Literal 272 |
| 30 | #define TOK_ABSENT 273 |
| 31 | #define TOK_ABSTRACT_SYNTAX 274 |
| 32 | #define TOK_ALL 275 |
| 33 | #define TOK_ANY 276 |
| 34 | #define TOK_APPLICATION 277 |
| 35 | #define TOK_AUTOMATIC 278 |
| 36 | #define TOK_BEGIN 279 |
| 37 | #define TOK_BIT 280 |
| 38 | #define TOK_BMPString 281 |
| 39 | #define TOK_BOOLEAN 282 |
| 40 | #define TOK_BY 283 |
| 41 | #define TOK_CHARACTER 284 |
| 42 | #define TOK_CHOICE 285 |
| 43 | #define TOK_CLASS 286 |
| 44 | #define TOK_COMPONENT 287 |
| 45 | #define TOK_COMPONENTS 288 |
| 46 | #define TOK_CONSTRAINED 289 |
| 47 | #define TOK_CONTAINING 290 |
| 48 | #define TOK_DEFAULT 291 |
| 49 | #define TOK_DEFINITIONS 292 |
| 50 | #define TOK_DEFINED 293 |
| 51 | #define TOK_EMBEDDED 294 |
| 52 | #define TOK_ENCODED 295 |
| 53 | #define TOK_ENCODING_CONTROL 296 |
| 54 | #define TOK_END 297 |
| 55 | #define TOK_ENUMERATED 298 |
| 56 | #define TOK_EXPLICIT 299 |
| 57 | #define TOK_EXPORTS 300 |
| 58 | #define TOK_EXTENSIBILITY 301 |
| 59 | #define TOK_EXTERNAL 302 |
| 60 | #define TOK_FALSE 303 |
| 61 | #define TOK_FROM 304 |
| 62 | #define TOK_GeneralizedTime 305 |
| 63 | #define TOK_GeneralString 306 |
| 64 | #define TOK_GraphicString 307 |
| 65 | #define TOK_IA5String 308 |
| 66 | #define TOK_IDENTIFIER 309 |
| 67 | #define TOK_IMPLICIT 310 |
| 68 | #define TOK_IMPLIED 311 |
| 69 | #define TOK_IMPORTS 312 |
| 70 | #define TOK_INCLUDES 313 |
| 71 | #define TOK_INSTANCE 314 |
| 72 | #define TOK_INSTRUCTIONS 315 |
| 73 | #define TOK_INTEGER 316 |
| 74 | #define TOK_ISO646String 317 |
| 75 | #define TOK_MAX 318 |
| 76 | #define TOK_MIN 319 |
| 77 | #define TOK_MINUS_INFINITY 320 |
| 78 | #define TOK_NULL 321 |
| 79 | #define TOK_NumericString 322 |
| 80 | #define TOK_OBJECT 323 |
| 81 | #define TOK_ObjectDescriptor 324 |
| 82 | #define TOK_OCTET 325 |
| 83 | #define TOK_OF 326 |
| 84 | #define TOK_OPTIONAL 327 |
| 85 | #define TOK_PATTERN 328 |
| 86 | #define TOK_PDV 329 |
| 87 | #define TOK_PLUS_INFINITY 330 |
| 88 | #define TOK_PRESENT 331 |
| 89 | #define TOK_PrintableString 332 |
| 90 | #define TOK_PRIVATE 333 |
| 91 | #define TOK_REAL 334 |
| 92 | #define TOK_RELATIVE_OID 335 |
| 93 | #define TOK_SEQUENCE 336 |
| 94 | #define TOK_SET 337 |
| 95 | #define TOK_SIZE 338 |
| 96 | #define TOK_STRING 339 |
| 97 | #define TOK_SYNTAX 340 |
| 98 | #define TOK_T61String 341 |
| 99 | #define TOK_TAGS 342 |
| 100 | #define TOK_TeletexString 343 |
| 101 | #define TOK_TRUE 344 |
| 102 | #define TOK_TYPE_IDENTIFIER 345 |
| 103 | #define TOK_UNIQUE 346 |
| 104 | #define TOK_UNIVERSAL 347 |
| 105 | #define TOK_UniversalString 348 |
| 106 | #define TOK_UTCTime 349 |
| 107 | #define TOK_UTF8String 350 |
| 108 | #define TOK_VideotexString 351 |
| 109 | #define TOK_VisibleString 352 |
| 110 | #define TOK_WITH 353 |
| 111 | #define TOK_EXCEPT 354 |
| 112 | #define TOK_INTERSECTION 355 |
| 113 | #define TOK_UNION 356 |
| 114 | #define TOK_TwoDots 357 |
| 115 | #define TOK_ThreeDots 358 |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 116 | |
| 117 | #line 1 "asn1p_y.y" |
| 118 | |
| 119 | |
| 120 | #include <stdlib.h> |
| 121 | #include <stdio.h> |
| 122 | #include <string.h> |
| 123 | #include <errno.h> |
| 124 | #include <assert.h> |
| 125 | |
| 126 | #include "asn1parser.h" |
| 127 | |
| 128 | #define YYPARSE_PARAM param |
Lev Walkin | 4a4bdf7 | 2005-06-07 21:43:32 +0000 | [diff] [blame] | 129 | #define YYPARSE_PARAM_TYPE void ** |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 130 | #define YYERROR_VERBOSE |
| 131 | |
| 132 | int yylex(void); |
| 133 | int yyerror(const char *msg); |
Lev Walkin | 4a4bdf7 | 2005-06-07 21:43:32 +0000 | [diff] [blame] | 134 | #ifdef YYBYACC |
| 135 | int yyparse(void **param); /* byacc does not produce a prototype */ |
| 136 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 137 | void asn1p_lexer_hack_push_opaque_state(void); |
| 138 | void asn1p_lexer_hack_enable_with_syntax(void); |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 139 | void asn1p_lexer_hack_push_encoding_control(void); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 140 | #define yylineno asn1p_lineno |
| 141 | extern int asn1p_lineno; |
| 142 | |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 143 | /* |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 144 | * Process directives as <ASN1C:RepresentAsPointer> |
Lev Walkin | 4696c74 | 2005-08-22 12:23:54 +0000 | [diff] [blame] | 145 | */ |
| 146 | extern int asn1p_as_pointer; |
Lev Walkin | 4696c74 | 2005-08-22 12:23:54 +0000 | [diff] [blame] | 147 | |
| 148 | /* |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 149 | * This temporary variable is used to solve the shortcomings of 1-lookahead |
| 150 | * parser. |
| 151 | */ |
| 152 | static struct AssignedIdentifier *saved_aid; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 153 | |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 154 | static asn1p_value_t *_convert_bitstring2binary(char *str, int base); |
| 155 | static void _fixup_anonymous_identifier(asn1p_expr_t *expr); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 156 | |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 157 | #define checkmem(ptr) do { \ |
| 158 | if(!(ptr)) \ |
| 159 | return yyerror("Memory failure"); \ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 160 | } while(0) |
| 161 | |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 162 | #define CONSTRAINT_INSERT(root, constr_type, arg1, arg2) do { \ |
| 163 | if(arg1->type != constr_type) { \ |
| 164 | int __ret; \ |
| 165 | root = asn1p_constraint_new(yylineno); \ |
| 166 | checkmem(root); \ |
| 167 | root->type = constr_type; \ |
| 168 | __ret = asn1p_constraint_insert(root, \ |
| 169 | arg1); \ |
| 170 | checkmem(__ret == 0); \ |
| 171 | } else { \ |
| 172 | root = arg1; \ |
| 173 | } \ |
| 174 | if(arg2) { \ |
| 175 | int __ret \ |
| 176 | = asn1p_constraint_insert(root, arg2); \ |
| 177 | checkmem(__ret == 0); \ |
| 178 | } \ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 179 | } while(0) |
| 180 | |
| 181 | |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 182 | #line 72 "asn1p_y.y" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 183 | typedef union { |
| 184 | asn1p_t *a_grammar; |
| 185 | asn1p_module_flags_e a_module_flags; |
| 186 | asn1p_module_t *a_module; |
| 187 | asn1p_expr_type_e a_type; /* ASN.1 Type */ |
| 188 | asn1p_expr_t *a_expr; /* Constructed collection */ |
| 189 | asn1p_constraint_t *a_constr; /* Constraint */ |
| 190 | enum asn1p_constraint_type_e a_ctype;/* Constraint type */ |
| 191 | asn1p_xports_t *a_xports; /* IMports/EXports */ |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 192 | struct AssignedIdentifier a_aid; /* Assigned Identifier */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 193 | asn1p_oid_t *a_oid; /* Object Identifier */ |
| 194 | asn1p_oid_arc_t a_oid_arc; /* Single OID's arc */ |
| 195 | struct asn1p_type_tag_s a_tag; /* A tag */ |
| 196 | asn1p_ref_t *a_ref; /* Reference to custom type */ |
| 197 | asn1p_wsyntx_t *a_wsynt; /* WITH SYNTAX contents */ |
| 198 | asn1p_wsyntx_chunk_t *a_wchunk; /* WITH SYNTAX chunk */ |
| 199 | struct asn1p_ref_component_s a_refcomp; /* Component of a reference */ |
| 200 | asn1p_value_t *a_value; /* Number, DefinedValue, etc */ |
| 201 | struct asn1p_param_s a_parg; /* A parameter argument */ |
| 202 | asn1p_paramlist_t *a_plist; /* A pargs list */ |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 203 | struct asn1p_expr_marker_s a_marker; /* OPTIONAL/DEFAULT */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 204 | enum asn1p_constr_pres_e a_pres; /* PRESENT/ABSENT/OPTIONAL */ |
Lev Walkin | d21c505 | 2004-09-29 13:18:09 +0000 | [diff] [blame] | 205 | asn1c_integer_t a_int; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 206 | char *tv_str; |
| 207 | struct { |
| 208 | char *buf; |
| 209 | int len; |
| 210 | } tv_opaque; |
| 211 | struct { |
| 212 | char *name; |
| 213 | struct asn1p_type_tag_s tag; |
| 214 | } tv_nametag; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 215 | } YYSTYPE; |
| 216 | #include <stdio.h> |
| 217 | |
| 218 | #ifndef __cplusplus |
| 219 | #ifndef __STDC__ |
| 220 | #define const |
| 221 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 222 | #endif |
| 223 | |
| 224 | |
| 225 | |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 226 | #define YYFINAL 445 |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 227 | #define YYFLAG -32768 |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 228 | #define YYNTBASE 120 |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 229 | |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 230 | #define YYTRANSLATE(x) ((unsigned)(x) <= 358 ? yytranslate[x] : 226) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 231 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 232 | static const char yytranslate[] = { 0, |
| 233 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 234 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 235 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 236 | 2, 2, 116, 2, 2, 2, 2, 2, 2, 109, |
| 237 | 110, 2, 2, 112, 2, 117, 2, 2, 2, 2, |
| 238 | 2, 2, 2, 2, 2, 2, 2, 113, 111, 118, |
| 239 | 2, 2, 2, 119, 2, 2, 2, 2, 2, 2, |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 240 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 241 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 242 | 114, 2, 115, 101, 2, 2, 2, 2, 2, 2, |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 243 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 244 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 245 | 2, 2, 107, 103, 108, 2, 2, 2, 2, 2, |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 246 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 247 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 248 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 249 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 250 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 251 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 252 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 253 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 254 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 255 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 256 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 257 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 258 | 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, |
| 259 | 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, |
| 260 | 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, |
| 261 | 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, |
| 262 | 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, |
| 263 | 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, |
| 264 | 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, |
| 265 | 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, |
| 266 | 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, |
| 267 | 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 268 | 97, 98, 99, 100, 102, 104, 105, 106 |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 269 | }; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 270 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 271 | #if YYDEBUG != 0 |
| 272 | static const short yyprhs[] = { 0, |
| 273 | 0, 2, 4, 7, 16, 17, 19, 23, 26, 28, |
| 274 | 31, 33, 38, 40, 41, 43, 45, 48, 51, 54, |
| 275 | 57, 60, 63, 64, 66, 68, 71, 73, 75, 77, |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 276 | 79, 81, 82, 86, 88, 92, 95, 97, 100, 101, |
| 277 | 103, 108, 110, 114, 116, 120, 122, 126, 130, 133, |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 278 | 135, 139, 141, 145, 147, 148, 155, 157, 159, 163, |
| 279 | 167, 174, 176, 180, 182, 186, 190, 194, 196, 200, |
| 280 | 202, 204, 205, 207, 209, 213, 217, 220, 224, 226, |
| 281 | 228, 232, 235, 237, 239, 245, 246, 248, 250, 254, |
| 282 | 257, 262, 266, 270, 274, 278, 282, 283, 285, 286, |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 283 | 293, 295, 298, 300, 302, 304, 308, 310, 314, 318, |
| 284 | 322, 323, 326, 328, 333, 338, 343, 350, 357, 359, |
| 285 | 364, 369, 371, 375, 377, 381, 385, 389, 391, 395, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 286 | 397, 401, 403, 405, 407, 409, 413, 417, 419, 424, |
| 287 | 428, 429, 433, 435, 437, 439, 441, 443, 445, 447, |
| 288 | 449, 451, 455, 457, 459, 461, 463, 466, 468, 470, |
| 289 | 472, 474, 477, 480, 482, 484, 487, 490, 492, 494, |
| 290 | 496, 498, 500, 503, 505, 508, 510, 512, 514, 516, |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 291 | 518, 520, 522, 524, 526, 528, 530, 532, 534, 536, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 292 | 538, 540, 542, 544, 546, 547, 549, 551, 556, 560, |
| 293 | 565, 567, 571, 577, 579, 583, 587, 591, 595, 600, |
| 294 | 604, 606, 608, 612, 616, 620, 624, 626, 628, 629, |
| 295 | 635, 637, 640, 643, 647, 649, 651, 653, 655, 657, |
| 296 | 659, 661, 663, 667, 673, 675, 679, 681, 685, 686, |
| 297 | 688, 690, 692, 694, 696, 698, 702, 707, 709, 713, |
| 298 | 716, 720, 722, 726, 727, 729, 731, 734, 737, 741, |
| 299 | 743, 747, 749, 754, 759, 761, 763, 765, 767, 768, |
| 300 | 770, 773, 778, 779, 781, 783, 785, 786, 788, 790, |
| 301 | 792, 794, 796, 797, 799 |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 302 | }; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 303 | |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 304 | static const short yyrhs[] = { 121, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 305 | 0, 122, 0, 121, 122, 0, 222, 123, 38, 127, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 306 | 3, 25, 130, 43, 0, 0, 124, 0, 107, 125, |
| 307 | 108, 0, 107, 108, 0, 126, 0, 125, 126, 0, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 308 | 225, 0, 225, 109, 10, 110, 0, 10, 0, 0, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 309 | 128, 0, 129, 0, 128, 129, 0, 45, 88, 0, |
| 310 | 56, 88, 0, 24, 88, 0, 47, 57, 0, 15, |
| 311 | 61, 0, 0, 131, 0, 132, 0, 131, 132, 0, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 312 | 134, 0, 140, 0, 146, 0, 176, 0, 143, 0, |
| 313 | 0, 42, 15, 133, 0, 185, 0, 58, 135, 111, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 314 | 0, 58, 50, 0, 137, 0, 135, 137, 0, 0, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 315 | 124, 0, 138, 50, 222, 136, 0, 139, 0, 138, |
| 316 | 112, 139, 0, 222, 0, 222, 107, 108, 0, 225, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 317 | 0, 46, 141, 111, 0, 46, 21, 111, 0, 46, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 318 | 111, 0, 142, 0, 141, 112, 142, 0, 222, 0, |
| 319 | 222, 107, 108, 0, 225, 0, 0, 222, 145, 3, |
| 320 | 107, 144, 181, 0, 170, 0, 182, 0, 222, 3, |
| 321 | 166, 0, 222, 3, 156, 0, 222, 107, 147, 108, |
| 322 | 3, 166, 0, 148, 0, 147, 112, 148, 0, 222, |
| 323 | 0, 222, 113, 225, 0, 222, 113, 222, 0, 182, |
| 324 | 113, 225, 0, 150, 0, 149, 112, 150, 0, 166, |
| 325 | 0, 225, 0, 0, 152, 0, 153, 0, 152, 112, |
| 326 | 153, 0, 225, 166, 211, 0, 166, 211, 0, 34, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 327 | 72, 166, 0, 165, 0, 155, 0, 154, 112, 155, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 328 | 0, 225, 166, 0, 165, 0, 166, 0, 32, 107, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 329 | 158, 108, 160, 0, 0, 92, 0, 159, 0, 158, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 330 | 112, 159, 0, 16, 211, 0, 17, 166, 157, 211, |
| 331 | 0, 17, 174, 211, 0, 17, 175, 211, 0, 16, |
| 332 | 174, 211, 0, 16, 166, 211, 0, 16, 175, 211, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 333 | 0, 0, 161, 0, 0, 99, 86, 107, 162, 163, |
| 334 | 108, 0, 164, 0, 163, 164, 0, 4, 0, 18, |
| 335 | 0, 173, 0, 114, 163, 115, 0, 106, 0, 106, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 336 | 116, 179, 0, 106, 116, 216, 0, 217, 168, 189, |
| 337 | 0, 0, 167, 169, 0, 184, 0, 31, 107, 154, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 338 | 108, 0, 82, 107, 151, 108, 0, 83, 107, 151, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 339 | 108, 0, 82, 189, 72, 224, 217, 168, 0, 83, |
| 340 | 189, 72, 224, 217, 168, 0, 22, 0, 22, 39, |
| 341 | 29, 225, 0, 222, 107, 149, 108, 0, 170, 0, |
| 342 | 60, 72, 170, 0, 14, 0, 14, 117, 222, 0, |
| 343 | 223, 117, 222, 0, 14, 117, 225, 0, 223, 0, |
| 344 | 223, 117, 171, 0, 172, 0, 171, 117, 172, 0, |
| 345 | 173, 0, 16, 0, 17, 0, 16, 0, 174, 117, |
| 346 | 16, 0, 174, 117, 17, 0, 15, 0, 225, 145, |
| 347 | 3, 177, 0, 225, 113, 177, 0, 0, 107, 178, |
| 348 | 181, 0, 67, 0, 49, 0, 90, 0, 6, 0, |
| 349 | 8, 0, 180, 0, 216, 0, 179, 0, 225, 0, |
| 350 | 222, 117, 225, 0, 7, 0, 11, 0, 12, 0, |
| 351 | 5, 0, 181, 5, 0, 28, 0, 67, 0, 80, |
| 352 | 0, 183, 0, 71, 85, 0, 69, 55, 0, 81, |
| 353 | 0, 48, 0, 40, 75, 0, 30, 85, 0, 95, |
| 354 | 0, 51, 0, 185, 0, 62, 0, 44, 0, 26, |
| 355 | 85, 0, 182, 0, 183, 213, 0, 27, 0, 52, |
| 356 | 0, 53, 0, 54, 0, 63, 0, 68, 0, 78, |
| 357 | 0, 87, 0, 89, 0, 94, 0, 96, 0, 97, |
| 358 | 0, 98, 0, 70, 0, 103, 0, 104, 0, 101, |
| 359 | 0, 102, 0, 100, 0, 0, 190, 0, 191, 0, |
| 360 | 84, 109, 192, 110, 0, 109, 192, 110, 0, 191, |
| 361 | 109, 192, 110, 0, 193, 0, 193, 112, 106, 0, |
| 362 | 193, 112, 106, 112, 193, 0, 194, 0, 21, 100, |
| 363 | 194, 0, 193, 186, 194, 0, 193, 187, 194, 0, |
| 364 | 194, 188, 194, 0, 197, 109, 192, 110, 0, 109, |
| 365 | 192, 110, 0, 198, 0, 199, 0, 198, 196, 198, |
| 366 | 0, 65, 196, 198, 0, 198, 196, 64, 0, 65, |
| 367 | 196, 64, 0, 205, 0, 200, 0, 0, 35, 29, |
| 368 | 107, 195, 181, 0, 105, 0, 105, 118, 0, 118, |
| 369 | 105, 0, 118, 105, 118, 0, 84, 0, 50, 0, |
| 370 | 49, 0, 90, 0, 216, 0, 180, 0, 225, 0, |
| 371 | 222, 0, 99, 33, 191, 0, 99, 34, 107, 201, |
| 372 | 108, 0, 202, 0, 201, 112, 202, 0, 106, 0, |
| 373 | 225, 189, 203, 0, 0, 204, 0, 77, 0, 19, |
| 374 | 0, 73, 0, 206, 0, 207, 0, 107, 222, 108, |
| 375 | 0, 206, 107, 208, 108, 0, 209, 0, 208, 112, |
| 376 | 209, 0, 119, 210, 0, 119, 117, 210, 0, 225, |
| 377 | 0, 210, 117, 225, 0, 0, 212, 0, 73, 0, |
| 378 | 37, 177, 0, 107, 108, 0, 107, 214, 108, 0, |
| 379 | 215, 0, 214, 112, 215, 0, 225, 0, 225, 109, |
| 380 | 216, 110, 0, 225, 109, 179, 110, 0, 216, 0, |
| 381 | 106, 0, 10, 0, 13, 0, 0, 218, 0, 219, |
| 382 | 221, 0, 114, 220, 10, 115, 0, 0, 93, 0, |
| 383 | 23, 0, 79, 0, 0, 56, 0, 45, 0, 14, |
| 384 | 0, 15, 0, 15, 0, 0, 225, 0, 9, 0 |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 385 | }; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 386 | |
| 387 | #endif |
| 388 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 389 | #if YYDEBUG != 0 |
| 390 | static const short yyrline[] = { 0, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 391 | 323, 329, 335, 351, 376, 378, 381, 385, 390, 397, |
| 392 | 405, 410, 414, 423, 425, 433, 437, 445, 449, 452, |
| 393 | 455, 459, 479, 481, 489, 493, 525, 529, 538, 545, |
| 394 | 558, 565, 567, 579, 591, 602, 607, 613, 619, 621, |
| 395 | 624, 635, 641, 647, 654, 660, 668, 672, 675, 682, |
| 396 | 688, 694, 701, 707, 716, 718, 727, 735, 749, 759, |
| 397 | 775, 784, 794, 804, 809, 816, 823, 833, 839, 845, |
| 398 | 849, 872, 874, 876, 882, 888, 896, 902, 909, 914, |
| 399 | 920, 926, 932, 935, 941, 951, 953, 956, 964, 971, |
| 400 | 984, 995, 1005, 1016, 1026, 1037, 1048, 1050, 1055, 1059, |
| 401 | 1064, 1069, 1075, 1080, 1083, 1087, 1092, 1101, 1110, 1121, |
| 402 | 1143, 1150, 1169, 1173, 1179, 1185, 1191, 1201, 1211, 1217, |
| 403 | 1231, 1255, 1262, 1276, 1285, 1295, 1305, 1315, 1323, 1344, |
| 404 | 1353, 1362, 1364, 1371, 1378, 1384, 1388, 1394, 1414, 1424, |
| 405 | 1432, 1432, 1437, 1442, 1447, 1452, 1456, 1460, 1463, 1466, |
| 406 | 1471, 1483, 1500, 1505, 1510, 1543, 1553, 1567, 1569, 1570, |
| 407 | 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, 1579, 1580, |
| 408 | 1586, 1588, 1589, 1592, 1599, 1611, 1613, 1617, 1621, 1622, |
| 409 | 1623, 1624, 1625, 1629, 1630, 1631, 1632, 1636, 1637, 1644, |
| 410 | 1644, 1645, 1645, 1646, 1648, 1650, 1655, 1659, 1668, 1672, |
| 411 | 1677, 1681, 1687, 1697, 1701, 1704, 1707, 1710, 1715, 1724, |
| 412 | 1732, 1738, 1744, 1751, 1759, 1767, 1776, 1779, 1782, 1783, |
| 413 | 1793, 1795, 1796, 1797, 1800, 1804, 1809, 1815, 1820, 1823, |
| 414 | 1826, 1839, 1853, 1857, 1862, 1866, 1871, 1878, 1891, 1893, |
| 415 | 1896, 1900, 1903, 1908, 1912, 1920, 1935, 1941, 1948, 1961, |
| 416 | 1973, 1988, 1992, 2009, 2014, 2017, 2022, 2044, 2049, 2054, |
| 417 | 2060, 2066, 2074, 2082, 2090, 2097, 2107, 2112, 2142, 2144, |
| 418 | 2147, 2154, 2160, 2162, 2163, 2164, 2167, 2169, 2170, 2173, |
| 419 | 2178, 2185, 2192, 2194, 2199 |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 420 | }; |
| 421 | #endif |
| 422 | |
| 423 | |
| 424 | #if YYDEBUG != 0 || defined (YYERROR_VERBOSE) |
| 425 | |
| 426 | static const char * const yytname[] = { "$","error","$undefined.","TOK_PPEQ", |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 427 | "TOK_whitespace","TOK_opaque","TOK_bstring","TOK_cstring","TOK_hstring","TOK_identifier", |
| 428 | "TOK_number","TOK_tuple","TOK_quadruple","TOK_number_negative","TOK_typereference", |
| 429 | "TOK_capitalreference","TOK_typefieldreference","TOK_valuefieldreference","TOK_Literal", |
| 430 | "TOK_ABSENT","TOK_ABSTRACT_SYNTAX","TOK_ALL","TOK_ANY","TOK_APPLICATION","TOK_AUTOMATIC", |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 431 | "TOK_BEGIN","TOK_BIT","TOK_BMPString","TOK_BOOLEAN","TOK_BY","TOK_CHARACTER", |
| 432 | "TOK_CHOICE","TOK_CLASS","TOK_COMPONENT","TOK_COMPONENTS","TOK_CONSTRAINED", |
| 433 | "TOK_CONTAINING","TOK_DEFAULT","TOK_DEFINITIONS","TOK_DEFINED","TOK_EMBEDDED", |
| 434 | "TOK_ENCODED","TOK_ENCODING_CONTROL","TOK_END","TOK_ENUMERATED","TOK_EXPLICIT", |
| 435 | "TOK_EXPORTS","TOK_EXTENSIBILITY","TOK_EXTERNAL","TOK_FALSE","TOK_FROM","TOK_GeneralizedTime", |
| 436 | "TOK_GeneralString","TOK_GraphicString","TOK_IA5String","TOK_IDENTIFIER","TOK_IMPLICIT", |
| 437 | "TOK_IMPLIED","TOK_IMPORTS","TOK_INCLUDES","TOK_INSTANCE","TOK_INSTRUCTIONS", |
| 438 | "TOK_INTEGER","TOK_ISO646String","TOK_MAX","TOK_MIN","TOK_MINUS_INFINITY","TOK_NULL", |
| 439 | "TOK_NumericString","TOK_OBJECT","TOK_ObjectDescriptor","TOK_OCTET","TOK_OF", |
| 440 | "TOK_OPTIONAL","TOK_PATTERN","TOK_PDV","TOK_PLUS_INFINITY","TOK_PRESENT","TOK_PrintableString", |
| 441 | "TOK_PRIVATE","TOK_REAL","TOK_RELATIVE_OID","TOK_SEQUENCE","TOK_SET","TOK_SIZE", |
| 442 | "TOK_STRING","TOK_SYNTAX","TOK_T61String","TOK_TAGS","TOK_TeletexString","TOK_TRUE", |
| 443 | "TOK_TYPE_IDENTIFIER","TOK_UNIQUE","TOK_UNIVERSAL","TOK_UniversalString","TOK_UTCTime", |
| 444 | "TOK_UTF8String","TOK_VideotexString","TOK_VisibleString","TOK_WITH","TOK_EXCEPT", |
| 445 | "'^'","TOK_INTERSECTION","'|'","TOK_UNION","TOK_TwoDots","TOK_ThreeDots","'{'", |
| 446 | "'}'","'('","')'","';'","','","':'","'['","']'","'!'","'.'","'<'","'@'","ParsedGrammar", |
| 447 | "ModuleList","ModuleSpecification","optObjectIdentifier","ObjectIdentifier", |
| 448 | "ObjectIdentifierBody","ObjectIdentifierElement","optModuleSpecificationFlags", |
| 449 | "ModuleSpecificationFlags","ModuleSpecificationFlag","optModuleSpecificationBody", |
| 450 | "ModuleSpecificationBody","ModuleSpecificationElement","@1","ImportsDefinition", |
| 451 | "ImportsBundleSet","AssignedIdentifier","ImportsBundle","ImportsList","ImportsElement", |
| 452 | "ExportsDefinition","ExportsBody","ExportsElement","ValueSetDefinition","@2", |
| 453 | "DefinedTypeRef","DataTypeReference","ParameterArgumentList","ParameterArgumentName", |
| 454 | "ActualParameterList","ActualParameter","optComponentTypeLists","ComponentTypeLists", |
| 455 | "ComponentType","AlternativeTypeLists","AlternativeType","ObjectClass","optUnique", |
| 456 | "FieldSpec","ClassField","optWithSyntax","WithSyntax","@3","WithSyntaxList", |
| 457 | "WithSyntaxToken","ExtensionAndException","Type","NSTD_IndirectMarker","TypeDeclaration", |
| 458 | "TypeDeclarationSet","ComplexTypeReference","ComplexTypeReferenceAmpList","ComplexTypeReferenceElement", |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 459 | "PrimitiveFieldReference","FieldName","DefinedObjectClass","ValueDefinition", |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 460 | "Value","@4","DefinedValue","RestrictedCharacterStringValue","Opaque","BasicTypeId", |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 461 | "BasicTypeId_UniverationCompatible","BasicType","BasicString","Union","Intersection", |
| 462 | "Except","optConstraints","Constraints","SetOfConstraints","ElementSetSpecs", |
| 463 | "ElementSetSpec","ConstraintSubtypeElement","@5","ConstraintRangeSpec","ConstraintSpec", |
| 464 | "SingleValue","ContainedSubtype","InnerTypeConstraint","WithComponentsList", |
| 465 | "WithComponentsElement","optPresenceConstraint","PresenceConstraint","TableConstraint", |
| 466 | "SimpleTableConstraint","ComponentRelationConstraint","AtNotationList","AtNotationElement", |
| 467 | "ComponentIdList","optMarker","Marker","UniverationDefinition","UniverationList", |
| 468 | "UniverationElement","SignedNumber","optTag","Tag","TagTypeValue","TagClass", |
| 469 | "TagPlicit","TypeRefName","ObjectClassReference","optIdentifier","Identifier", NULL |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 470 | }; |
| 471 | #endif |
| 472 | |
| 473 | static const short yyr1[] = { 0, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 474 | 120, 121, 121, 122, 123, 123, 124, 124, 125, 125, |
| 475 | 126, 126, 126, 127, 127, 128, 128, 129, 129, 129, |
| 476 | 129, 129, 130, 130, 131, 131, 132, 132, 132, 132, |
| 477 | 132, 133, 132, 132, 134, 134, 135, 135, 136, 136, |
| 478 | 137, 138, 138, 139, 139, 139, 140, 140, 140, 141, |
| 479 | 141, 142, 142, 142, 144, 143, 145, 145, 146, 146, |
| 480 | 146, 147, 147, 148, 148, 148, 148, 149, 149, 150, |
| 481 | 150, 151, 151, 152, 152, 153, 153, 153, 153, 154, |
| 482 | 154, 155, 155, 155, 156, 157, 157, 158, 158, 159, |
| 483 | 159, 159, 159, 159, 159, 159, 160, 160, 162, 161, |
| 484 | 163, 163, 164, 164, 164, 164, 165, 165, 165, 166, |
| 485 | 167, 168, 169, 169, 169, 169, 169, 169, 169, 169, |
| 486 | 169, 169, 169, 170, 170, 170, 170, 170, 170, 171, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 487 | 171, 172, 173, 173, 174, 174, 174, 175, 176, 177, |
| 488 | 178, 177, 177, 177, 177, 177, 177, 177, 177, 177, |
| 489 | 179, 179, 180, 180, 180, 181, 181, 182, 182, 182, |
| 490 | 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, |
| 491 | 183, 183, 183, 184, 184, 185, 185, 185, 185, 185, |
| 492 | 185, 185, 185, 185, 185, 185, 185, 185, 185, 186, |
| 493 | 186, 187, 187, 188, 189, 189, 190, 190, 191, 191, |
| 494 | 192, 192, 192, 193, 193, 193, 193, 193, 194, 194, |
| 495 | 194, 194, 194, 194, 194, 194, 194, 194, 195, 194, |
| 496 | 196, 196, 196, 196, 197, 197, 198, 198, 198, 198, |
| 497 | 198, 199, 200, 200, 201, 201, 202, 202, 203, 203, |
| 498 | 204, 204, 204, 205, 205, 206, 207, 208, 208, 209, |
| 499 | 209, 210, 210, 211, 211, 212, 212, 213, 213, 214, |
| 500 | 214, 215, 215, 215, 215, 215, 216, 216, 217, 217, |
| 501 | 218, 219, 220, 220, 220, 220, 221, 221, 221, 222, |
| 502 | 222, 223, 224, 224, 225 |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 503 | }; |
| 504 | |
| 505 | static const short yyr2[] = { 0, |
| 506 | 1, 1, 2, 8, 0, 1, 3, 2, 1, 2, |
| 507 | 1, 4, 1, 0, 1, 1, 2, 2, 2, 2, |
| 508 | 2, 2, 0, 1, 1, 2, 1, 1, 1, 1, |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 509 | 1, 0, 3, 1, 3, 2, 1, 2, 0, 1, |
| 510 | 4, 1, 3, 1, 3, 1, 3, 3, 2, 1, |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 511 | 3, 1, 3, 1, 0, 6, 1, 1, 3, 3, |
| 512 | 6, 1, 3, 1, 3, 3, 3, 1, 3, 1, |
| 513 | 1, 0, 1, 1, 3, 3, 2, 3, 1, 1, |
| 514 | 3, 2, 1, 1, 5, 0, 1, 1, 3, 2, |
| 515 | 4, 3, 3, 3, 3, 3, 0, 1, 0, 6, |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 516 | 1, 2, 1, 1, 1, 3, 1, 3, 3, 3, |
| 517 | 0, 2, 1, 4, 4, 4, 6, 6, 1, 4, |
| 518 | 4, 1, 3, 1, 3, 3, 3, 1, 3, 1, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 519 | 3, 1, 1, 1, 1, 3, 3, 1, 4, 3, |
| 520 | 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, |
| 521 | 1, 3, 1, 1, 1, 1, 2, 1, 1, 1, |
| 522 | 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, |
| 523 | 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 524 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 525 | 1, 1, 1, 1, 0, 1, 1, 4, 3, 4, |
| 526 | 1, 3, 5, 1, 3, 3, 3, 3, 4, 3, |
| 527 | 1, 1, 3, 3, 3, 3, 1, 1, 0, 5, |
| 528 | 1, 2, 2, 3, 1, 1, 1, 1, 1, 1, |
| 529 | 1, 1, 3, 5, 1, 3, 1, 3, 0, 1, |
| 530 | 1, 1, 1, 1, 1, 3, 4, 1, 3, 2, |
| 531 | 3, 1, 3, 0, 1, 1, 2, 2, 3, 1, |
| 532 | 3, 1, 4, 4, 1, 1, 1, 1, 0, 1, |
| 533 | 2, 4, 0, 1, 1, 1, 0, 1, 1, 1, |
| 534 | 1, 1, 0, 1, 1 |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 535 | }; |
| 536 | |
| 537 | static const short yydefact[] = { 0, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 538 | 280, 281, 1, 2, 5, 3, 0, 0, 6, 285, |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 539 | 13, 8, 0, 9, 11, 14, 7, 10, 0, 0, |
| 540 | 0, 0, 0, 0, 0, 15, 16, 0, 22, 20, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 541 | 18, 21, 19, 0, 17, 12, 23, 176, 0, 0, |
| 542 | 177, 178, 179, 0, 180, 181, 189, 182, 183, 184, |
| 543 | 185, 186, 187, 188, 0, 24, 25, 27, 28, 31, |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 544 | 29, 30, 34, 0, 0, 32, 0, 49, 0, 50, |
| 545 | 52, 54, 36, 0, 37, 0, 42, 44, 46, 4, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 546 | 26, 269, 124, 282, 0, 158, 0, 0, 172, 165, |
| 547 | 169, 171, 159, 0, 0, 160, 164, 168, 0, 0, |
| 548 | 57, 58, 161, 170, 128, 0, 33, 48, 47, 0, |
| 549 | 0, 35, 38, 0, 0, 0, 0, 273, 60, 59, |
| 550 | 111, 270, 277, 0, 173, 167, 166, 163, 162, 0, |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 551 | 62, 0, 64, 0, 0, 0, 51, 53, 39, 43, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 552 | 45, 0, 275, 276, 274, 0, 0, 195, 279, 278, |
| 553 | 271, 125, 127, 0, 0, 0, 0, 55, 133, 134, |
| 554 | 129, 130, 132, 126, 146, 153, 147, 267, 154, 155, |
| 555 | 268, 144, 143, 145, 141, 139, 150, 148, 149, 0, |
| 556 | 151, 40, 41, 269, 269, 0, 88, 0, 124, 282, |
| 557 | 119, 0, 0, 195, 195, 112, 122, 174, 161, 113, |
| 558 | 0, 0, 0, 110, 196, 197, 269, 63, 67, 66, |
| 559 | 65, 0, 0, 0, 0, 0, 138, 135, 0, 256, |
| 560 | 254, 254, 254, 90, 255, 86, 254, 254, 97, 0, |
| 561 | 272, 0, 269, 0, 269, 0, 269, 0, 0, 175, |
| 562 | 269, 0, 0, 0, 227, 226, 0, 225, 228, 0, |
| 563 | 0, 0, 230, 0, 201, 204, 0, 211, 212, 218, |
| 564 | 217, 244, 245, 229, 232, 231, 0, 61, 156, 56, |
| 565 | 131, 142, 152, 140, 257, 95, 0, 94, 96, 87, |
| 566 | 254, 92, 93, 0, 85, 98, 89, 0, 107, 0, |
| 567 | 80, 83, 84, 269, 123, 0, 0, 73, 74, 79, |
| 568 | 254, 269, 283, 0, 283, 266, 258, 0, 260, 265, |
| 569 | 262, 0, 68, 70, 71, 0, 0, 0, 221, 0, |
| 570 | 0, 0, 0, 0, 0, 199, 192, 193, 190, 191, |
| 571 | 0, 0, 0, 194, 0, 0, 0, 0, 0, 157, |
| 572 | 136, 137, 91, 0, 120, 0, 114, 269, 82, 269, |
| 573 | 115, 269, 77, 254, 269, 284, 116, 269, 259, 0, |
| 574 | 0, 121, 269, 198, 205, 219, 222, 223, 216, 214, |
| 575 | 233, 0, 246, 210, 202, 206, 207, 208, 0, 215, |
| 576 | 213, 0, 0, 248, 200, 99, 108, 109, 151, 81, |
| 577 | 78, 75, 76, 111, 111, 261, 0, 0, 69, 0, |
| 578 | 224, 237, 0, 235, 195, 0, 209, 0, 250, 252, |
| 579 | 247, 0, 0, 117, 118, 264, 263, 220, 234, 0, |
| 580 | 239, 203, 251, 0, 249, 103, 104, 0, 0, 101, |
| 581 | 105, 236, 242, 243, 241, 238, 240, 253, 0, 100, |
| 582 | 102, 106, 0, 0, 0 |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 583 | }; |
| 584 | |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 585 | static const short yydefgoto[] = { 443, |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 586 | 3, 4, 8, 9, 13, 14, 25, 26, 27, 55, |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 587 | 56, 57, 107, 58, 74, 183, 75, 76, 77, 59, |
Lev Walkin | 1db9113 | 2006-03-09 09:11:53 +0000 | [diff] [blame] | 588 | 69, 70, 60, 212, 100, 61, 130, 131, 312, 313, |
| 589 | 297, 298, 299, 290, 291, 119, 281, 186, 187, 285, |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 590 | 286, 413, 429, 430, 300, 301, 147, 148, 196, 101, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 591 | 161, 162, 431, 222, 223, 62, 176, 214, 177, 253, |
| 592 | 270, 102, 103, 200, 104, 332, 333, 335, 204, 205, |
| 593 | 206, 254, 255, 256, 400, 321, 257, 258, 259, 260, |
| 594 | 403, 404, 436, 437, 261, 262, 263, 383, 384, 409, |
| 595 | 224, 225, 240, 308, 309, 264, 121, 122, 123, 146, |
| 596 | 151, 265, 105, 355, 266 |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 597 | }; |
| 598 | |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 599 | static const short yypact[] = { 223, |
| 600 | -32768,-32768, 223,-32768, -76,-32768, 30, 24,-32768,-32768, |
| 601 | -32768,-32768, 34,-32768, -61, 247,-32768,-32768, 61, 27, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 602 | 71, 84, 145, 118, 210, 247,-32768, 109,-32768,-32768, |
| 603 | -32768,-32768,-32768, 199,-32768,-32768, 428,-32768, 212, 49, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 604 | -32768,-32768,-32768, 154,-32768,-32768,-32768,-32768,-32768,-32768, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 605 | -32768,-32768,-32768,-32768, 186, 428,-32768,-32768,-32768,-32768, |
| 606 | -32768,-32768,-32768, 352, 581,-32768, 129,-32768, 174,-32768, |
| 607 | 157,-32768,-32768, 59,-32768, -26,-32768, 159,-32768,-32768, |
| 608 | -32768, -15, 152,-32768, 193,-32768, 204, 218,-32768,-32768, |
| 609 | -32768,-32768,-32768, 262, 217,-32768,-32768,-32768, 657, 337, |
| 610 | -32768,-32768,-32768,-32768, 220, 343,-32768,-32768,-32768, 286, |
| 611 | 244,-32768,-32768, 223, 286, 249, 256, 3,-32768,-32768, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 612 | -32768,-32768, 45, 286,-32768,-32768,-32768,-32768,-32768, -23, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 613 | -32768, 251, 255, 263, 294, 184,-32768,-32768, -76,-32768, |
| 614 | -32768, 297,-32768,-32768,-32768, 359, 505, 57,-32768,-32768, |
| 615 | -32768,-32768,-32768, 368, 657, 363, 286,-32768,-32768,-32768, |
| 616 | 259,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, |
| 617 | -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 260, |
| 618 | 268,-32768,-32768, 168, 37, 32,-32768, 258, 48, 276, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 619 | 345, 278, 314, 116, 170,-32768,-32768,-32768, 280,-32768, |
| 620 | 281, 282, 166,-32768,-32768, 285, 275,-32768,-32768,-32768, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 621 | -32768, 385, 312, 385, 363, 184,-32768,-32768, 184,-32768, |
| 622 | 98, 94, 98,-32768,-32768, 303, 94, 98, 298, 297, |
| 623 | -32768, 369, 7, 328, 16, 330, 16, 335, 56,-32768, |
| 624 | 14, 166, 310, 380,-32768,-32768, -25,-32768,-32768, 315, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 625 | 223, 166,-32768, 301, 203, 324, 316, -25,-32768,-32768, |
| 626 | -32768, 305,-32768,-32768,-32768,-32768, 166,-32768,-32768, 421, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 627 | -32768, 421,-32768,-32768,-32768,-32768, 334,-32768,-32768,-32768, |
| 628 | 98,-32768,-32768, 341,-32768,-32768,-32768, 363, 313, 35, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 629 | -32768,-32768,-32768, 275,-32768, 356, 323, 322,-32768,-32768, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 630 | 98, 275, 363, 327, 363,-32768,-32768, 74,-32768,-32768, |
| 631 | 329, 131,-32768,-32768,-32768, 326, 309, 333, 336, 339, |
| 632 | 235, 342, 338, 344, 346,-32768,-32768,-32768,-32768,-32768, |
| 633 | 347, 309, 309,-32768, 309, 166, 248, 348, 350,-32768, |
| 634 | -32768,-32768,-32768, 351,-32768, 317,-32768, 7,-32768, 275, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 635 | -32768, 12,-32768, 98, 275,-32768,-32768, 275,-32768, 68, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 636 | 317,-32768, 14,-32768,-32768,-32768,-32768, 353,-32768,-32768, |
| 637 | 285, 0,-32768,-32768, 349,-32768,-32768,-32768, 354,-32768, |
| 638 | -32768, 6, 141,-32768,-32768,-32768,-32768,-32768,-32768,-32768, |
| 639 | -32768,-32768,-32768,-32768,-32768,-32768, 355, 358,-32768, 385, |
| 640 | -32768,-32768, 155,-32768, 57, 166,-32768, 363, 340,-32768, |
| 641 | -32768, 348, 43,-32768,-32768,-32768,-32768, 421,-32768, 0, |
| 642 | 10, 232, 340, 363,-32768,-32768,-32768, 43, 38,-32768, |
| 643 | -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 18,-32768, |
| 644 | -32768,-32768, 462, 463,-32768 |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 645 | }; |
| 646 | |
| 647 | static const short yypgoto[] = {-32768, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 648 | -32768, 466,-32768, 360,-32768, 453,-32768,-32768, 446,-32768, |
| 649 | -32768, 417,-32768,-32768,-32768,-32768, 401,-32768, 361,-32768, |
| 650 | -32768, 367,-32768,-32768, 413,-32768,-32768, 332,-32768, 120, |
| 651 | 242,-32768, 132,-32768, 137,-32768,-32768,-32768, 264,-32768, |
| 652 | -32768,-32768, 60, -327, -228, -80,-32768, -34,-32768, -137, |
| 653 | -32768, 277, -115, 304, 307,-32768, -31,-32768, -207, -109, |
| 654 | -211, -71, 357,-32768, -5,-32768,-32768,-32768, -187,-32768, |
| 655 | 171, -133, 89, -45,-32768, 239,-32768, -242,-32768,-32768, |
| 656 | -32768, 80,-32768,-32768,-32768,-32768,-32768,-32768, 90, 93, |
| 657 | -209,-32768,-32768,-32768, 143, -125, -148,-32768,-32768,-32768, |
| 658 | -32768, 1,-32768, 200, -7 |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 659 | }; |
| 660 | |
| 661 | |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 662 | #define YYLAST 755 |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 663 | |
| 664 | |
| 665 | static const short yytable[] = { 15, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 666 | 5, 120, 272, 5, 292, 15, 236, 238, 10, 197, |
| 667 | 179, 276, 278, 279, 10, 10, 117, 282, 283, 163, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 668 | 10, 426, 10, 114, 10, 143, 178, 132, 433, 65, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 669 | 7, 63, 72, 159, 160, 427, 79, 64, 10, 11, |
| 670 | 71, 426, 10, 11, 78, 296, 426, 19, 65, 296, |
| 671 | 63, 217, 218, 159, 160, 427, 64, 10, 159, 160, |
| 672 | 427, 16, 1, 2, 10, 168, 79, 10, 171, 67, |
| 673 | 28, 343, 1, 2, 78, 198, 10, 168, 370, 319, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 674 | 171, 144, 434, 132, 154, 115, 435, 29, 155, 149, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 675 | 179, 353, 320, 179, 381, 145, 295, 163, 118, 133, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 676 | 150, 441, 72, 221, 226, 402, 178, 79, 316, 178, |
| 677 | 71, 441, 289, 310, 139, 78, 153, 289, 325, 292, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 678 | 118, 289, 408, -72, 152, 118, 268, 118, 181, 118, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 679 | 219, 428, 442, 339, 219, 164, 180, 12, 387, 229, |
| 680 | 202, 17, 347, 230, 393, 440, 348, 201, 209, 211, |
| 681 | 118, 428, 293, 397, -280, 133, 428, 210, 30, 68, |
| 682 | 314, 306, 10, 307, 124, 203, 220, 1, 2, 112, |
| 683 | 220, 31, 166, 306, 10, 168, 169, 170, 171, 1, |
| 684 | 2, 359, 217, 218, 274, 360, 243, 275, 418, 165, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 685 | 166, 167, 10, 168, 169, 170, 171, 1, 2, 202, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 686 | 244, 32, 379, 73, 219, 33, 394, 273, 181, 395, |
| 687 | 277, 181, 34, 349, 245, 246, 180, 421, 36, 180, |
| 688 | 388, 354, 235, 37, 203, 294, 66, 302, 80, 302, |
| 689 | 247, 311, 172, 315, 310, 398, 1, 2, 362, 108, |
| 690 | 220, 166, 363, 10, 168, 169, 170, 171, 411, 248, |
| 691 | 173, 324, 412, 202, 166, 249, 10, 168, 169, 170, |
| 692 | 171, 20, 419, 111, 250, 116, 420, 293, 124, 391, |
| 693 | 21, 365, 251, 174, 252, -254, 237, 125, 203, -254, |
| 694 | 345, 118, 314, 245, 109, 110, 376, 377, 126, 378, |
| 695 | 175, 22, 127, 23, 10, 356, 245, 356, 369, 1, |
| 696 | 2, 129, 24, 327, 328, 329, 330, 1, 2, 159, |
| 697 | 160, 380, 184, 185, 331, 166, 128, 10, 168, 169, |
| 698 | 170, 171, 1, 2, 249, 10, 168, 159, 160, 171, |
| 699 | 1, 2, 327, 328, 329, 330, 135, 249, 389, 134, |
| 700 | 294, 83, 84, 244, 302, 136, 180, 322, 323, 341, |
| 701 | 342, 138, 311, 389, 82, 315, 141, 245, 246, 414, |
| 702 | 415, 180, 142, 156, 405, 83, 84, 157, 188, 158, |
| 703 | 207, 10, 231, 247, 410, 213, 215, 85, 38, 86, |
| 704 | 216, 87, -281, 232, 233, 234, 239, 241, 118, 269, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 705 | 242, 88, 248, 267, 280, 89, 284, 288, 249, 90, |
| 706 | 410, 303, 91, 41, 42, 43, 305, 250, 318, 317, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 707 | 326, 338, 405, 92, 45, 251, 438, 252, 93, 46, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 708 | 94, 47, 95, 334, 336, 340, 344, 350, 346, 48, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 709 | 351, 96, 97, 352, 357, 364, 10, 361, 49, 366, |
| 710 | 50, 1, 2, 368, 372, 51, 98, 52, 53, 54, |
| 711 | 203, 373, 375, 367, 38, 374, 424, 386, 99, 385, |
| 712 | 406, 444, 445, 407, 416, 18, 382, 417, 6, 39, |
| 713 | 401, 35, 81, 40, 113, 140, 137, 106, 304, 41, |
| 714 | 42, 43, 399, 392, 390, 44, 208, 439, 227, 271, |
| 715 | 45, 228, 371, 287, 422, 46, 337, 47, 182, 432, |
| 716 | 423, 425, 396, 199, 358, 48, 0, 0, 0, 0, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 717 | 0, 0, 0, 0, 49, 0, 50, 0, 189, 190, |
| 718 | 0, 51, 0, 52, 53, 54, 191, 0, 0, 0, |
| 719 | 85, 38, 86, 0, 87, 192, 0, 0, 0, 0, |
| 720 | 0, 0, 0, 0, 88, 0, 0, 0, 89, 0, |
| 721 | 0, 0, 90, 0, 0, 91, 41, 42, 43, 0, |
| 722 | 0, 0, 0, 0, 193, 0, 92, 45, 0, 0, |
| 723 | 0, 93, 46, 94, 47, 95, 0, 0, 0, 0, |
| 724 | 0, 0, 48, 0, 96, 97, 194, 195, 0, 0, |
| 725 | 0, 49, 0, 50, 83, 84, 0, 0, 51, 98, |
| 726 | 52, 53, 54, 0, 0, 0, 85, 38, 86, 0, |
| 727 | 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 728 | 88, 0, 0, 0, 89, 0, 0, 0, 90, 0, |
| 729 | 0, 91, 41, 42, 43, 0, 0, 0, 0, 0, |
| 730 | 0, 0, 92, 45, 0, 0, 0, 93, 46, 94, |
| 731 | 47, 95, 0, 0, 0, 0, 0, 0, 48, 0, |
| 732 | 96, 97, 0, 0, 0, 0, 0, 49, 0, 50, |
| 733 | 1, 2, 0, 0, 51, 98, 52, 53, 54, 0, |
| 734 | 0, 0, 85, 38, 86, 0, 87, 0, 0, 0, |
| 735 | 0, 0, 0, 0, 0, 0, 88, 0, 0, 0, |
| 736 | 89, 0, 0, 0, 90, 0, 0, 91, 41, 42, |
| 737 | 43, 0, 0, 0, 0, 0, 0, 0, 92, 45, |
| 738 | 0, 0, 0, 93, 46, 94, 47, 95, 0, 0, |
| 739 | 0, 0, 0, 0, 48, 0, 96, 97, 0, 0, |
| 740 | 0, 0, 0, 49, 0, 50, 0, 0, 0, 0, |
| 741 | 51, 98, 52, 53, 54 |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 742 | }; |
| 743 | |
| 744 | static const short yycheck[] = { 7, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 745 | 0, 82, 214, 3, 233, 13, 194, 195, 9, 147, |
| 746 | 136, 221, 222, 223, 9, 9, 32, 227, 228, 135, |
| 747 | 9, 4, 9, 50, 9, 23, 136, 99, 19, 37, |
| 748 | 107, 37, 40, 16, 17, 18, 44, 37, 9, 10, |
| 749 | 40, 4, 9, 10, 44, 34, 4, 109, 56, 34, |
| 750 | 56, 15, 16, 16, 17, 18, 56, 9, 16, 17, |
| 751 | 18, 38, 14, 15, 9, 10, 74, 9, 13, 21, |
| 752 | 10, 281, 14, 15, 74, 147, 9, 10, 321, 105, |
| 753 | 13, 79, 73, 155, 108, 112, 77, 61, 112, 45, |
| 754 | 216, 301, 118, 219, 337, 93, 234, 213, 114, 99, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 755 | 56, 429, 110, 184, 185, 106, 216, 115, 242, 219, |
| 756 | 110, 439, 106, 239, 114, 115, 124, 106, 252, 348, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 757 | 114, 106, 117, 108, 124, 114, 207, 114, 136, 114, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 758 | 37, 114, 115, 267, 37, 135, 136, 108, 346, 108, |
| 759 | 84, 108, 108, 112, 354, 108, 112, 147, 156, 157, |
| 760 | 114, 114, 233, 361, 107, 155, 114, 157, 88, 111, |
| 761 | 241, 106, 9, 108, 117, 109, 73, 14, 15, 111, |
| 762 | 73, 88, 7, 106, 9, 10, 11, 12, 13, 14, |
| 763 | 15, 108, 15, 16, 216, 112, 21, 219, 400, 6, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 764 | 7, 8, 9, 10, 11, 12, 13, 14, 15, 84, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 765 | 35, 57, 336, 50, 37, 88, 355, 215, 216, 358, |
| 766 | 117, 219, 3, 294, 49, 50, 216, 405, 110, 219, |
| 767 | 346, 302, 107, 25, 109, 233, 15, 235, 43, 237, |
| 768 | 65, 239, 49, 241, 360, 361, 14, 15, 108, 111, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 769 | 73, 7, 112, 9, 10, 11, 12, 13, 108, 84, |
| 770 | 67, 251, 112, 84, 7, 90, 9, 10, 11, 12, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 771 | 13, 15, 108, 107, 99, 107, 112, 348, 117, 350, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 772 | 24, 317, 107, 90, 109, 108, 107, 85, 109, 112, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 773 | 288, 114, 363, 49, 111, 112, 332, 333, 85, 335, |
| 774 | 107, 45, 75, 47, 9, 303, 49, 305, 64, 14, |
| 775 | 15, 85, 56, 101, 102, 103, 104, 14, 15, 16, |
| 776 | 17, 64, 16, 17, 112, 7, 55, 9, 10, 11, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 777 | 12, 13, 14, 15, 90, 9, 10, 16, 17, 13, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 778 | 14, 15, 101, 102, 103, 104, 117, 90, 346, 3, |
| 779 | 348, 14, 15, 35, 352, 3, 346, 33, 34, 16, |
| 780 | 17, 108, 360, 361, 3, 363, 108, 49, 50, 394, |
| 781 | 395, 361, 107, 113, 372, 14, 15, 113, 10, 107, |
| 782 | 3, 9, 115, 65, 382, 117, 117, 26, 27, 28, |
| 783 | 113, 30, 107, 39, 107, 72, 107, 107, 114, 5, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 784 | 109, 40, 84, 109, 92, 44, 99, 29, 90, 48, |
| 785 | 408, 72, 51, 52, 53, 54, 72, 99, 29, 100, |
| 786 | 110, 107, 420, 62, 63, 107, 424, 109, 67, 68, |
| 787 | 69, 70, 71, 100, 109, 5, 86, 72, 116, 78, |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 788 | 108, 80, 81, 112, 108, 110, 9, 109, 87, 107, |
| 789 | 89, 14, 15, 105, 107, 94, 95, 96, 97, 98, |
| 790 | 109, 108, 106, 118, 27, 110, 117, 107, 107, 110, |
| 791 | 112, 0, 0, 110, 110, 13, 119, 110, 3, 42, |
| 792 | 118, 26, 56, 46, 74, 115, 110, 65, 237, 52, |
| 793 | 53, 54, 363, 352, 348, 58, 155, 428, 185, 213, |
| 794 | 63, 185, 322, 230, 406, 68, 258, 70, 139, 420, |
| 795 | 408, 412, 360, 147, 305, 78, -1, -1, -1, -1, |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 796 | -1, -1, -1, -1, 87, -1, 89, -1, 14, 15, |
| 797 | -1, 94, -1, 96, 97, 98, 22, -1, -1, -1, |
| 798 | 26, 27, 28, -1, 30, 31, -1, -1, -1, -1, |
| 799 | -1, -1, -1, -1, 40, -1, -1, -1, 44, -1, |
| 800 | -1, -1, 48, -1, -1, 51, 52, 53, 54, -1, |
| 801 | -1, -1, -1, -1, 60, -1, 62, 63, -1, -1, |
| 802 | -1, 67, 68, 69, 70, 71, -1, -1, -1, -1, |
| 803 | -1, -1, 78, -1, 80, 81, 82, 83, -1, -1, |
| 804 | -1, 87, -1, 89, 14, 15, -1, -1, 94, 95, |
| 805 | 96, 97, 98, -1, -1, -1, 26, 27, 28, -1, |
| 806 | 30, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 807 | 40, -1, -1, -1, 44, -1, -1, -1, 48, -1, |
| 808 | -1, 51, 52, 53, 54, -1, -1, -1, -1, -1, |
| 809 | -1, -1, 62, 63, -1, -1, -1, 67, 68, 69, |
| 810 | 70, 71, -1, -1, -1, -1, -1, -1, 78, -1, |
| 811 | 80, 81, -1, -1, -1, -1, -1, 87, -1, 89, |
| 812 | 14, 15, -1, -1, 94, 95, 96, 97, 98, -1, |
| 813 | -1, -1, 26, 27, 28, -1, 30, -1, -1, -1, |
| 814 | -1, -1, -1, -1, -1, -1, 40, -1, -1, -1, |
| 815 | 44, -1, -1, -1, 48, -1, -1, 51, 52, 53, |
| 816 | 54, -1, -1, -1, -1, -1, -1, -1, 62, 63, |
| 817 | -1, -1, -1, 67, 68, 69, 70, 71, -1, -1, |
| 818 | -1, -1, -1, -1, 78, -1, 80, 81, -1, -1, |
| 819 | -1, -1, -1, 87, -1, 89, -1, -1, -1, -1, |
| 820 | 94, 95, 96, 97, 98 |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 821 | }; |
| 822 | /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ |
| 823 | #line 3 "/usr/share/bison.simple" |
| 824 | /* This file comes from bison-1.28. */ |
| 825 | |
| 826 | /* Skeleton output parser for bison, |
| 827 | Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. |
| 828 | |
| 829 | This program is free software; you can redistribute it and/or modify |
| 830 | it under the terms of the GNU General Public License as published by |
| 831 | the Free Software Foundation; either version 2, or (at your option) |
| 832 | any later version. |
| 833 | |
| 834 | This program is distributed in the hope that it will be useful, |
| 835 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 836 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 837 | GNU General Public License for more details. |
| 838 | |
| 839 | You should have received a copy of the GNU General Public License |
| 840 | along with this program; if not, write to the Free Software |
| 841 | Foundation, Inc., 59 Temple Place - Suite 330, |
| 842 | Boston, MA 02111-1307, USA. */ |
| 843 | |
| 844 | /* As a special exception, when this file is copied by Bison into a |
| 845 | Bison output file, you may use that output file without restriction. |
| 846 | This special exception was added by the Free Software Foundation |
| 847 | in version 1.24 of Bison. */ |
| 848 | |
| 849 | /* This is the parser code that is written into each bison parser |
| 850 | when the %semantic_parser declaration is not specified in the grammar. |
| 851 | It was written by Richard Stallman by simplifying the hairy parser |
| 852 | used when %semantic_parser is specified. */ |
| 853 | |
| 854 | #ifndef YYSTACK_USE_ALLOCA |
| 855 | #ifdef alloca |
| 856 | #define YYSTACK_USE_ALLOCA |
| 857 | #else /* alloca not defined */ |
| 858 | #ifdef __GNUC__ |
| 859 | #define YYSTACK_USE_ALLOCA |
| 860 | #define alloca __builtin_alloca |
| 861 | #else /* not GNU C. */ |
| 862 | #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) |
| 863 | #define YYSTACK_USE_ALLOCA |
| 864 | #include <alloca.h> |
| 865 | #else /* not sparc */ |
| 866 | /* We think this test detects Watcom and Microsoft C. */ |
| 867 | /* This used to test MSDOS, but that is a bad idea |
| 868 | since that symbol is in the user namespace. */ |
| 869 | #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) |
| 870 | #if 0 /* No need for malloc.h, which pollutes the namespace; |
| 871 | instead, just don't use alloca. */ |
| 872 | #include <malloc.h> |
| 873 | #endif |
| 874 | #else /* not MSDOS, or __TURBOC__ */ |
| 875 | #if defined(_AIX) |
| 876 | /* I don't know what this was needed for, but it pollutes the namespace. |
| 877 | So I turned it off. rms, 2 May 1997. */ |
| 878 | /* #include <malloc.h> */ |
| 879 | #pragma alloca |
| 880 | #define YYSTACK_USE_ALLOCA |
| 881 | #else /* not MSDOS, or __TURBOC__, or _AIX */ |
| 882 | #if 0 |
| 883 | #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, |
| 884 | and on HPUX 10. Eventually we can turn this on. */ |
| 885 | #define YYSTACK_USE_ALLOCA |
| 886 | #define alloca __builtin_alloca |
| 887 | #endif /* __hpux */ |
| 888 | #endif |
| 889 | #endif /* not _AIX */ |
| 890 | #endif /* not MSDOS, or __TURBOC__ */ |
| 891 | #endif /* not sparc */ |
| 892 | #endif /* not GNU C */ |
| 893 | #endif /* alloca not defined */ |
| 894 | #endif /* YYSTACK_USE_ALLOCA not defined */ |
| 895 | |
| 896 | #ifdef YYSTACK_USE_ALLOCA |
| 897 | #define YYSTACK_ALLOC alloca |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 898 | #else |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 899 | #define YYSTACK_ALLOC malloc |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 900 | #endif |
| 901 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 902 | /* Note: there must be only one dollar sign in this file. |
| 903 | It is replaced by the list of actions, each action |
| 904 | as one case of the switch. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 905 | |
| 906 | #define yyerrok (yyerrstatus = 0) |
| 907 | #define yyclearin (yychar = YYEMPTY) |
| 908 | #define YYEMPTY -2 |
| 909 | #define YYEOF 0 |
| 910 | #define YYACCEPT goto yyacceptlab |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 911 | #define YYABORT goto yyabortlab |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 912 | #define YYERROR goto yyerrlab1 |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 913 | /* Like YYERROR except do call yyerror. |
| 914 | This remains here temporarily to ease the |
| 915 | transition to the new meaning of YYERROR, for GCC. |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 916 | Once GCC version 2 has supplanted version 1, this can go. */ |
| 917 | #define YYFAIL goto yyerrlab |
| 918 | #define YYRECOVERING() (!!yyerrstatus) |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 919 | #define YYBACKUP(token, value) \ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 920 | do \ |
| 921 | if (yychar == YYEMPTY && yylen == 1) \ |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 922 | { yychar = (token), yylval = (value); \ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 923 | yychar1 = YYTRANSLATE (yychar); \ |
| 924 | YYPOPSTACK; \ |
| 925 | goto yybackup; \ |
| 926 | } \ |
| 927 | else \ |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 928 | { yyerror ("syntax error: cannot back up"); YYERROR; } \ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 929 | while (0) |
| 930 | |
| 931 | #define YYTERROR 1 |
| 932 | #define YYERRCODE 256 |
| 933 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 934 | #ifndef YYPURE |
| 935 | #define YYLEX yylex() |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 936 | #endif |
| 937 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 938 | #ifdef YYPURE |
| 939 | #ifdef YYLSP_NEEDED |
| 940 | #ifdef YYLEX_PARAM |
| 941 | #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) |
| 942 | #else |
| 943 | #define YYLEX yylex(&yylval, &yylloc) |
| 944 | #endif |
| 945 | #else /* not YYLSP_NEEDED */ |
| 946 | #ifdef YYLEX_PARAM |
| 947 | #define YYLEX yylex(&yylval, YYLEX_PARAM) |
| 948 | #else |
| 949 | #define YYLEX yylex(&yylval) |
| 950 | #endif |
| 951 | #endif /* not YYLSP_NEEDED */ |
| 952 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 953 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 954 | /* If nonreentrant, generate the variables here */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 955 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 956 | #ifndef YYPURE |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 957 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 958 | int yychar; /* the lookahead symbol */ |
| 959 | YYSTYPE yylval; /* the semantic value of the */ |
| 960 | /* lookahead symbol */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 961 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 962 | #ifdef YYLSP_NEEDED |
| 963 | YYLTYPE yylloc; /* location data for the lookahead */ |
| 964 | /* symbol */ |
| 965 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 966 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 967 | int yynerrs; /* number of parse errors so far */ |
| 968 | #endif /* not YYPURE */ |
| 969 | |
| 970 | #if YYDEBUG != 0 |
| 971 | int yydebug; /* nonzero means print parse trace */ |
| 972 | /* Since this is uninitialized, it does not stop multiple parsers |
| 973 | from coexisting. */ |
| 974 | #endif |
| 975 | |
| 976 | /* YYINITDEPTH indicates the initial size of the parser's stacks */ |
| 977 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 978 | #ifndef YYINITDEPTH |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 979 | #define YYINITDEPTH 200 |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 980 | #endif |
| 981 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 982 | /* YYMAXDEPTH is the maximum size the stacks can grow to |
| 983 | (effective only if the built-in stack extension method is used). */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 984 | |
| 985 | #if YYMAXDEPTH == 0 |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 986 | #undef YYMAXDEPTH |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 987 | #endif |
| 988 | |
| 989 | #ifndef YYMAXDEPTH |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 990 | #define YYMAXDEPTH 10000 |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 991 | #endif |
| 992 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 993 | /* Define __yy_memcpy. Note that the size argument |
| 994 | should be passed with type unsigned int, because that is what the non-GCC |
| 995 | definitions require. With GCC, __builtin_memcpy takes an arg |
| 996 | of type size_t, but it can handle unsigned int. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 997 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 998 | #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ |
| 999 | #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) |
| 1000 | #else /* not GNU C or C++ */ |
| 1001 | #ifndef __cplusplus |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1002 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1003 | /* This is the most reliable way to avoid incompatibilities |
| 1004 | in available built-in functions on various systems. */ |
Lev Walkin | 459ab02 | 2004-09-07 10:39:09 +0000 | [diff] [blame] | 1005 | static void |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1006 | __yy_memcpy (to, from, count) |
| 1007 | char *to; |
| 1008 | char *from; |
| 1009 | unsigned int count; |
Lev Walkin | 459ab02 | 2004-09-07 10:39:09 +0000 | [diff] [blame] | 1010 | { |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1011 | register char *f = from; |
| 1012 | register char *t = to; |
| 1013 | register int i = count; |
Lev Walkin | 459ab02 | 2004-09-07 10:39:09 +0000 | [diff] [blame] | 1014 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1015 | while (i-- > 0) |
| 1016 | *t++ = *f++; |
Lev Walkin | 459ab02 | 2004-09-07 10:39:09 +0000 | [diff] [blame] | 1017 | } |
Lev Walkin | 459ab02 | 2004-09-07 10:39:09 +0000 | [diff] [blame] | 1018 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1019 | #else /* __cplusplus */ |
Lev Walkin | 459ab02 | 2004-09-07 10:39:09 +0000 | [diff] [blame] | 1020 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1021 | /* This is the most reliable way to avoid incompatibilities |
| 1022 | in available built-in functions on various systems. */ |
Lev Walkin | 459ab02 | 2004-09-07 10:39:09 +0000 | [diff] [blame] | 1023 | static void |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1024 | __yy_memcpy (char *to, char *from, unsigned int count) |
Lev Walkin | 459ab02 | 2004-09-07 10:39:09 +0000 | [diff] [blame] | 1025 | { |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1026 | register char *t = to; |
| 1027 | register char *f = from; |
| 1028 | register int i = count; |
Lev Walkin | 459ab02 | 2004-09-07 10:39:09 +0000 | [diff] [blame] | 1029 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1030 | while (i-- > 0) |
| 1031 | *t++ = *f++; |
Lev Walkin | 609ccbb | 2004-09-04 04:49:21 +0000 | [diff] [blame] | 1032 | } |
Lev Walkin | 609ccbb | 2004-09-04 04:49:21 +0000 | [diff] [blame] | 1033 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1034 | #endif |
| 1035 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1036 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1037 | #line 217 "/usr/share/bison.simple" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1038 | |
| 1039 | /* The user can define YYPARSE_PARAM as the name of an argument to be passed |
| 1040 | into yyparse. The argument should have type void *. |
| 1041 | It should actually point to an object. |
| 1042 | Grammar actions can access the variable by casting it |
| 1043 | to the proper pointer type. */ |
| 1044 | |
| 1045 | #ifdef YYPARSE_PARAM |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1046 | #ifdef __cplusplus |
| 1047 | #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM |
| 1048 | #define YYPARSE_PARAM_DECL |
| 1049 | #else /* not __cplusplus */ |
| 1050 | #define YYPARSE_PARAM_ARG YYPARSE_PARAM |
| 1051 | #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; |
| 1052 | #endif /* not __cplusplus */ |
| 1053 | #else /* not YYPARSE_PARAM */ |
| 1054 | #define YYPARSE_PARAM_ARG |
| 1055 | #define YYPARSE_PARAM_DECL |
| 1056 | #endif /* not YYPARSE_PARAM */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1057 | |
| 1058 | /* Prevent warning if -Wstrict-prototypes. */ |
| 1059 | #ifdef __GNUC__ |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1060 | #ifdef YYPARSE_PARAM |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1061 | int yyparse (void *); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1062 | #else |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1063 | int yyparse (void); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1064 | #endif |
Lev Walkin | ceb20e7 | 2004-09-05 10:40:41 +0000 | [diff] [blame] | 1065 | #endif |
Lev Walkin | 459ab02 | 2004-09-07 10:39:09 +0000 | [diff] [blame] | 1066 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1067 | int |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1068 | yyparse(YYPARSE_PARAM_ARG) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1069 | YYPARSE_PARAM_DECL |
| 1070 | { |
| 1071 | register int yystate; |
| 1072 | register int yyn; |
| 1073 | register short *yyssp; |
| 1074 | register YYSTYPE *yyvsp; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1075 | int yyerrstatus; /* number of tokens to shift before error messages enabled */ |
| 1076 | int yychar1 = 0; /* lookahead token as an internal (translated) token number */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1077 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1078 | short yyssa[YYINITDEPTH]; /* the state stack */ |
| 1079 | YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1080 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1081 | short *yyss = yyssa; /* refer to the stacks thru separate pointers */ |
| 1082 | YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1083 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1084 | #ifdef YYLSP_NEEDED |
| 1085 | YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ |
| 1086 | YYLTYPE *yyls = yylsa; |
| 1087 | YYLTYPE *yylsp; |
| 1088 | |
| 1089 | #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) |
| 1090 | #else |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1091 | #define YYPOPSTACK (yyvsp--, yyssp--) |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1092 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1093 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1094 | int yystacksize = YYINITDEPTH; |
| 1095 | int yyfree_stacks = 0; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1096 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1097 | #ifdef YYPURE |
| 1098 | int yychar; |
| 1099 | YYSTYPE yylval; |
| 1100 | int yynerrs; |
| 1101 | #ifdef YYLSP_NEEDED |
| 1102 | YYLTYPE yylloc; |
| 1103 | #endif |
| 1104 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1105 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1106 | YYSTYPE yyval; /* the variable used to return */ |
| 1107 | /* semantic values from the action */ |
| 1108 | /* routines */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1109 | |
| 1110 | int yylen; |
| 1111 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1112 | #if YYDEBUG != 0 |
| 1113 | if (yydebug) |
| 1114 | fprintf(stderr, "Starting parse\n"); |
| 1115 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1116 | |
| 1117 | yystate = 0; |
| 1118 | yyerrstatus = 0; |
| 1119 | yynerrs = 0; |
| 1120 | yychar = YYEMPTY; /* Cause a token to be read. */ |
| 1121 | |
| 1122 | /* Initialize stack pointers. |
| 1123 | Waste one element of value and location stack |
| 1124 | so that they stay on the same level as the state stack. |
| 1125 | The wasted elements are never initialized. */ |
| 1126 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1127 | yyssp = yyss - 1; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1128 | yyvsp = yyvs; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1129 | #ifdef YYLSP_NEEDED |
| 1130 | yylsp = yyls; |
| 1131 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1132 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1133 | /* Push a new state, which is found in yystate . */ |
| 1134 | /* In all cases, when you get here, the value and location stacks |
| 1135 | have just been pushed. so pushing a state here evens the stacks. */ |
| 1136 | yynewstate: |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1137 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1138 | *++yyssp = yystate; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1139 | |
| 1140 | if (yyssp >= yyss + yystacksize - 1) |
| 1141 | { |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1142 | /* Give user a chance to reallocate the stack */ |
| 1143 | /* Use copies of these so that the &'s don't force the real ones into memory. */ |
| 1144 | YYSTYPE *yyvs1 = yyvs; |
| 1145 | short *yyss1 = yyss; |
| 1146 | #ifdef YYLSP_NEEDED |
| 1147 | YYLTYPE *yyls1 = yyls; |
| 1148 | #endif |
| 1149 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1150 | /* Get the current used size of the three stacks, in elements. */ |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1151 | int size = yyssp - yyss + 1; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1152 | |
| 1153 | #ifdef yyoverflow |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1154 | /* Each stack pointer address is followed by the size of |
| 1155 | the data in use in that stack, in bytes. */ |
| 1156 | #ifdef YYLSP_NEEDED |
| 1157 | /* This used to be a conditional around just the two extra args, |
| 1158 | but that might be undefined if yyoverflow is a macro. */ |
| 1159 | yyoverflow("parser stack overflow", |
| 1160 | &yyss1, size * sizeof (*yyssp), |
| 1161 | &yyvs1, size * sizeof (*yyvsp), |
| 1162 | &yyls1, size * sizeof (*yylsp), |
| 1163 | &yystacksize); |
| 1164 | #else |
| 1165 | yyoverflow("parser stack overflow", |
| 1166 | &yyss1, size * sizeof (*yyssp), |
| 1167 | &yyvs1, size * sizeof (*yyvsp), |
| 1168 | &yystacksize); |
| 1169 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1170 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1171 | yyss = yyss1; yyvs = yyvs1; |
| 1172 | #ifdef YYLSP_NEEDED |
| 1173 | yyls = yyls1; |
| 1174 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1175 | #else /* no yyoverflow */ |
| 1176 | /* Extend the stack our own way. */ |
| 1177 | if (yystacksize >= YYMAXDEPTH) |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1178 | { |
| 1179 | yyerror("parser stack overflow"); |
| 1180 | if (yyfree_stacks) |
| 1181 | { |
| 1182 | free (yyss); |
| 1183 | free (yyvs); |
| 1184 | #ifdef YYLSP_NEEDED |
| 1185 | free (yyls); |
| 1186 | #endif |
| 1187 | } |
| 1188 | return 2; |
| 1189 | } |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1190 | yystacksize *= 2; |
| 1191 | if (yystacksize > YYMAXDEPTH) |
| 1192 | yystacksize = YYMAXDEPTH; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1193 | #ifndef YYSTACK_USE_ALLOCA |
| 1194 | yyfree_stacks = 1; |
| 1195 | #endif |
| 1196 | yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); |
| 1197 | __yy_memcpy ((char *)yyss, (char *)yyss1, |
| 1198 | size * (unsigned int) sizeof (*yyssp)); |
| 1199 | yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); |
| 1200 | __yy_memcpy ((char *)yyvs, (char *)yyvs1, |
| 1201 | size * (unsigned int) sizeof (*yyvsp)); |
| 1202 | #ifdef YYLSP_NEEDED |
| 1203 | yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); |
| 1204 | __yy_memcpy ((char *)yyls, (char *)yyls1, |
| 1205 | size * (unsigned int) sizeof (*yylsp)); |
| 1206 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1207 | #endif /* no yyoverflow */ |
| 1208 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1209 | yyssp = yyss + size - 1; |
| 1210 | yyvsp = yyvs + size - 1; |
| 1211 | #ifdef YYLSP_NEEDED |
| 1212 | yylsp = yyls + size - 1; |
| 1213 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1214 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1215 | #if YYDEBUG != 0 |
| 1216 | if (yydebug) |
| 1217 | fprintf(stderr, "Stack size increased to %d\n", yystacksize); |
| 1218 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1219 | |
| 1220 | if (yyssp >= yyss + yystacksize - 1) |
| 1221 | YYABORT; |
| 1222 | } |
| 1223 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1224 | #if YYDEBUG != 0 |
| 1225 | if (yydebug) |
| 1226 | fprintf(stderr, "Entering state %d\n", yystate); |
| 1227 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1228 | |
| 1229 | goto yybackup; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1230 | yybackup: |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1231 | |
| 1232 | /* Do appropriate processing given the current state. */ |
| 1233 | /* Read a lookahead token if we need one and don't already have one. */ |
| 1234 | /* yyresume: */ |
| 1235 | |
| 1236 | /* First try to decide what to do without reference to lookahead token. */ |
| 1237 | |
| 1238 | yyn = yypact[yystate]; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1239 | if (yyn == YYFLAG) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1240 | goto yydefault; |
| 1241 | |
| 1242 | /* Not known => get a lookahead token if don't already have one. */ |
| 1243 | |
| 1244 | /* yychar is either YYEMPTY or YYEOF |
| 1245 | or a valid token in external form. */ |
| 1246 | |
| 1247 | if (yychar == YYEMPTY) |
| 1248 | { |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1249 | #if YYDEBUG != 0 |
| 1250 | if (yydebug) |
| 1251 | fprintf(stderr, "Reading a token: "); |
| 1252 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1253 | yychar = YYLEX; |
| 1254 | } |
| 1255 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1256 | /* Convert token to internal form (in yychar1) for indexing tables with */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1257 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1258 | if (yychar <= 0) /* This means end of input. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1259 | { |
| 1260 | yychar1 = 0; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1261 | yychar = YYEOF; /* Don't call YYLEX any more */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1262 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1263 | #if YYDEBUG != 0 |
| 1264 | if (yydebug) |
| 1265 | fprintf(stderr, "Now at end of input.\n"); |
| 1266 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1267 | } |
| 1268 | else |
| 1269 | { |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1270 | yychar1 = YYTRANSLATE(yychar); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1271 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1272 | #if YYDEBUG != 0 |
| 1273 | if (yydebug) |
| 1274 | { |
| 1275 | fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); |
| 1276 | /* Give the individual parser a way to print the precise meaning |
| 1277 | of a token, for further debugging info. */ |
| 1278 | #ifdef YYPRINT |
| 1279 | YYPRINT (stderr, yychar, yylval); |
| 1280 | #endif |
| 1281 | fprintf (stderr, ")\n"); |
| 1282 | } |
| 1283 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1284 | } |
| 1285 | |
| 1286 | yyn += yychar1; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1287 | if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1288 | goto yydefault; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1289 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1290 | yyn = yytable[yyn]; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1291 | |
| 1292 | /* yyn is what to do for this token type in this state. |
| 1293 | Negative => reduce, -yyn is rule number. |
| 1294 | Positive => shift, yyn is new state. |
| 1295 | New state is final state => don't bother to shift, |
| 1296 | just return success. |
| 1297 | 0, or most negative number => error. */ |
| 1298 | |
| 1299 | if (yyn < 0) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1300 | { |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1301 | if (yyn == YYFLAG) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1302 | goto yyerrlab; |
| 1303 | yyn = -yyn; |
| 1304 | goto yyreduce; |
| 1305 | } |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1306 | else if (yyn == 0) |
| 1307 | goto yyerrlab; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1308 | |
| 1309 | if (yyn == YYFINAL) |
| 1310 | YYACCEPT; |
| 1311 | |
| 1312 | /* Shift the lookahead token. */ |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1313 | |
| 1314 | #if YYDEBUG != 0 |
| 1315 | if (yydebug) |
| 1316 | fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); |
| 1317 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1318 | |
| 1319 | /* Discard the token being shifted unless it is eof. */ |
| 1320 | if (yychar != YYEOF) |
| 1321 | yychar = YYEMPTY; |
| 1322 | |
| 1323 | *++yyvsp = yylval; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1324 | #ifdef YYLSP_NEEDED |
| 1325 | *++yylsp = yylloc; |
| 1326 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1327 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1328 | /* count tokens shifted since error; after three, turn off error status. */ |
| 1329 | if (yyerrstatus) yyerrstatus--; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1330 | |
| 1331 | yystate = yyn; |
| 1332 | goto yynewstate; |
| 1333 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1334 | /* Do the default action for the current state. */ |
Lev Walkin | 459ab02 | 2004-09-07 10:39:09 +0000 | [diff] [blame] | 1335 | yydefault: |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1336 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1337 | yyn = yydefact[yystate]; |
| 1338 | if (yyn == 0) |
| 1339 | goto yyerrlab; |
| 1340 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1341 | /* Do a reduction. yyn is the number of a rule to reduce with. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1342 | yyreduce: |
| 1343 | yylen = yyr2[yyn]; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1344 | if (yylen > 0) |
| 1345 | yyval = yyvsp[1-yylen]; /* implement default value of the action */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1346 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1347 | #if YYDEBUG != 0 |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1348 | if (yydebug) |
| 1349 | { |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1350 | int i; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1351 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1352 | fprintf (stderr, "Reducing via rule %d (line %d), ", |
| 1353 | yyn, yyrline[yyn]); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1354 | |
| 1355 | /* Print the symbols being reduced, and their result. */ |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1356 | for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) |
| 1357 | fprintf (stderr, "%s ", yytname[yyrhs[i]]); |
| 1358 | fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1359 | } |
| 1360 | #endif |
Lev Walkin | 459ab02 | 2004-09-07 10:39:09 +0000 | [diff] [blame] | 1361 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1362 | |
| 1363 | switch (yyn) { |
| 1364 | |
| 1365 | case 1: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1366 | #line 324 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1367 | { |
| 1368 | *(void **)param = yyvsp[0].a_grammar; |
| 1369 | ; |
| 1370 | break;} |
| 1371 | case 2: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1372 | #line 330 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1373 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1374 | yyval.a_grammar = asn1p_new(); |
| 1375 | checkmem(yyval.a_grammar); |
| 1376 | TQ_ADD(&(yyval.a_grammar->modules), yyvsp[0].a_module, mod_next); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1377 | ; |
| 1378 | break;} |
| 1379 | case 3: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1380 | #line 335 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1381 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1382 | yyval.a_grammar = yyvsp[-1].a_grammar; |
| 1383 | TQ_ADD(&(yyval.a_grammar->modules), yyvsp[0].a_module, mod_next); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1384 | ; |
| 1385 | break;} |
| 1386 | case 4: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1387 | #line 356 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1388 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1389 | |
| 1390 | if(yyvsp[-1].a_module) { |
| 1391 | yyval.a_module = yyvsp[-1].a_module; |
| 1392 | } else { |
| 1393 | /* There's a chance that a module is just plain empty */ |
| 1394 | yyval.a_module = asn1p_module_new(); |
| 1395 | } |
| 1396 | checkmem(yyval.a_module); |
| 1397 | |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 1398 | yyval.a_module->ModuleName = yyvsp[-7].tv_str; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1399 | yyval.a_module->module_oid = yyvsp[-6].a_oid; |
| 1400 | yyval.a_module->module_flags = yyvsp[-4].a_module_flags; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1401 | ; |
| 1402 | break;} |
| 1403 | case 5: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1404 | #line 377 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1405 | { yyval.a_oid = 0; ; |
| 1406 | break;} |
| 1407 | case 6: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1408 | #line 378 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1409 | { yyval.a_oid = yyvsp[0].a_oid; ; |
| 1410 | break;} |
| 1411 | case 7: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1412 | #line 382 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1413 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1414 | yyval.a_oid = yyvsp[-1].a_oid; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1415 | ; |
| 1416 | break;} |
| 1417 | case 8: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1418 | #line 385 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1419 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1420 | yyval.a_oid = 0; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1421 | ; |
| 1422 | break;} |
| 1423 | case 9: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1424 | #line 391 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1425 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1426 | yyval.a_oid = asn1p_oid_new(); |
| 1427 | asn1p_oid_add_arc(yyval.a_oid, &yyvsp[0].a_oid_arc); |
| 1428 | if(yyvsp[0].a_oid_arc.name) |
| 1429 | free(yyvsp[0].a_oid_arc.name); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1430 | ; |
| 1431 | break;} |
| 1432 | case 10: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1433 | #line 397 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1434 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1435 | yyval.a_oid = yyvsp[-1].a_oid; |
| 1436 | asn1p_oid_add_arc(yyval.a_oid, &yyvsp[0].a_oid_arc); |
| 1437 | if(yyvsp[0].a_oid_arc.name) |
| 1438 | free(yyvsp[0].a_oid_arc.name); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1439 | ; |
| 1440 | break;} |
| 1441 | case 11: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1442 | #line 406 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1443 | { /* iso */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1444 | yyval.a_oid_arc.name = yyvsp[0].tv_str; |
| 1445 | yyval.a_oid_arc.number = -1; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1446 | ; |
| 1447 | break;} |
| 1448 | case 12: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1449 | #line 410 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1450 | { /* iso(1) */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1451 | yyval.a_oid_arc.name = yyvsp[-3].tv_str; |
| 1452 | yyval.a_oid_arc.number = yyvsp[-1].a_int; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1453 | ; |
| 1454 | break;} |
| 1455 | case 13: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1456 | #line 414 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1457 | { /* 1 */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1458 | yyval.a_oid_arc.name = 0; |
| 1459 | yyval.a_oid_arc.number = yyvsp[0].a_int; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1460 | ; |
| 1461 | break;} |
| 1462 | case 14: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1463 | #line 424 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1464 | { yyval.a_module_flags = MSF_NOFLAGS; ; |
| 1465 | break;} |
| 1466 | case 15: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1467 | #line 425 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1468 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1469 | yyval.a_module_flags = yyvsp[0].a_module_flags; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1470 | ; |
| 1471 | break;} |
| 1472 | case 16: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1473 | #line 434 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1474 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1475 | yyval.a_module_flags = yyvsp[0].a_module_flags; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1476 | ; |
| 1477 | break;} |
| 1478 | case 17: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1479 | #line 437 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1480 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1481 | yyval.a_module_flags = yyvsp[-1].a_module_flags | yyvsp[0].a_module_flags; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1482 | ; |
| 1483 | break;} |
| 1484 | case 18: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1485 | #line 446 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1486 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1487 | yyval.a_module_flags = MSF_EXPLICIT_TAGS; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1488 | ; |
| 1489 | break;} |
| 1490 | case 19: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1491 | #line 449 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1492 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1493 | yyval.a_module_flags = MSF_IMPLICIT_TAGS; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1494 | ; |
| 1495 | break;} |
| 1496 | case 20: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1497 | #line 452 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1498 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1499 | yyval.a_module_flags = MSF_AUTOMATIC_TAGS; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1500 | ; |
| 1501 | break;} |
| 1502 | case 21: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1503 | #line 455 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1504 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1505 | yyval.a_module_flags = MSF_EXTENSIBILITY_IMPLIED; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1506 | ; |
| 1507 | break;} |
| 1508 | case 22: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1509 | #line 459 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1510 | { |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 1511 | /* X.680Amd1 specifies TAG and XER */ |
| 1512 | if(strcmp(yyvsp[-1].tv_str, "TAG") == 0) { |
| 1513 | yyval.a_module_flags = MSF_TAG_INSTRUCTIONS; |
| 1514 | } else if(strcmp(yyvsp[-1].tv_str, "XER") == 0) { |
| 1515 | yyval.a_module_flags = MSF_XER_INSTRUCTIONS; |
| 1516 | } else { |
| 1517 | fprintf(stderr, |
| 1518 | "WARNING: %s INSTRUCTIONS at line %d: " |
| 1519 | "Unrecognized encoding reference\n", |
| 1520 | yyvsp[-1].tv_str, yylineno); |
| 1521 | yyval.a_module_flags = MSF_unk_INSTRUCTIONS; |
| 1522 | } |
| 1523 | free(yyvsp[-1].tv_str); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1524 | ; |
| 1525 | break;} |
| 1526 | case 23: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1527 | #line 480 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1528 | { yyval.a_module = 0; ; |
| 1529 | break;} |
| 1530 | case 24: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1531 | #line 481 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1532 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1533 | yyval.a_module = yyvsp[0].a_module; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1534 | ; |
| 1535 | break;} |
| 1536 | case 25: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1537 | #line 490 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1538 | { |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 1539 | yyval.a_module = yyvsp[0].a_module; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1540 | ; |
| 1541 | break;} |
| 1542 | case 26: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1543 | #line 493 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1544 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1545 | yyval.a_module = yyvsp[-1].a_module; |
| 1546 | |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 1547 | /* Behave well when one of them is skipped. */ |
| 1548 | if(!(yyvsp[-1].a_module)) { |
| 1549 | if(yyvsp[0].a_module) yyval.a_module = yyvsp[0].a_module; |
| 1550 | break; |
| 1551 | } |
| 1552 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1553 | #ifdef MY_IMPORT |
| 1554 | #error MY_IMPORT DEFINED ELSEWHERE! |
| 1555 | #endif |
| 1556 | #define MY_IMPORT(foo,field) do { \ |
Lev Walkin | bc55d23 | 2004-08-13 12:31:09 +0000 | [diff] [blame] | 1557 | while(TQ_FIRST(&(yyvsp[0].a_module->foo))) { \ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1558 | TQ_ADD(&(yyval.a_module->foo), \ |
| 1559 | TQ_REMOVE(&(yyvsp[0].a_module->foo), field), \ |
| 1560 | field); \ |
Lev Walkin | bc55d23 | 2004-08-13 12:31:09 +0000 | [diff] [blame] | 1561 | } \ |
| 1562 | assert(TQ_FIRST(&(yyvsp[0].a_module->foo)) == 0); \ |
| 1563 | } while(0) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1564 | |
| 1565 | MY_IMPORT(imports, xp_next); |
| 1566 | MY_IMPORT(exports, xp_next); |
| 1567 | MY_IMPORT(members, next); |
| 1568 | #undef MY_IMPORT |
| 1569 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1570 | ; |
| 1571 | break;} |
| 1572 | case 27: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1573 | #line 526 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1574 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1575 | yyval.a_module = yyvsp[0].a_module; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1576 | ; |
| 1577 | break;} |
| 1578 | case 28: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1579 | #line 529 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1580 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1581 | yyval.a_module = asn1p_module_new(); |
| 1582 | checkmem(yyval.a_module); |
| 1583 | if(yyvsp[0].a_xports) { |
| 1584 | TQ_ADD(&(yyval.a_module->exports), yyvsp[0].a_xports, xp_next); |
| 1585 | } else { |
| 1586 | /* "EXPORTS ALL;" ? */ |
| 1587 | } |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1588 | ; |
| 1589 | break;} |
| 1590 | case 29: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1591 | #line 538 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1592 | { |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 1593 | yyval.a_module = asn1p_module_new(); |
| 1594 | checkmem(yyval.a_module); |
| 1595 | assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID); |
| 1596 | assert(yyvsp[0].a_expr->meta_type != AMT_INVALID); |
| 1597 | TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1598 | ; |
| 1599 | break;} |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 1600 | case 30: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1601 | #line 545 "asn1p_y.y" |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 1602 | { |
| 1603 | yyval.a_module = asn1p_module_new(); |
| 1604 | checkmem(yyval.a_module); |
| 1605 | assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID); |
| 1606 | assert(yyvsp[0].a_expr->meta_type != AMT_INVALID); |
| 1607 | TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next); |
| 1608 | ; |
| 1609 | break;} |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1610 | case 31: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1611 | #line 558 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1612 | { |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 1613 | yyval.a_module = asn1p_module_new(); |
| 1614 | checkmem(yyval.a_module); |
| 1615 | assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID); |
| 1616 | assert(yyvsp[0].a_expr->meta_type != AMT_INVALID); |
| 1617 | TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1618 | ; |
| 1619 | break;} |
| 1620 | case 32: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1621 | #line 566 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1622 | { asn1p_lexer_hack_push_encoding_control(); ; |
| 1623 | break;} |
| 1624 | case 33: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1625 | #line 567 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1626 | { |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 1627 | fprintf(stderr, |
| 1628 | "WARNING: ENCODING-CONTROL %s " |
| 1629 | "specification at line %d ignored\n", |
| 1630 | yyvsp[-1].tv_str, yylineno); |
| 1631 | free(yyvsp[-1].tv_str); |
| 1632 | yyval.a_module = 0; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1633 | ; |
| 1634 | break;} |
| 1635 | case 34: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1636 | #line 579 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1637 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1638 | return yyerror( |
Lev Walkin | 7085305 | 2005-11-26 11:21:55 +0000 | [diff] [blame] | 1639 | "Attempt to redefine a standard basic string type, " |
| 1640 | "please comment out or remove this type redefinition."); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1641 | ; |
| 1642 | break;} |
| 1643 | case 35: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1644 | #line 592 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1645 | { |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 1646 | if(!saved_aid && 0) |
| 1647 | return yyerror("Unterminated IMPORTS FROM, " |
| 1648 | "expected semicolon ';'"); |
| 1649 | saved_aid = 0; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1650 | yyval.a_module = yyvsp[-1].a_module; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1651 | ; |
| 1652 | break;} |
| 1653 | case 36: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1654 | #line 602 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1655 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1656 | return yyerror("Empty IMPORTS list"); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1657 | ; |
| 1658 | break;} |
| 1659 | case 37: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1660 | #line 608 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1661 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1662 | yyval.a_module = asn1p_module_new(); |
| 1663 | checkmem(yyval.a_module); |
| 1664 | TQ_ADD(&(yyval.a_module->imports), yyvsp[0].a_xports, xp_next); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1665 | ; |
| 1666 | break;} |
| 1667 | case 38: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1668 | #line 613 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1669 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1670 | yyval.a_module = yyvsp[-1].a_module; |
| 1671 | TQ_ADD(&(yyval.a_module->imports), yyvsp[0].a_xports, xp_next); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1672 | ; |
| 1673 | break;} |
| 1674 | case 39: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1675 | #line 620 "asn1p_y.y" |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 1676 | { memset(&yyval.a_aid, 0, sizeof(yyval.a_aid)); ; |
| 1677 | break;} |
| 1678 | case 40: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1679 | #line 621 "asn1p_y.y" |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 1680 | { yyval.a_aid.oid = yyvsp[0].a_oid; ; |
| 1681 | break;} |
| 1682 | case 41: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1683 | #line 625 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1684 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1685 | yyval.a_xports = yyvsp[-3].a_xports; |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 1686 | yyval.a_xports->fromModuleName = yyvsp[-1].tv_str; |
| 1687 | yyval.a_xports->identifier = yyvsp[0].a_aid; |
| 1688 | /* This stupid thing is used for look-back hack. */ |
| 1689 | saved_aid = yyval.a_xports->identifier.oid ? 0 : &(yyval.a_xports->identifier); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1690 | checkmem(yyval.a_xports); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1691 | ; |
| 1692 | break;} |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 1693 | case 42: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1694 | #line 636 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1695 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1696 | yyval.a_xports = asn1p_xports_new(); |
| 1697 | checkmem(yyval.a_xports); |
| 1698 | TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1699 | ; |
| 1700 | break;} |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 1701 | case 43: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1702 | #line 641 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1703 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1704 | yyval.a_xports = yyvsp[-2].a_xports; |
| 1705 | TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1706 | ; |
| 1707 | break;} |
Lev Walkin | 144db9b | 2004-10-12 23:26:53 +0000 | [diff] [blame] | 1708 | case 44: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1709 | #line 648 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1710 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1711 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 1712 | checkmem(yyval.a_expr); |
| 1713 | yyval.a_expr->Identifier = yyvsp[0].tv_str; |
| 1714 | yyval.a_expr->expr_type = A1TC_REFERENCE; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1715 | ; |
| 1716 | break;} |
Lev Walkin | 144db9b | 2004-10-12 23:26:53 +0000 | [diff] [blame] | 1717 | case 45: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1718 | #line 654 "asn1p_y.y" |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 1719 | { /* Completely equivalent to above */ |
| 1720 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 1721 | checkmem(yyval.a_expr); |
| 1722 | yyval.a_expr->Identifier = yyvsp[-2].tv_str; |
| 1723 | yyval.a_expr->expr_type = A1TC_REFERENCE; |
| 1724 | ; |
| 1725 | break;} |
| 1726 | case 46: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1727 | #line 660 "asn1p_y.y" |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 1728 | { |
| 1729 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 1730 | checkmem(yyval.a_expr); |
| 1731 | yyval.a_expr->Identifier = yyvsp[0].tv_str; |
| 1732 | yyval.a_expr->expr_type = A1TC_REFERENCE; |
| 1733 | ; |
| 1734 | break;} |
| 1735 | case 47: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1736 | #line 669 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1737 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1738 | yyval.a_xports = yyvsp[-1].a_xports; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1739 | ; |
| 1740 | break;} |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 1741 | case 48: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1742 | #line 672 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1743 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1744 | yyval.a_xports = 0; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1745 | ; |
| 1746 | break;} |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 1747 | case 49: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1748 | #line 675 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1749 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1750 | /* Empty EXPORTS clause effectively prohibits export. */ |
| 1751 | yyval.a_xports = asn1p_xports_new(); |
| 1752 | checkmem(yyval.a_xports); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1753 | ; |
| 1754 | break;} |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 1755 | case 50: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1756 | #line 683 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1757 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1758 | yyval.a_xports = asn1p_xports_new(); |
| 1759 | assert(yyval.a_xports); |
| 1760 | TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1761 | ; |
| 1762 | break;} |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 1763 | case 51: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1764 | #line 688 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1765 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1766 | yyval.a_xports = yyvsp[-2].a_xports; |
| 1767 | TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1768 | ; |
| 1769 | break;} |
Lev Walkin | 144db9b | 2004-10-12 23:26:53 +0000 | [diff] [blame] | 1770 | case 52: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1771 | #line 695 "asn1p_y.y" |
Lev Walkin | 144db9b | 2004-10-12 23:26:53 +0000 | [diff] [blame] | 1772 | { |
| 1773 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 1774 | checkmem(yyval.a_expr); |
| 1775 | yyval.a_expr->Identifier = yyvsp[0].tv_str; |
| 1776 | yyval.a_expr->expr_type = A1TC_EXPORTVAR; |
| 1777 | ; |
| 1778 | break;} |
| 1779 | case 53: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1780 | #line 701 "asn1p_y.y" |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 1781 | { |
| 1782 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 1783 | checkmem(yyval.a_expr); |
| 1784 | yyval.a_expr->Identifier = yyvsp[-2].tv_str; |
| 1785 | yyval.a_expr->expr_type = A1TC_EXPORTVAR; |
| 1786 | ; |
Lev Walkin | 8ea9948 | 2005-03-31 21:48:13 +0000 | [diff] [blame] | 1787 | break;} |
| 1788 | case 54: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1789 | #line 707 "asn1p_y.y" |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 1790 | { |
| 1791 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 1792 | checkmem(yyval.a_expr); |
| 1793 | yyval.a_expr->Identifier = yyvsp[0].tv_str; |
| 1794 | yyval.a_expr->expr_type = A1TC_EXPORTVAR; |
| 1795 | ; |
| 1796 | break;} |
| 1797 | case 55: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1798 | #line 718 "asn1p_y.y" |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 1799 | { asn1p_lexer_hack_push_opaque_state(); ; |
| 1800 | break;} |
| 1801 | case 56: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1802 | #line 718 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1803 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1804 | yyval.a_expr = yyvsp[-4].a_expr; |
| 1805 | assert(yyval.a_expr->Identifier == 0); |
| 1806 | yyval.a_expr->Identifier = yyvsp[-5].tv_str; |
| 1807 | yyval.a_expr->meta_type = AMT_VALUESET; |
Lev Walkin | 8ea9948 | 2005-03-31 21:48:13 +0000 | [diff] [blame] | 1808 | // take care of ValueSet body |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1809 | ; |
| 1810 | break;} |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 1811 | case 57: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1812 | #line 728 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1813 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1814 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 1815 | checkmem(yyval.a_expr); |
| 1816 | yyval.a_expr->reference = yyvsp[0].a_ref; |
| 1817 | yyval.a_expr->expr_type = A1TC_REFERENCE; |
| 1818 | yyval.a_expr->meta_type = AMT_TYPEREF; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1819 | ; |
| 1820 | break;} |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 1821 | case 58: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1822 | #line 735 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1823 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1824 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 1825 | checkmem(yyval.a_expr); |
| 1826 | yyval.a_expr->expr_type = yyvsp[0].a_type; |
| 1827 | yyval.a_expr->meta_type = AMT_TYPE; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1828 | ; |
| 1829 | break;} |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 1830 | case 59: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1831 | #line 753 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1832 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1833 | yyval.a_expr = yyvsp[0].a_expr; |
Lev Walkin | af120f7 | 2004-09-14 02:36:39 +0000 | [diff] [blame] | 1834 | yyval.a_expr->Identifier = yyvsp[-2].tv_str; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1835 | assert(yyval.a_expr->expr_type); |
| 1836 | assert(yyval.a_expr->meta_type); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1837 | ; |
| 1838 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 1839 | case 60: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1840 | #line 759 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1841 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1842 | yyval.a_expr = yyvsp[0].a_expr; |
| 1843 | yyval.a_expr->Identifier = yyvsp[-2].tv_str; |
| 1844 | assert(yyval.a_expr->expr_type == A1TC_CLASSDEF); |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 1845 | assert(yyval.a_expr->meta_type == AMT_OBJECTCLASS); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1846 | ; |
| 1847 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 1848 | case 61: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1849 | #line 775 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1850 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1851 | yyval.a_expr = yyvsp[0].a_expr; |
| 1852 | assert(yyval.a_expr->Identifier == 0); |
| 1853 | yyval.a_expr->Identifier = yyvsp[-5].tv_str; |
| 1854 | yyval.a_expr->params = yyvsp[-3].a_plist; |
| 1855 | yyval.a_expr->meta_type = AMT_PARAMTYPE; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1856 | ; |
| 1857 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 1858 | case 62: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1859 | #line 785 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1860 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1861 | int ret; |
| 1862 | yyval.a_plist = asn1p_paramlist_new(yylineno); |
| 1863 | checkmem(yyval.a_plist); |
| 1864 | ret = asn1p_paramlist_add_param(yyval.a_plist, yyvsp[0].a_parg.governor, yyvsp[0].a_parg.argument); |
| 1865 | checkmem(ret == 0); |
| 1866 | if(yyvsp[0].a_parg.governor) asn1p_ref_free(yyvsp[0].a_parg.governor); |
| 1867 | if(yyvsp[0].a_parg.argument) free(yyvsp[0].a_parg.argument); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1868 | ; |
| 1869 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 1870 | case 63: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1871 | #line 794 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1872 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1873 | int ret; |
| 1874 | yyval.a_plist = yyvsp[-2].a_plist; |
| 1875 | ret = asn1p_paramlist_add_param(yyval.a_plist, yyvsp[0].a_parg.governor, yyvsp[0].a_parg.argument); |
| 1876 | checkmem(ret == 0); |
| 1877 | if(yyvsp[0].a_parg.governor) asn1p_ref_free(yyvsp[0].a_parg.governor); |
| 1878 | if(yyvsp[0].a_parg.argument) free(yyvsp[0].a_parg.argument); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1879 | ; |
| 1880 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 1881 | case 64: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1882 | #line 805 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1883 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1884 | yyval.a_parg.governor = NULL; |
| 1885 | yyval.a_parg.argument = yyvsp[0].tv_str; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1886 | ; |
| 1887 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 1888 | case 65: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1889 | #line 809 "asn1p_y.y" |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 1890 | { |
| 1891 | int ret; |
| 1892 | yyval.a_parg.governor = asn1p_ref_new(yylineno); |
| 1893 | ret = asn1p_ref_add_component(yyval.a_parg.governor, yyvsp[-2].tv_str, 0); |
| 1894 | checkmem(ret == 0); |
| 1895 | yyval.a_parg.argument = yyvsp[0].tv_str; |
| 1896 | ; |
| 1897 | break;} |
Lev Walkin | 8ea9948 | 2005-03-31 21:48:13 +0000 | [diff] [blame] | 1898 | case 66: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1899 | #line 816 "asn1p_y.y" |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 1900 | { |
| 1901 | int ret; |
| 1902 | yyval.a_parg.governor = asn1p_ref_new(yylineno); |
| 1903 | ret = asn1p_ref_add_component(yyval.a_parg.governor, yyvsp[-2].tv_str, 0); |
| 1904 | checkmem(ret == 0); |
| 1905 | yyval.a_parg.argument = yyvsp[0].tv_str; |
| 1906 | ; |
| 1907 | break;} |
| 1908 | case 67: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1909 | #line 823 "asn1p_y.y" |
Lev Walkin | c8092cb | 2005-02-18 16:34:21 +0000 | [diff] [blame] | 1910 | { |
| 1911 | int ret; |
| 1912 | yyval.a_parg.governor = asn1p_ref_new(yylineno); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1913 | ret = asn1p_ref_add_component(yyval.a_parg.governor, |
| 1914 | ASN_EXPR_TYPE2STR(yyvsp[-2].a_type), 1); |
| 1915 | checkmem(ret == 0); |
| 1916 | yyval.a_parg.argument = yyvsp[0].tv_str; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1917 | ; |
| 1918 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 1919 | case 68: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1920 | #line 834 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1921 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1922 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 1923 | checkmem(yyval.a_expr); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1924 | asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr); |
| 1925 | ; |
| 1926 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 1927 | case 69: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1928 | #line 839 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1929 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1930 | yyval.a_expr = yyvsp[-2].a_expr; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1931 | asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr); |
| 1932 | ; |
| 1933 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 1934 | case 70: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1935 | #line 846 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1936 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1937 | yyval.a_expr = yyvsp[0].a_expr; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1938 | ; |
| 1939 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 1940 | case 71: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1941 | #line 849 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1942 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1943 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 1944 | checkmem(yyval.a_expr); |
| 1945 | yyval.a_expr->Identifier = yyvsp[0].tv_str; |
| 1946 | yyval.a_expr->expr_type = A1TC_REFERENCE; |
| 1947 | yyval.a_expr->meta_type = AMT_VALUE; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1948 | ; |
| 1949 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 1950 | case 72: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1951 | #line 873 "asn1p_y.y" |
Lev Walkin | 144db9b | 2004-10-12 23:26:53 +0000 | [diff] [blame] | 1952 | { yyval.a_expr = asn1p_expr_new(yylineno); ; |
| 1953 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 1954 | case 73: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1955 | #line 874 "asn1p_y.y" |
Lev Walkin | 144db9b | 2004-10-12 23:26:53 +0000 | [diff] [blame] | 1956 | { yyval.a_expr = yyvsp[0].a_expr; ; |
| 1957 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 1958 | case 74: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1959 | #line 877 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1960 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1961 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 1962 | checkmem(yyval.a_expr); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1963 | asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr); |
| 1964 | ; |
| 1965 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 1966 | case 75: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1967 | #line 882 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1968 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1969 | yyval.a_expr = yyvsp[-2].a_expr; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1970 | asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr); |
| 1971 | ; |
| 1972 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 1973 | case 76: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1974 | #line 889 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1975 | { |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 1976 | yyval.a_expr = yyvsp[-1].a_expr; |
| 1977 | assert(yyval.a_expr->Identifier == 0); |
Lev Walkin | af120f7 | 2004-09-14 02:36:39 +0000 | [diff] [blame] | 1978 | yyval.a_expr->Identifier = yyvsp[-2].tv_str; |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 1979 | yyvsp[0].a_marker.flags |= yyval.a_expr->marker.flags; |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 1980 | yyval.a_expr->marker = yyvsp[0].a_marker; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1981 | ; |
| 1982 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 1983 | case 77: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1984 | #line 896 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1985 | { |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 1986 | yyval.a_expr = yyvsp[-1].a_expr; |
| 1987 | yyvsp[0].a_marker.flags |= yyval.a_expr->marker.flags; |
| 1988 | yyval.a_expr->marker = yyvsp[0].a_marker; |
| 1989 | _fixup_anonymous_identifier(yyval.a_expr); |
| 1990 | ; |
| 1991 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 1992 | case 78: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 1993 | #line 902 "asn1p_y.y" |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 1994 | { |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 1995 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 1996 | checkmem(yyval.a_expr); |
| 1997 | yyval.a_expr->meta_type = yyvsp[0].a_expr->meta_type; |
| 1998 | yyval.a_expr->expr_type = A1TC_COMPONENTS_OF; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 1999 | asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr); |
| 2000 | ; |
| 2001 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2002 | case 79: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2003 | #line 909 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2004 | { |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 2005 | yyval.a_expr = yyvsp[0].a_expr; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2006 | ; |
| 2007 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2008 | case 80: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2009 | #line 915 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2010 | { |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 2011 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 2012 | checkmem(yyval.a_expr); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2013 | asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr); |
| 2014 | ; |
| 2015 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2016 | case 81: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2017 | #line 920 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2018 | { |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 2019 | yyval.a_expr = yyvsp[-2].a_expr; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2020 | asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr); |
| 2021 | ; |
| 2022 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2023 | case 82: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2024 | #line 927 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2025 | { |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 2026 | yyval.a_expr = yyvsp[0].a_expr; |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 2027 | assert(yyval.a_expr->Identifier == 0); |
| 2028 | yyval.a_expr->Identifier = yyvsp[-1].tv_str; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2029 | ; |
| 2030 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2031 | case 83: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2032 | #line 932 "asn1p_y.y" |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 2033 | { |
| 2034 | yyval.a_expr = yyvsp[0].a_expr; |
| 2035 | ; |
| 2036 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2037 | case 84: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2038 | #line 935 "asn1p_y.y" |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 2039 | { |
| 2040 | yyval.a_expr = yyvsp[0].a_expr; |
| 2041 | _fixup_anonymous_identifier(yyval.a_expr); |
| 2042 | ; |
| 2043 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2044 | case 85: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2045 | #line 942 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2046 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2047 | yyval.a_expr = yyvsp[-2].a_expr; |
| 2048 | checkmem(yyval.a_expr); |
| 2049 | yyval.a_expr->with_syntax = yyvsp[0].a_wsynt; |
| 2050 | assert(yyval.a_expr->expr_type == A1TC_CLASSDEF); |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2051 | assert(yyval.a_expr->meta_type == AMT_OBJECTCLASS); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2052 | ; |
| 2053 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2054 | case 86: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2055 | #line 952 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2056 | { yyval.a_int = 0; ; |
| 2057 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2058 | case 87: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2059 | #line 953 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2060 | { yyval.a_int = 1; ; |
| 2061 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2062 | case 88: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2063 | #line 957 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2064 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2065 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 2066 | checkmem(yyval.a_expr); |
| 2067 | yyval.a_expr->expr_type = A1TC_CLASSDEF; |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2068 | yyval.a_expr->meta_type = AMT_OBJECTCLASS; |
| 2069 | asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr); |
| 2070 | ; |
| 2071 | break;} |
| 2072 | case 89: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2073 | #line 964 "asn1p_y.y" |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2074 | { |
| 2075 | yyval.a_expr = yyvsp[-2].a_expr; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2076 | asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr); |
| 2077 | ; |
| 2078 | break;} |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 2079 | case 90: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2080 | #line 974 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2081 | { |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2082 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 2083 | checkmem(yyval.a_expr); |
| 2084 | yyval.a_expr->Identifier = yyvsp[-1].tv_str; |
| 2085 | yyval.a_expr->meta_type = AMT_OBJECTFIELD; |
| 2086 | yyval.a_expr->expr_type = A1TC_CLASSFIELD_TFS; /* TypeFieldSpec */ |
| 2087 | yyval.a_expr->marker = yyvsp[0].a_marker; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2088 | ; |
| 2089 | break;} |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 2090 | case 91: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2091 | #line 984 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2092 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2093 | yyval.a_expr = asn1p_expr_new(yylineno); |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2094 | yyval.a_expr->Identifier = yyvsp[-3].tv_str; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2095 | yyval.a_expr->meta_type = AMT_OBJECTFIELD; |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2096 | yyval.a_expr->expr_type = A1TC_CLASSFIELD_FTVFS; /* FixedTypeValueFieldSpec */ |
| 2097 | yyval.a_expr->unique = yyvsp[-1].a_int; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2098 | yyval.a_expr->marker = yyvsp[0].a_marker; |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2099 | asn1p_expr_add(yyval.a_expr, yyvsp[-2].a_expr); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2100 | ; |
| 2101 | break;} |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 2102 | case 92: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2103 | #line 995 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2104 | { |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2105 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 2106 | yyval.a_expr->Identifier = yyvsp[-2].tv_str; |
| 2107 | yyval.a_expr->meta_type = AMT_OBJECTFIELD; |
| 2108 | yyval.a_expr->expr_type = A1TC_CLASSFIELD_VTVFS; |
| 2109 | yyval.a_expr->reference = yyvsp[-1].a_ref; |
Lev Walkin | b7c45ca | 2004-11-24 17:43:29 +0000 | [diff] [blame] | 2110 | yyval.a_expr->marker = yyvsp[0].a_marker; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2111 | ; |
| 2112 | break;} |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 2113 | case 93: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2114 | #line 1005 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2115 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2116 | yyval.a_expr = asn1p_expr_new(yylineno); |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2117 | checkmem(yyval.a_expr); |
| 2118 | yyval.a_expr->Identifier = yyvsp[-2].tv_str; |
| 2119 | yyval.a_expr->reference = yyvsp[-1].a_ref; |
| 2120 | yyval.a_expr->meta_type = AMT_OBJECTFIELD; |
| 2121 | yyval.a_expr->expr_type = A1TC_CLASSFIELD_OFS; |
| 2122 | yyval.a_expr->marker = yyvsp[0].a_marker; |
| 2123 | ; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2124 | break;} |
Lev Walkin | 1db9113 | 2006-03-09 09:11:53 +0000 | [diff] [blame] | 2125 | case 94: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2126 | #line 1016 "asn1p_y.y" |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2127 | { |
| 2128 | yyval.a_expr = asn1p_expr_new(yylineno); |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2129 | yyval.a_expr->Identifier = yyvsp[-2].tv_str; |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2130 | yyval.a_expr->meta_type = AMT_OBJECTFIELD; |
Lev Walkin | 1db9113 | 2006-03-09 09:11:53 +0000 | [diff] [blame] | 2131 | yyval.a_expr->expr_type = A1TC_CLASSFIELD_VTVSFS; |
| 2132 | yyval.a_expr->reference = yyvsp[-1].a_ref; |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2133 | yyval.a_expr->marker = yyvsp[0].a_marker; |
| 2134 | ; |
| 2135 | break;} |
Lev Walkin | 1db9113 | 2006-03-09 09:11:53 +0000 | [diff] [blame] | 2136 | case 95: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2137 | #line 1026 "asn1p_y.y" |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2138 | { |
| 2139 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 2140 | checkmem(yyval.a_expr); |
| 2141 | yyval.a_expr->Identifier = yyvsp[-2].tv_str; |
| 2142 | yyval.a_expr->meta_type = AMT_OBJECTFIELD; |
| 2143 | yyval.a_expr->expr_type = A1TC_CLASSFIELD_FTVSFS; |
| 2144 | asn1p_expr_add(yyval.a_expr, yyvsp[-1].a_expr); |
| 2145 | yyval.a_expr->marker = yyvsp[0].a_marker; |
| 2146 | ; |
| 2147 | break;} |
Lev Walkin | 1db9113 | 2006-03-09 09:11:53 +0000 | [diff] [blame] | 2148 | case 96: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2149 | #line 1037 "asn1p_y.y" |
Lev Walkin | 1db9113 | 2006-03-09 09:11:53 +0000 | [diff] [blame] | 2150 | { |
| 2151 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 2152 | checkmem(yyval.a_expr); |
| 2153 | yyval.a_expr->Identifier = yyvsp[-2].tv_str; |
| 2154 | yyval.a_expr->reference = yyvsp[-1].a_ref; |
| 2155 | yyval.a_expr->meta_type = AMT_OBJECTFIELD; |
| 2156 | yyval.a_expr->expr_type = A1TC_CLASSFIELD_OSFS; |
| 2157 | yyval.a_expr->marker = yyvsp[0].a_marker; |
| 2158 | ; |
| 2159 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2160 | case 97: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2161 | #line 1049 "asn1p_y.y" |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2162 | { yyval.a_wsynt = 0; ; |
| 2163 | break;} |
| 2164 | case 98: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2165 | #line 1050 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2166 | { |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 2167 | yyval.a_wsynt = yyvsp[0].a_wsynt; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2168 | ; |
| 2169 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2170 | case 99: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2171 | #line 1057 "asn1p_y.y" |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 2172 | { asn1p_lexer_hack_enable_with_syntax(); ; |
| 2173 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2174 | case 100: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2175 | #line 1059 "asn1p_y.y" |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 2176 | { |
| 2177 | yyval.a_wsynt = yyvsp[-1].a_wsynt; |
| 2178 | ; |
| 2179 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2180 | case 101: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2181 | #line 1065 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2182 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2183 | yyval.a_wsynt = asn1p_wsyntx_new(); |
| 2184 | TQ_ADD(&(yyval.a_wsynt->chunks), yyvsp[0].a_wchunk, next); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2185 | ; |
| 2186 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2187 | case 102: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2188 | #line 1069 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2189 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2190 | yyval.a_wsynt = yyvsp[-1].a_wsynt; |
| 2191 | TQ_ADD(&(yyval.a_wsynt->chunks), yyvsp[0].a_wchunk, next); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2192 | ; |
| 2193 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2194 | case 103: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2195 | #line 1076 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2196 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2197 | yyval.a_wchunk = asn1p_wsyntx_chunk_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0); |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 2198 | yyval.a_wchunk->type = WC_WHITESPACE; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2199 | ; |
| 2200 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2201 | case 104: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2202 | #line 1080 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2203 | { |
| 2204 | yyval.a_wchunk = asn1p_wsyntx_chunk_frombuf(yyvsp[0].tv_str, strlen(yyvsp[0].tv_str), 0); |
| 2205 | ; |
| 2206 | break;} |
| 2207 | case 105: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2208 | #line 1083 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2209 | { |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2210 | yyval.a_wchunk = asn1p_wsyntx_chunk_frombuf(yyvsp[0].a_refcomp.name, strlen(yyvsp[0].a_refcomp.name), 0); |
| 2211 | yyval.a_wchunk->type = WC_FIELD; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2212 | ; |
| 2213 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2214 | case 106: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2215 | #line 1087 "asn1p_y.y" |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2216 | { |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2217 | yyval.a_wchunk = asn1p_wsyntx_chunk_fromsyntax(yyvsp[-1].a_wsynt); |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2218 | ; |
| 2219 | break;} |
| 2220 | case 107: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2221 | #line 1093 "asn1p_y.y" |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2222 | { |
| 2223 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 2224 | checkmem(yyval.a_expr); |
| 2225 | yyval.a_expr->Identifier = strdup("..."); |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2226 | checkmem(yyval.a_expr->Identifier); |
| 2227 | yyval.a_expr->expr_type = A1TC_EXTENSIBLE; |
| 2228 | yyval.a_expr->meta_type = AMT_TYPE; |
| 2229 | ; |
| 2230 | break;} |
| 2231 | case 108: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2232 | #line 1101 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2233 | { |
| 2234 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 2235 | checkmem(yyval.a_expr); |
| 2236 | yyval.a_expr->Identifier = strdup("..."); |
| 2237 | checkmem(yyval.a_expr->Identifier); |
| 2238 | yyval.a_expr->value = yyvsp[0].a_value; |
| 2239 | yyval.a_expr->expr_type = A1TC_EXTENSIBLE; |
| 2240 | yyval.a_expr->meta_type = AMT_TYPE; |
| 2241 | ; |
| 2242 | break;} |
| 2243 | case 109: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2244 | #line 1110 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2245 | { |
| 2246 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 2247 | checkmem(yyval.a_expr); |
| 2248 | yyval.a_expr->Identifier = strdup("..."); |
| 2249 | yyval.a_expr->value = yyvsp[0].a_value; |
| 2250 | checkmem(yyval.a_expr->Identifier); |
| 2251 | yyval.a_expr->expr_type = A1TC_EXTENSIBLE; |
| 2252 | yyval.a_expr->meta_type = AMT_TYPE; |
| 2253 | ; |
| 2254 | break;} |
| 2255 | case 110: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2256 | #line 1122 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2257 | { |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 2258 | yyval.a_expr = yyvsp[-1].a_expr; |
Lev Walkin | af120f7 | 2004-09-14 02:36:39 +0000 | [diff] [blame] | 2259 | yyval.a_expr->tag = yyvsp[-2].a_tag; |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 2260 | /* |
| 2261 | * Outer constraint for SEQUENCE OF and SET OF applies |
| 2262 | * to the inner type. |
| 2263 | */ |
| 2264 | if(yyval.a_expr->expr_type == ASN_CONSTR_SEQUENCE_OF |
| 2265 | || yyval.a_expr->expr_type == ASN_CONSTR_SET_OF) { |
| 2266 | assert(!TQ_FIRST(&(yyval.a_expr->members))->constraints); |
| 2267 | TQ_FIRST(&(yyval.a_expr->members))->constraints = yyvsp[0].a_constr; |
| 2268 | } else { |
| 2269 | if(yyval.a_expr->constraints) { |
Lev Walkin | af120f7 | 2004-09-14 02:36:39 +0000 | [diff] [blame] | 2270 | assert(!yyvsp[-1].a_expr); |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 2271 | } else { |
| 2272 | yyval.a_expr->constraints = yyvsp[0].a_constr; |
| 2273 | } |
| 2274 | } |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2275 | ; |
| 2276 | break;} |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2277 | case 111: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2278 | #line 1144 "asn1p_y.y" |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 2279 | { |
| 2280 | yyval.a_int = asn1p_as_pointer ? EM_INDIRECT : 0; |
| 2281 | asn1p_as_pointer = 0; |
| 2282 | ; |
Lev Walkin | 4696c74 | 2005-08-22 12:23:54 +0000 | [diff] [blame] | 2283 | break;} |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2284 | case 112: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2285 | #line 1151 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2286 | { |
Lev Walkin | d2ea1de | 2004-08-20 13:25:29 +0000 | [diff] [blame] | 2287 | yyval.a_expr = yyvsp[0].a_expr; |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 2288 | yyval.a_expr->marker.flags |= yyvsp[-1].a_int; |
| 2289 | |
| 2290 | if((yyval.a_expr->marker.flags & EM_INDIRECT) |
| 2291 | && (yyval.a_expr->marker.flags & EM_OPTIONAL) != EM_OPTIONAL) { |
| 2292 | fprintf(stderr, |
| 2293 | "INFO: Directive <ASN1C:RepresentAsPointer> " |
| 2294 | "applied to %s at line %d\n", |
| 2295 | ASN_EXPR_TYPE2STR(yyval.a_expr->expr_type) |
| 2296 | ? ASN_EXPR_TYPE2STR(yyval.a_expr->expr_type) |
| 2297 | : "member", |
| 2298 | yyval.a_expr->_lineno |
| 2299 | ); |
| 2300 | } |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2301 | ; |
| 2302 | break;} |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2303 | case 113: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2304 | #line 1170 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2305 | { |
Lev Walkin | 4696c74 | 2005-08-22 12:23:54 +0000 | [diff] [blame] | 2306 | yyval.a_expr = yyvsp[0].a_expr; |
| 2307 | ; |
| 2308 | break;} |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2309 | case 114: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2310 | #line 1173 "asn1p_y.y" |
Lev Walkin | 4696c74 | 2005-08-22 12:23:54 +0000 | [diff] [blame] | 2311 | { |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 2312 | yyval.a_expr = yyvsp[-1].a_expr; |
Lev Walkin | c7d939d | 2005-03-20 11:12:40 +0000 | [diff] [blame] | 2313 | assert(yyval.a_expr->expr_type == A1TC_INVALID); |
| 2314 | yyval.a_expr->expr_type = ASN_CONSTR_CHOICE; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2315 | yyval.a_expr->meta_type = AMT_TYPE; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2316 | ; |
| 2317 | break;} |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2318 | case 115: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2319 | #line 1179 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2320 | { |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 2321 | yyval.a_expr = yyvsp[-1].a_expr; |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 2322 | assert(yyval.a_expr->expr_type == A1TC_INVALID); |
Lev Walkin | c7d939d | 2005-03-20 11:12:40 +0000 | [diff] [blame] | 2323 | yyval.a_expr->expr_type = ASN_CONSTR_SEQUENCE; |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 2324 | yyval.a_expr->meta_type = AMT_TYPE; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2325 | ; |
| 2326 | break;} |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2327 | case 116: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2328 | #line 1185 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2329 | { |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 2330 | yyval.a_expr = yyvsp[-1].a_expr; |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 2331 | assert(yyval.a_expr->expr_type == A1TC_INVALID); |
Lev Walkin | c7d939d | 2005-03-20 11:12:40 +0000 | [diff] [blame] | 2332 | yyval.a_expr->expr_type = ASN_CONSTR_SET; |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 2333 | yyval.a_expr->meta_type = AMT_TYPE; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2334 | ; |
| 2335 | break;} |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2336 | case 117: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2337 | #line 1191 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2338 | { |
Lev Walkin | ceb20e7 | 2004-09-05 10:40:41 +0000 | [diff] [blame] | 2339 | yyval.a_expr = asn1p_expr_new(yylineno); |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 2340 | checkmem(yyval.a_expr); |
Lev Walkin | 83cac2f | 2004-09-22 16:03:36 +0000 | [diff] [blame] | 2341 | yyval.a_expr->constraints = yyvsp[-4].a_constr; |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 2342 | yyval.a_expr->expr_type = ASN_CONSTR_SEQUENCE_OF; |
| 2343 | yyval.a_expr->meta_type = AMT_TYPE; |
Lev Walkin | 83cac2f | 2004-09-22 16:03:36 +0000 | [diff] [blame] | 2344 | yyvsp[0].a_expr->Identifier = yyvsp[-2].tv_str; |
Lev Walkin | ec208e6 | 2004-09-14 02:44:07 +0000 | [diff] [blame] | 2345 | yyvsp[0].a_expr->tag = yyvsp[-1].a_tag; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2346 | asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr); |
| 2347 | ; |
| 2348 | break;} |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2349 | case 118: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2350 | #line 1201 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2351 | { |
Lev Walkin | ceb20e7 | 2004-09-05 10:40:41 +0000 | [diff] [blame] | 2352 | yyval.a_expr = asn1p_expr_new(yylineno); |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 2353 | checkmem(yyval.a_expr); |
Lev Walkin | 83cac2f | 2004-09-22 16:03:36 +0000 | [diff] [blame] | 2354 | yyval.a_expr->constraints = yyvsp[-4].a_constr; |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 2355 | yyval.a_expr->expr_type = ASN_CONSTR_SET_OF; |
| 2356 | yyval.a_expr->meta_type = AMT_TYPE; |
Lev Walkin | 83cac2f | 2004-09-22 16:03:36 +0000 | [diff] [blame] | 2357 | yyvsp[0].a_expr->Identifier = yyvsp[-2].tv_str; |
Lev Walkin | ec208e6 | 2004-09-14 02:44:07 +0000 | [diff] [blame] | 2358 | yyvsp[0].a_expr->tag = yyvsp[-1].a_tag; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2359 | asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr); |
| 2360 | ; |
| 2361 | break;} |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2362 | case 119: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2363 | #line 1211 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2364 | { |
Lev Walkin | ceb20e7 | 2004-09-05 10:40:41 +0000 | [diff] [blame] | 2365 | yyval.a_expr = asn1p_expr_new(yylineno); |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 2366 | checkmem(yyval.a_expr); |
Lev Walkin | 609ccbb | 2004-09-04 04:49:21 +0000 | [diff] [blame] | 2367 | yyval.a_expr->expr_type = ASN_TYPE_ANY; |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 2368 | yyval.a_expr->meta_type = AMT_TYPE; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2369 | ; |
| 2370 | break;} |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2371 | case 120: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2372 | #line 1217 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2373 | { |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 2374 | int ret; |
Lev Walkin | ceb20e7 | 2004-09-05 10:40:41 +0000 | [diff] [blame] | 2375 | yyval.a_expr = asn1p_expr_new(yylineno); |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 2376 | checkmem(yyval.a_expr); |
| 2377 | yyval.a_expr->reference = asn1p_ref_new(yylineno); |
| 2378 | ret = asn1p_ref_add_component(yyval.a_expr->reference, |
| 2379 | yyvsp[0].tv_str, RLT_lowercase); |
| 2380 | checkmem(ret == 0); |
Lev Walkin | 609ccbb | 2004-09-04 04:49:21 +0000 | [diff] [blame] | 2381 | yyval.a_expr->expr_type = ASN_TYPE_ANY; |
Lev Walkin | 070a52d | 2004-08-22 03:19:54 +0000 | [diff] [blame] | 2382 | yyval.a_expr->meta_type = AMT_TYPE; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2383 | ; |
| 2384 | break;} |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2385 | case 121: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2386 | #line 1231 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2387 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2388 | int ret; |
| 2389 | yyval.a_expr = yyvsp[-1].a_expr; |
| 2390 | assert(yyval.a_expr->expr_type == 0); |
| 2391 | assert(yyval.a_expr->meta_type == 0); |
| 2392 | assert(yyval.a_expr->reference == 0); |
| 2393 | yyval.a_expr->reference = asn1p_ref_new(yylineno); |
| 2394 | checkmem(yyval.a_expr->reference); |
| 2395 | ret = asn1p_ref_add_component(yyval.a_expr->reference, yyvsp[-3].tv_str, RLT_UNKNOWN); |
| 2396 | checkmem(ret == 0); |
| 2397 | free(yyvsp[-3].tv_str); |
| 2398 | yyval.a_expr->expr_type = A1TC_PARAMETRIZED; |
| 2399 | yyval.a_expr->meta_type = AMT_TYPE; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2400 | ; |
| 2401 | break;} |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2402 | case 122: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2403 | #line 1255 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2404 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2405 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 2406 | checkmem(yyval.a_expr); |
| 2407 | yyval.a_expr->reference = yyvsp[0].a_ref; |
| 2408 | yyval.a_expr->expr_type = A1TC_REFERENCE; |
| 2409 | yyval.a_expr->meta_type = AMT_TYPEREF; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2410 | ; |
| 2411 | break;} |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2412 | case 123: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2413 | #line 1262 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2414 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2415 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 2416 | checkmem(yyval.a_expr); |
| 2417 | yyval.a_expr->reference = yyvsp[0].a_ref; |
| 2418 | yyval.a_expr->expr_type = A1TC_INSTANCE; |
| 2419 | yyval.a_expr->meta_type = AMT_TYPE; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2420 | ; |
| 2421 | break;} |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2422 | case 124: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2423 | #line 1277 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2424 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2425 | int ret; |
| 2426 | yyval.a_ref = asn1p_ref_new(yylineno); |
| 2427 | checkmem(yyval.a_ref); |
| 2428 | ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN); |
| 2429 | checkmem(ret == 0); |
| 2430 | free(yyvsp[0].tv_str); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2431 | ; |
| 2432 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2433 | case 125: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2434 | #line 1285 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2435 | { |
| 2436 | int ret; |
| 2437 | yyval.a_ref = asn1p_ref_new(yylineno); |
| 2438 | checkmem(yyval.a_ref); |
| 2439 | ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN); |
| 2440 | checkmem(ret == 0); |
| 2441 | ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN); |
| 2442 | checkmem(ret == 0); |
| 2443 | free(yyvsp[-2].tv_str); |
| 2444 | ; |
| 2445 | break;} |
| 2446 | case 126: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2447 | #line 1295 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2448 | { |
| 2449 | int ret; |
| 2450 | yyval.a_ref = asn1p_ref_new(yylineno); |
| 2451 | checkmem(yyval.a_ref); |
| 2452 | ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN); |
| 2453 | checkmem(ret == 0); |
| 2454 | ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN); |
| 2455 | checkmem(ret == 0); |
| 2456 | free(yyvsp[-2].tv_str); |
| 2457 | ; |
| 2458 | break;} |
| 2459 | case 127: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2460 | #line 1305 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2461 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2462 | int ret; |
| 2463 | yyval.a_ref = asn1p_ref_new(yylineno); |
| 2464 | checkmem(yyval.a_ref); |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 2465 | ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN); |
| 2466 | checkmem(ret == 0); |
| 2467 | ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_lowercase); |
| 2468 | checkmem(ret == 0); |
| 2469 | free(yyvsp[-2].tv_str); |
| 2470 | ; |
| 2471 | break;} |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2472 | case 128: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2473 | #line 1315 "asn1p_y.y" |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 2474 | { |
| 2475 | int ret; |
| 2476 | yyval.a_ref = asn1p_ref_new(yylineno); |
| 2477 | checkmem(yyval.a_ref); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2478 | ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_CAPITALS); |
| 2479 | free(yyvsp[0].tv_str); |
| 2480 | checkmem(ret == 0); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2481 | ; |
| 2482 | break;} |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2483 | case 129: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2484 | #line 1323 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2485 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2486 | int ret; |
| 2487 | yyval.a_ref = yyvsp[0].a_ref; |
| 2488 | ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_CAPITALS); |
| 2489 | free(yyvsp[-2].tv_str); |
| 2490 | checkmem(ret == 0); |
| 2491 | /* |
| 2492 | * Move the last element infront. |
| 2493 | */ |
| 2494 | { |
| 2495 | struct asn1p_ref_component_s tmp_comp; |
| 2496 | tmp_comp = yyval.a_ref->components[yyval.a_ref->comp_count-1]; |
| 2497 | memmove(&yyval.a_ref->components[1], |
| 2498 | &yyval.a_ref->components[0], |
| 2499 | sizeof(yyval.a_ref->components[0]) |
| 2500 | * (yyval.a_ref->comp_count - 1)); |
| 2501 | yyval.a_ref->components[0] = tmp_comp; |
| 2502 | } |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2503 | ; |
| 2504 | break;} |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2505 | case 130: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2506 | #line 1345 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2507 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2508 | int ret; |
| 2509 | yyval.a_ref = asn1p_ref_new(yylineno); |
| 2510 | checkmem(yyval.a_ref); |
| 2511 | ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type); |
| 2512 | free(yyvsp[0].a_refcomp.name); |
| 2513 | checkmem(ret == 0); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2514 | ; |
| 2515 | break;} |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2516 | case 131: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2517 | #line 1353 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2518 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2519 | int ret; |
| 2520 | yyval.a_ref = yyvsp[-2].a_ref; |
| 2521 | ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type); |
| 2522 | free(yyvsp[0].a_refcomp.name); |
| 2523 | checkmem(ret == 0); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2524 | ; |
| 2525 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2526 | case 133: |
| 2527 | #line 1366 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2528 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2529 | yyval.a_refcomp.lex_type = RLT_AmpUppercase; |
| 2530 | yyval.a_refcomp.name = yyvsp[0].tv_str; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2531 | ; |
| 2532 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2533 | case 134: |
| 2534 | #line 1371 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2535 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2536 | yyval.a_refcomp.lex_type = RLT_Amplowercase; |
| 2537 | yyval.a_refcomp.name = yyvsp[0].tv_str; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2538 | ; |
| 2539 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2540 | case 135: |
| 2541 | #line 1380 "asn1p_y.y" |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2542 | { |
| 2543 | yyval.a_ref = asn1p_ref_new(yylineno); |
| 2544 | asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_AmpUppercase); |
| 2545 | ; |
| 2546 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2547 | case 136: |
| 2548 | #line 1384 "asn1p_y.y" |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2549 | { |
| 2550 | yyval.a_ref = yyval.a_ref; |
| 2551 | asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_AmpUppercase); |
| 2552 | ; |
| 2553 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2554 | case 137: |
| 2555 | #line 1388 "asn1p_y.y" |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2556 | { |
| 2557 | yyval.a_ref = yyval.a_ref; |
| 2558 | asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_Amplowercase); |
| 2559 | ; |
| 2560 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2561 | case 138: |
| 2562 | #line 1395 "asn1p_y.y" |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2563 | { |
| 2564 | yyval.a_ref = asn1p_ref_new(yylineno); |
| 2565 | asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_CAPITALS); |
| 2566 | ; |
| 2567 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2568 | case 139: |
| 2569 | #line 1415 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2570 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2571 | yyval.a_expr = yyvsp[-2].a_expr; |
| 2572 | assert(yyval.a_expr->Identifier == NULL); |
| 2573 | yyval.a_expr->Identifier = yyvsp[-3].tv_str; |
| 2574 | yyval.a_expr->meta_type = AMT_VALUE; |
| 2575 | yyval.a_expr->value = yyvsp[0].a_value; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2576 | ; |
| 2577 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2578 | case 140: |
| 2579 | #line 1425 "asn1p_y.y" |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 2580 | { |
| 2581 | yyval.a_value = asn1p_value_fromint(0); |
| 2582 | checkmem(yyval.a_value); |
| 2583 | yyval.a_value->type = ATV_CHOICE_IDENTIFIER; |
| 2584 | yyval.a_value->value.choice_identifier.identifier = yyvsp[-2].tv_str; |
| 2585 | yyval.a_value->value.choice_identifier.value = yyvsp[0].a_value; |
| 2586 | ; |
| 2587 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2588 | case 141: |
| 2589 | #line 1432 "asn1p_y.y" |
Lev Walkin | cbad251 | 2005-03-24 16:27:02 +0000 | [diff] [blame] | 2590 | { asn1p_lexer_hack_push_opaque_state(); ; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2591 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2592 | case 142: |
| 2593 | #line 1432 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2594 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2595 | yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0); |
| 2596 | checkmem(yyval.a_value); |
| 2597 | yyval.a_value->type = ATV_UNPARSED; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2598 | ; |
| 2599 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2600 | case 143: |
| 2601 | #line 1437 "asn1p_y.y" |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 2602 | { |
| 2603 | yyval.a_value = asn1p_value_fromint(0); |
| 2604 | checkmem(yyval.a_value); |
| 2605 | yyval.a_value->type = ATV_NULL; |
| 2606 | ; |
| 2607 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2608 | case 144: |
| 2609 | #line 1442 "asn1p_y.y" |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 2610 | { |
| 2611 | yyval.a_value = asn1p_value_fromint(0); |
| 2612 | checkmem(yyval.a_value); |
| 2613 | yyval.a_value->type = ATV_FALSE; |
| 2614 | ; |
| 2615 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2616 | case 145: |
| 2617 | #line 1447 "asn1p_y.y" |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 2618 | { |
| 2619 | yyval.a_value = asn1p_value_fromint(0); |
| 2620 | checkmem(yyval.a_value); |
| 2621 | yyval.a_value->type = ATV_TRUE; |
| 2622 | ; |
| 2623 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2624 | case 146: |
| 2625 | #line 1452 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2626 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2627 | yyval.a_value = _convert_bitstring2binary(yyvsp[0].tv_str, 'B'); |
| 2628 | checkmem(yyval.a_value); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2629 | ; |
| 2630 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2631 | case 147: |
| 2632 | #line 1456 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2633 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2634 | yyval.a_value = _convert_bitstring2binary(yyvsp[0].tv_str, 'H'); |
| 2635 | checkmem(yyval.a_value); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2636 | ; |
| 2637 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2638 | case 148: |
| 2639 | #line 1460 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2640 | { |
Lev Walkin | 1e448d3 | 2005-03-24 14:26:38 +0000 | [diff] [blame] | 2641 | yyval.a_value = yyval.a_value; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2642 | ; |
| 2643 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2644 | case 149: |
| 2645 | #line 1463 "asn1p_y.y" |
| 2646 | { |
| 2647 | yyval.a_value = yyvsp[0].a_value; |
| 2648 | ; |
| 2649 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2650 | case 150: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2651 | #line 1466 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2652 | { |
| 2653 | yyval.a_value = yyvsp[0].a_value; |
| 2654 | ; |
| 2655 | break;} |
| 2656 | case 151: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2657 | #line 1472 "asn1p_y.y" |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 2658 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2659 | asn1p_ref_t *ref; |
| 2660 | int ret; |
| 2661 | ref = asn1p_ref_new(yylineno); |
| 2662 | checkmem(ref); |
| 2663 | ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase); |
| 2664 | checkmem(ret == 0); |
| 2665 | yyval.a_value = asn1p_value_fromref(ref, 0); |
| 2666 | checkmem(yyval.a_value); |
| 2667 | free(yyvsp[0].tv_str); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2668 | ; |
| 2669 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2670 | case 152: |
| 2671 | #line 1483 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2672 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2673 | asn1p_ref_t *ref; |
| 2674 | int ret; |
| 2675 | ref = asn1p_ref_new(yylineno); |
| 2676 | checkmem(ref); |
| 2677 | ret = asn1p_ref_add_component(ref, yyvsp[-2].tv_str, RLT_UNKNOWN); |
| 2678 | checkmem(ret == 0); |
| 2679 | ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase); |
| 2680 | checkmem(ret == 0); |
| 2681 | yyval.a_value = asn1p_value_fromref(ref, 0); |
| 2682 | checkmem(yyval.a_value); |
| 2683 | free(yyvsp[-2].tv_str); |
| 2684 | free(yyvsp[0].tv_str); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2685 | ; |
| 2686 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2687 | case 153: |
| 2688 | #line 1501 "asn1p_y.y" |
Lev Walkin | 1e448d3 | 2005-03-24 14:26:38 +0000 | [diff] [blame] | 2689 | { |
| 2690 | yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0); |
| 2691 | checkmem(yyval.a_value); |
| 2692 | ; |
| 2693 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2694 | case 154: |
| 2695 | #line 1505 "asn1p_y.y" |
Lev Walkin | 1e448d3 | 2005-03-24 14:26:38 +0000 | [diff] [blame] | 2696 | { |
Lev Walkin | d9574ae | 2005-03-24 16:22:35 +0000 | [diff] [blame] | 2697 | yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int); |
Lev Walkin | 1e448d3 | 2005-03-24 14:26:38 +0000 | [diff] [blame] | 2698 | checkmem(yyval.a_value); |
| 2699 | yyval.a_value->type = ATV_TUPLE; |
| 2700 | ; |
| 2701 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2702 | case 155: |
| 2703 | #line 1510 "asn1p_y.y" |
Lev Walkin | 1e448d3 | 2005-03-24 14:26:38 +0000 | [diff] [blame] | 2704 | { |
Lev Walkin | d9574ae | 2005-03-24 16:22:35 +0000 | [diff] [blame] | 2705 | yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int); |
Lev Walkin | 1e448d3 | 2005-03-24 14:26:38 +0000 | [diff] [blame] | 2706 | checkmem(yyval.a_value); |
| 2707 | yyval.a_value->type = ATV_QUADRUPLE; |
| 2708 | ; |
| 2709 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2710 | case 156: |
| 2711 | #line 1544 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2712 | { |
Lev Walkin | 1893ddf | 2005-03-20 14:28:32 +0000 | [diff] [blame] | 2713 | yyval.tv_opaque.len = yyvsp[0].tv_opaque.len + 1; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2714 | yyval.tv_opaque.buf = malloc(yyval.tv_opaque.len + 1); |
| 2715 | checkmem(yyval.tv_opaque.buf); |
| 2716 | yyval.tv_opaque.buf[0] = '{'; |
Lev Walkin | 1893ddf | 2005-03-20 14:28:32 +0000 | [diff] [blame] | 2717 | memcpy(yyval.tv_opaque.buf + 1, yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2718 | yyval.tv_opaque.buf[yyval.tv_opaque.len] = '\0'; |
| 2719 | free(yyvsp[0].tv_opaque.buf); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2720 | ; |
| 2721 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2722 | case 157: |
| 2723 | #line 1553 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2724 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2725 | int newsize = yyvsp[-1].tv_opaque.len + yyvsp[0].tv_opaque.len; |
| 2726 | char *p = malloc(newsize + 1); |
| 2727 | checkmem(p); |
| 2728 | memcpy(p , yyvsp[-1].tv_opaque.buf, yyvsp[-1].tv_opaque.len); |
| 2729 | memcpy(p + yyvsp[-1].tv_opaque.len, yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len); |
| 2730 | p[newsize] = '\0'; |
| 2731 | free(yyvsp[-1].tv_opaque.buf); |
| 2732 | free(yyvsp[0].tv_opaque.buf); |
| 2733 | yyval.tv_opaque.buf = p; |
| 2734 | yyval.tv_opaque.len = newsize; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2735 | ; |
| 2736 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2737 | case 158: |
| 2738 | #line 1568 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2739 | { yyval.a_type = ASN_BASIC_BOOLEAN; ; |
| 2740 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2741 | case 159: |
| 2742 | #line 1569 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2743 | { yyval.a_type = ASN_BASIC_NULL; ; |
| 2744 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2745 | case 160: |
| 2746 | #line 1570 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2747 | { yyval.a_type = ASN_BASIC_REAL; ; |
| 2748 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2749 | case 161: |
| 2750 | #line 1571 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2751 | { yyval.a_type = yyvsp[0].a_type; ; |
Lev Walkin | 4696c74 | 2005-08-22 12:23:54 +0000 | [diff] [blame] | 2752 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2753 | case 162: |
| 2754 | #line 1572 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2755 | { yyval.a_type = ASN_BASIC_OCTET_STRING; ; |
Lev Walkin | 4696c74 | 2005-08-22 12:23:54 +0000 | [diff] [blame] | 2756 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2757 | case 163: |
| 2758 | #line 1573 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2759 | { yyval.a_type = ASN_BASIC_OBJECT_IDENTIFIER; ; |
Lev Walkin | 4696c74 | 2005-08-22 12:23:54 +0000 | [diff] [blame] | 2760 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2761 | case 164: |
| 2762 | #line 1574 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2763 | { yyval.a_type = ASN_BASIC_RELATIVE_OID; ; |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2764 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2765 | case 165: |
| 2766 | #line 1575 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2767 | { yyval.a_type = ASN_BASIC_EXTERNAL; ; |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2768 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2769 | case 166: |
| 2770 | #line 1576 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2771 | { yyval.a_type = ASN_BASIC_EMBEDDED_PDV; ; |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2772 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2773 | case 167: |
| 2774 | #line 1577 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2775 | { yyval.a_type = ASN_BASIC_CHARACTER_STRING; ; |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2776 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2777 | case 168: |
| 2778 | #line 1578 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2779 | { yyval.a_type = ASN_BASIC_UTCTime; ; |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2780 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2781 | case 169: |
| 2782 | #line 1579 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2783 | { yyval.a_type = ASN_BASIC_GeneralizedTime; ; |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2784 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2785 | case 170: |
| 2786 | #line 1580 "asn1p_y.y" |
| 2787 | { yyval.a_type = yyvsp[0].a_type; ; |
| 2788 | break;} |
Lev Walkin | 1db9113 | 2006-03-09 09:11:53 +0000 | [diff] [blame] | 2789 | case 171: |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 2790 | #line 1587 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2791 | { yyval.a_type = ASN_BASIC_INTEGER; ; |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 2792 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2793 | case 172: |
| 2794 | #line 1588 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2795 | { yyval.a_type = ASN_BASIC_ENUMERATED; ; |
| 2796 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2797 | case 173: |
| 2798 | #line 1589 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 2799 | { yyval.a_type = ASN_BASIC_BIT_STRING; ; |
| 2800 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2801 | case 174: |
| 2802 | #line 1593 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2803 | { |
Lev Walkin | ceb20e7 | 2004-09-05 10:40:41 +0000 | [diff] [blame] | 2804 | yyval.a_expr = asn1p_expr_new(yylineno); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2805 | checkmem(yyval.a_expr); |
| 2806 | yyval.a_expr->expr_type = yyvsp[0].a_type; |
| 2807 | yyval.a_expr->meta_type = AMT_TYPE; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2808 | ; |
| 2809 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2810 | case 175: |
| 2811 | #line 1599 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2812 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2813 | if(yyvsp[0].a_expr) { |
| 2814 | yyval.a_expr = yyvsp[0].a_expr; |
| 2815 | } else { |
Lev Walkin | ceb20e7 | 2004-09-05 10:40:41 +0000 | [diff] [blame] | 2816 | yyval.a_expr = asn1p_expr_new(yylineno); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2817 | checkmem(yyval.a_expr); |
| 2818 | } |
| 2819 | yyval.a_expr->expr_type = yyvsp[-1].a_type; |
| 2820 | yyval.a_expr->meta_type = AMT_TYPE; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2821 | ; |
| 2822 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2823 | case 176: |
| 2824 | #line 1612 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2825 | { yyval.a_type = ASN_STRING_BMPString; ; |
| 2826 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2827 | case 177: |
| 2828 | #line 1613 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2829 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2830 | yyval.a_type = ASN_STRING_GeneralString; |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 2831 | fprintf(stderr, "WARNING: GeneralString is not fully supported\n"); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2832 | ; |
| 2833 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2834 | case 178: |
| 2835 | #line 1617 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2836 | { |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 2837 | yyval.a_type = ASN_STRING_GraphicString; |
| 2838 | fprintf(stderr, "WARNING: GraphicString is not fully supported\n"); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2839 | ; |
| 2840 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2841 | case 179: |
| 2842 | #line 1621 "asn1p_y.y" |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 2843 | { yyval.a_type = ASN_STRING_IA5String; ; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2844 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2845 | case 180: |
| 2846 | #line 1622 "asn1p_y.y" |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 2847 | { yyval.a_type = ASN_STRING_ISO646String; ; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2848 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2849 | case 181: |
| 2850 | #line 1623 "asn1p_y.y" |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 2851 | { yyval.a_type = ASN_STRING_NumericString; ; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2852 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2853 | case 182: |
| 2854 | #line 1624 "asn1p_y.y" |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 2855 | { yyval.a_type = ASN_STRING_PrintableString; ; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2856 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2857 | case 183: |
| 2858 | #line 1625 "asn1p_y.y" |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 2859 | { |
| 2860 | yyval.a_type = ASN_STRING_T61String; |
| 2861 | fprintf(stderr, "WARNING: T61String is not fully supported\n"); |
| 2862 | ; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2863 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2864 | case 184: |
| 2865 | #line 1629 "asn1p_y.y" |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 2866 | { yyval.a_type = ASN_STRING_TeletexString; ; |
| 2867 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2868 | case 185: |
| 2869 | #line 1630 "asn1p_y.y" |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 2870 | { yyval.a_type = ASN_STRING_UniversalString; ; |
| 2871 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2872 | case 186: |
| 2873 | #line 1631 "asn1p_y.y" |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 2874 | { yyval.a_type = ASN_STRING_UTF8String; ; |
| 2875 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2876 | case 187: |
| 2877 | #line 1632 "asn1p_y.y" |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 2878 | { |
| 2879 | yyval.a_type = ASN_STRING_VideotexString; |
| 2880 | fprintf(stderr, "WARNING: VideotexString is not fully supported\n"); |
| 2881 | ; |
| 2882 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2883 | case 188: |
| 2884 | #line 1636 "asn1p_y.y" |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 2885 | { yyval.a_type = ASN_STRING_VisibleString; ; |
| 2886 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2887 | case 189: |
| 2888 | #line 1637 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2889 | { yyval.a_type = ASN_STRING_ObjectDescriptor; ; |
| 2890 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2891 | case 195: |
| 2892 | #line 1649 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2893 | { yyval.a_constr = 0; ; |
| 2894 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2895 | case 196: |
| 2896 | #line 1650 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2897 | { |
Lev Walkin | ceb20e7 | 2004-09-05 10:40:41 +0000 | [diff] [blame] | 2898 | yyval.a_constr = yyvsp[0].a_constr; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2899 | ; |
| 2900 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2901 | case 197: |
| 2902 | #line 1656 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2903 | { |
Lev Walkin | ceb20e7 | 2004-09-05 10:40:41 +0000 | [diff] [blame] | 2904 | CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_SET, yyvsp[0].a_constr, 0); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2905 | ; |
| 2906 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2907 | case 198: |
| 2908 | #line 1659 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2909 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2910 | /* |
| 2911 | * This is a special case, for compatibility purposes. |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 2912 | * It goes without parentheses. |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2913 | */ |
Lev Walkin | d2ea1de | 2004-08-20 13:25:29 +0000 | [diff] [blame] | 2914 | CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_SIZE, yyvsp[-1].a_constr, 0); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2915 | ; |
| 2916 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2917 | case 199: |
| 2918 | #line 1669 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2919 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2920 | yyval.a_constr = yyvsp[-1].a_constr; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2921 | ; |
| 2922 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2923 | case 200: |
| 2924 | #line 1672 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2925 | { |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 2926 | CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_SET, yyvsp[-3].a_constr, yyvsp[-1].a_constr); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2927 | ; |
| 2928 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2929 | case 201: |
| 2930 | #line 1678 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2931 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2932 | yyval.a_constr = yyvsp[0].a_constr; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2933 | ; |
| 2934 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2935 | case 202: |
| 2936 | #line 1681 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2937 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2938 | asn1p_constraint_t *ct; |
| 2939 | ct = asn1p_constraint_new(yylineno); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2940 | ct->type = ACT_EL_EXT; |
| 2941 | CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-2].a_constr, ct); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2942 | ; |
| 2943 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2944 | case 203: |
| 2945 | #line 1687 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2946 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2947 | asn1p_constraint_t *ct; |
| 2948 | ct = asn1p_constraint_new(yylineno); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2949 | ct->type = ACT_EL_EXT; |
| 2950 | CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-4].a_constr, ct); |
Lev Walkin | b4fcdd2 | 2004-08-13 12:35:09 +0000 | [diff] [blame] | 2951 | ct = yyval.a_constr; |
| 2952 | CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, ct, yyvsp[0].a_constr); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2953 | ; |
| 2954 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2955 | case 204: |
| 2956 | #line 1698 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2957 | { |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 2958 | yyval.a_constr = yyvsp[0].a_constr; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2959 | ; |
| 2960 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2961 | case 205: |
| 2962 | #line 1701 "asn1p_y.y" |
Lev Walkin | 1e448d3 | 2005-03-24 14:26:38 +0000 | [diff] [blame] | 2963 | { |
| 2964 | CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_AEX, yyvsp[0].a_constr, 0); |
| 2965 | ; |
| 2966 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2967 | case 206: |
| 2968 | #line 1704 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2969 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2970 | CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_UNI, yyvsp[-2].a_constr, yyvsp[0].a_constr); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2971 | ; |
| 2972 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2973 | case 207: |
| 2974 | #line 1707 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2975 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2976 | CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_INT, yyvsp[-2].a_constr, yyvsp[0].a_constr); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2977 | ; |
| 2978 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2979 | case 208: |
| 2980 | #line 1710 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2981 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2982 | CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_EXC, yyvsp[-2].a_constr, yyvsp[0].a_constr); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2983 | ; |
| 2984 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2985 | case 209: |
| 2986 | #line 1716 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2987 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 2988 | int ret; |
| 2989 | yyval.a_constr = asn1p_constraint_new(yylineno); |
| 2990 | checkmem(yyval.a_constr); |
| 2991 | yyval.a_constr->type = yyvsp[-3].a_ctype; |
| 2992 | ret = asn1p_constraint_insert(yyval.a_constr, yyvsp[-1].a_constr); |
| 2993 | checkmem(ret == 0); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2994 | ; |
| 2995 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 2996 | case 210: |
| 2997 | #line 1724 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 2998 | { |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 2999 | int ret; |
| 3000 | yyval.a_constr = asn1p_constraint_new(yylineno); |
| 3001 | checkmem(yyval.a_constr); |
| 3002 | yyval.a_constr->type = ACT_CA_SET; |
| 3003 | ret = asn1p_constraint_insert(yyval.a_constr, yyvsp[-1].a_constr); |
| 3004 | checkmem(ret == 0); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3005 | ; |
| 3006 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3007 | case 211: |
| 3008 | #line 1732 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3009 | { |
Lev Walkin | f59d075 | 2004-08-18 04:59:12 +0000 | [diff] [blame] | 3010 | yyval.a_constr = asn1p_constraint_new(yylineno); |
| 3011 | checkmem(yyval.a_constr); |
| 3012 | yyval.a_constr->type = ACT_EL_VALUE; |
| 3013 | yyval.a_constr->value = yyvsp[0].a_value; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3014 | ; |
| 3015 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3016 | case 212: |
| 3017 | #line 1738 "asn1p_y.y" |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 3018 | { |
Lev Walkin | 144db9b | 2004-10-12 23:26:53 +0000 | [diff] [blame] | 3019 | yyval.a_constr = asn1p_constraint_new(yylineno); |
| 3020 | checkmem(yyval.a_constr); |
Lev Walkin | ff7dd14 | 2005-03-20 12:58:00 +0000 | [diff] [blame] | 3021 | yyval.a_constr->type = ACT_EL_TYPE; |
| 3022 | yyval.a_constr->containedSubtype = yyvsp[0].a_value; |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 3023 | ; |
| 3024 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3025 | case 213: |
| 3026 | #line 1744 "asn1p_y.y" |
| 3027 | { |
| 3028 | yyval.a_constr = asn1p_constraint_new(yylineno); |
| 3029 | checkmem(yyval.a_constr); |
| 3030 | yyval.a_constr->type = yyvsp[-1].a_ctype; |
| 3031 | yyval.a_constr->range_start = yyvsp[-2].a_value; |
| 3032 | yyval.a_constr->range_stop = yyvsp[0].a_value; |
| 3033 | ; |
| 3034 | break;} |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 3035 | case 214: |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 3036 | #line 1751 "asn1p_y.y" |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 3037 | { |
| 3038 | yyval.a_constr = asn1p_constraint_new(yylineno); |
| 3039 | checkmem(yyval.a_constr); |
| 3040 | yyval.a_constr->type = yyvsp[-1].a_ctype; |
| 3041 | yyval.a_constr->range_start = asn1p_value_fromint(-123); |
| 3042 | yyval.a_constr->range_stop = yyvsp[0].a_value; |
| 3043 | yyval.a_constr->range_start->type = ATV_MIN; |
| 3044 | ; |
| 3045 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3046 | case 215: |
| 3047 | #line 1759 "asn1p_y.y" |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 3048 | { |
| 3049 | yyval.a_constr = asn1p_constraint_new(yylineno); |
| 3050 | checkmem(yyval.a_constr); |
| 3051 | yyval.a_constr->type = yyvsp[-1].a_ctype; |
| 3052 | yyval.a_constr->range_start = yyvsp[-2].a_value; |
| 3053 | yyval.a_constr->range_stop = asn1p_value_fromint(321); |
| 3054 | yyval.a_constr->range_stop->type = ATV_MAX; |
| 3055 | ; |
| 3056 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3057 | case 216: |
| 3058 | #line 1767 "asn1p_y.y" |
| 3059 | { |
| 3060 | yyval.a_constr = asn1p_constraint_new(yylineno); |
| 3061 | checkmem(yyval.a_constr); |
| 3062 | yyval.a_constr->type = yyvsp[-1].a_ctype; |
| 3063 | yyval.a_constr->range_start = asn1p_value_fromint(-123); |
| 3064 | yyval.a_constr->range_stop = asn1p_value_fromint(321); |
| 3065 | yyval.a_constr->range_start->type = ATV_MIN; |
| 3066 | yyval.a_constr->range_stop->type = ATV_MAX; |
| 3067 | ; |
| 3068 | break;} |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 3069 | case 217: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3070 | #line 1776 "asn1p_y.y" |
Lev Walkin | 1db9113 | 2006-03-09 09:11:53 +0000 | [diff] [blame] | 3071 | { |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3072 | yyval.a_constr = yyvsp[0].a_constr; |
Lev Walkin | 1db9113 | 2006-03-09 09:11:53 +0000 | [diff] [blame] | 3073 | ; |
| 3074 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 3075 | case 218: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3076 | #line 1779 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 3077 | { |
| 3078 | yyval.a_constr = yyvsp[0].a_constr; |
| 3079 | ; |
Lev Walkin | 4696c74 | 2005-08-22 12:23:54 +0000 | [diff] [blame] | 3080 | break;} |
Lev Walkin | 1db9113 | 2006-03-09 09:11:53 +0000 | [diff] [blame] | 3081 | case 219: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3082 | #line 1783 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 3083 | { asn1p_lexer_hack_push_opaque_state(); ; |
| 3084 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3085 | case 220: |
| 3086 | #line 1783 "asn1p_y.y" |
Lev Walkin | 1893ddf | 2005-03-20 14:28:32 +0000 | [diff] [blame] | 3087 | { |
| 3088 | yyval.a_constr = asn1p_constraint_new(yylineno); |
| 3089 | checkmem(yyval.a_constr); |
| 3090 | yyval.a_constr->type = ACT_CT_CTDBY; |
| 3091 | yyval.a_constr->value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0); |
| 3092 | checkmem(yyval.a_constr->value); |
| 3093 | yyval.a_constr->value->type = ATV_UNPARSED; |
| 3094 | ; |
Lev Walkin | 144db9b | 2004-10-12 23:26:53 +0000 | [diff] [blame] | 3095 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3096 | case 221: |
| 3097 | #line 1794 "asn1p_y.y" |
Lev Walkin | 1893ddf | 2005-03-20 14:28:32 +0000 | [diff] [blame] | 3098 | { yyval.a_ctype = ACT_EL_RANGE; ; |
Lev Walkin | c8092cb | 2005-02-18 16:34:21 +0000 | [diff] [blame] | 3099 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3100 | case 222: |
| 3101 | #line 1795 "asn1p_y.y" |
Lev Walkin | 1893ddf | 2005-03-20 14:28:32 +0000 | [diff] [blame] | 3102 | { yyval.a_ctype = ACT_EL_RLRANGE; ; |
Lev Walkin | ff7dd14 | 2005-03-20 12:58:00 +0000 | [diff] [blame] | 3103 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3104 | case 223: |
| 3105 | #line 1796 "asn1p_y.y" |
Lev Walkin | 1893ddf | 2005-03-20 14:28:32 +0000 | [diff] [blame] | 3106 | { yyval.a_ctype = ACT_EL_LLRANGE; ; |
| 3107 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3108 | case 224: |
| 3109 | #line 1797 "asn1p_y.y" |
Lev Walkin | 1893ddf | 2005-03-20 14:28:32 +0000 | [diff] [blame] | 3110 | { yyval.a_ctype = ACT_EL_ULRANGE; ; |
| 3111 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3112 | case 225: |
| 3113 | #line 1801 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3114 | { |
Lev Walkin | ceb20e7 | 2004-09-05 10:40:41 +0000 | [diff] [blame] | 3115 | yyval.a_ctype = ACT_CT_SIZE; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3116 | ; |
| 3117 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3118 | case 226: |
| 3119 | #line 1804 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3120 | { |
Lev Walkin | ceb20e7 | 2004-09-05 10:40:41 +0000 | [diff] [blame] | 3121 | yyval.a_ctype = ACT_CT_FROM; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3122 | ; |
| 3123 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3124 | case 227: |
| 3125 | #line 1810 "asn1p_y.y" |
Lev Walkin | c8092cb | 2005-02-18 16:34:21 +0000 | [diff] [blame] | 3126 | { |
| 3127 | yyval.a_value = asn1p_value_fromint(0); |
| 3128 | checkmem(yyval.a_value); |
| 3129 | yyval.a_value->type = ATV_FALSE; |
| 3130 | ; |
| 3131 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3132 | case 228: |
| 3133 | #line 1815 "asn1p_y.y" |
Lev Walkin | c8092cb | 2005-02-18 16:34:21 +0000 | [diff] [blame] | 3134 | { |
| 3135 | yyval.a_value = asn1p_value_fromint(1); |
| 3136 | checkmem(yyval.a_value); |
| 3137 | yyval.a_value->type = ATV_TRUE; |
| 3138 | ; |
| 3139 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3140 | case 229: |
| 3141 | #line 1820 "asn1p_y.y" |
| 3142 | { |
| 3143 | yyval.a_value = yyvsp[0].a_value; |
| 3144 | ; |
| 3145 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 3146 | case 230: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3147 | #line 1823 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 3148 | { |
| 3149 | yyval.a_value = yyvsp[0].a_value; |
| 3150 | ; |
| 3151 | break;} |
| 3152 | case 231: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3153 | #line 1826 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3154 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3155 | asn1p_ref_t *ref; |
| 3156 | int ret; |
| 3157 | ref = asn1p_ref_new(yylineno); |
| 3158 | checkmem(ref); |
| 3159 | ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase); |
| 3160 | checkmem(ret == 0); |
| 3161 | yyval.a_value = asn1p_value_fromref(ref, 0); |
| 3162 | checkmem(yyval.a_value); |
| 3163 | free(yyvsp[0].tv_str); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3164 | ; |
| 3165 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3166 | case 232: |
| 3167 | #line 1840 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3168 | { |
Lev Walkin | c8092cb | 2005-02-18 16:34:21 +0000 | [diff] [blame] | 3169 | asn1p_ref_t *ref; |
| 3170 | int ret; |
| 3171 | ref = asn1p_ref_new(yylineno); |
| 3172 | checkmem(ref); |
| 3173 | ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_UNKNOWN); |
| 3174 | checkmem(ret == 0); |
| 3175 | yyval.a_value = asn1p_value_fromref(ref, 0); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3176 | checkmem(yyval.a_value); |
Lev Walkin | c8092cb | 2005-02-18 16:34:21 +0000 | [diff] [blame] | 3177 | free(yyvsp[0].tv_str); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3178 | ; |
| 3179 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3180 | case 233: |
| 3181 | #line 1854 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3182 | { |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 3183 | CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_WCOMP, yyvsp[0].a_constr, 0); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3184 | ; |
| 3185 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3186 | case 234: |
| 3187 | #line 1857 "asn1p_y.y" |
Lev Walkin | e596bf0 | 2005-03-28 15:01:27 +0000 | [diff] [blame] | 3188 | { |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 3189 | CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_WCOMPS, yyvsp[-1].a_constr, 0); |
Lev Walkin | e596bf0 | 2005-03-28 15:01:27 +0000 | [diff] [blame] | 3190 | ; |
| 3191 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3192 | case 235: |
| 3193 | #line 1863 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3194 | { |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 3195 | yyval.a_constr = yyvsp[0].a_constr; |
| 3196 | ; |
| 3197 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3198 | case 236: |
| 3199 | #line 1866 "asn1p_y.y" |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 3200 | { |
| 3201 | CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_WCOMPS, yyvsp[-2].a_constr, yyvsp[0].a_constr); |
| 3202 | ; |
| 3203 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3204 | case 237: |
| 3205 | #line 1872 "asn1p_y.y" |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 3206 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3207 | yyval.a_constr = asn1p_constraint_new(yylineno); |
| 3208 | checkmem(yyval.a_constr); |
| 3209 | yyval.a_constr->type = ACT_EL_EXT; |
Lev Walkin | e596bf0 | 2005-03-28 15:01:27 +0000 | [diff] [blame] | 3210 | yyval.a_constr->value = asn1p_value_frombuf("...", 3, 0); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3211 | ; |
| 3212 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3213 | case 238: |
| 3214 | #line 1878 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3215 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3216 | yyval.a_constr = asn1p_constraint_new(yylineno); |
| 3217 | checkmem(yyval.a_constr); |
| 3218 | yyval.a_constr->type = ACT_EL_VALUE; |
| 3219 | yyval.a_constr->value = asn1p_value_frombuf(yyvsp[-2].tv_str, strlen(yyvsp[-2].tv_str), 0); |
| 3220 | yyval.a_constr->presence = yyvsp[0].a_pres; |
Lev Walkin | e596bf0 | 2005-03-28 15:01:27 +0000 | [diff] [blame] | 3221 | if(yyvsp[-1].a_constr) asn1p_constraint_insert(yyval.a_constr, yyvsp[-1].a_constr); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3222 | ; |
| 3223 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3224 | case 239: |
| 3225 | #line 1892 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3226 | { yyval.a_pres = ACPRES_DEFAULT; ; |
| 3227 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3228 | case 240: |
| 3229 | #line 1893 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3230 | { yyval.a_pres = yyvsp[0].a_pres; ; |
| 3231 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3232 | case 241: |
| 3233 | #line 1897 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3234 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3235 | yyval.a_pres = ACPRES_PRESENT; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3236 | ; |
| 3237 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3238 | case 242: |
| 3239 | #line 1900 "asn1p_y.y" |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 3240 | { |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 3241 | yyval.a_pres = ACPRES_ABSENT; |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 3242 | ; |
| 3243 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3244 | case 243: |
| 3245 | #line 1903 "asn1p_y.y" |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 3246 | { |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 3247 | yyval.a_pres = ACPRES_OPTIONAL; |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 3248 | ; |
| 3249 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3250 | case 244: |
| 3251 | #line 1909 "asn1p_y.y" |
| 3252 | { |
| 3253 | yyval.a_constr = yyvsp[0].a_constr; |
| 3254 | ; |
| 3255 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 3256 | case 245: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3257 | #line 1912 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 3258 | { |
| 3259 | yyval.a_constr = yyvsp[0].a_constr; |
| 3260 | ; |
| 3261 | break;} |
| 3262 | case 246: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3263 | #line 1921 "asn1p_y.y" |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 3264 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3265 | asn1p_ref_t *ref = asn1p_ref_new(yylineno); |
| 3266 | asn1p_constraint_t *ct; |
| 3267 | int ret; |
| 3268 | ret = asn1p_ref_add_component(ref, yyvsp[-1].tv_str, 0); |
| 3269 | checkmem(ret == 0); |
| 3270 | ct = asn1p_constraint_new(yylineno); |
| 3271 | checkmem(yyval.a_constr); |
| 3272 | ct->type = ACT_EL_VALUE; |
| 3273 | ct->value = asn1p_value_fromref(ref, 0); |
| 3274 | CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CRC, ct, 0); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3275 | ; |
| 3276 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3277 | case 247: |
| 3278 | #line 1936 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3279 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3280 | CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CRC, yyvsp[-3].a_constr, yyvsp[-1].a_constr); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3281 | ; |
| 3282 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3283 | case 248: |
| 3284 | #line 1942 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3285 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3286 | yyval.a_constr = asn1p_constraint_new(yylineno); |
| 3287 | checkmem(yyval.a_constr); |
| 3288 | yyval.a_constr->type = ACT_EL_VALUE; |
| 3289 | yyval.a_constr->value = asn1p_value_fromref(yyvsp[0].a_ref, 0); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3290 | ; |
| 3291 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3292 | case 249: |
| 3293 | #line 1948 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3294 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3295 | asn1p_constraint_t *ct; |
| 3296 | ct = asn1p_constraint_new(yylineno); |
| 3297 | checkmem(ct); |
| 3298 | ct->type = ACT_EL_VALUE; |
| 3299 | ct->value = asn1p_value_fromref(yyvsp[0].a_ref, 0); |
| 3300 | CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-2].a_constr, ct); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3301 | ; |
| 3302 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3303 | case 250: |
| 3304 | #line 1962 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3305 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3306 | char *p = malloc(strlen(yyvsp[0].tv_str) + 2); |
| 3307 | int ret; |
| 3308 | *p = '@'; |
| 3309 | strcpy(p + 1, yyvsp[0].tv_str); |
| 3310 | yyval.a_ref = asn1p_ref_new(yylineno); |
| 3311 | ret = asn1p_ref_add_component(yyval.a_ref, p, 0); |
| 3312 | checkmem(ret == 0); |
| 3313 | free(p); |
| 3314 | free(yyvsp[0].tv_str); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3315 | ; |
| 3316 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3317 | case 251: |
| 3318 | #line 1973 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3319 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3320 | char *p = malloc(strlen(yyvsp[0].tv_str) + 3); |
| 3321 | int ret; |
| 3322 | p[0] = '@'; |
| 3323 | p[1] = '.'; |
| 3324 | strcpy(p + 2, yyvsp[0].tv_str); |
| 3325 | yyval.a_ref = asn1p_ref_new(yylineno); |
| 3326 | ret = asn1p_ref_add_component(yyval.a_ref, p, 0); |
| 3327 | checkmem(ret == 0); |
| 3328 | free(p); |
| 3329 | free(yyvsp[0].tv_str); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3330 | ; |
| 3331 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3332 | case 252: |
| 3333 | #line 1989 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3334 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3335 | yyval.tv_str = yyvsp[0].tv_str; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3336 | ; |
| 3337 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3338 | case 253: |
| 3339 | #line 1992 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3340 | { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3341 | int l1 = strlen(yyvsp[-2].tv_str); |
| 3342 | int l3 = strlen(yyvsp[0].tv_str); |
| 3343 | yyval.tv_str = malloc(l1 + 1 + l3 + 1); |
| 3344 | memcpy(yyval.tv_str, yyvsp[-2].tv_str, l1); |
| 3345 | yyval.tv_str[l1] = '.'; |
| 3346 | memcpy(yyval.tv_str + l1 + 1, yyvsp[0].tv_str, l3); |
| 3347 | yyval.tv_str[l1 + 1 + l3] = '\0'; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3348 | ; |
| 3349 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3350 | case 254: |
| 3351 | #line 2010 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3352 | { |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 3353 | yyval.a_marker.flags = EM_NOMARK; |
| 3354 | yyval.a_marker.default_value = 0; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3355 | ; |
| 3356 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3357 | case 255: |
| 3358 | #line 2014 "asn1p_y.y" |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 3359 | { yyval.a_marker = yyvsp[0].a_marker; ; |
Lev Walkin | ec208e6 | 2004-09-14 02:44:07 +0000 | [diff] [blame] | 3360 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3361 | case 256: |
| 3362 | #line 2018 "asn1p_y.y" |
Lev Walkin | ec208e6 | 2004-09-14 02:44:07 +0000 | [diff] [blame] | 3363 | { |
Lev Walkin | 7085305 | 2005-11-26 11:21:55 +0000 | [diff] [blame] | 3364 | yyval.a_marker.flags = EM_OPTIONAL | EM_INDIRECT; |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 3365 | yyval.a_marker.default_value = 0; |
Lev Walkin | ec208e6 | 2004-09-14 02:44:07 +0000 | [diff] [blame] | 3366 | ; |
| 3367 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3368 | case 257: |
| 3369 | #line 2022 "asn1p_y.y" |
Lev Walkin | 9c97418 | 2004-09-15 11:59:51 +0000 | [diff] [blame] | 3370 | { |
| 3371 | yyval.a_marker.flags = EM_DEFAULT; |
| 3372 | yyval.a_marker.default_value = yyvsp[0].a_value; |
| 3373 | ; |
| 3374 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3375 | case 258: |
| 3376 | #line 2045 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3377 | { |
Lev Walkin | ceb20e7 | 2004-09-05 10:40:41 +0000 | [diff] [blame] | 3378 | yyval.a_expr = asn1p_expr_new(yylineno); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3379 | checkmem(yyval.a_expr); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3380 | ; |
| 3381 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3382 | case 259: |
| 3383 | #line 2049 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3384 | { |
Lev Walkin | e596bf0 | 2005-03-28 15:01:27 +0000 | [diff] [blame] | 3385 | yyval.a_expr = yyvsp[-1].a_expr; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3386 | ; |
| 3387 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3388 | case 260: |
| 3389 | #line 2055 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3390 | { |
Lev Walkin | e596bf0 | 2005-03-28 15:01:27 +0000 | [diff] [blame] | 3391 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 3392 | checkmem(yyval.a_expr); |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3393 | asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr); |
| 3394 | ; |
| 3395 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3396 | case 261: |
| 3397 | #line 2060 "asn1p_y.y" |
| 3398 | { |
| 3399 | yyval.a_expr = yyvsp[-2].a_expr; |
| 3400 | asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr); |
| 3401 | ; |
| 3402 | break;} |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 3403 | case 262: |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 3404 | #line 2067 "asn1p_y.y" |
Lev Walkin | e596bf0 | 2005-03-28 15:01:27 +0000 | [diff] [blame] | 3405 | { |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3406 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 3407 | checkmem(yyval.a_expr); |
| 3408 | yyval.a_expr->expr_type = A1TC_UNIVERVAL; |
| 3409 | yyval.a_expr->meta_type = AMT_VALUE; |
| 3410 | yyval.a_expr->Identifier = yyvsp[0].tv_str; |
Lev Walkin | e596bf0 | 2005-03-28 15:01:27 +0000 | [diff] [blame] | 3411 | ; |
| 3412 | break;} |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 3413 | case 263: |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 3414 | #line 2074 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3415 | { |
Lev Walkin | ceb20e7 | 2004-09-05 10:40:41 +0000 | [diff] [blame] | 3416 | yyval.a_expr = asn1p_expr_new(yylineno); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3417 | checkmem(yyval.a_expr); |
| 3418 | yyval.a_expr->expr_type = A1TC_UNIVERVAL; |
| 3419 | yyval.a_expr->meta_type = AMT_VALUE; |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3420 | yyval.a_expr->Identifier = yyvsp[-3].tv_str; |
| 3421 | yyval.a_expr->value = yyvsp[-1].a_value; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3422 | ; |
| 3423 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 3424 | case 264: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3425 | #line 2082 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 3426 | { |
| 3427 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 3428 | checkmem(yyval.a_expr); |
| 3429 | yyval.a_expr->expr_type = A1TC_UNIVERVAL; |
| 3430 | yyval.a_expr->meta_type = AMT_VALUE; |
| 3431 | yyval.a_expr->Identifier = yyvsp[-3].tv_str; |
| 3432 | yyval.a_expr->value = yyvsp[-1].a_value; |
| 3433 | ; |
| 3434 | break;} |
| 3435 | case 265: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3436 | #line 2090 "asn1p_y.y" |
Lev Walkin | 1893ddf | 2005-03-20 14:28:32 +0000 | [diff] [blame] | 3437 | { |
| 3438 | yyval.a_expr = asn1p_expr_new(yylineno); |
| 3439 | checkmem(yyval.a_expr); |
| 3440 | yyval.a_expr->expr_type = A1TC_UNIVERVAL; |
| 3441 | yyval.a_expr->meta_type = AMT_VALUE; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3442 | yyval.a_expr->value = yyvsp[0].a_value; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3443 | ; |
| 3444 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3445 | case 266: |
| 3446 | #line 2097 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3447 | { |
Lev Walkin | ceb20e7 | 2004-09-05 10:40:41 +0000 | [diff] [blame] | 3448 | yyval.a_expr = asn1p_expr_new(yylineno); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3449 | checkmem(yyval.a_expr); |
| 3450 | yyval.a_expr->Identifier = strdup("..."); |
| 3451 | checkmem(yyval.a_expr->Identifier); |
| 3452 | yyval.a_expr->expr_type = A1TC_EXTENSIBLE; |
| 3453 | yyval.a_expr->meta_type = AMT_VALUE; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3454 | ; |
| 3455 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3456 | case 267: |
| 3457 | #line 2108 "asn1p_y.y" |
| 3458 | { |
| 3459 | yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int); |
| 3460 | checkmem(yyval.a_value); |
| 3461 | ; |
| 3462 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 3463 | case 268: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3464 | #line 2112 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 3465 | { |
| 3466 | yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int); |
| 3467 | checkmem(yyval.a_value); |
| 3468 | ; |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 3469 | break;} |
Lev Walkin | 1db9113 | 2006-03-09 09:11:53 +0000 | [diff] [blame] | 3470 | case 269: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3471 | #line 2143 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 3472 | { memset(&yyval.a_tag, 0, sizeof(yyval.a_tag)); ; |
| 3473 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3474 | case 270: |
| 3475 | #line 2144 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 3476 | { yyval.a_tag = yyvsp[0].a_tag; ; |
| 3477 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3478 | case 271: |
| 3479 | #line 2148 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3480 | { |
Lev Walkin | c603f10 | 2005-01-23 09:51:44 +0000 | [diff] [blame] | 3481 | yyval.a_tag = yyvsp[-1].a_tag; |
| 3482 | yyval.a_tag.tag_mode = yyvsp[0].a_tag.tag_mode; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3483 | ; |
| 3484 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3485 | case 272: |
| 3486 | #line 2155 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3487 | { |
Lev Walkin | c603f10 | 2005-01-23 09:51:44 +0000 | [diff] [blame] | 3488 | yyval.a_tag = yyvsp[-2].a_tag; |
| 3489 | yyval.a_tag.tag_value = yyvsp[-1].a_int; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3490 | ; |
| 3491 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3492 | case 273: |
| 3493 | #line 2161 "asn1p_y.y" |
Lev Walkin | c603f10 | 2005-01-23 09:51:44 +0000 | [diff] [blame] | 3494 | { yyval.a_tag.tag_class = TC_CONTEXT_SPECIFIC; ; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3495 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3496 | case 274: |
| 3497 | #line 2162 "asn1p_y.y" |
Lev Walkin | c603f10 | 2005-01-23 09:51:44 +0000 | [diff] [blame] | 3498 | { yyval.a_tag.tag_class = TC_UNIVERSAL; ; |
Lev Walkin | 83cac2f | 2004-09-22 16:03:36 +0000 | [diff] [blame] | 3499 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3500 | case 275: |
| 3501 | #line 2163 "asn1p_y.y" |
Lev Walkin | 4696c74 | 2005-08-22 12:23:54 +0000 | [diff] [blame] | 3502 | { yyval.a_tag.tag_class = TC_APPLICATION; ; |
Lev Walkin | 1e448d3 | 2005-03-24 14:26:38 +0000 | [diff] [blame] | 3503 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3504 | case 276: |
| 3505 | #line 2164 "asn1p_y.y" |
Lev Walkin | 4696c74 | 2005-08-22 12:23:54 +0000 | [diff] [blame] | 3506 | { yyval.a_tag.tag_class = TC_PRIVATE; ; |
Lev Walkin | b36317c | 2005-08-12 10:09:10 +0000 | [diff] [blame] | 3507 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3508 | case 277: |
| 3509 | #line 2168 "asn1p_y.y" |
Lev Walkin | 4696c74 | 2005-08-22 12:23:54 +0000 | [diff] [blame] | 3510 | { yyval.a_tag.tag_mode = TM_DEFAULT; ; |
| 3511 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3512 | case 278: |
| 3513 | #line 2169 "asn1p_y.y" |
Lev Walkin | 4696c74 | 2005-08-22 12:23:54 +0000 | [diff] [blame] | 3514 | { yyval.a_tag.tag_mode = TM_IMPLICIT; ; |
| 3515 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3516 | case 279: |
| 3517 | #line 2170 "asn1p_y.y" |
Lev Walkin | 4696c74 | 2005-08-22 12:23:54 +0000 | [diff] [blame] | 3518 | { yyval.a_tag.tag_mode = TM_EXPLICIT; ; |
| 3519 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3520 | case 280: |
| 3521 | #line 2174 "asn1p_y.y" |
| 3522 | { |
| 3523 | checkmem(yyvsp[0].tv_str); |
| 3524 | yyval.tv_str = yyvsp[0].tv_str; |
| 3525 | ; |
| 3526 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 3527 | case 281: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3528 | #line 2178 "asn1p_y.y" |
Lev Walkin | 4696c74 | 2005-08-22 12:23:54 +0000 | [diff] [blame] | 3529 | { |
| 3530 | checkmem(yyvsp[0].tv_str); |
| 3531 | yyval.tv_str = yyvsp[0].tv_str; |
| 3532 | ; |
| 3533 | break;} |
Lev Walkin | 9c2285a | 2006-03-09 08:49:26 +0000 | [diff] [blame] | 3534 | case 282: |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3535 | #line 2186 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 3536 | { |
| 3537 | checkmem(yyvsp[0].tv_str); |
| 3538 | yyval.tv_str = yyvsp[0].tv_str; |
| 3539 | ; |
Lev Walkin | ef62540 | 2005-09-05 05:17:57 +0000 | [diff] [blame] | 3540 | break;} |
Lev Walkin | 1db9113 | 2006-03-09 09:11:53 +0000 | [diff] [blame] | 3541 | case 283: |
Lev Walkin | 57074f1 | 2006-03-16 05:11:14 +0000 | [diff] [blame] | 3542 | #line 2193 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 3543 | { yyval.tv_str = 0; ; |
| 3544 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3545 | case 284: |
| 3546 | #line 2194 "asn1p_y.y" |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 3547 | { |
| 3548 | yyval.tv_str = yyvsp[0].tv_str; |
| 3549 | ; |
| 3550 | break;} |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3551 | case 285: |
| 3552 | #line 2200 "asn1p_y.y" |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3553 | { |
Lev Walkin | ceb20e7 | 2004-09-05 10:40:41 +0000 | [diff] [blame] | 3554 | checkmem(yyvsp[0].tv_str); |
| 3555 | yyval.tv_str = yyvsp[0].tv_str; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3556 | ; |
| 3557 | break;} |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3558 | } |
| 3559 | /* the action file gets copied in in place of this dollarsign */ |
| 3560 | #line 543 "/usr/share/bison.simple" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3561 | |
| 3562 | yyvsp -= yylen; |
| 3563 | yyssp -= yylen; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3564 | #ifdef YYLSP_NEEDED |
| 3565 | yylsp -= yylen; |
| 3566 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3567 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3568 | #if YYDEBUG != 0 |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3569 | if (yydebug) |
| 3570 | { |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3571 | short *ssp1 = yyss - 1; |
| 3572 | fprintf (stderr, "state stack now"); |
| 3573 | while (ssp1 != yyssp) |
| 3574 | fprintf (stderr, " %d", *++ssp1); |
| 3575 | fprintf (stderr, "\n"); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3576 | } |
| 3577 | #endif |
| 3578 | |
| 3579 | *++yyvsp = yyval; |
| 3580 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3581 | #ifdef YYLSP_NEEDED |
| 3582 | yylsp++; |
| 3583 | if (yylen == 0) |
| 3584 | { |
| 3585 | yylsp->first_line = yylloc.first_line; |
| 3586 | yylsp->first_column = yylloc.first_column; |
| 3587 | yylsp->last_line = (yylsp-1)->last_line; |
| 3588 | yylsp->last_column = (yylsp-1)->last_column; |
| 3589 | yylsp->text = 0; |
| 3590 | } |
| 3591 | else |
| 3592 | { |
| 3593 | yylsp->last_line = (yylsp+yylen-1)->last_line; |
| 3594 | yylsp->last_column = (yylsp+yylen-1)->last_column; |
| 3595 | } |
| 3596 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3597 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3598 | /* Now "shift" the result of the reduction. |
| 3599 | Determine what state that goes to, |
| 3600 | based on the state we popped back to |
| 3601 | and the rule number reduced by. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3602 | |
| 3603 | yyn = yyr1[yyn]; |
| 3604 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3605 | yystate = yypgoto[yyn - YYNTBASE] + *yyssp; |
| 3606 | if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3607 | yystate = yytable[yystate]; |
| 3608 | else |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3609 | yystate = yydefgoto[yyn - YYNTBASE]; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3610 | |
| 3611 | goto yynewstate; |
| 3612 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3613 | yyerrlab: /* here on detecting error */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3614 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3615 | if (! yyerrstatus) |
| 3616 | /* If not already recovering from an error, report this error. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3617 | { |
| 3618 | ++yynerrs; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3619 | |
| 3620 | #ifdef YYERROR_VERBOSE |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3621 | yyn = yypact[yystate]; |
| 3622 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3623 | if (yyn > YYFLAG && yyn < YYLAST) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3624 | { |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3625 | int size = 0; |
| 3626 | char *msg; |
| 3627 | int x, count; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3628 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3629 | count = 0; |
| 3630 | /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ |
| 3631 | for (x = (yyn < 0 ? -yyn : 0); |
Lev Walkin | 4a4bdf7 | 2005-06-07 21:43:32 +0000 | [diff] [blame] | 3632 | x < (int)(sizeof(yytname) / sizeof(char *)); x++) |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3633 | if (yycheck[x + yyn] == x) |
| 3634 | size += strlen(yytname[x]) + 15, count++; |
| 3635 | msg = (char *) malloc(size + 15); |
| 3636 | if (msg != 0) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3637 | { |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3638 | strcpy(msg, "parse error"); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3639 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3640 | if (count < 5) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3641 | { |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3642 | count = 0; |
| 3643 | for (x = (yyn < 0 ? -yyn : 0); |
Lev Walkin | 4a4bdf7 | 2005-06-07 21:43:32 +0000 | [diff] [blame] | 3644 | x < (int)(sizeof(yytname) / sizeof(char *)); x++) |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3645 | if (yycheck[x + yyn] == x) |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3646 | { |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3647 | strcat(msg, count == 0 ? ", expecting `" : " or `"); |
| 3648 | strcat(msg, yytname[x]); |
| 3649 | strcat(msg, "'"); |
| 3650 | count++; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3651 | } |
| 3652 | } |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3653 | yyerror(msg); |
| 3654 | free(msg); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3655 | } |
| 3656 | else |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3657 | yyerror ("parse error; also virtual memory exceeded"); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3658 | } |
| 3659 | else |
| 3660 | #endif /* YYERROR_VERBOSE */ |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3661 | yyerror("parse error"); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3662 | } |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3663 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3664 | goto yyerrlab1; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3665 | yyerrlab1: /* here on error raised explicitly by an action */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3666 | |
| 3667 | if (yyerrstatus == 3) |
| 3668 | { |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3669 | /* if just tried and failed to reuse lookahead token after an error, discard it. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3670 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3671 | /* return failure if at end of input */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3672 | if (yychar == YYEOF) |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3673 | YYABORT; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3674 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3675 | #if YYDEBUG != 0 |
| 3676 | if (yydebug) |
| 3677 | fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); |
| 3678 | #endif |
| 3679 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3680 | yychar = YYEMPTY; |
| 3681 | } |
| 3682 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3683 | /* Else will try to reuse lookahead token |
| 3684 | after shifting the error token. */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3685 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3686 | yyerrstatus = 3; /* Each real token shifted decrements this */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3687 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3688 | goto yyerrhandle; |
Lev Walkin | 459ab02 | 2004-09-07 10:39:09 +0000 | [diff] [blame] | 3689 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3690 | yyerrdefault: /* current state does not do anything special for the error token. */ |
Lev Walkin | 459ab02 | 2004-09-07 10:39:09 +0000 | [diff] [blame] | 3691 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3692 | #if 0 |
| 3693 | /* This is wrong; only states that explicitly want error tokens |
| 3694 | should shift them. */ |
| 3695 | yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ |
| 3696 | if (yyn) goto yydefault; |
Lev Walkin | ceb20e7 | 2004-09-05 10:40:41 +0000 | [diff] [blame] | 3697 | #endif |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3698 | |
| 3699 | yyerrpop: /* pop the current state because it cannot handle the error token */ |
| 3700 | |
| 3701 | if (yyssp == yyss) YYABORT; |
| 3702 | yyvsp--; |
| 3703 | yystate = *--yyssp; |
| 3704 | #ifdef YYLSP_NEEDED |
| 3705 | yylsp--; |
| 3706 | #endif |
| 3707 | |
| 3708 | #if YYDEBUG != 0 |
| 3709 | if (yydebug) |
| 3710 | { |
| 3711 | short *ssp1 = yyss - 1; |
| 3712 | fprintf (stderr, "Error: state stack now"); |
| 3713 | while (ssp1 != yyssp) |
| 3714 | fprintf (stderr, " %d", *++ssp1); |
| 3715 | fprintf (stderr, "\n"); |
Lev Walkin | ceb20e7 | 2004-09-05 10:40:41 +0000 | [diff] [blame] | 3716 | } |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3717 | #endif |
| 3718 | |
| 3719 | yyerrhandle: |
| 3720 | |
| 3721 | yyn = yypact[yystate]; |
| 3722 | if (yyn == YYFLAG) |
| 3723 | goto yyerrdefault; |
| 3724 | |
| 3725 | yyn += YYTERROR; |
| 3726 | if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) |
| 3727 | goto yyerrdefault; |
| 3728 | |
| 3729 | yyn = yytable[yyn]; |
| 3730 | if (yyn < 0) |
| 3731 | { |
| 3732 | if (yyn == YYFLAG) |
| 3733 | goto yyerrpop; |
| 3734 | yyn = -yyn; |
| 3735 | goto yyreduce; |
| 3736 | } |
| 3737 | else if (yyn == 0) |
| 3738 | goto yyerrpop; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3739 | |
| 3740 | if (yyn == YYFINAL) |
| 3741 | YYACCEPT; |
| 3742 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3743 | #if YYDEBUG != 0 |
| 3744 | if (yydebug) |
| 3745 | fprintf(stderr, "Shifting error token, "); |
| 3746 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3747 | |
| 3748 | *++yyvsp = yylval; |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3749 | #ifdef YYLSP_NEEDED |
| 3750 | *++yylsp = yylloc; |
| 3751 | #endif |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3752 | |
| 3753 | yystate = yyn; |
| 3754 | goto yynewstate; |
| 3755 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3756 | yyacceptlab: |
| 3757 | /* YYACCEPT comes here. */ |
| 3758 | if (yyfree_stacks) |
| 3759 | { |
| 3760 | free (yyss); |
| 3761 | free (yyvs); |
| 3762 | #ifdef YYLSP_NEEDED |
| 3763 | free (yyls); |
Lev Walkin | 609ccbb | 2004-09-04 04:49:21 +0000 | [diff] [blame] | 3764 | #endif |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3765 | } |
| 3766 | return 0; |
Lev Walkin | 459ab02 | 2004-09-07 10:39:09 +0000 | [diff] [blame] | 3767 | |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3768 | yyabortlab: |
| 3769 | /* YYABORT comes here. */ |
| 3770 | if (yyfree_stacks) |
| 3771 | { |
| 3772 | free (yyss); |
| 3773 | free (yyvs); |
| 3774 | #ifdef YYLSP_NEEDED |
| 3775 | free (yyls); |
Lev Walkin | 459ab02 | 2004-09-07 10:39:09 +0000 | [diff] [blame] | 3776 | #endif |
Lev Walkin | 1004aa9 | 2004-09-08 00:28:11 +0000 | [diff] [blame] | 3777 | } |
| 3778 | return 1; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3779 | } |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame^] | 3780 | #line 2206 "asn1p_y.y" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3781 | |
| 3782 | |
| 3783 | |
| 3784 | /* |
| 3785 | * Convert Xstring ('0101'B or '5'H) to the binary vector. |
| 3786 | */ |
| 3787 | static asn1p_value_t * |
| 3788 | _convert_bitstring2binary(char *str, int base) { |
| 3789 | asn1p_value_t *val; |
| 3790 | int slen; |
| 3791 | int memlen; |
| 3792 | int baselen; |
| 3793 | int bits; |
| 3794 | uint8_t *binary_vector; |
| 3795 | uint8_t *bv_ptr; |
| 3796 | uint8_t cur_val; |
| 3797 | |
| 3798 | assert(str); |
| 3799 | assert(str[0] == '\''); |
| 3800 | |
| 3801 | switch(base) { |
| 3802 | case 'B': |
| 3803 | baselen = 1; |
| 3804 | break; |
| 3805 | case 'H': |
| 3806 | baselen = 4; |
| 3807 | break; |
| 3808 | default: |
| 3809 | assert(base == 'B' || base == 'H'); |
| 3810 | errno = EINVAL; |
| 3811 | return NULL; |
| 3812 | } |
| 3813 | |
| 3814 | slen = strlen(str); |
| 3815 | assert(str[slen - 1] == base); |
| 3816 | assert(str[slen - 2] == '\''); |
| 3817 | |
| 3818 | memlen = slen / (8 / baselen); /* Conservative estimate */ |
| 3819 | |
| 3820 | bv_ptr = binary_vector = malloc(memlen + 1); |
| 3821 | if(bv_ptr == NULL) |
| 3822 | /* ENOMEM */ |
| 3823 | return NULL; |
| 3824 | |
| 3825 | cur_val = 0; |
| 3826 | bits = 0; |
| 3827 | while(*(++str) != '\'') { |
| 3828 | switch(baselen) { |
| 3829 | case 1: |
| 3830 | switch(*str) { |
| 3831 | case '1': |
| 3832 | cur_val |= 1 << (7 - (bits % 8)); |
| 3833 | case '0': |
| 3834 | break; |
| 3835 | default: |
| 3836 | assert(!"_y UNREACH1"); |
| 3837 | case ' ': case '\r': case '\n': |
| 3838 | continue; |
| 3839 | } |
| 3840 | break; |
| 3841 | case 4: |
| 3842 | switch(*str) { |
| 3843 | case '0': case '1': case '2': case '3': case '4': |
| 3844 | case '5': case '6': case '7': case '8': case '9': |
| 3845 | cur_val |= (*str - '0') << (4 - (bits % 8)); |
| 3846 | break; |
| 3847 | case 'A': case 'B': case 'C': |
| 3848 | case 'D': case 'E': case 'F': |
| 3849 | cur_val |= ((*str - 'A') + 10) |
| 3850 | << (4 - (bits % 8)); |
| 3851 | break; |
| 3852 | default: |
| 3853 | assert(!"_y UNREACH2"); |
| 3854 | case ' ': case '\r': case '\n': |
| 3855 | continue; |
| 3856 | } |
| 3857 | break; |
| 3858 | } |
| 3859 | |
| 3860 | bits += baselen; |
| 3861 | if((bits % 8) == 0) { |
| 3862 | *bv_ptr++ = cur_val; |
| 3863 | cur_val = 0; |
| 3864 | } |
| 3865 | } |
| 3866 | |
| 3867 | *bv_ptr = cur_val; |
| 3868 | assert((bv_ptr - binary_vector) <= memlen); |
| 3869 | |
| 3870 | val = asn1p_value_frombits(binary_vector, bits, 0); |
| 3871 | if(val == NULL) { |
| 3872 | free(binary_vector); |
| 3873 | } |
| 3874 | |
| 3875 | return val; |
| 3876 | } |
| 3877 | |
Lev Walkin | 2e9bd5c | 2005-08-13 09:07:11 +0000 | [diff] [blame] | 3878 | /* |
| 3879 | * For unnamed types (used in old X.208 compliant modules) |
| 3880 | * generate some sort of interim names, to not to force human being to fix |
| 3881 | * the specification's compliance to modern ASN.1 standards. |
| 3882 | */ |
| 3883 | static void |
| 3884 | _fixup_anonymous_identifier(asn1p_expr_t *expr) { |
| 3885 | char *p; |
| 3886 | assert(expr->Identifier == 0); |
| 3887 | |
| 3888 | /* |
| 3889 | * Try to figure out the type name |
| 3890 | * without going too much into details |
| 3891 | */ |
| 3892 | expr->Identifier = ASN_EXPR_TYPE2STR(expr->expr_type); |
| 3893 | if(expr->reference && expr->reference->comp_count > 0) |
| 3894 | expr->Identifier = expr->reference->components[0].name; |
| 3895 | |
| 3896 | fprintf(stderr, |
| 3897 | "WARNING: Line %d: expected lower-case member identifier, " |
| 3898 | "found an unnamed %s.\n" |
| 3899 | "WARNING: Obsolete X.208 syntax detected, " |
| 3900 | "please give the member a name.\n", |
| 3901 | yylineno, expr->Identifier ? expr->Identifier : "type"); |
| 3902 | |
| 3903 | if(!expr->Identifier) |
| 3904 | expr->Identifier = "unnamed"; |
| 3905 | expr->Identifier = strdup(expr->Identifier); |
| 3906 | assert(expr->Identifier); |
| 3907 | /* Make a lowercase identifier from the type name */ |
| 3908 | for(p = expr->Identifier; *p; p++) { |
| 3909 | switch(*p) { |
| 3910 | case 'A' ... 'Z': *p += 32; break; |
| 3911 | case ' ': *p = '_'; break; |
| 3912 | case '-': *p = '_'; break; |
| 3913 | } |
| 3914 | } |
| 3915 | fprintf(stderr, "NOTE: Assigning temporary identifier \"%s\". " |
| 3916 | "Name clash may occur later.\n", |
| 3917 | expr->Identifier); |
| 3918 | } |
| 3919 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3920 | int |
| 3921 | yyerror(const char *msg) { |
Lev Walkin | 9d542d2 | 2006-03-14 16:31:37 +0000 | [diff] [blame] | 3922 | extern char *asn1p_text; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3923 | fprintf(stderr, |
| 3924 | "ASN.1 grammar parse error " |
| 3925 | "near line %d (token \"%s\"): %s\n", |
Lev Walkin | ceb20e7 | 2004-09-05 10:40:41 +0000 | [diff] [blame] | 3926 | yylineno, asn1p_text, msg); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3927 | return -1; |
| 3928 | } |
| 3929 | |