2020-02-03 17:48:27 +00:00
|
|
|
// Code generated by goyacc -o generated_parser.y.go generated_parser.y. DO NOT EDIT.
|
2019-12-05 16:16:12 +00:00
|
|
|
|
2020-02-03 17:48:27 +00:00
|
|
|
//line generated_parser.y:15
|
2020-02-03 16:23:44 +00:00
|
|
|
package parser
|
2019-12-05 16:16:12 +00:00
|
|
|
|
|
|
|
import __yyfmt__ "fmt"
|
|
|
|
|
2020-02-03 17:48:27 +00:00
|
|
|
//line generated_parser.y:15
|
2019-12-05 16:16:12 +00:00
|
|
|
|
|
|
|
import (
|
2019-12-21 08:44:12 +00:00
|
|
|
"math"
|
2019-12-16 16:38:18 +00:00
|
|
|
"sort"
|
2019-12-21 08:44:12 +00:00
|
|
|
"strconv"
|
2020-01-08 11:04:47 +00:00
|
|
|
"time"
|
2019-12-16 16:38:18 +00:00
|
|
|
|
2019-12-05 16:16:12 +00:00
|
|
|
"github.com/prometheus/prometheus/pkg/labels"
|
2019-12-21 08:44:12 +00:00
|
|
|
"github.com/prometheus/prometheus/pkg/value"
|
2019-12-05 16:16:12 +00:00
|
|
|
)
|
|
|
|
|
2020-02-03 17:48:27 +00:00
|
|
|
//line generated_parser.y:28
|
2019-12-05 16:16:12 +00:00
|
|
|
type yySymType struct {
|
|
|
|
yys int
|
|
|
|
node Node
|
2019-12-09 19:03:31 +00:00
|
|
|
item Item
|
2019-12-05 16:16:12 +00:00
|
|
|
matchers []*labels.Matcher
|
|
|
|
matcher *labels.Matcher
|
2019-12-16 13:58:47 +00:00
|
|
|
label labels.Label
|
|
|
|
labels labels.Labels
|
2019-12-18 14:18:52 +00:00
|
|
|
strings []string
|
2020-02-03 16:45:41 +00:00
|
|
|
series []SequenceValue
|
2019-12-21 08:44:12 +00:00
|
|
|
uint uint64
|
|
|
|
float float64
|
2020-01-08 11:04:47 +00:00
|
|
|
duration time.Duration
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
|
|
|
|
2020-01-08 11:04:47 +00:00
|
|
|
const ASSIGN = 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 METRIC_IDENTIFIER = 57358
|
|
|
|
const NUMBER = 57359
|
|
|
|
const RIGHT_BRACE = 57360
|
|
|
|
const RIGHT_BRACKET = 57361
|
|
|
|
const RIGHT_PAREN = 57362
|
|
|
|
const SEMICOLON = 57363
|
|
|
|
const SPACE = 57364
|
|
|
|
const STRING = 57365
|
|
|
|
const TIMES = 57366
|
2019-12-05 16:16:12 +00:00
|
|
|
const operatorsStart = 57367
|
2020-01-08 11:04:47 +00:00
|
|
|
const ADD = 57368
|
|
|
|
const DIV = 57369
|
|
|
|
const EQL = 57370
|
|
|
|
const EQL_REGEX = 57371
|
|
|
|
const GTE = 57372
|
|
|
|
const GTR = 57373
|
|
|
|
const LAND = 57374
|
|
|
|
const LOR = 57375
|
|
|
|
const LSS = 57376
|
|
|
|
const LTE = 57377
|
|
|
|
const LUNLESS = 57378
|
|
|
|
const MOD = 57379
|
|
|
|
const MUL = 57380
|
|
|
|
const NEQ = 57381
|
|
|
|
const NEQ_REGEX = 57382
|
|
|
|
const POW = 57383
|
|
|
|
const SUB = 57384
|
2019-12-05 16:16:12 +00:00
|
|
|
const operatorsEnd = 57385
|
|
|
|
const aggregatorsStart = 57386
|
|
|
|
const AVG = 57387
|
2020-01-08 11:04:47 +00:00
|
|
|
const BOTTOMK = 57388
|
|
|
|
const COUNT = 57389
|
|
|
|
const COUNT_VALUES = 57390
|
2019-12-05 16:16:12 +00:00
|
|
|
const MAX = 57391
|
2020-01-08 11:04:47 +00:00
|
|
|
const MIN = 57392
|
|
|
|
const QUANTILE = 57393
|
|
|
|
const STDDEV = 57394
|
|
|
|
const STDVAR = 57395
|
|
|
|
const SUM = 57396
|
|
|
|
const TOPK = 57397
|
2019-12-05 16:16:12 +00:00
|
|
|
const aggregatorsEnd = 57398
|
|
|
|
const keywordsStart = 57399
|
2020-01-08 11:04:47 +00:00
|
|
|
const BOOL = 57400
|
2019-12-05 16:16:12 +00:00
|
|
|
const BY = 57401
|
2020-01-08 11:04:47 +00:00
|
|
|
const GROUP_LEFT = 57402
|
|
|
|
const GROUP_RIGHT = 57403
|
2019-12-05 16:16:12 +00:00
|
|
|
const IGNORING = 57404
|
2020-01-08 11:04:47 +00:00
|
|
|
const OFFSET = 57405
|
|
|
|
const ON = 57406
|
|
|
|
const WITHOUT = 57407
|
2019-12-05 16:16:12 +00:00
|
|
|
const keywordsEnd = 57408
|
|
|
|
const startSymbolsStart = 57409
|
2020-01-08 11:04:47 +00:00
|
|
|
const START_METRIC = 57410
|
|
|
|
const START_SERIES_DESCRIPTION = 57411
|
|
|
|
const START_EXPRESSION = 57412
|
|
|
|
const START_METRIC_SELECTOR = 57413
|
2019-12-18 14:18:52 +00:00
|
|
|
const startSymbolsEnd = 57414
|
2019-12-05 16:16:12 +00:00
|
|
|
|
|
|
|
var yyToknames = [...]string{
|
|
|
|
"$end",
|
|
|
|
"error",
|
|
|
|
"$unk",
|
2020-01-08 11:04:47 +00:00
|
|
|
"ASSIGN",
|
|
|
|
"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",
|
|
|
|
"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",
|
|
|
|
"operatorsStart",
|
|
|
|
"ADD",
|
|
|
|
"DIV",
|
2020-01-08 11:04:47 +00:00
|
|
|
"EQL",
|
|
|
|
"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",
|
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",
|
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",
|
|
|
|
"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",
|
|
|
|
}
|
|
|
|
var yyStatenames = [...]string{}
|
|
|
|
|
|
|
|
const yyEofCode = 1
|
|
|
|
const yyErrCode = 2
|
|
|
|
const yyInitialStackSize = 16
|
|
|
|
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:709
|
2019-12-05 16:16:12 +00:00
|
|
|
|
|
|
|
//line yacctab:1
|
|
|
|
var yyExca = [...]int{
|
|
|
|
-1, 1,
|
|
|
|
1, -1,
|
|
|
|
-2, 0,
|
2020-03-05 13:20:53 +00:00
|
|
|
-1, 31,
|
|
|
|
1, 119,
|
|
|
|
10, 119,
|
|
|
|
22, 119,
|
2020-01-08 11:04:47 +00:00
|
|
|
-2, 0,
|
2020-03-05 13:20:53 +00:00
|
|
|
-1, 53,
|
|
|
|
2, 131,
|
|
|
|
15, 131,
|
|
|
|
59, 131,
|
|
|
|
65, 131,
|
|
|
|
-2, 89,
|
|
|
|
-1, 54,
|
|
|
|
2, 132,
|
|
|
|
15, 132,
|
|
|
|
59, 132,
|
|
|
|
65, 132,
|
|
|
|
-2, 90,
|
|
|
|
-1, 55,
|
|
|
|
2, 133,
|
|
|
|
15, 133,
|
|
|
|
59, 133,
|
|
|
|
65, 133,
|
|
|
|
-2, 92,
|
|
|
|
-1, 56,
|
|
|
|
2, 134,
|
|
|
|
15, 134,
|
|
|
|
59, 134,
|
|
|
|
65, 134,
|
|
|
|
-2, 93,
|
|
|
|
-1, 57,
|
|
|
|
2, 135,
|
|
|
|
15, 135,
|
|
|
|
59, 135,
|
|
|
|
65, 135,
|
|
|
|
-2, 98,
|
|
|
|
-1, 58,
|
|
|
|
2, 136,
|
|
|
|
15, 136,
|
|
|
|
59, 136,
|
|
|
|
65, 136,
|
|
|
|
-2, 100,
|
|
|
|
-1, 59,
|
|
|
|
2, 137,
|
|
|
|
15, 137,
|
|
|
|
59, 137,
|
|
|
|
65, 137,
|
|
|
|
-2, 102,
|
|
|
|
-1, 60,
|
|
|
|
2, 138,
|
|
|
|
15, 138,
|
|
|
|
59, 138,
|
|
|
|
65, 138,
|
|
|
|
-2, 103,
|
|
|
|
-1, 61,
|
|
|
|
2, 139,
|
|
|
|
15, 139,
|
|
|
|
59, 139,
|
|
|
|
65, 139,
|
|
|
|
-2, 104,
|
|
|
|
-1, 62,
|
|
|
|
2, 140,
|
|
|
|
15, 140,
|
|
|
|
59, 140,
|
|
|
|
65, 140,
|
|
|
|
-2, 105,
|
|
|
|
-1, 63,
|
|
|
|
2, 141,
|
|
|
|
15, 141,
|
|
|
|
59, 141,
|
|
|
|
65, 141,
|
|
|
|
-2, 106,
|
|
|
|
-1, 173,
|
|
|
|
12, 180,
|
|
|
|
13, 180,
|
|
|
|
16, 180,
|
|
|
|
17, 180,
|
|
|
|
23, 180,
|
|
|
|
26, 180,
|
|
|
|
32, 180,
|
|
|
|
33, 180,
|
|
|
|
36, 180,
|
|
|
|
42, 180,
|
|
|
|
45, 180,
|
|
|
|
46, 180,
|
|
|
|
47, 180,
|
|
|
|
48, 180,
|
|
|
|
49, 180,
|
|
|
|
50, 180,
|
|
|
|
51, 180,
|
|
|
|
52, 180,
|
|
|
|
53, 180,
|
|
|
|
54, 180,
|
|
|
|
55, 180,
|
|
|
|
59, 180,
|
|
|
|
63, 180,
|
2020-01-08 11:04:47 +00:00
|
|
|
-2, 0,
|
2020-01-14 16:12:15 +00:00
|
|
|
-1, 174,
|
2020-03-05 13:20:53 +00:00
|
|
|
12, 180,
|
|
|
|
13, 180,
|
|
|
|
16, 180,
|
|
|
|
17, 180,
|
|
|
|
23, 180,
|
|
|
|
26, 180,
|
|
|
|
32, 180,
|
|
|
|
33, 180,
|
|
|
|
36, 180,
|
|
|
|
42, 180,
|
|
|
|
45, 180,
|
|
|
|
46, 180,
|
|
|
|
47, 180,
|
|
|
|
48, 180,
|
|
|
|
49, 180,
|
|
|
|
50, 180,
|
|
|
|
51, 180,
|
|
|
|
52, 180,
|
|
|
|
53, 180,
|
|
|
|
54, 180,
|
|
|
|
55, 180,
|
|
|
|
59, 180,
|
|
|
|
63, 180,
|
|
|
|
-2, 0,
|
|
|
|
-1, 190,
|
|
|
|
19, 178,
|
2020-01-08 11:04:47 +00:00
|
|
|
-2, 0,
|
2020-03-05 13:20:53 +00:00
|
|
|
-1, 237,
|
|
|
|
19, 179,
|
2020-01-08 11:04:47 +00:00
|
|
|
-2, 0,
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const yyPrivate = 57344
|
|
|
|
|
2020-03-05 13:20:53 +00:00
|
|
|
const yyLast = 553
|
2019-12-05 16:16:12 +00:00
|
|
|
|
|
|
|
var yyAct = [...]int{
|
|
|
|
|
2020-03-05 13:20:53 +00:00
|
|
|
243, 194, 33, 133, 233, 234, 165, 166, 105, 71,
|
|
|
|
94, 93, 96, 6, 173, 174, 196, 171, 97, 172,
|
|
|
|
118, 92, 227, 112, 168, 246, 205, 226, 95, 107,
|
|
|
|
211, 225, 113, 160, 249, 52, 247, 241, 98, 106,
|
|
|
|
169, 98, 240, 221, 7, 222, 207, 208, 89, 111,
|
|
|
|
209, 100, 224, 101, 159, 239, 220, 99, 114, 197,
|
|
|
|
199, 201, 202, 210, 212, 215, 216, 217, 218, 219,
|
|
|
|
91, 92, 198, 200, 203, 204, 206, 213, 214, 2,
|
|
|
|
3, 4, 5, 76, 77, 96, 244, 102, 191, 167,
|
|
|
|
66, 97, 190, 29, 86, 87, 136, 73, 89, 90,
|
|
|
|
107, 146, 140, 143, 138, 189, 139, 72, 142, 44,
|
|
|
|
106, 238, 248, 157, 75, 67, 104, 170, 135, 158,
|
|
|
|
91, 141, 175, 176, 177, 178, 179, 180, 181, 182,
|
|
|
|
183, 184, 185, 186, 187, 188, 119, 120, 121, 122,
|
|
|
|
123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
|
|
|
|
30, 150, 196, 162, 152, 1, 149, 137, 223, 10,
|
|
|
|
164, 236, 205, 43, 135, 167, 211, 148, 110, 68,
|
|
|
|
193, 228, 42, 109, 168, 229, 230, 231, 232, 235,
|
|
|
|
153, 155, 207, 208, 108, 51, 209, 41, 9, 9,
|
|
|
|
169, 154, 156, 40, 237, 197, 199, 201, 202, 210,
|
|
|
|
212, 215, 216, 217, 218, 219, 117, 39, 198, 200,
|
|
|
|
203, 204, 206, 213, 214, 46, 66, 73, 48, 21,
|
|
|
|
47, 38, 37, 145, 242, 134, 49, 72, 245, 64,
|
|
|
|
8, 115, 135, 70, 31, 17, 18, 144, 36, 19,
|
|
|
|
116, 35, 250, 34, 163, 65, 74, 251, 53, 54,
|
|
|
|
55, 56, 57, 58, 59, 60, 61, 62, 63, 161,
|
|
|
|
192, 69, 13, 50, 195, 32, 23, 46, 66, 151,
|
|
|
|
48, 21, 47, 45, 103, 0, 0, 0, 49, 0,
|
|
|
|
0, 64, 0, 0, 0, 0, 0, 17, 18, 0,
|
|
|
|
0, 19, 0, 0, 0, 0, 0, 65, 0, 0,
|
|
|
|
53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
|
|
|
|
63, 0, 46, 66, 13, 48, 21, 47, 23, 0,
|
|
|
|
0, 0, 0, 49, 0, 0, 64, 0, 0, 0,
|
|
|
|
0, 0, 17, 18, 0, 0, 19, 16, 66, 0,
|
|
|
|
0, 21, 65, 0, 0, 53, 54, 55, 56, 57,
|
|
|
|
58, 59, 60, 61, 62, 63, 0, 17, 18, 13,
|
|
|
|
0, 19, 0, 23, 0, 16, 29, 0, 92, 21,
|
|
|
|
11, 12, 14, 15, 20, 22, 24, 25, 26, 27,
|
|
|
|
28, 77, 0, 0, 13, 17, 18, 0, 23, 19,
|
|
|
|
0, 86, 87, 0, 0, 89, 0, 0, 11, 12,
|
|
|
|
14, 15, 20, 22, 24, 25, 26, 27, 28, 92,
|
|
|
|
0, 0, 13, 0, 0, 147, 23, 91, 0, 0,
|
|
|
|
0, 76, 77, 78, 0, 79, 80, 81, 82, 83,
|
|
|
|
84, 85, 86, 87, 88, 0, 89, 90, 0, 0,
|
|
|
|
0, 0, 0, 92, 0, 0, 0, 0, 0, 0,
|
|
|
|
0, 0, 0, 0, 0, 76, 77, 78, 91, 79,
|
|
|
|
80, 81, 82, 83, 84, 85, 86, 87, 88, 0,
|
|
|
|
89, 90, 0, 92, 0, 0, 0, 0, 0, 0,
|
|
|
|
0, 0, 0, 0, 0, 76, 77, 78, 0, 79,
|
|
|
|
80, 81, 91, 83, 84, 85, 86, 87, 88, 0,
|
|
|
|
89, 90, 0, 92, 0, 0, 0, 0, 0, 0,
|
|
|
|
0, 0, 0, 0, 0, 76, 77, 78, 0, 79,
|
|
|
|
80, 0, 91, 83, 84, 0, 86, 87, 88, 0,
|
|
|
|
89, 90, 0, 0, 0, 0, 0, 0, 0, 0,
|
2020-01-08 11:04:47 +00:00
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
2020-03-05 13:20:53 +00:00
|
|
|
0, 0, 91,
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
|
|
|
var yyPact = [...]int{
|
|
|
|
|
2020-03-05 13:20:53 +00:00
|
|
|
11, 34, 353, 353, 255, 325, -1000, -1000, -1000, 80,
|
2019-12-21 08:44:12 +00:00
|
|
|
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
2020-03-05 13:20:53 +00:00
|
|
|
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 215,
|
|
|
|
-1000, 112, -1000, 429, -1000, -1000, -1000, -1000, -1000, -1000,
|
|
|
|
-1000, -1000, -1000, -1000, -1000, 26, 23, -1000, 300, -1000,
|
|
|
|
300, 77, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
|
|
|
-1000, -1000, -1000, -1000, -1000, -1000, 98, -1000, -1000, 166,
|
|
|
|
-1000, -1000, 21, -1000, 10, -1000, -38, -38, -38, -38,
|
|
|
|
-38, -38, -38, -38, -38, -38, -38, -38, -38, -38,
|
|
|
|
-38, 223, 155, 23, -47, -1000, 106, 106, 203, -1000,
|
|
|
|
395, 7, -1000, 149, -1000, -1000, 152, -1000, -1000, 95,
|
|
|
|
-1000, 31, -1000, 148, 300, -1000, -45, -46, -1000, 300,
|
|
|
|
300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
|
|
|
|
300, 300, 300, -1000, -1000, -1000, 86, -1000, -1000, -1000,
|
|
|
|
-1000, 150, -1000, -1000, 36, -1000, 429, -1000, -1000, 27,
|
|
|
|
-1000, 29, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
|
|
|
-1000, -1000, 3, -2, -1000, -1000, -1000, -1000, 72, 72,
|
|
|
|
354, 106, 106, 106, 106, 7, 57, 57, 57, 489,
|
|
|
|
459, 57, 57, 489, 7, 7, 57, 7, 354, -1000,
|
|
|
|
109, -1000, 35, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
2019-12-18 14:18:52 +00:00
|
|
|
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
|
|
|
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
2020-03-05 13:20:53 +00:00
|
|
|
-1000, 300, -1000, -1000, -1000, -1000, 69, 69, 1, -1000,
|
|
|
|
-1000, -1000, -1000, -1000, -1000, -1000, 17, 110, -1000, -1000,
|
|
|
|
14, -1000, 429, -1000, -1000, -1000, 69, -1000, -1000, -1000,
|
|
|
|
-1000, -1000,
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
|
|
|
var yyPgo = [...]int{
|
|
|
|
|
2020-03-05 13:20:53 +00:00
|
|
|
0, 274, 8, 273, 1, 269, 264, 185, 263, 159,
|
|
|
|
261, 230, 9, 260, 5, 4, 259, 246, 0, 6,
|
|
|
|
244, 7, 243, 11, 58, 241, 240, 2, 238, 237,
|
|
|
|
10, 231, 35, 222, 221, 207, 206, 193, 187, 172,
|
|
|
|
163, 109, 3, 161, 155, 150,
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
|
|
|
var yyR1 = [...]int{
|
|
|
|
|
2020-01-14 16:12:15 +00:00
|
|
|
0, 44, 44, 44, 44, 44, 44, 44, 27, 27,
|
|
|
|
27, 27, 27, 27, 27, 27, 27, 27, 27, 22,
|
|
|
|
22, 22, 22, 23, 23, 25, 25, 25, 25, 25,
|
|
|
|
25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
|
|
|
|
24, 26, 26, 36, 36, 31, 31, 31, 31, 14,
|
|
|
|
14, 14, 14, 13, 13, 13, 4, 4, 28, 30,
|
2020-01-16 15:20:20 +00:00
|
|
|
30, 29, 29, 29, 37, 35, 35, 33, 39, 39,
|
|
|
|
39, 39, 39, 40, 41, 41, 41, 32, 32, 32,
|
|
|
|
1, 1, 1, 2, 2, 2, 2, 11, 11, 7,
|
2020-03-05 13:20:53 +00:00
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 9, 9, 9,
|
|
|
|
9, 10, 10, 10, 12, 12, 12, 12, 45, 17,
|
|
|
|
17, 17, 17, 16, 16, 16, 16, 16, 20, 20,
|
|
|
|
20, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
|
|
|
3, 3, 6, 6, 6, 6, 6, 6, 6, 6,
|
2020-01-14 16:12:15 +00:00
|
|
|
6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
|
2020-03-05 13:20:53 +00:00
|
|
|
6, 6, 6, 6, 6, 8, 8, 5, 5, 5,
|
|
|
|
5, 34, 19, 21, 21, 18, 42, 38, 43, 43,
|
|
|
|
15, 15,
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
|
|
|
var yyR2 = [...]int{
|
|
|
|
|
2020-01-08 11:04:47 +00:00
|
|
|
0, 2, 2, 2, 2, 2, 2, 1, 1, 1,
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
|
|
|
|
3, 2, 2, 2, 2, 4, 4, 4, 4, 4,
|
|
|
|
4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
|
|
|
1, 0, 1, 3, 3, 1, 1, 3, 3, 3,
|
|
|
|
4, 2, 1, 3, 1, 2, 1, 1, 2, 3,
|
2020-01-16 15:20:20 +00:00
|
|
|
2, 3, 1, 2, 3, 3, 3, 4, 6, 6,
|
|
|
|
5, 4, 3, 2, 2, 1, 1, 3, 4, 2,
|
|
|
|
3, 1, 2, 3, 3, 2, 1, 2, 1, 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, 3, 4, 2,
|
|
|
|
0, 3, 1, 2, 3, 3, 2, 1, 2, 0,
|
|
|
|
3, 2, 1, 1, 3, 1, 3, 4, 1, 1,
|
|
|
|
1, 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,
|
2020-03-05 13:20:53 +00:00
|
|
|
1, 1, 1, 2, 2, 1, 1, 1, 0, 1,
|
|
|
|
0, 1,
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
|
|
|
var yyChk = [...]int{
|
|
|
|
|
2020-01-14 16:12:15 +00:00
|
|
|
-1000, -44, 68, 69, 70, 71, 2, 10, -11, -7,
|
2020-03-05 13:20:53 +00:00
|
|
|
-9, 45, 46, 59, 47, 48, 12, 32, 33, 36,
|
|
|
|
49, 16, 50, 63, 51, 52, 53, 54, 55, 13,
|
|
|
|
-45, -11, 10, -27, -22, -25, -28, -33, -34, -35,
|
|
|
|
-37, -38, -39, -40, -41, -3, 12, 17, 15, 23,
|
|
|
|
-8, -7, -32, 45, 46, 47, 48, 49, 50, 51,
|
|
|
|
52, 53, 54, 55, 26, 42, 13, -41, -9, -10,
|
|
|
|
18, -12, 12, 2, -17, 2, 26, 27, 28, 30,
|
|
|
|
31, 32, 33, 34, 35, 36, 37, 38, 39, 41,
|
|
|
|
42, 63, 14, -23, -30, 2, 59, 65, 15, -30,
|
|
|
|
-27, -27, -32, -1, 18, -2, 12, 2, 18, 7,
|
|
|
|
2, 28, 2, 22, -24, -31, -26, -36, 58, -24,
|
|
|
|
-24, -24, -24, -24, -24, -24, -24, -24, -24, -24,
|
|
|
|
-24, -24, -24, -42, 2, 9, -42, 2, -30, -23,
|
|
|
|
-14, 15, 2, -14, -29, 20, -27, 20, 18, 7,
|
|
|
|
2, -5, 2, 28, 39, 29, 40, 18, -12, 23,
|
|
|
|
2, -16, 5, -20, 12, -19, -21, 17, 26, 42,
|
|
|
|
-27, 62, 64, 60, 61, -27, -27, -27, -27, -27,
|
|
|
|
-27, -27, -27, -27, -27, -27, -27, -27, -27, 19,
|
|
|
|
6, 2, -13, 20, -4, -6, 2, 45, 58, 46,
|
|
|
|
59, 47, 48, 60, 61, 12, 62, 32, 33, 36,
|
|
|
|
49, 16, 50, 63, 64, 51, 52, 53, 54, 55,
|
|
|
|
20, 7, 18, -2, 23, 2, 24, 24, -21, -19,
|
|
|
|
-19, -14, -14, -15, -14, -15, -43, -42, 2, 20,
|
|
|
|
7, 2, -27, -18, 17, -18, 24, 19, 2, 20,
|
|
|
|
-4, -18,
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
|
|
|
var yyDef = [...]int{
|
|
|
|
|
2020-03-05 13:20:53 +00:00
|
|
|
0, -2, 110, 110, 0, 0, 7, 6, 1, 110,
|
|
|
|
88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
|
|
|
|
98, 99, 100, 101, 102, 103, 104, 105, 106, 0,
|
|
|
|
2, -2, 3, 4, 8, 9, 10, 11, 12, 13,
|
|
|
|
14, 15, 16, 17, 18, 0, 94, 171, 0, 177,
|
|
|
|
0, 75, 76, -2, -2, -2, -2, -2, -2, -2,
|
|
|
|
-2, -2, -2, -2, 165, 166, 0, 5, 87, 0,
|
|
|
|
109, 112, 0, 117, 118, 122, 41, 41, 41, 41,
|
2020-01-14 16:12:15 +00:00
|
|
|
41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
|
2020-03-05 13:20:53 +00:00
|
|
|
41, 0, 0, 0, 21, 22, 0, 0, 0, 58,
|
|
|
|
0, 73, 74, 0, 79, 81, 0, 86, 107, 0,
|
|
|
|
113, 0, 116, 121, 0, 40, 45, 46, 42, 0,
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
0, 0, 0, 65, 66, 176, 0, 72, 19, 20,
|
|
|
|
23, 0, 52, 24, 0, 60, 62, 64, 77, 0,
|
|
|
|
82, 0, 85, 167, 168, 169, 170, 108, 111, 114,
|
|
|
|
115, 120, 123, 125, 128, 129, 130, 172, 0, 0,
|
|
|
|
25, 0, 0, -2, -2, 26, 27, 28, 29, 30,
|
|
|
|
31, 32, 33, 34, 35, 36, 37, 38, 39, 67,
|
|
|
|
-2, 71, 0, 51, 54, 56, 57, 142, 143, 144,
|
|
|
|
145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
|
|
|
|
155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
|
|
|
|
59, 63, 78, 80, 83, 84, 0, 0, 0, 173,
|
|
|
|
174, 43, 44, 47, 181, 48, 0, -2, 70, 49,
|
|
|
|
0, 55, 61, 124, 175, 126, 0, 68, 69, 50,
|
|
|
|
53, 127,
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
|
|
|
var yyTok1 = [...]int{
|
|
|
|
|
|
|
|
1,
|
|
|
|
}
|
|
|
|
var yyTok2 = [...]int{
|
|
|
|
|
|
|
|
2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
|
|
|
|
12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
|
|
|
|
22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
|
|
|
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
|
|
|
|
42, 43, 44, 45, 46, 47, 48, 49, 50, 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,
|
2020-01-08 14:07:10 +00:00
|
|
|
72,
|
2019-12-05 16:16:12 +00:00
|
|
|
}
|
|
|
|
var yyTok3 = [...]int{
|
|
|
|
0,
|
|
|
|
}
|
|
|
|
|
|
|
|
var yyErrorMessages = [...]struct {
|
|
|
|
state int
|
|
|
|
token int
|
|
|
|
msg string
|
|
|
|
}{}
|
|
|
|
|
|
|
|
//line yaccpar:1
|
|
|
|
|
|
|
|
/* parser for yacc output */
|
|
|
|
|
|
|
|
var (
|
|
|
|
yyDebug = 0
|
|
|
|
yyErrorVerbose = false
|
|
|
|
)
|
|
|
|
|
|
|
|
type yyLexer interface {
|
|
|
|
Lex(lval *yySymType) int
|
|
|
|
Error(s string)
|
|
|
|
}
|
|
|
|
|
|
|
|
type yyParser interface {
|
|
|
|
Parse(yyLexer) int
|
|
|
|
Lookahead() int
|
|
|
|
}
|
|
|
|
|
|
|
|
type yyParserImpl struct {
|
|
|
|
lval yySymType
|
|
|
|
stack [yyInitialStackSize]yySymType
|
|
|
|
char int
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *yyParserImpl) Lookahead() int {
|
|
|
|
return p.char
|
|
|
|
}
|
|
|
|
|
|
|
|
func yyNewParser() yyParser {
|
|
|
|
return &yyParserImpl{}
|
|
|
|
}
|
|
|
|
|
|
|
|
const yyFlag = -1000
|
|
|
|
|
|
|
|
func yyTokname(c int) string {
|
|
|
|
if c >= 1 && c-1 < len(yyToknames) {
|
|
|
|
if yyToknames[c-1] != "" {
|
|
|
|
return yyToknames[c-1]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return __yyfmt__.Sprintf("tok-%v", c)
|
|
|
|
}
|
|
|
|
|
|
|
|
func yyStatname(s int) string {
|
|
|
|
if s >= 0 && s < len(yyStatenames) {
|
|
|
|
if yyStatenames[s] != "" {
|
|
|
|
return yyStatenames[s]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return __yyfmt__.Sprintf("state-%v", s)
|
|
|
|
}
|
|
|
|
|
|
|
|
func yyErrorMessage(state, lookAhead int) string {
|
|
|
|
const TOKSTART = 4
|
|
|
|
|
|
|
|
if !yyErrorVerbose {
|
|
|
|
return "syntax error"
|
|
|
|
}
|
|
|
|
|
|
|
|
for _, e := range yyErrorMessages {
|
|
|
|
if e.state == state && e.token == lookAhead {
|
|
|
|
return "syntax error: " + e.msg
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
res := "syntax error: unexpected " + yyTokname(lookAhead)
|
|
|
|
|
|
|
|
// To match Bison, suggest at most four expected tokens.
|
|
|
|
expected := make([]int, 0, 4)
|
|
|
|
|
|
|
|
// Look for shiftable tokens.
|
|
|
|
base := yyPact[state]
|
|
|
|
for tok := TOKSTART; tok-1 < len(yyToknames); tok++ {
|
|
|
|
if n := base + tok; n >= 0 && n < yyLast && yyChk[yyAct[n]] == tok {
|
|
|
|
if len(expected) == cap(expected) {
|
|
|
|
return res
|
|
|
|
}
|
|
|
|
expected = append(expected, tok)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if yyDef[state] == -2 {
|
|
|
|
i := 0
|
|
|
|
for yyExca[i] != -1 || yyExca[i+1] != state {
|
|
|
|
i += 2
|
|
|
|
}
|
|
|
|
|
|
|
|
// Look for tokens that we accept or reduce.
|
|
|
|
for i += 2; yyExca[i] >= 0; i += 2 {
|
|
|
|
tok := yyExca[i]
|
|
|
|
if tok < TOKSTART || yyExca[i+1] == 0 {
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
if len(expected) == cap(expected) {
|
|
|
|
return res
|
|
|
|
}
|
|
|
|
expected = append(expected, tok)
|
|
|
|
}
|
|
|
|
|
|
|
|
// If the default action is to accept or reduce, give up.
|
|
|
|
if yyExca[i+1] != 0 {
|
|
|
|
return res
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
for i, tok := range expected {
|
|
|
|
if i == 0 {
|
|
|
|
res += ", expecting "
|
|
|
|
} else {
|
|
|
|
res += " or "
|
|
|
|
}
|
|
|
|
res += yyTokname(tok)
|
|
|
|
}
|
|
|
|
return res
|
|
|
|
}
|
|
|
|
|
|
|
|
func yylex1(lex yyLexer, lval *yySymType) (char, token int) {
|
|
|
|
token = 0
|
|
|
|
char = lex.Lex(lval)
|
|
|
|
if char <= 0 {
|
|
|
|
token = yyTok1[0]
|
|
|
|
goto out
|
|
|
|
}
|
|
|
|
if char < len(yyTok1) {
|
|
|
|
token = yyTok1[char]
|
|
|
|
goto out
|
|
|
|
}
|
|
|
|
if char >= yyPrivate {
|
|
|
|
if char < yyPrivate+len(yyTok2) {
|
|
|
|
token = yyTok2[char-yyPrivate]
|
|
|
|
goto out
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for i := 0; i < len(yyTok3); i += 2 {
|
|
|
|
token = yyTok3[i+0]
|
|
|
|
if token == char {
|
|
|
|
token = yyTok3[i+1]
|
|
|
|
goto out
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
out:
|
|
|
|
if token == 0 {
|
|
|
|
token = yyTok2[1] /* unknown char */
|
|
|
|
}
|
|
|
|
if yyDebug >= 3 {
|
|
|
|
__yyfmt__.Printf("lex %s(%d)\n", yyTokname(token), uint(char))
|
|
|
|
}
|
|
|
|
return char, token
|
|
|
|
}
|
|
|
|
|
|
|
|
func yyParse(yylex yyLexer) int {
|
|
|
|
return yyNewParser().Parse(yylex)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (yyrcvr *yyParserImpl) Parse(yylex yyLexer) int {
|
|
|
|
var yyn int
|
|
|
|
var yyVAL yySymType
|
|
|
|
var yyDollar []yySymType
|
|
|
|
_ = yyDollar // silence set and not used
|
|
|
|
yyS := yyrcvr.stack[:]
|
|
|
|
|
|
|
|
Nerrs := 0 /* number of errors */
|
|
|
|
Errflag := 0 /* error recovery flag */
|
|
|
|
yystate := 0
|
|
|
|
yyrcvr.char = -1
|
|
|
|
yytoken := -1 // yyrcvr.char translated into internal numbering
|
|
|
|
defer func() {
|
|
|
|
// Make sure we report no lookahead when not parsing.
|
|
|
|
yystate = -1
|
|
|
|
yyrcvr.char = -1
|
|
|
|
yytoken = -1
|
|
|
|
}()
|
|
|
|
yyp := -1
|
|
|
|
goto yystack
|
|
|
|
|
|
|
|
ret0:
|
|
|
|
return 0
|
|
|
|
|
|
|
|
ret1:
|
|
|
|
return 1
|
|
|
|
|
|
|
|
yystack:
|
|
|
|
/* put a state and value onto the stack */
|
|
|
|
if yyDebug >= 4 {
|
|
|
|
__yyfmt__.Printf("char %v in %v\n", yyTokname(yytoken), yyStatname(yystate))
|
|
|
|
}
|
|
|
|
|
|
|
|
yyp++
|
|
|
|
if yyp >= len(yyS) {
|
|
|
|
nyys := make([]yySymType, len(yyS)*2)
|
|
|
|
copy(nyys, yyS)
|
|
|
|
yyS = nyys
|
|
|
|
}
|
|
|
|
yyS[yyp] = yyVAL
|
|
|
|
yyS[yyp].yys = yystate
|
|
|
|
|
|
|
|
yynewstate:
|
|
|
|
yyn = yyPact[yystate]
|
|
|
|
if yyn <= yyFlag {
|
|
|
|
goto yydefault /* simple state */
|
|
|
|
}
|
|
|
|
if yyrcvr.char < 0 {
|
|
|
|
yyrcvr.char, yytoken = yylex1(yylex, &yyrcvr.lval)
|
|
|
|
}
|
|
|
|
yyn += yytoken
|
|
|
|
if yyn < 0 || yyn >= yyLast {
|
|
|
|
goto yydefault
|
|
|
|
}
|
|
|
|
yyn = yyAct[yyn]
|
|
|
|
if yyChk[yyn] == yytoken { /* valid shift */
|
|
|
|
yyrcvr.char = -1
|
|
|
|
yytoken = -1
|
|
|
|
yyVAL = yyrcvr.lval
|
|
|
|
yystate = yyn
|
|
|
|
if Errflag > 0 {
|
|
|
|
Errflag--
|
|
|
|
}
|
|
|
|
goto yystack
|
|
|
|
}
|
|
|
|
|
|
|
|
yydefault:
|
|
|
|
/* default state action */
|
|
|
|
yyn = yyDef[yystate]
|
|
|
|
if yyn == -2 {
|
|
|
|
if yyrcvr.char < 0 {
|
|
|
|
yyrcvr.char, yytoken = yylex1(yylex, &yyrcvr.lval)
|
|
|
|
}
|
|
|
|
|
|
|
|
/* look through exception table */
|
|
|
|
xi := 0
|
|
|
|
for {
|
|
|
|
if yyExca[xi+0] == -1 && yyExca[xi+1] == yystate {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
xi += 2
|
|
|
|
}
|
|
|
|
for xi += 2; ; xi += 2 {
|
|
|
|
yyn = yyExca[xi+0]
|
|
|
|
if yyn < 0 || yyn == yytoken {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
yyn = yyExca[xi+1]
|
|
|
|
if yyn < 0 {
|
|
|
|
goto ret0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if yyn == 0 {
|
|
|
|
/* error ... attempt to resume parsing */
|
|
|
|
switch Errflag {
|
|
|
|
case 0: /* brand new error */
|
|
|
|
yylex.Error(yyErrorMessage(yystate, yytoken))
|
|
|
|
Nerrs++
|
|
|
|
if yyDebug >= 1 {
|
|
|
|
__yyfmt__.Printf("%s", yyStatname(yystate))
|
|
|
|
__yyfmt__.Printf(" saw %s\n", yyTokname(yytoken))
|
|
|
|
}
|
|
|
|
fallthrough
|
|
|
|
|
|
|
|
case 1, 2: /* incompletely recovered error ... try again */
|
|
|
|
Errflag = 3
|
|
|
|
|
|
|
|
/* find a state where "error" is a legal shift action */
|
|
|
|
for yyp >= 0 {
|
|
|
|
yyn = yyPact[yyS[yyp].yys] + yyErrCode
|
|
|
|
if yyn >= 0 && yyn < yyLast {
|
|
|
|
yystate = yyAct[yyn] /* simulate a shift of "error" */
|
|
|
|
if yyChk[yystate] == yyErrCode {
|
|
|
|
goto yystack
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* the current p has no shift on "error", pop stack */
|
|
|
|
if yyDebug >= 2 {
|
|
|
|
__yyfmt__.Printf("error recovery pops state %d\n", yyS[yyp].yys)
|
|
|
|
}
|
|
|
|
yyp--
|
|
|
|
}
|
|
|
|
/* there is no state on the stack with an error shift ... abort */
|
|
|
|
goto ret1
|
|
|
|
|
|
|
|
case 3: /* no shift yet; clobber input char */
|
|
|
|
if yyDebug >= 2 {
|
|
|
|
__yyfmt__.Printf("error recovery discards %s\n", yyTokname(yytoken))
|
|
|
|
}
|
|
|
|
if yytoken == yyEofCode {
|
|
|
|
goto ret1
|
|
|
|
}
|
|
|
|
yyrcvr.char = -1
|
|
|
|
yytoken = -1
|
|
|
|
goto yynewstate /* try again in the same state */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* reduction by production yyn */
|
|
|
|
if yyDebug >= 2 {
|
|
|
|
__yyfmt__.Printf("reduce %v in:\n\t%v\n", yyn, yyStatname(yystate))
|
|
|
|
}
|
|
|
|
|
|
|
|
yynt := yyn
|
|
|
|
yypt := yyp
|
|
|
|
_ = yypt // guard against "declared and not used"
|
|
|
|
|
|
|
|
yyp -= yyR2[yyn]
|
|
|
|
// yyp is now the index of $0. Perform the default action. Iff the
|
|
|
|
// reduced production is ε, $1 is possibly out of range.
|
|
|
|
if yyp+1 >= len(yyS) {
|
|
|
|
nyys := make([]yySymType, len(yyS)*2)
|
|
|
|
copy(nyys, yyS)
|
|
|
|
yyS = nyys
|
|
|
|
}
|
|
|
|
yyVAL = yyS[yyp+1]
|
|
|
|
|
|
|
|
/* consult goto table to find next state */
|
|
|
|
yyn = yyR1[yyn]
|
|
|
|
yyg := yyPgo[yyn]
|
|
|
|
yyj := yyg + yyS[yyp].yys + 1
|
|
|
|
|
|
|
|
if yyj >= yyLast {
|
|
|
|
yystate = yyAct[yyg]
|
|
|
|
} else {
|
|
|
|
yystate = yyAct[yyj]
|
|
|
|
if yyChk[yystate] != -yyn {
|
|
|
|
yystate = yyAct[yyg]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// dummy call; replaced with literal code
|
|
|
|
switch yynt {
|
|
|
|
|
|
|
|
case 1:
|
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2020-02-03 17:48:27 +00:00
|
|
|
//line generated_parser.y:164
|
2019-12-05 16:16:12 +00:00
|
|
|
{
|
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]
|
2020-02-03 17:48:27 +00:00
|
|
|
//line generated_parser.y:167
|
2019-12-05 16:16:12 +00:00
|
|
|
{
|
2020-01-17 15:16:58 +00:00
|
|
|
yylex.(*parser).addParseErrf(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]
|
2020-02-03 17:48:27 +00:00
|
|
|
//line generated_parser.y:169
|
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]
|
2020-02-03 17:48:27 +00:00
|
|
|
//line generated_parser.y:171
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
|
|
|
yylex.(*parser).generatedParserResult = yyDollar[2].node
|
|
|
|
}
|
|
|
|
case 7:
|
2019-12-16 13:58:47 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2020-02-03 17:48:27 +00:00
|
|
|
//line generated_parser.y:174
|
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
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
case 19:
|
2019-12-16 13:58:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2020-02-03 17:48:27 +00:00
|
|
|
//line generated_parser.y:196
|
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
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
case 20:
|
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2020-02-03 17:48:27 +00:00
|
|
|
//line generated_parser.y:198
|
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
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
case 21:
|
2019-12-05 16:16:12 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2020-02-03 17:48:27 +00:00
|
|
|
//line generated_parser.y:200
|
2019-12-05 16:16:12 +00:00
|
|
|
{
|
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
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
case 22:
|
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2020-02-03 17:48:27 +00:00
|
|
|
//line generated_parser.y:202
|
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
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
case 23:
|
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:210
|
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
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
case 24:
|
2019-12-16 13:58:47 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:216
|
2019-12-16 13:58:47 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.node = &AggregateExpr{
|
|
|
|
Grouping: yyDollar[2].strings,
|
|
|
|
Without: true,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 25:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:229
|
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)
|
2019-12-16 13:58:47 +00:00
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
case 26:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:230
|
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)
|
|
|
|
}
|
|
|
|
case 27:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:231
|
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)
|
|
|
|
}
|
|
|
|
case 28:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:232
|
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)
|
|
|
|
}
|
|
|
|
case 29:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:233
|
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)
|
|
|
|
}
|
|
|
|
case 30:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:234
|
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)
|
|
|
|
}
|
|
|
|
case 31:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:235
|
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)
|
|
|
|
}
|
|
|
|
case 32:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:236
|
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)
|
|
|
|
}
|
|
|
|
case 33:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:237
|
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)
|
|
|
|
}
|
|
|
|
case 34:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:238
|
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)
|
|
|
|
}
|
|
|
|
case 35:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:239
|
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)
|
|
|
|
}
|
|
|
|
case 36:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:240
|
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)
|
|
|
|
}
|
|
|
|
case 37:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:241
|
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)
|
|
|
|
}
|
|
|
|
case 38:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:242
|
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)
|
|
|
|
}
|
|
|
|
case 39:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:243
|
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)
|
|
|
|
}
|
|
|
|
case 41:
|
|
|
|
yyDollar = yyS[yypt-0 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:251
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
|
|
|
yyVAL.node = &BinaryExpr{
|
|
|
|
VectorMatching: &VectorMatching{Card: CardOneToOne},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 42:
|
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:256
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
|
|
|
yyVAL.node = &BinaryExpr{
|
|
|
|
VectorMatching: &VectorMatching{Card: CardOneToOne},
|
|
|
|
ReturnBool: true,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 43:
|
2019-12-05 16:16:12 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:264
|
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
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
case 44:
|
2019-12-16 13:58:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:269
|
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
|
|
|
|
}
|
|
|
|
case 47:
|
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:279
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
|
|
|
yyVAL.node = yyDollar[1].node
|
|
|
|
yyVAL.node.(*BinaryExpr).VectorMatching.Card = CardManyToOne
|
|
|
|
yyVAL.node.(*BinaryExpr).VectorMatching.Include = yyDollar[3].strings
|
|
|
|
}
|
|
|
|
case 48:
|
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:285
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
|
|
|
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
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
case 49:
|
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:294
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
|
|
|
yyVAL.strings = yyDollar[2].strings
|
|
|
|
}
|
|
|
|
case 50:
|
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:296
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
|
|
|
yyVAL.strings = yyDollar[2].strings
|
|
|
|
}
|
|
|
|
case 51:
|
2019-12-16 13:58:47 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:298
|
2019-12-16 13:58:47 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.strings = []string{}
|
2019-12-16 13:58:47 +00:00
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
case 52:
|
2019-12-05 16:16:12 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:300
|
2019-12-05 16:16:12 +00:00
|
|
|
{
|
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
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
case 53:
|
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:306
|
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
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
case 54:
|
2019-12-16 16:38:18 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:308
|
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
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
case 55:
|
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:310
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
|
|
|
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
|
|
|
}
|
|
|
|
case 56:
|
2019-12-18 14:18:52 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:314
|
2019-12-18 14:18:52 +00:00
|
|
|
{
|
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
|
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
case 57:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:321
|
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
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
case 58:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:329
|
2019-12-16 13:58:47 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
fn, exist := getFunction(yyDollar[1].item.Val)
|
|
|
|
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
|
|
|
}
|
|
|
|
yyVAL.node = &Call{
|
|
|
|
Func: fn,
|
|
|
|
Args: yyDollar[2].node.(Expressions),
|
2020-01-14 16:12:15 +00:00
|
|
|
PosRange: PositionRange{
|
|
|
|
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
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
case 59:
|
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:346
|
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
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
case 60:
|
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:348
|
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
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
case 61:
|
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:352
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
|
|
|
yyVAL.node = append(yyDollar[1].node.(Expressions), yyDollar[3].node.(Expr))
|
|
|
|
}
|
|
|
|
case 62:
|
2019-12-16 16:38:18 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:354
|
2019-12-16 16:38:18 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.node = Expressions{yyDollar[1].node.(Expr)}
|
2019-12-16 16:38:18 +00:00
|
|
|
}
|
2020-01-08 11:04:47 +00:00
|
|
|
case 63:
|
2020-01-16 15:20:20 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:356
|
2020-01-16 15:20:20 +00:00
|
|
|
{
|
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
|
|
|
|
}
|
|
|
|
case 64:
|
2019-12-16 16:38:18 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:367
|
2019-12-16 16:38:18 +00:00
|
|
|
{
|
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
|
|
|
}
|
2020-01-16 15:20:20 +00:00
|
|
|
case 65:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:375
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
|
|
|
yylex.(*parser).addOffset(yyDollar[1].node, yyDollar[3].duration)
|
|
|
|
yyVAL.node = yyDollar[1].node
|
|
|
|
}
|
2020-01-16 15:20:20 +00:00
|
|
|
case 66:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:380
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
|
|
|
yylex.(*parser).unexpected("offset", "duration")
|
2020-01-16 15:20:20 +00:00
|
|
|
yyVAL.node = yyDollar[1].node
|
2020-01-08 11:04:47 +00:00
|
|
|
}
|
2020-01-16 15:20:20 +00:00
|
|
|
case 67:
|
2019-12-16 16:38:18 +00:00
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:388
|
2019-12-16 16:38:18 +00:00
|
|
|
{
|
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"
|
|
|
|
} else if vs.Offset != 0 {
|
|
|
|
errMsg = "no offset 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
|
|
|
}
|
2020-01-16 15:20:20 +00:00
|
|
|
case 68:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-6 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:411
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|
2020-01-16 15:20:20 +00:00
|
|
|
case 69:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-6 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:421
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
|
|
|
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
|
|
|
}
|
2020-01-16 15:20:20 +00:00
|
|
|
case 70:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-5 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:423
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
|
|
|
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
|
|
|
}
|
2020-01-16 15:20:20 +00:00
|
|
|
case 71:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:425
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
|
|
|
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
|
|
|
}
|
2020-01-16 15:20:20 +00:00
|
|
|
case 72:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:427
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
|
|
|
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
|
|
|
}
|
2020-01-16 15:20:20 +00:00
|
|
|
case 73:
|
2019-12-16 13:58:47 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:437
|
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
|
|
|
}
|
2020-01-16 15:20:20 +00:00
|
|
|
case 74:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:455
|
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
|
|
|
}
|
2020-01-16 15:20:20 +00:00
|
|
|
case 75:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:463
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
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
|
|
|
}
|
2020-01-16 15:20:20 +00:00
|
|
|
case 76:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:473
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
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
|
|
|
}
|
2020-01-16 15:20:20 +00:00
|
|
|
case 77:
|
2019-12-16 16:38:18 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:481
|
2019-12-16 16:38:18 +00:00
|
|
|
{
|
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
|
|
|
}
|
2020-01-16 15:20:20 +00:00
|
|
|
case 78:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:488
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
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
|
|
|
}
|
2020-01-16 15:20:20 +00:00
|
|
|
case 79:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:495
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
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
|
|
|
}
|
2020-01-16 15:20:20 +00:00
|
|
|
case 80:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:504
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
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
|
|
|
}
|
2020-01-16 15:20:20 +00:00
|
|
|
case 81:
|
2019-12-16 16:38:18 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:512
|
2019-12-16 16:38:18 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.matchers = []*labels.Matcher{yyDollar[1].matcher}
|
2019-12-16 16:38:18 +00:00
|
|
|
}
|
2020-01-16 15:20:20 +00:00
|
|
|
case 82:
|
2019-12-16 16:38:18 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:514
|
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
|
|
|
}
|
2020-01-16 15:20:20 +00:00
|
|
|
case 83:
|
2019-12-16 13:58:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:518
|
2019-12-16 13:58:47 +00:00
|
|
|
{
|
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
|
|
|
}
|
2020-01-16 15:20:20 +00:00
|
|
|
case 84:
|
2019-12-16 13:58:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:520
|
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
|
|
|
}
|
2020-01-16 15:20:20 +00:00
|
|
|
case 85:
|
2019-12-16 13:58:47 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:522
|
2019-12-16 13:58:47 +00:00
|
|
|
{
|
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
|
|
|
}
|
2020-01-16 15:20:20 +00:00
|
|
|
case 86:
|
2019-12-05 16:16:12 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:524
|
2019-12-05 16:16:12 +00:00
|
|
|
{
|
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
|
|
|
}
|
2020-01-16 15:20:20 +00:00
|
|
|
case 87:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:532
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
|
|
|
yyVAL.labels = append(yyDollar[2].labels, labels.Label{Name: labels.MetricName, Value: yyDollar[1].item.Val})
|
|
|
|
sort.Sort(yyVAL.labels)
|
|
|
|
}
|
2020-01-16 15:20:20 +00:00
|
|
|
case 88:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:534
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
|
|
|
yyVAL.labels = yyDollar[1].labels
|
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 107:
|
2019-12-18 14:18:52 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:541
|
2019-12-18 14:18:52 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.labels = labels.New(yyDollar[2].labels...)
|
2019-12-18 14:18:52 +00:00
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 108:
|
2019-12-20 11:28:56 +00:00
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:543
|
2019-12-18 14:18:52 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.labels = labels.New(yyDollar[2].labels...)
|
2019-12-18 14:18:52 +00:00
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 109:
|
2019-12-20 11:28:56 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:545
|
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
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 110:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-0 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:547
|
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
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 111:
|
2019-12-18 14:18:52 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:551
|
2019-12-18 14:18:52 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.labels = append(yyDollar[1].labels, yyDollar[3].label)
|
2019-12-18 14:18:52 +00:00
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 112:
|
2019-12-18 14:18:52 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:553
|
2019-12-18 14:18:52 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yyVAL.labels = []labels.Label{yyDollar[1].label}
|
2019-12-18 14:18:52 +00:00
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 113:
|
2019-12-18 14:18:52 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:555
|
2019-12-18 14:18:52 +00:00
|
|
|
{
|
2020-01-08 11:04:47 +00:00
|
|
|
yylex.(*parser).unexpected("label set", "\",\" or \"}\"")
|
2020-01-16 15:20:20 +00:00
|
|
|
yyVAL.labels = yyDollar[1].labels
|
2019-12-18 14:18:52 +00:00
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 114:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:560
|
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
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 115:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:562
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
|
|
|
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
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 116:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:564
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
|
|
|
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
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 117:
|
2019-12-18 14:18:52 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:566
|
2019-12-18 14:18:52 +00:00
|
|
|
{
|
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
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 118:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:574
|
2019-12-21 08:44:12 +00:00
|
|
|
{
|
|
|
|
yylex.(*parser).generatedParserResult = &seriesDescription{
|
|
|
|
labels: yyDollar[1].labels,
|
|
|
|
values: yyDollar[2].series,
|
|
|
|
}
|
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 119:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-0 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:583
|
2019-12-21 08:44:12 +00:00
|
|
|
{
|
2020-02-03 16:45:41 +00:00
|
|
|
yyVAL.series = []SequenceValue{}
|
2019-12-21 08:44:12 +00:00
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 120:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:585
|
2019-12-21 08:44:12 +00:00
|
|
|
{
|
|
|
|
yyVAL.series = append(yyDollar[1].series, yyDollar[3].series...)
|
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 121:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:587
|
2019-12-21 08:44:12 +00:00
|
|
|
{
|
|
|
|
yyVAL.series = yyDollar[1].series
|
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 122:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:589
|
2019-12-21 08:44:12 +00:00
|
|
|
{
|
|
|
|
yylex.(*parser).unexpected("series values", "")
|
2020-01-16 15:20:20 +00:00
|
|
|
yyVAL.series = nil
|
2019-12-21 08:44:12 +00:00
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 123:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:593
|
2019-12-21 08:44:12 +00:00
|
|
|
{
|
2020-02-03 17:48:27 +00:00
|
|
|
yyVAL.series = []SequenceValue{{Omitted: true}}
|
2019-12-21 08:44:12 +00:00
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 124:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:595
|
2019-12-21 08:44:12 +00:00
|
|
|
{
|
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
|
|
|
}
|
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 125:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:602
|
2019-12-21 08:44:12 +00:00
|
|
|
{
|
2020-02-03 17:48:27 +00:00
|
|
|
yyVAL.series = []SequenceValue{{Value: yyDollar[1].float}}
|
2019-12-21 08:44:12 +00:00
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 126:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-3 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:604
|
2019-12-21 08:44:12 +00:00
|
|
|
{
|
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{Value: yyDollar[1].float})
|
2019-12-21 08:44:12 +00:00
|
|
|
}
|
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 127:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-4 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:611
|
2019-12-21 08:44:12 +00:00
|
|
|
{
|
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[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
|
|
|
|
}
|
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 128:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:621
|
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
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 171:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:652
|
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
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 172:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:660
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
|
|
|
yyVAL.float = yylex.(*parser).number(yyDollar[1].item.Val)
|
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 173:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:662
|
2019-12-21 08:44:12 +00:00
|
|
|
{
|
|
|
|
yyVAL.float = yyDollar[2].float
|
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 174:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-2 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:663
|
2019-12-21 08:44:12 +00:00
|
|
|
{
|
|
|
|
yyVAL.float = -yyDollar[2].float
|
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 175:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:667
|
2019-12-21 08:44:12 +00:00
|
|
|
{
|
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
|
|
|
}
|
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 176:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:677
|
2019-12-21 08:44:12 +00:00
|
|
|
{
|
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
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 177:
|
2019-12-21 08:44:12 +00:00
|
|
|
yyDollar = yyS[yypt-1 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:688
|
2019-12-21 08:44:12 +00:00
|
|
|
{
|
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
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 178:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-0 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:701
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
|
|
|
yyVAL.duration = 0
|
|
|
|
}
|
2020-03-05 13:20:53 +00:00
|
|
|
case 180:
|
2020-01-08 11:04:47 +00:00
|
|
|
yyDollar = yyS[yypt-0 : yypt+1]
|
2020-03-05 08:03:38 +00:00
|
|
|
//line generated_parser.y:705
|
2020-01-08 11:04:47 +00:00
|
|
|
{
|
|
|
|
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 */
|
|
|
|
}
|