// Code generated by goyacc -l -o promql/parser/generated_parser.y.go promql/parser/generated_parser.y. DO NOT EDIT.
package parser

import __yyfmt__ "fmt"

import (
	"math"
	"strconv"
	"time"

	"github.com/prometheus/prometheus/model/histogram"
	"github.com/prometheus/prometheus/model/labels"
	"github.com/prometheus/prometheus/model/value"
	"github.com/prometheus/prometheus/promql/parser/posrange"

	"github.com/prometheus/common/model"
)

type yySymType struct {
	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
}

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 CUSTOM_VALUES_DESC = 57379
const COUNTER_RESET_HINT_DESC = 57380
const histogramDescEnd = 57381
const operatorsStart = 57382
const ADD = 57383
const DIV = 57384
const EQLC = 57385
const EQL_REGEX = 57386
const GTE = 57387
const GTR = 57388
const LAND = 57389
const LOR = 57390
const LSS = 57391
const LTE = 57392
const LUNLESS = 57393
const MOD = 57394
const MUL = 57395
const NEQ = 57396
const NEQ_REGEX = 57397
const POW = 57398
const SUB = 57399
const AT = 57400
const ATAN2 = 57401
const operatorsEnd = 57402
const aggregatorsStart = 57403
const AVG = 57404
const BOTTOMK = 57405
const COUNT = 57406
const COUNT_VALUES = 57407
const GROUP = 57408
const MAX = 57409
const MIN = 57410
const QUANTILE = 57411
const STDDEV = 57412
const STDVAR = 57413
const SUM = 57414
const TOPK = 57415
const LIMITK = 57416
const LIMIT_RATIO = 57417
const aggregatorsEnd = 57418
const keywordsStart = 57419
const BOOL = 57420
const BY = 57421
const GROUP_LEFT = 57422
const GROUP_RIGHT = 57423
const IGNORING = 57424
const OFFSET = 57425
const SMOOTHED = 57426
const ANCHORED = 57427
const ON = 57428
const WITHOUT = 57429
const keywordsEnd = 57430
const preprocessorStart = 57431
const START = 57432
const END = 57433
const STEP = 57434
const preprocessorEnd = 57435
const counterResetHintsStart = 57436
const UNKNOWN_COUNTER_RESET = 57437
const COUNTER_RESET = 57438
const NOT_COUNTER_RESET = 57439
const GAUGE_TYPE = 57440
const counterResetHintsEnd = 57441
const startSymbolsStart = 57442
const START_METRIC = 57443
const START_SERIES_DESCRIPTION = 57444
const START_EXPRESSION = 57445
const START_METRIC_SELECTOR = 57446
const startSymbolsEnd = 57447

var yyToknames = [...]string{
	"$end",
	"error",
	"$unk",
	"EQL",
	"BLANK",
	"COLON",
	"COMMA",
	"COMMENT",
	"DURATION",
	"EOF",
	"ERROR",
	"IDENTIFIER",
	"LEFT_BRACE",
	"LEFT_BRACKET",
	"LEFT_PAREN",
	"OPEN_HIST",
	"CLOSE_HIST",
	"METRIC_IDENTIFIER",
	"NUMBER",
	"RIGHT_BRACE",
	"RIGHT_BRACKET",
	"RIGHT_PAREN",
	"SEMICOLON",
	"SPACE",
	"STRING",
	"TIMES",
	"histogramDescStart",
	"SUM_DESC",
	"COUNT_DESC",
	"SCHEMA_DESC",
	"OFFSET_DESC",
	"NEGATIVE_OFFSET_DESC",
	"BUCKETS_DESC",
	"NEGATIVE_BUCKETS_DESC",
	"ZERO_BUCKET_DESC",
	"ZERO_BUCKET_WIDTH_DESC",
	"CUSTOM_VALUES_DESC",
	"COUNTER_RESET_HINT_DESC",
	"histogramDescEnd",
	"operatorsStart",
	"ADD",
	"DIV",
	"EQLC",
	"EQL_REGEX",
	"GTE",
	"GTR",
	"LAND",
	"LOR",
	"LSS",
	"LTE",
	"LUNLESS",
	"MOD",
	"MUL",
	"NEQ",
	"NEQ_REGEX",
	"POW",
	"SUB",
	"AT",
	"ATAN2",
	"operatorsEnd",
	"aggregatorsStart",
	"AVG",
	"BOTTOMK",
	"COUNT",
	"COUNT_VALUES",
	"GROUP",
	"MAX",
	"MIN",
	"QUANTILE",
	"STDDEV",
	"STDVAR",
	"SUM",
	"TOPK",
	"LIMITK",
	"LIMIT_RATIO",
	"aggregatorsEnd",
	"keywordsStart",
	"BOOL",
	"BY",
	"GROUP_LEFT",
	"GROUP_RIGHT",
	"IGNORING",
	"OFFSET",
	"SMOOTHED",
	"ANCHORED",
	"ON",
	"WITHOUT",
	"keywordsEnd",
	"preprocessorStart",
	"START",
	"END",
	"STEP",
	"preprocessorEnd",
	"counterResetHintsStart",
	"UNKNOWN_COUNTER_RESET",
	"COUNTER_RESET",
	"NOT_COUNTER_RESET",
	"GAUGE_TYPE",
	"counterResetHintsEnd",
	"startSymbolsStart",
	"START_METRIC",
	"START_SERIES_DESCRIPTION",
	"START_EXPRESSION",
	"START_METRIC_SELECTOR",
	"startSymbolsEnd",
}

var yyStatenames = [...]string{}

const yyEofCode = 1
const yyErrCode = 2
const yyInitialStackSize = 16

var yyExca = [...]int16{
	-1, 1,
	1, -1,
	-2, 0,
	-1, 38,
	1, 147,
	10, 147,
	24, 147,
	-2, 0,
	-1, 68,
	2, 190,
	15, 190,
	79, 190,
	87, 190,
	-2, 107,
	-1, 69,
	2, 191,
	15, 191,
	79, 191,
	87, 191,
	-2, 108,
	-1, 70,
	2, 192,
	15, 192,
	79, 192,
	87, 192,
	-2, 110,
	-1, 71,
	2, 193,
	15, 193,
	79, 193,
	87, 193,
	-2, 111,
	-1, 72,
	2, 194,
	15, 194,
	79, 194,
	87, 194,
	-2, 112,
	-1, 73,
	2, 195,
	15, 195,
	79, 195,
	87, 195,
	-2, 117,
	-1, 74,
	2, 196,
	15, 196,
	79, 196,
	87, 196,
	-2, 119,
	-1, 75,
	2, 197,
	15, 197,
	79, 197,
	87, 197,
	-2, 121,
	-1, 76,
	2, 198,
	15, 198,
	79, 198,
	87, 198,
	-2, 122,
	-1, 77,
	2, 199,
	15, 199,
	79, 199,
	87, 199,
	-2, 123,
	-1, 78,
	2, 200,
	15, 200,
	79, 200,
	87, 200,
	-2, 124,
	-1, 79,
	2, 201,
	15, 201,
	79, 201,
	87, 201,
	-2, 125,
	-1, 80,
	2, 202,
	15, 202,
	79, 202,
	87, 202,
	-2, 129,
	-1, 81,
	2, 203,
	15, 203,
	79, 203,
	87, 203,
	-2, 130,
	-1, 133,
	41, 266,
	42, 266,
	52, 266,
	53, 266,
	57, 266,
	-2, 22,
	-1, 243,
	9, 253,
	12, 253,
	13, 253,
	18, 253,
	19, 253,
	25, 253,
	41, 253,
	47, 253,
	48, 253,
	51, 253,
	57, 253,
	62, 253,
	63, 253,
	64, 253,
	65, 253,
	66, 253,
	67, 253,
	68, 253,
	69, 253,
	70, 253,
	71, 253,
	72, 253,
	73, 253,
	74, 253,
	75, 253,
	79, 253,
	83, 253,
	87, 253,
	90, 253,
	91, 253,
	92, 253,
	-2, 0,
	-1, 244,
	9, 253,
	12, 253,
	13, 253,
	18, 253,
	19, 253,
	25, 253,
	41, 253,
	47, 253,
	48, 253,
	51, 253,
	57, 253,
	62, 253,
	63, 253,
	64, 253,
	65, 253,
	66, 253,
	67, 253,
	68, 253,
	69, 253,
	70, 253,
	71, 253,
	72, 253,
	73, 253,
	74, 253,
	75, 253,
	79, 253,
	83, 253,
	87, 253,
	90, 253,
	91, 253,
	92, 253,
	-2, 0,
}

