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