2325 lines
63 KiB
Go
2325 lines
63 KiB
Go
// Code generated by goyacc -o proto.y.go -p proto proto.y. DO NOT EDIT.
|
|
|
|
//line proto.y:2
|
|
package protoparse
|
|
|
|
import __yyfmt__ "fmt"
|
|
|
|
//line proto.y:2
|
|
|
|
//lint:file-ignore SA4006 generated parser has unused values
|
|
|
|
import (
|
|
"math"
|
|
|
|
"github.com/jhump/protoreflect/desc/protoparse/ast"
|
|
)
|
|
|
|
//line proto.y:16
|
|
type protoSymType struct {
|
|
yys int
|
|
file *ast.FileNode
|
|
syn *ast.SyntaxNode
|
|
fileDecl ast.FileElement
|
|
fileDecls []ast.FileElement
|
|
pkg *ast.PackageNode
|
|
imprt *ast.ImportNode
|
|
msg *ast.MessageNode
|
|
msgDecl ast.MessageElement
|
|
msgDecls []ast.MessageElement
|
|
fld *ast.FieldNode
|
|
mapFld *ast.MapFieldNode
|
|
mapType *ast.MapTypeNode
|
|
grp *ast.GroupNode
|
|
oo *ast.OneOfNode
|
|
ooDecl ast.OneOfElement
|
|
ooDecls []ast.OneOfElement
|
|
ext *ast.ExtensionRangeNode
|
|
resvd *ast.ReservedNode
|
|
en *ast.EnumNode
|
|
enDecl ast.EnumElement
|
|
enDecls []ast.EnumElement
|
|
env *ast.EnumValueNode
|
|
extend *ast.ExtendNode
|
|
extDecl ast.ExtendElement
|
|
extDecls []ast.ExtendElement
|
|
svc *ast.ServiceNode
|
|
svcDecl ast.ServiceElement
|
|
svcDecls []ast.ServiceElement
|
|
mtd *ast.RPCNode
|
|
rpcType *ast.RPCTypeNode
|
|
rpcDecl ast.RPCElement
|
|
rpcDecls []ast.RPCElement
|
|
opt *ast.OptionNode
|
|
opts *compactOptionList
|
|
ref *ast.FieldReferenceNode
|
|
optNms *fieldRefList
|
|
cmpctOpts *ast.CompactOptionsNode
|
|
rng *ast.RangeNode
|
|
rngs *rangeList
|
|
names *nameList
|
|
cid *identList
|
|
tid ast.IdentValueNode
|
|
sl *valueList
|
|
msgField *ast.MessageFieldNode
|
|
msgEntry *messageFieldEntry
|
|
msgLit *messageFieldList
|
|
v ast.ValueNode
|
|
il ast.IntValueNode
|
|
str *stringList
|
|
s *ast.StringLiteralNode
|
|
i *ast.UintLiteralNode
|
|
f *ast.FloatLiteralNode
|
|
id *ast.IdentNode
|
|
b *ast.RuneNode
|
|
err error
|
|
}
|
|
|
|
const _STRING_LIT = 57346
|
|
const _INT_LIT = 57347
|
|
const _FLOAT_LIT = 57348
|
|
const _NAME = 57349
|
|
const _SYNTAX = 57350
|
|
const _IMPORT = 57351
|
|
const _WEAK = 57352
|
|
const _PUBLIC = 57353
|
|
const _PACKAGE = 57354
|
|
const _OPTION = 57355
|
|
const _TRUE = 57356
|
|
const _FALSE = 57357
|
|
const _INF = 57358
|
|
const _NAN = 57359
|
|
const _REPEATED = 57360
|
|
const _OPTIONAL = 57361
|
|
const _REQUIRED = 57362
|
|
const _DOUBLE = 57363
|
|
const _FLOAT = 57364
|
|
const _INT32 = 57365
|
|
const _INT64 = 57366
|
|
const _UINT32 = 57367
|
|
const _UINT64 = 57368
|
|
const _SINT32 = 57369
|
|
const _SINT64 = 57370
|
|
const _FIXED32 = 57371
|
|
const _FIXED64 = 57372
|
|
const _SFIXED32 = 57373
|
|
const _SFIXED64 = 57374
|
|
const _BOOL = 57375
|
|
const _STRING = 57376
|
|
const _BYTES = 57377
|
|
const _GROUP = 57378
|
|
const _ONEOF = 57379
|
|
const _MAP = 57380
|
|
const _EXTENSIONS = 57381
|
|
const _TO = 57382
|
|
const _MAX = 57383
|
|
const _RESERVED = 57384
|
|
const _ENUM = 57385
|
|
const _MESSAGE = 57386
|
|
const _EXTEND = 57387
|
|
const _SERVICE = 57388
|
|
const _RPC = 57389
|
|
const _STREAM = 57390
|
|
const _RETURNS = 57391
|
|
const _ERROR = 57392
|
|
|
|
var protoToknames = [...]string{
|
|
"$end",
|
|
"error",
|
|
"$unk",
|
|
"_STRING_LIT",
|
|
"_INT_LIT",
|
|
"_FLOAT_LIT",
|
|
"_NAME",
|
|
"_SYNTAX",
|
|
"_IMPORT",
|
|
"_WEAK",
|
|
"_PUBLIC",
|
|
"_PACKAGE",
|
|
"_OPTION",
|
|
"_TRUE",
|
|
"_FALSE",
|
|
"_INF",
|
|
"_NAN",
|
|
"_REPEATED",
|
|
"_OPTIONAL",
|
|
"_REQUIRED",
|
|
"_DOUBLE",
|
|
"_FLOAT",
|
|
"_INT32",
|
|
"_INT64",
|
|
"_UINT32",
|
|
"_UINT64",
|
|
"_SINT32",
|
|
"_SINT64",
|
|
"_FIXED32",
|
|
"_FIXED64",
|
|
"_SFIXED32",
|
|
"_SFIXED64",
|
|
"_BOOL",
|
|
"_STRING",
|
|
"_BYTES",
|
|
"_GROUP",
|
|
"_ONEOF",
|
|
"_MAP",
|
|
"_EXTENSIONS",
|
|
"_TO",
|
|
"_MAX",
|
|
"_RESERVED",
|
|
"_ENUM",
|
|
"_MESSAGE",
|
|
"_EXTEND",
|
|
"_SERVICE",
|
|
"_RPC",
|
|
"_STREAM",
|
|
"_RETURNS",
|
|
"_ERROR",
|
|
"'='",
|
|
"';'",
|
|
"':'",
|
|
"'{'",
|
|
"'}'",
|
|
"'\\\\'",
|
|
"'/'",
|
|
"'?'",
|
|
"'.'",
|
|
"','",
|
|
"'>'",
|
|
"'<'",
|
|
"'+'",
|
|
"'-'",
|
|
"'('",
|
|
"')'",
|
|
"'['",
|
|
"']'",
|
|
"'*'",
|
|
"'&'",
|
|
"'^'",
|
|
"'%'",
|
|
"'$'",
|
|
"'#'",
|
|
"'@'",
|
|
"'!'",
|
|
"'~'",
|
|
"'`'",
|
|
}
|
|
|
|
var protoStatenames = [...]string{}
|
|
|
|
const protoEofCode = 1
|
|
const protoErrCode = 2
|
|
const protoInitialStackSize = 16
|
|
|
|
//line proto.y:958
|
|
|
|
//line yacctab:1
|
|
var protoExca = [...]int{
|
|
-1, 0,
|
|
1, 4,
|
|
-2, 0,
|
|
-1, 1,
|
|
1, -1,
|
|
-2, 0,
|
|
-1, 2,
|
|
1, 1,
|
|
-2, 0,
|
|
-1, 3,
|
|
1, 2,
|
|
-2, 0,
|
|
-1, 22,
|
|
1, 3,
|
|
-2, 0,
|
|
-1, 95,
|
|
55, 158,
|
|
-2, 0,
|
|
-1, 96,
|
|
55, 146,
|
|
-2, 0,
|
|
-1, 97,
|
|
55, 175,
|
|
-2, 0,
|
|
-1, 99,
|
|
55, 184,
|
|
-2, 0,
|
|
-1, 110,
|
|
55, 47,
|
|
-2, 0,
|
|
-1, 170,
|
|
55, 45,
|
|
61, 45,
|
|
-2, 0,
|
|
-1, 225,
|
|
61, 47,
|
|
-2, 0,
|
|
-1, 240,
|
|
55, 96,
|
|
-2, 0,
|
|
-1, 268,
|
|
61, 47,
|
|
-2, 0,
|
|
-1, 311,
|
|
61, 47,
|
|
-2, 0,
|
|
-1, 348,
|
|
55, 158,
|
|
-2, 0,
|
|
-1, 352,
|
|
55, 158,
|
|
-2, 0,
|
|
-1, 356,
|
|
55, 158,
|
|
-2, 0,
|
|
-1, 366,
|
|
55, 196,
|
|
-2, 0,
|
|
-1, 373,
|
|
55, 158,
|
|
-2, 0,
|
|
-1, 376,
|
|
55, 158,
|
|
-2, 0,
|
|
-1, 379,
|
|
55, 158,
|
|
-2, 0,
|
|
-1, 397,
|
|
55, 158,
|
|
-2, 0,
|
|
-1, 409,
|
|
55, 158,
|
|
-2, 0,
|
|
}
|
|
|
|
const protoPrivate = 57344
|
|
|
|
const protoLast = 2179
|
|
|
|
var protoAct = [...]int{
|
|
31, 118, 117, 125, 8, 310, 8, 8, 383, 169,
|
|
263, 288, 207, 198, 308, 75, 205, 236, 77, 79,
|
|
80, 281, 84, 134, 192, 105, 8, 107, 106, 124,
|
|
162, 143, 146, 82, 397, 356, 395, 156, 354, 340,
|
|
119, 352, 339, 26, 81, 350, 348, 237, 237, 346,
|
|
30, 237, 85, 237, 237, 87, 88, 89, 332, 237,
|
|
237, 322, 324, 299, 237, 235, 272, 271, 367, 338,
|
|
208, 29, 208, 237, 116, 264, 237, 222, 237, 222,
|
|
237, 223, 110, 222, 208, 221, 370, 221, 345, 388,
|
|
225, 221, 315, 109, 77, 200, 369, 152, 104, 364,
|
|
147, 344, 94, 163, 314, 222, 303, 220, 387, 115,
|
|
341, 174, 325, 221, 298, 219, 260, 98, 244, 183,
|
|
238, 93, 91, 386, 365, 103, 366, 158, 154, 209,
|
|
217, 209, 409, 407, 17, 191, 80, 79, 157, 379,
|
|
77, 195, 196, 209, 376, 373, 152, 386, 240, 147,
|
|
99, 97, 96, 95, 401, 185, 187, 189, 17, 377,
|
|
374, 81, 371, 363, 358, 163, 335, 197, 216, 329,
|
|
199, 174, 14, 385, 280, 259, 399, 154, 202, 15,
|
|
218, 199, 16, 17, 166, 158, 228, 229, 230, 231,
|
|
232, 233, 214, 211, 243, 17, 157, 385, 14, 226,
|
|
166, 242, 224, 215, 4, 15, 212, 203, 16, 17,
|
|
184, 17, 168, 19, 18, 20, 21, 258, 102, 101,
|
|
100, 90, 13, 86, 109, 25, 174, 362, 361, 167,
|
|
326, 278, 277, 304, 165, 269, 276, 213, 77, 19,
|
|
18, 20, 21, 275, 289, 167, 274, 285, 13, 265,
|
|
165, 273, 267, 283, 241, 234, 204, 92, 297, 24,
|
|
261, 239, 381, 284, 294, 29, 194, 109, 380, 174,
|
|
321, 5, 199, 29, 302, 23, 300, 301, 312, 27,
|
|
28, 122, 11, 286, 11, 11, 120, 10, 306, 10,
|
|
10, 289, 320, 319, 23, 330, 331, 323, 318, 328,
|
|
317, 316, 121, 9, 11, 9, 9, 181, 179, 10,
|
|
296, 294, 174, 194, 333, 336, 279, 262, 180, 178,
|
|
176, 342, 334, 29, 164, 9, 77, 109, 3, 337,
|
|
177, 22, 360, 161, 347, 349, 351, 353, 355, 357,
|
|
12, 283, 109, 155, 148, 145, 123, 359, 206, 193,
|
|
149, 372, 128, 287, 141, 375, 368, 127, 291, 378,
|
|
126, 290, 170, 171, 245, 108, 173, 76, 382, 282,
|
|
384, 7, 6, 2, 183, 1, 390, 183, 0, 392,
|
|
183, 0, 394, 0, 0, 0, 384, 0, 109, 109,
|
|
0, 400, 183, 0, 183, 0, 183, 0, 396, 398,
|
|
408, 0, 402, 403, 0, 0, 0, 0, 0, 0,
|
|
183, 0, 411, 183, 309, 0, 29, 114, 111, 32,
|
|
33, 34, 35, 36, 37, 38, 39, 40, 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, 0, 0, 0, 0, 110, 0, 0, 0,
|
|
0, 0, 0, 0, 311, 113, 112, 0, 0, 0,
|
|
307, 29, 114, 111, 32, 33, 34, 35, 36, 37,
|
|
38, 39, 40, 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, 0, 0, 0,
|
|
0, 110, 0, 0, 0, 0, 0, 0, 0, 268,
|
|
113, 112, 0, 0, 266, 29, 114, 111, 32, 33,
|
|
34, 35, 36, 37, 38, 39, 40, 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, 0, 0, 0, 0, 110, 0, 0, 0, 0,
|
|
0, 0, 0, 311, 113, 112, 29, 114, 111, 32,
|
|
33, 34, 35, 36, 37, 38, 39, 40, 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, 0, 0, 0, 0, 110, 0, 0, 0,
|
|
0, 0, 343, 0, 0, 113, 112, 32, 33, 34,
|
|
35, 36, 37, 38, 39, 40, 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,
|
|
246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
|
|
256, 257, 0, 313, 0, 0, 0, 175, 32, 33,
|
|
34, 35, 36, 37, 38, 39, 40, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 270, 0, 0, 0, 175, 32,
|
|
33, 34, 35, 36, 37, 38, 39, 40, 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, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 172, 0, 0, 0, 175,
|
|
32, 33, 34, 35, 36, 37, 38, 39, 40, 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, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
175, 32, 33, 34, 35, 36, 37, 38, 39, 40,
|
|
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, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 130, 0, 0, 0, 78,
|
|
32, 33, 34, 35, 36, 37, 139, 39, 40, 41,
|
|
42, 133, 132, 131, 46, 47, 48, 49, 50, 51,
|
|
52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
|
|
140, 144, 138, 65, 66, 142, 135, 136, 137, 71,
|
|
72, 73, 74, 0, 0, 129, 0, 0, 412, 130,
|
|
0, 0, 83, 0, 32, 33, 34, 35, 36, 37,
|
|
139, 39, 40, 41, 42, 133, 132, 131, 46, 47,
|
|
48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
|
|
58, 59, 60, 61, 140, 144, 138, 65, 66, 142,
|
|
135, 136, 137, 71, 72, 73, 74, 0, 0, 129,
|
|
0, 0, 410, 130, 0, 0, 83, 0, 32, 33,
|
|
34, 35, 36, 37, 139, 39, 40, 41, 42, 133,
|
|
132, 131, 46, 47, 48, 49, 50, 51, 52, 53,
|
|
54, 55, 56, 57, 58, 59, 60, 61, 140, 144,
|
|
138, 65, 66, 142, 135, 136, 137, 71, 72, 73,
|
|
74, 0, 0, 129, 0, 0, 406, 130, 0, 0,
|
|
83, 0, 32, 33, 34, 35, 36, 37, 139, 39,
|
|
40, 41, 42, 133, 132, 131, 46, 47, 48, 49,
|
|
50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
|
|
60, 61, 140, 144, 138, 65, 66, 142, 135, 136,
|
|
137, 71, 72, 73, 74, 0, 0, 129, 0, 0,
|
|
405, 130, 0, 0, 83, 0, 32, 33, 34, 35,
|
|
36, 37, 139, 39, 40, 41, 42, 133, 132, 131,
|
|
46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
|
|
56, 57, 58, 59, 60, 61, 140, 144, 138, 65,
|
|
66, 142, 135, 136, 137, 71, 72, 73, 74, 0,
|
|
0, 129, 0, 0, 404, 130, 0, 0, 83, 0,
|
|
32, 33, 34, 35, 36, 37, 139, 39, 40, 41,
|
|
42, 133, 132, 131, 46, 47, 48, 49, 50, 51,
|
|
52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
|
|
140, 144, 138, 65, 66, 142, 135, 136, 137, 71,
|
|
72, 73, 74, 0, 0, 129, 0, 0, 393, 130,
|
|
0, 0, 83, 0, 32, 33, 34, 35, 36, 37,
|
|
139, 39, 40, 41, 42, 133, 132, 131, 46, 47,
|
|
48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
|
|
58, 59, 60, 61, 140, 144, 138, 65, 66, 142,
|
|
135, 136, 137, 71, 72, 73, 74, 0, 0, 129,
|
|
0, 0, 391, 130, 0, 0, 83, 0, 32, 33,
|
|
34, 35, 36, 37, 139, 39, 40, 41, 42, 133,
|
|
132, 131, 46, 47, 48, 49, 50, 51, 52, 53,
|
|
54, 55, 56, 57, 58, 59, 60, 61, 140, 144,
|
|
138, 65, 66, 142, 135, 136, 137, 71, 72, 73,
|
|
74, 0, 0, 129, 0, 0, 389, 293, 0, 0,
|
|
83, 0, 32, 33, 34, 35, 36, 37, 139, 39,
|
|
40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
|
|
50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
|
|
60, 295, 62, 63, 64, 65, 66, 67, 68, 69,
|
|
70, 71, 72, 73, 74, 0, 0, 292, 0, 0,
|
|
327, 160, 0, 0, 83, 0, 32, 33, 34, 35,
|
|
36, 37, 38, 39, 40, 41, 42, 133, 132, 131,
|
|
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, 0,
|
|
0, 159, 0, 0, 210, 130, 0, 0, 83, 0,
|
|
32, 33, 34, 35, 36, 37, 139, 39, 40, 41,
|
|
42, 133, 132, 131, 46, 47, 48, 49, 50, 51,
|
|
52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
|
|
140, 144, 138, 65, 66, 142, 135, 136, 137, 71,
|
|
72, 73, 74, 0, 0, 129, 0, 0, 182, 130,
|
|
0, 0, 83, 0, 32, 33, 34, 35, 36, 37,
|
|
139, 39, 40, 41, 42, 133, 132, 131, 46, 47,
|
|
48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
|
|
58, 59, 60, 61, 140, 144, 138, 65, 66, 142,
|
|
135, 136, 137, 71, 72, 73, 74, 0, 0, 129,
|
|
0, 0, 293, 0, 0, 0, 83, 32, 33, 34,
|
|
35, 36, 37, 139, 39, 40, 41, 42, 43, 44,
|
|
45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
|
|
55, 56, 57, 58, 59, 60, 295, 62, 63, 64,
|
|
65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
|
|
0, 0, 292, 0, 0, 160, 0, 0, 0, 83,
|
|
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
|
|
42, 133, 132, 131, 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, 0, 0, 159, 0, 0, 227, 0,
|
|
0, 0, 83, 32, 33, 34, 35, 36, 37, 38,
|
|
39, 40, 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, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 83, 32, 33, 34, 35,
|
|
36, 37, 38, 39, 40, 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, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 83, 32,
|
|
33, 34, 35, 36, 37, 38, 39, 40, 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,
|
|
305, 74, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 83, 32, 33, 34, 35, 36, 37, 38, 39,
|
|
40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
|
|
50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
|
|
60, 190, 62, 63, 64, 65, 66, 67, 68, 69,
|
|
70, 71, 72, 73, 74, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 83, 32, 33, 34, 35, 36,
|
|
37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
|
|
47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
|
|
57, 58, 59, 60, 188, 62, 63, 64, 65, 66,
|
|
67, 68, 69, 70, 71, 72, 73, 74, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 83, 32, 33,
|
|
34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
|
|
44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
|
|
54, 55, 56, 57, 58, 59, 60, 186, 62, 63,
|
|
64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
|
|
74, 0, 0, 0, 0, 0, 151, 0, 0, 0,
|
|
83, 32, 33, 34, 35, 36, 37, 139, 39, 40,
|
|
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, 153, 68, 69, 70,
|
|
71, 72, 73, 74, 0, 151, 150, 0, 0, 201,
|
|
32, 33, 34, 35, 36, 37, 139, 39, 40, 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, 153, 68, 69, 70, 71,
|
|
72, 73, 74, 0, 0, 150, 32, 33, 34, 35,
|
|
36, 37, 38, 39, 40, 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,
|
|
}
|
|
|
|
var protoPact = [...]int{
|
|
196, -1000, 170, 170, 208, -1000, -1000, -1000, -1000, -1000,
|
|
-1000, -1000, -1000, -1000, 173, 269, 2129, 904, 2129, 2129,
|
|
1769, 2129, 170, -1000, 319, -1000, 171, 319, 319, 319,
|
|
169, 63, -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, 206, 62, -1000, 1769, 99,
|
|
98, 97, -1000, 2129, 96, 168, -1000, 167, 166, -1000,
|
|
-1000, 2129, 602, 904, 8, 1557, 2083, 1663, -1000, 198,
|
|
-1000, -1000, -1000, -1000, 160, -1000, -1000, -1000, -1000, -1000,
|
|
843, -1000, 314, 302, -1000, -1000, -1000, 1503, -1000, -1000,
|
|
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
|
158, 1981, 1928, 1875, 2129, 2129, 2129, 1769, 308, 904,
|
|
2129, 2129, 261, -1000, 33, 2034, -1000, -1000, -1000, -1000,
|
|
-1000, 155, 205, 67, -1000, 1449, -1000, -1000, -1000, -1000,
|
|
154, 182, -1000, -1000, -1000, -1000, 151, 2129, -1000, 75,
|
|
843, 55, 53, 28, -1000, 1716, -1000, -1000, -1000, -1000,
|
|
-1000, -1000, -1000, -1000, -1000, 2129, 2129, 2129, 2129, 2129,
|
|
2129, 204, 13, 60, 221, 94, 203, 149, 142, 58,
|
|
687, -1000, -1000, -1000, 79, 123, 56, 220, -1000, 312,
|
|
-1000, -1000, -1000, -1000, -1000, -1000, 10, -1000, -1000, -1000,
|
|
-1000, -1000, -1000, 477, -1000, 782, -1, -2, 200, 195,
|
|
192, 185, 181, 180, 311, -1000, 122, 904, 308, 242,
|
|
1610, 305, -1000, -1000, 319, 54, -1000, -1000, -1000, -1000,
|
|
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 11, -1000,
|
|
79, 65, -1000, 184, 1822, -1000, 412, -1000, 721, 43,
|
|
31, -1000, -1000, 296, 295, 293, 288, 287, 265, 9,
|
|
-1000, -6, 52, 179, -1000, -1000, -1000, 1395, -1000, -1000,
|
|
-1000, -1000, -1000, 117, 2129, 2129, 6, -1000, 1769, -1000,
|
|
114, -1000, -1000, -1000, 10, 1769, 3, -1000, -26, -29,
|
|
50, 660, 40, 27, -1000, -1000, -3, -8, -7, -13,
|
|
-14, -19, -1000, 112, -1000, 904, 602, -1000, -1000, -1000,
|
|
177, 176, -1000, 111, 38, -1000, 72, 2, -1000, -1000,
|
|
-1000, 541, 35, 25, -1000, -1000, -1000, 110, 1557, 91,
|
|
-1000, 108, 1557, 90, -1000, 107, 1557, 85, -1000, -1000,
|
|
-1000, 263, 257, -1000, -1000, -1000, 145, -1000, -1000, 48,
|
|
29, -1000, 1341, 1557, -1000, 1287, 1557, -1000, 1233, 1557,
|
|
-16, -20, 121, -1000, -1000, -1000, 102, 541, 541, -1000,
|
|
1179, -1000, 1125, -1000, 1071, -1000, 81, 1557, 78, -1000,
|
|
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 1017, 1557,
|
|
-1000, 963, -1000,
|
|
}
|
|
|
|
var protoPgo = [...]int{
|
|
0, 375, 373, 271, 328, 372, 371, 3, 369, 21,
|
|
8, 368, 367, 366, 15, 17, 5, 25, 28, 365,
|
|
12, 0, 364, 33, 23, 14, 363, 362, 9, 40,
|
|
361, 360, 29, 358, 357, 354, 302, 1, 2, 11,
|
|
353, 13, 352, 350, 31, 349, 348, 24, 16, 346,
|
|
286, 32, 345, 344, 281, 37, 343, 27, 340, 30,
|
|
333, 324, 10,
|
|
}
|
|
|
|
var protoR1 = [...]int{
|
|
0, 1, 1, 1, 1, 4, 4, 3, 3, 3,
|
|
3, 3, 3, 3, 3, 3, 3, 2, 5, 5,
|
|
5, 6, 23, 23, 7, 14, 14, 12, 12, 16,
|
|
16, 17, 17, 17, 19, 19, 19, 19, 19, 19,
|
|
19, 19, 57, 57, 18, 28, 28, 28, 27, 27,
|
|
27, 27, 27, 27, 26, 26, 26, 26, 26, 26,
|
|
26, 26, 26, 26, 13, 13, 13, 25, 25, 25,
|
|
25, 25, 25, 24, 24, 29, 29, 29, 29, 29,
|
|
29, 29, 29, 15, 9, 9, 8, 32, 32, 32,
|
|
32, 32, 32, 31, 40, 40, 40, 39, 39, 39,
|
|
39, 39, 39, 30, 30, 33, 33, 34, 34, 35,
|
|
22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
|
|
22, 22, 49, 49, 47, 47, 45, 45, 45, 48,
|
|
48, 46, 46, 46, 20, 20, 42, 42, 43, 43,
|
|
44, 41, 41, 50, 52, 52, 52, 51, 51, 51,
|
|
51, 51, 51, 53, 53, 36, 38, 38, 38, 37,
|
|
37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
|
|
37, 37, 54, 56, 56, 56, 55, 55, 55, 55,
|
|
55, 58, 60, 60, 60, 59, 59, 59, 59, 59,
|
|
61, 61, 62, 62, 11, 11, 11, 10, 10, 10,
|
|
10, 21, 21, 21, 21, 21, 21, 21, 21, 21,
|
|
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
|
|
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
|
|
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
|
|
21, 21, 21, 21,
|
|
}
|
|
|
|
var protoR2 = [...]int{
|
|
0, 1, 1, 2, 0, 2, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 2, 1, 4, 3, 4,
|
|
4, 3, 1, 3, 5, 1, 3, 1, 3, 1,
|
|
1, 1, 1, 1, 1, 2, 2, 2, 2, 1,
|
|
2, 2, 1, 2, 3, 1, 2, 0, 1, 2,
|
|
2, 2, 2, 1, 3, 4, 5, 5, 3, 2,
|
|
5, 4, 5, 4, 1, 3, 3, 1, 3, 3,
|
|
5, 3, 5, 1, 2, 6, 6, 6, 5, 7,
|
|
7, 7, 6, 3, 1, 3, 3, 8, 8, 8,
|
|
9, 9, 9, 5, 2, 1, 0, 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, 3, 4, 1, 3, 1, 3, 3, 1,
|
|
3, 1, 3, 3, 1, 2, 3, 1, 3, 1,
|
|
3, 1, 3, 5, 2, 1, 0, 1, 1, 1,
|
|
1, 2, 1, 4, 5, 5, 2, 1, 0, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
2, 1, 5, 2, 1, 0, 1, 1, 1, 2,
|
|
1, 5, 2, 1, 0, 1, 1, 1, 2, 1,
|
|
6, 8, 4, 3, 2, 1, 0, 1, 1, 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, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1,
|
|
}
|
|
|
|
var protoChk = [...]int{
|
|
-1000, -1, -2, -4, 8, -3, -5, -6, -7, -36,
|
|
-50, -54, -58, 52, 2, 9, 12, 13, 44, 43,
|
|
45, 46, -4, -3, 51, 52, -57, 10, 11, 4,
|
|
-23, -21, 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, 49, -14, -12, -21, 65, -21,
|
|
-21, -24, -23, 59, -21, -57, 52, -57, -57, -57,
|
|
52, 59, 51, 59, -24, 54, 54, 54, -23, 54,
|
|
52, 52, 52, -23, -16, -17, -18, -57, -19, -21,
|
|
54, 6, 64, 63, 5, -14, 66, -38, -37, -29,
|
|
-50, -36, -54, -49, -32, -7, -31, -34, -42, 52,
|
|
2, 20, 19, 18, -24, 43, 44, 45, 39, 13,
|
|
37, -35, 42, -44, 38, -52, -51, -7, -53, -43,
|
|
52, 2, -21, 42, -44, -56, -55, -29, -32, 52,
|
|
2, -60, -59, -7, -61, 52, 2, 47, 52, -28,
|
|
-27, -26, 2, -13, -21, 67, 6, 16, 5, 6,
|
|
16, 5, 55, -37, 52, -24, 36, -24, 36, -24,
|
|
36, -21, -47, -45, 5, -21, -21, -47, -41, -57,
|
|
62, 55, -51, 52, 51, -48, -46, -20, 5, 64,
|
|
55, -55, 52, 55, -59, 52, -21, 55, -28, 60,
|
|
52, 60, 52, 53, -18, 62, -24, 2, -21, -21,
|
|
-21, -21, -21, -21, 51, 52, -15, 67, 60, 40,
|
|
54, 51, 52, 52, 60, -22, 23, 24, 25, 26,
|
|
27, 28, 29, 30, 31, 32, 33, 34, -20, 52,
|
|
60, 40, 5, -62, 65, -17, 67, -18, 62, -28,
|
|
2, 68, 68, 51, 51, 51, 51, 51, 51, 5,
|
|
52, -9, -8, -14, -47, 5, 41, -40, -39, -7,
|
|
-30, -33, 52, 2, -24, 36, 5, -41, 60, 52,
|
|
-15, -48, -20, 41, 49, 48, -24, 68, -25, 2,
|
|
-16, 62, -28, 2, 61, 61, 5, 5, 5, 5,
|
|
5, 5, 52, -15, 68, 60, 51, 55, -39, 52,
|
|
-21, -21, 52, -15, -24, 52, -62, -24, 66, 68,
|
|
68, 60, -28, 2, 61, 61, 52, -15, 54, -15,
|
|
52, -15, 54, -15, 52, -15, 54, -15, 52, -9,
|
|
-16, 51, 51, 52, 61, 52, 54, 66, -25, 61,
|
|
61, 52, -38, 54, 52, -38, 54, 52, -38, 54,
|
|
5, 5, -11, -10, -7, 52, 2, 60, 60, 55,
|
|
-38, 55, -38, 55, -38, 52, -15, 54, -15, 55,
|
|
-10, 52, -25, -25, 55, 55, 55, 52, -38, 54,
|
|
55, -38, 55,
|
|
}
|
|
|
|
var protoDef = [...]int{
|
|
-2, -2, -2, -2, 0, 6, 7, 8, 9, 10,
|
|
11, 12, 13, 14, 16, 0, 0, 0, 0, 0,
|
|
0, 0, -2, 5, 0, 15, 0, 0, 0, 42,
|
|
0, 22, 201, 202, 203, 204, 205, 206, 207, 208,
|
|
209, 210, 211, 212, 213, 214, 215, 216, 217, 218,
|
|
219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
|
|
229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
|
|
239, 240, 241, 242, 243, 0, 25, 27, 0, 0,
|
|
0, 0, 73, 0, 0, 0, 18, 0, 0, 43,
|
|
21, 0, 0, 0, 0, -2, -2, -2, 74, -2,
|
|
17, 19, 20, 23, 0, 29, 30, 31, 32, 33,
|
|
-2, 34, 0, 0, 39, 26, 28, 0, 157, 159,
|
|
160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
|
|
171, 0, 0, 0, 0, 237, 238, 0, 233, 207,
|
|
231, 0, 236, 137, 232, 0, 145, 147, 148, 149,
|
|
150, 152, 0, 236, 139, 0, 174, 176, 177, 178,
|
|
180, 0, 183, 185, 186, 187, 189, 0, 24, 0,
|
|
-2, 48, 53, 0, 64, 0, 35, 38, 41, 36,
|
|
37, 40, 155, 156, 170, 0, 230, 0, 230, 0,
|
|
230, 0, 0, 124, 126, 0, 0, 0, 0, 141,
|
|
0, 143, 144, 151, 0, 0, 129, 131, 134, 0,
|
|
172, 173, 179, 181, 182, 188, 0, 44, 46, 49,
|
|
50, 51, 52, 0, 59, -2, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 122, 0, 0, 0, 0,
|
|
-2, 0, 136, 140, 0, 0, 110, 111, 112, 113,
|
|
114, 115, 116, 117, 118, 119, 120, 121, 0, 138,
|
|
0, 0, 135, 0, 0, 54, 0, 58, -2, 0,
|
|
53, 65, 66, 0, 0, 0, 0, 0, 0, 0,
|
|
123, 0, 84, 0, 125, 127, 128, 0, 95, 97,
|
|
98, 99, 100, 102, 0, 230, 0, 142, 0, 153,
|
|
0, 130, 132, 133, 0, 242, 0, 55, 0, 0,
|
|
67, -2, 0, 53, 61, 63, 0, 0, 0, 0,
|
|
0, 0, 78, 0, 83, 0, 0, 93, 94, 101,
|
|
0, 0, 107, 0, 0, 154, 0, 0, 193, 56,
|
|
57, 0, 0, 53, 60, 62, 75, 0, -2, 0,
|
|
76, 0, -2, 0, 77, 0, -2, 0, 82, 85,
|
|
86, 0, 0, 108, 109, 190, -2, 192, 68, 69,
|
|
71, 79, 0, -2, 80, 0, -2, 81, 0, -2,
|
|
0, 0, 0, 195, 197, 198, 200, 0, 0, 87,
|
|
0, 88, 0, 89, 0, 103, 0, -2, 0, 191,
|
|
194, 199, 70, 72, 90, 91, 92, 104, 0, -2,
|
|
105, 0, 106,
|
|
}
|
|
|
|
var protoTok1 = [...]int{
|
|
1, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
|
3, 3, 3, 76, 3, 74, 73, 72, 70, 3,
|
|
65, 66, 69, 63, 60, 64, 59, 57, 3, 3,
|
|
3, 3, 3, 3, 3, 3, 3, 3, 53, 52,
|
|
62, 51, 61, 58, 75, 3, 3, 3, 3, 3,
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
|
3, 67, 56, 68, 71, 3, 78, 3, 3, 3,
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
|
3, 3, 3, 54, 3, 55, 77,
|
|
}
|
|
|
|
var protoTok2 = [...]int{
|
|
2, 3, 4, 5, 6, 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, 49, 50,
|
|
}
|
|
|
|
var protoTok3 = [...]int{
|
|
0,
|
|
}
|
|
|
|
var protoErrorMessages = [...]struct {
|
|
state int
|
|
token int
|
|
msg string
|
|
}{}
|
|
|
|
//line yaccpar:1
|
|
|
|
/* parser for yacc output */
|
|
|
|
var (
|
|
protoDebug = 0
|
|
protoErrorVerbose = false
|
|
)
|
|
|
|
type protoLexer interface {
|
|
Lex(lval *protoSymType) int
|
|
Error(s string)
|
|
}
|
|
|
|
type protoParser interface {
|
|
Parse(protoLexer) int
|
|
Lookahead() int
|
|
}
|
|
|
|
type protoParserImpl struct {
|
|
lval protoSymType
|
|
stack [protoInitialStackSize]protoSymType
|
|
char int
|
|
}
|
|
|
|
func (p *protoParserImpl) Lookahead() int {
|
|
return p.char
|
|
}
|
|
|
|
func protoNewParser() protoParser {
|
|
return &protoParserImpl{}
|
|
}
|
|
|
|
const protoFlag = -1000
|
|
|
|
func protoTokname(c int) string {
|
|
if c >= 1 && c-1 < len(protoToknames) {
|
|
if protoToknames[c-1] != "" {
|
|
return protoToknames[c-1]
|
|
}
|
|
}
|
|
return __yyfmt__.Sprintf("tok-%v", c)
|
|
}
|
|
|
|
func protoStatname(s int) string {
|
|
if s >= 0 && s < len(protoStatenames) {
|
|
if protoStatenames[s] != "" {
|
|
return protoStatenames[s]
|
|
}
|
|
}
|
|
return __yyfmt__.Sprintf("state-%v", s)
|
|
}
|
|
|
|
func protoErrorMessage(state, lookAhead int) string {
|
|
const TOKSTART = 4
|
|
|
|
if !protoErrorVerbose {
|
|
return "syntax error"
|
|
}
|
|
|
|
for _, e := range protoErrorMessages {
|
|
if e.state == state && e.token == lookAhead {
|
|
return "syntax error: " + e.msg
|
|
}
|
|
}
|
|
|
|
res := "syntax error: unexpected " + protoTokname(lookAhead)
|
|
|
|
// To match Bison, suggest at most four expected tokens.
|
|
expected := make([]int, 0, 4)
|
|
|
|
// Look for shiftable tokens.
|
|
base := protoPact[state]
|
|
for tok := TOKSTART; tok-1 < len(protoToknames); tok++ {
|
|
if n := base + tok; n >= 0 && n < protoLast && protoChk[protoAct[n]] == tok {
|
|
if len(expected) == cap(expected) {
|
|
return res
|
|
}
|
|
expected = append(expected, tok)
|
|
}
|
|
}
|
|
|
|
if protoDef[state] == -2 {
|
|
i := 0
|
|
for protoExca[i] != -1 || protoExca[i+1] != state {
|
|
i += 2
|
|
}
|
|
|
|
// Look for tokens that we accept or reduce.
|
|
for i += 2; protoExca[i] >= 0; i += 2 {
|
|
tok := protoExca[i]
|
|
if tok < TOKSTART || protoExca[i+1] == 0 {
|
|
continue
|
|
}
|
|
if len(expected) == cap(expected) {
|
|
return res
|
|
}
|
|
expected = append(expected, tok)
|
|
}
|
|
|
|
// If the default action is to accept or reduce, give up.
|
|
if protoExca[i+1] != 0 {
|
|
return res
|
|
}
|
|
}
|
|
|
|
for i, tok := range expected {
|
|
if i == 0 {
|
|
res += ", expecting "
|
|
} else {
|
|
res += " or "
|
|
}
|
|
res += protoTokname(tok)
|
|
}
|
|
return res
|
|
}
|
|
|
|
func protolex1(lex protoLexer, lval *protoSymType) (char, token int) {
|
|
token = 0
|
|
char = lex.Lex(lval)
|
|
if char <= 0 {
|
|
token = protoTok1[0]
|
|
goto out
|
|
}
|
|
if char < len(protoTok1) {
|
|
token = protoTok1[char]
|
|
goto out
|
|
}
|
|
if char >= protoPrivate {
|
|
if char < protoPrivate+len(protoTok2) {
|
|
token = protoTok2[char-protoPrivate]
|
|
goto out
|
|
}
|
|
}
|
|
for i := 0; i < len(protoTok3); i += 2 {
|
|
token = protoTok3[i+0]
|
|
if token == char {
|
|
token = protoTok3[i+1]
|
|
goto out
|
|
}
|
|
}
|
|
|
|
out:
|
|
if token == 0 {
|
|
token = protoTok2[1] /* unknown char */
|
|
}
|
|
if protoDebug >= 3 {
|
|
__yyfmt__.Printf("lex %s(%d)\n", protoTokname(token), uint(char))
|
|
}
|
|
return char, token
|
|
}
|
|
|
|
func protoParse(protolex protoLexer) int {
|
|
return protoNewParser().Parse(protolex)
|
|
}
|
|
|
|
func (protorcvr *protoParserImpl) Parse(protolex protoLexer) int {
|
|
var proton int
|
|
var protoVAL protoSymType
|
|
var protoDollar []protoSymType
|
|
_ = protoDollar // silence set and not used
|
|
protoS := protorcvr.stack[:]
|
|
|
|
Nerrs := 0 /* number of errors */
|
|
Errflag := 0 /* error recovery flag */
|
|
protostate := 0
|
|
protorcvr.char = -1
|
|
prototoken := -1 // protorcvr.char translated into internal numbering
|
|
defer func() {
|
|
// Make sure we report no lookahead when not parsing.
|
|
protostate = -1
|
|
protorcvr.char = -1
|
|
prototoken = -1
|
|
}()
|
|
protop := -1
|
|
goto protostack
|
|
|
|
ret0:
|
|
return 0
|
|
|
|
ret1:
|
|
return 1
|
|
|
|
protostack:
|
|
/* put a state and value onto the stack */
|
|
if protoDebug >= 4 {
|
|
__yyfmt__.Printf("char %v in %v\n", protoTokname(prototoken), protoStatname(protostate))
|
|
}
|
|
|
|
protop++
|
|
if protop >= len(protoS) {
|
|
nyys := make([]protoSymType, len(protoS)*2)
|
|
copy(nyys, protoS)
|
|
protoS = nyys
|
|
}
|
|
protoS[protop] = protoVAL
|
|
protoS[protop].yys = protostate
|
|
|
|
protonewstate:
|
|
proton = protoPact[protostate]
|
|
if proton <= protoFlag {
|
|
goto protodefault /* simple state */
|
|
}
|
|
if protorcvr.char < 0 {
|
|
protorcvr.char, prototoken = protolex1(protolex, &protorcvr.lval)
|
|
}
|
|
proton += prototoken
|
|
if proton < 0 || proton >= protoLast {
|
|
goto protodefault
|
|
}
|
|
proton = protoAct[proton]
|
|
if protoChk[proton] == prototoken { /* valid shift */
|
|
protorcvr.char = -1
|
|
prototoken = -1
|
|
protoVAL = protorcvr.lval
|
|
protostate = proton
|
|
if Errflag > 0 {
|
|
Errflag--
|
|
}
|
|
goto protostack
|
|
}
|
|
|
|
protodefault:
|
|
/* default state action */
|
|
proton = protoDef[protostate]
|
|
if proton == -2 {
|
|
if protorcvr.char < 0 {
|
|
protorcvr.char, prototoken = protolex1(protolex, &protorcvr.lval)
|
|
}
|
|
|
|
/* look through exception table */
|
|
xi := 0
|
|
for {
|
|
if protoExca[xi+0] == -1 && protoExca[xi+1] == protostate {
|
|
break
|
|
}
|
|
xi += 2
|
|
}
|
|
for xi += 2; ; xi += 2 {
|
|
proton = protoExca[xi+0]
|
|
if proton < 0 || proton == prototoken {
|
|
break
|
|
}
|
|
}
|
|
proton = protoExca[xi+1]
|
|
if proton < 0 {
|
|
goto ret0
|
|
}
|
|
}
|
|
if proton == 0 {
|
|
/* error ... attempt to resume parsing */
|
|
switch Errflag {
|
|
case 0: /* brand new error */
|
|
protolex.Error(protoErrorMessage(protostate, prototoken))
|
|
Nerrs++
|
|
if protoDebug >= 1 {
|
|
__yyfmt__.Printf("%s", protoStatname(protostate))
|
|
__yyfmt__.Printf(" saw %s\n", protoTokname(prototoken))
|
|
}
|
|
fallthrough
|
|
|
|
case 1, 2: /* incompletely recovered error ... try again */
|
|
Errflag = 3
|
|
|
|
/* find a state where "error" is a legal shift action */
|
|
for protop >= 0 {
|
|
proton = protoPact[protoS[protop].yys] + protoErrCode
|
|
if proton >= 0 && proton < protoLast {
|
|
protostate = protoAct[proton] /* simulate a shift of "error" */
|
|
if protoChk[protostate] == protoErrCode {
|
|
goto protostack
|
|
}
|
|
}
|
|
|
|
/* the current p has no shift on "error", pop stack */
|
|
if protoDebug >= 2 {
|
|
__yyfmt__.Printf("error recovery pops state %d\n", protoS[protop].yys)
|
|
}
|
|
protop--
|
|
}
|
|
/* there is no state on the stack with an error shift ... abort */
|
|
goto ret1
|
|
|
|
case 3: /* no shift yet; clobber input char */
|
|
if protoDebug >= 2 {
|
|
__yyfmt__.Printf("error recovery discards %s\n", protoTokname(prototoken))
|
|
}
|
|
if prototoken == protoEofCode {
|
|
goto ret1
|
|
}
|
|
protorcvr.char = -1
|
|
prototoken = -1
|
|
goto protonewstate /* try again in the same state */
|
|
}
|
|
}
|
|
|
|
/* reduction by production proton */
|
|
if protoDebug >= 2 {
|
|
__yyfmt__.Printf("reduce %v in:\n\t%v\n", proton, protoStatname(protostate))
|
|
}
|
|
|
|
protont := proton
|
|
protopt := protop
|
|
_ = protopt // guard against "declared and not used"
|
|
|
|
protop -= protoR2[proton]
|
|
// protop is now the index of $0. Perform the default action. Iff the
|
|
// reduced production is ε, $1 is possibly out of range.
|
|
if protop+1 >= len(protoS) {
|
|
nyys := make([]protoSymType, len(protoS)*2)
|
|
copy(nyys, protoS)
|
|
protoS = nyys
|
|
}
|
|
protoVAL = protoS[protop+1]
|
|
|
|
/* consult goto table to find next state */
|
|
proton = protoR1[proton]
|
|
protog := protoPgo[proton]
|
|
protoj := protog + protoS[protop].yys + 1
|
|
|
|
if protoj >= protoLast {
|
|
protostate = protoAct[protog]
|
|
} else {
|
|
protostate = protoAct[protoj]
|
|
if protoChk[protostate] != -proton {
|
|
protostate = protoAct[protog]
|
|
}
|
|
}
|
|
// dummy call; replaced with literal code
|
|
switch protont {
|
|
|
|
case 1:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:143
|
|
{
|
|
protoVAL.file = ast.NewFileNode(protoDollar[1].syn, nil)
|
|
protolex.(*protoLex).res = protoVAL.file
|
|
}
|
|
case 2:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:147
|
|
{
|
|
protoVAL.file = ast.NewFileNode(nil, protoDollar[1].fileDecls)
|
|
protolex.(*protoLex).res = protoVAL.file
|
|
}
|
|
case 3:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:151
|
|
{
|
|
protoVAL.file = ast.NewFileNode(protoDollar[1].syn, protoDollar[2].fileDecls)
|
|
protolex.(*protoLex).res = protoVAL.file
|
|
}
|
|
case 4:
|
|
protoDollar = protoS[protopt-0 : protopt+1]
|
|
//line proto.y:155
|
|
{
|
|
}
|
|
case 5:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:158
|
|
{
|
|
if protoDollar[2].fileDecl != nil {
|
|
protoVAL.fileDecls = append(protoDollar[1].fileDecls, protoDollar[2].fileDecl)
|
|
} else {
|
|
protoVAL.fileDecls = protoDollar[1].fileDecls
|
|
}
|
|
}
|
|
case 6:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:165
|
|
{
|
|
if protoDollar[1].fileDecl != nil {
|
|
protoVAL.fileDecls = []ast.FileElement{protoDollar[1].fileDecl}
|
|
} else {
|
|
protoVAL.fileDecls = nil
|
|
}
|
|
}
|
|
case 7:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:173
|
|
{
|
|
protoVAL.fileDecl = protoDollar[1].imprt
|
|
}
|
|
case 8:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:176
|
|
{
|
|
protoVAL.fileDecl = protoDollar[1].pkg
|
|
}
|
|
case 9:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:179
|
|
{
|
|
protoVAL.fileDecl = protoDollar[1].opt
|
|
}
|
|
case 10:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:182
|
|
{
|
|
protoVAL.fileDecl = protoDollar[1].msg
|
|
}
|
|
case 11:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:185
|
|
{
|
|
protoVAL.fileDecl = protoDollar[1].en
|
|
}
|
|
case 12:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:188
|
|
{
|
|
protoVAL.fileDecl = protoDollar[1].extend
|
|
}
|
|
case 13:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:191
|
|
{
|
|
protoVAL.fileDecl = protoDollar[1].svc
|
|
}
|
|
case 14:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:194
|
|
{
|
|
protoVAL.fileDecl = ast.NewEmptyDeclNode(protoDollar[1].b)
|
|
}
|
|
case 15:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:197
|
|
{
|
|
protoVAL.fileDecl = nil
|
|
}
|
|
case 16:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:200
|
|
{
|
|
protoVAL.fileDecl = nil
|
|
}
|
|
case 17:
|
|
protoDollar = protoS[protopt-4 : protopt+1]
|
|
//line proto.y:204
|
|
{
|
|
protoVAL.syn = ast.NewSyntaxNode(protoDollar[1].id.ToKeyword(), protoDollar[2].b, protoDollar[3].str.toStringValueNode(), protoDollar[4].b)
|
|
}
|
|
case 18:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:208
|
|
{
|
|
protoVAL.imprt = ast.NewImportNode(protoDollar[1].id.ToKeyword(), nil, nil, protoDollar[2].str.toStringValueNode(), protoDollar[3].b)
|
|
}
|
|
case 19:
|
|
protoDollar = protoS[protopt-4 : protopt+1]
|
|
//line proto.y:211
|
|
{
|
|
protoVAL.imprt = ast.NewImportNode(protoDollar[1].id.ToKeyword(), nil, protoDollar[2].id.ToKeyword(), protoDollar[3].str.toStringValueNode(), protoDollar[4].b)
|
|
}
|
|
case 20:
|
|
protoDollar = protoS[protopt-4 : protopt+1]
|
|
//line proto.y:214
|
|
{
|
|
protoVAL.imprt = ast.NewImportNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id.ToKeyword(), nil, protoDollar[3].str.toStringValueNode(), protoDollar[4].b)
|
|
}
|
|
case 21:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:218
|
|
{
|
|
protoVAL.pkg = ast.NewPackageNode(protoDollar[1].id.ToKeyword(), protoDollar[2].cid.toIdentValueNode(nil), protoDollar[3].b)
|
|
}
|
|
case 22:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:222
|
|
{
|
|
protoVAL.cid = &identList{protoDollar[1].id, nil, nil}
|
|
}
|
|
case 23:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:225
|
|
{
|
|
protoVAL.cid = &identList{protoDollar[1].id, protoDollar[2].b, protoDollar[3].cid}
|
|
}
|
|
case 24:
|
|
protoDollar = protoS[protopt-5 : protopt+1]
|
|
//line proto.y:229
|
|
{
|
|
refs, dots := protoDollar[2].optNms.toNodes()
|
|
optName := ast.NewOptionNameNode(refs, dots)
|
|
protoVAL.opt = ast.NewOptionNode(protoDollar[1].id.ToKeyword(), optName, protoDollar[3].b, protoDollar[4].v, protoDollar[5].b)
|
|
}
|
|
case 25:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:235
|
|
{
|
|
protoVAL.optNms = &fieldRefList{protoDollar[1].ref, nil, nil}
|
|
}
|
|
case 26:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:238
|
|
{
|
|
protoVAL.optNms = &fieldRefList{protoDollar[1].ref, protoDollar[2].b, protoDollar[3].optNms}
|
|
}
|
|
case 27:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:242
|
|
{
|
|
protoVAL.ref = ast.NewFieldReferenceNode(protoDollar[1].id)
|
|
}
|
|
case 28:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:245
|
|
{
|
|
protoVAL.ref = ast.NewExtensionFieldReferenceNode(protoDollar[1].b, protoDollar[2].tid, protoDollar[3].b)
|
|
}
|
|
case 31:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:252
|
|
{
|
|
protoVAL.v = protoDollar[1].str.toStringValueNode()
|
|
}
|
|
case 33:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:256
|
|
{
|
|
if protoDollar[1].id.Val == "true" || protoDollar[1].id.Val == "false" {
|
|
protoVAL.v = ast.NewBoolLiteralNode(protoDollar[1].id.ToKeyword())
|
|
} else if protoDollar[1].id.Val == "inf" || protoDollar[1].id.Val == "nan" {
|
|
protoVAL.v = ast.NewSpecialFloatLiteralNode(protoDollar[1].id.ToKeyword())
|
|
} else {
|
|
protoVAL.v = protoDollar[1].id
|
|
}
|
|
}
|
|
case 34:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:266
|
|
{
|
|
protoVAL.v = protoDollar[1].f
|
|
}
|
|
case 35:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:269
|
|
{
|
|
protoVAL.v = ast.NewSignedFloatLiteralNode(protoDollar[1].b, protoDollar[2].f)
|
|
}
|
|
case 36:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:272
|
|
{
|
|
protoVAL.v = ast.NewSignedFloatLiteralNode(protoDollar[1].b, protoDollar[2].f)
|
|
}
|
|
case 37:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:275
|
|
{
|
|
f := ast.NewSpecialFloatLiteralNode(protoDollar[2].id.ToKeyword())
|
|
protoVAL.v = ast.NewSignedFloatLiteralNode(protoDollar[1].b, f)
|
|
}
|
|
case 38:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:279
|
|
{
|
|
f := ast.NewSpecialFloatLiteralNode(protoDollar[2].id.ToKeyword())
|
|
protoVAL.v = ast.NewSignedFloatLiteralNode(protoDollar[1].b, f)
|
|
}
|
|
case 39:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:283
|
|
{
|
|
protoVAL.v = protoDollar[1].i
|
|
}
|
|
case 40:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:286
|
|
{
|
|
protoVAL.v = ast.NewPositiveUintLiteralNode(protoDollar[1].b, protoDollar[2].i)
|
|
}
|
|
case 41:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:289
|
|
{
|
|
if protoDollar[2].i.Val > math.MaxInt64+1 {
|
|
// can't represent as int so treat as float literal
|
|
protoVAL.v = ast.NewSignedFloatLiteralNode(protoDollar[1].b, protoDollar[2].i)
|
|
} else {
|
|
protoVAL.v = ast.NewNegativeIntLiteralNode(protoDollar[1].b, protoDollar[2].i)
|
|
}
|
|
}
|
|
case 42:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:298
|
|
{
|
|
protoVAL.str = &stringList{protoDollar[1].s, nil}
|
|
}
|
|
case 43:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:301
|
|
{
|
|
protoVAL.str = &stringList{protoDollar[1].s, protoDollar[2].str}
|
|
}
|
|
case 44:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:305
|
|
{
|
|
fields, delims := protoDollar[2].msgLit.toNodes()
|
|
protoVAL.v = ast.NewMessageLiteralNode(protoDollar[1].b, fields, delims, protoDollar[3].b)
|
|
}
|
|
case 45:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:310
|
|
{
|
|
if protoDollar[1].msgEntry != nil {
|
|
protoVAL.msgLit = &messageFieldList{protoDollar[1].msgEntry, nil}
|
|
} else {
|
|
protoVAL.msgLit = nil
|
|
}
|
|
}
|
|
case 46:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:317
|
|
{
|
|
if protoDollar[1].msgEntry != nil {
|
|
protoVAL.msgLit = &messageFieldList{protoDollar[1].msgEntry, protoDollar[2].msgLit}
|
|
} else {
|
|
protoVAL.msgLit = protoDollar[2].msgLit
|
|
}
|
|
}
|
|
case 47:
|
|
protoDollar = protoS[protopt-0 : protopt+1]
|
|
//line proto.y:324
|
|
{
|
|
protoVAL.msgLit = nil
|
|
}
|
|
case 48:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:328
|
|
{
|
|
if protoDollar[1].msgField != nil {
|
|
protoVAL.msgEntry = &messageFieldEntry{protoDollar[1].msgField, nil}
|
|
} else {
|
|
protoVAL.msgEntry = nil
|
|
}
|
|
}
|
|
case 49:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:335
|
|
{
|
|
if protoDollar[1].msgField != nil {
|
|
protoVAL.msgEntry = &messageFieldEntry{protoDollar[1].msgField, protoDollar[2].b}
|
|
} else {
|
|
protoVAL.msgEntry = nil
|
|
}
|
|
}
|
|
case 50:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:342
|
|
{
|
|
if protoDollar[1].msgField != nil {
|
|
protoVAL.msgEntry = &messageFieldEntry{protoDollar[1].msgField, protoDollar[2].b}
|
|
} else {
|
|
protoVAL.msgEntry = nil
|
|
}
|
|
}
|
|
case 51:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:349
|
|
{
|
|
protoVAL.msgEntry = nil
|
|
}
|
|
case 52:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:352
|
|
{
|
|
protoVAL.msgEntry = nil
|
|
}
|
|
case 53:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:355
|
|
{
|
|
protoVAL.msgEntry = nil
|
|
}
|
|
case 54:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:359
|
|
{
|
|
if protoDollar[1].ref != nil {
|
|
protoVAL.msgField = ast.NewMessageFieldNode(protoDollar[1].ref, protoDollar[2].b, protoDollar[3].v)
|
|
} else {
|
|
protoVAL.msgField = nil
|
|
}
|
|
}
|
|
case 55:
|
|
protoDollar = protoS[protopt-4 : protopt+1]
|
|
//line proto.y:366
|
|
{
|
|
if protoDollar[1].ref != nil {
|
|
val := ast.NewArrayLiteralNode(protoDollar[3].b, nil, nil, protoDollar[4].b)
|
|
protoVAL.msgField = ast.NewMessageFieldNode(protoDollar[1].ref, protoDollar[2].b, val)
|
|
} else {
|
|
protoVAL.msgField = nil
|
|
}
|
|
}
|
|
case 56:
|
|
protoDollar = protoS[protopt-5 : protopt+1]
|
|
//line proto.y:374
|
|
{
|
|
if protoDollar[1].ref != nil {
|
|
vals, commas := protoDollar[4].sl.toNodes()
|
|
val := ast.NewArrayLiteralNode(protoDollar[3].b, vals, commas, protoDollar[5].b)
|
|
protoVAL.msgField = ast.NewMessageFieldNode(protoDollar[1].ref, protoDollar[2].b, val)
|
|
} else {
|
|
protoVAL.msgField = nil
|
|
}
|
|
}
|
|
case 57:
|
|
protoDollar = protoS[protopt-5 : protopt+1]
|
|
//line proto.y:383
|
|
{
|
|
protoVAL.msgField = nil
|
|
}
|
|
case 58:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:386
|
|
{
|
|
if protoDollar[1].ref != nil {
|
|
protoVAL.msgField = ast.NewMessageFieldNode(protoDollar[1].ref, protoDollar[2].b, protoDollar[3].v)
|
|
} else {
|
|
protoVAL.msgField = nil
|
|
}
|
|
}
|
|
case 59:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:393
|
|
{
|
|
if protoDollar[1].ref != nil {
|
|
protoVAL.msgField = ast.NewMessageFieldNode(protoDollar[1].ref, nil, protoDollar[2].v)
|
|
} else {
|
|
protoVAL.msgField = nil
|
|
}
|
|
}
|
|
case 60:
|
|
protoDollar = protoS[protopt-5 : protopt+1]
|
|
//line proto.y:400
|
|
{
|
|
if protoDollar[1].ref != nil {
|
|
fields, delims := protoDollar[4].msgLit.toNodes()
|
|
msg := ast.NewMessageLiteralNode(protoDollar[3].b, fields, delims, protoDollar[5].b)
|
|
protoVAL.msgField = ast.NewMessageFieldNode(protoDollar[1].ref, protoDollar[2].b, msg)
|
|
} else {
|
|
protoVAL.msgField = nil
|
|
}
|
|
}
|
|
case 61:
|
|
protoDollar = protoS[protopt-4 : protopt+1]
|
|
//line proto.y:409
|
|
{
|
|
if protoDollar[1].ref != nil {
|
|
fields, delims := protoDollar[3].msgLit.toNodes()
|
|
msg := ast.NewMessageLiteralNode(protoDollar[2].b, fields, delims, protoDollar[4].b)
|
|
protoVAL.msgField = ast.NewMessageFieldNode(protoDollar[1].ref, nil, msg)
|
|
} else {
|
|
protoVAL.msgField = nil
|
|
}
|
|
}
|
|
case 62:
|
|
protoDollar = protoS[protopt-5 : protopt+1]
|
|
//line proto.y:418
|
|
{
|
|
protoVAL.msgField = nil
|
|
}
|
|
case 63:
|
|
protoDollar = protoS[protopt-4 : protopt+1]
|
|
//line proto.y:421
|
|
{
|
|
protoVAL.msgField = nil
|
|
}
|
|
case 64:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:425
|
|
{
|
|
protoVAL.ref = ast.NewFieldReferenceNode(protoDollar[1].id)
|
|
}
|
|
case 65:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:428
|
|
{
|
|
protoVAL.ref = ast.NewExtensionFieldReferenceNode(protoDollar[1].b, protoDollar[2].tid, protoDollar[3].b)
|
|
}
|
|
case 66:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:431
|
|
{
|
|
protoVAL.ref = nil
|
|
}
|
|
case 67:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:435
|
|
{
|
|
protoVAL.sl = &valueList{protoDollar[1].v, nil, nil}
|
|
}
|
|
case 68:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:438
|
|
{
|
|
protoVAL.sl = &valueList{protoDollar[1].v, protoDollar[2].b, protoDollar[3].sl}
|
|
}
|
|
case 69:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:441
|
|
{
|
|
fields, delims := protoDollar[2].msgLit.toNodes()
|
|
msg := ast.NewMessageLiteralNode(protoDollar[1].b, fields, delims, protoDollar[3].b)
|
|
protoVAL.sl = &valueList{msg, nil, nil}
|
|
}
|
|
case 70:
|
|
protoDollar = protoS[protopt-5 : protopt+1]
|
|
//line proto.y:446
|
|
{
|
|
fields, delims := protoDollar[2].msgLit.toNodes()
|
|
msg := ast.NewMessageLiteralNode(protoDollar[1].b, fields, delims, protoDollar[3].b)
|
|
protoVAL.sl = &valueList{msg, protoDollar[4].b, protoDollar[5].sl}
|
|
}
|
|
case 71:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:451
|
|
{
|
|
protoVAL.sl = nil
|
|
}
|
|
case 72:
|
|
protoDollar = protoS[protopt-5 : protopt+1]
|
|
//line proto.y:454
|
|
{
|
|
protoVAL.sl = protoDollar[5].sl
|
|
}
|
|
case 73:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:458
|
|
{
|
|
protoVAL.tid = protoDollar[1].cid.toIdentValueNode(nil)
|
|
}
|
|
case 74:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:461
|
|
{
|
|
protoVAL.tid = protoDollar[2].cid.toIdentValueNode(protoDollar[1].b)
|
|
}
|
|
case 75:
|
|
protoDollar = protoS[protopt-6 : protopt+1]
|
|
//line proto.y:465
|
|
{
|
|
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 76:
|
|
protoDollar = protoS[protopt-6 : protopt+1]
|
|
//line proto.y:468
|
|
{
|
|
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 77:
|
|
protoDollar = protoS[protopt-6 : protopt+1]
|
|
//line proto.y:471
|
|
{
|
|
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 78:
|
|
protoDollar = protoS[protopt-5 : protopt+1]
|
|
//line proto.y:474
|
|
{
|
|
protoVAL.fld = ast.NewFieldNode(nil, protoDollar[1].tid, protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, nil, protoDollar[5].b)
|
|
}
|
|
case 79:
|
|
protoDollar = protoS[protopt-7 : protopt+1]
|
|
//line proto.y:477
|
|
{
|
|
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 80:
|
|
protoDollar = protoS[protopt-7 : protopt+1]
|
|
//line proto.y:480
|
|
{
|
|
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 81:
|
|
protoDollar = protoS[protopt-7 : protopt+1]
|
|
//line proto.y:483
|
|
{
|
|
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 82:
|
|
protoDollar = protoS[protopt-6 : protopt+1]
|
|
//line proto.y:486
|
|
{
|
|
protoVAL.fld = ast.NewFieldNode(nil, protoDollar[1].tid, protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, protoDollar[5].cmpctOpts, protoDollar[6].b)
|
|
}
|
|
case 83:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:490
|
|
{
|
|
opts, commas := protoDollar[2].opts.toNodes()
|
|
protoVAL.cmpctOpts = ast.NewCompactOptionsNode(protoDollar[1].b, opts, commas, protoDollar[3].b)
|
|
}
|
|
case 84:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:495
|
|
{
|
|
protoVAL.opts = &compactOptionList{protoDollar[1].opt, nil, nil}
|
|
}
|
|
case 85:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:498
|
|
{
|
|
protoVAL.opts = &compactOptionList{protoDollar[1].opt, protoDollar[2].b, protoDollar[3].opts}
|
|
}
|
|
case 86:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:502
|
|
{
|
|
refs, dots := protoDollar[1].optNms.toNodes()
|
|
optName := ast.NewOptionNameNode(refs, dots)
|
|
protoVAL.opt = ast.NewCompactOptionNode(optName, protoDollar[2].b, protoDollar[3].v)
|
|
}
|
|
case 87:
|
|
protoDollar = protoS[protopt-8 : protopt+1]
|
|
//line proto.y:508
|
|
{
|
|
protoVAL.grp = ast.NewGroupNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id.ToKeyword(), protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, nil, protoDollar[6].b, protoDollar[7].msgDecls, protoDollar[8].b)
|
|
}
|
|
case 88:
|
|
protoDollar = protoS[protopt-8 : protopt+1]
|
|
//line proto.y:511
|
|
{
|
|
protoVAL.grp = ast.NewGroupNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id.ToKeyword(), protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, nil, protoDollar[6].b, protoDollar[7].msgDecls, protoDollar[8].b)
|
|
}
|
|
case 89:
|
|
protoDollar = protoS[protopt-8 : protopt+1]
|
|
//line proto.y:514
|
|
{
|
|
protoVAL.grp = ast.NewGroupNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id.ToKeyword(), protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, nil, protoDollar[6].b, protoDollar[7].msgDecls, protoDollar[8].b)
|
|
}
|
|
case 90:
|
|
protoDollar = protoS[protopt-9 : protopt+1]
|
|
//line proto.y:517
|
|
{
|
|
protoVAL.grp = 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].msgDecls, protoDollar[9].b)
|
|
}
|
|
case 91:
|
|
protoDollar = protoS[protopt-9 : protopt+1]
|
|
//line proto.y:520
|
|
{
|
|
protoVAL.grp = 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].msgDecls, protoDollar[9].b)
|
|
}
|
|
case 92:
|
|
protoDollar = protoS[protopt-9 : protopt+1]
|
|
//line proto.y:523
|
|
{
|
|
protoVAL.grp = 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].msgDecls, protoDollar[9].b)
|
|
}
|
|
case 93:
|
|
protoDollar = protoS[protopt-5 : protopt+1]
|
|
//line proto.y:527
|
|
{
|
|
protoVAL.oo = ast.NewOneOfNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id, protoDollar[3].b, protoDollar[4].ooDecls, protoDollar[5].b)
|
|
}
|
|
case 94:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:531
|
|
{
|
|
if protoDollar[2].ooDecl != nil {
|
|
protoVAL.ooDecls = append(protoDollar[1].ooDecls, protoDollar[2].ooDecl)
|
|
} else {
|
|
protoVAL.ooDecls = protoDollar[1].ooDecls
|
|
}
|
|
}
|
|
case 95:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:538
|
|
{
|
|
if protoDollar[1].ooDecl != nil {
|
|
protoVAL.ooDecls = []ast.OneOfElement{protoDollar[1].ooDecl}
|
|
} else {
|
|
protoVAL.ooDecls = nil
|
|
}
|
|
}
|
|
case 96:
|
|
protoDollar = protoS[protopt-0 : protopt+1]
|
|
//line proto.y:545
|
|
{
|
|
protoVAL.ooDecls = nil
|
|
}
|
|
case 97:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:549
|
|
{
|
|
protoVAL.ooDecl = protoDollar[1].opt
|
|
}
|
|
case 98:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:552
|
|
{
|
|
protoVAL.ooDecl = protoDollar[1].fld
|
|
}
|
|
case 99:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:555
|
|
{
|
|
protoVAL.ooDecl = protoDollar[1].grp
|
|
}
|
|
case 100:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:558
|
|
{
|
|
protoVAL.ooDecl = ast.NewEmptyDeclNode(protoDollar[1].b)
|
|
}
|
|
case 101:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:561
|
|
{
|
|
protoVAL.ooDecl = nil
|
|
}
|
|
case 102:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:564
|
|
{
|
|
protoVAL.ooDecl = nil
|
|
}
|
|
case 103:
|
|
protoDollar = protoS[protopt-5 : protopt+1]
|
|
//line proto.y:568
|
|
{
|
|
protoVAL.fld = ast.NewFieldNode(nil, protoDollar[1].tid, protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, nil, protoDollar[5].b)
|
|
}
|
|
case 104:
|
|
protoDollar = protoS[protopt-6 : protopt+1]
|
|
//line proto.y:571
|
|
{
|
|
protoVAL.fld = ast.NewFieldNode(nil, protoDollar[1].tid, protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, protoDollar[5].cmpctOpts, protoDollar[6].b)
|
|
}
|
|
case 105:
|
|
protoDollar = protoS[protopt-7 : protopt+1]
|
|
//line proto.y:575
|
|
{
|
|
protoVAL.grp = ast.NewGroupNode(nil, protoDollar[1].id.ToKeyword(), protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, nil, protoDollar[5].b, protoDollar[6].msgDecls, protoDollar[7].b)
|
|
}
|
|
case 106:
|
|
protoDollar = protoS[protopt-8 : protopt+1]
|
|
//line proto.y:578
|
|
{
|
|
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].msgDecls, protoDollar[8].b)
|
|
}
|
|
case 107:
|
|
protoDollar = protoS[protopt-5 : protopt+1]
|
|
//line proto.y:582
|
|
{
|
|
protoVAL.mapFld = ast.NewMapFieldNode(protoDollar[1].mapType, protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, nil, protoDollar[5].b)
|
|
}
|
|
case 108:
|
|
protoDollar = protoS[protopt-6 : protopt+1]
|
|
//line proto.y:585
|
|
{
|
|
protoVAL.mapFld = ast.NewMapFieldNode(protoDollar[1].mapType, protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, protoDollar[5].cmpctOpts, protoDollar[6].b)
|
|
}
|
|
case 109:
|
|
protoDollar = protoS[protopt-6 : protopt+1]
|
|
//line proto.y:589
|
|
{
|
|
protoVAL.mapType = ast.NewMapTypeNode(protoDollar[1].id.ToKeyword(), protoDollar[2].b, protoDollar[3].id, protoDollar[4].b, protoDollar[5].tid, protoDollar[6].b)
|
|
}
|
|
case 122:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:606
|
|
{
|
|
ranges, commas := protoDollar[2].rngs.toNodes()
|
|
protoVAL.ext = ast.NewExtensionRangeNode(protoDollar[1].id.ToKeyword(), ranges, commas, nil, protoDollar[3].b)
|
|
}
|
|
case 123:
|
|
protoDollar = protoS[protopt-4 : protopt+1]
|
|
//line proto.y:610
|
|
{
|
|
ranges, commas := protoDollar[2].rngs.toNodes()
|
|
protoVAL.ext = ast.NewExtensionRangeNode(protoDollar[1].id.ToKeyword(), ranges, commas, protoDollar[3].cmpctOpts, protoDollar[4].b)
|
|
}
|
|
case 124:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:615
|
|
{
|
|
protoVAL.rngs = &rangeList{protoDollar[1].rng, nil, nil}
|
|
}
|
|
case 125:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:618
|
|
{
|
|
protoVAL.rngs = &rangeList{protoDollar[1].rng, protoDollar[2].b, protoDollar[3].rngs}
|
|
}
|
|
case 126:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:622
|
|
{
|
|
protoVAL.rng = ast.NewRangeNode(protoDollar[1].i, nil, nil, nil)
|
|
}
|
|
case 127:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:625
|
|
{
|
|
protoVAL.rng = ast.NewRangeNode(protoDollar[1].i, protoDollar[2].id.ToKeyword(), protoDollar[3].i, nil)
|
|
}
|
|
case 128:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:628
|
|
{
|
|
protoVAL.rng = ast.NewRangeNode(protoDollar[1].i, protoDollar[2].id.ToKeyword(), nil, protoDollar[3].id.ToKeyword())
|
|
}
|
|
case 129:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:632
|
|
{
|
|
protoVAL.rngs = &rangeList{protoDollar[1].rng, nil, nil}
|
|
}
|
|
case 130:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:635
|
|
{
|
|
protoVAL.rngs = &rangeList{protoDollar[1].rng, protoDollar[2].b, protoDollar[3].rngs}
|
|
}
|
|
case 131:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:639
|
|
{
|
|
protoVAL.rng = ast.NewRangeNode(protoDollar[1].il, nil, nil, nil)
|
|
}
|
|
case 132:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:642
|
|
{
|
|
protoVAL.rng = ast.NewRangeNode(protoDollar[1].il, protoDollar[2].id.ToKeyword(), protoDollar[3].il, nil)
|
|
}
|
|
case 133:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:645
|
|
{
|
|
protoVAL.rng = ast.NewRangeNode(protoDollar[1].il, protoDollar[2].id.ToKeyword(), nil, protoDollar[3].id.ToKeyword())
|
|
}
|
|
case 134:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:649
|
|
{
|
|
protoVAL.il = protoDollar[1].i
|
|
}
|
|
case 135:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:652
|
|
{
|
|
protoVAL.il = ast.NewNegativeIntLiteralNode(protoDollar[1].b, protoDollar[2].i)
|
|
}
|
|
case 136:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:656
|
|
{
|
|
ranges, commas := protoDollar[2].rngs.toNodes()
|
|
protoVAL.resvd = ast.NewReservedRangesNode(protoDollar[1].id.ToKeyword(), ranges, commas, protoDollar[3].b)
|
|
}
|
|
case 138:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:662
|
|
{
|
|
ranges, commas := protoDollar[2].rngs.toNodes()
|
|
protoVAL.resvd = ast.NewReservedRangesNode(protoDollar[1].id.ToKeyword(), ranges, commas, protoDollar[3].b)
|
|
}
|
|
case 140:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:668
|
|
{
|
|
names, commas := protoDollar[2].names.toNodes()
|
|
protoVAL.resvd = ast.NewReservedNamesNode(protoDollar[1].id.ToKeyword(), names, commas, protoDollar[3].b)
|
|
}
|
|
case 141:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:673
|
|
{
|
|
protoVAL.names = &nameList{protoDollar[1].str.toStringValueNode(), nil, nil}
|
|
}
|
|
case 142:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:676
|
|
{
|
|
protoVAL.names = &nameList{protoDollar[1].str.toStringValueNode(), protoDollar[2].b, protoDollar[3].names}
|
|
}
|
|
case 143:
|
|
protoDollar = protoS[protopt-5 : protopt+1]
|
|
//line proto.y:680
|
|
{
|
|
protoVAL.en = ast.NewEnumNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id, protoDollar[3].b, protoDollar[4].enDecls, protoDollar[5].b)
|
|
}
|
|
case 144:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:684
|
|
{
|
|
if protoDollar[2].enDecl != nil {
|
|
protoVAL.enDecls = append(protoDollar[1].enDecls, protoDollar[2].enDecl)
|
|
} else {
|
|
protoVAL.enDecls = protoDollar[1].enDecls
|
|
}
|
|
}
|
|
case 145:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:691
|
|
{
|
|
if protoDollar[1].enDecl != nil {
|
|
protoVAL.enDecls = []ast.EnumElement{protoDollar[1].enDecl}
|
|
} else {
|
|
protoVAL.enDecls = nil
|
|
}
|
|
}
|
|
case 146:
|
|
protoDollar = protoS[protopt-0 : protopt+1]
|
|
//line proto.y:698
|
|
{
|
|
protoVAL.enDecls = nil
|
|
}
|
|
case 147:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:702
|
|
{
|
|
protoVAL.enDecl = protoDollar[1].opt
|
|
}
|
|
case 148:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:705
|
|
{
|
|
protoVAL.enDecl = protoDollar[1].env
|
|
}
|
|
case 149:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:708
|
|
{
|
|
protoVAL.enDecl = protoDollar[1].resvd
|
|
}
|
|
case 150:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:711
|
|
{
|
|
protoVAL.enDecl = ast.NewEmptyDeclNode(protoDollar[1].b)
|
|
}
|
|
case 151:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:714
|
|
{
|
|
protoVAL.enDecl = nil
|
|
}
|
|
case 152:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:717
|
|
{
|
|
protoVAL.enDecl = nil
|
|
}
|
|
case 153:
|
|
protoDollar = protoS[protopt-4 : protopt+1]
|
|
//line proto.y:721
|
|
{
|
|
protoVAL.env = ast.NewEnumValueNode(protoDollar[1].id, protoDollar[2].b, protoDollar[3].il, nil, protoDollar[4].b)
|
|
}
|
|
case 154:
|
|
protoDollar = protoS[protopt-5 : protopt+1]
|
|
//line proto.y:724
|
|
{
|
|
protoVAL.env = ast.NewEnumValueNode(protoDollar[1].id, protoDollar[2].b, protoDollar[3].il, protoDollar[4].cmpctOpts, protoDollar[5].b)
|
|
}
|
|
case 155:
|
|
protoDollar = protoS[protopt-5 : protopt+1]
|
|
//line proto.y:728
|
|
{
|
|
protoVAL.msg = ast.NewMessageNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id, protoDollar[3].b, protoDollar[4].msgDecls, protoDollar[5].b)
|
|
}
|
|
case 156:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:732
|
|
{
|
|
if protoDollar[2].msgDecl != nil {
|
|
protoVAL.msgDecls = append(protoDollar[1].msgDecls, protoDollar[2].msgDecl)
|
|
} else {
|
|
protoVAL.msgDecls = protoDollar[1].msgDecls
|
|
}
|
|
}
|
|
case 157:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:739
|
|
{
|
|
if protoDollar[1].msgDecl != nil {
|
|
protoVAL.msgDecls = []ast.MessageElement{protoDollar[1].msgDecl}
|
|
} else {
|
|
protoVAL.msgDecls = nil
|
|
}
|
|
}
|
|
case 158:
|
|
protoDollar = protoS[protopt-0 : protopt+1]
|
|
//line proto.y:746
|
|
{
|
|
protoVAL.msgDecls = nil
|
|
}
|
|
case 159:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:750
|
|
{
|
|
protoVAL.msgDecl = protoDollar[1].fld
|
|
}
|
|
case 160:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:753
|
|
{
|
|
protoVAL.msgDecl = protoDollar[1].en
|
|
}
|
|
case 161:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:756
|
|
{
|
|
protoVAL.msgDecl = protoDollar[1].msg
|
|
}
|
|
case 162:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:759
|
|
{
|
|
protoVAL.msgDecl = protoDollar[1].extend
|
|
}
|
|
case 163:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:762
|
|
{
|
|
protoVAL.msgDecl = protoDollar[1].ext
|
|
}
|
|
case 164:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:765
|
|
{
|
|
protoVAL.msgDecl = protoDollar[1].grp
|
|
}
|
|
case 165:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:768
|
|
{
|
|
protoVAL.msgDecl = protoDollar[1].opt
|
|
}
|
|
case 166:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:771
|
|
{
|
|
protoVAL.msgDecl = protoDollar[1].oo
|
|
}
|
|
case 167:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:774
|
|
{
|
|
protoVAL.msgDecl = protoDollar[1].mapFld
|
|
}
|
|
case 168:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:777
|
|
{
|
|
protoVAL.msgDecl = protoDollar[1].resvd
|
|
}
|
|
case 169:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:780
|
|
{
|
|
protoVAL.msgDecl = ast.NewEmptyDeclNode(protoDollar[1].b)
|
|
}
|
|
case 170:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:783
|
|
{
|
|
protoVAL.msgDecl = nil
|
|
}
|
|
case 171:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:786
|
|
{
|
|
protoVAL.msgDecl = nil
|
|
}
|
|
case 172:
|
|
protoDollar = protoS[protopt-5 : protopt+1]
|
|
//line proto.y:790
|
|
{
|
|
protoVAL.extend = ast.NewExtendNode(protoDollar[1].id.ToKeyword(), protoDollar[2].tid, protoDollar[3].b, protoDollar[4].extDecls, protoDollar[5].b)
|
|
}
|
|
case 173:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:794
|
|
{
|
|
if protoDollar[2].extDecl != nil {
|
|
protoVAL.extDecls = append(protoDollar[1].extDecls, protoDollar[2].extDecl)
|
|
} else {
|
|
protoVAL.extDecls = protoDollar[1].extDecls
|
|
}
|
|
}
|
|
case 174:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:801
|
|
{
|
|
if protoDollar[1].extDecl != nil {
|
|
protoVAL.extDecls = []ast.ExtendElement{protoDollar[1].extDecl}
|
|
} else {
|
|
protoVAL.extDecls = nil
|
|
}
|
|
}
|
|
case 175:
|
|
protoDollar = protoS[protopt-0 : protopt+1]
|
|
//line proto.y:808
|
|
{
|
|
protoVAL.extDecls = nil
|
|
}
|
|
case 176:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:812
|
|
{
|
|
protoVAL.extDecl = protoDollar[1].fld
|
|
}
|
|
case 177:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:815
|
|
{
|
|
protoVAL.extDecl = protoDollar[1].grp
|
|
}
|
|
case 178:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:818
|
|
{
|
|
protoVAL.extDecl = ast.NewEmptyDeclNode(protoDollar[1].b)
|
|
}
|
|
case 179:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:821
|
|
{
|
|
protoVAL.extDecl = nil
|
|
}
|
|
case 180:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:824
|
|
{
|
|
protoVAL.extDecl = nil
|
|
}
|
|
case 181:
|
|
protoDollar = protoS[protopt-5 : protopt+1]
|
|
//line proto.y:828
|
|
{
|
|
protoVAL.svc = ast.NewServiceNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id, protoDollar[3].b, protoDollar[4].svcDecls, protoDollar[5].b)
|
|
}
|
|
case 182:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:832
|
|
{
|
|
if protoDollar[2].svcDecl != nil {
|
|
protoVAL.svcDecls = append(protoDollar[1].svcDecls, protoDollar[2].svcDecl)
|
|
} else {
|
|
protoVAL.svcDecls = protoDollar[1].svcDecls
|
|
}
|
|
}
|
|
case 183:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:839
|
|
{
|
|
if protoDollar[1].svcDecl != nil {
|
|
protoVAL.svcDecls = []ast.ServiceElement{protoDollar[1].svcDecl}
|
|
} else {
|
|
protoVAL.svcDecls = nil
|
|
}
|
|
}
|
|
case 184:
|
|
protoDollar = protoS[protopt-0 : protopt+1]
|
|
//line proto.y:846
|
|
{
|
|
protoVAL.svcDecls = nil
|
|
}
|
|
case 185:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:853
|
|
{
|
|
protoVAL.svcDecl = protoDollar[1].opt
|
|
}
|
|
case 186:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:856
|
|
{
|
|
protoVAL.svcDecl = protoDollar[1].mtd
|
|
}
|
|
case 187:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:859
|
|
{
|
|
protoVAL.svcDecl = ast.NewEmptyDeclNode(protoDollar[1].b)
|
|
}
|
|
case 188:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:862
|
|
{
|
|
protoVAL.svcDecl = nil
|
|
}
|
|
case 189:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:865
|
|
{
|
|
protoVAL.svcDecl = nil
|
|
}
|
|
case 190:
|
|
protoDollar = protoS[protopt-6 : protopt+1]
|
|
//line proto.y:869
|
|
{
|
|
protoVAL.mtd = ast.NewRPCNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id, protoDollar[3].rpcType, protoDollar[4].id.ToKeyword(), protoDollar[5].rpcType, protoDollar[6].b)
|
|
}
|
|
case 191:
|
|
protoDollar = protoS[protopt-8 : protopt+1]
|
|
//line proto.y:872
|
|
{
|
|
protoVAL.mtd = ast.NewRPCNodeWithBody(protoDollar[1].id.ToKeyword(), protoDollar[2].id, protoDollar[3].rpcType, protoDollar[4].id.ToKeyword(), protoDollar[5].rpcType, protoDollar[6].b, protoDollar[7].rpcDecls, protoDollar[8].b)
|
|
}
|
|
case 192:
|
|
protoDollar = protoS[protopt-4 : protopt+1]
|
|
//line proto.y:876
|
|
{
|
|
protoVAL.rpcType = ast.NewRPCTypeNode(protoDollar[1].b, protoDollar[2].id.ToKeyword(), protoDollar[3].tid, protoDollar[4].b)
|
|
}
|
|
case 193:
|
|
protoDollar = protoS[protopt-3 : protopt+1]
|
|
//line proto.y:879
|
|
{
|
|
protoVAL.rpcType = ast.NewRPCTypeNode(protoDollar[1].b, nil, protoDollar[2].tid, protoDollar[3].b)
|
|
}
|
|
case 194:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:883
|
|
{
|
|
if protoDollar[2].rpcDecl != nil {
|
|
protoVAL.rpcDecls = append(protoDollar[1].rpcDecls, protoDollar[2].rpcDecl)
|
|
} else {
|
|
protoVAL.rpcDecls = protoDollar[1].rpcDecls
|
|
}
|
|
}
|
|
case 195:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:890
|
|
{
|
|
if protoDollar[1].rpcDecl != nil {
|
|
protoVAL.rpcDecls = []ast.RPCElement{protoDollar[1].rpcDecl}
|
|
} else {
|
|
protoVAL.rpcDecls = nil
|
|
}
|
|
}
|
|
case 196:
|
|
protoDollar = protoS[protopt-0 : protopt+1]
|
|
//line proto.y:897
|
|
{
|
|
protoVAL.rpcDecls = nil
|
|
}
|
|
case 197:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:901
|
|
{
|
|
protoVAL.rpcDecl = protoDollar[1].opt
|
|
}
|
|
case 198:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:904
|
|
{
|
|
protoVAL.rpcDecl = ast.NewEmptyDeclNode(protoDollar[1].b)
|
|
}
|
|
case 199:
|
|
protoDollar = protoS[protopt-2 : protopt+1]
|
|
//line proto.y:907
|
|
{
|
|
protoVAL.rpcDecl = nil
|
|
}
|
|
case 200:
|
|
protoDollar = protoS[protopt-1 : protopt+1]
|
|
//line proto.y:910
|
|
{
|
|
protoVAL.rpcDecl = nil
|
|
}
|
|
}
|
|
goto protostack /* stack new state and value */
|
|
}
|