// Code generated by goyacc -o parser.go parser.go.y. DO NOT EDIT.

//line parser.go.y:2
package gojq

import __yyfmt__ "fmt"

//line parser.go.y:2

// Parse parses a query.
func Parse(src string) (*Query, error) {
	l := newLexer(src)
	if yyParse(l) > 0 {
		return nil, l.err
	}
	return l.result, nil
}

//line parser.go.y:14
type yySymType struct {
	yys      int
	value    interface{}
	token    string
	operator Operator
}

const tokAltOp = 57346
const tokUpdateOp = 57347
const tokDestAltOp = 57348
const tokOrOp = 57349
const tokAndOp = 57350
const tokCompareOp = 57351
const tokModule = 57352
const tokImport = 57353
const tokInclude = 57354
const tokDef = 57355
const tokAs = 57356
const tokLabel = 57357
const tokBreak = 57358
const tokNull = 57359
const tokTrue = 57360
const tokFalse = 57361
const tokIdent = 57362
const tokVariable = 57363
const tokModuleIdent = 57364
const tokModuleVariable = 57365
const tokIndex = 57366
const tokNumber = 57367
const tokFormat = 57368
const tokInvalid = 57369
const tokString = 57370
const tokStringStart = 57371
const tokStringQuery = 57372
const tokStringEnd = 57373
const tokIf = 57374
const tokThen = 57375
const tokElif = 57376
const tokElse = 57377
const tokEnd = 57378
const tokTry = 57379
const tokCatch = 57380
const tokReduce = 57381
const tokForeach = 57382
const tokRecurse = 57383
const tokFuncDefPost = 57384
const tokTermPost = 57385
const tokEmptyCatch = 57386

var yyToknames = [...]string{
	"$end",
	"error",
	"$unk",
	"tokAltOp",
	"tokUpdateOp",
	"tokDestAltOp",
	"tokOrOp",
	"tokAndOp",
	"tokCompareOp",
	"tokModule",
	"tokImport",
	"tokInclude",
	"tokDef",
	"tokAs",
	"tokLabel",
	"tokBreak",
	"tokNull",
	"tokTrue",
	"tokFalse",
	"tokIdent",
	"tokVariable",
	"tokModuleIdent",
	"tokModuleVariable",
	"tokIndex",
	"tokNumber",
	"tokFormat",
	"tokInvalid",
	"tokString",
	"tokStringStart",
	"tokStringQuery",
	"tokStringEnd",
	"tokIf",
	"tokThen",
	"tokElif",
	"tokElse",
	"tokEnd",
	"tokTry",
	"tokCatch",
	"tokReduce",
	"tokForeach",
	"tokRecurse",
	"tokFuncDefPost",
	"tokTermPost",
	"tokEmptyCatch",
	"'|'",
	"','",
	"'+'",
	"'-'",
	"'*'",
	"'/'",
	"'%'",
	"'.'",
	"'?'",
	"'['",
	"';'",
	"':'",
	"'('",
	"')'",
	"']'",
	"'{'",
	"'}'",
}

var yyStatenames = [...]string{}

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

//line parser.go.y:665

//line yacctab:1
var yyExca = [...]int{
	-1, 1,
	1, -1,
	-2, 0,
	-1, 132,
	5, 0,
	-2, 32,
	-1, 135,
	9, 0,
	-2, 35,
	-1, 196,
	56, 113,
	-2, 54,
}

const yyPrivate = 57344

const yyLast = 1053

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

