featurebase/pql/pql.peg.go
2021-04-06 10:50:10 -06:00

4811 lines
104 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
rulefieldExpr
rulefield
rulereserved
ruleposfield
rulecol
rulerow
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
ruleAction28
ruleAction29
ruleAction30
ruleAction31
rulePegText
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
ruleAction62
ruleAction63
ruleAction64
ruleAction65
ruleAction66
ruleAction67
)
var rul3s = [...]string{
"Unknown",
"Calls",
"Call",
"allargs",
"args",
"arg",
"COND",
"conditional",
"condint",
"condLT",
"condfield",
"value",
"items",
"item",
"doublequotedstring",
"singlequotedstring",
"fieldExpr",
"field",
"reserved",
"posfield",
"col",
"row",
"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",
"Action28",
"Action29",
"Action30",
"Action31",
"PegText",
"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",
"Action62",
"Action63",
"Action64",
"Action65",
"Action66",
"Action67",
}
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 [110]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("SetRowAttrs")
case ruleAction3:
p.endCall()
case ruleAction4:
p.startCall("SetColumnAttrs")
case ruleAction5:
p.endCall()
case ruleAction6:
p.startCall("Clear")
case ruleAction7:
p.endCall()
case ruleAction8:
p.startCall("ClearRow")
case ruleAction9:
p.endCall()
case ruleAction10:
p.startCall("Store")
case ruleAction11:
p.endCall()
case ruleAction12:
p.startCall("TopN")
case ruleAction13:
p.endCall()
case ruleAction14:
p.startCall("TopK")
case ruleAction15:
p.endCall()
case ruleAction16:
p.startCall("Percentile")
case ruleAction17:
p.endCall()
case ruleAction18:
p.startCall("Rows")
case ruleAction19:
p.endCall()
case ruleAction20:
p.startCall("Min")
case ruleAction21:
p.endCall()
case ruleAction22:
p.startCall("Max")
case ruleAction23:
p.endCall()
case ruleAction24:
p.startCall("Sum")
case ruleAction25:
p.endCall()
case ruleAction26:
p.startCall("Range")
case ruleAction27:
p.addField("from")
case ruleAction28:
p.addVal(text)
case ruleAction29:
p.addField("to")
case ruleAction30:
p.addVal(text)
case ruleAction31:
p.endCall()
case ruleAction32:
p.startCall(text)
case ruleAction33:
p.endCall()
case ruleAction34:
p.addBTWN()
case ruleAction35:
p.addLTE()
case ruleAction36:
p.addGTE()
case ruleAction37:
p.addEQ()
case ruleAction38:
p.addNEQ()
case ruleAction39:
p.addLT()
case ruleAction40:
p.addGT()
case ruleAction41:
p.startConditional()
case ruleAction42:
p.endConditional()
case ruleAction43:
p.condAdd(text)
case ruleAction44:
p.condAdd(text)
case ruleAction45:
p.condAdd(text)
case ruleAction46:
p.startList()
case ruleAction47:
p.endList()
case ruleAction48:
p.addVal(nil)
case ruleAction49:
p.addVal(true)
case ruleAction50:
p.addVal(false)
case ruleAction51:
p.addVal(text)
case ruleAction52:
p.addTimestampVal(text)
case ruleAction53:
p.addNumVal(text)
case ruleAction54:
p.startCall(text)
case ruleAction55:
p.addVal(p.endCall())
case ruleAction56:
p.addVal(text)
case ruleAction57:
p.addVal(text)
case ruleAction58:
p.addVal(text)
case ruleAction59:
p.addField(text)
case ruleAction60:
p.addPosStr("_field", text)
case ruleAction61:
p.addPosNum("_col", text)
case ruleAction62:
p.addPosStr("_col", text)
case ruleAction63:
p.addPosStr("_col", text)
case ruleAction64:
p.addPosNum("_row", text)
case ruleAction65:
p.addPosStr("_row", text)
case ruleAction66:
p.addPosStr("_row", text)
case ruleAction67:
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) / (('s' / 'S') ('e' / 'E') ('t' / 'T') ('r' / 'R') ('o' / 'O') ('w' / 'W') ('a' / 'A') ('t' / 'T') ('t' / 'T') ('r' / 'R') ('s' / 'S') Action2 open posfield comma row comma args close Action3) / (('s' / 'S') ('e' / 'E') ('t' / 'T') ('c' / 'C') ('o' / 'O') ('l' / 'L') ('u' / 'U') ('m' / 'M') ('n' / 'N') ('a' / 'A') ('t' / 'T') ('t' / 'T') ('r' / 'R') ('s' / 'S') Action4 open col comma args close Action5) / (('c' / 'C') ('l' / 'L') ('e' / 'E') ('a' / 'A') ('r' / 'R') Action6 open col comma args close Action7) / (('c' / 'C') ('l' / 'L') ('e' / 'E') ('a' / 'A') ('r' / 'R') ('r' / 'R') ('o' / 'O') ('w' / 'W') Action8 open arg close Action9) / (('s' / 'S') ('t' / 'T') ('o' / 'O') ('r' / 'R') ('e' / 'E') Action10 open Call comma arg close Action11) / (('t' / 'T') ('o' / 'O') ('p' / 'P') ('n' / 'N') Action12 open posfield (comma allargs)? close Action13) / (('t' / 'T') ('o' / 'O') ('p' / 'P') ('k' / 'K') Action14 open posfield (comma allargs)? close Action15) / (('p' / 'P') ('e' / 'E') ('r' / 'R') ('c' / 'C') ('e' / 'E') ('n' / 'N') ('t' / 'T') ('i' / 'I') ('l' / 'L') ('e' / 'E') Action16 open posfield (comma allargs)? close Action17) / (('r' / 'R') ('o' / 'O') ('w' / 'W') ('s' / 'S') Action18 open posfield (comma allargs)? close Action19) / (('m' / 'M') ('i' / 'I') ('n' / 'N') Action20 open posfield (comma allargs)? close Action21) / (('m' / 'M') ('a' / 'A') ('x' / 'X') Action22 open posfield (comma allargs)? close Action23) / (('s' / 'S') ('u' / 'U') ('m' / 'M') Action24 open posfield (comma allargs)? close Action25) / (('r' / 'R') ('a' / 'A') ('n' / 'N') ('g' / 'G') ('e' / 'E') Action26 open field eq value comma ('f' 'r' 'o' 'm' '=')? Action27 timefmt Action28 comma ('t' 'o' '=')? sp Action29 timefmt Action30 close Action31) / (<IDENT> Action32 open allargs comma? close Action33))> */
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(ruleAction67, 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('s') {
goto l24
}
position++
goto l23
l24:
position, tokenIndex = position23, tokenIndex23
if buffer[position] != rune('S') {
goto l22
}
position++
}
l23:
{
position25, tokenIndex25 := position, tokenIndex
if buffer[position] != rune('e') {
goto l26
}
position++
goto l25
l26:
position, tokenIndex = position25, tokenIndex25
if buffer[position] != rune('E') {
goto l22
}
position++
}
l25:
{
position27, tokenIndex27 := position, tokenIndex
if buffer[position] != rune('t') {
goto l28
}
position++
goto l27
l28:
position, tokenIndex = position27, tokenIndex27
if buffer[position] != rune('T') {
goto l22
}
position++
}
l27:
{
position29, tokenIndex29 := position, tokenIndex
if buffer[position] != rune('r') {
goto l30
}
position++
goto l29
l30:
position, tokenIndex = position29, tokenIndex29
if buffer[position] != rune('R') {
goto l22
}
position++
}
l29:
{
position31, tokenIndex31 := position, tokenIndex
if buffer[position] != rune('o') {
goto l32
}
position++
goto l31
l32:
position, tokenIndex = position31, tokenIndex31
if buffer[position] != rune('O') {
goto l22
}
position++
}
l31:
{
position33, tokenIndex33 := position, tokenIndex
if buffer[position] != rune('w') {
goto l34
}
position++
goto l33
l34:
position, tokenIndex = position33, tokenIndex33
if buffer[position] != rune('W') {
goto l22
}
position++
}
l33:
{
position35, tokenIndex35 := position, tokenIndex
if buffer[position] != rune('a') {
goto l36
}
position++
goto l35
l36:
position, tokenIndex = position35, tokenIndex35
if buffer[position] != rune('A') {
goto l22
}
position++
}
l35:
{
position37, tokenIndex37 := position, tokenIndex
if buffer[position] != rune('t') {
goto l38
}
position++
goto l37
l38:
position, tokenIndex = position37, tokenIndex37
if buffer[position] != rune('T') {
goto l22
}
position++
}
l37:
{
position39, tokenIndex39 := position, tokenIndex
if buffer[position] != rune('t') {
goto l40
}
position++
goto l39
l40:
position, tokenIndex = position39, tokenIndex39
if buffer[position] != rune('T') {
goto l22
}
position++
}
l39:
{
position41, tokenIndex41 := position, tokenIndex
if buffer[position] != rune('r') {
goto l42
}
position++
goto l41
l42:
position, tokenIndex = position41, tokenIndex41
if buffer[position] != rune('R') {
goto l22
}
position++
}
l41:
{
position43, tokenIndex43 := position, tokenIndex
if buffer[position] != rune('s') {
goto l44
}
position++
goto l43
l44:
position, tokenIndex = position43, tokenIndex43
if buffer[position] != rune('S') {
goto l22
}
position++
}
l43:
{
add(ruleAction2, position)
}
if !_rules[ruleopen]() {
goto l22
}
if !_rules[ruleposfield]() {
goto l22
}
if !_rules[rulecomma]() {
goto l22
}
{
position46 := position
{
position47, tokenIndex47 := position, tokenIndex
{
position49 := position
if !_rules[ruledigits]() {
goto l48
}
add(rulePegText, position49)
}
{
add(ruleAction64, position)
}
goto l47
l48:
position, tokenIndex = position47, tokenIndex47
{
position52 := position
if buffer[position] != rune('\'') {
goto l51
}
position++
if !_rules[rulesinglequotedstring]() {
goto l51
}
if buffer[position] != rune('\'') {
goto l51
}
position++
add(rulePegText, position52)
}
{
add(ruleAction65, position)
}
goto l47
l51:
position, tokenIndex = position47, tokenIndex47
{
position54 := position
if buffer[position] != rune('"') {
goto l22
}
position++
if !_rules[ruledoublequotedstring]() {
goto l22
}
if buffer[position] != rune('"') {
goto l22
}
position++
add(rulePegText, position54)
}
{
add(ruleAction66, position)
}
}
l47:
add(rulerow, position46)
}
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
{
position58, tokenIndex58 := position, tokenIndex
if buffer[position] != rune('s') {
goto l59
}
position++
goto l58
l59:
position, tokenIndex = position58, tokenIndex58
if buffer[position] != rune('S') {
goto l57
}
position++
}
l58:
{
position60, tokenIndex60 := position, tokenIndex
if buffer[position] != rune('e') {
goto l61
}
position++
goto l60
l61:
position, tokenIndex = position60, tokenIndex60
if buffer[position] != rune('E') {
goto l57
}
position++
}
l60:
{
position62, tokenIndex62 := position, tokenIndex
if buffer[position] != rune('t') {
goto l63
}
position++
goto l62
l63:
position, tokenIndex = position62, tokenIndex62
if buffer[position] != rune('T') {
goto l57
}
position++
}
l62:
{
position64, tokenIndex64 := position, tokenIndex
if buffer[position] != rune('c') {
goto l65
}
position++
goto l64
l65:
position, tokenIndex = position64, tokenIndex64
if buffer[position] != rune('C') {
goto l57
}
position++
}
l64:
{
position66, tokenIndex66 := position, tokenIndex
if buffer[position] != rune('o') {
goto l67
}
position++
goto l66
l67:
position, tokenIndex = position66, tokenIndex66
if buffer[position] != rune('O') {
goto l57
}
position++
}
l66:
{
position68, tokenIndex68 := position, tokenIndex
if buffer[position] != rune('l') {
goto l69
}
position++
goto l68
l69:
position, tokenIndex = position68, tokenIndex68
if buffer[position] != rune('L') {
goto l57
}
position++
}
l68:
{
position70, tokenIndex70 := position, tokenIndex
if buffer[position] != rune('u') {
goto l71
}
position++
goto l70
l71:
position, tokenIndex = position70, tokenIndex70
if buffer[position] != rune('U') {
goto l57
}
position++
}
l70:
{
position72, tokenIndex72 := position, tokenIndex
if buffer[position] != rune('m') {
goto l73
}
position++
goto l72
l73:
position, tokenIndex = position72, tokenIndex72
if buffer[position] != rune('M') {
goto l57
}
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 l57
}
position++
}
l74:
{
position76, tokenIndex76 := position, tokenIndex
if buffer[position] != rune('a') {
goto l77
}
position++
goto l76
l77:
position, tokenIndex = position76, tokenIndex76
if buffer[position] != rune('A') {
goto l57
}
position++
}
l76:
{
position78, tokenIndex78 := position, tokenIndex
if buffer[position] != rune('t') {
goto l79
}
position++
goto l78
l79:
position, tokenIndex = position78, tokenIndex78
if buffer[position] != rune('T') {
goto l57
}
position++
}
l78:
{
position80, tokenIndex80 := position, tokenIndex
if buffer[position] != rune('t') {
goto l81
}
position++
goto l80
l81:
position, tokenIndex = position80, tokenIndex80
if buffer[position] != rune('T') {
goto l57
}
position++
}
l80:
{
position82, tokenIndex82 := position, tokenIndex
if buffer[position] != rune('r') {
goto l83
}
position++
goto l82
l83:
position, tokenIndex = position82, tokenIndex82
if buffer[position] != rune('R') {
goto l57
}
position++
}
l82:
{
position84, tokenIndex84 := position, tokenIndex
if buffer[position] != rune('s') {
goto l85
}
position++
goto l84
l85:
position, tokenIndex = position84, tokenIndex84
if buffer[position] != rune('S') {
goto l57
}
position++
}
l84:
{
add(ruleAction4, position)
}
if !_rules[ruleopen]() {
goto l57
}
if !_rules[rulecol]() {
goto l57
}
if !_rules[rulecomma]() {
goto l57
}
if !_rules[ruleargs]() {
goto l57
}
if !_rules[ruleclose]() {
goto l57
}
{
add(ruleAction5, position)
}
goto l7
l57:
position, tokenIndex = position7, tokenIndex7
{
position89, tokenIndex89 := position, tokenIndex
if buffer[position] != rune('c') {
goto l90
}
position++
goto l89
l90:
position, tokenIndex = position89, tokenIndex89
if buffer[position] != rune('C') {
goto l88
}
position++
}
l89:
{
position91, tokenIndex91 := position, tokenIndex
if buffer[position] != rune('l') {
goto l92
}
position++
goto l91
l92:
position, tokenIndex = position91, tokenIndex91
if buffer[position] != rune('L') {
goto l88
}
position++
}
l91:
{
position93, tokenIndex93 := position, tokenIndex
if buffer[position] != rune('e') {
goto l94
}
position++
goto l93
l94:
position, tokenIndex = position93, tokenIndex93
if buffer[position] != rune('E') {
goto l88
}
position++
}
l93:
{
position95, tokenIndex95 := position, tokenIndex
if buffer[position] != rune('a') {
goto l96
}
position++
goto l95
l96:
position, tokenIndex = position95, tokenIndex95
if buffer[position] != rune('A') {
goto l88
}
position++
}
l95:
{
position97, tokenIndex97 := position, tokenIndex
if buffer[position] != rune('r') {
goto l98
}
position++
goto l97
l98:
position, tokenIndex = position97, tokenIndex97
if buffer[position] != rune('R') {
goto l88
}
position++
}
l97:
{
add(ruleAction6, position)
}
if !_rules[ruleopen]() {
goto l88
}
if !_rules[rulecol]() {
goto l88
}
if !_rules[rulecomma]() {
goto l88
}
if !_rules[ruleargs]() {
goto l88
}
if !_rules[ruleclose]() {
goto l88
}
{
add(ruleAction7, position)
}
goto l7
l88:
position, tokenIndex = position7, tokenIndex7
{
position102, tokenIndex102 := position, tokenIndex
if buffer[position] != rune('c') {
goto l103
}
position++
goto l102
l103:
position, tokenIndex = position102, tokenIndex102
if buffer[position] != rune('C') {
goto l101
}
position++
}
l102:
{
position104, tokenIndex104 := position, tokenIndex
if buffer[position] != rune('l') {
goto l105
}
position++
goto l104
l105:
position, tokenIndex = position104, tokenIndex104
if buffer[position] != rune('L') {
goto l101
}
position++
}
l104:
{
position106, tokenIndex106 := position, tokenIndex
if buffer[position] != rune('e') {
goto l107
}
position++
goto l106
l107:
position, tokenIndex = position106, tokenIndex106
if buffer[position] != rune('E') {
goto l101
}
position++
}
l106:
{
position108, tokenIndex108 := position, tokenIndex
if buffer[position] != rune('a') {
goto l109
}
position++
goto l108
l109:
position, tokenIndex = position108, tokenIndex108
if buffer[position] != rune('A') {
goto l101
}
position++
}
l108:
{
position110, tokenIndex110 := position, tokenIndex
if buffer[position] != rune('r') {
goto l111
}
position++
goto l110
l111:
position, tokenIndex = position110, tokenIndex110
if buffer[position] != rune('R') {
goto l101
}
position++
}
l110:
{
position112, tokenIndex112 := position, tokenIndex
if buffer[position] != rune('r') {
goto l113
}
position++
goto l112
l113:
position, tokenIndex = position112, tokenIndex112
if buffer[position] != rune('R') {
goto l101
}
position++
}
l112:
{
position114, tokenIndex114 := position, tokenIndex
if buffer[position] != rune('o') {
goto l115
}
position++
goto l114
l115:
position, tokenIndex = position114, tokenIndex114
if buffer[position] != rune('O') {
goto l101
}
position++
}
l114:
{
position116, tokenIndex116 := position, tokenIndex
if buffer[position] != rune('w') {
goto l117
}
position++
goto l116
l117:
position, tokenIndex = position116, tokenIndex116
if buffer[position] != rune('W') {
goto l101
}
position++
}
l116:
{
add(ruleAction8, position)
}
if !_rules[ruleopen]() {
goto l101
}
if !_rules[rulearg]() {
goto l101
}
if !_rules[ruleclose]() {
goto l101
}
{
add(ruleAction9, position)
}
goto l7
l101:
position, tokenIndex = position7, tokenIndex7
{
position121, tokenIndex121 := position, tokenIndex
if buffer[position] != rune('s') {
goto l122
}
position++
goto l121
l122:
position, tokenIndex = position121, tokenIndex121
if buffer[position] != rune('S') {
goto l120
}
position++
}
l121:
{
position123, tokenIndex123 := position, tokenIndex
if buffer[position] != rune('t') {
goto l124
}
position++
goto l123
l124:
position, tokenIndex = position123, tokenIndex123
if buffer[position] != rune('T') {
goto l120
}
position++
}
l123:
{
position125, tokenIndex125 := position, tokenIndex
if buffer[position] != rune('o') {
goto l126
}
position++
goto l125
l126:
position, tokenIndex = position125, tokenIndex125
if buffer[position] != rune('O') {
goto l120
}
position++
}
l125:
{
position127, tokenIndex127 := position, tokenIndex
if buffer[position] != rune('r') {
goto l128
}
position++
goto l127
l128:
position, tokenIndex = position127, tokenIndex127
if buffer[position] != rune('R') {
goto l120
}
position++
}
l127:
{
position129, tokenIndex129 := position, tokenIndex
if buffer[position] != rune('e') {
goto l130
}
position++
goto l129
l130:
position, tokenIndex = position129, tokenIndex129
if buffer[position] != rune('E') {
goto l120
}
position++
}
l129:
{
add(ruleAction10, position)
}
if !_rules[ruleopen]() {
goto l120
}
if !_rules[ruleCall]() {
goto l120
}
if !_rules[rulecomma]() {
goto l120
}
if !_rules[rulearg]() {
goto l120
}
if !_rules[ruleclose]() {
goto l120
}
{
add(ruleAction11, position)
}
goto l7
l120:
position, tokenIndex = position7, tokenIndex7
{
position134, tokenIndex134 := position, tokenIndex
if buffer[position] != rune('t') {
goto l135
}
position++
goto l134
l135:
position, tokenIndex = position134, tokenIndex134
if buffer[position] != rune('T') {
goto l133
}
position++
}
l134:
{
position136, tokenIndex136 := position, tokenIndex
if buffer[position] != rune('o') {
goto l137
}
position++
goto l136
l137:
position, tokenIndex = position136, tokenIndex136
if buffer[position] != rune('O') {
goto l133
}
position++
}
l136:
{
position138, tokenIndex138 := position, tokenIndex
if buffer[position] != rune('p') {
goto l139
}
position++
goto l138
l139:
position, tokenIndex = position138, tokenIndex138
if buffer[position] != rune('P') {
goto l133
}
position++
}
l138:
{
position140, tokenIndex140 := position, tokenIndex
if buffer[position] != rune('n') {
goto l141
}
position++
goto l140
l141:
position, tokenIndex = position140, tokenIndex140
if buffer[position] != rune('N') {
goto l133
}
position++
}
l140:
{
add(ruleAction12, position)
}
if !_rules[ruleopen]() {
goto l133
}
if !_rules[ruleposfield]() {
goto l133
}
{
position143, tokenIndex143 := position, tokenIndex
if !_rules[rulecomma]() {
goto l143
}
if !_rules[ruleallargs]() {
goto l143
}
goto l144
l143:
position, tokenIndex = position143, tokenIndex143
}
l144:
if !_rules[ruleclose]() {
goto l133
}
{
add(ruleAction13, position)
}
goto l7
l133:
position, tokenIndex = position7, tokenIndex7
{
position147, tokenIndex147 := position, tokenIndex
if buffer[position] != rune('t') {
goto l148
}
position++
goto l147
l148:
position, tokenIndex = position147, tokenIndex147
if buffer[position] != rune('T') {
goto l146
}
position++
}
l147:
{
position149, tokenIndex149 := position, tokenIndex
if buffer[position] != rune('o') {
goto l150
}
position++
goto l149
l150:
position, tokenIndex = position149, tokenIndex149
if buffer[position] != rune('O') {
goto l146
}
position++
}
l149:
{
position151, tokenIndex151 := position, tokenIndex
if buffer[position] != rune('p') {
goto l152
}
position++
goto l151
l152:
position, tokenIndex = position151, tokenIndex151
if buffer[position] != rune('P') {
goto l146
}
position++
}
l151:
{
position153, tokenIndex153 := position, tokenIndex
if buffer[position] != rune('k') {
goto l154
}
position++
goto l153
l154:
position, tokenIndex = position153, tokenIndex153
if buffer[position] != rune('K') {
goto l146
}
position++
}
l153:
{
add(ruleAction14, position)
}
if !_rules[ruleopen]() {
goto l146
}
if !_rules[ruleposfield]() {
goto l146
}
{
position156, tokenIndex156 := position, tokenIndex
if !_rules[rulecomma]() {
goto l156
}
if !_rules[ruleallargs]() {
goto l156
}
goto l157
l156:
position, tokenIndex = position156, tokenIndex156
}
l157:
if !_rules[ruleclose]() {
goto l146
}
{
add(ruleAction15, position)
}
goto l7
l146:
position, tokenIndex = position7, tokenIndex7
{
position160, tokenIndex160 := position, tokenIndex
if buffer[position] != rune('p') {
goto l161
}
position++
goto l160
l161:
position, tokenIndex = position160, tokenIndex160
if buffer[position] != rune('P') {
goto l159
}
position++
}
l160:
{
position162, tokenIndex162 := position, tokenIndex
if buffer[position] != rune('e') {
goto l163
}
position++
goto l162
l163:
position, tokenIndex = position162, tokenIndex162
if buffer[position] != rune('E') {
goto l159
}
position++
}
l162:
{
position164, tokenIndex164 := position, tokenIndex
if buffer[position] != rune('r') {
goto l165
}
position++
goto l164
l165:
position, tokenIndex = position164, tokenIndex164
if buffer[position] != rune('R') {
goto l159
}
position++
}
l164:
{
position166, tokenIndex166 := position, tokenIndex
if buffer[position] != rune('c') {
goto l167
}
position++
goto l166
l167:
position, tokenIndex = position166, tokenIndex166
if buffer[position] != rune('C') {
goto l159
}
position++
}
l166:
{
position168, tokenIndex168 := position, tokenIndex
if buffer[position] != rune('e') {
goto l169
}
position++
goto l168
l169:
position, tokenIndex = position168, tokenIndex168
if buffer[position] != rune('E') {
goto l159
}
position++
}
l168:
{
position170, tokenIndex170 := position, tokenIndex
if buffer[position] != rune('n') {
goto l171
}
position++
goto l170
l171:
position, tokenIndex = position170, tokenIndex170
if buffer[position] != rune('N') {
goto l159
}
position++
}
l170:
{
position172, tokenIndex172 := position, tokenIndex
if buffer[position] != rune('t') {
goto l173
}
position++
goto l172
l173:
position, tokenIndex = position172, tokenIndex172
if buffer[position] != rune('T') {
goto l159
}
position++
}
l172:
{
position174, tokenIndex174 := position, tokenIndex
if buffer[position] != rune('i') {
goto l175
}
position++
goto l174
l175:
position, tokenIndex = position174, tokenIndex174
if buffer[position] != rune('I') {
goto l159
}
position++
}
l174:
{
position176, tokenIndex176 := position, tokenIndex
if buffer[position] != rune('l') {
goto l177
}
position++
goto l176
l177:
position, tokenIndex = position176, tokenIndex176
if buffer[position] != rune('L') {
goto l159
}
position++
}
l176:
{
position178, tokenIndex178 := position, tokenIndex
if buffer[position] != rune('e') {
goto l179
}
position++
goto l178
l179:
position, tokenIndex = position178, tokenIndex178
if buffer[position] != rune('E') {
goto l159
}
position++
}
l178:
{
add(ruleAction16, position)
}
if !_rules[ruleopen]() {
goto l159
}
if !_rules[ruleposfield]() {
goto l159
}
{
position181, tokenIndex181 := position, tokenIndex
if !_rules[rulecomma]() {
goto l181
}
if !_rules[ruleallargs]() {
goto l181
}
goto l182
l181:
position, tokenIndex = position181, tokenIndex181
}
l182:
if !_rules[ruleclose]() {
goto l159
}
{
add(ruleAction17, position)
}
goto l7
l159:
position, tokenIndex = position7, tokenIndex7
{
position185, tokenIndex185 := position, tokenIndex
if buffer[position] != rune('r') {
goto l186
}
position++
goto l185
l186:
position, tokenIndex = position185, tokenIndex185
if buffer[position] != rune('R') {
goto l184
}
position++
}
l185:
{
position187, tokenIndex187 := position, tokenIndex
if buffer[position] != rune('o') {
goto l188
}
position++
goto l187
l188:
position, tokenIndex = position187, tokenIndex187
if buffer[position] != rune('O') {
goto l184
}
position++
}
l187:
{
position189, tokenIndex189 := position, tokenIndex
if buffer[position] != rune('w') {
goto l190
}
position++
goto l189
l190:
position, tokenIndex = position189, tokenIndex189
if buffer[position] != rune('W') {
goto l184
}
position++
}
l189:
{
position191, tokenIndex191 := position, tokenIndex
if buffer[position] != rune('s') {
goto l192
}
position++
goto l191
l192:
position, tokenIndex = position191, tokenIndex191
if buffer[position] != rune('S') {
goto l184
}
position++
}
l191:
{
add(ruleAction18, position)
}
if !_rules[ruleopen]() {
goto l184
}
if !_rules[ruleposfield]() {
goto l184
}
{
position194, tokenIndex194 := position, tokenIndex
if !_rules[rulecomma]() {
goto l194
}
if !_rules[ruleallargs]() {
goto l194
}
goto l195
l194:
position, tokenIndex = position194, tokenIndex194
}
l195:
if !_rules[ruleclose]() {
goto l184
}
{
add(ruleAction19, position)
}
goto l7
l184:
position, tokenIndex = position7, tokenIndex7
{
position198, tokenIndex198 := position, tokenIndex
if buffer[position] != rune('m') {
goto l199
}
position++
goto l198
l199:
position, tokenIndex = position198, tokenIndex198
if buffer[position] != rune('M') {
goto l197
}
position++
}
l198:
{
position200, tokenIndex200 := position, tokenIndex
if buffer[position] != rune('i') {
goto l201
}
position++
goto l200
l201:
position, tokenIndex = position200, tokenIndex200
if buffer[position] != rune('I') {
goto l197
}
position++
}
l200:
{
position202, tokenIndex202 := position, tokenIndex
if buffer[position] != rune('n') {
goto l203
}
position++
goto l202
l203:
position, tokenIndex = position202, tokenIndex202
if buffer[position] != rune('N') {
goto l197
}
position++
}
l202:
{
add(ruleAction20, position)
}
if !_rules[ruleopen]() {
goto l197
}
if !_rules[ruleposfield]() {
goto l197
}
{
position205, tokenIndex205 := position, tokenIndex
if !_rules[rulecomma]() {
goto l205
}
if !_rules[ruleallargs]() {
goto l205
}
goto l206
l205:
position, tokenIndex = position205, tokenIndex205
}
l206:
if !_rules[ruleclose]() {
goto l197
}
{
add(ruleAction21, position)
}
goto l7
l197:
position, tokenIndex = position7, tokenIndex7
{
position209, tokenIndex209 := position, tokenIndex
if buffer[position] != rune('m') {
goto l210
}
position++
goto l209
l210:
position, tokenIndex = position209, tokenIndex209
if buffer[position] != rune('M') {
goto l208
}
position++
}
l209:
{
position211, tokenIndex211 := position, tokenIndex
if buffer[position] != rune('a') {
goto l212
}
position++
goto l211
l212:
position, tokenIndex = position211, tokenIndex211
if buffer[position] != rune('A') {
goto l208
}
position++
}
l211:
{
position213, tokenIndex213 := position, tokenIndex
if buffer[position] != rune('x') {
goto l214
}
position++
goto l213
l214:
position, tokenIndex = position213, tokenIndex213
if buffer[position] != rune('X') {
goto l208
}
position++
}
l213:
{
add(ruleAction22, position)
}
if !_rules[ruleopen]() {
goto l208
}
if !_rules[ruleposfield]() {
goto l208
}
{
position216, tokenIndex216 := position, tokenIndex
if !_rules[rulecomma]() {
goto l216
}
if !_rules[ruleallargs]() {
goto l216
}
goto l217
l216:
position, tokenIndex = position216, tokenIndex216
}
l217:
if !_rules[ruleclose]() {
goto l208
}
{
add(ruleAction23, position)
}
goto l7
l208:
position, tokenIndex = position7, tokenIndex7
{
position220, tokenIndex220 := position, tokenIndex
if buffer[position] != rune('s') {
goto l221
}
position++
goto l220
l221:
position, tokenIndex = position220, tokenIndex220
if buffer[position] != rune('S') {
goto l219
}
position++
}
l220:
{
position222, tokenIndex222 := position, tokenIndex
if buffer[position] != rune('u') {
goto l223
}
position++
goto l222
l223:
position, tokenIndex = position222, tokenIndex222
if buffer[position] != rune('U') {
goto l219
}
position++
}
l222:
{
position224, tokenIndex224 := position, tokenIndex
if buffer[position] != rune('m') {
goto l225
}
position++
goto l224
l225:
position, tokenIndex = position224, tokenIndex224
if buffer[position] != rune('M') {
goto l219
}
position++
}
l224:
{
add(ruleAction24, position)
}
if !_rules[ruleopen]() {
goto l219
}
if !_rules[ruleposfield]() {
goto l219
}
{
position227, tokenIndex227 := position, tokenIndex
if !_rules[rulecomma]() {
goto l227
}
if !_rules[ruleallargs]() {
goto l227
}
goto l228
l227:
position, tokenIndex = position227, tokenIndex227
}
l228:
if !_rules[ruleclose]() {
goto l219
}
{
add(ruleAction25, position)
}
goto l7
l219:
position, tokenIndex = position7, tokenIndex7
{
position231, tokenIndex231 := position, tokenIndex
if buffer[position] != rune('r') {
goto l232
}
position++
goto l231
l232:
position, tokenIndex = position231, tokenIndex231
if buffer[position] != rune('R') {
goto l230
}
position++
}
l231:
{
position233, tokenIndex233 := position, tokenIndex
if buffer[position] != rune('a') {
goto l234
}
position++
goto l233
l234:
position, tokenIndex = position233, tokenIndex233
if buffer[position] != rune('A') {
goto l230
}
position++
}
l233:
{
position235, tokenIndex235 := position, tokenIndex
if buffer[position] != rune('n') {
goto l236
}
position++
goto l235
l236:
position, tokenIndex = position235, tokenIndex235
if buffer[position] != rune('N') {
goto l230
}
position++
}
l235:
{
position237, tokenIndex237 := position, tokenIndex
if buffer[position] != rune('g') {
goto l238
}
position++
goto l237
l238:
position, tokenIndex = position237, tokenIndex237
if buffer[position] != rune('G') {
goto l230
}
position++
}
l237:
{
position239, tokenIndex239 := position, tokenIndex
if buffer[position] != rune('e') {
goto l240
}
position++
goto l239
l240:
position, tokenIndex = position239, tokenIndex239
if buffer[position] != rune('E') {
goto l230
}
position++
}
l239:
{
add(ruleAction26, position)
}
if !_rules[ruleopen]() {
goto l230
}
if !_rules[rulefield]() {
goto l230
}
if !_rules[ruleeq]() {
goto l230
}
if !_rules[rulevalue]() {
goto l230
}
if !_rules[rulecomma]() {
goto l230
}
{
position242, tokenIndex242 := position, tokenIndex
if buffer[position] != rune('f') {
goto l242
}
position++
if buffer[position] != rune('r') {
goto l242
}
position++
if buffer[position] != rune('o') {
goto l242
}
position++
if buffer[position] != rune('m') {
goto l242
}
position++
if buffer[position] != rune('=') {
goto l242
}
position++
goto l243
l242:
position, tokenIndex = position242, tokenIndex242
}
l243:
{
add(ruleAction27, position)
}
if !_rules[ruletimefmt]() {
goto l230
}
{
add(ruleAction28, position)
}
if !_rules[rulecomma]() {
goto l230
}
{
position246, tokenIndex246 := position, tokenIndex
if buffer[position] != rune('t') {
goto l246
}
position++
if buffer[position] != rune('o') {
goto l246
}
position++
if buffer[position] != rune('=') {
goto l246
}
position++
goto l247
l246:
position, tokenIndex = position246, tokenIndex246
}
l247:
if !_rules[rulesp]() {
goto l230
}
{
add(ruleAction29, position)
}
if !_rules[ruletimefmt]() {
goto l230
}
{
add(ruleAction30, position)
}
if !_rules[ruleclose]() {
goto l230
}
{
add(ruleAction31, position)
}
goto l7
l230:
position, tokenIndex = position7, tokenIndex7
{
position251 := position
if !_rules[ruleIDENT]() {
goto l5
}
add(rulePegText, position251)
}
{
add(ruleAction32, position)
}
if !_rules[ruleopen]() {
goto l5
}
if !_rules[ruleallargs]() {
goto l5
}
{
position253, tokenIndex253 := position, tokenIndex
if !_rules[rulecomma]() {
goto l253
}
goto l254
l253:
position, tokenIndex = position253, tokenIndex253
}
l254:
if !_rules[ruleclose]() {
goto l5
}
{
add(ruleAction33, 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 {
position256, tokenIndex256 := position, tokenIndex
{
position257 := position
{
position258, tokenIndex258 := position, tokenIndex
if !_rules[ruleCall]() {
goto l259
}
l260:
{
position261, tokenIndex261 := position, tokenIndex
if !_rules[rulecomma]() {
goto l261
}
if !_rules[ruleCall]() {
goto l261
}
goto l260
l261:
position, tokenIndex = position261, tokenIndex261
}
{
position262, tokenIndex262 := position, tokenIndex
if !_rules[rulecomma]() {
goto l262
}
if !_rules[ruleargs]() {
goto l262
}
goto l263
l262:
position, tokenIndex = position262, tokenIndex262
}
l263:
goto l258
l259:
position, tokenIndex = position258, tokenIndex258
if !_rules[ruleargs]() {
goto l264
}
goto l258
l264:
position, tokenIndex = position258, tokenIndex258
if !_rules[rulesp]() {
goto l256
}
}
l258:
add(ruleallargs, position257)
}
return true
l256:
position, tokenIndex = position256, tokenIndex256
return false
},
/* 3 args <- <(arg (comma args)? sp)> */
func() bool {
position265, tokenIndex265 := position, tokenIndex
{
position266 := position
if !_rules[rulearg]() {
goto l265
}
{
position267, tokenIndex267 := position, tokenIndex
if !_rules[rulecomma]() {
goto l267
}
if !_rules[ruleargs]() {
goto l267
}
goto l268
l267:
position, tokenIndex = position267, tokenIndex267
}
l268:
if !_rules[rulesp]() {
goto l265
}
add(ruleargs, position266)
}
return true
l265:
position, tokenIndex = position265, tokenIndex265
return false
},
/* 4 arg <- <((field eq value) / (field sp COND sp value) / conditional)> */
func() bool {
position269, tokenIndex269 := position, tokenIndex
{
position270 := position
{
position271, tokenIndex271 := position, tokenIndex
if !_rules[rulefield]() {
goto l272
}
if !_rules[ruleeq]() {
goto l272
}
if !_rules[rulevalue]() {
goto l272
}
goto l271
l272:
position, tokenIndex = position271, tokenIndex271
if !_rules[rulefield]() {
goto l273
}
if !_rules[rulesp]() {
goto l273
}
{
position274 := position
{
position275, tokenIndex275 := position, tokenIndex
if buffer[position] != rune('>') {
goto l276
}
position++
if buffer[position] != rune('<') {
goto l276
}
position++
{
add(ruleAction34, position)
}
goto l275
l276:
position, tokenIndex = position275, tokenIndex275
if buffer[position] != rune('<') {
goto l278
}
position++
if buffer[position] != rune('=') {
goto l278
}
position++
{
add(ruleAction35, position)
}
goto l275
l278:
position, tokenIndex = position275, tokenIndex275
if buffer[position] != rune('>') {
goto l280
}
position++
if buffer[position] != rune('=') {
goto l280
}
position++
{
add(ruleAction36, position)
}
goto l275
l280:
position, tokenIndex = position275, tokenIndex275
if buffer[position] != rune('=') {
goto l282
}
position++
if buffer[position] != rune('=') {
goto l282
}
position++
{
add(ruleAction37, position)
}
goto l275
l282:
position, tokenIndex = position275, tokenIndex275
if buffer[position] != rune('!') {
goto l284
}
position++
if buffer[position] != rune('=') {
goto l284
}
position++
{
add(ruleAction38, position)
}
goto l275
l284:
position, tokenIndex = position275, tokenIndex275
if buffer[position] != rune('<') {
goto l286
}
position++
{
add(ruleAction39, position)
}
goto l275
l286:
position, tokenIndex = position275, tokenIndex275
if buffer[position] != rune('>') {
goto l273
}
position++
{
add(ruleAction40, position)
}
}
l275:
add(ruleCOND, position274)
}
if !_rules[rulesp]() {
goto l273
}
if !_rules[rulevalue]() {
goto l273
}
goto l271
l273:
position, tokenIndex = position271, tokenIndex271
{
position289 := position
{
add(ruleAction41, position)
}
if !_rules[rulecondint]() {
goto l269
}
if !_rules[rulecondLT]() {
goto l269
}
{
position291 := position
{
position292 := position
if !_rules[rulefieldExpr]() {
goto l269
}
add(rulePegText, position292)
}
if !_rules[rulesp]() {
goto l269
}
{
add(ruleAction45, position)
}
add(rulecondfield, position291)
}
if !_rules[rulecondLT]() {
goto l269
}
if !_rules[rulecondint]() {
goto l269
}
{
add(ruleAction42, position)
}
add(ruleconditional, position289)
}
}
l271:
add(rulearg, position270)
}
return true
l269:
position, tokenIndex = position269, tokenIndex269
return false
},
/* 5 COND <- <(('>' '<' Action34) / ('<' '=' Action35) / ('>' '=' Action36) / ('=' '=' Action37) / ('!' '=' Action38) / ('<' Action39) / ('>' Action40))> */
nil,
/* 6 conditional <- <(Action41 condint condLT condfield condLT condint Action42)> */
nil,
/* 7 condint <- <(<decimal> sp Action43)> */
func() bool {
position297, tokenIndex297 := position, tokenIndex
{
position298 := position
{
position299 := position
if !_rules[ruledecimal]() {
goto l297
}
add(rulePegText, position299)
}
if !_rules[rulesp]() {
goto l297
}
{
add(ruleAction43, position)
}
add(rulecondint, position298)
}
return true
l297:
position, tokenIndex = position297, tokenIndex297
return false
},
/* 8 condLT <- <(<(('<' '=') / '<')> sp Action44)> */
func() bool {
position301, tokenIndex301 := position, tokenIndex
{
position302 := position
{
position303 := position
{
position304, tokenIndex304 := position, tokenIndex
if buffer[position] != rune('<') {
goto l305
}
position++
if buffer[position] != rune('=') {
goto l305
}
position++
goto l304
l305:
position, tokenIndex = position304, tokenIndex304
if buffer[position] != rune('<') {
goto l301
}
position++
}
l304:
add(rulePegText, position303)
}
if !_rules[rulesp]() {
goto l301
}
{
add(ruleAction44, position)
}
add(rulecondLT, position302)
}
return true
l301:
position, tokenIndex = position301, tokenIndex301
return false
},
/* 9 condfield <- <(<fieldExpr> sp Action45)> */
nil,
/* 10 value <- <(item / (lbrack Action46 items rbrack Action47))> */
func() bool {
position308, tokenIndex308 := position, tokenIndex
{
position309 := position
{
position310, tokenIndex310 := position, tokenIndex
if !_rules[ruleitem]() {
goto l311
}
goto l310
l311:
position, tokenIndex = position310, tokenIndex310
{
position312 := position
if buffer[position] != rune('[') {
goto l308
}
position++
if !_rules[rulesp]() {
goto l308
}
add(rulelbrack, position312)
}
{
add(ruleAction46, position)
}
if !_rules[ruleitems]() {
goto l308
}
{
position314 := position
if !_rules[rulesp]() {
goto l308
}
if buffer[position] != rune(']') {
goto l308
}
position++
if !_rules[rulesp]() {
goto l308
}
add(rulerbrack, position314)
}
{
add(ruleAction47, position)
}
}
l310:
add(rulevalue, position309)
}
return true
l308:
position, tokenIndex = position308, tokenIndex308
return false
},
/* 11 items <- <(item (comma items)?)> */
func() bool {
position316, tokenIndex316 := position, tokenIndex
{
position317 := position
if !_rules[ruleitem]() {
goto l316
}
{
position318, tokenIndex318 := position, tokenIndex
if !_rules[rulecomma]() {
goto l318
}
if !_rules[ruleitems]() {
goto l318
}
goto l319
l318:
position, tokenIndex = position318, tokenIndex318
}
l319:
add(ruleitems, position317)
}
return true
l316:
position, tokenIndex = position316, tokenIndex316
return false
},
/* 12 item <- <(('n' 'u' 'l' 'l' &(comma / close) Action48) / ('t' 'r' 'u' 'e' &(comma / close) Action49) / ('f' 'a' 'l' 's' 'e' &(comma / close) Action50) / (timefmt Action51) / (timestampfmt Action52) / (<decimal> Action53) / (<IDENT> Action54 open allargs comma? close Action55) / (<([a-z] / [A-Z] / [0-9] / '-' / '_' / ':')+> Action56) / (<('"' doublequotedstring '"')> Action57) / (<('\'' singlequotedstring '\'')> Action58))> */
func() bool {
position320, tokenIndex320 := position, tokenIndex
{
position321 := position
{
position322, tokenIndex322 := position, tokenIndex
if buffer[position] != rune('n') {
goto l323
}
position++
if buffer[position] != rune('u') {
goto l323
}
position++
if buffer[position] != rune('l') {
goto l323
}
position++
if buffer[position] != rune('l') {
goto l323
}
position++
{
position324, tokenIndex324 := position, tokenIndex
{
position325, tokenIndex325 := position, tokenIndex
if !_rules[rulecomma]() {
goto l326
}
goto l325
l326:
position, tokenIndex = position325, tokenIndex325
if !_rules[ruleclose]() {
goto l323
}
}
l325:
position, tokenIndex = position324, tokenIndex324
}
{
add(ruleAction48, position)
}
goto l322
l323:
position, tokenIndex = position322, tokenIndex322
if buffer[position] != rune('t') {
goto l328
}
position++
if buffer[position] != rune('r') {
goto l328
}
position++
if buffer[position] != rune('u') {
goto l328
}
position++
if buffer[position] != rune('e') {
goto l328
}
position++
{
position329, tokenIndex329 := position, tokenIndex
{
position330, tokenIndex330 := position, tokenIndex
if !_rules[rulecomma]() {
goto l331
}
goto l330
l331:
position, tokenIndex = position330, tokenIndex330
if !_rules[ruleclose]() {
goto l328
}
}
l330:
position, tokenIndex = position329, tokenIndex329
}
{
add(ruleAction49, position)
}
goto l322
l328:
position, tokenIndex = position322, tokenIndex322
if buffer[position] != rune('f') {
goto l333
}
position++
if buffer[position] != rune('a') {
goto l333
}
position++
if buffer[position] != rune('l') {
goto l333
}
position++
if buffer[position] != rune('s') {
goto l333
}
position++
if buffer[position] != rune('e') {
goto l333
}
position++
{
position334, tokenIndex334 := position, tokenIndex
{
position335, tokenIndex335 := position, tokenIndex
if !_rules[rulecomma]() {
goto l336
}
goto l335
l336:
position, tokenIndex = position335, tokenIndex335
if !_rules[ruleclose]() {
goto l333
}
}
l335:
position, tokenIndex = position334, tokenIndex334
}
{
add(ruleAction50, position)
}
goto l322
l333:
position, tokenIndex = position322, tokenIndex322
if !_rules[ruletimefmt]() {
goto l338
}
{
add(ruleAction51, position)
}
goto l322
l338:
position, tokenIndex = position322, tokenIndex322
{
position341 := position
{
position342, tokenIndex342 := position, tokenIndex
if buffer[position] != rune('"') {
goto l343
}
position++
{
position344 := position
if !_rules[ruletimestampbasicfmt]() {
goto l343
}
add(rulePegText, position344)
}
if buffer[position] != rune('"') {
goto l343
}
position++
goto l342
l343:
position, tokenIndex = position342, tokenIndex342
if buffer[position] != rune('\'') {
goto l345
}
position++
{
position346 := position
if !_rules[ruletimestampbasicfmt]() {
goto l345
}
add(rulePegText, position346)
}
if buffer[position] != rune('\'') {
goto l345
}
position++
goto l342
l345:
position, tokenIndex = position342, tokenIndex342
{
position347 := position
if !_rules[ruletimestampbasicfmt]() {
goto l340
}
add(rulePegText, position347)
}
}
l342:
add(ruletimestampfmt, position341)
}
{
add(ruleAction52, position)
}
goto l322
l340:
position, tokenIndex = position322, tokenIndex322
{
position350 := position
if !_rules[ruledecimal]() {
goto l349
}
add(rulePegText, position350)
}
{
add(ruleAction53, position)
}
goto l322
l349:
position, tokenIndex = position322, tokenIndex322
{
position353 := position
if !_rules[ruleIDENT]() {
goto l352
}
add(rulePegText, position353)
}
{
add(ruleAction54, position)
}
if !_rules[ruleopen]() {
goto l352
}
if !_rules[ruleallargs]() {
goto l352
}
{
position355, tokenIndex355 := position, tokenIndex
if !_rules[rulecomma]() {
goto l355
}
goto l356
l355:
position, tokenIndex = position355, tokenIndex355
}
l356:
if !_rules[ruleclose]() {
goto l352
}
{
add(ruleAction55, position)
}
goto l322
l352:
position, tokenIndex = position322, tokenIndex322
{
position359 := position
{
position362, tokenIndex362 := position, tokenIndex
if c := buffer[position]; c < rune('a') || c > rune('z') {
goto l363
}
position++
goto l362
l363:
position, tokenIndex = position362, tokenIndex362
if c := buffer[position]; c < rune('A') || c > rune('Z') {
goto l364
}
position++
goto l362
l364:
position, tokenIndex = position362, tokenIndex362
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l365
}
position++
goto l362
l365:
position, tokenIndex = position362, tokenIndex362
if buffer[position] != rune('-') {
goto l366
}
position++
goto l362
l366:
position, tokenIndex = position362, tokenIndex362
if buffer[position] != rune('_') {
goto l367
}
position++
goto l362
l367:
position, tokenIndex = position362, tokenIndex362
if buffer[position] != rune(':') {
goto l358
}
position++
}
l362:
l360:
{
position361, tokenIndex361 := position, tokenIndex
{
position368, tokenIndex368 := position, tokenIndex
if c := buffer[position]; c < rune('a') || c > rune('z') {
goto l369
}
position++
goto l368
l369:
position, tokenIndex = position368, tokenIndex368
if c := buffer[position]; c < rune('A') || c > rune('Z') {
goto l370
}
position++
goto l368
l370:
position, tokenIndex = position368, tokenIndex368
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l371
}
position++
goto l368
l371:
position, tokenIndex = position368, tokenIndex368
if buffer[position] != rune('-') {
goto l372
}
position++
goto l368
l372:
position, tokenIndex = position368, tokenIndex368
if buffer[position] != rune('_') {
goto l373
}
position++
goto l368
l373:
position, tokenIndex = position368, tokenIndex368
if buffer[position] != rune(':') {
goto l361
}
position++
}
l368:
goto l360
l361:
position, tokenIndex = position361, tokenIndex361
}
add(rulePegText, position359)
}
{
add(ruleAction56, position)
}
goto l322
l358:
position, tokenIndex = position322, tokenIndex322
{
position376 := position
if buffer[position] != rune('"') {
goto l375
}
position++
if !_rules[ruledoublequotedstring]() {
goto l375
}
if buffer[position] != rune('"') {
goto l375
}
position++
add(rulePegText, position376)
}
{
add(ruleAction57, position)
}
goto l322
l375:
position, tokenIndex = position322, tokenIndex322
{
position378 := position
if buffer[position] != rune('\'') {
goto l320
}
position++
if !_rules[rulesinglequotedstring]() {
goto l320
}
if buffer[position] != rune('\'') {
goto l320
}
position++
add(rulePegText, position378)
}
{
add(ruleAction58, position)
}
}
l322:
add(ruleitem, position321)
}
return true
l320:
position, tokenIndex = position320, tokenIndex320
return false
},
/* 13 doublequotedstring <- <(('\\' '"') / ('\\' '\\') / ('\\' 'n') / ('\\' 't') / (!('"' / '\\') .))*> */
func() bool {
{
position381 := position
l382:
{
position383, tokenIndex383 := position, tokenIndex
{
position384, tokenIndex384 := position, tokenIndex
if buffer[position] != rune('\\') {
goto l385
}
position++
if buffer[position] != rune('"') {
goto l385
}
position++
goto l384
l385:
position, tokenIndex = position384, tokenIndex384
if buffer[position] != rune('\\') {
goto l386
}
position++
if buffer[position] != rune('\\') {
goto l386
}
position++
goto l384
l386:
position, tokenIndex = position384, tokenIndex384
if buffer[position] != rune('\\') {
goto l387
}
position++
if buffer[position] != rune('n') {
goto l387
}
position++
goto l384
l387:
position, tokenIndex = position384, tokenIndex384
if buffer[position] != rune('\\') {
goto l388
}
position++
if buffer[position] != rune('t') {
goto l388
}
position++
goto l384
l388:
position, tokenIndex = position384, tokenIndex384
{
position389, tokenIndex389 := position, tokenIndex
{
position390, tokenIndex390 := position, tokenIndex
if buffer[position] != rune('"') {
goto l391
}
position++
goto l390
l391:
position, tokenIndex = position390, tokenIndex390
if buffer[position] != rune('\\') {
goto l389
}
position++
}
l390:
goto l383
l389:
position, tokenIndex = position389, tokenIndex389
}
if !matchDot() {
goto l383
}
}
l384:
goto l382
l383:
position, tokenIndex = position383, tokenIndex383
}
add(ruledoublequotedstring, position381)
}
return true
},
/* 14 singlequotedstring <- <(('\\' '\'') / ('\\' '\\') / ('\\' 'n') / ('\\' 't') / (!('\'' / '\\') .))*> */
func() bool {
{
position393 := position
l394:
{
position395, tokenIndex395 := position, tokenIndex
{
position396, tokenIndex396 := position, tokenIndex
if buffer[position] != rune('\\') {
goto l397
}
position++
if buffer[position] != rune('\'') {
goto l397
}
position++
goto l396
l397:
position, tokenIndex = position396, tokenIndex396
if buffer[position] != rune('\\') {
goto l398
}
position++
if buffer[position] != rune('\\') {
goto l398
}
position++
goto l396
l398:
position, tokenIndex = position396, tokenIndex396
if buffer[position] != rune('\\') {
goto l399
}
position++
if buffer[position] != rune('n') {
goto l399
}
position++
goto l396
l399:
position, tokenIndex = position396, tokenIndex396
if buffer[position] != rune('\\') {
goto l400
}
position++
if buffer[position] != rune('t') {
goto l400
}
position++
goto l396
l400:
position, tokenIndex = position396, tokenIndex396
{
position401, tokenIndex401 := position, tokenIndex
{
position402, tokenIndex402 := position, tokenIndex
if buffer[position] != rune('\'') {
goto l403
}
position++
goto l402
l403:
position, tokenIndex = position402, tokenIndex402
if buffer[position] != rune('\\') {
goto l401
}
position++
}
l402:
goto l395
l401:
position, tokenIndex = position401, tokenIndex401
}
if !matchDot() {
goto l395
}
}
l396:
goto l394
l395:
position, tokenIndex = position395, tokenIndex395
}
add(rulesinglequotedstring, position393)
}
return true
},
/* 15 fieldExpr <- <(([a-z] / [A-Z] / '_') ([a-z] / [A-Z] / [0-9] / '_' / '-')*)> */
func() bool {
position404, tokenIndex404 := position, tokenIndex
{
position405 := position
{
position406, tokenIndex406 := position, tokenIndex
if c := buffer[position]; c < rune('a') || c > rune('z') {
goto l407
}
position++
goto l406
l407:
position, tokenIndex = position406, tokenIndex406
if c := buffer[position]; c < rune('A') || c > rune('Z') {
goto l408
}
position++
goto l406
l408:
position, tokenIndex = position406, tokenIndex406
if buffer[position] != rune('_') {
goto l404
}
position++
}
l406:
l409:
{
position410, tokenIndex410 := position, tokenIndex
{
position411, tokenIndex411 := position, tokenIndex
if c := buffer[position]; c < rune('a') || c > rune('z') {
goto l412
}
position++
goto l411
l412:
position, tokenIndex = position411, tokenIndex411
if c := buffer[position]; c < rune('A') || c > rune('Z') {
goto l413
}
position++
goto l411
l413:
position, tokenIndex = position411, tokenIndex411
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l414
}
position++
goto l411
l414:
position, tokenIndex = position411, tokenIndex411
if buffer[position] != rune('_') {
goto l415
}
position++
goto l411
l415:
position, tokenIndex = position411, tokenIndex411
if buffer[position] != rune('-') {
goto l410
}
position++
}
l411:
goto l409
l410:
position, tokenIndex = position410, tokenIndex410
}
add(rulefieldExpr, position405)
}
return true
l404:
position, tokenIndex = position404, tokenIndex404
return false
},
/* 16 field <- <(<(fieldExpr / reserved)> Action59)> */
func() bool {
position416, tokenIndex416 := position, tokenIndex
{
position417 := position
{
position418 := position
{
position419, tokenIndex419 := position, tokenIndex
if !_rules[rulefieldExpr]() {
goto l420
}
goto l419
l420:
position, tokenIndex = position419, tokenIndex419
{
position421 := position
{
position422, tokenIndex422 := position, tokenIndex
if buffer[position] != rune('_') {
goto l423
}
position++
if buffer[position] != rune('r') {
goto l423
}
position++
if buffer[position] != rune('o') {
goto l423
}
position++
if buffer[position] != rune('w') {
goto l423
}
position++
goto l422
l423:
position, tokenIndex = position422, tokenIndex422
if buffer[position] != rune('_') {
goto l424
}
position++
if buffer[position] != rune('c') {
goto l424
}
position++
if buffer[position] != rune('o') {
goto l424
}
position++
if buffer[position] != rune('l') {
goto l424
}
position++
goto l422
l424:
position, tokenIndex = position422, tokenIndex422
if buffer[position] != rune('_') {
goto l425
}
position++
if buffer[position] != rune('s') {
goto l425
}
position++
if buffer[position] != rune('t') {
goto l425
}
position++
if buffer[position] != rune('a') {
goto l425
}
position++
if buffer[position] != rune('r') {
goto l425
}
position++
if buffer[position] != rune('t') {
goto l425
}
position++
goto l422
l425:
position, tokenIndex = position422, tokenIndex422
if buffer[position] != rune('_') {
goto l426
}
position++
if buffer[position] != rune('e') {
goto l426
}
position++
if buffer[position] != rune('n') {
goto l426
}
position++
if buffer[position] != rune('d') {
goto l426
}
position++
goto l422
l426:
position, tokenIndex = position422, tokenIndex422
if buffer[position] != rune('_') {
goto l427
}
position++
if buffer[position] != rune('t') {
goto l427
}
position++
if buffer[position] != rune('i') {
goto l427
}
position++
if buffer[position] != rune('m') {
goto l427
}
position++
if buffer[position] != rune('e') {
goto l427
}
position++
if buffer[position] != rune('s') {
goto l427
}
position++
if buffer[position] != rune('t') {
goto l427
}
position++
if buffer[position] != rune('a') {
goto l427
}
position++
if buffer[position] != rune('m') {
goto l427
}
position++
if buffer[position] != rune('p') {
goto l427
}
position++
goto l422
l427:
position, tokenIndex = position422, tokenIndex422
if buffer[position] != rune('_') {
goto l416
}
position++
if buffer[position] != rune('f') {
goto l416
}
position++
if buffer[position] != rune('i') {
goto l416
}
position++
if buffer[position] != rune('e') {
goto l416
}
position++
if buffer[position] != rune('l') {
goto l416
}
position++
if buffer[position] != rune('d') {
goto l416
}
position++
}
l422:
add(rulereserved, position421)
}
}
l419:
add(rulePegText, position418)
}
{
add(ruleAction59, position)
}
add(rulefield, position417)
}
return true
l416:
position, tokenIndex = position416, tokenIndex416
return false
},
/* 17 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,
/* 18 posfield <- <(('f' 'i' 'e' 'l' 'd' '=')? <fieldExpr> Action60)> */
func() bool {
position430, tokenIndex430 := position, tokenIndex
{
position431 := position
{
position432, tokenIndex432 := position, tokenIndex
if buffer[position] != rune('f') {
goto l432
}
position++
if buffer[position] != rune('i') {
goto l432
}
position++
if buffer[position] != rune('e') {
goto l432
}
position++
if buffer[position] != rune('l') {
goto l432
}
position++
if buffer[position] != rune('d') {
goto l432
}
position++
if buffer[position] != rune('=') {
goto l432
}
position++
goto l433
l432:
position, tokenIndex = position432, tokenIndex432
}
l433:
{
position434 := position
if !_rules[rulefieldExpr]() {
goto l430
}
add(rulePegText, position434)
}
{
add(ruleAction60, position)
}
add(ruleposfield, position431)
}
return true
l430:
position, tokenIndex = position430, tokenIndex430
return false
},
/* 19 col <- <((<digits> Action61) / (<('\'' singlequotedstring '\'')> Action62) / (<('"' doublequotedstring '"')> Action63))> */
func() bool {
position436, tokenIndex436 := position, tokenIndex
{
position437 := position
{
position438, tokenIndex438 := position, tokenIndex
{
position440 := position
if !_rules[ruledigits]() {
goto l439
}
add(rulePegText, position440)
}
{
add(ruleAction61, position)
}
goto l438
l439:
position, tokenIndex = position438, tokenIndex438
{
position443 := position
if buffer[position] != rune('\'') {
goto l442
}
position++
if !_rules[rulesinglequotedstring]() {
goto l442
}
if buffer[position] != rune('\'') {
goto l442
}
position++
add(rulePegText, position443)
}
{
add(ruleAction62, position)
}
goto l438
l442:
position, tokenIndex = position438, tokenIndex438
{
position445 := position
if buffer[position] != rune('"') {
goto l436
}
position++
if !_rules[ruledoublequotedstring]() {
goto l436
}
if buffer[position] != rune('"') {
goto l436
}
position++
add(rulePegText, position445)
}
{
add(ruleAction63, position)
}
}
l438:
add(rulecol, position437)
}
return true
l436:
position, tokenIndex = position436, tokenIndex436
return false
},
/* 20 row <- <((<digits> Action64) / (<('\'' singlequotedstring '\'')> Action65) / (<('"' doublequotedstring '"')> Action66))> */
nil,
/* 21 open <- <('(' sp)> */
func() bool {
position448, tokenIndex448 := position, tokenIndex
{
position449 := position
if buffer[position] != rune('(') {
goto l448
}
position++
if !_rules[rulesp]() {
goto l448
}
add(ruleopen, position449)
}
return true
l448:
position, tokenIndex = position448, tokenIndex448
return false
},
/* 22 close <- <(sp ')' sp)> */
func() bool {
position450, tokenIndex450 := position, tokenIndex
{
position451 := position
if !_rules[rulesp]() {
goto l450
}
if buffer[position] != rune(')') {
goto l450
}
position++
if !_rules[rulesp]() {
goto l450
}
add(ruleclose, position451)
}
return true
l450:
position, tokenIndex = position450, tokenIndex450
return false
},
/* 23 sp <- <(' ' / '\t' / '\n')*> */
func() bool {
{
position453 := position
l454:
{
position455, tokenIndex455 := position, tokenIndex
{
position456, tokenIndex456 := position, tokenIndex
if buffer[position] != rune(' ') {
goto l457
}
position++
goto l456
l457:
position, tokenIndex = position456, tokenIndex456
if buffer[position] != rune('\t') {
goto l458
}
position++
goto l456
l458:
position, tokenIndex = position456, tokenIndex456
if buffer[position] != rune('\n') {
goto l455
}
position++
}
l456:
goto l454
l455:
position, tokenIndex = position455, tokenIndex455
}
add(rulesp, position453)
}
return true
},
/* 24 eq <- <(sp '=' sp)> */
func() bool {
position459, tokenIndex459 := position, tokenIndex
{
position460 := position
if !_rules[rulesp]() {
goto l459
}
if buffer[position] != rune('=') {
goto l459
}
position++
if !_rules[rulesp]() {
goto l459
}
add(ruleeq, position460)
}
return true
l459:
position, tokenIndex = position459, tokenIndex459
return false
},
/* 25 comma <- <(sp ',' sp)> */
func() bool {
position461, tokenIndex461 := position, tokenIndex
{
position462 := position
if !_rules[rulesp]() {
goto l461
}
if buffer[position] != rune(',') {
goto l461
}
position++
if !_rules[rulesp]() {
goto l461
}
add(rulecomma, position462)
}
return true
l461:
position, tokenIndex = position461, tokenIndex461
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 {
position465, tokenIndex465 := position, tokenIndex
{
position466 := position
{
position467, tokenIndex467 := position, tokenIndex
if c := buffer[position]; c < rune('a') || c > rune('z') {
goto l468
}
position++
goto l467
l468:
position, tokenIndex = position467, tokenIndex467
if c := buffer[position]; c < rune('A') || c > rune('Z') {
goto l465
}
position++
}
l467:
l469:
{
position470, tokenIndex470 := position, tokenIndex
{
position471, tokenIndex471 := position, tokenIndex
if c := buffer[position]; c < rune('a') || c > rune('z') {
goto l472
}
position++
goto l471
l472:
position, tokenIndex = position471, tokenIndex471
if c := buffer[position]; c < rune('A') || c > rune('Z') {
goto l473
}
position++
goto l471
l473:
position, tokenIndex = position471, tokenIndex471
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l470
}
position++
}
l471:
goto l469
l470:
position, tokenIndex = position470, tokenIndex470
}
add(ruleIDENT, position466)
}
return true
l465:
position, tokenIndex = position465, tokenIndex465
return false
},
/* 29 digits <- <[0-9]+> */
func() bool {
position474, tokenIndex474 := position, tokenIndex
{
position475 := position
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l474
}
position++
l476:
{
position477, tokenIndex477 := position, tokenIndex
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l477
}
position++
goto l476
l477:
position, tokenIndex = position477, tokenIndex477
}
add(ruledigits, position475)
}
return true
l474:
position, tokenIndex = position474, tokenIndex474
return false
},
/* 30 signedDigits <- <('-'? digits)> */
nil,
/* 31 decimal <- <((signedDigits ('.' digits?)?) / ('-'? '.' digits))> */
func() bool {
position479, tokenIndex479 := position, tokenIndex
{
position480 := position
{
position481, tokenIndex481 := position, tokenIndex
{
position483 := position
{
position484, tokenIndex484 := position, tokenIndex
if buffer[position] != rune('-') {
goto l484
}
position++
goto l485
l484:
position, tokenIndex = position484, tokenIndex484
}
l485:
if !_rules[ruledigits]() {
goto l482
}
add(rulesignedDigits, position483)
}
{
position486, tokenIndex486 := position, tokenIndex
if buffer[position] != rune('.') {
goto l486
}
position++
{
position488, tokenIndex488 := position, tokenIndex
if !_rules[ruledigits]() {
goto l488
}
goto l489
l488:
position, tokenIndex = position488, tokenIndex488
}
l489:
goto l487
l486:
position, tokenIndex = position486, tokenIndex486
}
l487:
goto l481
l482:
position, tokenIndex = position481, tokenIndex481
{
position490, tokenIndex490 := position, tokenIndex
if buffer[position] != rune('-') {
goto l490
}
position++
goto l491
l490:
position, tokenIndex = position490, tokenIndex490
}
l491:
if buffer[position] != rune('.') {
goto l479
}
position++
if !_rules[ruledigits]() {
goto l479
}
}
l481:
add(ruledecimal, position480)
}
return true
l479:
position, tokenIndex = position479, tokenIndex479
return false
},
/* 32 tz <- <('Z' / ('-' [0-9] [0-9] ':' [0-9] [0-9]) / ('+' [0-9] [0-9] ':' [0-9] [0-9]))> */
func() bool {
position492, tokenIndex492 := position, tokenIndex
{
position493 := position
{
position494, tokenIndex494 := position, tokenIndex
if buffer[position] != rune('Z') {
goto l495
}
position++
goto l494
l495:
position, tokenIndex = position494, tokenIndex494
if buffer[position] != rune('-') {
goto l496
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l496
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l496
}
position++
if buffer[position] != rune(':') {
goto l496
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l496
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l496
}
position++
goto l494
l496:
position, tokenIndex = position494, tokenIndex494
if buffer[position] != rune('+') {
goto l492
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l492
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l492
}
position++
if buffer[position] != rune(':') {
goto l492
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l492
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l492
}
position++
}
l494:
add(ruletz, position493)
}
return true
l492:
position, tokenIndex = position492, tokenIndex492
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 {
position499, tokenIndex499 := position, tokenIndex
{
position500 := position
{
position501, tokenIndex501 := position, tokenIndex
{
position503 := position
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l502
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l502
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l502
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l502
}
position++
if buffer[position] != rune('-') {
goto l502
}
position++
{
position504, tokenIndex504 := position, tokenIndex
if buffer[position] != rune('0') {
goto l505
}
position++
goto l504
l505:
position, tokenIndex = position504, tokenIndex504
if buffer[position] != rune('1') {
goto l502
}
position++
}
l504:
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l502
}
position++
if buffer[position] != rune('-') {
goto l502
}
position++
if c := buffer[position]; c < rune('0') || c > rune('3') {
goto l502
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l502
}
position++
if buffer[position] != rune('T') {
goto l502
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l502
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l502
}
position++
if buffer[position] != rune(':') {
goto l502
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l502
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l502
}
position++
if buffer[position] != rune(':') {
goto l502
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l502
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l502
}
position++
if buffer[position] != rune('.') {
goto l502
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l502
}
position++
l506:
{
position507, tokenIndex507 := position, tokenIndex
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l507
}
position++
goto l506
l507:
position, tokenIndex = position507, tokenIndex507
}
{
position508 := position
if !_rules[ruletz]() {
goto l502
}
add(rulePegText, position508)
}
add(ruleiso8601nano, position503)
}
goto l501
l502:
position, tokenIndex = position501, tokenIndex501
{
position509 := position
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l499
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l499
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l499
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l499
}
position++
if buffer[position] != rune('-') {
goto l499
}
position++
{
position510, tokenIndex510 := position, tokenIndex
if buffer[position] != rune('0') {
goto l511
}
position++
goto l510
l511:
position, tokenIndex = position510, tokenIndex510
if buffer[position] != rune('1') {
goto l499
}
position++
}
l510:
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l499
}
position++
if buffer[position] != rune('-') {
goto l499
}
position++
if c := buffer[position]; c < rune('0') || c > rune('3') {
goto l499
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l499
}
position++
if buffer[position] != rune('T') {
goto l499
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l499
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l499
}
position++
if buffer[position] != rune(':') {
goto l499
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l499
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l499
}
position++
if buffer[position] != rune(':') {
goto l499
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l499
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l499
}
position++
{
position512 := position
if !_rules[ruletz]() {
goto l499
}
add(rulePegText, position512)
}
add(ruleiso8601, position509)
}
}
l501:
add(ruletimestampbasicfmt, position500)
}
return true
l499:
position, tokenIndex = position499, tokenIndex499
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 {
position514, tokenIndex514 := position, tokenIndex
{
position515 := position
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l514
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l514
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l514
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l514
}
position++
if buffer[position] != rune('-') {
goto l514
}
position++
{
position516, tokenIndex516 := position, tokenIndex
if buffer[position] != rune('0') {
goto l517
}
position++
goto l516
l517:
position, tokenIndex = position516, tokenIndex516
if buffer[position] != rune('1') {
goto l514
}
position++
}
l516:
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l514
}
position++
if buffer[position] != rune('-') {
goto l514
}
position++
if c := buffer[position]; c < rune('0') || c > rune('3') {
goto l514
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l514
}
position++
if buffer[position] != rune('T') {
goto l514
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l514
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l514
}
position++
if buffer[position] != rune(':') {
goto l514
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l514
}
position++
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l514
}
position++
add(ruletimebasicfmt, position515)
}
return true
l514:
position, tokenIndex = position514, tokenIndex514
return false
},
/* 38 timefmt <- <(('"' <timebasicfmt> '"') / ('\'' <timebasicfmt> '\'') / <timebasicfmt>)> */
func() bool {
position518, tokenIndex518 := position, tokenIndex
{
position519 := position
{
position520, tokenIndex520 := position, tokenIndex
if buffer[position] != rune('"') {
goto l521
}
position++
{
position522 := position
if !_rules[ruletimebasicfmt]() {
goto l521
}
add(rulePegText, position522)
}
if buffer[position] != rune('"') {
goto l521
}
position++
goto l520
l521:
position, tokenIndex = position520, tokenIndex520
if buffer[position] != rune('\'') {
goto l523
}
position++
{
position524 := position
if !_rules[ruletimebasicfmt]() {
goto l523
}
add(rulePegText, position524)
}
if buffer[position] != rune('\'') {
goto l523
}
position++
goto l520
l523:
position, tokenIndex = position520, tokenIndex520
{
position525 := position
if !_rules[ruletimebasicfmt]() {
goto l518
}
add(rulePegText, position525)
}
}
l520:
add(ruletimefmt, position519)
}
return true
l518:
position, tokenIndex = position518, tokenIndex518
return false
},
/* 39 time <- <(<timefmt> Action67)> */
nil,
/* 41 Action0 <- <{p.startCall("Set")}> */
nil,
/* 42 Action1 <- <{p.endCall()}> */
nil,
/* 43 Action2 <- <{p.startCall("SetRowAttrs")}> */
nil,
/* 44 Action3 <- <{p.endCall()}> */
nil,
/* 45 Action4 <- <{p.startCall("SetColumnAttrs")}> */
nil,
/* 46 Action5 <- <{p.endCall()}> */
nil,
/* 47 Action6 <- <{p.startCall("Clear")}> */
nil,
/* 48 Action7 <- <{p.endCall()}> */
nil,
/* 49 Action8 <- <{p.startCall("ClearRow")}> */
nil,
/* 50 Action9 <- <{p.endCall()}> */
nil,
/* 51 Action10 <- <{p.startCall("Store")}> */
nil,
/* 52 Action11 <- <{p.endCall()}> */
nil,
/* 53 Action12 <- <{p.startCall("TopN")}> */
nil,
/* 54 Action13 <- <{p.endCall()}> */
nil,
/* 55 Action14 <- <{p.startCall("TopK")}> */
nil,
/* 56 Action15 <- <{p.endCall()}> */
nil,
/* 57 Action16 <- <{p.startCall("Percentile")}> */
nil,
/* 58 Action17 <- <{p.endCall()}> */
nil,
/* 59 Action18 <- <{p.startCall("Rows")}> */
nil,
/* 60 Action19 <- <{p.endCall()}> */
nil,
/* 61 Action20 <- <{p.startCall("Min")}> */
nil,
/* 62 Action21 <- <{p.endCall()}> */
nil,
/* 63 Action22 <- <{p.startCall("Max")}> */
nil,
/* 64 Action23 <- <{p.endCall()}> */
nil,
/* 65 Action24 <- <{p.startCall("Sum")}> */
nil,
/* 66 Action25 <- <{p.endCall()}> */
nil,
/* 67 Action26 <- <{p.startCall("Range")}> */
nil,
/* 68 Action27 <- <{p.addField("from")}> */
nil,
/* 69 Action28 <- <{p.addVal(text)}> */
nil,
/* 70 Action29 <- <{p.addField("to")}> */
nil,
/* 71 Action30 <- <{p.addVal(text)}> */
nil,
/* 72 Action31 <- <{p.endCall()}> */
nil,
nil,
/* 74 Action32 <- <{ p.startCall(text) }> */
nil,
/* 75 Action33 <- <{ p.endCall() }> */
nil,
/* 76 Action34 <- <{ p.addBTWN() }> */
nil,
/* 77 Action35 <- <{ p.addLTE() }> */
nil,
/* 78 Action36 <- <{ p.addGTE() }> */
nil,
/* 79 Action37 <- <{ p.addEQ() }> */
nil,
/* 80 Action38 <- <{ p.addNEQ() }> */
nil,
/* 81 Action39 <- <{ p.addLT() }> */
nil,
/* 82 Action40 <- <{ p.addGT() }> */
nil,
/* 83 Action41 <- <{p.startConditional()}> */
nil,
/* 84 Action42 <- <{p.endConditional()}> */
nil,
/* 85 Action43 <- <{p.condAdd(text)}> */
nil,
/* 86 Action44 <- <{p.condAdd(text)}> */
nil,
/* 87 Action45 <- <{p.condAdd(text)}> */
nil,
/* 88 Action46 <- <{ p.startList() }> */
nil,
/* 89 Action47 <- <{ p.endList() }> */
nil,
/* 90 Action48 <- <{ p.addVal(nil) }> */
nil,
/* 91 Action49 <- <{ p.addVal(true) }> */
nil,
/* 92 Action50 <- <{ p.addVal(false) }> */
nil,
/* 93 Action51 <- <{ p.addVal(text) }> */
nil,
/* 94 Action52 <- <{ p.addTimestampVal(text) }> */
nil,
/* 95 Action53 <- <{ p.addNumVal(text) }> */
nil,
/* 96 Action54 <- <{ p.startCall(text) }> */
nil,
/* 97 Action55 <- <{ p.addVal(p.endCall()) }> */
nil,
/* 98 Action56 <- <{ p.addVal(text) }> */
nil,
/* 99 Action57 <- <{ p.addVal(text) }> */
nil,
/* 100 Action58 <- <{ p.addVal(text) }> */
nil,
/* 101 Action59 <- <{ p.addField(text) }> */
nil,
/* 102 Action60 <- <{ p.addPosStr("_field", text) }> */
nil,
/* 103 Action61 <- <{p.addPosNum("_col", text)}> */
nil,
/* 104 Action62 <- <{p.addPosStr("_col", text)}> */
nil,
/* 105 Action63 <- <{p.addPosStr("_col", text)}> */
nil,
/* 106 Action64 <- <{p.addPosNum("_row", text)}> */
nil,
/* 107 Action65 <- <{p.addPosStr("_row", text)}> */
nil,
/* 108 Action66 <- <{p.addPosStr("_row", text)}> */
nil,
/* 109 Action67 <- <{p.addPosStr("_timestamp", text)}> */
nil,
}
p.rules = _rules
return nil
}