From 805efdd3a71c066b09b6205c4c08f580d3348d12 Mon Sep 17 00:00:00 2001 From: Nikolay Sokolov Date: Tue, 11 Oct 2022 23:22:07 -0700 Subject: [PATCH] Parsing for CHOICE extensions Adds proper handling for CHOICE extensions during parsing. Code generation still needs to be updated. Bug: #2 --- asn1.y | 1 + parser_test.go | 78 +++++- y.go | 681 +++++++++++++++++++++++++------------------------ 3 files changed, 424 insertions(+), 336 deletions(-) diff --git a/asn1.y b/asn1.y index a976627..60680f3 100644 --- a/asn1.y +++ b/asn1.y @@ -742,6 +742,7 @@ ChoiceType : CHOICE OPEN_CURLY AlternativeTypeLists CLOSE_CURLY { $$ = $3 } AlternativeTypeLists : AlternativeTypeList COMMA ExtensionAndException ExtensionAdditionAlternatives OptionalExtensionMarker { $$ = ChoiceType{$1,$4} } | AlternativeTypeList { $$ = ChoiceType{AlternativeTypeList: $1} } + | ExtensionAndException ExtensionAdditionAlternatives OptionalExtensionMarker { $$ = ChoiceType{nil, $2} } ; // defined in grammar, but screws up ExtensionAndException parsing diff --git a/parser_test.go b/parser_test.go index 4d69368..ecafae4 100644 --- a/parser_test.go +++ b/parser_test.go @@ -630,7 +630,83 @@ func TestSequenceSyntax(t *testing.T) { t.Skip(tc.skipReason) } r := testNotFails(t, tc.content) - if diff := cmp.Diff(r.ModuleBody.AssignmentList, tc.expected); diff != "" { + if diff := cmp.Diff(tc.expected, r.ModuleBody.AssignmentList); diff != "" { + t.Errorf("Module did not match expected, diff (-want, +got):\n%v", diff) + } + }) + } +} + +func TestChoiceSyntax(t *testing.T) { + testCases := []struct { + name string + content string + expected AssignmentList + skipReason string + }{ + { + name: "choice with elements", + content: ` + TestSpec DEFINITIONS ::= BEGIN + Choice ::= CHOICE { + alt1 BOOLEAN, + alt2 INTEGER + } + END + `, + expected: AssignmentList{ + TypeAssignment{TypeReference: "Choice", Type: ChoiceType{AlternativeTypeList: []NamedType{ + {Identifier: "alt1", Type: BooleanType{}}, + {Identifier: "alt2", Type: IntegerType{}}, + }}}, + }, + }, + { + name: "choice extensions", + content: ` + TestSpec DEFINITIONS ::= BEGIN + Choice ::= CHOICE { ... } + Choice2 ::= CHOICE { + alt1 BOOLEAN, + alt2 BOOLEAN, + ... + } + Choice3 ::= CHOICE { + alt1 BOOLEAN, + ..., + ext2 BOOLEAN, + ext3 BOOLEAN + } + END + `, + expected: AssignmentList{ + TypeAssignment{TypeReference: "Choice", Type: ChoiceType{ExtensionTypes: []ChoiceExtension{}}}, + TypeAssignment{TypeReference: "Choice2", Type: ChoiceType{ + AlternativeTypeList: []NamedType{ + {Identifier: "alt1", Type: BooleanType{}}, + {Identifier: "alt2", Type: BooleanType{}}, + }, + ExtensionTypes: []ChoiceExtension{}}, + }, + TypeAssignment{TypeReference: "Choice3", Type: ChoiceType{ + AlternativeTypeList: []NamedType{ + {Identifier: "alt1", Type: BooleanType{}}, + }, + ExtensionTypes: []ChoiceExtension{ + NamedType{Identifier: "ext2", Type: BooleanType{}}, + NamedType{Identifier: "ext3", Type: BooleanType{}}, + }}, + }, + }, + }, + } + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + if tc.skipReason != "" { + t.Skip(tc.skipReason) + } + r := testNotFails(t, tc.content) + if diff := cmp.Diff(tc.expected, r.ModuleBody.AssignmentList); diff != "" { t.Errorf("Module did not match expected, diff (-want, +got):\n%v", diff) } }) diff --git a/y.go b/y.go index 34b8700..d232036 100644 --- a/y.go +++ b/y.go @@ -344,94 +344,110 @@ var yyExca = [...]int16{ 52, 24, -2, 27, -1, 178, - 44, 237, - 94, 237, - -2, 233, + 44, 238, + 94, 238, + -2, 234, -1, 180, - 46, 240, - 53, 240, - -2, 235, + 46, 241, + 53, 241, + -2, 236, -1, 184, - 60, 243, - -2, 241, + 60, 244, + -2, 242, -1, 193, - 16, 262, - 28, 262, - -2, 256, - -1, 324, - 46, 240, - 53, 240, - -2, 236, - -1, 416, + 16, 263, + 28, 263, + -2, 257, + -1, 327, + 46, 241, + 53, 241, + -2, 237, + -1, 420, 30, 137, -2, 131, } const yyPrivate = 57344 -const yyLast = 901 +const yyLast = 910 var yyAct = [...]int16{ - 218, 203, 402, 217, 219, 206, 365, 127, 395, 17, - 193, 177, 285, 312, 308, 17, 256, 237, 328, 274, - 214, 248, 208, 163, 182, 259, 195, 184, 244, 180, - 170, 159, 355, 338, 215, 320, 19, 251, 379, 239, - 305, 251, 165, 144, 151, 5, 45, 3, 19, 168, - 290, 38, 29, 133, 410, 11, 9, 19, 270, 292, - 232, 19, 271, 321, 262, 190, 231, 165, 291, 329, - 19, 168, 405, 140, 224, 19, 223, 169, 233, 128, - 19, 65, 62, 19, 21, 216, 24, 150, 23, 165, - 216, 125, 22, 216, 35, 226, 42, 31, 148, 169, - 10, 134, 331, 213, 411, 129, 152, 137, 142, 139, - 172, 260, 36, 121, 263, 257, 135, 61, 304, 58, - 409, 162, 128, 60, 331, 19, 168, 161, 164, 145, - 164, 425, 172, 209, 212, 202, 123, 155, 339, 392, - 141, 222, 391, 162, 165, 240, 230, 225, 380, 161, - 171, 128, 139, 220, 169, 211, 240, 220, 240, 124, - 240, 227, 240, 221, 238, 138, 143, 250, 229, 243, - 154, 220, 171, 234, 235, 228, 220, 122, 265, 220, - 245, 103, 50, 136, 46, 266, 242, 172, 313, 164, - 128, 126, 47, 48, 376, 361, 375, 326, 162, 268, - 255, 275, 59, 315, 161, 32, 340, 253, 128, 310, - 282, 267, 427, 252, 426, 27, 314, 44, 283, 53, - 44, 284, 54, 426, 417, 415, 412, 171, 294, 296, - 278, 53, 63, 288, 54, 303, 300, 302, 41, 44, - 297, 40, 400, 397, 44, 286, 387, 250, 250, 386, - 293, 295, 378, 373, 363, 289, 281, 280, 299, 301, - 277, 258, 164, 164, 62, 272, 164, 15, 420, 385, - 356, 164, 318, 354, 307, 309, 348, 306, 333, 298, - 330, 317, 342, 209, 319, 287, 212, 344, 323, 325, - 351, 324, 279, 164, 276, 30, 25, 346, 341, 337, - 199, 132, 352, 131, 130, 7, 345, 347, 359, 416, - 350, 19, 19, 349, 343, 322, 269, 64, 28, 353, - 247, 366, 216, 12, 419, 358, 19, 18, 14, 362, - 360, 164, 357, 311, 14, 254, 18, 26, 19, 368, - 330, 275, 47, 48, 55, 48, 4, 316, 364, 408, - 389, 388, 367, 336, 335, 371, 334, 332, 370, 369, - 374, 264, 261, 164, 418, 164, 404, 401, 399, 377, - 207, 413, 382, 381, 205, 384, 390, 204, 396, 403, - 55, 19, 168, 210, 39, 393, 34, 1, 368, 368, - 398, 394, 372, 406, 407, 201, 200, 72, 153, 209, - 165, 241, 43, 414, 57, 56, 187, 37, 120, 273, - 169, 69, 77, 86, 149, 236, 102, 396, 403, 422, - 423, 421, 424, 94, 84, 82, 81, 351, 99, 179, - 93, 110, 100, 80, 79, 67, 139, 85, 91, 198, - 90, 71, 197, 172, 327, 88, 194, 95, 114, 106, - 192, 111, 191, 89, 162, 96, 113, 186, 189, 188, - 161, 119, 104, 97, 185, 92, 107, 55, 19, 168, - 108, 183, 181, 178, 109, 383, 176, 175, 174, 173, - 115, 87, 68, 171, 105, 33, 49, 165, 116, 51, - 52, 112, 117, 187, 167, 120, 118, 169, 166, 98, - 196, 101, 157, 160, 78, 158, 156, 249, 246, 83, - 94, 73, 75, 66, 70, 99, 74, 93, 110, 100, - 76, 6, 16, 139, 13, 2, 198, 8, 20, 0, - 172, 0, 88, 0, 95, 114, 106, 0, 111, 0, - 89, 162, 96, 113, 0, 0, 0, 161, 119, 104, - 97, 0, 92, 107, 55, 0, 320, 108, 0, 0, - 0, 109, 0, 0, 0, 0, 0, 115, 0, 0, - 171, 105, 0, 0, 0, 116, 0, 0, 112, 117, - 0, 0, 120, 118, 321, 0, 98, 196, 101, 0, - 0, 0, 0, 0, 0, 0, 0, 94, 0, 0, + 219, 205, 407, 218, 372, 208, 348, 220, 127, 17, + 193, 177, 257, 315, 311, 17, 279, 289, 238, 331, + 202, 275, 249, 163, 260, 210, 182, 184, 245, 217, + 170, 180, 159, 362, 323, 341, 195, 19, 252, 386, + 308, 240, 252, 165, 144, 151, 5, 45, 3, 293, + 19, 168, 38, 415, 29, 11, 9, 19, 19, 133, + 263, 271, 324, 19, 168, 272, 295, 294, 204, 165, + 19, 332, 233, 232, 225, 190, 19, 224, 227, 169, + 204, 234, 165, 19, 21, 24, 35, 410, 150, 62, + 215, 65, 169, 204, 31, 19, 168, 23, 22, 36, + 10, 125, 148, 416, 334, 134, 129, 152, 137, 142, + 264, 258, 172, 261, 165, 140, 121, 334, 42, 414, + 61, 128, 60, 162, 169, 172, 128, 58, 164, 161, + 164, 368, 428, 211, 214, 307, 162, 155, 203, 145, + 342, 135, 161, 123, 223, 50, 241, 128, 226, 231, + 399, 139, 171, 221, 221, 241, 216, 172, 213, 241, + 59, 228, 241, 241, 239, 171, 221, 251, 162, 244, + 229, 154, 221, 222, 161, 138, 143, 139, 230, 221, + 246, 124, 141, 235, 236, 122, 266, 243, 46, 164, + 47, 48, 398, 267, 316, 63, 41, 171, 387, 269, + 256, 276, 383, 382, 329, 318, 126, 32, 136, 128, + 268, 343, 254, 313, 286, 27, 103, 281, 253, 430, + 429, 287, 317, 128, 288, 421, 54, 419, 405, 402, + 429, 290, 297, 299, 394, 393, 306, 385, 54, 40, + 303, 305, 282, 380, 280, 370, 300, 292, 251, 251, + 285, 284, 44, 278, 53, 44, 259, 62, 273, 424, + 392, 296, 298, 164, 164, 363, 53, 164, 361, 302, + 304, 355, 164, 321, 44, 310, 312, 309, 15, 44, + 336, 333, 320, 301, 291, 283, 345, 211, 349, 326, + 214, 351, 328, 358, 327, 322, 164, 346, 277, 344, + 25, 353, 340, 199, 132, 359, 30, 131, 130, 7, + 352, 366, 19, 357, 354, 19, 420, 356, 350, 325, + 270, 64, 373, 248, 28, 204, 12, 423, 365, 19, + 18, 14, 360, 369, 164, 367, 364, 14, 314, 255, + 26, 18, 375, 333, 276, 47, 48, 55, 48, 19, + 4, 319, 371, 413, 396, 395, 374, 339, 378, 338, + 337, 379, 377, 381, 376, 335, 265, 262, 422, 409, + 164, 406, 164, 404, 384, 209, 417, 207, 206, 389, + 388, 212, 391, 39, 397, 34, 408, 401, 349, 55, + 19, 168, 1, 347, 201, 375, 375, 400, 411, 412, + 200, 72, 403, 153, 211, 242, 43, 57, 418, 165, + 56, 37, 274, 69, 77, 187, 86, 120, 149, 169, + 237, 102, 408, 425, 426, 84, 427, 82, 81, 80, + 358, 79, 94, 67, 85, 91, 90, 99, 179, 93, + 110, 100, 71, 197, 330, 139, 194, 192, 198, 191, + 186, 189, 172, 188, 88, 185, 95, 114, 106, 183, + 111, 181, 89, 162, 96, 113, 178, 390, 176, 161, + 119, 104, 97, 175, 92, 107, 55, 19, 168, 108, + 174, 173, 87, 109, 68, 33, 49, 51, 52, 115, + 167, 166, 171, 105, 157, 160, 165, 116, 78, 158, + 112, 117, 187, 156, 120, 118, 169, 250, 98, 196, + 101, 247, 83, 73, 75, 66, 70, 74, 76, 94, + 6, 16, 13, 2, 99, 8, 93, 110, 100, 20, + 0, 0, 139, 0, 0, 198, 0, 0, 0, 172, + 0, 88, 0, 95, 114, 106, 0, 111, 0, 89, + 162, 96, 113, 0, 0, 0, 161, 119, 104, 97, + 0, 92, 107, 55, 0, 323, 108, 0, 0, 0, + 109, 0, 0, 0, 0, 0, 115, 0, 0, 171, + 105, 0, 0, 0, 116, 0, 0, 112, 117, 0, + 0, 120, 118, 324, 0, 98, 196, 101, 0, 0, + 0, 0, 0, 0, 0, 0, 94, 0, 0, 0, + 0, 99, 0, 93, 110, 100, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 88, 0, + 95, 114, 106, 0, 111, 0, 89, 55, 96, 113, + 0, 0, 0, 0, 119, 104, 97, 0, 92, 107, + 0, 0, 0, 108, 0, 0, 0, 109, 0, 0, + 0, 0, 0, 115, 0, 120, 0, 105, 0, 0, + 0, 116, 0, 0, 112, 117, 0, 0, 0, 118, + 94, 0, 98, 0, 101, 99, 241, 93, 110, 100, + 0, 0, 0, 0, 0, 147, 0, 0, 0, 0, + 0, 0, 88, 0, 95, 114, 106, 0, 111, 0, + 89, 0, 96, 113, 55, 19, 0, 0, 119, 104, + 97, 0, 92, 107, 0, 0, 0, 108, 0, 0, + 0, 109, 0, 0, 0, 0, 0, 115, 0, 146, + 0, 105, 120, 0, 0, 116, 0, 0, 112, 117, + 0, 0, 0, 118, 0, 0, 98, 94, 101, 0, 0, 0, 99, 0, 93, 110, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 0, 95, 114, 106, 0, 111, 0, 89, 55, 96, @@ -439,94 +455,79 @@ var yyAct = [...]int16{ 107, 0, 0, 0, 108, 0, 0, 0, 109, 0, 0, 0, 0, 0, 115, 0, 120, 0, 105, 0, 0, 0, 116, 0, 0, 112, 117, 0, 0, 0, - 118, 94, 0, 98, 0, 101, 99, 240, 93, 110, - 100, 0, 0, 0, 0, 0, 147, 0, 0, 0, + 118, 94, 0, 98, 0, 101, 99, 0, 93, 110, + 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 0, 95, 114, 106, 0, 111, - 0, 89, 0, 96, 113, 55, 19, 0, 0, 119, + 0, 89, 0, 96, 113, 0, 0, 0, 0, 119, 104, 97, 0, 92, 107, 0, 0, 0, 108, 0, 0, 0, 109, 0, 0, 0, 0, 0, 115, 0, - 146, 0, 105, 120, 0, 0, 116, 0, 0, 112, - 117, 0, 0, 0, 118, 0, 0, 98, 94, 101, - 0, 0, 0, 99, 0, 93, 110, 100, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 88, 0, 95, 114, 106, 0, 111, 0, 89, 55, - 96, 113, 0, 0, 0, 0, 119, 104, 97, 0, - 92, 107, 0, 0, 0, 108, 0, 0, 0, 109, - 0, 0, 0, 0, 0, 115, 0, 120, 0, 105, - 0, 0, 0, 116, 0, 0, 112, 117, 0, 0, - 0, 118, 94, 0, 98, 0, 101, 99, 0, 93, - 110, 100, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 88, 0, 95, 114, 106, 0, - 111, 0, 89, 0, 96, 113, 0, 0, 0, 0, - 119, 104, 97, 0, 92, 107, 0, 0, 0, 108, - 0, 0, 0, 109, 0, 0, 0, 0, 0, 115, - 0, 0, 0, 105, 0, 0, 0, 116, 0, 0, - 112, 117, 0, 0, 0, 118, 0, 0, 98, 0, - 101, + 0, 0, 105, 0, 0, 0, 116, 0, 0, 112, + 117, 0, 0, 0, 118, 0, 0, 98, 0, 101, } var yyPact = [...]int16{ - 340, -1000, -74, 279, -1000, -8, -1000, 319, 12, 14, - 10, 8, 269, 319, -1000, -1000, -1000, 183, -1000, -1000, - 303, -60, -1000, -1000, -1000, -1000, -1000, 328, 30, -1000, - 172, 26, -1000, 60, -65, 186, -1000, 338, 336, 81, - 75, 234, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 338, - -1000, -1000, -1000, 302, 773, -1000, 71, 336, -1000, 52, - -1000, -1000, 336, -1000, 773, 176, -1000, -1000, -1000, -1000, + 344, -1000, -73, 283, -1000, -8, -1000, 322, 12, 20, + 19, 7, 273, 322, -1000, -1000, -1000, 183, -1000, -1000, + 309, -58, -1000, -1000, -1000, -1000, -1000, 333, 27, -1000, + 174, 18, -1000, 47, -64, 184, -1000, 341, 339, 80, + 78, 227, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 341, + -1000, -1000, -1000, 306, 782, -1000, 74, 339, -1000, 59, + -1000, -1000, 339, -1000, 782, 191, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 39, -1000, - -1000, -1000, 278, 277, 275, -1000, -51, 35, -1000, 90, - 47, -85, 622, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 32, - -15, -1000, -1000, 340, -1000, 119, 118, -1000, 374, 274, - 331, 331, 331, -1000, -1000, 76, 699, -17, -19, 119, - 68, 699, -27, -33, -5, 119, 773, 773, -1000, 31, - -1000, -1000, -1000, -1000, 16, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, 29, -1000, -1000, 182, 327, - -1000, -1000, -1000, 70, -1000, -1000, 231, -1000, -1000, 51, - -1000, 20, -1000, 132, -1000, 51, -1000, 374, -1000, -1000, - -1000, -1000, -1000, -1000, 300, 119, -41, 237, -1000, 331, - 267, 230, -1000, 773, 265, 227, -1000, 226, -1000, 178, - 191, -1000, 178, -1000, 215, 258, 70, 225, -1000, -47, - -34, 119, -1000, 699, 699, -1000, -1000, 215, 252, 119, - -1000, 699, 699, 331, 119, 119, 83, -1000, -1000, -1000, - -90, -1000, -1000, -1000, 250, 29, 29, -1000, -1000, -1000, - 177, -1000, 325, 180, 182, -1000, 170, 548, 298, -1000, - 461, 461, -1000, -1000, 461, -1000, -1000, -1000, 164, 41, - 119, 273, -1000, 6, -1000, 174, -1000, 305, 119, -1000, - 297, 331, 27, -1000, 331, 249, 296, -1000, -1000, 73, - -1000, 118, 773, 119, -1000, 119, -1000, 246, -1000, 119, - -1000, 119, -1000, -1000, -1000, -99, -1000, 243, -1000, -1000, - 33, 283, -1000, -1000, 322, -1000, -1000, -1000, -1000, 158, - -1000, 321, 224, -1000, -1000, -1000, -1000, -1000, -1000, 63, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, 304, -1000, 331, - 31, 223, -1000, 70, -1000, 163, 161, -1000, -1000, -1000, - 222, -1000, -1000, 119, -1000, -92, -1000, 115, -1000, 180, - -1000, 118, -1000, 374, -1000, 242, 219, 216, 119, -1000, - 109, 106, 215, 331, 213, -1000, -1000, 212, 54, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, 331, 331, -1000, 7, - -1000, -1000, -1000, -1000, 196, -1000, -1000, 331, -1000, 195, - 292, 194, -1000, -1000, -1000, 316, 241, -1000, -1000, -1000, - -1000, -1000, 331, -1000, -1000, 50, -1000, 54, 50, 94, - -1000, -1000, 184, -1000, 193, -1000, 50, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 40, -1000, + -1000, -1000, 282, 281, 278, -1000, -45, 39, -1000, 115, + 89, -84, 631, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 36, + -14, -1000, -1000, 344, -1000, 177, 88, -1000, 383, 277, + 308, 342, 342, -1000, -1000, 63, 708, -16, -19, 177, + 51, 708, -20, -21, -2, 177, 782, 782, -1000, 33, + -1000, -1000, -1000, -1000, 17, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, 30, -1000, -1000, 187, 331, + -1000, -1000, -1000, 66, -1000, -1000, 226, -1000, -1000, 53, + -1000, 16, -1000, 140, -1000, 53, -1000, 383, -1000, -1000, + -1000, -1000, -1000, -1000, 304, 177, -38, 230, -1000, 342, + 271, 223, 214, -1000, 66, 782, 258, 221, -1000, 220, + -1000, 182, 194, -1000, 182, -1000, 201, 257, 217, -1000, + -48, -27, 177, -1000, 708, 708, -1000, -1000, 201, 256, + 177, -1000, 708, 708, 342, 177, 177, 100, -1000, -1000, + -1000, -90, -1000, -1000, -1000, 250, 30, 30, -1000, -1000, + -1000, 181, -1000, 330, 186, 187, -1000, 172, 557, 302, + -1000, 470, 470, -1000, -1000, 470, -1000, -1000, -1000, 171, + 43, 177, 276, -1000, 8, -1000, 179, -1000, 308, 201, + 342, -1000, 177, -1000, 301, 342, 26, -1000, 342, 244, + 300, -1000, 76, -1000, 88, 782, 177, -1000, 177, -1000, + 241, -1000, 177, -1000, 177, -1000, -1000, -1000, -98, -1000, + 238, -1000, -1000, 34, 286, -1000, -1000, 327, -1000, -1000, + -1000, -1000, 94, -1000, 325, 215, -1000, -1000, -1000, -1000, + -1000, -1000, 56, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + 305, -1000, 342, 33, 214, -1000, -1000, 213, -1000, -1000, + 66, -1000, 170, 169, -1000, -1000, -1000, 207, -1000, -1000, + 177, -1000, -91, -1000, 165, -1000, 186, -1000, 88, -1000, + 383, -1000, 233, 205, 204, 177, -1000, 159, 117, 201, + 342, 199, -1000, -1000, 198, 69, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, 342, 342, -1000, 6, -1000, -1000, -1000, + -1000, -1000, 342, -1000, 197, 299, 195, -1000, -1000, -1000, + 319, 232, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 50, + -1000, 69, 50, 95, -1000, 190, -1000, 200, -1000, 50, + -1000, } var yyPgo = [...]int16{ - 0, 30, 13, 46, 181, 1, 528, 527, 525, 524, - 267, 323, 522, 521, 320, 14, 520, 516, 514, 513, - 26, 512, 511, 509, 4, 508, 21, 507, 28, 31, - 506, 10, 505, 504, 503, 502, 498, 494, 23, 17, - 182, 490, 489, 486, 485, 184, 482, 481, 7, 479, - 478, 477, 476, 475, 11, 473, 472, 29, 471, 24, - 25, 27, 464, 459, 458, 457, 452, 450, 65, 446, - 444, 442, 18, 441, 440, 438, 437, 435, 434, 433, - 426, 425, 0, 3, 425, 34, 424, 416, 415, 414, - 413, 412, 411, 409, 19, 407, 405, 404, 119, 202, - 96, 402, 401, 398, 397, 396, 395, 395, 8, 392, - 391, 387, 386, 384, 383, 22, 377, 374, 16, 371, - 5, 370, 20, 12, 369, 368, 367, 2, 366, 364, - 364, 362, 361, 357, 356, 354, 353, 6, 352, 351, - 350, 349, 347, + 0, 30, 13, 47, 216, 1, 529, 525, 523, 522, + 278, 326, 521, 520, 323, 14, 518, 517, 516, 515, + 36, 514, 513, 512, 7, 511, 22, 507, 28, 32, + 503, 10, 499, 498, 495, 494, 491, 490, 23, 18, + 145, 488, 487, 486, 485, 188, 484, 482, 8, 481, + 480, 473, 468, 467, 11, 466, 461, 31, 459, 26, + 24, 27, 455, 453, 451, 450, 449, 447, 75, 446, + 444, 443, 19, 442, 436, 435, 434, 433, 431, 429, + 428, 427, 0, 3, 427, 29, 425, 421, 420, 418, + 416, 414, 413, 412, 21, 411, 410, 407, 127, 160, + 118, 406, 405, 403, 401, 400, 394, 394, 6, 16, + 393, 392, 385, 383, 381, 25, 378, 377, 12, 376, + 5, 375, 20, 17, 374, 373, 371, 2, 369, 368, + 368, 367, 366, 365, 360, 359, 357, 4, 356, 355, + 354, 353, 351, } var yyR1 = [...]uint8{ @@ -546,19 +547,20 @@ var yyR1 = [...]uint8{ 122, 123, 123, 85, 85, 85, 84, 125, 124, 124, 126, 126, 127, 127, 128, 129, 129, 83, 83, 82, 82, 82, 82, 80, 80, 80, 81, 81, 23, 23, - 104, 105, 105, 107, 109, 109, 110, 110, 108, 130, - 106, 106, 86, 86, 86, 87, 88, 88, 89, 89, - 89, 89, 79, 79, 16, 29, 29, 28, 28, 25, - 25, 25, 25, 26, 26, 27, 14, 73, 73, 74, + 104, 105, 105, 105, 107, 109, 109, 110, 110, 108, + 130, 106, 106, 86, 86, 86, 87, 88, 88, 89, + 89, 89, 89, 79, 79, 16, 29, 29, 28, 28, + 25, 25, 25, 25, 26, 26, 27, 14, 73, 73, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 75, 90, 90, 46, 46, 47, 47, 47, - 47, 47, 47, 47, 47, 48, 49, 50, 51, 51, - 51, 52, 53, 54, 54, 55, 55, 56, 57, 57, - 58, 59, 59, 62, 60, 131, 131, 132, 132, 61, - 61, 65, 65, 65, 65, 65, 63, 64, 69, 69, - 70, 70, 71, 71, 72, 72, 68, 66, 67, 67, - 133, 134, 134, 135, 136, 137, 137, 138, 139, 140, - 140, 141, 141, 141, 141, 118, 118, 142, 142, 142, + 74, 74, 74, 75, 90, 90, 46, 46, 47, 47, + 47, 47, 47, 47, 47, 47, 48, 49, 50, 51, + 51, 51, 52, 53, 54, 54, 55, 55, 56, 57, + 57, 58, 59, 59, 62, 60, 131, 131, 132, 132, + 61, 61, 65, 65, 65, 65, 65, 63, 64, 69, + 69, 70, 70, 71, 71, 72, 72, 68, 66, 67, + 67, 133, 134, 134, 135, 136, 137, 137, 138, 139, + 140, 140, 141, 141, 141, 141, 118, 118, 142, 142, + 142, } var yyR2 = [...]int8{ @@ -578,19 +580,20 @@ var yyR2 = [...]int8{ 2, 2, 0, 1, 5, 7, 1, 2, 2, 0, 1, 3, 1, 1, 4, 0, 2, 1, 3, 1, 2, 3, 3, 3, 5, 4, 3, 3, 1, 4, - 4, 5, 1, 1, 2, 0, 1, 3, 1, 4, - 1, 3, 2, 3, 3, 4, 1, 1, 1, 1, - 1, 0, 3, 3, 2, 3, 4, 1, 2, 1, - 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, + 4, 5, 1, 3, 1, 2, 0, 1, 3, 1, + 4, 1, 3, 2, 3, 3, 4, 1, 1, 1, + 1, 1, 0, 3, 3, 2, 3, 4, 1, 2, + 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 2, 1, 1, 2, 1, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 1, 1, 1, 3, - 5, 1, 1, 1, 2, 1, 3, 1, 1, 3, - 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, - 3, 1, 1, 1, 1, 1, 1, 3, 1, 2, - 1, 2, 1, 1, 1, 1, 2, 1, 3, 3, - 1, 1, 1, 3, 5, 1, 3, 2, 2, 1, - 0, 1, 1, 1, 0, 2, 0, 1, 1, 3, + 1, 1, 1, 2, 1, 1, 2, 1, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, + 3, 5, 1, 1, 1, 2, 1, 3, 1, 1, + 3, 1, 1, 2, 1, 2, 1, 1, 1, 1, + 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, + 2, 1, 2, 1, 1, 1, 1, 2, 1, 3, + 3, 1, 1, 1, 3, 5, 1, 3, 2, 2, + 1, 0, 1, 1, 1, 0, 2, 0, 1, 1, + 3, } var yyChk = [...]int16{ @@ -614,75 +617,77 @@ var yyChk = [...]int16{ -1, 109, 69, -49, -50, -51, -52, -54, -55, 55, -57, -56, -59, -58, -61, -62, -65, 32, -63, -64, -68, -66, -67, -31, -69, -20, 126, -71, 65, 26, - -105, -106, -24, -5, -116, -117, -120, -121, -115, -5, - -114, -115, -5, 27, -122, -85, 17, -83, -82, -24, - 103, -20, -24, 93, 93, -48, 27, -122, -85, -20, - -24, 93, 93, 83, -20, -20, -88, -39, -15, 8, - 129, -102, -29, -15, -28, -15, -25, -14, -26, -27, - -5, 8, 31, 25, 8, -1, -118, 45, 30, -60, - 60, -131, 44, 94, -132, 46, 53, -60, -54, 16, - 99, 103, 28, -93, -94, -5, 27, 30, -20, 27, - 30, 30, 32, 27, 30, -123, 30, 27, -118, 30, - 97, 115, 93, -20, -24, -20, -24, -123, 27, -20, - -24, -20, -24, -5, 35, 130, 27, -28, -15, -28, - 32, 8, -2, 8, 36, 33, -142, -38, -15, -20, - 8, 36, 17, -61, -57, -59, 33, -70, -72, 28, - -31, 61, -133, -48, -134, -135, -136, 26, 27, 132, - 32, -122, -24, 17, -120, -38, -15, -115, 27, 17, - -122, -82, -31, -20, 27, 131, 27, -26, -15, 25, - 8, 37, 8, 30, -72, -137, 17, -138, -5, -94, - -39, -15, -109, 30, -118, 33, 33, -124, 30, 130, - 33, -2, -31, -53, -54, 27, 30, 30, -139, -140, - -48, 33, 33, -123, -110, -108, -24, 30, -123, -125, - 30, -126, -127, -82, -128, 18, -137, -137, -141, 113, - 47, 97, 30, -119, -120, 30, 17, 30, -129, 8, - 27, -108, -83, -127, -83, 37, 30, 19, + -105, -106, -122, -24, 17, -5, -116, -117, -120, -121, + -115, -5, -114, -115, -5, 27, -122, -85, -83, -82, + -24, 103, -20, -24, 93, 93, -48, 27, -122, -85, + -20, -24, 93, 93, 83, -20, -20, -88, -39, -15, + 8, 129, -102, -29, -15, -28, -15, -25, -14, -26, + -27, -5, 8, 31, 25, 8, -1, -118, 45, 30, + -60, 60, -131, 44, 94, -132, 46, 53, -60, -54, + 16, 99, 103, 28, -93, -94, -5, 27, 30, -109, + 30, -118, -20, 27, 30, 30, 32, 27, 30, -123, + 30, 27, 30, 97, 115, 93, -20, -24, -20, -24, + -123, 27, -20, -24, -20, -24, -5, 35, 130, 27, + -28, -15, -28, 32, 8, -2, 8, 36, 33, -142, + -38, -15, -20, 8, 36, 17, -61, -57, -59, 33, + -70, -72, 28, -31, 61, -133, -48, -134, -135, -136, + 26, 27, 132, 32, -122, -24, -123, -110, -108, -24, + 17, -120, -38, -15, -115, 27, 17, -122, -82, -31, + -20, 27, 131, 27, -26, -15, 25, 8, 37, 8, + 30, -72, -137, 17, -138, -5, -94, -39, -15, -109, + 30, -118, 33, 33, -124, 30, 130, 33, -2, -31, + -53, -54, 27, 30, 30, -139, -140, -48, 33, 33, + -123, -108, 30, -123, -125, 30, -126, -127, -82, -128, + 18, -137, -137, -141, 113, 47, 97, -119, -120, 30, + 17, 30, -129, 8, 27, -83, -127, -83, 37, 30, + 19, } var yyDef = [...]int16{ 0, -2, 0, 9, 3, 20, 7, 0, 22, 0, - 0, 0, 0, 10, 12, 13, 14, 196, 15, 6, + 0, 0, 0, 10, 12, 13, 14, 197, 15, 6, 0, 0, 17, 18, 19, 8, 11, 0, 0, 21, 0, -2, 16, 0, 31, 29, 1, 0, 33, 0, 0, 28, 41, 43, 44, 45, 46, 2, 4, 23, 47, 49, 50, 0, 0, 2, 0, 32, 34, 0, 25, 26, 0, 48, 0, 0, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 216, 0, 82, - 197, 198, 0, 0, 85, 125, 0, 0, 105, 0, - 0, 158, 0, 51, 213, 214, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 210, 211, 0, - 181, 30, 35, 0, 42, 53, 0, 215, 0, 118, - 0, 0, 0, 184, 124, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 172, 0, 0, 212, 0, - 178, 179, 180, 36, 40, 54, 77, 78, 79, 80, + 69, 70, 71, 72, 73, 74, 75, 217, 0, 82, + 198, 199, 0, 0, 85, 125, 0, 0, 105, 0, + 0, 158, 0, 51, 214, 215, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 0, + 182, 30, 35, 0, 42, 53, 0, 216, 0, 118, + 0, 0, 0, 185, 124, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 173, 0, 0, 213, 0, + 179, 180, 181, 36, 40, 54, 77, 78, 79, 80, 81, 83, 84, 93, 94, 0, 106, 107, 91, 0, - 108, 110, 111, 286, 226, 227, 228, 231, -2, 0, - -2, 0, 238, 0, -2, 0, 249, 0, 251, 252, - 253, 254, 255, -2, 0, 267, 0, 258, 263, 0, - 0, 162, 170, 0, 0, 96, 99, 101, 103, 104, - 0, 87, 0, 126, 132, 0, 129, 133, 147, 149, - 0, 182, 183, 0, 0, 266, 153, 132, 0, 156, - 157, 0, 0, 0, 173, 174, 0, 176, 177, 5, - 0, 37, 38, 39, 0, 192, 187, 189, 190, 191, - 196, 193, 0, 0, 92, 109, 0, 0, 0, 234, - 0, 0, 245, 246, 0, 247, 248, 242, 0, 0, - 0, 0, 259, 0, 120, 0, 160, 0, 76, 95, - 0, 0, 0, 86, 0, 0, 0, 128, 130, 0, - 150, 0, 0, 219, 223, 220, 224, 0, 155, 217, - 221, 218, 222, 159, 175, 0, 185, 0, 192, 188, - 0, 113, 115, 116, 0, 225, 285, 287, 288, 0, - 91, 0, 229, 244, -2, 239, 250, 257, 260, 0, - 264, 265, 268, 270, 269, 271, 272, 0, 119, 0, - 0, 165, 171, 286, 102, 0, 0, 88, 127, 131, - 139, 148, 151, 152, 154, 0, 186, 0, 194, 0, - 117, 0, 92, 0, 261, 0, 0, 275, 280, 121, - 0, 0, 132, 0, 97, 89, 90, 132, 0, 52, - 195, 114, 289, 230, 232, 273, 0, 0, 277, 284, - 279, 122, 123, 161, 164, 166, 168, 0, 134, 0, - 0, 138, 140, 142, 143, 145, 0, 276, 278, 281, - 282, 283, 0, 98, 100, 0, -2, 0, 0, 0, - 274, 167, 135, 141, 0, 146, 0, 144, + 108, 110, 111, 287, 227, 228, 229, 232, -2, 0, + -2, 0, 239, 0, -2, 0, 250, 0, 252, 253, + 254, 255, 256, -2, 0, 268, 0, 259, 264, 0, + 0, 162, 166, 171, 129, 0, 0, 96, 99, 101, + 103, 104, 0, 87, 0, 126, 132, 0, 133, 147, + 149, 0, 183, 184, 0, 0, 267, 153, 132, 0, + 156, 157, 0, 0, 0, 174, 175, 0, 177, 178, + 5, 0, 37, 38, 39, 0, 193, 188, 190, 191, + 192, 197, 194, 0, 0, 92, 109, 0, 0, 0, + 235, 0, 0, 246, 247, 0, 248, 249, 243, 0, + 0, 0, 0, 260, 0, 120, 0, 160, 0, 132, + 0, 130, 76, 95, 0, 0, 0, 86, 0, 0, + 0, 128, 0, 150, 0, 0, 220, 224, 221, 225, + 0, 155, 218, 222, 219, 223, 159, 176, 0, 186, + 0, 193, 189, 0, 113, 115, 116, 0, 226, 286, + 288, 289, 0, 91, 0, 230, 245, -2, 240, 251, + 258, 261, 0, 265, 266, 269, 271, 270, 272, 273, + 0, 119, 0, 0, 166, 172, 163, 165, 167, 169, + 287, 102, 0, 0, 88, 127, 131, 139, 148, 151, + 152, 154, 0, 187, 0, 195, 0, 117, 0, 92, + 0, 262, 0, 0, 276, 281, 121, 0, 0, 132, + 0, 97, 89, 90, 132, 0, 52, 196, 114, 290, + 231, 233, 274, 0, 0, 278, 285, 280, 122, 123, + 161, 168, 0, 134, 0, 0, 138, 140, 142, 143, + 145, 0, 277, 279, 282, 283, 284, 98, 100, 0, + -2, 0, 0, 0, 275, 135, 141, 0, 146, 0, + 144, } var yyTok1 = [...]uint8{ @@ -1521,269 +1526,275 @@ yydefault: } case 147: yyDollar = yyS[yypt-1 : yypt+1] -//line asn1.y:711 +//line asn1.y:710 { yyVAL.ComponentTypeList = append(make(ComponentTypeList, 0), yyDollar[1].ComponentType) } case 148: yyDollar = yyS[yypt-3 : yypt+1] -//line asn1.y:712 +//line asn1.y:711 { yyVAL.ComponentTypeList = append(yyDollar[1].ComponentTypeList, yyDollar[3].ComponentType) } case 149: yyDollar = yyS[yypt-1 : yypt+1] -//line asn1.y:715 +//line asn1.y:714 { yyVAL.ComponentType = NamedComponentType{NamedType: yyDollar[1].NamedType} } case 150: yyDollar = yyS[yypt-2 : yypt+1] -//line asn1.y:716 +//line asn1.y:715 { yyVAL.ComponentType = NamedComponentType{NamedType: yyDollar[1].NamedType, IsOptional: true} } case 151: yyDollar = yyS[yypt-3 : yypt+1] -//line asn1.y:717 +//line asn1.y:716 { yyVAL.ComponentType = NamedComponentType{NamedType: yyDollar[1].NamedType, Default: &yyDollar[3].Value} } case 152: yyDollar = yyS[yypt-3 : yypt+1] -//line asn1.y:718 +//line asn1.y:717 { yyVAL.ComponentType = ComponentsOfComponentType{Type: yyDollar[3].Type} } case 153: yyDollar = yyS[yypt-3 : yypt+1] -//line asn1.y:723 +//line asn1.y:722 { yyVAL.Type = SetType{} } case 154: yyDollar = yyS[yypt-5 : yypt+1] -//line asn1.y:724 +//line asn1.y:723 { yyVAL.Type = SetType{} } case 155: yyDollar = yyS[yypt-4 : yypt+1] -//line asn1.y:725 +//line asn1.y:724 { yyVAL.Type = SetType{Components: yyDollar[3].ComponentTypeList} } case 156: yyDollar = yyS[yypt-3 : yypt+1] -//line asn1.y:730 +//line asn1.y:729 { yyVAL.Type = SetOfType{yyDollar[3].Type} } case 157: yyDollar = yyS[yypt-3 : yypt+1] -//line asn1.y:731 +//line asn1.y:730 { yyVAL.Type = SetOfType{yyDollar[3].NamedType} } case 158: yyDollar = yyS[yypt-1 : yypt+1] -//line asn1.y:735 +//line asn1.y:734 { yyVAL.Type = AnyType{} } case 159: yyDollar = yyS[yypt-4 : yypt+1] -//line asn1.y:736 +//line asn1.y:735 { yyVAL.Type = AnyType{Identifier(yyDollar[4].name)} } case 160: yyDollar = yyS[yypt-4 : yypt+1] -//line asn1.y:741 +//line asn1.y:740 { yyVAL.Type = yyDollar[3].ChoiceType } case 161: yyDollar = yyS[yypt-5 : yypt+1] -//line asn1.y:744 +//line asn1.y:743 { yyVAL.ChoiceType = ChoiceType{yyDollar[1].AlternativeTypeList, yyDollar[4].ExtensionAdditionAlternativesList} } case 162: yyDollar = yyS[yypt-1 : yypt+1] -//line asn1.y:745 +//line asn1.y:744 { yyVAL.ChoiceType = ChoiceType{AlternativeTypeList: yyDollar[1].AlternativeTypeList} } - case 164: + case 163: + yyDollar = yyS[yypt-3 : yypt+1] +//line asn1.y:745 + { + yyVAL.ChoiceType = ChoiceType{nil, yyDollar[2].ExtensionAdditionAlternativesList} + } + case 165: yyDollar = yyS[yypt-2 : yypt+1] //line asn1.y:752 { yyVAL.ExtensionAdditionAlternativesList = yyDollar[2].ExtensionAdditionAlternativesList } - case 165: + case 166: yyDollar = yyS[yypt-0 : yypt+1] //line asn1.y:753 { yyVAL.ExtensionAdditionAlternativesList = make([]ChoiceExtension, 0) } - case 166: + case 167: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:756 { yyVAL.ExtensionAdditionAlternativesList = append(make([]ChoiceExtension, 0), yyDollar[1].ExtensionAdditionAlternative) } - case 167: + case 168: yyDollar = yyS[yypt-3 : yypt+1] //line asn1.y:757 { yyVAL.ExtensionAdditionAlternativesList = append(yyDollar[1].ExtensionAdditionAlternativesList, yyDollar[3].ExtensionAdditionAlternative) } - case 168: + case 169: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:761 { yyVAL.ExtensionAdditionAlternative = yyDollar[1].NamedType } - case 170: + case 171: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:768 { yyVAL.AlternativeTypeList = append(make([]NamedType, 0), yyDollar[1].NamedType) } - case 171: + case 172: yyDollar = yyS[yypt-3 : yypt+1] //line asn1.y:769 { yyVAL.AlternativeTypeList = append(yyDollar[1].AlternativeTypeList, yyDollar[3].NamedType) } - case 172: + case 173: yyDollar = yyS[yypt-2 : yypt+1] //line asn1.y:774 { yyVAL.Type = TaggedType{Tag: yyDollar[1].Tag, Type: yyDollar[2].Type} } - case 173: + case 174: yyDollar = yyS[yypt-3 : yypt+1] //line asn1.y:775 { yyVAL.Type = TaggedType{Tag: yyDollar[1].Tag, Type: yyDollar[3].Type, TagType: TAGS_IMPLICIT, HasTagType: true} } - case 174: + case 175: yyDollar = yyS[yypt-3 : yypt+1] //line asn1.y:776 { yyVAL.Type = TaggedType{Tag: yyDollar[1].Tag, Type: yyDollar[3].Type, TagType: TAGS_EXPLICIT, HasTagType: true} } - case 175: + case 176: yyDollar = yyS[yypt-4 : yypt+1] //line asn1.y:779 { yyVAL.Tag = Tag{Class: yyDollar[2].Class, ClassNumber: yyDollar[3].Value} } - case 176: + case 177: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:782 { yyVAL.Value = yyDollar[1].Number } - case 177: + case 178: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:783 { yyVAL.Value = yyDollar[1].DefinedValue } - case 178: + case 179: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:786 { yyVAL.Class = CLASS_UNIVERSAL } - case 179: + case 180: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:787 { yyVAL.Class = CLASS_APPLICATION } - case 180: + case 181: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:788 { yyVAL.Class = CLASS_PRIVATE } - case 181: + case 182: yyDollar = yyS[yypt-0 : yypt+1] //line asn1.y:789 { yyVAL.Class = CLASS_CONTEXT_SPECIFIC } - case 182: + case 183: yyDollar = yyS[yypt-3 : yypt+1] //line asn1.y:794 { yyVAL.Type = SequenceOfType{yyDollar[3].Type} } - case 183: + case 184: yyDollar = yyS[yypt-3 : yypt+1] //line asn1.y:795 { yyVAL.Type = SequenceOfType{yyDollar[3].NamedType} } - case 184: + case 185: yyDollar = yyS[yypt-2 : yypt+1] //line asn1.y:800 { yyVAL.Type = ObjectIdentifierType{} } - case 185: + case 186: yyDollar = yyS[yypt-3 : yypt+1] //line asn1.y:805 { yyVAL.ObjectIdentifierValue = yyDollar[2].ObjectIdentifierValue } - case 186: + case 187: yyDollar = yyS[yypt-4 : yypt+1] //line asn1.y:806 { yyVAL.ObjectIdentifierValue = NewObjectIdentifierValue(yyDollar[2].DefinedValue).Append(yyDollar[3].ObjectIdentifierValue...) } - case 187: + case 188: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:809 { yyVAL.ObjectIdentifierValue = NewObjectIdentifierValue(yyDollar[1].ObjIdComponents) } - case 188: + case 189: yyDollar = yyS[yypt-2 : yypt+1] //line asn1.y:810 { yyVAL.ObjectIdentifierValue = NewObjectIdentifierValue(yyDollar[1].ObjIdComponents).Append(yyDollar[2].ObjectIdentifierValue...) } - case 189: + case 190: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:813 { yyVAL.ObjIdComponents = ObjectIdElement{Name: yyDollar[1].name} } - case 192: + case 193: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:816 { yyVAL.ObjIdComponents = yyDollar[1].DefinedValue } - case 193: + case 194: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:819 { yyVAL.ObjIdComponents = ObjectIdElement{Id: yyDollar[1].Number.IntValue()} } - case 194: + case 195: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:820 { yyVAL.ObjIdComponents = yyDollar[1].DefinedValue } - case 195: + case 196: yyDollar = yyS[yypt-4 : yypt+1] //line asn1.y:824 { @@ -1796,319 +1807,319 @@ yydefault: panic(fmt.Sprintf("Expected DefinedValue or ObjectIdElement from NumberForm, got %v", yyDollar[3].ObjIdComponents)) } } - case 199: + case 200: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:845 { yyVAL.Type = RestrictedStringType{LexType: BMPString} } - case 200: + case 201: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:846 { yyVAL.Type = RestrictedStringType{LexType: GeneralString} } - case 201: + case 202: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:847 { yyVAL.Type = RestrictedStringType{LexType: GraphicString} } - case 202: + case 203: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:848 { yyVAL.Type = RestrictedStringType{LexType: IA5String} } - case 203: + case 204: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:849 { yyVAL.Type = RestrictedStringType{LexType: ISO646String} } - case 204: + case 205: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:850 { yyVAL.Type = RestrictedStringType{LexType: NumericString} } - case 205: + case 206: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:851 { yyVAL.Type = RestrictedStringType{LexType: PrintableString} } - case 206: + case 207: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:852 { yyVAL.Type = RestrictedStringType{LexType: TeletexString} } - case 207: + case 208: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:853 { yyVAL.Type = RestrictedStringType{LexType: T61String} } - case 208: + case 209: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:854 { yyVAL.Type = RestrictedStringType{LexType: UniversalString} } - case 209: + case 210: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:855 { yyVAL.Type = RestrictedStringType{LexType: UTF8String} } - case 210: + case 211: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:856 { yyVAL.Type = RestrictedStringType{LexType: VideotexString} } - case 211: + case 212: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:857 { yyVAL.Type = RestrictedStringType{LexType: VisibleString} } - case 212: + case 213: yyDollar = yyS[yypt-2 : yypt+1] //line asn1.y:862 { yyVAL.Type = CharacterStringType{} } - case 213: + case 214: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:867 { yyVAL.Type = TypeReference("GeneralizedTime") } - case 214: + case 215: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:868 { yyVAL.Type = TypeReference("UTCTime") } - case 215: + case 216: yyDollar = yyS[yypt-2 : yypt+1] //line asn1.y:873 { yyVAL.Type = ConstraintedType{yyDollar[1].Type, yyDollar[2].Constraint} } - case 217: + case 218: yyDollar = yyS[yypt-4 : yypt+1] //line asn1.y:879 { yyVAL.Type = ConstraintedType{SetOfType{yyDollar[4].Type}, yyDollar[2].Constraint} } - case 218: + case 219: yyDollar = yyS[yypt-4 : yypt+1] //line asn1.y:880 { yyVAL.Type = ConstraintedType{SetOfType{yyDollar[4].Type}, SingleElementConstraint(yyDollar[2].Elements)} } - case 219: + case 220: yyDollar = yyS[yypt-4 : yypt+1] //line asn1.y:881 { yyVAL.Type = ConstraintedType{SequenceOfType{yyDollar[4].Type}, yyDollar[2].Constraint} } - case 220: + case 221: yyDollar = yyS[yypt-4 : yypt+1] //line asn1.y:882 { yyVAL.Type = ConstraintedType{SequenceOfType{yyDollar[4].Type}, SingleElementConstraint(yyDollar[2].Elements)} } - case 221: + case 222: yyDollar = yyS[yypt-4 : yypt+1] //line asn1.y:883 { yyVAL.Type = ConstraintedType{SetOfType{yyDollar[4].NamedType}, yyDollar[2].Constraint} } - case 222: + case 223: yyDollar = yyS[yypt-4 : yypt+1] //line asn1.y:884 { yyVAL.Type = ConstraintedType{SetOfType{yyDollar[4].NamedType}, SingleElementConstraint(yyDollar[2].Elements)} } - case 223: + case 224: yyDollar = yyS[yypt-4 : yypt+1] //line asn1.y:885 { yyVAL.Type = ConstraintedType{SequenceOfType{yyDollar[4].NamedType}, yyDollar[2].Constraint} } - case 224: + case 225: yyDollar = yyS[yypt-4 : yypt+1] //line asn1.y:886 { yyVAL.Type = ConstraintedType{SequenceOfType{yyDollar[4].NamedType}, SingleElementConstraint(yyDollar[2].Elements)} } - case 225: + case 226: yyDollar = yyS[yypt-4 : yypt+1] //line asn1.y:891 { yyVAL.Constraint = Constraint{ConstraintSpec: yyDollar[2].ConstraintSpec} } - case 226: + case 227: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:894 { yyVAL.ConstraintSpec = yyDollar[1].SubtypeConstraint } - case 229: + case 230: yyDollar = yyS[yypt-3 : yypt+1] //line asn1.y:904 { yyVAL.SubtypeConstraint = yyDollar[1].SubtypeConstraint } - case 230: + case 231: yyDollar = yyS[yypt-5 : yypt+1] //line asn1.y:905 { yyVAL.SubtypeConstraint = append(yyDollar[1].SubtypeConstraint, yyDollar[5].ElementSetSpec) } - case 231: + case 232: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:908 { yyVAL.SubtypeConstraint = SubtypeConstraint{yyDollar[1].ElementSetSpec} } - case 233: + case 234: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:914 { yyVAL.ElementSetSpec = yyDollar[1].Unions } - case 234: + case 235: yyDollar = yyS[yypt-2 : yypt+1] //line asn1.y:915 { yyVAL.ElementSetSpec = yyDollar[2].Exclusions } - case 235: + case 236: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:918 { yyVAL.Unions = Unions{yyDollar[1].Intersections} } - case 236: + case 237: yyDollar = yyS[yypt-3 : yypt+1] //line asn1.y:919 { yyVAL.Unions = append(yyDollar[1].Unions, yyDollar[3].Intersections) } - case 238: + case 239: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:925 { yyVAL.Intersections = Intersections{yyDollar[1].IntersectionElements} } - case 239: + case 240: yyDollar = yyS[yypt-3 : yypt+1] //line asn1.y:926 { yyVAL.Intersections = append(yyDollar[1].Intersections, yyDollar[3].IntersectionElements) } - case 241: + case 242: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:932 { yyVAL.IntersectionElements = IntersectionElements{Elements: yyDollar[1].Elements} } - case 242: + case 243: yyDollar = yyS[yypt-2 : yypt+1] //line asn1.y:933 { yyVAL.IntersectionElements = IntersectionElements{Elements: yyDollar[1].Elements, Exclusions: yyDollar[2].Exclusions} } - case 244: + case 245: yyDollar = yyS[yypt-2 : yypt+1] //line asn1.y:939 { yyVAL.Exclusions = Exclusions{yyDollar[2].Elements} } - case 249: + case 250: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:948 { yyVAL.Elements = yyDollar[1].Elements } - case 250: + case 251: yyDollar = yyS[yypt-3 : yypt+1] //line asn1.y:950 { yyVAL.Elements = yyDollar[2].ElementSetSpec } - case 256: + case 257: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:965 { yyVAL.Elements = SingleValue{yyDollar[1].Value} } - case 257: + case 258: yyDollar = yyS[yypt-3 : yypt+1] //line asn1.y:970 { yyVAL.Elements = ValueRange{yyDollar[1].RangeEndpoint, yyDollar[3].RangeEndpoint} } - case 258: + case 259: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:973 { yyVAL.RangeEndpoint = RangeEndpoint{Value: yyDollar[1].Value} } - case 259: + case 260: yyDollar = yyS[yypt-2 : yypt+1] //line asn1.y:974 { yyVAL.RangeEndpoint = RangeEndpoint{Value: yyDollar[1].Value, IsOpen: true} } - case 260: + case 261: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:977 { yyVAL.RangeEndpoint = RangeEndpoint{Value: yyDollar[1].Value} } - case 261: + case 262: yyDollar = yyS[yypt-2 : yypt+1] //line asn1.y:978 { yyVAL.RangeEndpoint = RangeEndpoint{Value: yyDollar[2].Value, IsOpen: true} } - case 263: + case 264: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:982 { yyVAL.Value = nil } - case 265: + case 266: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:986 { yyVAL.Value = nil } - case 266: + case 267: yyDollar = yyS[yypt-2 : yypt+1] //line asn1.y:991 { yyVAL.Elements = SizeConstraint{yyDollar[2].Constraint} } - case 267: + case 268: yyDollar = yyS[yypt-1 : yypt+1] //line asn1.y:996 { yyVAL.Elements = TypeConstraint{yyDollar[1].Type} } - case 268: + case 269: yyDollar = yyS[yypt-3 : yypt+1] //line asn1.y:1001 { yyVAL.Elements = InnerTypeConstraint{} } - case 269: + case 270: yyDollar = yyS[yypt-3 : yypt+1] //line asn1.y:1002 {