var yyPact = [...]int{
	180, -1000, 186, -33, -1000, 410, 186, 110, 106, 49,
	1012, -1000, 965, 410, 295, 520, 520, 410, 410, 127,
	139, 93, -1000, -1000, -1000, -1000, -1000, -8, -1000, -1000,
	116, -1000, 410, 520, 520, 495, 362, 119, -1000, -1000,
	-1000, -1000, -1000, -1000, -1000, 172, -33, -1000, -35, 82,
	42, 12, 9, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
	-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
	-1000, -1000, -1000, -1000, 410, -1000, 410, 410, 410, 410,
	410, 410, 410, 410, 410, 410, 410, -1000, 965, 2,
	-1000, -1000, -1000, 93, 266, 208, 109, 946, 410, 937,
	74, -22, -1000, -1000, 410, -1000, 756, 171, 171, -36,
	78, 8, 7, 410, -1000, -1000, -1000, 599, -1000, -1000,
	122, 145, 46, -1000, -1000, 1012, 166, 166, 166, 965,
	204, 204, 562, 222, 617, 168, 23, 23, 53, 53,
	53, 135, -1000, -1000, 2, 461, -1000, -1000, -1000, 43,
	410, 2, 2, 410, -1000, 410, 410, 410, 145, 0,
	965, -1000, -1000, 495, 520, 520, 731, -1000, -1000, -1000,
	410, -33, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
	-1000, -1000, -1000, -1000, 118, -1000, -1000, 410, 2, -17,
	-1000, -29, -1000, 5, 4, 410, -1000, -1000, 314, 574,
	-21, -27, 887, -1000, 965, 860, -12, -1000, -1000, 410,
	-1000, -1000, 73, -1000, 3, 704, 45, -1000, -18, -1000,
	965, -1000, -1000, 2, -1000, 461, 2, 2, 679, -1000,
	546, -1000, 410, 410, 94, 410, -1000, -2, 145, 965,
	520, 520, -1000, -1000, -1000, 166, -1000, -1000, -1000, -1000,
	-3, -1000, 835, 808, 96, 410, 915, 410, -1000, -1000,
	-1000, -1000, 2, 410, 410, -1000, 965, 410, 783, -1000,
	652, 62, 887, -1000, -1000, -1000, 410, -1000, 627, -1000,
}

var yyPgo = [...]int{
	0, 280, 276, 267, 193, 266, 7, 192, 175, 263,
	0, 259, 15, 247, 241, 11, 4, 9, 240, 22,
	238, 1, 228, 227, 12, 214, 8, 2, 10, 16,
	207, 205, 203, 5, 202, 201, 13, 3,
}

var yyR1 = [...]int{
	0, 1, 2, 2, 3, 3, 4, 4, 5, 5,
	6, 6, 7, 7, 8, 8, 9, 9, 33, 33,
	10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
	10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
	10, 10, 11, 11, 12, 12, 12, 13, 13, 14,
	14, 15, 15, 15, 15, 16, 16, 16, 16, 16,
	16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
	16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
	16, 16, 17, 17, 18, 18, 18, 34, 34, 35,
	35, 19, 19, 19, 19, 19, 20, 20, 21, 21,
	22, 22, 23, 23, 24, 24, 24, 25, 25, 25,
	25, 25, 37, 37, 37, 26, 26, 27, 27, 27,
	27, 27, 27, 27, 28, 29, 29, 29, 30, 30,
	30, 31, 31, 32, 32, 36, 36, 36, 36, 36,
	36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
	36, 36, 36, 36, 36, 36,
}

var yyR2 = [...]int{
	0, 2, 0, 3, 2, 2, 0, 2, 6, 4,
	0, 1, 0, 2, 5, 8, 1, 3, 1, 1,
	2, 3, 5, 9, 9, 11, 7, 3, 4, 2,
	3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
	3, 1, 1, 3, 1, 3, 3, 1, 3, 1,
	3, 3, 3, 5, 1, 1, 1, 1, 2, 2,
	1, 1, 1, 1, 4, 1, 1, 1, 2, 1,
	3, 2, 2, 3, 3, 2, 2, 2, 2, 2,
	3, 3, 1, 3, 0, 2, 4, 1, 1, 1,
	1, 2, 3, 4, 4, 5, 1, 3, 0, 5,
	0, 2, 0, 2, 0, 1, 3, 3, 3, 5,
	1, 1, 1, 1, 1, 1, 3, 1, 1, 1,
	1, 1, 1, 1, 3, 0, 1, 3, 3, 3,
	3, 2, 3, 1, 3, 1, 1, 1, 1, 1,
	1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
	1, 1, 1, 1, 1, 1,
}

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

var yyDef = [...]int{
	2, -2, 6, 0, 1, 12, 6, 0, 0, 0,
	125, 4, 5, 12, 41, 0, 0, 0, 0, 0,
	0, 55, 56, 57, 60, 61, 62, 63, 65, 66,
	67, 69, 0, 0, 0, 104, 0, 0, 87, 88,
	89, 90, 82, 84, 7, 0, 10, 3, 0, 126,
	0, 0, 0, 135, 136, 137, 138, 139, 140, 141,
	142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
	152, 153, 154, 155, 0, 29, 0, 0, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 13, 20, 0,
	77, 78, 79, 0, 0, 0, 0, 0, 0, 102,
	0, 0, 58, 59, 0, 68, 0, 71, 72, 0,
	105, 110, 111, 0, 112, 113, 114, 0, 75, 76,
	0, 0, 0, 11, 124, 125, 0, 0, 0, 21,
	30, 31, -2, 33, 34, -2, 36, 37, 38, 39,
	40, 0, 42, 44, 0, 0, 80, 81, 91, 0,
	0, 0, 0, 0, 27, 0, 0, 0, 0, 0,
	96, 70, 73, 104, 0, 0, 0, 74, 83, 85,
	0, 10, 18, 19, 9, 127, 128, 117, 118, 119,
	120, 121, 122, 123, 0, 129, 130, 0, 0, 0,
	47, 0, 49, 0, 0, 0, -2, 92, 0, 0,
	0, 0, 98, 103, 28, 0, 0, 16, 64, 0,
	106, 107, 115, 108, 0, 0, 0, 131, 0, 133,
	22, 43, 45, 0, 46, 0, 0, 0, 0, 93,
	0, 94, 0, 0, 100, 0, 14, 0, 0, 97,
	0, 0, 86, 8, 132, 0, 48, 50, 51, 52,
	0, 95, 0, 0, 0, 0, 0, 0, 17, 116,
	109, 134, 0, 0, 0, 26, 101, 0, 0, 53,
	0, 0, 98, 15, 23, 24, 0, 99, 0, 25,
}

