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
|
|
|
|
2023-08-25 14:35:42 -07:00
|
|
|
"github.com/prometheus/prometheus/model/histogram"
|
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
|
|
|
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:29
|
2019-12-05 08:16:12 -08:00
|
|
|
type yySymType struct {
|
2023-08-25 14:35:42 -07:00
|
|
|
yys int
|
|
|
|
node Node
|
|
|
|
item Item
|
|
|
|
matchers []*labels.Matcher
|
|
|
|
matcher *labels.Matcher
|
|
|
|
label labels.Label
|
|
|
|
labels labels.Labels
|
|
|
|
lblList []labels.Label
|
|
|
|
strings []string
|
|
|
|
series []SequenceValue
|
|
|
|
histogram *histogram.FloatHistogram
|
|
|
|
descriptors map[string]interface{}
|
|
|
|
bucket_set []float64
|
|
|
|
int int64
|
|
|
|
uint uint64
|
|
|
|
float float64
|
|
|
|
duration time.Duration
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
|
|
|
|
2023-08-25 14:35:42 -07:00
|
|
|
const EQL = 57346
|
|
|
|
const BLANK = 57347
|
|
|
|
const COLON = 57348
|
|
|
|
const COMMA = 57349
|
|
|
|
const COMMENT = 57350
|
|
|
|
const DURATION = 57351
|
|
|
|
const EOF = 57352
|
|
|
|
const ERROR = 57353
|
|
|
|
const IDENTIFIER = 57354
|
|
|
|
const LEFT_BRACE = 57355
|
|
|
|
const LEFT_BRACKET = 57356
|
|
|
|
const LEFT_PAREN = 57357
|
|
|
|
const OPEN_HIST = 57358
|
|
|
|
const CLOSE_HIST = 57359
|
|
|
|
const METRIC_IDENTIFIER = 57360
|
|
|
|
const NUMBER = 57361
|
|
|
|
const RIGHT_BRACE = 57362
|
|
|
|
const RIGHT_BRACKET = 57363
|
|
|
|
const RIGHT_PAREN = 57364
|
|
|
|
const SEMICOLON = 57365
|
|
|
|
const SPACE = 57366
|
|
|
|
const STRING = 57367
|
|
|
|
const TIMES = 57368
|
|
|
|
const histogramDescStart = 57369
|
|
|
|
const SUM_DESC = 57370
|
|
|
|
const COUNT_DESC = 57371
|
|
|
|
const SCHEMA_DESC = 57372
|
|
|
|
const OFFSET_DESC = 57373
|
|
|
|
const NEGATIVE_OFFSET_DESC = 57374
|
|
|
|
const BUCKETS_DESC = 57375
|
|
|
|
const NEGATIVE_BUCKETS_DESC = 57376
|
|
|
|
const ZERO_BUCKET_DESC = 57377
|
|
|
|
const ZERO_BUCKET_WIDTH_DESC = 57378
|
|
|
|
const histogramDescEnd = 57379
|
|
|
|
const operatorsStart = 57380
|
|
|
|
const ADD = 57381
|
|
|
|
const DIV = 57382
|
|
|
|
const EQLC = 57383
|
|
|
|
const EQL_REGEX = 57384
|
|
|
|
const GTE = 57385
|
|
|
|
const GTR = 57386
|
|
|
|
const LAND = 57387
|
|
|
|
const LOR = 57388
|
|
|
|
const LSS = 57389
|
|
|
|
const LTE = 57390
|
|
|
|
const LUNLESS = 57391
|
|
|
|
const MOD = 57392
|
|
|
|
const MUL = 57393
|
|
|
|
const NEQ = 57394
|
|
|
|
const NEQ_REGEX = 57395
|
|
|
|
const POW = 57396
|
|
|
|
const SUB = 57397
|
|
|
|
const AT = 57398
|
|
|
|
const ATAN2 = 57399
|
|
|
|
const operatorsEnd = 57400
|
|
|
|
const aggregatorsStart = 57401
|
|
|
|
const AVG = 57402
|
|
|
|
const BOTTOMK = 57403
|
|
|
|
const COUNT = 57404
|
|
|
|
const COUNT_VALUES = 57405
|
|
|
|
const GROUP = 57406
|
|
|
|
const MAX = 57407
|
|
|
|
const MIN = 57408
|
|
|
|
const QUANTILE = 57409
|
|
|
|
const STDDEV = 57410
|
|
|
|
const STDVAR = 57411
|
|
|
|
const SUM = 57412
|
|
|
|
const TOPK = 57413
|
|
|
|
const aggregatorsEnd = 57414
|
|
|
|
const keywordsStart = 57415
|
|
|
|
const BOOL = 57416
|
|
|
|
const BY = 57417
|
|
|
|
const GROUP_LEFT = 57418
|
|
|
|
const GROUP_RIGHT = 57419
|
|
|
|
const IGNORING = 57420
|
|
|
|
const OFFSET = 57421
|
|
|
|
const ON = 57422
|
|
|
|
const WITHOUT = 57423
|
|
|
|
const keywordsEnd = 57424
|
|
|
|
const preprocessorStart = 57425
|
|
|
|
const START = 57426
|
|
|
|
const END = 57427
|
|
|
|
const preprocessorEnd = 57428
|
|
|
|
const startSymbolsStart = 57429
|
|
|
|
const START_METRIC = 57430
|
|
|
|
const START_SERIES_DESCRIPTION = 57431
|
|
|
|
const START_EXPRESSION = 57432
|
|
|
|
const START_METRIC_SELECTOR = 57433
|
|
|
|
const startSymbolsEnd = 57434
|
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",
|
2023-08-25 14:35:42 -07:00
|
|
|
"OPEN_HIST",
|
|
|
|
"CLOSE_HIST",
|
2020-01-08 03:04:47 -08:00
|
|
|
"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",
|
2023-08-25 14:35:42 -07:00
|
|
|
"histogramDescStart",
|
|
|
|
"SUM_DESC",
|
|
|
|
"COUNT_DESC",
|
|
|
|
"SCHEMA_DESC",
|
|
|
|
"OFFSET_DESC",
|
|
|
|
"NEGATIVE_OFFSET_DESC",
|
|
|
|
"BUCKETS_DESC",
|
|
|
|
"NEGATIVE_BUCKETS_DESC",
|
|
|
|
"ZERO_BUCKET_DESC",
|
|
|
|
"ZERO_BUCKET_WIDTH_DESC",
|
|
|
|
"histogramDescEnd",
|
2019-12-05 08:16:12 -08:00
|
|
|
"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{}
|
|
|
|
|
2023-08-25 14:35:42 -07:00
|
|
|
const yyEofCode = 1
|
|
|
|
const yyErrCode = 2
|
|
|
|
const yyInitialStackSize = 16
|
2019-12-05 08:16:12 -08:00
|
|
|
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:915
|
2019-12-05 08:16:12 -08:00
|
|
|
|
|
|
|
//line yacctab:1
|
2023-08-25 14:35:42 -07:00
|
|
|
var yyExca = [...]int16{
|
2019-12-05 08:16:12 -08:00
|
|
|
-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,
|
2023-08-25 14:35:42 -07:00
|
|
|
24, 131,
|
2020-01-08 03:04:47 -08:00
|
|
|
-2, 0,
|
2021-02-16 17:49:00 -08:00
|
|
|
-1, 58,
|
2023-08-25 14:35:42 -07:00
|
|
|
2, 168,
|
|
|
|
15, 168,
|
|
|
|
75, 168,
|
|
|
|
81, 168,
|
2021-08-12 09:38:06 -07:00
|
|
|
-2, 97,
|
2021-08-24 16:22:14 -07:00
|
|
|
-1, 59,
|
2023-08-25 14:35:42 -07:00
|
|
|
2, 169,
|
|
|
|
15, 169,
|
|
|
|
75, 169,
|
|
|
|
81, 169,
|
2021-08-24 16:22:14 -07:00
|
|
|
-2, 98,
|
|
|
|
-1, 60,
|
2023-08-25 14:35:42 -07:00
|
|
|
2, 170,
|
|
|
|
15, 170,
|
|
|
|
75, 170,
|
|
|
|
81, 170,
|
2021-08-12 09:38:06 -07:00
|
|
|
-2, 100,
|
2021-08-24 16:22:14 -07:00
|
|
|
-1, 61,
|
2023-08-25 14:35:42 -07:00
|
|
|
2, 171,
|
|
|
|
15, 171,
|
|
|
|
75, 171,
|
|
|
|
81, 171,
|
2021-08-12 09:38:06 -07:00
|
|
|
-2, 101,
|
2021-08-24 16:22:14 -07:00
|
|
|
-1, 62,
|
2023-08-25 14:35:42 -07:00
|
|
|
2, 172,
|
|
|
|
15, 172,
|
|
|
|
75, 172,
|
|
|
|
81, 172,
|
2021-08-24 16:22:14 -07:00
|
|
|
-2, 102,
|
|
|
|
-1, 63,
|
2023-08-25 14:35:42 -07:00
|
|
|
2, 173,
|
|
|
|
15, 173,
|
|
|
|
75, 173,
|
|
|
|
81, 173,
|
2021-08-24 16:22:14 -07:00
|
|
|
-2, 107,
|
|
|
|
-1, 64,
|
2023-08-25 14:35:42 -07:00
|
|
|
2, 174,
|
|
|
|
15, 174,
|
|
|
|
75, 174,
|
|
|
|
81, 174,
|
2021-08-24 16:22:14 -07:00
|
|
|
-2, 109,
|
|
|
|
-1, 65,
|
2023-08-25 14:35:42 -07:00
|
|
|
2, 175,
|
|
|
|
15, 175,
|
|
|
|
75, 175,
|
|
|
|
81, 175,
|
2021-08-12 09:38:06 -07:00
|
|
|
-2, 111,
|
2021-08-24 16:22:14 -07:00
|
|
|
-1, 66,
|
2023-08-25 14:35:42 -07:00
|
|
|
2, 176,
|
|
|
|
15, 176,
|
|
|
|
75, 176,
|
|
|
|
81, 176,
|
2021-08-12 09:38:06 -07:00
|
|
|
-2, 112,
|
2021-08-24 16:22:14 -07:00
|
|
|
-1, 67,
|
2023-08-25 14:35:42 -07:00
|
|
|
2, 177,
|
|
|
|
15, 177,
|
|
|
|
75, 177,
|
|
|
|
81, 177,
|
2021-08-12 09:38:06 -07:00
|
|
|
-2, 113,
|
2021-08-24 16:22:14 -07:00
|
|
|
-1, 68,
|
2023-08-25 14:35:42 -07:00
|
|
|
2, 178,
|
|
|
|
15, 178,
|
|
|
|
75, 178,
|
|
|
|
81, 178,
|
2021-02-16 17:49:00 -08:00
|
|
|
-2, 114,
|
2021-08-24 16:22:14 -07:00
|
|
|
-1, 69,
|
2023-08-25 14:35:42 -07:00
|
|
|
2, 179,
|
|
|
|
15, 179,
|
|
|
|
75, 179,
|
|
|
|
81, 179,
|
2021-08-24 16:22:14 -07:00
|
|
|
-2, 115,
|
2023-08-25 14:35:42 -07:00
|
|
|
-1, 192,
|
|
|
|
12, 226,
|
|
|
|
13, 226,
|
|
|
|
18, 226,
|
|
|
|
19, 226,
|
|
|
|
25, 226,
|
|
|
|
39, 226,
|
|
|
|
45, 226,
|
|
|
|
46, 226,
|
|
|
|
49, 226,
|
|
|
|
55, 226,
|
|
|
|
60, 226,
|
|
|
|
61, 226,
|
|
|
|
62, 226,
|
|
|
|
63, 226,
|
|
|
|
64, 226,
|
|
|
|
65, 226,
|
|
|
|
66, 226,
|
|
|
|
67, 226,
|
|
|
|
68, 226,
|
|
|
|
69, 226,
|
|
|
|
70, 226,
|
|
|
|
71, 226,
|
|
|
|
75, 226,
|
|
|
|
79, 226,
|
|
|
|
81, 226,
|
|
|
|
84, 226,
|
|
|
|
85, 226,
|
2020-01-08 03:04:47 -08:00
|
|
|
-2, 0,
|
2023-08-25 14:35:42 -07:00
|
|
|
-1, 193,
|
|
|
|
12, 226,
|
|
|
|
13, 226,
|
|
|
|
18, 226,
|
|
|
|
19, 226,
|
|
|
|
25, 226,
|
|
|
|
39, 226,
|
|
|
|
45, 226,
|
|
|
|
46, 226,
|
|
|
|
49, 226,
|
|
|
|
55, 226,
|
|
|
|
60, 226,
|
|
|
|
61, 226,
|
|
|
|
62, 226,
|
|
|
|
63, 226,
|
|
|
|
64, 226,
|
|
|
|
65, 226,
|
|
|
|
66, 226,
|
|
|
|
67, 226,
|
|
|
|
68, 226,
|
|
|
|
69, 226,
|
|
|
|
70, 226,
|
|
|
|
71, 226,
|
|
|
|
75, 226,
|
|
|
|
79, 226,
|
|
|
|
81, 226,
|
|
|
|
84, 226,
|
|
|
|
85, 226,
|
2020-07-08 03:58:12 -07:00
|
|
|
-2, 0,
|
2023-08-25 14:35:42 -07:00
|
|
|
-1, 214,
|
|
|
|
21, 224,
|
2021-08-24 16:22:14 -07:00
|
|
|
-2, 0,
|
2023-08-25 14:35:42 -07:00
|
|
|
-1, 280,
|
|
|
|
21, 225,
|
2021-08-25 03:51:12 -07:00
|
|
|
-2, 0,
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
const yyPrivate = 57344
|
|
|
|
|
2023-08-25 14:35:42 -07:00
|
|
|
const yyLast = 756
|
|
|
|
|
|
|
|
var yyAct = [...]int16{
|
|
|
|
149, 317, 315, 263, 322, 146, 218, 184, 37, 142,
|
|
|
|
275, 276, 150, 113, 77, 101, 220, 102, 6, 104,
|
|
|
|
148, 190, 103, 191, 126, 105, 230, 192, 193, 153,
|
|
|
|
287, 334, 236, 312, 311, 106, 308, 153, 257, 255,
|
|
|
|
249, 289, 153, 254, 335, 121, 172, 144, 173, 154,
|
|
|
|
333, 258, 154, 332, 145, 248, 278, 154, 306, 232,
|
|
|
|
233, 153, 108, 234, 109, 155, 316, 259, 155, 107,
|
|
|
|
287, 247, 296, 155, 221, 223, 225, 226, 227, 235,
|
|
|
|
237, 240, 241, 242, 243, 244, 175, 100, 222, 224,
|
|
|
|
228, 229, 231, 238, 239, 104, 174, 176, 245, 246,
|
|
|
|
143, 105, 151, 152, 2, 3, 4, 5, 188, 57,
|
|
|
|
156, 295, 82, 84, 210, 166, 160, 163, 159, 158,
|
|
|
|
106, 323, 186, 93, 94, 100, 294, 96, 97, 99,
|
|
|
|
83, 189, 178, 293, 187, 100, 194, 195, 196, 197,
|
|
|
|
198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
|
|
|
|
208, 84, 98, 209, 220, 211, 212, 122, 253, 180,
|
|
|
|
72, 93, 94, 33, 230, 96, 110, 99, 83, 215,
|
|
|
|
236, 284, 162, 214, 217, 96, 283, 99, 7, 281,
|
|
|
|
145, 252, 179, 251, 10, 161, 145, 170, 213, 115,
|
|
|
|
98, 282, 169, 307, 74, 305, 256, 232, 233, 114,
|
|
|
|
98, 234, 273, 274, 277, 168, 304, 250, 303, 247,
|
|
|
|
302, 301, 221, 223, 225, 226, 227, 235, 237, 240,
|
|
|
|
241, 242, 243, 244, 280, 300, 222, 224, 228, 229,
|
|
|
|
231, 238, 239, 157, 299, 298, 245, 246, 297, 81,
|
|
|
|
145, 127, 128, 129, 130, 131, 132, 133, 134, 135,
|
|
|
|
136, 137, 138, 139, 140, 141, 286, 288, 285, 290,
|
|
|
|
79, 182, 120, 34, 119, 48, 291, 292, 185, 262,
|
|
|
|
78, 73, 188, 8, 118, 153, 261, 35, 177, 117,
|
|
|
|
265, 266, 264, 270, 272, 269, 271, 267, 268, 115,
|
|
|
|
309, 310, 116, 1, 279, 154, 47, 314, 46, 114,
|
|
|
|
319, 320, 321, 45, 318, 44, 324, 112, 326, 325,
|
|
|
|
79, 155, 125, 327, 328, 43, 51, 72, 329, 53,
|
|
|
|
78, 42, 22, 52, 331, 41, 165, 56, 76, 54,
|
|
|
|
9, 9, 123, 336, 164, 40, 124, 39, 38, 49,
|
|
|
|
183, 330, 260, 70, 80, 181, 216, 75, 147, 18,
|
|
|
|
19, 55, 219, 20, 171, 50, 111, 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, 0, 51, 72, 0, 53, 313, 0, 22, 52,
|
|
|
|
0, 0, 0, 0, 0, 54, 0, 265, 266, 264,
|
|
|
|
270, 272, 269, 271, 267, 268, 0, 0, 0, 70,
|
|
|
|
0, 0, 0, 0, 0, 18, 19, 0, 0, 20,
|
2021-08-25 03:51:12 -07:00
|
|
|
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,
|
2023-08-25 14:35:42 -07:00
|
|
|
0, 30, 0, 0, 31, 32, 51, 72, 0, 53,
|
|
|
|
0, 0, 22, 52, 0, 0, 0, 0, 0, 54,
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
0, 0, 0, 70, 0, 0, 0, 0, 0, 18,
|
|
|
|
19, 0, 0, 20, 0, 0, 0, 17, 72, 71,
|
|
|
|
0, 0, 0, 22, 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,
|
|
|
|
18, 19, 0, 0, 20, 0, 0, 0, 17, 33,
|
|
|
|
0, 0, 0, 0, 22, 11, 12, 14, 15, 16,
|
|
|
|
21, 23, 25, 26, 27, 28, 29, 0, 0, 0,
|
|
|
|
13, 0, 0, 0, 24, 0, 30, 0, 0, 31,
|
|
|
|
32, 18, 19, 0, 0, 20, 0, 0, 0, 0,
|
|
|
|
0, 0, 0, 0, 0, 0, 11, 12, 14, 15,
|
|
|
|
16, 21, 23, 25, 26, 27, 28, 29, 100, 0,
|
|
|
|
0, 13, 0, 0, 0, 24, 167, 30, 0, 0,
|
|
|
|
31, 32, 0, 0, 0, 0, 0, 100, 0, 0,
|
2021-08-24 16:22:14 -07:00
|
|
|
0, 0, 0, 82, 84, 85, 0, 86, 87, 88,
|
2023-08-25 14:35:42 -07:00
|
|
|
89, 90, 91, 92, 93, 94, 95, 0, 96, 97,
|
|
|
|
99, 83, 82, 84, 85, 0, 86, 87, 88, 89,
|
|
|
|
90, 91, 92, 93, 94, 95, 0, 96, 97, 99,
|
|
|
|
83, 100, 0, 98, 0, 0, 0, 0, 0, 0,
|
2020-07-08 03:58:12 -07:00
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
2023-08-25 14:35:42 -07:00
|
|
|
100, 0, 98, 0, 0, 0, 82, 84, 85, 0,
|
|
|
|
86, 87, 88, 0, 90, 91, 92, 93, 94, 95,
|
|
|
|
0, 96, 97, 99, 83, 82, 84, 85, 0, 86,
|
|
|
|
87, 0, 0, 90, 91, 0, 93, 94, 95, 0,
|
|
|
|
96, 97, 99, 83, 0, 0, 98, 0, 0, 0,
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
0, 0, 0, 0, 0, 98,
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
|
|
|
|
2023-08-25 14:35:42 -07:00
|
|
|
var yyPact = [...]int16{
|
|
|
|
16, 168, 536, 536, 380, 495, -1000, -1000, -1000, 150,
|
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,
|
2023-08-25 14:35:42 -07:00
|
|
|
-1000, -1000, -1000, 308, -1000, 237, -1000, 613, -1000, -1000,
|
2019-12-18 06:18:52 -08:00
|
|
|
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
2023-08-25 14:35:42 -07:00
|
|
|
20, 105, -1000, 454, -1000, 454, 147, -1000, -1000, -1000,
|
2019-12-18 06:18:52 -08:00
|
|
|
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
2023-08-25 14:35:42 -07:00
|
|
|
-1000, -1000, 287, -1000, -1000, 272, -1000, -1000, 260, -1000,
|
|
|
|
21, -1000, -50, -50, -50, -50, -50, -50, -50, -50,
|
|
|
|
-50, -50, -50, -50, -50, -50, -50, -50, 45, 18,
|
|
|
|
231, 105, -56, -1000, 170, 170, 304, -1000, 594, 121,
|
|
|
|
-1000, 185, -1000, -1000, 44, -1000, -1000, 258, -1000, 157,
|
|
|
|
-1000, 256, 454, -1000, -57, -49, -1000, 454, 454, 454,
|
|
|
|
454, 454, 454, 454, 454, 454, 454, 454, 454, 454,
|
|
|
|
454, 454, -1000, 171, -1000, -1000, -1000, 99, -1000, -1000,
|
|
|
|
-1000, -1000, -1000, -1000, 42, 42, 167, -1000, -1000, -1000,
|
|
|
|
-1000, 152, -1000, -1000, 33, -1000, 613, -1000, -1000, 187,
|
|
|
|
-1000, 156, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
|
|
|
-1000, -1000, 17, 13, 12, -1000, -1000, -1000, 252, 111,
|
|
|
|
170, 170, 170, 170, 121, 121, 73, 73, 73, 676,
|
|
|
|
657, 73, 73, 676, 121, 121, 73, 121, 111, -1000,
|
|
|
|
34, -1000, -1000, -1000, 177, -1000, 169, -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,
|
2023-08-25 14:35:42 -07:00
|
|
|
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 454,
|
|
|
|
-1000, -1000, -1000, -1000, 51, 51, 15, 51, 92, 92,
|
|
|
|
109, 55, -1000, -1000, 232, 229, 228, 219, 205, 204,
|
|
|
|
202, 200, 189, -1000, -1000, -1000, -1000, -1000, -1000, 37,
|
|
|
|
191, -1000, -1000, 14, -1000, 613, -1000, -1000, -1000, 51,
|
|
|
|
-1000, 8, 7, 379, -1000, -1000, -1000, 11, 10, 42,
|
|
|
|
42, 42, 107, 11, 107, 11, -1000, -1000, -1000, -1000,
|
|
|
|
-1000, 51, 51, -1000, -1000, -1000, 51, -1000, -1000, -1000,
|
|
|
|
-1000, -1000, -1000, 42, -1000, -1000, -1000, -1000, -1000, -1000,
|
|
|
|
29, -1000, 23, -1000, -1000, -1000, -1000,
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
|
|
|
|
2023-08-25 14:35:42 -07:00
|
|
|
var yyPgo = [...]int16{
|
|
|
|
0, 356, 13, 355, 6, 354, 352, 327, 351, 348,
|
|
|
|
184, 273, 347, 14, 346, 11, 10, 345, 344, 7,
|
|
|
|
342, 3, 4, 341, 2, 1, 0, 340, 12, 5,
|
|
|
|
339, 338, 15, 157, 337, 336, 8, 335, 334, 17,
|
|
|
|
332, 109, 325, 321, 315, 312, 305, 303, 298, 296,
|
|
|
|
265, 9, 294, 293, 263,
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
|
|
|
|
2023-08-25 14:35:42 -07:00
|
|
|
var yyR1 = [...]int8{
|
|
|
|
0, 53, 53, 53, 53, 53, 53, 53, 36, 36,
|
|
|
|
36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
|
|
|
|
31, 31, 31, 31, 32, 32, 34, 34, 34, 34,
|
|
|
|
34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
|
|
|
|
34, 34, 33, 35, 35, 45, 45, 40, 40, 40,
|
|
|
|
40, 15, 15, 15, 15, 14, 14, 14, 4, 4,
|
|
|
|
37, 39, 39, 38, 38, 38, 46, 44, 44, 44,
|
|
|
|
30, 30, 30, 9, 9, 42, 48, 48, 48, 48,
|
|
|
|
48, 49, 50, 50, 50, 41, 41, 41, 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,
|
2023-08-25 14:35:42 -07:00
|
|
|
54, 18, 18, 18, 18, 17, 17, 17, 17, 17,
|
|
|
|
17, 17, 17, 17, 27, 27, 27, 19, 19, 19,
|
|
|
|
19, 20, 20, 20, 21, 21, 21, 21, 21, 21,
|
|
|
|
21, 21, 21, 22, 22, 23, 23, 23, 3, 3,
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
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,
|
2023-08-25 14:35:42 -07:00
|
|
|
6, 6, 6, 6, 6, 6, 6, 8, 8, 5,
|
|
|
|
5, 5, 5, 43, 26, 28, 28, 29, 29, 25,
|
|
|
|
24, 24, 51, 47, 52, 52, 16, 16,
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
|
|
|
|
2023-08-25 14:35:42 -07:00
|
|
|
var yyR2 = [...]int8{
|
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,
|
2023-08-25 14:35:42 -07:00
|
|
|
1, 3, 5, 5, 1, 1, 1, 4, 3, 3,
|
|
|
|
2, 3, 1, 2, 3, 3, 3, 3, 3, 3,
|
|
|
|
3, 3, 3, 4, 3, 3, 1, 2, 1, 1,
|
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,
|
2023-08-25 14:35:42 -07:00
|
|
|
1, 1, 1, 1, 1, 2, 2, 1, 1, 1,
|
|
|
|
2, 1, 1, 1, 0, 1, 0, 1,
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
|
|
|
|
2023-08-25 14:35:42 -07:00
|
|
|
var yyChk = [...]int16{
|
|
|
|
-1000, -53, 88, 89, 90, 91, 2, 10, -11, -7,
|
|
|
|
-10, 60, 61, 75, 62, 63, 64, 12, 45, 46,
|
|
|
|
49, 65, 18, 66, 79, 67, 68, 69, 70, 71,
|
|
|
|
81, 84, 85, 13, -54, -11, 10, -36, -31, -34,
|
|
|
|
-37, -42, -43, -44, -46, -47, -48, -49, -50, -30,
|
|
|
|
-3, 12, 19, 15, 25, -8, -7, -41, 60, 61,
|
|
|
|
62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
|
|
|
|
39, 55, 13, -50, -10, -12, 20, -13, 12, 2,
|
|
|
|
-18, 2, 39, 57, 40, 41, 43, 44, 45, 46,
|
|
|
|
47, 48, 49, 50, 51, 52, 54, 55, 79, 56,
|
|
|
|
14, -32, -39, 2, 75, 81, 15, -39, -36, -36,
|
|
|
|
-41, -1, 20, -2, 12, 2, 20, 7, 2, 4,
|
|
|
|
2, 24, -33, -40, -35, -45, 74, -33, -33, -33,
|
|
|
|
-33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
|
|
|
|
-33, -33, -51, 55, 2, 9, -29, -9, 2, -26,
|
|
|
|
-28, 84, 85, 19, 39, 55, -51, 2, -39, -32,
|
|
|
|
-15, 15, 2, -15, -38, 22, -36, 22, 20, 7,
|
|
|
|
2, -5, 2, 4, 52, 42, 53, 20, -13, 25,
|
|
|
|
2, -17, 5, -27, -19, 12, -26, -28, 16, -36,
|
|
|
|
78, 80, 76, 77, -36, -36, -36, -36, -36, -36,
|
|
|
|
-36, -36, -36, -36, -36, -36, -36, -36, -36, -51,
|
|
|
|
15, -26, -26, 21, 6, 2, -14, 22, -4, -6,
|
|
|
|
2, 60, 74, 61, 75, 62, 63, 64, 76, 77,
|
|
|
|
12, 78, 45, 46, 49, 65, 18, 66, 79, 80,
|
|
|
|
67, 68, 69, 70, 71, 84, 85, 57, 22, 7,
|
|
|
|
20, -2, 25, 2, 26, 26, -28, 26, 39, 55,
|
|
|
|
-20, 24, 17, -21, 30, 28, 29, 35, 36, 33,
|
|
|
|
31, 34, 32, -15, -15, -16, -15, -16, 22, -52,
|
|
|
|
-51, 2, 22, 7, 2, -36, -25, 19, -25, 26,
|
|
|
|
-25, -19, -19, 24, 17, 2, 17, 6, 6, 6,
|
|
|
|
6, 6, 6, 6, 6, 6, 21, 2, 22, -4,
|
|
|
|
-25, 26, 26, 17, -21, -24, 55, -25, -29, -26,
|
|
|
|
-26, -26, -22, 14, -24, -22, -24, -25, -25, -25,
|
|
|
|
-23, -26, 24, 21, 2, 21, -26,
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
|
|
|
|
2023-08-25 14:35:42 -07:00
|
|
|
var yyDef = [...]int16{
|
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,
|
2023-08-25 14:35:42 -07:00
|
|
|
0, 103, 213, 0, 223, 0, 83, 84, -2, -2,
|
2021-08-12 09:38:06 -07:00
|
|
|
-2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
2023-08-25 14:35:42 -07:00
|
|
|
207, 208, 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,
|
2023-08-25 14:35:42 -07:00
|
|
|
0, 0, 67, 0, 69, 222, 70, 0, 72, 217,
|
|
|
|
218, 73, 74, 214, 0, 0, 0, 80, 20, 21,
|
2021-08-24 16:22:14 -07:00
|
|
|
24, 0, 54, 25, 0, 62, 64, 66, 85, 0,
|
2023-08-25 14:35:42 -07:00
|
|
|
90, 0, 93, 209, 210, 211, 212, 120, 123, 126,
|
|
|
|
127, 132, 135, 137, 140, 144, 145, 146, 0, 26,
|
|
|
|
0, 0, -2, -2, 27, 28, 29, 30, 31, 32,
|
|
|
|
33, 34, 35, 36, 37, 38, 39, 40, 41, 68,
|
|
|
|
0, 215, 216, 75, -2, 79, 0, 53, 56, 58,
|
|
|
|
59, 180, 181, 182, 183, 184, 185, 186, 187, 188,
|
|
|
|
189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
|
|
|
|
199, 200, 201, 202, 203, 204, 205, 206, 61, 65,
|
|
|
|
86, 88, 91, 92, 0, 0, 0, 0, 0, 0,
|
|
|
|
0, 0, 150, 152, 0, 0, 0, 0, 0, 0,
|
|
|
|
0, 0, 0, 45, 46, 49, 227, 50, 71, 0,
|
|
|
|
-2, 78, 51, 0, 57, 63, 136, 219, 138, 0,
|
|
|
|
141, 0, 0, 0, 148, 153, 149, 0, 0, 0,
|
|
|
|
0, 0, 0, 0, 0, 0, 76, 77, 52, 55,
|
|
|
|
139, 0, 0, 147, 151, 154, 0, 221, 155, 156,
|
|
|
|
157, 158, 159, 0, 160, 161, 162, 142, 143, 220,
|
|
|
|
0, 166, 0, 164, 167, 163, 165,
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
|
|
|
|
2023-08-25 14:35:42 -07:00
|
|
|
var yyTok1 = [...]int8{
|
2019-12-05 08:16:12 -08:00
|
|
|
1,
|
|
|
|
}
|
|
|
|
|
2023-08-25 14:35:42 -07:00
|
|
|
var yyTok2 = [...]int8{
|
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,
|
2023-08-25 14:35:42 -07:00
|
|
|
72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
|
|
|
|
82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
|
|
|
|
92,
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
2021-02-16 17:49:00 -08:00
|
|
|
|
2023-08-25 14:35:42 -07:00
|
|
|
var yyTok3 = [...]int8{
|
2019-12-05 08:16:12 -08:00
|
|
|
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.
|
2023-08-25 14:35:42 -07:00
|
|
|
base := int(yyPact[state])
|
2019-12-05 08:16:12 -08:00
|
|
|
for tok := TOKSTART; tok-1 < len(yyToknames); tok++ {
|
2023-08-25 14:35:42 -07:00
|
|
|
if n := base + tok; n >= 0 && n < yyLast && int(yyChk[int(yyAct[n])]) == tok {
|
2019-12-05 08:16:12 -08:00
|
|
|
if len(expected) == cap(expected) {
|
|
|
|
return res
|
|
|
|
}
|
|
|
|
expected = append(expected, tok)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if yyDef[state] == -2 {
|
|
|
|
i := 0
|
2023-08-25 14:35:42 -07:00
|
|
|
for yyExca[i] != -1 || int(yyExca[i+1]) != state {
|
2019-12-05 08:16:12 -08:00
|
|
|
i += 2
|
|
|
|
}
|
|
|
|
|
|
|
|
// Look for tokens that we accept or reduce.
|
|
|
|
for i += 2; yyExca[i] >= 0; i += 2 {
|
2023-08-25 14:35:42 -07:00
|
|
|
tok := int(yyExca[i])
|
2019-12-05 08:16:12 -08:00
|
|
|
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 {
|
2023-08-25 14:35:42 -07:00
|
|
|
token = int(yyTok1[0])
|
2019-12-05 08:16:12 -08:00
|
|
|
goto out
|
|
|
|
}
|
|
|
|
if char < len(yyTok1) {
|
2023-08-25 14:35:42 -07:00
|
|
|
token = int(yyTok1[char])
|
2019-12-05 08:16:12 -08:00
|
|
|
goto out
|
|
|
|
}
|
|
|
|
if char >= yyPrivate {
|
|
|
|
if char < yyPrivate+len(yyTok2) {
|
2023-08-25 14:35:42 -07:00
|
|
|
token = int(yyTok2[char-yyPrivate])
|
2019-12-05 08:16:12 -08:00
|
|
|
goto out
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for i := 0; i < len(yyTok3); i += 2 {
|
2023-08-25 14:35:42 -07:00
|
|
|
token = int(yyTok3[i+0])
|
2019-12-05 08:16:12 -08:00
|
|
|
if token == char {
|
2023-08-25 14:35:42 -07:00
|
|
|
token = int(yyTok3[i+1])
|
2019-12-05 08:16:12 -08:00
|
|
|
goto out
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
out:
|
|
|
|
if token == 0 {
|
2023-08-25 14:35:42 -07:00
|
|
|
token = int(yyTok2[1]) /* unknown char */
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
|
|
|
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:
|
2023-08-25 14:35:42 -07:00
|
|
|
yyn = int(yyPact[yystate])
|
2019-12-05 08:16:12 -08:00
|
|
|
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
|
|
|
|
}
|
2023-08-25 14:35:42 -07:00
|
|
|
yyn = int(yyAct[yyn])
|
|
|
|
if int(yyChk[yyn]) == yytoken { /* valid shift */
|
2019-12-05 08:16:12 -08:00
|
|
|
yyrcvr.char = -1
|
|
|
|
yytoken = -1
|
|
|
|
yyVAL = yyrcvr.lval
|
|
|
|
yystate = yyn
|
|
|
|
if Errflag > 0 {
|
|
|
|
Errflag--
|
|
|
|
}
|
|
|
|
goto yystack
|
|
|
|
}
|
|
|
|
|
|
|
|
yydefault:
|
|
|
|
/* default state action */
|
2023-08-25 14:35:42 -07:00
|
|
|
yyn = int(yyDef[yystate])
|
2019-12-05 08:16:12 -08:00
|
|
|
if yyn == -2 {
|
|
|
|
if yyrcvr.char < 0 {
|
|
|
|
yyrcvr.char, yytoken = yylex1(yylex, &yyrcvr.lval)
|
|
|
|
}
|
|
|
|
|
|
|
|
/* look through exception table */
|
|
|
|
xi := 0
|
|
|
|
for {
|
2023-08-25 14:35:42 -07:00
|
|
|
if yyExca[xi+0] == -1 && int(yyExca[xi+1]) == yystate {
|
2019-12-05 08:16:12 -08:00
|
|
|
break
|
|
|
|
}
|
|
|
|
xi += 2
|
|
|
|
}
|
|
|
|
for xi += 2; ; xi += 2 {
|
2023-08-25 14:35:42 -07:00
|
|
|
yyn = int(yyExca[xi+0])
|
2019-12-05 08:16:12 -08:00
|
|
|
if yyn < 0 || yyn == yytoken {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2023-08-25 14:35:42 -07:00
|
|
|
yyn = int(yyExca[xi+1])
|
2019-12-05 08:16:12 -08:00
|
|
|
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 {
|
2023-08-25 14:35:42 -07:00
|
|
|
yyn = int(yyPact[yyS[yyp].yys]) + yyErrCode
|
2019-12-05 08:16:12 -08:00
|
|
|
if yyn >= 0 && yyn < yyLast {
|
2023-08-25 14:35:42 -07:00
|
|
|
yystate = int(yyAct[yyn]) /* simulate a shift of "error" */
|
|
|
|
if int(yyChk[yystate]) == yyErrCode {
|
2019-12-05 08:16:12 -08:00
|
|
|
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"
|
|
|
|
|
2023-08-25 14:35:42 -07:00
|
|
|
yyp -= int(yyR2[yyn])
|
2019-12-05 08:16:12 -08:00
|
|
|
// 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 */
|
2023-08-25 14:35:42 -07:00
|
|
|
yyn = int(yyR1[yyn])
|
|
|
|
yyg := int(yyPgo[yyn])
|
2019-12-05 08:16:12 -08:00
|
|
|
yyj := yyg + yyS[yyp].yys + 1
|
|
|
|
|
|
|
|
if yyj >= yyLast {
|
2023-08-25 14:35:42 -07:00
|
|
|
yystate = int(yyAct[yyg])
|
2019-12-05 08:16:12 -08:00
|
|
|
} else {
|
2023-08-25 14:35:42 -07:00
|
|
|
yystate = int(yyAct[yyj])
|
|
|
|
if int(yyChk[yystate]) != -yyn {
|
|
|
|
yystate = int(yyAct[yyg])
|
2019-12-05 08:16:12 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
// dummy call; replaced with literal code
|
|
|
|
switch yynt {
|
|
|
|
|
|
|
|
case 1:
|
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:199
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:202
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:204
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:206
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:209
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:232
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:234
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:236
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:238
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:246
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:252
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:265
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:266
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:267
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:268
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:269
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:270
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:271
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:272
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:273
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:274
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:275
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:276
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:277
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:278
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:279
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:280
|
2021-08-24 16:22:14 -07:00
|
|
|
{
|
|
|
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:288
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:293
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:301
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:306
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:316
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:322
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:331
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:333
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:335
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:337
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:343
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:345
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:347
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:351
|
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]
|
2023-08-25 14:35:42 -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
|
|
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:366
|
2019-12-16 05:58:47 -08:00
|
|
|
{
|
2023-03-22 02:02:10 -07:00
|
|
|
fn, exist := getFunction(yyDollar[1].item.Val, yylex.(*parser).functions)
|
2020-01-08 03:04:47 -08:00
|
|
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:383
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:385
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:389
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:391
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:393
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:404
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:412
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:417
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:422
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:429
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:434
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:439
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:449
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:474
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:484
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:486
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:488
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:490
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:500
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:518
|
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]
|
2023-08-25 14:35:42 -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
|
|
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:536
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:544
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:551
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:558
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:567
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:575
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:577
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:581
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:583
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:585
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:587
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:595
|
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)
|
2023-03-22 08:46:02 -07:00
|
|
|
yyVAL.labels = b.Labels()
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:597
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:604
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:606
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:608
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:610
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:614
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:616
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:618
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:623
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:625
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:627
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:629
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:640
|
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]
|
2023-08-25 14:35:42 -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
|
|
|
}
|
2021-08-24 16:22:14 -07:00
|
|
|
case 132:
|
2019-12-21 00:44:12 -08:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:651
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:653
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:655
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:659
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:661
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:668
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:670
|
2019-12-21 00:44:12 -08:00
|
|
|
{
|
2020-02-03 08:45:41 -08:00
|
|
|
yyVAL.series = []SequenceValue{}
|
2023-08-25 14:35:42 -07:00
|
|
|
// Add an additional value for time 0, which we ignore in tests.
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:678
|
2019-12-21 00:44:12 -08:00
|
|
|
{
|
2020-02-03 08:45:41 -08:00
|
|
|
yyVAL.series = []SequenceValue{}
|
2023-08-25 14:35:42 -07:00
|
|
|
// Add an additional value for time 0, which we ignore in tests.
|
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]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:688
|
|
|
|
{
|
|
|
|
yyVAL.series = []SequenceValue{{Histogram: yyDollar[1].histogram}}
|
|
|
|
}
|
|
|
|
case 141:
|
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:692
|
|
|
|
{
|
|
|
|
yyVAL.series = []SequenceValue{}
|
|
|
|
// Add an additional value for time 0, which we ignore in tests.
|
|
|
|
for i := uint64(0); i <= yyDollar[3].uint; i++ {
|
|
|
|
yyVAL.series = append(yyVAL.series, SequenceValue{Histogram: yyDollar[1].histogram})
|
|
|
|
//$1 += $2
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 142:
|
|
|
|
yyDollar = yyS[yypt-5 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:701
|
|
|
|
{
|
|
|
|
val, err := yylex.(*parser).histogramsIncreaseSeries(yyDollar[1].histogram, yyDollar[3].histogram, yyDollar[5].uint)
|
|
|
|
if err != nil {
|
|
|
|
yylex.(*parser).addSemanticError(err)
|
|
|
|
}
|
|
|
|
yyVAL.series = val
|
|
|
|
}
|
|
|
|
case 143:
|
|
|
|
yyDollar = yyS[yypt-5 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:709
|
|
|
|
{
|
|
|
|
val, err := yylex.(*parser).histogramsDecreaseSeries(yyDollar[1].histogram, yyDollar[3].histogram, yyDollar[5].uint)
|
|
|
|
if err != nil {
|
|
|
|
yylex.(*parser).addSemanticError(err)
|
|
|
|
}
|
|
|
|
yyVAL.series = val
|
|
|
|
}
|
|
|
|
case 144:
|
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:719
|
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
|
|
|
}
|
2023-08-25 14:35:42 -07:00
|
|
|
case 147:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:731
|
|
|
|
{
|
|
|
|
yyVAL.histogram = yylex.(*parser).buildHistogramFromMap(&yyDollar[2].descriptors)
|
|
|
|
}
|
|
|
|
case 148:
|
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:735
|
|
|
|
{
|
|
|
|
yyVAL.histogram = yylex.(*parser).buildHistogramFromMap(&yyDollar[2].descriptors)
|
|
|
|
}
|
|
|
|
case 149:
|
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:739
|
|
|
|
{
|
|
|
|
m := yylex.(*parser).newMap()
|
|
|
|
yyVAL.histogram = yylex.(*parser).buildHistogramFromMap(&m)
|
|
|
|
}
|
|
|
|
case 150:
|
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:744
|
|
|
|
{
|
|
|
|
m := yylex.(*parser).newMap()
|
|
|
|
yyVAL.histogram = yylex.(*parser).buildHistogramFromMap(&m)
|
|
|
|
}
|
|
|
|
case 151:
|
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:752
|
|
|
|
{
|
|
|
|
yyVAL.descriptors = *(yylex.(*parser).mergeMaps(&yyDollar[1].descriptors, &yyDollar[3].descriptors))
|
|
|
|
}
|
|
|
|
case 152:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:756
|
|
|
|
{
|
|
|
|
yyVAL.descriptors = yyDollar[1].descriptors
|
|
|
|
}
|
|
|
|
case 153:
|
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:759
|
|
|
|
{
|
|
|
|
yylex.(*parser).unexpected("histogram description", "histogram description key, e.g. buckets:[5 10 7]")
|
|
|
|
}
|
|
|
|
case 154:
|
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:766
|
|
|
|
{
|
|
|
|
yyVAL.descriptors = yylex.(*parser).newMap()
|
|
|
|
yyVAL.descriptors["schema"] = yyDollar[3].int
|
|
|
|
}
|
|
|
|
case 155:
|
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:771
|
|
|
|
{
|
|
|
|
yyVAL.descriptors = yylex.(*parser).newMap()
|
|
|
|
yyVAL.descriptors["sum"] = yyDollar[3].float
|
|
|
|
}
|
|
|
|
case 156:
|
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:776
|
|
|
|
{
|
|
|
|
yyVAL.descriptors = yylex.(*parser).newMap()
|
|
|
|
yyVAL.descriptors["count"] = yyDollar[3].float
|
|
|
|
}
|
|
|
|
case 157:
|
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:781
|
|
|
|
{
|
|
|
|
yyVAL.descriptors = yylex.(*parser).newMap()
|
|
|
|
yyVAL.descriptors["z_bucket"] = yyDollar[3].float
|
|
|
|
}
|
|
|
|
case 158:
|
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:786
|
|
|
|
{
|
|
|
|
yyVAL.descriptors = yylex.(*parser).newMap()
|
|
|
|
yyVAL.descriptors["z_bucket_w"] = yyDollar[3].float
|
|
|
|
}
|
|
|
|
case 159:
|
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:791
|
|
|
|
{
|
|
|
|
yyVAL.descriptors = yylex.(*parser).newMap()
|
|
|
|
yyVAL.descriptors["buckets"] = yyDollar[3].bucket_set
|
|
|
|
}
|
|
|
|
case 160:
|
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:796
|
|
|
|
{
|
|
|
|
yyVAL.descriptors = yylex.(*parser).newMap()
|
|
|
|
yyVAL.descriptors["offset"] = yyDollar[3].int
|
|
|
|
}
|
|
|
|
case 161:
|
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:801
|
|
|
|
{
|
|
|
|
yyVAL.descriptors = yylex.(*parser).newMap()
|
|
|
|
yyVAL.descriptors["n_buckets"] = yyDollar[3].bucket_set
|
|
|
|
}
|
|
|
|
case 162:
|
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:806
|
|
|
|
{
|
|
|
|
yyVAL.descriptors = yylex.(*parser).newMap()
|
|
|
|
yyVAL.descriptors["n_offset"] = yyDollar[3].int
|
|
|
|
}
|
|
|
|
case 163:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:813
|
|
|
|
{
|
|
|
|
yyVAL.bucket_set = yyDollar[2].bucket_set
|
|
|
|
}
|
|
|
|
case 164:
|
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:817
|
|
|
|
{
|
|
|
|
yyVAL.bucket_set = yyDollar[2].bucket_set
|
|
|
|
}
|
|
|
|
case 165:
|
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:823
|
|
|
|
{
|
|
|
|
yyVAL.bucket_set = append(yyDollar[1].bucket_set, yyDollar[3].float)
|
|
|
|
}
|
|
|
|
case 166:
|
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:827
|
|
|
|
{
|
|
|
|
yyVAL.bucket_set = []float64{yyDollar[1].float}
|
|
|
|
}
|
|
|
|
case 213:
|
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:852
|
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
|
|
|
}
|
2023-08-25 14:35:42 -07:00
|
|
|
case 214:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:860
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.float = yylex.(*parser).number(yyDollar[1].item.Val)
|
|
|
|
}
|
2023-08-25 14:35:42 -07:00
|
|
|
case 215:
|
2019-12-21 00:44:12 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:862
|
2019-12-21 00:44:12 -08:00
|
|
|
{
|
|
|
|
yyVAL.float = yyDollar[2].float
|
|
|
|
}
|
2023-08-25 14:35:42 -07:00
|
|
|
case 216:
|
2019-12-21 00:44:12 -08:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:863
|
2019-12-21 00:44:12 -08:00
|
|
|
{
|
|
|
|
yyVAL.float = -yyDollar[2].float
|
|
|
|
}
|
2023-08-25 14:35:42 -07:00
|
|
|
case 219:
|
2019-12-21 00:44:12 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:869
|
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
|
|
|
}
|
|
|
|
}
|
2023-08-25 14:35:42 -07:00
|
|
|
case 220:
|
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:878
|
|
|
|
{
|
|
|
|
yyVAL.int = -int64(yyDollar[2].uint)
|
|
|
|
}
|
|
|
|
case 221:
|
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
//line promql/parser/generated_parser.y:879
|
|
|
|
{
|
|
|
|
yyVAL.int = int64(yyDollar[1].uint)
|
|
|
|
}
|
|
|
|
case 222:
|
2019-12-21 00:44:12 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:883
|
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
|
|
|
}
|
2023-08-25 14:35:42 -07:00
|
|
|
case 223:
|
2019-12-21 00:44:12 -08:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:894
|
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
|
|
|
}
|
2023-08-25 14:35:42 -07:00
|
|
|
case 224:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-0 : yypt+1]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:907
|
2020-01-08 03:04:47 -08:00
|
|
|
{
|
|
|
|
yyVAL.duration = 0
|
|
|
|
}
|
2023-08-25 14:35:42 -07:00
|
|
|
case 226:
|
2020-01-08 03:04:47 -08:00
|
|
|
yyDollar = yyS[yypt-0 : yypt+1]
|
2023-08-25 14:35:42 -07:00
|
|
|
//line promql/parser/generated_parser.y:911
|
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 */
|
|
|
|
}
|