const yyPrivate = 57344

const yyLast = 1052

var yyAct = [...]int16{
	55, 180, 397, 395, 183, 402, 276, 235, 191, 328,
	91, 45, 342, 139, 66, 219, 89, 241, 17, 84,
	154, 242, 125, 62, 22, 184, 124, 123, 343, 409,
	410, 411, 412, 126, 120, 128, 243, 244, 64, 122,
	392, 127, 391, 362, 121, 119, 149, 319, 122, 192,
	381, 350, 360, 18, 19, 188, 59, 20, 220, 318,
	221, 131, 179, 133, 6, 187, 58, 426, 11, 12,
	14, 15, 16, 21, 23, 25, 26, 27, 28, 29,
	33, 34, 317, 316, 129, 13, 40, 189, 82, 24,
	396, 348, 214, 30, 322, 141, 31, 32, 35, 126,
	223, 360, 134, 190, 83, 369, 315, 127, 239, 323,
	222, 224, 346, 176, 178, 177, 424, 193, 197, 198,
	199, 200, 201, 202, 172, 324, 345, 175, 194, 194,
	194, 194, 194, 194, 194, 423, 173, 215, 422, 196,
	195, 195, 195, 195, 195, 195, 195, 130, 194, 132,
	203, 182, 204, 386, 237, 205, 208, 225, 188, 135,
	195, 227, 320, 2, 3, 4, 5, 268, 187, 171,
	266, 207, 385, 188, 264, 238, 59, 189, 231, 403,
	267, 229, 179, 187, 206, 260, 58, 368, 262, 265,
	189, 194, 425, 190, 269, 270, 264, 195, 311, 150,
	84, 230, 367, 195, 228, 189, 190, 194, 82, 366,
	273, 117, 120, 310, 272, 211, 128, 136, 221, 195,
	218, 190, 121, 119, 83, 217, 122, 118, 141, 271,
	36, 314, 7, 380, 178, 177, 379, 240, 216, 185,
	186, 378, 245, 246, 247, 248, 249, 250, 251, 252,
	253, 254, 255, 256, 257, 258, 259, 344, 223, 174,
	321, 145, 188, 377, 347, 148, 144, 349, 222, 224,
	340, 341, 187, 193, 376, 194, 375, 374, 194, 143,
	373, 351, 95, 10, 194, 59, 116, 195, 372, 371,
	195, 179, 413, 86, 370, 58, 195, 155, 156, 157,
	158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
	168, 169, 53, 358, 147, 421, 146, 82, 85, 37,
	1, 170, 359, 361, 194, 363, 117, 120, 110, 67,
	115, 364, 365, 83, 117, 120, 195, 121, 119, 52,
	51, 122, 118, 178, 177, 121, 119, 382, 63, 122,
	118, 9, 9, 50, 142, 112, 114, 113, 194, 8,
	49, 153, 388, 38, 140, 390, 356, 48, 196, 47,
	195, 355, 313, 398, 399, 400, 394, 93, 46, 401,
	44, 405, 404, 407, 406, 414, 354, 279, 151, 209,
	43, 152, 389, 42, 415, 416, 194, 289, 357, 417,
	383, 41, 54, 295, 234, 419, 418, 387, 195, 325,
	278, 117, 120, 94, 420, 232, 274, 87, 408, 117,
	120, 181, 121, 119, 427, 194, 122, 118, 277, 56,
	121, 119, 291, 292, 122, 118, 293, 195, 137, 0,
	0, 0, 0, 0, 306, 0, 0, 280, 282, 284,
	285, 286, 294, 296, 299, 300, 301, 302, 303, 307,
	308, 0, 279, 281, 283, 287, 288, 290, 297, 92,
	142, 298, 289, 0, 0, 304, 305, 309, 295, 90,
	140, 0, 275, 213, 0, 278, 92, 226, 138, 59,
	0, 0, 93, 93, 0, 263, 90, 0, 0, 58,
	0, 0, 117, 120, 88, 0, 0, 291, 292, 93,
	0, 293, 0, 121, 119, 0, 0, 122, 118, 306,
	0, 82, 280, 282, 284, 285, 286, 294, 296, 299,
	300, 301, 302, 303, 307, 308, 0, 83, 281, 283,
	287, 288, 290, 297, 0, 0, 298, 178, 177, 0,
	304, 305, 309, 59, 0, 116, 57, 84, 0, 60,
	0, 0, 22, 58, 117, 120, 210, 0, 0, 61,
	0, 0, 261, 0, 0, 121, 119, 0, 0, 122,
	118, 0, 96, 98, 0, 82, 0, 0, 0, 0,
	0, 18, 19, 107, 108, 20, 0, 110, 111, 115,
	97, 83, 0, 0, 0, 0, 68, 69, 70, 71,
	72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
	0, 0, 0, 13, 112, 114, 113, 24, 0, 0,
	0, 30, 0, 0, 31, 32, 65, 59, 39, 0,
	57, 84, 0, 60, 0, 0, 22, 58, 0, 0,
	0, 0, 233, 61, 0, 0, 188, 0, 0, 236,
	0, 0, 0, 239, 0, 0, 187, 353, 0, 82,
	0, 0, 0, 0, 59, 18, 19, 0, 0, 20,
	179, 0, 0, 0, 58, 83, 352, 0, 189, 0,
	68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
	78, 79, 80, 81, 190, 384, 82, 13, 0, 0,
	0, 24, 0, 0, 0, 30, 0, 0, 31, 32,
	65, 59, 83, 0, 57, 84, 0, 60, 0, 0,
	22, 58, 178, 177, 0, 0, 0, 61, 0, 117,
	120, 0, 0, 0, 0, 0, 0, 0, 0, 0,
	121, 119, 0, 82, 122, 118, 0, 196, 0, 18,
	19, 17, 36, 20, 0, 0, 0, 22, 0, 83,
	0, 0, 0, 0, 68, 69, 70, 71, 72, 73,
	74, 75, 76, 77, 78, 79, 80, 81, 0, 0,
	0, 13, 0, 0, 0, 24, 18, 19, 0, 30,
	20, 0, 31, 32, 65, 0, 0, 0, 0, 0,
	0, 11, 12, 14, 15, 16, 21, 23, 25, 26,
	27, 28, 29, 33, 34, 116, 0, 0, 13, 0,
	0, 0, 24, 212, 0, 0, 30, 0, 0, 31,
	32, 35, 0, 0, 116, 0, 0, 0, 0, 0,
	0, 0, 96, 98, 99, 0, 100, 101, 102, 103,
	104, 105, 106, 107, 108, 109, 0, 110, 111, 115,
	97, 96, 98, 99, 0, 100, 101, 102, 103, 104,
	105, 106, 107, 108, 109, 0, 110, 111, 115, 97,
	116, 0, 0, 0, 112, 114, 113, 0, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 0, 0, 116,
	0, 0, 0, 112, 114, 113, 0, 96, 98, 99,
	0, 100, 101, 102, 0, 104, 105, 106, 107, 108,
	109, 0, 110, 111, 115, 97, 96, 98, 99, 0,
	100, 101, 0, 116, 104, 105, 0, 107, 108, 109,
	0, 110, 111, 115, 97, 312, 0, 0, 0, 112,
	114, 113, 0, 0, 0, 0, 0, 0, 0, 0,
	0, 98, 0, 0, 0, 0, 0, 0, 112, 114,
	113, 107, 108, 0, 0, 110, 0, 115, 97, 117,
	120, 0, 0, 0, 0, 0, 0, 0, 0, 0,
	121, 119, 0, 0, 122, 118, 0, 0, 327, 0,
	0, 0, 112, 114, 113, 326, 0, 0, 0, 330,
	331, 329, 336, 338, 335, 337, 332, 333, 334, 339,
	393, 0, 0, 0, 0, 0, 0, 0, 0, 0,
	0, 330, 331, 329, 336, 338, 335, 337, 332, 333,
	334, 339,
}