var yyTok1 = [...]int{
	1, 3, 3, 3, 3, 3, 3, 3, 3, 3,
	3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
	3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
	3, 3, 3, 3, 3, 3, 3, 51, 3, 3,
	57, 58, 49, 47, 46, 48, 52, 50, 3, 3,
	3, 3, 3, 3, 3, 3, 3, 3, 56, 55,
	3, 3, 3, 53, 3, 3, 3, 3, 3, 3,
	3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
	3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
	3, 54, 3, 59, 3, 3, 3, 3, 3, 3,
	3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
	3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
	3, 3, 3, 60, 45, 61,
}

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,
}

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]
//line parser.go.y:53
		{
			if yyDollar[1].value != nil {
				yyDollar[2].value.(*Query).Meta = yyDollar[1].value.(*ConstObject)
			}
			yylex.(*lexer).result = yyDollar[2].value.(*Query)
		}
	case 2:
		yyDollar = yyS[yypt-0 : yypt+1]
//line parser.go.y:60
		{
			yyVAL.value = nil
		}
	case 3:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:64
		{
			yyVAL.value = yyDollar[2].value
		}
	case 4:
		yyDollar = yyS[yypt-2 : yypt+1]
//line parser.go.y:70
		{
			yyVAL.value = &Query{Imports: yyDollar[1].value.([]*Import), FuncDefs: yyDollar[2].value.([]*FuncDef), Term: &Term{Type: TermTypeIdentity}}
		}
	case 5:
		yyDollar = yyS[yypt-2 : yypt+1]
//line parser.go.y:74
		{
			if yyDollar[1].value != nil {
				yyDollar[2].value.(*Query).Imports = yyDollar[1].value.([]*Import)
			}
			yyVAL.value = yyDollar[2].value
		}
	case 6:
		yyDollar = yyS[yypt-0 : yypt+1]
//line parser.go.y:81
		{
			yyVAL.value = []*Import(nil)
		}
	case 7:
		yyDollar = yyS[yypt-2 : yypt+1]
//line parser.go.y:85
		{
			yyVAL.value = prependImport(yyDollar[2].value.([]*Import), yyDollar[1].value.(*Import))
		}
	case 8:
		yyDollar = yyS[yypt-6 : yypt+1]
//line parser.go.y:91
		{
			yyVAL.value = &Import{ImportPath: yyDollar[2].token, ImportAlias: yyDollar[4].token, Meta: yyDollar[5].value.(*ConstObject)}
		}
	case 9:
		yyDollar = yyS[yypt-4 : yypt+1]
//line parser.go.y:95
		{
			yyVAL.value = &Import{IncludePath: yyDollar[2].token, Meta: yyDollar[3].value.(*ConstObject)}
		}
	case 10:
		yyDollar = yyS[yypt-0 : yypt+1]
//line parser.go.y:101
		{
			yyVAL.value = (*ConstObject)(nil)
		}
	case 11:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:104
		{
		}
	case 12:
		yyDollar = yyS[yypt-0 : yypt+1]
//line parser.go.y:108
		{
			yyVAL.value = []*FuncDef(nil)
		}
	case 13:
		yyDollar = yyS[yypt-2 : yypt+1]
//line parser.go.y:112
		{
			yyVAL.value = prependFuncDef(yyDollar[2].value.([]*FuncDef), yyDollar[1].value.(*FuncDef))
		}
	case 14:
		yyDollar = yyS[yypt-5 : yypt+1]
//line parser.go.y:118
		{
			yyVAL.value = &FuncDef{Name: yyDollar[2].token, Body: yyDollar[4].value.(*Query)}
		}
	case 15:
		yyDollar = yyS[yypt-8 : yypt+1]
