From e64a022f8ae0363c694c844a2a30c1776c3ad240 Mon Sep 17 00:00:00 2001 From: Alfred Fuller Date: Thu, 29 Feb 2024 12:37:15 -0500 Subject: [PATCH 1/3] Tolerate missing field tags --- ast/field.go | 70 ++- parser/parser_test.go | 200 +++++++- parser/proto.y | 44 ++ parser/proto.y.go | 1030 ++++++++++++++++++++++------------------- parser/result.go | 27 +- parser/validate.go | 6 + 6 files changed, 862 insertions(+), 515 deletions(-) diff --git a/ast/field.go b/ast/field.go index e0619d1f..334be1e7 100644 --- a/ast/field.go +++ b/ast/field.go @@ -84,13 +84,13 @@ func NewFieldNode(label *KeywordNode, fieldType IdentValueNode, name *IdentNode, if name == nil { panic("name is nil") } - if equals == nil { - panic("equals is nil") + numChildren := 4 + if equals != nil { + numChildren++ } - if tag == nil { - panic("tag is nil") + if tag != nil { + numChildren++ } - numChildren := 4 if semicolon != nil { numChildren++ } @@ -104,7 +104,13 @@ func NewFieldNode(label *KeywordNode, fieldType IdentValueNode, name *IdentNode, if label != nil { children = append(children, label) } - children = append(children, fieldType, name, equals, tag) + children = append(children, fieldType, name) + if equals != nil { + children = append(children, equals) + } + if tag != nil { + children = append(children, tag) + } if opts != nil { children = append(children, opts) } @@ -145,6 +151,9 @@ func (n *FieldNode) FieldType() Node { } func (n *FieldNode) FieldTag() Node { + if n.Tag == nil { + return nil + } return n.Tag } @@ -237,22 +246,22 @@ func NewGroupNode(label *KeywordNode, keyword *KeywordNode, name *IdentNode, equ if name == nil { panic("name is nil") } - if equals == nil { - panic("equals is nil") - } - if tag == nil { - panic("tag is nil") - } if openBrace == nil { panic("openBrace is nil") } if closeBrace == nil { panic("closeBrace is nil") } - numChildren := 6 + len(decls) + numChildren := 4 + len(decls) if label != nil { numChildren++ } + if equals != nil { + numChildren++ + } + if tag != nil { + numChildren++ + } if opts != nil { numChildren++ } @@ -260,7 +269,13 @@ func NewGroupNode(label *KeywordNode, keyword *KeywordNode, name *IdentNode, equ if label != nil { children = append(children, label) } - children = append(children, keyword, name, equals, tag) + children = append(children, keyword, name) + if equals != nil { + children = append(children, equals) + } + if tag != nil { + children = append(children, tag) + } if opts != nil { children = append(children, opts) } @@ -302,6 +317,9 @@ func (n *GroupNode) FieldType() Node { } func (n *GroupNode) FieldTag() Node { + if n.Tag == nil { + return nil + } return n.Tag } @@ -537,13 +555,13 @@ func NewMapFieldNode(mapType *MapTypeNode, name *IdentNode, equals *RuneNode, ta if name == nil { panic("name is nil") } - if equals == nil { - panic("equals is nil") + numChildren := 2 + if equals != nil { + numChildren++ } - if tag == nil { - panic("tag is nil") + if tag != nil { + numChildren++ } - numChildren := 4 if opts != nil { numChildren++ } @@ -551,7 +569,13 @@ func NewMapFieldNode(mapType *MapTypeNode, name *IdentNode, equals *RuneNode, ta numChildren++ } children := make([]Node, 0, numChildren) - children = append(children, mapType, name, equals, tag) + children = append(children, mapType, name) + if equals != nil { + children = append(children, equals) + } + if tag != nil { + children = append(children, tag) + } if opts != nil { children = append(children, opts) } @@ -585,6 +609,9 @@ func (n *MapFieldNode) FieldType() Node { } func (n *MapFieldNode) FieldTag() Node { + if n.Tag == nil { + return nil + } return n.Tag } @@ -660,6 +687,9 @@ func (n *SyntheticMapField) FieldType() Node { } func (n *SyntheticMapField) FieldTag() Node { + if n.Tag == nil { + return nil + } return n.Tag } diff --git a/parser/parser_test.go b/parser/parser_test.go index 1c4a0b98..e40c37d5 100644 --- a/parser/parser_test.go +++ b/parser/parser_test.go @@ -93,7 +93,9 @@ func runParseErrorTestCases(t *testing.T, testCases map[string]parseErrorTestCas t.Run(name, func(t *testing.T) { t.Parallel() protoName := fmt.Sprintf("%s.proto", name) - _, err := Parse(protoName, strings.NewReader(testCase.NoError), reporter.NewHandler(nil)) + ast, err := Parse(protoName, strings.NewReader(testCase.NoError), reporter.NewHandler(nil)) + require.NoError(t, err) + _, err = ResultFromAST(ast, true, reporter.NewHandler(nil)) require.NoError(t, err) producedError := false @@ -105,12 +107,174 @@ func runParseErrorTestCases(t *testing.T, testCases map[string]parseErrorTestCas } return nil }, nil)) - _, _ = Parse(protoName, strings.NewReader(testCase.Error), errHandler) + file, err := Parse(protoName, strings.NewReader(testCase.Error), errHandler) + if err == nil { + _, _ = ResultFromAST(file, true, errHandler) + } require.Truef(t, producedError, "expected error containing %q, got %v", expected, errs) }) } } +func TestLenientParse_NoFieldID(t *testing.T) { + t.Parallel() + inputs := map[string]parseErrorTestCase{ + "field": { + Error: `syntax = "proto3"; + message Foo { + int32 bar; + }`, + NoError: `syntax = "proto3"; + message Foo { + int32 bar = 1; + }`, + }, + "field-cardinality": { + Error: `syntax = "proto3"; + message Foo { + repeated int32 bar; + }`, + NoError: `syntax = "proto3"; + message Foo { + repeated int32 bar = 1; + }`, + }, + "field-compact-options": { + Error: `syntax = "proto3"; + message Foo { + int32 bar [foo = 1]; + }`, + NoError: `syntax = "proto3"; + message Foo { + int32 bar = 1 [foo = 1]; + }`, + }, + "field-cardinality-compact-options": { + Error: `syntax = "proto3"; + message Foo { + repeated int32 bar [foo = 1]; + }`, + NoError: `syntax = "proto3"; + message Foo { + repeated int32 bar = 1 [foo = 1]; + }`, + }, + "map-field": { + Error: `syntax = "proto3"; + message Foo { + map bar; + }`, + NoError: `syntax = "proto3"; + message Foo { + map bar = 1; + }`, + }, + "map-field-compact-options": { + Error: `syntax = "proto3"; + message Foo { + map bar [foo = 1]; + }`, + NoError: `syntax = "proto3"; + message Foo { + map bar = 1 [foo = 1]; + }`, + }, + "oneof": { + Error: `syntax = "proto3"; + message Foo { + oneof bar { + int32 baz; + } + }`, + NoError: `syntax = "proto3"; + message Foo { + oneof bar { + int32 baz = 1; + } + }`, + }, + "oneof-compact-options": { + Error: `syntax = "proto3"; + message Foo { + oneof bar { + int32 baz [foo = 1]; + } + }`, + NoError: `syntax = "proto3"; + message Foo { + oneof bar { + int32 baz = 1 [foo = 1]; + } + }`, + }, + "oneof-group": { + Error: `syntax = "proto2"; + message Foo { + oneof bar { + group Baz { + optional int32 baz = 1; + } + } + }`, + NoError: `syntax = "proto2"; + message Foo { + oneof bar { + group Baz = 1 { + optional int32 baz = 1; + } + } + }`, + }, + "oneof-group-compact-options": { + Error: `syntax = "proto2"; + message Foo { + oneof bar { + group Baz [foo = 1] { + optional int32 baz = 1; + } + } + }`, + NoError: `syntax = "proto2"; + message Foo { + oneof bar { + group Baz = 1 [foo = 1] { + optional int32 baz = 1; + } + } + }`, + }, + "group-cardinality": { + Error: `syntax = "proto2"; + message Foo { + repeated group Bar { + optional int32 baz = 1; + } + }`, + NoError: `syntax = "proto2"; + message Foo { + repeated group Bar = 1 { + optional int32 baz = 1; + } + }`, + }, + "group-cardinality-compact-options": { + Error: `syntax = "proto2"; + message Foo { + repeated group Bar [foo = 1] { + optional int32 baz = 1; + } + }`, + NoError: `syntax = "proto2"; + message Foo { + repeated group Bar = 1 [foo = 1] { + optional int32 baz = 1; + } + }`, + }, + } + runParseErrorTestCases(t, inputs, "missing field tag number") +} + func TestLenientParse_SemicolonLess(t *testing.T) { t.Parallel() inputs := map[string]parseErrorTestCase{ @@ -201,22 +365,26 @@ func TestLenientParse_SemicolonLess(t *testing.T) { "enum-options": { Error: `syntax = "proto3"; enum Foo { + FOO = 0; option (foo) = 1 }`, NoError: `syntax = "proto3"; enum Foo { ; + FOO = 0; option (foo) = 1;; }`, }, "enum-reserved": { Error: `syntax = "proto3"; enum Foo { + BAR = 0; reserved "FOO" }`, NoError: `syntax = "proto3"; enum Foo { ; + BAR = 0; reserved "FOO";; }`, }, @@ -225,12 +393,14 @@ func TestLenientParse_SemicolonLess(t *testing.T) { message Foo { oneof bar { option (foo) = 1 + int32 baz = 1; } }`, NoError: `syntax = "proto3"; message Foo { oneof bar { option (foo) = 1; + int32 baz = 1; }; }`, }, @@ -386,13 +556,13 @@ func TestLenientParse_EmptyCompactOptions(t *testing.T) { t.Parallel() inputs := map[string]parseErrorTestCase{ "field-options": { - Error: `syntax = "proto3"; + Error: `syntax = "proto2"; message Foo { - int32 bar = 1 []; + optional int32 bar = 1 []; }`, - NoError: `syntax = "proto3"; + NoError: `syntax = "proto2"; message Foo { - int32 bar = 1 [default=1]; + optional int32 bar = 1 [default=1]; }`, }, "enum-options": { @@ -417,7 +587,7 @@ func TestLenientParse_EmptyCompactValue(t *testing.T) { message Foo { optional int32 bar = 1 [deprecated=true, default]; }`, - NoError: `syntax = "proto3"; + NoError: `syntax = "proto2"; message Foo { optional int32 bar = 1 [deprecated=true, default=1]; }`, @@ -440,13 +610,13 @@ func TestLenientParse_OptionsTrailingComma(t *testing.T) { t.Parallel() inputs := map[string]parseErrorTestCase{ "field-options": { - Error: `syntax = "proto3"; + Error: `syntax = "proto2"; message Foo { - int32 bar = 1 [default=1,]; + optional int32 bar = 1 [default=1,]; }`, - NoError: `syntax = "proto3"; + NoError: `syntax = "proto2"; message Foo { - int32 bar = 1 [default=1]; + optional int32 bar = 1 [default=1]; }`, }, } @@ -457,13 +627,13 @@ func TestLenientParse_OptionNameTrailingDot(t *testing.T) { t.Parallel() inputs := map[string]parseErrorTestCase{ "field-options": { - Error: `syntax = "proto3"; + Error: `syntax = "proto2"; message Foo { - int32 bar = 1 [default.=1]; + optional int32 bar = 1 [default.=1]; }`, - NoError: `syntax = "proto3"; + NoError: `syntax = "proto2"; message Foo { - int32 bar = 1 [default=1]; + optional int32 bar = 1 [default=1]; }`, }, "field-options-ext": { diff --git a/parser/proto.y b/parser/proto.y index 7fea8b23..e66cabda 100644 --- a/parser/proto.y +++ b/parser/proto.y @@ -750,6 +750,12 @@ messageGroupDecl : fieldCardinality _GROUP identifier '=' _INT_LIT '{' messageBo | fieldCardinality _GROUP identifier '=' _INT_LIT compactOptions '{' messageBody '}' semicolons { $$ = newNodeWithRunes(ast.NewGroupNode($1.ToKeyword(), $2.ToKeyword(), $3, $4, $5, $6, $7, $8, $9), $10...) } + | fieldCardinality _GROUP identifier '{' messageBody '}' semicolons { + $$ = newNodeWithRunes(ast.NewGroupNode($1.ToKeyword(), $2.ToKeyword(), $3, nil, nil, nil, $4, $5, $6), $7...) + } + | fieldCardinality _GROUP identifier compactOptions '{' messageBody '}' semicolons { + $$ = newNodeWithRunes(ast.NewGroupNode($1.ToKeyword(), $2.ToKeyword(), $3, nil, nil, $4, $5, $6, $7), $8...) + } oneofDecl : _ONEOF identifier '{' oneofBody '}' semicolons { $$ = newNodeWithRunes(ast.NewOneofNode($1.ToKeyword(), $2, $3, $4, $5), $6...) @@ -797,6 +803,12 @@ oneofFieldDecl : oneofElementTypeIdent identifier '=' _INT_LIT semicolon { | oneofElementTypeIdent identifier '=' _INT_LIT compactOptions semicolon { $$ = ast.NewFieldNode(nil, $1, $2, $3, $4, $5, $6) } + | oneofElementTypeIdent identifier semicolon { + $$ = ast.NewFieldNode(nil, $1, $2, nil, nil, nil, $3) + } + | oneofElementTypeIdent identifier compactOptions semicolon { + $$ = ast.NewFieldNode(nil, $1, $2, nil, nil, $3, $4) + } oneofGroupDecl : _GROUP identifier '=' _INT_LIT '{' messageBody '}' { $$ = ast.NewGroupNode(nil, $1.ToKeyword(), $2, $3, $4, nil, $5, $6, $7) @@ -804,6 +816,13 @@ oneofGroupDecl : _GROUP identifier '=' _INT_LIT '{' messageBody '}' { | _GROUP identifier '=' _INT_LIT compactOptions '{' messageBody '}' { $$ = ast.NewGroupNode(nil, $1.ToKeyword(), $2, $3, $4, $5, $6, $7, $8) } + | _GROUP identifier '{' messageBody '}' { + $$ = ast.NewGroupNode(nil, $1.ToKeyword(), $2, nil, nil, nil, $3, $4, $5) + } + | _GROUP identifier compactOptions '{' messageBody '}' { + $$ = ast.NewGroupNode(nil, $1.ToKeyword(), $2, nil, nil, $3, $4, $5, $6) + } + mapFieldDecl : mapType identifier '=' _INT_LIT semicolons { semi, extra := protolex.(*protoLex).requireSemicolon($5) @@ -813,6 +832,14 @@ mapFieldDecl : mapType identifier '=' _INT_LIT semicolons { semi, extra := protolex.(*protoLex).requireSemicolon($6) $$ = newNodeWithRunes(ast.NewMapFieldNode($1, $2, $3, $4, $5, semi), extra...) } + | mapType identifier semicolons { + semi, extra := protolex.(*protoLex).requireSemicolon($3) + $$ = newNodeWithRunes(ast.NewMapFieldNode($1, $2, nil, nil, nil, semi), extra...) + } + | mapType identifier compactOptions semicolons { + semi, extra := protolex.(*protoLex).requireSemicolon($4) + $$ = newNodeWithRunes(ast.NewMapFieldNode($1, $2, nil, nil, $3, semi), extra...) + } mapType : _MAP '<' mapKeyType ',' typeName '>' { $$ = ast.NewMapTypeNode($1.ToKeyword(), $2, $3, $4, $5, $6) @@ -1035,6 +1062,23 @@ messageFieldDecl : fieldCardinality notGroupElementTypeIdent identifier '=' _INT semis, extra := protolex.(*protoLex).requireSemicolon($6) $$ = newNodeWithRunes(ast.NewFieldNode(nil, $1, $2, $3, $4, $5, semis), extra...) } + | fieldCardinality notGroupElementTypeIdent identifier semicolons { + semis, extra := protolex.(*protoLex).requireSemicolon($4) + $$ = newNodeWithRunes(ast.NewFieldNode($1.ToKeyword(), $2, $3, nil, nil, nil, semis), extra...) + } + | fieldCardinality notGroupElementTypeIdent identifier compactOptions semicolons { + semis, extra := protolex.(*protoLex).requireSemicolon($5) + $$ = newNodeWithRunes(ast.NewFieldNode($1.ToKeyword(), $2, $3, nil, nil, $4, semis), extra...) + } + | msgElementTypeIdent identifier semicolons { + semis, extra := protolex.(*protoLex).requireSemicolon($3) + $$ = newNodeWithRunes(ast.NewFieldNode(nil, $1, $2, nil, nil, nil, semis), extra...) + } + | msgElementTypeIdent identifier compactOptions semicolons { + semis, extra := protolex.(*protoLex).requireSemicolon($4) + $$ = newNodeWithRunes(ast.NewFieldNode(nil, $1, $2, nil, nil, $3, semis), extra...) + } + extensionDecl : _EXTEND typeName '{' extensionBody '}' semicolons { $$ = newNodeWithRunes(ast.NewExtendNode($1.ToKeyword(), $2, $3, $4, $5), $6...) diff --git a/parser/proto.y.go b/parser/proto.y.go index 1ddc4645..048e5ccc 100644 --- a/parser/proto.y.go +++ b/parser/proto.y.go @@ -257,7 +257,7 @@ var protoExca = [...]int16{ 69, 60, -2, 62, -1, 118, - 56, 237, + 56, 249, -2, 0, -1, 121, 55, 37, @@ -267,348 +267,362 @@ var protoExca = [...]int16{ 69, 37, -2, 35, -1, 140, - 56, 217, + 56, 225, -2, 0, -1, 142, - 56, 206, + 56, 214, -2, 0, -1, 144, - 56, 238, + 56, 250, -2, 0, -1, 198, - 56, 250, + 56, 262, -2, 0, -1, 203, 56, 83, 62, 83, -2, 0, -1, 214, - 56, 218, + 56, 226, -2, 0, -1, 271, - 56, 207, + 56, 215, -2, 0, -1, 377, - 56, 251, + 56, 263, -2, 0, - -1, 462, - 56, 153, + -1, 464, + 56, 155, -2, 0, - -1, 517, + -1, 523, 69, 144, -2, 141, - -1, 522, - 56, 154, + -1, 531, + 56, 156, -2, 0, - -1, 597, + -1, 607, 67, 52, -2, 49, - -1, 652, + -1, 665, 69, 144, -2, 142, - -1, 677, + -1, 690, 67, 52, -2, 50, - -1, 708, - 56, 261, + -1, 732, + 56, 273, -2, 0, - -1, 718, - 56, 262, + -1, 745, + 56, 274, -2, 0, } const protoPrivate = 57344 -const protoLast = 1948 +const protoLast = 2053 var protoAct = [...]int16{ - 140, 7, 139, 7, 7, 586, 18, 719, 437, 436, - 498, 440, 127, 394, 439, 96, 458, 594, 597, 100, - 492, 95, 39, 523, 518, 514, 517, 32, 34, 422, - 421, 405, 200, 435, 233, 378, 272, 106, 326, 36, - 109, 404, 21, 145, 20, 40, 90, 93, 94, 19, - 102, 85, 107, 108, 149, 215, 202, 98, 101, 650, - 33, 137, 135, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, 90, 124, 125, - 86, 134, 89, 119, 115, 449, 645, 643, 142, 395, - 504, 441, 453, 131, 198, 129, 130, 642, 199, 503, - 126, 133, 390, 134, 452, 641, 457, 502, 588, 714, - 9, 395, 698, 680, 459, 451, 396, 222, 667, 273, - 423, 460, 460, 460, 207, 460, 460, 120, 121, 674, - 493, 460, 138, 134, 416, 423, 692, 501, 134, 110, - 373, 395, 388, 389, 678, 40, 395, 279, 375, 653, - 387, 485, 448, 219, 9, 217, 9, 583, 323, 484, - 218, 464, 468, 386, 466, 227, 577, 9, 113, 459, - 112, 385, 661, 428, 110, 379, 414, 374, 122, 114, - 424, 732, 730, 723, 399, 392, 104, 717, 716, 709, - 705, 222, 655, 207, 397, 424, 9, 383, 697, 486, - 376, 322, 270, 213, 726, 700, 694, 462, 123, 118, - 117, 116, 5, 6, 9, 104, 104, 412, 403, 588, - 407, 408, 413, 657, 324, 40, 31, 219, 415, 217, - 384, 689, 688, 687, 218, 9, 402, 654, 23, 227, - 400, 417, 507, 506, 409, 489, 24, 488, 273, 25, - 26, 463, 456, 430, 419, 111, 461, 9, 13, 12, - 589, 381, 15, 412, 105, 103, 704, 721, 413, 519, - 8, 703, 647, 26, 210, 209, 279, 35, 418, 26, - 28, 27, 29, 30, 33, 104, 211, 212, 646, 585, - 584, 37, 38, 425, 471, 472, 473, 474, 475, 476, - 477, 478, 479, 480, 481, 482, 520, 382, 573, 406, - 508, 491, 487, 33, 707, 426, 427, 718, 40, 4, - 380, 429, 10, 11, 197, 377, 22, 143, 144, 274, - 141, 271, 220, 420, 275, 225, 411, 410, 521, 522, - 214, 231, 224, 221, 526, 147, 223, 432, 146, 525, - 216, 204, 203, 447, 379, 495, 591, 529, 150, 228, - 595, 99, 592, 327, 431, 531, 154, 234, 277, 596, - 329, 533, 434, 156, 237, 450, 470, 391, 393, 442, - 442, 465, 467, 433, 438, 207, 132, 128, 87, 88, - 206, 454, 455, 91, 444, 515, 512, 524, 445, 516, - 17, 16, 14, 3, 469, 2, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 490, 483, - 0, 0, 500, 499, 0, 0, 0, 0, 509, 510, - 0, 494, 0, 442, 0, 574, 0, 0, 505, 0, + 140, 7, 746, 7, 7, 100, 139, 18, 440, 394, + 604, 436, 607, 439, 502, 39, 524, 596, 95, 532, + 496, 127, 437, 422, 520, 200, 32, 34, 523, 233, + 421, 40, 90, 93, 94, 405, 102, 106, 36, 96, + 109, 435, 272, 85, 378, 458, 326, 404, 21, 20, + 19, 107, 108, 149, 215, 202, 145, 98, 101, 86, + 663, 89, 449, 390, 134, 706, 703, 598, 707, 513, + 9, 652, 395, 510, 465, 9, 511, 396, 717, 651, + 507, 459, 459, 460, 452, 459, 456, 9, 506, 459, + 459, 462, 739, 90, 693, 451, 655, 598, 459, 9, + 680, 653, 459, 687, 508, 459, 423, 459, 124, 125, + 453, 115, 459, 459, 459, 134, 126, 133, 142, 138, + 131, 129, 497, 395, 198, 130, 423, 134, 199, 448, + 416, 388, 389, 711, 489, 395, 505, 119, 9, 387, + 207, 666, 488, 593, 9, 468, 472, 113, 222, 112, + 273, 386, 470, 462, 587, 9, 373, 120, 121, 385, + 110, 40, 110, 691, 674, 428, 424, 414, 374, 122, + 114, 375, 279, 760, 758, 754, 750, 104, 744, 743, + 741, 733, 729, 721, 695, 9, 424, 716, 753, 219, + 217, 218, 668, 383, 227, 376, 322, 270, 213, 728, + 719, 323, 713, 658, 464, 123, 379, 118, 117, 207, + 116, 5, 6, 104, 399, 9, 598, 104, 670, 324, + 31, 702, 222, 667, 493, 490, 9, 492, 430, 392, + 419, 111, 13, 12, 403, 599, 407, 408, 413, 528, + 463, 40, 381, 748, 726, 8, 412, 724, 397, 659, + 33, 415, 15, 656, 26, 26, 9, 37, 38, 384, + 210, 209, 105, 219, 217, 218, 103, 35, 227, 400, + 595, 417, 211, 212, 402, 23, 529, 594, 104, 273, + 409, 582, 406, 24, 413, 516, 25, 26, 382, 495, + 491, 4, 412, 33, 10, 11, 731, 745, 380, 197, + 377, 279, 475, 476, 477, 478, 479, 480, 481, 482, + 483, 484, 485, 486, 418, 22, 143, 28, 27, 29, + 30, 144, 274, 425, 141, 271, 220, 420, 275, 225, + 411, 426, 427, 410, 40, 530, 531, 214, 231, 224, + 221, 535, 147, 223, 429, 146, 534, 216, 204, 203, + 447, 499, 601, 538, 150, 228, 605, 99, 602, 327, + 540, 154, 234, 277, 606, 329, 542, 156, 237, 474, + 391, 393, 438, 132, 128, 87, 88, 432, 206, 91, + 431, 521, 518, 533, 522, 379, 17, 16, 434, 14, + 3, 2, 1, 0, 0, 442, 442, 0, 0, 0, + 0, 207, 0, 0, 457, 0, 0, 454, 455, 466, + 0, 469, 471, 0, 0, 0, 0, 0, 0, 450, + 473, 445, 433, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 444, 0, 494, 0, 0, 0, 0, 0, + 0, 0, 0, 487, 0, 0, 0, 498, 0, 442, + 461, 0, 0, 0, 467, 503, 514, 0, 0, 517, + 0, 525, 526, 0, 0, 90, 504, 0, 583, 584, + 0, 0, 0, 0, 0, 0, 0, 0, 586, 0, + 0, 0, 0, 0, 585, 0, 0, 0, 588, 0, + 591, 0, 509, 0, 0, 0, 0, 0, 527, 0, + 512, 515, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 592, 0, 660, 661, 657, 590, + 0, 0, 0, 0, 0, 0, 0, 90, 0, 0, + 654, 0, 0, 589, 0, 0, 0, 0, 0, 0, + 0, 597, 0, 90, 672, 673, 664, 40, 0, 0, + 665, 669, 0, 0, 671, 0, 0, 675, 0, 0, + 0, 0, 662, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 90, 575, 0, 0, 578, 0, 581, 0, 576, 0, - 0, 511, 0, 0, 0, 0, 0, 0, 0, 0, - 579, 0, 0, 0, 0, 0, 0, 0, 587, 648, - 0, 0, 644, 0, 0, 580, 582, 0, 0, 0, - 0, 0, 0, 0, 0, 649, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 90, 0, 0, 0, 0, - 0, 651, 652, 0, 0, 0, 656, 0, 90, 659, - 660, 0, 40, 658, 0, 662, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 663, 0, 0, 0, 0, 0, - 666, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 664, 669, 0, 671, 0, 0, 0, 0, 0, 665, - 0, 668, 670, 0, 0, 0, 0, 0, 0, 675, - 672, 0, 673, 676, 677, 0, 0, 0, 0, 0, + 0, 0, 0, 676, 0, 0, 0, 0, 0, 0, + 679, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 678, 0, 0, 0, + 0, 0, 0, 682, 0, 684, 689, 0, 690, 686, + 685, 0, 0, 0, 0, 0, 0, 0, 677, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 681, 683, 0, 688, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 442, 0, + 697, 0, 0, 699, 503, 696, 0, 692, 0, 701, + 0, 0, 0, 133, 0, 504, 131, 129, 710, 0, + 709, 130, 0, 0, 0, 0, 715, 712, 0, 700, + 704, 0, 0, 0, 0, 0, 720, 0, 0, 722, + 718, 714, 694, 0, 0, 698, 0, 0, 133, 0, + 0, 131, 129, 0, 727, 0, 130, 732, 705, 708, + 730, 0, 735, 725, 723, 0, 734, 0, 0, 0, + 0, 0, 0, 0, 749, 742, 0, 0, 0, 0, + 747, 736, 737, 0, 0, 755, 752, 0, 756, 0, + 0, 757, 0, 747, 0, 0, 751, 0, 0, 0, + 759, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 738, 501, 740, 33, 137, 135, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 0, 0, 0, 0, 134, 0, 0, 0, 0, 0, + 0, 0, 395, 0, 441, 0, 0, 0, 500, 33, + 137, 135, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 0, 0, 0, 0, + 134, 0, 0, 0, 0, 0, 0, 0, 395, 0, + 441, 0, 0, 443, 33, 137, 135, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 0, 0, 0, 0, 134, 0, 0, 0, 0, + 0, 0, 0, 395, 0, 441, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 682, 0, - 684, 500, 499, 679, 0, 0, 686, 0, 0, 0, - 0, 0, 442, 681, 683, 691, 131, 685, 129, 130, - 693, 0, 0, 696, 133, 0, 695, 0, 0, 0, - 0, 690, 0, 699, 701, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 706, 708, 131, - 702, 129, 130, 710, 0, 0, 0, 133, 711, 712, - 722, 0, 0, 0, 0, 720, 0, 725, 727, 724, - 713, 715, 0, 0, 729, 720, 728, 0, 497, 731, - 33, 137, 135, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, 0, 0, 0, - 0, 134, 0, 0, 0, 0, 0, 0, 0, 395, - 0, 441, 0, 0, 0, 496, 33, 137, 135, 41, + 0, 0, 0, 0, 205, 92, 0, 0, 519, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 0, 0, 0, 0, 134, 0, 0, - 0, 0, 0, 0, 0, 395, 0, 441, 0, 0, - 443, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 82, 83, 84, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 446, 0, 205, 0, 0, 0, + 208, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 205, - 92, 0, 0, 513, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, 83, 84, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 446, - 0, 205, 0, 0, 0, 208, 41, 42, 43, 44, + 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 208, 33, 137, 135, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 0, 0, 0, 0, 0, 201, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 208, 33, 137, - 135, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 0, 0, 0, 0, 134, - 0, 0, 0, 0, 0, 205, 0, 0, 0, 136, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, - 423, 208, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 0, 0, 0, 0, + 0, 0, 0, 0, 134, 0, 0, 0, 0, 0, + 205, 0, 0, 0, 136, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 424, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 33, 423, 208, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 424, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 92, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 97, 598, 599, 600, 601, 602, - 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, - 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, - 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, - 633, 634, 635, 636, 637, 638, 639, 590, 640, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 593, 330, - 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, - 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, - 351, 352, 353, 354, 355, 356, 357, 358, 359, 401, - 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, - 370, 371, 372, 0, 0, 0, 0, 0, 226, 0, - 0, 0, 328, 238, 239, 240, 241, 242, 243, 244, - 26, 245, 246, 247, 248, 153, 152, 151, 249, 250, - 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, - 261, 262, 263, 0, 230, 236, 229, 264, 265, 232, - 28, 27, 29, 266, 267, 268, 269, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 235, 330, 331, 332, - 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, - 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, - 353, 354, 355, 356, 357, 358, 359, 325, 360, 361, - 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, - 372, 0, 0, 0, 0, 0, 148, 0, 0, 0, - 328, 157, 158, 159, 160, 161, 162, 163, 164, 165, - 166, 167, 168, 153, 152, 151, 169, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 0, 184, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, 0, 0, 0, 0, 0, - 527, 0, 0, 0, 155, 534, 535, 536, 537, 538, - 539, 540, 528, 541, 542, 543, 544, 0, 0, 0, - 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, - 555, 556, 557, 558, 559, 530, 560, 561, 562, 563, - 564, 565, 566, 567, 568, 569, 570, 571, 572, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 532, 210, - 209, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 33, 406, 0, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 276, 0, 0, 0, 0, 280, 281, 282, - 283, 284, 285, 286, 26, 287, 288, 289, 290, 291, - 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, - 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, - 312, 313, 314, 278, 315, 316, 317, 318, 319, 320, - 321, 398, 0, 0, 0, 0, 41, 42, 43, 44, + 0, 0, 0, 0, 0, 92, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, + 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, + 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, + 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, + 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, + 648, 649, 600, 650, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 603, 330, 331, 332, 333, 334, 335, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, + 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, + 356, 357, 358, 359, 401, 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, 370, 371, 372, 0, 0, + 0, 0, 0, 226, 0, 0, 0, 328, 238, 239, + 240, 241, 242, 243, 244, 26, 245, 246, 247, 248, + 153, 152, 151, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 0, 230, + 236, 229, 264, 265, 232, 28, 27, 29, 266, 267, + 268, 269, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 235, 330, 331, 332, 333, 334, 335, 336, 337, + 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, + 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, + 358, 359, 325, 360, 361, 362, 363, 364, 365, 366, + 367, 368, 369, 370, 371, 372, 0, 0, 0, 0, + 0, 148, 0, 0, 0, 328, 157, 158, 159, 160, + 161, 162, 163, 164, 165, 166, 167, 168, 153, 152, + 151, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 0, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 0, 0, 0, 0, 0, 536, 0, 0, 0, 155, + 543, 544, 545, 546, 547, 548, 549, 537, 550, 551, + 552, 553, 0, 0, 0, 554, 555, 556, 557, 558, + 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, + 539, 569, 570, 571, 572, 573, 574, 575, 576, 577, + 578, 579, 580, 581, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 541, 210, 209, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 598, 599, 600, 601, 602, 603, - 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, - 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, - 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, - 634, 635, 636, 637, 638, 639, 0, 640, + 33, 406, 0, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 276, 0, 0, + 0, 0, 280, 281, 282, 283, 284, 285, 286, 26, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 278, 315, + 316, 317, 318, 319, 320, 321, 398, 0, 0, 0, + 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 608, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, + 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, + 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, + 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, + 649, 0, 650, } var protoPact = [...]int16{ - 234, -1000, 191, 191, -1000, 237, 236, 266, 203, -1000, - -1000, -1000, 339, 339, 266, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, 310, 1853, 1224, 1853, 1853, 1284, - 1853, -1000, 242, -1000, 241, -1000, 212, 339, 339, 144, + 203, -1000, 162, 162, -1000, 181, 180, 273, 167, -1000, + -1000, -1000, 289, 289, 273, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, 246, 1958, 1329, 1958, 1958, 1389, + 1958, -1000, 213, -1000, 209, -1000, 173, 289, 289, 102, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, 233, -1000, 1224, 149, -1000, - -1000, -1000, 1284, 186, 185, 184, -1000, 1853, -1000, 1853, - 148, -1000, 183, -1000, -1000, -1000, -1000, 212, 212, -1000, - 1853, 1044, -1000, -1000, -1000, 95, 191, 191, 1554, -1000, - -1000, -1000, -1000, 191, -1000, -1000, -1000, 191, -1000, -1000, - 311, -1000, -1000, -1000, 979, -1000, 299, -1000, -1000, 177, - 1446, 176, 1760, 175, 1554, -1000, -1000, -1000, 201, 1500, - 1853, -1000, -1000, -1000, 147, 1853, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, 179, -1000, 1329, 110, -1000, + -1000, -1000, 1389, 155, 153, 152, -1000, 1958, -1000, 1958, + 109, -1000, 150, -1000, -1000, -1000, -1000, 173, 173, -1000, + 1958, 1149, -1000, -1000, -1000, 52, 162, 162, 1659, -1000, + -1000, -1000, -1000, 162, -1000, -1000, -1000, 162, -1000, -1000, + 274, -1000, -1000, -1000, 1084, -1000, 255, -1000, -1000, 142, + 1551, 141, 1865, 140, 1659, -1000, -1000, -1000, 166, 1605, + 1958, -1000, -1000, -1000, 108, 1958, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, 174, 289, -1000, - 171, -1000, -1000, 1103, 140, 119, 78, -1000, 1809, -1000, - -1000, -1000, -1000, 191, 1446, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, 1392, 1853, 334, - 1853, 1853, 1711, -1000, 146, 1853, 101, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, 139, 240, -1000, + 137, -1000, -1000, 1208, 98, 78, 9, -1000, 1914, -1000, + -1000, -1000, -1000, 162, 1551, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, 1497, 1958, 277, + 1958, 1958, 1816, -1000, 107, 1958, 67, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - 191, 1760, -1000, -1000, -1000, -1000, -1000, 232, 1165, -1000, + 162, 1865, -1000, -1000, -1000, -1000, -1000, 178, 1270, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, 191, -1000, -1000, 1853, 1853, 143, 1853, -1000, + -1000, -1000, 162, -1000, -1000, 1958, 1958, 105, 1958, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, 231, 1853, 109, 191, 289, -1000, -1000, - -1000, -1000, 1853, -1000, -1000, -1000, -1000, -1000, -1000, 792, - 792, -1000, -1000, -1000, -1000, 917, 113, 76, 53, -1000, - -1000, 1853, 1853, 230, 83, -1000, 245, 182, 229, 138, - 133, 131, 311, -1000, 1853, 109, 300, -1000, -1000, 160, - 128, -1000, 188, -1000, 337, -1000, 225, 223, 1853, 109, - 336, -1000, -1000, -1000, 94, -1000, -1000, -1000, -1000, 311, - -1000, 1664, -1000, 726, -1000, 105, -1000, 68, -1000, 51, - -1000, -1000, 1853, -1000, 221, 220, 335, 191, 191, 334, - 854, 294, 1608, 333, 191, -1000, 339, -1000, 1853, -1000, - 135, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, 87, 160, 191, 145, -1000, 315, 314, - -1000, 85, 240, 1338, -1000, 66, -1000, 48, -1000, -1000, - -1000, -1000, -1000, 108, -1000, 47, 313, 297, 87, -1000, - -1000, -1000, -10, -1000, -1000, 1224, 118, -1000, 215, -1000, - -1000, 166, 1608, -1000, -1000, -1000, -1000, 200, 1224, 1853, - 1853, 142, 1853, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, 176, 1958, 100, 162, 240, -1000, -1000, + -1000, -1000, 1958, -1000, -1000, -1000, -1000, -1000, -1000, 835, + 835, -1000, -1000, -1000, -1000, 1022, 60, 26, 41, -1000, + -1000, 1958, 1958, 34, 30, -1000, 199, 149, 22, 92, + 91, 85, 274, -1000, 1958, 100, 278, -1000, -1000, 121, + 81, -1000, 184, -1000, 285, -1000, 175, 172, 1958, 100, + 284, -1000, -1000, -1000, 56, -1000, -1000, -1000, -1000, 274, + -1000, 1769, -1000, 769, -1000, 74, -1000, 19, -1000, 35, + -1000, -1000, 1958, -1000, 21, 17, 280, -1000, 162, 959, + 162, 162, 277, 234, 1713, 276, -1000, 162, 162, -1000, + 289, -1000, 1958, -1000, 93, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, 46, 121, 162, + 101, -1000, 272, 265, -1000, 44, 185, 1443, -1000, 10, + -1000, 32, -1000, -1000, -1000, -1000, -1000, 72, -1000, 27, + 248, 162, 148, 244, -1000, 162, 46, -1000, -9, -1000, + -1000, 1329, 80, -1000, 171, -1000, -1000, -1000, -1000, -1000, + 136, 1713, -1000, -1000, -1000, -1000, 165, 1329, 1958, 1958, + 104, 1958, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, 87, -1000, 311, -1000, 1284, -1000, 191, - -1000, -1000, -1000, -1000, 93, 85, -1000, 196, -1000, 94, - 1284, 92, -1000, 1853, -1000, 1897, 114, -1000, -1000, -1000, + -1000, -1000, 46, -1000, -1000, 274, -1000, 1389, -1000, 162, + -1000, -1000, -1000, -1000, 45, 44, -1000, 163, -1000, 56, + 1389, 36, -1000, 1958, -1000, 2002, 103, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, 56, -1000, -1000, -1000, 88, 87, -1000, 191, - -1000, -1000, -1000, -1000, 1044, 191, -1000, -1000, 211, 210, - 209, 1853, 109, -1000, 191, 104, -1000, 191, 181, -1000, - 196, -1000, 173, 75, -1000, -1000, -1000, -1000, -1000, -1000, - 191, 180, -1000, 191, -1000, -1000, -1000, 1044, 296, 291, - -1000, -1000, -1000, 164, 191, -1000, -1000, 191, -1000, 163, - 191, -1000, 196, 85, 84, -1000, 162, 161, 295, 191, - 157, -1000, -1000, 196, 191, 179, -1000, 191, 295, -1000, - -1000, -1000, -1000, 191, -1000, 156, 191, -1000, -1000, -1000, - -1000, 155, -1000, + -1000, -1000, 900, -1000, -1000, -1000, 39, 128, 162, 46, + -1000, -1000, 162, -1000, -1000, -1000, -1000, 1149, 162, -1000, + -1000, 169, 14, 13, 1958, 100, -1000, 162, 71, -1000, + 162, 147, -1000, 163, -1000, 132, 11, -1000, -1000, -1000, + -1000, -1000, -1000, 162, 145, 162, 127, -1000, 162, -1000, + -1000, -1000, 1149, 242, -1000, 163, 239, 162, 144, -1000, + -1000, -1000, 126, 162, -1000, -1000, 162, -1000, 125, 162, + -1000, 162, -1000, 163, 44, -1000, 37, 124, 162, -1000, + 123, 122, 241, 162, 120, -1000, -1000, -1000, 163, 162, + 133, -1000, 119, -1000, 162, 241, -1000, -1000, -1000, -1000, + 162, -1000, 118, 162, -1000, -1000, -1000, -1000, -1000, 117, + -1000, } var protoPgo = [...]int16{ - 0, 436, 435, 433, 349, 292, 432, 431, 430, 429, - 427, 6, 26, 25, 426, 425, 423, 420, 419, 112, - 110, 24, 418, 16, 33, 12, 417, 9, 13, 8, - 11, 416, 414, 10, 408, 407, 29, 19, 406, 404, - 403, 401, 400, 399, 398, 54, 58, 57, 18, 17, - 22, 397, 396, 395, 393, 392, 15, 391, 390, 21, - 389, 388, 387, 38, 386, 385, 383, 382, 56, 32, - 381, 380, 379, 378, 376, 375, 374, 373, 372, 371, - 49, 55, 370, 2, 23, 369, 368, 367, 366, 365, - 364, 34, 31, 30, 41, 363, 362, 44, 36, 361, - 360, 359, 42, 43, 358, 357, 14, 356, 35, 355, - 354, 350, 7, 347, 344, 20, 5, 0, 300, + 0, 392, 391, 390, 291, 252, 389, 387, 386, 384, + 383, 7, 28, 24, 382, 381, 379, 378, 376, 61, + 59, 16, 375, 45, 41, 21, 374, 11, 9, 22, + 8, 373, 372, 14, 371, 370, 23, 5, 369, 368, + 367, 366, 365, 364, 363, 53, 58, 57, 12, 10, + 15, 362, 361, 360, 359, 358, 39, 357, 356, 18, + 355, 354, 353, 46, 352, 351, 350, 349, 55, 25, + 348, 347, 346, 345, 343, 342, 341, 340, 339, 338, + 50, 54, 337, 6, 19, 336, 335, 333, 330, 329, + 328, 29, 35, 30, 47, 327, 326, 49, 42, 325, + 324, 322, 48, 56, 321, 316, 13, 315, 44, 300, + 299, 298, 2, 297, 296, 20, 17, 0, 245, } var protoR1 = [...]int8{ @@ -627,47 +641,48 @@ var protoR1 = [...]int8{ 66, 66, 59, 59, 60, 60, 61, 61, 62, 62, 63, 63, 64, 64, 45, 45, 45, 23, 23, 14, 14, 15, 15, 13, 13, 12, 9, 9, 75, 75, - 77, 77, 74, 86, 86, 85, 85, 84, 84, 84, - 84, 84, 72, 72, 76, 76, 78, 78, 79, 38, - 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, - 38, 96, 96, 94, 94, 92, 92, 92, 95, 95, - 93, 93, 93, 36, 36, 89, 89, 90, 90, 91, - 91, 87, 87, 88, 88, 97, 100, 100, 99, 99, - 98, 98, 98, 98, 101, 101, 80, 83, 83, 82, - 82, 81, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 71, 71, 71, 71, 102, 105, 105, 104, - 104, 103, 103, 103, 103, 73, 73, 73, 73, 107, - 110, 110, 109, 109, 108, 108, 108, 111, 111, 115, - 115, 114, 114, 113, 113, 112, 112, 39, 39, 39, + 77, 77, 77, 77, 74, 86, 86, 85, 85, 84, + 84, 84, 84, 84, 72, 72, 72, 72, 76, 76, + 76, 76, 78, 78, 78, 78, 79, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, 38, 96, + 96, 94, 94, 92, 92, 92, 95, 95, 93, 93, + 93, 36, 36, 89, 89, 90, 90, 91, 91, 87, + 87, 88, 88, 97, 100, 100, 99, 99, 98, 98, + 98, 98, 101, 101, 80, 83, 83, 82, 82, 81, + 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, + 71, 71, 71, 71, 71, 71, 71, 71, 102, 105, + 105, 104, 104, 103, 103, 103, 103, 73, 73, 73, + 73, 107, 110, 110, 109, 109, 108, 108, 108, 111, + 111, 115, 115, 114, 114, 113, 113, 112, 112, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 41, 41, 41, 41, 41, 41, 41, 41, + 44, 44, 44, 44, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 41, 41, 41, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 43, 43, 43, 43, 43, 43, + 42, 42, 42, 42, 42, 42, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 37, 37, 37, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, - 37, + 37, 37, 37, } var protoR2 = [...]int8{ @@ -686,18 +701,19 @@ var protoR2 = [...]int8{ 1, 3, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 3, 2, 1, 2, 1, 2, 1, 1, 2, 3, 1, 8, 9, - 9, 10, 6, 0, 1, 2, 1, 1, 1, 1, - 2, 1, 5, 6, 7, 8, 5, 6, 6, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 4, 4, 1, 3, 1, 3, 3, 1, 3, - 1, 3, 3, 1, 2, 4, 1, 4, 1, 3, - 3, 1, 3, 1, 3, 6, 1, 2, 2, 1, - 1, 1, 1, 1, 4, 5, 6, 1, 2, 2, + 9, 10, 7, 8, 6, 0, 1, 2, 1, 1, + 1, 1, 2, 1, 5, 6, 3, 4, 7, 8, + 5, 6, 5, 6, 3, 4, 6, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, + 4, 1, 3, 1, 3, 3, 1, 3, 1, 3, + 3, 1, 2, 4, 1, 4, 1, 3, 3, 1, + 3, 1, 3, 6, 1, 2, 2, 1, 1, 1, + 1, 1, 4, 5, 6, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 6, 7, 5, 6, 6, 0, 1, 2, - 1, 1, 1, 2, 1, 6, 7, 5, 6, 6, - 1, 2, 2, 1, 1, 1, 1, 6, 9, 4, - 3, 1, 2, 2, 1, 1, 1, 1, 1, 1, + 6, 7, 5, 6, 4, 5, 3, 4, 6, 0, + 1, 2, 1, 1, 1, 2, 1, 6, 7, 5, + 6, 6, 1, 2, 2, 1, 1, 1, 1, 6, + 9, 4, 3, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -726,7 +742,7 @@ var protoR2 = [...]int8{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, + 1, 1, 1, } var protoChk = [...]int16{ @@ -775,35 +791,38 @@ var protoChk = [...]int16{ -95, -93, -36, 5, 65, -117, -37, -37, 60, -50, 52, -37, -117, -108, -37, -24, -27, -29, -32, -106, -30, 65, -37, 68, -24, -69, 62, -66, 69, 2, - -29, 69, 58, 69, -37, -37, 52, 53, -23, 61, - 68, 41, 55, 52, 53, -117, 61, -117, 61, -37, - -38, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, -36, 61, 53, 41, 5, 52, 52, - -37, 5, -115, 66, -37, -65, 69, 2, -33, -27, - -29, 62, 69, 61, 69, -56, 52, 52, 5, -117, - -117, -92, -14, 69, -13, -15, -9, -12, -21, 5, - 42, -86, -85, -84, -10, -72, -76, 2, 14, -62, - 37, -53, 60, -41, 7, 8, 9, 10, 11, 12, - 13, 15, 16, 17, 18, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 5, -117, -106, -37, 61, -117, -23, + -29, 69, 58, 69, -37, -37, 52, -117, -23, 68, + 53, -23, 61, 41, 55, 52, -117, -23, 53, -117, + 61, -117, 61, -37, -38, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, -36, 61, 53, + 41, 5, 52, 52, -37, 5, -115, 66, -37, -65, + 69, 2, -33, -27, -29, 62, 69, 61, 69, -56, + 52, 55, -23, 52, -117, -23, 5, -117, -14, 69, + -13, -15, -9, -12, -21, -117, -117, -92, 5, 42, + -86, -85, -84, -10, -72, -76, 2, 14, -62, 37, + -53, 60, -41, 7, 8, 9, 10, 11, 12, 13, + 15, 16, 17, 18, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 5, -117, -117, -106, -37, 61, -117, -23, -93, -117, -36, 42, 5, 5, -116, -23, 53, 50, 49, -64, -55, 60, -49, -58, -43, -48, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 50, 69, 61, 69, -29, 69, 5, 5, -117, -23, - 69, -13, -12, 61, 52, 56, -84, 53, -21, -37, - -37, 60, -50, -117, -23, -59, -117, 55, -23, -116, - -23, -116, -115, -59, 67, -56, -49, -48, 60, -33, - 55, -23, -117, -23, -117, -25, -117, 52, 52, 52, - -37, -117, 62, -83, 55, -116, -117, 55, 67, -83, - 55, -117, -25, 5, 5, 56, -83, -114, -117, 56, - -83, -116, -116, -23, 55, -23, 56, 56, -113, -112, - -11, 2, -117, 56, -116, -83, 55, -117, -112, -117, - 56, -83, 56, + 50, 69, 61, 69, -29, 69, 5, -83, 55, 5, + -117, -117, -23, 69, -13, -12, 61, 52, 56, -84, + 53, -21, -37, -37, 60, -50, -117, -23, -59, -117, + 55, -23, -116, -23, -116, -115, -59, 67, -56, -49, + -48, 60, -33, 55, -23, 56, -83, -117, -23, -117, + -25, -117, 52, 52, -116, -23, 52, 55, -23, -37, + -117, 62, -83, 55, -116, -117, 55, 67, -83, 55, + -117, 56, -117, -25, 5, -116, 5, -83, 55, 56, + -83, -114, -117, 56, -83, -117, -116, -116, -23, 55, + -23, 56, -83, 56, 56, -113, -112, -11, 2, -117, + 56, -116, -83, 55, 56, -117, -112, -117, 56, -83, + 56, } var protoDef = [...]int16{ @@ -811,76 +830,79 @@ var protoDef = [...]int16{ 4, 5, 0, 0, -2, 9, 10, 11, 12, 13, 14, 15, 16, 17, 0, 0, 0, 0, 0, 0, 0, 19, 0, 78, 0, 8, 21, 0, 0, 21, - 30, 507, 508, 509, 510, 511, 512, 513, 514, 515, - 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, - 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, - 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, - 546, 547, 548, 549, 550, 0, 63, 0, 59, -2, + 30, 519, 520, 521, 522, 523, 524, 525, 526, 527, + 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, + 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, + 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, + 558, 559, 560, 561, 562, 0, 63, 0, 59, -2, 56, 57, 0, 0, 0, 0, 122, 0, 32, 0, 36, -2, 0, 24, 79, 25, 26, 21, 21, 29, 0, 0, -2, 64, 58, 0, 21, 21, -2, 123, 33, -2, 38, 21, 27, 28, 31, 21, 66, 67, 68, 69, 70, 71, 0, 72, 0, 74, 65, 0, - -2, 0, -2, 0, -2, 240, 241, 242, 244, 0, - 0, 134, 135, 136, 126, 0, 41, 300, 301, 302, - 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, - 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, - 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, - 333, 334, 335, 336, 337, 338, 339, 0, -2, 55, + -2, 0, -2, 0, -2, 252, 253, 254, 256, 0, + 0, 134, 135, 136, 126, 0, 41, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 0, -2, 55, 0, 81, 82, -2, 85, 90, 0, 94, 0, 73, - 75, 76, 77, 21, -2, 220, 221, 222, 223, 224, - 225, 226, 227, 228, 229, 230, 231, 0, 0, 0, - 0, 0, 0, 196, 124, 0, 293, 39, 267, 268, - 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, - 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, - 289, 290, 291, 292, 294, 295, 296, 297, 298, 299, - 21, -2, 209, 210, 211, 212, 213, 0, 0, 198, - 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, - 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, - 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, - 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, - 380, 381, 21, 239, 243, 0, 0, 130, 0, 45, - 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, - 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, - 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, - 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, - 461, 462, 463, 0, 0, 127, 21, -2, 253, 254, - 255, 256, 0, 80, 84, 86, 87, 88, 89, 0, - 0, 92, 105, 106, 107, 0, 0, 0, 0, 216, - 219, 0, 0, 0, 0, 183, 185, 0, 0, 0, - 21, 21, 201, 203, 0, 125, 0, 205, 208, 0, - 0, 188, 190, 193, 0, 236, 0, 0, 0, 131, - 0, 42, 249, 252, 0, 93, 98, 99, 100, 101, + 75, 76, 77, 21, -2, 228, 229, 230, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 0, 0, 0, + 0, 0, 0, 204, 124, 0, 305, 39, 279, 280, + 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, + 301, 302, 303, 304, 306, 307, 308, 309, 310, 311, + 21, -2, 217, 218, 219, 220, 221, 0, 0, 206, + 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, + 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, + 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, + 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, + 392, 393, 21, 251, 255, 0, 0, 130, 0, 45, + 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, + 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, + 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, + 473, 474, 475, 0, 0, 127, 21, -2, 265, 266, + 267, 268, 0, 80, 84, 86, 87, 88, 89, 0, + 0, 92, 105, 106, 107, 0, 0, 0, 0, 224, + 227, 0, 0, 21, 0, 191, 193, 0, 21, 0, + 21, 21, 209, 211, 0, 125, 0, 213, 216, 0, + 0, 196, 198, 201, 0, 248, 0, 0, 0, 131, + 0, 42, 261, 264, 0, 93, 98, 99, 100, 101, 102, 0, 104, 0, 91, 0, 109, 0, 118, 0, - 120, 95, 0, 97, 0, 0, 0, 21, 21, 0, - 0, 0, -2, 0, 21, 199, 0, 200, 0, 40, - 0, 169, 170, 171, 172, 173, 174, 175, 176, 177, - 178, 179, 180, 21, 0, 21, 0, 194, 0, 0, - 46, 23, 0, 0, 103, 0, 111, 0, 113, 115, - 116, 108, 117, 0, 119, 0, 0, 0, 21, 181, - 182, 184, 0, 138, 139, 0, 143, -2, 147, 186, - 187, 0, -2, 156, 157, 158, 159, 161, 0, 0, - 0, 128, 0, 43, 382, 383, 384, 385, 386, 387, - 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, - 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, - 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, - 418, 419, 420, 21, 195, 202, 204, 0, 214, 21, - 189, 197, 191, 192, 0, 23, 247, 23, 22, 0, - 0, 0, 132, 0, 47, 0, 51, -2, 464, 465, - 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, - 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, - 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, - 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, - 506, 110, 0, 112, 121, 96, 0, 21, 234, 21, - 137, 140, -2, 145, 0, 21, 155, 160, 0, 0, - 0, 0, 129, 166, 21, 0, 215, 21, 0, 245, - 23, 248, 21, 0, 260, 133, 48, -2, 53, 114, - 21, 0, 232, 21, 235, 146, 152, 0, 0, 0, - 44, 167, 168, 0, 21, 246, 257, 21, 259, 0, - 21, 233, 23, 23, 0, 148, 0, 0, -2, 21, - 0, 54, 162, 23, 21, 0, 149, 21, -2, 264, - 265, 266, 150, 21, 163, 0, 21, 258, 263, 151, - 164, 0, 165, + 120, 95, 0, 97, 0, 21, 0, 246, 21, 0, + 21, 21, 0, 0, -2, 0, 174, 21, 21, 207, + 0, 208, 0, 40, 0, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 21, 0, 21, + 0, 202, 0, 0, 46, 23, 0, 0, 103, 0, + 111, 0, 113, 115, 116, 108, 117, 0, 119, 0, + 0, 21, 0, 0, 244, 21, 21, 247, 0, 138, + 139, 0, 143, -2, 147, 189, 190, 192, 194, 195, + 0, -2, 158, 159, 160, 161, 163, 0, 0, 0, + 128, 0, 43, 394, 395, 396, 397, 398, 399, 400, + 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, + 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, + 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, + 431, 432, 21, 175, 203, 210, 212, 0, 222, 21, + 197, 205, 199, 200, 0, 23, 259, 23, 22, 0, + 0, 0, 132, 0, 47, 0, 51, -2, 476, 477, + 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, + 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, + 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, + 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, + 518, 110, 0, 112, 121, 96, 0, 0, 21, 21, + 245, 242, 21, 137, 140, -2, 145, 0, 21, 157, + 162, 0, 23, 0, 0, 129, 172, 21, 0, 223, + 21, 0, 257, 23, 260, 21, 0, 272, 133, 48, + -2, 53, 114, 21, 0, 21, 0, 240, 21, 243, + 146, 154, 0, 0, 166, 23, 0, 21, 0, 44, + 173, 176, 0, 21, 258, 269, 21, 271, 0, 21, + 152, 21, 241, 23, 23, 167, 0, 0, 21, 148, + 0, 0, -2, 21, 0, 153, 54, 164, 23, 21, + 0, 170, 0, 149, 21, -2, 276, 277, 278, 150, + 21, 165, 0, 21, 171, 270, 275, 151, 168, 0, + 169, } var protoTok1 = [...]int8{ @@ -2030,16 +2052,26 @@ protodefault: protoVAL.msgGrp = newNodeWithRunes(ast.NewGroupNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id.ToKeyword(), protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, protoDollar[6].cmpctOpts, protoDollar[7].b, protoDollar[8].msgElements, protoDollar[9].b), protoDollar[10].bs...) } case 152: + protoDollar = protoS[protopt-7 : protopt+1] + { + protoVAL.msgGrp = newNodeWithRunes(ast.NewGroupNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id.ToKeyword(), protoDollar[3].id, nil, nil, nil, protoDollar[4].b, protoDollar[5].msgElements, protoDollar[6].b), protoDollar[7].bs...) + } + case 153: + protoDollar = protoS[protopt-8 : protopt+1] + { + protoVAL.msgGrp = newNodeWithRunes(ast.NewGroupNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id.ToKeyword(), protoDollar[3].id, nil, nil, protoDollar[4].cmpctOpts, protoDollar[5].b, protoDollar[6].msgElements, protoDollar[7].b), protoDollar[8].bs...) + } + case 154: protoDollar = protoS[protopt-6 : protopt+1] { protoVAL.oo = newNodeWithRunes(ast.NewOneofNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id, protoDollar[3].b, protoDollar[4].ooElements, protoDollar[5].b), protoDollar[6].bs...) } - case 153: + case 155: protoDollar = protoS[protopt-0 : protopt+1] { protoVAL.ooElements = nil } - case 155: + case 157: protoDollar = protoS[protopt-2 : protopt+1] { if protoDollar[2].ooElement != nil { @@ -2048,7 +2080,7 @@ protodefault: protoVAL.ooElements = protoDollar[1].ooElements } } - case 156: + case 158: protoDollar = protoS[protopt-1 : protopt+1] { if protoDollar[1].ooElement != nil { @@ -2057,367 +2089,423 @@ protodefault: protoVAL.ooElements = nil } } - case 157: + case 159: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.ooElement = protoDollar[1].optRaw } - case 158: + case 160: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.ooElement = protoDollar[1].fld } - case 159: + case 161: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.ooElement = protoDollar[1].grp } - case 160: + case 162: protoDollar = protoS[protopt-2 : protopt+1] { protoVAL.ooElement = nil } - case 161: + case 163: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.ooElement = nil } - case 162: + case 164: protoDollar = protoS[protopt-5 : protopt+1] { protoVAL.fld = ast.NewFieldNode(nil, protoDollar[1].tid, protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, nil, protoDollar[5].b) } - case 163: + case 165: protoDollar = protoS[protopt-6 : protopt+1] { protoVAL.fld = ast.NewFieldNode(nil, protoDollar[1].tid, protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, protoDollar[5].cmpctOpts, protoDollar[6].b) } - case 164: + case 166: + protoDollar = protoS[protopt-3 : protopt+1] + { + protoVAL.fld = ast.NewFieldNode(nil, protoDollar[1].tid, protoDollar[2].id, nil, nil, nil, protoDollar[3].b) + } + case 167: + protoDollar = protoS[protopt-4 : protopt+1] + { + protoVAL.fld = ast.NewFieldNode(nil, protoDollar[1].tid, protoDollar[2].id, nil, nil, protoDollar[3].cmpctOpts, protoDollar[4].b) + } + case 168: protoDollar = protoS[protopt-7 : protopt+1] { protoVAL.grp = ast.NewGroupNode(nil, protoDollar[1].id.ToKeyword(), protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, nil, protoDollar[5].b, protoDollar[6].msgElements, protoDollar[7].b) } - case 165: + case 169: protoDollar = protoS[protopt-8 : protopt+1] { protoVAL.grp = ast.NewGroupNode(nil, protoDollar[1].id.ToKeyword(), protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, protoDollar[5].cmpctOpts, protoDollar[6].b, protoDollar[7].msgElements, protoDollar[8].b) } - case 166: + case 170: + protoDollar = protoS[protopt-5 : protopt+1] + { + protoVAL.grp = ast.NewGroupNode(nil, protoDollar[1].id.ToKeyword(), protoDollar[2].id, nil, nil, nil, protoDollar[3].b, protoDollar[4].msgElements, protoDollar[5].b) + } + case 171: + protoDollar = protoS[protopt-6 : protopt+1] + { + protoVAL.grp = ast.NewGroupNode(nil, protoDollar[1].id.ToKeyword(), protoDollar[2].id, nil, nil, protoDollar[3].cmpctOpts, protoDollar[4].b, protoDollar[5].msgElements, protoDollar[6].b) + } + case 172: protoDollar = protoS[protopt-5 : protopt+1] { semi, extra := protolex.(*protoLex).requireSemicolon(protoDollar[5].bs) protoVAL.mapFld = newNodeWithRunes(ast.NewMapFieldNode(protoDollar[1].mapType, protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, nil, semi), extra...) } - case 167: + case 173: protoDollar = protoS[protopt-6 : protopt+1] { semi, extra := protolex.(*protoLex).requireSemicolon(protoDollar[6].bs) protoVAL.mapFld = newNodeWithRunes(ast.NewMapFieldNode(protoDollar[1].mapType, protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, protoDollar[5].cmpctOpts, semi), extra...) } - case 168: + case 174: + protoDollar = protoS[protopt-3 : protopt+1] + { + semi, extra := protolex.(*protoLex).requireSemicolon(protoDollar[3].bs) + protoVAL.mapFld = newNodeWithRunes(ast.NewMapFieldNode(protoDollar[1].mapType, protoDollar[2].id, nil, nil, nil, semi), extra...) + } + case 175: + protoDollar = protoS[protopt-4 : protopt+1] + { + semi, extra := protolex.(*protoLex).requireSemicolon(protoDollar[4].bs) + protoVAL.mapFld = newNodeWithRunes(ast.NewMapFieldNode(protoDollar[1].mapType, protoDollar[2].id, nil, nil, protoDollar[3].cmpctOpts, semi), extra...) + } + case 176: protoDollar = protoS[protopt-6 : protopt+1] { protoVAL.mapType = ast.NewMapTypeNode(protoDollar[1].id.ToKeyword(), protoDollar[2].b, protoDollar[3].id, protoDollar[4].b, protoDollar[5].tid, protoDollar[6].b) } - case 181: + case 189: protoDollar = protoS[protopt-4 : protopt+1] { // TODO: Tolerate a missing semicolon here. This currnelty creates a shift/reduce conflict // between `extensions 1 to 10` and `extensions 1` followed by `to = 10`. protoVAL.ext = newNodeWithRunes(ast.NewExtensionRangeNode(protoDollar[1].id.ToKeyword(), protoDollar[2].rngs.ranges, protoDollar[2].rngs.commas, nil, protoDollar[3].b), protoDollar[4].bs...) } - case 182: + case 190: protoDollar = protoS[protopt-4 : protopt+1] { semi, extra := protolex.(*protoLex).requireSemicolon(protoDollar[4].bs) protoVAL.ext = newNodeWithRunes(ast.NewExtensionRangeNode(protoDollar[1].id.ToKeyword(), protoDollar[2].rngs.ranges, protoDollar[2].rngs.commas, protoDollar[3].cmpctOpts, semi), extra...) } - case 183: + case 191: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.rngs = &rangeSlices{ranges: []*ast.RangeNode{protoDollar[1].rng}} } - case 184: + case 192: protoDollar = protoS[protopt-3 : protopt+1] { protoDollar[1].rngs.ranges = append(protoDollar[1].rngs.ranges, protoDollar[3].rng) protoDollar[1].rngs.commas = append(protoDollar[1].rngs.commas, protoDollar[2].b) protoVAL.rngs = protoDollar[1].rngs } - case 185: + case 193: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.rng = ast.NewRangeNode(protoDollar[1].i, nil, nil, nil) } - case 186: + case 194: protoDollar = protoS[protopt-3 : protopt+1] { protoVAL.rng = ast.NewRangeNode(protoDollar[1].i, protoDollar[2].id.ToKeyword(), protoDollar[3].i, nil) } - case 187: + case 195: protoDollar = protoS[protopt-3 : protopt+1] { protoVAL.rng = ast.NewRangeNode(protoDollar[1].i, protoDollar[2].id.ToKeyword(), nil, protoDollar[3].id.ToKeyword()) } - case 188: + case 196: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.rngs = &rangeSlices{ranges: []*ast.RangeNode{protoDollar[1].rng}} } - case 189: + case 197: protoDollar = protoS[protopt-3 : protopt+1] { protoDollar[1].rngs.ranges = append(protoDollar[1].rngs.ranges, protoDollar[3].rng) protoDollar[1].rngs.commas = append(protoDollar[1].rngs.commas, protoDollar[2].b) protoVAL.rngs = protoDollar[1].rngs } - case 190: + case 198: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.rng = ast.NewRangeNode(protoDollar[1].il, nil, nil, nil) } - case 191: + case 199: protoDollar = protoS[protopt-3 : protopt+1] { protoVAL.rng = ast.NewRangeNode(protoDollar[1].il, protoDollar[2].id.ToKeyword(), protoDollar[3].il, nil) } - case 192: + case 200: protoDollar = protoS[protopt-3 : protopt+1] { protoVAL.rng = ast.NewRangeNode(protoDollar[1].il, protoDollar[2].id.ToKeyword(), nil, protoDollar[3].id.ToKeyword()) } - case 193: + case 201: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.il = protoDollar[1].i } - case 194: + case 202: protoDollar = protoS[protopt-2 : protopt+1] { protoVAL.il = ast.NewNegativeIntLiteralNode(protoDollar[1].b, protoDollar[2].i) } - case 195: + case 203: protoDollar = protoS[protopt-4 : protopt+1] { // TODO: Tolerate a missing semicolon here. This currnelty creates a shift/reduce conflict // between `reserved 1 to 10` and `reserved 1` followed by `to = 10`. protoVAL.resvd = newNodeWithRunes(ast.NewReservedRangesNode(protoDollar[1].id.ToKeyword(), protoDollar[2].rngs.ranges, protoDollar[2].rngs.commas, protoDollar[3].b), protoDollar[4].bs...) } - case 197: + case 205: protoDollar = protoS[protopt-4 : protopt+1] { // TODO: Tolerate a missing semicolon here. This currnelty creates a shift/reduce conflict // between `reserved 1 to 10` and `reserved 1` followed by `to = 10`. protoVAL.resvd = newNodeWithRunes(ast.NewReservedRangesNode(protoDollar[1].id.ToKeyword(), protoDollar[2].rngs.ranges, protoDollar[2].rngs.commas, protoDollar[3].b), protoDollar[4].bs...) } - case 199: + case 207: protoDollar = protoS[protopt-3 : protopt+1] { semi, extra := protolex.(*protoLex).requireSemicolon(protoDollar[3].bs) protoVAL.resvd = newNodeWithRunes(ast.NewReservedNamesNode(protoDollar[1].id.ToKeyword(), protoDollar[2].names.names, protoDollar[2].names.commas, semi), extra...) } - case 200: + case 208: protoDollar = protoS[protopt-3 : protopt+1] { semi, extra := protolex.(*protoLex).requireSemicolon(protoDollar[3].bs) protoVAL.resvd = newNodeWithRunes(ast.NewReservedIdentifiersNode(protoDollar[1].id.ToKeyword(), protoDollar[2].names.idents, protoDollar[2].names.commas, semi), extra...) } - case 201: + case 209: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.names = &nameSlices{names: []ast.StringValueNode{toStringValueNode(protoDollar[1].str)}} } - case 202: + case 210: protoDollar = protoS[protopt-3 : protopt+1] { protoDollar[1].names.names = append(protoDollar[1].names.names, toStringValueNode(protoDollar[3].str)) protoDollar[1].names.commas = append(protoDollar[1].names.commas, protoDollar[2].b) protoVAL.names = protoDollar[1].names } - case 203: + case 211: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.names = &nameSlices{idents: []*ast.IdentNode{protoDollar[1].id}} } - case 204: + case 212: protoDollar = protoS[protopt-3 : protopt+1] { protoDollar[1].names.idents = append(protoDollar[1].names.idents, protoDollar[3].id) protoDollar[1].names.commas = append(protoDollar[1].names.commas, protoDollar[2].b) protoVAL.names = protoDollar[1].names } - case 205: + case 213: protoDollar = protoS[protopt-6 : protopt+1] { protoVAL.en = newNodeWithRunes(ast.NewEnumNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id, protoDollar[3].b, protoDollar[4].enElements, protoDollar[5].b), protoDollar[6].bs...) } - case 206: + case 214: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.enElements = prependRunes(toEnumElement, protoDollar[1].bs, nil) } - case 207: + case 215: protoDollar = protoS[protopt-2 : protopt+1] { protoVAL.enElements = prependRunes(toEnumElement, protoDollar[1].bs, protoDollar[2].enElements) } - case 208: + case 216: protoDollar = protoS[protopt-2 : protopt+1] { protoVAL.enElements = append(protoDollar[1].enElements, protoDollar[2].enElements...) } - case 209: + case 217: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.enElements = protoDollar[1].enElements } - case 210: + case 218: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.enElements = toElements[ast.EnumElement](toEnumElement, protoDollar[1].opt.Node, protoDollar[1].opt.Runes) } - case 211: + case 219: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.enElements = toElements[ast.EnumElement](toEnumElement, protoDollar[1].env.Node, protoDollar[1].env.Runes) } - case 212: + case 220: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.enElements = toElements[ast.EnumElement](toEnumElement, protoDollar[1].resvd.Node, protoDollar[1].resvd.Runes) } - case 213: + case 221: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.enElements = nil } - case 214: + case 222: protoDollar = protoS[protopt-4 : protopt+1] { semi, extra := protolex.(*protoLex).requireSemicolon(protoDollar[4].bs) protoVAL.env = newNodeWithRunes(ast.NewEnumValueNode(protoDollar[1].id, protoDollar[2].b, protoDollar[3].il, nil, semi), extra...) } - case 215: + case 223: protoDollar = protoS[protopt-5 : protopt+1] { semi, extra := protolex.(*protoLex).requireSemicolon(protoDollar[5].bs) protoVAL.env = newNodeWithRunes(ast.NewEnumValueNode(protoDollar[1].id, protoDollar[2].b, protoDollar[3].il, protoDollar[4].cmpctOpts, semi), extra...) } - case 216: + case 224: protoDollar = protoS[protopt-6 : protopt+1] { protoVAL.msg = newNodeWithRunes(ast.NewMessageNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id, protoDollar[3].b, protoDollar[4].msgElements, protoDollar[5].b), protoDollar[6].bs...) } - case 217: + case 225: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.msgElements = prependRunes(toMessageElement, protoDollar[1].bs, nil) } - case 218: + case 226: protoDollar = protoS[protopt-2 : protopt+1] { protoVAL.msgElements = prependRunes(toMessageElement, protoDollar[1].bs, protoDollar[2].msgElements) } - case 219: + case 227: protoDollar = protoS[protopt-2 : protopt+1] { protoVAL.msgElements = append(protoDollar[1].msgElements, protoDollar[2].msgElements...) } - case 220: + case 228: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.msgElements = protoDollar[1].msgElements } - case 221: + case 229: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.msgElements = toElements[ast.MessageElement](toMessageElement, protoDollar[1].msgFld.Node, protoDollar[1].msgFld.Runes) } - case 222: + case 230: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.msgElements = toElements[ast.MessageElement](toMessageElement, protoDollar[1].en.Node, protoDollar[1].en.Runes) } - case 223: + case 231: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.msgElements = toElements[ast.MessageElement](toMessageElement, protoDollar[1].msg.Node, protoDollar[1].msg.Runes) } - case 224: + case 232: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.msgElements = toElements[ast.MessageElement](toMessageElement, protoDollar[1].extend.Node, protoDollar[1].extend.Runes) } - case 225: + case 233: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.msgElements = toElements[ast.MessageElement](toMessageElement, protoDollar[1].ext.Node, protoDollar[1].ext.Runes) } - case 226: + case 234: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.msgElements = toElements[ast.MessageElement](toMessageElement, protoDollar[1].msgGrp.Node, protoDollar[1].msgGrp.Runes) } - case 227: + case 235: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.msgElements = toElements[ast.MessageElement](toMessageElement, protoDollar[1].opt.Node, protoDollar[1].opt.Runes) } - case 228: + case 236: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.msgElements = toElements[ast.MessageElement](toMessageElement, protoDollar[1].oo.Node, protoDollar[1].oo.Runes) } - case 229: + case 237: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.msgElements = toElements[ast.MessageElement](toMessageElement, protoDollar[1].mapFld.Node, protoDollar[1].mapFld.Runes) } - case 230: + case 238: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.msgElements = toElements[ast.MessageElement](toMessageElement, protoDollar[1].resvd.Node, protoDollar[1].resvd.Runes) } - case 231: + case 239: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.msgElements = nil } - case 232: + case 240: protoDollar = protoS[protopt-6 : protopt+1] { semis, extra := protolex.(*protoLex).requireSemicolon(protoDollar[6].bs) protoVAL.msgFld = newNodeWithRunes(ast.NewFieldNode(protoDollar[1].id.ToKeyword(), protoDollar[2].tid, protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, nil, semis), extra...) } - case 233: + case 241: protoDollar = protoS[protopt-7 : protopt+1] { semis, extra := protolex.(*protoLex).requireSemicolon(protoDollar[7].bs) protoVAL.msgFld = newNodeWithRunes(ast.NewFieldNode(protoDollar[1].id.ToKeyword(), protoDollar[2].tid, protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, protoDollar[6].cmpctOpts, semis), extra...) } - case 234: + case 242: protoDollar = protoS[protopt-5 : protopt+1] { semis, extra := protolex.(*protoLex).requireSemicolon(protoDollar[5].bs) protoVAL.msgFld = newNodeWithRunes(ast.NewFieldNode(nil, protoDollar[1].tid, protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, nil, semis), extra...) } - case 235: + case 243: protoDollar = protoS[protopt-6 : protopt+1] { semis, extra := protolex.(*protoLex).requireSemicolon(protoDollar[6].bs) protoVAL.msgFld = newNodeWithRunes(ast.NewFieldNode(nil, protoDollar[1].tid, protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, protoDollar[5].cmpctOpts, semis), extra...) } - case 236: + case 244: + protoDollar = protoS[protopt-4 : protopt+1] + { + semis, extra := protolex.(*protoLex).requireSemicolon(protoDollar[4].bs) + protoVAL.msgFld = newNodeWithRunes(ast.NewFieldNode(protoDollar[1].id.ToKeyword(), protoDollar[2].tid, protoDollar[3].id, nil, nil, nil, semis), extra...) + } + case 245: + protoDollar = protoS[protopt-5 : protopt+1] + { + semis, extra := protolex.(*protoLex).requireSemicolon(protoDollar[5].bs) + protoVAL.msgFld = newNodeWithRunes(ast.NewFieldNode(protoDollar[1].id.ToKeyword(), protoDollar[2].tid, protoDollar[3].id, nil, nil, protoDollar[4].cmpctOpts, semis), extra...) + } + case 246: + protoDollar = protoS[protopt-3 : protopt+1] + { + semis, extra := protolex.(*protoLex).requireSemicolon(protoDollar[3].bs) + protoVAL.msgFld = newNodeWithRunes(ast.NewFieldNode(nil, protoDollar[1].tid, protoDollar[2].id, nil, nil, nil, semis), extra...) + } + case 247: + protoDollar = protoS[protopt-4 : protopt+1] + { + semis, extra := protolex.(*protoLex).requireSemicolon(protoDollar[4].bs) + protoVAL.msgFld = newNodeWithRunes(ast.NewFieldNode(nil, protoDollar[1].tid, protoDollar[2].id, nil, nil, protoDollar[3].cmpctOpts, semis), extra...) + } + case 248: protoDollar = protoS[protopt-6 : protopt+1] { protoVAL.extend = newNodeWithRunes(ast.NewExtendNode(protoDollar[1].id.ToKeyword(), protoDollar[2].tid, protoDollar[3].b, protoDollar[4].extElements, protoDollar[5].b), protoDollar[6].bs...) } - case 237: + case 249: protoDollar = protoS[protopt-0 : protopt+1] { protoVAL.extElements = nil } - case 239: + case 251: protoDollar = protoS[protopt-2 : protopt+1] { if protoDollar[2].extElement != nil { @@ -2426,7 +2514,7 @@ protodefault: protoVAL.extElements = protoDollar[1].extElements } } - case 240: + case 252: protoDollar = protoS[protopt-1 : protopt+1] { if protoDollar[1].extElement != nil { @@ -2435,133 +2523,133 @@ protodefault: protoVAL.extElements = nil } } - case 241: + case 253: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.extElement = protoDollar[1].fld } - case 242: + case 254: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.extElement = protoDollar[1].grp } - case 243: + case 255: protoDollar = protoS[protopt-2 : protopt+1] { protoVAL.extElement = nil } - case 244: + case 256: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.extElement = nil } - case 245: + case 257: protoDollar = protoS[protopt-6 : protopt+1] { protoVAL.fld = ast.NewFieldNode(protoDollar[1].id.ToKeyword(), protoDollar[2].tid, protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, nil, protoDollar[6].b) } - case 246: + case 258: protoDollar = protoS[protopt-7 : protopt+1] { protoVAL.fld = ast.NewFieldNode(protoDollar[1].id.ToKeyword(), protoDollar[2].tid, protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, protoDollar[6].cmpctOpts, protoDollar[7].b) } - case 247: + case 259: protoDollar = protoS[protopt-5 : protopt+1] { protoVAL.fld = ast.NewFieldNode(nil, protoDollar[1].tid, protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, nil, protoDollar[5].b) } - case 248: + case 260: protoDollar = protoS[protopt-6 : protopt+1] { protoVAL.fld = ast.NewFieldNode(nil, protoDollar[1].tid, protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, protoDollar[5].cmpctOpts, protoDollar[6].b) } - case 249: + case 261: protoDollar = protoS[protopt-6 : protopt+1] { protoVAL.svc = newNodeWithRunes(ast.NewServiceNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id, protoDollar[3].b, protoDollar[4].svcElements, protoDollar[5].b), protoDollar[6].bs...) } - case 250: + case 262: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.svcElements = prependRunes(toServiceElement, protoDollar[1].bs, nil) } - case 251: + case 263: protoDollar = protoS[protopt-2 : protopt+1] { protoVAL.svcElements = prependRunes(toServiceElement, protoDollar[1].bs, protoDollar[2].svcElements) } - case 252: + case 264: protoDollar = protoS[protopt-2 : protopt+1] { protoVAL.svcElements = append(protoDollar[1].svcElements, protoDollar[2].svcElements...) } - case 253: + case 265: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.svcElements = protoDollar[1].svcElements } - case 254: + case 266: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.svcElements = toElements[ast.ServiceElement](toServiceElement, protoDollar[1].opt.Node, protoDollar[1].opt.Runes) } - case 255: + case 267: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.svcElements = toElements[ast.ServiceElement](toServiceElement, protoDollar[1].mtd.Node, protoDollar[1].mtd.Runes) } - case 256: + case 268: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.svcElements = nil } - case 257: + case 269: protoDollar = protoS[protopt-6 : protopt+1] { semi, extra := protolex.(*protoLex).requireSemicolon(protoDollar[6].bs) protoVAL.mtd = newNodeWithRunes(ast.NewRPCNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id, protoDollar[3].mtdMsgType, protoDollar[4].id.ToKeyword(), protoDollar[5].mtdMsgType, semi), extra...) } - case 258: + case 270: protoDollar = protoS[protopt-9 : protopt+1] { protoVAL.mtd = newNodeWithRunes(ast.NewRPCNodeWithBody(protoDollar[1].id.ToKeyword(), protoDollar[2].id, protoDollar[3].mtdMsgType, protoDollar[4].id.ToKeyword(), protoDollar[5].mtdMsgType, protoDollar[6].b, protoDollar[7].mtdElements, protoDollar[8].b), protoDollar[9].bs...) } - case 259: + case 271: protoDollar = protoS[protopt-4 : protopt+1] { protoVAL.mtdMsgType = ast.NewRPCTypeNode(protoDollar[1].b, protoDollar[2].id.ToKeyword(), protoDollar[3].tid, protoDollar[4].b) } - case 260: + case 272: protoDollar = protoS[protopt-3 : protopt+1] { protoVAL.mtdMsgType = ast.NewRPCTypeNode(protoDollar[1].b, nil, protoDollar[2].tid, protoDollar[3].b) } - case 261: + case 273: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.mtdElements = prependRunes(toMethodElement, protoDollar[1].bs, nil) } - case 262: + case 274: protoDollar = protoS[protopt-2 : protopt+1] { protoVAL.mtdElements = prependRunes(toMethodElement, protoDollar[1].bs, protoDollar[2].mtdElements) } - case 263: + case 275: protoDollar = protoS[protopt-2 : protopt+1] { protoVAL.mtdElements = append(protoDollar[1].mtdElements, protoDollar[2].mtdElements...) } - case 264: + case 276: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.mtdElements = protoDollar[1].mtdElements } - case 265: + case 277: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.mtdElements = toElements[ast.RPCElement](toMethodElement, protoDollar[1].opt.Node, protoDollar[1].opt.Runes) } - case 266: + case 278: protoDollar = protoS[protopt-1 : protopt+1] { protoVAL.mtdElements = nil diff --git a/parser/result.go b/parser/result.go index b0447356..2a4fde0a 100644 --- a/parser/result.go +++ b/parser/result.go @@ -332,9 +332,12 @@ func asLabel(lbl *ast.FieldLabel) *descriptorpb.FieldDescriptorProto_Label { } func (r *result) asFieldDescriptor(node *ast.FieldNode, maxTag int32, syntax syntaxType, handler *reporter.Handler) *descriptorpb.FieldDescriptorProto { - tag := node.Tag.Val - if err := r.checkTag(node.Tag, tag, maxTag); err != nil { - _ = handler.HandleError(err) + var tag uint64 + if node.Tag != nil { + tag = node.Tag.Val + if err := r.checkTag(node.Tag, tag, maxTag); err != nil { + _ = handler.HandleError(err) + } } fd := newFieldDescriptor(node.Name.Val, string(node.FldType.AsIdentifier()), int32(tag), asLabel(&node.Label)) r.putFieldNode(fd, node) @@ -385,9 +388,12 @@ func newFieldDescriptor(name string, fieldType string, tag int32, lbl *descripto } func (r *result) asGroupDescriptors(group *ast.GroupNode, syntax syntaxType, maxTag int32, handler *reporter.Handler, depth int) (*descriptorpb.FieldDescriptorProto, *descriptorpb.DescriptorProto) { - tag := group.Tag.Val - if err := r.checkTag(group.Tag, tag, maxTag); err != nil { - _ = handler.HandleError(err) + var tag uint64 + if group.Tag != nil { + tag = group.Tag.Val + if err := r.checkTag(group.Tag, tag, maxTag); err != nil { + _ = handler.HandleError(err) + } } if !unicode.IsUpper(rune(group.Name.Val[0])) { nameNodeInfo := r.file.NodeInfo(group.Name) @@ -416,9 +422,12 @@ func (r *result) asGroupDescriptors(group *ast.GroupNode, syntax syntaxType, max } func (r *result) asMapDescriptors(mapField *ast.MapFieldNode, syntax syntaxType, maxTag int32, handler *reporter.Handler, depth int) (*descriptorpb.FieldDescriptorProto, *descriptorpb.DescriptorProto) { - tag := mapField.Tag.Val - if err := r.checkTag(mapField.Tag, tag, maxTag); err != nil { - _ = handler.HandleError(err) + var tag uint64 + if mapField.Tag != nil { + tag = mapField.Tag.Val + if err := r.checkTag(mapField.Tag, tag, maxTag); err != nil { + _ = handler.HandleError(err) + } } r.checkDepth(depth, mapField, handler) var lbl *descriptorpb.FieldDescriptorProto_Label diff --git a/parser/validate.go b/parser/validate.go index 45f533e0..48c231bb 100644 --- a/parser/validate.go +++ b/parser/validate.go @@ -456,6 +456,12 @@ func validateField(res *result, syntax syntaxType, name protoreflect.FullName, f } node := res.FieldNode(fld) + if fld.GetNumber() == 0 && node.FieldTag() == nil { + fieldTagNodeInfo := res.file.NodeInfo(node) + if err := handler.HandleErrorf(fieldTagNodeInfo, "%s: missing field tag number", scope); err != nil { + return err + } + } if syntax != syntaxProto2 { if fld.GetType() == descriptorpb.FieldDescriptorProto_TYPE_GROUP { groupNodeInfo := res.file.NodeInfo(node.GetGroupKeyword()) From 1d252a5bd8eb152673c9dd10d045d980f9dbff2a Mon Sep 17 00:00:00 2001 From: Alfred Fuller Date: Thu, 29 Feb 2024 12:45:40 -0500 Subject: [PATCH 2/3] fix field children count --- ast/field.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ast/field.go b/ast/field.go index 334be1e7..cfc4a84f 100644 --- a/ast/field.go +++ b/ast/field.go @@ -84,7 +84,7 @@ func NewFieldNode(label *KeywordNode, fieldType IdentValueNode, name *IdentNode, if name == nil { panic("name is nil") } - numChildren := 4 + numChildren := 2 if equals != nil { numChildren++ } From 02c922f9440bfc8e165184665747879681a12dcf Mon Sep 17 00:00:00 2001 From: Alfred Fuller Date: Fri, 1 Mar 2024 09:22:25 -0500 Subject: [PATCH 3/3] re --- ast/field.go | 8 ++++---- parser/result.go | 32 ++++++++++++++++---------------- parser/validate.go | 2 +- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/ast/field.go b/ast/field.go index cfc4a84f..2156ac0c 100644 --- a/ast/field.go +++ b/ast/field.go @@ -152,7 +152,7 @@ func (n *FieldNode) FieldType() Node { func (n *FieldNode) FieldTag() Node { if n.Tag == nil { - return nil + return n } return n.Tag } @@ -318,7 +318,7 @@ func (n *GroupNode) FieldType() Node { func (n *GroupNode) FieldTag() Node { if n.Tag == nil { - return nil + return n } return n.Tag } @@ -610,7 +610,7 @@ func (n *MapFieldNode) FieldType() Node { func (n *MapFieldNode) FieldTag() Node { if n.Tag == nil { - return nil + return n } return n.Tag } @@ -688,7 +688,7 @@ func (n *SyntheticMapField) FieldType() Node { func (n *SyntheticMapField) FieldTag() Node { if n.Tag == nil { - return nil + return n } return n.Tag } diff --git a/parser/result.go b/parser/result.go index 2a4fde0a..4a4869fc 100644 --- a/parser/result.go +++ b/parser/result.go @@ -332,14 +332,14 @@ func asLabel(lbl *ast.FieldLabel) *descriptorpb.FieldDescriptorProto_Label { } func (r *result) asFieldDescriptor(node *ast.FieldNode, maxTag int32, syntax syntaxType, handler *reporter.Handler) *descriptorpb.FieldDescriptorProto { - var tag uint64 + var tag *int32 if node.Tag != nil { - tag = node.Tag.Val - if err := r.checkTag(node.Tag, tag, maxTag); err != nil { + if err := r.checkTag(node.Tag, node.Tag.Val, maxTag); err != nil { _ = handler.HandleError(err) } + tag = proto.Int32(int32(node.Tag.Val)) } - fd := newFieldDescriptor(node.Name.Val, string(node.FldType.AsIdentifier()), int32(tag), asLabel(&node.Label)) + fd := newFieldDescriptor(node.Name.Val, string(node.FldType.AsIdentifier()), tag, asLabel(&node.Label)) r.putFieldNode(fd, node) if opts := node.Options.GetElements(); len(opts) > 0 { fd.Options = &descriptorpb.FieldOptions{UninterpretedOption: r.asUninterpretedOptions(opts)} @@ -368,11 +368,11 @@ var fieldTypes = map[string]descriptorpb.FieldDescriptorProto_Type{ "bytes": descriptorpb.FieldDescriptorProto_TYPE_BYTES, } -func newFieldDescriptor(name string, fieldType string, tag int32, lbl *descriptorpb.FieldDescriptorProto_Label) *descriptorpb.FieldDescriptorProto { +func newFieldDescriptor(name string, fieldType string, tag *int32, lbl *descriptorpb.FieldDescriptorProto_Label) *descriptorpb.FieldDescriptorProto { fd := &descriptorpb.FieldDescriptorProto{ Name: proto.String(name), JsonName: proto.String(internal.JSONName(name)), - Number: proto.Int32(tag), + Number: tag, Label: lbl, } t, ok := fieldTypes[fieldType] @@ -388,12 +388,12 @@ func newFieldDescriptor(name string, fieldType string, tag int32, lbl *descripto } func (r *result) asGroupDescriptors(group *ast.GroupNode, syntax syntaxType, maxTag int32, handler *reporter.Handler, depth int) (*descriptorpb.FieldDescriptorProto, *descriptorpb.DescriptorProto) { - var tag uint64 + var tag *int32 if group.Tag != nil { - tag = group.Tag.Val - if err := r.checkTag(group.Tag, tag, maxTag); err != nil { + if err := r.checkTag(group.Tag, group.Tag.Val, maxTag); err != nil { _ = handler.HandleError(err) } + tag = proto.Int32(int32(group.Tag.Val)) } if !unicode.IsUpper(rune(group.Name.Val[0])) { nameNodeInfo := r.file.NodeInfo(group.Name) @@ -403,7 +403,7 @@ func (r *result) asGroupDescriptors(group *ast.GroupNode, syntax syntaxType, max fd := &descriptorpb.FieldDescriptorProto{ Name: proto.String(fieldName), JsonName: proto.String(internal.JSONName(fieldName)), - Number: proto.Int32(int32(tag)), + Number: tag, Label: asLabel(&group.Label), Type: descriptorpb.FieldDescriptorProto_TYPE_GROUP.Enum(), TypeName: proto.String(group.Name.Val), @@ -422,24 +422,24 @@ func (r *result) asGroupDescriptors(group *ast.GroupNode, syntax syntaxType, max } func (r *result) asMapDescriptors(mapField *ast.MapFieldNode, syntax syntaxType, maxTag int32, handler *reporter.Handler, depth int) (*descriptorpb.FieldDescriptorProto, *descriptorpb.DescriptorProto) { - var tag uint64 + var tag *int32 if mapField.Tag != nil { - tag = mapField.Tag.Val - if err := r.checkTag(mapField.Tag, tag, maxTag); err != nil { + if err := r.checkTag(mapField.Tag, mapField.Tag.Val, maxTag); err != nil { _ = handler.HandleError(err) } + tag = proto.Int32(int32(mapField.Tag.Val)) } r.checkDepth(depth, mapField, handler) var lbl *descriptorpb.FieldDescriptorProto_Label if syntax == syntaxProto2 { lbl = descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum() } - keyFd := newFieldDescriptor("key", mapField.MapType.KeyType.Val, 1, lbl) + keyFd := newFieldDescriptor("key", mapField.MapType.KeyType.Val, proto.Int32(1), lbl) r.putFieldNode(keyFd, mapField.KeyField()) - valFd := newFieldDescriptor("value", string(mapField.MapType.ValueType.AsIdentifier()), 2, lbl) + valFd := newFieldDescriptor("value", string(mapField.MapType.ValueType.AsIdentifier()), proto.Int32(2), lbl) r.putFieldNode(valFd, mapField.ValueField()) entryName := internal.InitCap(internal.JSONName(mapField.Name.Val)) + "Entry" - fd := newFieldDescriptor(mapField.Name.Val, entryName, int32(tag), descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum()) + fd := newFieldDescriptor(mapField.Name.Val, entryName, tag, descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum()) if opts := mapField.Options.GetElements(); len(opts) > 0 { fd.Options = &descriptorpb.FieldOptions{UninterpretedOption: r.asUninterpretedOptions(opts)} } diff --git a/parser/validate.go b/parser/validate.go index 48c231bb..43e6bd43 100644 --- a/parser/validate.go +++ b/parser/validate.go @@ -456,7 +456,7 @@ func validateField(res *result, syntax syntaxType, name protoreflect.FullName, f } node := res.FieldNode(fld) - if fld.GetNumber() == 0 && node.FieldTag() == nil { + if fld.Number == nil { fieldTagNodeInfo := res.file.NodeInfo(node) if err := handler.HandleErrorf(fieldTagNodeInfo, "%s: missing field tag number", scope); err != nil { return err