var yyPact = [...]int16{
	62, 222, 749, 749, 628, 6, -1000, -1000, -1000, 217,
	-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
	-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
	-1000, -1000, -1000, -1000, -1000, -1000, 484, -1000, 280, -1000,
	830, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
	-1000, -1000, -1000, -1000, -1000, 523, 20, 201, -1000, -1000,
	712, -1000, 712, 187, -1000, 144, 202, -1000, -1000, -1000,
	-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
	-1000, -1000, -1000, -1000, 468, -1000, -1000, 259, -1000, -1000,
	312, 261, -1000, -1000, 22, -1000, -58, -58, -58, -58,
	-58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
	-58, -58, 167, -1000, -1000, 149, 47, 276, 276, 276,
	276, 276, 276, 201, -46, -1000, 169, 169, 544, -1000,
	811, 461, 272, -17, -1000, 70, 276, 218, -1000, -1000,
	56, 214, -1000, -1000, 467, -1000, 179, -1000, 176, 647,
	712, -1000, -65, -44, -1000, 712, 712, 712, 712, 712,
	712, 712, 712, 712, 712, 712, 712, 712, 712, 712,
	-1000, -1000, -1000, 480, 174, 155, 523, -1000, -1000, 276,
	-1000, 152, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 253,
	253, 208, -1000, 523, -1000, 276, 144, -8, -8, -17,
	-17, -17, -17, -1000, -1000, -1000, 460, -1000, -1000, 191,
	-1000, 830, -1000, -1000, -1000, 948, -1000, 352, -1000, 81,
	-1000, -1000, -1000, -1000, -1000, 57, -1000, -1000, -1000, -1000,
	-1000, -1000, -1000, 21, 136, 68, -1000, -1000, -1000, 991,
	929, 169, 169, 169, 169, 272, 272, 541, 541, 541,
	895, 876, 541, 541, 895, 272, 272, 541, 272, 929,
	-1000, 111, 97, 276, -17, 69, 276, 461, 29, -1000,
	-1000, -1000, 665, -1000, 364, -1000, -1000, -1000, -1000, -1000,
	-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
	-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
	-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
	-1000, 712, 276, -1000, -1000, -1000, -1000, -1000, -1000, 82,
	82, 17, 82, 92, 92, 185, 88, -1000, -1000, 288,
	283, 282, 274, 271, 270, 268, 257, 235, 230, 227,
	-1000, -1000, -1000, -1000, -1000, 28, 276, 378, -1000, 698,
	-1000, 151, -1000, -1000, -1000, 385, -1000, 830, 370, -1000,
	-1000, -1000, 82, -1000, 16, 14, 1013, -1000, -1000, -1000,
	33, 164, 164, 164, 253, 165, 165, 33, 165, 33,
	-66, -1000, 285, -1000, 276, -1000, -1000, -1000, -1000, -1000,
	-1000, 82, 82, -1000, -1000, -1000, 82, -1000, -1000, -1000,
	-1000, -1000, -1000, 164, -1000, -1000, -1000, -1000, -1000, -1000,
	-1000, -1000, -1000, 276, 293, -1000, -1000, -1000, 114, -1000,
	170, -1000, 46, -1000, -1000, -1000, -1000, -1000,
}

var yyPgo = [...]int16{
	0, 438, 13, 429, 6, 15, 428, 348, 23, 421,
	10, 418, 14, 283, 359, 417, 16, 416, 28, 12,
	415, 413, 7, 409, 9, 5, 406, 3, 2, 4,
	404, 25, 1, 402, 401, 27, 199, 393, 391, 86,
	390, 389, 26, 388, 38, 380, 11, 378, 369, 367,
	361, 360, 353, 340, 339, 312, 0, 329, 8, 321,
	320, 319,
}

var yyR1 = [...]int8{
	0, 60, 60, 60, 60, 60, 60, 60, 39, 39,
	39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
	39, 39, 39, 34, 34, 34, 34, 35, 35, 37,
	37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
	37, 37, 37, 37, 37, 36, 38, 38, 50, 50,
	43, 43, 43, 43, 18, 18, 18, 18, 17, 17,
	17, 4, 4, 4, 40, 42, 42, 41, 41, 41,
	51, 58, 47, 47, 48, 49, 33, 33, 33, 9,
	9, 45, 53, 53, 53, 53, 53, 53, 54, 55,
	55, 55, 44, 44, 44, 1, 1, 1, 2, 2,
	2, 2, 2, 2, 2, 14, 14, 7, 7, 7,
	7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
	7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
	7, 7, 13, 13, 13, 13, 15, 15, 15, 16,
	16, 16, 16, 16, 16, 16, 61, 21, 21, 21,
	21, 20, 20, 20, 20, 20, 20, 20, 20, 20,
	30, 30, 30, 22, 22, 22, 22, 23, 23, 23,
	24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
	24, 25, 25, 26, 26, 26, 11, 11, 11, 11,
	3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
	3, 3, 3, 3, 6, 6, 6, 6, 6, 6,
	6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
	6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
	6, 6, 6, 6, 8, 8, 5, 5, 5, 5,
	46, 46, 29, 29, 31, 31, 32, 32, 28, 27,
	27, 52, 10, 19, 19, 59, 59, 59, 59, 59,
	59, 59, 59, 12, 12, 56, 56, 56, 56, 56,
	56, 56, 56, 56, 56, 56, 57,
}

var yyR2 = [...]int8{
	0, 2, 2, 2, 2, 2, 2, 1, 1, 1,
	1, 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, 4, 1, 0, 1, 3, 3,
	1, 1, 3, 3, 3, 4, 2, 1, 3, 1,
	2, 1, 1, 1, 2, 3, 2, 3, 1, 2,
	3, 1, 3, 3, 2, 2, 3, 5, 3, 1,
	1, 4, 6, 5, 6, 5, 4, 3, 2, 2,
	1, 1, 3, 4, 2, 3, 1, 2, 3, 3,
	1, 3, 3, 2, 1, 2, 1, 1, 1, 1,
	1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
	1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
	1, 1, 3, 4, 2, 0, 3, 1, 2, 3,
	3, 1, 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, 3,
	3, 4, 3, 3, 1, 2, 1, 1, 1, 1,
	1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
	1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
	1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
	1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
	1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
	1, 1, 1, 1, 2, 2, 1, 1, 1, 2,
	1, 1, 1, 0, 1, 1, 2, 3, 4, 6,
	7, 4, 1, 1, 1, 1, 2, 3, 3, 3,
	3, 3, 3, 3, 6, 1, 3,
}