//line parser.go.y:122
		{
			yyVAL.value = &FuncDef{yyDollar[2].token, yyDollar[4].value.([]string), yyDollar[7].value.(*Query)}
		}
	case 16:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:128
		{
			yyVAL.value = []string{yyDollar[1].token}
		}
	case 17:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:132
		{
			yyVAL.value = append(yyDollar[1].value.([]string), yyDollar[3].token)
		}
	case 18:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:137
		{
		}
	case 19:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:138
		{
		}
	case 20:
		yyDollar = yyS[yypt-2 : yypt+1]
//line parser.go.y:142
		{
			yyDollar[2].value.(*Query).FuncDefs = prependFuncDef(yyDollar[2].value.(*Query).FuncDefs, yyDollar[1].value.(*FuncDef))
			yyVAL.value = yyDollar[2].value
		}
	case 21:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:147
		{
			yyVAL.value = &Query{Left: yyDollar[1].value.(*Query), Op: OpPipe, Right: yyDollar[3].value.(*Query)}
		}
	case 22:
		yyDollar = yyS[yypt-5 : yypt+1]
//line parser.go.y:151
		{
			yyDollar[1].value.(*Term).SuffixList = append(yyDollar[1].value.(*Term).SuffixList, &Suffix{Bind: &Bind{yyDollar[3].value.([]*Pattern), yyDollar[5].value.(*Query)}})
			yyVAL.value = &Query{Term: yyDollar[1].value.(*Term)}
		}
	case 23:
		yyDollar = yyS[yypt-9 : yypt+1]
//line parser.go.y:156
		{
			yyVAL.value = &Query{Term: &Term{Type: TermTypeReduce, Reduce: &Reduce{yyDollar[2].value.(*Term), yyDollar[4].value.(*Pattern), yyDollar[6].value.(*Query), yyDollar[8].value.(*Query)}}}
		}
	case 24:
		yyDollar = yyS[yypt-9 : yypt+1]
//line parser.go.y:160
		{
			yyVAL.value = &Query{Term: &Term{Type: TermTypeForeach, Foreach: &Foreach{yyDollar[2].value.(*Term), yyDollar[4].value.(*Pattern), yyDollar[6].value.(*Query), yyDollar[8].value.(*Query), nil}}}
		}
	case 25:
		yyDollar = yyS[yypt-11 : yypt+1]
//line parser.go.y:164
		{
			yyVAL.value = &Query{Term: &Term{Type: TermTypeForeach, Foreach: &Foreach{yyDollar[2].value.(*Term), yyDollar[4].value.(*Pattern), yyDollar[6].value.(*Query), yyDollar[8].value.(*Query), yyDollar[10].value.(*Query)}}}
		}
	case 26:
		yyDollar = yyS[yypt-7 : yypt+1]
//line parser.go.y:168
		{
			yyVAL.value = &Query{Term: &Term{Type: TermTypeIf, If: &If{yyDollar[2].value.(*Query), yyDollar[4].value.(*Query), yyDollar[5].value.([]*IfElif), yyDollar[6].value.(*Query)}}}
		}
	case 27:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:172
		{
			yyVAL.value = &Query{Term: &Term{Type: TermTypeTry, Try: &Try{yyDollar[2].value.(*Query), yyDollar[3].value.(*Query)}}}
		}
	case 28:
		yyDollar = yyS[yypt-4 : yypt+1]
//line parser.go.y:176
		{
			yyVAL.value = &Query{Term: &Term{Type: TermTypeLabel, Label: &Label{yyDollar[2].token, yyDollar[4].value.(*Query)}}}
		}
	case 29:
		yyDollar = yyS[yypt-2 : yypt+1]
