2021-08-24 16:22:14 -07:00
|
|
|
// Code generated by goyacc -o promql/parser/generated_parser.y.go promql/parser/generated_parser.y. DO NOT EDIT.
|
2019-12-05 08:16:12 -08:00
|
|
|
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:15
|
2020-02-03 08:23:44 -08:00
|
|
|
package parser
|
2019-12-05 08:16:12 -08:00
|
|
|
|
2021-01-20 02:57:39 -08:00
|
|
|
import __yyfmt__ "fmt"
|
|
|
|
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:15
|
2021-01-20 02:57:39 -08:00
|
|
|
|
2019-12-05 08:16:12 -08:00
|
|
|
import (
|
2019-12-21 00:44:12 -08:00
|
|
|
"math"
|
|
|
|
"strconv"
|
2020-01-08 03:04:47 -08:00
|
|
|
"time"
|
2019-12-16 08:38:18 -08:00
|
|
|
|
2021-11-08 06:23:17 -08:00
|
|
|
"github.com/prometheus/prometheus/model/labels"
|
|
|
|
"github.com/prometheus/prometheus/model/value"
|
2021-01-20 02:57:39 -08:00
|
|
|
)
|
2019-12-05 08:16:12 -08:00
|
|
|
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:28
|
2019-12-05 08:16:12 -08:00
|
|
|
type yySymType struct {
|
|
|
|
yys int
|
|
|
|
node Node
|
2019-12-09 11:03:31 -08:00
|
|
|
item Item
|
2019-12-05 08:16:12 -08:00
|
|
|
matchers []*labels.Matcher
|
|
|
|
matcher *labels.Matcher
|
2019-12-16 05:58:47 -08:00
|
|
|
label labels.Label
|
|
|
|
labels labels.Labels
|
2022-03-09 14:14:58 -08:00
|
|
|
lblList []labels.Label
|
2019-12-18 06:18:52 -08:00
|
|
|
strings []string
|
2020-02-03 08:45:41 -08:00
|
|
|
series []SequenceValue
|
2019-12-21 00:44:12 -08:00
|
|
|
uint uint64
|
|
|
|
float float64
|
2020-01-08 03:04:47 -08:00
|
|
|
duration time.Duration
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
|
|
|
|
2021-10-22 01:06:44 -07:00
|
|
|
const (
|
|
|
|
EQL = 57346
|
|
|
|
BLANK = 57347
|
|
|
|
COLON = 57348
|
|
|
|
COMMA = 57349
|
|
|
|
COMMENT = 57350
|
|
|
|
DURATION = 57351
|
|
|
|
EOF = 57352
|
|
|
|
ERROR = 57353
|
|
|
|
IDENTIFIER = 57354
|
|
|
|
LEFT_BRACE = 57355
|
|
|
|
LEFT_BRACKET = 57356
|
|
|
|
LEFT_PAREN = 57357
|
|
|
|
METRIC_IDENTIFIER = 57358
|
|
|
|
NUMBER = 57359
|
|
|
|
RIGHT_BRACE = 57360
|
|
|
|
RIGHT_BRACKET = 57361
|
|
|
|
RIGHT_PAREN = 57362
|
|
|
|
SEMICOLON = 57363
|
|
|
|
SPACE = 57364
|
|
|
|
STRING = 57365
|
|
|
|
TIMES = 57366
|
|
|
|
operatorsStart = 57367
|
|
|
|
ADD = 57368
|
|
|
|
DIV = 57369
|
|
|
|
EQLC = 57370
|
|
|
|
EQL_REGEX = 57371
|
|
|
|
GTE = 57372
|
|
|
|
GTR = 57373
|
|
|
|
LAND = 57374
|
|
|
|
LOR = 57375
|
|
|
|
LSS = 57376
|
|
|
|
LTE = 57377
|
|
|
|
LUNLESS = 57378
|
|
|
|
MOD = 57379
|
|
|
|
MUL = 57380
|
|
|
|
NEQ = 57381
|
|
|
|
NEQ_REGEX = 57382
|
|
|
|
POW = 57383
|
|
|
|
SUB = 57384
|
|
|
|
AT = 57385
|
|
|
|
ATAN2 = 57386
|
|
|
|
operatorsEnd = 57387
|
|
|
|
aggregatorsStart = 57388
|
|
|
|
AVG = 57389
|
|
|
|
BOTTOMK = 57390
|
|
|
|
COUNT = 57391
|
|
|
|
COUNT_VALUES = 57392
|
|
|
|
GROUP = 57393
|
|
|
|
MAX = 57394
|
|
|
|
MIN = 57395
|
|
|
|
QUANTILE = 57396
|
|
|
|
STDDEV = 57397
|
|
|
|
STDVAR = 57398
|
|
|
|
SUM = 57399
|
|
|
|
TOPK = 57400
|
|
|
|
aggregatorsEnd = 57401
|
|
|
|
keywordsStart = 57402
|
|
|
|
BOOL = 57403
|
|
|
|
BY = 57404
|
|
|
|
GROUP_LEFT = 57405
|
|
|
|
GROUP_RIGHT = 57406
|
|
|
|
IGNORING = 57407
|
|
|
|
OFFSET = 57408
|
|
|
|
ON = 57409
|
|
|
|
WITHOUT = 57410
|
|
|
|
keywordsEnd = 57411
|
|
|
|
preprocessorStart = 57412
|
|
|
|
START = 57413
|
|
|
|
END = 57414
|
|
|
|
preprocessorEnd = 57415
|
|
|
|
startSymbolsStart = 57416
|
|
|
|
START_METRIC = 57417
|
|
|
|
START_SERIES_DESCRIPTION = 57418
|
|
|
|
START_EXPRESSION = 57419
|
|
|
|
START_METRIC_SELECTOR = 57420
|
|
|
|
startSymbolsEnd = 57421
|
|
|
|
)
|
2019-12-05 08:16:12 -08:00
|
|
|
|
|
|
|
var yyToknames = [...]string{
|
|
|
|
"$end",
|
|
|
|
"error",
|
|
|
|
"$unk",
|
2020-09-09 03:10:02 -07:00
|
|
|
"EQL",
|
2020-01-08 03:04:47 -08:00
|
|
|
"BLANK",
|
|
|
|
"COLON",
|
|
|
|
"COMMA",
|
2019-12-05 08:16:12 -08:00
|
|
|
"COMMENT",
|
2020-01-08 03:04:47 -08:00
|
|
|
"DURATION",
|
|
|
|
"EOF",
|
|
|
|
"ERROR",
|
2019-12-05 08:16:12 -08:00
|
|
|
"IDENTIFIER",
|
|
|
|
"LEFT_BRACE",
|
|
|
|
"LEFT_BRACKET",
|
2020-01-08 03:04:47 -08:00
|
|
|
"LEFT_PAREN",
|
|
|
|
"METRIC_IDENTIFIER",
|
|
|
|
"NUMBER",
|
|
|
|
"RIGHT_BRACE",
|
2019-12-05 08:16:12 -08:00
|
|
|
"RIGHT_BRACKET",
|
2020-01-08 03:04:47 -08:00
|
|
|
"RIGHT_PAREN",
|
2019-12-05 08:16:12 -08:00
|
|
|
"SEMICOLON",
|
2020-01-08 03:04:47 -08:00
|
|
|
"SPACE",
|
2019-12-05 08:16:12 -08:00
|
|
|
"STRING",
|
|
|
|
"TIMES",
|
|
|
|
"operatorsStart",
|
|
|
|
"ADD",
|
|
|
|
"DIV",
|
2020-09-09 03:10:02 -07:00
|
|
|
"EQLC",
|
2020-01-08 03:04:47 -08:00
|
|
|
"EQL_REGEX",
|
|
|
|
"GTE",
|
|
|
|
"GTR",
|
2019-12-05 08:16:12 -08:00
|
|
|
"LAND",
|
|
|
|
"LOR",
|
2020-01-08 03:04:47 -08:00
|
|
|
"LSS",
|
|
|
|
"LTE",
|
2019-12-05 08:16:12 -08:00
|
|
|
"LUNLESS",
|
2020-01-08 03:04:47 -08:00
|
|
|
"MOD",
|
|
|
|
"MUL",
|
2019-12-05 08:16:12 -08:00
|
|
|
"NEQ",
|
|
|
|
"NEQ_REGEX",
|
|
|
|
"POW",
|
2020-01-08 03:04:47 -08:00
|
|
|
"SUB",
|
2021-01-20 02:57:39 -08:00
|
|
|
"AT",
|
2021-08-24 16:22:14 -07:00
|
|
|
"ATAN2",
|
2019-12-05 08:16:12 -08:00
|
|
|
"operatorsEnd",
|
|
|
|
"aggregatorsStart",
|
|
|
|
"AVG",
|
2020-01-08 03:04:47 -08:00
|
|
|
"BOTTOMK",
|
2019-12-05 08:16:12 -08:00
|
|
|
"COUNT",
|
2020-01-08 03:04:47 -08:00
|
|
|
"COUNT_VALUES",
|
2020-06-30 07:51:18 -07:00
|
|
|
"GROUP",
|
2019-12-05 08:16:12 -08:00
|
|
|
"MAX",
|
2020-01-08 03:04:47 -08:00
|
|
|
"MIN",
|
|
|
|
"QUANTILE",
|
2019-12-05 08:16:12 -08:00
|
|
|
"STDDEV",
|
|
|
|
"STDVAR",
|
2020-01-08 03:04:47 -08:00
|
|
|
"SUM",
|
2019-12-05 08:16:12 -08:00
|
|
|
"TOPK",
|
|
|
|
"aggregatorsEnd",
|
|
|
|
"keywordsStart",
|
2020-01-08 03:04:47 -08:00
|
|
|
"BOOL",
|
2019-12-05 08:16:12 -08:00
|
|
|
"BY",
|
|
|
|
"GROUP_LEFT",
|
|
|
|
"GROUP_RIGHT",
|
2020-01-08 03:04:47 -08:00
|
|
|
"IGNORING",
|
|
|
|
"OFFSET",
|
|
|
|
"ON",
|
|
|
|
"WITHOUT",
|
2019-12-05 08:16:12 -08:00
|
|
|
"keywordsEnd",
|
2021-02-09 08:03:16 -08:00
|
|
|
"preprocessorStart",
|
|
|
|
"START",
|
|
|
|
"END",
|
|
|
|
"preprocessorEnd",
|
2019-12-05 08:16:12 -08:00
|
|
|
"startSymbolsStart",
|
2019-12-16 08:38:18 -08:00
|
|
|
"START_METRIC",
|
2019-12-21 00:44:12 -08:00
|
|
|
"START_SERIES_DESCRIPTION",
|
2020-01-08 03:04:47 -08:00
|
|
|
"START_EXPRESSION",
|
|
|
|
"START_METRIC_SELECTOR",
|
2019-12-05 08:16:12 -08:00
|
|
|
"startSymbolsEnd",
|
|
|
|
}
|
2021-02-16 17:49:00 -08:00
|
|
|
|
2019-12-05 08:16:12 -08:00
|
|
|
var yyStatenames = [...]string{}
|
|
|
|
|
2021-10-22 01:06:44 -07:00
|
|
|
const (
|
|
|
|
yyEofCode = 1
|
|
|
|
yyErrCode = 2
|
|
|
|
yyInitialStackSize = 16
|
|
|
|
)
|
2019-12-05 08:16:12 -08:00
|
|
|
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:749
|
2019-12-05 08:16:12 -08:00
|
|
|
|
|
|
|
//line yacctab:1
|
|
|
|
var yyExca = [...]int{
|
|
|
|
-1, 1,
|
|
|
|
1, -1,
|
|
|
|
-2, 0,
|
2021-08-12 09:38:06 -07:00
|
|
|
-1, 35,
|
2021-08-24 16:22:14 -07:00
|
|
|
1, 131,
|
|
|
|
10, 131,
|
|
|
|
22, 131,
|
2020-01-08 03:04:47 -08:00
|
|
|
-2, 0,
|
2021-02-16 17:49:00 -08:00
|
|
|
-1, 58,
|
2020-06-30 07:51:18 -07:00
|
|
|
2, 143,
|
|
|
|
15, 143,
|
2021-08-24 16:22:14 -07:00
|
|
|
62, 143,
|
|
|
|
68, 143,
|
2021-08-12 09:38:06 -07:00
|
|
|
-2, 97,
|
2021-08-24 16:22:14 -07:00
|
|
|
-1, 59,
|
2020-07-08 03:58:12 -07:00
|
|
|
2, 144,
|
|
|
|
15, 144,
|
2021-08-24 16:22:14 -07:00
|
|
|
62, 144,
|
|
|
|
68, 144,
|
|
|
|
-2, 98,
|
|
|
|
-1, 60,
|
2021-01-20 02:57:39 -08:00
|
|
|
2, 145,
|
|
|
|
15, 145,
|
2021-08-24 16:22:14 -07:00
|
|
|
62, 145,
|
|
|
|
68, 145,
|
2021-08-12 09:38:06 -07:00
|
|
|
-2, 100,
|
2021-08-24 16:22:14 -07:00
|
|
|
-1, 61,
|
2021-01-20 02:57:39 -08:00
|
|
|
2, 146,
|
|
|
|
15, 146,
|
2021-08-24 16:22:14 -07:00
|
|
|
62, 146,
|
|
|
|
68, 146,
|
2021-08-12 09:38:06 -07:00
|
|
|
-2, 101,
|
2021-08-24 16:22:14 -07:00
|
|
|
-1, 62,
|
2021-01-20 02:57:39 -08:00
|
|
|
2, 147,
|
|
|
|
15, 147,
|
2021-08-24 16:22:14 -07:00
|
|
|
62, 147,
|
|
|
|
68, 147,
|
|
|
|
-2, 102,
|
|
|
|
-1, 63,
|
2021-02-09 08:03:16 -08:00
|
|
|
2, 148,
|
|
|
|
15, 148,
|
2021-08-24 16:22:14 -07:00
|
|
|
62, 148,
|
|
|
|
68, 148,
|
|
|
|
-2, 107,
|
|
|
|
-1, 64,
|
2021-02-09 08:03:16 -08:00
|
|
|
2, 149,
|
|
|
|
15, 149,
|
2021-08-24 16:22:14 -07:00
|
|
|
62, 149,
|
|
|
|
68, 149,
|
|
|
|
-2, 109,
|
|
|
|
-1, 65,
|
2021-02-09 08:03:16 -08:00
|
|
|
2, 150,
|
|
|
|
15, 150,
|
2021-08-24 16:22:14 -07:00
|
|
|
62, 150,
|
|
|
|
68, 150,
|
2021-08-12 09:38:06 -07:00
|
|
|
-2, 111,
|
2021-08-24 16:22:14 -07:00
|
|
|
-1, 66,
|
2021-02-16 17:49:00 -08:00
|
|
|
2, 151,
|
|
|
|
15, 151,
|
2021-08-24 16:22:14 -07:00
|
|
|
62, 151,
|
|
|
|
68, 151,
|
2021-08-12 09:38:06 -07:00
|
|
|
-2, 112,
|
2021-08-24 16:22:14 -07:00
|
|
|
-1, 67,
|
2021-08-12 09:38:06 -07:00
|
|
|
2, 152,
|
|
|
|
15, 152,
|
2021-08-24 16:22:14 -07:00
|
|
|
62, 152,
|
|
|
|
68, 152,
|
2021-08-12 09:38:06 -07:00
|
|
|
-2, 113,
|
2021-08-24 16:22:14 -07:00
|
|
|
-1, 68,
|
2021-08-12 09:38:06 -07:00
|
|
|
2, 153,
|
|
|
|
15, 153,
|
2021-08-24 16:22:14 -07:00
|
|
|
62, 153,
|
|
|
|
68, 153,
|
2021-02-16 17:49:00 -08:00
|
|
|
-2, 114,
|
2021-08-24 16:22:14 -07:00
|
|
|
-1, 69,
|
|
|
|
2, 154,
|
|
|
|
15, 154,
|
|
|
|
62, 154,
|
|
|
|
68, 154,
|
|
|
|
-2, 115,
|
|
|
|
-1, 190,
|
2021-08-25 03:51:12 -07:00
|
|
|
12, 199,
|
|
|
|
13, 199,
|
|
|
|
16, 199,
|
|
|
|
17, 199,
|
|
|
|
23, 199,
|
|
|
|
26, 199,
|
|
|
|
32, 199,
|
|
|
|
33, 199,
|
|
|
|
36, 199,
|
|
|
|
42, 199,
|
|
|
|
47, 199,
|
|
|
|
48, 199,
|
|
|
|
49, 199,
|
|
|
|
50, 199,
|
|
|
|
51, 199,
|
|
|
|
52, 199,
|
|
|
|
53, 199,
|
|
|
|
54, 199,
|
|
|
|
55, 199,
|
|
|
|
56, 199,
|
|
|
|
57, 199,
|
|
|
|
58, 199,
|
|
|
|
62, 199,
|
|
|
|
66, 199,
|
|
|
|
68, 199,
|
|
|
|
71, 199,
|
|
|
|
72, 199,
|
2020-01-08 03:04:47 -08:00
|
|
|
-2, 0,
|
2021-08-24 16:22:14 -07:00
|
|
|
-1, 191,
|
2021-08-25 03:51:12 -07:00
|
|
|
12, 199,
|
|
|
|
13, 199,
|
|
|
|
16, 199,
|
|
|
|
17, 199,
|
|
|
|
23, 199,
|
|
|
|
26, 199,
|
|
|
|
32, 199,
|
|
|
|
33, 199,
|
|
|
|
36, 199,
|
|
|
|
42, 199,
|
|
|
|
47, 199,
|
|
|
|
48, 199,
|
|
|
|
49, 199,
|
|
|
|
50, 199,
|
|
|
|
51, 199,
|
|
|
|
52, 199,
|
|
|
|
53, 199,
|
|
|
|
54, 199,
|
|
|
|
55, 199,
|
|
|
|
56, 199,
|
|
|
|
57, 199,
|
|
|
|
58, 199,
|
|
|
|
62, 199,
|
|
|
|
66, 199,
|
|
|
|
68, 199,
|
|
|
|
71, 199,
|
|
|
|
72, 199,
|
2020-07-08 03:58:12 -07:00
|
|
|
-2, 0,
|
2021-08-24 16:22:14 -07:00
|
|
|
-1, 212,
|
|
|
|
19, 197,
|
|
|
|
-2, 0,
|
2021-08-25 03:51:12 -07:00
|
|
|
-1, 262,
|
|
|
|
19, 198,
|
|
|
|
-2, 0,
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
const yyPrivate = 57344
|
|
|
|
|
2021-08-25 03:51:12 -07:00
|
|
|
const yyLast = 659
|
2019-12-05 08:16:12 -08:00
|
|
|
|
|
|
|
var yyAct = [...]int{
|
2021-08-25 03:51:12 -07:00
|
|
|
268, 37, 216, 142, 258, 257, 150, 113, 77, 102,
|
|
|
|
101, 104, 188, 271, 189, 190, 191, 105, 6, 126,
|
|
|
|
218, 57, 253, 149, 154, 252, 251, 266, 180, 121,
|
|
|
|
228, 260, 265, 272, 234, 103, 269, 144, 274, 247,
|
|
|
|
155, 72, 213, 162, 145, 264, 212, 250, 106, 179,
|
|
|
|
230, 231, 246, 153, 232, 108, 161, 109, 208, 211,
|
|
|
|
106, 107, 245, 33, 122, 219, 221, 223, 224, 225,
|
|
|
|
233, 235, 238, 239, 240, 241, 242, 143, 110, 220,
|
|
|
|
222, 226, 227, 229, 236, 237, 115, 79, 7, 243,
|
|
|
|
244, 2, 3, 4, 5, 104, 114, 78, 145, 263,
|
|
|
|
170, 105, 248, 177, 156, 169, 145, 118, 166, 160,
|
|
|
|
163, 158, 117, 159, 157, 10, 168, 100, 120, 273,
|
|
|
|
119, 145, 81, 116, 187, 74, 178, 34, 186, 192,
|
2021-08-24 16:22:14 -07:00
|
|
|
193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
|
|
|
|
203, 204, 205, 206, 96, 185, 99, 207, 127, 128,
|
|
|
|
129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
|
2021-08-25 03:51:12 -07:00
|
|
|
139, 140, 141, 182, 56, 1, 115, 9, 9, 98,
|
|
|
|
184, 148, 172, 218, 173, 153, 114, 249, 209, 210,
|
|
|
|
261, 8, 112, 228, 154, 35, 153, 234, 47, 46,
|
|
|
|
254, 215, 79, 255, 256, 154, 45, 259, 44, 175,
|
|
|
|
155, 125, 78, 230, 231, 43, 48, 232, 76, 174,
|
|
|
|
176, 155, 73, 42, 41, 245, 262, 123, 219, 221,
|
|
|
|
223, 224, 225, 233, 235, 238, 239, 240, 241, 242,
|
|
|
|
164, 40, 220, 222, 226, 227, 229, 236, 237, 124,
|
|
|
|
151, 152, 243, 244, 39, 38, 49, 146, 183, 267,
|
|
|
|
80, 181, 214, 75, 270, 51, 72, 147, 53, 22,
|
|
|
|
52, 55, 217, 165, 171, 50, 54, 111, 275, 70,
|
|
|
|
0, 0, 276, 0, 0, 18, 19, 0, 0, 20,
|
|
|
|
0, 0, 0, 0, 0, 71, 0, 0, 0, 0,
|
|
|
|
58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
|
|
|
|
68, 69, 0, 0, 0, 13, 0, 0, 0, 24,
|
|
|
|
0, 30, 0, 0, 31, 32, 36, 100, 51, 72,
|
|
|
|
0, 53, 22, 52, 0, 0, 0, 0, 0, 54,
|
|
|
|
84, 0, 70, 0, 0, 0, 0, 0, 18, 19,
|
|
|
|
93, 94, 20, 0, 96, 0, 99, 83, 71, 0,
|
|
|
|
0, 0, 0, 58, 59, 60, 61, 62, 63, 64,
|
|
|
|
65, 66, 67, 68, 69, 0, 0, 0, 13, 98,
|
|
|
|
0, 0, 24, 0, 30, 0, 0, 31, 32, 51,
|
|
|
|
72, 0, 53, 22, 52, 0, 0, 0, 0, 0,
|
|
|
|
54, 0, 0, 70, 0, 0, 0, 0, 0, 18,
|
|
|
|
19, 0, 0, 20, 0, 0, 17, 72, 0, 71,
|
|
|
|
22, 0, 0, 0, 58, 59, 60, 61, 62, 63,
|
|
|
|
64, 65, 66, 67, 68, 69, 18, 19, 0, 13,
|
|
|
|
20, 0, 0, 24, 0, 30, 0, 0, 31, 32,
|
2021-08-24 16:22:14 -07:00
|
|
|
0, 11, 12, 14, 15, 16, 21, 23, 25, 26,
|
2021-08-25 03:51:12 -07:00
|
|
|
27, 28, 29, 17, 33, 0, 13, 22, 0, 0,
|
|
|
|
24, 0, 30, 0, 0, 31, 32, 0, 0, 0,
|
|
|
|
0, 0, 0, 18, 19, 0, 0, 20, 0, 0,
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 11, 12,
|
2021-08-24 16:22:14 -07:00
|
|
|
14, 15, 16, 21, 23, 25, 26, 27, 28, 29,
|
|
|
|
0, 0, 100, 13, 0, 0, 0, 24, 167, 30,
|
|
|
|
0, 0, 31, 32, 82, 84, 85, 0, 86, 87,
|
|
|
|
88, 89, 90, 91, 92, 93, 94, 95, 100, 96,
|
|
|
|
97, 99, 83, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
82, 84, 85, 0, 86, 87, 88, 89, 90, 91,
|
|
|
|
92, 93, 94, 95, 98, 96, 97, 99, 83, 0,
|
|
|
|
0, 100, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
0, 0, 0, 82, 84, 85, 0, 86, 87, 88,
|
|
|
|
98, 90, 91, 92, 93, 94, 95, 100, 96, 97,
|
|
|
|
99, 83, 0, 0, 0, 0, 0, 0, 0, 82,
|
|
|
|
84, 85, 0, 86, 87, 0, 100, 90, 91, 0,
|
|
|
|
93, 94, 95, 98, 96, 97, 99, 83, 82, 84,
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 93,
|
|
|
|
94, 0, 0, 96, 97, 99, 83, 0, 0, 98,
|
2020-07-08 03:58:12 -07:00
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
2021-08-24 16:22:14 -07:00
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 98,
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
|
|
|
|
2021-02-16 17:49:00 -08:00
|
|
|
var yyPact = [...]int{
|
2021-08-25 03:51:12 -07:00
|
|
|
16, 78, 441, 441, 306, 394, -1000, -1000, -1000, 50,
|
2020-06-30 07:51:18 -07:00
|
|
|
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
2019-12-21 00:44:12 -08:00
|
|
|
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
2021-08-25 03:51:12 -07:00
|
|
|
-1000, -1000, -1000, 190, -1000, 120, -1000, 514, -1000, -1000,
|
2019-12-18 06:18:52 -08:00
|
|
|
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
2021-08-25 03:51:12 -07:00
|
|
|
33, 45, -1000, 367, -1000, 367, 28, -1000, -1000, -1000,
|
2019-12-18 06:18:52 -08:00
|
|
|
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
2021-08-25 03:51:12 -07:00
|
|
|
-1000, -1000, 164, -1000, -1000, 105, -1000, -1000, 116, -1000,
|
|
|
|
7, -1000, -42, -42, -42, -42, -42, -42, -42, -42,
|
|
|
|
-42, -42, -42, -42, -42, -42, -42, -42, 35, 169,
|
|
|
|
112, 45, -51, -1000, 41, 41, 243, -1000, 488, 103,
|
|
|
|
-1000, 98, -1000, -1000, 170, -1000, -1000, 85, -1000, 26,
|
|
|
|
-1000, 158, 367, -1000, -53, -48, -1000, 367, 367, 367,
|
|
|
|
367, 367, 367, 367, 367, 367, 367, 367, 367, 367,
|
|
|
|
367, 367, -1000, 89, -1000, -1000, -1000, 43, -1000, -1000,
|
|
|
|
-1000, -1000, -1000, -1000, 36, 36, 40, -1000, -1000, -1000,
|
|
|
|
-1000, 171, -1000, -1000, 32, -1000, 514, -1000, -1000, 84,
|
|
|
|
-1000, 24, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
|
|
|
-1000, -1000, 1, -2, -1000, -1000, -1000, 303, 41, 41,
|
|
|
|
41, 41, 103, 103, 592, 592, 592, 573, 547, 592,
|
|
|
|
592, 573, 103, 103, 592, 103, 303, -1000, 11, -1000,
|
|
|
|
-1000, -1000, 97, -1000, 25, -1000, -1000, -1000, -1000, -1000,
|
2021-01-20 02:57:39 -08:00
|
|
|
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
2021-08-12 09:38:06 -07:00
|
|
|
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
2021-08-25 03:51:12 -07:00
|
|
|
-1000, -1000, -1000, -1000, -1000, -1000, -1000, 367, -1000, -1000,
|
|
|
|
-1000, -1000, 19, 19, -11, -1000, -1000, -1000, -1000, -1000,
|
|
|
|
-1000, 14, 117, -1000, -1000, 18, -1000, 514, -1000, -1000,
|
|
|
|
-1000, 19, -1000, -1000, -1000, -1000, -1000,
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
|
|
|
|
2021-02-16 17:49:00 -08:00
|
|
|
var yyPgo = [...]int{
|
2021-08-25 03:51:12 -07:00
|
|
|
0, 267, 7, 265, 2, 264, 262, 164, 261, 257,
|
2022-03-09 14:14:58 -08:00
|
|
|
115, 181, 253, 8, 252, 4, 5, 251, 250, 0,
|
2021-08-25 03:51:12 -07:00
|
|
|
23, 248, 6, 247, 246, 245, 10, 64, 244, 239,
|
|
|
|
1, 231, 230, 9, 217, 21, 214, 213, 205, 201,
|
|
|
|
198, 196, 189, 188, 206, 3, 180, 165, 127,
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
|
|
|
|
2021-02-16 17:49:00 -08:00
|
|
|
var yyR1 = [...]int{
|
2021-02-09 08:03:16 -08:00
|
|
|
0, 47, 47, 47, 47, 47, 47, 47, 30, 30,
|
|
|
|
30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
|
|
|
|
25, 25, 25, 25, 26, 26, 28, 28, 28, 28,
|
|
|
|
28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
|
2021-08-24 16:22:14 -07:00
|
|
|
28, 28, 27, 29, 29, 39, 39, 34, 34, 34,
|
|
|
|
34, 15, 15, 15, 15, 14, 14, 14, 4, 4,
|
|
|
|
31, 33, 33, 32, 32, 32, 40, 38, 38, 38,
|
|
|
|
24, 24, 24, 9, 9, 36, 42, 42, 42, 42,
|
|
|
|
42, 43, 44, 44, 44, 35, 35, 35, 1, 1,
|
2022-03-09 14:14:58 -08:00
|
|
|
1, 2, 2, 2, 2, 11, 11, 7, 7, 7,
|
2020-03-05 05:20:53 -08:00
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
2021-08-24 16:22:14 -07:00
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 10,
|
2022-03-09 14:14:58 -08:00
|
|
|
10, 10, 10, 12, 12, 12, 13, 13, 13, 13,
|
2021-08-24 16:22:14 -07:00
|
|
|
48, 18, 18, 18, 18, 17, 17, 17, 17, 17,
|
|
|
|
21, 21, 21, 3, 3, 3, 3, 3, 3, 3,
|
|
|
|
3, 3, 3, 3, 3, 6, 6, 6, 6, 6,
|
2021-08-12 09:38:06 -07:00
|
|
|
6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
|
2021-01-20 02:57:39 -08:00
|
|
|
6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
|
2021-08-25 03:51:12 -07:00
|
|
|
6, 6, 8, 8, 5, 5, 5, 5, 37, 20,
|
|
|
|
22, 22, 23, 23, 19, 45, 41, 46, 46, 16,
|
|
|
|
16,
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
|
|
|
|
2021-02-16 17:49:00 -08:00
|
|
|
var yyR2 = [...]int{
|
2020-01-08 03:04:47 -08:00
|
|
|
0, 2, 2, 2, 2, 2, 2, 1, 1, 1,
|
2021-01-20 02:57:39 -08:00
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
|
|
3, 3, 2, 2, 2, 2, 4, 4, 4, 4,
|
2020-01-08 03:04:47 -08:00
|
|
|
4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
2021-08-24 16:22:14 -07:00
|
|
|
4, 4, 1, 0, 1, 3, 3, 1, 1, 3,
|
|
|
|
3, 3, 4, 2, 1, 3, 1, 2, 1, 1,
|
|
|
|
2, 3, 2, 3, 1, 2, 3, 3, 4, 3,
|
|
|
|
3, 5, 3, 1, 1, 4, 6, 6, 5, 4,
|
|
|
|
3, 2, 2, 1, 1, 3, 4, 2, 3, 1,
|
|
|
|
2, 3, 3, 2, 1, 2, 1, 1, 1, 1,
|
2020-03-05 05:20:53 -08:00
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
2021-08-24 16:22:14 -07:00
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
|
|
|
|
4, 2, 0, 3, 1, 2, 3, 3, 2, 1,
|
|
|
|
2, 0, 3, 2, 1, 1, 3, 1, 3, 4,
|
2020-03-05 05:20:53 -08:00
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
2019-12-18 06:18:52 -08:00
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
2020-01-08 03:04:47 -08:00
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
2021-08-25 03:51:12 -07:00
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
|
|
2, 2, 1, 1, 1, 1, 1, 0, 1, 0,
|
|
|
|
1,
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
|
|
|
|
2021-02-16 17:49:00 -08:00
|
|
|
var yyChk = [...]int{
|
2022-03-09 14:14:58 -08:00
|
|
|
-1000, -47, 75, 76, 77, 78, 2, 10, -11, -7,
|
2021-08-24 16:22:14 -07:00
|
|
|
-10, 47, 48, 62, 49, 50, 51, 12, 32, 33,
|
|
|
|
36, 52, 16, 53, 66, 54, 55, 56, 57, 58,
|
2022-03-09 14:14:58 -08:00
|
|
|
68, 71, 72, 13, -48, -11, 10, -30, -25, -28,
|
2021-08-12 09:38:06 -07:00
|
|
|
-31, -36, -37, -38, -40, -41, -42, -43, -44, -24,
|
2021-08-24 16:22:14 -07:00
|
|
|
-3, 12, 17, 15, 23, -8, -7, -35, 47, 48,
|
|
|
|
49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
|
2022-03-09 14:14:58 -08:00
|
|
|
26, 42, 13, -44, -10, -12, 18, -13, 12, 2,
|
2021-08-24 16:22:14 -07:00
|
|
|
-18, 2, 26, 44, 27, 28, 30, 31, 32, 33,
|
|
|
|
34, 35, 36, 37, 38, 39, 41, 42, 66, 43,
|
|
|
|
14, -26, -33, 2, 62, 68, 15, -33, -30, -30,
|
|
|
|
-35, -1, 18, -2, 12, 2, 18, 7, 2, 4,
|
|
|
|
2, 22, -27, -34, -29, -39, 61, -27, -27, -27,
|
2021-08-12 09:38:06 -07:00
|
|
|
-27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
|
2021-08-24 16:22:14 -07:00
|
|
|
-27, -27, -45, 42, 2, 9, -23, -9, 2, -20,
|
|
|
|
-22, 71, 72, 17, 26, 42, -45, 2, -33, -26,
|
|
|
|
-15, 15, 2, -15, -32, 20, -30, 20, 18, 7,
|
|
|
|
2, -5, 2, 4, 39, 29, 40, 18, -13, 23,
|
|
|
|
2, -17, 5, -21, 12, -20, -22, -30, 65, 67,
|
|
|
|
63, 64, -30, -30, -30, -30, -30, -30, -30, -30,
|
|
|
|
-30, -30, -30, -30, -30, -30, -30, -45, 15, -20,
|
|
|
|
-20, 19, 6, 2, -14, 20, -4, -6, 2, 47,
|
|
|
|
61, 48, 62, 49, 50, 51, 63, 64, 12, 65,
|
|
|
|
32, 33, 36, 52, 16, 53, 66, 67, 54, 55,
|
2021-08-25 03:51:12 -07:00
|
|
|
56, 57, 58, 71, 72, 44, 20, 7, 18, -2,
|
|
|
|
23, 2, 24, 24, -22, -15, -15, -16, -15, -16,
|
|
|
|
20, -46, -45, 2, 20, 7, 2, -30, -19, 17,
|
|
|
|
-19, 24, 19, 2, 20, -4, -19,
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
|
|
|
|
2021-02-16 17:49:00 -08:00
|
|
|
var yyDef = [...]int{
|
2021-08-24 16:22:14 -07:00
|
|
|
0, -2, 122, 122, 0, 0, 7, 6, 1, 122,
|
|
|
|
96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
|
|
|
|
106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
|
|
|
|
116, 117, 118, 0, 2, -2, 3, 4, 8, 9,
|
2021-08-12 09:38:06 -07:00
|
|
|
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
|
2021-08-25 03:51:12 -07:00
|
|
|
0, 103, 188, 0, 196, 0, 83, 84, -2, -2,
|
2021-08-12 09:38:06 -07:00
|
|
|
-2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
2021-08-25 03:51:12 -07:00
|
|
|
182, 183, 0, 5, 95, 0, 121, 124, 0, 129,
|
2021-08-24 16:22:14 -07:00
|
|
|
130, 134, 43, 43, 43, 43, 43, 43, 43, 43,
|
|
|
|
43, 43, 43, 43, 43, 43, 43, 43, 0, 0,
|
|
|
|
0, 0, 22, 23, 0, 0, 0, 60, 0, 81,
|
|
|
|
82, 0, 87, 89, 0, 94, 119, 0, 125, 0,
|
|
|
|
128, 133, 0, 42, 47, 48, 44, 0, 0, 0,
|
2021-08-12 09:38:06 -07:00
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
2021-08-25 03:51:12 -07:00
|
|
|
0, 0, 67, 0, 69, 195, 70, 0, 72, 192,
|
|
|
|
193, 73, 74, 189, 0, 0, 0, 80, 20, 21,
|
2021-08-24 16:22:14 -07:00
|
|
|
24, 0, 54, 25, 0, 62, 64, 66, 85, 0,
|
2021-08-25 03:51:12 -07:00
|
|
|
90, 0, 93, 184, 185, 186, 187, 120, 123, 126,
|
2021-08-24 16:22:14 -07:00
|
|
|
127, 132, 135, 137, 140, 141, 142, 26, 0, 0,
|
|
|
|
-2, -2, 27, 28, 29, 30, 31, 32, 33, 34,
|
2021-08-25 03:51:12 -07:00
|
|
|
35, 36, 37, 38, 39, 40, 41, 68, 0, 190,
|
|
|
|
191, 75, -2, 79, 0, 53, 56, 58, 59, 155,
|
2021-08-24 16:22:14 -07:00
|
|
|
156, 157, 158, 159, 160, 161, 162, 163, 164, 165,
|
|
|
|
166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
|
2021-08-25 03:51:12 -07:00
|
|
|
176, 177, 178, 179, 180, 181, 61, 65, 86, 88,
|
|
|
|
91, 92, 0, 0, 0, 45, 46, 49, 200, 50,
|
|
|
|
71, 0, -2, 78, 51, 0, 57, 63, 136, 194,
|
|
|
|
138, 0, 76, 77, 52, 55, 139,
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
|
|
|
|
2021-02-16 17:49:00 -08:00
|
|
|
var yyTok1 = [...]int{
|
2019-12-05 08:16:12 -08:00
|
|
|
1,
|
|
|
|
}
|
|
|
|
|
2021-02-16 17:49:00 -08:00
|
|
|
var yyTok2 = [...]int{
|
2019-12-05 08:16:12 -08:00
|
|
|
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, 51,
|
|
|
|
52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
|
2019-12-16 08:38:18 -08:00
|
|
|
62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
|
2021-08-24 16:22:14 -07:00
|
|
|
72, 73, 74, 75, 76, 77, 78, 79,
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
2021-02-16 17:49:00 -08:00
|
|
|
|
2019-12-05 08:16:12 -08:00
|
|
|
var yyTok3 = [...]int{
|
|
|
|
0,
|
|
|
|
}
|
|
|
|
|
|
|
|
var yyErrorMessages = [...]struct {
|
|
|
|
state int
|
|
|
|
token int
|
|
|
|
msg string
|
|
|
|
}{}
|
|
|
|
|
|
|
|
//line yaccpar:1
|
|
|
|
|
|
|
|
/* parser for yacc output */
|
|
|
|
|
|
|
|
var (
|
|
|
|
yyDebug = 0
|
|
|
|
yyErrorVerbose = false
|
|
|
|
)
|
|
|
|
|
|
|
|
type yyLexer interface {
|
|
|
|
Lex(lval *yySymType) int
|
|
|
|
Error(s string)
|
|
|
|
}
|
|
|
|
|
|
|
|
type yyParser interface {
|
|
|
|
Parse(yyLexer) int
|
|
|
|
Lookahead() int
|
|
|
|
}
|
|
|
|
|
|
|
|
type yyParserImpl struct {
|
|
|
|
lval yySymType
|
|
|
|
stack [yyInitialStackSize]yySymType
|
|
|
|
char int
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *yyParserImpl) Lookahead() int {
|
|
|
|
return p.char
|
|
|
|
}
|
|
|
|
|
|
|
|
func yyNewParser() yyParser {
|
|
|
|
return &yyParserImpl{}
|
|
|
|
}
|
|
|
|
|
|
|
|
const yyFlag = -1000
|
|
|
|
|
|
|
|
func yyTokname(c int) string {
|
|
|
|
if c >= 1 && c-1 < len(yyToknames) {
|
|
|
|
if yyToknames[c-1] != "" {
|
|
|
|
return yyToknames[c-1]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return __yyfmt__.Sprintf("tok-%v", c)
|
|
|
|
}
|
|
|
|
|
|
|
|
func yyStatname(s int) string {
|
|
|
|
if s >= 0 && s < len(yyStatenames) {
|
|
|
|
if yyStatenames[s] != "" {
|
|
|
|
return yyStatenames[s]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return __yyfmt__.Sprintf("state-%v", s)
|
|
|
|
}
|
|
|
|
|
|
|
|
func yyErrorMessage(state, lookAhead int) string {
|
|
|
|
const TOKSTART = 4
|
|
|
|
|
|
|
|
if !yyErrorVerbose {
|
|
|
|
return "syntax error"
|
|
|
|
}
|
|
|
|
|
|
|
|
for _, e := range yyErrorMessages {
|
|
|
|
if e.state == state && e.token == lookAhead {
|
|
|
|
return "syntax error: " + e.msg
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
res := "syntax error: unexpected " + yyTokname(lookAhead)
|
|
|
|
|
|
|
|
// To match Bison, suggest at most four expected tokens.
|
|
|
|
expected := make([]int, 0, 4)
|
|
|
|
|
|
|
|
// Look for shiftable tokens.
|
|
|
|
base := yyPact[state]
|
|
|
|
for tok := TOKSTART; tok-1 < len(yyToknames); tok++ {
|
|
|
|
if n := base + tok; n >= 0 && n < yyLast && yyChk[yyAct[n]] == tok {
|
|
|
|
if len(expected) == cap(expected) {
|
|
|
|
return res
|
|
|
|
}
|
|
|
|
expected = append(expected, tok)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if yyDef[state] == -2 {
|
|
|
|
i := 0
|
|
|
|
for yyExca[i] != -1 || yyExca[i+1] != state {
|
|
|
|
i += 2
|
|
|
|
}
|
|
|
|
|
|
|
|
// Look for tokens that we accept or reduce.
|
|
|
|
for i += 2; yyExca[i] >= 0; i += 2 {
|
|
|
|
tok := yyExca[i]
|
|
|
|
if tok < TOKSTART || yyExca[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 yyExca[i+1] != 0 {
|
|
|
|
return res
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
for i, tok := range expected {
|
|
|
|
if i == 0 {
|
|
|
|
res += ", expecting "
|
|
|
|
} else {
|
|
|
|
res += " or "
|
|
|
|
}
|
|
|
|
res += yyTokname(tok)
|
|
|
|
}
|
|
|
|
return res
|
|
|
|
}
|
|
|
|
|
|
|
|
func yylex1(lex yyLexer, lval *yySymType) (char, token int) {
|
|
|
|
token = 0
|
|
|
|
char = lex.Lex(lval)
|
|
|
|
if char <= 0 {
|
|
|
|
token = yyTok1[0]
|
|
|
|
goto out
|
|
|
|
}
|
|
|
|
if char < len(yyTok1) {
|
|
|
|
token = yyTok1[char]
|
|
|
|
goto out
|
|
|
|
}
|
|
|
|
if char >= yyPrivate {
|
|
|
|
if char < yyPrivate+len(yyTok2) {
|
|
|
|
token = yyTok2[char-yyPrivate]
|
|
|
|
goto out
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for i := 0; i < len(yyTok3); i += 2 {
|
|
|
|
token = yyTok3[i+0]
|
|
|
|
if token == char {
|
|
|
|
token = yyTok3[i+1]
|
|
|
|
goto out
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
out:
|
|
|
|
if token == 0 {
|
|
|
|
token = yyTok2[1] /* unknown char */
|
|
|
|
}
|
|
|
|
if yyDebug >= 3 {
|
|
|
|
__yyfmt__.Printf("lex %s(%d)\n", yyTokname(token), uint(char))
|
|
|
|
}
|
|
|
|
return char, token
|
|
|
|
}
|
|
|
|
|
|
|
|
func yyParse(yylex yyLexer) int {
|
|
|
|
return yyNewParser().Parse(yylex)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (yyrcvr *yyParserImpl) Parse(yylex yyLexer) int {
|
|
|
|
var yyn int
|
|
|
|
var yyVAL yySymType
|
|
|
|
var yyDollar []yySymType
|
|
|
|
_ = yyDollar // silence set and not used
|
|
|
|
yyS := yyrcvr.stack[:]
|
|
|
|
|
|
|
|
Nerrs := 0 /* number of errors */
|
|
|
|
Errflag := 0 /* error recovery flag */
|
|
|
|
yystate := 0
|
|
|
|
yyrcvr.char = -1
|
|
|
|
yytoken := -1 // yyrcvr.char translated into internal numbering
|
|
|
|
defer func() {
|
|
|
|
// Make sure we report no lookahead when not parsing.
|
|
|
|
yystate = -1
|
|
|
|
yyrcvr.char = -1
|
|
|
|
yytoken = -1
|
|
|
|
}()
|
|
|
|
yyp := -1
|
|
|
|
goto yystack
|
|
|
|
|
|
|
|
ret0:
|
|
|
|
return 0
|
|
|
|
|
|
|
|
ret1:
|
|
|
|
return 1
|
|
|
|
|
|
|
|
yystack:
|
|
|
|
/* put a state and value onto the stack */
|
|
|
|
if yyDebug >= 4 {
|
|
|
|
__yyfmt__.Printf("char %v in %v\n", yyTokname(yytoken), yyStatname(yystate))
|
|
|
|
}
|
|
|
|
|
|
|
|
yyp++
|
|
|
|
if yyp >= len(yyS) {
|
|
|
|
nyys := make([]yySymType, len(yyS)*2)
|
|
|
|
copy(nyys, yyS)
|
|
|
|
yyS = nyys
|
|
|
|
}
|
|
|
|
yyS[yyp] = yyVAL
|
|
|
|
yyS[yyp].yys = yystate
|
|
|
|
|
|
|
|
yynewstate:
|
|
|
|
yyn = yyPact[yystate]
|
|
|
|
if yyn <= yyFlag {
|
|
|
|
goto yydefault /* simple state */
|
|
|
|
}
|
|
|
|
if yyrcvr.char < 0 {
|
|
|
|
yyrcvr.char, yytoken = yylex1(yylex, &yyrcvr.lval)
|
|
|
|
}
|
|
|
|
yyn += yytoken
|
|
|
|
if yyn < 0 || yyn >= yyLast {
|
|
|
|
goto yydefault
|
|
|
|
}
|
|
|
|
yyn = yyAct[yyn]
|
|
|
|
if yyChk[yyn] == yytoken { /* valid shift */
|
|
|
|
yyrcvr.char = -1
|
|
|
|
yytoken = -1
|
|
|
|
yyVAL = yyrcvr.lval
|
|
|
|
yystate = yyn
|
|
|
|
if Errflag > 0 {
|
|
|
|
Errflag--
|
|
|
|
}
|
|
|
|
goto yystack
|
|
|
|
}
|
|
|
|
|
|
|
|
yydefault:
|
|
|
|
/* default state action */
|
|
|
|
yyn = yyDef[yystate]
|
|
|
|
if yyn == -2 {
|
|
|
|
if yyrcvr.char < 0 {
|
|
|
|
yyrcvr.char, yytoken = yylex1(yylex, &yyrcvr.lval)
|
|
|
|
}
|
|
|
|
|
|
|
|
/* look through exception table */
|
|
|
|
xi := 0
|
|
|
|
for {
|
|
|
|
if yyExca[xi+0] == -1 && yyExca[xi+1] == yystate {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
xi += 2
|
|
|
|
}
|
|
|
|
for xi += 2; ; xi += 2 {
|
|
|
|
yyn = yyExca[xi+0]
|
|
|
|
if yyn < 0 || yyn == yytoken {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
yyn = yyExca[xi+1]
|
|
|
|
if yyn < 0 {
|
|
|
|
goto ret0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if yyn == 0 {
|
|
|
|
/* error ... attempt to resume parsing */
|
|
|
|
switch Errflag {
|
|
|
|
case 0: /* brand new error */
|
|
|
|
yylex.Error(yyErrorMessage(yystate, yytoken))
|
|
|
|
Nerrs++
|
|
|
|
if yyDebug >= 1 {
|
|
|
|
__yyfmt__.Printf("%s", yyStatname(yystate))
|
|
|
|
__yyfmt__.Printf(" saw %s\n", yyTokname(yytoken))
|
|
|
|
}
|
|
|
|
fallthrough
|
|
|
|
|
|
|
|
case 1, 2: /* incompletely recovered error ... try again */
|
|
|
|
Errflag = 3
|
|
|
|
|
|
|
|
/* find a state where "error" is a legal shift action */
|
|
|
|
for yyp >= 0 {
|
|
|
|
yyn = yyPact[yyS[yyp].yys] + yyErrCode
|
|
|
|
if yyn >= 0 && yyn < yyLast {
|
|
|
|
yystate = yyAct[yyn] /* simulate a shift of "error" */
|
|
|
|
if yyChk[yystate] == yyErrCode {
|
|
|
|
goto yystack
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* the current p has no shift on "error", pop stack */
|
|
|
|
if yyDebug >= 2 {
|
|
|
|
__yyfmt__.Printf("error recovery pops state %d\n", yyS[yyp].yys)
|
|
|
|
}
|
|
|
|
yyp--
|
|
|
|
}
|
|
|
|
/* there is no state on the stack with an error shift ... abort */
|
|
|
|
goto ret1
|
|
|
|
|
|
|
|
case 3: /* no shift yet; clobber input char */
|
|
|
|
if yyDebug >= 2 {
|
|
|
|
__yyfmt__.Printf("error recovery discards %s\n", yyTokname(yytoken))
|
|
|
|
}
|
|
|
|
if yytoken == yyEofCode {
|
|
|
|
goto ret1
|
|
|
|
}
|
|
|
|
yyrcvr.char = -1
|
|
|
|
yytoken = -1
|
|
|
|
goto yynewstate /* try again in the same state */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* reduction by production yyn */
|
|
|
|
if yyDebug >= 2 {
|
|
|
|
__yyfmt__.Printf("reduce %v in:\n\t%v\n", yyn, yyStatname(yystate))
|
|
|
|
}
|
|
|
|
|
|
|
|
yynt := yyn
|
|
|
|
yypt := yyp
|
|
|
|
_ = yypt // guard against "declared and not used"
|
|
|
|
|
|
|
|
yyp -= yyR2[yyn]
|
|
|
|
// yyp is now the index of $0. Perform the default action. Iff the
|
|
|
|
// reduced production is ε, $1 is possibly out of range.
|
|
|
|
if yyp+1 >= len(yyS) {
|
|
|
|
nyys := make([]yySymType, len(yyS)*2)
|
|
|
|
copy(nyys, yyS)
|
|
|
|
yyS = nyys
|
|
|
|
}
|
|
|
|
yyVAL = yyS[yyp+1]
|
|
|
|
|
|
|
|
/* consult goto table to find next state */
|
|
|
|
yyn = yyR1[yyn]
|
|
|
|
yyg := yyPgo[yyn]
|
|
|
|
yyj := yyg + yyS[yyp].yys + 1
|
|
|
|
|
|
|
|
if yyj >= yyLast {
|
|
|
|
yystate = yyAct[yyg]
|
|
|
|
} else {
|
|
|
|
yystate = yyAct[yyj]
|
|
|
|
if yyChk[yystate] != -yyn {
|
|
|
|
yystate = yyAct[yyg]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// dummy call; replaced with literal code
|
|
|
|
switch yynt {
|
|
|
|
|
|
|
|
case 1:
|
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:174
|
2019-12-05 08:16:12 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yylex.(*parser).generatedParserResult = yyDollar[2].labels
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
2020-01-08 03:04:47 -08:00
|
|
|
case 3:
|
2019-12-16 05:58:47 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:177
|
2019-12-05 08:16:12 -08:00
|
|
|
{
|
2020-01-17 07:16:58 -08:00
|
|
|
yylex.(*parser).addParseErrf(PositionRange{}, "no expression found in input")
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
2020-01-08 03:04:47 -08:00
|
|
|
case 4:
|
2019-12-16 08:38:18 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:179
|
2019-12-18 06:18:52 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yylex.(*parser).generatedParserResult = yyDollar[2].node
|
2019-12-18 06:18:52 -08:00
|
|
|
}
|
2020-01-08 03:04:47 -08:00
|
|
|
case 5:
|
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:181
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yylex.(*parser).generatedParserResult = yyDollar[2].node
|
|
|
|
}
|
|
|
|
case 7:
|
2019-12-16 05:58:47 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:184
|
2019-12-05 08:16:12 -08:00
|
|
|
{
|
2019-12-18 09:36:43 -08:00
|
|
|
yylex.(*parser).unexpected("", "")
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
2021-01-20 02:57:39 -08:00
|
|
|
case 20:
|
2019-12-16 05:58:47 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:207
|
2019-12-05 08:16:12 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yyVAL.node = yylex.(*parser).newAggregateExpr(yyDollar[1].item, yyDollar[2].node, yyDollar[3].node)
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
2021-01-20 02:57:39 -08:00
|
|
|
case 21:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:209
|
2019-12-05 08:16:12 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yyVAL.node = yylex.(*parser).newAggregateExpr(yyDollar[1].item, yyDollar[3].node, yyDollar[2].node)
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
2021-01-20 02:57:39 -08:00
|
|
|
case 22:
|
2019-12-05 08:16:12 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:211
|
2019-12-05 08:16:12 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yyVAL.node = yylex.(*parser).newAggregateExpr(yyDollar[1].item, &AggregateExpr{}, yyDollar[2].node)
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
2021-01-20 02:57:39 -08:00
|
|
|
case 23:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:213
|
2019-12-05 08:16:12 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yylex.(*parser).unexpected("aggregation", "")
|
2020-03-05 00:03:38 -08:00
|
|
|
yyVAL.node = yylex.(*parser).newAggregateExpr(yyDollar[1].item, &AggregateExpr{}, Expressions{})
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
2021-01-20 02:57:39 -08:00
|
|
|
case 24:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:221
|
2019-12-16 05:58:47 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yyVAL.node = &AggregateExpr{
|
|
|
|
Grouping: yyDollar[2].strings,
|
|
|
|
}
|
2019-12-16 05:58:47 -08:00
|
|
|
}
|
2021-01-20 02:57:39 -08:00
|
|
|
case 25:
|
2019-12-16 05:58:47 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:227
|
2019-12-16 05:58:47 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yyVAL.node = &AggregateExpr{
|
|
|
|
Grouping: yyDollar[2].strings,
|
|
|
|
Without: true,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 26:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:240
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.node = yylex.(*parser).newBinaryExpression(yyDollar[1].node, yyDollar[2].item, yyDollar[3].node, yyDollar[4].node)
|
|
|
|
}
|
|
|
|
case 27:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:241
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.node = yylex.(*parser).newBinaryExpression(yyDollar[1].node, yyDollar[2].item, yyDollar[3].node, yyDollar[4].node)
|
|
|
|
}
|
|
|
|
case 28:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:242
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.node = yylex.(*parser).newBinaryExpression(yyDollar[1].node, yyDollar[2].item, yyDollar[3].node, yyDollar[4].node)
|
|
|
|
}
|
|
|
|
case 29:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:243
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.node = yylex.(*parser).newBinaryExpression(yyDollar[1].node, yyDollar[2].item, yyDollar[3].node, yyDollar[4].node)
|
|
|
|
}
|
|
|
|
case 30:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:244
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.node = yylex.(*parser).newBinaryExpression(yyDollar[1].node, yyDollar[2].item, yyDollar[3].node, yyDollar[4].node)
|
|
|
|
}
|
|
|
|
case 31:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:245
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.node = yylex.(*parser).newBinaryExpression(yyDollar[1].node, yyDollar[2].item, yyDollar[3].node, yyDollar[4].node)
|
|
|
|
}
|
|
|
|
case 32:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:246
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.node = yylex.(*parser).newBinaryExpression(yyDollar[1].node, yyDollar[2].item, yyDollar[3].node, yyDollar[4].node)
|
|
|
|
}
|
|
|
|
case 33:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:247
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.node = yylex.(*parser).newBinaryExpression(yyDollar[1].node, yyDollar[2].item, yyDollar[3].node, yyDollar[4].node)
|
|
|
|
}
|
|
|
|
case 34:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:248
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.node = yylex.(*parser).newBinaryExpression(yyDollar[1].node, yyDollar[2].item, yyDollar[3].node, yyDollar[4].node)
|
|
|
|
}
|
|
|
|
case 35:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:249
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.node = yylex.(*parser).newBinaryExpression(yyDollar[1].node, yyDollar[2].item, yyDollar[3].node, yyDollar[4].node)
|
|
|
|
}
|
|
|
|
case 36:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:250
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.node = yylex.(*parser).newBinaryExpression(yyDollar[1].node, yyDollar[2].item, yyDollar[3].node, yyDollar[4].node)
|
|
|
|
}
|
|
|
|
case 37:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:251
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.node = yylex.(*parser).newBinaryExpression(yyDollar[1].node, yyDollar[2].item, yyDollar[3].node, yyDollar[4].node)
|
|
|
|
}
|
|
|
|
case 38:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:252
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.node = yylex.(*parser).newBinaryExpression(yyDollar[1].node, yyDollar[2].item, yyDollar[3].node, yyDollar[4].node)
|
|
|
|
}
|
|
|
|
case 39:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:253
|
2021-01-20 02:57:39 -08:00
|
|
|
{
|
|
|
|
yyVAL.node = yylex.(*parser).newBinaryExpression(yyDollar[1].node, yyDollar[2].item, yyDollar[3].node, yyDollar[4].node)
|
|
|
|
}
|
|
|
|
case 40:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:254
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.node = yylex.(*parser).newBinaryExpression(yyDollar[1].node, yyDollar[2].item, yyDollar[3].node, yyDollar[4].node)
|
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 41:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:255
|
|
|
|
{
|
|
|
|
yyVAL.node = yylex.(*parser).newBinaryExpression(yyDollar[1].node, yyDollar[2].item, yyDollar[3].node, yyDollar[4].node)
|
|
|
|
}
|
|
|
|
case 43:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-0 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:263
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.node = &BinaryExpr{
|
|
|
|
VectorMatching: &VectorMatching{Card: CardOneToOne},
|
|
|
|
}
|
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 44:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:268
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.node = &BinaryExpr{
|
|
|
|
VectorMatching: &VectorMatching{Card: CardOneToOne},
|
|
|
|
ReturnBool: true,
|
|
|
|
}
|
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 45:
|
2019-12-05 08:16:12 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:276
|
2019-12-16 05:58:47 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yyVAL.node = yyDollar[1].node
|
|
|
|
yyVAL.node.(*BinaryExpr).VectorMatching.MatchingLabels = yyDollar[3].strings
|
2019-12-16 05:58:47 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 46:
|
2019-12-16 05:58:47 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:281
|
2019-12-05 08:16:12 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yyVAL.node = yyDollar[1].node
|
|
|
|
yyVAL.node.(*BinaryExpr).VectorMatching.MatchingLabels = yyDollar[3].strings
|
|
|
|
yyVAL.node.(*BinaryExpr).VectorMatching.On = true
|
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 49:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:291
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.node = yyDollar[1].node
|
|
|
|
yyVAL.node.(*BinaryExpr).VectorMatching.Card = CardManyToOne
|
|
|
|
yyVAL.node.(*BinaryExpr).VectorMatching.Include = yyDollar[3].strings
|
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 50:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:297
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.node = yyDollar[1].node
|
|
|
|
yyVAL.node.(*BinaryExpr).VectorMatching.Card = CardOneToMany
|
|
|
|
yyVAL.node.(*BinaryExpr).VectorMatching.Include = yyDollar[3].strings
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 51:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:306
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.strings = yyDollar[2].strings
|
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 52:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:308
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.strings = yyDollar[2].strings
|
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 53:
|
2019-12-16 05:58:47 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:310
|
2019-12-16 05:58:47 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yyVAL.strings = []string{}
|
2019-12-16 05:58:47 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 54:
|
2019-12-05 08:16:12 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:312
|
2019-12-05 08:16:12 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yylex.(*parser).unexpected("grouping opts", "\"(\"")
|
2020-01-16 07:20:20 -08:00
|
|
|
yyVAL.strings = nil
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 55:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:318
|
2019-12-05 08:16:12 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yyVAL.strings = append(yyDollar[1].strings, yyDollar[3].item.Val)
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 56:
|
2019-12-16 08:38:18 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:320
|
2019-12-16 05:58:47 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yyVAL.strings = []string{yyDollar[1].item.Val}
|
2019-12-16 05:58:47 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 57:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:322
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yylex.(*parser).unexpected("grouping opts", "\",\" or \")\"")
|
2020-01-16 07:20:20 -08:00
|
|
|
yyVAL.strings = yyDollar[1].strings
|
2020-01-08 03:04:47 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 58:
|
2019-12-18 06:18:52 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:326
|
2019-12-18 06:18:52 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
if !isLabel(yyDollar[1].item.Val) {
|
|
|
|
yylex.(*parser).unexpected("grouping opts", "label")
|
|
|
|
}
|
2019-12-18 06:18:52 -08:00
|
|
|
yyVAL.item = yyDollar[1].item
|
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 59:
|
2019-12-21 00:44:12 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:333
|
2019-12-16 05:58:47 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yylex.(*parser).unexpected("grouping opts", "label")
|
2020-01-16 07:20:20 -08:00
|
|
|
yyVAL.item = Item{}
|
2019-12-16 05:58:47 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 60:
|
2019-12-21 00:44:12 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:341
|
2019-12-16 05:58:47 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
fn, exist := getFunction(yyDollar[1].item.Val)
|
|
|
|
if !exist {
|
2020-01-17 07:16:58 -08:00
|
|
|
yylex.(*parser).addParseErrf(yyDollar[1].item.PositionRange(), "unknown function with name %q", yyDollar[1].item.Val)
|
2020-01-08 03:04:47 -08:00
|
|
|
}
|
|
|
|
yyVAL.node = &Call{
|
|
|
|
Func: fn,
|
|
|
|
Args: yyDollar[2].node.(Expressions),
|
2020-01-14 08:12:15 -08:00
|
|
|
PosRange: PositionRange{
|
|
|
|
Start: yyDollar[1].item.Pos,
|
|
|
|
End: yylex.(*parser).lastClosing,
|
|
|
|
},
|
2020-01-08 03:04:47 -08:00
|
|
|
}
|
2019-12-16 05:58:47 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 61:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:358
|
2019-12-16 05:58:47 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yyVAL.node = yyDollar[2].node
|
2019-12-16 05:58:47 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 62:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:360
|
2019-12-16 05:58:47 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yyVAL.node = Expressions{}
|
2019-12-16 05:58:47 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 63:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:364
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.node = append(yyDollar[1].node.(Expressions), yyDollar[3].node.(Expr))
|
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 64:
|
2019-12-16 08:38:18 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:366
|
2019-12-16 08:38:18 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yyVAL.node = Expressions{yyDollar[1].node.(Expr)}
|
2019-12-16 08:38:18 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 65:
|
2020-01-16 07:20:20 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:368
|
2020-01-16 07:20:20 -08:00
|
|
|
{
|
2020-01-17 07:16:58 -08:00
|
|
|
yylex.(*parser).addParseErrf(yyDollar[2].item.PositionRange(), "trailing commas not allowed in function call args")
|
2020-01-16 07:20:20 -08:00
|
|
|
yyVAL.node = yyDollar[1].node
|
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 66:
|
2019-12-16 08:38:18 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:379
|
2019-12-16 08:38:18 -08:00
|
|
|
{
|
2020-01-14 08:12:15 -08:00
|
|
|
yyVAL.node = &ParenExpr{Expr: yyDollar[2].node.(Expr), PosRange: mergeRanges(&yyDollar[1].item, &yyDollar[3].item)}
|
2019-12-16 08:38:18 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 67:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:387
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
2021-02-23 17:46:52 -08:00
|
|
|
yylex.(*parser).addOffset(yyDollar[1].node, yyDollar[3].duration)
|
2020-01-08 03:04:47 -08:00
|
|
|
yyVAL.node = yyDollar[1].node
|
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 68:
|
2021-02-16 17:49:00 -08:00
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:392
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
2021-02-23 17:46:52 -08:00
|
|
|
yylex.(*parser).addOffset(yyDollar[1].node, -yyDollar[4].duration)
|
2020-01-16 07:20:20 -08:00
|
|
|
yyVAL.node = yyDollar[1].node
|
2020-01-08 03:04:47 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 69:
|
2021-01-20 02:57:39 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:397
|
2021-01-20 02:57:39 -08:00
|
|
|
{
|
2021-02-16 17:49:00 -08:00
|
|
|
yylex.(*parser).unexpected("offset", "duration")
|
2021-01-20 02:57:39 -08:00
|
|
|
yyVAL.node = yyDollar[1].node
|
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 70:
|
2021-02-16 17:49:00 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:404
|
2021-02-09 08:03:16 -08:00
|
|
|
{
|
2021-02-16 17:49:00 -08:00
|
|
|
yylex.(*parser).setTimestamp(yyDollar[1].node, yyDollar[3].float)
|
2021-02-09 08:03:16 -08:00
|
|
|
yyVAL.node = yyDollar[1].node
|
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 71:
|
2021-02-16 17:49:00 -08:00
|
|
|
yyDollar = yyS[yypt-5 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:409
|
2021-02-16 17:49:00 -08:00
|
|
|
{
|
|
|
|
yylex.(*parser).setAtModifierPreprocessor(yyDollar[1].node, yyDollar[3].item)
|
|
|
|
yyVAL.node = yyDollar[1].node
|
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 72:
|
2021-02-16 17:49:00 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:414
|
2021-01-20 02:57:39 -08:00
|
|
|
{
|
|
|
|
yylex.(*parser).unexpected("@", "timestamp")
|
|
|
|
yyVAL.node = yyDollar[1].node
|
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 75:
|
2019-12-16 08:38:18 -08:00
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:424
|
2019-12-16 08:38:18 -08:00
|
|
|
{
|
2020-01-15 12:01:49 -08:00
|
|
|
var errMsg string
|
2020-01-08 03:04:47 -08:00
|
|
|
vs, ok := yyDollar[1].node.(*VectorSelector)
|
|
|
|
if !ok {
|
2020-01-15 12:01:49 -08:00
|
|
|
errMsg = "ranges only allowed for vector selectors"
|
2021-01-20 02:57:39 -08:00
|
|
|
} else if vs.OriginalOffset != 0 {
|
2020-01-15 12:01:49 -08:00
|
|
|
errMsg = "no offset modifiers allowed before range"
|
2021-01-20 02:57:39 -08:00
|
|
|
} else if vs.Timestamp != nil {
|
|
|
|
errMsg = "no @ modifiers allowed before range"
|
2020-01-08 03:04:47 -08:00
|
|
|
}
|
2020-01-15 12:01:49 -08:00
|
|
|
|
|
|
|
if errMsg != "" {
|
|
|
|
errRange := mergeRanges(&yyDollar[2].item, &yyDollar[4].item)
|
2020-01-17 07:16:58 -08:00
|
|
|
yylex.(*parser).addParseErrf(errRange, errMsg)
|
2020-01-08 03:04:47 -08:00
|
|
|
}
|
2020-01-15 12:01:49 -08:00
|
|
|
|
2020-01-08 03:04:47 -08:00
|
|
|
yyVAL.node = &MatrixSelector{
|
2020-01-17 07:16:58 -08:00
|
|
|
VectorSelector: yyDollar[1].node.(Expr),
|
2020-01-10 06:25:41 -08:00
|
|
|
Range: yyDollar[3].duration,
|
2020-01-14 08:12:15 -08:00
|
|
|
EndPos: yylex.(*parser).lastClosing,
|
2020-01-08 03:04:47 -08:00
|
|
|
}
|
2019-12-16 08:38:18 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 76:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-6 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:449
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.node = &SubqueryExpr{
|
|
|
|
Expr: yyDollar[1].node.(Expr),
|
|
|
|
Range: yyDollar[3].duration,
|
|
|
|
Step: yyDollar[5].duration,
|
2020-01-14 08:12:15 -08:00
|
|
|
|
|
|
|
EndPos: yyDollar[6].item.Pos + 1,
|
2020-01-08 03:04:47 -08:00
|
|
|
}
|
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 77:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-6 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:459
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yylex.(*parser).unexpected("subquery selector", "\"]\"")
|
2020-01-16 07:20:20 -08:00
|
|
|
yyVAL.node = yyDollar[1].node
|
2020-01-08 03:04:47 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 78:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-5 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:461
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yylex.(*parser).unexpected("subquery selector", "duration or \"]\"")
|
2020-01-16 07:20:20 -08:00
|
|
|
yyVAL.node = yyDollar[1].node
|
2020-01-08 03:04:47 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 79:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:463
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yylex.(*parser).unexpected("subquery or range", "\":\" or \"]\"")
|
2020-01-16 07:20:20 -08:00
|
|
|
yyVAL.node = yyDollar[1].node
|
2020-01-08 03:04:47 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 80:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:465
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yylex.(*parser).unexpected("subquery selector", "duration")
|
2020-01-16 07:20:20 -08:00
|
|
|
yyVAL.node = yyDollar[1].node
|
2020-01-08 03:04:47 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 81:
|
2019-12-16 05:58:47 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:475
|
2019-12-16 08:38:18 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
if nl, ok := yyDollar[2].node.(*NumberLiteral); ok {
|
|
|
|
if yyDollar[1].item.Typ == SUB {
|
|
|
|
nl.Val *= -1
|
|
|
|
}
|
2020-01-14 08:12:15 -08:00
|
|
|
nl.PosRange.Start = yyDollar[1].item.Pos
|
2020-01-08 03:04:47 -08:00
|
|
|
yyVAL.node = nl
|
|
|
|
} else {
|
2020-01-14 08:12:15 -08:00
|
|
|
yyVAL.node = &UnaryExpr{Op: yyDollar[1].item.Typ, Expr: yyDollar[2].node.(Expr), StartPos: yyDollar[1].item.Pos}
|
2020-01-08 03:04:47 -08:00
|
|
|
}
|
2019-12-16 08:38:18 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 82:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:493
|
2019-12-16 08:38:18 -08:00
|
|
|
{
|
2020-01-14 08:12:15 -08:00
|
|
|
vs := yyDollar[2].node.(*VectorSelector)
|
|
|
|
vs.PosRange = mergeRanges(&yyDollar[1].item, vs)
|
|
|
|
vs.Name = yyDollar[1].item.Val
|
|
|
|
yylex.(*parser).assembleVectorSelector(vs)
|
|
|
|
yyVAL.node = vs
|
2019-12-16 08:38:18 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 83:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:501
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
2020-01-14 08:12:15 -08:00
|
|
|
vs := &VectorSelector{
|
|
|
|
Name: yyDollar[1].item.Val,
|
|
|
|
LabelMatchers: []*labels.Matcher{},
|
|
|
|
PosRange: yyDollar[1].item.PositionRange(),
|
|
|
|
}
|
|
|
|
yylex.(*parser).assembleVectorSelector(vs)
|
|
|
|
yyVAL.node = vs
|
2020-01-08 03:04:47 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 84:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:511
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
2020-01-14 08:12:15 -08:00
|
|
|
vs := yyDollar[1].node.(*VectorSelector)
|
|
|
|
yylex.(*parser).assembleVectorSelector(vs)
|
|
|
|
yyVAL.node = vs
|
2020-01-08 03:04:47 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 85:
|
2019-12-16 08:38:18 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:519
|
2019-12-16 08:38:18 -08:00
|
|
|
{
|
2020-01-14 08:12:15 -08:00
|
|
|
yyVAL.node = &VectorSelector{
|
|
|
|
LabelMatchers: yyDollar[2].matchers,
|
|
|
|
PosRange: mergeRanges(&yyDollar[1].item, &yyDollar[3].item),
|
|
|
|
}
|
2019-12-16 08:38:18 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 86:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:526
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
2020-01-14 08:12:15 -08:00
|
|
|
yyVAL.node = &VectorSelector{
|
|
|
|
LabelMatchers: yyDollar[2].matchers,
|
|
|
|
PosRange: mergeRanges(&yyDollar[1].item, &yyDollar[4].item),
|
|
|
|
}
|
2020-01-08 03:04:47 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 87:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:533
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
2020-01-14 08:12:15 -08:00
|
|
|
yyVAL.node = &VectorSelector{
|
|
|
|
LabelMatchers: []*labels.Matcher{},
|
|
|
|
PosRange: mergeRanges(&yyDollar[1].item, &yyDollar[2].item),
|
|
|
|
}
|
2020-01-08 03:04:47 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 88:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:542
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
2020-01-16 07:20:20 -08:00
|
|
|
if yyDollar[1].matchers != nil {
|
|
|
|
yyVAL.matchers = append(yyDollar[1].matchers, yyDollar[3].matcher)
|
|
|
|
} else {
|
|
|
|
yyVAL.matchers = yyDollar[1].matchers
|
|
|
|
}
|
2020-01-08 03:04:47 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 89:
|
2019-12-16 08:38:18 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:550
|
2019-12-16 08:38:18 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yyVAL.matchers = []*labels.Matcher{yyDollar[1].matcher}
|
2019-12-16 08:38:18 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 90:
|
2019-12-16 08:38:18 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:552
|
2019-12-16 05:58:47 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yylex.(*parser).unexpected("label matching", "\",\" or \"}\"")
|
2020-01-16 07:20:20 -08:00
|
|
|
yyVAL.matchers = yyDollar[1].matchers
|
2019-12-16 05:58:47 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 91:
|
2019-12-16 05:58:47 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:556
|
2019-12-16 05:58:47 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yyVAL.matcher = yylex.(*parser).newLabelMatcher(yyDollar[1].item, yyDollar[2].item, yyDollar[3].item)
|
2019-12-16 05:58:47 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 92:
|
2019-12-16 05:58:47 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:558
|
2019-12-16 05:58:47 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yylex.(*parser).unexpected("label matching", "string")
|
2020-01-16 07:20:20 -08:00
|
|
|
yyVAL.matcher = nil
|
2019-12-16 05:58:47 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 93:
|
2019-12-16 05:58:47 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:560
|
2019-12-16 05:58:47 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yylex.(*parser).unexpected("label matching", "label matching operator")
|
2020-01-16 07:20:20 -08:00
|
|
|
yyVAL.matcher = nil
|
2019-12-16 05:58:47 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 94:
|
2019-12-05 08:16:12 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:562
|
2019-12-05 08:16:12 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yylex.(*parser).unexpected("label matching", "identifier or \"}\"")
|
2020-01-16 07:20:20 -08:00
|
|
|
yyVAL.matcher = nil
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 95:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:570
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
2022-03-09 14:14:58 -08:00
|
|
|
b := labels.NewBuilder(yyDollar[2].labels)
|
|
|
|
b.Set(labels.MetricName, yyDollar[1].item.Val)
|
|
|
|
yyVAL.labels = b.Labels(labels.EmptyLabels())
|
2020-01-08 03:04:47 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 96:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:572
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.labels = yyDollar[1].labels
|
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 119:
|
2019-12-18 06:18:52 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:579
|
2019-12-18 06:18:52 -08:00
|
|
|
{
|
2022-03-09 14:14:58 -08:00
|
|
|
yyVAL.labels = labels.New(yyDollar[2].lblList...)
|
2019-12-18 06:18:52 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 120:
|
2019-12-20 03:28:56 -08:00
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:581
|
2019-12-18 06:18:52 -08:00
|
|
|
{
|
2022-03-09 14:14:58 -08:00
|
|
|
yyVAL.labels = labels.New(yyDollar[2].lblList...)
|
2019-12-18 06:18:52 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 121:
|
2019-12-20 03:28:56 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:583
|
2019-12-18 06:18:52 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yyVAL.labels = labels.New()
|
2019-12-18 06:18:52 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 122:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-0 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:585
|
2019-12-20 03:28:56 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yyVAL.labels = labels.New()
|
2019-12-20 03:28:56 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 123:
|
2019-12-18 06:18:52 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:589
|
2019-12-18 06:18:52 -08:00
|
|
|
{
|
2022-03-09 14:14:58 -08:00
|
|
|
yyVAL.lblList = append(yyDollar[1].lblList, yyDollar[3].label)
|
2019-12-18 06:18:52 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 124:
|
2019-12-18 06:18:52 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:591
|
2019-12-18 06:18:52 -08:00
|
|
|
{
|
2022-03-09 14:14:58 -08:00
|
|
|
yyVAL.lblList = []labels.Label{yyDollar[1].label}
|
2019-12-18 06:18:52 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 125:
|
2019-12-18 06:18:52 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:593
|
2019-12-18 06:18:52 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yylex.(*parser).unexpected("label set", "\",\" or \"}\"")
|
2022-03-09 14:14:58 -08:00
|
|
|
yyVAL.lblList = yyDollar[1].lblList
|
2019-12-18 06:18:52 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 126:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:598
|
2019-12-18 06:18:52 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yyVAL.label = labels.Label{Name: yyDollar[1].item.Val, Value: yylex.(*parser).unquoteString(yyDollar[3].item.Val)}
|
2019-12-18 06:18:52 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 127:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:600
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yylex.(*parser).unexpected("label set", "string")
|
2020-01-16 07:20:20 -08:00
|
|
|
yyVAL.label = labels.Label{}
|
2020-01-08 03:04:47 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 128:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:602
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yylex.(*parser).unexpected("label set", "\"=\"")
|
2020-01-16 07:20:20 -08:00
|
|
|
yyVAL.label = labels.Label{}
|
2020-01-08 03:04:47 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 129:
|
2019-12-18 06:18:52 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:604
|
2019-12-18 06:18:52 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
yylex.(*parser).unexpected("label set", "identifier or \"}\"")
|
2020-01-16 07:20:20 -08:00
|
|
|
yyVAL.label = labels.Label{}
|
2019-12-18 06:18:52 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 130:
|
2019-12-21 00:44:12 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:612
|
2019-12-21 00:44:12 -08:00
|
|
|
{
|
|
|
|
yylex.(*parser).generatedParserResult = &seriesDescription{
|
|
|
|
labels: yyDollar[1].labels,
|
|
|
|
values: yyDollar[2].series,
|
|
|
|
}
|
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 131:
|
2019-12-21 00:44:12 -08:00
|
|
|
yyDollar = yyS[yypt-0 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:621
|
2019-12-21 00:44:12 -08:00
|
|
|
{
|
2020-02-03 08:45:41 -08:00
|
|
|
yyVAL.series = []SequenceValue{}
|
2019-12-21 00:44:12 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 132:
|
2019-12-21 00:44:12 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:623
|
2019-12-21 00:44:12 -08:00
|
|
|
{
|
|
|
|
yyVAL.series = append(yyDollar[1].series, yyDollar[3].series...)
|
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 133:
|
2019-12-21 00:44:12 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:625
|
2019-12-21 00:44:12 -08:00
|
|
|
{
|
|
|
|
yyVAL.series = yyDollar[1].series
|
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 134:
|
2019-12-21 00:44:12 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:627
|
2019-12-21 00:44:12 -08:00
|
|
|
{
|
|
|
|
yylex.(*parser).unexpected("series values", "")
|
2020-01-16 07:20:20 -08:00
|
|
|
yyVAL.series = nil
|
2019-12-21 00:44:12 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 135:
|
2019-12-21 00:44:12 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:631
|
2019-12-21 00:44:12 -08:00
|
|
|
{
|
2020-02-03 09:48:27 -08:00
|
|
|
yyVAL.series = []SequenceValue{{Omitted: true}}
|
2019-12-21 00:44:12 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 136:
|
2019-12-21 00:44:12 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:633
|
2019-12-21 00:44:12 -08:00
|
|
|
{
|
2020-02-03 08:45:41 -08:00
|
|
|
yyVAL.series = []SequenceValue{}
|
2019-12-21 00:44:12 -08:00
|
|
|
for i := uint64(0); i < yyDollar[3].uint; i++ {
|
2020-02-03 09:48:27 -08:00
|
|
|
yyVAL.series = append(yyVAL.series, SequenceValue{Omitted: true})
|
2019-12-21 00:44:12 -08:00
|
|
|
}
|
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 137:
|
2019-12-21 00:44:12 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:640
|
2019-12-21 00:44:12 -08:00
|
|
|
{
|
2020-02-03 09:48:27 -08:00
|
|
|
yyVAL.series = []SequenceValue{{Value: yyDollar[1].float}}
|
2019-12-21 00:44:12 -08:00
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 138:
|
2019-12-21 00:44:12 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:642
|
2019-12-21 00:44:12 -08:00
|
|
|
{
|
2020-02-03 08:45:41 -08:00
|
|
|
yyVAL.series = []SequenceValue{}
|
2019-12-21 00:44:12 -08:00
|
|
|
for i := uint64(0); i <= yyDollar[3].uint; i++ {
|
2020-02-03 09:48:27 -08:00
|
|
|
yyVAL.series = append(yyVAL.series, SequenceValue{Value: yyDollar[1].float})
|
2019-12-21 00:44:12 -08:00
|
|
|
}
|
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 139:
|
2019-12-21 00:44:12 -08:00
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:649
|
2019-12-21 00:44:12 -08:00
|
|
|
{
|
2020-02-03 08:45:41 -08:00
|
|
|
yyVAL.series = []SequenceValue{}
|
2019-12-21 00:44:12 -08:00
|
|
|
for i := uint64(0); i <= yyDollar[4].uint; i++ {
|
2020-02-03 09:48:27 -08:00
|
|
|
yyVAL.series = append(yyVAL.series, SequenceValue{Value: yyDollar[1].float})
|
2019-12-21 00:44:12 -08:00
|
|
|
yyDollar[1].float += yyDollar[2].float
|
|
|
|
}
|
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 140:
|
2019-12-21 00:44:12 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:659
|
2019-12-21 00:44:12 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
if yyDollar[1].item.Val != "stale" {
|
|
|
|
yylex.(*parser).unexpected("series values", "number or \"stale\"")
|
2019-12-21 00:44:12 -08:00
|
|
|
}
|
2020-01-08 03:04:47 -08:00
|
|
|
yyVAL.float = math.Float64frombits(value.StaleNaN)
|
2019-12-21 00:44:12 -08:00
|
|
|
}
|
2021-08-25 03:51:12 -07:00
|
|
|
case 188:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:690
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
2020-01-14 08:12:15 -08:00
|
|
|
yyVAL.node = &NumberLiteral{
|
|
|
|
Val: yylex.(*parser).number(yyDollar[1].item.Val),
|
|
|
|
PosRange: yyDollar[1].item.PositionRange(),
|
|
|
|
}
|
2020-01-08 03:04:47 -08:00
|
|
|
}
|
2021-08-25 03:51:12 -07:00
|
|
|
case 189:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:698
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.float = yylex.(*parser).number(yyDollar[1].item.Val)
|
|
|
|
}
|
2021-08-25 03:51:12 -07:00
|
|
|
case 190:
|
2019-12-21 00:44:12 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:700
|
2019-12-21 00:44:12 -08:00
|
|
|
{
|
|
|
|
yyVAL.float = yyDollar[2].float
|
|
|
|
}
|
2021-08-25 03:51:12 -07:00
|
|
|
case 191:
|
2019-12-21 00:44:12 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:701
|
2019-12-21 00:44:12 -08:00
|
|
|
{
|
|
|
|
yyVAL.float = -yyDollar[2].float
|
|
|
|
}
|
2021-08-25 03:51:12 -07:00
|
|
|
case 194:
|
2019-12-21 00:44:12 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:707
|
2019-12-21 00:44:12 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
var err error
|
|
|
|
yyVAL.uint, err = strconv.ParseUint(yyDollar[1].item.Val, 10, 64)
|
|
|
|
if err != nil {
|
2020-01-17 07:16:58 -08:00
|
|
|
yylex.(*parser).addParseErrf(yyDollar[1].item.PositionRange(), "invalid repetition in series values: %s", err)
|
2019-12-21 00:44:12 -08:00
|
|
|
}
|
|
|
|
}
|
2021-08-25 03:51:12 -07:00
|
|
|
case 195:
|
2019-12-21 00:44:12 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:717
|
2019-12-21 00:44:12 -08:00
|
|
|
{
|
2020-01-08 03:04:47 -08:00
|
|
|
var err error
|
|
|
|
yyVAL.duration, err = parseDuration(yyDollar[1].item.Val)
|
|
|
|
if err != nil {
|
2020-01-17 07:16:58 -08:00
|
|
|
yylex.(*parser).addParseErr(yyDollar[1].item.PositionRange(), err)
|
2020-01-08 03:04:47 -08:00
|
|
|
}
|
2019-12-21 00:44:12 -08:00
|
|
|
}
|
2021-08-25 03:51:12 -07:00
|
|
|
case 196:
|
2019-12-21 00:44:12 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:728
|
2019-12-21 00:44:12 -08:00
|
|
|
{
|
2020-01-14 08:12:15 -08:00
|
|
|
yyVAL.node = &StringLiteral{
|
|
|
|
Val: yylex.(*parser).unquoteString(yyDollar[1].item.Val),
|
|
|
|
PosRange: yyDollar[1].item.PositionRange(),
|
|
|
|
}
|
2019-12-21 00:44:12 -08:00
|
|
|
}
|
2021-08-25 03:51:12 -07:00
|
|
|
case 197:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-0 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:741
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.duration = 0
|
|
|
|
}
|
2021-08-25 03:51:12 -07:00
|
|
|
case 199:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-0 : yypt+1]
|
2021-08-24 16:22:14 -07:00
|
|
|
//line promql/parser/generated_parser.y:745
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.strings = nil
|
2019-12-21 00:44:12 -08:00
|
|
|
}
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
|
|
|
goto yystack /* stack new state and value */
|
|
|
|
}
|