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