//line parser.go.y:180
		{
			if t := yyDollar[1].value.(*Query).Term; t != nil {
				t.SuffixList = append(t.SuffixList, &Suffix{Optional: true})
			} else {
				yyVAL.value = &Query{Term: &Term{Type: TermTypeQuery, Query: yyDollar[1].value.(*Query), SuffixList: []*Suffix{&Suffix{Optional: true}}}}
			}
		}
	case 30:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:188
		{
			yyVAL.value = &Query{Left: yyDollar[1].value.(*Query), Op: OpComma, Right: yyDollar[3].value.(*Query)}
		}
	case 31:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:192
		{
			yyVAL.value = &Query{Left: yyDollar[1].value.(*Query), Op: yyDollar[2].operator, Right: yyDollar[3].value.(*Query)}
		}
	case 32:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:196
		{
			yyVAL.value = &Query{Left: yyDollar[1].value.(*Query), Op: yyDollar[2].operator, Right: yyDollar[3].value.(*Query)}
		}
	case 33:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:200
		{
			yyVAL.value = &Query{Left: yyDollar[1].value.(*Query), Op: OpOr, Right: yyDollar[3].value.(*Query)}
		}
	case 34:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:204
		{
			yyVAL.value = &Query{Left: yyDollar[1].value.(*Query), Op: OpAnd, Right: yyDollar[3].value.(*Query)}
		}
	case 35:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:208
		{
			yyVAL.value = &Query{Left: yyDollar[1].value.(*Query), Op: yyDollar[2].operator, Right: yyDollar[3].value.(*Query)}
		}
	case 36:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:212
		{
			yyVAL.value = &Query{Left: yyDollar[1].value.(*Query), Op: OpAdd, Right: yyDollar[3].value.(*Query)}
		}
	case 37:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:216
		{
			yyVAL.value = &Query{Left: yyDollar[1].value.(*Query), Op: OpSub, Right: yyDollar[3].value.(*Query)}
		}
	case 38:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:220
		{
			yyVAL.value = &Query{Left: yyDollar[1].value.(*Query), Op: OpMul, Right: yyDollar[3].value.(*Query)}
		}
	case 39:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:224
		{
			yyVAL.value = &Query{Left: yyDollar[1].value.(*Query), Op: OpDiv, Right: yyDollar[3].value.(*Query)}
		}
	case 40:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:228
		{
			yyVAL.value = &Query{Left: yyDollar[1].value.(*Query), Op: OpMod, Right: yyDollar[3].value.(*Query)}
		}
	case 41:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:232
		{
			yyVAL.value = &Query{Term: yyDollar[1].value.(*Term)}
		}
	case 42:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:238
		{
			yyVAL.value = []*Pattern{yyDollar[1].value.(*Pattern)}
		}
	case 43:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:242
		{
			yyVAL.value = append(yyDollar[1].value.([]*Pattern), yyDollar[3].value.(*Pattern))
		}
	case 44:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:248
		{
			yyVAL.value = &Pattern{Name: yyDollar[1].token}
		}
	case 45:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:252
		{
			yyVAL.value = &Pattern{Array: yyDollar[2].value.([]*Pattern)}
		}
	case 46:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:256
		{
			yyVAL.value = &Pattern{Object: yyDollar[2].value.([]*PatternObject)}
		}
	case 47:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:262
		{
			yyVAL.value = []*Pattern{yyDollar[1].value.(*Pattern)}
		}
	case 48:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:266
		{
			yyVAL.value = append(yyDollar[1].value.([]*Pattern), yyDollar[3].value.(*Pattern))
		}
	case 49:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:272
		{
			yyVAL.value = []*PatternObject{yyDollar[1].value.(*PatternObject)}
		}
	case 50:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:276
		{
			yyVAL.value = append(yyDollar[1].value.([]*PatternObject), yyDollar[3].value.(*PatternObject))
		}
	case 51:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:282
		{
			yyVAL.value = &PatternObject{Key: yyDollar[1].token, Val: yyDollar[3].value.(*Pattern)}
		}
	case 52:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:286
		{
			yyVAL.value = &PatternObject{KeyString: yyDollar[1].value.(*String), Val: yyDollar[3].value.(*Pattern)}
		}
	case 53:
		yyDollar = yyS[yypt-5 : yypt+1]
//line parser.go.y:290
		{
			yyVAL.value = &PatternObject{KeyQuery: yyDollar[2].value.(*Query), Val: yyDollar[5].value.(*Pattern)}
		}
	case 54:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:294
		{
			yyVAL.value = &PatternObject{KeyOnly: yyDollar[1].token}
		}
	case 55:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:300
		{
			yyVAL.value = &Term{Type: TermTypeIdentity}
		}
	case 56:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:304
		{
			yyVAL.value = &Term{Type: TermTypeRecurse}
		}
	case 57:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:308
		{
			yyVAL.value = &Term{Type: TermTypeIndex, Index: &Index{Name: yyDollar[1].token}}
		}
	case 58:
		yyDollar = yyS[yypt-2 : yypt+1]
//line parser.go.y:312
		{
			if yyDollar[2].value.(*Suffix).Iter {
				yyVAL.value = &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{yyDollar[2].value.(*Suffix)}}
			} else {
				yyVAL.value = &Term{Type: TermTypeIndex, Index: yyDollar[2].value.(*Suffix).Index}
			}
		}
	case 59:
		yyDollar = yyS[yypt-2 : yypt+1]
