-
Notifications
You must be signed in to change notification settings - Fork 532
/
Copy pathexpr.y.go
1750 lines (1680 loc) · 45.8 KB
/
expr.y.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by goyacc -o pkg/traceql/expr.y.go pkg/traceql/expr.y. DO NOT EDIT.
//line pkg/traceql/expr.y:2
package traceql
import __yyfmt__ "fmt"
//line pkg/traceql/expr.y:2
import (
"time"
)
//line pkg/traceql/expr.y:11
type yySymType struct {
yys int
root RootExpr
groupOperation GroupOperation
coalesceOperation CoalesceOperation
selectOperation SelectOperation
attributeList []Attribute
spansetExpression SpansetExpression
spansetPipelineExpression SpansetExpression
wrappedSpansetPipeline Pipeline
spansetPipeline Pipeline
spansetFilter *SpansetFilter
scalarFilter ScalarFilter
scalarFilterOperation Operator
scalarPipelineExpressionFilter ScalarFilter
scalarPipelineExpression ScalarExpression
scalarExpression ScalarExpression
wrappedScalarPipeline Pipeline
scalarPipeline Pipeline
aggregate Aggregate
metricsAggregation *MetricsAggregate
fieldExpression FieldExpression
static Static
intrinsicField Attribute
attributeField Attribute
binOp Operator
staticInt int
staticStr string
staticFloat float64
staticDuration time.Duration
hint *Hint
hintList []*Hint
hints *Hints
}
const IDENTIFIER = 57346
const STRING = 57347
const INTEGER = 57348
const FLOAT = 57349
const DURATION = 57350
const DOT = 57351
const OPEN_BRACE = 57352
const CLOSE_BRACE = 57353
const OPEN_PARENS = 57354
const CLOSE_PARENS = 57355
const COMMA = 57356
const NIL = 57357
const TRUE = 57358
const FALSE = 57359
const STATUS_ERROR = 57360
const STATUS_OK = 57361
const STATUS_UNSET = 57362
const KIND_UNSPECIFIED = 57363
const KIND_INTERNAL = 57364
const KIND_SERVER = 57365
const KIND_CLIENT = 57366
const KIND_PRODUCER = 57367
const KIND_CONSUMER = 57368
const IDURATION = 57369
const CHILDCOUNT = 57370
const NAME = 57371
const STATUS = 57372
const STATUS_MESSAGE = 57373
const PARENT = 57374
const KIND = 57375
const ROOTNAME = 57376
const ROOTSERVICENAME = 57377
const TRACEDURATION = 57378
const NESTEDSETLEFT = 57379
const NESTEDSETRIGHT = 57380
const NESTEDSETPARENT = 57381
const PARENT_DOT = 57382
const RESOURCE_DOT = 57383
const SPAN_DOT = 57384
const COUNT = 57385
const AVG = 57386
const MAX = 57387
const MIN = 57388
const SUM = 57389
const BY = 57390
const COALESCE = 57391
const SELECT = 57392
const END_ATTRIBUTE = 57393
const RATE = 57394
const COUNT_OVER_TIME = 57395
const WITH = 57396
const PIPE = 57397
const AND = 57398
const OR = 57399
const EQ = 57400
const NEQ = 57401
const LT = 57402
const LTE = 57403
const GT = 57404
const GTE = 57405
const NRE = 57406
const RE = 57407
const DESC = 57408
const ANCE = 57409
const SIBL = 57410
const NOT_CHILD = 57411
const NOT_PARENT = 57412
const NOT_DESC = 57413
const NOT_ANCE = 57414
const ADD = 57415
const SUB = 57416
const NOT = 57417
const MUL = 57418
const DIV = 57419
const MOD = 57420
const POW = 57421
var yyToknames = [...]string{
"$end",
"error",
"$unk",
"IDENTIFIER",
"STRING",
"INTEGER",
"FLOAT",
"DURATION",
"DOT",
"OPEN_BRACE",
"CLOSE_BRACE",
"OPEN_PARENS",
"CLOSE_PARENS",
"COMMA",
"NIL",
"TRUE",
"FALSE",
"STATUS_ERROR",
"STATUS_OK",
"STATUS_UNSET",
"KIND_UNSPECIFIED",
"KIND_INTERNAL",
"KIND_SERVER",
"KIND_CLIENT",
"KIND_PRODUCER",
"KIND_CONSUMER",
"IDURATION",
"CHILDCOUNT",
"NAME",
"STATUS",
"STATUS_MESSAGE",
"PARENT",
"KIND",
"ROOTNAME",
"ROOTSERVICENAME",
"TRACEDURATION",
"NESTEDSETLEFT",
"NESTEDSETRIGHT",
"NESTEDSETPARENT",
"PARENT_DOT",
"RESOURCE_DOT",
"SPAN_DOT",
"COUNT",
"AVG",
"MAX",
"MIN",
"SUM",
"BY",
"COALESCE",
"SELECT",
"END_ATTRIBUTE",
"RATE",
"COUNT_OVER_TIME",
"WITH",
"PIPE",
"AND",
"OR",
"EQ",
"NEQ",
"LT",
"LTE",
"GT",
"GTE",
"NRE",
"RE",
"DESC",
"ANCE",
"SIBL",
"NOT_CHILD",
"NOT_PARENT",
"NOT_DESC",
"NOT_ANCE",
"ADD",
"SUB",
"NOT",
"MUL",
"DIV",
"MOD",
"POW",
}
var yyStatenames = [...]string{}
const yyEofCode = 1
const yyErrCode = 2
const yyInitialStackSize = 16
//line yacctab:1
var yyExca = [...]int{
-1, 1,
1, -1,
-2, 0,
-1, 238,
13, 71,
-2, 79,
}
const yyPrivate = 57344
const yyLast = 825
var yyAct = [...]int{
5, 90, 6, 89, 8, 194, 7, 88, 236, 2,
57, 18, 229, 13, 84, 270, 198, 199, 56, 200,
201, 202, 211, 60, 75, 76, 211, 77, 78, 79,
80, 134, 80, 135, 67, 138, 273, 136, 200, 201,
202, 211, 171, 175, 156, 158, 159, 160, 161, 162,
163, 164, 165, 166, 167, 168, 170, 170, 212, 213,
203, 204, 205, 206, 207, 208, 210, 209, 269, 177,
77, 78, 79, 80, 30, 198, 199, 29, 200, 201,
202, 211, 281, 280, 196, 264, 195, 263, 185, 187,
188, 189, 190, 191, 192, 285, 193, 262, 277, 171,
214, 215, 216, 75, 76, 261, 77, 78, 79, 80,
284, 212, 213, 203, 204, 205, 206, 207, 208, 210,
209, 62, 63, 220, 64, 65, 66, 67, 198, 199,
276, 200, 201, 202, 211, 64, 65, 66, 67, 291,
243, 275, 233, 224, 225, 226, 227, 203, 204, 205,
206, 207, 208, 210, 209, 234, 290, 243, 233, 274,
221, 222, 198, 199, 223, 200, 201, 202, 211, 173,
271, 272, 134, 17, 135, 157, 138, 174, 136, 242,
243, 287, 286, 238, 235, 232, 231, 240, 68, 69,
70, 71, 72, 73, 178, 144, 132, 131, 130, 129,
234, 128, 127, 75, 76, 82, 77, 78, 79, 80,
230, 268, 81, 244, 245, 246, 247, 248, 249, 250,
251, 252, 253, 254, 255, 256, 257, 258, 259, 62,
63, 74, 64, 65, 66, 67, 266, 265, 57, 219,
57, 218, 217, 61, 28, 279, 228, 278, 240, 59,
16, 60, 4, 60, 212, 213, 203, 204, 205, 206,
207, 208, 210, 209, 124, 125, 126, 133, 12, 10,
137, 198, 199, 1, 200, 201, 202, 211, 134, 0,
135, 283, 138, 0, 136, 282, 0, 0, 196, 196,
195, 195, 288, 289, 91, 92, 93, 97, 120, 0,
83, 85, 0, 0, 96, 94, 95, 99, 98, 100,
101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
111, 113, 112, 114, 115, 116, 117, 118, 119, 123,
121, 122, 0, 68, 69, 70, 71, 72, 73, 0,
0, 0, 0, 0, 0, 0, 0, 0, 62, 63,
267, 64, 65, 66, 67, 91, 92, 93, 97, 120,
0, 0, 85, 86, 87, 96, 94, 95, 99, 98,
100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
110, 111, 113, 112, 114, 115, 116, 117, 118, 119,
123, 121, 122, 212, 213, 203, 204, 205, 206, 207,
208, 210, 209, 260, 0, 0, 0, 0, 0, 0,
198, 199, 0, 200, 201, 202, 211, 0, 0, 0,
0, 0, 43, 48, 86, 87, 45, 241, 44, 0,
52, 0, 46, 47, 49, 50, 51, 54, 53, 0,
0, 0, 0, 0, 0, 0, 212, 213, 203, 204,
205, 206, 207, 208, 210, 209, 197, 0, 0, 0,
0, 0, 0, 198, 199, 0, 200, 201, 202, 211,
212, 213, 203, 204, 205, 206, 207, 208, 210, 209,
175, 0, 0, 0, 0, 0, 0, 198, 199, 0,
200, 201, 202, 211, 19, 20, 21, 0, 17, 0,
141, 212, 213, 203, 204, 205, 206, 207, 208, 210,
209, 19, 20, 21, 0, 17, 0, 141, 198, 199,
0, 200, 201, 202, 211, 68, 69, 70, 71, 72,
73, 23, 26, 24, 25, 27, 14, 142, 15, 0,
75, 76, 0, 77, 78, 79, 80, 0, 23, 26,
24, 25, 27, 14, 142, 15, 0, 139, 140, 19,
20, 21, 22, 17, 0, 239, 0, 19, 20, 21,
0, 17, 0, 237, 0, 0, 19, 20, 21, 22,
17, 45, 9, 44, 0, 52, 0, 46, 47, 49,
50, 51, 54, 53, 172, 0, 23, 26, 24, 25,
27, 14, 0, 15, 23, 26, 24, 25, 27, 14,
0, 15, 0, 23, 26, 24, 25, 27, 14, 0,
15, 169, 19, 20, 21, 0, 17, 22, 141, 0,
0, 0, 0, 0, 0, 22, 0, 43, 48, 0,
0, 45, 0, 44, 22, 52, 0, 46, 47, 49,
50, 51, 54, 53, 0, 0, 0, 0, 0, 23,
26, 24, 25, 27, 31, 36, 58, 11, 33, 0,
32, 0, 42, 0, 34, 35, 37, 38, 39, 40,
41, 19, 20, 21, 0, 31, 36, 186, 0, 33,
22, 32, 0, 42, 0, 34, 35, 37, 38, 39,
40, 41, 33, 0, 32, 0, 42, 0, 34, 35,
37, 38, 39, 40, 41, 0, 0, 0, 23, 26,
24, 25, 27, 0, 0, 0, 0, 0, 176, 179,
180, 181, 182, 183, 184, 120, 0, 55, 3, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 22,
0, 0, 0, 107, 108, 109, 110, 111, 113, 112,
114, 115, 116, 117, 118, 119, 123, 121, 122, 143,
145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
155, 91, 92, 93, 97, 0, 0, 0, 178, 0,
0, 96, 94, 95, 99, 98, 100, 101, 102, 103,
104, 105, 106, 91, 92, 93, 97, 0, 0, 0,
0, 0, 0, 96, 94, 95, 99, 98, 100, 101,
102, 103, 104, 105, 106,
}
var yyPact = [...]int{
570, 23, 19, 629, -1000, 366, -1000, -1000, -1000, 570,
-1000, 275, -1000, 130, 200, 193, -1000, 289, -1000, -1000,
-1000, -1000, 258, 190, 189, 187, 186, 185, -1000, 184,
505, 183, 183, 183, 183, 183, 183, 183, 183, 183,
183, 183, 183, 163, 163, 163, 163, 163, 163, 163,
163, 163, 163, 163, 163, 608, 44, 581, 156, 164,
467, 776, 182, 182, 182, 182, 182, 182, -1000, -1000,
-1000, -1000, -1000, -1000, 675, 675, 675, 675, 675, 675,
675, 350, 726, -1000, 445, 350, 350, 350, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
238, 237, 235, 119, -1000, -1000, -1000, 151, 350, 350,
350, 350, 206, -1000, 366, -1000, -1000, -1000, -1000, 174,
173, 616, 172, 642, 561, -1000, -1000, -1000, -1000, 642,
-1000, -1000, -1000, -1000, -1000, -1000, 521, 163, -1000, -1000,
-1000, -1000, 521, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, 488, -1000, -1000, -1000, -1000, 48, -1000, 553, 59,
59, -45, -45, -45, -45, -49, 675, -6, -6, -47,
-47, -47, -47, 414, 166, -1000, -1000, -1000, 350, 350,
350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
350, 350, 350, 350, 390, -38, -38, 54, 46, 36,
34, 233, 232, -1000, 337, 198, 55, 2, 157, -1000,
-22, 146, 128, 581, 30, 117, 43, 561, -1000, 553,
-13, -1000, -1000, 726, -38, -38, -53, -53, -53, -57,
-57, -57, -57, -57, -57, -57, -57, -53, 89, 89,
-1000, -1000, -1000, -1000, -1000, 32, 31, -1000, -1000, -1000,
-1000, -1000, 206, 798, 62, 47, -1000, 488, -1000, -1000,
-1000, -1000, -1000, -1000, 170, 169, 726, 726, 143, 126,
-1000, -1000,
}
var yyPgo = [...]int{
0, 273, 6, 270, 4, 5, 0, 737, 269, 8,
268, 2, 231, 267, 252, 666, 13, 250, 249, 11,
14, 7, 3, 1, 12, 246, 244,
}
var yyR1 = [...]int{
0, 1, 1, 1, 1, 1, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
8, 9, 9, 9, 9, 9, 9, 9, 9, 9,
2, 3, 4, 5, 5, 5, 5, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 10, 10, 11, 12, 12, 12, 12, 12, 12,
14, 14, 15, 15, 15, 15, 15, 15, 15, 15,
17, 18, 16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 19, 19, 19, 19,
19, 13, 13, 13, 13, 24, 26, 25, 25, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
20, 21, 21, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
23, 23, 23, 23, 23, 23,
}
var yyR2 = [...]int{
0, 1, 1, 1, 3, 2, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 1,
3, 1, 1, 1, 1, 3, 3, 3, 3, 3,
4, 3, 4, 1, 1, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1, 2, 3, 3, 1, 1, 1, 1, 1, 1,
3, 3, 3, 3, 3, 3, 3, 3, 3, 1,
3, 3, 3, 3, 3, 3, 3, 3, 3, 1,
1, 1, 1, 2, 2, 2, 3, 4, 4, 4,
4, 3, 3, 7, 7, 3, 4, 1, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 2, 2, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3, 3, 3, 3, 4, 4,
}
var yyChk = [...]int{
-1000, -1, -9, -7, -14, -6, -11, -2, -4, 12,
-8, -15, -10, -16, 48, 50, -17, 10, -19, 6,
7, 8, 74, 43, 45, 46, 44, 47, -26, 54,
55, 56, 62, 60, 66, 67, 57, 68, 69, 70,
71, 72, 64, 56, 62, 60, 66, 67, 57, 68,
69, 70, 64, 72, 71, -7, -9, -6, -15, -18,
-16, -12, 73, 74, 76, 77, 78, 79, 58, 59,
60, 61, 62, 63, -12, 73, 74, 76, 77, 78,
79, 12, 12, 11, -20, 12, 74, 75, -21, -22,
-23, 5, 6, 7, 16, 17, 15, 8, 19, 18,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
30, 31, 33, 32, 34, 35, 36, 37, 38, 39,
9, 41, 42, 40, 6, 7, 8, 12, 12, 12,
12, 12, 12, -13, -6, -11, -2, -3, -4, 52,
53, 12, 49, -7, 12, -7, -7, -7, -7, -7,
-7, -7, -7, -7, -7, -7, -6, 12, -6, -6,
-6, -6, -6, -6, -6, -6, -6, -6, -6, 13,
13, 55, 13, 13, 13, 13, -15, -21, 12, -15,
-15, -15, -15, -15, -15, -16, 12, -16, -16, -16,
-16, -16, -16, -20, -5, -22, -23, 11, 73, 74,
76, 77, 78, 58, 59, 60, 61, 62, 63, 65,
64, 79, 56, 57, -20, -20, -20, 4, 4, 4,
4, 41, 42, 13, -20, -20, -20, -20, -25, -24,
4, 12, 12, -6, -16, 12, -9, 12, -19, 12,
-9, 13, 13, 14, -20, -20, -20, -20, -20, -20,
-20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
13, 51, 51, 51, 51, 4, 4, 13, 13, 13,
13, 13, 14, 58, 13, 13, 13, 55, -22, -23,
51, 51, -24, -21, 48, 48, 12, 12, -5, -5,
13, 13,
}
var yyDef = [...]int{
0, -2, 1, 2, 3, 21, 22, 23, 24, 0,
19, 0, 50, 0, 0, 0, 69, 0, 79, 80,
81, 82, 0, 0, 0, 0, 0, 0, 5, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 21, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 54, 55,
56, 57, 58, 59, 0, 0, 0, 0, 0, 0,
0, 0, 0, 51, 0, 0, 0, 0, 118, 119,
120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
0, 0, 0, 0, 83, 84, 85, 0, 0, 0,
0, 0, 0, 4, 25, 26, 27, 28, 29, 0,
0, 0, 0, 7, 0, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 38, 0, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 6,
20, 0, 37, 62, 70, 72, 60, 61, 0, 63,
64, 65, 66, 67, 68, 53, 0, 73, 74, 75,
76, 77, 78, 0, 0, 33, 34, 52, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 116, 117, 0, 0, 0,
0, 0, 0, 86, 0, 0, 0, 0, 0, 97,
0, 0, 0, 0, 0, 0, 0, 0, -2, 0,
0, 30, 32, 0, 100, 101, 102, 103, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
99, 150, 151, 152, 153, 0, 0, 87, 88, 89,
90, 96, 0, 0, 91, 92, 31, 0, 35, 36,
154, 155, 98, 95, 0, 0, 0, 0, 0, 0,
93, 94,
}
var yyTok1 = [...]int{
1,
}
var yyTok2 = [...]int{
2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
72, 73, 74, 75, 76, 77, 78, 79,
}
var yyTok3 = [...]int{
0,
}
var yyErrorMessages = [...]struct {
state int
token int
msg string
}{}
//line yaccpar:1
/* parser for yacc output */
var (
yyDebug = 0
yyErrorVerbose = false
)
type yyLexer interface {
Lex(lval *yySymType) int
Error(s string)
}
type yyParser interface {
Parse(yyLexer) int
Lookahead() int
}
type yyParserImpl struct {
lval yySymType
stack [yyInitialStackSize]yySymType
char int
}
func (p *yyParserImpl) Lookahead() int {
return p.char
}
func yyNewParser() yyParser {
return &yyParserImpl{}
}
const yyFlag = -1000
func yyTokname(c int) string {
if c >= 1 && c-1 < len(yyToknames) {
if yyToknames[c-1] != "" {
return yyToknames[c-1]
}
}
return __yyfmt__.Sprintf("tok-%v", c)
}
func yyStatname(s int) string {
if s >= 0 && s < len(yyStatenames) {
if yyStatenames[s] != "" {
return yyStatenames[s]
}
}
return __yyfmt__.Sprintf("state-%v", s)
}
func yyErrorMessage(state, lookAhead int) string {
const TOKSTART = 4
if !yyErrorVerbose {
return "syntax error"
}
for _, e := range yyErrorMessages {
if e.state == state && e.token == lookAhead {
return "syntax error: " + e.msg
}
}
res := "syntax error: unexpected " + yyTokname(lookAhead)
// To match Bison, suggest at most four expected tokens.
expected := make([]int, 0, 4)
// Look for shiftable tokens.
base := yyPact[state]
for tok := TOKSTART; tok-1 < len(yyToknames); tok++ {
if n := base + tok; n >= 0 && n < yyLast && yyChk[yyAct[n]] == tok {
if len(expected) == cap(expected) {
return res
}
expected = append(expected, tok)
}
}
if yyDef[state] == -2 {
i := 0
for yyExca[i] != -1 || yyExca[i+1] != state {
i += 2
}
// Look for tokens that we accept or reduce.
for i += 2; yyExca[i] >= 0; i += 2 {
tok := yyExca[i]
if tok < TOKSTART || yyExca[i+1] == 0 {
continue
}
if len(expected) == cap(expected) {
return res
}
expected = append(expected, tok)
}
// If the default action is to accept or reduce, give up.
if yyExca[i+1] != 0 {
return res
}
}
for i, tok := range expected {
if i == 0 {
res += ", expecting "
} else {
res += " or "
}
res += yyTokname(tok)
}
return res
}
func yylex1(lex yyLexer, lval *yySymType) (char, token int) {
token = 0
char = lex.Lex(lval)
if char <= 0 {
token = yyTok1[0]
goto out
}
if char < len(yyTok1) {
token = yyTok1[char]
goto out
}
if char >= yyPrivate {
if char < yyPrivate+len(yyTok2) {
token = yyTok2[char-yyPrivate]
goto out
}
}
for i := 0; i < len(yyTok3); i += 2 {
token = yyTok3[i+0]
if token == char {
token = yyTok3[i+1]
goto out
}
}
out:
if token == 0 {
token = yyTok2[1] /* unknown char */
}
if yyDebug >= 3 {
__yyfmt__.Printf("lex %s(%d)\n", yyTokname(token), uint(char))
}
return char, token
}
func yyParse(yylex yyLexer) int {
return yyNewParser().Parse(yylex)
}
func (yyrcvr *yyParserImpl) Parse(yylex yyLexer) int {
var yyn int
var yyVAL yySymType
var yyDollar []yySymType
_ = yyDollar // silence set and not used
yyS := yyrcvr.stack[:]
Nerrs := 0 /* number of errors */
Errflag := 0 /* error recovery flag */
yystate := 0
yyrcvr.char = -1
yytoken := -1 // yyrcvr.char translated into internal numbering
defer func() {
// Make sure we report no lookahead when not parsing.
yystate = -1
yyrcvr.char = -1
yytoken = -1
}()
yyp := -1
goto yystack
ret0:
return 0
ret1:
return 1
yystack:
/* put a state and value onto the stack */
if yyDebug >= 4 {
__yyfmt__.Printf("char %v in %v\n", yyTokname(yytoken), yyStatname(yystate))
}
yyp++
if yyp >= len(yyS) {
nyys := make([]yySymType, len(yyS)*2)
copy(nyys, yyS)
yyS = nyys
}
yyS[yyp] = yyVAL
yyS[yyp].yys = yystate
yynewstate:
yyn = yyPact[yystate]
if yyn <= yyFlag {
goto yydefault /* simple state */
}
if yyrcvr.char < 0 {
yyrcvr.char, yytoken = yylex1(yylex, &yyrcvr.lval)
}
yyn += yytoken
if yyn < 0 || yyn >= yyLast {
goto yydefault
}
yyn = yyAct[yyn]
if yyChk[yyn] == yytoken { /* valid shift */
yyrcvr.char = -1
yytoken = -1
yyVAL = yyrcvr.lval
yystate = yyn
if Errflag > 0 {
Errflag--
}
goto yystack
}
yydefault:
/* default state action */
yyn = yyDef[yystate]
if yyn == -2 {
if yyrcvr.char < 0 {
yyrcvr.char, yytoken = yylex1(yylex, &yyrcvr.lval)
}
/* look through exception table */
xi := 0
for {
if yyExca[xi+0] == -1 && yyExca[xi+1] == yystate {
break
}
xi += 2
}
for xi += 2; ; xi += 2 {
yyn = yyExca[xi+0]
if yyn < 0 || yyn == yytoken {
break
}
}
yyn = yyExca[xi+1]
if yyn < 0 {
goto ret0
}
}
if yyn == 0 {
/* error ... attempt to resume parsing */
switch Errflag {
case 0: /* brand new error */
yylex.Error(yyErrorMessage(yystate, yytoken))
Nerrs++
if yyDebug >= 1 {
__yyfmt__.Printf("%s", yyStatname(yystate))
__yyfmt__.Printf(" saw %s\n", yyTokname(yytoken))
}
fallthrough
case 1, 2: /* incompletely recovered error ... try again */
Errflag = 3
/* find a state where "error" is a legal shift action */
for yyp >= 0 {
yyn = yyPact[yyS[yyp].yys] + yyErrCode
if yyn >= 0 && yyn < yyLast {
yystate = yyAct[yyn] /* simulate a shift of "error" */
if yyChk[yystate] == yyErrCode {
goto yystack
}
}
/* the current p has no shift on "error", pop stack */
if yyDebug >= 2 {
__yyfmt__.Printf("error recovery pops state %d\n", yyS[yyp].yys)
}
yyp--
}
/* there is no state on the stack with an error shift ... abort */
goto ret1
case 3: /* no shift yet; clobber input char */
if yyDebug >= 2 {
__yyfmt__.Printf("error recovery discards %s\n", yyTokname(yytoken))
}
if yytoken == yyEofCode {
goto ret1
}
yyrcvr.char = -1
yytoken = -1
goto yynewstate /* try again in the same state */
}
}
/* reduction by production yyn */
if yyDebug >= 2 {
__yyfmt__.Printf("reduce %v in:\n\t%v\n", yyn, yyStatname(yystate))
}
yynt := yyn
yypt := yyp
_ = yypt // guard against "declared and not used"
yyp -= yyR2[yyn]
// yyp is now the index of $0. Perform the default action. Iff the
// reduced production is ε, $1 is possibly out of range.
if yyp+1 >= len(yyS) {
nyys := make([]yySymType, len(yyS)*2)
copy(nyys, yyS)
yyS = nyys
}
yyVAL = yyS[yyp+1]
/* consult goto table to find next state */
yyn = yyR1[yyn]
yyg := yyPgo[yyn]
yyj := yyg + yyS[yyp].yys + 1
if yyj >= yyLast {
yystate = yyAct[yyg]
} else {
yystate = yyAct[yyj]
if yyChk[yystate] != -yyn {
yystate = yyAct[yyg]
}
}
// dummy call; replaced with literal code
switch yynt {
case 1:
yyDollar = yyS[yypt-1 : yypt+1]
//line pkg/traceql/expr.y:110
{
yylex.(*lexer).expr = newRootExpr(yyDollar[1].spansetPipeline)
}
case 2:
yyDollar = yyS[yypt-1 : yypt+1]
//line pkg/traceql/expr.y:111
{
yylex.(*lexer).expr = newRootExpr(yyDollar[1].spansetPipelineExpression)
}
case 3:
yyDollar = yyS[yypt-1 : yypt+1]
//line pkg/traceql/expr.y:112
{
yylex.(*lexer).expr = newRootExpr(yyDollar[1].scalarPipelineExpressionFilter)
}
case 4:
yyDollar = yyS[yypt-3 : yypt+1]
//line pkg/traceql/expr.y:113
{
yylex.(*lexer).expr = newRootExprWithMetrics(yyDollar[1].spansetPipeline, yyDollar[3].metricsAggregation)
}
case 5:
yyDollar = yyS[yypt-2 : yypt+1]
//line pkg/traceql/expr.y:114
{
yylex.(*lexer).expr.withHints(yyDollar[2].hints)
}
case 6:
yyDollar = yyS[yypt-3 : yypt+1]
//line pkg/traceql/expr.y:121
{
yyVAL.spansetPipelineExpression = yyDollar[2].spansetPipelineExpression
}
case 7:
yyDollar = yyS[yypt-3 : yypt+1]
//line pkg/traceql/expr.y:122
{
yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetAnd, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression)
}
case 8:
yyDollar = yyS[yypt-3 : yypt+1]
//line pkg/traceql/expr.y:123
{
yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetChild, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression)
}
case 9:
yyDollar = yyS[yypt-3 : yypt+1]
//line pkg/traceql/expr.y:124
{
yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetParent, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression)
}
case 10:
yyDollar = yyS[yypt-3 : yypt+1]
//line pkg/traceql/expr.y:125
{
yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetDescendant, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression)
}
case 11:
yyDollar = yyS[yypt-3 : yypt+1]
//line pkg/traceql/expr.y:126
{
yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetAncestor, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression)
}
case 12:
yyDollar = yyS[yypt-3 : yypt+1]
//line pkg/traceql/expr.y:127
{
yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetUnion, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression)
}
case 13:
yyDollar = yyS[yypt-3 : yypt+1]
//line pkg/traceql/expr.y:128
{
yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetSibling, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression)
}
case 14:
yyDollar = yyS[yypt-3 : yypt+1]
//line pkg/traceql/expr.y:129
{
yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetNotChild, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression)
}
case 15:
yyDollar = yyS[yypt-3 : yypt+1]
//line pkg/traceql/expr.y:130
{
yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetNotParent, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression)
}
case 16:
yyDollar = yyS[yypt-3 : yypt+1]
//line pkg/traceql/expr.y:131
{
yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetNotDescendant, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression)
}
case 17:
yyDollar = yyS[yypt-3 : yypt+1]
//line pkg/traceql/expr.y:132
{
yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetNotAncestor, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression)
}
case 18:
yyDollar = yyS[yypt-3 : yypt+1]
//line pkg/traceql/expr.y:133
{
yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetNotSibling, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression)
}
case 19:
yyDollar = yyS[yypt-1 : yypt+1]
//line pkg/traceql/expr.y:134
{
yyVAL.spansetPipelineExpression = yyDollar[1].wrappedSpansetPipeline
}
case 20:
yyDollar = yyS[yypt-3 : yypt+1]
//line pkg/traceql/expr.y:138
{
yyVAL.wrappedSpansetPipeline = yyDollar[2].spansetPipeline
}
case 21:
yyDollar = yyS[yypt-1 : yypt+1]
//line pkg/traceql/expr.y:141
{
yyVAL.spansetPipeline = newPipeline(yyDollar[1].spansetExpression)
}
case 22:
yyDollar = yyS[yypt-1 : yypt+1]
//line pkg/traceql/expr.y:142
{
yyVAL.spansetPipeline = newPipeline(yyDollar[1].scalarFilter)
}
case 23:
yyDollar = yyS[yypt-1 : yypt+1]
//line pkg/traceql/expr.y:143
{
yyVAL.spansetPipeline = newPipeline(yyDollar[1].groupOperation)
}
case 24:
yyDollar = yyS[yypt-1 : yypt+1]
//line pkg/traceql/expr.y:144
{
yyVAL.spansetPipeline = newPipeline(yyDollar[1].selectOperation)
}
case 25:
yyDollar = yyS[yypt-3 : yypt+1]
//line pkg/traceql/expr.y:145
{
yyVAL.spansetPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].spansetExpression)
}
case 26:
yyDollar = yyS[yypt-3 : yypt+1]
//line pkg/traceql/expr.y:146
{
yyVAL.spansetPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].scalarFilter)
}
case 27:
yyDollar = yyS[yypt-3 : yypt+1]
//line pkg/traceql/expr.y:147
{
yyVAL.spansetPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].groupOperation)
}
case 28:
yyDollar = yyS[yypt-3 : yypt+1]
//line pkg/traceql/expr.y:148
{
yyVAL.spansetPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].coalesceOperation)
}
case 29:
yyDollar = yyS[yypt-3 : yypt+1]
//line pkg/traceql/expr.y:149
{
yyVAL.spansetPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].selectOperation)
}
case 30:
yyDollar = yyS[yypt-4 : yypt+1]
//line pkg/traceql/expr.y:153
{
yyVAL.groupOperation = newGroupOperation(yyDollar[3].fieldExpression)
}
case 31:
yyDollar = yyS[yypt-3 : yypt+1]
//line pkg/traceql/expr.y:157