2024-02-15 19:25:12 +00:00
|
|
|
// Code generated by goyacc -l -o promql/parser/generated_parser.y.go promql/parser/generated_parser.y. DO NOT EDIT.
|
2020-02-03 16:23:44 +00:00
|
|
|
package parser
|
2019-12-05 16:16:12 +00:00
|
|
|
|
2021-01-20 10:57:39 +00:00
|
|
|
import __yyfmt__ "fmt"
|
|
|
|
|
2019-12-05 16:16:12 +00:00
|
|
|
import (
|
2019-12-21 08:44:12 +00:00
|
|
|
"math"
|
|
|
|
"strconv"
|
2020-01-08 11:04:47 +00:00
|
|
|
"time"
|
2019-12-16 16:38:18 +00:00
|
|
|
|
2023-08-25 21:35:42 +00:00
|
|
|
"github.com/prometheus/prometheus/model/histogram"
|
2021-11-08 14:23:17 +00:00
|
|
|
"github.com/prometheus/prometheus/model/labels"
|
|
|
|
"github.com/prometheus/prometheus/model/value"
|
2023-09-14 16:57:31 +00:00
|
|
|
"github.com/prometheus/prometheus/promql/parser/posrange"
|
2021-01-20 10:57:39 +00:00
|
|
|
)
|
2019-12-05 16:16:12 +00:00
|
|
|
|
|
|
|
type yySymType struct {
|
2023-08-25 21:35:42 +00: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 16:16:12 +00:00
|
|
|
}
|
|
|
|
|
2023-08-25 21:35:42 +00: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 16:16:12 +00:00
|
|
|
|
|
|
|
var yyToknames = [...]string{
|
|
|
|
"$end",
|
|
|
|
"error",
|
|
|
|
"$unk",
|
2020-09-09 10:10:02 +00:00
|
|
|
"EQL",
|
2020-01-08 11:04:47 +00:00
|
|
|
"BLANK",
|
|
|
|
"COLON",
|
|
|
|
"COMMA",
|
2019-12-05 16:16:12 +00:00
|
|
|
"COMMENT",
|
2020-01-08 11:04:47 +00:00
|
|
|
"DURATION",
|
|
|
|
"EOF",
|
|
|
|
"ERROR",
|
2019-12-05 16:16:12 +00:00
|
|
|
"IDENTIFIER",
|
|
|
|
"LEFT_BRACE",
|
|
|
|
"LEFT_BRACKET",
|
2020-01-08 11:04:47 +00:00
|
|
|
"LEFT_PAREN",
|
2023-08-25 21:35:42 +00:00
|
|
|
"OPEN_HIST",
|
|
|
|
"CLOSE_HIST",
|
2020-01-08 11:04:47 +00:00
|
|
|
"METRIC_IDENTIFIER",
|
|
|
|
"NUMBER",
|
|
|
|
"RIGHT_BRACE",
|
2019-12-05 16:16:12 +00:00
|
|
|
"RIGHT_BRACKET",
|
2020-01-08 11:04:47 +00:00
|
|
|
"RIGHT_PAREN",
|
2019-12-05 16:16:12 +00:00
|
|
|
"SEMICOLON",
|
2020-01-08 11:04:47 +00:00
|
|
|
"SPACE",
|
2019-12-05 16:16:12 +00:00
|
|
|
"STRING",
|
|
|
|
"TIMES",
|
2023-08-25 21:35:42 +00: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 16:16:12 +00:00
|
|
|
"operatorsStart",
|
|
|
|
"ADD",
|
|
|
|
"DIV",
|
2020-09-09 10:10:02 +00:00
|
|
|
"EQLC",
|
2020-01-08 11:04:47 +00:00
|
|
|
"EQL_REGEX",
|
|
|
|
"GTE",
|
|
|
|
"GTR",
|
2019-12-05 16:16:12 +00:00
|
|
|
"LAND",
|
|
|
|
"LOR",
|
2020-01-08 11:04:47 +00:00
|
|
|
"LSS",
|
|
|
|
"LTE",
|
2019-12-05 16:16:12 +00:00
|
|
|
"LUNLESS",
|
2020-01-08 11:04:47 +00:00
|
|
|
"MOD",
|
|
|
|
"MUL",
|
2019-12-05 16:16:12 +00:00
|
|
|
"NEQ",
|
|
|
|
"NEQ_REGEX",
|
|
|
|
"POW",
|
2020-01-08 11:04:47 +00:00
|
|
|
"SUB",
|
2021-01-20 10:57:39 +00:00
|
|
|
"AT",
|
2021-08-24 23:22:14 +00:00
|
|
|
"ATAN2",
|
2019-12-05 16:16:12 +00:00
|
|
|
"operatorsEnd",
|
|
|
|
"aggregatorsStart",
|
|
|
|
"AVG",
|
2020-01-08 11:04:47 +00:00
|
|
|
"BOTTOMK",
|
2019-12-05 16:16:12 +00:00
|
|
|
"COUNT",
|
2020-01-08 11:04:47 +00:00
|
|
|
"COUNT_VALUES",
|
2020-06-30 14:51:18 +00:00
|
|
|
"GROUP",
|
2019-12-05 16:16:12 +00:00
|
|
|
"MAX",
|
2020-01-08 11:04:47 +00:00
|
|
|
"MIN",
|
|
|
|
"QUANTILE",
|
2019-12-05 16:16:12 +00:00
|
|
|
"STDDEV",
|
|
|
|
"STDVAR",
|
2020-01-08 11:04:47 +00:00
|
|
|
"SUM",
|
2019-12-05 16:16:12 +00:00
|
|
|
"TOPK",
|
|
|
|
"aggregatorsEnd",
|
|
|
|
"keywordsStart",
|
2020-01-08 11:04:47 +00:00
|
|
|
"BOOL",
|
2019-12-05 16:16:12 +00:00
|
|
|
"BY",
|
|
|
|
"GROUP_LEFT",
|
|
|
|
"GROUP_RIGHT",
|
2020-01-08 11:04:47 +00:00
|
|
|
"IGNORING",
|
|
|
|
"OFFSET",
|
|
|
|
"ON",
|
|
|
|
"WITHOUT",
|
2019-12-05 16:16:12 +00:00
|
|
|
"keywordsEnd",
|
2021-02-09 16:03:16 +00:00
|
|
|
"preprocessorStart",
|
|
|
|
"START",
|
|
|
|
"END",
|
|
|
|
"preprocessorEnd",
|
2019-12-05 16:16:12 +00:00
|
|
|
"startSymbolsStart",
|
2019-12-16 16:38:18 +00:00
|
|
|
"START_METRIC",
|
2019-12-21 08:44:12 +00:00
|
|
|
"START_SERIES_DESCRIPTION",
|
2020-01-08 11:04:47 +00:00
|
|
|
"START_EXPRESSION",
|
|
|
|
"START_METRIC_SELECTOR",
|
2019-12-05 16:16:12 +00:00
|
|
|
"startSymbolsEnd",
|
|
|
|
}
|
2021-02-17 01:49:00 +00:00
|
|
|
|
2019-12-05 16:16:12 +00:00
|
|
|
var yyStatenames = [...]string{}
|
|
|
|
|
2023-08-25 21:35:42 +00:00
|
|
|
const yyEofCode = 1
|
|
|
|
const yyErrCode = 2
|
|
|
|
const yyInitialStackSize = 16
|
2019-12-05 16:16:12 +00:00
|
|
|
|
2024-04-13 10:59:54 +00:00
|
|
|
var yyExca = [...]int16{
|
2019-12-05 16:16:12 +00:00
|
|
|
-1, 1,
|
|
|
|
1, -1,
|
|
|
|
-2, 0,
|
2021-08-12 16:38:06 +00:00
|
|
|
-1, 35,
|
2024-02-15 19:25:12 +00:00
|
|
|
1, 134,
|
|
|
|
10, 134,
|
|
|
|
24, 134,
|
2020-01-08 11:04:47 +00:00
|
|
|
-2, 0,
|
2021-02-17 01:49:00 +00:00
|
|
|
-1, 58,
|
2023-08-25 21:35:42 +00:00
|
|
|
2, 171,
|
|
|
|
15, 171,
|
|
|
|
75, 171,
|
|
|
|
81, 171,
|
2024-02-15 19:25:12 +00:00
|
|
|
-2, 100,
|
|
|
|
-1, 59,
|
2023-08-25 21:35:42 +00:00
|
|
|
2, 172,
|
|
|
|
15, 172,
|
|
|
|
75, 172,
|
|
|
|
81, 172,
|
2024-02-15 19:25:12 +00:00
|
|
|
-2, 101,
|
|
|
|
-1, 60,
|
2023-08-25 21:35:42 +00:00
|
|
|
2, 173,
|
|
|
|
15, 173,
|
|
|
|
75, 173,
|
|
|
|
81, 173,
|
2024-02-15 19:25:12 +00:00
|
|
|
-2, 103,
|
|
|
|
-1, 61,
|
2023-08-25 21:35:42 +00:00
|
|
|
2, 174,
|
|
|
|
15, 174,
|
|
|
|
75, 174,
|
|
|
|
81, 174,
|
2024-02-15 19:25:12 +00:00
|
|
|
-2, 104,
|
|
|
|
-1, 62,
|
2023-08-25 21:35:42 +00:00
|
|
|
2, 175,
|
|
|
|
15, 175,
|
|
|
|
75, 175,
|
|
|
|
81, 175,
|
2024-02-15 19:25:12 +00:00
|
|
|
-2, 105,
|
|
|
|
-1, 63,
|
2023-08-25 21:35:42 +00:00
|
|
|
2, 176,
|
|
|
|
15, 176,
|
|
|
|
75, 176,
|
|
|
|
81, 176,
|
2024-02-15 19:25:12 +00:00
|
|
|
-2, 110,
|
|
|
|
-1, 64,
|
2023-08-25 21:35:42 +00:00
|
|
|
2, 177,
|
|
|
|
15, 177,
|
|
|
|
75, 177,
|
|
|
|
81, 177,
|
2024-02-15 19:25:12 +00:00
|
|
|
-2, 112,
|
|
|
|
-1, 65,
|
2023-08-25 21:35:42 +00:00
|
|
|
2, 178,
|
|
|
|
15, 178,
|
|
|
|
75, 178,
|
|
|
|
81, 178,
|
2021-02-17 01:49:00 +00:00
|
|
|
-2, 114,
|
2024-02-15 19:25:12 +00:00
|
|
|
-1, 66,
|
2023-08-25 21:35:42 +00:00
|
|
|
2, 179,
|
|
|
|
15, 179,
|
|
|
|
75, 179,
|
|
|
|
81, 179,
|
2021-08-24 23:22:14 +00:00
|
|
|
-2, 115,
|
2024-02-15 19:25:12 +00:00
|
|
|
-1, 67,
|
|
|
|
2, 180,
|
|
|
|
15, 180,
|
|
|
|
75, 180,
|
|
|
|
81, 180,
|
|
|
|
-2, 116,
|
|
|
|
-1, 68,
|
|
|
|
2, 181,
|
|
|
|
15, 181,
|
|
|
|
75, 181,
|
|
|
|
81, 181,
|
|
|
|
-2, 117,
|
|
|
|
-1, 69,
|
|
|
|
2, 182,
|
|
|
|
15, 182,
|
|
|
|
75, 182,
|
|
|
|
81, 182,
|
|
|
|
-2, 118,
|
|
|
|
-1, 195,
|
|
|
|
12, 230,
|
|
|
|
13, 230,
|
|
|
|
18, 230,
|
|
|
|
19, 230,
|
|
|
|
25, 230,
|
|
|
|
39, 230,
|
|
|
|
45, 230,
|
|
|
|
46, 230,
|
|
|
|
49, 230,
|
|
|
|
55, 230,
|
|
|
|
60, 230,
|
|
|
|
61, 230,
|
|
|
|
62, 230,
|
|
|
|
63, 230,
|
|
|
|
64, 230,
|
|
|
|
65, 230,
|
|
|
|
66, 230,
|
|
|
|
67, 230,
|
|
|
|
68, 230,
|
|
|
|
69, 230,
|
|
|
|
70, 230,
|
|
|
|
71, 230,
|
|
|
|
75, 230,
|
|
|
|
79, 230,
|
|
|
|
81, 230,
|
|
|
|
84, 230,
|
|
|
|
85, 230,
|
2020-01-08 11:04:47 +00:00
|
|
|
-2, 0,
|
2024-02-15 19:25:12 +00:00
|
|
|
-1, 196,
|
|
|
|
12, 230,
|
|
|
|
13, 230,
|
|
|
|
18, 230,
|
|
|
|
19, 230,
|
|
|
|
25, 230,
|
|
|
|
39, 230,
|
|
|
|
45, 230,
|
|
|
|
46, 230,
|
|
|
|
49, 230,
|
|
|
|
55, 230,
|
|
|
|
60, 230,
|
|
|
|
61, 230,
|
|
|
|
62, 230,
|
|
|
|
63, 230,
|
|
|
|
64, 230,
|
|
|
|
65, 230,
|
|
|
|
66, 230,
|
|
|
|
67, 230,
|
|
|
|
68, 230,
|
|
|
|
69, 230,
|
|
|
|
70, 230,
|
|
|
|
71, 230,
|
|
|
|
75, 230,
|
|
|
|
79, 230,
|
|
|
|
81, 230,
|
|
|
|
84, 230,
|
|
|
|
85, 230,
|
2020-07-08 10:58:12 +00:00
|
|
|
-2, 0,
|
2024-02-15 19:25:12 +00:00
|
|
|
-1, 217,
|
|
|
|
21, 228,
|
2021-08-24 23:22:14 +00:00
|
|
|
-2, 0,
|
2024-02-15 19:25:12 +00:00
|
|
|
-1, 285,
|
|
|
|
21, 229,
|
2021-08-25 10:51:12 +00:00
|
|
|
-2, 0,
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const yyPrivate = 57344
|
|
|
|
|
2024-02-15 19:25:12 +00:00
|
|
|
const yyLast = 742
|
|
|
|
|
2024-04-13 10:59:54 +00:00
|
|
|
var yyAct = [...]int16{
|
2024-02-15 19:25:12 +00:00
|
|
|
151, 322, 320, 268, 327, 148, 221, 37, 187, 144,
|
|
|
|
281, 280, 152, 113, 77, 173, 104, 102, 101, 6,
|
|
|
|
128, 223, 105, 193, 155, 194, 195, 196, 339, 262,
|
|
|
|
260, 233, 317, 316, 57, 100, 294, 239, 103, 146,
|
|
|
|
300, 313, 263, 156, 156, 283, 147, 338, 259, 123,
|
|
|
|
337, 106, 252, 311, 155, 299, 340, 301, 264, 157,
|
|
|
|
157, 108, 298, 109, 235, 236, 292, 251, 237, 107,
|
|
|
|
155, 292, 174, 191, 175, 96, 250, 99, 258, 224,
|
|
|
|
226, 228, 229, 230, 238, 240, 243, 244, 245, 246,
|
|
|
|
247, 110, 145, 225, 227, 231, 232, 234, 241, 242,
|
|
|
|
98, 257, 321, 248, 249, 2, 3, 4, 5, 218,
|
|
|
|
158, 104, 177, 217, 168, 162, 165, 105, 175, 160,
|
|
|
|
164, 161, 176, 178, 189, 213, 106, 328, 216, 256,
|
|
|
|
183, 179, 192, 163, 181, 100, 190, 197, 198, 199,
|
|
|
|
200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
|
|
|
|
210, 211, 255, 182, 72, 212, 177, 214, 215, 33,
|
|
|
|
82, 84, 85, 7, 86, 87, 176, 178, 90, 91,
|
|
|
|
223, 93, 94, 95, 116, 96, 97, 99, 83, 147,
|
|
|
|
233, 286, 289, 116, 114, 254, 239, 288, 147, 172,
|
|
|
|
220, 124, 253, 114, 171, 310, 309, 117, 120, 261,
|
|
|
|
98, 112, 287, 119, 278, 279, 117, 170, 282, 10,
|
|
|
|
308, 159, 307, 235, 236, 312, 118, 237, 147, 74,
|
|
|
|
306, 305, 304, 303, 302, 250, 81, 285, 224, 226,
|
|
|
|
228, 229, 230, 238, 240, 243, 244, 245, 246, 247,
|
|
|
|
79, 79, 225, 227, 231, 232, 234, 241, 242, 48,
|
|
|
|
78, 78, 248, 249, 122, 73, 121, 150, 180, 76,
|
|
|
|
290, 291, 293, 56, 295, 8, 9, 9, 34, 35,
|
|
|
|
1, 284, 296, 297, 155, 129, 130, 131, 132, 133,
|
|
|
|
134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
|
|
|
|
47, 46, 45, 44, 156, 314, 315, 127, 43, 42,
|
|
|
|
41, 185, 319, 125, 166, 324, 325, 326, 188, 323,
|
|
|
|
157, 329, 191, 331, 330, 155, 40, 126, 332, 333,
|
|
|
|
100, 51, 72, 334, 53, 39, 38, 22, 52, 336,
|
|
|
|
49, 167, 186, 335, 54, 156, 265, 80, 341, 153,
|
|
|
|
154, 184, 219, 75, 115, 82, 84, 149, 70, 55,
|
|
|
|
222, 157, 50, 111, 18, 19, 93, 94, 20, 0,
|
|
|
|
96, 97, 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, 36, 100, 51, 72, 0,
|
|
|
|
53, 267, 0, 22, 52, 0, 0, 0, 266, 0,
|
|
|
|
54, 0, 270, 271, 269, 275, 277, 274, 276, 272,
|
|
|
|
273, 0, 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, 318, 0, 22, 52, 0,
|
|
|
|
0, 0, 0, 0, 54, 0, 270, 271, 269, 275,
|
|
|
|
277, 274, 276, 272, 273, 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, 169, 30, 0, 0, 31, 32, 0, 0, 0,
|
|
|
|
0, 0, 100, 0, 0, 0, 0, 0, 82, 84,
|
|
|
|
85, 0, 86, 87, 88, 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,
|
2023-08-25 21:35:42 +00:00
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
2024-02-15 19:25:12 +00:00
|
|
|
0, 0, 0, 0, 0, 0, 0, 98, 0, 0,
|
|
|
|
0, 82, 84, 85, 0, 86, 87, 88, 0, 90,
|
|
|
|
91, 92, 93, 94, 95, 0, 96, 97, 99, 83,
|
2020-07-08 10:58:12 +00:00
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
2023-08-25 21:35:42 +00:00
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
2024-02-15 19:25:12 +00:00
|
|
|
0, 98,
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
|
|
|
|
2024-04-13 10:59:54 +00:00
|
|
|
var yyPact = [...]int16{
|
2024-02-15 19:25:12 +00:00
|
|
|
17, 153, 541, 541, 385, 500, -1000, -1000, -1000, 146,
|
|
|
|
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
2020-06-30 14:51:18 +00:00
|
|
|
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
2024-02-15 19:25:12 +00:00
|
|
|
-1000, -1000, -1000, 239, -1000, 224, -1000, 618, -1000, -1000,
|
2019-12-21 08:44:12 +00:00
|
|
|
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
2024-02-15 19:25:12 +00:00
|
|
|
36, 111, -1000, 459, -1000, 459, 141, -1000, -1000, -1000,
|
2019-12-18 14:18:52 +00:00
|
|
|
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
2024-02-15 19:25:12 +00:00
|
|
|
-1000, -1000, 181, -1000, -1000, 196, -1000, -1000, 252, -1000,
|
|
|
|
25, -1000, -54, -54, -54, -54, -54, -54, -54, -54,
|
|
|
|
-54, -54, -54, -54, -54, -54, -54, -54, 37, 255,
|
|
|
|
209, 111, -59, -1000, 118, 118, 309, -1000, 599, 21,
|
|
|
|
-1000, 187, -1000, -1000, 70, 114, -1000, -1000, -1000, 238,
|
|
|
|
-1000, 128, -1000, 296, 459, -1000, -55, -50, -1000, 459,
|
|
|
|
459, 459, 459, 459, 459, 459, 459, 459, 459, 459,
|
|
|
|
459, 459, 459, 459, -1000, 170, -1000, -1000, -1000, 110,
|
|
|
|
-1000, -1000, -1000, -1000, -1000, -1000, 51, 51, 107, -1000,
|
|
|
|
-1000, -1000, -1000, 168, -1000, -1000, 45, -1000, 618, -1000,
|
|
|
|
-1000, 172, -1000, 127, -1000, -1000, -1000, -1000, -1000, 76,
|
|
|
|
-1000, -1000, -1000, -1000, -1000, 22, 4, 3, -1000, -1000,
|
|
|
|
-1000, 384, 382, 118, 118, 118, 118, 21, 21, 306,
|
|
|
|
306, 306, 121, 662, 306, 306, 121, 21, 21, 306,
|
|
|
|
21, 382, -1000, 23, -1000, -1000, -1000, 179, -1000, 180,
|
2019-12-18 14:18:52 +00:00
|
|
|
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
2021-01-20 10:57:39 +00:00
|
|
|
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
2021-08-12 16:38:06 +00:00
|
|
|
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
2024-02-15 19:25:12 +00:00
|
|
|
-1000, -1000, 459, -1000, -1000, -1000, -1000, -1000, -1000, 52,
|
|
|
|
52, 10, 52, 57, 57, 38, 40, -1000, -1000, 218,
|
|
|
|
217, 216, 215, 214, 206, 204, 190, 189, -1000, -1000,
|
|
|
|
-1000, -1000, -1000, -1000, 32, 213, -1000, -1000, 19, -1000,
|
|
|
|
618, -1000, -1000, -1000, 52, -1000, 7, 6, 458, -1000,
|
|
|
|
-1000, -1000, 47, 5, 51, 51, 51, 113, 47, 113,
|
|
|
|
47, -1000, -1000, -1000, -1000, -1000, 52, 52, -1000, -1000,
|
|
|
|
-1000, 52, -1000, -1000, -1000, -1000, -1000, -1000, 51, -1000,
|
|
|
|
-1000, -1000, -1000, -1000, -1000, 26, -1000, 35, -1000, -1000,
|
|
|
|
-1000, -1000,
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
|
|
|
|
2024-04-13 10:59:54 +00:00
|
|
|
var yyPgo = [...]int16{
|
2024-02-15 19:25:12 +00:00
|
|
|
0, 353, 13, 352, 6, 15, 350, 263, 349, 347,
|
|
|
|
344, 209, 265, 343, 14, 342, 10, 11, 341, 337,
|
|
|
|
8, 336, 3, 4, 333, 2, 1, 0, 332, 12,
|
|
|
|
5, 330, 326, 18, 191, 325, 317, 7, 316, 304,
|
|
|
|
17, 303, 34, 300, 299, 298, 297, 293, 292, 291,
|
|
|
|
290, 249, 9, 271, 270, 268,
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
|
|
|
|
2024-04-13 10:59:54 +00:00
|
|
|
var yyR1 = [...]int8{
|
2024-02-15 19:25:12 +00:00
|
|
|
0, 54, 54, 54, 54, 54, 54, 54, 37, 37,
|
|
|
|
37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
|
|
|
|
32, 32, 32, 32, 33, 33, 35, 35, 35, 35,
|
|
|
|
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
|
|
|
|
35, 35, 34, 36, 36, 46, 46, 41, 41, 41,
|
|
|
|
41, 16, 16, 16, 16, 15, 15, 15, 4, 4,
|
|
|
|
38, 40, 40, 39, 39, 39, 47, 45, 45, 45,
|
|
|
|
31, 31, 31, 9, 9, 43, 49, 49, 49, 49,
|
|
|
|
49, 50, 51, 51, 51, 42, 42, 42, 1, 1,
|
|
|
|
1, 2, 2, 2, 2, 2, 2, 2, 12, 12,
|
2020-03-05 13:20:53 +00:00
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
2024-02-15 19:25:12 +00:00
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
|
|
|
7, 7, 11, 11, 11, 11, 13, 13, 13, 14,
|
|
|
|
14, 14, 14, 55, 19, 19, 19, 19, 18, 18,
|
|
|
|
18, 18, 18, 18, 18, 18, 18, 28, 28, 28,
|
|
|
|
20, 20, 20, 20, 21, 21, 21, 22, 22, 22,
|
|
|
|
22, 22, 22, 22, 22, 22, 23, 23, 24, 24,
|
|
|
|
24, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
|
|
|
3, 3, 3, 6, 6, 6, 6, 6, 6, 6,
|
2021-08-12 16:38:06 +00:00
|
|
|
6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
|
2021-01-20 10:57:39 +00:00
|
|
|
6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
|
2024-02-15 19:25:12 +00:00
|
|
|
8, 8, 5, 5, 5, 5, 44, 27, 29, 29,
|
|
|
|
30, 30, 26, 25, 25, 52, 48, 10, 53, 53,
|
|
|
|
17, 17,
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
|
|
|
|
2024-04-13 10:59:54 +00:00
|
|
|
var yyR2 = [...]int8{
|
2020-01-08 11:04:47 +00:00
|
|
|
0, 2, 2, 2, 2, 2, 2, 1, 1, 1,
|
2021-01-20 10:57:39 +00:00
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
|
|
3, 3, 2, 2, 2, 2, 4, 4, 4, 4,
|
2020-01-08 11:04:47 +00:00
|
|
|
4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
2021-08-24 23:22:14 +00: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,
|
2024-02-15 19:25:12 +00:00
|
|
|
2, 3, 3, 1, 3, 3, 2, 1, 2, 1,
|
2020-03-05 13:20:53 +00:00
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
2024-02-15 19:25:12 +00:00
|
|
|
1, 1, 3, 4, 2, 0, 3, 1, 2, 3,
|
|
|
|
3, 2, 1, 2, 0, 3, 2, 1, 1, 3,
|
|
|
|
1, 3, 4, 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, 1, 1, 1, 1, 1, 1, 1,
|
2019-12-18 14:18:52 +00:00
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
2020-01-08 11:04:47 +00:00
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
2024-02-15 19:25:12 +00:00
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
|
|
|
|
1, 1, 1, 2, 1, 1, 1, 1, 0, 1,
|
|
|
|
0, 1,
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
|
|
|
|
2024-04-13 10:59:54 +00:00
|
|
|
var yyChk = [...]int16{
|
2024-02-15 19:25:12 +00:00
|
|
|
-1000, -54, 88, 89, 90, 91, 2, 10, -12, -7,
|
|
|
|
-11, 60, 61, 75, 62, 63, 64, 12, 45, 46,
|
2023-08-25 21:35:42 +00:00
|
|
|
49, 65, 18, 66, 79, 67, 68, 69, 70, 71,
|
2024-02-15 19:25:12 +00:00
|
|
|
81, 84, 85, 13, -55, -12, 10, -37, -32, -35,
|
|
|
|
-38, -43, -44, -45, -47, -48, -49, -50, -51, -31,
|
|
|
|
-3, 12, 19, 15, 25, -8, -7, -42, 60, 61,
|
2023-08-25 21:35:42 +00:00
|
|
|
62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
|
2024-02-15 19:25:12 +00:00
|
|
|
39, 55, 13, -51, -11, -13, 20, -14, 12, 2,
|
|
|
|
-19, 2, 39, 57, 40, 41, 43, 44, 45, 46,
|
2023-08-25 21:35:42 +00:00
|
|
|
47, 48, 49, 50, 51, 52, 54, 55, 79, 56,
|
2024-02-15 19:25:12 +00:00
|
|
|
14, -33, -40, 2, 75, 81, 15, -40, -37, -37,
|
|
|
|
-42, -1, 20, -2, 12, -10, 2, 25, 20, 7,
|
|
|
|
2, 4, 2, 24, -34, -41, -36, -46, 74, -34,
|
|
|
|
-34, -34, -34, -34, -34, -34, -34, -34, -34, -34,
|
|
|
|
-34, -34, -34, -34, -52, 55, 2, 9, -30, -9,
|
|
|
|
2, -27, -29, 84, 85, 19, 39, 55, -52, 2,
|
|
|
|
-40, -33, -16, 15, 2, -16, -39, 22, -37, 22,
|
|
|
|
20, 7, 2, -5, 2, 4, 52, 42, 53, -5,
|
|
|
|
20, -14, 25, 2, -18, 5, -28, -20, 12, -27,
|
|
|
|
-29, 16, -37, 78, 80, 76, 77, -37, -37, -37,
|
|
|
|
-37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
|
|
|
|
-37, -37, -52, 15, -27, -27, 21, 6, 2, -15,
|
|
|
|
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, 25, 2, 26,
|
|
|
|
26, -29, 26, 39, 55, -21, 24, 17, -22, 30,
|
|
|
|
28, 29, 35, 36, 33, 31, 34, 32, -16, -16,
|
|
|
|
-17, -16, -17, 22, -53, -52, 2, 22, 7, 2,
|
|
|
|
-37, -26, 19, -26, 26, -26, -20, -20, 24, 17,
|
|
|
|
2, 17, 6, 6, 6, 6, 6, 6, 6, 6,
|
|
|
|
6, 21, 2, 22, -4, -26, 26, 26, 17, -22,
|
|
|
|
-25, 55, -26, -30, -27, -27, -27, -23, 14, -25,
|
|
|
|
-23, -25, -26, -26, -26, -24, -27, 24, 21, 2,
|
|
|
|
21, -27,
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
|
|
|
|
2024-04-13 10:59:54 +00:00
|
|
|
var yyDef = [...]int16{
|
2024-02-15 19:25:12 +00:00
|
|
|
0, -2, 125, 125, 0, 0, 7, 6, 1, 125,
|
|
|
|
99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
|
|
|
|
109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
|
|
|
|
119, 120, 121, 0, 2, -2, 3, 4, 8, 9,
|
2021-08-12 16:38:06 +00:00
|
|
|
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
|
2024-02-15 19:25:12 +00:00
|
|
|
0, 106, 216, 0, 226, 0, 83, 84, -2, -2,
|
2021-08-12 16:38:06 +00:00
|
|
|
-2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
2024-02-15 19:25:12 +00:00
|
|
|
210, 211, 0, 5, 98, 0, 124, 127, 0, 132,
|
|
|
|
133, 137, 43, 43, 43, 43, 43, 43, 43, 43,
|
2021-08-24 23:22:14 +00:00
|
|
|
43, 43, 43, 43, 43, 43, 43, 43, 0, 0,
|
|
|
|
0, 0, 22, 23, 0, 0, 0, 60, 0, 81,
|
2024-02-15 19:25:12 +00:00
|
|
|
82, 0, 87, 89, 0, 93, 97, 227, 122, 0,
|
|
|
|
128, 0, 131, 136, 0, 42, 47, 48, 44, 0,
|
2021-08-12 16:38:06 +00:00
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
2024-02-15 19:25:12 +00:00
|
|
|
0, 0, 0, 0, 67, 0, 69, 225, 70, 0,
|
|
|
|
72, 220, 221, 73, 74, 217, 0, 0, 0, 80,
|
|
|
|
20, 21, 24, 0, 54, 25, 0, 62, 64, 66,
|
|
|
|
85, 0, 90, 0, 96, 212, 213, 214, 215, 0,
|
|
|
|
123, 126, 129, 130, 135, 138, 140, 143, 147, 148,
|
|
|
|
149, 0, 26, 0, 0, -2, -2, 27, 28, 29,
|
|
|
|
30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
|
|
|
|
40, 41, 68, 0, 218, 219, 75, -2, 79, 0,
|
|
|
|
53, 56, 58, 59, 183, 184, 185, 186, 187, 188,
|
2023-08-25 21:35:42 +00:00
|
|
|
189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
|
2024-02-15 19:25:12 +00:00
|
|
|
199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
|
|
|
|
209, 61, 65, 86, 88, 91, 95, 92, 94, 0,
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 153, 155, 0,
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 45, 46,
|
|
|
|
49, 231, 50, 71, 0, -2, 78, 51, 0, 57,
|
|
|
|
63, 139, 222, 141, 0, 144, 0, 0, 0, 151,
|
|
|
|
156, 152, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
0, 76, 77, 52, 55, 142, 0, 0, 150, 154,
|
|
|
|
157, 0, 224, 158, 159, 160, 161, 162, 0, 163,
|
|
|
|
164, 165, 145, 146, 223, 0, 169, 0, 167, 170,
|
|
|
|
166, 168,
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
|
|
|
|
2024-04-13 10:59:54 +00:00
|
|
|
var yyTok1 = [...]int8{
|
2019-12-05 16:16:12 +00:00
|
|
|
1,
|
|
|
|
}
|
|
|
|
|
2024-04-13 10:59:54 +00:00
|
|
|
var yyTok2 = [...]int8{
|
2019-12-05 16:16:12 +00: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 16:38:18 +00:00
|
|
|
62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
|
2023-08-25 21:35:42 +00: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 16:16:12 +00:00
|
|
|
}
|
2021-02-17 01:49:00 +00:00
|
|
|
|
2024-04-13 10:59:54 +00:00
|
|
|
var yyTok3 = [...]int8{
|
2019-12-05 16:16:12 +00:00
|
|
|
0,
|
|
|
|
}
|
|
|
|
|
|
|
|
var yyErrorMessages = [...]struct {
|
|
|
|
state int
|
|
|
|
token int
|
|
|
|
msg string
|
|
|
|
}{}
|
|
|
|
|
|
|
|
/* 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.
|
2024-04-13 10:59:54 +00:00
|
|
|
base := int(yyPact[state])
|
2019-12-05 16:16:12 +00:00
|
|
|
for tok := TOKSTART; tok-1 < len(yyToknames); tok++ {
|
2024-04-13 10:59:54 +00:00
|
|
|
if n := base + tok; n >= 0 && n < yyLast && int(yyChk[int(yyAct[n])]) == tok {
|
2019-12-05 16:16:12 +00:00
|
|
|
if len(expected) == cap(expected) {
|
|
|
|
return res
|
|
|
|
}
|
|
|
|
expected = append(expected, tok)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if yyDef[state] == -2 {
|
|
|
|
i := 0
|
2024-04-13 10:59:54 +00:00
|
|
|
for yyExca[i] != -1 || int(yyExca[i+1]) != state {
|
2019-12-05 16:16:12 +00:00
|
|
|
i += 2
|
|
|
|
}
|
|
|
|
|
|
|
|
// Look for tokens that we accept or reduce.
|
|
|
|
for i += 2; yyExca[i] >= 0; i += 2 {
|
2024-04-13 10:59:54 +00:00
|
|
|
tok := int(yyExca[i])
|
2019-12-05 16:16:12 +00: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 {
|
2024-04-13 10:59:54 +00:00
|
|
|
token = int(yyTok1[0])
|
2019-12-05 16:16:12 +00:00
|
|
|
goto out
|
|
|
|
}
|
|
|
|
if char < len(yyTok1) {
|
2024-04-13 10:59:54 +00:00
|
|
|
token = int(yyTok1[char])
|
2019-12-05 16:16:12 +00:00
|
|
|
goto out
|
|
|
|
}
|
|
|
|
if char >= yyPrivate {
|
|
|
|
if char < yyPrivate+len(yyTok2) {
|
2024-04-13 10:59:54 +00:00
|
|
|
token = int(yyTok2[char-yyPrivate])
|
2019-12-05 16:16:12 +00:00
|
|
|
goto out
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for i := 0; i < len(yyTok3); i += 2 {
|
2024-04-13 10:59:54 +00:00
|
|
|
token = int(yyTok3[i+0])
|
2019-12-05 16:16:12 +00:00
|
|
|
if token == char {
|
2024-04-13 10:59:54 +00:00
|
|
|
token = int(yyTok3[i+1])
|
2019-12-05 16:16:12 +00:00
|
|
|
goto out
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
out:
|
|
|
|
if token == 0 {
|
2024-04-13 10:59:54 +00:00
|
|
|
token = int(yyTok2[1]) /* unknown char */
|
2019-12-05 16:16:12 +00: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:
|
2024-04-13 10:59:54 +00:00
|
|
|
yyn = int(yyPact[yystate])
|
2019-12-05 16:16:12 +00: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
|
|
|
|
}
|
2024-04-13 10:59:54 +00:00
|
|
|
yyn = int(yyAct[yyn])
|
|
|
|
if int(yyChk[yyn]) == yytoken { /* valid shift */
|
2019-12-05 16:16:12 +00:00
|
|
|
yyrcvr.char = -1
|
|
|
|
yytoken = -1
|
|
|
|
yyVAL = yyrcvr.lval
|
|
|
|
yystate = yyn
|
|
|
|
if Errflag > 0 {
|
|
|
|
Errflag--
|
|
|
|
}
|
|
|
|
goto yystack
|
|
|
|
}
|
|
|
|
|
|
|
|
yydefault:
|
|
|
|
/* default state action */
|
2024-04-13 10:59:54 +00:00
|
|
|
yyn = int(yyDef[yystate])
|
2019-12-05 16:16:12 +00:00
|
|
|
if yyn == -2 {
|
|
|
|
if yyrcvr.char < 0 {
|
|
|
|
yyrcvr.char, yytoken = yylex1(yylex, &yyrcvr.lval)
|
|
|
|
}
|
|
|
|
|
|
|
|
/* look through exception table */
|
|
|
|
xi := 0
|
|
|
|
for {
|
2024-04-13 10:59:54 +00:00
|
|
|
if yyExca[xi+0] == -1 && int(yyExca[xi+1]) == yystate {
|
2019-12-05 16:16:12 +00:00
|
|
|
break
|
|
|
|
}
|
|
|
|
xi += 2
|
|
|
|
}
|
|
|
|
for xi += 2; ; xi += 2 {
|
2024-04-13 10:59:54 +00:00
|
|
|
yyn = int(yyExca[xi+0])
|
2019-12-05 16:16:12 +00:00
|
|
|
if yyn < 0 || yyn == yytoken {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2024-04-13 10:59:54 +00:00
|
|
|
yyn = int(yyExca[xi+1])
|
2019-12-05 16:16:12 +00: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 {
|
2024-04-13 10:59:54 +00:00
|
|
|
yyn = int(yyPact[yyS[yyp].yys]) + yyErrCode
|
2019-12-05 16:16:12 +00:00
|
|
|
if yyn >= 0 && yyn < yyLast {
|
2024-04-13 10:59:54 +00:00
|
|
|
yystate = int(yyAct[yyn]) /* simulate a shift of "error" */
|
|
|
|
if int(yyChk[yystate]) == yyErrCode {
|
2019-12-05 16:16:12 +00: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"
|
|
|
|
|
2024-04-13 10:59:54 +00:00
|
|
|
yyp -= int(yyR2[yyn])
|
2019-12-05 16:16:12 +00: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 */
|
2024-04-13 10:59:54 +00:00
|
|
|
yyn = int(yyR1[yyn])
|
|
|
|
yyg := int(yyPgo[yyn])
|
2019-12-05 16:16:12 +00:00
|
|
|
yyj := yyg + yyS[yyp].yys + 1
|
|
|
|
|
|
|
|
if yyj >= yyLast {
|
2024-04-13 10:59:54 +00:00
|
|
|
yystate = int(yyAct[yyg])
|
2019-12-05 16:16:12 +00:00
|
|
|
} else {
|
2024-04-13 10:59:54 +00:00
|
|
|
yystate = int(yyAct[yyj])
|
|
|
|
if int(yyChk[yystate]) != -yyn {
|
|
|
|
yystate = int(yyAct[yyg])
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
// dummy call; replaced with literal code
|
|
|
|
switch yynt {
|
|
|
|
|
|
|
|
case 1:
|
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yylex.(*parser).generatedParserResult = yyDollar[2].labels
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
case 3:
|
2019-12-16 13:58:47 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2019-12-05 16:16:12 +00:00
|
|
|
{
|
2023-09-14 16:57:31 +00:00
|
|
|
yylex.(*parser).addParseErrf(posrange.PositionRange{}, "no expression found in input")
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
case 4:
|
2019-12-16 16:38:18 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2019-12-18 14:18:52 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yylex.(*parser).generatedParserResult = yyDollar[2].node
|
2019-12-18 14:18:52 +00:00
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
case 5:
|
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
|
|
|
{
|
|
|
|
yylex.(*parser).generatedParserResult = yyDollar[2].node
|
|
|
|
}
|
|
|
|
case 7:
|
2019-12-16 13:58:47 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2019-12-05 16:16:12 +00:00
|
|
|
{
|
2019-12-18 17:36:43 +00:00
|
|
|
yylex.(*parser).unexpected("", "")
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
2021-01-20 10:57:39 +00:00
|
|
|
case 20:
|
2019-12-16 13:58:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2019-12-05 16:16:12 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.node = yylex.(*parser).newAggregateExpr(yyDollar[1].item, yyDollar[2].node, yyDollar[3].node)
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
2021-01-20 10:57:39 +00:00
|
|
|
case 21:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2019-12-05 16:16:12 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.node = yylex.(*parser).newAggregateExpr(yyDollar[1].item, yyDollar[3].node, yyDollar[2].node)
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
2021-01-20 10:57:39 +00:00
|
|
|
case 22:
|
2019-12-05 16:16:12 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.node = yylex.(*parser).newAggregateExpr(yyDollar[1].item, &AggregateExpr{}, yyDollar[2].node)
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
2021-01-20 10:57:39 +00:00
|
|
|
case 23:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2019-12-05 16:16:12 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yylex.(*parser).unexpected("aggregation", "")
|
2020-03-05 08:03:38 +00:00
|
|
|
yyVAL.node = yylex.(*parser).newAggregateExpr(yyDollar[1].item, &AggregateExpr{}, Expressions{})
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
2021-01-20 10:57:39 +00:00
|
|
|
case 24:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2019-12-16 13:58:47 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.node = &AggregateExpr{
|
|
|
|
Grouping: yyDollar[2].strings,
|
|
|
|
}
|
2019-12-16 13:58:47 +00:00
|
|
|
}
|
2021-01-20 10:57:39 +00:00
|
|
|
case 25:
|
2019-12-16 13:58:47 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.node = &AggregateExpr{
|
|
|
|
Grouping: yyDollar[2].strings,
|
|
|
|
Without: true,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 26:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
|
|
|
{
|
|
|
|
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]
|
|
|
|
{
|
|
|
|
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]
|
|
|
|
{
|
|
|
|
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]
|
|
|
|
{
|
|
|
|
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]
|
|
|
|
{
|
|
|
|
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]
|
|
|
|
{
|
|
|
|
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]
|
|
|
|
{
|
|
|
|
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]
|
|
|
|
{
|
|
|
|
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]
|
|
|
|
{
|
|
|
|
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]
|
|
|
|
{
|
|
|
|
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]
|
|
|
|
{
|
|
|
|
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]
|
|
|
|
{
|
|
|
|
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]
|
|
|
|
{
|
|
|
|
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-01-20 10:57:39 +00: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]
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
|
|
|
yyVAL.node = yylex.(*parser).newBinaryExpression(yyDollar[1].node, yyDollar[2].item, yyDollar[3].node, yyDollar[4].node)
|
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 41:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.node = yylex.(*parser).newBinaryExpression(yyDollar[1].node, yyDollar[2].item, yyDollar[3].node, yyDollar[4].node)
|
|
|
|
}
|
|
|
|
case 43:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-0 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.node = &BinaryExpr{
|
|
|
|
VectorMatching: &VectorMatching{Card: CardOneToOne},
|
|
|
|
}
|
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 44:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.node = &BinaryExpr{
|
|
|
|
VectorMatching: &VectorMatching{Card: CardOneToOne},
|
|
|
|
ReturnBool: true,
|
|
|
|
}
|
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 45:
|
2019-12-05 16:16:12 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2019-12-16 13:58:47 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.node = yyDollar[1].node
|
|
|
|
yyVAL.node.(*BinaryExpr).VectorMatching.MatchingLabels = yyDollar[3].strings
|
2019-12-16 13:58:47 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 46:
|
2019-12-16 13:58:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2019-12-05 16:16:12 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.node = yyDollar[1].node
|
|
|
|
yyVAL.node.(*BinaryExpr).VectorMatching.MatchingLabels = yyDollar[3].strings
|
|
|
|
yyVAL.node.(*BinaryExpr).VectorMatching.On = true
|
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 49:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.node = yyDollar[1].node
|
|
|
|
yyVAL.node.(*BinaryExpr).VectorMatching.Card = CardManyToOne
|
|
|
|
yyVAL.node.(*BinaryExpr).VectorMatching.Include = yyDollar[3].strings
|
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 50:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.node = yyDollar[1].node
|
|
|
|
yyVAL.node.(*BinaryExpr).VectorMatching.Card = CardOneToMany
|
|
|
|
yyVAL.node.(*BinaryExpr).VectorMatching.Include = yyDollar[3].strings
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 51:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.strings = yyDollar[2].strings
|
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 52:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.strings = yyDollar[2].strings
|
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 53:
|
2019-12-16 13:58:47 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.strings = []string{}
|
2019-12-16 13:58:47 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 54:
|
2019-12-05 16:16:12 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yylex.(*parser).unexpected("grouping opts", "\"(\"")
|
2020-01-16 15:20:20 +00:00
|
|
|
yyVAL.strings = nil
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 55:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2019-12-05 16:16:12 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.strings = append(yyDollar[1].strings, yyDollar[3].item.Val)
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 56:
|
2019-12-16 16:38:18 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2019-12-16 13:58:47 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.strings = []string{yyDollar[1].item.Val}
|
2019-12-16 13:58:47 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 57:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
|
|
|
{
|
|
|
|
yylex.(*parser).unexpected("grouping opts", "\",\" or \")\"")
|
2020-01-16 15:20:20 +00:00
|
|
|
yyVAL.strings = yyDollar[1].strings
|
2020-01-08 11:04:47 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 58:
|
2019-12-18 14:18:52 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
if !isLabel(yyDollar[1].item.Val) {
|
|
|
|
yylex.(*parser).unexpected("grouping opts", "label")
|
|
|
|
}
|
2019-12-18 14:18:52 +00:00
|
|
|
yyVAL.item = yyDollar[1].item
|
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 59:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2019-12-16 13:58:47 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yylex.(*parser).unexpected("grouping opts", "label")
|
2020-01-16 15:20:20 +00:00
|
|
|
yyVAL.item = Item{}
|
2019-12-16 13:58:47 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 60:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2019-12-16 13:58:47 +00:00
|
|
|
{
|
2023-03-22 09:02:10 +00:00
|
|
|
fn, exist := getFunction(yyDollar[1].item.Val, yylex.(*parser).functions)
|
2020-01-08 11:04:47 +00:00
|
|
|
if !exist {
|
2020-01-17 15:16:58 +00:00
|
|
|
yylex.(*parser).addParseErrf(yyDollar[1].item.PositionRange(), "unknown function with name %q", yyDollar[1].item.Val)
|
2020-01-08 11:04:47 +00:00
|
|
|
}
|
2023-11-07 22:37:37 +00:00
|
|
|
if fn != nil && fn.Experimental && !EnableExperimentalFunctions {
|
|
|
|
yylex.(*parser).addParseErrf(yyDollar[1].item.PositionRange(), "function %q is not enabled", yyDollar[1].item.Val)
|
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.node = &Call{
|
|
|
|
Func: fn,
|
|
|
|
Args: yyDollar[2].node.(Expressions),
|
2023-09-14 16:57:31 +00:00
|
|
|
PosRange: posrange.PositionRange{
|
2020-01-14 16:12:15 +00:00
|
|
|
Start: yyDollar[1].item.Pos,
|
|
|
|
End: yylex.(*parser).lastClosing,
|
|
|
|
},
|
2020-01-08 11:04:47 +00:00
|
|
|
}
|
2019-12-16 13:58:47 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 61:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2019-12-16 13:58:47 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.node = yyDollar[2].node
|
2019-12-16 13:58:47 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 62:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2019-12-16 13:58:47 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.node = Expressions{}
|
2019-12-16 13:58:47 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 63:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.node = append(yyDollar[1].node.(Expressions), yyDollar[3].node.(Expr))
|
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 64:
|
2019-12-16 16:38:18 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.node = Expressions{yyDollar[1].node.(Expr)}
|
2019-12-16 16:38:18 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 65:
|
2020-01-16 15:20:20 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
|
|
|
{
|
2020-01-17 15:16:58 +00:00
|
|
|
yylex.(*parser).addParseErrf(yyDollar[2].item.PositionRange(), "trailing commas not allowed in function call args")
|
2020-01-16 15:20:20 +00:00
|
|
|
yyVAL.node = yyDollar[1].node
|
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 66:
|
2019-12-16 16:38:18 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
2020-01-14 16:12:15 +00:00
|
|
|
yyVAL.node = &ParenExpr{Expr: yyDollar[2].node.(Expr), PosRange: mergeRanges(&yyDollar[1].item, &yyDollar[3].item)}
|
2019-12-16 16:38:18 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 67:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
2021-02-24 01:46:52 +00:00
|
|
|
yylex.(*parser).addOffset(yyDollar[1].node, yyDollar[3].duration)
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.node = yyDollar[1].node
|
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 68:
|
2021-02-17 01:49:00 +00:00
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
2021-02-24 01:46:52 +00:00
|
|
|
yylex.(*parser).addOffset(yyDollar[1].node, -yyDollar[4].duration)
|
2020-01-16 15:20:20 +00:00
|
|
|
yyVAL.node = yyDollar[1].node
|
2020-01-08 11:04:47 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 69:
|
2021-01-20 10:57:39 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
2021-02-17 01:49:00 +00:00
|
|
|
yylex.(*parser).unexpected("offset", "duration")
|
2021-01-20 10:57:39 +00:00
|
|
|
yyVAL.node = yyDollar[1].node
|
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 70:
|
2021-02-17 01:49:00 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-02-09 16:03:16 +00:00
|
|
|
{
|
2021-02-17 01:49:00 +00:00
|
|
|
yylex.(*parser).setTimestamp(yyDollar[1].node, yyDollar[3].float)
|
2021-02-09 16:03:16 +00:00
|
|
|
yyVAL.node = yyDollar[1].node
|
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 71:
|
2021-02-17 01:49:00 +00:00
|
|
|
yyDollar = yyS[yypt-5 : yypt+1]
|
|
|
|
{
|
|
|
|
yylex.(*parser).setAtModifierPreprocessor(yyDollar[1].node, yyDollar[3].item)
|
|
|
|
yyVAL.node = yyDollar[1].node
|
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 72:
|
2021-02-17 01:49:00 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2021-01-20 10:57:39 +00:00
|
|
|
{
|
|
|
|
yylex.(*parser).unexpected("@", "timestamp")
|
|
|
|
yyVAL.node = yyDollar[1].node
|
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 75:
|
2019-12-16 16:38:18 +00:00
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
|
|
|
{
|
2020-01-15 20:01:49 +00:00
|
|
|
var errMsg string
|
2020-01-08 11:04:47 +00:00
|
|
|
vs, ok := yyDollar[1].node.(*VectorSelector)
|
|
|
|
if !ok {
|
2020-01-15 20:01:49 +00:00
|
|
|
errMsg = "ranges only allowed for vector selectors"
|
2021-01-20 10:57:39 +00:00
|
|
|
} else if vs.OriginalOffset != 0 {
|
2020-01-15 20:01:49 +00:00
|
|
|
errMsg = "no offset modifiers allowed before range"
|
2021-01-20 10:57:39 +00:00
|
|
|
} else if vs.Timestamp != nil {
|
|
|
|
errMsg = "no @ modifiers allowed before range"
|
2020-01-08 11:04:47 +00:00
|
|
|
}
|
2020-01-15 20:01:49 +00:00
|
|
|
|
|
|
|
if errMsg != "" {
|
|
|
|
errRange := mergeRanges(&yyDollar[2].item, &yyDollar[4].item)
|
2020-01-17 15:16:58 +00:00
|
|
|
yylex.(*parser).addParseErrf(errRange, errMsg)
|
2020-01-08 11:04:47 +00:00
|
|
|
}
|
2020-01-15 20:01:49 +00:00
|
|
|
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.node = &MatrixSelector{
|
2020-01-17 15:16:58 +00:00
|
|
|
VectorSelector: yyDollar[1].node.(Expr),
|
2020-01-10 14:25:41 +00:00
|
|
|
Range: yyDollar[3].duration,
|
2020-01-14 16:12:15 +00:00
|
|
|
EndPos: yylex.(*parser).lastClosing,
|
2020-01-08 11:04:47 +00:00
|
|
|
}
|
2019-12-16 16:38:18 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 76:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-6 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.node = &SubqueryExpr{
|
|
|
|
Expr: yyDollar[1].node.(Expr),
|
|
|
|
Range: yyDollar[3].duration,
|
|
|
|
Step: yyDollar[5].duration,
|
2020-01-14 16:12:15 +00:00
|
|
|
|
|
|
|
EndPos: yyDollar[6].item.Pos + 1,
|
2020-01-08 11:04:47 +00:00
|
|
|
}
|
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 77:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-6 : yypt+1]
|
|
|
|
{
|
|
|
|
yylex.(*parser).unexpected("subquery selector", "\"]\"")
|
2020-01-16 15:20:20 +00:00
|
|
|
yyVAL.node = yyDollar[1].node
|
2020-01-08 11:04:47 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 78:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-5 : yypt+1]
|
|
|
|
{
|
|
|
|
yylex.(*parser).unexpected("subquery selector", "duration or \"]\"")
|
2020-01-16 15:20:20 +00:00
|
|
|
yyVAL.node = yyDollar[1].node
|
2020-01-08 11:04:47 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 79:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
|
|
|
{
|
|
|
|
yylex.(*parser).unexpected("subquery or range", "\":\" or \"]\"")
|
2020-01-16 15:20:20 +00:00
|
|
|
yyVAL.node = yyDollar[1].node
|
2020-01-08 11:04:47 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 80:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
|
|
|
yylex.(*parser).unexpected("subquery selector", "duration")
|
2020-01-16 15:20:20 +00:00
|
|
|
yyVAL.node = yyDollar[1].node
|
2020-01-08 11:04:47 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 81:
|
2019-12-16 13:58:47 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2019-12-16 16:38:18 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
if nl, ok := yyDollar[2].node.(*NumberLiteral); ok {
|
|
|
|
if yyDollar[1].item.Typ == SUB {
|
|
|
|
nl.Val *= -1
|
|
|
|
}
|
2020-01-14 16:12:15 +00:00
|
|
|
nl.PosRange.Start = yyDollar[1].item.Pos
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.node = nl
|
|
|
|
} else {
|
2020-01-14 16:12:15 +00:00
|
|
|
yyVAL.node = &UnaryExpr{Op: yyDollar[1].item.Typ, Expr: yyDollar[2].node.(Expr), StartPos: yyDollar[1].item.Pos}
|
2020-01-08 11:04:47 +00:00
|
|
|
}
|
2019-12-16 16:38:18 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 82:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2019-12-16 16:38:18 +00:00
|
|
|
{
|
2020-01-14 16:12:15 +00: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 16:38:18 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 83:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
{
|
2020-01-14 16:12:15 +00: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 11:04:47 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 84:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
{
|
2020-01-14 16:12:15 +00:00
|
|
|
vs := yyDollar[1].node.(*VectorSelector)
|
|
|
|
yylex.(*parser).assembleVectorSelector(vs)
|
|
|
|
yyVAL.node = vs
|
2020-01-08 11:04:47 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 85:
|
2019-12-16 16:38:18 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
2020-01-14 16:12:15 +00:00
|
|
|
yyVAL.node = &VectorSelector{
|
|
|
|
LabelMatchers: yyDollar[2].matchers,
|
|
|
|
PosRange: mergeRanges(&yyDollar[1].item, &yyDollar[3].item),
|
|
|
|
}
|
2019-12-16 16:38:18 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 86:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
|
|
|
{
|
2020-01-14 16:12:15 +00:00
|
|
|
yyVAL.node = &VectorSelector{
|
|
|
|
LabelMatchers: yyDollar[2].matchers,
|
|
|
|
PosRange: mergeRanges(&yyDollar[1].item, &yyDollar[4].item),
|
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 87:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
|
|
|
{
|
2020-01-14 16:12:15 +00:00
|
|
|
yyVAL.node = &VectorSelector{
|
|
|
|
LabelMatchers: []*labels.Matcher{},
|
|
|
|
PosRange: mergeRanges(&yyDollar[1].item, &yyDollar[2].item),
|
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 88:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
2020-01-16 15:20:20 +00:00
|
|
|
if yyDollar[1].matchers != nil {
|
|
|
|
yyVAL.matchers = append(yyDollar[1].matchers, yyDollar[3].matcher)
|
|
|
|
} else {
|
|
|
|
yyVAL.matchers = yyDollar[1].matchers
|
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 89:
|
2019-12-16 16:38:18 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.matchers = []*labels.Matcher{yyDollar[1].matcher}
|
2019-12-16 16:38:18 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 90:
|
2019-12-16 16:38:18 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2019-12-16 13:58:47 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yylex.(*parser).unexpected("label matching", "\",\" or \"}\"")
|
2020-01-16 15:20:20 +00:00
|
|
|
yyVAL.matchers = yyDollar[1].matchers
|
2019-12-16 13:58:47 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 91:
|
2019-12-16 13:58:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.matcher = yylex.(*parser).newLabelMatcher(yyDollar[1].item, yyDollar[2].item, yyDollar[3].item)
|
2019-12-16 13:58:47 +00:00
|
|
|
}
|
2021-08-24 23:22:14 +00:00
|
|
|
case 92:
|
2019-12-16 13:58:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2024-02-15 19:25:12 +00:00
|
|
|
{
|
|
|
|
yyVAL.matcher = yylex.(*parser).newLabelMatcher(yyDollar[1].item, yyDollar[2].item, yyDollar[3].item)
|
|
|
|
}
|
|
|
|
case 93:
|
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.matcher = yylex.(*parser).newMetricNameMatcher(yyDollar[1].item)
|
|
|
|
}
|
|
|
|
case 94:
|
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2019-12-16 13:58:47 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yylex.(*parser).unexpected("label matching", "string")
|
2020-01-16 15:20:20 +00:00
|
|
|
yyVAL.matcher = nil
|
2019-12-16 13:58:47 +00:00
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 95:
|
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
|
|
|
yylex.(*parser).unexpected("label matching", "string")
|
|
|
|
yyVAL.matcher = nil
|
|
|
|
}
|
|
|
|
case 96:
|
2019-12-16 13:58:47 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yylex.(*parser).unexpected("label matching", "label matching operator")
|
2020-01-16 15:20:20 +00:00
|
|
|
yyVAL.matcher = nil
|
2019-12-16 13:58:47 +00:00
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 97:
|
2019-12-05 16:16:12 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yylex.(*parser).unexpected("label matching", "identifier or \"}\"")
|
2020-01-16 15:20:20 +00:00
|
|
|
yyVAL.matcher = nil
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 98:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
|
|
|
{
|
2022-03-09 22:14:58 +00:00
|
|
|
b := labels.NewBuilder(yyDollar[2].labels)
|
|
|
|
b.Set(labels.MetricName, yyDollar[1].item.Val)
|
2023-03-22 15:46:02 +00:00
|
|
|
yyVAL.labels = b.Labels()
|
2020-01-08 11:04:47 +00:00
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 99:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.labels = yyDollar[1].labels
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 122:
|
2019-12-18 14:18:52 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
2022-03-09 22:14:58 +00:00
|
|
|
yyVAL.labels = labels.New(yyDollar[2].lblList...)
|
2019-12-18 14:18:52 +00:00
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 123:
|
2019-12-20 11:28:56 +00:00
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2019-12-18 14:18:52 +00:00
|
|
|
{
|
2022-03-09 22:14:58 +00:00
|
|
|
yyVAL.labels = labels.New(yyDollar[2].lblList...)
|
2019-12-18 14:18:52 +00:00
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 124:
|
2019-12-20 11:28:56 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2019-12-18 14:18:52 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.labels = labels.New()
|
2019-12-18 14:18:52 +00:00
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 125:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-0 : yypt+1]
|
2019-12-20 11:28:56 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.labels = labels.New()
|
2019-12-20 11:28:56 +00:00
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 126:
|
2019-12-18 14:18:52 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
2022-03-09 22:14:58 +00:00
|
|
|
yyVAL.lblList = append(yyDollar[1].lblList, yyDollar[3].label)
|
2019-12-18 14:18:52 +00:00
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 127:
|
2019-12-18 14:18:52 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
{
|
2022-03-09 22:14:58 +00:00
|
|
|
yyVAL.lblList = []labels.Label{yyDollar[1].label}
|
2019-12-18 14:18:52 +00:00
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 128:
|
2019-12-18 14:18:52 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yylex.(*parser).unexpected("label set", "\",\" or \"}\"")
|
2022-03-09 22:14:58 +00:00
|
|
|
yyVAL.lblList = yyDollar[1].lblList
|
2019-12-18 14:18:52 +00:00
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 129:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2019-12-18 14:18:52 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.label = labels.Label{Name: yyDollar[1].item.Val, Value: yylex.(*parser).unquoteString(yyDollar[3].item.Val)}
|
2019-12-18 14:18:52 +00:00
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 130:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
|
|
|
yylex.(*parser).unexpected("label set", "string")
|
2020-01-16 15:20:20 +00:00
|
|
|
yyVAL.label = labels.Label{}
|
2020-01-08 11:04:47 +00:00
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 131:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
|
|
|
{
|
|
|
|
yylex.(*parser).unexpected("label set", "\"=\"")
|
2020-01-16 15:20:20 +00:00
|
|
|
yyVAL.label = labels.Label{}
|
2020-01-08 11:04:47 +00:00
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 132:
|
2019-12-18 14:18:52 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yylex.(*parser).unexpected("label set", "identifier or \"}\"")
|
2020-01-16 15:20:20 +00:00
|
|
|
yyVAL.label = labels.Label{}
|
2019-12-18 14:18:52 +00:00
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 133:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
|
|
|
{
|
|
|
|
yylex.(*parser).generatedParserResult = &seriesDescription{
|
|
|
|
labels: yyDollar[1].labels,
|
|
|
|
values: yyDollar[2].series,
|
|
|
|
}
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 134:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-0 : yypt+1]
|
|
|
|
{
|
2020-02-03 16:45:41 +00:00
|
|
|
yyVAL.series = []SequenceValue{}
|
2019-12-21 08:44:12 +00:00
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 135:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.series = append(yyDollar[1].series, yyDollar[3].series...)
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 136:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.series = yyDollar[1].series
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 137:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
{
|
|
|
|
yylex.(*parser).unexpected("series values", "")
|
2020-01-16 15:20:20 +00:00
|
|
|
yyVAL.series = nil
|
2019-12-21 08:44:12 +00:00
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 138:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
{
|
2020-02-03 17:48:27 +00:00
|
|
|
yyVAL.series = []SequenceValue{{Omitted: true}}
|
2019-12-21 08:44:12 +00:00
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 139:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
2020-02-03 16:45:41 +00:00
|
|
|
yyVAL.series = []SequenceValue{}
|
2019-12-21 08:44:12 +00:00
|
|
|
for i := uint64(0); i < yyDollar[3].uint; i++ {
|
2020-02-03 17:48:27 +00:00
|
|
|
yyVAL.series = append(yyVAL.series, SequenceValue{Omitted: true})
|
2019-12-21 08:44:12 +00:00
|
|
|
}
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 140:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
{
|
2020-02-03 17:48:27 +00:00
|
|
|
yyVAL.series = []SequenceValue{{Value: yyDollar[1].float}}
|
2019-12-21 08:44:12 +00:00
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 141:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
2020-02-03 16:45:41 +00:00
|
|
|
yyVAL.series = []SequenceValue{}
|
2023-08-25 21:35:42 +00:00
|
|
|
// Add an additional value for time 0, which we ignore in tests.
|
2019-12-21 08:44:12 +00:00
|
|
|
for i := uint64(0); i <= yyDollar[3].uint; i++ {
|
2020-02-03 17:48:27 +00:00
|
|
|
yyVAL.series = append(yyVAL.series, SequenceValue{Value: yyDollar[1].float})
|
2019-12-21 08:44:12 +00:00
|
|
|
}
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 142:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
|
|
|
{
|
2020-02-03 16:45:41 +00:00
|
|
|
yyVAL.series = []SequenceValue{}
|
2023-08-25 21:35:42 +00:00
|
|
|
// Add an additional value for time 0, which we ignore in tests.
|
2019-12-21 08:44:12 +00:00
|
|
|
for i := uint64(0); i <= yyDollar[4].uint; i++ {
|
2020-02-03 17:48:27 +00:00
|
|
|
yyVAL.series = append(yyVAL.series, SequenceValue{Value: yyDollar[1].float})
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar[1].float += yyDollar[2].float
|
|
|
|
}
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 143:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2023-08-25 21:35:42 +00:00
|
|
|
{
|
|
|
|
yyVAL.series = []SequenceValue{{Histogram: yyDollar[1].histogram}}
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 144:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 145:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-5 : yypt+1]
|
|
|
|
{
|
|
|
|
val, err := yylex.(*parser).histogramsIncreaseSeries(yyDollar[1].histogram, yyDollar[3].histogram, yyDollar[5].uint)
|
|
|
|
if err != nil {
|
|
|
|
yylex.(*parser).addSemanticError(err)
|
|
|
|
}
|
|
|
|
yyVAL.series = val
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 146:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-5 : yypt+1]
|
|
|
|
{
|
|
|
|
val, err := yylex.(*parser).histogramsDecreaseSeries(yyDollar[1].histogram, yyDollar[3].histogram, yyDollar[5].uint)
|
|
|
|
if err != nil {
|
|
|
|
yylex.(*parser).addSemanticError(err)
|
|
|
|
}
|
|
|
|
yyVAL.series = val
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 147:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2019-12-21 08:44:12 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
if yyDollar[1].item.Val != "stale" {
|
|
|
|
yylex.(*parser).unexpected("series values", "number or \"stale\"")
|
2019-12-21 08:44:12 +00:00
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.float = math.Float64frombits(value.StaleNaN)
|
2019-12-21 08:44:12 +00:00
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 150:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.histogram = yylex.(*parser).buildHistogramFromMap(&yyDollar[2].descriptors)
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 151:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.histogram = yylex.(*parser).buildHistogramFromMap(&yyDollar[2].descriptors)
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 152:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
|
|
|
m := yylex.(*parser).newMap()
|
|
|
|
yyVAL.histogram = yylex.(*parser).buildHistogramFromMap(&m)
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 153:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
|
|
|
{
|
|
|
|
m := yylex.(*parser).newMap()
|
|
|
|
yyVAL.histogram = yylex.(*parser).buildHistogramFromMap(&m)
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 154:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.descriptors = *(yylex.(*parser).mergeMaps(&yyDollar[1].descriptors, &yyDollar[3].descriptors))
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 155:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2023-08-25 21:35:42 +00:00
|
|
|
{
|
|
|
|
yyVAL.descriptors = yyDollar[1].descriptors
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 156:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
|
|
|
{
|
|
|
|
yylex.(*parser).unexpected("histogram description", "histogram description key, e.g. buckets:[5 10 7]")
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 157:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.descriptors = yylex.(*parser).newMap()
|
|
|
|
yyVAL.descriptors["schema"] = yyDollar[3].int
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 158:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.descriptors = yylex.(*parser).newMap()
|
|
|
|
yyVAL.descriptors["sum"] = yyDollar[3].float
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 159:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.descriptors = yylex.(*parser).newMap()
|
|
|
|
yyVAL.descriptors["count"] = yyDollar[3].float
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 160:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.descriptors = yylex.(*parser).newMap()
|
|
|
|
yyVAL.descriptors["z_bucket"] = yyDollar[3].float
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 161:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.descriptors = yylex.(*parser).newMap()
|
|
|
|
yyVAL.descriptors["z_bucket_w"] = yyDollar[3].float
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 162:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.descriptors = yylex.(*parser).newMap()
|
|
|
|
yyVAL.descriptors["buckets"] = yyDollar[3].bucket_set
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 163:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.descriptors = yylex.(*parser).newMap()
|
|
|
|
yyVAL.descriptors["offset"] = yyDollar[3].int
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 164:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.descriptors = yylex.(*parser).newMap()
|
|
|
|
yyVAL.descriptors["n_buckets"] = yyDollar[3].bucket_set
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 165:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.descriptors = yylex.(*parser).newMap()
|
|
|
|
yyVAL.descriptors["n_offset"] = yyDollar[3].int
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 166:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.bucket_set = yyDollar[2].bucket_set
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 167:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.bucket_set = yyDollar[2].bucket_set
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 168:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.bucket_set = append(yyDollar[1].bucket_set, yyDollar[3].float)
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 169:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.bucket_set = []float64{yyDollar[1].float}
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 216:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
2020-01-14 16:12:15 +00:00
|
|
|
yyVAL.node = &NumberLiteral{
|
|
|
|
Val: yylex.(*parser).number(yyDollar[1].item.Val),
|
|
|
|
PosRange: yyDollar[1].item.PositionRange(),
|
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 217:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.float = yylex.(*parser).number(yyDollar[1].item.Val)
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 218:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.float = yyDollar[2].float
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 219:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.float = -yyDollar[2].float
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 222:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
var err error
|
|
|
|
yyVAL.uint, err = strconv.ParseUint(yyDollar[1].item.Val, 10, 64)
|
|
|
|
if err != nil {
|
2020-01-17 15:16:58 +00:00
|
|
|
yylex.(*parser).addParseErrf(yyDollar[1].item.PositionRange(), "invalid repetition in series values: %s", err)
|
2019-12-21 08:44:12 +00:00
|
|
|
}
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 223:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.int = -int64(yyDollar[2].uint)
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 224:
|
2023-08-25 21:35:42 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.int = int64(yyDollar[1].uint)
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 225:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
var err error
|
|
|
|
yyVAL.duration, err = parseDuration(yyDollar[1].item.Val)
|
|
|
|
if err != nil {
|
2020-01-17 15:16:58 +00:00
|
|
|
yylex.(*parser).addParseErr(yyDollar[1].item.PositionRange(), err)
|
2020-01-08 11:04:47 +00:00
|
|
|
}
|
2019-12-21 08:44:12 +00:00
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 226:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
{
|
2020-01-14 16:12:15 +00:00
|
|
|
yyVAL.node = &StringLiteral{
|
|
|
|
Val: yylex.(*parser).unquoteString(yyDollar[1].item.Val),
|
|
|
|
PosRange: yyDollar[1].item.PositionRange(),
|
|
|
|
}
|
2019-12-21 08:44:12 +00:00
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 227:
|
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.item = Item{
|
|
|
|
Typ: METRIC_IDENTIFIER,
|
|
|
|
Pos: yyDollar[1].item.PositionRange().Start,
|
|
|
|
Val: yylex.(*parser).unquoteString(yyDollar[1].item.Val),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 228:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-0 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.duration = 0
|
|
|
|
}
|
2024-02-15 19:25:12 +00:00
|
|
|
case 230:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-0 : yypt+1]
|
|
|
|
{
|
|
|
|
yyVAL.strings = nil
|
2019-12-21 08:44:12 +00:00
|
|
|
}
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
|
|
|
goto yystack /* stack new state and value */
|
|
|
|
}
|