2021-04-19 20:55:24 +03:00
|
|
|
// Code generated from antlr/FqlParser.g4 by ANTLR 4.9.2. DO NOT EDIT.
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
package fql // FqlParser
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"reflect"
|
|
|
|
"strconv"
|
|
|
|
|
|
|
|
"github.com/antlr/antlr4/runtime/Go/antlr"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Suppress unused import errors
|
|
|
|
var _ = fmt.Printf
|
|
|
|
var _ = reflect.Copy
|
|
|
|
var _ = strconv.Itoa
|
|
|
|
|
|
|
|
var parserATN = []uint16{
|
2021-09-02 11:09:48 -04:00
|
|
|
3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 71, 650,
|
2018-09-18 16:42:38 -04:00
|
|
|
4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7,
|
|
|
|
4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13,
|
|
|
|
9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9,
|
|
|
|
18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23,
|
|
|
|
4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4,
|
|
|
|
29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34,
|
|
|
|
9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9,
|
|
|
|
39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44,
|
2018-09-27 19:05:56 -04:00
|
|
|
4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4,
|
2018-12-21 23:14:41 -05:00
|
|
|
50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55,
|
2019-09-07 01:21:43 -04:00
|
|
|
9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9,
|
2020-04-28 17:30:47 -04:00
|
|
|
60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65,
|
2021-02-15 11:37:52 -05:00
|
|
|
4, 66, 9, 66, 3, 2, 7, 2, 134, 10, 2, 12, 2, 14, 2, 137, 11, 2, 3, 2, 3,
|
2021-07-13 21:34:22 -04:00
|
|
|
2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3,
|
|
|
|
7, 7, 7, 153, 10, 7, 12, 7, 14, 7, 156, 11, 7, 3, 7, 3, 7, 3, 8, 3, 8,
|
|
|
|
3, 8, 5, 8, 163, 10, 8, 3, 9, 3, 9, 5, 9, 167, 10, 9, 3, 10, 3, 10, 3,
|
|
|
|
10, 3, 10, 3, 10, 3, 10, 5, 10, 175, 10, 10, 3, 10, 3, 10, 3, 10, 3, 10,
|
|
|
|
3, 10, 3, 10, 5, 10, 183, 10, 10, 3, 11, 3, 11, 5, 11, 187, 10, 11, 3,
|
|
|
|
11, 3, 11, 3, 11, 5, 11, 192, 10, 11, 3, 11, 3, 11, 3, 11, 3, 11, 5, 11,
|
|
|
|
198, 10, 11, 3, 11, 5, 11, 201, 10, 11, 3, 12, 3, 12, 3, 12, 3, 12, 5,
|
|
|
|
12, 207, 10, 12, 3, 12, 3, 12, 3, 12, 7, 12, 212, 10, 12, 12, 12, 14, 12,
|
|
|
|
215, 11, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 5, 12, 222, 10, 12, 3,
|
|
|
|
12, 3, 12, 3, 12, 7, 12, 227, 10, 12, 12, 12, 14, 12, 230, 11, 12, 3, 12,
|
|
|
|
3, 12, 5, 12, 234, 10, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3,
|
|
|
|
13, 5, 13, 243, 10, 13, 3, 14, 3, 14, 3, 14, 3, 14, 5, 14, 249, 10, 14,
|
|
|
|
3, 15, 3, 15, 5, 15, 253, 10, 15, 3, 16, 3, 16, 5, 16, 257, 10, 16, 3,
|
|
|
|
17, 3, 17, 5, 17, 261, 10, 17, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19,
|
|
|
|
3, 19, 5, 19, 270, 10, 19, 3, 20, 3, 20, 5, 20, 274, 10, 20, 3, 21, 3,
|
|
|
|
21, 3, 21, 3, 21, 7, 21, 280, 10, 21, 12, 21, 14, 21, 283, 11, 21, 3, 22,
|
|
|
|
3, 22, 5, 22, 287, 10, 22, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3,
|
|
|
|
23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23,
|
|
|
|
3, 23, 5, 23, 307, 10, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3,
|
|
|
|
25, 7, 25, 316, 10, 25, 12, 25, 14, 25, 319, 11, 25, 3, 26, 3, 26, 3, 26,
|
|
|
|
3, 26, 7, 26, 325, 10, 26, 12, 26, 14, 26, 328, 11, 26, 3, 27, 3, 27, 3,
|
|
|
|
27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 5, 28, 340, 10, 28,
|
|
|
|
5, 28, 342, 10, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3,
|
|
|
|
30, 3, 30, 5, 30, 353, 10, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31,
|
2021-09-02 11:09:48 -04:00
|
|
|
5, 31, 361, 10, 31, 3, 31, 5, 31, 364, 10, 31, 3, 32, 3, 32, 3, 32, 5,
|
|
|
|
32, 369, 10, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 5, 33, 376, 10, 33,
|
|
|
|
3, 34, 3, 34, 3, 34, 5, 34, 381, 10, 34, 3, 35, 3, 35, 3, 35, 5, 35, 386,
|
|
|
|
10, 35, 3, 35, 3, 35, 3, 35, 3, 35, 5, 35, 392, 10, 35, 3, 36, 3, 36, 3,
|
|
|
|
36, 3, 36, 7, 36, 398, 10, 36, 12, 36, 14, 36, 401, 11, 36, 3, 36, 5, 36,
|
|
|
|
404, 10, 36, 5, 36, 406, 10, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3,
|
|
|
|
37, 7, 37, 414, 10, 37, 12, 37, 14, 37, 417, 11, 37, 3, 37, 5, 37, 420,
|
|
|
|
10, 37, 5, 37, 422, 10, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 38, 3,
|
|
|
|
38, 3, 38, 3, 38, 3, 38, 3, 38, 5, 38, 435, 10, 38, 3, 39, 3, 39, 3, 39,
|
|
|
|
3, 39, 3, 40, 3, 40, 3, 40, 5, 40, 444, 10, 40, 3, 41, 3, 41, 3, 42, 3,
|
|
|
|
42, 3, 43, 3, 43, 3, 44, 3, 44, 3, 45, 3, 45, 3, 46, 3, 46, 3, 46, 3, 46,
|
|
|
|
3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3,
|
|
|
|
47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 5, 47, 477, 10, 47, 3, 47,
|
2021-07-13 21:34:22 -04:00
|
|
|
3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3,
|
2021-09-02 11:09:48 -04:00
|
|
|
47, 5, 47, 491, 10, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47,
|
|
|
|
3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3,
|
|
|
|
47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47,
|
|
|
|
3, 47, 3, 47, 3, 47, 5, 47, 524, 10, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3,
|
|
|
|
47, 3, 47, 3, 47, 5, 47, 533, 10, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47,
|
|
|
|
3, 47, 3, 47, 5, 47, 542, 10, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 5,
|
|
|
|
47, 549, 10, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47,
|
|
|
|
3, 47, 5, 47, 560, 10, 47, 3, 47, 3, 47, 7, 47, 564, 10, 47, 12, 47, 14,
|
|
|
|
47, 567, 11, 47, 3, 48, 3, 48, 6, 48, 571, 10, 48, 13, 48, 14, 48, 572,
|
|
|
|
3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 5, 49, 580, 10, 49, 3, 50, 5, 50, 583,
|
|
|
|
10, 50, 3, 50, 3, 50, 3, 50, 3, 50, 5, 50, 589, 10, 50, 3, 50, 5, 50, 592,
|
|
|
|
10, 50, 3, 51, 3, 51, 3, 51, 3, 51, 3, 52, 3, 52, 3, 53, 7, 53, 601, 10,
|
|
|
|
53, 12, 53, 14, 53, 604, 11, 53, 3, 54, 3, 54, 3, 54, 3, 54, 7, 54, 610,
|
|
|
|
10, 54, 12, 54, 14, 54, 613, 11, 54, 5, 54, 615, 10, 54, 3, 54, 3, 54,
|
|
|
|
3, 55, 3, 55, 3, 56, 3, 56, 3, 56, 5, 56, 624, 10, 56, 3, 57, 3, 57, 3,
|
|
|
|
57, 5, 57, 629, 10, 57, 3, 58, 3, 58, 3, 59, 3, 59, 3, 60, 3, 60, 3, 61,
|
|
|
|
3, 61, 3, 62, 3, 62, 3, 63, 3, 63, 3, 64, 3, 64, 3, 65, 3, 65, 3, 65, 3,
|
|
|
|
66, 3, 66, 3, 66, 2, 3, 92, 67, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22,
|
|
|
|
24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58,
|
|
|
|
60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94,
|
|
|
|
96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124,
|
|
|
|
126, 128, 130, 2, 10, 3, 2, 48, 49, 6, 2, 30, 31, 37, 39, 41, 62, 66, 66,
|
|
|
|
4, 2, 48, 48, 56, 57, 3, 2, 17, 22, 3, 2, 35, 36, 3, 2, 23, 25, 3, 2, 26,
|
|
|
|
27, 4, 2, 26, 27, 61, 61, 2, 695, 2, 135, 3, 2, 2, 2, 4, 141, 3, 2, 2,
|
|
|
|
2, 6, 143, 3, 2, 2, 2, 8, 145, 3, 2, 2, 2, 10, 148, 3, 2, 2, 2, 12, 154,
|
|
|
|
3, 2, 2, 2, 14, 162, 3, 2, 2, 2, 16, 166, 3, 2, 2, 2, 18, 182, 3, 2, 2,
|
|
|
|
2, 20, 200, 3, 2, 2, 2, 22, 233, 3, 2, 2, 2, 24, 242, 3, 2, 2, 2, 26, 248,
|
|
|
|
3, 2, 2, 2, 28, 252, 3, 2, 2, 2, 30, 256, 3, 2, 2, 2, 32, 260, 3, 2, 2,
|
|
|
|
2, 34, 262, 3, 2, 2, 2, 36, 265, 3, 2, 2, 2, 38, 273, 3, 2, 2, 2, 40, 275,
|
|
|
|
3, 2, 2, 2, 42, 284, 3, 2, 2, 2, 44, 306, 3, 2, 2, 2, 46, 308, 3, 2, 2,
|
|
|
|
2, 48, 312, 3, 2, 2, 2, 50, 320, 3, 2, 2, 2, 52, 329, 3, 2, 2, 2, 54, 341,
|
|
|
|
3, 2, 2, 2, 56, 343, 3, 2, 2, 2, 58, 352, 3, 2, 2, 2, 60, 354, 3, 2, 2,
|
|
|
|
2, 62, 368, 3, 2, 2, 2, 64, 375, 3, 2, 2, 2, 66, 380, 3, 2, 2, 2, 68, 385,
|
|
|
|
3, 2, 2, 2, 70, 393, 3, 2, 2, 2, 72, 409, 3, 2, 2, 2, 74, 434, 3, 2, 2,
|
|
|
|
2, 76, 436, 3, 2, 2, 2, 78, 443, 3, 2, 2, 2, 80, 445, 3, 2, 2, 2, 82, 447,
|
|
|
|
3, 2, 2, 2, 84, 449, 3, 2, 2, 2, 86, 451, 3, 2, 2, 2, 88, 453, 3, 2, 2,
|
|
|
|
2, 90, 455, 3, 2, 2, 2, 92, 476, 3, 2, 2, 2, 94, 568, 3, 2, 2, 2, 96, 579,
|
|
|
|
3, 2, 2, 2, 98, 591, 3, 2, 2, 2, 100, 593, 3, 2, 2, 2, 102, 597, 3, 2,
|
|
|
|
2, 2, 104, 602, 3, 2, 2, 2, 106, 605, 3, 2, 2, 2, 108, 618, 3, 2, 2, 2,
|
|
|
|
110, 623, 3, 2, 2, 2, 112, 628, 3, 2, 2, 2, 114, 630, 3, 2, 2, 2, 116,
|
|
|
|
632, 3, 2, 2, 2, 118, 634, 3, 2, 2, 2, 120, 636, 3, 2, 2, 2, 122, 638,
|
|
|
|
3, 2, 2, 2, 124, 640, 3, 2, 2, 2, 126, 642, 3, 2, 2, 2, 128, 644, 3, 2,
|
|
|
|
2, 2, 130, 647, 3, 2, 2, 2, 132, 134, 5, 4, 3, 2, 133, 132, 3, 2, 2, 2,
|
|
|
|
134, 137, 3, 2, 2, 2, 135, 133, 3, 2, 2, 2, 135, 136, 3, 2, 2, 2, 136,
|
|
|
|
138, 3, 2, 2, 2, 137, 135, 3, 2, 2, 2, 138, 139, 5, 12, 7, 2, 139, 140,
|
|
|
|
7, 2, 2, 3, 140, 3, 3, 2, 2, 2, 141, 142, 5, 6, 4, 2, 142, 5, 3, 2, 2,
|
|
|
|
2, 143, 144, 5, 8, 5, 2, 144, 7, 3, 2, 2, 2, 145, 146, 7, 51, 2, 2, 146,
|
|
|
|
147, 5, 10, 6, 2, 147, 9, 3, 2, 2, 2, 148, 149, 5, 104, 53, 2, 149, 150,
|
|
|
|
7, 66, 2, 2, 150, 11, 3, 2, 2, 2, 151, 153, 5, 14, 8, 2, 152, 151, 3, 2,
|
|
|
|
2, 2, 153, 156, 3, 2, 2, 2, 154, 152, 3, 2, 2, 2, 154, 155, 3, 2, 2, 2,
|
|
|
|
155, 157, 3, 2, 2, 2, 156, 154, 3, 2, 2, 2, 157, 158, 5, 16, 9, 2, 158,
|
|
|
|
13, 3, 2, 2, 2, 159, 163, 5, 18, 10, 2, 160, 163, 5, 100, 51, 2, 161, 163,
|
|
|
|
5, 60, 31, 2, 162, 159, 3, 2, 2, 2, 162, 160, 3, 2, 2, 2, 162, 161, 3,
|
|
|
|
2, 2, 2, 163, 15, 3, 2, 2, 2, 164, 167, 5, 20, 11, 2, 165, 167, 5, 22,
|
|
|
|
12, 2, 166, 164, 3, 2, 2, 2, 166, 165, 3, 2, 2, 2, 167, 17, 3, 2, 2, 2,
|
|
|
|
168, 169, 7, 45, 2, 2, 169, 170, 7, 66, 2, 2, 170, 171, 7, 33, 2, 2, 171,
|
|
|
|
174, 7, 13, 2, 2, 172, 175, 5, 22, 12, 2, 173, 175, 5, 60, 31, 2, 174,
|
|
|
|
172, 3, 2, 2, 2, 174, 173, 3, 2, 2, 2, 175, 176, 3, 2, 2, 2, 176, 177,
|
|
|
|
7, 14, 2, 2, 177, 183, 3, 2, 2, 2, 178, 179, 7, 45, 2, 2, 179, 180, 7,
|
|
|
|
66, 2, 2, 180, 181, 7, 33, 2, 2, 181, 183, 5, 92, 47, 2, 182, 168, 3, 2,
|
|
|
|
2, 2, 182, 178, 3, 2, 2, 2, 183, 19, 3, 2, 2, 2, 184, 186, 7, 38, 2, 2,
|
|
|
|
185, 187, 7, 41, 2, 2, 186, 185, 3, 2, 2, 2, 186, 187, 3, 2, 2, 2, 187,
|
|
|
|
188, 3, 2, 2, 2, 188, 191, 7, 13, 2, 2, 189, 192, 5, 22, 12, 2, 190, 192,
|
|
|
|
5, 60, 31, 2, 191, 189, 3, 2, 2, 2, 191, 190, 3, 2, 2, 2, 192, 193, 3,
|
|
|
|
2, 2, 2, 193, 194, 7, 14, 2, 2, 194, 201, 3, 2, 2, 2, 195, 197, 7, 38,
|
2021-07-16 14:46:08 -04:00
|
|
|
2, 2, 196, 198, 7, 41, 2, 2, 197, 196, 3, 2, 2, 2, 197, 198, 3, 2, 2, 2,
|
|
|
|
198, 199, 3, 2, 2, 2, 199, 201, 5, 92, 47, 2, 200, 184, 3, 2, 2, 2, 200,
|
|
|
|
195, 3, 2, 2, 2, 201, 21, 3, 2, 2, 2, 202, 203, 7, 37, 2, 2, 203, 206,
|
|
|
|
7, 66, 2, 2, 204, 205, 7, 10, 2, 2, 205, 207, 7, 66, 2, 2, 206, 204, 3,
|
|
|
|
2, 2, 2, 206, 207, 3, 2, 2, 2, 207, 208, 3, 2, 2, 2, 208, 209, 7, 62, 2,
|
|
|
|
2, 209, 213, 5, 24, 13, 2, 210, 212, 5, 30, 16, 2, 211, 210, 3, 2, 2, 2,
|
|
|
|
212, 215, 3, 2, 2, 2, 213, 211, 3, 2, 2, 2, 213, 214, 3, 2, 2, 2, 214,
|
|
|
|
216, 3, 2, 2, 2, 215, 213, 3, 2, 2, 2, 216, 217, 5, 32, 17, 2, 217, 234,
|
|
|
|
3, 2, 2, 2, 218, 219, 7, 37, 2, 2, 219, 221, 7, 66, 2, 2, 220, 222, 7,
|
|
|
|
63, 2, 2, 221, 220, 3, 2, 2, 2, 221, 222, 3, 2, 2, 2, 222, 223, 3, 2, 2,
|
|
|
|
2, 223, 224, 7, 64, 2, 2, 224, 228, 5, 92, 47, 2, 225, 227, 5, 30, 16,
|
|
|
|
2, 226, 225, 3, 2, 2, 2, 227, 230, 3, 2, 2, 2, 228, 226, 3, 2, 2, 2, 228,
|
|
|
|
229, 3, 2, 2, 2, 229, 231, 3, 2, 2, 2, 230, 228, 3, 2, 2, 2, 231, 232,
|
|
|
|
5, 32, 17, 2, 232, 234, 3, 2, 2, 2, 233, 202, 3, 2, 2, 2, 233, 218, 3,
|
|
|
|
2, 2, 2, 234, 23, 3, 2, 2, 2, 235, 243, 5, 100, 51, 2, 236, 243, 5, 70,
|
|
|
|
36, 2, 237, 243, 5, 72, 37, 2, 238, 243, 5, 130, 66, 2, 239, 243, 5, 94,
|
|
|
|
48, 2, 240, 243, 5, 68, 35, 2, 241, 243, 5, 128, 65, 2, 242, 235, 3, 2,
|
|
|
|
2, 2, 242, 236, 3, 2, 2, 2, 242, 237, 3, 2, 2, 2, 242, 238, 3, 2, 2, 2,
|
|
|
|
242, 239, 3, 2, 2, 2, 242, 240, 3, 2, 2, 2, 242, 241, 3, 2, 2, 2, 243,
|
|
|
|
25, 3, 2, 2, 2, 244, 249, 5, 36, 19, 2, 245, 249, 5, 40, 21, 2, 246, 249,
|
|
|
|
5, 34, 18, 2, 247, 249, 5, 44, 23, 2, 248, 244, 3, 2, 2, 2, 248, 245, 3,
|
|
|
|
2, 2, 2, 248, 246, 3, 2, 2, 2, 248, 247, 3, 2, 2, 2, 249, 27, 3, 2, 2,
|
|
|
|
2, 250, 253, 5, 18, 10, 2, 251, 253, 5, 100, 51, 2, 252, 250, 3, 2, 2,
|
|
|
|
2, 252, 251, 3, 2, 2, 2, 253, 29, 3, 2, 2, 2, 254, 257, 5, 28, 15, 2, 255,
|
|
|
|
257, 5, 26, 14, 2, 256, 254, 3, 2, 2, 2, 256, 255, 3, 2, 2, 2, 257, 31,
|
|
|
|
3, 2, 2, 2, 258, 261, 5, 20, 11, 2, 259, 261, 5, 22, 12, 2, 260, 258, 3,
|
|
|
|
2, 2, 2, 260, 259, 3, 2, 2, 2, 261, 33, 3, 2, 2, 2, 262, 263, 7, 42, 2,
|
|
|
|
2, 263, 264, 5, 92, 47, 2, 264, 35, 3, 2, 2, 2, 265, 266, 7, 44, 2, 2,
|
|
|
|
266, 269, 5, 38, 20, 2, 267, 268, 7, 10, 2, 2, 268, 270, 5, 38, 20, 2,
|
|
|
|
269, 267, 3, 2, 2, 2, 269, 270, 3, 2, 2, 2, 270, 37, 3, 2, 2, 2, 271, 274,
|
|
|
|
7, 68, 2, 2, 272, 274, 5, 128, 65, 2, 273, 271, 3, 2, 2, 2, 273, 272, 3,
|
|
|
|
2, 2, 2, 274, 39, 3, 2, 2, 2, 275, 276, 7, 43, 2, 2, 276, 281, 5, 42, 22,
|
|
|
|
2, 277, 278, 7, 10, 2, 2, 278, 280, 5, 42, 22, 2, 279, 277, 3, 2, 2, 2,
|
|
|
|
280, 283, 3, 2, 2, 2, 281, 279, 3, 2, 2, 2, 281, 282, 3, 2, 2, 2, 282,
|
|
|
|
41, 3, 2, 2, 2, 283, 281, 3, 2, 2, 2, 284, 286, 5, 92, 47, 2, 285, 287,
|
|
|
|
7, 47, 2, 2, 286, 285, 3, 2, 2, 2, 286, 287, 3, 2, 2, 2, 287, 43, 3, 2,
|
|
|
|
2, 2, 288, 289, 7, 46, 2, 2, 289, 307, 5, 56, 29, 2, 290, 291, 7, 46, 2,
|
|
|
|
2, 291, 307, 5, 50, 26, 2, 292, 293, 7, 46, 2, 2, 293, 294, 5, 48, 25,
|
|
|
|
2, 294, 295, 5, 50, 26, 2, 295, 307, 3, 2, 2, 2, 296, 297, 7, 46, 2, 2,
|
|
|
|
297, 298, 5, 48, 25, 2, 298, 299, 5, 54, 28, 2, 299, 307, 3, 2, 2, 2, 300,
|
|
|
|
301, 7, 46, 2, 2, 301, 302, 5, 48, 25, 2, 302, 303, 5, 56, 29, 2, 303,
|
|
|
|
307, 3, 2, 2, 2, 304, 305, 7, 46, 2, 2, 305, 307, 5, 48, 25, 2, 306, 288,
|
|
|
|
3, 2, 2, 2, 306, 290, 3, 2, 2, 2, 306, 292, 3, 2, 2, 2, 306, 296, 3, 2,
|
|
|
|
2, 2, 306, 300, 3, 2, 2, 2, 306, 304, 3, 2, 2, 2, 307, 45, 3, 2, 2, 2,
|
|
|
|
308, 309, 7, 66, 2, 2, 309, 310, 7, 33, 2, 2, 310, 311, 5, 92, 47, 2, 311,
|
|
|
|
47, 3, 2, 2, 2, 312, 317, 5, 46, 24, 2, 313, 314, 7, 10, 2, 2, 314, 316,
|
|
|
|
5, 46, 24, 2, 315, 313, 3, 2, 2, 2, 316, 319, 3, 2, 2, 2, 317, 315, 3,
|
|
|
|
2, 2, 2, 317, 318, 3, 2, 2, 2, 318, 49, 3, 2, 2, 2, 319, 317, 3, 2, 2,
|
|
|
|
2, 320, 321, 7, 58, 2, 2, 321, 326, 5, 52, 27, 2, 322, 323, 7, 10, 2, 2,
|
|
|
|
323, 325, 5, 52, 27, 2, 324, 322, 3, 2, 2, 2, 325, 328, 3, 2, 2, 2, 326,
|
|
|
|
324, 3, 2, 2, 2, 326, 327, 3, 2, 2, 2, 327, 51, 3, 2, 2, 2, 328, 326, 3,
|
|
|
|
2, 2, 2, 329, 330, 7, 66, 2, 2, 330, 331, 7, 33, 2, 2, 331, 332, 5, 100,
|
|
|
|
51, 2, 332, 53, 3, 2, 2, 2, 333, 334, 7, 52, 2, 2, 334, 342, 5, 46, 24,
|
|
|
|
2, 335, 336, 7, 52, 2, 2, 336, 339, 7, 66, 2, 2, 337, 338, 7, 53, 2, 2,
|
|
|
|
338, 340, 7, 66, 2, 2, 339, 337, 3, 2, 2, 2, 339, 340, 3, 2, 2, 2, 340,
|
|
|
|
342, 3, 2, 2, 2, 341, 333, 3, 2, 2, 2, 341, 335, 3, 2, 2, 2, 342, 55, 3,
|
|
|
|
2, 2, 2, 343, 344, 7, 54, 2, 2, 344, 345, 7, 55, 2, 2, 345, 346, 7, 52,
|
|
|
|
2, 2, 346, 347, 7, 66, 2, 2, 347, 57, 3, 2, 2, 2, 348, 349, 7, 40, 2, 2,
|
|
|
|
349, 353, 5, 72, 37, 2, 350, 351, 7, 40, 2, 2, 351, 353, 5, 130, 66, 2,
|
|
|
|
352, 348, 3, 2, 2, 2, 352, 350, 3, 2, 2, 2, 353, 59, 3, 2, 2, 2, 354, 355,
|
|
|
|
7, 39, 2, 2, 355, 356, 7, 59, 2, 2, 356, 357, 5, 64, 33, 2, 357, 358, 7,
|
|
|
|
62, 2, 2, 358, 360, 5, 66, 34, 2, 359, 361, 5, 58, 30, 2, 360, 359, 3,
|
|
|
|
2, 2, 2, 360, 361, 3, 2, 2, 2, 361, 363, 3, 2, 2, 2, 362, 364, 5, 62, 32,
|
|
|
|
2, 363, 362, 3, 2, 2, 2, 363, 364, 3, 2, 2, 2, 364, 61, 3, 2, 2, 2, 365,
|
2021-09-02 11:09:48 -04:00
|
|
|
369, 5, 86, 44, 2, 366, 369, 5, 130, 66, 2, 367, 369, 5, 128, 65, 2, 368,
|
|
|
|
365, 3, 2, 2, 2, 368, 366, 3, 2, 2, 2, 368, 367, 3, 2, 2, 2, 369, 63, 3,
|
|
|
|
2, 2, 2, 370, 376, 5, 82, 42, 2, 371, 376, 5, 130, 66, 2, 372, 376, 5,
|
|
|
|
128, 65, 2, 373, 376, 5, 100, 51, 2, 374, 376, 5, 94, 48, 2, 375, 370,
|
|
|
|
3, 2, 2, 2, 375, 371, 3, 2, 2, 2, 375, 372, 3, 2, 2, 2, 375, 373, 3, 2,
|
|
|
|
2, 2, 375, 374, 3, 2, 2, 2, 376, 65, 3, 2, 2, 2, 377, 381, 5, 100, 51,
|
|
|
|
2, 378, 381, 5, 130, 66, 2, 379, 381, 5, 94, 48, 2, 380, 377, 3, 2, 2,
|
|
|
|
2, 380, 378, 3, 2, 2, 2, 380, 379, 3, 2, 2, 2, 381, 67, 3, 2, 2, 2, 382,
|
|
|
|
386, 5, 86, 44, 2, 383, 386, 5, 130, 66, 2, 384, 386, 5, 128, 65, 2, 385,
|
|
|
|
382, 3, 2, 2, 2, 385, 383, 3, 2, 2, 2, 385, 384, 3, 2, 2, 2, 386, 387,
|
|
|
|
3, 2, 2, 2, 387, 391, 7, 32, 2, 2, 388, 392, 5, 86, 44, 2, 389, 392, 5,
|
|
|
|
130, 66, 2, 390, 392, 5, 128, 65, 2, 391, 388, 3, 2, 2, 2, 391, 389, 3,
|
|
|
|
2, 2, 2, 391, 390, 3, 2, 2, 2, 392, 69, 3, 2, 2, 2, 393, 405, 7, 11, 2,
|
|
|
|
2, 394, 399, 5, 92, 47, 2, 395, 396, 7, 10, 2, 2, 396, 398, 5, 92, 47,
|
|
|
|
2, 397, 395, 3, 2, 2, 2, 398, 401, 3, 2, 2, 2, 399, 397, 3, 2, 2, 2, 399,
|
|
|
|
400, 3, 2, 2, 2, 400, 403, 3, 2, 2, 2, 401, 399, 3, 2, 2, 2, 402, 404,
|
|
|
|
7, 10, 2, 2, 403, 402, 3, 2, 2, 2, 403, 404, 3, 2, 2, 2, 404, 406, 3, 2,
|
|
|
|
2, 2, 405, 394, 3, 2, 2, 2, 405, 406, 3, 2, 2, 2, 406, 407, 3, 2, 2, 2,
|
|
|
|
407, 408, 7, 12, 2, 2, 408, 71, 3, 2, 2, 2, 409, 421, 7, 15, 2, 2, 410,
|
|
|
|
415, 5, 74, 38, 2, 411, 412, 7, 10, 2, 2, 412, 414, 5, 74, 38, 2, 413,
|
|
|
|
411, 3, 2, 2, 2, 414, 417, 3, 2, 2, 2, 415, 413, 3, 2, 2, 2, 415, 416,
|
|
|
|
3, 2, 2, 2, 416, 419, 3, 2, 2, 2, 417, 415, 3, 2, 2, 2, 418, 420, 7, 10,
|
|
|
|
2, 2, 419, 418, 3, 2, 2, 2, 419, 420, 3, 2, 2, 2, 420, 422, 3, 2, 2, 2,
|
|
|
|
421, 410, 3, 2, 2, 2, 421, 422, 3, 2, 2, 2, 422, 423, 3, 2, 2, 2, 423,
|
|
|
|
424, 7, 16, 2, 2, 424, 73, 3, 2, 2, 2, 425, 426, 5, 78, 40, 2, 426, 427,
|
|
|
|
7, 7, 2, 2, 427, 428, 5, 92, 47, 2, 428, 435, 3, 2, 2, 2, 429, 430, 5,
|
|
|
|
76, 39, 2, 430, 431, 7, 7, 2, 2, 431, 432, 5, 92, 47, 2, 432, 435, 3, 2,
|
|
|
|
2, 2, 433, 435, 5, 130, 66, 2, 434, 425, 3, 2, 2, 2, 434, 429, 3, 2, 2,
|
|
|
|
2, 434, 433, 3, 2, 2, 2, 435, 75, 3, 2, 2, 2, 436, 437, 7, 11, 2, 2, 437,
|
|
|
|
438, 5, 92, 47, 2, 438, 439, 7, 12, 2, 2, 439, 77, 3, 2, 2, 2, 440, 444,
|
|
|
|
7, 66, 2, 2, 441, 444, 5, 82, 42, 2, 442, 444, 5, 128, 65, 2, 443, 440,
|
|
|
|
3, 2, 2, 2, 443, 441, 3, 2, 2, 2, 443, 442, 3, 2, 2, 2, 444, 79, 3, 2,
|
|
|
|
2, 2, 445, 446, 7, 50, 2, 2, 446, 81, 3, 2, 2, 2, 447, 448, 7, 67, 2, 2,
|
|
|
|
448, 83, 3, 2, 2, 2, 449, 450, 7, 69, 2, 2, 450, 85, 3, 2, 2, 2, 451, 452,
|
|
|
|
7, 68, 2, 2, 452, 87, 3, 2, 2, 2, 453, 454, 9, 2, 2, 2, 454, 89, 3, 2,
|
|
|
|
2, 2, 455, 456, 7, 13, 2, 2, 456, 457, 5, 92, 47, 2, 457, 458, 7, 14, 2,
|
|
|
|
2, 458, 91, 3, 2, 2, 2, 459, 460, 8, 47, 1, 2, 460, 461, 5, 126, 64, 2,
|
|
|
|
461, 462, 5, 92, 47, 29, 462, 477, 3, 2, 2, 2, 463, 477, 5, 68, 35, 2,
|
|
|
|
464, 477, 5, 82, 42, 2, 465, 477, 5, 84, 43, 2, 466, 477, 5, 86, 44, 2,
|
|
|
|
467, 477, 5, 80, 41, 2, 468, 477, 5, 70, 36, 2, 469, 477, 5, 72, 37, 2,
|
|
|
|
470, 477, 5, 94, 48, 2, 471, 477, 5, 100, 51, 2, 472, 477, 5, 128, 65,
|
|
|
|
2, 473, 477, 5, 130, 66, 2, 474, 477, 5, 88, 45, 2, 475, 477, 5, 90, 46,
|
|
|
|
2, 476, 459, 3, 2, 2, 2, 476, 463, 3, 2, 2, 2, 476, 464, 3, 2, 2, 2, 476,
|
|
|
|
465, 3, 2, 2, 2, 476, 466, 3, 2, 2, 2, 476, 467, 3, 2, 2, 2, 476, 468,
|
|
|
|
3, 2, 2, 2, 476, 469, 3, 2, 2, 2, 476, 470, 3, 2, 2, 2, 476, 471, 3, 2,
|
|
|
|
2, 2, 476, 472, 3, 2, 2, 2, 476, 473, 3, 2, 2, 2, 476, 474, 3, 2, 2, 2,
|
|
|
|
476, 475, 3, 2, 2, 2, 477, 565, 3, 2, 2, 2, 478, 479, 12, 28, 2, 2, 479,
|
|
|
|
480, 5, 122, 62, 2, 480, 481, 5, 92, 47, 29, 481, 564, 3, 2, 2, 2, 482,
|
|
|
|
483, 12, 27, 2, 2, 483, 484, 5, 124, 63, 2, 484, 485, 5, 92, 47, 28, 485,
|
|
|
|
564, 3, 2, 2, 2, 486, 487, 12, 26, 2, 2, 487, 490, 5, 108, 55, 2, 488,
|
|
|
|
491, 5, 110, 56, 2, 489, 491, 5, 114, 58, 2, 490, 488, 3, 2, 2, 2, 490,
|
|
|
|
489, 3, 2, 2, 2, 491, 492, 3, 2, 2, 2, 492, 493, 5, 92, 47, 27, 493, 564,
|
|
|
|
3, 2, 2, 2, 494, 495, 12, 25, 2, 2, 495, 496, 5, 110, 56, 2, 496, 497,
|
|
|
|
5, 92, 47, 26, 497, 564, 3, 2, 2, 2, 498, 499, 12, 24, 2, 2, 499, 500,
|
|
|
|
5, 112, 57, 2, 500, 501, 5, 92, 47, 25, 501, 564, 3, 2, 2, 2, 502, 503,
|
|
|
|
12, 23, 2, 2, 503, 504, 5, 114, 58, 2, 504, 505, 5, 92, 47, 24, 505, 564,
|
|
|
|
3, 2, 2, 2, 506, 507, 12, 22, 2, 2, 507, 508, 5, 116, 59, 2, 508, 509,
|
|
|
|
5, 92, 47, 23, 509, 564, 3, 2, 2, 2, 510, 511, 12, 21, 2, 2, 511, 512,
|
|
|
|
5, 118, 60, 2, 512, 513, 5, 92, 47, 22, 513, 564, 3, 2, 2, 2, 514, 515,
|
|
|
|
12, 20, 2, 2, 515, 516, 5, 120, 61, 2, 516, 517, 5, 92, 47, 21, 517, 564,
|
|
|
|
3, 2, 2, 2, 518, 519, 12, 17, 2, 2, 519, 520, 7, 34, 2, 2, 520, 523, 7,
|
|
|
|
13, 2, 2, 521, 524, 5, 22, 12, 2, 522, 524, 5, 60, 31, 2, 523, 521, 3,
|
|
|
|
2, 2, 2, 523, 522, 3, 2, 2, 2, 524, 525, 3, 2, 2, 2, 525, 526, 7, 14, 2,
|
|
|
|
2, 526, 527, 7, 7, 2, 2, 527, 528, 5, 92, 47, 18, 528, 564, 3, 2, 2, 2,
|
|
|
|
529, 530, 12, 16, 2, 2, 530, 532, 7, 34, 2, 2, 531, 533, 5, 92, 47, 2,
|
|
|
|
532, 531, 3, 2, 2, 2, 532, 533, 3, 2, 2, 2, 533, 534, 3, 2, 2, 2, 534,
|
|
|
|
535, 7, 7, 2, 2, 535, 564, 5, 92, 47, 17, 536, 537, 12, 19, 2, 2, 537,
|
|
|
|
538, 7, 34, 2, 2, 538, 541, 7, 13, 2, 2, 539, 542, 5, 22, 12, 2, 540, 542,
|
|
|
|
5, 60, 31, 2, 541, 539, 3, 2, 2, 2, 541, 540, 3, 2, 2, 2, 542, 543, 3,
|
|
|
|
2, 2, 2, 543, 544, 7, 14, 2, 2, 544, 545, 7, 7, 2, 2, 545, 548, 7, 13,
|
|
|
|
2, 2, 546, 549, 5, 22, 12, 2, 547, 549, 5, 60, 31, 2, 548, 546, 3, 2, 2,
|
|
|
|
2, 548, 547, 3, 2, 2, 2, 549, 550, 3, 2, 2, 2, 550, 551, 7, 14, 2, 2, 551,
|
|
|
|
564, 3, 2, 2, 2, 552, 553, 12, 18, 2, 2, 553, 554, 7, 34, 2, 2, 554, 555,
|
|
|
|
5, 92, 47, 2, 555, 556, 7, 7, 2, 2, 556, 559, 7, 13, 2, 2, 557, 560, 5,
|
|
|
|
22, 12, 2, 558, 560, 5, 60, 31, 2, 559, 557, 3, 2, 2, 2, 559, 558, 3, 2,
|
|
|
|
2, 2, 560, 561, 3, 2, 2, 2, 561, 562, 7, 14, 2, 2, 562, 564, 3, 2, 2, 2,
|
|
|
|
563, 478, 3, 2, 2, 2, 563, 482, 3, 2, 2, 2, 563, 486, 3, 2, 2, 2, 563,
|
|
|
|
494, 3, 2, 2, 2, 563, 498, 3, 2, 2, 2, 563, 502, 3, 2, 2, 2, 563, 506,
|
|
|
|
3, 2, 2, 2, 563, 510, 3, 2, 2, 2, 563, 514, 3, 2, 2, 2, 563, 518, 3, 2,
|
|
|
|
2, 2, 563, 529, 3, 2, 2, 2, 563, 536, 3, 2, 2, 2, 563, 552, 3, 2, 2, 2,
|
|
|
|
564, 567, 3, 2, 2, 2, 565, 563, 3, 2, 2, 2, 565, 566, 3, 2, 2, 2, 566,
|
|
|
|
93, 3, 2, 2, 2, 567, 565, 3, 2, 2, 2, 568, 570, 5, 96, 49, 2, 569, 571,
|
|
|
|
5, 98, 50, 2, 570, 569, 3, 2, 2, 2, 571, 572, 3, 2, 2, 2, 572, 570, 3,
|
|
|
|
2, 2, 2, 572, 573, 3, 2, 2, 2, 573, 95, 3, 2, 2, 2, 574, 580, 5, 130, 66,
|
|
|
|
2, 575, 580, 5, 128, 65, 2, 576, 580, 5, 100, 51, 2, 577, 580, 5, 70, 36,
|
|
|
|
2, 578, 580, 5, 72, 37, 2, 579, 574, 3, 2, 2, 2, 579, 575, 3, 2, 2, 2,
|
|
|
|
579, 576, 3, 2, 2, 2, 579, 577, 3, 2, 2, 2, 579, 578, 3, 2, 2, 2, 580,
|
|
|
|
97, 3, 2, 2, 2, 581, 583, 7, 34, 2, 2, 582, 581, 3, 2, 2, 2, 582, 583,
|
|
|
|
3, 2, 2, 2, 583, 584, 3, 2, 2, 2, 584, 585, 7, 9, 2, 2, 585, 592, 5, 78,
|
|
|
|
40, 2, 586, 587, 7, 34, 2, 2, 587, 589, 7, 9, 2, 2, 588, 586, 3, 2, 2,
|
|
|
|
2, 588, 589, 3, 2, 2, 2, 589, 590, 3, 2, 2, 2, 590, 592, 5, 76, 39, 2,
|
|
|
|
591, 582, 3, 2, 2, 2, 591, 588, 3, 2, 2, 2, 592, 99, 3, 2, 2, 2, 593, 594,
|
|
|
|
5, 104, 53, 2, 594, 595, 5, 102, 52, 2, 595, 596, 5, 106, 54, 2, 596, 101,
|
|
|
|
3, 2, 2, 2, 597, 598, 9, 3, 2, 2, 598, 103, 3, 2, 2, 2, 599, 601, 7, 70,
|
|
|
|
2, 2, 600, 599, 3, 2, 2, 2, 601, 604, 3, 2, 2, 2, 602, 600, 3, 2, 2, 2,
|
|
|
|
602, 603, 3, 2, 2, 2, 603, 105, 3, 2, 2, 2, 604, 602, 3, 2, 2, 2, 605,
|
|
|
|
614, 7, 13, 2, 2, 606, 611, 5, 92, 47, 2, 607, 608, 7, 10, 2, 2, 608, 610,
|
|
|
|
5, 92, 47, 2, 609, 607, 3, 2, 2, 2, 610, 613, 3, 2, 2, 2, 611, 609, 3,
|
|
|
|
2, 2, 2, 611, 612, 3, 2, 2, 2, 612, 615, 3, 2, 2, 2, 613, 611, 3, 2, 2,
|
|
|
|
2, 614, 606, 3, 2, 2, 2, 614, 615, 3, 2, 2, 2, 615, 616, 3, 2, 2, 2, 616,
|
|
|
|
617, 7, 14, 2, 2, 617, 107, 3, 2, 2, 2, 618, 619, 9, 4, 2, 2, 619, 109,
|
|
|
|
3, 2, 2, 2, 620, 624, 7, 62, 2, 2, 621, 622, 7, 61, 2, 2, 622, 624, 7,
|
|
|
|
62, 2, 2, 623, 620, 3, 2, 2, 2, 623, 621, 3, 2, 2, 2, 624, 111, 3, 2, 2,
|
|
|
|
2, 625, 629, 7, 60, 2, 2, 626, 627, 7, 61, 2, 2, 627, 629, 7, 60, 2, 2,
|
|
|
|
628, 625, 3, 2, 2, 2, 628, 626, 3, 2, 2, 2, 629, 113, 3, 2, 2, 2, 630,
|
|
|
|
631, 9, 5, 2, 2, 631, 115, 3, 2, 2, 2, 632, 633, 9, 6, 2, 2, 633, 117,
|
|
|
|
3, 2, 2, 2, 634, 635, 7, 30, 2, 2, 635, 119, 3, 2, 2, 2, 636, 637, 7, 31,
|
|
|
|
2, 2, 637, 121, 3, 2, 2, 2, 638, 639, 9, 7, 2, 2, 639, 123, 3, 2, 2, 2,
|
|
|
|
640, 641, 9, 8, 2, 2, 641, 125, 3, 2, 2, 2, 642, 643, 9, 9, 2, 2, 643,
|
|
|
|
127, 3, 2, 2, 2, 644, 645, 7, 65, 2, 2, 645, 646, 7, 66, 2, 2, 646, 129,
|
|
|
|
3, 2, 2, 2, 647, 648, 7, 66, 2, 2, 648, 131, 3, 2, 2, 2, 66, 135, 154,
|
|
|
|
162, 166, 174, 182, 186, 191, 197, 200, 206, 213, 221, 228, 233, 242, 248,
|
|
|
|
252, 256, 260, 269, 273, 281, 286, 306, 317, 326, 339, 341, 352, 360, 363,
|
|
|
|
368, 375, 380, 385, 391, 399, 403, 405, 415, 419, 421, 434, 443, 476, 490,
|
|
|
|
523, 532, 541, 548, 559, 563, 565, 572, 579, 582, 588, 591, 602, 611, 614,
|
|
|
|
623, 628,
|
2021-02-15 11:37:52 -05:00
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
var literalNames = []string{
|
2018-09-22 19:18:10 -04:00
|
|
|
"", "", "", "", "", "':'", "';'", "'.'", "','", "'['", "']'", "'('", "')'",
|
2018-12-21 23:14:41 -05:00
|
|
|
"'{'", "'}'", "'>'", "'<'", "'=='", "'>='", "'<='", "'!='", "'*'", "'/'",
|
|
|
|
"'%'", "'+'", "'-'", "'--'", "'++'", "", "", "", "'='", "'?'", "'!~'",
|
2021-07-13 21:34:22 -04:00
|
|
|
"'=~'", "'FOR'", "'RETURN'", "'WAITFOR'", "'OPTIONS'", "'DISTINCT'", "'FILTER'",
|
|
|
|
"'SORT'", "'LIMIT'", "'LET'", "'COLLECT'", "", "'NONE'", "'NULL'", "",
|
|
|
|
"'USE'", "'INTO'", "'KEEP'", "'WITH'", "'COUNT'", "'ALL'", "'ANY'", "'AGGREGATE'",
|
|
|
|
"'EVENT'", "'LIKE'", "", "'IN'", "'DO'", "'WHILE'", "'@'",
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
var symbolicNames = []string{
|
|
|
|
"", "MultiLineComment", "SingleLineComment", "WhiteSpaces", "LineTerminator",
|
2018-09-22 19:18:10 -04:00
|
|
|
"Colon", "SemiColon", "Dot", "Comma", "OpenBracket", "CloseBracket", "OpenParen",
|
|
|
|
"CloseParen", "OpenBrace", "CloseBrace", "Gt", "Lt", "Eq", "Gte", "Lte",
|
2018-12-21 23:14:41 -05:00
|
|
|
"Neq", "Multi", "Div", "Mod", "Plus", "Minus", "MinusMinus", "PlusPlus",
|
2018-09-22 19:18:10 -04:00
|
|
|
"And", "Or", "Range", "Assign", "QuestionMark", "RegexNotMatch", "RegexMatch",
|
2021-07-13 21:34:22 -04:00
|
|
|
"For", "Return", "Waitfor", "Options", "Distinct", "Filter", "Sort", "Limit",
|
|
|
|
"Let", "Collect", "SortDirection", "None", "Null", "BooleanLiteral", "Use",
|
|
|
|
"Into", "Keep", "With", "Count", "All", "Any", "Aggregate", "Event", "Like",
|
|
|
|
"Not", "In", "Do", "While", "Param", "Identifier", "StringLiteral", "IntegerLiteral",
|
|
|
|
"FloatLiteral", "NamespaceSegment", "UnknownIdentifier",
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
var ruleNames = []string{
|
2021-07-13 21:34:22 -04:00
|
|
|
"program", "head", "useExpression", "use", "namespaceIdentifier", "body",
|
|
|
|
"bodyStatement", "bodyExpression", "variableDeclaration", "returnExpression",
|
|
|
|
"forExpression", "forExpressionSource", "forExpressionClause", "forExpressionStatement",
|
2018-10-28 01:45:26 -04:00
|
|
|
"forExpressionBody", "forExpressionReturn", "filterClause", "limitClause",
|
2018-11-12 19:58:12 -05:00
|
|
|
"limitClauseValue", "sortClause", "sortClauseExpression", "collectClause",
|
|
|
|
"collectSelector", "collectGrouping", "collectAggregator", "collectAggregateSelector",
|
2021-07-13 21:34:22 -04:00
|
|
|
"collectGroupVariable", "collectCounter", "optionsClause", "waitForExpression",
|
|
|
|
"waitForTimeout", "waitForEventName", "waitForEventSource", "rangeOperator",
|
|
|
|
"arrayLiteral", "objectLiteral", "propertyAssignment", "computedPropertyName",
|
|
|
|
"propertyName", "booleanLiteral", "stringLiteral", "floatLiteral", "integerLiteral",
|
|
|
|
"noneLiteral", "expressionGroup", "expression", "memberExpression", "memberExpressionSource",
|
|
|
|
"memberExpressionPath", "functionCallExpression", "functionIdentifier",
|
|
|
|
"namespace", "arguments", "arrayOperator", "inOperator", "likeOperator",
|
|
|
|
"equalityOperator", "regexpOperator", "logicalAndOperator", "logicalOrOperator",
|
|
|
|
"multiplicativeOperator", "additiveOperator", "unaryOperator", "param",
|
|
|
|
"variable",
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
type FqlParser struct {
|
|
|
|
*antlr.BaseParser
|
|
|
|
}
|
|
|
|
|
2021-02-15 11:37:52 -05:00
|
|
|
// NewFqlParser produces a new parser instance for the optional input antlr.TokenStream.
|
|
|
|
//
|
|
|
|
// The *FqlParser instance produced may be reused by calling the SetInputStream method.
|
|
|
|
// The initial parser configuration is expensive to construct, and the object is not thread-safe;
|
|
|
|
// however, if used within a Golang sync.Pool, the construction cost amortizes well and the
|
|
|
|
// objects can be used in a thread-safe manner.
|
2018-09-18 16:42:38 -04:00
|
|
|
func NewFqlParser(input antlr.TokenStream) *FqlParser {
|
|
|
|
this := new(FqlParser)
|
2021-02-15 11:37:52 -05:00
|
|
|
deserializer := antlr.NewATNDeserializer(nil)
|
|
|
|
deserializedATN := deserializer.DeserializeFromUInt16(parserATN)
|
|
|
|
decisionToDFA := make([]*antlr.DFA, len(deserializedATN.DecisionToState))
|
|
|
|
for index, ds := range deserializedATN.DecisionToState {
|
|
|
|
decisionToDFA[index] = antlr.NewDFA(ds, index)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
this.BaseParser = antlr.NewBaseParser(input)
|
|
|
|
|
|
|
|
this.Interpreter = antlr.NewParserATNSimulator(this, deserializedATN, decisionToDFA, antlr.NewPredictionContextCache())
|
|
|
|
this.RuleNames = ruleNames
|
|
|
|
this.LiteralNames = literalNames
|
|
|
|
this.SymbolicNames = symbolicNames
|
|
|
|
this.GrammarFileName = "FqlParser.g4"
|
|
|
|
|
|
|
|
return this
|
|
|
|
}
|
|
|
|
|
|
|
|
// FqlParser tokens.
|
|
|
|
const (
|
2019-09-01 21:41:16 -04:00
|
|
|
FqlParserEOF = antlr.TokenEOF
|
|
|
|
FqlParserMultiLineComment = 1
|
|
|
|
FqlParserSingleLineComment = 2
|
|
|
|
FqlParserWhiteSpaces = 3
|
|
|
|
FqlParserLineTerminator = 4
|
|
|
|
FqlParserColon = 5
|
|
|
|
FqlParserSemiColon = 6
|
|
|
|
FqlParserDot = 7
|
|
|
|
FqlParserComma = 8
|
|
|
|
FqlParserOpenBracket = 9
|
|
|
|
FqlParserCloseBracket = 10
|
|
|
|
FqlParserOpenParen = 11
|
|
|
|
FqlParserCloseParen = 12
|
|
|
|
FqlParserOpenBrace = 13
|
|
|
|
FqlParserCloseBrace = 14
|
|
|
|
FqlParserGt = 15
|
|
|
|
FqlParserLt = 16
|
|
|
|
FqlParserEq = 17
|
|
|
|
FqlParserGte = 18
|
|
|
|
FqlParserLte = 19
|
|
|
|
FqlParserNeq = 20
|
|
|
|
FqlParserMulti = 21
|
|
|
|
FqlParserDiv = 22
|
|
|
|
FqlParserMod = 23
|
|
|
|
FqlParserPlus = 24
|
|
|
|
FqlParserMinus = 25
|
|
|
|
FqlParserMinusMinus = 26
|
|
|
|
FqlParserPlusPlus = 27
|
|
|
|
FqlParserAnd = 28
|
|
|
|
FqlParserOr = 29
|
|
|
|
FqlParserRange = 30
|
|
|
|
FqlParserAssign = 31
|
|
|
|
FqlParserQuestionMark = 32
|
|
|
|
FqlParserRegexNotMatch = 33
|
|
|
|
FqlParserRegexMatch = 34
|
|
|
|
FqlParserFor = 35
|
|
|
|
FqlParserReturn = 36
|
2021-07-13 21:34:22 -04:00
|
|
|
FqlParserWaitfor = 37
|
|
|
|
FqlParserOptions = 38
|
|
|
|
FqlParserDistinct = 39
|
|
|
|
FqlParserFilter = 40
|
|
|
|
FqlParserSort = 41
|
|
|
|
FqlParserLimit = 42
|
|
|
|
FqlParserLet = 43
|
|
|
|
FqlParserCollect = 44
|
|
|
|
FqlParserSortDirection = 45
|
|
|
|
FqlParserNone = 46
|
|
|
|
FqlParserNull = 47
|
|
|
|
FqlParserBooleanLiteral = 48
|
|
|
|
FqlParserUse = 49
|
|
|
|
FqlParserInto = 50
|
|
|
|
FqlParserKeep = 51
|
|
|
|
FqlParserWith = 52
|
|
|
|
FqlParserCount = 53
|
|
|
|
FqlParserAll = 54
|
|
|
|
FqlParserAny = 55
|
|
|
|
FqlParserAggregate = 56
|
|
|
|
FqlParserEvent = 57
|
|
|
|
FqlParserLike = 58
|
|
|
|
FqlParserNot = 59
|
|
|
|
FqlParserIn = 60
|
|
|
|
FqlParserDo = 61
|
|
|
|
FqlParserWhile = 62
|
|
|
|
FqlParserParam = 63
|
|
|
|
FqlParserIdentifier = 64
|
|
|
|
FqlParserStringLiteral = 65
|
|
|
|
FqlParserIntegerLiteral = 66
|
|
|
|
FqlParserFloatLiteral = 67
|
|
|
|
FqlParserNamespaceSegment = 68
|
|
|
|
FqlParserUnknownIdentifier = 69
|
2018-09-18 16:42:38 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
// FqlParser rules.
|
|
|
|
const (
|
2021-07-13 21:34:22 -04:00
|
|
|
FqlParserRULE_program = 0
|
|
|
|
FqlParserRULE_head = 1
|
|
|
|
FqlParserRULE_useExpression = 2
|
|
|
|
FqlParserRULE_use = 3
|
|
|
|
FqlParserRULE_namespaceIdentifier = 4
|
|
|
|
FqlParserRULE_body = 5
|
|
|
|
FqlParserRULE_bodyStatement = 6
|
|
|
|
FqlParserRULE_bodyExpression = 7
|
|
|
|
FqlParserRULE_variableDeclaration = 8
|
|
|
|
FqlParserRULE_returnExpression = 9
|
|
|
|
FqlParserRULE_forExpression = 10
|
|
|
|
FqlParserRULE_forExpressionSource = 11
|
|
|
|
FqlParserRULE_forExpressionClause = 12
|
|
|
|
FqlParserRULE_forExpressionStatement = 13
|
|
|
|
FqlParserRULE_forExpressionBody = 14
|
|
|
|
FqlParserRULE_forExpressionReturn = 15
|
|
|
|
FqlParserRULE_filterClause = 16
|
|
|
|
FqlParserRULE_limitClause = 17
|
|
|
|
FqlParserRULE_limitClauseValue = 18
|
|
|
|
FqlParserRULE_sortClause = 19
|
|
|
|
FqlParserRULE_sortClauseExpression = 20
|
|
|
|
FqlParserRULE_collectClause = 21
|
|
|
|
FqlParserRULE_collectSelector = 22
|
|
|
|
FqlParserRULE_collectGrouping = 23
|
|
|
|
FqlParserRULE_collectAggregator = 24
|
|
|
|
FqlParserRULE_collectAggregateSelector = 25
|
|
|
|
FqlParserRULE_collectGroupVariable = 26
|
|
|
|
FqlParserRULE_collectCounter = 27
|
|
|
|
FqlParserRULE_optionsClause = 28
|
|
|
|
FqlParserRULE_waitForExpression = 29
|
|
|
|
FqlParserRULE_waitForTimeout = 30
|
|
|
|
FqlParserRULE_waitForEventName = 31
|
|
|
|
FqlParserRULE_waitForEventSource = 32
|
|
|
|
FqlParserRULE_rangeOperator = 33
|
|
|
|
FqlParserRULE_arrayLiteral = 34
|
|
|
|
FqlParserRULE_objectLiteral = 35
|
|
|
|
FqlParserRULE_propertyAssignment = 36
|
|
|
|
FqlParserRULE_computedPropertyName = 37
|
|
|
|
FqlParserRULE_propertyName = 38
|
|
|
|
FqlParserRULE_booleanLiteral = 39
|
|
|
|
FqlParserRULE_stringLiteral = 40
|
|
|
|
FqlParserRULE_floatLiteral = 41
|
|
|
|
FqlParserRULE_integerLiteral = 42
|
|
|
|
FqlParserRULE_noneLiteral = 43
|
|
|
|
FqlParserRULE_expressionGroup = 44
|
|
|
|
FqlParserRULE_expression = 45
|
|
|
|
FqlParserRULE_memberExpression = 46
|
|
|
|
FqlParserRULE_memberExpressionSource = 47
|
|
|
|
FqlParserRULE_memberExpressionPath = 48
|
|
|
|
FqlParserRULE_functionCallExpression = 49
|
|
|
|
FqlParserRULE_functionIdentifier = 50
|
|
|
|
FqlParserRULE_namespace = 51
|
|
|
|
FqlParserRULE_arguments = 52
|
|
|
|
FqlParserRULE_arrayOperator = 53
|
|
|
|
FqlParserRULE_inOperator = 54
|
|
|
|
FqlParserRULE_likeOperator = 55
|
|
|
|
FqlParserRULE_equalityOperator = 56
|
|
|
|
FqlParserRULE_regexpOperator = 57
|
|
|
|
FqlParserRULE_logicalAndOperator = 58
|
|
|
|
FqlParserRULE_logicalOrOperator = 59
|
|
|
|
FqlParserRULE_multiplicativeOperator = 60
|
|
|
|
FqlParserRULE_additiveOperator = 61
|
|
|
|
FqlParserRULE_unaryOperator = 62
|
|
|
|
FqlParserRULE_param = 63
|
|
|
|
FqlParserRULE_variable = 64
|
2018-09-18 16:42:38 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
// IProgramContext is an interface to support dynamic dispatch.
|
|
|
|
type IProgramContext interface {
|
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
|
|
|
// IsProgramContext differentiates from other interfaces.
|
|
|
|
IsProgramContext()
|
|
|
|
}
|
|
|
|
|
|
|
|
type ProgramContext struct {
|
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewEmptyProgramContext() *ProgramContext {
|
|
|
|
var p = new(ProgramContext)
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
|
|
|
p.RuleIndex = FqlParserRULE_program
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*ProgramContext) IsProgramContext() {}
|
|
|
|
|
|
|
|
func NewProgramContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ProgramContext {
|
|
|
|
var p = new(ProgramContext)
|
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
|
|
|
p.RuleIndex = FqlParserRULE_program
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ProgramContext) GetParser() antlr.Parser { return s.parser }
|
|
|
|
|
|
|
|
func (s *ProgramContext) Body() IBodyContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IBodyContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IBodyContext)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ProgramContext) EOF() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserEOF, 0)
|
|
|
|
}
|
|
|
|
|
2020-04-22 17:44:10 +03:00
|
|
|
func (s *ProgramContext) AllHead() []IHeadContext {
|
|
|
|
var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IHeadContext)(nil)).Elem())
|
|
|
|
var tst = make([]IHeadContext, len(ts))
|
|
|
|
|
|
|
|
for i, t := range ts {
|
|
|
|
if t != nil {
|
|
|
|
tst[i] = t.(IHeadContext)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return tst
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ProgramContext) Head(i int) IHeadContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IHeadContext)(nil)).Elem(), i)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IHeadContext)
|
|
|
|
}
|
|
|
|
|
2018-09-18 16:42:38 -04:00
|
|
|
func (s *ProgramContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ProgramContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ProgramContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterProgram(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ProgramContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitProgram(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ProgramContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitProgram(s)
|
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) Program() (localctx IProgramContext) {
|
|
|
|
localctx = NewProgramContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 0, FqlParserRULE_program)
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2020-04-28 17:30:47 -04:00
|
|
|
var _alt int
|
|
|
|
|
2018-09-18 16:42:38 -04:00
|
|
|
p.EnterOuterAlt(localctx, 1)
|
2021-02-15 11:37:52 -05:00
|
|
|
p.SetState(133)
|
2020-04-22 17:44:10 +03:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2020-04-28 17:30:47 -04:00
|
|
|
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 0, p.GetParserRuleContext())
|
2020-04-22 17:44:10 +03:00
|
|
|
|
2020-04-28 17:30:47 -04:00
|
|
|
for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
|
|
|
|
if _alt == 1 {
|
|
|
|
{
|
2021-02-15 11:37:52 -05:00
|
|
|
p.SetState(130)
|
2020-04-28 17:30:47 -04:00
|
|
|
p.Head()
|
|
|
|
}
|
2020-04-22 17:44:10 +03:00
|
|
|
|
2020-04-28 17:30:47 -04:00
|
|
|
}
|
2021-02-15 11:37:52 -05:00
|
|
|
p.SetState(135)
|
2020-04-22 17:44:10 +03:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2020-04-28 17:30:47 -04:00
|
|
|
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 0, p.GetParserRuleContext())
|
2020-04-22 17:44:10 +03:00
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
{
|
2021-02-15 11:37:52 -05:00
|
|
|
p.SetState(136)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.Body()
|
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
{
|
|
|
|
p.SetState(137)
|
|
|
|
p.Match(FqlParserEOF)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2020-04-22 17:44:10 +03:00
|
|
|
// IHeadContext is an interface to support dynamic dispatch.
|
|
|
|
type IHeadContext interface {
|
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
|
|
|
// IsHeadContext differentiates from other interfaces.
|
|
|
|
IsHeadContext()
|
|
|
|
}
|
|
|
|
|
|
|
|
type HeadContext struct {
|
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewEmptyHeadContext() *HeadContext {
|
|
|
|
var p = new(HeadContext)
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
|
|
|
p.RuleIndex = FqlParserRULE_head
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*HeadContext) IsHeadContext() {}
|
|
|
|
|
|
|
|
func NewHeadContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *HeadContext {
|
|
|
|
var p = new(HeadContext)
|
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
|
|
|
p.RuleIndex = FqlParserRULE_head
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *HeadContext) GetParser() antlr.Parser { return s.parser }
|
|
|
|
|
|
|
|
func (s *HeadContext) UseExpression() IUseExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IUseExpressionContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IUseExpressionContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *HeadContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *HeadContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *HeadContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterHead(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *HeadContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitHead(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *HeadContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitHead(s)
|
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) Head() (localctx IHeadContext) {
|
|
|
|
localctx = NewHeadContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 2, FqlParserRULE_head)
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(139)
|
2020-04-22 17:44:10 +03:00
|
|
|
p.UseExpression()
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
|
|
|
// IUseExpressionContext is an interface to support dynamic dispatch.
|
|
|
|
type IUseExpressionContext interface {
|
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
|
|
|
// IsUseExpressionContext differentiates from other interfaces.
|
|
|
|
IsUseExpressionContext()
|
|
|
|
}
|
|
|
|
|
|
|
|
type UseExpressionContext struct {
|
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewEmptyUseExpressionContext() *UseExpressionContext {
|
|
|
|
var p = new(UseExpressionContext)
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
|
|
|
p.RuleIndex = FqlParserRULE_useExpression
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*UseExpressionContext) IsUseExpressionContext() {}
|
|
|
|
|
|
|
|
func NewUseExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *UseExpressionContext {
|
|
|
|
var p = new(UseExpressionContext)
|
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
|
|
|
p.RuleIndex = FqlParserRULE_useExpression
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UseExpressionContext) GetParser() antlr.Parser { return s.parser }
|
|
|
|
|
|
|
|
func (s *UseExpressionContext) Use() IUseContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IUseContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IUseContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UseExpressionContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UseExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UseExpressionContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterUseExpression(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UseExpressionContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitUseExpression(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UseExpressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitUseExpression(s)
|
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) UseExpression() (localctx IUseExpressionContext) {
|
|
|
|
localctx = NewUseExpressionContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 4, FqlParserRULE_useExpression)
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(141)
|
2020-04-22 17:44:10 +03:00
|
|
|
p.Use()
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
|
|
|
// IUseContext is an interface to support dynamic dispatch.
|
|
|
|
type IUseContext interface {
|
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
|
|
|
// IsUseContext differentiates from other interfaces.
|
|
|
|
IsUseContext()
|
|
|
|
}
|
|
|
|
|
|
|
|
type UseContext struct {
|
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewEmptyUseContext() *UseContext {
|
|
|
|
var p = new(UseContext)
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
|
|
|
p.RuleIndex = FqlParserRULE_use
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*UseContext) IsUseContext() {}
|
|
|
|
|
|
|
|
func NewUseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *UseContext {
|
|
|
|
var p = new(UseContext)
|
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
|
|
|
p.RuleIndex = FqlParserRULE_use
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UseContext) GetParser() antlr.Parser { return s.parser }
|
|
|
|
|
|
|
|
func (s *UseContext) Use() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserUse, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UseContext) NamespaceIdentifier() INamespaceIdentifierContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*INamespaceIdentifierContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(INamespaceIdentifierContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UseContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UseContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterUse(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UseContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitUse(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitUse(s)
|
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) Use() (localctx IUseContext) {
|
|
|
|
localctx = NewUseContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 6, FqlParserRULE_use)
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(143)
|
2020-04-22 17:44:10 +03:00
|
|
|
p.Match(FqlParserUse)
|
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(144)
|
2020-04-22 17:44:10 +03:00
|
|
|
p.NamespaceIdentifier()
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// INamespaceIdentifierContext is an interface to support dynamic dispatch.
|
|
|
|
type INamespaceIdentifierContext interface {
|
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
|
|
|
// IsNamespaceIdentifierContext differentiates from other interfaces.
|
|
|
|
IsNamespaceIdentifierContext()
|
|
|
|
}
|
|
|
|
|
|
|
|
type NamespaceIdentifierContext struct {
|
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewEmptyNamespaceIdentifierContext() *NamespaceIdentifierContext {
|
|
|
|
var p = new(NamespaceIdentifierContext)
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
|
|
|
p.RuleIndex = FqlParserRULE_namespaceIdentifier
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*NamespaceIdentifierContext) IsNamespaceIdentifierContext() {}
|
|
|
|
|
|
|
|
func NewNamespaceIdentifierContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *NamespaceIdentifierContext {
|
|
|
|
var p = new(NamespaceIdentifierContext)
|
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
|
|
|
p.RuleIndex = FqlParserRULE_namespaceIdentifier
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *NamespaceIdentifierContext) GetParser() antlr.Parser { return s.parser }
|
|
|
|
|
|
|
|
func (s *NamespaceIdentifierContext) Namespace() INamespaceContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*INamespaceContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(INamespaceContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *NamespaceIdentifierContext) Identifier() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserIdentifier, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *NamespaceIdentifierContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *NamespaceIdentifierContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *NamespaceIdentifierContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterNamespaceIdentifier(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *NamespaceIdentifierContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitNamespaceIdentifier(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *NamespaceIdentifierContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitNamespaceIdentifier(s)
|
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) NamespaceIdentifier() (localctx INamespaceIdentifierContext) {
|
|
|
|
localctx = NewNamespaceIdentifierContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 8, FqlParserRULE_namespaceIdentifier)
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
|
|
|
p.SetState(146)
|
|
|
|
p.Namespace()
|
|
|
|
}
|
|
|
|
{
|
|
|
|
p.SetState(147)
|
|
|
|
p.Match(FqlParserIdentifier)
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2018-09-18 16:42:38 -04:00
|
|
|
// IBodyContext is an interface to support dynamic dispatch.
|
|
|
|
type IBodyContext interface {
|
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
|
|
|
// IsBodyContext differentiates from other interfaces.
|
|
|
|
IsBodyContext()
|
|
|
|
}
|
|
|
|
|
|
|
|
type BodyContext struct {
|
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewEmptyBodyContext() *BodyContext {
|
|
|
|
var p = new(BodyContext)
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
|
|
|
p.RuleIndex = FqlParserRULE_body
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*BodyContext) IsBodyContext() {}
|
|
|
|
|
|
|
|
func NewBodyContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *BodyContext {
|
|
|
|
var p = new(BodyContext)
|
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
|
|
|
p.RuleIndex = FqlParserRULE_body
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *BodyContext) GetParser() antlr.Parser { return s.parser }
|
|
|
|
|
|
|
|
func (s *BodyContext) BodyExpression() IBodyExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IBodyExpressionContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IBodyExpressionContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *BodyContext) AllBodyStatement() []IBodyStatementContext {
|
|
|
|
var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IBodyStatementContext)(nil)).Elem())
|
|
|
|
var tst = make([]IBodyStatementContext, len(ts))
|
|
|
|
|
|
|
|
for i, t := range ts {
|
|
|
|
if t != nil {
|
|
|
|
tst[i] = t.(IBodyStatementContext)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return tst
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *BodyContext) BodyStatement(i int) IBodyStatementContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IBodyStatementContext)(nil)).Elem(), i)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IBodyStatementContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *BodyContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *BodyContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *BodyContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterBody(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *BodyContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitBody(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *BodyContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitBody(s)
|
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) Body() (localctx IBodyContext) {
|
|
|
|
localctx = NewBodyContext(p, p.GetParserRuleContext(), p.GetState())
|
2021-07-13 21:34:22 -04:00
|
|
|
p.EnterRule(localctx, 10, FqlParserRULE_body)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2020-04-28 17:30:47 -04:00
|
|
|
var _alt int
|
|
|
|
|
2018-09-18 16:42:38 -04:00
|
|
|
p.EnterOuterAlt(localctx, 1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(152)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2020-04-28 17:30:47 -04:00
|
|
|
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 1, p.GetParserRuleContext())
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2020-04-28 17:30:47 -04:00
|
|
|
for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
|
|
|
|
if _alt == 1 {
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(149)
|
2020-04-28 17:30:47 -04:00
|
|
|
p.BodyStatement()
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2020-04-28 17:30:47 -04:00
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(154)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2020-04-28 17:30:47 -04:00
|
|
|
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 1, p.GetParserRuleContext())
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(155)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BodyExpression()
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
|
|
|
// IBodyStatementContext is an interface to support dynamic dispatch.
|
|
|
|
type IBodyStatementContext interface {
|
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
|
|
|
// IsBodyStatementContext differentiates from other interfaces.
|
|
|
|
IsBodyStatementContext()
|
|
|
|
}
|
|
|
|
|
|
|
|
type BodyStatementContext struct {
|
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewEmptyBodyStatementContext() *BodyStatementContext {
|
|
|
|
var p = new(BodyStatementContext)
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
|
|
|
p.RuleIndex = FqlParserRULE_bodyStatement
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*BodyStatementContext) IsBodyStatementContext() {}
|
|
|
|
|
|
|
|
func NewBodyStatementContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *BodyStatementContext {
|
|
|
|
var p = new(BodyStatementContext)
|
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
|
|
|
p.RuleIndex = FqlParserRULE_bodyStatement
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *BodyStatementContext) GetParser() antlr.Parser { return s.parser }
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *BodyStatementContext) VariableDeclaration() IVariableDeclarationContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IVariableDeclarationContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IVariableDeclarationContext)
|
|
|
|
}
|
|
|
|
|
2018-09-18 16:42:38 -04:00
|
|
|
func (s *BodyStatementContext) FunctionCallExpression() IFunctionCallExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IFunctionCallExpressionContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IFunctionCallExpressionContext)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *BodyStatementContext) WaitForExpression() IWaitForExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IWaitForExpressionContext)(nil)).Elem(), 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IWaitForExpressionContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *BodyStatementContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *BodyStatementContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *BodyStatementContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterBodyStatement(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *BodyStatementContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitBodyStatement(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *BodyStatementContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitBodyStatement(s)
|
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) BodyStatement() (localctx IBodyStatementContext) {
|
|
|
|
localctx = NewBodyStatementContext(p, p.GetParserRuleContext(), p.GetState())
|
2021-07-13 21:34:22 -04:00
|
|
|
p.EnterRule(localctx, 12, FqlParserRULE_bodyStatement)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(160)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2020-04-28 17:30:47 -04:00
|
|
|
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 2, p.GetParserRuleContext()) {
|
|
|
|
case 1:
|
2018-09-18 16:42:38 -04:00
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(157)
|
|
|
|
p.VariableDeclaration()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2020-04-28 17:30:47 -04:00
|
|
|
case 2:
|
2018-09-18 16:42:38 -04:00
|
|
|
p.EnterOuterAlt(localctx, 2)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(158)
|
|
|
|
p.FunctionCallExpression()
|
|
|
|
}
|
|
|
|
|
|
|
|
case 3:
|
|
|
|
p.EnterOuterAlt(localctx, 3)
|
|
|
|
{
|
|
|
|
p.SetState(159)
|
|
|
|
p.WaitForExpression()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
|
|
|
// IBodyExpressionContext is an interface to support dynamic dispatch.
|
|
|
|
type IBodyExpressionContext interface {
|
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
|
|
|
// IsBodyExpressionContext differentiates from other interfaces.
|
|
|
|
IsBodyExpressionContext()
|
|
|
|
}
|
|
|
|
|
|
|
|
type BodyExpressionContext struct {
|
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewEmptyBodyExpressionContext() *BodyExpressionContext {
|
|
|
|
var p = new(BodyExpressionContext)
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
|
|
|
p.RuleIndex = FqlParserRULE_bodyExpression
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*BodyExpressionContext) IsBodyExpressionContext() {}
|
|
|
|
|
|
|
|
func NewBodyExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *BodyExpressionContext {
|
|
|
|
var p = new(BodyExpressionContext)
|
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
|
|
|
p.RuleIndex = FqlParserRULE_bodyExpression
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *BodyExpressionContext) GetParser() antlr.Parser { return s.parser }
|
|
|
|
|
|
|
|
func (s *BodyExpressionContext) ReturnExpression() IReturnExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IReturnExpressionContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IReturnExpressionContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *BodyExpressionContext) ForExpression() IForExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IForExpressionContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IForExpressionContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *BodyExpressionContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *BodyExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *BodyExpressionContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterBodyExpression(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *BodyExpressionContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitBodyExpression(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *BodyExpressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitBodyExpression(s)
|
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) BodyExpression() (localctx IBodyExpressionContext) {
|
|
|
|
localctx = NewBodyExpressionContext(p, p.GetParserRuleContext(), p.GetState())
|
2021-07-13 21:34:22 -04:00
|
|
|
p.EnterRule(localctx, 14, FqlParserRULE_bodyExpression)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(164)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
|
|
|
|
switch p.GetTokenStream().LA(1) {
|
|
|
|
case FqlParserReturn:
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(162)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.ReturnExpression()
|
|
|
|
}
|
|
|
|
|
|
|
|
case FqlParserFor:
|
|
|
|
p.EnterOuterAlt(localctx, 2)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(163)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.ForExpression()
|
|
|
|
}
|
|
|
|
|
|
|
|
default:
|
|
|
|
panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IVariableDeclarationContext is an interface to support dynamic dispatch.
|
|
|
|
type IVariableDeclarationContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IsVariableDeclarationContext differentiates from other interfaces.
|
|
|
|
IsVariableDeclarationContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type VariableDeclarationContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyVariableDeclarationContext() *VariableDeclarationContext {
|
|
|
|
var p = new(VariableDeclarationContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_variableDeclaration
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*VariableDeclarationContext) IsVariableDeclarationContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewVariableDeclarationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *VariableDeclarationContext {
|
|
|
|
var p = new(VariableDeclarationContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_variableDeclaration
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *VariableDeclarationContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *VariableDeclarationContext) Let() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserLet, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *VariableDeclarationContext) Identifier() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserIdentifier, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *VariableDeclarationContext) Assign() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserAssign, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *VariableDeclarationContext) OpenParen() antlr.TerminalNode {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s.GetToken(FqlParserOpenParen, 0)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *VariableDeclarationContext) CloseParen() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserCloseParen, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *VariableDeclarationContext) ForExpression() IForExpressionContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IForExpressionContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IForExpressionContext)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *VariableDeclarationContext) WaitForExpression() IWaitForExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IWaitForExpressionContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IWaitForExpressionContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *VariableDeclarationContext) Expression() IExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), 0)
|
2018-09-27 19:05:56 -04:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IExpressionContext)
|
2018-09-27 19:05:56 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *VariableDeclarationContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *VariableDeclarationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *VariableDeclarationContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.EnterVariableDeclaration(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *VariableDeclarationContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.ExitVariableDeclaration(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *VariableDeclarationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.VisitVariableDeclaration(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (p *FqlParser) VariableDeclaration() (localctx IVariableDeclarationContext) {
|
|
|
|
localctx = NewVariableDeclarationContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 16, FqlParserRULE_variableDeclaration)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(180)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2021-07-13 21:34:22 -04:00
|
|
|
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 5, p.GetParserRuleContext()) {
|
2018-09-18 16:42:38 -04:00
|
|
|
case 1:
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(166)
|
|
|
|
p.Match(FqlParserLet)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
{
|
|
|
|
p.SetState(167)
|
|
|
|
p.Match(FqlParserIdentifier)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(168)
|
|
|
|
p.Match(FqlParserAssign)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(169)
|
|
|
|
p.Match(FqlParserOpenParen)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(172)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
switch p.GetTokenStream().LA(1) {
|
|
|
|
case FqlParserFor:
|
2018-09-18 16:42:38 -04:00
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(170)
|
|
|
|
p.ForExpression()
|
|
|
|
}
|
|
|
|
|
|
|
|
case FqlParserWaitfor:
|
|
|
|
{
|
|
|
|
p.SetState(171)
|
|
|
|
p.WaitForExpression()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
default:
|
|
|
|
panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(174)
|
|
|
|
p.Match(FqlParserCloseParen)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
|
|
|
|
case 2:
|
|
|
|
p.EnterOuterAlt(localctx, 2)
|
|
|
|
{
|
|
|
|
p.SetState(176)
|
|
|
|
p.Match(FqlParserLet)
|
|
|
|
}
|
|
|
|
{
|
|
|
|
p.SetState(177)
|
|
|
|
p.Match(FqlParserIdentifier)
|
|
|
|
}
|
|
|
|
{
|
|
|
|
p.SetState(178)
|
|
|
|
p.Match(FqlParserAssign)
|
|
|
|
}
|
|
|
|
{
|
|
|
|
p.SetState(179)
|
|
|
|
p.expression(0)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
|
|
|
// IReturnExpressionContext is an interface to support dynamic dispatch.
|
|
|
|
type IReturnExpressionContext interface {
|
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
|
|
|
// IsReturnExpressionContext differentiates from other interfaces.
|
|
|
|
IsReturnExpressionContext()
|
|
|
|
}
|
|
|
|
|
|
|
|
type ReturnExpressionContext struct {
|
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewEmptyReturnExpressionContext() *ReturnExpressionContext {
|
|
|
|
var p = new(ReturnExpressionContext)
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
|
|
|
p.RuleIndex = FqlParserRULE_returnExpression
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*ReturnExpressionContext) IsReturnExpressionContext() {}
|
|
|
|
|
|
|
|
func NewReturnExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ReturnExpressionContext {
|
|
|
|
var p = new(ReturnExpressionContext)
|
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
|
|
|
p.RuleIndex = FqlParserRULE_returnExpression
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ReturnExpressionContext) GetParser() antlr.Parser { return s.parser }
|
|
|
|
|
|
|
|
func (s *ReturnExpressionContext) Return() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserReturn, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ReturnExpressionContext) OpenParen() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserOpenParen, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ReturnExpressionContext) CloseParen() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserCloseParen, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ReturnExpressionContext) ForExpression() IForExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IForExpressionContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IForExpressionContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ReturnExpressionContext) WaitForExpression() IWaitForExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IWaitForExpressionContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IWaitForExpressionContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ReturnExpressionContext) Distinct() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserDistinct, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ReturnExpressionContext) Expression() IExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IExpressionContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ReturnExpressionContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ReturnExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ReturnExpressionContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterReturnExpression(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ReturnExpressionContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitReturnExpression(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ReturnExpressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitReturnExpression(s)
|
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) ReturnExpression() (localctx IReturnExpressionContext) {
|
|
|
|
localctx = NewReturnExpressionContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 18, FqlParserRULE_returnExpression)
|
|
|
|
var _la int
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.SetState(198)
|
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 9, p.GetParserRuleContext()) {
|
|
|
|
case 1:
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
|
|
|
p.SetState(182)
|
|
|
|
p.Match(FqlParserReturn)
|
|
|
|
}
|
|
|
|
p.SetState(184)
|
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_la = p.GetTokenStream().LA(1)
|
|
|
|
|
|
|
|
if _la == FqlParserDistinct {
|
|
|
|
{
|
|
|
|
p.SetState(183)
|
|
|
|
p.Match(FqlParserDistinct)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
{
|
|
|
|
p.SetState(186)
|
|
|
|
p.Match(FqlParserOpenParen)
|
|
|
|
}
|
|
|
|
p.SetState(189)
|
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
|
|
|
|
switch p.GetTokenStream().LA(1) {
|
|
|
|
case FqlParserFor:
|
|
|
|
{
|
|
|
|
p.SetState(187)
|
|
|
|
p.ForExpression()
|
|
|
|
}
|
|
|
|
|
|
|
|
case FqlParserWaitfor:
|
|
|
|
{
|
|
|
|
p.SetState(188)
|
|
|
|
p.WaitForExpression()
|
|
|
|
}
|
|
|
|
|
|
|
|
default:
|
|
|
|
panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(191)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.Match(FqlParserCloseParen)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 2:
|
|
|
|
p.EnterOuterAlt(localctx, 2)
|
2018-09-27 19:05:56 -04:00
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(193)
|
2018-09-27 19:05:56 -04:00
|
|
|
p.Match(FqlParserReturn)
|
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(195)
|
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
|
|
|
|
if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 8, p.GetParserRuleContext()) == 1 {
|
|
|
|
{
|
|
|
|
p.SetState(194)
|
|
|
|
p.Match(FqlParserDistinct)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2018-09-27 19:05:56 -04:00
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(197)
|
|
|
|
p.expression(0)
|
2018-09-27 19:05:56 -04:00
|
|
|
}
|
|
|
|
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
|
|
|
// IForExpressionContext is an interface to support dynamic dispatch.
|
|
|
|
type IForExpressionContext interface {
|
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
|
|
|
// IsForExpressionContext differentiates from other interfaces.
|
|
|
|
IsForExpressionContext()
|
|
|
|
}
|
|
|
|
|
|
|
|
type ForExpressionContext struct {
|
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewEmptyForExpressionContext() *ForExpressionContext {
|
|
|
|
var p = new(ForExpressionContext)
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
|
|
|
p.RuleIndex = FqlParserRULE_forExpression
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*ForExpressionContext) IsForExpressionContext() {}
|
|
|
|
|
|
|
|
func NewForExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ForExpressionContext {
|
|
|
|
var p = new(ForExpressionContext)
|
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
|
|
|
p.RuleIndex = FqlParserRULE_forExpression
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionContext) GetParser() antlr.Parser { return s.parser }
|
|
|
|
|
|
|
|
func (s *ForExpressionContext) For() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserFor, 0)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ForExpressionContext) AllIdentifier() []antlr.TerminalNode {
|
|
|
|
return s.GetTokens(FqlParserIdentifier)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ForExpressionContext) Identifier(i int) antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserIdentifier, i)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionContext) In() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserIn, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionContext) ForExpressionSource() IForExpressionSourceContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IForExpressionSourceContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IForExpressionSourceContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionContext) ForExpressionReturn() IForExpressionReturnContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IForExpressionReturnContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IForExpressionReturnContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionContext) Comma() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserComma, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionContext) AllForExpressionBody() []IForExpressionBodyContext {
|
|
|
|
var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IForExpressionBodyContext)(nil)).Elem())
|
|
|
|
var tst = make([]IForExpressionBodyContext, len(ts))
|
|
|
|
|
|
|
|
for i, t := range ts {
|
|
|
|
if t != nil {
|
|
|
|
tst[i] = t.(IForExpressionBodyContext)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return tst
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionContext) ForExpressionBody(i int) IForExpressionBodyContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IForExpressionBodyContext)(nil)).Elem(), i)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IForExpressionBodyContext)
|
|
|
|
}
|
|
|
|
|
2020-11-10 19:16:22 -05:00
|
|
|
func (s *ForExpressionContext) While() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserWhile, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionContext) Expression() IExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IExpressionContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionContext) Do() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserDo, 0)
|
|
|
|
}
|
|
|
|
|
2018-09-18 16:42:38 -04:00
|
|
|
func (s *ForExpressionContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterForExpression(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitForExpression(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitForExpression(s)
|
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) ForExpression() (localctx IForExpressionContext) {
|
|
|
|
localctx = NewForExpressionContext(p, p.GetParserRuleContext(), p.GetState())
|
2021-07-13 21:34:22 -04:00
|
|
|
p.EnterRule(localctx, 20, FqlParserRULE_forExpression)
|
2018-09-18 16:42:38 -04:00
|
|
|
var _la int
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2020-04-28 17:30:47 -04:00
|
|
|
var _alt int
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(231)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2021-07-13 21:34:22 -04:00
|
|
|
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 14, p.GetParserRuleContext()) {
|
2020-11-10 19:16:22 -05:00
|
|
|
case 1:
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(200)
|
2020-11-10 19:16:22 -05:00
|
|
|
p.Match(FqlParserFor)
|
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(201)
|
|
|
|
p.Match(FqlParserIdentifier)
|
2020-11-10 19:16:22 -05:00
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(204)
|
2020-11-10 19:16:22 -05:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_la = p.GetTokenStream().LA(1)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2020-11-10 19:16:22 -05:00
|
|
|
if _la == FqlParserComma {
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(202)
|
2020-11-10 19:16:22 -05:00
|
|
|
p.Match(FqlParserComma)
|
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(203)
|
|
|
|
p.Match(FqlParserIdentifier)
|
2020-11-10 19:16:22 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(206)
|
2020-11-10 19:16:22 -05:00
|
|
|
p.Match(FqlParserIn)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(207)
|
2020-11-10 19:16:22 -05:00
|
|
|
p.ForExpressionSource()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(211)
|
2020-11-10 19:16:22 -05:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2021-07-13 21:34:22 -04:00
|
|
|
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 11, p.GetParserRuleContext())
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2020-11-10 19:16:22 -05:00
|
|
|
for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
|
|
|
|
if _alt == 1 {
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(208)
|
2020-11-10 19:16:22 -05:00
|
|
|
p.ForExpressionBody()
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2020-11-10 19:16:22 -05:00
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(213)
|
2020-11-10 19:16:22 -05:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2021-07-13 21:34:22 -04:00
|
|
|
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 11, p.GetParserRuleContext())
|
2020-11-10 19:16:22 -05:00
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(214)
|
2020-11-10 19:16:22 -05:00
|
|
|
p.ForExpressionReturn()
|
|
|
|
}
|
|
|
|
|
|
|
|
case 2:
|
|
|
|
p.EnterOuterAlt(localctx, 2)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(216)
|
2020-11-10 19:16:22 -05:00
|
|
|
p.Match(FqlParserFor)
|
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(217)
|
|
|
|
p.Match(FqlParserIdentifier)
|
2020-11-10 19:16:22 -05:00
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(219)
|
2020-11-10 19:16:22 -05:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_la = p.GetTokenStream().LA(1)
|
|
|
|
|
|
|
|
if _la == FqlParserDo {
|
2020-04-28 17:30:47 -04:00
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(218)
|
2020-11-10 19:16:22 -05:00
|
|
|
p.Match(FqlParserDo)
|
2020-04-28 17:30:47 -04:00
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2020-04-28 17:30:47 -04:00
|
|
|
}
|
2020-11-10 19:16:22 -05:00
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(221)
|
2020-11-10 19:16:22 -05:00
|
|
|
p.Match(FqlParserWhile)
|
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(222)
|
2020-11-10 19:16:22 -05:00
|
|
|
p.expression(0)
|
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(226)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2021-07-13 21:34:22 -04:00
|
|
|
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 13, p.GetParserRuleContext())
|
2020-11-10 19:16:22 -05:00
|
|
|
|
|
|
|
for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
|
|
|
|
if _alt == 1 {
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(223)
|
2020-11-10 19:16:22 -05:00
|
|
|
p.ForExpressionBody()
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(228)
|
2020-11-10 19:16:22 -05:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2021-07-13 21:34:22 -04:00
|
|
|
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 13, p.GetParserRuleContext())
|
2020-11-10 19:16:22 -05:00
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(229)
|
2020-11-10 19:16:22 -05:00
|
|
|
p.ForExpressionReturn()
|
|
|
|
}
|
|
|
|
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IForExpressionSourceContext is an interface to support dynamic dispatch.
|
|
|
|
type IForExpressionSourceContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IsForExpressionSourceContext differentiates from other interfaces.
|
|
|
|
IsForExpressionSourceContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type ForExpressionSourceContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyForExpressionSourceContext() *ForExpressionSourceContext {
|
|
|
|
var p = new(ForExpressionSourceContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_forExpressionSource
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*ForExpressionSourceContext) IsForExpressionSourceContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewForExpressionSourceContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ForExpressionSourceContext {
|
|
|
|
var p = new(ForExpressionSourceContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_forExpressionSource
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ForExpressionSourceContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ForExpressionSourceContext) FunctionCallExpression() IFunctionCallExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IFunctionCallExpressionContext)(nil)).Elem(), 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IFunctionCallExpressionContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionSourceContext) ArrayLiteral() IArrayLiteralContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IArrayLiteralContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IArrayLiteralContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionSourceContext) ObjectLiteral() IObjectLiteralContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IObjectLiteralContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IObjectLiteralContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionSourceContext) Variable() IVariableContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IVariableContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IVariableContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionSourceContext) MemberExpression() IMemberExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IMemberExpressionContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IMemberExpressionContext)
|
|
|
|
}
|
|
|
|
|
2018-09-22 19:18:10 -04:00
|
|
|
func (s *ForExpressionSourceContext) RangeOperator() IRangeOperatorContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IRangeOperatorContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IRangeOperatorContext)
|
|
|
|
}
|
|
|
|
|
2018-09-28 21:04:16 -04:00
|
|
|
func (s *ForExpressionSourceContext) Param() IParamContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IParamContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IParamContext)
|
|
|
|
}
|
|
|
|
|
2018-09-18 16:42:38 -04:00
|
|
|
func (s *ForExpressionSourceContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionSourceContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionSourceContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterForExpressionSource(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionSourceContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitForExpressionSource(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionSourceContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitForExpressionSource(s)
|
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) ForExpressionSource() (localctx IForExpressionSourceContext) {
|
|
|
|
localctx = NewForExpressionSourceContext(p, p.GetParserRuleContext(), p.GetState())
|
2020-04-22 17:44:10 +03:00
|
|
|
p.EnterRule(localctx, 22, FqlParserRULE_forExpressionSource)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(240)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2021-07-13 21:34:22 -04:00
|
|
|
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 15, p.GetParserRuleContext()) {
|
2018-09-18 16:42:38 -04:00
|
|
|
case 1:
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(233)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.FunctionCallExpression()
|
|
|
|
}
|
|
|
|
|
|
|
|
case 2:
|
|
|
|
p.EnterOuterAlt(localctx, 2)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(234)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.ArrayLiteral()
|
|
|
|
}
|
|
|
|
|
|
|
|
case 3:
|
|
|
|
p.EnterOuterAlt(localctx, 3)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(235)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.ObjectLiteral()
|
|
|
|
}
|
|
|
|
|
|
|
|
case 4:
|
|
|
|
p.EnterOuterAlt(localctx, 4)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(236)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.Variable()
|
|
|
|
}
|
|
|
|
|
|
|
|
case 5:
|
|
|
|
p.EnterOuterAlt(localctx, 5)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(237)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.MemberExpression()
|
|
|
|
}
|
|
|
|
|
2018-09-22 19:18:10 -04:00
|
|
|
case 6:
|
|
|
|
p.EnterOuterAlt(localctx, 6)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(238)
|
2018-09-22 19:18:10 -04:00
|
|
|
p.RangeOperator()
|
|
|
|
}
|
|
|
|
|
2018-09-28 21:04:16 -04:00
|
|
|
case 7:
|
|
|
|
p.EnterOuterAlt(localctx, 7)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(239)
|
2018-09-28 21:04:16 -04:00
|
|
|
p.Param()
|
|
|
|
}
|
|
|
|
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
|
|
|
// IForExpressionClauseContext is an interface to support dynamic dispatch.
|
|
|
|
type IForExpressionClauseContext interface {
|
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
|
|
|
// IsForExpressionClauseContext differentiates from other interfaces.
|
|
|
|
IsForExpressionClauseContext()
|
|
|
|
}
|
|
|
|
|
|
|
|
type ForExpressionClauseContext struct {
|
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewEmptyForExpressionClauseContext() *ForExpressionClauseContext {
|
|
|
|
var p = new(ForExpressionClauseContext)
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
|
|
|
p.RuleIndex = FqlParserRULE_forExpressionClause
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*ForExpressionClauseContext) IsForExpressionClauseContext() {}
|
|
|
|
|
|
|
|
func NewForExpressionClauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ForExpressionClauseContext {
|
|
|
|
var p = new(ForExpressionClauseContext)
|
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
|
|
|
p.RuleIndex = FqlParserRULE_forExpressionClause
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionClauseContext) GetParser() antlr.Parser { return s.parser }
|
|
|
|
|
|
|
|
func (s *ForExpressionClauseContext) LimitClause() ILimitClauseContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*ILimitClauseContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(ILimitClauseContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionClauseContext) SortClause() ISortClauseContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*ISortClauseContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(ISortClauseContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionClauseContext) FilterClause() IFilterClauseContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IFilterClauseContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IFilterClauseContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionClauseContext) CollectClause() ICollectClauseContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*ICollectClauseContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(ICollectClauseContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionClauseContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionClauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionClauseContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterForExpressionClause(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionClauseContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitForExpressionClause(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ForExpressionClauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitForExpressionClause(s)
|
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) ForExpressionClause() (localctx IForExpressionClauseContext) {
|
|
|
|
localctx = NewForExpressionClauseContext(p, p.GetParserRuleContext(), p.GetState())
|
2020-04-22 17:44:10 +03:00
|
|
|
p.EnterRule(localctx, 24, FqlParserRULE_forExpressionClause)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(246)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
|
|
|
|
switch p.GetTokenStream().LA(1) {
|
|
|
|
case FqlParserLimit:
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(242)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.LimitClause()
|
|
|
|
}
|
|
|
|
|
|
|
|
case FqlParserSort:
|
|
|
|
p.EnterOuterAlt(localctx, 2)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(243)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.SortClause()
|
|
|
|
}
|
|
|
|
|
|
|
|
case FqlParserFilter:
|
|
|
|
p.EnterOuterAlt(localctx, 3)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(244)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.FilterClause()
|
|
|
|
}
|
|
|
|
|
|
|
|
case FqlParserCollect:
|
|
|
|
p.EnterOuterAlt(localctx, 4)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(245)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.CollectClause()
|
|
|
|
}
|
|
|
|
|
|
|
|
default:
|
|
|
|
panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// IForExpressionStatementContext is an interface to support dynamic dispatch.
|
|
|
|
type IForExpressionStatementContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// IsForExpressionStatementContext differentiates from other interfaces.
|
|
|
|
IsForExpressionStatementContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
type ForExpressionStatementContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewEmptyForExpressionStatementContext() *ForExpressionStatementContext {
|
|
|
|
var p = new(ForExpressionStatementContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_forExpressionStatement
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (*ForExpressionStatementContext) IsForExpressionStatementContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewForExpressionStatementContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ForExpressionStatementContext {
|
|
|
|
var p = new(ForExpressionStatementContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_forExpressionStatement
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *ForExpressionStatementContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *ForExpressionStatementContext) VariableDeclaration() IVariableDeclarationContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IVariableDeclarationContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IVariableDeclarationContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *ForExpressionStatementContext) FunctionCallExpression() IFunctionCallExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IFunctionCallExpressionContext)(nil)).Elem(), 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
return t.(IFunctionCallExpressionContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *ForExpressionStatementContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *ForExpressionStatementContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *ForExpressionStatementContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.EnterForExpressionStatement(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *ForExpressionStatementContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.ExitForExpressionStatement(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *ForExpressionStatementContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2018-10-28 01:45:26 -04:00
|
|
|
return t.VisitForExpressionStatement(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (p *FqlParser) ForExpressionStatement() (localctx IForExpressionStatementContext) {
|
|
|
|
localctx = NewForExpressionStatementContext(p, p.GetParserRuleContext(), p.GetState())
|
2020-04-22 17:44:10 +03:00
|
|
|
p.EnterRule(localctx, 26, FqlParserRULE_forExpressionStatement)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(250)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2021-07-13 21:34:22 -04:00
|
|
|
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 17, p.GetParserRuleContext()) {
|
2020-04-28 17:30:47 -04:00
|
|
|
case 1:
|
2018-10-28 01:45:26 -04:00
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(248)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.VariableDeclaration()
|
|
|
|
}
|
|
|
|
|
2020-04-28 17:30:47 -04:00
|
|
|
case 2:
|
2018-10-28 01:45:26 -04:00
|
|
|
p.EnterOuterAlt(localctx, 2)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(249)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.FunctionCallExpression()
|
|
|
|
}
|
|
|
|
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// IForExpressionBodyContext is an interface to support dynamic dispatch.
|
|
|
|
type IForExpressionBodyContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// IsForExpressionBodyContext differentiates from other interfaces.
|
|
|
|
IsForExpressionBodyContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
type ForExpressionBodyContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewEmptyForExpressionBodyContext() *ForExpressionBodyContext {
|
|
|
|
var p = new(ForExpressionBodyContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_forExpressionBody
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (*ForExpressionBodyContext) IsForExpressionBodyContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewForExpressionBodyContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ForExpressionBodyContext {
|
|
|
|
var p = new(ForExpressionBodyContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_forExpressionBody
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *ForExpressionBodyContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *ForExpressionBodyContext) ForExpressionStatement() IForExpressionStatementContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IForExpressionStatementContext)(nil)).Elem(), 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
return t.(IForExpressionStatementContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *ForExpressionBodyContext) ForExpressionClause() IForExpressionClauseContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IForExpressionClauseContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IForExpressionClauseContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *ForExpressionBodyContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *ForExpressionBodyContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *ForExpressionBodyContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.EnterForExpressionBody(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *ForExpressionBodyContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.ExitForExpressionBody(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *ForExpressionBodyContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2018-10-28 01:45:26 -04:00
|
|
|
return t.VisitForExpressionBody(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (p *FqlParser) ForExpressionBody() (localctx IForExpressionBodyContext) {
|
|
|
|
localctx = NewForExpressionBodyContext(p, p.GetParserRuleContext(), p.GetState())
|
2020-04-22 17:44:10 +03:00
|
|
|
p.EnterRule(localctx, 28, FqlParserRULE_forExpressionBody)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(254)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2021-07-13 21:34:22 -04:00
|
|
|
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 18, p.GetParserRuleContext()) {
|
2020-04-28 17:30:47 -04:00
|
|
|
case 1:
|
2018-10-28 01:45:26 -04:00
|
|
|
p.EnterOuterAlt(localctx, 1)
|
2018-09-18 16:42:38 -04:00
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(252)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.ForExpressionStatement()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
2018-10-28 01:45:26 -04:00
|
|
|
|
2020-04-28 17:30:47 -04:00
|
|
|
case 2:
|
2018-10-28 01:45:26 -04:00
|
|
|
p.EnterOuterAlt(localctx, 2)
|
2018-09-18 16:42:38 -04:00
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(253)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.ForExpressionClause()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// IForExpressionReturnContext is an interface to support dynamic dispatch.
|
|
|
|
type IForExpressionReturnContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// IsForExpressionReturnContext differentiates from other interfaces.
|
|
|
|
IsForExpressionReturnContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
type ForExpressionReturnContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewEmptyForExpressionReturnContext() *ForExpressionReturnContext {
|
|
|
|
var p = new(ForExpressionReturnContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_forExpressionReturn
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (*ForExpressionReturnContext) IsForExpressionReturnContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewForExpressionReturnContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ForExpressionReturnContext {
|
|
|
|
var p = new(ForExpressionReturnContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_forExpressionReturn
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *ForExpressionReturnContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *ForExpressionReturnContext) ReturnExpression() IReturnExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IReturnExpressionContext)(nil)).Elem(), 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
return t.(IReturnExpressionContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *ForExpressionReturnContext) ForExpression() IForExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IForExpressionContext)(nil)).Elem(), 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
return t.(IForExpressionContext)
|
2018-09-22 19:18:10 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *ForExpressionReturnContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *ForExpressionReturnContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *ForExpressionReturnContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.EnterForExpressionReturn(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *ForExpressionReturnContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.ExitForExpressionReturn(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *ForExpressionReturnContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2018-10-28 01:45:26 -04:00
|
|
|
return t.VisitForExpressionReturn(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (p *FqlParser) ForExpressionReturn() (localctx IForExpressionReturnContext) {
|
|
|
|
localctx = NewForExpressionReturnContext(p, p.GetParserRuleContext(), p.GetState())
|
2020-04-22 17:44:10 +03:00
|
|
|
p.EnterRule(localctx, 30, FqlParserRULE_forExpressionReturn)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(258)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
switch p.GetTokenStream().LA(1) {
|
|
|
|
case FqlParserReturn:
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
2018-09-18 16:42:38 -04:00
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(256)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.ReturnExpression()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
2018-10-28 01:45:26 -04:00
|
|
|
|
|
|
|
case FqlParserFor:
|
|
|
|
p.EnterOuterAlt(localctx, 2)
|
2018-09-18 16:42:38 -04:00
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(257)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.ForExpression()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
default:
|
|
|
|
panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// IFilterClauseContext is an interface to support dynamic dispatch.
|
|
|
|
type IFilterClauseContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// IsFilterClauseContext differentiates from other interfaces.
|
|
|
|
IsFilterClauseContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
type FilterClauseContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewEmptyFilterClauseContext() *FilterClauseContext {
|
|
|
|
var p = new(FilterClauseContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_filterClause
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (*FilterClauseContext) IsFilterClauseContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewFilterClauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FilterClauseContext {
|
|
|
|
var p = new(FilterClauseContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_filterClause
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *FilterClauseContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *FilterClauseContext) Filter() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserFilter, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *FilterClauseContext) Expression() IExpressionContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IExpressionContext)
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *FilterClauseContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *FilterClauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *FilterClauseContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.EnterFilterClause(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *FilterClauseContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.ExitFilterClause(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *FilterClauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2018-10-28 01:45:26 -04:00
|
|
|
return t.VisitFilterClause(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (p *FqlParser) FilterClause() (localctx IFilterClauseContext) {
|
|
|
|
localctx = NewFilterClauseContext(p, p.GetParserRuleContext(), p.GetState())
|
2020-04-22 17:44:10 +03:00
|
|
|
p.EnterRule(localctx, 32, FqlParserRULE_filterClause)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(260)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserFilter)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
2018-10-28 01:45:26 -04:00
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(261)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.expression(0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// ILimitClauseContext is an interface to support dynamic dispatch.
|
|
|
|
type ILimitClauseContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// IsLimitClauseContext differentiates from other interfaces.
|
|
|
|
IsLimitClauseContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
type LimitClauseContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewEmptyLimitClauseContext() *LimitClauseContext {
|
|
|
|
var p = new(LimitClauseContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_limitClause
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (*LimitClauseContext) IsLimitClauseContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewLimitClauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *LimitClauseContext {
|
|
|
|
var p = new(LimitClauseContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_limitClause
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *LimitClauseContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *LimitClauseContext) Limit() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserLimit, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-11-12 19:58:12 -05:00
|
|
|
func (s *LimitClauseContext) AllLimitClauseValue() []ILimitClauseValueContext {
|
|
|
|
var ts = s.GetTypedRuleContexts(reflect.TypeOf((*ILimitClauseValueContext)(nil)).Elem())
|
|
|
|
var tst = make([]ILimitClauseValueContext, len(ts))
|
|
|
|
|
|
|
|
for i, t := range ts {
|
|
|
|
if t != nil {
|
|
|
|
tst[i] = t.(ILimitClauseValueContext)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return tst
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-11-12 19:58:12 -05:00
|
|
|
func (s *LimitClauseContext) LimitClauseValue(i int) ILimitClauseValueContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*ILimitClauseValueContext)(nil)).Elem(), i)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(ILimitClauseValueContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *LimitClauseContext) Comma() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserComma, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *LimitClauseContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *LimitClauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *LimitClauseContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.EnterLimitClause(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *LimitClauseContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.ExitLimitClause(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *LimitClauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2018-10-28 01:45:26 -04:00
|
|
|
return t.VisitLimitClause(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (p *FqlParser) LimitClause() (localctx ILimitClauseContext) {
|
|
|
|
localctx = NewLimitClauseContext(p, p.GetParserRuleContext(), p.GetState())
|
2020-04-22 17:44:10 +03:00
|
|
|
p.EnterRule(localctx, 34, FqlParserRULE_limitClause)
|
2018-10-28 01:45:26 -04:00
|
|
|
var _la int
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(263)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserLimit)
|
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(264)
|
2018-11-12 19:58:12 -05:00
|
|
|
p.LimitClauseValue()
|
2018-10-28 01:45:26 -04:00
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(267)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2018-10-28 01:45:26 -04:00
|
|
|
_la = p.GetTokenStream().LA(1)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
if _la == FqlParserComma {
|
2018-09-18 16:42:38 -04:00
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(265)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserComma)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(266)
|
2018-11-12 19:58:12 -05:00
|
|
|
p.LimitClauseValue()
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
|
|
|
// ILimitClauseValueContext is an interface to support dynamic dispatch.
|
|
|
|
type ILimitClauseValueContext interface {
|
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
|
|
|
// IsLimitClauseValueContext differentiates from other interfaces.
|
|
|
|
IsLimitClauseValueContext()
|
|
|
|
}
|
|
|
|
|
|
|
|
type LimitClauseValueContext struct {
|
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewEmptyLimitClauseValueContext() *LimitClauseValueContext {
|
|
|
|
var p = new(LimitClauseValueContext)
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
|
|
|
p.RuleIndex = FqlParserRULE_limitClauseValue
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*LimitClauseValueContext) IsLimitClauseValueContext() {}
|
|
|
|
|
|
|
|
func NewLimitClauseValueContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *LimitClauseValueContext {
|
|
|
|
var p = new(LimitClauseValueContext)
|
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
|
|
|
p.RuleIndex = FqlParserRULE_limitClauseValue
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *LimitClauseValueContext) GetParser() antlr.Parser { return s.parser }
|
|
|
|
|
|
|
|
func (s *LimitClauseValueContext) IntegerLiteral() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserIntegerLiteral, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *LimitClauseValueContext) Param() IParamContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IParamContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IParamContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *LimitClauseValueContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *LimitClauseValueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *LimitClauseValueContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterLimitClauseValue(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *LimitClauseValueContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitLimitClauseValue(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *LimitClauseValueContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitLimitClauseValue(s)
|
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) LimitClauseValue() (localctx ILimitClauseValueContext) {
|
|
|
|
localctx = NewLimitClauseValueContext(p, p.GetParserRuleContext(), p.GetState())
|
2020-04-22 17:44:10 +03:00
|
|
|
p.EnterRule(localctx, 36, FqlParserRULE_limitClauseValue)
|
2018-11-12 19:58:12 -05:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(271)
|
2018-11-12 19:58:12 -05:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
|
|
|
|
switch p.GetTokenStream().LA(1) {
|
|
|
|
case FqlParserIntegerLiteral:
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(269)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserIntegerLiteral)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-11-12 19:58:12 -05:00
|
|
|
case FqlParserParam:
|
|
|
|
p.EnterOuterAlt(localctx, 2)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(270)
|
2018-11-12 19:58:12 -05:00
|
|
|
p.Param()
|
|
|
|
}
|
|
|
|
|
|
|
|
default:
|
|
|
|
panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
|
2018-10-28 01:45:26 -04:00
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// ISortClauseContext is an interface to support dynamic dispatch.
|
|
|
|
type ISortClauseContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// IsSortClauseContext differentiates from other interfaces.
|
|
|
|
IsSortClauseContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
type SortClauseContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewEmptySortClauseContext() *SortClauseContext {
|
|
|
|
var p = new(SortClauseContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_sortClause
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (*SortClauseContext) IsSortClauseContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewSortClauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SortClauseContext {
|
|
|
|
var p = new(SortClauseContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_sortClause
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *SortClauseContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *SortClauseContext) Sort() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserSort, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *SortClauseContext) AllSortClauseExpression() []ISortClauseExpressionContext {
|
|
|
|
var ts = s.GetTypedRuleContexts(reflect.TypeOf((*ISortClauseExpressionContext)(nil)).Elem())
|
|
|
|
var tst = make([]ISortClauseExpressionContext, len(ts))
|
|
|
|
|
|
|
|
for i, t := range ts {
|
|
|
|
if t != nil {
|
|
|
|
tst[i] = t.(ISortClauseExpressionContext)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return tst
|
2018-10-24 21:30:05 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *SortClauseContext) SortClauseExpression(i int) ISortClauseExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*ISortClauseExpressionContext)(nil)).Elem(), i)
|
2018-10-24 21:30:05 -04:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
return t.(ISortClauseExpressionContext)
|
2018-10-24 21:30:05 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *SortClauseContext) AllComma() []antlr.TerminalNode {
|
|
|
|
return s.GetTokens(FqlParserComma)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *SortClauseContext) Comma(i int) antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserComma, i)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *SortClauseContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *SortClauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *SortClauseContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.EnterSortClause(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *SortClauseContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.ExitSortClause(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *SortClauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2018-10-28 01:45:26 -04:00
|
|
|
return t.VisitSortClause(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (p *FqlParser) SortClause() (localctx ISortClauseContext) {
|
|
|
|
localctx = NewSortClauseContext(p, p.GetParserRuleContext(), p.GetState())
|
2020-04-22 17:44:10 +03:00
|
|
|
p.EnterRule(localctx, 38, FqlParserRULE_sortClause)
|
2018-10-28 01:45:26 -04:00
|
|
|
var _la int
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(273)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserSort)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
2018-10-24 21:30:05 -04:00
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(274)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.SortClauseExpression()
|
2018-10-24 21:30:05 -04:00
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(279)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_la = p.GetTokenStream().LA(1)
|
|
|
|
|
|
|
|
for _la == FqlParserComma {
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(275)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserComma)
|
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(276)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.SortClauseExpression()
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(281)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_la = p.GetTokenStream().LA(1)
|
2018-10-24 21:30:05 -04:00
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// ISortClauseExpressionContext is an interface to support dynamic dispatch.
|
|
|
|
type ISortClauseExpressionContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// IsSortClauseExpressionContext differentiates from other interfaces.
|
|
|
|
IsSortClauseExpressionContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
type SortClauseExpressionContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewEmptySortClauseExpressionContext() *SortClauseExpressionContext {
|
|
|
|
var p = new(SortClauseExpressionContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_sortClauseExpression
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (*SortClauseExpressionContext) IsSortClauseExpressionContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewSortClauseExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SortClauseExpressionContext {
|
|
|
|
var p = new(SortClauseExpressionContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_sortClauseExpression
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *SortClauseExpressionContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *SortClauseExpressionContext) Expression() IExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), 0)
|
2018-10-24 21:30:05 -04:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
return t.(IExpressionContext)
|
2018-10-24 21:30:05 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *SortClauseExpressionContext) SortDirection() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserSortDirection, 0)
|
2018-10-24 21:30:05 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *SortClauseExpressionContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *SortClauseExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *SortClauseExpressionContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.EnterSortClauseExpression(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *SortClauseExpressionContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.ExitSortClauseExpression(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *SortClauseExpressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2018-10-28 01:45:26 -04:00
|
|
|
return t.VisitSortClauseExpression(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (p *FqlParser) SortClauseExpression() (localctx ISortClauseExpressionContext) {
|
|
|
|
localctx = NewSortClauseExpressionContext(p, p.GetParserRuleContext(), p.GetState())
|
2020-04-22 17:44:10 +03:00
|
|
|
p.EnterRule(localctx, 40, FqlParserRULE_sortClauseExpression)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(282)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.expression(0)
|
2018-10-24 21:30:05 -04:00
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(284)
|
2018-10-24 21:30:05 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 23, p.GetParserRuleContext()) == 1 {
|
2018-10-24 21:30:05 -04:00
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(283)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserSortDirection)
|
2018-10-24 21:30:05 -04:00
|
|
|
}
|
|
|
|
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// ICollectClauseContext is an interface to support dynamic dispatch.
|
|
|
|
type ICollectClauseContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// IsCollectClauseContext differentiates from other interfaces.
|
|
|
|
IsCollectClauseContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
type CollectClauseContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewEmptyCollectClauseContext() *CollectClauseContext {
|
|
|
|
var p = new(CollectClauseContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_collectClause
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (*CollectClauseContext) IsCollectClauseContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewCollectClauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CollectClauseContext {
|
|
|
|
var p = new(CollectClauseContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_collectClause
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectClauseContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectClauseContext) Collect() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserCollect, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectClauseContext) CollectCounter() ICollectCounterContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*ICollectCounterContext)(nil)).Elem(), 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
return t.(ICollectCounterContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectClauseContext) CollectAggregator() ICollectAggregatorContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*ICollectAggregatorContext)(nil)).Elem(), 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-24 21:30:05 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
return t.(ICollectAggregatorContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectClauseContext) CollectGrouping() ICollectGroupingContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*ICollectGroupingContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(ICollectGroupingContext)
|
2018-10-24 21:30:05 -04:00
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectClauseContext) CollectGroupVariable() ICollectGroupVariableContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*ICollectGroupVariableContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(ICollectGroupVariableContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectClauseContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectClauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectClauseContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.EnterCollectClause(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectClauseContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.ExitCollectClause(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectClauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2018-10-28 01:45:26 -04:00
|
|
|
return t.VisitCollectClause(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (p *FqlParser) CollectClause() (localctx ICollectClauseContext) {
|
|
|
|
localctx = NewCollectClauseContext(p, p.GetParserRuleContext(), p.GetState())
|
2020-04-22 17:44:10 +03:00
|
|
|
p.EnterRule(localctx, 42, FqlParserRULE_collectClause)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(304)
|
2018-10-24 21:30:05 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2021-07-13 21:34:22 -04:00
|
|
|
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 24, p.GetParserRuleContext()) {
|
2018-10-28 01:45:26 -04:00
|
|
|
case 1:
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(286)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserCollect)
|
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(287)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.CollectCounter()
|
|
|
|
}
|
2018-10-24 21:30:05 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
case 2:
|
|
|
|
p.EnterOuterAlt(localctx, 2)
|
2018-10-24 21:30:05 -04:00
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(288)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserCollect)
|
2018-10-24 21:30:05 -04:00
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(289)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.CollectAggregator()
|
|
|
|
}
|
|
|
|
|
|
|
|
case 3:
|
|
|
|
p.EnterOuterAlt(localctx, 3)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(290)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserCollect)
|
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(291)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.CollectGrouping()
|
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(292)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.CollectAggregator()
|
|
|
|
}
|
|
|
|
|
|
|
|
case 4:
|
|
|
|
p.EnterOuterAlt(localctx, 4)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(294)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserCollect)
|
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(295)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.CollectGrouping()
|
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(296)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.CollectGroupVariable()
|
|
|
|
}
|
|
|
|
|
|
|
|
case 5:
|
|
|
|
p.EnterOuterAlt(localctx, 5)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(298)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserCollect)
|
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(299)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.CollectGrouping()
|
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(300)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.CollectCounter()
|
|
|
|
}
|
|
|
|
|
|
|
|
case 6:
|
|
|
|
p.EnterOuterAlt(localctx, 6)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(302)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserCollect)
|
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(303)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.CollectGrouping()
|
2018-10-24 21:30:05 -04:00
|
|
|
}
|
|
|
|
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// ICollectSelectorContext is an interface to support dynamic dispatch.
|
|
|
|
type ICollectSelectorContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// IsCollectSelectorContext differentiates from other interfaces.
|
|
|
|
IsCollectSelectorContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
type CollectSelectorContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewEmptyCollectSelectorContext() *CollectSelectorContext {
|
|
|
|
var p = new(CollectSelectorContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_collectSelector
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (*CollectSelectorContext) IsCollectSelectorContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewCollectSelectorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CollectSelectorContext {
|
|
|
|
var p = new(CollectSelectorContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_collectSelector
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectSelectorContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectSelectorContext) Identifier() antlr.TerminalNode {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s.GetToken(FqlParserIdentifier, 0)
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectSelectorContext) Assign() antlr.TerminalNode {
|
2018-10-24 21:30:05 -04:00
|
|
|
return s.GetToken(FqlParserAssign, 0)
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectSelectorContext) Expression() IExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), 0)
|
2018-10-24 21:30:05 -04:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
return t.(IExpressionContext)
|
2018-10-24 21:30:05 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectSelectorContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectSelectorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectSelectorContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.EnterCollectSelector(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectSelectorContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.ExitCollectSelector(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectSelectorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2018-10-28 01:45:26 -04:00
|
|
|
return t.VisitCollectSelector(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (p *FqlParser) CollectSelector() (localctx ICollectSelectorContext) {
|
|
|
|
localctx = NewCollectSelectorContext(p, p.GetParserRuleContext(), p.GetState())
|
2020-04-22 17:44:10 +03:00
|
|
|
p.EnterRule(localctx, 44, FqlParserRULE_collectSelector)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(306)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.Match(FqlParserIdentifier)
|
|
|
|
}
|
2018-10-24 21:30:05 -04:00
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(307)
|
2018-10-24 21:30:05 -04:00
|
|
|
p.Match(FqlParserAssign)
|
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(308)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.expression(0)
|
2018-10-24 21:30:05 -04:00
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// ICollectGroupingContext is an interface to support dynamic dispatch.
|
|
|
|
type ICollectGroupingContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// IsCollectGroupingContext differentiates from other interfaces.
|
|
|
|
IsCollectGroupingContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
type CollectGroupingContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewEmptyCollectGroupingContext() *CollectGroupingContext {
|
|
|
|
var p = new(CollectGroupingContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_collectGrouping
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (*CollectGroupingContext) IsCollectGroupingContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewCollectGroupingContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CollectGroupingContext {
|
|
|
|
var p = new(CollectGroupingContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_collectGrouping
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectGroupingContext) GetParser() antlr.Parser { return s.parser }
|
2018-10-24 21:30:05 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectGroupingContext) AllCollectSelector() []ICollectSelectorContext {
|
|
|
|
var ts = s.GetTypedRuleContexts(reflect.TypeOf((*ICollectSelectorContext)(nil)).Elem())
|
|
|
|
var tst = make([]ICollectSelectorContext, len(ts))
|
|
|
|
|
|
|
|
for i, t := range ts {
|
|
|
|
if t != nil {
|
|
|
|
tst[i] = t.(ICollectSelectorContext)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return tst
|
2018-10-24 21:30:05 -04:00
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectGroupingContext) CollectSelector(i int) ICollectSelectorContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*ICollectSelectorContext)(nil)).Elem(), i)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-10-24 21:30:05 -04:00
|
|
|
return t.(ICollectSelectorContext)
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectGroupingContext) AllComma() []antlr.TerminalNode {
|
|
|
|
return s.GetTokens(FqlParserComma)
|
2018-10-24 21:30:05 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectGroupingContext) Comma(i int) antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserComma, i)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectGroupingContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectGroupingContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectGroupingContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.EnterCollectGrouping(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectGroupingContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.ExitCollectGrouping(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectGroupingContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2018-10-28 01:45:26 -04:00
|
|
|
return t.VisitCollectGrouping(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (p *FqlParser) CollectGrouping() (localctx ICollectGroupingContext) {
|
|
|
|
localctx = NewCollectGroupingContext(p, p.GetParserRuleContext(), p.GetState())
|
2020-04-22 17:44:10 +03:00
|
|
|
p.EnterRule(localctx, 46, FqlParserRULE_collectGrouping)
|
2018-10-24 21:30:05 -04:00
|
|
|
var _la int
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(310)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.CollectSelector()
|
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(315)
|
2018-10-24 21:30:05 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2018-10-28 01:45:26 -04:00
|
|
|
_la = p.GetTokenStream().LA(1)
|
|
|
|
|
|
|
|
for _la == FqlParserComma {
|
2018-10-24 21:30:05 -04:00
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(311)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserComma)
|
2018-10-24 21:30:05 -04:00
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(312)
|
2018-10-24 21:30:05 -04:00
|
|
|
p.CollectSelector()
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(317)
|
2018-10-24 21:30:05 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_la = p.GetTokenStream().LA(1)
|
2018-10-28 01:45:26 -04:00
|
|
|
}
|
2018-10-24 21:30:05 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
|
|
|
// ICollectAggregatorContext is an interface to support dynamic dispatch.
|
|
|
|
type ICollectAggregatorContext interface {
|
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
|
|
|
// IsCollectAggregatorContext differentiates from other interfaces.
|
|
|
|
IsCollectAggregatorContext()
|
|
|
|
}
|
|
|
|
|
|
|
|
type CollectAggregatorContext struct {
|
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewEmptyCollectAggregatorContext() *CollectAggregatorContext {
|
|
|
|
var p = new(CollectAggregatorContext)
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
|
|
|
p.RuleIndex = FqlParserRULE_collectAggregator
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*CollectAggregatorContext) IsCollectAggregatorContext() {}
|
|
|
|
|
|
|
|
func NewCollectAggregatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CollectAggregatorContext {
|
|
|
|
var p = new(CollectAggregatorContext)
|
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
|
|
|
p.RuleIndex = FqlParserRULE_collectAggregator
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *CollectAggregatorContext) GetParser() antlr.Parser { return s.parser }
|
|
|
|
|
|
|
|
func (s *CollectAggregatorContext) Aggregate() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserAggregate, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *CollectAggregatorContext) AllCollectAggregateSelector() []ICollectAggregateSelectorContext {
|
|
|
|
var ts = s.GetTypedRuleContexts(reflect.TypeOf((*ICollectAggregateSelectorContext)(nil)).Elem())
|
|
|
|
var tst = make([]ICollectAggregateSelectorContext, len(ts))
|
|
|
|
|
|
|
|
for i, t := range ts {
|
|
|
|
if t != nil {
|
|
|
|
tst[i] = t.(ICollectAggregateSelectorContext)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return tst
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *CollectAggregatorContext) CollectAggregateSelector(i int) ICollectAggregateSelectorContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*ICollectAggregateSelectorContext)(nil)).Elem(), i)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(ICollectAggregateSelectorContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *CollectAggregatorContext) AllComma() []antlr.TerminalNode {
|
|
|
|
return s.GetTokens(FqlParserComma)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *CollectAggregatorContext) Comma(i int) antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserComma, i)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *CollectAggregatorContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *CollectAggregatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *CollectAggregatorContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterCollectAggregator(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *CollectAggregatorContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitCollectAggregator(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *CollectAggregatorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitCollectAggregator(s)
|
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) CollectAggregator() (localctx ICollectAggregatorContext) {
|
|
|
|
localctx = NewCollectAggregatorContext(p, p.GetParserRuleContext(), p.GetState())
|
2020-04-22 17:44:10 +03:00
|
|
|
p.EnterRule(localctx, 48, FqlParserRULE_collectAggregator)
|
2018-10-28 01:45:26 -04:00
|
|
|
var _la int
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
2018-10-24 21:30:05 -04:00
|
|
|
}
|
2018-10-28 01:45:26 -04:00
|
|
|
}
|
|
|
|
}()
|
2018-10-24 21:30:05 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(318)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserAggregate)
|
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(319)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.CollectAggregateSelector()
|
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(324)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_la = p.GetTokenStream().LA(1)
|
|
|
|
|
|
|
|
for _la == FqlParserComma {
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(320)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserComma)
|
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(321)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.CollectAggregateSelector()
|
2018-10-24 21:30:05 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(326)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_la = p.GetTokenStream().LA(1)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// ICollectAggregateSelectorContext is an interface to support dynamic dispatch.
|
|
|
|
type ICollectAggregateSelectorContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// IsCollectAggregateSelectorContext differentiates from other interfaces.
|
|
|
|
IsCollectAggregateSelectorContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
type CollectAggregateSelectorContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewEmptyCollectAggregateSelectorContext() *CollectAggregateSelectorContext {
|
|
|
|
var p = new(CollectAggregateSelectorContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_collectAggregateSelector
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (*CollectAggregateSelectorContext) IsCollectAggregateSelectorContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewCollectAggregateSelectorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CollectAggregateSelectorContext {
|
|
|
|
var p = new(CollectAggregateSelectorContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_collectAggregateSelector
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectAggregateSelectorContext) GetParser() antlr.Parser { return s.parser }
|
2018-10-24 21:30:05 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectAggregateSelectorContext) Identifier() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserIdentifier, 0)
|
2018-10-24 21:30:05 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectAggregateSelectorContext) Assign() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserAssign, 0)
|
2018-10-24 21:30:05 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectAggregateSelectorContext) FunctionCallExpression() IFunctionCallExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IFunctionCallExpressionContext)(nil)).Elem(), 0)
|
2018-10-24 21:30:05 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IFunctionCallExpressionContext)
|
2018-10-24 21:30:05 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectAggregateSelectorContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectAggregateSelectorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectAggregateSelectorContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.EnterCollectAggregateSelector(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectAggregateSelectorContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.ExitCollectAggregateSelector(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectAggregateSelectorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2018-10-28 01:45:26 -04:00
|
|
|
return t.VisitCollectAggregateSelector(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (p *FqlParser) CollectAggregateSelector() (localctx ICollectAggregateSelectorContext) {
|
|
|
|
localctx = NewCollectAggregateSelectorContext(p, p.GetParserRuleContext(), p.GetState())
|
2020-04-22 17:44:10 +03:00
|
|
|
p.EnterRule(localctx, 50, FqlParserRULE_collectAggregateSelector)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
2018-10-24 21:30:05 -04:00
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(327)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserIdentifier)
|
2018-10-24 21:30:05 -04:00
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(328)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserAssign)
|
2018-10-24 21:30:05 -04:00
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(329)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.FunctionCallExpression()
|
2018-10-24 21:30:05 -04:00
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// ICollectGroupVariableContext is an interface to support dynamic dispatch.
|
|
|
|
type ICollectGroupVariableContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// IsCollectGroupVariableContext differentiates from other interfaces.
|
|
|
|
IsCollectGroupVariableContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
type CollectGroupVariableContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewEmptyCollectGroupVariableContext() *CollectGroupVariableContext {
|
|
|
|
var p = new(CollectGroupVariableContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_collectGroupVariable
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (*CollectGroupVariableContext) IsCollectGroupVariableContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewCollectGroupVariableContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CollectGroupVariableContext {
|
|
|
|
var p = new(CollectGroupVariableContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_collectGroupVariable
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectGroupVariableContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectGroupVariableContext) Into() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserInto, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *CollectGroupVariableContext) CollectSelector() ICollectSelectorContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*ICollectSelectorContext)(nil)).Elem(), 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
return t.(ICollectSelectorContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectGroupVariableContext) AllIdentifier() []antlr.TerminalNode {
|
|
|
|
return s.GetTokens(FqlParserIdentifier)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectGroupVariableContext) Identifier(i int) antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserIdentifier, i)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectGroupVariableContext) Keep() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserKeep, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectGroupVariableContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectGroupVariableContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectGroupVariableContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.EnterCollectGroupVariable(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectGroupVariableContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.ExitCollectGroupVariable(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectGroupVariableContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2018-10-28 01:45:26 -04:00
|
|
|
return t.VisitCollectGroupVariable(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (p *FqlParser) CollectGroupVariable() (localctx ICollectGroupVariableContext) {
|
|
|
|
localctx = NewCollectGroupVariableContext(p, p.GetParserRuleContext(), p.GetState())
|
2020-04-22 17:44:10 +03:00
|
|
|
p.EnterRule(localctx, 52, FqlParserRULE_collectGroupVariable)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(339)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2021-07-13 21:34:22 -04:00
|
|
|
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 28, p.GetParserRuleContext()) {
|
2018-10-28 01:45:26 -04:00
|
|
|
case 1:
|
2018-09-18 16:42:38 -04:00
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(331)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserInto)
|
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(332)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.CollectSelector()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
case 2:
|
2018-09-18 16:42:38 -04:00
|
|
|
p.EnterOuterAlt(localctx, 2)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(333)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserInto)
|
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(334)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserIdentifier)
|
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(337)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 27, p.GetParserRuleContext()) == 1 {
|
2018-10-28 01:45:26 -04:00
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(335)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserKeep)
|
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(336)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserIdentifier)
|
|
|
|
}
|
|
|
|
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// ICollectCounterContext is an interface to support dynamic dispatch.
|
|
|
|
type ICollectCounterContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
// IsCollectCounterContext differentiates from other interfaces.
|
|
|
|
IsCollectCounterContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
type CollectCounterContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewEmptyCollectCounterContext() *CollectCounterContext {
|
|
|
|
var p = new(CollectCounterContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_collectCounter
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (*CollectCounterContext) IsCollectCounterContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func NewCollectCounterContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CollectCounterContext {
|
|
|
|
var p = new(CollectCounterContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2018-10-28 01:45:26 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_collectCounter
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectCounterContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectCounterContext) With() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserWith, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectCounterContext) Count() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserCount, 0)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectCounterContext) Into() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserInto, 0)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectCounterContext) Identifier() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserIdentifier, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectCounterContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectCounterContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectCounterContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.EnterCollectCounter(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectCounterContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-10-28 01:45:26 -04:00
|
|
|
listenerT.ExitCollectCounter(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (s *CollectCounterContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2018-10-28 01:45:26 -04:00
|
|
|
return t.VisitCollectCounter(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
func (p *FqlParser) CollectCounter() (localctx ICollectCounterContext) {
|
|
|
|
localctx = NewCollectCounterContext(p, p.GetParserRuleContext(), p.GetState())
|
2020-04-22 17:44:10 +03:00
|
|
|
p.EnterRule(localctx, 54, FqlParserRULE_collectCounter)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2018-10-28 01:45:26 -04:00
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(341)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserWith)
|
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(342)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserCount)
|
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(343)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserInto)
|
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(344)
|
2018-10-28 01:45:26 -04:00
|
|
|
p.Match(FqlParserIdentifier)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IOptionsClauseContext is an interface to support dynamic dispatch.
|
|
|
|
type IOptionsClauseContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IsOptionsClauseContext differentiates from other interfaces.
|
|
|
|
IsOptionsClauseContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type OptionsClauseContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyOptionsClauseContext() *OptionsClauseContext {
|
|
|
|
var p = new(OptionsClauseContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_optionsClause
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*OptionsClauseContext) IsOptionsClauseContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewOptionsClauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *OptionsClauseContext {
|
|
|
|
var p = new(OptionsClauseContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_optionsClause
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *OptionsClauseContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *OptionsClauseContext) Options() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserOptions, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *OptionsClauseContext) ObjectLiteral() IObjectLiteralContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IObjectLiteralContext)(nil)).Elem(), 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IObjectLiteralContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *OptionsClauseContext) Variable() IVariableContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IVariableContext)(nil)).Elem(), 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IVariableContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *OptionsClauseContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *OptionsClauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *OptionsClauseContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.EnterOptionsClause(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *OptionsClauseContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.ExitOptionsClause(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *OptionsClauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.VisitOptionsClause(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (p *FqlParser) OptionsClause() (localctx IOptionsClauseContext) {
|
|
|
|
localctx = NewOptionsClauseContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 56, FqlParserRULE_optionsClause)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(350)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2021-07-13 21:34:22 -04:00
|
|
|
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 29, p.GetParserRuleContext()) {
|
2018-09-18 16:42:38 -04:00
|
|
|
case 1:
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(346)
|
|
|
|
p.Match(FqlParserOptions)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(347)
|
|
|
|
p.ObjectLiteral()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
case 2:
|
|
|
|
p.EnterOuterAlt(localctx, 2)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(348)
|
|
|
|
p.Match(FqlParserOptions)
|
2018-09-27 19:05:56 -04:00
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(349)
|
|
|
|
p.Variable()
|
2018-09-27 19:05:56 -04:00
|
|
|
}
|
|
|
|
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IWaitForExpressionContext is an interface to support dynamic dispatch.
|
|
|
|
type IWaitForExpressionContext interface {
|
2018-09-28 21:04:16 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IsWaitForExpressionContext differentiates from other interfaces.
|
|
|
|
IsWaitForExpressionContext()
|
2018-09-28 21:04:16 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type WaitForExpressionContext struct {
|
2018-09-28 21:04:16 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyWaitForExpressionContext() *WaitForExpressionContext {
|
|
|
|
var p = new(WaitForExpressionContext)
|
2018-09-28 21:04:16 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_waitForExpression
|
2018-09-28 21:04:16 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*WaitForExpressionContext) IsWaitForExpressionContext() {}
|
2018-09-28 21:04:16 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewWaitForExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *WaitForExpressionContext {
|
|
|
|
var p = new(WaitForExpressionContext)
|
2018-09-28 21:04:16 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_waitForExpression
|
2018-09-28 21:04:16 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForExpressionContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-28 21:04:16 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForExpressionContext) Waitfor() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserWaitfor, 0)
|
2018-09-28 21:04:16 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForExpressionContext) Event() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserEvent, 0)
|
2018-09-28 21:04:16 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForExpressionContext) WaitForEventName() IWaitForEventNameContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IWaitForEventNameContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IWaitForEventNameContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *WaitForExpressionContext) In() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserIn, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *WaitForExpressionContext) WaitForEventSource() IWaitForEventSourceContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IWaitForEventSourceContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IWaitForEventSourceContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *WaitForExpressionContext) OptionsClause() IOptionsClauseContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IOptionsClauseContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IOptionsClauseContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *WaitForExpressionContext) WaitForTimeout() IWaitForTimeoutContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IWaitForTimeoutContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IWaitForTimeoutContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *WaitForExpressionContext) GetRuleContext() antlr.RuleContext {
|
2018-09-28 21:04:16 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-28 21:04:16 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForExpressionContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-28 21:04:16 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.EnterWaitForExpression(s)
|
2018-09-28 21:04:16 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForExpressionContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-28 21:04:16 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.ExitWaitForExpression(s)
|
2018-09-28 21:04:16 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForExpressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-28 21:04:16 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.VisitWaitForExpression(s)
|
2018-09-28 21:04:16 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (p *FqlParser) WaitForExpression() (localctx IWaitForExpressionContext) {
|
|
|
|
localctx = NewWaitForExpressionContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 58, FqlParserRULE_waitForExpression)
|
|
|
|
var _la int
|
2018-09-28 21:04:16 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(352)
|
|
|
|
p.Match(FqlParserWaitfor)
|
2018-09-28 21:04:16 -04:00
|
|
|
}
|
|
|
|
{
|
2021-07-13 21:34:22 -04:00
|
|
|
p.SetState(353)
|
|
|
|
p.Match(FqlParserEvent)
|
|
|
|
}
|
|
|
|
{
|
|
|
|
p.SetState(354)
|
|
|
|
p.WaitForEventName()
|
|
|
|
}
|
|
|
|
{
|
|
|
|
p.SetState(355)
|
|
|
|
p.Match(FqlParserIn)
|
|
|
|
}
|
|
|
|
{
|
|
|
|
p.SetState(356)
|
|
|
|
p.WaitForEventSource()
|
|
|
|
}
|
|
|
|
p.SetState(358)
|
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_la = p.GetTokenStream().LA(1)
|
|
|
|
|
|
|
|
if _la == FqlParserOptions {
|
|
|
|
{
|
|
|
|
p.SetState(357)
|
|
|
|
p.OptionsClause()
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
p.SetState(361)
|
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
|
|
|
|
if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 31, p.GetParserRuleContext()) == 1 {
|
|
|
|
{
|
|
|
|
p.SetState(360)
|
|
|
|
p.WaitForTimeout()
|
|
|
|
}
|
|
|
|
|
2018-09-28 21:04:16 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IWaitForTimeoutContext is an interface to support dynamic dispatch.
|
|
|
|
type IWaitForTimeoutContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IsWaitForTimeoutContext differentiates from other interfaces.
|
|
|
|
IsWaitForTimeoutContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type WaitForTimeoutContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyWaitForTimeoutContext() *WaitForTimeoutContext {
|
|
|
|
var p = new(WaitForTimeoutContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_waitForTimeout
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*WaitForTimeoutContext) IsWaitForTimeoutContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewWaitForTimeoutContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *WaitForTimeoutContext {
|
|
|
|
var p = new(WaitForTimeoutContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_waitForTimeout
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForTimeoutContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForTimeoutContext) IntegerLiteral() IIntegerLiteralContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IIntegerLiteralContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IIntegerLiteralContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForTimeoutContext) Variable() IVariableContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IVariableContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IVariableContext)
|
|
|
|
}
|
|
|
|
|
2021-09-02 11:09:48 -04:00
|
|
|
func (s *WaitForTimeoutContext) Param() IParamContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IParamContext)(nil)).Elem(), 0)
|
2021-07-13 21:34:22 -04:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-09-02 11:09:48 -04:00
|
|
|
return t.(IParamContext)
|
2021-07-13 21:34:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *WaitForTimeoutContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForTimeoutContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForTimeoutContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.EnterWaitForTimeout(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForTimeoutContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.ExitWaitForTimeout(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForTimeoutContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.VisitWaitForTimeout(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (p *FqlParser) WaitForTimeout() (localctx IWaitForTimeoutContext) {
|
|
|
|
localctx = NewWaitForTimeoutContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 60, FqlParserRULE_waitForTimeout)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(366)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2021-09-02 11:09:48 -04:00
|
|
|
|
|
|
|
switch p.GetTokenStream().LA(1) {
|
|
|
|
case FqlParserIntegerLiteral:
|
2021-07-13 21:34:22 -04:00
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
|
|
|
p.SetState(363)
|
|
|
|
p.IntegerLiteral()
|
|
|
|
}
|
|
|
|
|
2021-09-02 11:09:48 -04:00
|
|
|
case FqlParserIdentifier:
|
2021-07-13 21:34:22 -04:00
|
|
|
p.EnterOuterAlt(localctx, 2)
|
|
|
|
{
|
|
|
|
p.SetState(364)
|
|
|
|
p.Variable()
|
|
|
|
}
|
|
|
|
|
2021-09-02 11:09:48 -04:00
|
|
|
case FqlParserParam:
|
2021-07-13 21:34:22 -04:00
|
|
|
p.EnterOuterAlt(localctx, 3)
|
|
|
|
{
|
|
|
|
p.SetState(365)
|
2021-09-02 11:09:48 -04:00
|
|
|
p.Param()
|
2021-07-13 21:34:22 -04:00
|
|
|
}
|
|
|
|
|
2021-09-02 11:09:48 -04:00
|
|
|
default:
|
|
|
|
panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IWaitForEventNameContext is an interface to support dynamic dispatch.
|
|
|
|
type IWaitForEventNameContext interface {
|
2018-09-22 19:18:10 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IsWaitForEventNameContext differentiates from other interfaces.
|
|
|
|
IsWaitForEventNameContext()
|
2018-09-22 19:18:10 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type WaitForEventNameContext struct {
|
2018-09-22 19:18:10 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyWaitForEventNameContext() *WaitForEventNameContext {
|
|
|
|
var p = new(WaitForEventNameContext)
|
2018-09-22 19:18:10 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_waitForEventName
|
2018-09-22 19:18:10 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*WaitForEventNameContext) IsWaitForEventNameContext() {}
|
2018-09-22 19:18:10 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewWaitForEventNameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *WaitForEventNameContext {
|
|
|
|
var p = new(WaitForEventNameContext)
|
2018-09-22 19:18:10 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_waitForEventName
|
2018-09-22 19:18:10 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForEventNameContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-22 19:18:10 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForEventNameContext) StringLiteral() IStringLiteralContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IStringLiteralContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IStringLiteralContext)
|
2018-09-28 13:56:25 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForEventNameContext) Variable() IVariableContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IVariableContext)(nil)).Elem(), 0)
|
2018-09-22 19:18:10 -04:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IVariableContext)
|
2018-09-28 13:56:25 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForEventNameContext) Param() IParamContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IParamContext)(nil)).Elem(), 0)
|
2018-09-28 13:56:25 -04:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IParamContext)
|
2018-09-22 19:18:10 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForEventNameContext) FunctionCallExpression() IFunctionCallExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IFunctionCallExpressionContext)(nil)).Elem(), 0)
|
2018-09-28 21:04:16 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
2018-09-28 21:04:16 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IFunctionCallExpressionContext)
|
2018-09-28 21:04:16 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForEventNameContext) MemberExpression() IMemberExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IMemberExpressionContext)(nil)).Elem(), 0)
|
2018-09-28 21:04:16 -04:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IMemberExpressionContext)
|
2018-09-28 21:04:16 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForEventNameContext) GetRuleContext() antlr.RuleContext {
|
2018-09-22 19:18:10 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForEventNameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-22 19:18:10 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForEventNameContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-22 19:18:10 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.EnterWaitForEventName(s)
|
2018-09-22 19:18:10 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForEventNameContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-22 19:18:10 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.ExitWaitForEventName(s)
|
2018-09-22 19:18:10 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForEventNameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-22 19:18:10 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.VisitWaitForEventName(s)
|
2018-09-22 19:18:10 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (p *FqlParser) WaitForEventName() (localctx IWaitForEventNameContext) {
|
|
|
|
localctx = NewWaitForEventNameContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 62, FqlParserRULE_waitForEventName)
|
2018-09-22 19:18:10 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(373)
|
2018-09-28 13:56:25 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2021-07-13 21:34:22 -04:00
|
|
|
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 33, p.GetParserRuleContext()) {
|
|
|
|
case 1:
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
2018-09-28 13:56:25 -04:00
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(368)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.StringLiteral()
|
2018-09-28 13:56:25 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 2:
|
|
|
|
p.EnterOuterAlt(localctx, 2)
|
2018-09-28 13:56:25 -04:00
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(369)
|
2018-09-28 13:56:25 -04:00
|
|
|
p.Variable()
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 3:
|
|
|
|
p.EnterOuterAlt(localctx, 3)
|
2018-09-28 21:04:16 -04:00
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(370)
|
2018-09-28 21:04:16 -04:00
|
|
|
p.Param()
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 4:
|
|
|
|
p.EnterOuterAlt(localctx, 4)
|
2018-09-28 13:56:25 -04:00
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(371)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.FunctionCallExpression()
|
2018-09-28 13:56:25 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 5:
|
|
|
|
p.EnterOuterAlt(localctx, 5)
|
2018-09-28 21:04:16 -04:00
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(372)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.MemberExpression()
|
2018-09-28 21:04:16 -04:00
|
|
|
}
|
|
|
|
|
2018-09-22 19:18:10 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IWaitForEventSourceContext is an interface to support dynamic dispatch.
|
|
|
|
type IWaitForEventSourceContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IsWaitForEventSourceContext differentiates from other interfaces.
|
|
|
|
IsWaitForEventSourceContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type WaitForEventSourceContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyWaitForEventSourceContext() *WaitForEventSourceContext {
|
|
|
|
var p = new(WaitForEventSourceContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_waitForEventSource
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*WaitForEventSourceContext) IsWaitForEventSourceContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewWaitForEventSourceContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *WaitForEventSourceContext {
|
|
|
|
var p = new(WaitForEventSourceContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_waitForEventSource
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForEventSourceContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForEventSourceContext) FunctionCallExpression() IFunctionCallExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IFunctionCallExpressionContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IFunctionCallExpressionContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForEventSourceContext) Variable() IVariableContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IVariableContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IVariableContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForEventSourceContext) MemberExpression() IMemberExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IMemberExpressionContext)(nil)).Elem(), 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IMemberExpressionContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForEventSourceContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForEventSourceContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForEventSourceContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.EnterWaitForEventSource(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForEventSourceContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.ExitWaitForEventSource(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *WaitForEventSourceContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.VisitWaitForEventSource(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (p *FqlParser) WaitForEventSource() (localctx IWaitForEventSourceContext) {
|
|
|
|
localctx = NewWaitForEventSourceContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 64, FqlParserRULE_waitForEventSource)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(378)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2021-07-13 21:34:22 -04:00
|
|
|
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 34, p.GetParserRuleContext()) {
|
|
|
|
case 1:
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(375)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.FunctionCallExpression()
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 2:
|
|
|
|
p.EnterOuterAlt(localctx, 2)
|
2018-09-18 16:42:38 -04:00
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(376)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Variable()
|
|
|
|
}
|
|
|
|
|
|
|
|
case 3:
|
|
|
|
p.EnterOuterAlt(localctx, 3)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(377)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.MemberExpression()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IRangeOperatorContext is an interface to support dynamic dispatch.
|
|
|
|
type IRangeOperatorContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IsRangeOperatorContext differentiates from other interfaces.
|
|
|
|
IsRangeOperatorContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type RangeOperatorContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyRangeOperatorContext() *RangeOperatorContext {
|
|
|
|
var p = new(RangeOperatorContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_rangeOperator
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*RangeOperatorContext) IsRangeOperatorContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewRangeOperatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *RangeOperatorContext {
|
|
|
|
var p = new(RangeOperatorContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_rangeOperator
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *RangeOperatorContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *RangeOperatorContext) Range() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserRange, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *RangeOperatorContext) AllIntegerLiteral() []IIntegerLiteralContext {
|
|
|
|
var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IIntegerLiteralContext)(nil)).Elem())
|
|
|
|
var tst = make([]IIntegerLiteralContext, len(ts))
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
for i, t := range ts {
|
|
|
|
if t != nil {
|
2021-07-13 21:34:22 -04:00
|
|
|
tst[i] = t.(IIntegerLiteralContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return tst
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *RangeOperatorContext) IntegerLiteral(i int) IIntegerLiteralContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IIntegerLiteralContext)(nil)).Elem(), i)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IIntegerLiteralContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *RangeOperatorContext) AllVariable() []IVariableContext {
|
|
|
|
var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IVariableContext)(nil)).Elem())
|
|
|
|
var tst = make([]IVariableContext, len(ts))
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
for i, t := range ts {
|
|
|
|
if t != nil {
|
|
|
|
tst[i] = t.(IVariableContext)
|
|
|
|
}
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return tst
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *RangeOperatorContext) Variable(i int) IVariableContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IVariableContext)(nil)).Elem(), i)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IVariableContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *RangeOperatorContext) AllParam() []IParamContext {
|
|
|
|
var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IParamContext)(nil)).Elem())
|
|
|
|
var tst = make([]IParamContext, len(ts))
|
|
|
|
|
|
|
|
for i, t := range ts {
|
|
|
|
if t != nil {
|
|
|
|
tst[i] = t.(IParamContext)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return tst
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *RangeOperatorContext) Param(i int) IParamContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IParamContext)(nil)).Elem(), i)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IParamContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *RangeOperatorContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *RangeOperatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *RangeOperatorContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterRangeOperator(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *RangeOperatorContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitRangeOperator(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *RangeOperatorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitRangeOperator(s)
|
|
|
|
|
|
|
|
default:
|
2018-09-18 16:42:38 -04:00
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (p *FqlParser) RangeOperator() (localctx IRangeOperatorContext) {
|
|
|
|
localctx = NewRangeOperatorContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 66, FqlParserRULE_rangeOperator)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(383)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
switch p.GetTokenStream().LA(1) {
|
|
|
|
case FqlParserIntegerLiteral:
|
2018-09-18 16:42:38 -04:00
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(380)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.IntegerLiteral()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case FqlParserIdentifier:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(381)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Variable()
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case FqlParserParam:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(382)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Param()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
default:
|
|
|
|
panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(385)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserRange)
|
|
|
|
}
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(389)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
switch p.GetTokenStream().LA(1) {
|
|
|
|
case FqlParserIntegerLiteral:
|
2018-09-18 16:42:38 -04:00
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(386)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.IntegerLiteral()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case FqlParserIdentifier:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(387)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Variable()
|
|
|
|
}
|
|
|
|
|
|
|
|
case FqlParserParam:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(388)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Param()
|
|
|
|
}
|
|
|
|
|
|
|
|
default:
|
|
|
|
panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IArrayLiteralContext is an interface to support dynamic dispatch.
|
|
|
|
type IArrayLiteralContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IsArrayLiteralContext differentiates from other interfaces.
|
|
|
|
IsArrayLiteralContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type ArrayLiteralContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyArrayLiteralContext() *ArrayLiteralContext {
|
|
|
|
var p = new(ArrayLiteralContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_arrayLiteral
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*ArrayLiteralContext) IsArrayLiteralContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewArrayLiteralContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ArrayLiteralContext {
|
|
|
|
var p = new(ArrayLiteralContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_arrayLiteral
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ArrayLiteralContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ArrayLiteralContext) OpenBracket() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserOpenBracket, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ArrayLiteralContext) CloseBracket() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserCloseBracket, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ArrayLiteralContext) AllExpression() []IExpressionContext {
|
|
|
|
var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IExpressionContext)(nil)).Elem())
|
|
|
|
var tst = make([]IExpressionContext, len(ts))
|
|
|
|
|
|
|
|
for i, t := range ts {
|
|
|
|
if t != nil {
|
|
|
|
tst[i] = t.(IExpressionContext)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return tst
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ArrayLiteralContext) Expression(i int) IExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), i)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IExpressionContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ArrayLiteralContext) AllComma() []antlr.TerminalNode {
|
|
|
|
return s.GetTokens(FqlParserComma)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ArrayLiteralContext) Comma(i int) antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserComma, i)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ArrayLiteralContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ArrayLiteralContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ArrayLiteralContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.EnterArrayLiteral(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ArrayLiteralContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.ExitArrayLiteral(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ArrayLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.VisitArrayLiteral(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (p *FqlParser) ArrayLiteral() (localctx IArrayLiteralContext) {
|
|
|
|
localctx = NewArrayLiteralContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 68, FqlParserRULE_arrayLiteral)
|
|
|
|
var _la int
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
var _alt int
|
|
|
|
|
2018-09-18 16:42:38 -04:00
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(391)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserOpenBracket)
|
|
|
|
}
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(403)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_la = p.GetTokenStream().LA(1)
|
|
|
|
|
|
|
|
if (((_la-9)&-(0x1f+1)) == 0 && ((1<<uint((_la-9)))&((1<<(FqlParserOpenBracket-9))|(1<<(FqlParserOpenParen-9))|(1<<(FqlParserOpenBrace-9))|(1<<(FqlParserPlus-9))|(1<<(FqlParserMinus-9))|(1<<(FqlParserAnd-9))|(1<<(FqlParserOr-9))|(1<<(FqlParserFor-9))|(1<<(FqlParserReturn-9))|(1<<(FqlParserWaitfor-9))|(1<<(FqlParserDistinct-9))|(1<<(FqlParserFilter-9)))) != 0) || (((_la-41)&-(0x1f+1)) == 0 && ((1<<uint((_la-41)))&((1<<(FqlParserSort-41))|(1<<(FqlParserLimit-41))|(1<<(FqlParserLet-41))|(1<<(FqlParserCollect-41))|(1<<(FqlParserSortDirection-41))|(1<<(FqlParserNone-41))|(1<<(FqlParserNull-41))|(1<<(FqlParserBooleanLiteral-41))|(1<<(FqlParserUse-41))|(1<<(FqlParserInto-41))|(1<<(FqlParserKeep-41))|(1<<(FqlParserWith-41))|(1<<(FqlParserCount-41))|(1<<(FqlParserAll-41))|(1<<(FqlParserAny-41))|(1<<(FqlParserAggregate-41))|(1<<(FqlParserEvent-41))|(1<<(FqlParserLike-41))|(1<<(FqlParserNot-41))|(1<<(FqlParserIn-41))|(1<<(FqlParserParam-41))|(1<<(FqlParserIdentifier-41))|(1<<(FqlParserStringLiteral-41))|(1<<(FqlParserIntegerLiteral-41))|(1<<(FqlParserFloatLiteral-41))|(1<<(FqlParserNamespaceSegment-41)))) != 0) {
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(392)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.expression(0)
|
|
|
|
}
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(397)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 37, p.GetParserRuleContext())
|
|
|
|
|
|
|
|
for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
|
|
|
|
if _alt == 1 {
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(393)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserComma)
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(394)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.expression(0)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(399)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 37, p.GetParserRuleContext())
|
|
|
|
}
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(401)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_la = p.GetTokenStream().LA(1)
|
|
|
|
|
|
|
|
if _la == FqlParserComma {
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(400)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserComma)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(405)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserCloseBracket)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IObjectLiteralContext is an interface to support dynamic dispatch.
|
|
|
|
type IObjectLiteralContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IsObjectLiteralContext differentiates from other interfaces.
|
|
|
|
IsObjectLiteralContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type ObjectLiteralContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyObjectLiteralContext() *ObjectLiteralContext {
|
|
|
|
var p = new(ObjectLiteralContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_objectLiteral
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*ObjectLiteralContext) IsObjectLiteralContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewObjectLiteralContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ObjectLiteralContext {
|
|
|
|
var p = new(ObjectLiteralContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_objectLiteral
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ObjectLiteralContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ObjectLiteralContext) OpenBrace() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserOpenBrace, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ObjectLiteralContext) CloseBrace() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserCloseBrace, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ObjectLiteralContext) AllPropertyAssignment() []IPropertyAssignmentContext {
|
|
|
|
var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IPropertyAssignmentContext)(nil)).Elem())
|
|
|
|
var tst = make([]IPropertyAssignmentContext, len(ts))
|
|
|
|
|
|
|
|
for i, t := range ts {
|
|
|
|
if t != nil {
|
|
|
|
tst[i] = t.(IPropertyAssignmentContext)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return tst
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ObjectLiteralContext) PropertyAssignment(i int) IPropertyAssignmentContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IPropertyAssignmentContext)(nil)).Elem(), i)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IPropertyAssignmentContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ObjectLiteralContext) AllComma() []antlr.TerminalNode {
|
|
|
|
return s.GetTokens(FqlParserComma)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ObjectLiteralContext) Comma(i int) antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserComma, i)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ObjectLiteralContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ObjectLiteralContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ObjectLiteralContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.EnterObjectLiteral(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ObjectLiteralContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.ExitObjectLiteral(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ObjectLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.VisitObjectLiteral(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (p *FqlParser) ObjectLiteral() (localctx IObjectLiteralContext) {
|
|
|
|
localctx = NewObjectLiteralContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 70, FqlParserRULE_objectLiteral)
|
|
|
|
var _la int
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
var _alt int
|
|
|
|
|
2018-09-18 16:42:38 -04:00
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(407)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserOpenBrace)
|
|
|
|
}
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(419)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_la = p.GetTokenStream().LA(1)
|
|
|
|
|
|
|
|
if _la == FqlParserOpenBracket || (((_la-63)&-(0x1f+1)) == 0 && ((1<<uint((_la-63)))&((1<<(FqlParserParam-63))|(1<<(FqlParserIdentifier-63))|(1<<(FqlParserStringLiteral-63)))) != 0) {
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(408)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.PropertyAssignment()
|
|
|
|
}
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(413)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 40, p.GetParserRuleContext())
|
|
|
|
|
|
|
|
for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
|
|
|
|
if _alt == 1 {
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(409)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserComma)
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(410)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.PropertyAssignment()
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(415)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 40, p.GetParserRuleContext())
|
|
|
|
}
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(417)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_la = p.GetTokenStream().LA(1)
|
|
|
|
|
|
|
|
if _la == FqlParserComma {
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(416)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserComma)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(421)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserCloseBrace)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IPropertyAssignmentContext is an interface to support dynamic dispatch.
|
|
|
|
type IPropertyAssignmentContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IsPropertyAssignmentContext differentiates from other interfaces.
|
|
|
|
IsPropertyAssignmentContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type PropertyAssignmentContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyPropertyAssignmentContext() *PropertyAssignmentContext {
|
|
|
|
var p = new(PropertyAssignmentContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_propertyAssignment
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*PropertyAssignmentContext) IsPropertyAssignmentContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewPropertyAssignmentContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PropertyAssignmentContext {
|
|
|
|
var p = new(PropertyAssignmentContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_propertyAssignment
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *PropertyAssignmentContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *PropertyAssignmentContext) PropertyName() IPropertyNameContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IPropertyNameContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IPropertyNameContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *PropertyAssignmentContext) Colon() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserColon, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *PropertyAssignmentContext) Expression() IExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IExpressionContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *PropertyAssignmentContext) ComputedPropertyName() IComputedPropertyNameContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IComputedPropertyNameContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IComputedPropertyNameContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *PropertyAssignmentContext) Variable() IVariableContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IVariableContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IVariableContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *PropertyAssignmentContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *PropertyAssignmentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *PropertyAssignmentContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.EnterPropertyAssignment(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *PropertyAssignmentContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.ExitPropertyAssignment(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *PropertyAssignmentContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.VisitPropertyAssignment(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (p *FqlParser) PropertyAssignment() (localctx IPropertyAssignmentContext) {
|
|
|
|
localctx = NewPropertyAssignmentContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 72, FqlParserRULE_propertyAssignment)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(432)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 43, p.GetParserRuleContext()) {
|
|
|
|
case 1:
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(423)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.PropertyName()
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(424)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserColon)
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(425)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.expression(0)
|
|
|
|
}
|
|
|
|
|
|
|
|
case 2:
|
|
|
|
p.EnterOuterAlt(localctx, 2)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(427)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.ComputedPropertyName()
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(428)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserColon)
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(429)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.expression(0)
|
|
|
|
}
|
|
|
|
|
|
|
|
case 3:
|
|
|
|
p.EnterOuterAlt(localctx, 3)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(431)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Variable()
|
|
|
|
}
|
|
|
|
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IComputedPropertyNameContext is an interface to support dynamic dispatch.
|
|
|
|
type IComputedPropertyNameContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IsComputedPropertyNameContext differentiates from other interfaces.
|
|
|
|
IsComputedPropertyNameContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type ComputedPropertyNameContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyComputedPropertyNameContext() *ComputedPropertyNameContext {
|
|
|
|
var p = new(ComputedPropertyNameContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_computedPropertyName
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*ComputedPropertyNameContext) IsComputedPropertyNameContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewComputedPropertyNameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ComputedPropertyNameContext {
|
|
|
|
var p = new(ComputedPropertyNameContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_computedPropertyName
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ComputedPropertyNameContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ComputedPropertyNameContext) OpenBracket() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserOpenBracket, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ComputedPropertyNameContext) Expression() IExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IExpressionContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ComputedPropertyNameContext) CloseBracket() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserCloseBracket, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ComputedPropertyNameContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ComputedPropertyNameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ComputedPropertyNameContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.EnterComputedPropertyName(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ComputedPropertyNameContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.ExitComputedPropertyName(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ComputedPropertyNameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.VisitComputedPropertyName(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (p *FqlParser) ComputedPropertyName() (localctx IComputedPropertyNameContext) {
|
|
|
|
localctx = NewComputedPropertyNameContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 74, FqlParserRULE_computedPropertyName)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(434)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserOpenBracket)
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(435)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.expression(0)
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(436)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserCloseBracket)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IPropertyNameContext is an interface to support dynamic dispatch.
|
|
|
|
type IPropertyNameContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IsPropertyNameContext differentiates from other interfaces.
|
|
|
|
IsPropertyNameContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type PropertyNameContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyPropertyNameContext() *PropertyNameContext {
|
|
|
|
var p = new(PropertyNameContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_propertyName
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*PropertyNameContext) IsPropertyNameContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewPropertyNameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PropertyNameContext {
|
|
|
|
var p = new(PropertyNameContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_propertyName
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *PropertyNameContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *PropertyNameContext) Identifier() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserIdentifier, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *PropertyNameContext) StringLiteral() IStringLiteralContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IStringLiteralContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IStringLiteralContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *PropertyNameContext) Param() IParamContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IParamContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IParamContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *PropertyNameContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *PropertyNameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *PropertyNameContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.EnterPropertyName(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *PropertyNameContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.ExitPropertyName(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *PropertyNameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.VisitPropertyName(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (p *FqlParser) PropertyName() (localctx IPropertyNameContext) {
|
|
|
|
localctx = NewPropertyNameContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 76, FqlParserRULE_propertyName)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(441)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
switch p.GetTokenStream().LA(1) {
|
|
|
|
case FqlParserIdentifier:
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(438)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserIdentifier)
|
|
|
|
}
|
|
|
|
|
|
|
|
case FqlParserStringLiteral:
|
|
|
|
p.EnterOuterAlt(localctx, 2)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(439)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.StringLiteral()
|
|
|
|
}
|
|
|
|
|
|
|
|
case FqlParserParam:
|
|
|
|
p.EnterOuterAlt(localctx, 3)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(440)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Param()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IBooleanLiteralContext is an interface to support dynamic dispatch.
|
|
|
|
type IBooleanLiteralContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IsBooleanLiteralContext differentiates from other interfaces.
|
|
|
|
IsBooleanLiteralContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type BooleanLiteralContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyBooleanLiteralContext() *BooleanLiteralContext {
|
|
|
|
var p = new(BooleanLiteralContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_booleanLiteral
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*BooleanLiteralContext) IsBooleanLiteralContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewBooleanLiteralContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *BooleanLiteralContext {
|
|
|
|
var p = new(BooleanLiteralContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_booleanLiteral
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *BooleanLiteralContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *BooleanLiteralContext) BooleanLiteral() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserBooleanLiteral, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *BooleanLiteralContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *BooleanLiteralContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *BooleanLiteralContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.EnterBooleanLiteral(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *BooleanLiteralContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.ExitBooleanLiteral(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *BooleanLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.VisitBooleanLiteral(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (p *FqlParser) BooleanLiteral() (localctx IBooleanLiteralContext) {
|
|
|
|
localctx = NewBooleanLiteralContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 78, FqlParserRULE_booleanLiteral)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(443)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserBooleanLiteral)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IStringLiteralContext is an interface to support dynamic dispatch.
|
|
|
|
type IStringLiteralContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IsStringLiteralContext differentiates from other interfaces.
|
|
|
|
IsStringLiteralContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type StringLiteralContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyStringLiteralContext() *StringLiteralContext {
|
|
|
|
var p = new(StringLiteralContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_stringLiteral
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*StringLiteralContext) IsStringLiteralContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewStringLiteralContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StringLiteralContext {
|
|
|
|
var p = new(StringLiteralContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_stringLiteral
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *StringLiteralContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *StringLiteralContext) StringLiteral() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserStringLiteral, 0)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *StringLiteralContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *StringLiteralContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *StringLiteralContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.EnterStringLiteral(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *StringLiteralContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.ExitStringLiteral(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *StringLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.VisitStringLiteral(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (p *FqlParser) StringLiteral() (localctx IStringLiteralContext) {
|
|
|
|
localctx = NewStringLiteralContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 80, FqlParserRULE_stringLiteral)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(445)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserStringLiteral)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IFloatLiteralContext is an interface to support dynamic dispatch.
|
|
|
|
type IFloatLiteralContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IsFloatLiteralContext differentiates from other interfaces.
|
|
|
|
IsFloatLiteralContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type FloatLiteralContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyFloatLiteralContext() *FloatLiteralContext {
|
|
|
|
var p = new(FloatLiteralContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_floatLiteral
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*FloatLiteralContext) IsFloatLiteralContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewFloatLiteralContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FloatLiteralContext {
|
|
|
|
var p = new(FloatLiteralContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_floatLiteral
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FloatLiteralContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FloatLiteralContext) FloatLiteral() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserFloatLiteral, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FloatLiteralContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FloatLiteralContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FloatLiteralContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.EnterFloatLiteral(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FloatLiteralContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.ExitFloatLiteral(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FloatLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.VisitFloatLiteral(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (p *FqlParser) FloatLiteral() (localctx IFloatLiteralContext) {
|
|
|
|
localctx = NewFloatLiteralContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 82, FqlParserRULE_floatLiteral)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2019-09-01 16:01:03 -04:00
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(447)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserFloatLiteral)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IIntegerLiteralContext is an interface to support dynamic dispatch.
|
|
|
|
type IIntegerLiteralContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IsIntegerLiteralContext differentiates from other interfaces.
|
|
|
|
IsIntegerLiteralContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type IntegerLiteralContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyIntegerLiteralContext() *IntegerLiteralContext {
|
|
|
|
var p = new(IntegerLiteralContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_integerLiteral
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*IntegerLiteralContext) IsIntegerLiteralContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewIntegerLiteralContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *IntegerLiteralContext {
|
|
|
|
var p = new(IntegerLiteralContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_integerLiteral
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *IntegerLiteralContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *IntegerLiteralContext) IntegerLiteral() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserIntegerLiteral, 0)
|
2019-09-01 16:01:03 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *IntegerLiteralContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *IntegerLiteralContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *IntegerLiteralContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.EnterIntegerLiteral(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *IntegerLiteralContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.ExitIntegerLiteral(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *IntegerLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.VisitIntegerLiteral(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (p *FqlParser) IntegerLiteral() (localctx IIntegerLiteralContext) {
|
|
|
|
localctx = NewIntegerLiteralContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 84, FqlParserRULE_integerLiteral)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(449)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserIntegerLiteral)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// INoneLiteralContext is an interface to support dynamic dispatch.
|
|
|
|
type INoneLiteralContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IsNoneLiteralContext differentiates from other interfaces.
|
|
|
|
IsNoneLiteralContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type NoneLiteralContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyNoneLiteralContext() *NoneLiteralContext {
|
|
|
|
var p = new(NoneLiteralContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_noneLiteral
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*NoneLiteralContext) IsNoneLiteralContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewNoneLiteralContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *NoneLiteralContext {
|
|
|
|
var p = new(NoneLiteralContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_noneLiteral
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *NoneLiteralContext) GetParser() antlr.Parser { return s.parser }
|
2018-10-22 15:11:00 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *NoneLiteralContext) Null() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserNull, 0)
|
2018-10-22 15:11:00 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *NoneLiteralContext) None() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserNone, 0)
|
2019-09-07 01:57:33 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *NoneLiteralContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *NoneLiteralContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *NoneLiteralContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.EnterNoneLiteral(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *NoneLiteralContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.ExitNoneLiteral(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *NoneLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.VisitNoneLiteral(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (p *FqlParser) NoneLiteral() (localctx INoneLiteralContext) {
|
|
|
|
localctx = NewNoneLiteralContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 86, FqlParserRULE_noneLiteral)
|
|
|
|
var _la int
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(451)
|
2021-07-13 21:34:22 -04:00
|
|
|
_la = p.GetTokenStream().LA(1)
|
2018-10-22 15:11:00 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if !(_la == FqlParserNone || _la == FqlParserNull) {
|
|
|
|
p.GetErrorHandler().RecoverInline(p)
|
|
|
|
} else {
|
|
|
|
p.GetErrorHandler().ReportMatch(p)
|
|
|
|
p.Consume()
|
2019-09-07 01:57:33 -04:00
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
// IExpressionGroupContext is an interface to support dynamic dispatch.
|
|
|
|
type IExpressionGroupContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
// IsExpressionGroupContext differentiates from other interfaces.
|
|
|
|
IsExpressionGroupContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
type ExpressionGroupContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func NewEmptyExpressionGroupContext() *ExpressionGroupContext {
|
|
|
|
var p = new(ExpressionGroupContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2018-12-21 23:14:41 -05:00
|
|
|
p.RuleIndex = FqlParserRULE_expressionGroup
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (*ExpressionGroupContext) IsExpressionGroupContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func NewExpressionGroupContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ExpressionGroupContext {
|
|
|
|
var p = new(ExpressionGroupContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2018-12-21 23:14:41 -05:00
|
|
|
p.RuleIndex = FqlParserRULE_expressionGroup
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (s *ExpressionGroupContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (s *ExpressionGroupContext) OpenParen() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserOpenParen, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (s *ExpressionGroupContext) Expression() IExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IExpressionContext)
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (s *ExpressionGroupContext) CloseParen() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserCloseParen, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (s *ExpressionGroupContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (s *ExpressionGroupContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (s *ExpressionGroupContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-12-21 23:14:41 -05:00
|
|
|
listenerT.EnterExpressionGroup(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (s *ExpressionGroupContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-12-21 23:14:41 -05:00
|
|
|
listenerT.ExitExpressionGroup(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (s *ExpressionGroupContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2018-12-21 23:14:41 -05:00
|
|
|
return t.VisitExpressionGroup(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (p *FqlParser) ExpressionGroup() (localctx IExpressionGroupContext) {
|
|
|
|
localctx = NewExpressionGroupContext(p, p.GetParserRuleContext(), p.GetState())
|
2020-04-22 17:44:10 +03:00
|
|
|
p.EnterRule(localctx, 88, FqlParserRULE_expressionGroup)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(453)
|
2018-12-21 23:14:41 -05:00
|
|
|
p.Match(FqlParserOpenParen)
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(454)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.expression(0)
|
|
|
|
}
|
2018-12-21 23:14:41 -05:00
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(455)
|
2018-12-21 23:14:41 -05:00
|
|
|
p.Match(FqlParserCloseParen)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IExpressionContext is an interface to support dynamic dispatch.
|
|
|
|
type IExpressionContext interface {
|
2020-04-22 17:44:10 +03:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IsExpressionContext differentiates from other interfaces.
|
|
|
|
IsExpressionContext()
|
2020-04-22 17:44:10 +03:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type ExpressionContext struct {
|
2020-04-22 17:44:10 +03:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyExpressionContext() *ExpressionContext {
|
|
|
|
var p = new(ExpressionContext)
|
2020-04-22 17:44:10 +03:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_expression
|
2020-04-22 17:44:10 +03:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*ExpressionContext) IsExpressionContext() {}
|
2020-04-22 17:44:10 +03:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ExpressionContext {
|
|
|
|
var p = new(ExpressionContext)
|
2020-04-22 17:44:10 +03:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_expression
|
2020-04-22 17:44:10 +03:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) GetParser() antlr.Parser { return s.parser }
|
2020-04-22 17:44:10 +03:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) UnaryOperator() IUnaryOperatorContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IUnaryOperatorContext)(nil)).Elem(), 0)
|
2020-04-22 17:44:10 +03:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IUnaryOperatorContext)
|
2020-04-22 17:44:10 +03:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) AllExpression() []IExpressionContext {
|
|
|
|
var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IExpressionContext)(nil)).Elem())
|
|
|
|
var tst = make([]IExpressionContext, len(ts))
|
2020-04-22 17:44:10 +03:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
for i, t := range ts {
|
|
|
|
if t != nil {
|
|
|
|
tst[i] = t.(IExpressionContext)
|
|
|
|
}
|
|
|
|
}
|
2020-04-22 17:44:10 +03:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return tst
|
2020-04-22 17:44:10 +03:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) Expression(i int) IExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), i)
|
2020-04-22 17:44:10 +03:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
2020-04-22 17:44:10 +03:00
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
|
|
|
|
return t.(IExpressionContext)
|
2020-04-22 17:44:10 +03:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) RangeOperator() IRangeOperatorContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IRangeOperatorContext)(nil)).Elem(), 0)
|
2020-04-22 17:44:10 +03:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
2020-04-22 17:44:10 +03:00
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
|
|
|
|
return t.(IRangeOperatorContext)
|
2020-04-22 17:44:10 +03:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) StringLiteral() IStringLiteralContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IStringLiteralContext)(nil)).Elem(), 0)
|
2020-04-22 17:44:10 +03:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2020-04-22 17:44:10 +03:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IStringLiteralContext)
|
|
|
|
}
|
2020-04-22 17:44:10 +03:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) FloatLiteral() IFloatLiteralContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IFloatLiteralContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
2020-04-22 17:44:10 +03:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IFloatLiteralContext)
|
2020-04-22 17:44:10 +03:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) IntegerLiteral() IIntegerLiteralContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IIntegerLiteralContext)(nil)).Elem(), 0)
|
2019-05-10 12:53:31 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2019-05-10 12:53:31 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IIntegerLiteralContext)
|
2019-05-10 12:53:31 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) BooleanLiteral() IBooleanLiteralContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IBooleanLiteralContext)(nil)).Elem(), 0)
|
2019-05-10 12:53:31 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IBooleanLiteralContext)
|
2019-05-10 12:53:31 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) ArrayLiteral() IArrayLiteralContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IArrayLiteralContext)(nil)).Elem(), 0)
|
2019-05-10 12:53:31 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2019-05-10 12:53:31 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IArrayLiteralContext)
|
|
|
|
}
|
2019-05-10 12:53:31 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) ObjectLiteral() IObjectLiteralContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IObjectLiteralContext)(nil)).Elem(), 0)
|
2019-05-10 12:53:31 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IObjectLiteralContext)
|
2019-05-10 12:53:31 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) MemberExpression() IMemberExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IMemberExpressionContext)(nil)).Elem(), 0)
|
2019-05-10 12:53:31 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2019-05-10 12:53:31 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IMemberExpressionContext)
|
2019-05-10 12:53:31 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) FunctionCallExpression() IFunctionCallExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IFunctionCallExpressionContext)(nil)).Elem(), 0)
|
2019-05-10 12:53:31 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IFunctionCallExpressionContext)
|
2019-05-10 12:53:31 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) Param() IParamContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IParamContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
2019-05-10 12:53:31 -04:00
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
|
|
|
|
return t.(IParamContext)
|
2019-05-10 12:53:31 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) Variable() IVariableContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IVariableContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
2019-05-10 12:53:31 -04:00
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
|
|
|
|
return t.(IVariableContext)
|
2019-05-10 12:53:31 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) NoneLiteral() INoneLiteralContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*INoneLiteralContext)(nil)).Elem(), 0)
|
2019-05-10 12:53:31 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
2019-05-10 12:53:31 -04:00
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
|
|
|
|
return t.(INoneLiteralContext)
|
2019-05-10 12:53:31 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) ExpressionGroup() IExpressionGroupContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionGroupContext)(nil)).Elem(), 0)
|
2019-05-10 12:53:31 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2019-05-10 12:53:31 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IExpressionGroupContext)
|
|
|
|
}
|
2019-05-10 12:53:31 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) MultiplicativeOperator() IMultiplicativeOperatorContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IMultiplicativeOperatorContext)(nil)).Elem(), 0)
|
2019-05-10 12:53:31 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
2019-05-10 12:53:31 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IMultiplicativeOperatorContext)
|
2019-05-10 12:53:31 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) AdditiveOperator() IAdditiveOperatorContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IAdditiveOperatorContext)(nil)).Elem(), 0)
|
2020-04-28 17:30:47 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2020-04-28 17:30:47 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IAdditiveOperatorContext)
|
2020-04-28 17:30:47 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) ArrayOperator() IArrayOperatorContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IArrayOperatorContext)(nil)).Elem(), 0)
|
2020-04-28 17:30:47 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IArrayOperatorContext)
|
2020-04-28 17:30:47 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) InOperator() IInOperatorContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IInOperatorContext)(nil)).Elem(), 0)
|
2020-04-28 17:30:47 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2020-04-28 17:30:47 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IInOperatorContext)
|
|
|
|
}
|
2020-04-28 17:30:47 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) EqualityOperator() IEqualityOperatorContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IEqualityOperatorContext)(nil)).Elem(), 0)
|
2020-04-28 17:30:47 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IEqualityOperatorContext)
|
2020-04-28 17:30:47 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) LikeOperator() ILikeOperatorContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*ILikeOperatorContext)(nil)).Elem(), 0)
|
2020-04-28 17:30:47 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2020-04-28 17:30:47 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(ILikeOperatorContext)
|
2020-04-28 17:30:47 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) RegexpOperator() IRegexpOperatorContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IRegexpOperatorContext)(nil)).Elem(), 0)
|
2020-04-28 17:30:47 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2020-04-28 17:30:47 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IRegexpOperatorContext)
|
2020-04-28 17:30:47 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) LogicalAndOperator() ILogicalAndOperatorContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*ILogicalAndOperatorContext)(nil)).Elem(), 0)
|
2020-04-28 17:30:47 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2020-04-28 17:30:47 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(ILogicalAndOperatorContext)
|
2020-04-28 17:30:47 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) LogicalOrOperator() ILogicalOrOperatorContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*ILogicalOrOperatorContext)(nil)).Elem(), 0)
|
2020-04-28 17:30:47 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2020-04-28 17:30:47 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(ILogicalOrOperatorContext)
|
2020-04-28 17:30:47 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) QuestionMark() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserQuestionMark, 0)
|
2020-04-28 17:30:47 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) AllOpenParen() []antlr.TerminalNode {
|
|
|
|
return s.GetTokens(FqlParserOpenParen)
|
2020-04-28 17:30:47 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) OpenParen(i int) antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserOpenParen, i)
|
2020-04-28 17:30:47 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) AllCloseParen() []antlr.TerminalNode {
|
|
|
|
return s.GetTokens(FqlParserCloseParen)
|
2020-04-28 17:30:47 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) CloseParen(i int) antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserCloseParen, i)
|
2020-04-28 17:30:47 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) Colon() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserColon, 0)
|
2020-04-28 17:30:47 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) AllForExpression() []IForExpressionContext {
|
|
|
|
var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IForExpressionContext)(nil)).Elem())
|
|
|
|
var tst = make([]IForExpressionContext, len(ts))
|
2020-04-28 17:30:47 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
for i, t := range ts {
|
|
|
|
if t != nil {
|
|
|
|
tst[i] = t.(IForExpressionContext)
|
|
|
|
}
|
|
|
|
}
|
2020-04-28 17:30:47 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return tst
|
2020-04-28 17:30:47 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) ForExpression(i int) IForExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IForExpressionContext)(nil)).Elem(), i)
|
2020-04-28 17:30:47 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2020-04-28 17:30:47 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IForExpressionContext)
|
2020-04-28 17:30:47 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) AllWaitForExpression() []IWaitForExpressionContext {
|
|
|
|
var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IWaitForExpressionContext)(nil)).Elem())
|
|
|
|
var tst = make([]IWaitForExpressionContext, len(ts))
|
2020-04-28 17:30:47 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
for i, t := range ts {
|
|
|
|
if t != nil {
|
|
|
|
tst[i] = t.(IWaitForExpressionContext)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return tst
|
2020-04-28 17:30:47 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) WaitForExpression(i int) IWaitForExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IWaitForExpressionContext)(nil)).Elem(), i)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IWaitForExpressionContext)
|
2020-04-28 17:30:47 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) GetRuleContext() antlr.RuleContext {
|
2020-04-28 17:30:47 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2020-04-28 17:30:47 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) EnterRule(listener antlr.ParseTreeListener) {
|
2020-04-28 17:30:47 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.EnterExpression(s)
|
2020-04-28 17:30:47 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) ExitRule(listener antlr.ParseTreeListener) {
|
2020-04-28 17:30:47 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.ExitExpression(s)
|
2020-04-28 17:30:47 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ExpressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2020-04-28 17:30:47 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.VisitExpression(s)
|
2020-04-28 17:30:47 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (p *FqlParser) Expression() (localctx IExpressionContext) {
|
|
|
|
return p.expression(0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) expression(_p int) (localctx IExpressionContext) {
|
|
|
|
var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext()
|
|
|
|
_parentState := p.GetState()
|
|
|
|
localctx = NewExpressionContext(p, p.GetParserRuleContext(), _parentState)
|
|
|
|
var _prevctx IExpressionContext = localctx
|
|
|
|
var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning.
|
|
|
|
_startState := 90
|
|
|
|
p.EnterRecursionRule(localctx, 90, FqlParserRULE_expression, _p)
|
2020-04-28 17:30:47 -04:00
|
|
|
var _la int
|
|
|
|
|
|
|
|
defer func() {
|
2021-07-13 21:34:22 -04:00
|
|
|
p.UnrollRecursionContexts(_parentctx)
|
2020-04-28 17:30:47 -04:00
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
var _alt int
|
2020-04-28 17:30:47 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
p.EnterOuterAlt(localctx, 1)
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(474)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 45, p.GetParserRuleContext()) {
|
|
|
|
case 1:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(458)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.UnaryOperator()
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(459)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.expression(27)
|
2020-04-28 17:30:47 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 2:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(461)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RangeOperator()
|
|
|
|
}
|
2020-04-28 17:30:47 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 3:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(462)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.StringLiteral()
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 4:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(463)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.FloatLiteral()
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 5:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(464)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.IntegerLiteral()
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 6:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(465)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.BooleanLiteral()
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 7:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(466)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.ArrayLiteral()
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 8:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(467)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.ObjectLiteral()
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 9:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(468)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.MemberExpression()
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 10:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(469)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.FunctionCallExpression()
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 11:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(470)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Param()
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 12:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(471)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Variable()
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 13:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(472)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.NoneLiteral()
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 14:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(473)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.ExpressionGroup()
|
|
|
|
}
|
2019-05-10 12:53:31 -04:00
|
|
|
|
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1))
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(563)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 53, p.GetParserRuleContext())
|
2019-05-10 12:53:31 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
|
|
|
|
if _alt == 1 {
|
|
|
|
if p.GetParseListeners() != nil {
|
|
|
|
p.TriggerExitRuleEvent()
|
|
|
|
}
|
|
|
|
_prevctx = localctx
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(561)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 52, p.GetParserRuleContext()) {
|
|
|
|
case 1:
|
|
|
|
localctx = NewExpressionContext(p, _parentctx, _parentState)
|
|
|
|
p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_expression)
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(476)
|
2020-04-28 17:30:47 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if !(p.Precpred(p.GetParserRuleContext(), 26)) {
|
|
|
|
panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 26)", ""))
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(477)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.MultiplicativeOperator()
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(478)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.expression(27)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 2:
|
|
|
|
localctx = NewExpressionContext(p, _parentctx, _parentState)
|
|
|
|
p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_expression)
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(480)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if !(p.Precpred(p.GetParserRuleContext(), 25)) {
|
|
|
|
panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 25)", ""))
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(481)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.AdditiveOperator()
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(482)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.expression(26)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 3:
|
|
|
|
localctx = NewExpressionContext(p, _parentctx, _parentState)
|
|
|
|
p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_expression)
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(484)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if !(p.Precpred(p.GetParserRuleContext(), 24)) {
|
|
|
|
panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 24)", ""))
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(485)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.ArrayOperator()
|
|
|
|
}
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(488)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
switch p.GetTokenStream().LA(1) {
|
|
|
|
case FqlParserNot, FqlParserIn:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(486)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.InOperator()
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case FqlParserGt, FqlParserLt, FqlParserEq, FqlParserGte, FqlParserLte, FqlParserNeq:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(487)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.EqualityOperator()
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
default:
|
|
|
|
panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(490)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.expression(25)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 4:
|
|
|
|
localctx = NewExpressionContext(p, _parentctx, _parentState)
|
|
|
|
p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_expression)
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(492)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if !(p.Precpred(p.GetParserRuleContext(), 23)) {
|
|
|
|
panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 23)", ""))
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(493)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.InOperator()
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(494)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.expression(24)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 5:
|
|
|
|
localctx = NewExpressionContext(p, _parentctx, _parentState)
|
|
|
|
p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_expression)
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(496)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if !(p.Precpred(p.GetParserRuleContext(), 22)) {
|
|
|
|
panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 22)", ""))
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(497)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.LikeOperator()
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(498)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.expression(23)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 6:
|
|
|
|
localctx = NewExpressionContext(p, _parentctx, _parentState)
|
|
|
|
p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_expression)
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(500)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if !(p.Precpred(p.GetParserRuleContext(), 21)) {
|
|
|
|
panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 21)", ""))
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(501)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.EqualityOperator()
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(502)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.expression(22)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 7:
|
|
|
|
localctx = NewExpressionContext(p, _parentctx, _parentState)
|
|
|
|
p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_expression)
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(504)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if !(p.Precpred(p.GetParserRuleContext(), 20)) {
|
|
|
|
panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 20)", ""))
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(505)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RegexpOperator()
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(506)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.expression(21)
|
|
|
|
}
|
2019-09-01 16:01:03 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 8:
|
|
|
|
localctx = NewExpressionContext(p, _parentctx, _parentState)
|
|
|
|
p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_expression)
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(508)
|
2019-09-01 16:01:03 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if !(p.Precpred(p.GetParserRuleContext(), 19)) {
|
|
|
|
panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 19)", ""))
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(509)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.LogicalAndOperator()
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(510)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.expression(20)
|
|
|
|
}
|
|
|
|
|
|
|
|
case 9:
|
|
|
|
localctx = NewExpressionContext(p, _parentctx, _parentState)
|
|
|
|
p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_expression)
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(512)
|
2021-07-13 21:34:22 -04:00
|
|
|
|
|
|
|
if !(p.Precpred(p.GetParserRuleContext(), 18)) {
|
|
|
|
panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 18)", ""))
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(513)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.LogicalOrOperator()
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(514)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.expression(19)
|
|
|
|
}
|
|
|
|
|
|
|
|
case 10:
|
|
|
|
localctx = NewExpressionContext(p, _parentctx, _parentState)
|
|
|
|
p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_expression)
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(516)
|
2021-07-13 21:34:22 -04:00
|
|
|
|
|
|
|
if !(p.Precpred(p.GetParserRuleContext(), 15)) {
|
|
|
|
panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 15)", ""))
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(517)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserQuestionMark)
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(518)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserOpenParen)
|
|
|
|
}
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(521)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
|
|
|
|
switch p.GetTokenStream().LA(1) {
|
|
|
|
case FqlParserFor:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(519)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.ForExpression()
|
|
|
|
}
|
|
|
|
|
|
|
|
case FqlParserWaitfor:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(520)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.WaitForExpression()
|
|
|
|
}
|
|
|
|
|
|
|
|
default:
|
|
|
|
panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(523)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserCloseParen)
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(524)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserColon)
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(525)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.expression(16)
|
|
|
|
}
|
|
|
|
|
|
|
|
case 11:
|
|
|
|
localctx = NewExpressionContext(p, _parentctx, _parentState)
|
|
|
|
p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_expression)
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(527)
|
2021-07-13 21:34:22 -04:00
|
|
|
|
|
|
|
if !(p.Precpred(p.GetParserRuleContext(), 14)) {
|
|
|
|
panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 14)", ""))
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(528)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserQuestionMark)
|
|
|
|
}
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(530)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_la = p.GetTokenStream().LA(1)
|
|
|
|
|
|
|
|
if (((_la-9)&-(0x1f+1)) == 0 && ((1<<uint((_la-9)))&((1<<(FqlParserOpenBracket-9))|(1<<(FqlParserOpenParen-9))|(1<<(FqlParserOpenBrace-9))|(1<<(FqlParserPlus-9))|(1<<(FqlParserMinus-9))|(1<<(FqlParserAnd-9))|(1<<(FqlParserOr-9))|(1<<(FqlParserFor-9))|(1<<(FqlParserReturn-9))|(1<<(FqlParserWaitfor-9))|(1<<(FqlParserDistinct-9))|(1<<(FqlParserFilter-9)))) != 0) || (((_la-41)&-(0x1f+1)) == 0 && ((1<<uint((_la-41)))&((1<<(FqlParserSort-41))|(1<<(FqlParserLimit-41))|(1<<(FqlParserLet-41))|(1<<(FqlParserCollect-41))|(1<<(FqlParserSortDirection-41))|(1<<(FqlParserNone-41))|(1<<(FqlParserNull-41))|(1<<(FqlParserBooleanLiteral-41))|(1<<(FqlParserUse-41))|(1<<(FqlParserInto-41))|(1<<(FqlParserKeep-41))|(1<<(FqlParserWith-41))|(1<<(FqlParserCount-41))|(1<<(FqlParserAll-41))|(1<<(FqlParserAny-41))|(1<<(FqlParserAggregate-41))|(1<<(FqlParserEvent-41))|(1<<(FqlParserLike-41))|(1<<(FqlParserNot-41))|(1<<(FqlParserIn-41))|(1<<(FqlParserParam-41))|(1<<(FqlParserIdentifier-41))|(1<<(FqlParserStringLiteral-41))|(1<<(FqlParserIntegerLiteral-41))|(1<<(FqlParserFloatLiteral-41))|(1<<(FqlParserNamespaceSegment-41)))) != 0) {
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(529)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.expression(0)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(532)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserColon)
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(533)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.expression(15)
|
|
|
|
}
|
|
|
|
|
|
|
|
case 12:
|
|
|
|
localctx = NewExpressionContext(p, _parentctx, _parentState)
|
|
|
|
p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_expression)
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(534)
|
2021-07-13 21:34:22 -04:00
|
|
|
|
|
|
|
if !(p.Precpred(p.GetParserRuleContext(), 17)) {
|
|
|
|
panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 17)", ""))
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(535)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserQuestionMark)
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(536)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserOpenParen)
|
|
|
|
}
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(539)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
|
|
|
|
switch p.GetTokenStream().LA(1) {
|
|
|
|
case FqlParserFor:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(537)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.ForExpression()
|
|
|
|
}
|
|
|
|
|
|
|
|
case FqlParserWaitfor:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(538)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.WaitForExpression()
|
|
|
|
}
|
|
|
|
|
|
|
|
default:
|
|
|
|
panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(541)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserCloseParen)
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(542)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserColon)
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(543)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserOpenParen)
|
|
|
|
}
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(546)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
|
|
|
|
switch p.GetTokenStream().LA(1) {
|
|
|
|
case FqlParserFor:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(544)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.ForExpression()
|
|
|
|
}
|
|
|
|
|
|
|
|
case FqlParserWaitfor:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(545)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.WaitForExpression()
|
|
|
|
}
|
|
|
|
|
|
|
|
default:
|
|
|
|
panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(548)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserCloseParen)
|
|
|
|
}
|
|
|
|
|
|
|
|
case 13:
|
|
|
|
localctx = NewExpressionContext(p, _parentctx, _parentState)
|
|
|
|
p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_expression)
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(550)
|
2021-07-13 21:34:22 -04:00
|
|
|
|
|
|
|
if !(p.Precpred(p.GetParserRuleContext(), 16)) {
|
|
|
|
panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 16)", ""))
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(551)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserQuestionMark)
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(552)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.expression(0)
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(553)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserColon)
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(554)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserOpenParen)
|
|
|
|
}
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(557)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
|
|
|
|
switch p.GetTokenStream().LA(1) {
|
|
|
|
case FqlParserFor:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(555)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.ForExpression()
|
|
|
|
}
|
|
|
|
|
|
|
|
case FqlParserWaitfor:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(556)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.WaitForExpression()
|
|
|
|
}
|
|
|
|
|
|
|
|
default:
|
|
|
|
panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(559)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserCloseParen)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(565)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 53, p.GetParserRuleContext())
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
|
|
|
// IMemberExpressionContext is an interface to support dynamic dispatch.
|
|
|
|
type IMemberExpressionContext interface {
|
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
|
|
|
// IsMemberExpressionContext differentiates from other interfaces.
|
|
|
|
IsMemberExpressionContext()
|
2019-09-01 16:01:03 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type MemberExpressionContext struct {
|
2019-09-01 16:01:03 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyMemberExpressionContext() *MemberExpressionContext {
|
|
|
|
var p = new(MemberExpressionContext)
|
2019-09-01 16:01:03 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_memberExpression
|
2019-09-01 16:01:03 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*MemberExpressionContext) IsMemberExpressionContext() {}
|
2019-09-01 16:01:03 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewMemberExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *MemberExpressionContext {
|
|
|
|
var p = new(MemberExpressionContext)
|
2019-09-01 16:01:03 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_memberExpression
|
2019-09-01 16:01:03 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionContext) GetParser() antlr.Parser { return s.parser }
|
2019-09-07 01:21:43 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionContext) MemberExpressionSource() IMemberExpressionSourceContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IMemberExpressionSourceContext)(nil)).Elem(), 0)
|
2019-09-07 01:21:43 -04:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IMemberExpressionSourceContext)
|
2019-09-07 01:21:43 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionContext) AllMemberExpressionPath() []IMemberExpressionPathContext {
|
|
|
|
var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IMemberExpressionPathContext)(nil)).Elem())
|
|
|
|
var tst = make([]IMemberExpressionPathContext, len(ts))
|
2021-04-19 20:55:24 +03:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
for i, t := range ts {
|
|
|
|
if t != nil {
|
|
|
|
tst[i] = t.(IMemberExpressionPathContext)
|
|
|
|
}
|
2021-04-19 20:55:24 +03:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return tst
|
2021-04-19 20:55:24 +03:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionContext) MemberExpressionPath(i int) IMemberExpressionPathContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IMemberExpressionPathContext)(nil)).Elem(), i)
|
2021-04-19 20:55:24 +03:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IMemberExpressionPathContext)
|
2021-04-19 20:55:24 +03:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionContext) GetRuleContext() antlr.RuleContext {
|
2019-09-07 01:21:43 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2019-09-07 01:21:43 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionContext) EnterRule(listener antlr.ParseTreeListener) {
|
2019-09-07 01:21:43 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.EnterMemberExpression(s)
|
2019-09-07 01:21:43 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionContext) ExitRule(listener antlr.ParseTreeListener) {
|
2019-09-07 01:21:43 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.ExitMemberExpression(s)
|
2019-09-07 01:21:43 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2019-09-07 01:21:43 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.VisitMemberExpression(s)
|
2019-09-07 01:21:43 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (p *FqlParser) MemberExpression() (localctx IMemberExpressionContext) {
|
|
|
|
localctx = NewMemberExpressionContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 92, FqlParserRULE_memberExpression)
|
2019-09-07 01:21:43 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
var _alt int
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(566)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.MemberExpressionSource()
|
|
|
|
}
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(568)
|
2019-09-07 01:21:43 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2021-07-13 21:34:22 -04:00
|
|
|
_alt = 1
|
|
|
|
for ok := true; ok; ok = _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
|
|
|
|
switch _alt {
|
|
|
|
case 1:
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(567)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.MemberExpressionPath()
|
|
|
|
}
|
2019-09-07 01:21:43 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
default:
|
|
|
|
panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
|
2019-09-07 01:21:43 -04:00
|
|
|
}
|
|
|
|
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(570)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 54, p.GetParserRuleContext())
|
|
|
|
}
|
2019-09-07 01:21:43 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return localctx
|
|
|
|
}
|
2021-04-19 20:55:24 +03:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IMemberExpressionSourceContext is an interface to support dynamic dispatch.
|
|
|
|
type IMemberExpressionSourceContext interface {
|
2019-09-07 01:21:43 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IsMemberExpressionSourceContext differentiates from other interfaces.
|
|
|
|
IsMemberExpressionSourceContext()
|
2019-09-07 01:21:43 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type MemberExpressionSourceContext struct {
|
2019-09-07 01:21:43 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyMemberExpressionSourceContext() *MemberExpressionSourceContext {
|
|
|
|
var p = new(MemberExpressionSourceContext)
|
2019-09-07 01:21:43 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_memberExpressionSource
|
2019-09-07 01:21:43 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*MemberExpressionSourceContext) IsMemberExpressionSourceContext() {}
|
2019-09-07 01:21:43 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewMemberExpressionSourceContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *MemberExpressionSourceContext {
|
|
|
|
var p = new(MemberExpressionSourceContext)
|
2019-09-07 01:21:43 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_memberExpressionSource
|
2019-09-07 01:21:43 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionSourceContext) GetParser() antlr.Parser { return s.parser }
|
2019-09-07 01:21:43 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionSourceContext) Variable() IVariableContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IVariableContext)(nil)).Elem(), 0)
|
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2019-09-01 16:01:03 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IVariableContext)
|
2019-09-01 16:01:03 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionSourceContext) Param() IParamContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IParamContext)(nil)).Elem(), 0)
|
2019-09-01 16:01:03 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
2019-09-01 16:01:03 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IParamContext)
|
2019-09-01 16:01:03 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionSourceContext) FunctionCallExpression() IFunctionCallExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IFunctionCallExpressionContext)(nil)).Elem(), 0)
|
2019-09-01 16:01:03 -04:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IFunctionCallExpressionContext)
|
2019-09-01 16:01:03 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionSourceContext) ArrayLiteral() IArrayLiteralContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IArrayLiteralContext)(nil)).Elem(), 0)
|
2019-09-01 16:01:03 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
2019-09-01 16:01:03 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IArrayLiteralContext)
|
2019-09-01 16:01:03 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionSourceContext) ObjectLiteral() IObjectLiteralContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IObjectLiteralContext)(nil)).Elem(), 0)
|
2019-09-01 16:01:03 -04:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IObjectLiteralContext)
|
2019-09-01 16:01:03 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionSourceContext) GetRuleContext() antlr.RuleContext {
|
2019-09-01 16:01:03 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionSourceContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2019-09-01 16:01:03 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionSourceContext) EnterRule(listener antlr.ParseTreeListener) {
|
2019-09-01 16:01:03 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.EnterMemberExpressionSource(s)
|
2019-09-01 16:01:03 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionSourceContext) ExitRule(listener antlr.ParseTreeListener) {
|
2019-09-01 16:01:03 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.ExitMemberExpressionSource(s)
|
2019-09-01 16:01:03 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionSourceContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2019-09-01 16:01:03 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.VisitMemberExpressionSource(s)
|
2019-09-01 16:01:03 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (p *FqlParser) MemberExpressionSource() (localctx IMemberExpressionSourceContext) {
|
|
|
|
localctx = NewMemberExpressionSourceContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 94, FqlParserRULE_memberExpressionSource)
|
2019-09-01 16:01:03 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(577)
|
2019-09-01 16:01:03 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2021-07-13 21:34:22 -04:00
|
|
|
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 55, p.GetParserRuleContext()) {
|
|
|
|
case 1:
|
2019-09-01 16:01:03 -04:00
|
|
|
p.EnterOuterAlt(localctx, 1)
|
2021-07-13 21:34:22 -04:00
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(572)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Variable()
|
2019-09-01 16:01:03 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 2:
|
2019-09-01 16:01:03 -04:00
|
|
|
p.EnterOuterAlt(localctx, 2)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(573)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Param()
|
2019-09-01 16:01:03 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 3:
|
|
|
|
p.EnterOuterAlt(localctx, 3)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(574)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.FunctionCallExpression()
|
2019-09-01 16:01:03 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 4:
|
|
|
|
p.EnterOuterAlt(localctx, 4)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(575)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.ArrayLiteral()
|
|
|
|
}
|
2019-09-01 16:01:03 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
case 5:
|
|
|
|
p.EnterOuterAlt(localctx, 5)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(576)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.ObjectLiteral()
|
2019-09-01 16:01:03 -04:00
|
|
|
}
|
|
|
|
|
2019-09-07 01:21:43 -04:00
|
|
|
}
|
2019-09-01 16:01:03 -04:00
|
|
|
|
2019-09-07 01:21:43 -04:00
|
|
|
return localctx
|
|
|
|
}
|
2019-09-01 16:01:03 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IMemberExpressionPathContext is an interface to support dynamic dispatch.
|
|
|
|
type IMemberExpressionPathContext interface {
|
2019-09-07 01:21:43 -04:00
|
|
|
antlr.ParserRuleContext
|
2019-09-01 16:01:03 -04:00
|
|
|
|
2019-09-07 01:21:43 -04:00
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
2019-09-01 16:01:03 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IsMemberExpressionPathContext differentiates from other interfaces.
|
|
|
|
IsMemberExpressionPathContext()
|
2019-09-07 01:21:43 -04:00
|
|
|
}
|
2019-09-01 16:01:03 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type MemberExpressionPathContext struct {
|
2019-09-07 01:21:43 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
2019-09-01 16:01:03 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyMemberExpressionPathContext() *MemberExpressionPathContext {
|
|
|
|
var p = new(MemberExpressionPathContext)
|
2019-09-07 01:21:43 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_memberExpressionPath
|
2019-09-07 01:21:43 -04:00
|
|
|
return p
|
|
|
|
}
|
2019-09-01 16:01:03 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*MemberExpressionPathContext) IsMemberExpressionPathContext() {}
|
2019-09-01 16:01:03 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewMemberExpressionPathContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *MemberExpressionPathContext {
|
|
|
|
var p = new(MemberExpressionPathContext)
|
2019-09-01 16:01:03 -04:00
|
|
|
|
2019-09-07 01:21:43 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
2019-09-01 16:01:03 -04:00
|
|
|
|
2019-09-07 01:21:43 -04:00
|
|
|
p.parser = parser
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_memberExpressionPath
|
2019-09-01 16:01:03 -04:00
|
|
|
|
2019-09-07 01:21:43 -04:00
|
|
|
return p
|
|
|
|
}
|
2019-09-01 16:01:03 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionPathContext) GetParser() antlr.Parser { return s.parser }
|
|
|
|
|
|
|
|
func (s *MemberExpressionPathContext) Dot() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserDot, 0)
|
|
|
|
}
|
2019-09-07 01:21:43 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionPathContext) PropertyName() IPropertyNameContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IPropertyNameContext)(nil)).Elem(), 0)
|
2019-09-07 01:21:43 -04:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IPropertyNameContext)
|
2019-09-07 01:21:43 -04:00
|
|
|
}
|
|
|
|
|
2021-07-16 14:46:08 -04:00
|
|
|
func (s *MemberExpressionPathContext) QuestionMark() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserQuestionMark, 0)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionPathContext) ComputedPropertyName() IComputedPropertyNameContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IComputedPropertyNameContext)(nil)).Elem(), 0)
|
2019-09-07 01:21:43 -04:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IComputedPropertyNameContext)
|
2019-09-07 01:21:43 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionPathContext) GetRuleContext() antlr.RuleContext {
|
2019-09-07 01:21:43 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionPathContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2019-09-07 01:21:43 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionPathContext) EnterRule(listener antlr.ParseTreeListener) {
|
2019-09-07 01:21:43 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.EnterMemberExpressionPath(s)
|
2019-09-07 01:21:43 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionPathContext) ExitRule(listener antlr.ParseTreeListener) {
|
2019-09-07 01:21:43 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.ExitMemberExpressionPath(s)
|
2019-09-07 01:21:43 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *MemberExpressionPathContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2019-09-07 01:21:43 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.VisitMemberExpressionPath(s)
|
2019-09-01 16:01:03 -04:00
|
|
|
|
2019-09-07 01:21:43 -04:00
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (p *FqlParser) MemberExpressionPath() (localctx IMemberExpressionPathContext) {
|
|
|
|
localctx = NewMemberExpressionPathContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 96, FqlParserRULE_memberExpressionPath)
|
2021-07-16 14:46:08 -04:00
|
|
|
var _la int
|
2019-09-07 01:21:43 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
2019-09-01 16:01:03 -04:00
|
|
|
}
|
|
|
|
}
|
2019-09-07 01:21:43 -04:00
|
|
|
}()
|
2019-09-01 16:01:03 -04:00
|
|
|
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(589)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2021-07-16 14:46:08 -04:00
|
|
|
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 58, p.GetParserRuleContext()) {
|
|
|
|
case 1:
|
2021-07-13 21:34:22 -04:00
|
|
|
p.EnterOuterAlt(localctx, 1)
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(580)
|
2021-07-16 14:46:08 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_la = p.GetTokenStream().LA(1)
|
|
|
|
|
|
|
|
if _la == FqlParserQuestionMark {
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(579)
|
2021-07-16 14:46:08 -04:00
|
|
|
p.Match(FqlParserQuestionMark)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(582)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserDot)
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(583)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.PropertyName()
|
|
|
|
}
|
|
|
|
|
2021-07-16 14:46:08 -04:00
|
|
|
case 2:
|
2021-07-13 21:34:22 -04:00
|
|
|
p.EnterOuterAlt(localctx, 2)
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(586)
|
2021-07-16 14:46:08 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_la = p.GetTokenStream().LA(1)
|
|
|
|
|
|
|
|
if _la == FqlParserQuestionMark {
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(584)
|
2021-07-16 14:46:08 -04:00
|
|
|
p.Match(FqlParserQuestionMark)
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(585)
|
2021-07-16 14:46:08 -04:00
|
|
|
p.Match(FqlParserDot)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(588)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.ComputedPropertyName()
|
|
|
|
}
|
|
|
|
|
2019-09-01 16:01:03 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IFunctionCallExpressionContext is an interface to support dynamic dispatch.
|
|
|
|
type IFunctionCallExpressionContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IsFunctionCallExpressionContext differentiates from other interfaces.
|
|
|
|
IsFunctionCallExpressionContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type FunctionCallExpressionContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyFunctionCallExpressionContext() *FunctionCallExpressionContext {
|
|
|
|
var p = new(FunctionCallExpressionContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_functionCallExpression
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*FunctionCallExpressionContext) IsFunctionCallExpressionContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewFunctionCallExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FunctionCallExpressionContext {
|
|
|
|
var p = new(FunctionCallExpressionContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_functionCallExpression
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionCallExpressionContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionCallExpressionContext) Namespace() INamespaceContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*INamespaceContext)(nil)).Elem(), 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(INamespaceContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionCallExpressionContext) FunctionIdentifier() IFunctionIdentifierContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IFunctionIdentifierContext)(nil)).Elem(), 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IFunctionIdentifierContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionCallExpressionContext) Arguments() IArgumentsContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IArgumentsContext)(nil)).Elem(), 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.(IArgumentsContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionCallExpressionContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionCallExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionCallExpressionContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.EnterFunctionCallExpression(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionCallExpressionContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.ExitFunctionCallExpression(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionCallExpressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.VisitFunctionCallExpression(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (p *FqlParser) FunctionCallExpression() (localctx IFunctionCallExpressionContext) {
|
|
|
|
localctx = NewFunctionCallExpressionContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 98, FqlParserRULE_functionCallExpression)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(591)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Namespace()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(592)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.FunctionIdentifier()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(593)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Arguments()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IFunctionIdentifierContext is an interface to support dynamic dispatch.
|
|
|
|
type IFunctionIdentifierContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IsFunctionIdentifierContext differentiates from other interfaces.
|
|
|
|
IsFunctionIdentifierContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type FunctionIdentifierContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyFunctionIdentifierContext() *FunctionIdentifierContext {
|
|
|
|
var p = new(FunctionIdentifierContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_functionIdentifier
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*FunctionIdentifierContext) IsFunctionIdentifierContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewFunctionIdentifierContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FunctionIdentifierContext {
|
|
|
|
var p = new(FunctionIdentifierContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_functionIdentifier
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) Identifier() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserIdentifier, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) And() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserAnd, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) Or() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserOr, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) For() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserFor, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) Return() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserReturn, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) Distinct() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserDistinct, 0)
|
|
|
|
}
|
2018-09-22 19:18:10 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) Filter() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserFilter, 0)
|
|
|
|
}
|
2018-09-22 19:18:10 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) Sort() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserSort, 0)
|
2018-09-22 19:18:10 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) Limit() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserLimit, 0)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) Let() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserLet, 0)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) Collect() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserCollect, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) SortDirection() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserSortDirection, 0)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) None() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserNone, 0)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) Null() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserNull, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) BooleanLiteral() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserBooleanLiteral, 0)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) Use() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserUse, 0)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) Into() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserInto, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) Keep() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserKeep, 0)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) With() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserWith, 0)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) Count() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserCount, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) All() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserAll, 0)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) Any() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserAny, 0)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) Aggregate() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserAggregate, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) Like() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserLike, 0)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) Not() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserNot, 0)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) In() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserIn, 0)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) Waitfor() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserWaitfor, 0)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) Event() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserEvent, 0)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterFunctionIdentifier(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitFunctionIdentifier(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *FunctionIdentifierContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitFunctionIdentifier(s)
|
2018-09-28 21:04:16 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
2018-09-28 21:04:16 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (p *FqlParser) FunctionIdentifier() (localctx IFunctionIdentifierContext) {
|
|
|
|
localctx = NewFunctionIdentifierContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 100, FqlParserRULE_functionIdentifier)
|
|
|
|
var _la int
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(595)
|
2021-07-13 21:34:22 -04:00
|
|
|
_la = p.GetTokenStream().LA(1)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if !(_la == FqlParserAnd || _la == FqlParserOr || (((_la-35)&-(0x1f+1)) == 0 && ((1<<uint((_la-35)))&((1<<(FqlParserFor-35))|(1<<(FqlParserReturn-35))|(1<<(FqlParserWaitfor-35))|(1<<(FqlParserDistinct-35))|(1<<(FqlParserFilter-35))|(1<<(FqlParserSort-35))|(1<<(FqlParserLimit-35))|(1<<(FqlParserLet-35))|(1<<(FqlParserCollect-35))|(1<<(FqlParserSortDirection-35))|(1<<(FqlParserNone-35))|(1<<(FqlParserNull-35))|(1<<(FqlParserBooleanLiteral-35))|(1<<(FqlParserUse-35))|(1<<(FqlParserInto-35))|(1<<(FqlParserKeep-35))|(1<<(FqlParserWith-35))|(1<<(FqlParserCount-35))|(1<<(FqlParserAll-35))|(1<<(FqlParserAny-35))|(1<<(FqlParserAggregate-35))|(1<<(FqlParserEvent-35))|(1<<(FqlParserLike-35))|(1<<(FqlParserNot-35))|(1<<(FqlParserIn-35))|(1<<(FqlParserIdentifier-35)))) != 0)) {
|
|
|
|
p.GetErrorHandler().RecoverInline(p)
|
|
|
|
} else {
|
|
|
|
p.GetErrorHandler().ReportMatch(p)
|
|
|
|
p.Consume()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// INamespaceContext is an interface to support dynamic dispatch.
|
|
|
|
type INamespaceContext interface {
|
2018-09-27 19:05:56 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IsNamespaceContext differentiates from other interfaces.
|
|
|
|
IsNamespaceContext()
|
2018-09-27 19:05:56 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type NamespaceContext struct {
|
2018-09-27 19:05:56 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyNamespaceContext() *NamespaceContext {
|
|
|
|
var p = new(NamespaceContext)
|
2018-09-27 19:05:56 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_namespace
|
2018-09-27 19:05:56 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*NamespaceContext) IsNamespaceContext() {}
|
2018-09-27 19:05:56 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewNamespaceContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *NamespaceContext {
|
|
|
|
var p = new(NamespaceContext)
|
2018-09-27 19:05:56 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2021-07-13 21:34:22 -04:00
|
|
|
p.RuleIndex = FqlParserRULE_namespace
|
2018-09-27 19:05:56 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *NamespaceContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-27 19:05:56 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *NamespaceContext) AllNamespaceSegment() []antlr.TerminalNode {
|
|
|
|
return s.GetTokens(FqlParserNamespaceSegment)
|
|
|
|
}
|
2018-09-27 19:05:56 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *NamespaceContext) NamespaceSegment(i int) antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserNamespaceSegment, i)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *NamespaceContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *NamespaceContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *NamespaceContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterNamespace(s)
|
2018-09-27 19:05:56 -04:00
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
}
|
2018-09-27 19:05:56 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *NamespaceContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitNamespace(s)
|
|
|
|
}
|
2018-09-27 19:05:56 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *NamespaceContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitNamespace(s)
|
2018-09-27 19:05:56 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
2018-09-27 19:05:56 -04:00
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
}
|
2018-09-27 19:05:56 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (p *FqlParser) Namespace() (localctx INamespaceContext) {
|
|
|
|
localctx = NewNamespaceContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 102, FqlParserRULE_namespace)
|
|
|
|
var _la int
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(600)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_la = p.GetTokenStream().LA(1)
|
|
|
|
|
|
|
|
for _la == FqlParserNamespaceSegment {
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(597)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserNamespaceSegment)
|
|
|
|
}
|
|
|
|
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(602)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_la = p.GetTokenStream().LA(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
2018-09-27 19:05:56 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IArgumentsContext is an interface to support dynamic dispatch.
|
|
|
|
type IArgumentsContext interface {
|
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
|
|
|
// IsArgumentsContext differentiates from other interfaces.
|
|
|
|
IsArgumentsContext()
|
2018-09-27 19:05:56 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
type ArgumentsContext struct {
|
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
2018-09-27 19:05:56 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func NewEmptyArgumentsContext() *ArgumentsContext {
|
|
|
|
var p = new(ArgumentsContext)
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
|
|
|
p.RuleIndex = FqlParserRULE_arguments
|
|
|
|
return p
|
2018-09-27 19:05:56 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (*ArgumentsContext) IsArgumentsContext() {}
|
|
|
|
|
|
|
|
func NewArgumentsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ArgumentsContext {
|
|
|
|
var p = new(ArgumentsContext)
|
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
|
|
|
p.RuleIndex = FqlParserRULE_arguments
|
|
|
|
|
|
|
|
return p
|
2018-09-27 19:05:56 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ArgumentsContext) GetParser() antlr.Parser { return s.parser }
|
|
|
|
|
|
|
|
func (s *ArgumentsContext) OpenParen() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserOpenParen, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ArgumentsContext) CloseParen() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserCloseParen, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ArgumentsContext) AllExpression() []IExpressionContext {
|
|
|
|
var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IExpressionContext)(nil)).Elem())
|
|
|
|
var tst = make([]IExpressionContext, len(ts))
|
2018-09-27 19:05:56 -04:00
|
|
|
|
|
|
|
for i, t := range ts {
|
|
|
|
if t != nil {
|
2021-07-13 21:34:22 -04:00
|
|
|
tst[i] = t.(IExpressionContext)
|
2018-09-27 19:05:56 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return tst
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ArgumentsContext) Expression(i int) IExpressionContext {
|
|
|
|
var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), i)
|
2018-09-27 19:05:56 -04:00
|
|
|
|
|
|
|
if t == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.(IExpressionContext)
|
2018-09-27 19:05:56 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ArgumentsContext) AllComma() []antlr.TerminalNode {
|
|
|
|
return s.GetTokens(FqlParserComma)
|
2018-09-27 19:05:56 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ArgumentsContext) Comma(i int) antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserComma, i)
|
2018-09-27 19:05:56 -04:00
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ArgumentsContext) GetRuleContext() antlr.RuleContext {
|
2018-09-27 19:05:56 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ArgumentsContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-27 19:05:56 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ArgumentsContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-27 19:05:56 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.EnterArguments(s)
|
2018-09-27 19:05:56 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ArgumentsContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-27 19:05:56 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2021-07-13 21:34:22 -04:00
|
|
|
listenerT.ExitArguments(s)
|
2018-09-27 19:05:56 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (s *ArgumentsContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-27 19:05:56 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2021-07-13 21:34:22 -04:00
|
|
|
return t.VisitArguments(s)
|
2018-09-27 19:05:56 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
func (p *FqlParser) Arguments() (localctx IArgumentsContext) {
|
|
|
|
localctx = NewArgumentsContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 104, FqlParserRULE_arguments)
|
2018-09-27 19:05:56 -04:00
|
|
|
var _la int
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(603)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserOpenParen)
|
|
|
|
}
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(612)
|
2018-09-27 19:05:56 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
2021-07-13 21:34:22 -04:00
|
|
|
_la = p.GetTokenStream().LA(1)
|
2018-09-27 19:05:56 -04:00
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if (((_la-9)&-(0x1f+1)) == 0 && ((1<<uint((_la-9)))&((1<<(FqlParserOpenBracket-9))|(1<<(FqlParserOpenParen-9))|(1<<(FqlParserOpenBrace-9))|(1<<(FqlParserPlus-9))|(1<<(FqlParserMinus-9))|(1<<(FqlParserAnd-9))|(1<<(FqlParserOr-9))|(1<<(FqlParserFor-9))|(1<<(FqlParserReturn-9))|(1<<(FqlParserWaitfor-9))|(1<<(FqlParserDistinct-9))|(1<<(FqlParserFilter-9)))) != 0) || (((_la-41)&-(0x1f+1)) == 0 && ((1<<uint((_la-41)))&((1<<(FqlParserSort-41))|(1<<(FqlParserLimit-41))|(1<<(FqlParserLet-41))|(1<<(FqlParserCollect-41))|(1<<(FqlParserSortDirection-41))|(1<<(FqlParserNone-41))|(1<<(FqlParserNull-41))|(1<<(FqlParserBooleanLiteral-41))|(1<<(FqlParserUse-41))|(1<<(FqlParserInto-41))|(1<<(FqlParserKeep-41))|(1<<(FqlParserWith-41))|(1<<(FqlParserCount-41))|(1<<(FqlParserAll-41))|(1<<(FqlParserAny-41))|(1<<(FqlParserAggregate-41))|(1<<(FqlParserEvent-41))|(1<<(FqlParserLike-41))|(1<<(FqlParserNot-41))|(1<<(FqlParserIn-41))|(1<<(FqlParserParam-41))|(1<<(FqlParserIdentifier-41))|(1<<(FqlParserStringLiteral-41))|(1<<(FqlParserIntegerLiteral-41))|(1<<(FqlParserFloatLiteral-41))|(1<<(FqlParserNamespaceSegment-41)))) != 0) {
|
2018-09-27 19:05:56 -04:00
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(604)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.expression(0)
|
2018-09-27 19:05:56 -04:00
|
|
|
}
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(609)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_la = p.GetTokenStream().LA(1)
|
|
|
|
|
|
|
|
for _la == FqlParserComma {
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(605)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserComma)
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(606)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.expression(0)
|
|
|
|
}
|
|
|
|
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(611)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
_la = p.GetTokenStream().LA(1)
|
2018-09-27 19:05:56 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2021-07-13 21:34:22 -04:00
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(614)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserCloseParen)
|
|
|
|
}
|
2018-09-27 19:05:56 -04:00
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2018-10-07 17:54:02 -04:00
|
|
|
// IArrayOperatorContext is an interface to support dynamic dispatch.
|
|
|
|
type IArrayOperatorContext interface {
|
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
|
|
|
// IsArrayOperatorContext differentiates from other interfaces.
|
|
|
|
IsArrayOperatorContext()
|
|
|
|
}
|
|
|
|
|
|
|
|
type ArrayOperatorContext struct {
|
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewEmptyArrayOperatorContext() *ArrayOperatorContext {
|
|
|
|
var p = new(ArrayOperatorContext)
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
|
|
|
p.RuleIndex = FqlParserRULE_arrayOperator
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*ArrayOperatorContext) IsArrayOperatorContext() {}
|
|
|
|
|
|
|
|
func NewArrayOperatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ArrayOperatorContext {
|
|
|
|
var p = new(ArrayOperatorContext)
|
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
|
|
|
p.RuleIndex = FqlParserRULE_arrayOperator
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ArrayOperatorContext) GetParser() antlr.Parser { return s.parser }
|
|
|
|
|
|
|
|
func (s *ArrayOperatorContext) All() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserAll, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ArrayOperatorContext) Any() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserAny, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ArrayOperatorContext) None() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserNone, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ArrayOperatorContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ArrayOperatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ArrayOperatorContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterArrayOperator(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ArrayOperatorContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitArrayOperator(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ArrayOperatorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitArrayOperator(s)
|
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) ArrayOperator() (localctx IArrayOperatorContext) {
|
|
|
|
localctx = NewArrayOperatorContext(p, p.GetParserRuleContext(), p.GetState())
|
2021-07-13 21:34:22 -04:00
|
|
|
p.EnterRule(localctx, 106, FqlParserRULE_arrayOperator)
|
2018-10-07 17:54:02 -04:00
|
|
|
var _la int
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(616)
|
2018-10-07 17:54:02 -04:00
|
|
|
_la = p.GetTokenStream().LA(1)
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
if !(((_la-46)&-(0x1f+1)) == 0 && ((1<<uint((_la-46)))&((1<<(FqlParserNone-46))|(1<<(FqlParserAll-46))|(1<<(FqlParserAny-46)))) != 0) {
|
2018-10-07 17:54:02 -04:00
|
|
|
p.GetErrorHandler().RecoverInline(p)
|
|
|
|
} else {
|
|
|
|
p.GetErrorHandler().ReportMatch(p)
|
|
|
|
p.Consume()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
|
|
|
// IInOperatorContext is an interface to support dynamic dispatch.
|
|
|
|
type IInOperatorContext interface {
|
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
|
|
|
// IsInOperatorContext differentiates from other interfaces.
|
|
|
|
IsInOperatorContext()
|
|
|
|
}
|
|
|
|
|
|
|
|
type InOperatorContext struct {
|
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewEmptyInOperatorContext() *InOperatorContext {
|
|
|
|
var p = new(InOperatorContext)
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
|
|
|
p.RuleIndex = FqlParserRULE_inOperator
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*InOperatorContext) IsInOperatorContext() {}
|
|
|
|
|
|
|
|
func NewInOperatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *InOperatorContext {
|
|
|
|
var p = new(InOperatorContext)
|
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
|
|
|
p.RuleIndex = FqlParserRULE_inOperator
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *InOperatorContext) GetParser() antlr.Parser { return s.parser }
|
|
|
|
|
|
|
|
func (s *InOperatorContext) In() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserIn, 0)
|
|
|
|
}
|
|
|
|
|
2018-10-17 11:41:40 -04:00
|
|
|
func (s *InOperatorContext) Not() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserNot, 0)
|
|
|
|
}
|
|
|
|
|
2018-10-07 17:54:02 -04:00
|
|
|
func (s *InOperatorContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *InOperatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *InOperatorContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterInOperator(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *InOperatorContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitInOperator(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *InOperatorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitInOperator(s)
|
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) InOperator() (localctx IInOperatorContext) {
|
|
|
|
localctx = NewInOperatorContext(p, p.GetParserRuleContext(), p.GetState())
|
2021-07-13 21:34:22 -04:00
|
|
|
p.EnterRule(localctx, 108, FqlParserRULE_inOperator)
|
2018-10-07 17:54:02 -04:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(621)
|
2018-10-17 11:41:40 -04:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
|
|
|
|
switch p.GetTokenStream().LA(1) {
|
|
|
|
case FqlParserIn:
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(618)
|
2018-10-17 11:41:40 -04:00
|
|
|
p.Match(FqlParserIn)
|
|
|
|
}
|
|
|
|
|
|
|
|
case FqlParserNot:
|
|
|
|
p.EnterOuterAlt(localctx, 2)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(619)
|
2018-10-17 11:41:40 -04:00
|
|
|
p.Match(FqlParserNot)
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(620)
|
2018-10-17 11:41:40 -04:00
|
|
|
p.Match(FqlParserIn)
|
|
|
|
}
|
|
|
|
|
|
|
|
default:
|
|
|
|
panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
|
2018-10-07 17:54:02 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2021-02-15 11:37:52 -05:00
|
|
|
// ILikeOperatorContext is an interface to support dynamic dispatch.
|
|
|
|
type ILikeOperatorContext interface {
|
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
|
|
|
// IsLikeOperatorContext differentiates from other interfaces.
|
|
|
|
IsLikeOperatorContext()
|
|
|
|
}
|
|
|
|
|
|
|
|
type LikeOperatorContext struct {
|
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewEmptyLikeOperatorContext() *LikeOperatorContext {
|
|
|
|
var p = new(LikeOperatorContext)
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
|
|
|
p.RuleIndex = FqlParserRULE_likeOperator
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*LikeOperatorContext) IsLikeOperatorContext() {}
|
|
|
|
|
|
|
|
func NewLikeOperatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *LikeOperatorContext {
|
|
|
|
var p = new(LikeOperatorContext)
|
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
|
|
|
p.RuleIndex = FqlParserRULE_likeOperator
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *LikeOperatorContext) GetParser() antlr.Parser { return s.parser }
|
|
|
|
|
|
|
|
func (s *LikeOperatorContext) Like() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserLike, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *LikeOperatorContext) Not() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserNot, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *LikeOperatorContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *LikeOperatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *LikeOperatorContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterLikeOperator(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *LikeOperatorContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitLikeOperator(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *LikeOperatorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitLikeOperator(s)
|
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) LikeOperator() (localctx ILikeOperatorContext) {
|
|
|
|
localctx = NewLikeOperatorContext(p, p.GetParserRuleContext(), p.GetState())
|
2021-07-13 21:34:22 -04:00
|
|
|
p.EnterRule(localctx, 110, FqlParserRULE_likeOperator)
|
2021-02-15 11:37:52 -05:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(626)
|
2021-02-15 11:37:52 -05:00
|
|
|
p.GetErrorHandler().Sync(p)
|
|
|
|
|
|
|
|
switch p.GetTokenStream().LA(1) {
|
|
|
|
case FqlParserLike:
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(623)
|
2021-02-15 11:37:52 -05:00
|
|
|
p.Match(FqlParserLike)
|
|
|
|
}
|
|
|
|
|
|
|
|
case FqlParserNot:
|
|
|
|
p.EnterOuterAlt(localctx, 2)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(624)
|
2021-02-15 11:37:52 -05:00
|
|
|
p.Match(FqlParserNot)
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(625)
|
2021-02-15 11:37:52 -05:00
|
|
|
p.Match(FqlParserLike)
|
|
|
|
}
|
|
|
|
|
|
|
|
default:
|
|
|
|
panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2018-09-18 16:42:38 -04:00
|
|
|
// IEqualityOperatorContext is an interface to support dynamic dispatch.
|
|
|
|
type IEqualityOperatorContext interface {
|
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
|
|
|
// IsEqualityOperatorContext differentiates from other interfaces.
|
|
|
|
IsEqualityOperatorContext()
|
|
|
|
}
|
|
|
|
|
|
|
|
type EqualityOperatorContext struct {
|
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewEmptyEqualityOperatorContext() *EqualityOperatorContext {
|
|
|
|
var p = new(EqualityOperatorContext)
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
|
|
|
p.RuleIndex = FqlParserRULE_equalityOperator
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*EqualityOperatorContext) IsEqualityOperatorContext() {}
|
|
|
|
|
|
|
|
func NewEqualityOperatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *EqualityOperatorContext {
|
|
|
|
var p = new(EqualityOperatorContext)
|
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
|
|
|
p.RuleIndex = FqlParserRULE_equalityOperator
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *EqualityOperatorContext) GetParser() antlr.Parser { return s.parser }
|
|
|
|
|
|
|
|
func (s *EqualityOperatorContext) Gt() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserGt, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *EqualityOperatorContext) Lt() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserLt, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *EqualityOperatorContext) Eq() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserEq, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *EqualityOperatorContext) Gte() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserGte, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *EqualityOperatorContext) Lte() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserLte, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *EqualityOperatorContext) Neq() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserNeq, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *EqualityOperatorContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *EqualityOperatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *EqualityOperatorContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterEqualityOperator(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *EqualityOperatorContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitEqualityOperator(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *EqualityOperatorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitEqualityOperator(s)
|
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) EqualityOperator() (localctx IEqualityOperatorContext) {
|
|
|
|
localctx = NewEqualityOperatorContext(p, p.GetParserRuleContext(), p.GetState())
|
2021-07-13 21:34:22 -04:00
|
|
|
p.EnterRule(localctx, 112, FqlParserRULE_equalityOperator)
|
2018-09-18 16:42:38 -04:00
|
|
|
var _la int
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(628)
|
2018-09-18 16:42:38 -04:00
|
|
|
_la = p.GetTokenStream().LA(1)
|
|
|
|
|
|
|
|
if !(((_la)&-(0x1f+1)) == 0 && ((1<<uint(_la))&((1<<FqlParserGt)|(1<<FqlParserLt)|(1<<FqlParserEq)|(1<<FqlParserGte)|(1<<FqlParserLte)|(1<<FqlParserNeq))) != 0) {
|
|
|
|
p.GetErrorHandler().RecoverInline(p)
|
|
|
|
} else {
|
|
|
|
p.GetErrorHandler().ReportMatch(p)
|
|
|
|
p.Consume()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2019-07-09 14:19:53 -04:00
|
|
|
// IRegexpOperatorContext is an interface to support dynamic dispatch.
|
|
|
|
type IRegexpOperatorContext interface {
|
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
|
|
|
// IsRegexpOperatorContext differentiates from other interfaces.
|
|
|
|
IsRegexpOperatorContext()
|
|
|
|
}
|
|
|
|
|
|
|
|
type RegexpOperatorContext struct {
|
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewEmptyRegexpOperatorContext() *RegexpOperatorContext {
|
|
|
|
var p = new(RegexpOperatorContext)
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
|
|
|
p.RuleIndex = FqlParserRULE_regexpOperator
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*RegexpOperatorContext) IsRegexpOperatorContext() {}
|
|
|
|
|
|
|
|
func NewRegexpOperatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *RegexpOperatorContext {
|
|
|
|
var p = new(RegexpOperatorContext)
|
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
|
|
|
p.RuleIndex = FqlParserRULE_regexpOperator
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *RegexpOperatorContext) GetParser() antlr.Parser { return s.parser }
|
|
|
|
|
|
|
|
func (s *RegexpOperatorContext) RegexMatch() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserRegexMatch, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *RegexpOperatorContext) RegexNotMatch() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserRegexNotMatch, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *RegexpOperatorContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *RegexpOperatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *RegexpOperatorContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterRegexpOperator(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *RegexpOperatorContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitRegexpOperator(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *RegexpOperatorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitRegexpOperator(s)
|
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) RegexpOperator() (localctx IRegexpOperatorContext) {
|
|
|
|
localctx = NewRegexpOperatorContext(p, p.GetParserRuleContext(), p.GetState())
|
2021-07-13 21:34:22 -04:00
|
|
|
p.EnterRule(localctx, 114, FqlParserRULE_regexpOperator)
|
2019-07-09 14:19:53 -04:00
|
|
|
var _la int
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(630)
|
2019-07-09 14:19:53 -04:00
|
|
|
_la = p.GetTokenStream().LA(1)
|
|
|
|
|
|
|
|
if !(_la == FqlParserRegexNotMatch || _la == FqlParserRegexMatch) {
|
|
|
|
p.GetErrorHandler().RecoverInline(p)
|
|
|
|
} else {
|
|
|
|
p.GetErrorHandler().ReportMatch(p)
|
|
|
|
p.Consume()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
// ILogicalAndOperatorContext is an interface to support dynamic dispatch.
|
|
|
|
type ILogicalAndOperatorContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
// IsLogicalAndOperatorContext differentiates from other interfaces.
|
|
|
|
IsLogicalAndOperatorContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
type LogicalAndOperatorContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func NewEmptyLogicalAndOperatorContext() *LogicalAndOperatorContext {
|
|
|
|
var p = new(LogicalAndOperatorContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2018-12-21 23:14:41 -05:00
|
|
|
p.RuleIndex = FqlParserRULE_logicalAndOperator
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (*LogicalAndOperatorContext) IsLogicalAndOperatorContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func NewLogicalAndOperatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *LogicalAndOperatorContext {
|
|
|
|
var p = new(LogicalAndOperatorContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2018-12-21 23:14:41 -05:00
|
|
|
p.RuleIndex = FqlParserRULE_logicalAndOperator
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (s *LogicalAndOperatorContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (s *LogicalAndOperatorContext) And() antlr.TerminalNode {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s.GetToken(FqlParserAnd, 0)
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (s *LogicalAndOperatorContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *LogicalAndOperatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *LogicalAndOperatorContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterLogicalAndOperator(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *LogicalAndOperatorContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitLogicalAndOperator(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *LogicalAndOperatorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitLogicalAndOperator(s)
|
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) LogicalAndOperator() (localctx ILogicalAndOperatorContext) {
|
|
|
|
localctx = NewLogicalAndOperatorContext(p, p.GetParserRuleContext(), p.GetState())
|
2021-07-13 21:34:22 -04:00
|
|
|
p.EnterRule(localctx, 116, FqlParserRULE_logicalAndOperator)
|
2018-12-21 23:14:41 -05:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(632)
|
2018-12-21 23:14:41 -05:00
|
|
|
p.Match(FqlParserAnd)
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
|
|
|
// ILogicalOrOperatorContext is an interface to support dynamic dispatch.
|
|
|
|
type ILogicalOrOperatorContext interface {
|
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
|
|
|
// IsLogicalOrOperatorContext differentiates from other interfaces.
|
|
|
|
IsLogicalOrOperatorContext()
|
|
|
|
}
|
|
|
|
|
|
|
|
type LogicalOrOperatorContext struct {
|
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewEmptyLogicalOrOperatorContext() *LogicalOrOperatorContext {
|
|
|
|
var p = new(LogicalOrOperatorContext)
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
|
|
|
p.RuleIndex = FqlParserRULE_logicalOrOperator
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*LogicalOrOperatorContext) IsLogicalOrOperatorContext() {}
|
|
|
|
|
|
|
|
func NewLogicalOrOperatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *LogicalOrOperatorContext {
|
|
|
|
var p = new(LogicalOrOperatorContext)
|
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
|
|
|
p.RuleIndex = FqlParserRULE_logicalOrOperator
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *LogicalOrOperatorContext) GetParser() antlr.Parser { return s.parser }
|
|
|
|
|
|
|
|
func (s *LogicalOrOperatorContext) Or() antlr.TerminalNode {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s.GetToken(FqlParserOr, 0)
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (s *LogicalOrOperatorContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *LogicalOrOperatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *LogicalOrOperatorContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterLogicalOrOperator(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *LogicalOrOperatorContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitLogicalOrOperator(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *LogicalOrOperatorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitLogicalOrOperator(s)
|
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) LogicalOrOperator() (localctx ILogicalOrOperatorContext) {
|
|
|
|
localctx = NewLogicalOrOperatorContext(p, p.GetParserRuleContext(), p.GetState())
|
2021-07-13 21:34:22 -04:00
|
|
|
p.EnterRule(localctx, 118, FqlParserRULE_logicalOrOperator)
|
2018-12-21 23:14:41 -05:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(634)
|
2018-12-21 23:14:41 -05:00
|
|
|
p.Match(FqlParserOr)
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
|
|
|
// IMultiplicativeOperatorContext is an interface to support dynamic dispatch.
|
|
|
|
type IMultiplicativeOperatorContext interface {
|
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
|
|
|
// IsMultiplicativeOperatorContext differentiates from other interfaces.
|
|
|
|
IsMultiplicativeOperatorContext()
|
|
|
|
}
|
|
|
|
|
|
|
|
type MultiplicativeOperatorContext struct {
|
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewEmptyMultiplicativeOperatorContext() *MultiplicativeOperatorContext {
|
|
|
|
var p = new(MultiplicativeOperatorContext)
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
|
|
|
p.RuleIndex = FqlParserRULE_multiplicativeOperator
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*MultiplicativeOperatorContext) IsMultiplicativeOperatorContext() {}
|
|
|
|
|
|
|
|
func NewMultiplicativeOperatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *MultiplicativeOperatorContext {
|
|
|
|
var p = new(MultiplicativeOperatorContext)
|
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
|
|
|
p.RuleIndex = FqlParserRULE_multiplicativeOperator
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *MultiplicativeOperatorContext) GetParser() antlr.Parser { return s.parser }
|
|
|
|
|
|
|
|
func (s *MultiplicativeOperatorContext) Multi() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserMulti, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *MultiplicativeOperatorContext) Div() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserDiv, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *MultiplicativeOperatorContext) Mod() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserMod, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *MultiplicativeOperatorContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (s *MultiplicativeOperatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (s *MultiplicativeOperatorContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-12-21 23:14:41 -05:00
|
|
|
listenerT.EnterMultiplicativeOperator(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (s *MultiplicativeOperatorContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-12-21 23:14:41 -05:00
|
|
|
listenerT.ExitMultiplicativeOperator(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (s *MultiplicativeOperatorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2018-12-21 23:14:41 -05:00
|
|
|
return t.VisitMultiplicativeOperator(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (p *FqlParser) MultiplicativeOperator() (localctx IMultiplicativeOperatorContext) {
|
|
|
|
localctx = NewMultiplicativeOperatorContext(p, p.GetParserRuleContext(), p.GetState())
|
2021-07-13 21:34:22 -04:00
|
|
|
p.EnterRule(localctx, 120, FqlParserRULE_multiplicativeOperator)
|
2018-09-18 16:42:38 -04:00
|
|
|
var _la int
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(636)
|
2018-09-18 16:42:38 -04:00
|
|
|
_la = p.GetTokenStream().LA(1)
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
if !(((_la)&-(0x1f+1)) == 0 && ((1<<uint(_la))&((1<<FqlParserMulti)|(1<<FqlParserDiv)|(1<<FqlParserMod))) != 0) {
|
2018-09-18 16:42:38 -04:00
|
|
|
p.GetErrorHandler().RecoverInline(p)
|
|
|
|
} else {
|
|
|
|
p.GetErrorHandler().ReportMatch(p)
|
|
|
|
p.Consume()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
// IAdditiveOperatorContext is an interface to support dynamic dispatch.
|
|
|
|
type IAdditiveOperatorContext interface {
|
2018-09-18 16:42:38 -04:00
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
// IsAdditiveOperatorContext differentiates from other interfaces.
|
|
|
|
IsAdditiveOperatorContext()
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
type AdditiveOperatorContext struct {
|
2018-09-18 16:42:38 -04:00
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func NewEmptyAdditiveOperatorContext() *AdditiveOperatorContext {
|
|
|
|
var p = new(AdditiveOperatorContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
2018-12-21 23:14:41 -05:00
|
|
|
p.RuleIndex = FqlParserRULE_additiveOperator
|
2018-09-18 16:42:38 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (*AdditiveOperatorContext) IsAdditiveOperatorContext() {}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func NewAdditiveOperatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *AdditiveOperatorContext {
|
|
|
|
var p = new(AdditiveOperatorContext)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
2018-12-21 23:14:41 -05:00
|
|
|
p.RuleIndex = FqlParserRULE_additiveOperator
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (s *AdditiveOperatorContext) GetParser() antlr.Parser { return s.parser }
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (s *AdditiveOperatorContext) Plus() antlr.TerminalNode {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s.GetToken(FqlParserPlus, 0)
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (s *AdditiveOperatorContext) Minus() antlr.TerminalNode {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s.GetToken(FqlParserMinus, 0)
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (s *AdditiveOperatorContext) GetRuleContext() antlr.RuleContext {
|
2018-09-18 16:42:38 -04:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (s *AdditiveOperatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
2018-09-18 16:42:38 -04:00
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (s *AdditiveOperatorContext) EnterRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-12-21 23:14:41 -05:00
|
|
|
listenerT.EnterAdditiveOperator(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (s *AdditiveOperatorContext) ExitRule(listener antlr.ParseTreeListener) {
|
2018-09-18 16:42:38 -04:00
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
2018-12-21 23:14:41 -05:00
|
|
|
listenerT.ExitAdditiveOperator(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (s *AdditiveOperatorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
2018-09-18 16:42:38 -04:00
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
2018-12-21 23:14:41 -05:00
|
|
|
return t.VisitAdditiveOperator(s)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
func (p *FqlParser) AdditiveOperator() (localctx IAdditiveOperatorContext) {
|
|
|
|
localctx = NewAdditiveOperatorContext(p, p.GetParserRuleContext(), p.GetState())
|
2021-07-13 21:34:22 -04:00
|
|
|
p.EnterRule(localctx, 122, FqlParserRULE_additiveOperator)
|
2018-09-18 16:42:38 -04:00
|
|
|
var _la int
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(638)
|
2018-09-18 16:42:38 -04:00
|
|
|
_la = p.GetTokenStream().LA(1)
|
|
|
|
|
2018-12-21 23:14:41 -05:00
|
|
|
if !(_la == FqlParserPlus || _la == FqlParserMinus) {
|
2018-09-18 16:42:38 -04:00
|
|
|
p.GetErrorHandler().RecoverInline(p)
|
|
|
|
} else {
|
|
|
|
p.GetErrorHandler().ReportMatch(p)
|
|
|
|
p.Consume()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
|
|
|
// IUnaryOperatorContext is an interface to support dynamic dispatch.
|
|
|
|
type IUnaryOperatorContext interface {
|
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
|
|
|
// IsUnaryOperatorContext differentiates from other interfaces.
|
|
|
|
IsUnaryOperatorContext()
|
|
|
|
}
|
|
|
|
|
|
|
|
type UnaryOperatorContext struct {
|
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewEmptyUnaryOperatorContext() *UnaryOperatorContext {
|
|
|
|
var p = new(UnaryOperatorContext)
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
|
|
|
p.RuleIndex = FqlParserRULE_unaryOperator
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*UnaryOperatorContext) IsUnaryOperatorContext() {}
|
|
|
|
|
|
|
|
func NewUnaryOperatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *UnaryOperatorContext {
|
|
|
|
var p = new(UnaryOperatorContext)
|
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
|
|
|
p.RuleIndex = FqlParserRULE_unaryOperator
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UnaryOperatorContext) GetParser() antlr.Parser { return s.parser }
|
|
|
|
|
|
|
|
func (s *UnaryOperatorContext) Not() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserNot, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UnaryOperatorContext) Plus() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserPlus, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UnaryOperatorContext) Minus() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserMinus, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UnaryOperatorContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UnaryOperatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UnaryOperatorContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterUnaryOperator(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UnaryOperatorContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitUnaryOperator(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UnaryOperatorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitUnaryOperator(s)
|
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) UnaryOperator() (localctx IUnaryOperatorContext) {
|
|
|
|
localctx = NewUnaryOperatorContext(p, p.GetParserRuleContext(), p.GetState())
|
2021-07-13 21:34:22 -04:00
|
|
|
p.EnterRule(localctx, 124, FqlParserRULE_unaryOperator)
|
2018-09-18 16:42:38 -04:00
|
|
|
var _la int
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(640)
|
2018-09-18 16:42:38 -04:00
|
|
|
_la = p.GetTokenStream().LA(1)
|
|
|
|
|
2021-02-15 11:37:52 -05:00
|
|
|
if !(_la == FqlParserPlus || _la == FqlParserMinus || _la == FqlParserNot) {
|
2018-09-18 16:42:38 -04:00
|
|
|
p.GetErrorHandler().RecoverInline(p)
|
|
|
|
} else {
|
|
|
|
p.GetErrorHandler().ReportMatch(p)
|
|
|
|
p.Consume()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2021-07-13 21:34:22 -04:00
|
|
|
// IParamContext is an interface to support dynamic dispatch.
|
|
|
|
type IParamContext interface {
|
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
|
|
|
// IsParamContext differentiates from other interfaces.
|
|
|
|
IsParamContext()
|
|
|
|
}
|
|
|
|
|
|
|
|
type ParamContext struct {
|
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewEmptyParamContext() *ParamContext {
|
|
|
|
var p = new(ParamContext)
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
|
|
|
p.RuleIndex = FqlParserRULE_param
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*ParamContext) IsParamContext() {}
|
|
|
|
|
|
|
|
func NewParamContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ParamContext {
|
|
|
|
var p = new(ParamContext)
|
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
|
|
|
p.RuleIndex = FqlParserRULE_param
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ParamContext) GetParser() antlr.Parser { return s.parser }
|
|
|
|
|
|
|
|
func (s *ParamContext) Param() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserParam, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ParamContext) Identifier() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserIdentifier, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ParamContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ParamContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ParamContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterParam(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ParamContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitParam(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ParamContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitParam(s)
|
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) Param() (localctx IParamContext) {
|
|
|
|
localctx = NewParamContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 126, FqlParserRULE_param)
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(642)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserParam)
|
|
|
|
}
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(643)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserIdentifier)
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
|
|
|
// IVariableContext is an interface to support dynamic dispatch.
|
|
|
|
type IVariableContext interface {
|
|
|
|
antlr.ParserRuleContext
|
|
|
|
|
|
|
|
// GetParser returns the parser.
|
|
|
|
GetParser() antlr.Parser
|
|
|
|
|
|
|
|
// IsVariableContext differentiates from other interfaces.
|
|
|
|
IsVariableContext()
|
|
|
|
}
|
|
|
|
|
|
|
|
type VariableContext struct {
|
|
|
|
*antlr.BaseParserRuleContext
|
|
|
|
parser antlr.Parser
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewEmptyVariableContext() *VariableContext {
|
|
|
|
var p = new(VariableContext)
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
|
|
|
|
p.RuleIndex = FqlParserRULE_variable
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*VariableContext) IsVariableContext() {}
|
|
|
|
|
|
|
|
func NewVariableContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *VariableContext {
|
|
|
|
var p = new(VariableContext)
|
|
|
|
|
|
|
|
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
|
|
|
|
|
|
|
|
p.parser = parser
|
|
|
|
p.RuleIndex = FqlParserRULE_variable
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *VariableContext) GetParser() antlr.Parser { return s.parser }
|
|
|
|
|
|
|
|
func (s *VariableContext) Identifier() antlr.TerminalNode {
|
|
|
|
return s.GetToken(FqlParserIdentifier, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *VariableContext) GetRuleContext() antlr.RuleContext {
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *VariableContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
|
|
|
|
return antlr.TreesStringTree(s, ruleNames, recog)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *VariableContext) EnterRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.EnterVariable(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *VariableContext) ExitRule(listener antlr.ParseTreeListener) {
|
|
|
|
if listenerT, ok := listener.(FqlParserListener); ok {
|
|
|
|
listenerT.ExitVariable(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *VariableContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
|
|
|
switch t := visitor.(type) {
|
|
|
|
case FqlParserVisitor:
|
|
|
|
return t.VisitVariable(s)
|
|
|
|
|
|
|
|
default:
|
|
|
|
return t.VisitChildren(s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) Variable() (localctx IVariableContext) {
|
|
|
|
localctx = NewVariableContext(p, p.GetParserRuleContext(), p.GetState())
|
|
|
|
p.EnterRule(localctx, 128, FqlParserRULE_variable)
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
p.ExitRule()
|
|
|
|
}()
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if err := recover(); err != nil {
|
|
|
|
if v, ok := err.(antlr.RecognitionException); ok {
|
|
|
|
localctx.SetException(v)
|
|
|
|
p.GetErrorHandler().ReportError(p, v)
|
|
|
|
p.GetErrorHandler().Recover(p, v)
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
p.EnterOuterAlt(localctx, 1)
|
|
|
|
{
|
2021-09-02 11:09:48 -04:00
|
|
|
p.SetState(645)
|
2021-07-13 21:34:22 -04:00
|
|
|
p.Match(FqlParserIdentifier)
|
|
|
|
}
|
|
|
|
|
|
|
|
return localctx
|
|
|
|
}
|
|
|
|
|
2018-09-18 16:42:38 -04:00
|
|
|
func (p *FqlParser) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int) bool {
|
|
|
|
switch ruleIndex {
|
2021-07-13 21:34:22 -04:00
|
|
|
case 45:
|
2018-09-18 16:42:38 -04:00
|
|
|
var t *ExpressionContext = nil
|
|
|
|
if localctx != nil {
|
|
|
|
t = localctx.(*ExpressionContext)
|
|
|
|
}
|
|
|
|
return p.Expression_Sempred(t, predIndex)
|
|
|
|
|
|
|
|
default:
|
|
|
|
panic("No predicate with index: " + fmt.Sprint(ruleIndex))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *FqlParser) Expression_Sempred(localctx antlr.RuleContext, predIndex int) bool {
|
|
|
|
switch predIndex {
|
|
|
|
case 0:
|
2021-07-13 21:34:22 -04:00
|
|
|
return p.Precpred(p.GetParserRuleContext(), 26)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
case 1:
|
2021-07-13 21:34:22 -04:00
|
|
|
return p.Precpred(p.GetParserRuleContext(), 25)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
case 2:
|
2021-07-13 21:34:22 -04:00
|
|
|
return p.Precpred(p.GetParserRuleContext(), 24)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
case 3:
|
2021-07-13 21:34:22 -04:00
|
|
|
return p.Precpred(p.GetParserRuleContext(), 23)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
case 4:
|
2021-07-13 21:34:22 -04:00
|
|
|
return p.Precpred(p.GetParserRuleContext(), 22)
|
2018-10-07 17:54:02 -04:00
|
|
|
|
|
|
|
case 5:
|
2021-07-13 21:34:22 -04:00
|
|
|
return p.Precpred(p.GetParserRuleContext(), 21)
|
2018-12-21 23:14:41 -05:00
|
|
|
|
|
|
|
case 6:
|
2021-07-13 21:34:22 -04:00
|
|
|
return p.Precpred(p.GetParserRuleContext(), 20)
|
2018-12-21 23:14:41 -05:00
|
|
|
|
|
|
|
case 7:
|
2021-07-13 21:34:22 -04:00
|
|
|
return p.Precpred(p.GetParserRuleContext(), 19)
|
2019-07-09 14:19:53 -04:00
|
|
|
|
|
|
|
case 8:
|
2021-07-13 21:34:22 -04:00
|
|
|
return p.Precpred(p.GetParserRuleContext(), 18)
|
2021-02-15 11:37:52 -05:00
|
|
|
|
|
|
|
case 9:
|
2021-07-13 21:34:22 -04:00
|
|
|
return p.Precpred(p.GetParserRuleContext(), 15)
|
|
|
|
|
|
|
|
case 10:
|
|
|
|
return p.Precpred(p.GetParserRuleContext(), 14)
|
|
|
|
|
|
|
|
case 11:
|
|
|
|
return p.Precpred(p.GetParserRuleContext(), 17)
|
|
|
|
|
|
|
|
case 12:
|
|
|
|
return p.Precpred(p.GetParserRuleContext(), 16)
|
2018-09-18 16:42:38 -04:00
|
|
|
|
|
|
|
default:
|
|
|
|
panic("No predicate with index: " + fmt.Sprint(predIndex))
|
|
|
|
}
|
|
|
|
}
|