From d523ea454d0f4bcf851d883e9fd90cc10145b242 Mon Sep 17 00:00:00 2001 From: Lev Walkin <vlm@lionet.info> Date: Wed, 6 Sep 2017 22:15:08 -0700 Subject: [PATCH] parse advanced WITH COMPONENTS --- libasn1compiler/asn1c_ioc.c | 14 +- libasn1fix/asn1fix_constraint.c | 121 +- libasn1parser/asn1p_y.c | 1829 +++++++++-------- libasn1parser/asn1p_y.h | 2 +- libasn1parser/asn1p_y.y | 199 +- libasn1parser/asn1parser.c | 4 + libasn1parser/asn1parser.h | 2 + libasn1print/asn1print.c | 88 +- .../112-param-class-OK.asn1 | 2 +- .../112-param-class-OK.asn1.-EF | 2 +- ...er-constraint-OK.asn1.-EFprint-constraints | Bin 2235 -> 2239 bytes .../124-multiconstraint-OK.asn1.-EF | 2 +- .../149-with-components-SE.asn1 | 42 + .../149-with-components-SE.asn1.-E | 12 + .../16-constraint-OK.asn1.-EF | 6 +- ...16-constraint-OK.asn1.-EFprint-constraints | Bin 2798 -> 2804 bytes tests/tests-asn1c-compiler/19-param-OK.asn1 | 2 +- .../tests-asn1c-compiler/19-param-OK.asn1.-EF | 2 +- ...50-constraint-OK.asn1.-EFprint-constraints | Bin 12304 -> 12333 bytes .../72-same-names-OK.asn1 | 4 +- ...m-constraints-OK.asn1.-EFprint-constraints | 2 +- .../82-with-comps-OK.asn1.-EF | 2 +- .../83-with-comps-OK.asn1 | 4 +- 23 files changed, 1237 insertions(+), 1104 deletions(-) create mode 100644 tests/tests-asn1c-compiler/149-with-components-SE.asn1 create mode 100644 tests/tests-asn1c-compiler/149-with-components-SE.asn1.-E diff --git a/libasn1compiler/asn1c_ioc.c b/libasn1compiler/asn1c_ioc.c index 37719d18..02e37a79 100644 --- a/libasn1compiler/asn1c_ioc.c +++ b/libasn1compiler/asn1c_ioc.c @@ -24,8 +24,18 @@ asn1c_get_information_object_set_reference_from_constraint(arg_t *arg, assert(ct->elements[0]->type == ACT_EL_VALUE); asn1p_value_t *val = ct->elements[0]->value; - if(val->type == ATV_VALUESET && val->value.constraint->type == ACT_EL_TYPE && val->value.constraint->containedSubtype && val->value.constraint->containedSubtype->type == ATV_REFERENCED) { - return val->value.constraint->containedSubtype->value.reference; + if(val->type == ATV_VALUESET && val->value.constraint->type == ACT_EL_TYPE) { + asn1p_value_t *csub = val->value.constraint->containedSubtype; + if(!csub) { + /* Ignore */ + } else if(csub->type == ATV_REFERENCED) { + return csub->value.reference; + } else if(csub->type == ATV_TYPE) { + if(csub->value.v_type->expr_type == A1TC_REFERENCE) { + assert(csub->value.v_type->reference); + return csub->value.v_type->reference; + } + } } if(val->type != ATV_REFERENCED) { FATAL("Set reference: %s", asn1f_printable_value(val)); diff --git a/libasn1fix/asn1fix_constraint.c b/libasn1fix/asn1fix_constraint.c index 823fca32..46eddaaa 100644 --- a/libasn1fix/asn1fix_constraint.c +++ b/libasn1fix/asn1fix_constraint.c @@ -257,70 +257,83 @@ _remove_extensions(arg_t *arg, asn1p_constraint_t *ct, int forgive_last) { ct->elements[i] = 0; } +static asn1p_ref_t * +get_reference_from(asn1p_constraint_t *ct) { + if(ct->containedSubtype->type == ATV_REFERENCED) { + return ct->containedSubtype->value.reference; + } else if(ct->containedSubtype->type == ATV_TYPE) { + if(ct->containedSubtype->value.v_type->expr_type == A1TC_REFERENCE) { + return ct->containedSubtype->value.v_type->reference; + } + } + return NULL; +} + static int constraint_type_resolve(arg_t *arg, asn1p_constraint_t *ct) { - asn1p_constraint_t *ct_expr; - int ret; + asn1p_constraint_t *ct_expr; + int ret; - DEBUG("(\"%s\")", asn1f_printable_value(ct->containedSubtype)); + DEBUG("(\"%s\")", asn1f_printable_value(ct->containedSubtype)); - if(ct->containedSubtype->type == ATV_VALUESET) { - ct_expr = ct->containedSubtype->value.constraint; - DEBUG("Found %s in constraints", "ValueSet"); - } else if(ct->containedSubtype->type == ATV_REFERENCED) { - asn1p_expr_t *rtype; - arg_t tmparg; + if(ct->containedSubtype->type == ATV_VALUESET) { + ct_expr = ct->containedSubtype->value.constraint; + DEBUG("Found %s in constraints", "ValueSet"); + } else if(get_reference_from(ct)) { + asn1p_expr_t *rtype; + arg_t tmparg; rtype = asn1f_lookup_symbol(arg, arg->expr->rhs_pspecs, - ct->containedSubtype->value.reference); + get_reference_from(ct)); if(!rtype) { - FATAL("Cannot find type \"%s\" in constraints " - "at line %d", - asn1f_printable_value(ct->containedSubtype), - ct->_lineno); - return -1; - } - - tmparg = *arg; - tmparg.expr = rtype; - tmparg.mod = rtype->module; - ret = asn1constraint_pullup(&tmparg); - if(ret) return ret; - - ct_expr = rtype->combined_constraints; - if(!ct_expr) return 0; - } else { - FATAL("Unsupported feature at line %d", ct->_lineno); - return -1; - } - - ct_expr = asn1p_constraint_clone(ct_expr); - assert(ct_expr); - - _remove_extensions(arg, ct_expr, 0); + FATAL( + "Cannot find type \"%s\" in constraints " + "at line %d", + asn1f_printable_value(ct->containedSubtype), ct->_lineno); + return -1; + } + + tmparg = *arg; + tmparg.expr = rtype; + tmparg.mod = rtype->module; + ret = asn1constraint_pullup(&tmparg); + if(ret) return ret; + + ct_expr = rtype->combined_constraints; + if(!ct_expr) return 0; + } else { + FATAL("Unsupported constraint kind %s at line %d", + asn1f_printable_value(ct->containedSubtype), ct->_lineno); + return -1; + } - if(ct_expr->type == ACT_CA_SET) { - unsigned int i; - for(i = 0; i < ct_expr->el_count; i++) { - if(asn1p_constraint_insert( - ct, ct_expr->elements[i])) { - asn1p_constraint_free(ct_expr); - return -1; - } else { - ct_expr->elements[i] = 0; - } - } - asn1p_constraint_free(ct_expr); - } else { - ret = asn1p_constraint_insert(ct, ct_expr); - assert(ret == 0); - } + ct_expr = asn1p_constraint_clone(ct_expr); + assert(ct_expr); + + _remove_extensions(arg, ct_expr, 0); + + if(ct_expr->type == ACT_CA_SET) { + unsigned int i; + for(i = 0; i < ct_expr->el_count; i++) { + if(asn1p_constraint_insert( + ct, ct_expr->elements[i])) { + asn1p_constraint_free(ct_expr); + return -1; + } else { + ct_expr->elements[i] = 0; + } + } + asn1p_constraint_free(ct_expr); + } else { + ret = asn1p_constraint_insert(ct, ct_expr); + assert(ret == 0); + } - ct->type = ACT_CA_SET; - asn1p_value_free(ct->containedSubtype); - ct->containedSubtype = NULL; + ct->type = ACT_CA_SET; + asn1p_value_free(ct->containedSubtype); + ct->containedSubtype = NULL; - return 0; + return 0; } static int diff --git a/libasn1parser/asn1p_y.c b/libasn1parser/asn1p_y.c index 60860afc..5f71f3f0 100644 --- a/libasn1parser/asn1p_y.c +++ b/libasn1parser/asn1p_y.c @@ -319,6 +319,8 @@ void asn1p_lexer_hack_enable_with_syntax(void); void asn1p_lexer_hack_push_encoding_control(void); #define yylineno asn1p_lineno extern int asn1p_lineno; +const char *asn1p_parse_debug_filename; +#define ASN_FILENAME asn1p_parse_debug_filename /* * Process directives as <ASN1C:RepresentAsPointer> @@ -396,7 +398,7 @@ static asn1p_module_t *currentModule; #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 88 "asn1p_y.y" +#line 90 "asn1p_y.y" { asn1p_t *a_grammar; asn1p_module_flags_e a_module_flags; @@ -432,7 +434,7 @@ typedef union YYSTYPE } tv_nametag; } /* Line 193 of yacc.c. */ -#line 436 "asn1p_y.c" +#line 438 "asn1p_y.c" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -445,7 +447,7 @@ typedef union YYSTYPE /* Line 216 of yacc.c. */ -#line 449 "asn1p_y.c" +#line 451 "asn1p_y.c" #ifdef short # undef short @@ -660,16 +662,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 9 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 812 +#define YYLAST 839 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 124 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 124 +#define YYNNTS 131 /* YYNRULES -- Number of rules. */ -#define YYNRULES 317 +#define YYNRULES 325 /* YYNRULES -- Number of states. */ -#define YYNSTATES 479 +#define YYNSTATES 489 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 @@ -746,148 +748,152 @@ static const yytype_uint16 yyprhs[] = 526, 529, 531, 533, 535, 537, 539, 542, 544, 547, 549, 551, 553, 555, 557, 559, 561, 563, 565, 567, 569, 571, 573, 575, 577, 579, 581, 583, 584, 586, - 588, 590, 595, 599, 604, 606, 608, 610, 612, 616, - 622, 624, 628, 630, 634, 636, 640, 642, 646, 651, - 655, 657, 659, 663, 667, 671, 675, 677, 679, 680, - 684, 687, 690, 692, 694, 696, 698, 700, 702, 704, - 706, 708, 710, 712, 716, 722, 724, 728, 730, 734, - 735, 737, 739, 741, 743, 745, 747, 749, 750, 756, - 759, 761, 764, 767, 771, 773, 775, 779, 784, 786, - 790, 793, 797, 799, 803, 804, 806, 808, 811, 814, - 818, 820, 824, 826, 831, 836, 838, 840, 842, 844, - 846, 848, 849, 851, 854, 859, 860, 862, 864, 866, - 867, 869, 871, 873, 875, 877, 878, 880 + 587, 589, 594, 596, 600, 605, 607, 609, 611, 613, + 615, 619, 625, 627, 631, 633, 637, 639, 643, 645, + 649, 654, 658, 660, 662, 666, 670, 674, 678, 680, + 682, 683, 687, 690, 693, 695, 697, 699, 701, 703, + 705, 707, 709, 711, 713, 715, 719, 723, 725, 727, + 729, 733, 739, 741, 745, 749, 750, 752, 754, 756, + 758, 760, 762, 764, 765, 771, 774, 776, 779, 782, + 786, 788, 790, 794, 799, 801, 805, 808, 812, 814, + 818, 819, 821, 823, 826, 829, 833, 835, 839, 841, + 846, 851, 853, 855, 857, 859, 861, 863, 864, 866, + 869, 874, 875, 877, 879, 881, 882, 884, 886, 888, + 890, 892, 893, 895, 897, 899 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int16 yyrhs[] = { 125, 0, -1, 103, 126, -1, 126, -1, 127, -1, - 126, 127, -1, -1, 244, 128, 129, 41, 133, 3, + 126, 127, -1, -1, 249, 128, 129, 41, 133, 3, 28, 136, 46, -1, -1, 130, -1, 111, 131, 112, - -1, 111, 112, -1, 132, -1, 131, 132, -1, 247, - -1, 247, 113, 12, 114, -1, 12, -1, -1, 134, + -1, 111, 112, -1, 132, -1, 131, 132, -1, 252, + -1, 252, 113, 12, 114, -1, 12, -1, -1, 134, -1, 135, -1, 134, 135, -1, 48, 91, -1, 59, 91, -1, 27, 91, -1, 50, 60, -1, 18, 64, -1, -1, 137, -1, 149, 141, 138, -1, 139, -1, 138, 139, -1, 156, -1, 186, -1, 154, -1, -1, 45, 18, 140, -1, 196, -1, -1, 142, -1, 61, 143, 115, -1, 61, 53, -1, -1, 144, -1, 146, - -1, 144, 146, -1, -1, 130, -1, 147, 53, 244, - 145, -1, 148, -1, 147, 116, 148, -1, 244, -1, - 244, 111, 112, -1, 247, -1, -1, 150, -1, 49, + -1, 144, 146, -1, -1, 130, -1, 147, 53, 249, + 145, -1, 148, -1, 147, 116, 148, -1, 249, -1, + 249, 111, 112, -1, 252, -1, -1, 150, -1, 49, 151, 115, -1, 49, 24, 115, -1, 49, 115, -1, - 152, -1, 151, 116, 152, -1, 244, -1, 244, 111, - 112, -1, 247, -1, 111, 204, 112, -1, 244, 155, + 152, -1, 151, 116, 152, -1, 249, -1, 249, 111, + 112, -1, 252, -1, 111, 205, 112, -1, 249, 155, 3, 153, -1, 195, -1, 180, -1, 180, 111, 159, - 112, -1, 244, 3, 176, -1, 244, 3, 166, -1, - 244, 111, 157, 112, 3, 176, -1, 244, 111, 157, + 112, -1, 249, 3, 176, -1, 249, 3, 166, -1, + 249, 111, 157, 112, 3, 176, -1, 249, 111, 157, 112, 3, 166, -1, 158, -1, 157, 116, 158, -1, - 244, -1, 244, 117, 247, -1, 244, 117, 244, -1, - 193, 117, 247, -1, 193, 117, 244, -1, 160, -1, - 159, 116, 160, -1, 176, -1, 189, -1, 247, -1, + 249, -1, 249, 117, 252, -1, 249, 117, 249, -1, + 193, 117, 252, -1, 193, 117, 249, -1, 160, -1, + 159, 116, 160, -1, 176, -1, 189, -1, 252, -1, 153, -1, -1, 162, -1, 163, -1, 162, 116, 163, - -1, 162, 116, 4, 162, 5, -1, 247, 176, 232, - -1, 176, 232, -1, 37, 75, 176, -1, 175, -1, - 165, -1, 164, 116, 165, -1, 247, 176, -1, 175, + -1, 162, 116, 4, 162, 5, -1, 252, 176, 237, + -1, 176, 237, -1, 37, 75, 176, -1, 175, -1, + 165, -1, 164, 116, 165, -1, 252, 176, -1, 175, -1, 176, -1, 35, 111, 168, 112, 170, -1, -1, - 95, -1, 169, -1, 168, 116, 169, -1, 19, 232, - -1, 20, 176, 167, 232, -1, 20, 184, 232, -1, - 20, 185, 232, -1, 19, 184, 232, -1, 19, 176, - 232, -1, 19, 185, 232, -1, -1, 171, -1, -1, + 95, -1, 169, -1, 168, 116, 169, -1, 19, 237, + -1, 20, 176, 167, 237, -1, 20, 184, 237, -1, + 20, 185, 237, -1, 19, 184, 237, -1, 19, 176, + 237, -1, 19, 185, 237, -1, -1, 171, -1, -1, 102, 89, 111, 172, 173, 112, -1, 174, -1, 173, 174, -1, 6, -1, 21, -1, 183, -1, 118, 173, 119, -1, 110, -1, 110, 120, 190, -1, 110, 120, - 237, -1, 239, 178, 199, -1, -1, 177, 179, -1, + 242, -1, 244, 178, 199, -1, -1, 177, 179, -1, 155, -1, 34, 111, 164, 112, -1, 85, 111, 161, - 112, -1, 86, 111, 161, 112, -1, 85, 199, 75, - 246, 239, 178, -1, 86, 199, 75, 246, 239, 178, - -1, 25, -1, 25, 42, 32, 247, -1, 63, 75, - 180, -1, 17, -1, 17, 121, 244, -1, 245, 121, - 244, -1, 17, 121, 247, -1, 245, -1, 245, 121, + 112, -1, 86, 111, 161, 112, -1, 85, 200, 75, + 251, 244, 178, -1, 86, 200, 75, 251, 244, 178, + -1, 25, -1, 25, 42, 32, 252, -1, 63, 75, + 180, -1, 17, -1, 17, 121, 249, -1, 250, 121, + 249, -1, 17, 121, 252, -1, 250, -1, 250, 121, 181, -1, 182, -1, 181, 121, 182, -1, 183, -1, 19, -1, 20, -1, 19, -1, 184, 121, 19, -1, - 184, 121, 20, -1, 18, -1, 247, 176, 3, 187, - -1, 189, -1, 190, -1, 247, 117, 187, -1, -1, + 184, 121, 20, -1, 18, -1, 252, 176, 3, 187, + -1, 189, -1, 190, -1, 252, 117, 187, -1, -1, 111, 188, 192, -1, 70, -1, 52, -1, 93, -1, - 8, -1, 10, -1, 191, -1, 237, -1, 247, -1, - 244, 121, 247, -1, 9, -1, 15, -1, 16, -1, + 8, -1, 10, -1, 191, -1, 242, -1, 252, -1, + 249, 121, 252, -1, 9, -1, 15, -1, 16, -1, 7, -1, 192, 7, -1, 31, -1, 70, -1, 83, -1, 194, -1, 74, 88, -1, 72, 58, -1, 84, -1, 51, -1, 43, 78, -1, 33, 88, -1, 98, -1, 54, -1, 196, -1, 65, -1, 47, -1, 29, - 88, -1, 193, -1, 194, 234, -1, 30, -1, 55, + 88, -1, 193, -1, 194, 239, -1, 30, -1, 55, -1, 56, -1, 57, -1, 66, -1, 71, -1, 81, -1, 90, -1, 92, -1, 97, -1, 99, -1, 100, -1, 101, -1, 73, -1, 107, -1, 108, -1, 105, - -1, 106, -1, -1, 200, -1, 201, -1, 202, -1, - 87, 113, 203, 114, -1, 113, 203, 114, -1, 202, - 113, 203, 114, -1, 204, -1, 221, -1, 110, -1, - 205, -1, 205, 116, 110, -1, 205, 116, 110, 116, - 205, -1, 206, -1, 24, 104, 209, -1, 207, -1, - 206, 197, 207, -1, 208, -1, 207, 198, 208, -1, - 209, -1, 209, 104, 209, -1, 212, 113, 204, 114, - -1, 113, 204, 114, -1, 213, -1, 215, -1, 213, - 225, 213, -1, 68, 225, 213, -1, 213, 225, 67, - -1, 68, 225, 67, -1, 216, -1, 211, -1, -1, - 111, 210, 192, -1, 77, 9, -1, 77, 247, -1, - 87, -1, 53, -1, 52, -1, 93, -1, 238, -1, - 191, -1, 214, -1, 247, -1, 8, -1, 10, -1, - 180, -1, 102, 36, 202, -1, 102, 37, 111, 217, - 112, -1, 218, -1, 217, 116, 218, -1, 110, -1, - 247, 199, 219, -1, -1, 220, -1, 80, -1, 22, - -1, 76, -1, 222, -1, 226, -1, 224, -1, -1, - 38, 32, 111, 223, 192, -1, 39, 176, -1, 109, - -1, 109, 122, -1, 122, 109, -1, 122, 109, 122, - -1, 227, -1, 228, -1, 111, 244, 112, -1, 227, - 111, 229, 112, -1, 230, -1, 229, 116, 230, -1, - 123, 231, -1, 123, 121, 231, -1, 247, -1, 231, - 121, 247, -1, -1, 233, -1, 76, -1, 40, 187, - -1, 111, 112, -1, 111, 235, 112, -1, 236, -1, - 235, 116, 236, -1, 247, -1, 247, 113, 237, 114, - -1, 247, 113, 190, 114, -1, 237, -1, 110, -1, - 12, -1, 13, -1, 237, -1, 14, -1, -1, 240, - -1, 241, 243, -1, 118, 242, 12, 119, -1, -1, - 96, -1, 26, -1, 82, -1, -1, 59, -1, 48, - -1, 17, -1, 18, -1, 18, -1, -1, 247, -1, - 11, -1 + -1, 106, -1, -1, 201, -1, -1, 201, -1, 87, + 113, 203, 114, -1, 202, -1, 113, 203, 114, -1, + 202, 113, 203, 114, -1, 204, -1, 226, -1, 205, + -1, 110, -1, 206, -1, 206, 116, 110, -1, 206, + 116, 110, 116, 206, -1, 207, -1, 24, 104, 210, + -1, 208, -1, 207, 197, 208, -1, 209, -1, 208, + 198, 209, -1, 210, -1, 210, 104, 210, -1, 213, + 113, 205, 114, -1, 113, 205, 114, -1, 214, -1, + 216, -1, 214, 230, 214, -1, 68, 230, 214, -1, + 214, 230, 67, -1, 68, 230, 67, -1, 217, -1, + 212, -1, -1, 111, 211, 192, -1, 77, 9, -1, + 77, 252, -1, 87, -1, 53, -1, 52, -1, 93, + -1, 243, -1, 191, -1, 215, -1, 252, -1, 8, + -1, 10, -1, 176, -1, 102, 36, 218, -1, 102, + 37, 219, -1, 201, -1, 220, -1, 221, -1, 111, + 222, 112, -1, 111, 110, 116, 222, 112, -1, 223, + -1, 222, 116, 223, -1, 254, 199, 224, -1, -1, + 225, -1, 80, -1, 22, -1, 76, -1, 227, -1, + 231, -1, 229, -1, -1, 38, 32, 111, 228, 192, + -1, 39, 176, -1, 109, -1, 109, 122, -1, 122, + 109, -1, 122, 109, 122, -1, 232, -1, 233, -1, + 111, 249, 112, -1, 232, 111, 234, 112, -1, 235, + -1, 234, 116, 235, -1, 123, 236, -1, 123, 121, + 236, -1, 252, -1, 236, 121, 252, -1, -1, 238, + -1, 76, -1, 40, 187, -1, 111, 112, -1, 111, + 240, 112, -1, 241, -1, 240, 116, 241, -1, 252, + -1, 252, 113, 242, 114, -1, 252, 113, 190, 114, + -1, 242, -1, 110, -1, 12, -1, 13, -1, 242, + -1, 14, -1, -1, 245, -1, 246, 248, -1, 118, + 247, 12, 119, -1, -1, 96, -1, 26, -1, 82, + -1, -1, 59, -1, 48, -1, 17, -1, 18, -1, + 18, -1, -1, 252, -1, 11, -1, 252, -1, 253, + -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 358, 358, 361, 367, 372, 389, 389, 418, 419, - 423, 426, 432, 438, 447, 451, 455, 465, 466, 475, - 478, 487, 490, 493, 496, 500, 521, 522, 531, 544, - 547, 564, 571, 585, 593, 592, 606, 619, 620, 623, - 633, 639, 640, 643, 648, 655, 656, 660, 671, 676, - 683, 689, 695, 705, 706, 718, 721, 724, 732, 737, - 744, 750, 756, 765, 768, 778, 791, 801, 821, 827, - 843, 849, 857, 866, 877, 881, 889, 897, 905, 916, - 921, 928, 931, 939, 950, 973, 974, 977, 982, 986, - 994, 1001, 1007, 1014, 1020, 1025, 1032, 1037, 1040, 1047, - 1057, 1058, 1062, 1069, 1079, 1089, 1100, 1110, 1121, 1131, - 1142, 1154, 1155, 1162, 1161, 1170, 1174, 1181, 1185, 1188, - 1192, 1198, 1206, 1215, 1227, 1251, 1258, 1277, 1280, 1286, - 1292, 1298, 1308, 1318, 1324, 1336, 1351, 1359, 1370, 1381, - 1392, 1400, 1422, 1430, 1439, 1443, 1448, 1457, 1462, 1467, - 1475, 1498, 1508, 1509, 1510, 1517, 1517, 1522, 1530, 1535, - 1540, 1545, 1550, 1553, 1559, 1570, 1588, 1592, 1597, 1605, - 1614, 1629, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, - 1638, 1639, 1640, 1641, 1648, 1649, 1650, 1654, 1660, 1673, - 1674, 1678, 1682, 1683, 1684, 1685, 1686, 1690, 1691, 1692, - 1693, 1697, 1698, 1705, 1705, 1706, 1706, 1709, 1710, 1716, - 1720, 1723, 1733, 1736, 1742, 1745, 1751, 1755, 1758, 1764, - 1775, 1776, 1782, 1783, 1789, 1790, 1797, 1798, 1804, 1812, - 1820, 1826, 1832, 1839, 1847, 1855, 1864, 1867, 1870, 1870, - 1880, 1885, 1897, 1900, 1906, 1911, 1916, 1917, 1918, 1919, - 1933, 1938, 1946, 1966, 1969, 1975, 1978, 1984, 1990, 2004, - 2005, 2009, 2012, 2015, 2023, 2024, 2025, 2030, 2029, 2041, - 2050, 2051, 2052, 2053, 2056, 2059, 2068, 2084, 2090, 2096, - 2110, 2121, 2137, 2140, 2160, 2164, 2168, 2172, 2195, 2199, - 2205, 2210, 2217, 2224, 2232, 2240, 2247, 2258, 2262, 2269, - 2270, 2301, 2302, 2306, 2313, 2319, 2320, 2321, 2322, 2326, - 2327, 2328, 2332, 2336, 2344, 2351, 2352, 2358 + 0, 367, 367, 370, 376, 381, 398, 398, 427, 428, + 432, 435, 441, 447, 456, 460, 464, 474, 475, 484, + 487, 496, 499, 502, 505, 509, 530, 531, 540, 553, + 556, 573, 580, 594, 602, 601, 615, 628, 629, 632, + 642, 648, 649, 652, 657, 664, 665, 669, 680, 685, + 692, 698, 704, 714, 715, 727, 730, 733, 741, 746, + 753, 759, 765, 774, 777, 787, 800, 810, 830, 836, + 852, 858, 866, 875, 886, 890, 898, 906, 914, 925, + 930, 937, 940, 948, 959, 982, 983, 986, 991, 995, + 1003, 1010, 1016, 1023, 1029, 1034, 1041, 1046, 1049, 1056, + 1066, 1067, 1071, 1078, 1088, 1098, 1109, 1119, 1130, 1140, + 1151, 1163, 1164, 1171, 1170, 1179, 1183, 1190, 1194, 1197, + 1201, 1207, 1215, 1224, 1236, 1260, 1267, 1286, 1289, 1295, + 1301, 1307, 1317, 1327, 1333, 1345, 1360, 1368, 1379, 1390, + 1401, 1409, 1431, 1439, 1448, 1452, 1457, 1466, 1471, 1476, + 1484, 1507, 1517, 1518, 1519, 1526, 1526, 1531, 1539, 1544, + 1549, 1554, 1559, 1562, 1568, 1579, 1597, 1601, 1606, 1614, + 1623, 1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645, 1646, + 1647, 1648, 1649, 1650, 1657, 1658, 1659, 1663, 1669, 1682, + 1683, 1687, 1691, 1692, 1693, 1694, 1695, 1699, 1700, 1701, + 1702, 1706, 1707, 1714, 1714, 1715, 1715, 1719, 1720, 1724, + 1725, 1726, 1732, 1738, 1741, 1746, 1746, 1748, 1751, 1755, + 1756, 1762, 1773, 1774, 1780, 1781, 1787, 1788, 1795, 1796, + 1802, 1810, 1818, 1824, 1830, 1837, 1845, 1853, 1862, 1863, + 1864, 1864, 1874, 1879, 1891, 1894, 1900, 1905, 1910, 1911, + 1912, 1913, 1927, 1932, 1940, 1951, 1954, 1960, 1961, 1961, + 1962, 1964, 1977, 1982, 1988, 2002, 2003, 2007, 2010, 2013, + 2021, 2022, 2023, 2028, 2027, 2039, 2048, 2049, 2050, 2051, + 2054, 2057, 2066, 2082, 2088, 2094, 2108, 2119, 2135, 2138, + 2158, 2162, 2166, 2170, 2193, 2197, 2203, 2208, 2215, 2222, + 2230, 2238, 2245, 2256, 2260, 2267, 2268, 2299, 2300, 2304, + 2311, 2317, 2318, 2319, 2320, 2324, 2325, 2326, 2330, 2334, + 2342, 2349, 2350, 2356, 2363, 2369 }; #endif @@ -946,20 +952,22 @@ static const char *const yytname[] = "ValueAssignment", "Value", "@4", "SimpleValue", "DefinedValue", "RestrictedCharacterStringValue", "Opaque", "BasicTypeId", "BasicTypeId_UniverationCompatible", "BasicType", "BasicString", - "UnionMark", "IntersectionMark", "optConstraints", "Constraint", - "SubtypeConstraint", "SetOfConstraints", "ConstraintSpecs", + "UnionMark", "IntersectionMark", "optConstraints", "optSizeConstraints", + "Constraint", "SetOfConstraints", "ConstraintSpec", "SubtypeConstraint", "ElementSetSpecs", "ElementSetSpec", "Unions", "Intersections", "IntersectionElements", "ConstraintSubtypeElement", "@5", - "PatternConstraint", "ConstraintSpec", "SingleValue", "BitStringValue", - "ContainedSubtype", "InnerTypeConstraint", "WithComponentsList", - "WithComponentsElement", "optPresenceConstraint", "PresenceConstraint", - "GeneralConstraint", "UserDefinedConstraint", "@6", "ContentsConstraint", - "ConstraintRangeSpec", "TableConstraint", "SimpleTableConstraint", - "ComponentRelationConstraint", "AtNotationList", "AtNotationElement", - "ComponentIdList", "optMarker", "Marker", "UniverationDefinition", - "UniverationList", "UniverationElement", "SignedNumber", "RealValue", - "optTag", "Tag", "TagTypeValue", "TagClass", "TagPlicit", "TypeRefName", - "ObjectClassReference", "optIdentifier", "Identifier", 0 + "PatternConstraint", "ConstraintType", "SingleValue", "BitStringValue", + "ContainedSubtype", "InnerTypeConstraint", "SingleTypeConstraint", + "MultipleTypeConstraints", "FullSpecification", "PartialSpecification", + "TypeConstraints", "NamedConstraint", "optPresenceConstraint", + "PresenceConstraint", "GeneralConstraint", "UserDefinedConstraint", "@6", + "ContentsConstraint", "ConstraintRangeSpec", "TableConstraint", + "SimpleTableConstraint", "ComponentRelationConstraint", "AtNotationList", + "AtNotationElement", "ComponentIdList", "optMarker", "Marker", + "UniverationDefinition", "UniverationList", "UniverationElement", + "SignedNumber", "RealValue", "optTag", "Tag", "TagTypeValue", "TagClass", + "TagPlicit", "TypeRefName", "ObjectClassReference", "optIdentifier", + "Identifier", "IdentifierAsReference", "IdentifierAsValue", 0 }; #endif @@ -1008,17 +1016,18 @@ static const yytype_uint8 yyr1[] = 193, 193, 193, 193, 194, 194, 194, 195, 195, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 197, 197, 198, 198, 199, 199, 200, - 201, 201, 202, 202, 203, 203, 204, 204, 204, 204, + 200, 200, 201, 202, 202, 203, 203, 204, 205, 205, 205, 205, 206, 206, 207, 207, 208, 208, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 210, 209, - 211, 211, 212, 212, 213, 213, 213, 213, 213, 213, - 214, 214, 215, 216, 216, 217, 217, 218, 218, 219, - 219, 220, 220, 220, 221, 221, 221, 223, 222, 224, - 225, 225, 225, 225, 226, 226, 227, 228, 229, 229, - 230, 230, 231, 231, 232, 232, 233, 233, 234, 234, - 235, 235, 236, 236, 236, 236, 236, 237, 237, 238, - 238, 239, 239, 240, 241, 242, 242, 242, 242, 243, - 243, 243, 244, 244, 245, 246, 246, 247 + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 211, 210, 212, 212, 213, 213, 214, 214, 214, 214, + 214, 214, 215, 215, 216, 217, 217, 218, 219, 219, + 220, 221, 222, 222, 223, 224, 224, 225, 225, 225, + 226, 226, 226, 228, 227, 229, 230, 230, 230, 230, + 231, 231, 232, 233, 234, 234, 235, 235, 236, 236, + 237, 237, 238, 238, 239, 239, 240, 240, 241, 241, + 241, 241, 241, 242, 242, 243, 243, 244, 244, 245, + 246, 247, 247, 247, 247, 248, 248, 248, 249, 249, + 250, 251, 251, 252, 253, 254 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -1044,18 +1053,19 @@ static const yytype_uint8 yyr2[] = 2, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, - 1, 4, 3, 4, 1, 1, 1, 1, 3, 5, - 1, 3, 1, 3, 1, 3, 1, 3, 4, 3, - 1, 1, 3, 3, 3, 3, 1, 1, 0, 3, - 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 5, 1, 3, 1, 3, 0, - 1, 1, 1, 1, 1, 1, 1, 0, 5, 2, - 1, 2, 2, 3, 1, 1, 3, 4, 1, 3, - 2, 3, 1, 3, 0, 1, 1, 2, 2, 3, - 1, 3, 1, 4, 4, 1, 1, 1, 1, 1, - 1, 0, 1, 2, 4, 0, 1, 1, 1, 0, - 1, 1, 1, 1, 1, 0, 1, 1 + 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, + 1, 4, 1, 3, 4, 1, 1, 1, 1, 1, + 3, 5, 1, 3, 1, 3, 1, 3, 1, 3, + 4, 3, 1, 1, 3, 3, 3, 3, 1, 1, + 0, 3, 2, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, + 3, 5, 1, 3, 3, 0, 1, 1, 1, 1, + 1, 1, 1, 0, 5, 2, 1, 2, 2, 3, + 1, 1, 3, 4, 1, 3, 2, 3, 1, 3, + 0, 1, 1, 2, 2, 3, 1, 3, 1, 4, + 4, 1, 1, 1, 1, 1, 1, 0, 1, 2, + 4, 0, 1, 1, 1, 0, 1, 1, 1, 1, + 1, 0, 1, 1, 1, 1 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -1063,8 +1073,8 @@ static const yytype_uint8 yyr2[] = means the default is an error. */ static const yytype_uint16 yydefact[] = { - 0, 312, 313, 0, 0, 3, 4, 6, 2, 1, - 5, 8, 0, 0, 9, 317, 16, 11, 0, 12, + 0, 318, 319, 0, 0, 3, 4, 6, 2, 1, + 5, 8, 0, 0, 9, 323, 16, 11, 0, 12, 14, 17, 10, 13, 0, 0, 0, 0, 0, 0, 0, 18, 19, 0, 25, 23, 21, 24, 22, 0, 20, 15, 53, 0, 0, 27, 37, 54, 0, 57, @@ -1072,45 +1082,46 @@ static const yytype_uint16 yydefact[] = 0, 0, 40, 0, 42, 43, 0, 48, 50, 52, 189, 0, 190, 191, 192, 193, 194, 202, 195, 196, 197, 198, 199, 200, 201, 28, 29, 33, 31, 32, - 36, 0, 301, 59, 61, 39, 44, 0, 0, 0, - 34, 30, 301, 136, 314, 0, 171, 0, 0, 185, + 36, 0, 307, 59, 61, 39, 44, 0, 0, 0, + 34, 30, 307, 136, 320, 0, 171, 0, 0, 185, 178, 182, 184, 172, 0, 0, 173, 177, 181, 0, - 0, 66, 187, 174, 65, 183, 140, 305, 0, 125, - 302, 309, 45, 49, 51, 35, 0, 69, 68, 0, + 0, 66, 187, 174, 65, 183, 140, 311, 0, 125, + 308, 315, 45, 49, 51, 35, 0, 69, 68, 0, 186, 180, 179, 176, 175, 0, 72, 0, 174, 74, - 0, 301, 0, 188, 0, 307, 308, 306, 0, 0, - 0, 207, 311, 310, 303, 46, 47, 0, 137, 139, - 0, 0, 0, 0, 0, 64, 160, 166, 161, 297, - 298, 167, 168, 158, 159, 84, 0, 79, 81, 82, - 162, 163, 83, 296, 288, 0, 290, 295, 292, 145, + 0, 307, 0, 188, 0, 313, 314, 312, 0, 0, + 0, 207, 317, 316, 309, 46, 47, 0, 137, 139, + 0, 0, 0, 0, 307, 64, 160, 166, 161, 303, + 304, 167, 168, 158, 159, 84, 0, 79, 81, 82, + 162, 163, 83, 302, 294, 0, 296, 301, 298, 145, 146, 141, 142, 144, 138, 0, 157, 155, 151, 152, - 153, 0, 164, 133, 0, 0, 207, 207, 127, 126, - 0, 0, 124, 208, 209, 210, 301, 301, 0, 102, - 301, 73, 78, 77, 76, 75, 250, 251, 300, 0, - 244, 243, 0, 0, 242, 245, 0, 216, 238, 0, - 252, 247, 0, 217, 220, 222, 224, 226, 237, 0, - 230, 248, 231, 236, 299, 246, 249, 67, 301, 289, - 0, 0, 0, 304, 0, 0, 0, 0, 301, 0, - 301, 0, 301, 0, 0, 0, 301, 238, 0, 214, - 215, 264, 266, 265, 274, 275, 0, 150, 147, 0, - 286, 284, 284, 284, 104, 285, 100, 284, 284, 111, - 0, 71, 70, 0, 270, 0, 0, 240, 241, 0, - 0, 0, 0, 63, 0, 203, 204, 0, 205, 206, - 0, 0, 0, 0, 80, 291, 0, 0, 164, 143, + 153, 0, 164, 133, 0, 0, 209, 209, 127, 126, + 307, 124, 208, 212, 307, 307, 0, 102, 307, 73, + 78, 77, 76, 75, 252, 253, 306, 0, 246, 245, + 0, 0, 244, 247, 0, 218, 240, 307, 254, 249, + 0, 219, 222, 224, 226, 228, 239, 0, 232, 250, + 233, 238, 305, 248, 251, 67, 307, 295, 0, 0, + 0, 310, 0, 0, 0, 0, 307, 0, 0, 307, + 0, 210, 307, 0, 0, 307, 240, 0, 215, 217, + 216, 270, 272, 271, 280, 281, 307, 150, 147, 0, + 292, 290, 290, 290, 104, 291, 100, 290, 290, 111, + 0, 71, 70, 307, 276, 0, 0, 242, 243, 0, + 0, 0, 0, 63, 0, 203, 204, 307, 205, 206, + 307, 307, 307, 0, 80, 297, 0, 0, 164, 143, 169, 156, 165, 154, 0, 121, 0, 94, 97, 98, - 301, 135, 0, 0, 86, 87, 93, 284, 301, 315, - 0, 315, 0, 0, 269, 0, 212, 0, 0, 287, - 109, 0, 108, 110, 101, 284, 106, 107, 0, 99, - 112, 103, 221, 271, 272, 235, 233, 253, 0, 239, - 229, 218, 223, 225, 227, 0, 234, 232, 294, 293, - 170, 134, 0, 128, 301, 96, 301, 129, 301, 91, - 284, 301, 316, 130, 301, 211, 267, 276, 0, 0, - 278, 213, 148, 149, 105, 0, 273, 257, 0, 255, - 207, 0, 228, 122, 123, 95, 92, 301, 88, 90, - 125, 125, 0, 0, 280, 282, 277, 0, 113, 254, - 0, 259, 219, 0, 131, 132, 268, 281, 0, 279, - 0, 256, 262, 263, 261, 258, 260, 89, 283, 117, - 118, 0, 0, 115, 119, 0, 114, 116, 120 + 307, 135, 307, 0, 0, 86, 87, 93, 290, 307, + 321, 0, 321, 0, 275, 0, 213, 0, 0, 293, + 109, 0, 108, 110, 101, 290, 106, 107, 0, 99, + 112, 103, 223, 277, 278, 237, 235, 257, 255, 0, + 256, 258, 259, 241, 231, 220, 225, 227, 229, 0, + 236, 234, 300, 299, 170, 134, 0, 128, 307, 96, + 0, 307, 129, 307, 91, 290, 307, 322, 130, 307, + 273, 282, 0, 0, 284, 214, 148, 149, 105, 0, + 279, 0, 0, 262, 324, 325, 207, 307, 230, 122, + 123, 95, 211, 92, 307, 88, 90, 125, 125, 0, + 0, 286, 288, 283, 0, 113, 0, 260, 0, 265, + 221, 0, 131, 132, 274, 287, 0, 285, 0, 0, + 263, 268, 269, 267, 264, 266, 89, 289, 117, 118, + 0, 0, 115, 119, 261, 0, 114, 116, 120 }; /* YYDEFGOTO[NTERM-NUM]. */ @@ -1119,320 +1130,328 @@ static const yytype_int16 yydefgoto[] = -1, 4, 5, 6, 11, 13, 14, 18, 19, 30, 31, 32, 44, 45, 85, 86, 135, 56, 57, 63, 64, 166, 65, 66, 67, 46, 47, 50, 51, 185, - 87, 120, 88, 145, 146, 186, 187, 353, 354, 355, - 346, 347, 137, 375, 228, 229, 379, 380, 460, 472, - 473, 356, 357, 160, 161, 219, 250, 201, 202, 474, - 302, 303, 89, 208, 274, 209, 210, 251, 341, 122, - 123, 124, 125, 327, 330, 222, 223, 224, 225, 288, - 289, 253, 254, 255, 256, 257, 321, 258, 259, 260, - 261, 262, 263, 428, 429, 465, 466, 290, 291, 442, - 292, 316, 293, 294, 295, 419, 420, 444, 304, 305, - 153, 195, 196, 264, 265, 129, 130, 131, 158, 164, - 211, 126, 411, 266 + 87, 120, 88, 145, 146, 186, 187, 354, 355, 356, + 346, 347, 137, 375, 226, 227, 379, 380, 468, 481, + 482, 357, 248, 160, 161, 219, 121, 201, 202, 483, + 302, 303, 89, 208, 272, 209, 210, 249, 341, 122, + 123, 124, 125, 327, 330, 221, 280, 222, 223, 287, + 288, 289, 251, 252, 253, 254, 255, 321, 256, 257, + 258, 259, 260, 261, 388, 390, 391, 392, 432, 433, + 474, 475, 290, 291, 449, 292, 316, 293, 294, 295, + 423, 424, 451, 304, 305, 153, 195, 196, 262, 263, + 129, 130, 131, 158, 164, 211, 126, 416, 264, 435, + 436 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -312 +#define YYPACT_NINF -320 static const yytype_int16 yypact[] = { - 97, -312, -312, 275, 72, 275, -312, -312, 275, -312, - -312, 1, 39, 62, -312, -312, -312, -312, 83, -312, - 51, 343, -312, -312, 159, 134, 144, 169, 154, 174, - 247, 343, -312, 171, -312, -312, -312, -312, -312, 245, - -312, -312, 187, 52, 237, -312, 240, -312, 191, -312, - 2, -312, 202, -312, -312, 185, 558, -312, -312, -312, - 228, 208, -312, 211, 228, -312, -8, -312, 258, -312, - -312, 357, -312, -312, -312, -312, -312, -312, -312, -312, - -312, -312, -312, -312, -312, 558, -312, -312, -312, -312, - -312, 224, 230, -312, -312, -312, -312, 275, 228, 265, - -312, -312, -11, 262, -312, 290, -312, 291, 306, -312, - -312, -312, -312, -312, 327, 298, -312, -312, -312, 711, - 384, 277, -312, 278, -312, -312, 279, 155, 395, -312, - -312, 181, 1, -312, -312, -312, 288, -312, -312, 228, - -312, -312, -312, -312, -312, -75, -312, 284, -312, 286, - 293, 69, 80, -312, 292, -312, -312, -312, 393, 584, - 635, 104, -312, -312, -312, -312, -312, 299, -312, -312, - 404, 711, 228, 228, 448, -312, -312, -312, -312, -312, - -312, -312, -312, -312, -312, -312, 100, -312, -312, -312, - -312, -312, -312, -312, -312, 118, -312, -312, 295, -312, - -312, 296, -312, -312, -312, 297, -312, -312, -312, -312, - -312, 300, 301, 367, 302, 336, 98, 161, -312, -312, - 307, 342, -312, -312, -312, 309, 92, 47, 131, -312, - -11, -312, -312, -312, -312, -312, -312, -312, -312, 308, - -312, -312, -13, 173, -312, -312, 294, -312, -312, 448, - -312, -312, 303, 310, 229, 257, -312, 320, -312, 314, - -13, -312, -312, -312, -312, -312, -312, -312, 69, -312, - 45, 316, 345, -312, 407, 417, 584, 398, 6, 350, - 76, 358, 76, 359, 342, 400, 230, 275, 322, -312, - -312, -312, -312, -312, 326, -312, 342, -312, -312, 584, - -312, 129, 123, 129, -312, -312, 344, 123, 129, 338, - 299, -312, -312, 496, 319, 333, 210, -312, -312, 332, - 337, 407, 329, -312, 339, -312, -312, 496, -312, -312, - 496, 496, 448, 330, -312, -312, 340, 353, -312, -312, - -312, 440, -312, -312, 417, 331, 170, -312, -312, -312, - 230, -312, 375, 356, 354, -312, -312, 129, 230, 417, - 361, 417, 355, 360, -312, 362, -312, 365, 376, -312, - -312, 352, -312, -312, -312, 129, -312, -312, 386, -312, - -312, -312, -312, -312, 369, -312, -312, 309, 19, 440, - -312, 373, 257, -312, -312, 378, -312, -312, -312, -312, - -312, -312, 316, -312, 6, -312, 230, -312, 38, -312, - 129, 230, -312, -312, 230, -312, -312, -312, 9, 172, - -312, -312, -312, -312, -312, 383, -312, -312, 188, -312, - 104, 469, -312, -312, -312, -312, -312, 60, -312, -312, - -312, -312, 407, 417, 374, -312, -312, 365, -312, -312, - 19, 152, -312, 41, -312, -312, 440, 374, 417, -312, - 15, -312, -312, -312, -312, -312, -312, -312, -312, -312, - -312, 15, 8, -312, -312, 34, -312, -312, -312 + 70, -320, -320, 95, 24, 95, -320, -320, 95, -320, + -320, -81, 46, 4, -320, -320, -320, -320, 64, -320, + -52, 199, -320, -320, 93, 86, 68, 74, 149, 123, + 224, 199, -320, 159, -320, -320, -320, -320, -320, 214, + -320, -320, 246, 72, 202, -320, 222, -320, 138, -320, + 150, -320, 180, -320, -320, 92, 585, -320, -320, -320, + 207, 209, -320, 220, 207, -320, 53, -320, 231, -320, + -320, 301, -320, -320, -320, -320, -320, -320, -320, -320, + -320, -320, -320, -320, -320, 585, -320, -320, -320, -320, + -320, 535, 226, -320, -320, -320, -320, 95, 207, 233, + -320, -320, -16, 228, -320, 258, -320, 259, 273, -320, + -320, -320, -320, -320, 294, 266, -320, -320, -320, 738, + 361, 254, -320, 255, -320, -320, 248, 90, 367, -320, + -320, 164, -81, -320, -320, -320, 261, -320, -320, 207, + -320, -320, -320, -320, -320, 77, -320, 256, -320, 257, + 264, 225, 80, -320, 280, -320, -320, -320, 364, 469, + 662, 265, -320, -320, -320, -320, -320, 252, -320, -320, + 376, 738, 207, 207, 315, -320, -320, -320, -320, -320, + -320, -320, -320, -320, -320, -320, 99, -320, -320, -320, + -320, -320, -320, -320, -320, 116, -320, -320, 267, -320, + -320, 260, -320, -320, -320, 268, -320, -320, -320, -320, + -320, 269, 272, 340, 274, 309, 108, 109, -320, -320, + 192, -320, -320, 275, 134, 62, 127, -320, -16, -320, + -320, -320, -320, -320, -320, -320, -320, 282, -320, -320, + 29, 188, -320, -320, 271, -320, -320, 315, -320, -320, + 279, 277, 204, 208, -320, 291, -320, 284, 29, -320, + -320, -320, -320, -320, -320, -320, 225, -320, 88, 263, + 314, -320, 391, 392, 469, 372, 60, 298, 292, 45, + 331, -320, 45, 332, 377, 226, 95, 297, -320, -320, + -320, -320, -320, -320, 302, -320, 192, -320, -320, 469, + -320, 39, -17, 39, -320, -320, 317, -17, 39, 312, + 252, -320, -320, 458, 299, 307, 480, -320, -320, 265, + 308, 391, 304, -320, 310, -320, -320, 458, -320, -320, + 458, 458, 315, 490, -320, -320, 313, 316, -320, -320, + -320, 415, -320, -320, 392, 303, 139, -320, -320, -320, + 226, -320, 192, 354, 319, 320, -320, -320, 39, 226, + 392, 323, 392, 326, -320, 327, -320, 322, 328, -320, + -320, 318, -320, -320, -320, 39, -320, -320, 352, -320, + -320, -320, -320, -320, 321, -320, -320, -320, -320, 67, + -320, -320, -320, 415, -320, 334, 208, -320, -320, 333, + -320, -320, -320, -320, -320, -320, 263, -320, 60, -320, + 337, 226, -320, 18, -320, 39, 226, -320, -320, 226, + -320, -320, 23, 166, -320, -320, -320, -320, -320, 341, + -320, 339, 172, -320, -320, -320, 265, 347, -320, -320, + -320, -320, -320, -320, 61, -320, -320, -320, -320, 391, + 392, 335, -320, -320, 322, -320, 392, -320, 392, 41, + -320, 16, -320, -320, 415, 335, 392, -320, 30, 174, + -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, + 30, 6, -320, -320, -320, 48, -320, -320, -320 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -312, -312, 473, 117, -312, -312, 364, -312, 479, -312, - -312, 467, -312, -312, -312, 414, -312, -312, -312, -312, - -312, -312, 438, -312, 405, -312, -312, -312, 455, 368, - -312, 363, -312, -312, 346, -312, 251, 238, 87, 119, - -312, 122, 304, -312, -312, 218, -312, -312, -312, 58, - -223, -255, -89, -312, -67, -312, -86, -312, 259, -138, - 305, 311, -312, -93, -312, -133, -256, -140, -311, -81, - -52, -312, -24, -312, -312, -215, -312, -312, 214, -83, - -166, 99, -312, 209, 212, -225, -312, -312, -312, -294, - -312, -312, -312, -312, 89, -312, -312, -312, -312, -312, - -312, 280, -312, -312, -312, -312, 96, 101, -203, -312, - -312, -312, 281, -126, -312, -112, -312, -312, -312, -312, - 4, -312, 184, -12 + -320, -320, 445, 296, -320, -320, 325, -320, 435, -320, + -320, 428, -320, -320, -320, 378, -320, -320, -320, -320, + -320, -320, 397, -320, 366, -320, -320, -320, 402, 357, + -320, 348, -320, -320, 305, -320, 217, 193, 65, 84, + -320, 104, 285, -320, -320, 205, -320, -320, -320, 34, + -192, -262, -91, -320, -107, -320, 239, -320, 247, -151, + 293, 295, -320, -237, -320, -144, -264, -131, -319, -87, + -86, -320, 128, -320, -320, 83, 306, -178, -320, -232, + -320, -170, 85, -320, 197, 195, -296, -320, -320, -320, + -222, -320, -320, -320, -320, -320, -320, -320, 71, 73, + -320, -320, -320, -320, -320, -320, 270, -320, -320, -320, + -320, 75, 87, -261, -320, -320, -320, 262, -143, -320, + -110, -320, -320, -320, -320, 10, -320, 171, -12, -320, + -320 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -285 +#define YYTABLE_NINF -291 static const yytype_int16 yytable[] = { - 20, 281, 283, 128, 7, 121, 20, 7, 252, 7, - 389, 190, 7, 138, 469, 336, 203, 15, 189, 190, - 15, 469, 386, 348, 136, 191, 197, 199, 200, 470, - 15, 53, 90, 191, 199, 200, 470, 170, 147, 397, - 469, 171, 437, 69, 92, 97, 467, 52, 53, 15, - 15, 16, 69, 199, 200, 470, 15, 179, 180, 68, - 91, 90, 188, 15, 52, 297, 298, 148, 68, 1, - 2, 15, 9, 92, 121, 352, 48, 176, 177, 178, - 15, 179, 180, 322, 181, 182, 69, 15, 382, 91, - 147, 15, 179, 180, 15, 16, 314, 352, 370, 372, - 373, 132, 68, 21, 376, 377, 394, 127, 98, 315, - 297, 298, 12, 352, 1, 2, 345, 59, 60, 148, - 476, 183, 10, 149, 127, 10, 471, 169, 190, 427, - 443, 456, 299, 471, 203, 189, 190, 301, 306, 192, - 198, 312, 191, 168, 197, 337, 433, 212, 345, 348, - 191, 17, 471, 478, 409, 193, 127, 408, 204, 190, - 233, 235, 184, 299, 24, 127, 395, 49, 300, 299, - 345, 33, 424, 191, 462, 149, 232, 234, 127, 188, - 174, 155, 317, 343, 15, 220, 345, 127, -85, 349, - 193, 220, 194, 351, 127, 22, 15, 364, 34, 300, - 3, 362, 1, 2, -284, 300, 369, 439, -284, 280, - 127, 221, 267, 368, 37, 451, 268, 221, 236, 177, - 237, 15, 179, 180, 238, 181, 182, 102, 463, 162, - 269, 318, 464, -26, 270, 35, 43, 156, 62, 15, - 163, 103, 104, 309, 371, 1, 2, 310, 220, 477, - 39, 157, 477, 105, 70, 106, 192, 107, 198, 338, - 36, 405, 240, 342, 212, 38, 350, 108, 358, 410, - 358, 109, 282, 42, 221, 110, 434, 385, 111, 72, - 73, 74, 403, 54, 446, 41, 404, 212, 447, 112, - 75, 365, 1, 2, 113, 76, 114, 77, 115, 440, - 449, 55, 441, 245, 450, 78, 58, 116, 117, 1, - 2, 199, 200, 61, 79, 349, 80, 436, 226, 227, - 94, 81, 118, 82, 83, 84, 95, 15, 179, 180, - 319, 320, 401, 1, 2, 119, 325, 326, 236, 177, - 237, 15, 179, 180, 238, 181, 182, 412, 127, 412, - 236, 177, 237, 15, 179, 180, 238, 181, 182, 103, - 104, 25, 328, 329, 199, 200, 239, 103, 104, 99, - 26, 422, 423, 454, 455, 100, 430, 134, 140, 141, - 285, 286, 240, 139, 142, 143, 144, 150, 151, 152, - 338, 27, 350, 28, 240, 241, 358, 396, 159, 167, - 154, 172, 29, 173, 174, 205, 445, 230, 271, 277, - 242, 279, 313, 278, 340, 323, 273, 272, 276, 243, - 284, 275, 296, 245, 331, 358, 324, 332, 15, 244, - 344, 445, 363, 359, 361, 245, 366, 367, 430, 374, - 378, 383, 384, 390, 246, 221, 468, 400, 388, 391, - 406, 402, 247, 287, 398, 249, 236, 177, 237, 15, - 179, 180, 238, 181, 182, 103, 104, 399, 407, 415, - 408, 416, 239, 413, 417, 425, 8, 236, 177, 237, - 15, 179, 180, 238, 181, 182, 103, 104, 418, 431, - 421, 426, 432, 239, 448, 458, 165, 23, 40, 101, - 240, 241, 96, 133, 236, 177, 237, 15, 179, 180, - 238, 181, 182, 103, 104, 93, 242, 231, 175, 334, - 360, 240, 241, 218, 453, 243, 435, 438, 381, 475, - 452, 339, 307, 387, 311, 244, 392, 242, 308, 461, - 333, 245, 393, 459, 457, 414, 243, 0, 240, 241, - 246, 335, 0, 0, 0, 0, 244, 0, 247, 248, - 0, 249, 245, 0, 242, 0, 0, 0, 0, 15, - 0, 246, 0, 243, 0, 1, 2, 0, 0, 0, - 248, 0, 249, 244, 0, 0, 0, 0, 70, 245, - 0, 0, 176, 177, 178, 15, 179, 180, 246, 181, - 182, 1, 2, 71, 0, 0, 0, 248, 0, 249, - 0, 0, 0, 72, 73, 74, 0, 0, 0, 0, - 0, 0, 0, 0, 75, 0, 0, 0, 0, 76, - 0, 77, 0, 0, 0, 0, 183, 0, 0, 78, - 0, 0, 0, 0, 0, 0, 0, 0, 79, 0, - 80, 0, 103, 104, 206, 81, 0, 82, 83, 84, - 213, 0, 0, 0, 105, 70, 106, 0, 107, 214, - 0, 0, 0, 0, 0, 0, 0, 184, 108, 0, - 0, 0, 109, 0, 0, 0, 110, 0, 0, 111, - 72, 73, 74, 0, 0, 207, 0, 0, 215, 0, - 112, 75, 0, 0, 0, 113, 76, 114, 77, 115, - 0, 0, 0, 0, 0, 0, 78, 0, 116, 117, - 216, 217, 0, 0, 0, 79, 0, 80, 1, 2, - 0, 0, 81, 118, 82, 83, 84, 0, 0, 0, - 105, 70, 106, 0, 107, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 108, 0, 0, 0, 109, 0, - 0, 0, 110, 0, 0, 111, 72, 73, 74, 0, - 0, 0, 0, 0, 0, 0, 112, 75, 0, 0, - 0, 113, 76, 114, 77, 115, 0, 0, 0, 0, - 0, 0, 78, 0, 116, 117, 0, 0, 0, 0, - 0, 79, 0, 80, 0, 0, 0, 0, 81, 118, - 82, 83, 84 + 20, 128, 393, 203, 250, 336, 20, 189, 191, 197, + 7, 138, 478, 7, 348, 7, 191, 382, 7, 136, + 190, 476, 444, 299, 9, 199, 200, 479, 190, 15, + 12, 53, 147, 148, 15, 398, 478, 343, 281, 281, + 370, 372, 373, 69, 92, 21, 376, 377, 53, 199, + 200, 479, 69, 52, 478, 353, 15, 15, 16, 300, + 188, 24, 369, 471, 368, 68, 91, 199, 200, 479, + 52, 15, 15, 92, 68, 15, 16, 322, 15, 299, + 297, 298, 353, 15, 147, 148, 69, 1, 2, 1, + 2, 15, 179, 180, 386, 91, 48, 414, 353, 15, + 179, 180, 127, 15, 371, 33, 97, 132, 68, 1, + 2, 401, 1, 2, 428, 300, 155, 472, 486, 203, + 410, 473, 189, 191, 480, 197, 337, 169, 345, 149, + 464, 191, 413, 301, 306, 190, 127, 312, 314, 192, + 198, 387, 439, 190, 450, 62, 348, 212, 480, 168, + 34, 315, 297, 298, 446, 345, 191, -85, 17, 35, + 231, 233, 399, 127, 204, 36, 480, 488, 190, 98, + 345, 345, 156, 3, 299, 188, 22, 431, 127, 127, + 127, 149, 230, 232, 90, 349, 157, 49, 358, 170, + 193, 358, 194, 171, 364, 278, 278, 317, 193, 15, + 234, 177, 235, 15, 179, 180, 236, 181, 182, 37, + 300, 265, 162, 90, 38, 266, 237, 25, 15, 279, + 282, 220, 220, 163, 1, 2, 26, 39, 267, 318, + 284, 285, 268, 176, 177, 178, 15, 179, 180, 309, + 181, 182, 42, 310, 238, 239, -290, 27, 54, 28, + -290, 407, 127, 58, 192, 408, 198, 338, 29, 409, + 240, 342, 212, 440, 350, 59, 60, 359, 415, 241, + 359, 224, 225, 41, 15, 179, 180, 183, 453, 242, + 1, 2, 454, 55, 457, 243, 484, 212, 458, 487, + 458, 61, -26, 487, 244, 43, 365, 1, 2, 199, + 200, 10, 245, 286, 10, 247, 447, 319, 320, 448, + 127, 325, 326, 328, 329, 103, 104, 349, 184, 100, + 443, 94, 358, 234, 177, 235, 15, 179, 180, 236, + 181, 182, 405, 199, 200, 95, 174, 426, 427, 237, + 462, 463, 99, 127, 127, 134, 140, 141, 417, 139, + 417, 142, 143, 358, 144, 234, 177, 235, 15, 179, + 180, 236, 181, 182, 150, 151, 152, 238, 239, 154, + 159, 237, 167, 172, 173, 174, 205, 434, 220, 228, + 269, 270, 275, 240, 277, 276, 313, 271, 296, 274, + 273, 323, 241, 324, 338, 331, 350, 332, 340, 238, + 239, 359, 242, 15, 344, 352, 360, 362, 243, 363, + 452, 366, 374, 367, 378, 240, 384, 244, 394, 389, + 395, 383, 404, 406, 241, 245, 246, 402, 247, 411, + 403, 412, 359, 127, 242, 418, 413, 420, 452, 421, + 243, 429, 425, 430, 434, 422, 434, 438, 8, 244, + 437, 442, 455, 23, 477, 456, 466, 165, 246, 40, + 247, 96, 93, 101, 133, 127, 234, 177, 235, 15, + 179, 180, 236, 181, 182, 361, 229, 176, 177, 178, + 15, 179, 180, 334, 181, 182, 1, 2, 234, 177, + 235, 15, 179, 180, 236, 181, 182, 445, 234, 177, + 235, 15, 179, 180, 236, 181, 182, 175, 218, 461, + 238, 239, 441, 311, 485, 381, 351, 339, 307, 459, + 308, 183, 460, 283, 396, 397, 240, 469, 333, 467, + 335, 470, 238, 419, 0, 241, 0, 465, 102, 206, + 0, 0, 238, 0, 0, 242, 0, 385, 0, 0, + 0, 243, 103, 104, 0, 0, 0, 400, 0, 0, + 244, 0, 184, 0, 105, 70, 106, 0, 107, 246, + 0, 247, 0, 243, 0, 0, 127, 0, 108, 0, + 207, 0, 109, 243, 0, 0, 110, 0, 0, 111, + 72, 73, 74, 0, 0, 0, 15, 0, 0, 0, + 112, 75, 1, 2, 0, 113, 76, 114, 77, 115, + 0, 0, 0, 0, 0, 70, 78, 0, 116, 117, + 0, 0, 0, 0, 0, 79, 0, 80, 0, 0, + 71, 0, 81, 118, 82, 83, 84, 0, 0, 0, + 72, 73, 74, 0, 0, 0, 119, 0, 0, 0, + 0, 75, 0, 0, 0, 0, 76, 0, 77, 0, + 0, 0, 0, 0, 0, 0, 78, 0, 0, 0, + 0, 0, 0, 0, 0, 79, 0, 80, 0, 103, + 104, 0, 81, 0, 82, 83, 84, 213, 0, 0, + 0, 105, 70, 106, 0, 107, 214, 0, 0, 0, + 0, 0, 0, 0, 0, 108, 0, 0, 0, 109, + 0, 0, 0, 110, 0, 0, 111, 72, 73, 74, + 0, 0, 0, 0, 0, 215, 0, 112, 75, 0, + 0, 0, 113, 76, 114, 77, 115, 0, 0, 0, + 0, 0, 0, 78, 0, 116, 117, 216, 217, 0, + 0, 0, 79, 0, 80, 1, 2, 0, 0, 81, + 118, 82, 83, 84, 0, 0, 0, 105, 70, 106, + 0, 107, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 108, 0, 0, 0, 109, 0, 0, 0, 110, + 0, 0, 111, 72, 73, 74, 0, 0, 0, 0, + 0, 0, 0, 112, 75, 0, 0, 0, 113, 76, + 114, 77, 115, 0, 0, 0, 0, 0, 0, 78, + 0, 116, 117, 0, 0, 0, 0, 0, 79, 0, + 80, 0, 0, 0, 0, 81, 118, 82, 83, 84 }; static const yytype_int16 yycheck[] = { - 12, 216, 217, 92, 0, 91, 18, 3, 174, 5, - 321, 151, 8, 102, 6, 271, 154, 11, 151, 159, - 11, 6, 316, 278, 35, 151, 152, 19, 20, 21, - 11, 43, 56, 159, 19, 20, 21, 112, 119, 333, - 6, 116, 4, 55, 56, 53, 5, 43, 60, 11, - 11, 12, 64, 19, 20, 21, 11, 12, 13, 55, - 56, 85, 151, 11, 60, 18, 19, 119, 64, 17, - 18, 11, 0, 85, 160, 37, 24, 8, 9, 10, - 11, 12, 13, 249, 15, 16, 98, 11, 313, 85, - 171, 11, 12, 13, 11, 12, 109, 37, 301, 302, - 303, 97, 98, 41, 307, 308, 331, 118, 116, 122, - 18, 19, 111, 37, 17, 18, 110, 115, 116, 171, - 112, 52, 5, 119, 118, 8, 118, 139, 268, 110, - 121, 442, 40, 118, 272, 268, 276, 226, 227, 151, - 152, 230, 268, 139, 270, 271, 402, 159, 110, 404, - 276, 112, 118, 119, 357, 110, 118, 116, 154, 299, - 172, 173, 93, 40, 113, 118, 332, 115, 76, 40, - 110, 12, 375, 299, 22, 171, 172, 173, 118, 268, - 111, 26, 9, 276, 11, 87, 110, 118, 112, 278, - 110, 87, 112, 279, 118, 112, 11, 286, 64, 76, - 103, 284, 17, 18, 112, 76, 299, 410, 116, 111, - 118, 113, 112, 296, 60, 430, 116, 113, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 3, 76, 48, - 112, 243, 80, 46, 116, 91, 49, 82, 53, 11, - 59, 17, 18, 112, 121, 17, 18, 116, 87, 472, - 3, 96, 475, 29, 30, 31, 268, 33, 270, 271, - 91, 350, 52, 275, 276, 91, 278, 43, 280, 358, - 282, 47, 111, 28, 113, 51, 402, 67, 54, 55, - 56, 57, 112, 46, 112, 114, 116, 299, 116, 65, - 66, 287, 17, 18, 70, 71, 72, 73, 74, 411, - 112, 61, 414, 93, 116, 81, 115, 83, 84, 17, - 18, 19, 20, 111, 90, 404, 92, 406, 19, 20, - 112, 97, 98, 99, 100, 101, 115, 11, 12, 13, - 36, 37, 344, 17, 18, 111, 107, 108, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 359, 118, 361, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 18, 105, 106, 19, 20, 24, 17, 18, 111, - 27, 19, 20, 440, 441, 18, 388, 112, 88, 88, - 38, 39, 52, 121, 78, 58, 88, 3, 111, 111, - 402, 48, 404, 50, 52, 53, 408, 67, 3, 111, - 121, 117, 59, 117, 111, 12, 418, 3, 113, 42, - 68, 75, 104, 111, 7, 112, 119, 121, 117, 77, - 113, 121, 113, 93, 104, 437, 116, 113, 11, 87, - 32, 443, 32, 75, 75, 93, 114, 111, 450, 95, - 102, 122, 109, 114, 102, 113, 458, 7, 111, 110, - 75, 120, 110, 111, 114, 113, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 114, 112, 114, - 116, 111, 24, 112, 112, 89, 3, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 123, 116, - 114, 122, 114, 24, 111, 121, 132, 18, 31, 85, - 52, 53, 64, 98, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 60, 68, 171, 150, 268, - 282, 52, 53, 160, 437, 77, 404, 408, 310, 471, - 431, 272, 227, 319, 230, 87, 327, 68, 227, 450, - 260, 93, 330, 447, 443, 361, 77, -1, 52, 53, - 102, 270, -1, -1, -1, -1, 87, -1, 110, 111, - -1, 113, 93, -1, 68, -1, -1, -1, -1, 11, - -1, 102, -1, 77, -1, 17, 18, -1, -1, -1, - 111, -1, 113, 87, -1, -1, -1, -1, 30, 93, - -1, -1, 8, 9, 10, 11, 12, 13, 102, 15, - 16, 17, 18, 45, -1, -1, -1, 111, -1, 113, - -1, -1, -1, 55, 56, 57, -1, -1, -1, -1, - -1, -1, -1, -1, 66, -1, -1, -1, -1, 71, - -1, 73, -1, -1, -1, -1, 52, -1, -1, 81, - -1, -1, -1, -1, -1, -1, -1, -1, 90, -1, - 92, -1, 17, 18, 70, 97, -1, 99, 100, 101, - 25, -1, -1, -1, 29, 30, 31, -1, 33, 34, - -1, -1, -1, -1, -1, -1, -1, 93, 43, -1, - -1, -1, 47, -1, -1, -1, 51, -1, -1, 54, - 55, 56, 57, -1, -1, 111, -1, -1, 63, -1, - 65, 66, -1, -1, -1, 70, 71, 72, 73, 74, - -1, -1, -1, -1, -1, -1, 81, -1, 83, 84, - 85, 86, -1, -1, -1, 90, -1, 92, 17, 18, - -1, -1, 97, 98, 99, 100, 101, -1, -1, -1, - 29, 30, 31, -1, 33, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 43, -1, -1, -1, 47, -1, - -1, -1, 51, -1, -1, 54, 55, 56, 57, -1, - -1, -1, -1, -1, -1, -1, 65, 66, -1, -1, - -1, 70, 71, 72, 73, 74, -1, -1, -1, -1, - -1, -1, 81, -1, 83, 84, -1, -1, -1, -1, - -1, 90, -1, 92, -1, -1, -1, -1, 97, 98, - 99, 100, 101 + 12, 92, 321, 154, 174, 269, 18, 151, 151, 152, + 0, 102, 6, 3, 276, 5, 159, 313, 8, 35, + 151, 5, 4, 40, 0, 19, 20, 21, 159, 11, + 111, 43, 119, 119, 11, 331, 6, 274, 216, 217, + 301, 302, 303, 55, 56, 41, 307, 308, 60, 19, + 20, 21, 64, 43, 6, 37, 11, 11, 12, 76, + 151, 113, 299, 22, 296, 55, 56, 19, 20, 21, + 60, 11, 11, 85, 64, 11, 12, 247, 11, 40, + 18, 19, 37, 11, 171, 171, 98, 17, 18, 17, + 18, 11, 12, 13, 316, 85, 24, 358, 37, 11, + 12, 13, 118, 11, 121, 12, 53, 97, 98, 17, + 18, 333, 17, 18, 375, 76, 26, 76, 112, 270, + 352, 80, 266, 266, 118, 268, 269, 139, 110, 119, + 449, 274, 116, 224, 225, 266, 118, 228, 109, 151, + 152, 319, 406, 274, 121, 53, 408, 159, 118, 139, + 64, 122, 18, 19, 415, 110, 299, 112, 112, 91, + 172, 173, 332, 118, 154, 91, 118, 119, 299, 116, + 110, 110, 82, 103, 40, 266, 112, 110, 118, 118, + 118, 171, 172, 173, 56, 276, 96, 115, 279, 112, + 110, 282, 112, 116, 285, 87, 87, 9, 110, 11, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 60, + 76, 112, 48, 85, 91, 116, 24, 18, 11, 111, + 111, 113, 113, 59, 17, 18, 27, 3, 112, 241, + 38, 39, 116, 8, 9, 10, 11, 12, 13, 112, + 15, 16, 28, 116, 52, 53, 112, 48, 46, 50, + 116, 112, 118, 115, 266, 116, 268, 269, 59, 350, + 68, 273, 274, 406, 276, 115, 116, 279, 359, 77, + 282, 19, 20, 114, 11, 12, 13, 52, 112, 87, + 17, 18, 116, 61, 112, 93, 112, 299, 116, 481, + 116, 111, 46, 485, 102, 49, 286, 17, 18, 19, + 20, 5, 110, 111, 8, 113, 416, 36, 37, 419, + 118, 107, 108, 105, 106, 17, 18, 408, 93, 18, + 411, 112, 413, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 344, 19, 20, 115, 111, 19, 20, 24, + 447, 448, 111, 118, 118, 112, 88, 88, 360, 121, + 362, 78, 58, 444, 88, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 3, 111, 111, 52, 53, 121, + 3, 24, 111, 117, 117, 111, 12, 389, 113, 3, + 113, 121, 42, 68, 75, 111, 104, 119, 113, 117, + 121, 112, 77, 116, 406, 104, 408, 113, 7, 52, + 53, 413, 87, 11, 32, 113, 75, 75, 93, 32, + 422, 114, 95, 111, 102, 68, 109, 102, 114, 111, + 110, 122, 7, 120, 77, 110, 111, 114, 113, 75, + 114, 112, 444, 118, 87, 112, 116, 111, 450, 112, + 93, 89, 114, 122, 456, 123, 458, 114, 3, 102, + 116, 114, 111, 18, 466, 116, 121, 132, 111, 31, + 113, 64, 60, 85, 98, 118, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 282, 171, 8, 9, 10, + 11, 12, 13, 266, 15, 16, 17, 18, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 413, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 150, 160, 444, + 52, 53, 408, 228, 480, 310, 277, 270, 225, 436, + 225, 52, 437, 217, 327, 330, 68, 456, 258, 454, + 268, 458, 52, 362, -1, 77, -1, 450, 3, 70, + -1, -1, 52, -1, -1, 87, -1, 67, -1, -1, + -1, 93, 17, 18, -1, -1, -1, 67, -1, -1, + 102, -1, 93, -1, 29, 30, 31, -1, 33, 111, + -1, 113, -1, 93, -1, -1, 118, -1, 43, -1, + 111, -1, 47, 93, -1, -1, 51, -1, -1, 54, + 55, 56, 57, -1, -1, -1, 11, -1, -1, -1, + 65, 66, 17, 18, -1, 70, 71, 72, 73, 74, + -1, -1, -1, -1, -1, 30, 81, -1, 83, 84, + -1, -1, -1, -1, -1, 90, -1, 92, -1, -1, + 45, -1, 97, 98, 99, 100, 101, -1, -1, -1, + 55, 56, 57, -1, -1, -1, 111, -1, -1, -1, + -1, 66, -1, -1, -1, -1, 71, -1, 73, -1, + -1, -1, -1, -1, -1, -1, 81, -1, -1, -1, + -1, -1, -1, -1, -1, 90, -1, 92, -1, 17, + 18, -1, 97, -1, 99, 100, 101, 25, -1, -1, + -1, 29, 30, 31, -1, 33, 34, -1, -1, -1, + -1, -1, -1, -1, -1, 43, -1, -1, -1, 47, + -1, -1, -1, 51, -1, -1, 54, 55, 56, 57, + -1, -1, -1, -1, -1, 63, -1, 65, 66, -1, + -1, -1, 70, 71, 72, 73, 74, -1, -1, -1, + -1, -1, -1, 81, -1, 83, 84, 85, 86, -1, + -1, -1, 90, -1, 92, 17, 18, -1, -1, 97, + 98, 99, 100, 101, -1, -1, -1, 29, 30, 31, + -1, 33, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 43, -1, -1, -1, 47, -1, -1, -1, 51, + -1, -1, 54, 55, 56, 57, -1, -1, -1, -1, + -1, -1, -1, 65, 66, -1, -1, -1, 70, 71, + 72, 73, 74, -1, -1, -1, -1, -1, -1, 81, + -1, 83, 84, -1, -1, -1, -1, -1, 90, -1, + 92, -1, -1, -1, -1, 97, 98, 99, 100, 101 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 17, 18, 103, 125, 126, 127, 244, 126, 0, + 0, 17, 18, 103, 125, 126, 127, 249, 126, 0, 127, 128, 111, 129, 130, 11, 12, 112, 131, 132, - 247, 41, 112, 132, 113, 18, 27, 48, 50, 59, + 252, 41, 112, 132, 113, 18, 27, 48, 50, 59, 133, 134, 135, 12, 64, 91, 91, 60, 91, 3, 135, 114, 28, 49, 136, 137, 149, 150, 24, 115, - 151, 152, 244, 247, 46, 61, 141, 142, 115, 115, - 116, 111, 53, 143, 144, 146, 147, 148, 244, 247, + 151, 152, 249, 252, 46, 61, 141, 142, 115, 115, + 116, 111, 53, 143, 144, 146, 147, 148, 249, 252, 30, 45, 55, 56, 57, 66, 71, 73, 81, 90, 92, 97, 99, 100, 101, 138, 139, 154, 156, 186, - 196, 244, 247, 152, 112, 115, 146, 53, 116, 111, + 196, 249, 252, 152, 112, 115, 146, 53, 116, 111, 18, 139, 3, 17, 18, 29, 31, 33, 43, 47, 51, 54, 65, 70, 72, 74, 83, 84, 98, 111, - 155, 180, 193, 194, 195, 196, 245, 118, 176, 239, - 240, 241, 244, 148, 112, 140, 35, 166, 176, 121, - 88, 88, 78, 58, 88, 157, 158, 193, 194, 244, - 3, 111, 111, 234, 121, 26, 82, 96, 242, 3, - 177, 178, 48, 59, 243, 130, 145, 111, 244, 247, + 155, 180, 193, 194, 195, 196, 250, 118, 176, 244, + 245, 246, 249, 148, 112, 140, 35, 166, 176, 121, + 88, 88, 78, 58, 88, 157, 158, 193, 194, 249, + 3, 111, 111, 239, 121, 26, 82, 96, 247, 3, + 177, 178, 48, 59, 248, 130, 145, 111, 249, 252, 112, 116, 117, 117, 111, 153, 8, 9, 10, 12, 13, 15, 16, 52, 93, 153, 159, 160, 176, 189, - 191, 237, 247, 110, 112, 235, 236, 237, 247, 19, - 20, 181, 182, 183, 244, 12, 70, 111, 187, 189, - 190, 244, 247, 25, 34, 63, 85, 86, 155, 179, - 87, 113, 199, 200, 201, 202, 19, 20, 168, 169, - 3, 158, 244, 247, 244, 247, 8, 10, 14, 24, - 52, 53, 68, 77, 87, 93, 102, 110, 111, 113, - 180, 191, 204, 205, 206, 207, 208, 209, 211, 212, - 213, 214, 215, 216, 237, 238, 247, 112, 116, 112, - 116, 113, 121, 119, 188, 121, 117, 42, 111, 75, - 111, 199, 111, 199, 113, 38, 39, 111, 203, 204, - 221, 222, 224, 226, 227, 228, 113, 18, 19, 40, - 76, 176, 184, 185, 232, 233, 176, 184, 185, 112, - 116, 166, 176, 104, 109, 122, 225, 9, 247, 36, - 37, 210, 204, 112, 116, 107, 108, 197, 105, 106, - 198, 104, 113, 225, 160, 236, 190, 237, 247, 182, - 7, 192, 247, 187, 32, 110, 164, 165, 175, 176, - 247, 180, 37, 161, 162, 163, 175, 176, 247, 75, - 161, 75, 203, 32, 176, 244, 114, 111, 203, 187, - 232, 121, 232, 232, 95, 167, 232, 232, 102, 170, - 171, 169, 209, 122, 109, 67, 213, 202, 111, 192, - 114, 110, 207, 208, 209, 204, 67, 213, 114, 114, - 7, 247, 120, 112, 116, 176, 75, 112, 116, 232, - 176, 246, 247, 112, 246, 114, 111, 112, 123, 229, - 230, 114, 19, 20, 232, 89, 122, 110, 217, 218, - 247, 116, 114, 190, 237, 165, 176, 4, 163, 232, - 239, 239, 223, 121, 231, 247, 112, 116, 111, 112, - 116, 199, 205, 162, 178, 178, 192, 231, 121, 230, - 172, 218, 22, 76, 80, 219, 220, 5, 247, 6, - 21, 118, 173, 174, 183, 173, 112, 174, 119 + 191, 242, 252, 110, 112, 240, 241, 242, 252, 19, + 20, 181, 182, 183, 249, 12, 70, 111, 187, 189, + 190, 249, 252, 25, 34, 63, 85, 86, 155, 179, + 113, 199, 201, 202, 19, 20, 168, 169, 3, 158, + 249, 252, 249, 252, 8, 10, 14, 24, 52, 53, + 68, 77, 87, 93, 102, 110, 111, 113, 176, 191, + 205, 206, 207, 208, 209, 210, 212, 213, 214, 215, + 216, 217, 242, 243, 252, 112, 116, 112, 116, 113, + 121, 119, 188, 121, 117, 42, 111, 75, 87, 111, + 200, 201, 111, 200, 38, 39, 111, 203, 204, 205, + 226, 227, 229, 231, 232, 233, 113, 18, 19, 40, + 76, 176, 184, 185, 237, 238, 176, 184, 185, 112, + 116, 166, 176, 104, 109, 122, 230, 9, 252, 36, + 37, 211, 205, 112, 116, 107, 108, 197, 105, 106, + 198, 104, 113, 230, 160, 241, 190, 242, 252, 182, + 7, 192, 252, 187, 32, 110, 164, 165, 175, 176, + 252, 180, 113, 37, 161, 162, 163, 175, 176, 252, + 75, 161, 75, 32, 176, 249, 114, 111, 203, 187, + 237, 121, 237, 237, 95, 167, 237, 237, 102, 170, + 171, 169, 210, 122, 109, 67, 214, 201, 218, 111, + 219, 220, 221, 192, 114, 110, 208, 209, 210, 205, + 67, 214, 114, 114, 7, 252, 120, 112, 116, 176, + 203, 75, 112, 116, 237, 176, 251, 252, 112, 251, + 111, 112, 123, 234, 235, 114, 19, 20, 237, 89, + 122, 110, 222, 223, 252, 253, 254, 116, 114, 190, + 242, 165, 114, 176, 4, 163, 237, 244, 244, 228, + 121, 236, 252, 112, 116, 111, 116, 112, 116, 199, + 206, 162, 178, 178, 192, 236, 121, 235, 172, 222, + 223, 22, 76, 80, 224, 225, 5, 252, 6, 21, + 118, 173, 174, 183, 112, 173, 112, 174, 119 }; #define yyerrok (yyerrstatus = 0) @@ -2247,21 +2266,21 @@ yyreduce: switch (yyn) { case 2: -#line 358 "asn1p_y.y" +#line 367 "asn1p_y.y" { *(void **)param = (yyvsp[(2) - (2)].a_grammar); } break; case 3: -#line 361 "asn1p_y.y" +#line 370 "asn1p_y.y" { *(void **)param = (yyvsp[(1) - (1)].a_grammar); } break; case 4: -#line 367 "asn1p_y.y" +#line 376 "asn1p_y.y" { (yyval.a_grammar) = asn1p_new(); checkmem((yyval.a_grammar)); @@ -2270,7 +2289,7 @@ yyreduce: break; case 5: -#line 372 "asn1p_y.y" +#line 381 "asn1p_y.y" { (yyval.a_grammar) = (yyvsp[(1) - (2)].a_grammar); TQ_ADD(&((yyval.a_grammar)->modules), (yyvsp[(2) - (2)].a_module), mod_next); @@ -2278,12 +2297,12 @@ yyreduce: break; case 6: -#line 389 "asn1p_y.y" +#line 398 "asn1p_y.y" { currentModule = asn1p_module_new(); } break; case 7: -#line 394 "asn1p_y.y" +#line 403 "asn1p_y.y" { (yyval.a_module) = currentModule; @@ -2304,31 +2323,31 @@ yyreduce: break; case 8: -#line 418 "asn1p_y.y" +#line 427 "asn1p_y.y" { (yyval.a_oid) = 0; } break; case 9: -#line 419 "asn1p_y.y" +#line 428 "asn1p_y.y" { (yyval.a_oid) = (yyvsp[(1) - (1)].a_oid); } break; case 10: -#line 423 "asn1p_y.y" +#line 432 "asn1p_y.y" { (yyval.a_oid) = (yyvsp[(2) - (3)].a_oid); } break; case 11: -#line 426 "asn1p_y.y" +#line 435 "asn1p_y.y" { (yyval.a_oid) = 0; } break; case 12: -#line 432 "asn1p_y.y" +#line 441 "asn1p_y.y" { (yyval.a_oid) = asn1p_oid_new(); asn1p_oid_add_arc((yyval.a_oid), &(yyvsp[(1) - (1)].a_oid_arc)); @@ -2338,7 +2357,7 @@ yyreduce: break; case 13: -#line 438 "asn1p_y.y" +#line 447 "asn1p_y.y" { (yyval.a_oid) = (yyvsp[(1) - (2)].a_oid); asn1p_oid_add_arc((yyval.a_oid), &(yyvsp[(2) - (2)].a_oid_arc)); @@ -2348,7 +2367,7 @@ yyreduce: break; case 14: -#line 447 "asn1p_y.y" +#line 456 "asn1p_y.y" { /* iso */ (yyval.a_oid_arc).name = (yyvsp[(1) - (1)].tv_str); (yyval.a_oid_arc).number = -1; @@ -2356,7 +2375,7 @@ yyreduce: break; case 15: -#line 451 "asn1p_y.y" +#line 460 "asn1p_y.y" { /* iso(1) */ (yyval.a_oid_arc).name = (yyvsp[(1) - (4)].tv_str); (yyval.a_oid_arc).number = (yyvsp[(3) - (4)].a_int); @@ -2364,7 +2383,7 @@ yyreduce: break; case 16: -#line 455 "asn1p_y.y" +#line 464 "asn1p_y.y" { /* 1 */ (yyval.a_oid_arc).name = 0; (yyval.a_oid_arc).number = (yyvsp[(1) - (1)].a_int); @@ -2372,61 +2391,61 @@ yyreduce: break; case 17: -#line 465 "asn1p_y.y" +#line 474 "asn1p_y.y" { (yyval.a_module_flags) = MSF_NOFLAGS; } break; case 18: -#line 466 "asn1p_y.y" +#line 475 "asn1p_y.y" { (yyval.a_module_flags) = (yyvsp[(1) - (1)].a_module_flags); } break; case 19: -#line 475 "asn1p_y.y" +#line 484 "asn1p_y.y" { (yyval.a_module_flags) = (yyvsp[(1) - (1)].a_module_flags); } break; case 20: -#line 478 "asn1p_y.y" +#line 487 "asn1p_y.y" { (yyval.a_module_flags) = (yyvsp[(1) - (2)].a_module_flags) | (yyvsp[(2) - (2)].a_module_flags); } break; case 21: -#line 487 "asn1p_y.y" +#line 496 "asn1p_y.y" { (yyval.a_module_flags) = MSF_EXPLICIT_TAGS; } break; case 22: -#line 490 "asn1p_y.y" +#line 499 "asn1p_y.y" { (yyval.a_module_flags) = MSF_IMPLICIT_TAGS; } break; case 23: -#line 493 "asn1p_y.y" +#line 502 "asn1p_y.y" { (yyval.a_module_flags) = MSF_AUTOMATIC_TAGS; } break; case 24: -#line 496 "asn1p_y.y" +#line 505 "asn1p_y.y" { (yyval.a_module_flags) = MSF_EXTENSIBILITY_IMPLIED; } break; case 25: -#line 500 "asn1p_y.y" +#line 509 "asn1p_y.y" { /* X.680Amd1 specifies TAG and XER */ if(strcmp((yyvsp[(1) - (2)].tv_str), "TAG") == 0) { @@ -2435,9 +2454,9 @@ yyreduce: (yyval.a_module_flags) = MSF_XER_INSTRUCTIONS; } else { fprintf(stderr, - "WARNING: %s INSTRUCTIONS at line %d: " + "WARNING: %s INSTRUCTIONS at %s:%d: " "Unrecognized encoding reference\n", - (yyvsp[(1) - (2)].tv_str), yylineno); + (yyvsp[(1) - (2)].tv_str), ASN_FILENAME, yylineno); (yyval.a_module_flags) = MSF_unk_INSTRUCTIONS; } free((yyvsp[(1) - (2)].tv_str)); @@ -2445,19 +2464,19 @@ yyreduce: break; case 26: -#line 521 "asn1p_y.y" +#line 530 "asn1p_y.y" { (yyval.a_module) = 0; } break; case 27: -#line 522 "asn1p_y.y" +#line 531 "asn1p_y.y" { (yyval.a_module) = (yyvsp[(1) - (1)].a_module); } break; case 28: -#line 531 "asn1p_y.y" +#line 540 "asn1p_y.y" { (yyval.a_module) = asn1p_module_new(); AL_IMPORT((yyval.a_module), exports, (yyvsp[(1) - (3)].a_module), xp_next); @@ -2471,14 +2490,14 @@ yyreduce: break; case 29: -#line 544 "asn1p_y.y" +#line 553 "asn1p_y.y" { (yyval.a_module) = (yyvsp[(1) - (1)].a_module); } break; case 30: -#line 547 "asn1p_y.y" +#line 556 "asn1p_y.y" { if((yyvsp[(1) - (2)].a_module)) { (yyval.a_module) = (yyvsp[(1) - (2)].a_module); @@ -2492,7 +2511,7 @@ yyreduce: break; case 31: -#line 564 "asn1p_y.y" +#line 573 "asn1p_y.y" { (yyval.a_module) = asn1p_module_new(); checkmem((yyval.a_module)); @@ -2503,7 +2522,7 @@ yyreduce: break; case 32: -#line 571 "asn1p_y.y" +#line 580 "asn1p_y.y" { (yyval.a_module) = asn1p_module_new(); checkmem((yyval.a_module)); @@ -2514,7 +2533,7 @@ yyreduce: break; case 33: -#line 585 "asn1p_y.y" +#line 594 "asn1p_y.y" { (yyval.a_module) = asn1p_module_new(); checkmem((yyval.a_module)); @@ -2525,24 +2544,24 @@ yyreduce: break; case 34: -#line 593 "asn1p_y.y" +#line 602 "asn1p_y.y" { asn1p_lexer_hack_push_encoding_control(); } break; case 35: -#line 594 "asn1p_y.y" +#line 603 "asn1p_y.y" { fprintf(stderr, "WARNING: ENCODING-CONTROL %s " - "specification at line %d ignored\n", - (yyvsp[(2) - (3)].tv_str), yylineno); + "specification at %s:%d ignored\n", + (yyvsp[(2) - (3)].tv_str), ASN_FILENAME, yylineno); free((yyvsp[(2) - (3)].tv_str)); (yyval.a_module) = 0; } break; case 36: -#line 606 "asn1p_y.y" +#line 615 "asn1p_y.y" { return yyerror( "Attempt to redefine a standard basic string type, " @@ -2551,12 +2570,12 @@ yyreduce: break; case 37: -#line 619 "asn1p_y.y" +#line 628 "asn1p_y.y" { (yyval.a_module) = 0; } break; case 39: -#line 623 "asn1p_y.y" +#line 632 "asn1p_y.y" { if(!saved_aid && 0) return yyerror("Unterminated IMPORTS FROM, " @@ -2567,19 +2586,19 @@ yyreduce: break; case 40: -#line 633 "asn1p_y.y" +#line 642 "asn1p_y.y" { return yyerror("Empty IMPORTS list"); } break; case 41: -#line 639 "asn1p_y.y" +#line 648 "asn1p_y.y" { (yyval.a_module) = asn1p_module_new(); } break; case 43: -#line 643 "asn1p_y.y" +#line 652 "asn1p_y.y" { (yyval.a_module) = asn1p_module_new(); checkmem((yyval.a_module)); @@ -2588,7 +2607,7 @@ yyreduce: break; case 44: -#line 648 "asn1p_y.y" +#line 657 "asn1p_y.y" { (yyval.a_module) = (yyvsp[(1) - (2)].a_module); TQ_ADD(&((yyval.a_module)->imports), (yyvsp[(2) - (2)].a_xports), xp_next); @@ -2596,17 +2615,17 @@ yyreduce: break; case 45: -#line 655 "asn1p_y.y" +#line 664 "asn1p_y.y" { memset(&(yyval.a_aid), 0, sizeof((yyval.a_aid))); } break; case 46: -#line 656 "asn1p_y.y" +#line 665 "asn1p_y.y" { (yyval.a_aid).oid = (yyvsp[(1) - (1)].a_oid); } break; case 47: -#line 660 "asn1p_y.y" +#line 669 "asn1p_y.y" { (yyval.a_xports) = (yyvsp[(1) - (4)].a_xports); (yyval.a_xports)->fromModuleName = (yyvsp[(3) - (4)].tv_str); @@ -2618,7 +2637,7 @@ yyreduce: break; case 48: -#line 671 "asn1p_y.y" +#line 680 "asn1p_y.y" { (yyval.a_xports) = asn1p_xports_new(); checkmem((yyval.a_xports)); @@ -2627,7 +2646,7 @@ yyreduce: break; case 49: -#line 676 "asn1p_y.y" +#line 685 "asn1p_y.y" { (yyval.a_xports) = (yyvsp[(1) - (3)].a_xports); TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(3) - (3)].a_expr), next); @@ -2635,7 +2654,7 @@ yyreduce: break; case 50: -#line 683 "asn1p_y.y" +#line 692 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -2645,7 +2664,7 @@ yyreduce: break; case 51: -#line 689 "asn1p_y.y" +#line 698 "asn1p_y.y" { /* Completely equivalent to above */ (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -2655,7 +2674,7 @@ yyreduce: break; case 52: -#line 695 "asn1p_y.y" +#line 704 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -2665,12 +2684,12 @@ yyreduce: break; case 53: -#line 705 "asn1p_y.y" +#line 714 "asn1p_y.y" { (yyval.a_module) = 0; } break; case 54: -#line 706 "asn1p_y.y" +#line 715 "asn1p_y.y" { (yyval.a_module) = asn1p_module_new(); checkmem((yyval.a_module)); @@ -2683,21 +2702,21 @@ yyreduce: break; case 55: -#line 718 "asn1p_y.y" +#line 727 "asn1p_y.y" { (yyval.a_xports) = (yyvsp[(2) - (3)].a_xports); } break; case 56: -#line 721 "asn1p_y.y" +#line 730 "asn1p_y.y" { (yyval.a_xports) = 0; } break; case 57: -#line 724 "asn1p_y.y" +#line 733 "asn1p_y.y" { /* Empty EXPORTS clause effectively prohibits export. */ (yyval.a_xports) = asn1p_xports_new(); @@ -2706,7 +2725,7 @@ yyreduce: break; case 58: -#line 732 "asn1p_y.y" +#line 741 "asn1p_y.y" { (yyval.a_xports) = asn1p_xports_new(); assert((yyval.a_xports)); @@ -2715,7 +2734,7 @@ yyreduce: break; case 59: -#line 737 "asn1p_y.y" +#line 746 "asn1p_y.y" { (yyval.a_xports) = (yyvsp[(1) - (3)].a_xports); TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(3) - (3)].a_expr), next); @@ -2723,7 +2742,7 @@ yyreduce: break; case 60: -#line 744 "asn1p_y.y" +#line 753 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -2733,7 +2752,7 @@ yyreduce: break; case 61: -#line 750 "asn1p_y.y" +#line 759 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -2743,7 +2762,7 @@ yyreduce: break; case 62: -#line 756 "asn1p_y.y" +#line 765 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -2753,12 +2772,12 @@ yyreduce: break; case 63: -#line 765 "asn1p_y.y" +#line 774 "asn1p_y.y" { (yyval.a_constr) = (yyvsp[(2) - (3)].a_constr); } break; case 64: -#line 768 "asn1p_y.y" +#line 777 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(2) - (4)].a_expr); assert((yyval.a_expr)->Identifier == 0); @@ -2769,14 +2788,14 @@ yyreduce: break; case 65: -#line 778 "asn1p_y.y" +#line 787 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); } break; case 66: -#line 791 "asn1p_y.y" +#line 800 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -2787,7 +2806,7 @@ yyreduce: break; case 67: -#line 801 "asn1p_y.y" +#line 810 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -2799,7 +2818,7 @@ yyreduce: break; case 68: -#line 821 "asn1p_y.y" +#line 830 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(3) - (3)].a_expr); (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); @@ -2809,7 +2828,7 @@ yyreduce: break; case 69: -#line 827 "asn1p_y.y" +#line 836 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(3) - (3)].a_expr); (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); @@ -2819,7 +2838,7 @@ yyreduce: break; case 70: -#line 843 "asn1p_y.y" +#line 852 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(6) - (6)].a_expr); (yyval.a_expr)->Identifier = (yyvsp[(1) - (6)].tv_str); @@ -2828,7 +2847,7 @@ yyreduce: break; case 71: -#line 849 "asn1p_y.y" +#line 858 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(6) - (6)].a_expr); (yyval.a_expr)->Identifier = (yyvsp[(1) - (6)].tv_str); @@ -2837,7 +2856,7 @@ yyreduce: break; case 72: -#line 857 "asn1p_y.y" +#line 866 "asn1p_y.y" { int ret; (yyval.a_plist) = asn1p_paramlist_new(yylineno); @@ -2850,7 +2869,7 @@ yyreduce: break; case 73: -#line 866 "asn1p_y.y" +#line 875 "asn1p_y.y" { int ret; (yyval.a_plist) = (yyvsp[(1) - (3)].a_plist); @@ -2862,7 +2881,7 @@ yyreduce: break; case 74: -#line 877 "asn1p_y.y" +#line 886 "asn1p_y.y" { (yyval.a_parg).governor = NULL; (yyval.a_parg).argument = (yyvsp[(1) - (1)].tv_str); @@ -2870,7 +2889,7 @@ yyreduce: break; case 75: -#line 881 "asn1p_y.y" +#line 890 "asn1p_y.y" { int ret; (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule); @@ -2882,7 +2901,7 @@ yyreduce: break; case 76: -#line 889 "asn1p_y.y" +#line 898 "asn1p_y.y" { int ret; (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule); @@ -2894,7 +2913,7 @@ yyreduce: break; case 77: -#line 897 "asn1p_y.y" +#line 906 "asn1p_y.y" { int ret; (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule); @@ -2906,7 +2925,7 @@ yyreduce: break; case 78: -#line 905 "asn1p_y.y" +#line 914 "asn1p_y.y" { int ret; (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule); @@ -2918,7 +2937,7 @@ yyreduce: break; case 79: -#line 916 "asn1p_y.y" +#line 925 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -2927,7 +2946,7 @@ yyreduce: break; case 80: -#line 921 "asn1p_y.y" +#line 930 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); @@ -2935,14 +2954,14 @@ yyreduce: break; case 81: -#line 928 "asn1p_y.y" +#line 937 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); } break; case 82: -#line 931 "asn1p_y.y" +#line 940 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -2954,7 +2973,7 @@ yyreduce: break; case 83: -#line 939 "asn1p_y.y" +#line 948 "asn1p_y.y" { asn1p_ref_t *ref; (yyval.a_expr) = NEW_EXPR(); @@ -2969,7 +2988,7 @@ yyreduce: break; case 84: -#line 950 "asn1p_y.y" +#line 959 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); (yyval.a_expr)->expr_type = A1TC_VALUESET; @@ -2979,17 +2998,17 @@ yyreduce: break; case 85: -#line 973 "asn1p_y.y" +#line 982 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); } break; case 86: -#line 974 "asn1p_y.y" +#line 983 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); } break; case 87: -#line 977 "asn1p_y.y" +#line 986 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -2998,7 +3017,7 @@ yyreduce: break; case 88: -#line 982 "asn1p_y.y" +#line 991 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); @@ -3006,7 +3025,7 @@ yyreduce: break; case 89: -#line 986 "asn1p_y.y" +#line 995 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(1) - (5)].a_expr); asn1p_expr_add_many((yyval.a_expr), (yyvsp[(4) - (5)].a_expr)); @@ -3015,7 +3034,7 @@ yyreduce: break; case 90: -#line 994 "asn1p_y.y" +#line 1003 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr); assert((yyval.a_expr)->Identifier == 0); @@ -3026,7 +3045,7 @@ yyreduce: break; case 91: -#line 1001 "asn1p_y.y" +#line 1010 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(1) - (2)].a_expr); (yyvsp[(2) - (2)].a_marker).flags |= (yyval.a_expr)->marker.flags; @@ -3036,7 +3055,7 @@ yyreduce: break; case 92: -#line 1007 "asn1p_y.y" +#line 1016 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -3047,14 +3066,14 @@ yyreduce: break; case 93: -#line 1014 "asn1p_y.y" +#line 1023 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); } break; case 94: -#line 1020 "asn1p_y.y" +#line 1029 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -3063,7 +3082,7 @@ yyreduce: break; case 95: -#line 1025 "asn1p_y.y" +#line 1034 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); @@ -3071,7 +3090,7 @@ yyreduce: break; case 96: -#line 1032 "asn1p_y.y" +#line 1041 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr); assert((yyval.a_expr)->Identifier == 0); @@ -3080,14 +3099,14 @@ yyreduce: break; case 97: -#line 1037 "asn1p_y.y" +#line 1046 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); } break; case 98: -#line 1040 "asn1p_y.y" +#line 1049 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); _fixup_anonymous_identifier((yyval.a_expr)); @@ -3095,7 +3114,7 @@ yyreduce: break; case 99: -#line 1047 "asn1p_y.y" +#line 1056 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(3) - (5)].a_expr); checkmem((yyval.a_expr)); @@ -3106,17 +3125,17 @@ yyreduce: break; case 100: -#line 1057 "asn1p_y.y" +#line 1066 "asn1p_y.y" { (yyval.a_int) = 0; } break; case 101: -#line 1058 "asn1p_y.y" +#line 1067 "asn1p_y.y" { (yyval.a_int) = 1; } break; case 102: -#line 1062 "asn1p_y.y" +#line 1071 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -3127,7 +3146,7 @@ yyreduce: break; case 103: -#line 1069 "asn1p_y.y" +#line 1078 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); @@ -3135,7 +3154,7 @@ yyreduce: break; case 104: -#line 1079 "asn1p_y.y" +#line 1088 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -3147,7 +3166,7 @@ yyreduce: break; case 105: -#line 1089 "asn1p_y.y" +#line 1098 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str); @@ -3160,7 +3179,7 @@ yyreduce: break; case 106: -#line 1100 "asn1p_y.y" +#line 1109 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); @@ -3172,7 +3191,7 @@ yyreduce: break; case 107: -#line 1110 "asn1p_y.y" +#line 1119 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -3185,7 +3204,7 @@ yyreduce: break; case 108: -#line 1121 "asn1p_y.y" +#line 1130 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str); @@ -3197,7 +3216,7 @@ yyreduce: break; case 109: -#line 1131 "asn1p_y.y" +#line 1140 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -3210,7 +3229,7 @@ yyreduce: break; case 110: -#line 1142 "asn1p_y.y" +#line 1151 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -3223,31 +3242,31 @@ yyreduce: break; case 111: -#line 1154 "asn1p_y.y" +#line 1163 "asn1p_y.y" { (yyval.a_wsynt) = 0; } break; case 112: -#line 1155 "asn1p_y.y" +#line 1164 "asn1p_y.y" { (yyval.a_wsynt) = (yyvsp[(1) - (1)].a_wsynt); } break; case 113: -#line 1162 "asn1p_y.y" +#line 1171 "asn1p_y.y" { asn1p_lexer_hack_enable_with_syntax(); } break; case 114: -#line 1164 "asn1p_y.y" +#line 1173 "asn1p_y.y" { (yyval.a_wsynt) = (yyvsp[(5) - (6)].a_wsynt); } break; case 115: -#line 1170 "asn1p_y.y" +#line 1179 "asn1p_y.y" { (yyval.a_wsynt) = asn1p_wsyntx_new(); TQ_ADD(&((yyval.a_wsynt)->chunks), (yyvsp[(1) - (1)].a_wchunk), next); @@ -3255,7 +3274,7 @@ yyreduce: break; case 116: -#line 1174 "asn1p_y.y" +#line 1183 "asn1p_y.y" { (yyval.a_wsynt) = (yyvsp[(1) - (2)].a_wsynt); TQ_ADD(&((yyval.a_wsynt)->chunks), (yyvsp[(2) - (2)].a_wchunk), next); @@ -3263,7 +3282,7 @@ yyreduce: break; case 117: -#line 1181 "asn1p_y.y" +#line 1190 "asn1p_y.y" { (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].tv_opaque).buf, 0); (yyval.a_wchunk)->type = WC_WHITESPACE; @@ -3271,14 +3290,14 @@ yyreduce: break; case 118: -#line 1185 "asn1p_y.y" +#line 1194 "asn1p_y.y" { (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].tv_str), 0); } break; case 119: -#line 1188 "asn1p_y.y" +#line 1197 "asn1p_y.y" { (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].a_refcomp).name, 0); (yyval.a_wchunk)->type = WC_FIELD; @@ -3286,14 +3305,14 @@ yyreduce: break; case 120: -#line 1192 "asn1p_y.y" +#line 1201 "asn1p_y.y" { (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromsyntax((yyvsp[(2) - (3)].a_wsynt)); } break; case 121: -#line 1198 "asn1p_y.y" +#line 1207 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -3305,7 +3324,7 @@ yyreduce: break; case 122: -#line 1206 "asn1p_y.y" +#line 1215 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -3318,7 +3337,7 @@ yyreduce: break; case 123: -#line 1215 "asn1p_y.y" +#line 1224 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -3331,7 +3350,7 @@ yyreduce: break; case 124: -#line 1227 "asn1p_y.y" +#line 1236 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr); (yyval.a_expr)->tag = (yyvsp[(1) - (3)].a_tag); @@ -3356,7 +3375,7 @@ yyreduce: break; case 125: -#line 1251 "asn1p_y.y" +#line 1260 "asn1p_y.y" { (yyval.a_int) = asn1p_as_pointer ? EM_INDIRECT : 0; asn1p_as_pointer = 0; @@ -3364,7 +3383,7 @@ yyreduce: break; case 126: -#line 1258 "asn1p_y.y" +#line 1267 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr); (yyval.a_expr)->marker.flags |= (yyvsp[(1) - (2)].a_int); @@ -3373,25 +3392,25 @@ yyreduce: && ((yyval.a_expr)->marker.flags & EM_OPTIONAL) != EM_OPTIONAL) { fprintf(stderr, "INFO: Directive <ASN1C:RepresentAsPointer> " - "applied to %s at line %d\n", + "applied to %s at %s:%d\n", ASN_EXPR_TYPE2STR((yyval.a_expr)->expr_type) ? ASN_EXPR_TYPE2STR((yyval.a_expr)->expr_type) : "member", - (yyval.a_expr)->_lineno + ASN_FILENAME, (yyval.a_expr)->_lineno ); } } break; case 127: -#line 1277 "asn1p_y.y" +#line 1286 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); } break; case 128: -#line 1280 "asn1p_y.y" +#line 1289 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr); assert((yyval.a_expr)->expr_type == A1TC_INVALID); @@ -3401,7 +3420,7 @@ yyreduce: break; case 129: -#line 1286 "asn1p_y.y" +#line 1295 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr); assert((yyval.a_expr)->expr_type == A1TC_INVALID); @@ -3411,7 +3430,7 @@ yyreduce: break; case 130: -#line 1292 "asn1p_y.y" +#line 1301 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr); assert((yyval.a_expr)->expr_type == A1TC_INVALID); @@ -3421,7 +3440,7 @@ yyreduce: break; case 131: -#line 1298 "asn1p_y.y" +#line 1307 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -3435,7 +3454,7 @@ yyreduce: break; case 132: -#line 1308 "asn1p_y.y" +#line 1317 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -3449,7 +3468,7 @@ yyreduce: break; case 133: -#line 1318 "asn1p_y.y" +#line 1327 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -3459,7 +3478,7 @@ yyreduce: break; case 134: -#line 1324 "asn1p_y.y" +#line 1333 "asn1p_y.y" { int ret; (yyval.a_expr) = NEW_EXPR(); @@ -3475,7 +3494,7 @@ yyreduce: break; case 135: -#line 1336 "asn1p_y.y" +#line 1345 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -3486,7 +3505,7 @@ yyreduce: break; case 136: -#line 1351 "asn1p_y.y" +#line 1360 "asn1p_y.y" { int ret; (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); @@ -3498,7 +3517,7 @@ yyreduce: break; case 137: -#line 1359 "asn1p_y.y" +#line 1368 "asn1p_y.y" { int ret; (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); @@ -3513,7 +3532,7 @@ yyreduce: break; case 138: -#line 1370 "asn1p_y.y" +#line 1379 "asn1p_y.y" { int ret; (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); @@ -3528,7 +3547,7 @@ yyreduce: break; case 139: -#line 1381 "asn1p_y.y" +#line 1390 "asn1p_y.y" { int ret; (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); @@ -3543,7 +3562,7 @@ yyreduce: break; case 140: -#line 1392 "asn1p_y.y" +#line 1401 "asn1p_y.y" { int ret; (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); @@ -3555,7 +3574,7 @@ yyreduce: break; case 141: -#line 1400 "asn1p_y.y" +#line 1409 "asn1p_y.y" { int ret; (yyval.a_ref) = (yyvsp[(3) - (3)].a_ref); @@ -3578,7 +3597,7 @@ yyreduce: break; case 142: -#line 1422 "asn1p_y.y" +#line 1431 "asn1p_y.y" { int ret; (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); @@ -3590,7 +3609,7 @@ yyreduce: break; case 143: -#line 1430 "asn1p_y.y" +#line 1439 "asn1p_y.y" { int ret; (yyval.a_ref) = (yyvsp[(1) - (3)].a_ref); @@ -3601,7 +3620,7 @@ yyreduce: break; case 145: -#line 1443 "asn1p_y.y" +#line 1452 "asn1p_y.y" { (yyval.a_refcomp).lex_type = RLT_AmpUppercase; (yyval.a_refcomp).name = (yyvsp[(1) - (1)].tv_str); @@ -3609,7 +3628,7 @@ yyreduce: break; case 146: -#line 1448 "asn1p_y.y" +#line 1457 "asn1p_y.y" { (yyval.a_refcomp).lex_type = RLT_Amplowercase; (yyval.a_refcomp).name = (yyvsp[(1) - (1)].tv_str); @@ -3617,7 +3636,7 @@ yyreduce: break; case 147: -#line 1457 "asn1p_y.y" +#line 1466 "asn1p_y.y" { (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_AmpUppercase); @@ -3626,7 +3645,7 @@ yyreduce: break; case 148: -#line 1462 "asn1p_y.y" +#line 1471 "asn1p_y.y" { (yyval.a_ref) = (yyval.a_ref); asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_AmpUppercase); @@ -3635,7 +3654,7 @@ yyreduce: break; case 149: -#line 1467 "asn1p_y.y" +#line 1476 "asn1p_y.y" { (yyval.a_ref) = (yyval.a_ref); asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_Amplowercase); @@ -3644,7 +3663,7 @@ yyreduce: break; case 150: -#line 1475 "asn1p_y.y" +#line 1484 "asn1p_y.y" { (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_CAPITALS); @@ -3653,7 +3672,7 @@ yyreduce: break; case 151: -#line 1498 "asn1p_y.y" +#line 1507 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(2) - (4)].a_expr); assert((yyval.a_expr)->Identifier == NULL); @@ -3664,7 +3683,7 @@ yyreduce: break; case 154: -#line 1510 "asn1p_y.y" +#line 1519 "asn1p_y.y" { (yyval.a_value) = asn1p_value_fromint(0); checkmem((yyval.a_value)); @@ -3675,12 +3694,12 @@ yyreduce: break; case 155: -#line 1517 "asn1p_y.y" +#line 1526 "asn1p_y.y" { asn1p_lexer_hack_push_opaque_state(); } break; case 156: -#line 1517 "asn1p_y.y" +#line 1526 "asn1p_y.y" { (yyval.a_value) = asn1p_value_frombuf((yyvsp[(3) - (3)].tv_opaque).buf, (yyvsp[(3) - (3)].tv_opaque).len, 0); checkmem((yyval.a_value)); @@ -3689,7 +3708,7 @@ yyreduce: break; case 157: -#line 1522 "asn1p_y.y" +#line 1531 "asn1p_y.y" { (yyval.a_value) = asn1p_value_fromint(0); checkmem((yyval.a_value)); @@ -3698,7 +3717,7 @@ yyreduce: break; case 158: -#line 1530 "asn1p_y.y" +#line 1539 "asn1p_y.y" { (yyval.a_value) = asn1p_value_fromint(0); checkmem((yyval.a_value)); @@ -3707,7 +3726,7 @@ yyreduce: break; case 159: -#line 1535 "asn1p_y.y" +#line 1544 "asn1p_y.y" { (yyval.a_value) = asn1p_value_fromint(0); checkmem((yyval.a_value)); @@ -3716,7 +3735,7 @@ yyreduce: break; case 160: -#line 1540 "asn1p_y.y" +#line 1549 "asn1p_y.y" { (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'B'); checkmem((yyval.a_value)); @@ -3725,7 +3744,7 @@ yyreduce: break; case 161: -#line 1545 "asn1p_y.y" +#line 1554 "asn1p_y.y" { (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'H'); checkmem((yyval.a_value)); @@ -3734,21 +3753,21 @@ yyreduce: break; case 162: -#line 1550 "asn1p_y.y" +#line 1559 "asn1p_y.y" { (yyval.a_value) = (yyval.a_value); } break; case 163: -#line 1553 "asn1p_y.y" +#line 1562 "asn1p_y.y" { (yyval.a_value) = (yyvsp[(1) - (1)].a_value); } break; case 164: -#line 1559 "asn1p_y.y" +#line 1568 "asn1p_y.y" { asn1p_ref_t *ref; int ret; @@ -3763,7 +3782,7 @@ yyreduce: break; case 165: -#line 1570 "asn1p_y.y" +#line 1579 "asn1p_y.y" { asn1p_ref_t *ref; int ret; @@ -3781,7 +3800,7 @@ yyreduce: break; case 166: -#line 1588 "asn1p_y.y" +#line 1597 "asn1p_y.y" { (yyval.a_value) = asn1p_value_frombuf((yyvsp[(1) - (1)].tv_opaque).buf, (yyvsp[(1) - (1)].tv_opaque).len, 0); checkmem((yyval.a_value)); @@ -3789,7 +3808,7 @@ yyreduce: break; case 167: -#line 1592 "asn1p_y.y" +#line 1601 "asn1p_y.y" { (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int)); checkmem((yyval.a_value)); @@ -3798,7 +3817,7 @@ yyreduce: break; case 168: -#line 1597 "asn1p_y.y" +#line 1606 "asn1p_y.y" { (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int)); checkmem((yyval.a_value)); @@ -3807,7 +3826,7 @@ yyreduce: break; case 169: -#line 1605 "asn1p_y.y" +#line 1614 "asn1p_y.y" { (yyval.tv_opaque).len = (yyvsp[(1) - (1)].tv_opaque).len + 1; (yyval.tv_opaque).buf = malloc((yyval.tv_opaque).len + 1); @@ -3820,7 +3839,7 @@ yyreduce: break; case 170: -#line 1614 "asn1p_y.y" +#line 1623 "asn1p_y.y" { int newsize = (yyvsp[(1) - (2)].tv_opaque).len + (yyvsp[(2) - (2)].tv_opaque).len; char *p = malloc(newsize + 1); @@ -3836,87 +3855,87 @@ yyreduce: break; case 171: -#line 1629 "asn1p_y.y" +#line 1638 "asn1p_y.y" { (yyval.a_type) = ASN_BASIC_BOOLEAN; } break; case 172: -#line 1630 "asn1p_y.y" +#line 1639 "asn1p_y.y" { (yyval.a_type) = ASN_BASIC_NULL; } break; case 173: -#line 1631 "asn1p_y.y" +#line 1640 "asn1p_y.y" { (yyval.a_type) = ASN_BASIC_REAL; } break; case 174: -#line 1632 "asn1p_y.y" +#line 1641 "asn1p_y.y" { (yyval.a_type) = (yyvsp[(1) - (1)].a_type); } break; case 175: -#line 1633 "asn1p_y.y" +#line 1642 "asn1p_y.y" { (yyval.a_type) = ASN_BASIC_OCTET_STRING; } break; case 176: -#line 1634 "asn1p_y.y" +#line 1643 "asn1p_y.y" { (yyval.a_type) = ASN_BASIC_OBJECT_IDENTIFIER; } break; case 177: -#line 1635 "asn1p_y.y" +#line 1644 "asn1p_y.y" { (yyval.a_type) = ASN_BASIC_RELATIVE_OID; } break; case 178: -#line 1636 "asn1p_y.y" +#line 1645 "asn1p_y.y" { (yyval.a_type) = ASN_BASIC_EXTERNAL; } break; case 179: -#line 1637 "asn1p_y.y" +#line 1646 "asn1p_y.y" { (yyval.a_type) = ASN_BASIC_EMBEDDED_PDV; } break; case 180: -#line 1638 "asn1p_y.y" +#line 1647 "asn1p_y.y" { (yyval.a_type) = ASN_BASIC_CHARACTER_STRING; } break; case 181: -#line 1639 "asn1p_y.y" +#line 1648 "asn1p_y.y" { (yyval.a_type) = ASN_BASIC_UTCTime; } break; case 182: -#line 1640 "asn1p_y.y" +#line 1649 "asn1p_y.y" { (yyval.a_type) = ASN_BASIC_GeneralizedTime; } break; case 183: -#line 1641 "asn1p_y.y" +#line 1650 "asn1p_y.y" { (yyval.a_type) = (yyvsp[(1) - (1)].a_type); } break; case 184: -#line 1648 "asn1p_y.y" +#line 1657 "asn1p_y.y" { (yyval.a_type) = ASN_BASIC_INTEGER; } break; case 185: -#line 1649 "asn1p_y.y" +#line 1658 "asn1p_y.y" { (yyval.a_type) = ASN_BASIC_ENUMERATED; } break; case 186: -#line 1650 "asn1p_y.y" +#line 1659 "asn1p_y.y" { (yyval.a_type) = ASN_BASIC_BIT_STRING; } break; case 187: -#line 1654 "asn1p_y.y" +#line 1663 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -3926,7 +3945,7 @@ yyreduce: break; case 188: -#line 1660 "asn1p_y.y" +#line 1669 "asn1p_y.y" { if((yyvsp[(2) - (2)].a_expr)) { (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr); @@ -3940,12 +3959,12 @@ yyreduce: break; case 189: -#line 1673 "asn1p_y.y" +#line 1682 "asn1p_y.y" { (yyval.a_type) = ASN_STRING_BMPString; } break; case 190: -#line 1674 "asn1p_y.y" +#line 1683 "asn1p_y.y" { (yyval.a_type) = ASN_STRING_GeneralString; fprintf(stderr, "WARNING: GeneralString is not fully supported\n"); @@ -3953,7 +3972,7 @@ yyreduce: break; case 191: -#line 1678 "asn1p_y.y" +#line 1687 "asn1p_y.y" { (yyval.a_type) = ASN_STRING_GraphicString; fprintf(stderr, "WARNING: GraphicString is not fully supported\n"); @@ -3961,27 +3980,27 @@ yyreduce: break; case 192: -#line 1682 "asn1p_y.y" +#line 1691 "asn1p_y.y" { (yyval.a_type) = ASN_STRING_IA5String; } break; case 193: -#line 1683 "asn1p_y.y" +#line 1692 "asn1p_y.y" { (yyval.a_type) = ASN_STRING_ISO646String; } break; case 194: -#line 1684 "asn1p_y.y" +#line 1693 "asn1p_y.y" { (yyval.a_type) = ASN_STRING_NumericString; } break; case 195: -#line 1685 "asn1p_y.y" +#line 1694 "asn1p_y.y" { (yyval.a_type) = ASN_STRING_PrintableString; } break; case 196: -#line 1686 "asn1p_y.y" +#line 1695 "asn1p_y.y" { (yyval.a_type) = ASN_STRING_T61String; fprintf(stderr, "WARNING: T61String is not fully supported\n"); @@ -3989,22 +4008,22 @@ yyreduce: break; case 197: -#line 1690 "asn1p_y.y" +#line 1699 "asn1p_y.y" { (yyval.a_type) = ASN_STRING_TeletexString; } break; case 198: -#line 1691 "asn1p_y.y" +#line 1700 "asn1p_y.y" { (yyval.a_type) = ASN_STRING_UniversalString; } break; case 199: -#line 1692 "asn1p_y.y" +#line 1701 "asn1p_y.y" { (yyval.a_type) = ASN_STRING_UTF8String; } break; case 200: -#line 1693 "asn1p_y.y" +#line 1702 "asn1p_y.y" { (yyval.a_type) = ASN_STRING_VideotexString; fprintf(stderr, "WARNING: VideotexString is not fully supported\n"); @@ -4012,74 +4031,54 @@ yyreduce: break; case 201: -#line 1697 "asn1p_y.y" +#line 1706 "asn1p_y.y" { (yyval.a_type) = ASN_STRING_VisibleString; } break; case 202: -#line 1698 "asn1p_y.y" +#line 1707 "asn1p_y.y" { (yyval.a_type) = ASN_STRING_ObjectDescriptor; } break; case 207: -#line 1709 "asn1p_y.y" +#line 1719 "asn1p_y.y" { (yyval.a_constr) = 0; } break; - case 208: -#line 1710 "asn1p_y.y" - { - (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); - } - break; - - case 210: -#line 1720 "asn1p_y.y" - { - CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(1) - (1)].a_constr), 0); - } + case 209: +#line 1724 "asn1p_y.y" + { (yyval.a_constr) = 0; } break; case 211: -#line 1723 "asn1p_y.y" +#line 1726 "asn1p_y.y" { - /* - * This is a special case, for compatibility purposes. - * It goes without parentheses. - */ CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_SIZE, (yyvsp[(3) - (4)].a_constr), 0); } break; case 212: -#line 1733 "asn1p_y.y" +#line 1732 "asn1p_y.y" { - (yyval.a_constr) = (yyvsp[(2) - (3)].a_constr); - } + CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(1) - (1)].a_constr), 0); + } break; case 213: -#line 1736 "asn1p_y.y" +#line 1738 "asn1p_y.y" { - CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(1) - (4)].a_constr), (yyvsp[(3) - (4)].a_constr)); + (yyval.a_constr) = (yyvsp[(2) - (3)].a_constr); } break; case 214: -#line 1742 "asn1p_y.y" +#line 1741 "asn1p_y.y" { - (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); - } - break; - - case 215: -#line 1745 "asn1p_y.y" - { - (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); + CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(1) - (4)].a_constr), (yyvsp[(3) - (4)].a_constr)); } break; - case 216: + case 218: #line 1751 "asn1p_y.y" { (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); @@ -4087,15 +4086,8 @@ yyreduce: } break; - case 217: -#line 1755 "asn1p_y.y" - { - (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); - } - break; - - case 218: -#line 1758 "asn1p_y.y" + case 220: +#line 1756 "asn1p_y.y" { asn1p_constraint_t *ct; ct = asn1p_constraint_new(yylineno, currentModule); @@ -4104,8 +4096,8 @@ yyreduce: } break; - case 219: -#line 1764 "asn1p_y.y" + case 221: +#line 1762 "asn1p_y.y" { asn1p_constraint_t *ct; ct = asn1p_constraint_new(yylineno, currentModule); @@ -4116,36 +4108,36 @@ yyreduce: } break; - case 221: -#line 1776 "asn1p_y.y" + case 223: +#line 1774 "asn1p_y.y" { CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_AEX, (yyvsp[(3) - (3)].a_constr), 0); } break; - case 223: -#line 1783 "asn1p_y.y" + case 225: +#line 1781 "asn1p_y.y" { CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_UNI, (yyvsp[(1) - (3)].a_constr), (yyvsp[(3) - (3)].a_constr)); } break; - case 225: -#line 1790 "asn1p_y.y" + case 227: +#line 1788 "asn1p_y.y" { CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_INT, (yyvsp[(1) - (3)].a_constr), (yyvsp[(3) - (3)].a_constr)); } break; - case 227: -#line 1798 "asn1p_y.y" + case 229: +#line 1796 "asn1p_y.y" { CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_EXC, (yyvsp[(1) - (3)].a_constr), (yyvsp[(3) - (3)].a_constr)); } break; - case 228: -#line 1804 "asn1p_y.y" + case 230: +#line 1802 "asn1p_y.y" { int ret; (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); @@ -4156,8 +4148,8 @@ yyreduce: } break; - case 229: -#line 1812 "asn1p_y.y" + case 231: +#line 1810 "asn1p_y.y" { int ret; (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); @@ -4168,8 +4160,8 @@ yyreduce: } break; - case 230: -#line 1820 "asn1p_y.y" + case 232: +#line 1818 "asn1p_y.y" { (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); checkmem((yyval.a_constr)); @@ -4178,8 +4170,8 @@ yyreduce: } break; - case 231: -#line 1826 "asn1p_y.y" + case 233: +#line 1824 "asn1p_y.y" { (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); checkmem((yyval.a_constr)); @@ -4188,8 +4180,8 @@ yyreduce: } break; - case 232: -#line 1832 "asn1p_y.y" + case 234: +#line 1830 "asn1p_y.y" { (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); checkmem((yyval.a_constr)); @@ -4199,8 +4191,8 @@ yyreduce: } break; - case 233: -#line 1839 "asn1p_y.y" + case 235: +#line 1837 "asn1p_y.y" { (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); checkmem((yyval.a_constr)); @@ -4211,8 +4203,8 @@ yyreduce: } break; - case 234: -#line 1847 "asn1p_y.y" + case 236: +#line 1845 "asn1p_y.y" { (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); checkmem((yyval.a_constr)); @@ -4223,8 +4215,8 @@ yyreduce: } break; - case 235: -#line 1855 "asn1p_y.y" + case 237: +#line 1853 "asn1p_y.y" { (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); checkmem((yyval.a_constr)); @@ -4236,27 +4228,13 @@ yyreduce: } break; - case 236: + case 240: #line 1864 "asn1p_y.y" - { - (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); - } - break; - - case 237: -#line 1867 "asn1p_y.y" - { - (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); - } - break; - - case 238: -#line 1870 "asn1p_y.y" { asn1p_lexer_hack_push_opaque_state(); } break; - case 239: -#line 1870 "asn1p_y.y" + case 241: +#line 1864 "asn1p_y.y" { (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); checkmem((yyval.a_constr)); @@ -4266,8 +4244,8 @@ yyreduce: } break; - case 240: -#line 1880 "asn1p_y.y" + case 242: +#line 1874 "asn1p_y.y" { (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); (yyval.a_constr)->type = ACT_CT_PATTERN; @@ -4275,8 +4253,8 @@ yyreduce: } break; - case 241: -#line 1885 "asn1p_y.y" + case 243: +#line 1879 "asn1p_y.y" { asn1p_ref_t *ref; (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); @@ -4288,22 +4266,22 @@ yyreduce: } break; - case 242: -#line 1897 "asn1p_y.y" + case 244: +#line 1891 "asn1p_y.y" { (yyval.a_ctype) = ACT_CT_SIZE; } break; - case 243: -#line 1900 "asn1p_y.y" + case 245: +#line 1894 "asn1p_y.y" { (yyval.a_ctype) = ACT_CT_FROM; } break; - case 244: -#line 1906 "asn1p_y.y" + case 246: +#line 1900 "asn1p_y.y" { (yyval.a_value) = asn1p_value_fromint(0); checkmem((yyval.a_value)); @@ -4311,8 +4289,8 @@ yyreduce: } break; - case 245: -#line 1911 "asn1p_y.y" + case 247: +#line 1905 "asn1p_y.y" { (yyval.a_value) = asn1p_value_fromint(1); checkmem((yyval.a_value)); @@ -4320,8 +4298,8 @@ yyreduce: } break; - case 249: -#line 1919 "asn1p_y.y" + case 251: +#line 1913 "asn1p_y.y" { asn1p_ref_t *ref; int ret; @@ -4335,8 +4313,8 @@ yyreduce: } break; - case 250: -#line 1933 "asn1p_y.y" + case 252: +#line 1927 "asn1p_y.y" { (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'B'); checkmem((yyval.a_value)); @@ -4344,8 +4322,8 @@ yyreduce: } break; - case 251: -#line 1938 "asn1p_y.y" + case 253: +#line 1932 "asn1p_y.y" { (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'H'); checkmem((yyval.a_value)); @@ -4353,102 +4331,118 @@ yyreduce: } break; - case 252: -#line 1946 "asn1p_y.y" + case 254: +#line 1940 "asn1p_y.y" { - (yyval.a_value) = asn1p_value_fromref((yyvsp[(1) - (1)].a_ref), 0); + (yyval.a_value) = asn1p_value_fromtype((yyvsp[(1) - (1)].a_expr)); checkmem((yyval.a_value)); - } + } break; - case 253: -#line 1966 "asn1p_y.y" + case 255: +#line 1951 "asn1p_y.y" { CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_WCOMP, (yyvsp[(3) - (3)].a_constr), 0); } break; - case 254: -#line 1969 "asn1p_y.y" + case 256: +#line 1954 "asn1p_y.y" { - CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_WCOMPS, (yyvsp[(4) - (5)].a_constr), 0); + assert((yyvsp[(3) - (3)].a_constr)->type == ACT_CA_CSV); + (yyvsp[(3) - (3)].a_constr)->type = ACT_CT_WCOMPS; + (yyval.a_constr) = (yyvsp[(3) - (3)].a_constr); } break; - case 255: -#line 1975 "asn1p_y.y" + case 260: +#line 1962 "asn1p_y.y" + { (yyval.a_constr) = (yyvsp[(2) - (3)].a_constr); } + break; + + case 261: +#line 1964 "asn1p_y.y" { - (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); - } + assert((yyvsp[(4) - (5)].a_constr)->type == ACT_CA_CSV); + (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); + (yyval.a_constr)->type = ACT_CA_CSV; + asn1p_constraint_t *ct = asn1p_constraint_new(yylineno, currentModule); + checkmem((yyval.a_constr)); + ct->type = ACT_EL_EXT; + asn1p_constraint_insert((yyval.a_constr), ct); + for(unsigned i = 0; i < (yyvsp[(4) - (5)].a_constr)->el_count; i++) { + asn1p_constraint_insert((yyval.a_constr), (yyvsp[(4) - (5)].a_constr)->elements[i]); + } + } break; - case 256: -#line 1978 "asn1p_y.y" + case 262: +#line 1977 "asn1p_y.y" { - CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_WCOMPS, (yyvsp[(1) - (3)].a_constr), (yyvsp[(3) - (3)].a_constr)); - } + (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); + (yyval.a_constr)->type = ACT_CA_CSV; + asn1p_constraint_insert((yyval.a_constr), (yyvsp[(1) - (1)].a_constr)); + } break; - case 257: -#line 1984 "asn1p_y.y" + case 263: +#line 1982 "asn1p_y.y" { - (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); - checkmem((yyval.a_constr)); - (yyval.a_constr)->type = ACT_EL_EXT; - (yyval.a_constr)->value = asn1p_value_frombuf("...", 3, 1); + (yyval.a_constr) = (yyvsp[(1) - (3)].a_constr); + asn1p_constraint_insert((yyval.a_constr), (yyvsp[(3) - (3)].a_constr)); } break; - case 258: -#line 1990 "asn1p_y.y" + case 264: +#line 1988 "asn1p_y.y" { - (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); - checkmem((yyval.a_constr)); - (yyval.a_constr)->type = ACT_EL_VALUE; - (yyval.a_constr)->value = asn1p_value_frombuf((yyvsp[(1) - (3)].tv_str), strlen((yyvsp[(1) - (3)].tv_str)), 0); - (yyval.a_constr)->presence = (yyvsp[(3) - (3)].a_pres); - if((yyvsp[(2) - (3)].a_constr)) asn1p_constraint_insert((yyval.a_constr), (yyvsp[(2) - (3)].a_constr)); - } + (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); + checkmem((yyval.a_constr)); + (yyval.a_constr)->type = ACT_EL_VALUE; + (yyval.a_constr)->value = (yyvsp[(1) - (3)].a_value); + if((yyvsp[(2) - (3)].a_constr)) asn1p_constraint_insert((yyval.a_constr), (yyvsp[(2) - (3)].a_constr)); + (yyval.a_constr)->presence = (yyvsp[(3) - (3)].a_pres); + } break; - case 259: -#line 2004 "asn1p_y.y" + case 265: +#line 2002 "asn1p_y.y" { (yyval.a_pres) = ACPRES_DEFAULT; } break; - case 260: -#line 2005 "asn1p_y.y" + case 266: +#line 2003 "asn1p_y.y" { (yyval.a_pres) = (yyvsp[(1) - (1)].a_pres); } break; - case 261: -#line 2009 "asn1p_y.y" + case 267: +#line 2007 "asn1p_y.y" { (yyval.a_pres) = ACPRES_PRESENT; } break; - case 262: -#line 2012 "asn1p_y.y" + case 268: +#line 2010 "asn1p_y.y" { (yyval.a_pres) = ACPRES_ABSENT; } break; - case 263: -#line 2015 "asn1p_y.y" + case 269: +#line 2013 "asn1p_y.y" { (yyval.a_pres) = ACPRES_OPTIONAL; } break; - case 267: -#line 2030 "asn1p_y.y" + case 273: +#line 2028 "asn1p_y.y" { asn1p_lexer_hack_push_opaque_state(); } break; - case 268: -#line 2030 "asn1p_y.y" + case 274: +#line 2028 "asn1p_y.y" { (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); checkmem((yyval.a_constr)); @@ -4459,8 +4453,8 @@ yyreduce: } break; - case 269: -#line 2041 "asn1p_y.y" + case 275: +#line 2039 "asn1p_y.y" { (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); (yyval.a_constr)->type = ACT_CT_CTNG; @@ -4469,42 +4463,42 @@ yyreduce: } break; - case 270: -#line 2050 "asn1p_y.y" + case 276: +#line 2048 "asn1p_y.y" { (yyval.a_ctype) = ACT_EL_RANGE; } break; - case 271: -#line 2051 "asn1p_y.y" + case 277: +#line 2049 "asn1p_y.y" { (yyval.a_ctype) = ACT_EL_RLRANGE; } break; - case 272: -#line 2052 "asn1p_y.y" + case 278: +#line 2050 "asn1p_y.y" { (yyval.a_ctype) = ACT_EL_LLRANGE; } break; - case 273: -#line 2053 "asn1p_y.y" + case 279: +#line 2051 "asn1p_y.y" { (yyval.a_ctype) = ACT_EL_ULRANGE; } break; - case 274: -#line 2056 "asn1p_y.y" + case 280: +#line 2054 "asn1p_y.y" { (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); } break; - case 275: -#line 2059 "asn1p_y.y" + case 281: +#line 2057 "asn1p_y.y" { (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr); } break; - case 276: -#line 2068 "asn1p_y.y" + case 282: +#line 2066 "asn1p_y.y" { asn1p_ref_t *ref = asn1p_ref_new(yylineno, currentModule); asn1p_constraint_t *ct; @@ -4520,15 +4514,15 @@ yyreduce: } break; - case 277: -#line 2084 "asn1p_y.y" + case 283: +#line 2082 "asn1p_y.y" { CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CRC, (yyvsp[(1) - (4)].a_constr), (yyvsp[(3) - (4)].a_constr)); } break; - case 278: -#line 2090 "asn1p_y.y" + case 284: +#line 2088 "asn1p_y.y" { (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule); checkmem((yyval.a_constr)); @@ -4537,8 +4531,8 @@ yyreduce: } break; - case 279: -#line 2096 "asn1p_y.y" + case 285: +#line 2094 "asn1p_y.y" { asn1p_constraint_t *ct; ct = asn1p_constraint_new(yylineno, currentModule); @@ -4549,8 +4543,8 @@ yyreduce: } break; - case 280: -#line 2110 "asn1p_y.y" + case 286: +#line 2108 "asn1p_y.y" { char *p = malloc(strlen((yyvsp[(2) - (2)].tv_str)) + 2); int ret; @@ -4564,8 +4558,8 @@ yyreduce: } break; - case 281: -#line 2121 "asn1p_y.y" + case 287: +#line 2119 "asn1p_y.y" { char *p = malloc(strlen((yyvsp[(3) - (3)].tv_str)) + 3); int ret; @@ -4580,15 +4574,15 @@ yyreduce: } break; - case 282: -#line 2137 "asn1p_y.y" + case 288: +#line 2135 "asn1p_y.y" { (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); } break; - case 283: -#line 2140 "asn1p_y.y" + case 289: +#line 2138 "asn1p_y.y" { int l1 = strlen((yyvsp[(1) - (3)].tv_str)); int l3 = strlen((yyvsp[(3) - (3)].tv_str)); @@ -4602,52 +4596,52 @@ yyreduce: } break; - case 284: -#line 2160 "asn1p_y.y" + case 290: +#line 2158 "asn1p_y.y" { (yyval.a_marker).flags = EM_NOMARK; (yyval.a_marker).default_value = 0; } break; - case 285: -#line 2164 "asn1p_y.y" + case 291: +#line 2162 "asn1p_y.y" { (yyval.a_marker) = (yyvsp[(1) - (1)].a_marker); } break; - case 286: -#line 2168 "asn1p_y.y" + case 292: +#line 2166 "asn1p_y.y" { (yyval.a_marker).flags = EM_OPTIONAL | EM_INDIRECT; (yyval.a_marker).default_value = 0; } break; - case 287: -#line 2172 "asn1p_y.y" + case 293: +#line 2170 "asn1p_y.y" { (yyval.a_marker).flags = EM_DEFAULT; (yyval.a_marker).default_value = (yyvsp[(2) - (2)].a_value); } break; - case 288: -#line 2195 "asn1p_y.y" + case 294: +#line 2193 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); } break; - case 289: -#line 2199 "asn1p_y.y" + case 295: +#line 2197 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr); } break; - case 290: -#line 2205 "asn1p_y.y" + case 296: +#line 2203 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -4655,16 +4649,16 @@ yyreduce: } break; - case 291: -#line 2210 "asn1p_y.y" + case 297: +#line 2208 "asn1p_y.y" { (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr); asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr)); } break; - case 292: -#line 2217 "asn1p_y.y" + case 298: +#line 2215 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -4674,8 +4668,8 @@ yyreduce: } break; - case 293: -#line 2224 "asn1p_y.y" + case 299: +#line 2222 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -4686,8 +4680,8 @@ yyreduce: } break; - case 294: -#line 2232 "asn1p_y.y" + case 300: +#line 2230 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -4698,8 +4692,8 @@ yyreduce: } break; - case 295: -#line 2240 "asn1p_y.y" + case 301: +#line 2238 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -4709,8 +4703,8 @@ yyreduce: } break; - case 296: -#line 2247 "asn1p_y.y" + case 302: +#line 2245 "asn1p_y.y" { (yyval.a_expr) = NEW_EXPR(); checkmem((yyval.a_expr)); @@ -4721,138 +4715,153 @@ yyreduce: } break; - case 297: -#line 2258 "asn1p_y.y" + case 303: +#line 2256 "asn1p_y.y" { (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int)); checkmem((yyval.a_value)); } break; - case 298: -#line 2262 "asn1p_y.y" + case 304: +#line 2260 "asn1p_y.y" { (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int)); checkmem((yyval.a_value)); } break; - case 300: -#line 2270 "asn1p_y.y" + case 306: +#line 2268 "asn1p_y.y" { (yyval.a_value) = asn1p_value_fromdouble((yyvsp[(1) - (1)].a_dbl)); checkmem((yyval.a_value)); } break; - case 301: -#line 2301 "asn1p_y.y" + case 307: +#line 2299 "asn1p_y.y" { memset(&(yyval.a_tag), 0, sizeof((yyval.a_tag))); } break; - case 302: -#line 2302 "asn1p_y.y" + case 308: +#line 2300 "asn1p_y.y" { (yyval.a_tag) = (yyvsp[(1) - (1)].a_tag); } break; - case 303: -#line 2306 "asn1p_y.y" + case 309: +#line 2304 "asn1p_y.y" { (yyval.a_tag) = (yyvsp[(1) - (2)].a_tag); (yyval.a_tag).tag_mode = (yyvsp[(2) - (2)].a_tag).tag_mode; } break; - case 304: -#line 2313 "asn1p_y.y" + case 310: +#line 2311 "asn1p_y.y" { (yyval.a_tag) = (yyvsp[(2) - (4)].a_tag); (yyval.a_tag).tag_value = (yyvsp[(3) - (4)].a_int); } break; - case 305: -#line 2319 "asn1p_y.y" + case 311: +#line 2317 "asn1p_y.y" { (yyval.a_tag).tag_class = TC_CONTEXT_SPECIFIC; } break; - case 306: -#line 2320 "asn1p_y.y" + case 312: +#line 2318 "asn1p_y.y" { (yyval.a_tag).tag_class = TC_UNIVERSAL; } break; - case 307: -#line 2321 "asn1p_y.y" + case 313: +#line 2319 "asn1p_y.y" { (yyval.a_tag).tag_class = TC_APPLICATION; } break; - case 308: -#line 2322 "asn1p_y.y" + case 314: +#line 2320 "asn1p_y.y" { (yyval.a_tag).tag_class = TC_PRIVATE; } break; - case 309: -#line 2326 "asn1p_y.y" + case 315: +#line 2324 "asn1p_y.y" { (yyval.a_tag).tag_mode = TM_DEFAULT; } break; - case 310: -#line 2327 "asn1p_y.y" + case 316: +#line 2325 "asn1p_y.y" { (yyval.a_tag).tag_mode = TM_IMPLICIT; } break; - case 311: -#line 2328 "asn1p_y.y" + case 317: +#line 2326 "asn1p_y.y" { (yyval.a_tag).tag_mode = TM_EXPLICIT; } break; - case 312: -#line 2332 "asn1p_y.y" + case 318: +#line 2330 "asn1p_y.y" { checkmem((yyvsp[(1) - (1)].tv_str)); (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); } break; - case 313: -#line 2336 "asn1p_y.y" + case 319: +#line 2334 "asn1p_y.y" { checkmem((yyvsp[(1) - (1)].tv_str)); (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); } break; - case 314: -#line 2344 "asn1p_y.y" + case 320: +#line 2342 "asn1p_y.y" { checkmem((yyvsp[(1) - (1)].tv_str)); (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); } break; - case 315: -#line 2351 "asn1p_y.y" + case 321: +#line 2349 "asn1p_y.y" { (yyval.tv_str) = 0; } break; - case 316: -#line 2352 "asn1p_y.y" + case 322: +#line 2350 "asn1p_y.y" { (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); } break; - case 317: -#line 2358 "asn1p_y.y" + case 323: +#line 2356 "asn1p_y.y" { checkmem((yyvsp[(1) - (1)].tv_str)); (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str); } break; + case 324: +#line 2363 "asn1p_y.y" + { + (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); + asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_lowercase); + } + break; + + case 325: +#line 2369 "asn1p_y.y" + { + (yyval.a_value) = asn1p_value_fromref((yyvsp[(1) - (1)].a_ref), 0); + } + break; + /* Line 1267 of yacc.c. */ -#line 4856 "asn1p_y.c" +#line 4865 "asn1p_y.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -5066,7 +5075,7 @@ yyreturn: } -#line 2364 "asn1p_y.y" +#line 2373 "asn1p_y.y" @@ -5211,8 +5220,8 @@ yyerror(const char *msg) { extern char *asn1p_text; fprintf(stderr, "ASN.1 grammar parse error " - "near line %d (token \"%s\"): %s\n", - yylineno, asn1p_text, msg); + "near %s:%d (token \"%s\"): %s\n", + ASN_FILENAME, yylineno, asn1p_text, msg); return -1; } diff --git a/libasn1parser/asn1p_y.h b/libasn1parser/asn1p_y.h index b47dea43..65b7d6bf 100644 --- a/libasn1parser/asn1p_y.h +++ b/libasn1parser/asn1p_y.h @@ -260,7 +260,7 @@ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 88 "asn1p_y.y" +#line 90 "asn1p_y.y" { asn1p_t *a_grammar; asn1p_module_flags_e a_module_flags; diff --git a/libasn1parser/asn1p_y.y b/libasn1parser/asn1p_y.y index 88d5a2ca..4cd38795 100644 --- a/libasn1parser/asn1p_y.y +++ b/libasn1parser/asn1p_y.y @@ -22,6 +22,8 @@ void asn1p_lexer_hack_enable_with_syntax(void); void asn1p_lexer_hack_push_encoding_control(void); #define yylineno asn1p_lineno extern int asn1p_lineno; +const char *asn1p_parse_debug_filename; +#define ASN_FILENAME asn1p_parse_debug_filename /* * Process directives as <ASN1C:RepresentAsPointer> @@ -295,6 +297,8 @@ static asn1p_module_t *currentModule; %type <tv_str> TypeRefName %type <tv_str> ObjectClassReference %type <tv_str> Identifier +%type <a_ref> IdentifierAsReference +%type <a_value> IdentifierAsValue %type <tv_str> optIdentifier %type <a_parg> ParameterArgumentName %type <a_plist> ParameterArgumentList @@ -314,9 +318,16 @@ static asn1p_module_t *currentModule; %type <a_tag> TagClass TagTypeValue TagPlicit %type <a_tag> optTag /* [UNIVERSAL 0] IMPLICIT */ %type <a_constr> optConstraints +%type <a_constr> optSizeConstraints %type <a_constr> Constraint +%type <a_constr> SingleTypeConstraint +%type <a_constr> MultipleTypeConstraints +%type <a_constr> NamedConstraint +%type <a_constr> FullSpecification +%type <a_constr> PartialSpecification +%type <a_constr> TypeConstraints +%type <a_constr> ConstraintSpec %type <a_constr> SubtypeConstraint -%type <a_constr> ConstraintSpecs %type <a_constr> GeneralConstraint %type <a_constr> SetOfConstraints %type <a_constr> ElementSetSpecs /* 1..2,...,3 */ @@ -331,14 +342,12 @@ static asn1p_module_t *currentModule; %type <a_constr> ContentsConstraint %type <a_constr> PatternConstraint %type <a_constr> InnerTypeConstraint -%type <a_constr> WithComponentsList -%type <a_constr> WithComponentsElement %type <a_constr> ComponentRelationConstraint %type <a_constr> AtNotationList %type <a_ref> AtNotationElement %type <a_value> SingleValue %type <a_value> ContainedSubtype -%type <a_ctype> ConstraintSpec +%type <a_ctype> ConstraintType %type <a_ctype> ConstraintRangeSpec %type <a_value> RestrictedCharacterStringValue %type <a_wsynt> optWithSyntax @@ -505,9 +514,9 @@ ModuleDefinitionFlag: $$ = MSF_XER_INSTRUCTIONS; } else { fprintf(stderr, - "WARNING: %s INSTRUCTIONS at line %d: " + "WARNING: %s INSTRUCTIONS at %s:%d: " "Unrecognized encoding reference\n", - $1, yylineno); + $1, ASN_FILENAME, yylineno); $$ = MSF_unk_INSTRUCTIONS; } free($1); @@ -594,8 +603,8 @@ Assignment: { fprintf(stderr, "WARNING: ENCODING-CONTROL %s " - "specification at line %d ignored\n", - $2, yylineno); + "specification at %s:%d ignored\n", + $2, ASN_FILENAME, yylineno); free($2); $$ = 0; } @@ -1263,11 +1272,11 @@ TypeDeclaration: && ($$->marker.flags & EM_OPTIONAL) != EM_OPTIONAL) { fprintf(stderr, "INFO: Directive <ASN1C:RepresentAsPointer> " - "applied to %s at line %d\n", + "applied to %s at %s:%d\n", ASN_EXPR_TYPE2STR($$->expr_type) ? ASN_EXPR_TYPE2STR($$->expr_type) : "member", - $$->_lineno + ASN_FILENAME, $$->_lineno ); } } @@ -1295,7 +1304,7 @@ TypeDeclarationSet: $$->expr_type = ASN_CONSTR_SET; $$->meta_type = AMT_TYPE; } - | TOK_SEQUENCE optConstraints TOK_OF optIdentifier optTag TypeDeclaration { + | TOK_SEQUENCE optSizeConstraints TOK_OF optIdentifier optTag TypeDeclaration { $$ = NEW_EXPR(); checkmem($$); $$->constraints = $2; @@ -1305,7 +1314,7 @@ TypeDeclarationSet: $6->tag = $5; asn1p_expr_add($$, $6); } - | TOK_SET optConstraints TOK_OF optIdentifier optTag TypeDeclaration { + | TOK_SET optSizeConstraints TOK_OF optIdentifier optTag TypeDeclaration { $$ = NEW_EXPR(); checkmem($$); $$->constraints = $2; @@ -1705,56 +1714,45 @@ BasicString: UnionMark: '|' | TOK_UNION; IntersectionMark: '^' | TOK_INTERSECTION; +/* empty | Constraint */ optConstraints: { $$ = 0; } - | Constraint { - $$ = $1; + | Constraint; + +/* empty | Constraint | SIZE(...) */ +optSizeConstraints: + { $$ = 0; } + | Constraint + | TOK_SIZE '(' ConstraintSpec ')' { + CONSTRAINT_INSERT($$, ACT_CT_SIZE, $3, 0); } ; Constraint: - SubtypeConstraint - ; - -SubtypeConstraint: - SetOfConstraints { + SetOfConstraints { CONSTRAINT_INSERT($$, ACT_CA_SET, $1, 0); - } - | TOK_SIZE '(' ConstraintSpecs ')' { - /* - * This is a special case, for compatibility purposes. - * It goes without parentheses. - */ - CONSTRAINT_INSERT($$, ACT_CT_SIZE, $3, 0); - } - ; + } + ; SetOfConstraints: - '(' ConstraintSpecs ')' { + '(' ConstraintSpec ')' { $$ = $2; } - | SetOfConstraints '(' ConstraintSpecs ')' { + | SetOfConstraints '(' ConstraintSpec ')' { CONSTRAINT_INSERT($$, ACT_CA_SET, $1, $3); } ; -ConstraintSpecs: - ElementSetSpecs { - $$ = $1; - } - | GeneralConstraint { - $$ = $1; - } - ; +ConstraintSpec: SubtypeConstraint | GeneralConstraint; + +SubtypeConstraint: ElementSetSpecs; ElementSetSpecs: TOK_ThreeDots { $$ = asn1p_constraint_new(yylineno, currentModule); $$->type = ACT_EL_EXT; } - | ElementSetSpec { - $$ = $1; - } + | ElementSetSpec | ElementSetSpec ',' TOK_ThreeDots { asn1p_constraint_t *ct; ct = asn1p_constraint_new(yylineno, currentModule); @@ -1801,7 +1799,7 @@ IntersectionElements: ; ConstraintSubtypeElement: - ConstraintSpec '(' ElementSetSpecs ')' { + ConstraintType '(' ElementSetSpecs ')' { int ret; $$ = asn1p_constraint_new(yylineno, currentModule); checkmem($$); @@ -1861,12 +1859,8 @@ ConstraintSubtypeElement: $$->range_start->type = ATV_MIN; $$->range_stop->type = ATV_MAX; } - | InnerTypeConstraint { - $$ = $1; - } - | PatternConstraint { - $$ = $1; - } + | InnerTypeConstraint + | PatternConstraint | '{' { asn1p_lexer_hack_push_opaque_state(); } Opaque /* '}' */ { $$ = asn1p_constraint_new(yylineno, currentModule); checkmem($$); @@ -1893,7 +1887,7 @@ PatternConstraint: } ; -ConstraintSpec: +ConstraintType: TOK_SIZE { $$ = ACT_CT_SIZE; } @@ -1943,62 +1937,66 @@ BitStringValue: ; ContainedSubtype: - ComplexTypeReference { - $$ = asn1p_value_fromref($1, 0); - checkmem($$); - } -/* - TypeRefName { - asn1p_ref_t *ref; - int ret; - ref = asn1p_ref_new(yylineno, currentModule); - checkmem(ref); - ret = asn1p_ref_add_component(ref, $1, RLT_UNKNOWN); - checkmem(ret == 0); - $$ = asn1p_value_fromref(ref, 0); + Type { + $$ = asn1p_value_fromtype($1); checkmem($$); - free($1); - } -*/ + } ; +/* + * X.680 08/2015 + * #51.8.5 + */ InnerTypeConstraint: - TOK_WITH TOK_COMPONENT SetOfConstraints { + TOK_WITH TOK_COMPONENT SingleTypeConstraint { CONSTRAINT_INSERT($$, ACT_CT_WCOMP, $3, 0); } - | TOK_WITH TOK_COMPONENTS '{' WithComponentsList '}' { - CONSTRAINT_INSERT($$, ACT_CT_WCOMPS, $4, 0); - } - ; - -WithComponentsList: - WithComponentsElement { - $$ = $1; - } - | WithComponentsList ',' WithComponentsElement { - CONSTRAINT_INSERT($$, ACT_CT_WCOMPS, $1, $3); + | TOK_WITH TOK_COMPONENTS MultipleTypeConstraints { + assert($3->type == ACT_CA_CSV); + $3->type = ACT_CT_WCOMPS; + $$ = $3; } ; - -WithComponentsElement: - TOK_ThreeDots { - $$ = asn1p_constraint_new(yylineno, currentModule); - checkmem($$); - $$->type = ACT_EL_EXT; - $$->value = asn1p_value_frombuf("...", 3, 1); - } - | Identifier optConstraints optPresenceConstraint { +SingleTypeConstraint: Constraint; +MultipleTypeConstraints: FullSpecification | PartialSpecification; +FullSpecification: '{' TypeConstraints '}' { $$ = $2; }; +PartialSpecification: + '{' TOK_ThreeDots ',' TypeConstraints '}' { + assert($4->type == ACT_CA_CSV); $$ = asn1p_constraint_new(yylineno, currentModule); + $$->type = ACT_CA_CSV; + asn1p_constraint_t *ct = asn1p_constraint_new(yylineno, currentModule); checkmem($$); - $$->type = ACT_EL_VALUE; - $$->value = asn1p_value_frombuf($1, strlen($1), 0); - $$->presence = $3; - if($2) asn1p_constraint_insert($$, $2); - } - ; + ct->type = ACT_EL_EXT; + asn1p_constraint_insert($$, ct); + for(unsigned i = 0; i < $4->el_count; i++) { + asn1p_constraint_insert($$, $4->elements[i]); + } + }; +TypeConstraints: + NamedConstraint { + $$ = asn1p_constraint_new(yylineno, currentModule); + $$->type = ACT_CA_CSV; + asn1p_constraint_insert($$, $1); + } + | TypeConstraints ',' NamedConstraint { + $$ = $1; + asn1p_constraint_insert($$, $3); + } + ; +NamedConstraint: + IdentifierAsValue optConstraints optPresenceConstraint { + $$ = asn1p_constraint_new(yylineno, currentModule); + checkmem($$); + $$->type = ACT_EL_VALUE; + $$->value = $1; + if($2) asn1p_constraint_insert($$, $2); + $$->presence = $3; + } + ; /* - * presence constraint for WithComponents + * presence constraint for NamedConstraint */ optPresenceConstraint: { $$ = ACPRES_DEFAULT; } @@ -2361,6 +2359,17 @@ Identifier: } ; +IdentifierAsReference: + Identifier { + $$ = asn1p_ref_new(yylineno, currentModule); + asn1p_ref_add_component($$, $1, RLT_lowercase); + }; + +IdentifierAsValue: + IdentifierAsReference { + $$ = asn1p_value_fromref($1, 0); + }; + %% @@ -2505,8 +2514,8 @@ yyerror(const char *msg) { extern char *asn1p_text; fprintf(stderr, "ASN.1 grammar parse error " - "near line %d (token \"%s\"): %s\n", - yylineno, asn1p_text, msg); + "near %s:%d (token \"%s\"): %s\n", + ASN_FILENAME, yylineno, asn1p_text, msg); return -1; } diff --git a/libasn1parser/asn1parser.c b/libasn1parser/asn1parser.c index 405c880f..374f68e7 100644 --- a/libasn1parser/asn1parser.c +++ b/libasn1parser/asn1parser.c @@ -38,7 +38,9 @@ asn1p_parse_buffer(const char *buffer, int size /* = -1 */, enum asn1p_flags fla if(size < 0) size = (int)strlen(buffer); + asn1p_parse_debug_filename = "<stdin>"; ybuf = asn1p__scan_bytes(buffer, size); + asn1p_parse_debug_filename = NULL; if(!ybuf) { assert(ybuf); return 0; @@ -106,7 +108,9 @@ asn1p_parse_file(const char *filename, enum asn1p_flags flags) { asn1p_restart(fp); ap = (void *)&a; + asn1p_parse_debug_filename = filename; ret = asn1p_parse(ap); + asn1p_parse_debug_filename = NULL; fclose(fp); diff --git a/libasn1parser/asn1parser.h b/libasn1parser/asn1parser.h index 3388fa6c..584a3dc4 100644 --- a/libasn1parser/asn1parser.h +++ b/libasn1parser/asn1parser.h @@ -43,6 +43,8 @@ asn1p_t *asn1p_parse_file(const char *filename, asn1p_t *asn1p_parse_buffer(const char *buffer, int size /* = -1 */, enum asn1p_flags); +extern const char *asn1p_parse_debug_filename; + int asn1p_lex_destroy(); #endif /* ASN1PARSER_H */ diff --git a/libasn1print/asn1print.c b/libasn1print/asn1print.c index 664554ed..92c8d0e3 100644 --- a/libasn1print/asn1print.c +++ b/libasn1print/asn1print.c @@ -337,6 +337,7 @@ asn1p_constraint_string(const asn1p_constraint_t *ct) { static int asn1print_constraint(const asn1p_constraint_t *ct, enum asn1print_flags flags) { int symno = 0; + int perhaps_subconstraints = 0; if(ct == 0) return 0; @@ -346,9 +347,11 @@ asn1print_constraint(const asn1p_constraint_t *ct, enum asn1print_flags flags) { switch(ct->type) { case ACT_EL_TYPE: asn1print_value(ct->containedSubtype, flags); + perhaps_subconstraints = 1; break; case ACT_EL_VALUE: asn1print_value(ct->value, flags); + perhaps_subconstraints = 1; break; case ACT_EL_RANGE: case ACT_EL_LLRANGE: @@ -382,9 +385,8 @@ asn1print_constraint(const asn1p_constraint_t *ct, enum asn1print_flags flags) { case ACT_CT_WCOMP: assert(ct->el_count != 0); assert(ct->el_count == 1); - safe_printf("WITH COMPONENT ("); - asn1print_constraint(ct->elements[0], flags); - safe_printf(")"); + safe_printf("WITH COMPONENT"); + perhaps_subconstraints = 1; break; case ACT_CT_WCOMPS: { unsigned int i; @@ -392,14 +394,7 @@ asn1print_constraint(const asn1p_constraint_t *ct, enum asn1print_flags flags) { for(i = 0; i < ct->el_count; i++) { asn1p_constraint_t *cel = ct->elements[i]; if(i) safe_printf(", "); - safe_fwrite(cel->value->value.string.buf, - cel->value->value.string.size); - if(cel->el_count) { - assert(cel->el_count == 1); - safe_printf(" "); - asn1print_constraint(cel->elements[0], - flags); - } + asn1print_constraint(cel, flags); switch(cel->presence) { case ACPRES_DEFAULT: break; case ACPRES_PRESENT: safe_printf(" PRESENT"); break; @@ -441,22 +436,27 @@ asn1print_constraint(const asn1p_constraint_t *ct, enum asn1print_flags flags) { if(ct->type == ACT_CA_CRC) safe_printf("{"); asn1print_constraint(ct->elements[i], flags); if(ct->type == ACT_CA_CRC) safe_printf("}"); - if(i+1 < ct->el_count - && ct->type == ACT_CA_SET) - safe_printf(")"); + if(ct->type == ACT_CA_SET && i+1 < ct->el_count) + safe_printf(") "); } } break; case ACT_CA_AEX: assert(ct->el_count == 1); - safe_printf("ALL EXCEPT "); - asn1print_constraint(ct->elements[0], flags); + safe_printf("ALL EXCEPT"); + perhaps_subconstraints = 1; break; case ACT_INVALID: assert(ct->type != ACT_INVALID); break; } + if(perhaps_subconstraints && ct->el_count) { + safe_printf(" "); + assert(ct->el_count == 1); + asn1print_constraint(ct->elements[0], flags); + } + if(ct->type == ACT_CA_SET) safe_printf(")"); @@ -591,8 +591,25 @@ asn1print_constraint_explain(const char *dbg_name, asn1p_expr_type_e expr_type, static int asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1print_flags flags, int level) { int SEQ_OF = 0; + int has_space = 0; - if(flags & APF_LINE_COMMENTS && !(flags & APF_NOINDENT)) +#define HAS_SPACE() \ + do { \ + has_space = 1; \ + } while(0) +#define ENSURE_SPACE() \ + do { \ + if(!has_space) { \ + has_space = 1; \ + safe_printf(" "); \ + } \ + } while(0) +#define WANT_SPACE() \ + do { \ + has_space = 0; \ + } while(0) + + if(flags & APF_LINE_COMMENTS && !(flags & APF_NOINDENT)) INDENT("-- #line %d\n", tc->_lineno); /* Reconstruct compiler directive information */ @@ -606,8 +623,10 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri if(tc->Identifier && (!(tc->meta_type == AMT_VALUE && tc->expr_type == A1TC_REFERENCE) - || level == 0)) + || level == 0)) { INDENT("%s", tc->Identifier); + WANT_SPACE(); + } if(tc->lhs_params) { asn1print_params(tc->lhs_params, flags); @@ -619,14 +638,17 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri if(level) { if(tc->Identifier && !(flags & APF_NOINDENT)) safe_printf("\t"); - } else { - safe_printf(" ::="); + } else if(tc->Identifier) { + ENSURE_SPACE(); + safe_printf("::="); + WANT_SPACE(); } } if(tc->tag.tag_class) { - safe_printf(" "); + ENSURE_SPACE(); asn1print_tag(tc, flags); + WANT_SPACE(); } switch(tc->expr_type) { @@ -639,12 +661,14 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri case A1TC_COMPONENTS_OF: SEQ_OF = 1; /* Equivalent to SET OF for printint purposes */ safe_printf(" COMPONENTS OF"); + WANT_SPACE(); break; case A1TC_REFERENCE: case A1TC_UNIVERVAL: break; case A1TC_CLASSDEF: safe_printf(" CLASS"); + WANT_SPACE(); break; case A1TC_CLASSFIELD_TFS ... A1TC_CLASSFIELD_OSFS: /* Nothing to print here */ @@ -652,22 +676,26 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri case ASN_CONSTR_SET_OF: case ASN_CONSTR_SEQUENCE_OF: SEQ_OF = 1; + ENSURE_SPACE(); if(tc->expr_type == ASN_CONSTR_SET_OF) - safe_printf(" SET"); + safe_printf("SET"); else - safe_printf(" SEQUENCE"); + safe_printf("SEQUENCE"); if(tc->constraints) { safe_printf(" "); asn1print_constraint(tc->constraints, flags); } safe_printf(" OF"); + WANT_SPACE(); break; case A1TC_VALUESET: break; default: { char *p = ASN_EXPR_TYPE2STR(tc->expr_type); - safe_printf(" %s", p?p:"<unknown type!>"); + ENSURE_SPACE(); + safe_printf("%s", p?p:"<unknown type!>"); + WANT_SPACE(); } break; } @@ -676,12 +704,16 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri * Put the name of the referred type. */ if(tc->reference) { - safe_printf(" "); + ENSURE_SPACE(); asn1print_ref(tc->reference, flags); + WANT_SPACE(); } - if(tc->meta_type == AMT_VALUESET && level == 0) - safe_printf(" ::="); + if(tc->meta_type == AMT_VALUESET && level == 0) { + ENSURE_SPACE(); + safe_printf("::="); + WANT_SPACE(); + } /* * Display the descendants (children) of the current type. @@ -775,7 +807,7 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri safe_printf(")"); } } else { - if(level == 0) safe_printf(" ::= "); + if(level == 0 && tc->Identifier) safe_printf(" ::= "); asn1print_value(tc->value, flags); } } diff --git a/tests/tests-asn1c-compiler/112-param-class-OK.asn1 b/tests/tests-asn1c-compiler/112-param-class-OK.asn1 index d5512dfa..b19bc5eb 100644 --- a/tests/tests-asn1c-compiler/112-param-class-OK.asn1 +++ b/tests/tests-asn1c-compiler/112-param-class-OK.asn1 @@ -14,7 +14,7 @@ BEGIN PCLASS {Type, INTEGER:value, INTEGER:ValueSet} ::= CLASS { &valueField1 Type, &valueField2 INTEGER DEFAULT value, - &valueField3 INTEGER (ValueSet), + &valueField3 INTEGER ({ValueSet}), &ValueSetField INTEGER DEFAULT {ValueSet} } WITH SYNTAX { &valueField1, &valueField2, &valueField3, &ValueSetField } diff --git a/tests/tests-asn1c-compiler/112-param-class-OK.asn1.-EF b/tests/tests-asn1c-compiler/112-param-class-OK.asn1.-EF index 99223679..be11ac02 100644 --- a/tests/tests-asn1c-compiler/112-param-class-OK.asn1.-EF +++ b/tests/tests-asn1c-compiler/112-param-class-OK.asn1.-EF @@ -6,7 +6,7 @@ BEGIN PCLASS{Type, INTEGER:value, INTEGER:ValueSet} ::= CLASS { &valueField1 Type, &valueField2 INTEGER DEFAULT value, - &valueField3 INTEGER (ValueSet), + &valueField3 INTEGER ({ValueSet}), &ValueSetField INTEGER DEFAULT {ValueSet} } WITH SYNTAX { &valueField1, &valueField2, &valueField3, &ValueSetField } diff --git a/tests/tests-asn1c-compiler/118-per-constraint-OK.asn1.-EFprint-constraints b/tests/tests-asn1c-compiler/118-per-constraint-OK.asn1.-EFprint-constraints index e53b8b986885d5e12f9b7af1c7b9c0c2e9e7849d..82764e681e93a930cda453f468960f04fbb3851c 100644 GIT binary patch delta 46 zcmdljxL<Gs3)AFACeg_fOiGixS%o%xGdVLcDopNUF=JBDn7p4|ZE`-V-eyVGMa%#; C!wk0o delta 29 lcmdllxLa@o3lpQp#Qnxhnwpz!m_nE)Ph>IMe1hdWGXRLF32^`b diff --git a/tests/tests-asn1c-compiler/124-multiconstraint-OK.asn1.-EF b/tests/tests-asn1c-compiler/124-multiconstraint-OK.asn1.-EF index efd3214b..e97f1a3e 100644 --- a/tests/tests-asn1c-compiler/124-multiconstraint-OK.asn1.-EF +++ b/tests/tests-asn1c-compiler/124-multiconstraint-OK.asn1.-EF @@ -3,6 +3,6 @@ ModuleMultiConstraint { iso org(3) dod(6) internet(1) private(4) enterprise(1) DEFINITIONS AUTOMATIC TAGS ::= BEGIN -T ::= VisibleString (PATTERN "^[a-z]+$")(CONSTRAINED BY { ... }) +T ::= VisibleString (PATTERN "^[a-z]+$") (CONSTRAINED BY { ... }) END diff --git a/tests/tests-asn1c-compiler/149-with-components-SE.asn1 b/tests/tests-asn1c-compiler/149-with-components-SE.asn1 new file mode 100644 index 00000000..15ec2902 --- /dev/null +++ b/tests/tests-asn1c-compiler/149-with-components-SE.asn1 @@ -0,0 +1,42 @@ +-- SE: Semantic error + +-- iso.org.dod.internet.private.enterprise (1.3.6.1.4.1) +-- .spelio.software.asn1c.test (9363.1.5.1) +-- .149 + +ModuleComplexWithComponents + { iso org(3) dod(6) internet(1) private(4) enterprise(1) + spelio(9363) software(1) asn1c(5) test(1) 149 } +DEFINITIONS ::= BEGIN + +Certificate ::= ExplicitCertificate (WITH COMPONENTS { ..., + issuer (WITH COMPONENTS {sha256AndDigest}), + toBeSigned (WITH COMPONENTS { ..., + id (WITH COMPONENTS { + name ("foo" | "bar") -- Some comment + }), + crlSeries(ScmsSpclComponentCrlSeries), + validityPeriod (WITH COMPONENTS { ..., + duration (CrlgCertExpiration) + }), + region (WITH COMPONENTS { + identifiedRegion (SequenceOfIdentifiedRegion (SIZE(3)) (CONSTRAINED BY { + IdentifiedRegion ( WITH COMPONENTS { countryOnly(Canada) }), + IdentifiedRegion ( WITH COMPONENTS { countryOnly(Mexico) }), + IdentifiedRegion ( WITH COMPONENTS { countryOnly(USA) }) + })) + }), + canRequestRollover (NULL), + encryptionKey ABSENT, + verifyKeyIndicator (WITH COMPONENTS { + verificationKey (WITH COMPONENTS { + ecdsaNistP256 (WITH COMPONENTS { + compressed-y-0, compressed-y-1 + }) + }) + }) + }) +}) + + +END diff --git a/tests/tests-asn1c-compiler/149-with-components-SE.asn1.-E b/tests/tests-asn1c-compiler/149-with-components-SE.asn1.-E new file mode 100644 index 00000000..0a7073dd --- /dev/null +++ b/tests/tests-asn1c-compiler/149-with-components-SE.asn1.-E @@ -0,0 +1,12 @@ +ModuleComplexWithComponents { iso org(3) dod(6) internet(1) private(4) + enterprise(1) spelio(9363) software(1) asn1c(5) test(1) 149 } +DEFINITIONS ::= +BEGIN + +Certificate ::= ExplicitCertificate (WITH COMPONENTS { ..., issuer (WITH COMPONENTS { sha256AndDigest }), toBeSigned (WITH COMPONENTS { ..., id (WITH COMPONENTS { name ("foo" | "bar") }), crlSeries ( ScmsSpclComponentCrlSeries), validityPeriod (WITH COMPONENTS { ..., duration ( CrlgCertExpiration) }), region (WITH COMPONENTS { identifiedRegion ( SequenceOfIdentifiedRegion (SIZE(3)) (CONSTRAINED BY { + IdentifiedRegion ( WITH COMPONENTS { countryOnly(Canada) }), + IdentifiedRegion ( WITH COMPONENTS { countryOnly(Mexico) }), + IdentifiedRegion ( WITH COMPONENTS { countryOnly(USA) }) + })) }), canRequestRollover ( NULL), encryptionKey ABSENT, verifyKeyIndicator (WITH COMPONENTS { verificationKey (WITH COMPONENTS { ecdsaNistP256 (WITH COMPONENTS { compressed-y-0, compressed-y-1 }) }) }) }) }) + +END diff --git a/tests/tests-asn1c-compiler/16-constraint-OK.asn1.-EF b/tests/tests-asn1c-compiler/16-constraint-OK.asn1.-EF index a1f8e851..314f7106 100644 --- a/tests/tests-asn1c-compiler/16-constraint-OK.asn1.-EF +++ b/tests/tests-asn1c-compiler/16-constraint-OK.asn1.-EF @@ -3,9 +3,9 @@ ModuleTestConstraint1 { iso org(3) dod(6) internet(1) private(4) enterprise(1) DEFINITIONS ::= BEGIN -Type0 ::= IA5String (((SIZE(1..10))(FROM("a".."z" | "#")))) +Type0 ::= IA5String (((SIZE(1..10)) (FROM("a".."z" | "#")))) -Type6 ::= IA5String ((SIZE(1..10))(FROM("a".."z" | "#"))) +Type6 ::= IA5String ((SIZE(1..10)) (FROM("a".."z" | "#"))) END @@ -14,7 +14,7 @@ ModuleTestConstraint2 { iso org(3) dod(6) internet(1) private(4) enterprise(1) DEFINITIONS ::= BEGIN -Type1 ::= IA5String (SIZE(1..10,...))(FROM("a".."z" | "#",...)) +Type1 ::= IA5String (SIZE(1..10,...)) (FROM("a".."z" | "#",...)) Type2 ::= IA5String (SIZE(MIN..4) | FROM("abc")) diff --git a/tests/tests-asn1c-compiler/16-constraint-OK.asn1.-EFprint-constraints b/tests/tests-asn1c-compiler/16-constraint-OK.asn1.-EFprint-constraints index 30a57109fc84f6a2171a3841046b7d2886b3e651..df2e07f902b71d7f2ce5d2f4d156d568248a4ed9 100644 GIT binary patch delta 78 zcmaDS`bBiY?#XMJI3_bQicY+)3Sw?%W|U+Eizzc%KxvW55{%N5pEAi#4q!Cj{FKR* Ykx^lCG>hD13l`<c{)`-(lURD#0PM;aNB{r; delta 55 zcmew&`c8Dh?#YQPA`>s@LMV>SQj9E&AogTqCT$SCxtM7+NI-6~EsOHzM3%{H04p~U A*8l(j diff --git a/tests/tests-asn1c-compiler/19-param-OK.asn1 b/tests/tests-asn1c-compiler/19-param-OK.asn1 index 31fa7721..32c31a2f 100644 --- a/tests/tests-asn1c-compiler/19-param-OK.asn1 +++ b/tests/tests-asn1c-compiler/19-param-OK.asn1 @@ -14,7 +14,7 @@ BEGIN SIGNED { ToBeSigned } ::= SEQUENCE { toBeSigned ToBeSigned, algorithm OBJECT IDENTIFIER, - signature BIT STRING SIZE(0..256) + signature BIT STRING (SIZE(0..256)) } Certificate ::= SIGNED { SEQUENCE { diff --git a/tests/tests-asn1c-compiler/19-param-OK.asn1.-EF b/tests/tests-asn1c-compiler/19-param-OK.asn1.-EF index da640152..e1af4830 100644 --- a/tests/tests-asn1c-compiler/19-param-OK.asn1.-EF +++ b/tests/tests-asn1c-compiler/19-param-OK.asn1.-EF @@ -6,7 +6,7 @@ BEGIN SIGNED{ToBeSigned} ::= SEQUENCE { toBeSigned ToBeSigned, algorithm OBJECT IDENTIFIER, - signature BIT STRING SIZE(0..256) + signature BIT STRING (SIZE(0..256)) } Certificate ::= SIGNED{ SEQUENCE { diff --git a/tests/tests-asn1c-compiler/50-constraint-OK.asn1.-EFprint-constraints b/tests/tests-asn1c-compiler/50-constraint-OK.asn1.-EFprint-constraints index da6224d06e711d76e21682848e93ade0039679bc..aa51aa80b4faefeea97db86a2b6d90cbc8c0fa2d 100644 GIT binary patch delta 326 zcmbP`ur^_X6%(VvWGkkN+zJ}Lo_>0Ih6b7nlUe2GPu|RIDS{-XVXCL+>lmS_u=y{u z2P;sIE2q1Ff<~}sl&glJfu5d`xh7C<7UwhO$(MLVC)@J4ZNA0J#W;BZpWI|iHSx** z!t#>?#I{a;!ym(_u-QW(o)Jhb7tCXvY$qbMSx-0X+VrU+7MviY3|C*$O`qAHVP z1iUBz7h|2=%QJg3tGF-Y<P{PSRR!X#n|md=S%AjOkV#=ebN?M_Y;K2m(R^~CqReCk s7S7Fb3aTvfxD}deDrlHO6~}MBsp884v`kHR4an&;WULrjT>V_Q0KmgnIRF3v delta 348 zcmZ3RFd<=s71LyEri+{!zMg)1dWHs?lO^TnPu|9CDFGMJFxAuZb&Sx22$)WG<dK=Y zfrVpo0}JcqC5$Q{dUFiRdzQ&QobG%Y!JbjB8iodXdPe4&nm{4R&3ib{GH>qUO<~;p zo-c)wQ^PID-&aG)(P^^0SlHst0*srt2<9<P_7#!bY$F^7V#rT+6ZYQxSA>&s@?KHp z&01m>Op_HQfTBF&lP5@OOwN*!n5-u&Iaxr8bMtSBb<CUJ>sc{wej=*{G#tqrcW`;Z z9PWh#1@6uE3eqgnaD8Z=)zrZ1-^np7nw!6<_;PST{i~;EJozA>+Gbtp8lX4z>=*$c CLSmr+ diff --git a/tests/tests-asn1c-compiler/72-same-names-OK.asn1 b/tests/tests-asn1c-compiler/72-same-names-OK.asn1 index 8d89dac1..2ab4748d 100644 --- a/tests/tests-asn1c-compiler/72-same-names-OK.asn1 +++ b/tests/tests-asn1c-compiler/72-same-names-OK.asn1 @@ -31,13 +31,13 @@ BEGIN Type2 ::= CHOICE { one-name SEQUENCE { another-name SEQUENCE { - a BIT STRING { one(0) } SIZE(2), + a BIT STRING { one(0) } (SIZE(2)), b INTEGER } }, two-name SET { another-name SEQUENCE { - a BIT STRING { one(0) } SIZE(2), + a BIT STRING { one(0) } (SIZE(2)), b INTEGER } } diff --git a/tests/tests-asn1c-compiler/74-int-enum-constraints-OK.asn1.-EFprint-constraints b/tests/tests-asn1c-compiler/74-int-enum-constraints-OK.asn1.-EFprint-constraints index 22175a15..23d44ded 100644 --- a/tests/tests-asn1c-compiler/74-int-enum-constraints-OK.asn1.-EFprint-constraints +++ b/tests/tests-asn1c-compiler/74-int-enum-constraints-OK.asn1.-EFprint-constraints @@ -34,7 +34,7 @@ Int ::= INTEGER { -- PER-visible constraints (Int): (123) EnumRef ::= Enum (1) --- Combined constraints: (1 | 0)(1) +-- Combined constraints: (1 | 0) (1) -- Practical constraints (Enum): (1) -- OER-visible constraints (Enum): (1) -- PER-visible constraints (Enum): (1) diff --git a/tests/tests-asn1c-compiler/82-with-comps-OK.asn1.-EF b/tests/tests-asn1c-compiler/82-with-comps-OK.asn1.-EF index f4fe9aaa..4d353b8e 100644 --- a/tests/tests-asn1c-compiler/82-with-comps-OK.asn1.-EF +++ b/tests/tests-asn1c-compiler/82-with-comps-OK.asn1.-EF @@ -5,7 +5,7 @@ BEGIN BunchOfStrings ::= SEQUENCE OF VisibleString -Address ::= BunchOfStrings (SIZE(1..6))(WITH COMPONENT (SIZE(1..32))) +Address ::= BunchOfStrings (SIZE(1..6)) (WITH COMPONENT (SIZE(1..32))) Type ::= SEQUENCE { one INTEGER DEFAULT 1 diff --git a/tests/tests-asn1c-compiler/83-with-comps-OK.asn1 b/tests/tests-asn1c-compiler/83-with-comps-OK.asn1 index 7202c5cb..98372553 100644 --- a/tests/tests-asn1c-compiler/83-with-comps-OK.asn1 +++ b/tests/tests-asn1c-compiler/83-with-comps-OK.asn1 @@ -11,10 +11,10 @@ ModuleTestWithComponents2 DEFINITIONS ::= BEGIN - Type1 ::= SET {} + Type1 ::= SET { foo INTEGER OPTIONAL } Type2 ::= SET { - COMPONENTS OF Type1 (WITH COMPONENTS { ... }) + COMPONENTS OF Type1 (WITH COMPONENTS { ..., foo ABSENT }) } END -- 2.26.2