• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

AsaiYusuke / jsonpath / 6628515538

24 Oct 2023 02:44PM UTC coverage: 97.418% (-0.2%) from 97.648%
6628515538

push

github

web-flow
update peg, and use options (-inline -switch) (#36)

1434 of 1434 new or added lines in 1 file covered. (100.0%)

3433 of 3524 relevant lines covered (97.42%)

778.48 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

95.79
/jsonpath.peg.go
1
package jsonpath
2

3
// Code generated by peg -inline -switch jsonpath.peg DO NOT EDIT.
4

5
import (
6
        "bytes"
7
        "fmt"
8
        "io"
9
        "os"
10
        "sort"
11
        "strconv"
12
)
13

14
const endSymbol rune = 1114112
15

16
/* The rule types inferred from the grammar are below. */
17
type pegRule uint8
18

19
const (
20
        ruleUnknown pegRule = iota
21
        ruleexpression
22
        ruleEND
23
        rulejsonpath
24
        rulejsonpathParameter
25
        rulecontinuedJsonpath
26
        rulerootNode
27
        ruleparameterRootNode
28
        rulechildNode
29
        rulefunction
30
        rulefunctionName
31
        rulebracketNode
32
        rulerootIdentifier
33
        rulecurrentRootIdentifier
34
        ruledotChildIdentifier
35
        rulesignsWithoutHyphenUnderscore
36
        rulebracketChildIdentifier
37
        rulebracketNodeIdentifier
38
        rulewildcardIdentifier
39
        rulesingleQuotedNodeIdentifier
40
        ruledoubleQuotedNodeIdentifier
41
        rulehexDigits
42
        rulehexDigit
43
        rulequalifier
44
        ruleunion
45
        ruleindex
46
        ruleslice
47
        ruleanyIndex
48
        ruleindexNumber
49
        rulesep
50
        rulesepSlice
51
        rulescript
52
        rulecommand
53
        rulefilter
54
        rulequery
55
        ruleandQuery
56
        rulebasicQuery
57
        rulelogicOr
58
        rulelogicAnd
59
        rulelogicNot
60
        rulecomparator
61
        ruleqParam
62
        ruleqNumericParam
63
        ruleqLiteral
64
        rulesingleJsonpathFilter
65
        rulejsonpathFilter
66
        rulelNumber
67
        rulelBool
68
        rulelString
69
        rulelNull
70
        ruleregex
71
        rulesquareBracketStart
72
        rulesquareBracketEnd
73
        rulescriptStart
74
        rulescriptEnd
75
        rulefilterStart
76
        rulefilterEnd
77
        rulesubQueryStart
78
        rulesubQueryEnd
79
        rulespace
80
        ruleAction0
81
        rulePegText
82
        ruleAction1
83
        ruleAction2
84
        ruleAction3
85
        ruleAction4
86
        ruleAction5
87
        ruleAction6
88
        ruleAction7
89
        ruleAction8
90
        ruleAction9
91
        ruleAction10
92
        ruleAction11
93
        ruleAction12
94
        ruleAction13
95
        ruleAction14
96
        ruleAction15
97
        ruleAction16
98
        ruleAction17
99
        ruleAction18
100
        ruleAction19
101
        ruleAction20
102
        ruleAction21
103
        ruleAction22
104
        ruleAction23
105
        ruleAction24
106
        ruleAction25
107
        ruleAction26
108
        ruleAction27
109
        ruleAction28
110
        ruleAction29
111
        ruleAction30
112
        ruleAction31
113
        ruleAction32
114
        ruleAction33
115
        ruleAction34
116
        ruleAction35
117
        ruleAction36
118
        ruleAction37
119
        ruleAction38
120
        ruleAction39
121
        ruleAction40
122
        ruleAction41
123
        ruleAction42
124
        ruleAction43
125
        ruleAction44
126
        ruleAction45
127
)
128

129
var rul3s = [...]string{
130
        "Unknown",
131
        "expression",
132
        "END",
133
        "jsonpath",
134
        "jsonpathParameter",
135
        "continuedJsonpath",
136
        "rootNode",
137
        "parameterRootNode",
138
        "childNode",
139
        "function",
140
        "functionName",
141
        "bracketNode",
142
        "rootIdentifier",
143
        "currentRootIdentifier",
144
        "dotChildIdentifier",
145
        "signsWithoutHyphenUnderscore",
146
        "bracketChildIdentifier",
147
        "bracketNodeIdentifier",
148
        "wildcardIdentifier",
149
        "singleQuotedNodeIdentifier",
150
        "doubleQuotedNodeIdentifier",
151
        "hexDigits",
152
        "hexDigit",
153
        "qualifier",
154
        "union",
155
        "index",
156
        "slice",
157
        "anyIndex",
158
        "indexNumber",
159
        "sep",
160
        "sepSlice",
161
        "script",
162
        "command",
163
        "filter",
164
        "query",
165
        "andQuery",
166
        "basicQuery",
167
        "logicOr",
168
        "logicAnd",
169
        "logicNot",
170
        "comparator",
171
        "qParam",
172
        "qNumericParam",
173
        "qLiteral",
174
        "singleJsonpathFilter",
175
        "jsonpathFilter",
176
        "lNumber",
177
        "lBool",
178
        "lString",
179
        "lNull",
180
        "regex",
181
        "squareBracketStart",
182
        "squareBracketEnd",
183
        "scriptStart",
184
        "scriptEnd",
185
        "filterStart",
186
        "filterEnd",
187
        "subQueryStart",
188
        "subQueryEnd",
189
        "space",
190
        "Action0",
191
        "PegText",
192
        "Action1",
193
        "Action2",
194
        "Action3",
195
        "Action4",
196
        "Action5",
197
        "Action6",
198
        "Action7",
199
        "Action8",
200
        "Action9",
201
        "Action10",
202
        "Action11",
203
        "Action12",
204
        "Action13",
205
        "Action14",
206
        "Action15",
207
        "Action16",
208
        "Action17",
209
        "Action18",
210
        "Action19",
211
        "Action20",
212
        "Action21",
213
        "Action22",
214
        "Action23",
215
        "Action24",
216
        "Action25",
217
        "Action26",
218
        "Action27",
219
        "Action28",
220
        "Action29",
221
        "Action30",
222
        "Action31",
223
        "Action32",
224
        "Action33",
225
        "Action34",
226
        "Action35",
227
        "Action36",
228
        "Action37",
229
        "Action38",
230
        "Action39",
231
        "Action40",
232
        "Action41",
233
        "Action42",
234
        "Action43",
235
        "Action44",
236
        "Action45",
237
}
238

239
type token32 struct {
240
        pegRule
241
        begin, end uint32
242
}
243

244
func (t *token32) String() string {
11✔
245
        return fmt.Sprintf("\x1B[34m%v\x1B[m %v %v", rul3s[t.pegRule], t.begin, t.end)
11✔
246
}
11✔
247

248
type node32 struct {
249
        token32
250
        up, next *node32
251
}
252

253
func (node *node32) print(w io.Writer, pretty bool, buffer string) {
4✔
254
        var print func(node *node32, depth int)
4✔
255
        print = func(node *node32, depth int) {
17✔
256
                for node != nil {
25✔
257
                        for c := 0; c < depth; c++ {
30✔
258
                                fmt.Fprintf(w, " ")
18✔
259
                        }
18✔
260
                        rule := rul3s[node.pegRule]
12✔
261
                        quote := strconv.Quote(string(([]rune(buffer)[node.begin:node.end])))
12✔
262
                        if !pretty {
20✔
263
                                fmt.Fprintf(w, "%v %v\n", rule, quote)
8✔
264
                        } else {
12✔
265
                                fmt.Fprintf(w, "\x1B[36m%v\x1B[m %v\n", rule, quote)
4✔
266
                        }
4✔
267
                        if node.up != nil {
21✔
268
                                print(node.up, depth+1)
9✔
269
                        }
9✔
270
                        node = node.next
12✔
271
                }
272
        }
273
        print(node, 0)
4✔
274
}
275

276
func (node *node32) Print(w io.Writer, buffer string) {
2✔
277
        node.print(w, false, buffer)
2✔
278
}
2✔
279

280
func (node *node32) PrettyPrint(w io.Writer, buffer string) {
2✔
281
        node.print(w, true, buffer)
2✔
282
}
2✔
283

284
type tokens32 struct {
285
        tree []token32
286
}
287

288
func (t *tokens32) Trim(length uint32) {
1,241✔
289
        t.tree = t.tree[:length]
1,241✔
290
}
1,241✔
291

292
func (t *tokens32) Print() {
1✔
293
        for _, token := range t.tree {
12✔
294
                fmt.Println(token.String())
11✔
295
        }
11✔
296
}
297

298
func (t *tokens32) AST() *node32 {
4✔
299
        type element struct {
4✔
300
                node *node32
4✔
301
                down *element
4✔
302
        }
4✔
303
        tokens := t.Tokens()
4✔
304
        var stack *element
4✔
305
        for _, token := range tokens {
38✔
306
                if token.begin == token.end {
56✔
307
                        continue
22✔
308
                }
309
                node := &node32{token32: token}
12✔
310
                for stack != nil && stack.node.begin >= token.begin && stack.node.end <= token.end {
21✔
311
                        stack.node.next = node.up
9✔
312
                        node.up = stack.node
9✔
313
                        stack = stack.down
9✔
314
                }
9✔
315
                stack = &element{node: node, down: stack}
12✔
316
        }
317
        if stack != nil {
7✔
318
                return stack.node
3✔
319
        }
3✔
320
        return nil
1✔
321
}
322

323
func (t *tokens32) PrintSyntaxTree(buffer string) {
1✔
324
        t.AST().Print(os.Stdout, buffer)
1✔
325
}
1✔
326

327
func (t *tokens32) WriteSyntaxTree(w io.Writer, buffer string) {
1✔
328
        t.AST().Print(w, buffer)
1✔
329
}
1✔
330

331
func (t *tokens32) PrettyPrintSyntaxTree(buffer string) {
2✔
332
        t.AST().PrettyPrint(os.Stdout, buffer)
2✔
333
}
2✔
334

335
func (t *tokens32) Add(rule pegRule, begin, end, index uint32) {
57,545✔
336
        tree, i := t.tree, int(index)
57,545✔
337
        if i >= len(tree) {
94,134✔
338
                t.tree = append(tree, token32{pegRule: rule, begin: begin, end: end})
36,589✔
339
                return
36,589✔
340
        }
36,589✔
341
        tree[i] = token32{pegRule: rule, begin: begin, end: end}
20,956✔
342
}
343

344
func (t *tokens32) Tokens() []token32 {
1,244✔
345
        return t.tree
1,244✔
346
}
1,244✔
347

348
type pegJSONPathParser struct {
349
        jsonPathParser
350

351
        Buffer         string
352
        buffer         []rune
353
        rules          [107]func() bool
354
        parse          func(rule ...int) error
355
        reset          func()
356
        Pretty         bool
357
        disableMemoize bool
358
        tokens32
359
}
360

361
func (p *pegJSONPathParser) Parse(rule ...int) error {
1,242✔
362
        return p.parse(rule...)
1,242✔
363
}
1,242✔
364

365
func (p *pegJSONPathParser) Reset() {
1,239✔
366
        p.reset()
1,239✔
367
}
1,239✔
368

369
type textPosition struct {
370
        line, symbol int
371
}
372

373
type textPositionMap map[int]textPosition
374

375
func translatePositions(buffer []rune, positions []int) textPositionMap {
3✔
376
        length, translations, j, line, symbol := len(positions), make(textPositionMap, len(positions)), 0, 1, 0
3✔
377
        sort.Ints(positions)
3✔
378

3✔
379
search:
3✔
380
        for i, c := range buffer {
7✔
381
                if c == '\n' {
6✔
382
                        line, symbol = line+1, 0
2✔
383
                } else {
4✔
384
                        symbol++
2✔
385
                }
2✔
386
                if i == positions[j] {
8✔
387
                        translations[positions[j]] = textPosition{line, symbol}
4✔
388
                        for j++; j < length; j++ {
7✔
389
                                if i != positions[j] {
6✔
390
                                        continue search
3✔
391
                                }
392
                        }
393
                        break search
1✔
394
                }
395
        }
396

397
        return translations
3✔
398
}
399

400
type parseError struct {
401
        p   *pegJSONPathParser
402
        max token32
403
}
404

405
func (e *parseError) Error() string {
3✔
406
        tokens, err := []token32{e.max}, "\n"
3✔
407
        positions, p := make([]int, 2*len(tokens)), 0
3✔
408
        for _, token := range tokens {
6✔
409
                positions[p], p = int(token.begin), p+1
3✔
410
                positions[p], p = int(token.end), p+1
3✔
411
        }
3✔
412
        translations := translatePositions(e.p.buffer, positions)
3✔
413
        format := "parse error near %v (line %v symbol %v - line %v symbol %v):\n%v\n"
3✔
414
        if e.p.Pretty {
4✔
415
                format = "parse error near \x1B[34m%v\x1B[m (line %v symbol %v - line %v symbol %v):\n%v\n"
1✔
416
        }
1✔
417
        for _, token := range tokens {
6✔
418
                begin, end := int(token.begin), int(token.end)
3✔
419
                err += fmt.Sprintf(format,
3✔
420
                        rul3s[token.pegRule],
3✔
421
                        translations[begin].line, translations[begin].symbol,
3✔
422
                        translations[end].line, translations[end].symbol,
3✔
423
                        strconv.Quote(string(e.p.buffer[begin:end])))
3✔
424
        }
3✔
425

426
        return err
3✔
427
}
428

429
func (p *pegJSONPathParser) PrintSyntaxTree() {
3✔
430
        if p.Pretty {
5✔
431
                p.tokens32.PrettyPrintSyntaxTree(p.Buffer)
2✔
432
        } else {
3✔
433
                p.tokens32.PrintSyntaxTree(p.Buffer)
1✔
434
        }
1✔
435
}
436

437
func (p *pegJSONPathParser) WriteSyntaxTree(w io.Writer) {
1✔
438
        p.tokens32.WriteSyntaxTree(w, p.Buffer)
1✔
439
}
1✔
440

441
func (p *pegJSONPathParser) SprintSyntaxTree() string {
1✔
442
        var b bytes.Buffer
1✔
443
        p.WriteSyntaxTree(&b)
1✔
444
        return b.String()
1✔
445
}
1✔
446

447
func (p *pegJSONPathParser) Execute() {
1,240✔
448
        buffer, _buffer, text, begin, end := p.Buffer, p.buffer, "", 0, 0
1,240✔
449
        for _, token := range p.Tokens() {
51,910✔
450
                switch token.pegRule {
50,670✔
451

452
                case rulePegText:
4,922✔
453
                        begin, end = int(token.begin), int(token.end)
4,922✔
454
                        text = string(_buffer[begin:end])
4,922✔
455

456
                case ruleAction0:
971✔
457

971✔
458
                        p.root = p.deleteRootIdentifier(p.pop().(syntaxNode))
971✔
459
                        p.setConnectedText(p.root)
971✔
460

461
                case ruleAction1:
200✔
462

200✔
463
                        panic(p.syntaxErr(
200✔
464
                                begin, msgErrorInvalidSyntaxUnrecognizedInput, buffer))
200✔
465

466
                case ruleAction2:
1,677✔
467

1,677✔
468
                        p.setNodeChain()
1,677✔
469
                        p.updateRootValueGroup()
1,677✔
470

471
                case ruleAction3:
127✔
472

127✔
473
                        p.pushRecursiveChildIdentifier(p.pop().(syntaxNode))
127✔
474

475
                case ruleAction4:
715✔
476

715✔
477
                        p.setLastNodeText(text)
715✔
478

479
                case ruleAction5:
76✔
480

76✔
481
                        p.pushFunction(text, p.pop().(string))
76✔
482

483
                case ruleAction6:
76✔
484

76✔
485
                        p.push(text)
76✔
486

487
                case ruleAction7:
1,090✔
488

1,090✔
489
                        p.setLastNodeText(text)
1,090✔
490

491
                case ruleAction8:
1,304✔
492

1,304✔
493
                        p.pushRootIdentifier()
1,304✔
494

495
                case ruleAction9:
438✔
496

438✔
497
                        p.pushCurrentRootIdentifier()
438✔
498

499
                case ruleAction10:
676✔
500

676✔
501
                        p.pushChildSingleIdentifier(p.unescape(text))
676✔
502

503
                case ruleAction11:
151✔
504

151✔
505
                        identifier2 := p.pop().(syntaxNode)
151✔
506
                        identifier1 := p.pop().(syntaxNode)
151✔
507
                        p.pushChildMultiIdentifier(identifier1, identifier2)
151✔
508

509
                case ruleAction12:
249✔
510

249✔
511
                        p.pushChildWildcardIdentifier()
249✔
512

513
                case ruleAction13:
327✔
514

327✔
515
                        p.pushChildSingleIdentifier(p.unescapeSingleQuotedString(text))
327✔
516

517
                case ruleAction14:
22✔
518

22✔
519
                        p.pushChildSingleIdentifier(p.unescapeDoubleQuotedString(text))
22✔
520

521
                case ruleAction15:
109✔
522

109✔
523
                        childIndexUnion := p.pop().(*syntaxUnionQualifier)
109✔
524
                        parentIndexUnion := p.pop().(*syntaxUnionQualifier)
109✔
525
                        parentIndexUnion.merge(childIndexUnion)
109✔
526
                        parentIndexUnion.setValueGroup()
109✔
527
                        p.push(parentIndexUnion)
109✔
528

529
                case ruleAction16:
235✔
530

235✔
531
                        step := p.pop().(*syntaxIndexSubscript)
235✔
532
                        end := p.pop().(*syntaxIndexSubscript)
235✔
533
                        start := p.pop().(*syntaxIndexSubscript)
235✔
534

235✔
535
                        if step.isOmitted {
237✔
536
                                step.number = 1
2✔
537
                        }
2✔
538

539
                        if step.number >= 0 {
413✔
540
                                p.pushSlicePositiveStepSubscript(start, end, step)
178✔
541
                        } else {
235✔
542
                                p.pushSliceNegativeStepSubscript(start, end, step)
57✔
543
                        }
57✔
544

545
                case ruleAction17:
289✔
546

289✔
547
                        p.pushIndexSubscript(text)
289✔
548

549
                case ruleAction18:
14✔
550

14✔
551
                        p.pushWildcardSubscript()
14✔
552

553
                case ruleAction19:
536✔
554

536✔
555
                        p.pushUnionQualifier(p.pop().(syntaxSubscript))
536✔
556

557
                case ruleAction20:
160✔
558

160✔
559
                        p.pushIndexSubscript(`1`)
160✔
560

561
                case ruleAction21:
551✔
562

551✔
563
                        if len(text) > 0 {
1,065✔
564
                                p.pushIndexSubscript(text)
514✔
565
                        } else {
551✔
566
                                p.pushOmittedIndexSubscript(`0`)
37✔
567
                        }
37✔
568

569
                case ruleAction22:
3✔
570

3✔
571
                        p.pushScriptQualifier(text)
3✔
572

573
                case ruleAction23:
356✔
574

356✔
575
                        p.pushFilterQualifier(p.pop().(syntaxQuery))
356✔
576

577
                case ruleAction24:
30✔
578

30✔
579
                        rightQuery := p.pop().(syntaxQuery)
30✔
580
                        leftQuery := p.pop().(syntaxQuery)
30✔
581
                        p.pushLogicalOr(leftQuery, rightQuery)
30✔
582

583
                case ruleAction25:
27✔
584

27✔
585
                        rightQuery := p.pop().(syntaxQuery)
27✔
586
                        leftQuery := p.pop().(syntaxQuery)
27✔
587
                        p.pushLogicalAnd(leftQuery, rightQuery)
27✔
588

589
                case ruleAction26:
217✔
590

217✔
591
                        query := p.pop()
217✔
592
                        p.push(query)
217✔
593

217✔
594
                        if logicalNot, ok := query.(*syntaxLogicalNot); ok {
232✔
595
                                query = (*logicalNot).query
15✔
596
                        }
15✔
597
                        if checkQuery, ok := query.(*syntaxBasicCompareQuery); ok {
434✔
598
                                _, leftIsCurrentRoot := checkQuery.leftParam.param.(*syntaxQueryParamCurrentRoot)
217✔
599
                                _, rightIsCurrentRoot := checkQuery.rightParam.param.(*syntaxQueryParamCurrentRoot)
217✔
600
                                if leftIsCurrentRoot && rightIsCurrentRoot {
218✔
601
                                        panic(p.syntaxErr(
1✔
602
                                                begin, msgErrorInvalidSyntaxTwoCurrentNode, buffer))
1✔
603
                                }
604
                        }
605

606
                case ruleAction27:
197✔
607

197✔
608
                        _ = p.pop()
197✔
609
                        jsonpathFilter := p.pop().(syntaxQuery)
197✔
610

197✔
611
                        if text[0:1] == `!` {
228✔
612
                                p.pushLogicalNot(jsonpathFilter)
31✔
613
                        } else {
197✔
614
                                p.push(jsonpathFilter)
166✔
615
                        }
166✔
616

617
                case ruleAction28:
95✔
618

95✔
619
                        rightParam := p.pop().(*syntaxBasicCompareParameter)
95✔
620
                        leftParam := p.pop().(*syntaxBasicCompareParameter)
95✔
621
                        if leftParam.isLiteral {
112✔
622
                                p.pushCompareEQ(rightParam, leftParam)
17✔
623
                        } else {
95✔
624
                                p.pushCompareEQ(leftParam, rightParam)
78✔
625
                        }
78✔
626

627
                case ruleAction29:
15✔
628

15✔
629
                        rightParam := p.pop().(*syntaxBasicCompareParameter)
15✔
630
                        leftParam := p.pop().(*syntaxBasicCompareParameter)
15✔
631
                        if leftParam.isLiteral {
21✔
632
                                p.pushCompareNE(rightParam, leftParam)
6✔
633
                        } else {
15✔
634
                                p.pushCompareNE(leftParam, rightParam)
9✔
635
                        }
9✔
636

637
                case ruleAction30:
10✔
638

10✔
639
                        rightParam := p.pop().(*syntaxBasicCompareParameter)
10✔
640
                        leftParam := p.pop().(*syntaxBasicCompareParameter)
10✔
641
                        if leftParam.isLiteral {
15✔
642
                                p.pushCompareLE(rightParam, leftParam)
5✔
643
                        } else {
10✔
644
                                p.pushCompareGE(leftParam, rightParam)
5✔
645
                        }
5✔
646

647
                case ruleAction31:
26✔
648

26✔
649
                        rightParam := p.pop().(*syntaxBasicCompareParameter)
26✔
650
                        leftParam := p.pop().(*syntaxBasicCompareParameter)
26✔
651
                        if leftParam.isLiteral {
32✔
652
                                p.pushCompareLT(rightParam, leftParam)
6✔
653
                        } else {
26✔
654
                                p.pushCompareGT(leftParam, rightParam)
20✔
655
                        }
20✔
656

657
                case ruleAction32:
10✔
658

10✔
659
                        rightParam := p.pop().(*syntaxBasicCompareParameter)
10✔
660
                        leftParam := p.pop().(*syntaxBasicCompareParameter)
10✔
661
                        if leftParam.isLiteral {
15✔
662
                                p.pushCompareGE(rightParam, leftParam)
5✔
663
                        } else {
10✔
664
                                p.pushCompareLE(leftParam, rightParam)
5✔
665
                        }
5✔
666

667
                case ruleAction33:
51✔
668

51✔
669
                        rightParam := p.pop().(*syntaxBasicCompareParameter)
51✔
670
                        leftParam := p.pop().(*syntaxBasicCompareParameter)
51✔
671
                        if leftParam.isLiteral {
56✔
672
                                p.pushCompareGT(rightParam, leftParam)
5✔
673
                        } else {
51✔
674
                                p.pushCompareLT(leftParam, rightParam)
46✔
675
                        }
46✔
676

677
                case ruleAction34:
11✔
678

11✔
679
                        leftParam := p.pop().(*syntaxBasicCompareParameter)
11✔
680
                        p.pushCompareRegex(leftParam, text)
11✔
681

682
                case ruleAction35:
91✔
683

91✔
684
                        p.pushCompareParameterLiteral(p.pop())
91✔
685

686
                case ruleAction36:
73✔
687

73✔
688
                        p.pushCompareParameterLiteral(p.pop())
73✔
689

690
                case ruleAction37:
315✔
691

315✔
692
                        isLiteral := p.pop().(bool)
315✔
693
                        param := p.pop().(syntaxQueryJSONPathParameter)
315✔
694
                        if param.isValueGroupParameter() {
368✔
695
                                panic(p.syntaxErr(
53✔
696
                                        begin, msgErrorInvalidSyntaxFilterValueGroup, buffer))
53✔
697
                        }
698
                        p.pushBasicCompareParameter(param.(syntaxQuery), isLiteral)
262✔
699

700
                case ruleAction38:
512✔
701

512✔
702
                        p.saveParams()
512✔
703

704
                case ruleAction39:
512✔
705

512✔
706
                        p.loadParams()
512✔
707

512✔
708
                        node := p.pop().(syntaxNode)
512✔
709
                        checkNode := node
512✔
710
                        if aggregateFunction, ok := node.(*syntaxAggregateFunction); ok {
518✔
711
                                checkNode = aggregateFunction.param
6✔
712
                        }
6✔
713

714
                        switch checkNode.(type) {
512✔
715
                        case *syntaxRootIdentifier:
74✔
716
                                p.pushCompareParameterRoot(p.deleteRootIdentifier(node))
74✔
717
                                p.push(true)
74✔
718
                        case *syntaxCurrentRootIdentifier:
438✔
719
                                p.pushCompareParameterCurrentRoot(p.deleteRootIdentifier(node))
438✔
720
                                p.push(false)
438✔
721
                        }
722

723
                case ruleAction40:
142✔
724

142✔
725
                        p.push(p.toFloat(text))
142✔
726

727
                case ruleAction41:
3✔
728

3✔
729
                        p.push(true)
3✔
730

731
                case ruleAction42:
3✔
732

3✔
733
                        p.push(false)
3✔
734

735
                case ruleAction43:
9✔
736

9✔
737
                        p.push(p.unescape(text))
9✔
738

739
                case ruleAction44:
6✔
740

6✔
741
                        p.push(p.unescape(text))
6✔
742

743
                case ruleAction45:
3✔
744

3✔
745
                        p.push(nil)
3✔
746

747
                }
748
        }
749
        _, _, _, _, _ = buffer, _buffer, text, begin, end
971✔
750
}
751

752
func Pretty(pretty bool) func(*pegJSONPathParser) error {
1✔
753
        return func(p *pegJSONPathParser) error {
2✔
754
                p.Pretty = pretty
1✔
755
                return nil
1✔
756
        }
1✔
757
}
758

759
func Size(size int) func(*pegJSONPathParser) error {
1✔
760
        return func(p *pegJSONPathParser) error {
2✔
761
                p.tokens32 = tokens32{tree: make([]token32, 0, size)}
1✔
762
                return nil
1✔
763
        }
1✔
764
}
765

766
func DisableMemoize() func(*pegJSONPathParser) error {
×
767
        return func(p *pegJSONPathParser) error {
×
768
                p.disableMemoize = true
×
769
                return nil
×
770
        }
×
771
}
772

773
type memo struct {
774
        Matched bool
775
        Partial []token32
776
}
777

778
type memoKey struct {
779
        Rule     uint32
780
        Position uint32
781
}
782

783
func (p *pegJSONPathParser) Init(options ...func(*pegJSONPathParser) error) error {
3✔
784
        var (
3✔
785
                max                  token32
3✔
786
                position, tokenIndex uint32
3✔
787
                buffer               []rune
3✔
788
                memoization          map[memoKey]memo
3✔
789
        )
3✔
790
        for _, option := range options {
4✔
791
                err := option(p)
1✔
792
                if err != nil {
2✔
793
                        return err
1✔
794
                }
1✔
795
        }
796
        p.reset = func() {
1,243✔
797
                max = token32{}
1,241✔
798
                position, tokenIndex = 0, 0
1,241✔
799
                memoization = make(map[memoKey]memo)
1,241✔
800
                p.buffer = []rune(p.Buffer)
1,241✔
801
                if len(p.buffer) == 0 || p.buffer[len(p.buffer)-1] != endSymbol {
2,482✔
802
                        p.buffer = append(p.buffer, endSymbol)
1,241✔
803
                }
1,241✔
804
                buffer = p.buffer
1,241✔
805
        }
806
        p.reset()
2✔
807

2✔
808
        _rules := p.rules
2✔
809
        tree := p.tokens32
2✔
810
        p.parse = func(rule ...int) error {
1,244✔
811
                r := 1
1,242✔
812
                if len(rule) > 0 {
1,244✔
813
                        r = rule[0]
2✔
814
                }
2✔
815
                matches := p.rules[r]()
1,242✔
816
                p.tokens32 = tree
1,242✔
817
                if matches {
2,483✔
818
                        p.Trim(tokenIndex)
1,241✔
819
                        return nil
1,241✔
820
                }
1,241✔
821
                return &parseError{p, max}
1✔
822
        }
823

824
        add := func(rule pegRule, begin uint32) {
57,547✔
825
                tree.Add(rule, begin, position, tokenIndex)
57,545✔
826
                tokenIndex++
57,545✔
827
                if begin != position && position > max.end {
66,745✔
828
                        max = token32{rule, begin, position}
9,200✔
829
                }
9,200✔
830
        }
831

832
        memoize := func(rule uint32, begin uint32, tokenIndexStart uint32, matched bool) {
34,833✔
833
                if p.disableMemoize {
34,831✔
834
                        return
×
835
                }
×
836
                key := memoKey{rule, begin}
34,831✔
837
                if !matched {
44,209✔
838
                        memoization[key] = memo{Matched: false}
9,378✔
839
                } else {
34,831✔
840
                        t := tree.tree[tokenIndexStart:tokenIndex]
25,453✔
841
                        tokenCopy := make([]token32, len(t))
25,453✔
842
                        copy(tokenCopy, t)
25,453✔
843
                        memoization[key] = memo{Matched: true, Partial: tokenCopy}
25,453✔
844
                }
25,453✔
845
        }
846

847
        memoizedResult := func(m memo) bool {
7,023✔
848
                if !m.Matched {
8,358✔
849
                        return false
1,337✔
850
                }
1,337✔
851
                tree.tree = append(tree.tree[:tokenIndex], m.Partial...)
5,684✔
852
                tokenIndex += uint32(len(m.Partial))
5,684✔
853
                position = m.Partial[len(m.Partial)-1].end
5,684✔
854
                if tree.tree[tokenIndex-1].begin != position && position > max.end {
5,684✔
855
                        max = tree.tree[tokenIndex-1]
×
856
                }
×
857
                return true
5,684✔
858
        }
859

860
        matchDot := func() bool {
5,183✔
861
                if buffer[position] != endSymbol {
8,736✔
862
                        position++
3,555✔
863
                        return true
3,555✔
864
                }
3,555✔
865
                return false
1,626✔
866
        }
867

868
        /*matchChar := func(c byte) bool {
869
                if buffer[position] == c {
870
                        position++
871
                        return true
872
                }
873
                return false
874
        }*/
875

876
        /*matchRange := func(lower byte, upper byte) bool {
877
                if c := buffer[position]; c >= lower && c <= upper {
878
                        position++
879
                        return true
880
                }
881
                return false
882
        }*/
883

884
        _rules = [...]func() bool{
2✔
885
                nil,
2✔
886
                /* 0 expression <- <((jsonpath END Action0) / (jsonpath? <.*> END Action1))> */
2✔
887
                func() bool {
1,243✔
888
                        if memoized, ok := memoization[memoKey{0, position}]; ok {
1,241✔
889
                                return memoizedResult(memoized)
×
890
                        }
×
891
                        position0, tokenIndex0 := position, tokenIndex
1,241✔
892
                        {
2,482✔
893
                                position1 := position
1,241✔
894
                                {
2,482✔
895
                                        position2, tokenIndex2 := position, tokenIndex
1,241✔
896
                                        if !_rules[rulejsonpath]() {
1,247✔
897
                                                goto l3
6✔
898
                                        }
899
                                        if !_rules[ruleEND]() {
1,431✔
900
                                                goto l3
196✔
901
                                        }
902
                                        {
1,039✔
903
                                                add(ruleAction0, position)
1,039✔
904
                                        }
1,039✔
905
                                        goto l2
1,039✔
906
                                l3:
907
                                        position, tokenIndex = position2, tokenIndex2
202✔
908
                                        {
404✔
909
                                                position5, tokenIndex5 := position, tokenIndex
202✔
910
                                                if !_rules[rulejsonpath]() {
208✔
911
                                                        goto l5
6✔
912
                                                }
913
                                                goto l6
196✔
914
                                        l5:
915
                                                position, tokenIndex = position5, tokenIndex5
6✔
916
                                        }
917
                                l6:
918
                                        {
202✔
919
                                                position7 := position
202✔
920
                                        l8:
202✔
921
                                                {
1,806✔
922
                                                        position9, tokenIndex9 := position, tokenIndex
1,806✔
923
                                                        if !matchDot() {
2,008✔
924
                                                                goto l9
202✔
925
                                                        }
926
                                                        goto l8
1,604✔
927
                                                l9:
928
                                                        position, tokenIndex = position9, tokenIndex9
202✔
929
                                                }
930
                                                add(rulePegText, position7)
202✔
931
                                        }
932
                                        if !_rules[ruleEND]() {
202✔
933
                                                goto l0
×
934
                                        }
935
                                        {
202✔
936
                                                add(ruleAction1, position)
202✔
937
                                        }
202✔
938
                                }
939
                        l2:
940
                                add(ruleexpression, position1)
1,241✔
941
                        }
942
                        memoize(0, position0, tokenIndex0, true)
1,241✔
943
                        return true
1,241✔
944
                l0:
1,241✔
945
                        memoize(0, position0, tokenIndex0, false)
×
946
                        position, tokenIndex = position0, tokenIndex0
×
947
                        return false
×
948
                },
949
                /* 1 END <- <!.> */
950
                func() bool {
1,437✔
951
                        if memoized, ok := memoization[memoKey{1, position}]; ok {
1,437✔
952
                                return memoizedResult(memoized)
×
953
                        }
×
954
                        position11, tokenIndex11 := position, tokenIndex
1,437✔
955
                        {
2,874✔
956
                                position12 := position
1,437✔
957
                                {
2,874✔
958
                                        position13, tokenIndex13 := position, tokenIndex
1,437✔
959
                                        if !matchDot() {
2,678✔
960
                                                goto l13
1,241✔
961
                                        }
962
                                        goto l11
196✔
963
                                l13:
964
                                        position, tokenIndex = position13, tokenIndex13
1,241✔
965
                                }
966
                                add(ruleEND, position12)
1,241✔
967
                        }
968
                        memoize(1, position11, tokenIndex11, true)
1,241✔
969
                        return true
1,241✔
970
                l11:
1,241✔
971
                        memoize(1, position11, tokenIndex11, false)
196✔
972
                        position, tokenIndex = position11, tokenIndex11
196✔
973
                        return false
196✔
974
                },
975
                /* 2 jsonpath <- <(space rootNode continuedJsonpath)> */
976
                func() bool {
1,444✔
977
                        if memoized, ok := memoization[memoKey{2, position}]; ok {
1,646✔
978
                                return memoizedResult(memoized)
202✔
979
                        }
202✔
980
                        position14, tokenIndex14 := position, tokenIndex
1,242✔
981
                        {
2,484✔
982
                                position15 := position
1,242✔
983
                                if !_rules[rulespace]() {
1,242✔
984
                                        goto l14
×
985
                                }
986
                                {
1,242✔
987
                                        position16 := position
1,242✔
988
                                        {
2,484✔
989
                                                position17, tokenIndex17 := position, tokenIndex
1,242✔
990
                                                if !_rules[rulerootIdentifier]() {
1,253✔
991
                                                        goto l18
11✔
992
                                                }
993
                                                goto l17
1,231✔
994
                                        l18:
995
                                                position, tokenIndex = position17, tokenIndex17
11✔
996
                                                if !_rules[rulebracketNode]() {
21✔
997
                                                        goto l19
10✔
998
                                                }
999
                                                goto l17
1✔
1000
                                        l19:
1001
                                                position, tokenIndex = position17, tokenIndex17
10✔
1002
                                                if !_rules[ruledotChildIdentifier]() {
17✔
1003
                                                        goto l14
7✔
1004
                                                }
1005
                                        }
1006
                                l17:
1007
                                        add(rulerootNode, position16)
1,235✔
1008
                                }
1009
                                if !_rules[rulecontinuedJsonpath]() {
1,235✔
1010
                                        goto l14
×
1011
                                }
1012
                                add(rulejsonpath, position15)
1,235✔
1013
                        }
1014
                        memoize(2, position14, tokenIndex14, true)
1,235✔
1015
                        return true
1,235✔
1016
                l14:
1,235✔
1017
                        memoize(2, position14, tokenIndex14, false)
7✔
1018
                        position, tokenIndex = position14, tokenIndex14
7✔
1019
                        return false
7✔
1020
                },
1021
                /* 3 jsonpathParameter <- <(space parameterRootNode continuedJsonpath)> */
1022
                nil,
1023
                /* 4 continuedJsonpath <- <(childNode* function* space Action2)> */
1024
                func() bool {
1,813✔
1025
                        if memoized, ok := memoization[memoKey{4, position}]; ok {
1,813✔
1026
                                return memoizedResult(memoized)
×
1027
                        }
×
1028
                        position21, tokenIndex21 := position, tokenIndex
1,813✔
1029
                        {
3,626✔
1030
                                position22 := position
1,813✔
1031
                        l23:
1,813✔
1032
                                {
3,847✔
1033
                                        position24, tokenIndex24 := position, tokenIndex
3,847✔
1034
                                        {
7,694✔
1035
                                                position25 := position
3,847✔
1036
                                                {
7,694✔
1037
                                                        position26, tokenIndex26 := position, tokenIndex
3,847✔
1038
                                                        if buffer[position] != rune('.') {
6,675✔
1039
                                                                goto l27
2,828✔
1040
                                                        }
1041
                                                        position++
1,019✔
1042
                                                        if buffer[position] != rune('.') {
1,907✔
1043
                                                                goto l27
888✔
1044
                                                        }
1045
                                                        position++
131✔
1046
                                                        {
262✔
1047
                                                                position28, tokenIndex28 := position, tokenIndex
131✔
1048
                                                                if !_rules[rulebracketNode]() {
232✔
1049
                                                                        goto l29
101✔
1050
                                                                }
1051
                                                                goto l28
30✔
1052
                                                        l29:
1053
                                                                position, tokenIndex = position28, tokenIndex28
101✔
1054
                                                                if !_rules[ruledotChildIdentifier]() {
105✔
1055
                                                                        goto l27
4✔
1056
                                                                }
1057
                                                        }
1058
                                                l28:
1059
                                                        {
127✔
1060
                                                                add(ruleAction3, position)
127✔
1061
                                                        }
127✔
1062
                                                        goto l26
127✔
1063
                                                l27:
1064
                                                        position, tokenIndex = position26, tokenIndex26
3,720✔
1065
                                                        {
7,440✔
1066
                                                                position32 := position
3,720✔
1067
                                                                if buffer[position] != rune('.') {
6,548✔
1068
                                                                        goto l31
2,828✔
1069
                                                                }
1070
                                                                position++
892✔
1071
                                                                if !_rules[ruledotChildIdentifier]() {
1,004✔
1072
                                                                        goto l31
112✔
1073
                                                                }
1074
                                                                add(rulePegText, position32)
780✔
1075
                                                        }
1076
                                                        {
780✔
1077
                                                                add(ruleAction4, position)
780✔
1078
                                                        }
780✔
1079
                                                        goto l26
780✔
1080
                                                l31:
1081
                                                        position, tokenIndex = position26, tokenIndex26
2,940✔
1082
                                                        if !_rules[rulebracketNode]() {
4,753✔
1083
                                                                goto l24
1,813✔
1084
                                                        }
1085
                                                }
1086
                                        l26:
1087
                                                add(rulechildNode, position25)
2,034✔
1088
                                        }
1089
                                        goto l23
2,034✔
1090
                                l24:
1091
                                        position, tokenIndex = position24, tokenIndex24
1,813✔
1092
                                }
1093
                        l34:
1094
                                {
1,889✔
1095
                                        position35, tokenIndex35 := position, tokenIndex
1,889✔
1096
                                        {
3,778✔
1097
                                                position36 := position
1,889✔
1098
                                                {
3,778✔
1099
                                                        position37 := position
1,889✔
1100
                                                        if buffer[position] != rune('.') {
3,643✔
1101
                                                                goto l35
1,754✔
1102
                                                        }
1103
                                                        position++
135✔
1104
                                                        {
270✔
1105
                                                                position38 := position
135✔
1106
                                                                {
270✔
1107
                                                                        position39 := position
135✔
1108
                                                                        {
270✔
1109
                                                                                switch buffer[position] {
135✔
1110
                                                                                case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
1✔
1111
                                                                                        position++
1✔
1112
                                                                                case 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z':
1✔
1113
                                                                                        position++
1✔
1114
                                                                                case '_':
1✔
1115
                                                                                        position++
1✔
1116
                                                                                case '-':
1✔
1117
                                                                                        position++
1✔
1118
                                                                                default:
131✔
1119
                                                                                        if c := buffer[position]; c < rune('a') || c > rune('z') {
190✔
1120
                                                                                                goto l35
59✔
1121
                                                                                        }
1122
                                                                                        position++
72✔
1123
                                                                                }
1124
                                                                        }
1125

1126
                                                                l40:
1127
                                                                        {
466✔
1128
                                                                                position41, tokenIndex41 := position, tokenIndex
466✔
1129
                                                                                {
932✔
1130
                                                                                        switch buffer[position] {
466✔
1131
                                                                                        case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
6✔
1132
                                                                                                position++
6✔
1133
                                                                                        case 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z':
27✔
1134
                                                                                                position++
27✔
1135
                                                                                        case '_':
1✔
1136
                                                                                                position++
1✔
1137
                                                                                        case '-':
1✔
1138
                                                                                                position++
1✔
1139
                                                                                        default:
431✔
1140
                                                                                                if c := buffer[position]; c < rune('a') || c > rune('z') {
507✔
1141
                                                                                                        goto l41
76✔
1142
                                                                                                }
1143
                                                                                                position++
355✔
1144
                                                                                        }
1145
                                                                                }
1146

1147
                                                                                goto l40
390✔
1148
                                                                        l41:
1149
                                                                                position, tokenIndex = position41, tokenIndex41
76✔
1150
                                                                        }
1151
                                                                        add(rulePegText, position39)
76✔
1152
                                                                }
1153
                                                                {
76✔
1154
                                                                        add(ruleAction6, position)
76✔
1155
                                                                }
76✔
1156
                                                                add(rulefunctionName, position38)
76✔
1157
                                                        }
1158
                                                        if buffer[position] != rune('(') {
76✔
1159
                                                                goto l35
×
1160
                                                        }
1161
                                                        position++
76✔
1162
                                                        if buffer[position] != rune(')') {
76✔
1163
                                                                goto l35
×
1164
                                                        }
1165
                                                        position++
76✔
1166
                                                        add(rulePegText, position37)
76✔
1167
                                                }
1168
                                                {
76✔
1169
                                                        add(ruleAction5, position)
76✔
1170
                                                }
76✔
1171
                                                add(rulefunction, position36)
76✔
1172
                                        }
1173
                                        goto l34
76✔
1174
                                l35:
1175
                                        position, tokenIndex = position35, tokenIndex35
1,813✔
1176
                                }
1177
                                if !_rules[rulespace]() {
1,813✔
1178
                                        goto l21
×
1179
                                }
1180
                                {
1,813✔
1181
                                        add(ruleAction2, position)
1,813✔
1182
                                }
1,813✔
1183
                                add(rulecontinuedJsonpath, position22)
1,813✔
1184
                        }
1185
                        memoize(4, position21, tokenIndex21, true)
1,813✔
1186
                        return true
1,813✔
1187
                l21:
1,813✔
1188
                        memoize(4, position21, tokenIndex21, false)
×
1189
                        position, tokenIndex = position21, tokenIndex21
×
1190
                        return false
×
1191
                },
1192
                /* 5 rootNode <- <(rootIdentifier / bracketNode / dotChildIdentifier)> */
1193
                nil,
1194
                /* 6 parameterRootNode <- <(rootIdentifier / currentRootIdentifier)> */
1195
                nil,
1196
                /* 7 childNode <- <(('.' '.' (bracketNode / dotChildIdentifier) Action3) / (<('.' dotChildIdentifier)> Action4) / bracketNode)> */
1197
                nil,
1198
                /* 8 function <- <(<('.' functionName ('(' ')'))> Action5)> */
1199
                nil,
1200
                /* 9 functionName <- <(<((&('0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9') [0-9]) | (&('A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z') [A-Z]) | (&('_') '_') | (&('-') '-') | (&('a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z') [a-z]))+> Action6)> */
1201
                nil,
1202
                /* 10 bracketNode <- <(<(squareBracketStart (bracketChildIdentifier / qualifier) squareBracketEnd)> Action7)> */
1203
                func() bool {
3,082✔
1204
                        if memoized, ok := memoization[memoKey{10, position}]; ok {
3,083✔
1205
                                return memoizedResult(memoized)
1✔
1206
                        }
1✔
1207
                        position52, tokenIndex52 := position, tokenIndex
3,081✔
1208
                        {
6,162✔
1209
                                position53 := position
3,081✔
1210
                                {
6,162✔
1211
                                        position54 := position
3,081✔
1212
                                        {
6,162✔
1213
                                                position55 := position
3,081✔
1214
                                                if buffer[position] != rune('[') {
4,879✔
1215
                                                        goto l52
1,798✔
1216
                                                }
1217
                                                position++
1,283✔
1218
                                                if !_rules[rulespace]() {
1,283✔
1219
                                                        goto l52
×
1220
                                                }
1221
                                                add(rulesquareBracketStart, position55)
1,283✔
1222
                                        }
1223
                                        {
1,283✔
1224
                                                position56, tokenIndex56 := position, tokenIndex
1,283✔
1225
                                                {
2,566✔
1226
                                                        position58 := position
1,283✔
1227
                                                        if !_rules[rulebracketNodeIdentifier]() {
2,243✔
1228
                                                                goto l57
960✔
1229
                                                        }
1230
                                                l59:
1231
                                                        {
479✔
1232
                                                                position60, tokenIndex60 := position, tokenIndex
479✔
1233
                                                                if !_rules[rulesep]() {
793✔
1234
                                                                        goto l60
314✔
1235
                                                                }
1236
                                                                if !_rules[rulebracketNodeIdentifier]() {
174✔
1237
                                                                        goto l60
9✔
1238
                                                                }
1239
                                                                {
156✔
1240
                                                                        add(ruleAction11, position)
156✔
1241
                                                                }
156✔
1242
                                                                goto l59
156✔
1243
                                                        l60:
1244
                                                                position, tokenIndex = position60, tokenIndex60
323✔
1245
                                                        }
1246
                                                        {
323✔
1247
                                                                position62, tokenIndex62 := position, tokenIndex
323✔
1248
                                                                if !_rules[rulesep]() {
637✔
1249
                                                                        goto l62
314✔
1250
                                                                }
1251
                                                                goto l57
9✔
1252
                                                        l62:
1253
                                                                position, tokenIndex = position62, tokenIndex62
314✔
1254
                                                        }
1255
                                                        add(rulebracketChildIdentifier, position58)
314✔
1256
                                                }
1257
                                                goto l56
314✔
1258
                                        l57:
1259
                                                position, tokenIndex = position56, tokenIndex56
969✔
1260
                                                {
1,938✔
1261
                                                        position63 := position
969✔
1262
                                                        {
1,938✔
1263
                                                                switch buffer[position] {
969✔
1264
                                                                case '?':
493✔
1265
                                                                        {
986✔
1266
                                                                                position65 := position
493✔
1267
                                                                                {
986✔
1268
                                                                                        position66 := position
493✔
1269
                                                                                        position++
493✔
1270
                                                                                        if buffer[position] != rune('(') {
494✔
1271
                                                                                                goto l52
1✔
1272
                                                                                        }
1273
                                                                                        position++
492✔
1274
                                                                                        if !_rules[rulespace]() {
492✔
1275
                                                                                                goto l52
×
1276
                                                                                        }
1277
                                                                                        add(rulefilterStart, position66)
492✔
1278
                                                                                }
1279
                                                                                if !_rules[rulequery]() {
508✔
1280
                                                                                        goto l52
16✔
1281
                                                                                }
1282
                                                                                {
476✔
1283
                                                                                        position67 := position
476✔
1284
                                                                                        if !_rules[rulespace]() {
476✔
1285
                                                                                                goto l52
×
1286
                                                                                        }
1287
                                                                                        if buffer[position] != rune(')') {
538✔
1288
                                                                                                goto l52
62✔
1289
                                                                                        }
1290
                                                                                        position++
414✔
1291
                                                                                        add(rulefilterEnd, position67)
414✔
1292
                                                                                }
1293
                                                                                {
414✔
1294
                                                                                        add(ruleAction23, position)
414✔
1295
                                                                                }
414✔
1296
                                                                                add(rulefilter, position65)
414✔
1297
                                                                        }
1298
                                                                case '(':
6✔
1299
                                                                        {
12✔
1300
                                                                                position69 := position
6✔
1301
                                                                                {
12✔
1302
                                                                                        position70 := position
6✔
1303
                                                                                        position++
6✔
1304
                                                                                        if !_rules[rulespace]() {
6✔
1305
                                                                                                goto l52
×
1306
                                                                                        }
1307
                                                                                        add(rulescriptStart, position70)
6✔
1308
                                                                                }
1309
                                                                                {
6✔
1310
                                                                                        position71 := position
6✔
1311
                                                                                        {
12✔
1312
                                                                                                position72 := position
6✔
1313
                                                                                                {
12✔
1314
                                                                                                        position75, tokenIndex75 := position, tokenIndex
6✔
1315
                                                                                                        if !_rules[rulescriptEnd]() {
11✔
1316
                                                                                                                goto l75
5✔
1317
                                                                                                        }
1318
                                                                                                        goto l52
1✔
1319
                                                                                                l75:
1320
                                                                                                        position, tokenIndex = position75, tokenIndex75
5✔
1321
                                                                                                }
1322
                                                                                                if !matchDot() {
6✔
1323
                                                                                                        goto l52
1✔
1324
                                                                                                }
1325
                                                                                        l73:
1326
                                                                                                {
22✔
1327
                                                                                                        position74, tokenIndex74 := position, tokenIndex
22✔
1328
                                                                                                        {
44✔
1329
                                                                                                                position76, tokenIndex76 := position, tokenIndex
22✔
1330
                                                                                                                if !_rules[rulescriptEnd]() {
41✔
1331
                                                                                                                        goto l76
19✔
1332
                                                                                                                }
1333
                                                                                                                goto l74
3✔
1334
                                                                                                        l76:
1335
                                                                                                                position, tokenIndex = position76, tokenIndex76
19✔
1336
                                                                                                        }
1337
                                                                                                        if !matchDot() {
20✔
1338
                                                                                                                goto l74
1✔
1339
                                                                                                        }
1340
                                                                                                        goto l73
18✔
1341
                                                                                                l74:
1342
                                                                                                        position, tokenIndex = position74, tokenIndex74
4✔
1343
                                                                                                }
1344
                                                                                                add(rulecommand, position72)
4✔
1345
                                                                                        }
1346
                                                                                        add(rulePegText, position71)
4✔
1347
                                                                                }
1348
                                                                                if !_rules[rulescriptEnd]() {
5✔
1349
                                                                                        goto l52
1✔
1350
                                                                                }
1351
                                                                                {
3✔
1352
                                                                                        add(ruleAction22, position)
3✔
1353
                                                                                }
3✔
1354
                                                                                add(rulescript, position69)
3✔
1355
                                                                        }
1356
                                                                default:
470✔
1357
                                                                        {
940✔
1358
                                                                                position78 := position
470✔
1359
                                                                                if !_rules[ruleindex]() {
497✔
1360
                                                                                        goto l52
27✔
1361
                                                                                }
1362
                                                                        l79:
1363
                                                                                {
554✔
1364
                                                                                        position80, tokenIndex80 := position, tokenIndex
554✔
1365
                                                                                        if !_rules[rulesep]() {
994✔
1366
                                                                                                goto l80
440✔
1367
                                                                                        }
1368
                                                                                        if !_rules[ruleindex]() {
117✔
1369
                                                                                                goto l80
3✔
1370
                                                                                        }
1371
                                                                                        {
111✔
1372
                                                                                                add(ruleAction15, position)
111✔
1373
                                                                                        }
111✔
1374
                                                                                        goto l79
111✔
1375
                                                                                l80:
1376
                                                                                        position, tokenIndex = position80, tokenIndex80
443✔
1377
                                                                                }
1378
                                                                                {
443✔
1379
                                                                                        position82, tokenIndex82 := position, tokenIndex
443✔
1380
                                                                                        if !_rules[rulesep]() {
883✔
1381
                                                                                                goto l82
440✔
1382
                                                                                        }
1383
                                                                                        goto l52
3✔
1384
                                                                                l82:
1385
                                                                                        position, tokenIndex = position82, tokenIndex82
440✔
1386
                                                                                }
1387
                                                                                add(ruleunion, position78)
440✔
1388
                                                                        }
1389
                                                                }
1390
                                                        }
1391

1392
                                                        add(rulequalifier, position63)
857✔
1393
                                                }
1394
                                        }
1395
                                l56:
1396
                                        {
1,171✔
1397
                                                position83 := position
1,171✔
1398
                                                if !_rules[rulespace]() {
1,171✔
1399
                                                        goto l52
×
1400
                                                }
1401
                                                if buffer[position] != rune(']') {
1,184✔
1402
                                                        goto l52
13✔
1403
                                                }
1404
                                                position++
1,158✔
1405
                                                add(rulesquareBracketEnd, position83)
1,158✔
1406
                                        }
1407
                                        add(rulePegText, position54)
1,158✔
1408
                                }
1409
                                {
1,158✔
1410
                                        add(ruleAction7, position)
1,158✔
1411
                                }
1,158✔
1412
                                add(rulebracketNode, position53)
1,158✔
1413
                        }
1414
                        memoize(10, position52, tokenIndex52, true)
1,158✔
1415
                        return true
1,158✔
1416
                l52:
1,158✔
1417
                        memoize(10, position52, tokenIndex52, false)
1,923✔
1418
                        position, tokenIndex = position52, tokenIndex52
1,923✔
1419
                        return false
1,923✔
1420
                },
1421
                /* 11 rootIdentifier <- <('$' Action8)> */
1422
                func() bool {
1,922✔
1423
                        if memoized, ok := memoization[memoKey{11, position}]; ok {
1,922✔
1424
                                return memoizedResult(memoized)
×
1425
                        }
×
1426
                        position85, tokenIndex85 := position, tokenIndex
1,922✔
1427
                        {
3,844✔
1428
                                position86 := position
1,922✔
1429
                                if buffer[position] != rune('$') {
2,537✔
1430
                                        goto l85
615✔
1431
                                }
1432
                                position++
1,307✔
1433
                                {
2,614✔
1434
                                        add(ruleAction8, position)
1,307✔
1435
                                }
1,307✔
1436
                                add(rulerootIdentifier, position86)
1,307✔
1437
                        }
1438
                        memoize(11, position85, tokenIndex85, true)
1,307✔
1439
                        return true
1,307✔
1440
                l85:
1,307✔
1441
                        memoize(11, position85, tokenIndex85, false)
615✔
1442
                        position, tokenIndex = position85, tokenIndex85
615✔
1443
                        return false
615✔
1444
                },
1445
                /* 12 currentRootIdentifier <- <('@' Action9)> */
1446
                nil,
1447
                /* 13 dotChildIdentifier <- <(wildcardIdentifier / (<(('\\' signsWithoutHyphenUnderscore) / (!([\x00-\x1f] / '\x7f') !signsWithoutHyphenUnderscore .))+> !('(' ')') Action10))> */
1448
                func() bool {
1,003✔
1449
                        if memoized, ok := memoization[memoKey{13, position}]; ok {
1,003✔
1450
                                return memoizedResult(memoized)
×
1451
                        }
×
1452
                        position89, tokenIndex89 := position, tokenIndex
1,003✔
1453
                        {
2,006✔
1454
                                position90 := position
1,003✔
1455
                                {
2,006✔
1456
                                        position91, tokenIndex91 := position, tokenIndex
1,003✔
1457
                                        if !_rules[rulewildcardIdentifier]() {
1,865✔
1458
                                                goto l92
862✔
1459
                                        }
1460
                                        goto l91
141✔
1461
                                l92:
1462
                                        position, tokenIndex = position91, tokenIndex91
862✔
1463
                                        {
1,724✔
1464
                                                position93 := position
862✔
1465
                                                {
1,724✔
1466
                                                        position96, tokenIndex96 := position, tokenIndex
862✔
1467
                                                        if buffer[position] != rune('\\') {
1,709✔
1468
                                                                goto l97
847✔
1469
                                                        }
1470
                                                        position++
15✔
1471
                                                        if !_rules[rulesignsWithoutHyphenUnderscore]() {
22✔
1472
                                                                goto l97
7✔
1473
                                                        }
1474
                                                        goto l96
8✔
1475
                                                l97:
1476
                                                        position, tokenIndex = position96, tokenIndex96
854✔
1477
                                                        {
1,708✔
1478
                                                                position98, tokenIndex98 := position, tokenIndex
854✔
1479
                                                                {
1,708✔
1480
                                                                        position99, tokenIndex99 := position, tokenIndex
854✔
1481
                                                                        if c := buffer[position]; c < rune('\x00') || c > rune('\x1f') {
1,704✔
1482
                                                                                goto l100
850✔
1483
                                                                        }
1484
                                                                        position++
4✔
1485
                                                                        goto l99
4✔
1486
                                                                l100:
1487
                                                                        position, tokenIndex = position99, tokenIndex99
850✔
1488
                                                                        if buffer[position] != rune('\x7f') {
1,699✔
1489
                                                                                goto l98
849✔
1490
                                                                        }
1491
                                                                        position++
1✔
1492
                                                                }
1493
                                                        l99:
1494
                                                                goto l89
5✔
1495
                                                        l98:
1496
                                                                position, tokenIndex = position98, tokenIndex98
849✔
1497
                                                        }
1498
                                                        {
849✔
1499
                                                                position101, tokenIndex101 := position, tokenIndex
849✔
1500
                                                                if !_rules[rulesignsWithoutHyphenUnderscore]() {
1,642✔
1501
                                                                        goto l101
793✔
1502
                                                                }
1503
                                                                goto l89
56✔
1504
                                                        l101:
1505
                                                                position, tokenIndex = position101, tokenIndex101
793✔
1506
                                                        }
1507
                                                        if !matchDot() {
802✔
1508
                                                                goto l89
9✔
1509
                                                        }
1510
                                                }
1511
                                        l96:
1512
                                        l94:
1513
                                                {
1,147✔
1514
                                                        position95, tokenIndex95 := position, tokenIndex
1,147✔
1515
                                                        {
2,294✔
1516
                                                                position102, tokenIndex102 := position, tokenIndex
1,147✔
1517
                                                                if buffer[position] != rune('\\') {
2,259✔
1518
                                                                        goto l103
1,112✔
1519
                                                                }
1520
                                                                position++
35✔
1521
                                                                if !_rules[rulesignsWithoutHyphenUnderscore]() {
36✔
1522
                                                                        goto l103
1✔
1523
                                                                }
1524
                                                                goto l102
34✔
1525
                                                        l103:
1526
                                                                position, tokenIndex = position102, tokenIndex102
1,113✔
1527
                                                                {
2,226✔
1528
                                                                        position104, tokenIndex104 := position, tokenIndex
1,113✔
1529
                                                                        {
2,226✔
1530
                                                                                position105, tokenIndex105 := position, tokenIndex
1,113✔
1531
                                                                                if c := buffer[position]; c < rune('\x00') || c > rune('\x1f') {
2,225✔
1532
                                                                                        goto l106
1,112✔
1533
                                                                                }
1534
                                                                                position++
1✔
1535
                                                                                goto l105
1✔
1536
                                                                        l106:
1537
                                                                                position, tokenIndex = position105, tokenIndex105
1,112✔
1538
                                                                                if buffer[position] != rune('\x7f') {
2,223✔
1539
                                                                                        goto l104
1,111✔
1540
                                                                                }
1541
                                                                                position++
1✔
1542
                                                                        }
1543
                                                                l105:
1544
                                                                        goto l95
2✔
1545
                                                                l104:
1546
                                                                        position, tokenIndex = position104, tokenIndex104
1,111✔
1547
                                                                }
1548
                                                                {
1,111✔
1549
                                                                        position107, tokenIndex107 := position, tokenIndex
1,111✔
1550
                                                                        if !_rules[rulesignsWithoutHyphenUnderscore]() {
1,598✔
1551
                                                                                goto l107
487✔
1552
                                                                        }
1553
                                                                        goto l95
624✔
1554
                                                                l107:
1555
                                                                        position, tokenIndex = position107, tokenIndex107
487✔
1556
                                                                }
1557
                                                                if !matchDot() {
653✔
1558
                                                                        goto l95
166✔
1559
                                                                }
1560
                                                        }
1561
                                                l102:
1562
                                                        goto l94
355✔
1563
                                                l95:
1564
                                                        position, tokenIndex = position95, tokenIndex95
792✔
1565
                                                }
1566
                                                add(rulePegText, position93)
792✔
1567
                                        }
1568
                                        {
792✔
1569
                                                position108, tokenIndex108 := position, tokenIndex
792✔
1570
                                                if buffer[position] != rune('(') {
1,528✔
1571
                                                        goto l108
736✔
1572
                                                }
1573
                                                position++
56✔
1574
                                                if buffer[position] != rune(')') {
59✔
1575
                                                        goto l108
3✔
1576
                                                }
1577
                                                position++
53✔
1578
                                                goto l89
53✔
1579
                                        l108:
1580
                                                position, tokenIndex = position108, tokenIndex108
739✔
1581
                                        }
1582
                                        {
739✔
1583
                                                add(ruleAction10, position)
739✔
1584
                                        }
739✔
1585
                                }
1586
                        l91:
1587
                                add(ruledotChildIdentifier, position90)
880✔
1588
                        }
1589
                        memoize(13, position89, tokenIndex89, true)
880✔
1590
                        return true
880✔
1591
                l89:
880✔
1592
                        memoize(13, position89, tokenIndex89, false)
123✔
1593
                        position, tokenIndex = position89, tokenIndex89
123✔
1594
                        return false
123✔
1595
                },
1596
                /* 14 signsWithoutHyphenUnderscore <- <((&('{' | '|' | '}' | '~') [{-~]) | (&('`') '`') | (&('[' | '\\' | ']' | '^') [[-^]) | (&(':' | ';' | '<' | '=' | '>' | '?' | '@') [:-@]) | (&('/') '/') | (&('.') '.') | (&(' ' | '!' | '"' | '#' | '$' | '%' | '&' | '\'' | '(' | ')' | '*' | '+' | ',') [ -,]))> */
1597
                func() bool {
2,010✔
1598
                        if memoized, ok := memoization[memoKey{14, position}]; ok {
2,010✔
1599
                                return memoizedResult(memoized)
×
1600
                        }
×
1601
                        position110, tokenIndex110 := position, tokenIndex
2,010✔
1602
                        {
4,020✔
1603
                                position111 := position
2,010✔
1604
                                {
4,020✔
1605
                                        switch buffer[position] {
2,010✔
1606
                                        case '{', '|', '}', '~':
8✔
1607
                                                position++
8✔
1608
                                        case '`':
2✔
1609
                                                position++
2✔
1610
                                        case '[', '\\', ']', '^':
63✔
1611
                                                position++
63✔
1612
                                        case ':', ';', '<', '=', '>', '?', '@':
155✔
1613
                                                position++
155✔
1614
                                        case '/':
3✔
1615
                                                position++
3✔
1616
                                        case '.':
118✔
1617
                                                position++
118✔
1618
                                        default:
1,661✔
1619
                                                if c := buffer[position]; c < rune(' ') || c > rune(',') {
2,949✔
1620
                                                        goto l110
1,288✔
1621
                                                }
1622
                                                position++
373✔
1623
                                        }
1624
                                }
1625

1626
                                add(rulesignsWithoutHyphenUnderscore, position111)
722✔
1627
                        }
1628
                        memoize(14, position110, tokenIndex110, true)
722✔
1629
                        return true
722✔
1630
                l110:
722✔
1631
                        memoize(14, position110, tokenIndex110, false)
1,288✔
1632
                        position, tokenIndex = position110, tokenIndex110
1,288✔
1633
                        return false
1,288✔
1634
                },
1635
                /* 15 bracketChildIdentifier <- <(bracketNodeIdentifier (sep bracketNodeIdentifier Action11)* !sep)> */
1636
                nil,
1637
                /* 16 bracketNodeIdentifier <- <((&('"') doubleQuotedNodeIdentifier) | (&('\'') singleQuotedNodeIdentifier) | (&('*') wildcardIdentifier))> */
1638
                func() bool {
1,448✔
1639
                        if memoized, ok := memoization[memoKey{16, position}]; ok {
1,448✔
1640
                                return memoizedResult(memoized)
×
1641
                        }
×
1642
                        position114, tokenIndex114 := position, tokenIndex
1,448✔
1643
                        {
2,896✔
1644
                                position115 := position
1,448✔
1645
                                {
2,896✔
1646
                                        switch buffer[position] {
1,448✔
1647
                                        case '"':
29✔
1648
                                                {
58✔
1649
                                                        position117 := position
29✔
1650
                                                        position++
29✔
1651
                                                        {
58✔
1652
                                                                position118 := position
29✔
1653
                                                        l119:
29✔
1654
                                                                {
82✔
1655
                                                                        position120, tokenIndex120 := position, tokenIndex
82✔
1656
                                                                        {
164✔
1657
                                                                                position121, tokenIndex121 := position, tokenIndex
82✔
1658
                                                                                if buffer[position] != rune('\\') {
143✔
1659
                                                                                        goto l122
61✔
1660
                                                                                }
1661
                                                                                position++
21✔
1662
                                                                                {
42✔
1663
                                                                                        switch buffer[position] {
21✔
1664
                                                                                        case 'u':
11✔
1665
                                                                                                if !_rules[rulehexDigits]() {
15✔
1666
                                                                                                        goto l122
4✔
1667
                                                                                                }
1668
                                                                                        case 't':
1✔
1669
                                                                                                position++
1✔
1670
                                                                                        case 'r':
1✔
1671
                                                                                                position++
1✔
1672
                                                                                        case 'n':
1✔
1673
                                                                                                position++
1✔
1674
                                                                                        case 'f':
1✔
1675
                                                                                                position++
1✔
1676
                                                                                        case 'b':
1✔
1677
                                                                                                position++
1✔
1678
                                                                                        case '\\':
1✔
1679
                                                                                                position++
1✔
1680
                                                                                        case '/':
1✔
1681
                                                                                                position++
1✔
1682
                                                                                        default:
3✔
1683
                                                                                                if buffer[position] != rune('"') {
4✔
1684
                                                                                                        goto l122
1✔
1685
                                                                                                }
1686
                                                                                                position++
2✔
1687
                                                                                        }
1688
                                                                                }
1689

1690
                                                                                goto l121
16✔
1691
                                                                        l122:
1692
                                                                                position, tokenIndex = position121, tokenIndex121
66✔
1693
                                                                                {
132✔
1694
                                                                                        position124, tokenIndex124 := position, tokenIndex
66✔
1695
                                                                                        {
132✔
1696
                                                                                                position125, tokenIndex125 := position, tokenIndex
66✔
1697
                                                                                                if buffer[position] != rune('"') {
109✔
1698
                                                                                                        goto l126
43✔
1699
                                                                                                }
1700
                                                                                                position++
23✔
1701
                                                                                                goto l125
23✔
1702
                                                                                        l126:
1703
                                                                                                position, tokenIndex = position125, tokenIndex125
43✔
1704
                                                                                                if buffer[position] != rune('\\') {
81✔
1705
                                                                                                        goto l124
38✔
1706
                                                                                                }
1707
                                                                                                position++
5✔
1708
                                                                                        }
1709
                                                                                l125:
1710
                                                                                        goto l120
28✔
1711
                                                                                l124:
1712
                                                                                        position, tokenIndex = position124, tokenIndex124
38✔
1713
                                                                                }
1714
                                                                                if !matchDot() {
39✔
1715
                                                                                        goto l120
1✔
1716
                                                                                }
1717
                                                                        }
1718
                                                                l121:
1719
                                                                        goto l119
53✔
1720
                                                                l120:
1721
                                                                        position, tokenIndex = position120, tokenIndex120
29✔
1722
                                                                }
1723
                                                                add(rulePegText, position118)
29✔
1724
                                                        }
1725
                                                        if buffer[position] != rune('"') {
35✔
1726
                                                                goto l114
6✔
1727
                                                        }
1728
                                                        position++
23✔
1729
                                                        {
46✔
1730
                                                                add(ruleAction14, position)
23✔
1731
                                                        }
23✔
1732
                                                        add(ruledoubleQuotedNodeIdentifier, position117)
23✔
1733
                                                }
1734
                                        case '\'':
346✔
1735
                                                {
692✔
1736
                                                        position128 := position
346✔
1737
                                                        position++
346✔
1738
                                                        {
692✔
1739
                                                                position129 := position
346✔
1740
                                                        l130:
346✔
1741
                                                                {
739✔
1742
                                                                        position131, tokenIndex131 := position, tokenIndex
739✔
1743
                                                                        {
1,478✔
1744
                                                                                position132, tokenIndex132 := position, tokenIndex
739✔
1745
                                                                                if buffer[position] != rune('\\') {
1,453✔
1746
                                                                                        goto l133
714✔
1747
                                                                                }
1748
                                                                                position++
25✔
1749
                                                                                {
50✔
1750
                                                                                        switch buffer[position] {
25✔
1751
                                                                                        case 'u':
11✔
1752
                                                                                                if !_rules[rulehexDigits]() {
15✔
1753
                                                                                                        goto l133
4✔
1754
                                                                                                }
1755
                                                                                        case 't':
1✔
1756
                                                                                                position++
1✔
1757
                                                                                        case 'r':
1✔
1758
                                                                                                position++
1✔
1759
                                                                                        case 'n':
1✔
1760
                                                                                                position++
1✔
1761
                                                                                        case 'f':
1✔
1762
                                                                                                position++
1✔
1763
                                                                                        case 'b':
1✔
1764
                                                                                                position++
1✔
1765
                                                                                        case '\\':
3✔
1766
                                                                                                position++
3✔
1767
                                                                                        case '/':
1✔
1768
                                                                                                position++
1✔
1769
                                                                                        default:
5✔
1770
                                                                                                if buffer[position] != rune('\'') {
6✔
1771
                                                                                                        goto l133
1✔
1772
                                                                                                }
1773
                                                                                                position++
4✔
1774
                                                                                        }
1775
                                                                                }
1776

1777
                                                                                goto l132
20✔
1778
                                                                        l133:
1779
                                                                                position, tokenIndex = position132, tokenIndex132
719✔
1780
                                                                                {
1,438✔
1781
                                                                                        position135, tokenIndex135 := position, tokenIndex
719✔
1782
                                                                                        {
1,438✔
1783
                                                                                                position136, tokenIndex136 := position, tokenIndex
719✔
1784
                                                                                                if buffer[position] != rune('\'') {
1,099✔
1785
                                                                                                        goto l137
380✔
1786
                                                                                                }
1787
                                                                                                position++
339✔
1788
                                                                                                goto l136
339✔
1789
                                                                                        l137:
1790
                                                                                                position, tokenIndex = position136, tokenIndex136
380✔
1791
                                                                                                if buffer[position] != rune('\\') {
755✔
1792
                                                                                                        goto l135
375✔
1793
                                                                                                }
1794
                                                                                                position++
5✔
1795
                                                                                        }
1796
                                                                                l136:
1797
                                                                                        goto l131
344✔
1798
                                                                                l135:
1799
                                                                                        position, tokenIndex = position135, tokenIndex135
375✔
1800
                                                                                }
1801
                                                                                if !matchDot() {
377✔
1802
                                                                                        goto l131
2✔
1803
                                                                                }
1804
                                                                        }
1805
                                                                l132:
1806
                                                                        goto l130
393✔
1807
                                                                l131:
1808
                                                                        position, tokenIndex = position131, tokenIndex131
346✔
1809
                                                                }
1810
                                                                add(rulePegText, position129)
346✔
1811
                                                        }
1812
                                                        if buffer[position] != rune('\'') {
353✔
1813
                                                                goto l114
7✔
1814
                                                        }
1815
                                                        position++
339✔
1816
                                                        {
678✔
1817
                                                                add(ruleAction13, position)
339✔
1818
                                                        }
339✔
1819
                                                        add(rulesingleQuotedNodeIdentifier, position128)
339✔
1820
                                                }
1821
                                        default:
1,073✔
1822
                                                if !_rules[rulewildcardIdentifier]() {
2,029✔
1823
                                                        goto l114
956✔
1824
                                                }
1825
                                        }
1826
                                }
1827

1828
                                add(rulebracketNodeIdentifier, position115)
479✔
1829
                        }
1830
                        memoize(16, position114, tokenIndex114, true)
479✔
1831
                        return true
479✔
1832
                l114:
479✔
1833
                        memoize(16, position114, tokenIndex114, false)
969✔
1834
                        position, tokenIndex = position114, tokenIndex114
969✔
1835
                        return false
969✔
1836
                },
1837
                /* 17 wildcardIdentifier <- <('*' Action12)> */
1838
                func() bool {
2,076✔
1839
                        if memoized, ok := memoization[memoKey{17, position}]; ok {
2,076✔
1840
                                return memoizedResult(memoized)
×
1841
                        }
×
1842
                        position139, tokenIndex139 := position, tokenIndex
2,076✔
1843
                        {
4,152✔
1844
                                position140 := position
2,076✔
1845
                                if buffer[position] != rune('*') {
3,894✔
1846
                                        goto l139
1,818✔
1847
                                }
1848
                                position++
258✔
1849
                                {
516✔
1850
                                        add(ruleAction12, position)
258✔
1851
                                }
258✔
1852
                                add(rulewildcardIdentifier, position140)
258✔
1853
                        }
1854
                        memoize(17, position139, tokenIndex139, true)
258✔
1855
                        return true
258✔
1856
                l139:
258✔
1857
                        memoize(17, position139, tokenIndex139, false)
1,818✔
1858
                        position, tokenIndex = position139, tokenIndex139
1,818✔
1859
                        return false
1,818✔
1860
                },
1861
                /* 18 singleQuotedNodeIdentifier <- <('\'' <(('\\' ((&('u') hexDigits) | (&('t') 't') | (&('r') 'r') | (&('n') 'n') | (&('f') 'f') | (&('b') 'b') | (&('\\') '\\') | (&('/') '/') | (&('\'') '\''))) / (!('\'' / '\\') .))*> '\'' Action13)> */
1862
                nil,
1863
                /* 19 doubleQuotedNodeIdentifier <- <('"' <(('\\' ((&('u') hexDigits) | (&('t') 't') | (&('r') 'r') | (&('n') 'n') | (&('f') 'f') | (&('b') 'b') | (&('\\') '\\') | (&('/') '/') | (&('"') '"'))) / (!('"' / '\\') .))*> '"' Action14)> */
1864
                nil,
1865
                /* 20 hexDigits <- <('u' hexDigit hexDigit hexDigit hexDigit)> */
1866
                func() bool {
22✔
1867
                        if memoized, ok := memoization[memoKey{20, position}]; ok {
22✔
1868
                                return memoizedResult(memoized)
×
1869
                        }
×
1870
                        position144, tokenIndex144 := position, tokenIndex
22✔
1871
                        {
44✔
1872
                                position145 := position
22✔
1873
                                if buffer[position] != rune('u') {
22✔
1874
                                        goto l144
×
1875
                                }
1876
                                position++
22✔
1877
                                if !_rules[rulehexDigit]() {
24✔
1878
                                        goto l144
2✔
1879
                                }
1880
                                if !_rules[rulehexDigit]() {
22✔
1881
                                        goto l144
2✔
1882
                                }
1883
                                if !_rules[rulehexDigit]() {
20✔
1884
                                        goto l144
2✔
1885
                                }
1886
                                if !_rules[rulehexDigit]() {
18✔
1887
                                        goto l144
2✔
1888
                                }
1889
                                add(rulehexDigits, position145)
14✔
1890
                        }
1891
                        memoize(20, position144, tokenIndex144, true)
14✔
1892
                        return true
14✔
1893
                l144:
14✔
1894
                        memoize(20, position144, tokenIndex144, false)
8✔
1895
                        position, tokenIndex = position144, tokenIndex144
8✔
1896
                        return false
8✔
1897
                },
1898
                /* 21 hexDigit <- <((&('A' | 'B' | 'C' | 'D' | 'E' | 'F') [A-F]) | (&('a' | 'b' | 'c' | 'd' | 'e' | 'f') [a-f]) | (&('0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9') [0-9]))> */
1899
                func() bool {
76✔
1900
                        if memoized, ok := memoization[memoKey{21, position}]; ok {
76✔
1901
                                return memoizedResult(memoized)
×
1902
                        }
×
1903
                        position146, tokenIndex146 := position, tokenIndex
76✔
1904
                        {
152✔
1905
                                position147 := position
76✔
1906
                                {
152✔
1907
                                        switch buffer[position] {
76✔
1908
                                        case 'A', 'B', 'C', 'D', 'E', 'F':
16✔
1909
                                                position++
16✔
1910
                                        case 'a', 'b', 'c', 'd', 'e', 'f':
16✔
1911
                                                position++
16✔
1912
                                        default:
44✔
1913
                                                if c := buffer[position]; c < rune('0') || c > rune('9') {
52✔
1914
                                                        goto l146
8✔
1915
                                                }
1916
                                                position++
36✔
1917
                                        }
1918
                                }
1919

1920
                                add(rulehexDigit, position147)
68✔
1921
                        }
1922
                        memoize(21, position146, tokenIndex146, true)
68✔
1923
                        return true
68✔
1924
                l146:
68✔
1925
                        memoize(21, position146, tokenIndex146, false)
8✔
1926
                        position, tokenIndex = position146, tokenIndex146
8✔
1927
                        return false
8✔
1928
                },
1929
                /* 22 qualifier <- <((&('?') filter) | (&('(') script) | (&(' ' | '*' | '+' | '-' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | ':') union))> */
1930
                nil,
1931
                /* 23 union <- <(index (sep index Action15)* !sep)> */
1932
                nil,
1933
                /* 24 index <- <(((slice Action16) / (<indexNumber> Action17) / ('*' Action18)) Action19)> */
1934
                func() bool {
584✔
1935
                        if memoized, ok := memoization[memoKey{24, position}]; ok {
584✔
1936
                                return memoizedResult(memoized)
×
1937
                        }
×
1938
                        position151, tokenIndex151 := position, tokenIndex
584✔
1939
                        {
1,168✔
1940
                                position152 := position
584✔
1941
                                {
1,168✔
1942
                                        position153, tokenIndex153 := position, tokenIndex
584✔
1943
                                        {
1,168✔
1944
                                                position155 := position
584✔
1945
                                                if !_rules[ruleanyIndex]() {
584✔
1946
                                                        goto l154
×
1947
                                                }
1948
                                                if !_rules[rulesepSlice]() {
924✔
1949
                                                        goto l154
340✔
1950
                                                }
1951
                                                if !_rules[ruleanyIndex]() {
244✔
1952
                                                        goto l154
×
1953
                                                }
1954
                                                {
244✔
1955
                                                        position156, tokenIndex156 := position, tokenIndex
244✔
1956
                                                        if !_rules[rulesepSlice]() {
410✔
1957
                                                                goto l157
166✔
1958
                                                        }
1959
                                                        if !_rules[ruleanyIndex]() {
78✔
1960
                                                                goto l157
×
1961
                                                        }
1962
                                                        goto l156
78✔
1963
                                                l157:
1964
                                                        position, tokenIndex = position156, tokenIndex156
166✔
1965
                                                        if !_rules[rulespace]() {
166✔
1966
                                                                goto l154
×
1967
                                                        }
1968
                                                        {
166✔
1969
                                                                add(ruleAction20, position)
166✔
1970
                                                        }
166✔
1971
                                                }
1972
                                        l156:
1973
                                                add(ruleslice, position155)
244✔
1974
                                        }
1975
                                        {
244✔
1976
                                                add(ruleAction16, position)
244✔
1977
                                        }
244✔
1978
                                        goto l153
244✔
1979
                                l154:
1980
                                        position, tokenIndex = position153, tokenIndex153
340✔
1981
                                        {
680✔
1982
                                                position161 := position
340✔
1983
                                                if !_rules[ruleindexNumber]() {
384✔
1984
                                                        goto l160
44✔
1985
                                                }
1986
                                                add(rulePegText, position161)
296✔
1987
                                        }
1988
                                        {
296✔
1989
                                                add(ruleAction17, position)
296✔
1990
                                        }
296✔
1991
                                        goto l153
296✔
1992
                                l160:
1993
                                        position, tokenIndex = position153, tokenIndex153
44✔
1994
                                        if buffer[position] != rune('*') {
74✔
1995
                                                goto l151
30✔
1996
                                        }
1997
                                        position++
14✔
1998
                                        {
28✔
1999
                                                add(ruleAction18, position)
14✔
2000
                                        }
14✔
2001
                                }
2002
                        l153:
2003
                                {
554✔
2004
                                        add(ruleAction19, position)
554✔
2005
                                }
554✔
2006
                                add(ruleindex, position152)
554✔
2007
                        }
2008
                        memoize(24, position151, tokenIndex151, true)
554✔
2009
                        return true
554✔
2010
                l151:
554✔
2011
                        memoize(24, position151, tokenIndex151, false)
30✔
2012
                        position, tokenIndex = position151, tokenIndex151
30✔
2013
                        return false
30✔
2014
                },
2015
                /* 25 slice <- <(anyIndex sepSlice anyIndex ((sepSlice anyIndex) / (space Action20)))> */
2016
                nil,
2017
                /* 26 anyIndex <- <(<indexNumber?> Action21)> */
2018
                func() bool {
906✔
2019
                        if memoized, ok := memoization[memoKey{26, position}]; ok {
906✔
2020
                                return memoizedResult(memoized)
×
2021
                        }
×
2022
                        position166, tokenIndex166 := position, tokenIndex
906✔
2023
                        {
1,812✔
2024
                                position167 := position
906✔
2025
                                {
1,812✔
2026
                                        position168 := position
906✔
2027
                                        {
1,812✔
2028
                                                position169, tokenIndex169 := position, tokenIndex
906✔
2029
                                                if !_rules[ruleindexNumber]() {
989✔
2030
                                                        goto l169
83✔
2031
                                                }
2032
                                                goto l170
823✔
2033
                                        l169:
2034
                                                position, tokenIndex = position169, tokenIndex169
83✔
2035
                                        }
2036
                                l170:
2037
                                        add(rulePegText, position168)
906✔
2038
                                }
2039
                                {
906✔
2040
                                        add(ruleAction21, position)
906✔
2041
                                }
906✔
2042
                                add(ruleanyIndex, position167)
906✔
2043
                        }
2044
                        memoize(26, position166, tokenIndex166, true)
906✔
2045
                        return true
906✔
2046
                },
2047
                /* 27 indexNumber <- <(('-' / '+')? [0-9]+)> */
2048
                func() bool {
1,246✔
2049
                        if memoized, ok := memoization[memoKey{27, position}]; ok {
1,586✔
2050
                                return memoizedResult(memoized)
340✔
2051
                        }
340✔
2052
                        position172, tokenIndex172 := position, tokenIndex
906✔
2053
                        {
1,812✔
2054
                                position173 := position
906✔
2055
                                {
1,812✔
2056
                                        position174, tokenIndex174 := position, tokenIndex
906✔
2057
                                        {
1,812✔
2058
                                                position176, tokenIndex176 := position, tokenIndex
906✔
2059
                                                if buffer[position] != rune('-') {
1,687✔
2060
                                                        goto l177
781✔
2061
                                                }
2062
                                                position++
125✔
2063
                                                goto l176
125✔
2064
                                        l177:
2065
                                                position, tokenIndex = position176, tokenIndex176
781✔
2066
                                                if buffer[position] != rune('+') {
1,558✔
2067
                                                        goto l174
777✔
2068
                                                }
2069
                                                position++
4✔
2070
                                        }
2071
                                l176:
2072
                                        goto l175
129✔
2073
                                l174:
2074
                                        position, tokenIndex = position174, tokenIndex174
777✔
2075
                                }
2076
                        l175:
2077
                                if c := buffer[position]; c < rune('0') || c > rune('9') {
989✔
2078
                                        goto l172
83✔
2079
                                }
2080
                                position++
823✔
2081
                        l178:
823✔
2082
                                {
1,176✔
2083
                                        position179, tokenIndex179 := position, tokenIndex
1,176✔
2084
                                        if c := buffer[position]; c < rune('0') || c > rune('9') {
1,999✔
2085
                                                goto l179
823✔
2086
                                        }
2087
                                        position++
353✔
2088
                                        goto l178
353✔
2089
                                l179:
2090
                                        position, tokenIndex = position179, tokenIndex179
823✔
2091
                                }
2092
                                add(ruleindexNumber, position173)
823✔
2093
                        }
2094
                        memoize(27, position172, tokenIndex172, true)
823✔
2095
                        return true
823✔
2096
                l172:
823✔
2097
                        memoize(27, position172, tokenIndex172, false)
83✔
2098
                        position, tokenIndex = position172, tokenIndex172
83✔
2099
                        return false
83✔
2100
                },
2101
                /* 28 sep <- <(space ',' space)> */
2102
                func() bool {
1,799✔
2103
                        if memoized, ok := memoization[memoKey{28, position}]; ok {
2,571✔
2104
                                return memoizedResult(memoized)
772✔
2105
                        }
772✔
2106
                        position180, tokenIndex180 := position, tokenIndex
1,027✔
2107
                        {
2,054✔
2108
                                position181 := position
1,027✔
2109
                                if !_rules[rulespace]() {
1,027✔
2110
                                        goto l180
×
2111
                                }
2112
                                if buffer[position] != rune(',') {
1,781✔
2113
                                        goto l180
754✔
2114
                                }
2115
                                position++
273✔
2116
                                if !_rules[rulespace]() {
273✔
2117
                                        goto l180
×
2118
                                }
2119
                                add(rulesep, position181)
273✔
2120
                        }
2121
                        memoize(28, position180, tokenIndex180, true)
273✔
2122
                        return true
273✔
2123
                l180:
273✔
2124
                        memoize(28, position180, tokenIndex180, false)
754✔
2125
                        position, tokenIndex = position180, tokenIndex180
754✔
2126
                        return false
754✔
2127
                },
2128
                /* 29 sepSlice <- <(space ':' space)> */
2129
                func() bool {
828✔
2130
                        if memoized, ok := memoization[memoKey{29, position}]; ok {
828✔
2131
                                return memoizedResult(memoized)
×
2132
                        }
×
2133
                        position182, tokenIndex182 := position, tokenIndex
828✔
2134
                        {
1,656✔
2135
                                position183 := position
828✔
2136
                                if !_rules[rulespace]() {
828✔
2137
                                        goto l182
×
2138
                                }
2139
                                if buffer[position] != rune(':') {
1,334✔
2140
                                        goto l182
506✔
2141
                                }
2142
                                position++
322✔
2143
                                if !_rules[rulespace]() {
322✔
2144
                                        goto l182
×
2145
                                }
2146
                                add(rulesepSlice, position183)
322✔
2147
                        }
2148
                        memoize(29, position182, tokenIndex182, true)
322✔
2149
                        return true
322✔
2150
                l182:
322✔
2151
                        memoize(29, position182, tokenIndex182, false)
506✔
2152
                        position, tokenIndex = position182, tokenIndex182
506✔
2153
                        return false
506✔
2154
                },
2155
                /* 30 script <- <(scriptStart <command> scriptEnd Action22)> */
2156
                nil,
2157
                /* 31 command <- <(!scriptEnd .)+> */
2158
                nil,
2159
                /* 32 filter <- <(filterStart query filterEnd Action23)> */
2160
                nil,
2161
                /* 33 query <- <(andQuery (logicOr andQuery Action24)*)> */
2162
                func() bool {
511✔
2163
                        if memoized, ok := memoization[memoKey{33, position}]; ok {
511✔
2164
                                return memoizedResult(memoized)
×
2165
                        }
×
2166
                        position187, tokenIndex187 := position, tokenIndex
511✔
2167
                        {
1,022✔
2168
                                position188 := position
511✔
2169
                                if !_rules[ruleandQuery]() {
528✔
2170
                                        goto l187
17✔
2171
                                }
2172
                        l189:
2173
                                {
524✔
2174
                                        position190, tokenIndex190 := position, tokenIndex
524✔
2175
                                        {
1,048✔
2176
                                                position191 := position
524✔
2177
                                                if !_rules[rulespace]() {
524✔
2178
                                                        goto l190
×
2179
                                                }
2180
                                                if buffer[position] != rune('|') {
1,014✔
2181
                                                        goto l190
490✔
2182
                                                }
2183
                                                position++
34✔
2184
                                                if buffer[position] != rune('|') {
35✔
2185
                                                        goto l190
1✔
2186
                                                }
2187
                                                position++
33✔
2188
                                                if !_rules[rulespace]() {
33✔
2189
                                                        goto l190
×
2190
                                                }
2191
                                                add(rulelogicOr, position191)
33✔
2192
                                        }
2193
                                        if !_rules[ruleandQuery]() {
36✔
2194
                                                goto l190
3✔
2195
                                        }
2196
                                        {
30✔
2197
                                                add(ruleAction24, position)
30✔
2198
                                        }
30✔
2199
                                        goto l189
30✔
2200
                                l190:
2201
                                        position, tokenIndex = position190, tokenIndex190
494✔
2202
                                }
2203
                                add(rulequery, position188)
494✔
2204
                        }
2205
                        memoize(33, position187, tokenIndex187, true)
494✔
2206
                        return true
494✔
2207
                l187:
494✔
2208
                        memoize(33, position187, tokenIndex187, false)
17✔
2209
                        position, tokenIndex = position187, tokenIndex187
17✔
2210
                        return false
17✔
2211
                },
2212
                /* 34 andQuery <- <(basicQuery (logicAnd basicQuery Action25)*)> */
2213
                func() bool {
544✔
2214
                        if memoized, ok := memoization[memoKey{34, position}]; ok {
544✔
2215
                                return memoizedResult(memoized)
×
2216
                        }
×
2217
                        position193, tokenIndex193 := position, tokenIndex
544✔
2218
                        {
1,088✔
2219
                                position194 := position
544✔
2220
                                if !_rules[rulebasicQuery]() {
564✔
2221
                                        goto l193
20✔
2222
                                }
2223
                        l195:
2224
                                {
551✔
2225
                                        position196, tokenIndex196 := position, tokenIndex
551✔
2226
                                        {
1,102✔
2227
                                                position197 := position
551✔
2228
                                                if !_rules[rulespace]() {
551✔
2229
                                                        goto l196
×
2230
                                                }
2231
                                                if buffer[position] != rune('&') {
1,070✔
2232
                                                        goto l196
519✔
2233
                                                }
2234
                                                position++
32✔
2235
                                                if buffer[position] != rune('&') {
33✔
2236
                                                        goto l196
1✔
2237
                                                }
2238
                                                position++
31✔
2239
                                                if !_rules[rulespace]() {
31✔
2240
                                                        goto l196
×
2241
                                                }
2242
                                                add(rulelogicAnd, position197)
31✔
2243
                                        }
2244
                                        if !_rules[rulebasicQuery]() {
35✔
2245
                                                goto l196
4✔
2246
                                        }
2247
                                        {
27✔
2248
                                                add(ruleAction25, position)
27✔
2249
                                        }
27✔
2250
                                        goto l195
27✔
2251
                                l196:
2252
                                        position, tokenIndex = position196, tokenIndex196
524✔
2253
                                }
2254
                                add(ruleandQuery, position194)
524✔
2255
                        }
2256
                        memoize(34, position193, tokenIndex193, true)
524✔
2257
                        return true
524✔
2258
                l193:
524✔
2259
                        memoize(34, position193, tokenIndex193, false)
20✔
2260
                        position, tokenIndex = position193, tokenIndex193
20✔
2261
                        return false
20✔
2262
                },
2263
                /* 35 basicQuery <- <((subQueryStart query subQueryEnd) / (<comparator> Action26) / (<(logicNot? jsonpathFilter)> Action27))> */
2264
                func() bool {
575✔
2265
                        if memoized, ok := memoization[memoKey{35, position}]; ok {
575✔
2266
                                return memoizedResult(memoized)
×
2267
                        }
×
2268
                        position199, tokenIndex199 := position, tokenIndex
575✔
2269
                        {
1,150✔
2270
                                position200 := position
575✔
2271
                                {
1,150✔
2272
                                        position201, tokenIndex201 := position, tokenIndex
575✔
2273
                                        {
1,150✔
2274
                                                position203 := position
575✔
2275
                                                if buffer[position] != rune('(') {
1,131✔
2276
                                                        goto l202
556✔
2277
                                                }
2278
                                                position++
19✔
2279
                                                if !_rules[rulespace]() {
19✔
2280
                                                        goto l202
×
2281
                                                }
2282
                                                add(rulesubQueryStart, position203)
19✔
2283
                                        }
2284
                                        if !_rules[rulequery]() {
20✔
2285
                                                goto l202
1✔
2286
                                        }
2287
                                        {
18✔
2288
                                                position204 := position
18✔
2289
                                                if !_rules[rulespace]() {
18✔
2290
                                                        goto l202
×
2291
                                                }
2292
                                                if buffer[position] != rune(')') {
19✔
2293
                                                        goto l202
1✔
2294
                                                }
2295
                                                position++
17✔
2296
                                                add(rulesubQueryEnd, position204)
17✔
2297
                                        }
2298
                                        goto l201
17✔
2299
                                l202:
2300
                                        position, tokenIndex = position201, tokenIndex201
558✔
2301
                                        {
1,116✔
2302
                                                position206 := position
558✔
2303
                                                {
1,116✔
2304
                                                        position207 := position
558✔
2305
                                                        {
1,116✔
2306
                                                                position208, tokenIndex208 := position, tokenIndex
558✔
2307
                                                                if !_rules[ruleqParam]() {
606✔
2308
                                                                        goto l209
48✔
2309
                                                                }
2310
                                                                if !_rules[rulespace]() {
510✔
2311
                                                                        goto l209
×
2312
                                                                }
2313
                                                                {
510✔
2314
                                                                        position210, tokenIndex210 := position, tokenIndex
510✔
2315
                                                                        if buffer[position] != rune('=') {
823✔
2316
                                                                                goto l211
313✔
2317
                                                                        }
2318
                                                                        position++
197✔
2319
                                                                        if buffer[position] != rune('=') {
239✔
2320
                                                                                goto l211
42✔
2321
                                                                        }
2322
                                                                        position++
155✔
2323
                                                                        if !_rules[rulespace]() {
155✔
2324
                                                                                goto l211
×
2325
                                                                        }
2326
                                                                        if !_rules[ruleqParam]() {
191✔
2327
                                                                                goto l211
36✔
2328
                                                                        }
2329
                                                                        {
119✔
2330
                                                                                add(ruleAction28, position)
119✔
2331
                                                                        }
119✔
2332
                                                                        goto l210
119✔
2333
                                                                l211:
2334
                                                                        position, tokenIndex = position210, tokenIndex210
391✔
2335
                                                                        if buffer[position] != rune('!') {
765✔
2336
                                                                                goto l209
374✔
2337
                                                                        }
2338
                                                                        position++
17✔
2339
                                                                        if buffer[position] != rune('=') {
18✔
2340
                                                                                goto l209
1✔
2341
                                                                        }
2342
                                                                        position++
16✔
2343
                                                                        if !_rules[rulespace]() {
16✔
2344
                                                                                goto l209
×
2345
                                                                        }
2346
                                                                        if !_rules[ruleqParam]() {
17✔
2347
                                                                                goto l209
1✔
2348
                                                                        }
2349
                                                                        {
15✔
2350
                                                                                add(ruleAction29, position)
15✔
2351
                                                                        }
15✔
2352
                                                                }
2353
                                                        l210:
2354
                                                                goto l208
134✔
2355
                                                        l209:
2356
                                                                position, tokenIndex = position208, tokenIndex208
424✔
2357
                                                                if !_rules[ruleqNumericParam]() {
479✔
2358
                                                                        goto l214
55✔
2359
                                                                }
2360
                                                                if !_rules[rulespace]() {
369✔
2361
                                                                        goto l214
×
2362
                                                                }
2363
                                                                {
369✔
2364
                                                                        position215, tokenIndex215 := position, tokenIndex
369✔
2365
                                                                        if buffer[position] != rune('<') {
696✔
2366
                                                                                goto l216
327✔
2367
                                                                        }
2368
                                                                        position++
42✔
2369
                                                                        if buffer[position] != rune('=') {
73✔
2370
                                                                                goto l216
31✔
2371
                                                                        }
2372
                                                                        position++
11✔
2373
                                                                        if !_rules[rulespace]() {
11✔
2374
                                                                                goto l216
×
2375
                                                                        }
2376
                                                                        if !_rules[ruleqNumericParam]() {
12✔
2377
                                                                                goto l216
1✔
2378
                                                                        }
2379
                                                                        {
10✔
2380
                                                                                add(ruleAction30, position)
10✔
2381
                                                                        }
10✔
2382
                                                                        goto l215
10✔
2383
                                                                l216:
2384
                                                                        position, tokenIndex = position215, tokenIndex215
359✔
2385
                                                                        if buffer[position] != rune('<') {
686✔
2386
                                                                                goto l218
327✔
2387
                                                                        }
2388
                                                                        position++
32✔
2389
                                                                        if !_rules[rulespace]() {
32✔
2390
                                                                                goto l218
×
2391
                                                                        }
2392
                                                                        if !_rules[ruleqNumericParam]() {
35✔
2393
                                                                                goto l218
3✔
2394
                                                                        }
2395
                                                                        {
29✔
2396
                                                                                add(ruleAction31, position)
29✔
2397
                                                                        }
29✔
2398
                                                                        goto l215
29✔
2399
                                                                l218:
2400
                                                                        position, tokenIndex = position215, tokenIndex215
330✔
2401
                                                                        if buffer[position] != rune('>') {
582✔
2402
                                                                                goto l220
252✔
2403
                                                                        }
2404
                                                                        position++
78✔
2405
                                                                        if buffer[position] != rune('=') {
143✔
2406
                                                                                goto l220
65✔
2407
                                                                        }
2408
                                                                        position++
13✔
2409
                                                                        if !_rules[rulespace]() {
13✔
2410
                                                                                goto l220
×
2411
                                                                        }
2412
                                                                        if !_rules[ruleqNumericParam]() {
14✔
2413
                                                                                goto l220
1✔
2414
                                                                        }
2415
                                                                        {
12✔
2416
                                                                                add(ruleAction32, position)
12✔
2417
                                                                        }
12✔
2418
                                                                        goto l215
12✔
2419
                                                                l220:
2420
                                                                        position, tokenIndex = position215, tokenIndex215
318✔
2421
                                                                        if buffer[position] != rune('>') {
570✔
2422
                                                                                goto l214
252✔
2423
                                                                        }
2424
                                                                        position++
66✔
2425
                                                                        if !_rules[rulespace]() {
66✔
2426
                                                                                goto l214
×
2427
                                                                        }
2428
                                                                        if !_rules[ruleqNumericParam]() {
68✔
2429
                                                                                goto l214
2✔
2430
                                                                        }
2431
                                                                        {
64✔
2432
                                                                                add(ruleAction33, position)
64✔
2433
                                                                        }
64✔
2434
                                                                }
2435
                                                        l215:
2436
                                                                goto l208
115✔
2437
                                                        l214:
2438
                                                                position, tokenIndex = position208, tokenIndex208
309✔
2439
                                                                if !_rules[rulesingleJsonpathFilter]() {
364✔
2440
                                                                        goto l205
55✔
2441
                                                                }
2442
                                                                if !_rules[rulespace]() {
254✔
2443
                                                                        goto l205
×
2444
                                                                }
2445
                                                                if buffer[position] != rune('=') {
430✔
2446
                                                                        goto l205
176✔
2447
                                                                }
2448
                                                                position++
78✔
2449
                                                                if buffer[position] != rune('~') {
116✔
2450
                                                                        goto l205
38✔
2451
                                                                }
2452
                                                                position++
40✔
2453
                                                                if !_rules[rulespace]() {
40✔
2454
                                                                        goto l205
×
2455
                                                                }
2456
                                                                if buffer[position] != rune('/') {
42✔
2457
                                                                        goto l205
2✔
2458
                                                                }
2459
                                                                position++
38✔
2460
                                                                {
76✔
2461
                                                                        position223 := position
38✔
2462
                                                                        {
76✔
2463
                                                                                position224 := position
38✔
2464
                                                                        l225:
38✔
2465
                                                                                {
163✔
2466
                                                                                        position226, tokenIndex226 := position, tokenIndex
163✔
2467
                                                                                        {
326✔
2468
                                                                                                position227, tokenIndex227 := position, tokenIndex
163✔
2469
                                                                                                if buffer[position] != rune('\\') {
323✔
2470
                                                                                                        goto l228
160✔
2471
                                                                                                }
2472
                                                                                                position++
3✔
2473
                                                                                                {
6✔
2474
                                                                                                        position229, tokenIndex229 := position, tokenIndex
3✔
2475
                                                                                                        if buffer[position] != rune('\\') {
5✔
2476
                                                                                                                goto l230
2✔
2477
                                                                                                        }
2478
                                                                                                        position++
1✔
2479
                                                                                                        goto l229
1✔
2480
                                                                                                l230:
2481
                                                                                                        position, tokenIndex = position229, tokenIndex229
2✔
2482
                                                                                                        if buffer[position] != rune('/') {
3✔
2483
                                                                                                                goto l228
1✔
2484
                                                                                                        }
2485
                                                                                                        position++
1✔
2486
                                                                                                }
2487
                                                                                        l229:
2488
                                                                                                goto l227
2✔
2489
                                                                                        l228:
2490
                                                                                                position, tokenIndex = position227, tokenIndex227
161✔
2491
                                                                                                {
322✔
2492
                                                                                                        position231, tokenIndex231 := position, tokenIndex
161✔
2493
                                                                                                        if buffer[position] != rune('/') {
285✔
2494
                                                                                                                goto l231
124✔
2495
                                                                                                        }
2496
                                                                                                        position++
37✔
2497
                                                                                                        goto l226
37✔
2498
                                                                                                l231:
2499
                                                                                                        position, tokenIndex = position231, tokenIndex231
124✔
2500
                                                                                                }
2501
                                                                                                if !matchDot() {
125✔
2502
                                                                                                        goto l226
1✔
2503
                                                                                                }
2504
                                                                                        }
2505
                                                                                l227:
2506
                                                                                        goto l225
125✔
2507
                                                                                l226:
2508
                                                                                        position, tokenIndex = position226, tokenIndex226
38✔
2509
                                                                                }
2510
                                                                                add(ruleregex, position224)
38✔
2511
                                                                        }
2512
                                                                        add(rulePegText, position223)
38✔
2513
                                                                }
2514
                                                                if buffer[position] != rune('/') {
39✔
2515
                                                                        goto l205
1✔
2516
                                                                }
2517
                                                                position++
37✔
2518
                                                                {
74✔
2519
                                                                        add(ruleAction34, position)
37✔
2520
                                                                }
37✔
2521
                                                        }
2522
                                                l208:
2523
                                                        add(rulecomparator, position207)
286✔
2524
                                                }
2525
                                                add(rulePegText, position206)
286✔
2526
                                        }
2527
                                        {
286✔
2528
                                                add(ruleAction26, position)
286✔
2529
                                        }
286✔
2530
                                        goto l201
286✔
2531
                                l205:
2532
                                        position, tokenIndex = position201, tokenIndex201
272✔
2533
                                        {
544✔
2534
                                                position234 := position
272✔
2535
                                                {
544✔
2536
                                                        position235, tokenIndex235 := position, tokenIndex
272✔
2537
                                                        {
544✔
2538
                                                                position237 := position
272✔
2539
                                                                if buffer[position] != rune('!') {
510✔
2540
                                                                        goto l235
238✔
2541
                                                                }
2542
                                                                position++
34✔
2543
                                                                if !_rules[rulespace]() {
34✔
2544
                                                                        goto l235
×
2545
                                                                }
2546
                                                                add(rulelogicNot, position237)
34✔
2547
                                                        }
2548
                                                        goto l236
34✔
2549
                                                l235:
2550
                                                        position, tokenIndex = position235, tokenIndex235
238✔
2551
                                                }
2552
                                        l236:
2553
                                                if !_rules[rulejsonpathFilter]() {
296✔
2554
                                                        goto l199
24✔
2555
                                                }
2556
                                                add(rulePegText, position234)
248✔
2557
                                        }
2558
                                        {
248✔
2559
                                                add(ruleAction27, position)
248✔
2560
                                        }
248✔
2561
                                }
2562
                        l201:
2563
                                add(rulebasicQuery, position200)
551✔
2564
                        }
2565
                        memoize(35, position199, tokenIndex199, true)
551✔
2566
                        return true
551✔
2567
                l199:
551✔
2568
                        memoize(35, position199, tokenIndex199, false)
24✔
2569
                        position, tokenIndex = position199, tokenIndex199
24✔
2570
                        return false
24✔
2571
                },
2572
                /* 36 logicOr <- <(space ('|' '|') space)> */
2573
                nil,
2574
                /* 37 logicAnd <- <(space ('&' '&') space)> */
2575
                nil,
2576
                /* 38 logicNot <- <('!' space)> */
2577
                nil,
2578
                /* 39 comparator <- <((qParam space (('=' '=' space qParam Action28) / ('!' '=' space qParam Action29))) / (qNumericParam space (('<' '=' space qNumericParam Action30) / ('<' space qNumericParam Action31) / ('>' '=' space qNumericParam Action32) / ('>' space qNumericParam Action33))) / (singleJsonpathFilter space ('=' '~') space '/' <regex> '/' Action34))> */
2579
                nil,
2580
                /* 40 qParam <- <((qLiteral Action35) / singleJsonpathFilter)> */
2581
                func() bool {
729✔
2582
                        if memoized, ok := memoization[memoKey{40, position}]; ok {
729✔
2583
                                return memoizedResult(memoized)
×
2584
                        }
×
2585
                        position243, tokenIndex243 := position, tokenIndex
729✔
2586
                        {
1,458✔
2587
                                position244 := position
729✔
2588
                                {
1,458✔
2589
                                        position245, tokenIndex245 := position, tokenIndex
729✔
2590
                                        {
1,458✔
2591
                                                position247 := position
729✔
2592
                                                {
1,458✔
2593
                                                        switch buffer[position] {
729✔
2594
                                                        case 'N', 'n':
12✔
2595
                                                                {
24✔
2596
                                                                        position249 := position
12✔
2597
                                                                        {
24✔
2598
                                                                                position250, tokenIndex250 := position, tokenIndex
12✔
2599
                                                                                if buffer[position] != rune('n') {
19✔
2600
                                                                                        goto l251
7✔
2601
                                                                                }
2602
                                                                                position++
5✔
2603
                                                                                if buffer[position] != rune('u') {
6✔
2604
                                                                                        goto l251
1✔
2605
                                                                                }
2606
                                                                                position++
4✔
2607
                                                                                if buffer[position] != rune('l') {
5✔
2608
                                                                                        goto l251
1✔
2609
                                                                                }
2610
                                                                                position++
3✔
2611
                                                                                if buffer[position] != rune('l') {
4✔
2612
                                                                                        goto l251
1✔
2613
                                                                                }
2614
                                                                                position++
2✔
2615
                                                                                goto l250
2✔
2616
                                                                        l251:
2617
                                                                                position, tokenIndex = position250, tokenIndex250
10✔
2618
                                                                                if buffer[position] != rune('N') {
13✔
2619
                                                                                        goto l252
3✔
2620
                                                                                }
2621
                                                                                position++
7✔
2622
                                                                                if buffer[position] != rune('u') {
10✔
2623
                                                                                        goto l252
3✔
2624
                                                                                }
2625
                                                                                position++
4✔
2626
                                                                                if buffer[position] != rune('l') {
6✔
2627
                                                                                        goto l252
2✔
2628
                                                                                }
2629
                                                                                position++
2✔
2630
                                                                                if buffer[position] != rune('l') {
3✔
2631
                                                                                        goto l252
1✔
2632
                                                                                }
2633
                                                                                position++
1✔
2634
                                                                                goto l250
1✔
2635
                                                                        l252:
2636
                                                                                position, tokenIndex = position250, tokenIndex250
9✔
2637
                                                                                if buffer[position] != rune('N') {
12✔
2638
                                                                                        goto l246
3✔
2639
                                                                                }
2640
                                                                                position++
6✔
2641
                                                                                if buffer[position] != rune('U') {
9✔
2642
                                                                                        goto l246
3✔
2643
                                                                                }
2644
                                                                                position++
3✔
2645
                                                                                if buffer[position] != rune('L') {
4✔
2646
                                                                                        goto l246
1✔
2647
                                                                                }
2648
                                                                                position++
2✔
2649
                                                                                if buffer[position] != rune('L') {
3✔
2650
                                                                                        goto l246
1✔
2651
                                                                                }
2652
                                                                                position++
1✔
2653
                                                                        }
2654
                                                                l250:
2655
                                                                        {
4✔
2656
                                                                                add(ruleAction45, position)
4✔
2657
                                                                        }
4✔
2658
                                                                        add(rulelNull, position249)
4✔
2659
                                                                }
2660
                                                        case '"', '\'':
17✔
2661
                                                                {
34✔
2662
                                                                        position254 := position
17✔
2663
                                                                        {
34✔
2664
                                                                                position255, tokenIndex255 := position, tokenIndex
17✔
2665
                                                                                if buffer[position] != rune('\'') {
24✔
2666
                                                                                        goto l256
7✔
2667
                                                                                }
2668
                                                                                position++
10✔
2669
                                                                                {
20✔
2670
                                                                                        position257 := position
10✔
2671
                                                                                l258:
10✔
2672
                                                                                        {
64✔
2673
                                                                                                position259, tokenIndex259 := position, tokenIndex
64✔
2674
                                                                                                {
128✔
2675
                                                                                                        position260, tokenIndex260 := position, tokenIndex
64✔
2676
                                                                                                        if buffer[position] != rune('\\') {
124✔
2677
                                                                                                                goto l261
60✔
2678
                                                                                                        }
2679
                                                                                                        position++
4✔
2680
                                                                                                        {
8✔
2681
                                                                                                                position262, tokenIndex262 := position, tokenIndex
4✔
2682
                                                                                                                if buffer[position] != rune('\\') {
7✔
2683
                                                                                                                        goto l263
3✔
2684
                                                                                                                }
2685
                                                                                                                position++
1✔
2686
                                                                                                                goto l262
1✔
2687
                                                                                                        l263:
2688
                                                                                                                position, tokenIndex = position262, tokenIndex262
3✔
2689
                                                                                                                if buffer[position] != rune('\'') {
4✔
2690
                                                                                                                        goto l261
1✔
2691
                                                                                                                }
2692
                                                                                                                position++
2✔
2693
                                                                                                        }
2694
                                                                                                l262:
2695
                                                                                                        goto l260
3✔
2696
                                                                                                l261:
2697
                                                                                                        position, tokenIndex = position260, tokenIndex260
61✔
2698
                                                                                                        {
122✔
2699
                                                                                                                position264, tokenIndex264 := position, tokenIndex
61✔
2700
                                                                                                                if buffer[position] != rune('\'') {
113✔
2701
                                                                                                                        goto l264
52✔
2702
                                                                                                                }
2703
                                                                                                                position++
9✔
2704
                                                                                                                goto l259
9✔
2705
                                                                                                        l264:
2706
                                                                                                                position, tokenIndex = position264, tokenIndex264
52✔
2707
                                                                                                        }
2708
                                                                                                        if !matchDot() {
53✔
2709
                                                                                                                goto l259
1✔
2710
                                                                                                        }
2711
                                                                                                }
2712
                                                                                        l260:
2713
                                                                                                goto l258
54✔
2714
                                                                                        l259:
2715
                                                                                                position, tokenIndex = position259, tokenIndex259
10✔
2716
                                                                                        }
2717
                                                                                        add(rulePegText, position257)
10✔
2718
                                                                                }
2719
                                                                                if buffer[position] != rune('\'') {
11✔
2720
                                                                                        goto l256
1✔
2721
                                                                                }
2722
                                                                                position++
9✔
2723
                                                                                {
18✔
2724
                                                                                        add(ruleAction43, position)
9✔
2725
                                                                                }
9✔
2726
                                                                                goto l255
9✔
2727
                                                                        l256:
2728
                                                                                position, tokenIndex = position255, tokenIndex255
8✔
2729
                                                                                if buffer[position] != rune('"') {
9✔
2730
                                                                                        goto l246
1✔
2731
                                                                                }
2732
                                                                                position++
7✔
2733
                                                                                {
14✔
2734
                                                                                        position266 := position
7✔
2735
                                                                                l267:
7✔
2736
                                                                                        {
54✔
2737
                                                                                                position268, tokenIndex268 := position, tokenIndex
54✔
2738
                                                                                                {
108✔
2739
                                                                                                        position269, tokenIndex269 := position, tokenIndex
54✔
2740
                                                                                                        if buffer[position] != rune('\\') {
104✔
2741
                                                                                                                goto l270
50✔
2742
                                                                                                        }
2743
                                                                                                        position++
4✔
2744
                                                                                                        {
8✔
2745
                                                                                                                position271, tokenIndex271 := position, tokenIndex
4✔
2746
                                                                                                                if buffer[position] != rune('\\') {
7✔
2747
                                                                                                                        goto l272
3✔
2748
                                                                                                                }
2749
                                                                                                                position++
1✔
2750
                                                                                                                goto l271
1✔
2751
                                                                                                        l272:
2752
                                                                                                                position, tokenIndex = position271, tokenIndex271
3✔
2753
                                                                                                                if buffer[position] != rune('"') {
4✔
2754
                                                                                                                        goto l270
1✔
2755
                                                                                                                }
2756
                                                                                                                position++
2✔
2757
                                                                                                        }
2758
                                                                                                l271:
2759
                                                                                                        goto l269
3✔
2760
                                                                                                l270:
2761
                                                                                                        position, tokenIndex = position269, tokenIndex269
51✔
2762
                                                                                                        {
102✔
2763
                                                                                                                position273, tokenIndex273 := position, tokenIndex
51✔
2764
                                                                                                                if buffer[position] != rune('"') {
96✔
2765
                                                                                                                        goto l273
45✔
2766
                                                                                                                }
2767
                                                                                                                position++
6✔
2768
                                                                                                                goto l268
6✔
2769
                                                                                                        l273:
2770
                                                                                                                position, tokenIndex = position273, tokenIndex273
45✔
2771
                                                                                                        }
2772
                                                                                                        if !matchDot() {
46✔
2773
                                                                                                                goto l268
1✔
2774
                                                                                                        }
2775
                                                                                                }
2776
                                                                                        l269:
2777
                                                                                                goto l267
47✔
2778
                                                                                        l268:
2779
                                                                                                position, tokenIndex = position268, tokenIndex268
7✔
2780
                                                                                        }
2781
                                                                                        add(rulePegText, position266)
7✔
2782
                                                                                }
2783
                                                                                if buffer[position] != rune('"') {
8✔
2784
                                                                                        goto l246
1✔
2785
                                                                                }
2786
                                                                                position++
6✔
2787
                                                                                {
12✔
2788
                                                                                        add(ruleAction44, position)
6✔
2789
                                                                                }
6✔
2790
                                                                        }
2791
                                                                l255:
2792
                                                                        add(rulelString, position254)
15✔
2793
                                                                }
2794
                                                        case 'F', 'T', 'f', 't':
31✔
2795
                                                                {
62✔
2796
                                                                        position275 := position
31✔
2797
                                                                        {
62✔
2798
                                                                                position276, tokenIndex276 := position, tokenIndex
31✔
2799
                                                                                {
62✔
2800
                                                                                        position278, tokenIndex278 := position, tokenIndex
31✔
2801
                                                                                        if buffer[position] != rune('t') {
55✔
2802
                                                                                                goto l279
24✔
2803
                                                                                        }
2804
                                                                                        position++
7✔
2805
                                                                                        if buffer[position] != rune('r') {
8✔
2806
                                                                                                goto l279
1✔
2807
                                                                                        }
2808
                                                                                        position++
6✔
2809
                                                                                        if buffer[position] != rune('u') {
7✔
2810
                                                                                                goto l279
1✔
2811
                                                                                        }
2812
                                                                                        position++
5✔
2813
                                                                                        if buffer[position] != rune('e') {
6✔
2814
                                                                                                goto l279
1✔
2815
                                                                                        }
2816
                                                                                        position++
4✔
2817
                                                                                        goto l278
4✔
2818
                                                                                l279:
2819
                                                                                        position, tokenIndex = position278, tokenIndex278
27✔
2820
                                                                                        if buffer[position] != rune('T') {
47✔
2821
                                                                                                goto l280
20✔
2822
                                                                                        }
2823
                                                                                        position++
7✔
2824
                                                                                        if buffer[position] != rune('r') {
10✔
2825
                                                                                                goto l280
3✔
2826
                                                                                        }
2827
                                                                                        position++
4✔
2828
                                                                                        if buffer[position] != rune('u') {
6✔
2829
                                                                                                goto l280
2✔
2830
                                                                                        }
2831
                                                                                        position++
2✔
2832
                                                                                        if buffer[position] != rune('e') {
3✔
2833
                                                                                                goto l280
1✔
2834
                                                                                        }
2835
                                                                                        position++
1✔
2836
                                                                                        goto l278
1✔
2837
                                                                                l280:
2838
                                                                                        position, tokenIndex = position278, tokenIndex278
26✔
2839
                                                                                        if buffer[position] != rune('T') {
46✔
2840
                                                                                                goto l277
20✔
2841
                                                                                        }
2842
                                                                                        position++
6✔
2843
                                                                                        if buffer[position] != rune('R') {
9✔
2844
                                                                                                goto l277
3✔
2845
                                                                                        }
2846
                                                                                        position++
3✔
2847
                                                                                        if buffer[position] != rune('U') {
4✔
2848
                                                                                                goto l277
1✔
2849
                                                                                        }
2850
                                                                                        position++
2✔
2851
                                                                                        if buffer[position] != rune('E') {
3✔
2852
                                                                                                goto l277
1✔
2853
                                                                                        }
2854
                                                                                        position++
1✔
2855
                                                                                }
2856
                                                                        l278:
2857
                                                                                {
6✔
2858
                                                                                        add(ruleAction41, position)
6✔
2859
                                                                                }
6✔
2860
                                                                                goto l276
6✔
2861
                                                                        l277:
2862
                                                                                position, tokenIndex = position276, tokenIndex276
25✔
2863
                                                                                {
50✔
2864
                                                                                        position282, tokenIndex282 := position, tokenIndex
25✔
2865
                                                                                        if buffer[position] != rune('f') {
42✔
2866
                                                                                                goto l283
17✔
2867
                                                                                        }
2868
                                                                                        position++
8✔
2869
                                                                                        if buffer[position] != rune('a') {
9✔
2870
                                                                                                goto l283
1✔
2871
                                                                                        }
2872
                                                                                        position++
7✔
2873
                                                                                        if buffer[position] != rune('l') {
8✔
2874
                                                                                                goto l283
1✔
2875
                                                                                        }
2876
                                                                                        position++
6✔
2877
                                                                                        if buffer[position] != rune('s') {
7✔
2878
                                                                                                goto l283
1✔
2879
                                                                                        }
2880
                                                                                        position++
5✔
2881
                                                                                        if buffer[position] != rune('e') {
6✔
2882
                                                                                                goto l283
1✔
2883
                                                                                        }
2884
                                                                                        position++
4✔
2885
                                                                                        goto l282
4✔
2886
                                                                                l283:
2887
                                                                                        position, tokenIndex = position282, tokenIndex282
21✔
2888
                                                                                        if buffer[position] != rune('F') {
33✔
2889
                                                                                                goto l284
12✔
2890
                                                                                        }
2891
                                                                                        position++
9✔
2892
                                                                                        if buffer[position] != rune('a') {
13✔
2893
                                                                                                goto l284
4✔
2894
                                                                                        }
2895
                                                                                        position++
5✔
2896
                                                                                        if buffer[position] != rune('l') {
7✔
2897
                                                                                                goto l284
2✔
2898
                                                                                        }
2899
                                                                                        position++
3✔
2900
                                                                                        if buffer[position] != rune('s') {
4✔
2901
                                                                                                goto l284
1✔
2902
                                                                                        }
2903
                                                                                        position++
2✔
2904
                                                                                        if buffer[position] != rune('e') {
3✔
2905
                                                                                                goto l284
1✔
2906
                                                                                        }
2907
                                                                                        position++
1✔
2908
                                                                                        goto l282
1✔
2909
                                                                                l284:
2910
                                                                                        position, tokenIndex = position282, tokenIndex282
20✔
2911
                                                                                        if buffer[position] != rune('F') {
32✔
2912
                                                                                                goto l246
12✔
2913
                                                                                        }
2914
                                                                                        position++
8✔
2915
                                                                                        if buffer[position] != rune('A') {
12✔
2916
                                                                                                goto l246
4✔
2917
                                                                                        }
2918
                                                                                        position++
4✔
2919
                                                                                        if buffer[position] != rune('L') {
5✔
2920
                                                                                                goto l246
1✔
2921
                                                                                        }
2922
                                                                                        position++
3✔
2923
                                                                                        if buffer[position] != rune('S') {
4✔
2924
                                                                                                goto l246
1✔
2925
                                                                                        }
2926
                                                                                        position++
2✔
2927
                                                                                        if buffer[position] != rune('E') {
3✔
2928
                                                                                                goto l246
1✔
2929
                                                                                        }
2930
                                                                                        position++
1✔
2931
                                                                                }
2932
                                                                        l282:
2933
                                                                                {
6✔
2934
                                                                                        add(ruleAction42, position)
6✔
2935
                                                                                }
6✔
2936
                                                                        }
2937
                                                                l276:
2938
                                                                        add(rulelBool, position275)
12✔
2939
                                                                }
2940
                                                        default:
669✔
2941
                                                                if !_rules[rulelNumber]() {
1,237✔
2942
                                                                        goto l246
568✔
2943
                                                                }
2944
                                                        }
2945
                                                }
2946

2947
                                                add(ruleqLiteral, position247)
132✔
2948
                                        }
2949
                                        {
132✔
2950
                                                add(ruleAction35, position)
132✔
2951
                                        }
132✔
2952
                                        goto l245
132✔
2953
                                l246:
2954
                                        position, tokenIndex = position245, tokenIndex245
597✔
2955
                                        if !_rules[rulesingleJsonpathFilter]() {
682✔
2956
                                                goto l243
85✔
2957
                                        }
2958
                                }
2959
                        l245:
2960
                                add(ruleqParam, position244)
644✔
2961
                        }
2962
                        memoize(40, position243, tokenIndex243, true)
644✔
2963
                        return true
644✔
2964
                l243:
644✔
2965
                        memoize(40, position243, tokenIndex243, false)
85✔
2966
                        position, tokenIndex = position243, tokenIndex243
85✔
2967
                        return false
85✔
2968
                },
2969
                /* 41 qNumericParam <- <((lNumber Action36) / singleJsonpathFilter)> */
2970
                func() bool {
546✔
2971
                        if memoized, ok := memoization[memoKey{41, position}]; ok {
546✔
2972
                                return memoizedResult(memoized)
×
2973
                        }
×
2974
                        position287, tokenIndex287 := position, tokenIndex
546✔
2975
                        {
1,092✔
2976
                                position288 := position
546✔
2977
                                {
1,092✔
2978
                                        position289, tokenIndex289 := position, tokenIndex
546✔
2979
                                        if !_rules[rulelNumber]() {
1,002✔
2980
                                                goto l290
456✔
2981
                                        }
2982
                                        {
90✔
2983
                                                add(ruleAction36, position)
90✔
2984
                                        }
90✔
2985
                                        goto l289
90✔
2986
                                l290:
2987
                                        position, tokenIndex = position289, tokenIndex289
456✔
2988
                                        if !_rules[rulesingleJsonpathFilter]() {
518✔
2989
                                                goto l287
62✔
2990
                                        }
2991
                                }
2992
                        l289:
2993
                                add(ruleqNumericParam, position288)
484✔
2994
                        }
2995
                        memoize(41, position287, tokenIndex287, true)
484✔
2996
                        return true
484✔
2997
                l287:
484✔
2998
                        memoize(41, position287, tokenIndex287, false)
62✔
2999
                        position, tokenIndex = position287, tokenIndex287
62✔
3000
                        return false
62✔
3001
                },
3002
                /* 42 qLiteral <- <((&('N' | 'n') lNull) | (&('"' | '\'') lString) | (&('F' | 'T' | 'f' | 't') lBool) | (&('+' | '-' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9') lNumber))> */
3003
                nil,
3004
                /* 43 singleJsonpathFilter <- <(<jsonpathFilter> Action37)> */
3005
                func() bool {
1,362✔
3006
                        if memoized, ok := memoization[memoKey{43, position}]; ok {
2,078✔
3007
                                return memoizedResult(memoized)
716✔
3008
                        }
716✔
3009
                        position293, tokenIndex293 := position, tokenIndex
646✔
3010
                        {
1,292✔
3011
                                position294 := position
646✔
3012
                                {
1,292✔
3013
                                        position295 := position
646✔
3014
                                        if !_rules[rulejsonpathFilter]() {
745✔
3015
                                                goto l293
99✔
3016
                                        }
3017
                                        add(rulePegText, position295)
547✔
3018
                                }
3019
                                {
547✔
3020
                                        add(ruleAction37, position)
547✔
3021
                                }
547✔
3022
                                add(rulesingleJsonpathFilter, position294)
547✔
3023
                        }
3024
                        memoize(43, position293, tokenIndex293, true)
547✔
3025
                        return true
547✔
3026
                l293:
547✔
3027
                        memoize(43, position293, tokenIndex293, false)
99✔
3028
                        position, tokenIndex = position293, tokenIndex293
99✔
3029
                        return false
99✔
3030
                },
3031
                /* 44 jsonpathFilter <- <(Action38 jsonpathParameter Action39)> */
3032
                func() bool {
918✔
3033
                        if memoized, ok := memoization[memoKey{44, position}]; ok {
1,156✔
3034
                                return memoizedResult(memoized)
238✔
3035
                        }
238✔
3036
                        position297, tokenIndex297 := position, tokenIndex
680✔
3037
                        {
1,360✔
3038
                                position298 := position
680✔
3039
                                {
1,360✔
3040
                                        add(ruleAction38, position)
680✔
3041
                                }
680✔
3042
                                {
680✔
3043
                                        position300 := position
680✔
3044
                                        if !_rules[rulespace]() {
680✔
3045
                                                goto l297
×
3046
                                        }
3047
                                        {
680✔
3048
                                                position301 := position
680✔
3049
                                                {
1,360✔
3050
                                                        position302, tokenIndex302 := position, tokenIndex
680✔
3051
                                                        if !_rules[rulerootIdentifier]() {
1,284✔
3052
                                                                goto l303
604✔
3053
                                                        }
3054
                                                        goto l302
76✔
3055
                                                l303:
3056
                                                        position, tokenIndex = position302, tokenIndex302
604✔
3057
                                                        {
1,208✔
3058
                                                                position304 := position
604✔
3059
                                                                if buffer[position] != rune('@') {
706✔
3060
                                                                        goto l297
102✔
3061
                                                                }
3062
                                                                position++
502✔
3063
                                                                {
1,004✔
3064
                                                                        add(ruleAction9, position)
502✔
3065
                                                                }
502✔
3066
                                                                add(rulecurrentRootIdentifier, position304)
502✔
3067
                                                        }
3068
                                                }
3069
                                        l302:
3070
                                                add(ruleparameterRootNode, position301)
578✔
3071
                                        }
3072
                                        if !_rules[rulecontinuedJsonpath]() {
578✔
3073
                                                goto l297
×
3074
                                        }
3075
                                        add(rulejsonpathParameter, position300)
578✔
3076
                                }
3077
                                {
578✔
3078
                                        add(ruleAction39, position)
578✔
3079
                                }
578✔
3080
                                add(rulejsonpathFilter, position298)
578✔
3081
                        }
3082
                        memoize(44, position297, tokenIndex297, true)
578✔
3083
                        return true
578✔
3084
                l297:
578✔
3085
                        memoize(44, position297, tokenIndex297, false)
102✔
3086
                        position, tokenIndex = position297, tokenIndex297
102✔
3087
                        return false
102✔
3088
                },
3089
                /* 45 lNumber <- <(<(('-' / '+')? [0-9] ((&('A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z') [A-Z]) | (&('.') '.') | (&('+') '+') | (&('-') '-') | (&('0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9') [0-9]) | (&('a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z') [a-z]))*)> Action40)> */
3090
                func() bool {
1,215✔
3091
                        if memoized, ok := memoization[memoKey{45, position}]; ok {
1,632✔
3092
                                return memoizedResult(memoized)
417✔
3093
                        }
417✔
3094
                        position307, tokenIndex307 := position, tokenIndex
798✔
3095
                        {
1,596✔
3096
                                position308 := position
798✔
3097
                                {
1,596✔
3098
                                        position309 := position
798✔
3099
                                        {
1,596✔
3100
                                                position310, tokenIndex310 := position, tokenIndex
798✔
3101
                                                {
1,596✔
3102
                                                        position312, tokenIndex312 := position, tokenIndex
798✔
3103
                                                        if buffer[position] != rune('-') {
1,592✔
3104
                                                                goto l313
794✔
3105
                                                        }
3106
                                                        position++
4✔
3107
                                                        goto l312
4✔
3108
                                                l313:
3109
                                                        position, tokenIndex = position312, tokenIndex312
794✔
3110
                                                        if buffer[position] != rune('+') {
1,587✔
3111
                                                                goto l310
793✔
3112
                                                        }
3113
                                                        position++
1✔
3114
                                                }
3115
                                        l312:
3116
                                                goto l311
5✔
3117
                                        l310:
3118
                                                position, tokenIndex = position310, tokenIndex310
793✔
3119
                                        }
3120
                                l311:
3121
                                        if c := buffer[position]; c < rune('0') || c > rune('9') {
1,415✔
3122
                                                goto l307
617✔
3123
                                        }
3124
                                        position++
181✔
3125
                                l314:
181✔
3126
                                        {
336✔
3127
                                                position315, tokenIndex315 := position, tokenIndex
336✔
3128
                                                {
672✔
3129
                                                        switch buffer[position] {
336✔
3130
                                                        case 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z':
1✔
3131
                                                                position++
1✔
3132
                                                        case '.':
24✔
3133
                                                                position++
24✔
3134
                                                        case '+':
1✔
3135
                                                                position++
1✔
3136
                                                        case '-':
1✔
3137
                                                                position++
1✔
3138
                                                        case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
120✔
3139
                                                                position++
120✔
3140
                                                        default:
189✔
3141
                                                                if c := buffer[position]; c < rune('a') || c > rune('z') {
370✔
3142
                                                                        goto l315
181✔
3143
                                                                }
3144
                                                                position++
8✔
3145
                                                        }
3146
                                                }
3147

3148
                                                goto l314
155✔
3149
                                        l315:
3150
                                                position, tokenIndex = position315, tokenIndex315
181✔
3151
                                        }
3152
                                        add(rulePegText, position309)
181✔
3153
                                }
3154
                                {
181✔
3155
                                        add(ruleAction40, position)
181✔
3156
                                }
181✔
3157
                                add(rulelNumber, position308)
181✔
3158
                        }
3159
                        memoize(45, position307, tokenIndex307, true)
181✔
3160
                        return true
181✔
3161
                l307:
181✔
3162
                        memoize(45, position307, tokenIndex307, false)
617✔
3163
                        position, tokenIndex = position307, tokenIndex307
617✔
3164
                        return false
617✔
3165
                },
3166
                /* 46 lBool <- <(((('t' 'r' 'u' 'e') / ('T' 'r' 'u' 'e') / ('T' 'R' 'U' 'E')) Action41) / ((('f' 'a' 'l' 's' 'e') / ('F' 'a' 'l' 's' 'e') / ('F' 'A' 'L' 'S' 'E')) Action42))> */
3167
                nil,
3168
                /* 47 lString <- <(('\'' <(('\\' ('\\' / '\'')) / (!'\'' .))*> '\'' Action43) / ('"' <(('\\' ('\\' / '"')) / (!'"' .))*> '"' Action44))> */
3169
                nil,
3170
                /* 48 lNull <- <((('n' 'u' 'l' 'l') / ('N' 'u' 'l' 'l') / ('N' 'U' 'L' 'L')) Action45)> */
3171
                nil,
3172
                /* 49 regex <- <(('\\' ('\\' / '/')) / (!'/' .))*> */
3173
                nil,
3174
                /* 50 squareBracketStart <- <('[' space)> */
3175
                nil,
3176
                /* 51 squareBracketEnd <- <(space ']')> */
3177
                nil,
3178
                /* 52 scriptStart <- <('(' space)> */
3179
                nil,
3180
                /* 53 scriptEnd <- <(space ')')> */
3181
                func() bool {
32✔
3182
                        if memoized, ok := memoization[memoKey{53, position}]; ok {
36✔
3183
                                return memoizedResult(memoized)
4✔
3184
                        }
4✔
3185
                        position325, tokenIndex325 := position, tokenIndex
28✔
3186
                        {
56✔
3187
                                position326 := position
28✔
3188
                                if !_rules[rulespace]() {
28✔
3189
                                        goto l325
×
3190
                                }
3191
                                if buffer[position] != rune(')') {
52✔
3192
                                        goto l325
24✔
3193
                                }
3194
                                position++
4✔
3195
                                add(rulescriptEnd, position326)
4✔
3196
                        }
3197
                        memoize(53, position325, tokenIndex325, true)
4✔
3198
                        return true
4✔
3199
                l325:
4✔
3200
                        memoize(53, position325, tokenIndex325, false)
24✔
3201
                        position, tokenIndex = position325, tokenIndex325
24✔
3202
                        return false
24✔
3203
                },
3204
                /* 54 filterStart <- <('?' '(' space)> */
3205
                nil,
3206
                /* 55 filterEnd <- <(space ')')> */
3207
                nil,
3208
                /* 56 subQueryStart <- <('(' space)> */
3209
                nil,
3210
                /* 57 subQueryEnd <- <(space ')')> */
3211
                nil,
3212
                /* 58 space <- <' '*> */
3213
                func() bool {
12,483✔
3214
                        if memoized, ok := memoization[memoKey{58, position}]; ok {
16,814✔
3215
                                return memoizedResult(memoized)
4,331✔
3216
                        }
4,331✔
3217
                        position331, tokenIndex331 := position, tokenIndex
8,152✔
3218
                        {
16,304✔
3219
                                position332 := position
8,152✔
3220
                        l333:
8,152✔
3221
                                {
8,548✔
3222
                                        position334, tokenIndex334 := position, tokenIndex
8,548✔
3223
                                        if buffer[position] != rune(' ') {
16,700✔
3224
                                                goto l334
8,152✔
3225
                                        }
3226
                                        position++
396✔
3227
                                        goto l333
396✔
3228
                                l334:
3229
                                        position, tokenIndex = position334, tokenIndex334
8,152✔
3230
                                }
3231
                                add(rulespace, position332)
8,152✔
3232
                        }
3233
                        memoize(58, position331, tokenIndex331, true)
8,152✔
3234
                        return true
8,152✔
3235
                },
3236
                /* 60 Action0 <- <{
3237
                    p.root = p.deleteRootIdentifier(p.pop().(syntaxNode))
3238
                    p.setConnectedText(p.root)
3239
                }> */
3240
                nil,
3241
                nil,
3242
                /* 62 Action1 <- <{
3243
                    panic(p.syntaxErr(
3244
                        begin, msgErrorInvalidSyntaxUnrecognizedInput, buffer))
3245
                }> */
3246
                nil,
3247
                /* 63 Action2 <- <{
3248
                    p.setNodeChain()
3249
                    p.updateRootValueGroup()
3250
                }> */
3251
                nil,
3252
                /* 64 Action3 <- <{
3253
                    p.pushRecursiveChildIdentifier(p.pop().(syntaxNode))
3254
                }> */
3255
                nil,
3256
                /* 65 Action4 <- <{
3257
                    p.setLastNodeText(text)
3258
                }> */
3259
                nil,
3260
                /* 66 Action5 <- <{
3261
                    p.pushFunction(text, p.pop().(string))
3262
                }> */
3263
                nil,
3264
                /* 67 Action6 <- <{
3265
                    p.push(text)
3266
                }> */
3267
                nil,
3268
                /* 68 Action7 <- <{
3269
                    p.setLastNodeText(text)
3270
                }> */
3271
                nil,
3272
                /* 69 Action8 <- <{
3273
                    p.pushRootIdentifier()
3274
                }> */
3275
                nil,
3276
                /* 70 Action9 <- <{
3277
                    p.pushCurrentRootIdentifier()
3278
                }> */
3279
                nil,
3280
                /* 71 Action10 <- <{
3281
                    p.pushChildSingleIdentifier(p.unescape(text))
3282
                }> */
3283
                nil,
3284
                /* 72 Action11 <- <{
3285
                    identifier2 := p.pop().(syntaxNode)
3286
                    identifier1 := p.pop().(syntaxNode)
3287
                    p.pushChildMultiIdentifier(identifier1, identifier2)
3288
                }> */
3289
                nil,
3290
                /* 73 Action12 <- <{
3291
                    p.pushChildWildcardIdentifier()
3292
                }> */
3293
                nil,
3294
                /* 74 Action13 <- <{
3295
                    p.pushChildSingleIdentifier(p.unescapeSingleQuotedString(text))
3296
                }> */
3297
                nil,
3298
                /* 75 Action14 <- <{
3299
                    p.pushChildSingleIdentifier(p.unescapeDoubleQuotedString(text))
3300
                }> */
3301
                nil,
3302
                /* 76 Action15 <- <{
3303
                    childIndexUnion := p.pop().(*syntaxUnionQualifier)
3304
                    parentIndexUnion := p.pop().(*syntaxUnionQualifier)
3305
                    parentIndexUnion.merge(childIndexUnion)
3306
                    parentIndexUnion.setValueGroup()
3307
                    p.push(parentIndexUnion)
3308
                }> */
3309
                nil,
3310
                /* 77 Action16 <- <{
3311
                    step  := p.pop().(*syntaxIndexSubscript)
3312
                    end   := p.pop().(*syntaxIndexSubscript)
3313
                    start := p.pop().(*syntaxIndexSubscript)
3314

3315
                    if step.isOmitted {
3316
                        step.number = 1
3317
                    }
3318

3319
                    if step.number >= 0 {
3320
                        p.pushSlicePositiveStepSubscript(start, end, step)
3321
                    } else {
3322
                        p.pushSliceNegativeStepSubscript(start, end, step)
3323
                    }
3324
                }> */
3325
                nil,
3326
                /* 78 Action17 <- <{
3327
                    p.pushIndexSubscript(text)
3328
                }> */
3329
                nil,
3330
                /* 79 Action18 <- <{
3331
                    p.pushWildcardSubscript()
3332
                }> */
3333
                nil,
3334
                /* 80 Action19 <- <{
3335
                    p.pushUnionQualifier(p.pop().(syntaxSubscript))
3336
                }> */
3337
                nil,
3338
                /* 81 Action20 <- <{
3339
                    p.pushIndexSubscript(`1`)
3340
                }> */
3341
                nil,
3342
                /* 82 Action21 <- <{
3343
                    if len(text) > 0 {
3344
                        p.pushIndexSubscript(text)
3345
                    } else {
3346
                        p.pushOmittedIndexSubscript(`0`)
3347
                    }
3348
                }> */
3349
                nil,
3350
                /* 83 Action22 <- <{
3351
                    p.pushScriptQualifier(text)
3352
                }> */
3353
                nil,
3354
                /* 84 Action23 <- <{
3355
                    p.pushFilterQualifier(p.pop().(syntaxQuery))
3356
                }> */
3357
                nil,
3358
                /* 85 Action24 <- <{
3359
                    rightQuery := p.pop().(syntaxQuery)
3360
                    leftQuery := p.pop().(syntaxQuery)
3361
                    p.pushLogicalOr(leftQuery, rightQuery)
3362
                }> */
3363
                nil,
3364
                /* 86 Action25 <- <{
3365
                    rightQuery := p.pop().(syntaxQuery)
3366
                    leftQuery := p.pop().(syntaxQuery)
3367
                    p.pushLogicalAnd(leftQuery, rightQuery)
3368
                }> */
3369
                nil,
3370
                /* 87 Action26 <- <{
3371
                    query := p.pop()
3372
                    p.push(query)
3373

3374
                    if logicalNot, ok := query.(*syntaxLogicalNot); ok {
3375
                        query = (*logicalNot).query
3376
                    }
3377
                    if checkQuery, ok := query.(*syntaxBasicCompareQuery); ok {
3378
                        _, leftIsCurrentRoot := checkQuery.leftParam.param.(*syntaxQueryParamCurrentRoot)
3379
                        _, rightIsCurrentRoot := checkQuery.rightParam.param.(*syntaxQueryParamCurrentRoot)
3380
                        if leftIsCurrentRoot && rightIsCurrentRoot {
3381
                            panic(p.syntaxErr(
3382
                                begin, msgErrorInvalidSyntaxTwoCurrentNode, buffer))
3383
                        }
3384
                    }
3385
                }> */
3386
                nil,
3387
                /* 88 Action27 <- <{
3388
                    _ = p.pop()
3389
                    jsonpathFilter := p.pop().(syntaxQuery)
3390

3391
                    if text[0:1] == `!` {
3392
                        p.pushLogicalNot(jsonpathFilter)
3393
                    } else {
3394
                        p.push(jsonpathFilter)
3395
                    }
3396
                }> */
3397
                nil,
3398
                /* 89 Action28 <- <{
3399
                    rightParam := p.pop().(*syntaxBasicCompareParameter)
3400
                    leftParam := p.pop().(*syntaxBasicCompareParameter)
3401
                    if leftParam.isLiteral {
3402
                        p.pushCompareEQ(rightParam, leftParam)
3403
                    } else {
3404
                        p.pushCompareEQ(leftParam, rightParam)
3405
                    }
3406
                }> */
3407
                nil,
3408
                /* 90 Action29 <- <{
3409
                    rightParam := p.pop().(*syntaxBasicCompareParameter)
3410
                    leftParam := p.pop().(*syntaxBasicCompareParameter)
3411
                    if leftParam.isLiteral {
3412
                        p.pushCompareNE(rightParam, leftParam)
3413
                    } else {
3414
                        p.pushCompareNE(leftParam, rightParam)
3415
                    }
3416
                }> */
3417
                nil,
3418
                /* 91 Action30 <- <{
3419
                    rightParam := p.pop().(*syntaxBasicCompareParameter)
3420
                    leftParam := p.pop().(*syntaxBasicCompareParameter)
3421
                    if leftParam.isLiteral {
3422
                        p.pushCompareLE(rightParam, leftParam)
3423
                    } else {
3424
                        p.pushCompareGE(leftParam, rightParam)
3425
                    }
3426
                }> */
3427
                nil,
3428
                /* 92 Action31 <- <{
3429
                    rightParam := p.pop().(*syntaxBasicCompareParameter)
3430
                    leftParam := p.pop().(*syntaxBasicCompareParameter)
3431
                    if leftParam.isLiteral {
3432
                        p.pushCompareLT(rightParam, leftParam)
3433
                    } else {
3434
                        p.pushCompareGT(leftParam, rightParam)
3435
                    }
3436
                }> */
3437
                nil,
3438
                /* 93 Action32 <- <{
3439
                    rightParam := p.pop().(*syntaxBasicCompareParameter)
3440
                    leftParam := p.pop().(*syntaxBasicCompareParameter)
3441
                    if leftParam.isLiteral {
3442
                        p.pushCompareGE(rightParam, leftParam)
3443
                    } else {
3444
                        p.pushCompareLE(leftParam, rightParam)
3445
                    }
3446
                }> */
3447
                nil,
3448
                /* 94 Action33 <- <{
3449
                    rightParam := p.pop().(*syntaxBasicCompareParameter)
3450
                    leftParam := p.pop().(*syntaxBasicCompareParameter)
3451
                    if leftParam.isLiteral {
3452
                        p.pushCompareGT(rightParam, leftParam)
3453
                    } else {
3454
                        p.pushCompareLT(leftParam, rightParam)
3455
                    }
3456
                }> */
3457
                nil,
3458
                /* 95 Action34 <- <{
3459
                    leftParam := p.pop().(*syntaxBasicCompareParameter)
3460
                    p.pushCompareRegex(leftParam, text)
3461
                }> */
3462
                nil,
3463
                /* 96 Action35 <- <{
3464
                    p.pushCompareParameterLiteral(p.pop())
3465
                }> */
3466
                nil,
3467
                /* 97 Action36 <- <{
3468
                    p.pushCompareParameterLiteral(p.pop())
3469
                }> */
3470
                nil,
3471
                /* 98 Action37 <- <{
3472
                    isLiteral := p.pop().(bool)
3473
                    param := p.pop().(syntaxQueryJSONPathParameter)
3474
                    if param.isValueGroupParameter() {
3475
                        panic(p.syntaxErr(
3476
                            begin, msgErrorInvalidSyntaxFilterValueGroup, buffer))
3477
                    }
3478
                    p.pushBasicCompareParameter(param.(syntaxQuery), isLiteral)
3479
                }> */
3480
                nil,
3481
                /* 99 Action38 <- <{
3482
                    p.saveParams()
3483
                }> */
3484
                nil,
3485
                /* 100 Action39 <- <{
3486
                    p.loadParams()
3487

3488
                    node := p.pop().(syntaxNode)
3489
                    checkNode := node
3490
                    if aggregateFunction, ok := node.(*syntaxAggregateFunction); ok {
3491
                        checkNode = aggregateFunction.param
3492
                    }
3493

3494
                    switch checkNode.(type) {
3495
                    case *syntaxRootIdentifier:
3496
                        p.pushCompareParameterRoot(p.deleteRootIdentifier(node))
3497
                        p.push(true)
3498
                    case *syntaxCurrentRootIdentifier:
3499
                        p.pushCompareParameterCurrentRoot(p.deleteRootIdentifier(node))
3500
                        p.push(false)
3501
                    }
3502
                }> */
3503
                nil,
3504
                /* 101 Action40 <- <{
3505
                    p.push(p.toFloat(text))
3506
                }> */
3507
                nil,
3508
                /* 102 Action41 <- <{
3509
                    p.push(true)
3510
                }> */
3511
                nil,
3512
                /* 103 Action42 <- <{
3513
                    p.push(false)
3514
                }> */
3515
                nil,
3516
                /* 104 Action43 <- <{
3517
                    p.push(p.unescape(text))
3518
                }> */
3519
                nil,
3520
                /* 105 Action44 <- <{
3521
                    p.push(p.unescape(text))
3522
                }> */
3523
                nil,
3524
                /* 106 Action45 <- <{
3525
                    p.push(nil)
3526
                }> */
3527
                nil,
3528
        }
3529
        p.rules = _rules
2✔
3530
        return nil
2✔
3531
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc