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