//line parser.go.y:320
		{
			yyVAL.value = &Term{Type: TermTypeIndex, Index: &Index{Str: yyDollar[2].value.(*String)}}
		}
	case 60:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:324
		{
			yyVAL.value = &Term{Type: TermTypeNull}
		}
	case 61:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:328
		{
			yyVAL.value = &Term{Type: TermTypeTrue}
		}
	case 62:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:332
		{
			yyVAL.value = &Term{Type: TermTypeFalse}
		}
	case 63:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:336
		{
			yyVAL.value = &Term{Type: TermTypeFunc, Func: &Func{Name: yyDollar[1].token}}
		}
	case 64:
		yyDollar = yyS[yypt-4 : yypt+1]
//line parser.go.y:340
		{
			yyVAL.value = &Term{Type: TermTypeFunc, Func: &Func{Name: yyDollar[1].token, Args: yyDollar[3].value.([]*Query)}}
		}
	case 65:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:344
		{
			yyVAL.value = &Term{Type: TermTypeFunc, Func: &Func{Name: yyDollar[1].token}}
		}
	case 66:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:348
		{
			yyVAL.value = &Term{Type: TermTypeNumber, Number: yyDollar[1].token}
		}
	case 67:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:352
		{
			yyVAL.value = &Term{Type: TermTypeFormat, Format: yyDollar[1].token}
		}
	case 68:
		yyDollar = yyS[yypt-2 : yypt+1]
//line parser.go.y:356
		{
			yyVAL.value = &Term{Type: TermTypeFormat, Format: yyDollar[1].token, Str: yyDollar[2].value.(*String)}
		}
	case 69:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:360
		{
			yyVAL.value = &Term{Type: TermTypeString, Str: yyDollar[1].value.(*String)}
		}
	case 70:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:364
		{
			yyVAL.value = &Term{Type: TermTypeQuery, Query: yyDollar[2].value.(*Query)}
		}
	case 71:
		yyDollar = yyS[yypt-2 : yypt+1]
//line parser.go.y:368
		{
			yyVAL.value = &Term{Type: TermTypeUnary, Unary: &Unary{OpSub, yyDollar[2].value.(*Term)}}
		}
	case 72:
		yyDollar = yyS[yypt-2 : yypt+1]
//line parser.go.y:372
		{
			yyVAL.value = &Term{Type: TermTypeUnary, Unary: &Unary{OpAdd, yyDollar[2].value.(*Term)}}
		}
	case 73:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:376
		{
			yyVAL.value = &Term{Type: TermTypeObject, Object: &Object{yyDollar[2].value.([]*ObjectKeyVal)}}
		}
	case 74:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:380
		{
			yyVAL.value = &Term{Type: TermTypeArray, Array: &Array{yyDollar[2].value.(*Query)}}
		}
	case 75:
		yyDollar = yyS[yypt-2 : yypt+1]
//line parser.go.y:384
		{
			yyVAL.value = &Term{Type: TermTypeArray, Array: &Array{}}
		}
	case 76:
		yyDollar = yyS[yypt-2 : yypt+1]
//line parser.go.y:388
		{
			yyVAL.value = &Term{Type: TermTypeBreak, Break: yyDollar[2].token}
		}
	case 77:
		yyDollar = yyS[yypt-2 : yypt+1]
//line parser.go.y:392
		{
			yyDollar[1].value.(*Term).SuffixList = append(yyDollar[1].value.(*Term).SuffixList, &Suffix{Index: &Index{Name: yyDollar[2].token}})
		}
	case 78:
		yyDollar = yyS[yypt-2 : yypt+1]
//line parser.go.y:396
		{
			yyDollar[1].value.(*Term).SuffixList = append(yyDollar[1].value.(*Term).SuffixList, yyDollar[2].value.(*Suffix))
		}
	case 79:
		yyDollar = yyS[yypt-2 : yypt+1]
//line parser.go.y:400
		{
			yyDollar[1].value.(*Term).SuffixList = append(yyDollar[1].value.(*Term).SuffixList, &Suffix{Optional: true})
		}
	case 80:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:404
		{
			yyDollar[1].value.(*Term).SuffixList = append(yyDollar[1].value.(*Term).SuffixList, yyDollar[3].value.(*Suffix))
		}
	case 81:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:408
		{
			yyDollar[1].value.(*Term).SuffixList = append(yyDollar[1].value.(*Term).SuffixList, &Suffix{Index: &Index{Str: yyDollar[3].value.(*String)}})
		}
	case 82:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:414
		{
			yyVAL.value = &String{Str: yyDollar[1].token}
		}
	case 83:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:418
		{
			yyVAL.value = &String{Queries: yyDollar[2].value.([]*Query)}
		}
	case 84:
		yyDollar = yyS[yypt-0 : yypt+1]