var yyChk = [...]int16{
	-1000, -60, 101, 102, 103, 104, 2, 10, -14, -7,
	-13, 62, 63, 79, 64, 65, 66, 12, 47, 48,
	51, 67, 18, 68, 83, 69, 70, 71, 72, 73,
	87, 90, 91, 74, 75, 92, 13, -61, -14, 10,
	-39, -34, -37, -40, -45, -46, -47, -48, -49, -51,
	-52, -53, -54, -55, -33, -56, -3, 12, 19, 9,
	15, 25, -8, -7, -44, 92, -12, -57, 62, 63,
	64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
	74, 75, 41, 57, 13, -55, -13, -15, 20, -16,
	12, -10, 2, 25, -21, 2, 41, 59, 42, 43,
	45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
	56, 57, 83, 85, 84, 58, 14, 41, 57, 53,
	42, 52, 56, -35, -42, 2, 79, 87, 15, -42,
	-39, -56, -39, -56, -44, 15, 15, -1, 20, -2,
	12, -10, 2, 20, 7, 2, 4, 2, 4, 24,
	-36, -43, -38, -50, 78, -36, -36, -36, -36, -36,
	-36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
	-59, 2, -46, -8, 92, -12, -56, 68, 67, 15,
	-32, -9, 2, -29, -31, 90, 91, 19, 9, 41,
	57, -58, 2, -56, -46, -8, 92, -56, -56, -56,
	-56, -56, -56, -42, -35, -18, 15, 2, -18, -41,
	22, -39, 22, 22, 22, -56, 20, 7, 2, -5,
	2, 4, 54, 44, 55, -5, 20, -16, 25, 2,
	25, 2, -20, 5, -30, -22, 12, -29, -31, 16,
	-39, 82, 86, 80, 81, -39, -39, -39, -39, -39,
	-39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
	-46, 92, -12, 15, -56, 15, 15, -56, 15, -29,
	-29, 21, 6, 2, -17, 22, -4, -6, 25, 2,
	62, 78, 63, 79, 64, 65, 66, 80, 81, 12,
	82, 47, 48, 51, 67, 18, 68, 83, 86, 69,
	70, 71, 72, 73, 90, 91, 59, 74, 75, 92,
	22, 7, 7, 20, -2, 25, 2, 25, 2, 26,
	26, -31, 26, 41, 57, -23, 24, 17, -24, 30,
	28, 29, 35, 36, 37, 33, 31, 34, 32, 38,
	-18, -18, -19, -18, -19, 15, 15, -56, 22, -56,
	22, -58, 21, 2, 22, 7, 2, -39, -56, -28,
	19, -28, 26, -28, -22, -22, 24, 17, 2, 17,
	6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
	6, 22, -56, 22, 7, 21, 2, 22, -4, 22,
	-28, 26, 26, 17, -24, -27, 57, -28, -32, -32,
	-32, -29, -25, 14, -25, -27, -25, -27, -11, 95,
	96, 97, 98, 7, -56, -28, -28, -28, -26, -32,
	-56, 22, 24, 21, 2, 22, 21, -32,
}

var yyDef = [...]int16{
	0, -2, 135, 135, 0, 0, 7, 6, 1, 135,
	106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
	116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
	126, 127, 128, 129, 130, 131, 0, 2, -2, 3,
	4, 8, 9, 10, 11, 12, 13, 14, 15, 16,
	17, 18, 19, 20, 21, 22, 0, 113, 240, 241,
	0, 251, 0, 90, 91, 131, 0, 275, -2, -2,
	-2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
	-2, -2, 234, 235, 0, 5, 105, 0, 134, 137,
	0, 141, 145, 252, 146, 150, 46, 46, 46, 46,
	46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
	46, 46, 0, 74, 75, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 25, 26, 0, 0, 0, 64,
	0, 22, 88, -2, 89, 0, 0, 0, 94, 96,
	0, 100, 104, 132, 0, 138, 0, 144, 0, 149,
	0, 45, 50, 51, 47, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
	72, 73, 255, 0, 0, 0, 262, 263, 264, 0,
	76, 0, 78, 246, 247, 79, 80, 242, 243, 0,
	0, 0, 87, 71, 265, 0, 0, 267, 268, 269,
	270, 271, 272, 23, 24, 27, 0, 57, 28, 0,
	66, 68, 70, 276, 273, 0, 92, 0, 97, 0,
	103, 236, 237, 238, 239, 0, 133, 136, 139, 142,
	140, 143, 148, 151, 153, 156, 160, 161, 162, 0,
	29, 0, 0, -2, -2, 30, 31, 32, 33, 34,
	35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
	256, 0, 0, 0, 266, 0, 0, 0, 0, 244,
	245, 81, 0, 86, 0, 56, 59, 61, 62, 63,
	204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
	214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
	224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
	65, 69, 0, 93, 95, 98, 102, 99, 101, 0,
	0, 0, 0, 0, 0, 0, 0, 166, 168, 0,
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
	48, 49, 52, 254, 53, 0, 0, 0, 257, 0,
	77, 0, 83, 85, 54, 0, 60, 67, 0, 152,
	248, 154, 0, 157, 0, 0, 0, 164, 169, 165,
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
	0, 258, 0, 261, 0, 82, 84, 55, 58, 274,
	155, 0, 0, 163, 167, 170, 0, 250, 171, 172,
	173, 174, 175, 0, 176, 177, 178, 179, 180, 186,
	187, 188, 189, 0, 0, 158, 159, 249, 0, 184,
	0, 259, 0, 182, 185, 260, 181, 183,
}

var yyTok1 = [...]int8{
	1,
}

var yyTok2 = [...]int8{
	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,
	62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
	72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
	82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
	92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
	102, 103, 104, 105,
}

