featurebase/pql/pql.peg.go
2022-09-02 13:23:39 -07:00

4379 lines
95 KiB
Go

package pql
// Code generated by peg -inline pql.peg DO NOT EDIT.
import (
"fmt"
"io"
"os"
"sort"
"strconv"
"strings"
)
const endSymbol rune = 1114112
/* The rule types inferred from the grammar are below. */
type pegRule uint8
const (
ruleUnknown pegRule = iota
ruleCalls
ruleCall
ruleallargs
ruleargs
rulearg
ruleCOND
ruleconditional
rulecondint
rulecondLT
rulecondfield
rulevalue
ruleitems
ruleitem
ruledoublequotedstring
rulesinglequotedstring
rulevariable
rulefieldExpr
rulefield
rulereserved
ruleposfield
rulecol
ruleopen
ruleclose
rulesp
ruleeq
rulecomma
rulelbrack
rulerbrack
ruleIDENT
ruledigits
rulesignedDigits
ruledecimal
ruletz
ruleiso8601
ruleiso8601nano
ruletimestampbasicfmt
ruletimestampfmt
ruletimebasicfmt
ruletimefmt
ruletime
ruleAction0
ruleAction1
ruleAction2
ruleAction3
ruleAction4
ruleAction5
ruleAction6
ruleAction7
ruleAction8
ruleAction9
ruleAction10
ruleAction11
ruleAction12
ruleAction13
ruleAction14
ruleAction15
ruleAction16
ruleAction17
ruleAction18
ruleAction19
ruleAction20
ruleAction21
ruleAction22
ruleAction23
ruleAction24
ruleAction25
ruleAction26
ruleAction27
rulePegText
ruleAction28
ruleAction29
ruleAction30
ruleAction31
ruleAction32
ruleAction33
ruleAction34
ruleAction35
ruleAction36
ruleAction37
ruleAction38
ruleAction39
ruleAction40
ruleAction41
ruleAction42
ruleAction43
ruleAction44
ruleAction45
ruleAction46
ruleAction47
ruleAction48
ruleAction49
ruleAction50
ruleAction51
ruleAction52
ruleAction53
ruleAction54
ruleAction55
ruleAction56
ruleAction57
ruleAction58
ruleAction59
ruleAction60
ruleAction61
)
var rul3s = [...]string{
"Unknown",
"Calls",
"Call",
"allargs",
"args",
"arg",
"COND",
"conditional",
"condint",
"condLT",
"condfield",
"value",
"items",
"item",
"doublequotedstring",
"singlequotedstring",
"variable",
"fieldExpr",
"field",
"reserved",
"posfield",
"col",
"open",
"close",
"sp",
"eq",
"comma",
"lbrack",
"rbrack",
"IDENT",
"digits",
"signedDigits",
"decimal",
"tz",
"iso8601",
"iso8601nano",
"timestampbasicfmt",
"timestampfmt",
"timebasicfmt",
"timefmt",
"time",
"Action0",
"Action1",
"Action2",
"Action3",
"Action4",
"Action5",
"Action6",
"Action7",
"Action8",
"Action9",
"Action10",
"Action11",
"Action12",
"Action13",
"Action14",
"Action15",
"Action16",
"Action17",
"Action18",
"Action19",
"Action20",
"Action21",
"Action22",
"Action23",
"Action24",
"Action25",
"Action26",
"Action27",
"PegText",
"Action28",
"Action29",
"Action30",
"Action31",
"Action32",
"Action33",
"Action34",
"Action35",
"Action36",
"Action37",
"Action38",
"Action39",
"Action40",
"Action41",
"Action42",
"Action43",
"Action44",
"Action45",
"Action46",
"Action47",
"Action48",
"Action49",
"Action50",
"Action51",
"Action52",
"Action53",
"Action54",
"Action55",
"Action56",
"Action57",
"Action58",
"Action59",
"Action60",
"Action61",
}
type token32 struct {
pegRule
begin, end uint32
}
func (t *token32) String() string {
return fmt.Sprintf("\x1B[34m%v\x1B[m %v %v", rul3s[t.pegRule], t.begin, t.end)
}
type node32 struct {
token32
up, next *node32
}
func (node *node32) print(w io.Writer, pretty bool, buffer string) {
var print func(node *node32, depth int)
print = func(node *node32, depth int) {
for node != nil {
for c := 0; c < depth; c++ {
fmt.Fprintf(w, " ")
}
rule := rul3s[node.pegRule]
quote := strconv.Quote(string(([]rune(buffer)[node.begin:node.end])))
if !pretty {
fmt.Fprintf(w, "%v %v\n", rule, quote)
} else {
fmt.Fprintf(w, "\x1B[36m%v\x1B[m %v\n", rule, quote)
}
if node.up != nil {
print(node.up, depth+1)
}
node = node.next
}
}
print(node, 0)
}
func (node *node32) Print(w io.Writer, buffer string) {
node.print(w, false, buffer)
}
func (node *node32) PrettyPrint(w io.Writer, buffer string) {
node.print(w, true, buffer)
}
type tokens32 struct {
tree []token32
}
func (t *tokens32) Trim(length uint32) {
t.tree = t.tree[:length]
}
func (t *tokens32) Print() {
for _, token := range t.tree {
fmt.Println(token.String())
}
}
func (t *tokens32) AST() *node32 {
type element struct {
node *node32
down *element
}
tokens := t.Tokens()
var stack *element
for _, token := range tokens {
if token.begin == token.end {
continue
}
node := &node32{token32: token}
for stack != nil && stack.node.begin >= token.begin && stack.node.end <= token.end {
stack.node.next = node.up
node.up = stack.node
stack = stack.down
}
stack = &element{node: node, down: stack}
}
if stack != nil {
return stack.node
}
return nil
}
func (t *tokens32) PrintSyntaxTree(buffer string) {
t.AST().Print(os.Stdout, buffer)
}
func (t *tokens32) WriteSyntaxTree(w io.Writer, buffer string) {
t.AST().Print(w, buffer)
}
func (t *tokens32) PrettyPrintSyntaxTree(buffer string) {
t.AST().PrettyPrint(os.Stdout, buffer)
}
func (t *tokens32) Add(rule pegRule, begin, end, index uint32) {
tree, i := t.tree, int(index)
if i >= len(tree) {
t.tree = append(tree, token32{pegRule: rule, begin: begin, end: end})
return
}
tree[i] = token32{pegRule: rule, begin: begin, end: end}
}
func (t *tokens32) Tokens() []token32 {
return t.tree
}
type PQL struct {
Query
Buffer string
buffer []rune
rules [104]func() bool
parse func(rule ...int) error
reset func()
Pretty bool
tokens32
}
func (p *PQL) Parse(rule ...int) error {
return p.parse(rule...)
}
func (p *PQL) Reset() {
p.reset()
}
type textPosition struct {
line, symbol int
}
type textPositionMap map[int]textPosition
func translatePositions(buffer []rune, positions []int) textPositionMap {
length, translations, j, line, symbol := len(positions), make(textPositionMap, len(positions)), 0, 1, 0
sort.Ints(positions)
search:
for i, c := range buffer {
if c == '\n' {
line, symbol = line+1, 0
} else {
symbol++
}
if i == positions[j] {
translations[positions[j]] = textPosition{line, symbol}
for j++; j < length; j++ {
if i != positions[j] {
continue search
}
}
break search
}
}
return translations
}
type parseError struct {
p *PQL
max token32
}
func (e *parseError) Error() string {
tokens, err := []token32{e.max}, "\n"
positions, p := make([]int, 2*len(tokens)), 0
for _, token := range tokens {
positions[p], p = int(token.begin), p+1
positions[p], p = int(token.end), p+1
}
translations := translatePositions(e.p.buffer, positions)
format := "parse error near %v (line %v symbol %v - line %v symbol %v):\n%v\n"
if e.p.Pretty {
format = "parse error near \x1B[34m%v\x1B[m (line %v symbol %v - line %v symbol %v):\n%v\n"
}
for _, token := range tokens {
begin, end := int(token.begin), int(token.end)
err += fmt.Sprintf(format,
rul3s[token.pegRule],
translations[begin].line, translations[begin].symbol,
translations[end].line, translations[end].symbol,
strconv.Quote(string(e.p.buffer[begin:end])))
}
return err
}
func (p *PQL) PrintSyntaxTree() {
if p.Pretty {
p.tokens32.PrettyPrintSyntaxTree(p.Buffer)
} else {
p.tokens32.PrintSyntaxTree(p.Buffer)
}
}
func (p *PQL) WriteSyntaxTree(w io.Writer) {
p.tokens32.WriteSyntaxTree(w, p.Buffer)
}
func (p *PQL) SprintSyntaxTree() string {
var bldr strings.Builder
p.WriteSyntaxTree(&bldr)
return bldr.String()
}
func (p *PQL) Execute() {
buffer, _buffer, text, begin, end := p.Buffer, p.buffer, "", 0, 0
for _, token := range p.Tokens() {
switch token.pegRule {
case rulePegText:
begin, end = int(token.begin), int(token.end)
text = string(_buffer[begin:end])
case ruleAction0:
p.startCall("Set")
case ruleAction1:
p.endCall()
case ruleAction2:
p.startCall("Clear")
case ruleAction3:
p.endCall()
case ruleAction4:
p.startCall("ClearRow")
case ruleAction5:
p.endCall()
case ruleAction6:
p.startCall("Store")
case ruleAction7:
p.endCall()
case ruleAction8:
p.startCall("TopN")
case ruleAction9:
p.endCall()
case ruleAction10:
p.startCall("TopK")
case ruleAction11:
p.endCall()
case ruleAction12:
p.startCall("Percentile")
case ruleAction13:
p.endCall()
case ruleAction14:
p.startCall("Rows")
case ruleAction15:
p.endCall()
case ruleAction16:
p.startCall("Min")
case ruleAction17:
p.endCall()
case ruleAction18:
p.startCall("Max")
case ruleAction19:
p.endCall()
case ruleAction20:
p.startCall("Sum")
case ruleAction21:
p.endCall()
case ruleAction22:
p.startCall("Range")
case ruleAction23:
p.addField("from")
case ruleAction24:
p.addVal(text)
case ruleAction25:
p.addField("to")
case ruleAction26:
p.addVal(text)
case ruleAction27:
p.endCall()
case ruleAction28:
p.startCall(text)
case ruleAction29:
p.endCall()
case ruleAction30:
p.addBTWN()
case ruleAction31:
p.addLTE()
case ruleAction32:
p.addGTE()
case ruleAction33:
p.addEQ()
case ruleAction34:
p.addNEQ()
case ruleAction35:
p.addLT()
case ruleAction36:
p.addGT()
case ruleAction37:
p.startConditional()
case ruleAction38:
p.endConditional()
case ruleAction39:
p.condAdd(text)
case ruleAction40:
p.condAdd(text)
case ruleAction41:
p.condAdd(text)
case ruleAction42:
p.startList()
case ruleAction43:
p.endList()
case ruleAction44:
p.addVal(nil)
case ruleAction45:
p.addVal(true)
case ruleAction46:
p.addVal(false)
case ruleAction47:
p.addVal(NewVariable(text))
case ruleAction48:
p.addVal(text)
case ruleAction49:
p.addTimestampVal(text)
case ruleAction50:
p.addNumVal(text)
case ruleAction51:
p.startCall(text)
case ruleAction52:
p.addVal(p.endCall())
case ruleAction53:
p.addVal(text)
case ruleAction54:
p.addVal(text)
case ruleAction55:
p.addVal(text)
case ruleAction56:
p.addField(text)
case ruleAction57:
p.addPosStr("_field", text)
case ruleAction58:
p.addPosNum("_col", text)
case ruleAction59:
p.addPosStr("_col", text)
case ruleAction60:
p.addPosStr("_col", text)
case ruleAction61:
p.addPosStr("_timestamp", text)
}
}
_, _, _, _, _ = buffer, _buffer, text, begin, end
}
func Pretty(pretty bool) func(*PQL) error {
return func(p *PQL) error {
p.Pretty = pretty
return nil
}
}
func Size(size int) func(*PQL) error {
return func(p *PQL) error {
p.tokens32 = tokens32{tree: make([]token32, 0, size)}
return nil
}
}
func (p *PQL) Init(options ...func(*PQL) error) error {
var (
max token32
position, tokenIndex uint32
buffer []rune
)
for _, option := range options {
err := option(p)
if err != nil {
return err
}
}
p.reset = func() {
max = token32{}
position, tokenIndex = 0, 0
p.buffer = []rune(p.Buffer)
if len(p.buffer) == 0 || p.buffer[len(p.buffer)-1] != endSymbol {
p.buffer = append(p.buffer, endSymbol)
}
buffer = p.buffer
}
p.reset()
_rules := p.rules
tree := p.tokens32
p.parse = func(rule ...int) error {
r := 1
if len(rule) > 0 {
r = rule[0]
}
matches := p.rules[r]()
p.tokens32 = tree
if matches {
p.Trim(tokenIndex)
return nil
}
return &parseError{p, max}
}
add := func(rule pegRule, begin uint32) {
tree.Add(rule, begin, position, tokenIndex)
tokenIndex++
if begin != position && position > max.end {
max = token32{rule, begin, position}
}
}
matchDot := func() bool {
if buffer[position] != endSymbol {
position++
return true
}
return false
}
/*matchChar := func(c byte) bool {
if buffer[position] == c {
position++
return true
}
return false
}*/
/*matchRange := func(lower byte, upper byte) bool {
if c := buffer[position]; c >= lower && c <= upper {
position++
return true
}
return false
}*/
_rules = [...]func() bool{
nil,
/* 0 Calls <- <(sp (Call sp)* !.)> */
func() bool {
position0, tokenIndex0 := position, tokenIndex
{
position1 := position
if !_rules[rulesp]() {
goto l0
}
l2:
{
position3, tokenIndex3 := position, tokenIndex
if !_rules[ruleCall]() {
goto l3
}
if !_rules[rulesp]() {
goto l3
}
goto l2
l3:
position, tokenIndex = position3, tokenIndex3
}
{
position4, tokenIndex4 := position, tokenIndex
if !matchDot() {
goto l4
}
goto l0
l4:
position, tokenIndex = position4, tokenIndex4
}
add(ruleCalls, position1)
}
return true
l0:
position, tokenIndex = position0, tokenIndex0
return false
},
/* 1 Call <- <((('s' / 'S') ('e' / 'E') ('t' / 'T') Action0 open col comma args (comma time)? close Action1) / (('c' / 'C') ('l' / 'L') ('e' / 'E') ('a' / 'A') ('r' / 'R') Action2 open col comma args close Action3) / (('c' / 'C') ('l' / 'L') ('e' / 'E') ('a' / 'A') ('r' / 'R') ('r' / 'R') ('o' / 'O') ('w' / 'W') Action4 open arg close Action5) / (('s' / 'S') ('t' / 'T') ('o' / 'O') ('r' / 'R') ('e' / 'E') Action6 open Call comma arg close Action7) / (('t' / 'T') ('o' / 'O') ('p' / 'P') ('n' / 'N') Action8 open posfield (comma allargs)? close Action9) / (('t' / 'T') ('o' / 'O') ('p' / 'P') ('k' / 'K') Action10 open posfield (comma allargs)? close Action11) / (('p' / 'P') ('e' / 'E') ('r' / 'R') ('c' / 'C') ('e' / 'E') ('n' / 'N') ('t' / 'T') ('i' / 'I') ('l' / 'L') ('e' / 'E') Action12 open posfield (comma allargs)? close Action13) / (('r' / 'R') ('o' / 'O') ('w' / 'W') ('s' / 'S') Action14 open posfield (comma allargs)? close Action15) / (('m' / 'M') ('i' / 'I') ('n' / 'N') Action16 open posfield (comma allargs)? close Action17) / (('m' / 'M') ('a' / 'A') ('x' / 'X') Action18 open posfield (comma allargs)? close Action19) / (('s' / 'S') ('u' / 'U') ('m' / 'M') Action20 open posfield (comma allargs)? close Action21) / (('r' / 'R') ('a' / 'A') ('n' / 'N') ('g' / 'G') ('e' / 'E') Action22 open field eq value comma ('f' 'r' 'o' 'm' '=')? Action23 timefmt Action24 comma ('t' 'o' '=')? sp Action25 timefmt Action26 close Action27) / (<IDENT> Action28 open allargs comma? close Action29))> */
func() bool {
position5, tokenIndex5 := position, tokenIndex
{
position6 := position
{
position7, tokenIndex7 := position, tokenIndex
{
position9, tokenIndex9 := position, tokenIndex
if buffer[position] != rune('s') {
goto l10
}
position++
goto l9
l10:
position, tokenIndex = position9, tokenIndex9
if buffer[position] != rune('S') {
goto l8
}
position++
}
l9:
{
position11, tokenIndex11 := position, tokenIndex
if buffer[position] != rune('e') {
goto l12
}
position++
goto l11
l12:
position, tokenIndex = position11, tokenIndex11
if buffer[position] != rune('E') {
goto l8
}
position++
}
l11:
{
position13, tokenIndex13 := position, tokenIndex
if buffer[position] != rune('t') {
goto l14
}
position++
goto l13
l14:
position, tokenIndex = position13, tokenIndex13
if buffer[position] != rune('T') {
goto l8
}
position++
}
l13:
{
add(ruleAction0, position)
}
if !_rules[ruleopen]() {
goto l8
}
if !_rules[rulecol]() {
goto l8
}
if !_rules[rulecomma]() {
goto l8
}
if !_rules[ruleargs]() {
goto l8
}
{
position16, tokenIndex16 := position, tokenIndex
if !_rules[rulecomma]() {
goto l16
}
{
position18 := position
{
position19 := position
if !_rules[ruletimefmt]() {
goto l16
}
add(rulePegText, position19)
}
{
add(ruleAction61, position)
}
add(ruletime, position18)
}
goto l17
l16:
position, tokenIndex = position16, tokenIndex16
}
l17:
if !_rules[ruleclose]() {
goto l8
}
{
add(ruleAction1, position)
}
goto l7
l8:
position, tokenIndex = position7, tokenIndex7
{
position23, tokenIndex23 := position, tokenIndex
if buffer[position] != rune('c') {
goto l24
}
position++
goto l23
l24:
position, tokenIndex = position23, tokenIndex23
if buffer[position] != rune('C') {
goto l22
}
position++
}
l23:
{
position25, tokenIndex25 := position, tokenIndex
if buffer[position] != rune('l') {
goto l26
}
position++
goto l25
l26:
position, tokenIndex = position25, tokenIndex25
if buffer[position] != rune('L') {
goto l22
}
position++
}
l25:
{
position27, tokenIndex27 := position, tokenIndex
if buffer[position] != rune('e') {
goto l28
}
position++
goto l27
l28:
position, tokenIndex = position27, tokenIndex27
if buffer[position] != rune('E') {
goto l22
}
position++
}
l27:
{
position29, tokenIndex29 := position, tokenIndex
if buffer[position] != rune('a') {
goto l30
}
position++
goto l29
l30:
position, tokenIndex = position29, tokenIndex29
if buffer[position] != rune('A') {
goto l22
}
position++
}
l29:
{
position31, tokenIndex31 := position, tokenIndex
if buffer[position] != rune('r') {
goto l32
}
position++
goto l31
l32:
position, tokenIndex = position31, tokenIndex31
if buffer[position] != rune('R') {
goto l22
}
position++
}
l31:
{
add(ruleAction2, position)
}
if !_rules[ruleopen]() {
goto l22
}
if !_rules[rulecol]() {
goto l22
}
if !_rules[rulecomma]() {
goto l22
}
if !_rules[ruleargs]() {
goto l22
}
if !_rules[ruleclose]() {
goto l22
}
{
add(ruleAction3, position)
}
goto l7
l22:
position, tokenIndex = position7, tokenIndex7
{
position36, tokenIndex36 := position, tokenIndex
if buffer[position] != rune('c') {
goto l37
}
position++
goto l36
l37:
position, tokenIndex = position36, tokenIndex36
if buffer[position] != rune('C') {
goto l35
}
position++
}
l36:
{
position38, tokenIndex38 := position, tokenIndex
if buffer[position] != rune('l') {
goto l39
}
position++
goto l38
l39:
position, tokenIndex = position38, tokenIndex38
if buffer[position] != rune('L') {
goto l35
}
position++
}
l38:
{
position40, tokenIndex40 := position, tokenIndex
if buffer[position] != rune('e') {
goto l41
}
position++
goto l40
l41:
position, tokenIndex = position40, tokenIndex40
if buffer[position] != rune('E') {
goto l35
}
position++
}
l40:
{
position42, tokenIndex42 := position, tokenIndex
if buffer[position] != rune('a') {
goto l43
}
position++
goto l42
l43:
position, tokenIndex = position42, tokenIndex42
if buffer[position] != rune('A') {
goto l35
}
position++
}
l42:
{
position44, tokenIndex44 := position, tokenIndex
if buffer[position] != rune('r') {
goto l45
}
position++
goto l44
l45:
position, tokenIndex = position44, tokenIndex44
if buffer[position] != rune('R') {
goto l35
}
position++
}
l44:
{
position46, tokenIndex46 := position, tokenIndex
if buffer[position] != rune('r') {
goto l47
}
position++
goto l46
l47:
position, tokenIndex = position46, tokenIndex46
if buffer[position] != rune('R') {
goto l35
}
position++
}
l46:
{
position48, tokenIndex48 := position, tokenIndex
if buffer[position] != rune('o') {
goto l49
}
position++
goto l48
l49:
position, tokenIndex = position48, tokenIndex48
if buffer[position] != rune('O') {
goto l35
}
position++
}
l48:
{
position50, tokenIndex50 := position, tokenIndex
if buffer[position] != rune('w') {
goto l51
}
position++
goto l50
l51:
position, tokenIndex = position50, tokenIndex50
if buffer[position] != rune('W') {
goto l35
}
position++
}
l50:
{
add(ruleAction4, position)
}
if !_rules[ruleopen]() {
goto l35
}
if !_rules[rulearg]() {
goto l35
}
if !_rules[ruleclose]() {
goto l35
}
{
add(ruleAction5, position)
}
goto l7
l35:
position, tokenIndex = position7, tokenIndex7
{
position55, tokenIndex55 := position, tokenIndex
if buffer[position] != rune('s') {
goto l56
}
position++
goto l55
l56:
position, tokenIndex = position55, tokenIndex55
if buffer[position] != rune('S') {
goto l54
}
position++
}
l55:
{
position57, tokenIndex57 := position, tokenIndex
if buffer[position] != rune('t') {
goto l58
}
position++
goto l57
l58:
position, tokenIndex = position57, tokenIndex57
if buffer[position] != rune('T') {
goto l54
}
position++
}
l57:
{
position59, tokenIndex59 := position, tokenIndex
if buffer[position] != rune('o') {
goto l60
}
position++
goto l59
l60:
position, tokenIndex = position59, tokenIndex59
if buffer[position] != rune('O') {
goto l54
}
position++
}
l59:
{
position61, tokenIndex61 := position, tokenIndex
if buffer[position] != rune('r') {
goto l62
}
position++
goto l61
l62:
position, tokenIndex = position61, tokenIndex61
if buffer[position] != rune('R') {
goto l54
}
position++
}
l61:
{
position63, tokenIndex63 := position, tokenIndex
if buffer[position] != rune('e') {
goto l64
}
position++
goto l63
l64:
position, tokenIndex = position63, tokenIndex63
if buffer[position] != rune('E') {
goto l54
}
position++
}
l63:
{
add(ruleAction6, position)
}
if !_rules[ruleopen]() {
goto l54
}
if !_rules[ruleCall]() {
goto l54
}
if !_rules[rulecomma]() {
goto l54
}
if !_rules[rulearg]() {
goto l54
}
if !_rules[ruleclose]() {
goto l54
}
{
add(ruleAction7, position)
}
goto l7
l54:
position, tokenIndex = position7, tokenIndex7
{
position68, tokenIndex68 := position, tokenIndex
if buffer[position] != rune('t') {
goto l69
}
position++
goto l68
l69:
position, tokenIndex = position68, tokenIndex68
if buffer[position] != rune('T') {
goto l67
}
position++
}
l68:
{
position70, tokenIndex70 := position, tokenIndex
if buffer[position] != rune('o') {
goto l71
}
position++
goto l70
l71:
position, tokenIndex = position70, tokenIndex70
if buffer[position] != rune('O') {
goto l67
}
position++
}
l70:
{
position72, tokenIndex72 := position, tokenIndex
if buffer[position] != rune('p') {
goto l73
}
position++
goto l72
l73:
position, tokenIndex = position72, tokenIndex72
if buffer[position] != rune('P') {
goto l67
}
position++
}
l72:
{
position74, tokenIndex74 := position, tokenIndex
if buffer[position] != rune('n') {
goto l75
}
position++
goto l74
l75:
position, tokenIndex = position74, tokenIndex74
if buffer[position] != rune('N') {
goto l67
}
position++
}
l74:
{
add(ruleAction8, position)
}
if !_rules[ruleopen]() {
goto l67
}
if !_rules[ruleposfield]() {
goto l67
}
{
position77, tokenIndex77 := position, tokenIndex
if !_rules[rulecomma]() {
goto l77
}
if !_rules[ruleallargs]() {
goto l77
}
goto l78
l77:
position, tokenIndex = position77, tokenIndex77
}
l78:
if !_rules[ruleclose]() {
goto l67
}
{
add(ruleAction9, position)
}
goto l7
l67:
position, tokenIndex = position7, tokenIndex7
{
position81, tokenIndex81 := position, tokenIndex
if buffer[position] != rune('t') {
goto l82
}
position++
goto l81
l82:
position, tokenIndex = position81, tokenIndex81
if buffer[position] != rune('T') {
goto l80
}
position++
}
l81:
{
position83, tokenIndex83 := position, tokenIndex
if buffer[position] != rune('o') {
goto l84
}
position++
goto l83
l84:
position, tokenIndex = position83, tokenIndex83
if buffer[position] != rune('O') {
goto l80
}
position++
}
l83:
{
position85, tokenIndex85 := position, tokenIndex
if buffer[position] != rune('p') {
goto l86
}
position++
goto l85
l86:
position, tokenIndex = position85, tokenIndex85
if buffer[position] != rune('P') {
goto l80
}
position++
}
l85:
{
position87, tokenIndex87 := position, tokenIndex
if buffer[position] != rune('k') {
goto l88
}
position++
goto l87
l88:
position, tokenIndex = position87, tokenIndex87
if buffer[position] != rune('K') {
goto l80
}
position++
}
l87:
{
add(ruleAction10, position)
}
if !_rules[ruleopen]() {
goto l80
}
if !_rules[ruleposfield]() {
goto l80
}
{
position90, tokenIndex90 := position, tokenIndex
if !_rules[rulecomma]() {
goto l90
}
if !_rules[ruleallargs]() {
goto l90
}
goto l91
l90:
position, tokenIndex = position90, tokenIndex90
}
l91:
if !_rules[ruleclose]() {
goto l80
}
{
add(ruleAction11, position)
}
goto l7
l80:
position, tokenIndex = position7, tokenIndex7
{
position94, tokenIndex94 := position, tokenIndex
if buffer[position] != rune('p') {
goto l95
}
position++
goto l94
l95:
position, tokenIndex = position94, tokenIndex94
if buffer[position] != rune('P') {
goto l93
}
position++
}
l94:
{
position96, tokenIndex96 := position, tokenIndex
if buffer[position] != rune('e') {
goto l97
}
position++
goto l96
l97:
position, tokenIndex = position96, tokenIndex96
if buffer[position] != rune('E') {
goto l93
}
position++
}
l96:
{
position98, tokenIndex98 := position, tokenIndex
if buffer[position] != rune('r') {
goto l99
}
position++
goto l98
l99:
position, tokenIndex = position98, tokenIndex98
if buffer[position] != rune('R') {
goto l93
}
position++
}
l98:
{
position100, tokenIndex100 := position, tokenIndex
if buffer[position] != rune('c') {
goto l101
}
position++
goto l100
l101:
position, tokenIndex = position100, tokenIndex100
if buffer[position] != rune('C') {
goto l93
}
position++
}
l100:
{
position102, tokenIndex102 := position, tokenIndex
if buffer[position] != rune('e') {
goto l103
}
position++
goto l102
l103:
position, tokenIndex = position102, tokenIndex102
if buffer[position] != rune('E') {
goto l93
}
position++
}
l102:
{
position104, tokenIndex104 := position, tokenIndex
if buffer[position] != rune('n') {
goto l105
}
position++
goto l104
l105:
position, tokenIndex = position104, tokenIndex104
if buffer[position] != rune('N') {
goto l93
}
position++
}
l104:
{
position106, tokenIndex106 := position, tokenIndex
if buffer[position] != rune('t') {
goto l107
}
position++
goto l106
l107:
position, tokenIndex = position106, tokenIndex106
if buffer[position] != rune('T') {
goto l93
}
position++
}
l106:
{
position108, tokenIndex108 := position, tokenIndex
if buffer[position] != rune('i') {
goto l109
}
position++
goto l108
l109:
position, tokenIndex = position108, tokenIndex108
if buffer[position] != rune('I') {
goto l93
}
position++
}
l108:
{
position110, tokenIndex110 := position, tokenIndex
if buffer[position] != rune('l') {
goto l111
}
position++
goto l110
l111:
position, tokenIndex = position110, tokenIndex110
if buffer[position] != rune('L') {
goto l93
}
position++
}
l110:
{
position112, tokenIndex112 := position, tokenIndex
if buffer[position] != rune('e') {
goto l113
}
position++
goto l112
l113:
position, tokenIndex = position112, tokenIndex112
if buffer[position] != rune('E') {
goto l93
}
position++
}
l112:
{
add(ruleAction12, position)
}
if !_rules[ruleopen]() {
goto l93
}
if !_rules[ruleposfield]() {
goto l93
}
{
position115, tokenIndex115 := position, tokenIndex
if !_rules[rulecomma]() {
goto l115
}
if !_rules[ruleallargs]() {
goto l115
}
goto l116
l115:
position, tokenIndex = position115, tokenIndex115
}
l116:
if !_rules[ruleclose]() {
goto l93
}
{
add(ruleAction13, position)
}
goto l7
l93:
position, tokenIndex = position7, tokenIndex7
{
position119, tokenIndex119 := position, tokenIndex
if buffer[position] != rune('r') {
goto l120
}
position++
goto l119
l120:
position, tokenIndex = position119, tokenIndex119
if buffer[position] != rune('R') {
goto l118
}
position++
}
l119:
{
position121, tokenIndex121 := position, tokenIndex
if buffer[position] != rune('o') {
goto l122
}
position++
goto l121
l122:
position, tokenIndex = position121, tokenIndex121
if buffer[position] != rune('O') {
goto l118
}
position++
}
l121:
{
position123, tokenIndex123 := position, tokenIndex
if buffer[position] != rune('w') {
goto l124
}
position++
goto l123
l124:
position, tokenIndex = position123, tokenIndex123
if buffer[position] != rune('W') {
goto l118
}
position++
}
l123:
{
position125, tokenIndex125 := position, tokenIndex
if buffer[position] != rune('s') {
goto l126
}
position++
goto l125
l126:
position, tokenIndex = position125, tokenIndex125
if buffer[position] != rune('S') {
goto l118
}
position++
}
l125:
{
add(ruleAction14, position)
}
if !_rules[ruleopen]() {
goto l118
}
if !_rules[ruleposfield]() {
goto l118
}
{
position128, tokenIndex128 := position, tokenIndex
if !_rules[rulecomma]() {
goto l128
}
if !_rules[ruleallargs]() {
goto l128
}
goto l129
l128:
position, tokenIndex = position128, tokenIndex128
}
l129:
if !_rules[ruleclose]() {
goto l118
}
{
add(ruleAction15, position)
}
goto l7
l118:
position, tokenIndex = position7, tokenIndex7
{
position132, tokenIndex132 := position, tokenIndex
if buffer[position] != rune('m') {
goto l133
}
position++
goto l132
l133:
position, tokenIndex = position132, tokenIndex132
if buffer[position] != rune('M') {
goto l131
}
position++
}
l132:
{
position134, tokenIndex134 := position, tokenIndex
if buffer[position] != rune('i') {
goto l135
}
position++
goto l134
l135:
position, tokenIndex = position134, tokenIndex134
if buffer[position] != rune('I') {
goto l131
}
position++
}
l134:
{
position136, tokenIndex136 := position, tokenIndex
if buffer[position] != rune('n') {
goto l137
}
position++
goto l136
l137:
position, tokenIndex = position136, tokenIndex136
if buffer[position] != rune('N') {
goto l131
}
position++
}
l136:
{
add(ruleAction16, position)
}
if !_rules[ruleopen]() {
goto l131
}
if !_rules[ruleposfield]() {
goto l131
}
{
position139, tokenIndex139 := position, tokenIndex
if !_rules[rulecomma]() {
goto l139
}
if !_rules[ruleallargs]() {
goto l139
}
goto l140
l139:
position, tokenIndex = position139, tokenIndex139
}
l140:
if !_rules[ruleclose]() {
goto l131
}
{
add(ruleAction17, position)
}
goto l7
l131:
position, tokenIndex = position7, tokenIndex7
{
position143, tokenIndex143 := position, tokenIndex
if buffer[position] != rune('m') {
goto l144
}
position++
goto l143
l144:
position, tokenIndex = position143, tokenIndex143
if buffer[position] != rune('M') {
goto l142
}
position++
}
l143:
{
position145, tokenIndex145 := position, tokenIndex
if buffer[position] != rune('a') {
goto l146
}
position++
goto l145
l146:
position, tokenIndex = position145, tokenIndex145
if buffer[position] != rune('A') {
goto l142
}
position++
}
l145:
{
position147, tokenIndex147 := position, tokenIndex
if buffer[position] != rune('x') {
goto l148
}
position++
goto l147
l148:
position, tokenIndex = position147, tokenIndex147
if buffer[position] != rune('X') {
goto l142
}
position++
}
l147:
{
add(ruleAction18, position)
}
if !_rules[ruleopen]() {
goto l142
}
if !_rules[ruleposfield]() {
goto l142
}
{
position150, tokenIndex150 := position, tokenIndex
if !_rules[rulecomma]() {
goto l150
}
if !_rules[ruleallargs]() {
goto l150
}
goto l151
l150:
position, tokenIndex = position150, tokenIndex150
}
l151:
if !_rules[ruleclose]() {
goto l142
}
{
add(ruleAction19, position)
}
goto l7
l142:
position, tokenIndex = position7, tokenIndex7
{
position154, tokenIndex154 := position, tokenIndex
if buffer[position] != rune('s') {
goto l155
}
position++
goto l154
l155:
position, tokenIndex = position154, tokenIndex154
if buffer[position] != rune('S') {
goto l153
}
position++
}
l154:
{
position156, tokenIndex156 := position, tokenIndex
if buffer[position] != rune('u') {
goto l157
}
position++
goto l156
l157:
position, tokenIndex = position156, tokenIndex156
if buffer[position] != rune('U') {
goto l153
}
position++
}
l156:
{
position158, tokenIndex158 := position, tokenIndex
if buffer[position] != rune('m') {
goto l159
}
position++
goto l158
l159:
position, tokenIndex = position158, tokenIndex158
if buffer[position] != rune('M') {
goto l153
}
position++
}
l158:
{
add(ruleAction20, position)
}
if !_rules[ruleopen]() {
goto l153
}
if !_rules[ruleposfield]() {
goto l153
}
{
position161, tokenIndex161 := position, tokenIndex
if !_rules[rulecomma]() {
goto l161
}
if !_rules[ruleallargs]() {
goto l161
}
goto l162
l161:
position, tokenIndex = position161, tokenIndex161
}
l162:
if !_rules[ruleclose]() {
goto l153
}
{
add(ruleAction21, position)
}
goto l7
l153:
position, tokenIndex = position7, tokenIndex7
{
position165, tokenIndex165 := position, tokenIndex
if buffer[position] != rune('r') {
goto l166
}
position++
goto l165
l166:
position, tokenIndex = position165, tokenIndex165
if buffer[position] != rune('R') {
goto l164
}
position++
}
l165:
{
position167, tokenIndex167 := position, tokenIndex
if buffer[position] != rune('a') {
goto l168
}
position++
goto l167
l168:
position, tokenIndex = position167, tokenIndex167
if buffer[position] != rune('A') {
goto l164
}
position++
}
l167:
{
position169, tokenIndex169 := position, tokenIndex
if buffer[position] != rune('n') {
goto l170
}
position++
goto l169
l170:
position, tokenIndex = position169, tokenIndex169
if buffer[position] != rune('N') {
goto l164
}
position++
}
l169:
{
position171, tokenIndex171 := position, tokenIndex
if buffer[position] != rune('g') {
goto l172
}
position++
goto l171
l172:
position, tokenIndex = position171, tokenIndex171
if buffer[position] != rune('G') {
goto l164
}
position++
}
l171:
{
position173, tokenIndex173 := position, tokenIndex
if buffer[position] != rune('e') {
goto l174
}
position++
goto l173
l174:
position, tokenIndex = position173, tokenIndex173
if buffer[position] != rune('E') {
goto l164
}
position++
}
l173:
{
add(ruleAction22, position)
}
if !_rules[ruleopen]() {
goto l164
}
if !_rules[rulefield]() {
goto l164
}
if !_rules[ruleeq]() {
goto l164
}
if !_rules[rulevalue]() {
goto l164
}
if !_rules[rulecomma]() {
goto l164
}
{
position176, tokenIndex176 := position, tokenIndex
if buffer[position] != rune('f') {
goto l176
}
position++
if buffer[position] != rune('r') {
goto l176
}
position++
if buffer[position] != rune('o') {
goto l176
}
position++
if buffer[position] != rune('m') {
goto l176
}
position++
if buffer[position] != rune('=') {
goto l176
}
position++
goto l177
l176:
position, tokenIndex = position176, tokenIndex176
}
l177:
{
add(ruleAction23, position)
}
if !_rules[ruletimefmt]() {
goto l164
}
{
add(ruleAction24, position)
}
if !_rules[rulecomma]() {
goto l164
}
{
position180, tokenIndex180 := position, tokenIndex
if buffer[position] != rune('t') {
goto l180
}
position++
if buffer[position] != rune('o') {
goto l180
}
position++
if buffer[position] != rune('=') {
goto l180
}
position++
goto l181
l180:
position, tokenIndex = position180, tokenIndex180
}
l181:
if !_rules[rulesp]() {
goto l164
}
{
add(ruleAction25, position)
}
if !_rules[ruletimefmt]() {
goto l164
}
{
add(ruleAction26, position)
}
if !_rules[ruleclose]() {
goto l164
}
{
add(ruleAction27, position)
}
goto l7
l164:
position, tokenIndex = position7, tokenIndex7
{
position185 := position
if !_rules[ruleIDENT]() {
goto l5
}
add(rulePegText, position185)
}
{
add(ruleAction28, position)
}
if !_rules[ruleopen]() {
goto l5
}
if !_rules[ruleallargs]() {
goto l5
}
{
position187, tokenIndex187 := position, tokenIndex
if !_rules[rulecomma]() {
goto l187
}
goto l188
l187:
position, tokenIndex = position187, tokenIndex187
}
l188:
if !_rules[ruleclose]() {
goto l5
}
{
add(ruleAction29, position)
}
}
l7:
add(ruleCall, position6)
}
return true
l5:
position, tokenIndex = position5, tokenIndex5
return false
},
/* 2 allargs <- <((Call (comma Call)* (comma args)?) / args / sp)> */
func() bool {
position190, tokenIndex190 := position, tokenIndex
{
position191 := position
{
position192, tokenIndex192 := position, tokenIndex
if !_rules[ruleCall]() {
goto l193
}
l194:
{
position195, tokenIndex195 := position, tokenIndex
if !_rules[rulecomma]() {
goto l195
}
if !_rules[ruleCall]() {
goto l195
}
goto l194
l195:
position, tokenIndex = position195, tokenIndex195
}
{
position196, tokenIndex196 := position, tokenIndex
if !_rules[rulecomma]() {
goto l196
}
if !_rules[ruleargs]() {
goto l196
}
goto l197
l196:
position, tokenIndex = position196, tokenIndex196
}
l197:
goto l192
l193:
position, tokenIndex = position192, tokenIndex192
if !_rules[ruleargs]() {
goto l198
}
goto l192
l198:
position, tokenIndex = position192, tokenIndex192
if !_rules[rulesp]() {
goto l190
}
}
l192:
add(ruleallargs, position191)
}
return true
l190:
position, tokenIndex = position190, tokenIndex190
return false
},
/* 3 args <- <(arg (comma args)? sp)> */
func() bool {
position199, tokenIndex199 := position, tokenIndex
{
position200 := position
if !_rules[rulearg]() {
goto l199
}
{
position201, tokenIndex201 := position, tokenIndex
if !_rules[rulecomma]() {
goto l201
}
if !_rules[ruleargs]() {
goto l201
}
goto l202
l201:
position, tokenIndex = position201, tokenIndex201
}
l202:
if !_rules[rulesp]() {
goto l199
}
add(ruleargs, position200)
}
return true
l199:
position, tokenIndex = position199, tokenIndex199
return false
},
/* 4 arg <- <((field eq value) / (field sp COND sp value) / conditional)> */
func() bool {
position203, tokenIndex203 := position, tokenIndex
{
position204 := position
{
position205, tokenIndex205 := position, tokenIndex
if !_rules[rulefield]() {
goto l206
}
if !_rules[ruleeq]() {
goto l206
}
if !_rules[rulevalue]() {
goto l206
}
goto l205
l206:
position, tokenIndex = position205, tokenIndex205
if !_rules[rulefield]() {
goto l207
}
if !_rules[rulesp]() {
goto l207
}
{
position208 := position
{
position209, tokenIndex209 := position, tokenIndex
if buffer[position] != rune('>') {
goto l210
}
position++
if buffer[position] != rune('<') {
goto l210
}
position++
{
add(ruleAction30, position)
}
goto l209
l210:
position, tokenIndex = position209, tokenIndex209
if buffer[position] != rune('<') {
goto l212
}
position++
if buffer[position] != rune('=') {
goto l212
}
position++
{
add(ruleAction31, position)
}
goto l209
l212:
position, tokenIndex = position209, tokenIndex209
if buffer[position] != rune('>') {
goto l214
}
position++
if buffer[position] != rune('=') {
goto l214
}
position++
{
add(ruleAction32, position)
}
goto l209
l214:
position, tokenIndex = position209, tokenIndex209
if buffer[position] != rune('=') {
goto l216
}
position++
if buffer[position] != rune('=') {
goto l216
}
position++
{
add(ruleAction33, position)
}
goto l209
l216:
position, tokenIndex = position209, tokenIndex209
if buffer[position] != rune('!') {
goto l218
}
position++
if buffer[position] != rune('=') {
goto l218
}
position++
{
add(ruleAction34, position)
}
goto l209
l218:
position, tokenIndex = position209, tokenIndex209
if buffer[position] != rune('<') {
goto l220
}
position++
{
add(ruleAction35, position)
}
goto l209
l220:
position, tokenIndex = position209, tokenIndex209
if buffer[position] != rune('>') {
goto l207
}
position++
{
add(ruleAction36, position)
}
}
l209:
add(ruleCOND, position208)
}
if !_rules[rulesp]() {
goto l207
}
if !_rules[rulevalue]() {
goto l207
}
goto l205
l207:
position, tokenIndex = position205, tokenIndex205
{
position223 := position
{
add(ruleAction37, position)
}
if !_rules[rulecondint]() {
goto l203
}
if !_rules[rulecondLT]() {
goto l203
}
{
position225 := position
{
position226 := position
if !_rules[rulefieldExpr]() {
goto l203
}
add(rulePegText, position226)
}
if !_rules[rulesp]() {
goto l203
}
{
add(ruleAction41, position)
}
add(rulecondfield, position225)
}
if !_rules[rulecondLT]() {
goto l203
}
if !_rules[rulecondint]() {
goto l203
}
{
add(ruleAction38, position)
}
add(ruleconditional, position223)
}
}
l205:
add(rulearg, position204)
}
return true
l203:
position, tokenIndex = position203, tokenIndex203
return false
},
/* 5 COND <- <(('>' '<' Action30) / ('<' '=' Action31) / ('>' '=' Action32) / ('=' '=' Action33) / ('!' '=' Action34) / ('<' Action35) / ('>' Action36))> */
nil,
/* 6 conditional <- <(Action37 condint condLT condfield condLT condint Action38)> */
nil,
/* 7 condint <- <(<decimal> sp Action39)> */
func() bool {
position231, tokenIndex231 := position, tokenIndex
{
position232 := position
{
position233 := position
if !_rules[ruledecimal]() {
goto l231
}
add(rulePegText, position233)
}
if !_rules[rulesp]() {
goto l231
}
{
add(ruleAction39, position)
}
add(rulecondint, position232)
}
return true
l231:
position, tokenIndex = position231, tokenIndex231
return false
},
/* 8 condLT <- <(<(('<' '=') / '<')> sp Action40)> */
func() bool {
position235, tokenIndex235 := position, tokenIndex
{
position236 := position
{
position237 := position
{
position238, tokenIndex238 := position, tokenIndex
if buffer[position] != rune('<') {
goto l239
}
position++
if buffer[position] != rune('=') {
goto l239
}
position++
goto l238
l239:
position, tokenIndex = position238, tokenIndex238
if buffer[position] != rune('<') {
goto l235
}
position++
}
l238:
add(rulePegText, position237)
}
if !_rules[rulesp]() {
goto l235
}
{
add(ruleAction40, position)
}
add(rulecondLT, position236)
}
return true
l235:
position, tokenIndex = position235, tokenIndex235
return false
},
/* 9 condfield <- <(<fieldExpr> sp Action41)> */
nil,
/* 10 value <- <(item / (lbrack Action42 items rbrack Action43))> */
func() bool {
position242, tokenIndex242 := position, tokenIndex
{
position243 := position
{
position244, tokenIndex244 := position, tokenIndex
if !_rules[ruleitem]() {
goto l245
}
goto l244
l245:
position, tokenIndex = position244, tokenIndex244
{
position246 := position
if buffer[position] != rune('[') {
goto l242
}
position++
if !_rules[rulesp]() {
goto l242
}
add(rulelbrack, position246)
}
{
add(ruleAction42, position)
}
if !_rules[ruleitems]() {
goto l242
}
{
position248 := position
if !_rules[rulesp]() {
goto l242
}
if buffer[position] != rune(']') {
goto l242
}
position++
if !_rules[rulesp]() {
goto l242
}
add(rulerbrack, position248)
}
{
add(ruleAction43, position)
}
}
l244:
add(rulevalue, position243)
}
return true
l242:
position, tokenIndex = position242, tokenIndex242
return false
},
/* 11 items <- <(item (comma items)?)> */
func() bool {
position250, tokenIndex250 := position, tokenIndex
{
position251 := position
if !_rules[ruleitem]() {
goto l250
}
{
position252, tokenIndex252 := position, tokenIndex
if !_rules[rulecomma]() {
goto l252
}
if !_rules[ruleitems]() {
goto l252
}
goto l253
l252:
position, tokenIndex = position252, tokenIndex252
}
l253:
add(ruleitems, position251)
}
return true
l250:
position, tokenIndex = position250, tokenIndex250
return false
},
/* 12 item <- <(('n' 'u' 'l' 'l' &(comma / close) Action44) / ('t' 'r' 'u' 'e' &(comma / close) Action45) / ('f' 'a' 'l' 's' 'e' &(comma / close) Action46) / ('$' <variable> Action47) / (timefmt Action48) / (timestampfmt Action49) / (<decimal> Action50) / (<IDENT> Action51 open allargs comma? close Action52) / (<([a-z] / [A-Z] / [0-9] / '-' / '_' / ':')+> Action53) / (<('"' doublequotedstring '"')> Action54) / (<('\'' singlequotedstring '\'')> Action55))> */
func() bool {
position254, tokenIndex254 := position, tokenIndex
{
position255 := position
{
position256, tokenIndex256 := position, tokenIndex
if buffer[position] != rune('n') {
goto l257
}
position++
if buffer[position] != rune('u') {
goto l257
}
position++
if buffer[position] != rune('l') {
goto l257
}
position++
if buffer[position] != rune('l') {
goto l257
}
position++
{
position258, tokenIndex258 := position, tokenIndex
{
position259, tokenIndex259 := position, tokenIndex
if !_rules[rulecomma]() {
goto l260
}
goto l259
l260:
position, tokenIndex = position259, tokenIndex259
if !_rules[ruleclose]() {
goto l257
}
}
l259:
position, tokenIndex = position258, tokenIndex258
}
{
add(ruleAction44, position)
}
goto l256
l257:
position, tokenIndex = position256, tokenIndex256
if buffer[position] != rune('t') {
goto l262
}
position++
if buffer[position] != rune('r') {
goto l262
}
position++
if buffer[position] != rune('u') {
goto l262
}
position++
if buffer[position] != rune('e') {
goto l262
}
position++
{
position263, tokenIndex263 := position, tokenIndex
{
position264, tokenIndex264 := position, tokenIndex
if !_rules[rulecomma]() {
goto l265
}
goto l264
l265:
position, tokenIndex = position264, tokenIndex264
if !_rules[ruleclose]() {
goto l262
}
}
l264:
position, tokenIndex = position263, tokenIndex263
}
{
add(ruleAction45, position)
}
goto l256
l262:
position, tokenIndex = position256, tokenIndex256
if buffer[position] != rune('f') {
goto l267
}
position++
if buffer[position] != rune('a') {
goto l267
}
position++
if buffer[position] != rune('l') {
goto l267
}
position++
if buffer[position] != rune('s') {
goto l267
}
position++
if buffer[position] != rune('e') {
goto l267
}
position++
{
position268, tokenIndex268 := position, tokenIndex
{
position269, tokenIndex269 := position, tokenIndex
if !_rules[rulecomma]() {
goto l270
}
goto l269
l270:
position, tokenIndex = position269, tokenIndex269
if !_rules[ruleclose]() {
goto l267
}
}
l269:
position, tokenIndex = position268, tokenIndex268
}
{
add(ruleAction46, position)
}
goto l256
l267:
position, tokenIndex = position256, tokenIndex256
if buffer[position] != rune('$') {
goto l272
}
position++
{
position273 := position
{
position274 := position
{
position275, tokenIndex275 := position, tokenIndex
if c := buffer[position]; c < rune('a') || c > rune('z') {
goto l276
}
position++
goto l275
l276:
position, tokenIndex = position275, tokenIndex275
if c := buffer[position]; c < rune('A') || c > rune('Z') {
goto l277
}
position++
goto l275
l277:
position, tokenIndex = position275, tokenIndex275
if buffer[position] != rune('_') {
goto l272
}
position++
}
l275:
l278:
{
position279, tokenIndex279 := position, tokenIndex
{
position280, tokenIndex280 := position, tokenIndex
if c := buffer[position]; c < rune('a') || c > rune('z') {
goto l281
}
position++
goto l280
l281:
position, tokenIndex = position280, tokenIndex280
if c := buffer[position]; c < rune('A') || c > rune('Z') {
goto l282
}
position++
goto l280
l282:
position, tokenIndex = position280, tokenIndex280
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l283
}
position++
goto l280
l283:
position, tokenIndex = position280, tokenIndex280
if buffer[position] != rune('_') {
goto l284
}
position++
goto l280
l284:
position, tokenIndex = position280, tokenIndex280
if buffer[position] != rune('-') {
goto l279
}
position++
}
l280:
goto l278
l279:
position, tokenIndex = position279, tokenIndex279
}
add(rulevariable, position274)
}
add(rulePegText, position273)
}
{
add(ruleAction47, position)
}
goto l256
l272:
position, tokenIndex = position256, tokenIndex256
if !_rules[ruletimefmt]() {
goto l286
}
{
add(ruleAction48, position)
}
goto l256
l286:
position, tokenIndex = position256, tokenIndex256
{
position289 := position
{
position290, tokenIndex290 := position, tokenIndex
if buffer[position] != rune('"') {
goto l291
}
position++
{
position292 := position
if !_rules[ruletimestampbasicfmt]() {
goto l291
}
add(rulePegText, position292)
}
if buffer[position] != rune('"') {
goto l291
}
position++
goto l290
l291:
position, tokenIndex = position290, tokenIndex290
if buffer[position] != rune('\'') {
goto l293
}
position++
{
position294 := position
if !_rules[ruletimestampbasicfmt]() {
goto l293
}
add(rulePegText, position294)
}
if buffer[position] != rune('\'') {
goto l293
}
position++
goto l290
l293:
position, tokenIndex = position290, tokenIndex290
{
position295 := position
if !_rules[ruletimestampbasicfmt]() {
goto l288
}
add(rulePegText, position295)
}
}
l290:
add(ruletimestampfmt, position289)
}
{
add(ruleAction49, position)
}
goto l256
l288:
position, tokenIndex = position256, tokenIndex256
{
position298 := position
if !_rules[ruledecimal]() {
goto l297
}
add(rulePegText, position298)
}
{
add(ruleAction50, position)
}
goto l256
l297:
position, tokenIndex = position256, tokenIndex256
{
position301 := position
if !_rules[ruleIDENT]() {
goto l300
}
add(rulePegText, position301)
}
{
add(ruleAction51, position)
}
if !_rules[ruleopen]() {
goto l300
}
if !_rules[ruleallargs]() {
goto l300
}
{
position303, tokenIndex303 := position, tokenIndex
if !_rules[rulecomma]() {
goto l303
}
goto l304
l303:
position, tokenIndex = position303, tokenIndex303
}
l304:
if !_rules[ruleclose]() {
goto l300
}
{
add(ruleAction52, position)
}
goto l256
l300:
position, tokenIndex = position256, tokenIndex256
{
position307 := position
{
position310, tokenIndex310 := position, tokenIndex
if c := buffer[position]; c < rune('a') || c > rune('z') {
goto l311
}
position++
goto l310
l311:
position, tokenIndex = position310, tokenIndex310
if c := buffer[position]; c < rune('A') || c > rune('Z') {
goto l312
}
position++
goto l310
l312:
position, tokenIndex = position310, tokenIndex310
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l313
}
position++
goto l310
l313:
position, tokenIndex = position310, tokenIndex310
if buffer[position] != rune('-') {
goto l314
}
position++
goto l310
l314:
position, tokenIndex = position310, tokenIndex310
if buffer[position] != rune('_') {
goto l315
}
position++
goto l310
l315:
position, tokenIndex = position310, tokenIndex310
if buffer[position] != rune(':') {
goto l306
}
position++
}
l310:
l308:
{
position309, tokenIndex309 := position, tokenIndex
{
position316, tokenIndex316 := position, tokenIndex
if c := buffer[position]; c < rune('a') || c > rune('z') {
goto l317
}
position++
goto l316
l317:
position, tokenIndex = position316, tokenIndex316
if c := buffer[position]; c < rune('A') || c > rune('Z') {
goto l318
}
position++
goto l316
l318:
position, tokenIndex = position316, tokenIndex316
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l319
}
position++
goto l316
l319:
position, tokenIndex = position316, tokenIndex316
if buffer[position] != rune('-') {
goto l320
}
position++
goto l316
l320:
position, tokenIndex = position316, tokenIndex316
if buffer[position] != rune('_') {
goto l321
}
position++
goto l316
l321:
position, tokenIndex = position316, tokenIndex316
if buffer[position] != rune(':') {
goto l309
}
position++
}
l316:
goto l308
l309:
position, tokenIndex = position309, tokenIndex309
}
add(rulePegText, position307)
}
{
add(ruleAction53, position)
}
goto l256
l306:
position, tokenIndex = position256, tokenIndex256
{
position324 := position
if buffer[position] != rune('"') {
goto l323
}
position++
if !_rules[ruledoublequotedstring]() {
goto l323
}
if buffer[position] != rune('"') {
goto l323
}
position++
add(rulePegText, position324)
}
{
add(ruleAction54, position)
}
goto l256
l323:
position, tokenIndex = position256, tokenIndex256
{
position326 := position
if buffer[position] != rune('\'') {
goto l254
}
position++
if !_rules[rulesinglequotedstring]() {
goto l254
}
if buffer[position] != rune('\'') {
goto l254
}
position++
add(rulePegText, position326)
}
{
add(ruleAction55, position)
}
}
l256:
add(ruleitem, position255)
}
return true
l254:
position, tokenIndex = position254, tokenIndex254
return false
},
/* 13 doublequotedstring <- <(('\\' '"') / ('\\' '\\') / ('\\' 'n') / ('\\' 't') / (!('"' / '\\') .))*> */
func() bool {
{
position329 := position
l330:
{
position331, tokenIndex331 := position, tokenIndex
{
position332, tokenIndex332 := position, tokenIndex
if buffer[position] != rune('\\') {
goto l333
}
position++
if buffer[position] != rune('"') {
goto l333
}
position++
goto l332
l333:
position, tokenIndex = position332, tokenIndex332
if buffer[position] != rune('\\') {
goto l334
}
position++
if buffer[position] != rune('\\') {
goto l334
}
position++
goto l332
l334:
position, tokenIndex = position332, tokenIndex332
if buffer[position] != rune('\\') {
goto l335
}
position++
if buffer[position] != rune('n') {
goto l335
}
position++
goto l332
l335:
position, tokenIndex = position332, tokenIndex332
if buffer[position] != rune('\\') {
goto l336
}
position++
if buffer[position] != rune('t') {
goto l336
}
position++
goto l332
l336:
position, tokenIndex = position332, tokenIndex332
{
position337, tokenIndex337 := position, tokenIndex
{
position338, tokenIndex338 := position, tokenIndex
if buffer[position] != rune('"') {
goto l339
}
position++
goto l338
l339:
position, tokenIndex = position338, tokenIndex338
if buffer[position] != rune('\\') {
goto l337
}
position++
}
l338:
goto l331
l337:
position, tokenIndex = position337, tokenIndex337
}
if !matchDot() {
goto l331
}
}
l332:
goto l330
l331:
position, tokenIndex = position331, tokenIndex331
}
add(ruledoublequotedstring, position329)
}
return true
},
/* 14 singlequotedstring <- <(('\\' '\'') / ('\\' '\\') / ('\\' 'n') / ('\\' 't') / (!('\'' / '\\') .))*> */
func() bool {
{
position341 := position
l342:
{
position343, tokenIndex343 := position, tokenIndex
{
position344, tokenIndex344 := position, tokenIndex
if buffer[position] != rune('\\') {
goto l345
}
position++
if buffer[position] != rune('\'') {
goto l345
}
position++
goto l344
l345:
position, tokenIndex = position344, tokenIndex344
if buffer[position] != rune('\\') {
goto l346
}
position++
if buffer[position] != rune('\\') {
goto l346
}
position++
goto l344
l346:
position, tokenIndex = position344, tokenIndex344
if buffer[position] != rune('\\') {
goto l347
}
position++
if buffer[position] != rune('n') {
goto l347
}
position++
goto l344
l347:
position, tokenIndex = position344, tokenIndex344
if buffer[position] != rune('\\') {
goto l348
}
position++
if buffer[position] != rune('t') {
goto l348
}
position++
goto l344
l348:
position, tokenIndex = position344, tokenIndex344
{
position349, tokenIndex349 := position, tokenIndex
{
position350, tokenIndex350 := position, tokenIndex
if buffer[position] != rune('\'') {
goto l351
}
position++
goto l350
l351:
position, tokenIndex = position350, tokenIndex350
if buffer[position] != rune('\\') {
goto l349
}
position++
}
l350:
goto l343
l349:
position, tokenIndex = position349, tokenIndex349
}
if !matchDot() {
goto l343
}
}
l344:
goto l342
l343:
position, tokenIndex = position343, tokenIndex343
}
add(rulesinglequotedstring, position341)
}
return true
},
/* 15 variable <- <(([a-z] / [A-Z] / '_') ([a-z] / [A-Z] / [0-9] / '_' / '-')*)> */
nil,
/* 16 fieldExpr <- <(([a-z] / [A-Z] / '_' / '$') ([a-z] / [A-Z] / [0-9] / '_' / '-')*)> */
func() bool {
position353, tokenIndex353 := position, tokenIndex
{
position354 := position
{
position355, tokenIndex355 := position, tokenIndex
if c := buffer[position]; c < rune('a') || c > rune('z') {
goto l356
}
position++
goto l355
l356:
position, tokenIndex = position355, tokenIndex355
if c := buffer[position]; c < rune('A') || c > rune('Z') {
goto l357
}
position++
goto l355
l357:
position, tokenIndex = position355, tokenIndex355
if buffer[position] != rune('_') {
goto l358
}
position++
goto l355
l358:
position, tokenIndex = position355, tokenIndex355
if buffer[position] != rune('$') {
goto l353
}
position++
}
l355:
l359:
{
position360, tokenIndex360 := position, tokenIndex
{
position361, tokenIndex361 := position, tokenIndex
if c := buffer[position]; c < rune('a') || c > rune('z') {
goto l362
}
position++
goto l361
l362:
position, tokenIndex = position361, tokenIndex361
if c := buffer[position]; c < rune('A') || c > rune('Z') {
goto l363
}
position++
goto l361
l363:
position, tokenIndex = position361, tokenIndex361
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l364
}
position++
goto l361
l364:
position, tokenIndex = position361, tokenIndex361
if buffer[position] != rune('_') {
goto l365
}
position++
goto l361
l365:
position, tokenIndex = position361, tokenIndex361
if buffer[position] != rune('-') {
goto l360
}
position++
}
l361:
goto l359
l360:
position, tokenIndex = position360, tokenIndex360
}
add(rulefieldExpr, position354)
}
return true
l353:
position, tokenIndex = position353, tokenIndex353
return false
},
/* 17 field <- <(<(fieldExpr / reserved)> Action56)> */
func() bool {
position366, tokenIndex366 := position, tokenIndex
{
position367 := position
{
position368 := position
{
position369, tokenIndex369 := position, tokenIndex
if !_rules[rulefieldExpr]() {
goto l370
}
goto l369
l370:
position, tokenIndex = position369, tokenIndex369
{
position371 := position
{
position372, tokenIndex372 := position, tokenIndex
if buffer[position] != rune('_') {
goto l373
}
position++
if buffer[position] != rune('r') {
goto l373
}
position++
if buffer[position] != rune('o') {
goto l373
}
position++
if buffer[position] != rune('w') {
goto l373
}
position++
goto l372
l373:
position, tokenIndex = position372, tokenIndex372
if buffer[position] != rune('_') {
goto l374
}
position++
if buffer[position] != rune('c') {
goto l374
}
position++
if buffer[position] != rune('o') {
goto l374
}
position++
if buffer[position] != rune('l') {
goto l374
}
position++
goto l372
l374:
position, tokenIndex = position372, tokenIndex372
if buffer[position] != rune('_') {
goto l375
}
position++
if buffer[position] != rune('s') {
goto l375
}
position++
if buffer[position] != rune('t') {
goto l375
}
position++
if buffer[position] != rune('a') {
goto l375
}
position++
if buffer[position] != rune('r') {
goto l375
}
position++
if buffer[position] != rune('t') {
goto l375
}
position++
goto l372
l375:
position, tokenIndex = position372, tokenIndex372
if buffer[position] != rune('_') {
goto l376
}
position++
if buffer[position] != rune('e') {
goto l376
}
position++
if buffer[position] != rune('n') {
goto l376
}
position++
if buffer[position] != rune('d') {
goto l376
}
position++
goto l372
l376:
position, tokenIndex = position372, tokenIndex372
if buffer[position] != rune('_') {
goto l377
}
position++
if buffer[position] != rune('t') {
goto l377
}
position++
if buffer[position] != rune('i') {
goto l377
}
position++
if buffer[position] != rune('m') {
goto l377
}
position++
if buffer[position] != rune('e') {
goto l377
}
position++
if buffer[position] != rune('s') {
goto l377
}
position++
if buffer[position] != rune('t') {
goto l377
}
position++
if buffer[position] != rune('a') {
goto l377
}
position++
if buffer[position] != rune('m') {
goto l377
}
position++
if buffer[position] != rune('p') {
goto l377
}
position++
goto l372
l377:
position, tokenIndex = position372, tokenIndex372
if buffer[position] != rune('_') {
goto l366
}
position++
if buffer[position] != rune('f') {
goto l366
}
position++
if buffer[position] != rune('i') {
goto l366
}
position++
if buffer[position] != rune('e') {
goto l366
}
position++
if buffer[position] != rune('l') {
goto l366
}
position++
if buffer[position] != rune('d') {
goto l366
}
position++
}
l372:
add(rulereserved, position371)
}
}
l369:
add(rulePegText, position368)
}
{
add(ruleAction56, position)
}
add(rulefield, position367)
}
return true
l366:
position, tokenIndex = position366, tokenIndex366
return false
},
/* 18 reserved <- <(('_' 'r' 'o' 'w') / ('_' 'c' 'o' 'l') / ('_' 's' 't' 'a' 'r' 't') / ('_' 'e' 'n' 'd') / ('_' 't' 'i' 'm' 'e' 's' 't' 'a' 'm' 'p') / ('_' 'f' 'i' 'e' 'l' 'd'))> */
nil,
/* 19 posfield <- <(('f' 'i' 'e' 'l' 'd' '=')? <fieldExpr> Action57)> */
func() bool {
position380, tokenIndex380 := position, tokenIndex
{
position381 := position
{
position382, tokenIndex382 := position, tokenIndex
if buffer[position] != rune('f') {
goto l382
}
position++
if buffer[position] != rune('i') {
goto l382
}
position++
if buffer[position] != rune('e') {
goto l382
}
position++
if buffer[position] != rune('l') {
goto l382
}
position++
if buffer[position] != rune('d') {
goto l382
}
position++
if buffer[position] != rune('=') {
goto l382
}
position++
goto l383
l382:
position, tokenIndex = position382, tokenIndex382
}
l383:
{
position384 := position
if !_rules[rulefieldExpr]() {
goto l380
}
add(rulePegText, position384)
}
{
add(ruleAction57, position)
}
add(ruleposfield, position381)
}
return true
l380:
position, tokenIndex = position380, tokenIndex380
return false
},
/* 20 col <- <((<digits> Action58) / (<('\'' singlequotedstring '\'')> Action59) / (<('"' doublequotedstring '"')> Action60))> */
func() bool {
position386, tokenIndex386 := position, tokenIndex
{
position387 := position
{
position388, tokenIndex388 := position, tokenIndex
{
position390 := position
if !_rules[ruledigits]() {
goto l389
}
add(rulePegText, position390)
}
{
add(ruleAction58, position)
}
goto l388
l389:
position, tokenIndex = position388, tokenIndex388
{
position393 := position
if buffer[position] != rune('\'') {
goto l392
}
position++
if !_rules[rulesinglequotedstring]() {
goto l392
}
if buffer[position] != rune('\'') {
goto l392
}
position++
add(rulePegText, position393)
}
{
add(ruleAction59, position)
}
goto l388
l392:
position, tokenIndex = position388, tokenIndex388
{
position395 := position
if buffer[position] != rune('"') {
goto l386
}
position++
if !_rules[ruledoublequotedstring]() {
goto l386
}
if buffer[position] != rune('"') {
goto l386
}
position++
add(rulePegText, position395)
}
{
add(ruleAction60, position)
}
}
l388:
add(rulecol, position387)
}
return true
l386:
position, tokenIndex = position386, tokenIndex386
return false
},
/* 21 open <- <('(' sp)> */
func() bool {
position397, tokenIndex397 := position, tokenIndex
{
position398 := position
if buffer[position] != rune('(') {
goto l397
}
position++
if !_rules[rulesp]() {
goto l397
}
add(ruleopen, position398)
}
return true
l397:
position, tokenIndex = position397, tokenIndex397
return false
},
/* 22 close <- <(sp ')' sp)> */
func() bool {
position399, tokenIndex399 := position, tokenIndex
{
position400 := position
if !_rules[rulesp]() {
goto l399
}
if buffer[position] != rune(')') {
goto l399
}
position++
if !_rules[rulesp]() {
goto l399
}
add(ruleclose, position400)
}
return true
l399:
position, tokenIndex = position399, tokenIndex399
return false
},
/* 23 sp <- <(' ' / '\t' / '\n')*> */
func() bool {
{
position402 := position
l403:
{
position404, tokenIndex404 := position, tokenIndex
{
position405, tokenIndex405 := position, tokenIndex
if buffer[position] != rune(' ') {
goto l406
}
position++
goto l405
l406:
position, tokenIndex = position405, tokenIndex405
if buffer[position] != rune('\t') {
goto l407
}
position++
goto l405
l407:
position, tokenIndex = position405, tokenIndex405
if buffer[position] != rune('\n') {
goto l404
}
position++
}
l405:
goto l403
l404:
position, tokenIndex = position404, tokenIndex404
}
add(rulesp, position402)
}
return true
},
/* 24 eq <- <(sp '=' sp)> */
func() bool {
position408, tokenIndex408 := position, tokenIndex
{
position409 := position
if !_rules[rulesp]() {
goto l408
}
if buffer[position] != rune('=') {
goto l408
}
position++
if !_rules[rulesp]() {
goto l408
}
add(ruleeq, position409)
}
return true
l408:
position, tokenIndex = position408, tokenIndex408
return false
},
/* 25 comma <- <(sp ',' sp)> */
func() bool {
position410, tokenIndex410 := position, tokenIndex
{
position411 := position
if !_rules[rulesp]() {
goto l410
}
if buffer[position] != rune(',') {
goto l410
}
position++
if !_rules[rulesp]() {
goto l410
}
add(rulecomma, position411)
}
return true
l410:
position, tokenIndex = position410, tokenIndex410
return false
},
/* 26 lbrack <- <('[' sp)> */
nil,
/* 27 rbrack <- <(sp ']' sp)> */
nil,
/* 28 IDENT <- <(([a-z] / [A-Z]) ([a-z] / [A-Z] / [0-9])*)> */
func() bool {
position414, tokenIndex414 := position, tokenIndex
{
position415 := position
{
position416, tokenIndex416 := position, tokenIndex
if c := buffer[position]; c < rune('a') || c > rune('z') {
goto l417
}
position++
goto l416
l417:
position, tokenIndex = position416, tokenIndex416
if c := buffer[position]; c < rune('A') || c > rune('Z') {
goto l414
}
position++
}
l416:
l418:
{
position419, tokenIndex419 := position, tokenIndex
{
position420, tokenIndex420 := position, tokenIndex
if c := buffer[position]; c < rune('a') || c > rune('z') {
goto l421
}
position++
goto l420
l421:
position, tokenIndex = position420, tokenIndex420
if c := buffer[position]; c < rune('A') || c > rune('Z') {
goto l422
}
position++
goto l420
l422:
position, tokenIndex = position420, tokenIndex420
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l419
}
position++
}
l420:
goto l418
l419:
position, tokenIndex = position419, tokenIndex419
}
add(ruleIDENT, position415)
}
return true
l414:
position, tokenIndex = position414, tokenIndex414
return false
},
/* 29 digits <- <[0-9]+> */
func() bool {
position423, tokenIndex423 := position, tokenIndex
{
position424 := position
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l423
}
position++
l425:
{
position426, tokenIndex426 := position, tokenIndex
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l426
}
position++
goto l425
l426:
position, tokenIndex = position426, tokenIndex426
}
add(ruledigits, position424)
}
return true
l423:
position, tokenIndex = position423, tokenIndex423
return false
},
/* 30 signedDigits <- <('-'? digits)> */
nil,
/* 31 decimal <- <((signedDigits ('.' digits?)?) / ('-'? '.' digits))> */
func() bool {
position428, tokenIndex428 := position, tokenIndex
{
position429 := position
{
position430, tokenIndex430 := position, tokenIndex
{
position432 := position
{
position433, tokenIndex433 := position, tokenIndex
if buffer[position] != rune('-') {
goto l433
}
position++
goto l434
l433:
position, tokenIndex = position433, tokenIndex433
}
l434:
if !_rules[ruledigits]() {
goto l431
}
add(rulesignedDigits, position432)
}
{
position435, tokenIndex435 := position, tokenIndex
if buffer[position] != rune('.') {
goto l435
}
position++
{
position437, tokenIndex437 := position, tokenIndex
if !_rules[ruledigits]() {
goto l437
}
goto l438
l437:
position, tokenIndex = position437, tokenIndex437
}
l438:
goto l436
l435:
position, tokenIndex = position435, tokenIndex435
}
l436:
goto l430
l431:
position, tokenIndex = position430, tokenIndex430
{
position439, tokenIndex439 := position, tokenIndex
if buffer[position] != rune('-') {
goto l439
}
position++
goto l440
l439:
position, tokenIndex = position439, tokenIndex439
}
l440:
if buffer[position] != rune('.') {
goto l428
}
position++
if !_rules[ruledigits]() {
goto l428
}
}
l430:
add(ruledecimal, position429)
}
return true
l428:
position, tokenIndex = position428, tokenIndex428
return false
},
/* 32 tz <- <('Z' / ('-' [0-9] [0-9] ':' [0-9] [0-9]) / ('+' [0-9] [0-9] ':' [0-9] [0-9]))> */
func() bool {
position441, tokenIndex441 := position, tokenIndex
{
position442 := position
{
position443, tokenIndex443 := position, tokenIndex
if buffer[position] != rune('Z') {
goto l444
}
position++
goto l443
l444:
position, tokenIndex = position443, tokenIndex443
if buffer[position] != rune('-') {
goto l445
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l445
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l445
}
position++
if buffer[position] != rune(':') {
goto l445
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l445
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l445
}
position++
goto l443
l445:
position, tokenIndex = position443, tokenIndex443
if buffer[position] != rune('+') {
goto l441
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l441
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l441
}
position++
if buffer[position] != rune(':') {
goto l441
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l441
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l441
}
position++
}
l443:
add(ruletz, position442)
}
return true
l441:
position, tokenIndex = position441, tokenIndex441
return false
},
/* 33 iso8601 <- <([0-9] [0-9] [0-9] [0-9] '-' ('0' / '1') [0-9] '-' [0-3] [0-9] 'T' [0-9] [0-9] ':' [0-9] [0-9] ':' [0-9] [0-9] <tz>)> */
nil,
/* 34 iso8601nano <- <([0-9] [0-9] [0-9] [0-9] '-' ('0' / '1') [0-9] '-' [0-3] [0-9] 'T' [0-9] [0-9] ':' [0-9] [0-9] ':' [0-9] [0-9] '.' [0-9]+ <tz>)> */
nil,
/* 35 timestampbasicfmt <- <(iso8601nano / iso8601)> */
func() bool {
position448, tokenIndex448 := position, tokenIndex
{
position449 := position
{
position450, tokenIndex450 := position, tokenIndex
{
position452 := position
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l451
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l451
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l451
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l451
}
position++
if buffer[position] != rune('-') {
goto l451
}
position++
{
position453, tokenIndex453 := position, tokenIndex
if buffer[position] != rune('0') {
goto l454
}
position++
goto l453
l454:
position, tokenIndex = position453, tokenIndex453
if buffer[position] != rune('1') {
goto l451
}
position++
}
l453:
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l451
}
position++
if buffer[position] != rune('-') {
goto l451
}
position++
if c := buffer[position]; c < rune('0') || c > rune('3') {
goto l451
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l451
}
position++
if buffer[position] != rune('T') {
goto l451
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l451
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l451
}
position++
if buffer[position] != rune(':') {
goto l451
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l451
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l451
}
position++
if buffer[position] != rune(':') {
goto l451
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l451
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l451
}
position++
if buffer[position] != rune('.') {
goto l451
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l451
}
position++
l455:
{
position456, tokenIndex456 := position, tokenIndex
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l456
}
position++
goto l455
l456:
position, tokenIndex = position456, tokenIndex456
}
{
position457 := position
if !_rules[ruletz]() {
goto l451
}
add(rulePegText, position457)
}
add(ruleiso8601nano, position452)
}
goto l450
l451:
position, tokenIndex = position450, tokenIndex450
{
position458 := position
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l448
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l448
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l448
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l448
}
position++
if buffer[position] != rune('-') {
goto l448
}
position++
{
position459, tokenIndex459 := position, tokenIndex
if buffer[position] != rune('0') {
goto l460
}
position++
goto l459
l460:
position, tokenIndex = position459, tokenIndex459
if buffer[position] != rune('1') {
goto l448
}
position++
}
l459:
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l448
}
position++
if buffer[position] != rune('-') {
goto l448
}
position++
if c := buffer[position]; c < rune('0') || c > rune('3') {
goto l448
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l448
}
position++
if buffer[position] != rune('T') {
goto l448
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l448
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l448
}
position++
if buffer[position] != rune(':') {
goto l448
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l448
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l448
}
position++
if buffer[position] != rune(':') {
goto l448
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l448
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l448
}
position++
{
position461 := position
if !_rules[ruletz]() {
goto l448
}
add(rulePegText, position461)
}
add(ruleiso8601, position458)
}
}
l450:
add(ruletimestampbasicfmt, position449)
}
return true
l448:
position, tokenIndex = position448, tokenIndex448
return false
},
/* 36 timestampfmt <- <(('"' <timestampbasicfmt> '"') / ('\'' <timestampbasicfmt> '\'') / <timestampbasicfmt>)> */
nil,
/* 37 timebasicfmt <- <([0-9] [0-9] [0-9] [0-9] '-' ('0' / '1') [0-9] '-' [0-3] [0-9] 'T' [0-9] [0-9] ':' [0-9] [0-9])> */
func() bool {
position463, tokenIndex463 := position, tokenIndex
{
position464 := position
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l463
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l463
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l463
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l463
}
position++
if buffer[position] != rune('-') {
goto l463
}
position++
{
position465, tokenIndex465 := position, tokenIndex
if buffer[position] != rune('0') {
goto l466
}
position++
goto l465
l466:
position, tokenIndex = position465, tokenIndex465
if buffer[position] != rune('1') {
goto l463
}
position++
}
l465:
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l463
}
position++
if buffer[position] != rune('-') {
goto l463
}
position++
if c := buffer[position]; c < rune('0') || c > rune('3') {
goto l463
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l463
}
position++
if buffer[position] != rune('T') {
goto l463
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l463
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l463
}
position++
if buffer[position] != rune(':') {
goto l463
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l463
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l463
}
position++
add(ruletimebasicfmt, position464)
}
return true
l463:
position, tokenIndex = position463, tokenIndex463
return false
},
/* 38 timefmt <- <(('"' <timebasicfmt> '"') / ('\'' <timebasicfmt> '\'') / <timebasicfmt>)> */
func() bool {
position467, tokenIndex467 := position, tokenIndex
{
position468 := position
{
position469, tokenIndex469 := position, tokenIndex
if buffer[position] != rune('"') {
goto l470
}
position++
{
position471 := position
if !_rules[ruletimebasicfmt]() {
goto l470
}
add(rulePegText, position471)
}
if buffer[position] != rune('"') {
goto l470
}
position++
goto l469
l470:
position, tokenIndex = position469, tokenIndex469
if buffer[position] != rune('\'') {
goto l472
}
position++
{
position473 := position
if !_rules[ruletimebasicfmt]() {
goto l472
}
add(rulePegText, position473)
}
if buffer[position] != rune('\'') {
goto l472
}
position++
goto l469
l472:
position, tokenIndex = position469, tokenIndex469
{
position474 := position
if !_rules[ruletimebasicfmt]() {
goto l467
}
add(rulePegText, position474)
}
}
l469:
add(ruletimefmt, position468)
}
return true
l467:
position, tokenIndex = position467, tokenIndex467
return false
},
/* 39 time <- <(<timefmt> Action61)> */
nil,
/* 41 Action0 <- <{p.startCall("Set")}> */
nil,
/* 42 Action1 <- <{p.endCall()}> */
nil,
/* 43 Action2 <- <{p.startCall("Clear")}> */
nil,
/* 44 Action3 <- <{p.endCall()}> */
nil,
/* 45 Action4 <- <{p.startCall("ClearRow")}> */
nil,
/* 46 Action5 <- <{p.endCall()}> */
nil,
/* 47 Action6 <- <{p.startCall("Store")}> */
nil,
/* 48 Action7 <- <{p.endCall()}> */
nil,
/* 49 Action8 <- <{p.startCall("TopN")}> */
nil,
/* 50 Action9 <- <{p.endCall()}> */
nil,
/* 51 Action10 <- <{p.startCall("TopK")}> */
nil,
/* 52 Action11 <- <{p.endCall()}> */
nil,
/* 53 Action12 <- <{p.startCall("Percentile")}> */
nil,
/* 54 Action13 <- <{p.endCall()}> */
nil,
/* 55 Action14 <- <{p.startCall("Rows")}> */
nil,
/* 56 Action15 <- <{p.endCall()}> */
nil,
/* 57 Action16 <- <{p.startCall("Min")}> */
nil,
/* 58 Action17 <- <{p.endCall()}> */
nil,
/* 59 Action18 <- <{p.startCall("Max")}> */
nil,
/* 60 Action19 <- <{p.endCall()}> */
nil,
/* 61 Action20 <- <{p.startCall("Sum")}> */
nil,
/* 62 Action21 <- <{p.endCall()}> */
nil,
/* 63 Action22 <- <{p.startCall("Range")}> */
nil,
/* 64 Action23 <- <{p.addField("from")}> */
nil,
/* 65 Action24 <- <{p.addVal(text)}> */
nil,
/* 66 Action25 <- <{p.addField("to")}> */
nil,
/* 67 Action26 <- <{p.addVal(text)}> */
nil,
/* 68 Action27 <- <{p.endCall()}> */
nil,
nil,
/* 70 Action28 <- <{ p.startCall(text) }> */
nil,
/* 71 Action29 <- <{ p.endCall() }> */
nil,
/* 72 Action30 <- <{ p.addBTWN() }> */
nil,
/* 73 Action31 <- <{ p.addLTE() }> */
nil,
/* 74 Action32 <- <{ p.addGTE() }> */
nil,
/* 75 Action33 <- <{ p.addEQ() }> */
nil,
/* 76 Action34 <- <{ p.addNEQ() }> */
nil,
/* 77 Action35 <- <{ p.addLT() }> */
nil,
/* 78 Action36 <- <{ p.addGT() }> */
nil,
/* 79 Action37 <- <{p.startConditional()}> */
nil,
/* 80 Action38 <- <{p.endConditional()}> */
nil,
/* 81 Action39 <- <{p.condAdd(text)}> */
nil,
/* 82 Action40 <- <{p.condAdd(text)}> */
nil,
/* 83 Action41 <- <{p.condAdd(text)}> */
nil,
/* 84 Action42 <- <{ p.startList() }> */
nil,
/* 85 Action43 <- <{ p.endList() }> */
nil,
/* 86 Action44 <- <{ p.addVal(nil) }> */
nil,
/* 87 Action45 <- <{ p.addVal(true) }> */
nil,
/* 88 Action46 <- <{ p.addVal(false) }> */
nil,
/* 89 Action47 <- <{ p.addVal(NewVariable(text)) }> */
nil,
/* 90 Action48 <- <{ p.addVal(text) }> */
nil,
/* 91 Action49 <- <{ p.addTimestampVal(text) }> */
nil,
/* 92 Action50 <- <{ p.addNumVal(text) }> */
nil,
/* 93 Action51 <- <{ p.startCall(text) }> */
nil,
/* 94 Action52 <- <{ p.addVal(p.endCall()) }> */
nil,
/* 95 Action53 <- <{ p.addVal(text) }> */
nil,
/* 96 Action54 <- <{ p.addVal(text) }> */
nil,
/* 97 Action55 <- <{ p.addVal(text) }> */
nil,
/* 98 Action56 <- <{ p.addField(text) }> */
nil,
/* 99 Action57 <- <{ p.addPosStr("_field", text) }> */
nil,
/* 100 Action58 <- <{p.addPosNum("_col", text)}> */
nil,
/* 101 Action59 <- <{p.addPosStr("_col", text)}> */
nil,
/* 102 Action60 <- <{p.addPosStr("_col", text)}> */
nil,
/* 103 Action61 <- <{p.addPosStr("_timestamp", text)}> */
nil,
}
p.rules = _rules
return nil
}