//line parser.go.y:424
		{
			yyVAL.value = []*Query{}
		}
	case 85:
		yyDollar = yyS[yypt-2 : yypt+1]
//line parser.go.y:428
		{
			yyVAL.value = append(yyDollar[1].value.([]*Query), &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: yyDollar[2].token}}})
		}
	case 86:
		yyDollar = yyS[yypt-4 : yypt+1]
//line parser.go.y:432
		{
			yylex.(*lexer).inString = true
			yyVAL.value = append(yyDollar[1].value.([]*Query), &Query{Term: &Term{Type: TermTypeQuery, Query: yyDollar[3].value.(*Query)}})
		}
	case 87:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:438
		{
		}
	case 88:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:439
		{
		}
	case 89:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:442
		{
		}
	case 90:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:443
		{
		}
	case 91:
		yyDollar = yyS[yypt-2 : yypt+1]
//line parser.go.y:447
		{
			yyVAL.value = &Suffix{Iter: true}
		}
	case 92:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:451
		{
			yyVAL.value = &Suffix{Index: &Index{Start: yyDollar[2].value.(*Query)}}
		}
	case 93:
		yyDollar = yyS[yypt-4 : yypt+1]
//line parser.go.y:455
		{
			yyVAL.value = &Suffix{Index: &Index{Start: yyDollar[2].value.(*Query), IsSlice: true}}
		}
	case 94:
		yyDollar = yyS[yypt-4 : yypt+1]
//line parser.go.y:459
		{
			yyVAL.value = &Suffix{Index: &Index{End: yyDollar[3].value.(*Query)}}
		}
	case 95:
		yyDollar = yyS[yypt-5 : yypt+1]
//line parser.go.y:463
		{
			yyVAL.value = &Suffix{Index: &Index{Start: yyDollar[2].value.(*Query), IsSlice: true, End: yyDollar[4].value.(*Query)}}
		}
	case 96:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:469
		{
			yyVAL.value = []*Query{yyDollar[1].value.(*Query)}
		}
	case 97:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:473
		{
			yyVAL.value = append(yyDollar[1].value.([]*Query), yyDollar[3].value.(*Query))
		}
	case 98:
		yyDollar = yyS[yypt-0 : yypt+1]
//line parser.go.y:479
		{
			yyVAL.value = []*IfElif(nil)
		}
	case 99:
		yyDollar = yyS[yypt-5 : yypt+1]
//line parser.go.y:483
		{
			yyVAL.value = prependIfElif(yyDollar[5].value.([]*IfElif), &IfElif{yyDollar[2].value.(*Query), yyDollar[4].value.(*Query)})
		}
	case 100:
		yyDollar = yyS[yypt-0 : yypt+1]
//line parser.go.y:489
		{
			yyVAL.value = (*Query)(nil)
		}
	case 101:
		yyDollar = yyS[yypt-2 : yypt+1]
//line parser.go.y:493
		{
			yyVAL.value = yyDollar[2].value
		}
	case 102:
		yyDollar = yyS[yypt-0 : yypt+1]
//line parser.go.y:499
		{
			yyVAL.value = (*Query)(nil)
		}
	case 103:
		yyDollar = yyS[yypt-2 : yypt+1]
//line parser.go.y:503
		{
			yyVAL.value = yyDollar[2].value
		}
	case 104:
		yyDollar = yyS[yypt-0 : yypt+1]
//line parser.go.y:509
		{
			yyVAL.value = []*ObjectKeyVal(nil)
		}
	case 105:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:513
		{
			yyVAL.value = []*ObjectKeyVal{yyDollar[1].value.(*ObjectKeyVal)}
		}
	case 106:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:517
		{
			yyVAL.value = prependObjectKeyVal(yyDollar[3].value.([]*ObjectKeyVal), yyDollar[1].value.(*ObjectKeyVal))
		}
	case 107:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:523
		{
			yyVAL.value = &ObjectKeyVal{Key: yyDollar[1].token, Val: yyDollar[3].value.(*ObjectVal)}
		}
	case 108:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:527
		{
			yyVAL.value = &ObjectKeyVal{KeyString: yyDollar[1].value.(*String), Val: yyDollar[3].value.(*ObjectVal)}
		}
	case 109:
		yyDollar = yyS[yypt-5 : yypt+1]
