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