var yyTok3 = [...]int8{
	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.
	base := int(yyPact[state])
	for tok := TOKSTART; tok-1 < len(yyToknames); tok++ {
		if n := base + tok; n >= 0 && n < yyLast && int(yyChk[int(yyAct[n])]) == tok {
			if len(expected) == cap(expected) {
				return res
			}
			expected = append(expected, tok)
		}
	}

	if yyDef[state] == -2 {
		i := 0
		for yyExca[i] != -1 || int(yyExca[i+1]) != state {
			i += 2
		}

		// Look for tokens that we accept or reduce.
		for i += 2; yyExca[i] >= 0; i += 2 {
			tok := int(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 = int(yyTok1[0])
		goto out
	}
	if char < len(yyTok1) {
		token = int(yyTok1[char])
		goto out
	}
	if char >= yyPrivate {
		if char < yyPrivate+len(yyTok2) {
			token = int(yyTok2[char-yyPrivate])
			goto out
		}
	}
	for i := 0; i < len(yyTok3); i += 2 {
		token = int(yyTok3[i+0])
		if token == char {
			token = int(yyTok3[i+1])
			goto out
		}
	}

out:
	if token == 0 {
		token = int(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 = int(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 = int(yyAct[yyn])
	if int(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 = int(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 && int(yyExca[xi+1]) == yystate {
				break
			}
			xi += 2
		}
		for xi += 2; ; xi += 2 {
			yyn = int(yyExca[xi+0])
			if yyn < 0 || yyn == yytoken {
				break
			}
		}
		yyn = int(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 = int(yyPact[yyS[yyp].yys]) + yyErrCode
				if yyn >= 0 && yyn < yyLast {
					yystate = int(yyAct[yyn]) /* simulate a shift of "error" */
					if int(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 -= int(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 = int(yyR1[yyn])
	yyg := int(yyPgo[yyn])
	yyj := yyg + yyS[yyp].yys + 1

	if yyj >= yyLast {
		yystate = int(yyAct[yyg])
	} else {
		yystate = int(yyAct[yyj])
		if int(yyChk[yystate]) != -yyn {
			yystate = int(yyAct[yyg])
		}
	}
	// dummy call; replaced with literal code
	switch yynt {

	case 1:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yylex.(*parser).generatedParserResult = yyDollar[2].labels
		}
	case 3:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yylex.(*parser).addParseErrf(posrange.PositionRange{}, "no expression found in input")
		}
	case 4:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yylex.(*parser).generatedParserResult = yyDollar[2].node
		}
	case 5:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yylex.(*parser).generatedParserResult = yyDollar[2].node
		}
	case 7:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			yylex.(*parser).unexpected("", "")
		}
	case 23:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.node = yylex.(*parser).newAggregateExpr(yyDollar[1].item, yyDollar[2].node, yyDollar[3].node, false)
		}
	case 24:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.node = yylex.(*parser).newAggregateExpr(yyDollar[1].item, yyDollar[3].node, yyDollar[2].node, false)
		}
	case 25:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yyVAL.node = yylex.(*parser).newAggregateExpr(yyDollar[1].item, &AggregateExpr{}, yyDollar[2].node, true)
		}
	case 26:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yylex.(*parser).unexpected("aggregation", "")
			yyVAL.node = yylex.(*parser).newAggregateExpr(yyDollar[1].item, &AggregateExpr{}, Expressions{}, false)
		}
	case 27:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yyVAL.node = &AggregateExpr{
				Grouping: yyDollar[2].strings,
			}
		}
	case 28:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yyVAL.node = &AggregateExpr{
				Grouping: yyDollar[2].strings,
				Without:  true,
			}
		}
	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]
		{
			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]
		{
			yyVAL.node = yylex.(*parser).newBinaryExpression(yyDollar[1].node, yyDollar[2].item, yyDollar[3].node, yyDollar[4].node)
		}
	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 42:
		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:
		yyDollar = yyS[yypt-4 : yypt+1]
		{
			yyVAL.node = yylex.(*parser).newBinaryExpression(yyDollar[1].node, yyDollar[2].item, yyDollar[3].node, yyDollar[4].node)
		}
	case 44:
		yyDollar = yyS[yypt-4 : yypt+1]
		{
			yyVAL.node = yylex.(*parser).newBinaryExpression(yyDollar[1].node, yyDollar[2].item, yyDollar[3].node, yyDollar[4].node)
		}
	case 46:
		yyDollar = yyS[yypt-0 : yypt+1]
		{
			yyVAL.node = &BinaryExpr{
				VectorMatching: &VectorMatching{Card: CardOneToOne},
			}
		}
	case 47:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			yyVAL.node = &BinaryExpr{
				VectorMatching: &VectorMatching{Card: CardOneToOne},
				ReturnBool:     true,
			}
		}
	case 48:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.node = yyDollar[1].node
			yyVAL.node.(*BinaryExpr).VectorMatching.MatchingLabels = yyDollar[3].strings
		}
	case 49:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.node = yyDollar[1].node
			yyVAL.node.(*BinaryExpr).VectorMatching.MatchingLabels = yyDollar[3].strings
			yyVAL.node.(*BinaryExpr).VectorMatching.On = true
		}
	case 52:
		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
		}
	case 53:
		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
		}
	case 54:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.strings = yyDollar[2].strings
		}
	case 55:
		yyDollar = yyS[yypt-4 : yypt+1]
		{
			yyVAL.strings = yyDollar[2].strings
		}
	case 56:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yyVAL.strings = []string{}
		}
	case 57:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			yylex.(*parser).unexpected("grouping opts", "\"(\"")
			yyVAL.strings = nil
		}
	case 58:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.strings = append(yyDollar[1].strings, yyDollar[3].item.Val)
		}
	case 59:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			yyVAL.strings = []string{yyDollar[1].item.Val}
		}
	case 60:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yylex.(*parser).unexpected("grouping opts", "\",\" or \")\"")
			yyVAL.strings = yyDollar[1].strings
		}
	case 61:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			if !model.UTF8Validation.IsValidLabelName(yyDollar[1].item.Val) {
				yylex.(*parser).addParseErrf(yyDollar[1].item.PositionRange(), "invalid label name for grouping: %q", yyDollar[1].item.Val)
			}
			yyVAL.item = yyDollar[1].item
		}
	case 62:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			unquoted := yylex.(*parser).unquoteString(yyDollar[1].item.Val)
			if !model.UTF8Validation.IsValidLabelName(unquoted) {
				yylex.(*parser).addParseErrf(yyDollar[1].item.PositionRange(), "invalid label name for grouping: %q", unquoted)
			}
			yyVAL.item = yyDollar[1].item
			yyVAL.item.Pos++
			yyVAL.item.Val = unquoted
		}
	case 63:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			yylex.(*parser).unexpected("grouping opts", "label")
			yyVAL.item = Item{}
		}
	case 64:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			fn, exist := getFunction(yyDollar[1].item.Val, yylex.(*parser).functions)
			if !exist {
				yylex.(*parser).addParseErrf(yyDollar[1].item.PositionRange(), "unknown function with name %q", yyDollar[1].item.Val)
			}
			if fn != nil && fn.Experimental && !EnableExperimentalFunctions {
				yylex.(*parser).addParseErrf(yyDollar[1].item.PositionRange(), "function %q is not enabled", yyDollar[1].item.Val)
			}
			yyVAL.node = &Call{
				Func: fn,
				Args: yyDollar[2].node.(Expressions),
				PosRange: posrange.PositionRange{
					Start: yyDollar[1].item.Pos,
					End:   yylex.(*parser).lastClosing,
				},
			}
		}
	case 65:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.node = yyDollar[2].node
		}
	case 66:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yyVAL.node = Expressions{}
		}
	case 67:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.node = append(yyDollar[1].node.(Expressions), yyDollar[3].node.(Expr))
		}
	case 68:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			yyVAL.node = Expressions{yyDollar[1].node.(Expr)}
		}
	case 69:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yylex.(*parser).addParseErrf(yyDollar[2].item.PositionRange(), "trailing commas not allowed in function call args")
			yyVAL.node = yyDollar[1].node
		}
	case 70:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.node = &ParenExpr{Expr: yyDollar[2].node.(Expr), PosRange: mergeRanges(&yyDollar[1].item, &yyDollar[3].item)}
		}
	case 71:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			if numLit, ok := yyDollar[1].node.(*NumberLiteral); ok {
				if numLit.Val <= 0 {
					yylex.(*parser).addParseErrf(numLit.PositionRange(), "duration must be greater than 0")
					yyVAL.node = &NumberLiteral{Val: 0} // Return 0 on error.
					break
				}
				yyVAL.node = yyDollar[1].node
				break
			}
			yyVAL.node = yyDollar[1].node
		}
	case 72:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			if numLit, ok := yyDollar[3].node.(*NumberLiteral); ok {
				yylex.(*parser).addOffset(yyDollar[1].node, time.Duration(math.Round(numLit.Val*float64(time.Second))))
				yyVAL.node = yyDollar[1].node
				break
			}
			yylex.(*parser).addOffsetExpr(yyDollar[1].node, yyDollar[3].node.(*DurationExpr))
			yyVAL.node = yyDollar[1].node
		}
	case 73:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yylex.(*parser).unexpected("offset", "number, duration, or step()")
			yyVAL.node = yyDollar[1].node
		}
	case 74:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yylex.(*parser).setAnchored(yyDollar[1].node)
		}
	case 75:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yylex.(*parser).setSmoothed(yyDollar[1].node)
		}
	case 76:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yylex.(*parser).setTimestamp(yyDollar[1].node, yyDollar[3].float)
			yyVAL.node = yyDollar[1].node
		}
	case 77:
		yyDollar = yyS[yypt-5 : yypt+1]
		{
			yylex.(*parser).setAtModifierPreprocessor(yyDollar[1].node, yyDollar[3].item)
			yyVAL.node = yyDollar[1].node
		}
	case 78:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yylex.(*parser).unexpected("@", "timestamp")
			yyVAL.node = yyDollar[1].node
		}
	case 81:
		yyDollar = yyS[yypt-4 : yypt+1]
		{
			var errMsg string
			vs, ok := yyDollar[1].node.(*VectorSelector)
			if !ok {
				errMsg = "ranges only allowed for vector selectors"
			} else if vs.OriginalOffset != 0 {
				errMsg = "no offset modifiers allowed before range"
			} else if vs.Timestamp != nil {
				errMsg = "no @ modifiers allowed before range"
			}

			if errMsg != "" {
				errRange := mergeRanges(&yyDollar[2].item, &yyDollar[4].item)
				yylex.(*parser).addParseErrf(errRange, "%s", errMsg)
			}

			var rangeNl time.Duration
			if numLit, ok := yyDollar[3].node.(*NumberLiteral); ok {
				rangeNl = time.Duration(math.Round(numLit.Val * float64(time.Second)))
			}
			rangeExpr, _ := yyDollar[3].node.(*DurationExpr)
			yyVAL.node = &MatrixSelector{
				VectorSelector: yyDollar[1].node.(Expr),
				Range:          rangeNl,
				RangeExpr:      rangeExpr,
				EndPos:         yylex.(*parser).lastClosing,
			}
		}
	case 82:
		yyDollar = yyS[yypt-6 : yypt+1]
		{
			var rangeNl time.Duration
			var stepNl time.Duration
			if numLit, ok := yyDollar[3].node.(*NumberLiteral); ok {
				rangeNl = time.Duration(math.Round(numLit.Val * float64(time.Second)))
			}
			rangeExpr, _ := yyDollar[3].node.(*DurationExpr)
			if numLit, ok := yyDollar[5].node.(*NumberLiteral); ok {
				stepNl = time.Duration(math.Round(numLit.Val * float64(time.Second)))
			}
			stepExpr, _ := yyDollar[5].node.(*DurationExpr)
			yyVAL.node = &SubqueryExpr{
				Expr:      yyDollar[1].node.(Expr),
				Range:     rangeNl,
				RangeExpr: rangeExpr,
				Step:      stepNl,
				StepExpr:  stepExpr,
				EndPos:    yyDollar[6].item.Pos + 1,
			}
		}
	case 83:
		yyDollar = yyS[yypt-5 : yypt+1]
		{
			var rangeNl time.Duration
			if numLit, ok := yyDollar[3].node.(*NumberLiteral); ok {
				rangeNl = time.Duration(math.Round(numLit.Val * float64(time.Second)))
			}
			rangeExpr, _ := yyDollar[3].node.(*DurationExpr)
			yyVAL.node = &SubqueryExpr{
				Expr:      yyDollar[1].node.(Expr),
				Range:     rangeNl,
				RangeExpr: rangeExpr,
				EndPos:    yyDollar[5].item.Pos + 1,
			}
		}
	case 84:
		yyDollar = yyS[yypt-6 : yypt+1]
		{
			yylex.(*parser).unexpected("subquery selector", "\"]\"")
			yyVAL.node = yyDollar[1].node
		}
	case 85:
		yyDollar = yyS[yypt-5 : yypt+1]
		{
			yylex.(*parser).unexpected("subquery selector", "number, duration, or step() or \"]\"")
			yyVAL.node = yyDollar[1].node
		}
	case 86:
		yyDollar = yyS[yypt-4 : yypt+1]
		{
			yylex.(*parser).unexpected("subquery or range", "\":\" or \"]\"")
			yyVAL.node = yyDollar[1].node
		}
	case 87:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yylex.(*parser).unexpected("subquery or range selector", "number, duration, or step()")
			yyVAL.node = yyDollar[1].node
		}
	case 88:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			if nl, ok := yyDollar[2].node.(*NumberLiteral); ok {
				if yyDollar[1].item.Typ == SUB {
					nl.Val *= -1
				}
				nl.PosRange.Start = yyDollar[1].item.Pos
				yyVAL.node = nl
			} else {
				yyVAL.node = &UnaryExpr{Op: yyDollar[1].item.Typ, Expr: yyDollar[2].node.(Expr), StartPos: yyDollar[1].item.Pos}
			}
		}
	case 89:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			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
		}
	case 90:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			vs := &VectorSelector{
				Name:          yyDollar[1].item.Val,
				LabelMatchers: []*labels.Matcher{},
				PosRange:      yyDollar[1].item.PositionRange(),
			}
			yylex.(*parser).assembleVectorSelector(vs)
			yyVAL.node = vs
		}
	case 91:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			vs := yyDollar[1].node.(*VectorSelector)
			yylex.(*parser).assembleVectorSelector(vs)
			yyVAL.node = vs
		}
	case 92:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.node = &VectorSelector{
				LabelMatchers: yyDollar[2].matchers,
				PosRange:      mergeRanges(&yyDollar[1].item, &yyDollar[3].item),
			}
		}
	case 93:
		yyDollar = yyS[yypt-4 : yypt+1]
		{
			yyVAL.node = &VectorSelector{
				LabelMatchers: yyDollar[2].matchers,
				PosRange:      mergeRanges(&yyDollar[1].item, &yyDollar[4].item),
			}
		}
	case 94:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yyVAL.node = &VectorSelector{
				LabelMatchers: []*labels.Matcher{},
				PosRange:      mergeRanges(&yyDollar[1].item, &yyDollar[2].item),
			}
		}
	case 95:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			if yyDollar[1].matchers != nil {
				yyVAL.matchers = append(yyDollar[1].matchers, yyDollar[3].matcher)
			} else {
				yyVAL.matchers = yyDollar[1].matchers
			}
		}
	case 96:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			yyVAL.matchers = []*labels.Matcher{yyDollar[1].matcher}
		}
	case 97:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yylex.(*parser).unexpected("label matching", "\",\" or \"}\"")
			yyVAL.matchers = yyDollar[1].matchers
		}
	case 98:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.matcher = yylex.(*parser).newLabelMatcher(yyDollar[1].item, yyDollar[2].item, yyDollar[3].item)
		}
	case 99:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.matcher = yylex.(*parser).newLabelMatcher(yyDollar[1].item, yyDollar[2].item, yyDollar[3].item)
		}
	case 100:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			yyVAL.matcher = yylex.(*parser).newMetricNameMatcher(yyDollar[1].item)
		}
	case 101:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yylex.(*parser).unexpected("label matching", "string")
			yyVAL.matcher = nil
		}
	case 102:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yylex.(*parser).unexpected("label matching", "string")
			yyVAL.matcher = nil
		}
	case 103:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yylex.(*parser).unexpected("label matching", "label matching operator")
			yyVAL.matcher = nil
		}
	case 104:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			yylex.(*parser).unexpected("label matching", "identifier or \"}\"")
			yyVAL.matcher = nil
		}
	case 105:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			b := labels.NewBuilder(yyDollar[2].labels)
			b.Set(labels.MetricName, yyDollar[1].item.Val)
			yyVAL.labels = b.Labels()
		}
	case 106:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			yyVAL.labels = yyDollar[1].labels
		}
	case 132:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.labels = labels.New(yyDollar[2].lblList...)
		}
	case 133:
		yyDollar = yyS[yypt-4 : yypt+1]
		{
			yyVAL.labels = labels.New(yyDollar[2].lblList...)
		}
	case 134:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yyVAL.labels = labels.New()
		}
	case 135:
		yyDollar = yyS[yypt-0 : yypt+1]
		{
			yyVAL.labels = labels.New()
		}
	case 136:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.lblList = append(yyDollar[1].lblList, yyDollar[3].label)
		}
	case 137:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			yyVAL.lblList = []labels.Label{yyDollar[1].label}
		}
	case 138:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yylex.(*parser).unexpected("label set", "\",\" or \"}\"")
			yyVAL.lblList = yyDollar[1].lblList
		}
	case 139:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.label = labels.Label{Name: yyDollar[1].item.Val, Value: yylex.(*parser).unquoteString(yyDollar[3].item.Val)}
		}
	case 140:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.label = labels.Label{Name: yyDollar[1].item.Val, Value: yylex.(*parser).unquoteString(yyDollar[3].item.Val)}
		}
	case 141:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			yyVAL.label = labels.Label{Name: labels.MetricName, Value: yyDollar[1].item.Val}
		}
	case 142:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yylex.(*parser).unexpected("label set", "string")
			yyVAL.label = labels.Label{}
		}
	case 143:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yylex.(*parser).unexpected("label set", "string")
			yyVAL.label = labels.Label{}
		}
	case 144:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yylex.(*parser).unexpected("label set", "\"=\"")
			yyVAL.label = labels.Label{}
		}
	case 145:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			yylex.(*parser).unexpected("label set", "identifier or \"}\"")
			yyVAL.label = labels.Label{}
		}
	case 146:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yylex.(*parser).generatedParserResult = &seriesDescription{
				labels: yyDollar[1].labels,
				values: yyDollar[2].series,
			}
		}
	case 147:
		yyDollar = yyS[yypt-0 : yypt+1]
		{
			yyVAL.series = []SequenceValue{}
		}
	case 148:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.series = append(yyDollar[1].series, yyDollar[3].series...)
		}
	case 149:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yyVAL.series = yyDollar[1].series
		}
	case 150:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			yylex.(*parser).unexpected("series values", "")
			yyVAL.series = nil
		}
	case 151:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			yyVAL.series = []SequenceValue{{Omitted: true}}
		}
	case 152:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.series = []SequenceValue{}
			for i := uint64(0); i < yyDollar[3].uint; i++ {
				yyVAL.series = append(yyVAL.series, SequenceValue{Omitted: true})
			}
		}
	case 153:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			yyVAL.series = []SequenceValue{{Value: yyDollar[1].float}}
		}
	case 154:
		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{Value: yyDollar[1].float})
			}
		}
	case 155:
		yyDollar = yyS[yypt-4 : yypt+1]
		{
			yyVAL.series = []SequenceValue{}
			// Add an additional value for time 0, which we ignore in tests.
			for i := uint64(0); i <= yyDollar[4].uint; i++ {
				yyVAL.series = append(yyVAL.series, SequenceValue{Value: yyDollar[1].float})
				yyDollar[1].float += yyDollar[2].float
			}
		}
	case 156:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			yyVAL.series = []SequenceValue{{Histogram: yyDollar[1].histogram}}
		}
	case 157:
		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
			}
		}
	case 158:
		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
		}
	case 159:
		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
		}
	case 160:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			if yyDollar[1].item.Val != "stale" {
				yylex.(*parser).unexpected("series values", "number or \"stale\"")
			}
			yyVAL.float = math.Float64frombits(value.StaleNaN)
		}
	case 163:
		yyDollar = yyS[yypt-4 : yypt+1]
		{
			yyVAL.histogram = yylex.(*parser).buildHistogramFromMap(&yyDollar[2].descriptors)
		}
	case 164:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.histogram = yylex.(*parser).buildHistogramFromMap(&yyDollar[2].descriptors)
		}
	case 165:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			m := yylex.(*parser).newMap()
			yyVAL.histogram = yylex.(*parser).buildHistogramFromMap(&m)
		}
	case 166:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			m := yylex.(*parser).newMap()
			yyVAL.histogram = yylex.(*parser).buildHistogramFromMap(&m)
		}
	case 167:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.descriptors = *(yylex.(*parser).mergeMaps(&yyDollar[1].descriptors, &yyDollar[3].descriptors))
		}
	case 168:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			yyVAL.descriptors = yyDollar[1].descriptors
		}
	case 169:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yylex.(*parser).unexpected("histogram description", "histogram description key, e.g. buckets:[5 10 7]")
		}
	case 170:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.descriptors = yylex.(*parser).newMap()
			yyVAL.descriptors["schema"] = yyDollar[3].int
		}
	case 171:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.descriptors = yylex.(*parser).newMap()
			yyVAL.descriptors["sum"] = yyDollar[3].float
		}
	case 172:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.descriptors = yylex.(*parser).newMap()
			yyVAL.descriptors["count"] = yyDollar[3].float
		}
	case 173:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.descriptors = yylex.(*parser).newMap()
			yyVAL.descriptors["z_bucket"] = yyDollar[3].float
		}
	case 174:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.descriptors = yylex.(*parser).newMap()
			yyVAL.descriptors["z_bucket_w"] = yyDollar[3].float
		}
	case 175:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.descriptors = yylex.(*parser).newMap()
			yyVAL.descriptors["custom_values"] = yyDollar[3].bucket_set
		}
	case 176:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.descriptors = yylex.(*parser).newMap()
			yyVAL.descriptors["buckets"] = yyDollar[3].bucket_set
		}
	case 177:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.descriptors = yylex.(*parser).newMap()
			yyVAL.descriptors["offset"] = yyDollar[3].int
		}
	case 178:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.descriptors = yylex.(*parser).newMap()
			yyVAL.descriptors["n_buckets"] = yyDollar[3].bucket_set
		}
	case 179:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.descriptors = yylex.(*parser).newMap()
			yyVAL.descriptors["n_offset"] = yyDollar[3].int
		}
	case 180:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.descriptors = yylex.(*parser).newMap()
			yyVAL.descriptors["counter_reset_hint"] = yyDollar[3].item
		}
	case 181:
		yyDollar = yyS[yypt-4 : yypt+1]
		{
			yyVAL.bucket_set = yyDollar[2].bucket_set
		}
	case 182:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.bucket_set = yyDollar[2].bucket_set
		}
	case 183:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.bucket_set = append(yyDollar[1].bucket_set, yyDollar[3].float)
		}
	case 184:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			yyVAL.bucket_set = []float64{yyDollar[1].float}
		}
	case 240:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			yyVAL.node = &NumberLiteral{
				Val:      yylex.(*parser).number(yyDollar[1].item.Val),
				PosRange: yyDollar[1].item.PositionRange(),
			}
		}
	case 241:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			var err error
			var dur time.Duration
			dur, err = parseDuration(yyDollar[1].item.Val)
			if err != nil {
				yylex.(*parser).addParseErr(yyDollar[1].item.PositionRange(), err)
			}
			yyVAL.node = &NumberLiteral{
				Val:      dur.Seconds(),
				PosRange: yyDollar[1].item.PositionRange(),
				Duration: true,
			}
		}
	case 242:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			yyVAL.float = yylex.(*parser).number(yyDollar[1].item.Val)
		}
	case 243:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			var err error
			var dur time.Duration
			dur, err = parseDuration(yyDollar[1].item.Val)
			if err != nil {
				yylex.(*parser).addParseErr(yyDollar[1].item.PositionRange(), err)
			}
			yyVAL.float = dur.Seconds()
		}
	case 244:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yyVAL.float = yyDollar[2].float
		}
	case 245:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yyVAL.float = -yyDollar[2].float
		}
	case 248:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			var err error
			yyVAL.uint, err = strconv.ParseUint(yyDollar[1].item.Val, 10, 64)
			if err != nil {
				yylex.(*parser).addParseErrf(yyDollar[1].item.PositionRange(), "invalid repetition in series values: %s", err)
			}
		}
	case 249:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			yyVAL.int = -int64(yyDollar[2].uint)
		}
	case 250:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			yyVAL.int = int64(yyDollar[1].uint)
		}
	case 251:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			yyVAL.node = &StringLiteral{
				Val:      yylex.(*parser).unquoteString(yyDollar[1].item.Val),
				PosRange: yyDollar[1].item.PositionRange(),
			}
		}
	case 252:
		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 253:
		yyDollar = yyS[yypt-0 : yypt+1]
		{
			yyVAL.strings = nil
		}
	case 255:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			nl := yyDollar[1].node.(*NumberLiteral)
			if nl.Val > 1<<63/1e9 || nl.Val < -(1<<63)/1e9 {
				yylex.(*parser).addParseErrf(nl.PosRange, "duration out of range")
				yyVAL.node = &NumberLiteral{Val: 0}
				break
			}
			yyVAL.node = nl
		}
	case 256:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			nl := yyDollar[2].node.(*NumberLiteral)
			if yyDollar[1].item.Typ == SUB {
				nl.Val *= -1
			}
			if nl.Val > 1<<63/1e9 || nl.Val < -(1<<63)/1e9 {
				yylex.(*parser).addParseErrf(yyDollar[1].item.PositionRange(), "duration out of range")
				yyVAL.node = &NumberLiteral{Val: 0}
				break
			}
			nl.PosRange.Start = yyDollar[1].item.Pos
			yyVAL.node = nl
		}
	case 257:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.node = &DurationExpr{
				Op:       STEP,
				StartPos: yyDollar[1].item.PositionRange().Start,
				EndPos:   yyDollar[3].item.PositionRange().End,
			}
		}
	case 258:
		yyDollar = yyS[yypt-4 : yypt+1]
		{
			yyVAL.node = &DurationExpr{
				Op: yyDollar[1].item.Typ,
				RHS: &DurationExpr{
					Op:       STEP,
					StartPos: yyDollar[2].item.PositionRange().Start,
					EndPos:   yyDollar[4].item.PositionRange().End,
				},
				StartPos: yyDollar[1].item.Pos,
			}
		}
	case 259:
		yyDollar = yyS[yypt-6 : yypt+1]
		{
			yyVAL.node = &DurationExpr{
				Op:       yyDollar[1].item.Typ,
				StartPos: yyDollar[1].item.PositionRange().Start,
				EndPos:   yyDollar[6].item.PositionRange().End,
				LHS:      yyDollar[3].node.(Expr),
				RHS:      yyDollar[5].node.(Expr),
			}
		}
	case 260:
		yyDollar = yyS[yypt-7 : yypt+1]
		{
			yyVAL.node = &DurationExpr{
				Op:       yyDollar[1].item.Typ,
				StartPos: yyDollar[1].item.Pos,
				EndPos:   yyDollar[6].node.PositionRange().End,
				RHS: &DurationExpr{
					Op:       yyDollar[2].item.Typ,
					StartPos: yyDollar[2].item.PositionRange().Start,
					EndPos:   yyDollar[6].node.PositionRange().End,
					LHS:      yyDollar[4].node.(Expr),
					RHS:      yyDollar[6].node.(Expr),
				},
			}
		}
	case 261:
		yyDollar = yyS[yypt-4 : yypt+1]
		{
			de := yyDollar[3].node.(*DurationExpr)
			de.Wrapped = true
			if yyDollar[1].item.Typ == SUB {
				yyVAL.node = &DurationExpr{
					Op:       SUB,
					RHS:      de,
					StartPos: yyDollar[1].item.Pos,
				}
				break
			}
			yyVAL.node = yyDollar[3].node
		}
	case 265:
		yyDollar = yyS[yypt-1 : yypt+1]
		{
			nl := yyDollar[1].node.(*NumberLiteral)
			if nl.Val > 1<<63/1e9 || nl.Val < -(1<<63)/1e9 {
				yylex.(*parser).addParseErrf(nl.PosRange, "duration out of range")
				yyVAL.node = &NumberLiteral{Val: 0}
				break
			}
			yyVAL.node = nl
		}
	case 266:
		yyDollar = yyS[yypt-2 : yypt+1]
		{
			switch expr := yyDollar[2].node.(type) {
			case *NumberLiteral:
				if yyDollar[1].item.Typ == SUB {
					expr.Val *= -1
				}
				if expr.Val > 1<<63/1e9 || expr.Val < -(1<<63)/1e9 {
					yylex.(*parser).addParseErrf(yyDollar[1].item.PositionRange(), "duration out of range")
					yyVAL.node = &NumberLiteral{Val: 0}
					break
				}
				expr.PosRange.Start = yyDollar[1].item.Pos
				yyVAL.node = expr
				break
			case *DurationExpr:
				if yyDollar[1].item.Typ == SUB {
					yyVAL.node = &DurationExpr{
						Op:       SUB,
						RHS:      expr,
						StartPos: yyDollar[1].item.Pos,
					}
					break
				}
				yyVAL.node = expr
				break
			default:
				yylex.(*parser).addParseErrf(yyDollar[1].item.PositionRange(), "expected number literal or duration expression")
				yyVAL.node = &NumberLiteral{Val: 0}
				break
			}
		}
	case 267:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yylex.(*parser).experimentalDurationExpr(yyDollar[1].node.(Expr))
			yyVAL.node = &DurationExpr{Op: ADD, LHS: yyDollar[1].node.(Expr), RHS: yyDollar[3].node.(Expr)}
		}
	case 268:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yylex.(*parser).experimentalDurationExpr(yyDollar[1].node.(Expr))
			yyVAL.node = &DurationExpr{Op: SUB, LHS: yyDollar[1].node.(Expr), RHS: yyDollar[3].node.(Expr)}
		}
	case 269:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yylex.(*parser).experimentalDurationExpr(yyDollar[1].node.(Expr))
			yyVAL.node = &DurationExpr{Op: MUL, LHS: yyDollar[1].node.(Expr), RHS: yyDollar[3].node.(Expr)}
		}
	case 270:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yylex.(*parser).experimentalDurationExpr(yyDollar[1].node.(Expr))
			if nl, ok := yyDollar[3].node.(*NumberLiteral); ok && nl.Val == 0 {
				yylex.(*parser).addParseErrf(yyDollar[2].item.PositionRange(), "division by zero")
				yyVAL.node = &NumberLiteral{Val: 0}
				break
			}
			yyVAL.node = &DurationExpr{Op: DIV, LHS: yyDollar[1].node.(Expr), RHS: yyDollar[3].node.(Expr)}
		}
	case 271:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yylex.(*parser).experimentalDurationExpr(yyDollar[1].node.(Expr))
			if nl, ok := yyDollar[3].node.(*NumberLiteral); ok && nl.Val == 0 {
				yylex.(*parser).addParseErrf(yyDollar[2].item.PositionRange(), "modulo by zero")
				yyVAL.node = &NumberLiteral{Val: 0}
				break
			}
			yyVAL.node = &DurationExpr{Op: MOD, LHS: yyDollar[1].node.(Expr), RHS: yyDollar[3].node.(Expr)}
		}
	case 272:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yylex.(*parser).experimentalDurationExpr(yyDollar[1].node.(Expr))
			yyVAL.node = &DurationExpr{Op: POW, LHS: yyDollar[1].node.(Expr), RHS: yyDollar[3].node.(Expr)}
		}
	case 273:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yyVAL.node = &DurationExpr{
				Op:       STEP,
				StartPos: yyDollar[1].item.PositionRange().Start,
				EndPos:   yyDollar[3].item.PositionRange().End,
			}
		}
	case 274:
		yyDollar = yyS[yypt-6 : yypt+1]
		{
			yyVAL.node = &DurationExpr{
				Op:       yyDollar[1].item.Typ,
				StartPos: yyDollar[1].item.PositionRange().Start,
				EndPos:   yyDollar[6].item.PositionRange().End,
				LHS:      yyDollar[3].node.(Expr),
				RHS:      yyDollar[5].node.(Expr),
			}
		}
	case 276:
		yyDollar = yyS[yypt-3 : yypt+1]
		{
			yylex.(*parser).experimentalDurationExpr(yyDollar[2].node.(Expr))
			if durationExpr, ok := yyDollar[2].node.(*DurationExpr); ok {
				durationExpr.Wrapped = true
				yyVAL.node = durationExpr
				break
			}
			yyVAL.node = yyDollar[2].node
		}
	}
	goto yystack /* stack new state and value */
}