//line parser.go.y:531
		{
			yyVAL.value = &ObjectKeyVal{KeyQuery: yyDollar[2].value.(*Query), Val: yyDollar[5].value.(*ObjectVal)}
		}
	case 110:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:535
		{
			yyVAL.value = &ObjectKeyVal{KeyOnly: yyDollar[1].token}
		}
	case 111:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:539
		{
			yyVAL.value = &ObjectKeyVal{KeyOnlyString: yyDollar[1].value.(*String)}
		}
	case 112:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:544
		{
		}
	case 113:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:545
		{
		}
	case 114:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:546
		{
		}
	case 115:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:550
		{
			yyVAL.value = &ObjectVal{[]*Query{&Query{Term: yyDollar[1].value.(*Term)}}}
		}
	case 116:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:554
		{
			yyVAL.value = &ObjectVal{prependQuery(yyDollar[3].value.(*ObjectVal).Queries, &Query{Term: yyDollar[1].value.(*Term)})}
		}
	case 117:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:560
		{
			yyVAL.value = &ConstTerm{Object: yyDollar[1].value.(*ConstObject)}
		}
	case 118:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:564
		{
			yyVAL.value = &ConstTerm{Array: yyDollar[1].value.(*ConstArray)}
		}
	case 119:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:568
		{
			yyVAL.value = &ConstTerm{Number: yyDollar[1].token}
		}
	case 120:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:572
		{
			yyVAL.value = &ConstTerm{Str: yyDollar[1].token}
		}
	case 121:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:576
		{
			yyVAL.value = &ConstTerm{Null: true}
		}
	case 122:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:580
		{
			yyVAL.value = &ConstTerm{True: true}
		}
	case 123:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:584
		{
			yyVAL.value = &ConstTerm{False: true}
		}
	case 124:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:590
		{
			yyVAL.value = &ConstObject{yyDollar[2].value.([]*ConstObjectKeyVal)}
		}
	case 125:
		yyDollar = yyS[yypt-0 : yypt+1]
//line parser.go.y:596
		{
			yyVAL.value = []*ConstObjectKeyVal(nil)
		}
	case 126:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:600
		{
			yyVAL.value = []*ConstObjectKeyVal{yyDollar[1].value.(*ConstObjectKeyVal)}
		}
	case 127:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:604
		{
			yyVAL.value = prependConstObjectKeyVal(yyDollar[3].value.([]*ConstObjectKeyVal), yyDollar[1].value.(*ConstObjectKeyVal))
		}
	case 128:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:610
		{
			yyVAL.value = &ConstObjectKeyVal{Key: yyDollar[1].token, Val: yyDollar[3].value.(*ConstTerm)}
		}
	case 129:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:614
		{
			yyVAL.value = &ConstObjectKeyVal{Key: yyDollar[1].token, Val: yyDollar[3].value.(*ConstTerm)}
		}
	case 130:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:618
		{
			yyVAL.value = &ConstObjectKeyVal{KeyString: yyDollar[1].token, Val: yyDollar[3].value.(*ConstTerm)}
		}
	case 131:
		yyDollar = yyS[yypt-2 : yypt+1]
//line parser.go.y:624
		{
			yyVAL.value = &ConstArray{}
		}
	case 132:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:628
		{
			yyVAL.value = &ConstArray{yyDollar[2].value.([]*ConstTerm)}
		}
	case 133:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:634
		{
			yyVAL.value = []*ConstTerm{yyDollar[1].value.(*ConstTerm)}
		}
	case 134:
		yyDollar = yyS[yypt-3 : yypt+1]
//line parser.go.y:638
		{
			yyVAL.value = append(yyDollar[1].value.([]*ConstTerm), yyDollar[3].value.(*ConstTerm))
		}
	case 135:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:643
		{
		}
	case 136:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:644
		{
		}
	case 137:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:645
		{
		}
	case 138:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:646
		{
		}
	case 139:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:647
		{
		}
	case 140:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:648
		{
		}
	case 141:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:649
		{
		}
	case 142:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:650
		{
		}
	case 143:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:651
		{
		}
	case 144:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:652
		{
		}
	case 145:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:653
		{
		}
	case 146:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:654
		{
		}
	case 147:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:655
		{
		}
	case 148:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:656
		{
		}
	case 149:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:657
		{
		}
	case 150:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:658
		{
		}
	case 151:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:659
		{
		}
	case 152:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:660
		{
		}
	case 153:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:661
		{
		}
	case 154:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:662
		{
		}
	case 155:
		yyDollar = yyS[yypt-1 : yypt+1]
//line parser.go.y:663
		{
		}
	}
	goto yystack /* stack new state and value */
}
